Home

IMAQ Vision for G Reference Manual

image

Contents

1. National Instruments Corporation 5 IMAQ Vision for G Reference Manual Chapter 5 Spatial Filtering The transformed image contains black white borders at the original edges and the shades of the overall patterns are darkened Source Image Gradient 1 Filtered Image 1 1 0 0 1 O 1 1 e If the central coefficient is equal to 1 x 1 the gradient filter detects the same variations as mentioned above but superimposes them over the source image The transformed image looks like the source image with edges highlighted You can use this type of kernel for grain extraction and perception of texture Source Image Gradient 2 Filtered Image 1 0 1 1 1 1 Notice that the kernel Gradient 2 can be decomposed as follows 1 1 0 1 1 0 0 0 0 1 1 1 0 1 0 1 0 0 1 1 O 1 1 0 0 0 s Note The convolution filter using the second kernel on the right side of the equation reproduces the source image All neighboring pixels are multiplied by 0 and the central pixel remains equal to itself Pap 1 x Pg jy IMAQ Vision for G Reference Manual 5 6 National Instruments Corporation Chapter 5 Spatial Filtering This equation indicates that Gradient 2 adds the edges extracted by the Gradient 1 to the source image Gradient 2 Gradient 1 Source Image Edge Thickness The larger the kernel the larger the edges The following image illustrates gradient west east 3 x 3 4 TA Finally the following
2. This chapter describes the Geometry VIs in IMAQ Vision IMAQ 3DView Displays an image using an isometric view Each pixel from the image source is represented as a column of pixels in the 3D view The pixel value corresponds to the altitude 8 t E 30 options Direction Me Image Src Image List Out Image Oat Size reduction Maximum height y L error out error in no error 3D Options is a cluster containing the elements alpha beta border background and plane alpha defines the angle between the horizontal and the base line see figure The value can be between 0 and 45 The default value is 30 beta defines the angle between the horizontal and the second baseline The value can be between 0 and 45 The default value is 30 border defines the border size in the 3D view The default value is 20 background defines the background color for the 3D view The default is 85 AE BH O National Instruments Corporation 20 1 IMAQ Vision for G Reference Manual Chapter 20 IMAQ Vision for G Reference Manual 20 2 Geometry VIs E 8 HE plane specifies the view to display if the image 1s complex There are four possible planes that can be visualized from a complex image For complex images the default is the magnitude O real imaginary 2 Default magnitude 3 phase Direction NW defines the viewing orientation shown for the 3D view Four viewing angles are possible The default 1s N
3. e IfN gt f 1 2 the Nth order Order 8 filter has the tendency to dilate bright regions or erode dark regions smoothes image dilates bright objects EN f 1 each pixel is replaced by 1ts local maximum IMAQ Vision for G Reference Manual 5 28 O National Instruments Corporation Chapter Frequency Filtering This chapter describes the frequency filters used in IMAQ Vision Introduction to Frequency Filters Frequency filters alter pixel values with respect to the periodicity and spatial distribution of the variations in light intensity in the image Highpass frequency filters help isolate abruptly varying patterns which correspond to sharp edges details and noise Lowpass frequency filters help emphasize gradually varying patterns such as objects and the background Frequency filters do not apply directly to a spatial image but to its frequency representation The latter is obtained via a function called the Fast Fourier Transform FFT It reveals information about the periodicity and dispersion of the patterns found in the source image The spatial frequencies seen in an FFT image can be filtered and the Inverse FFT then restores a spatial representation of the filtered FFT image Fer Fer ere FET In an image details and sharp edges are associated to high spatial frequencies because they introduce significant gray level variations over short distances Gradually varying patterns are associated
4. Area expressed in real units based on image spatial calibration e Scanned area Area of the entire image expressed in real units e Ratio Ratio of the object area to the entire image area Number of holes Number of holes within the object e Holes area Total area of the holes e Total area Area of the object including its holes area equals Particle Area Holes Area Particle Number Identification number assigned to an object Particles are numbered starting from 1 in increasing order from the upper left corner of the image to the lower right corner Number of Pixels Number of pixels in an object This value gives the area of an object without holes in pixel units Particle Area Area of an object expressed in real units This value is equal to Number of pixels when the spatial calibration is such that one pixel represents one square unit O National Instruments Corporation 8 5 IMAQ Vision for G Reference Manual Chapter 8 Note Quantitative Analysis Scanned Area Area of the entire image expressed in real units This value 1s equal to the product Resolution X x X Step Resolution Y x Y Step Ratio The percentage of the image occupied by all objects y article area Raros d ee scanned area Number of Holes Number of holes inside an object The software detects holes inside an object as small as 1 pixel Holes Area Total area of the holes within an object Total area
5. Dst x y SrcA x y x Constant SrcB x y All input images must of be the same image type Division by 0 is not allowed If this value is found in Image Src B the equivalent pixel value from Image Src A is directly applied to Image Dst If one of the two source images is empty the result is a copy of the other IMAQ Modulo Executes modulo division remainder of one image by another or an image by a constant Ls he F E HB zmn zmn zmn PP Constant Image Src A Image Dist Out Image Dist Image Src B Ti erar in no errar E error aut Constant The input Image Src A is divided by the Constant value for image constant operations The default is 1 Image Src A is the reference to the source input image A Image Dst is the reference to the destination image If it is connected it must be the same type as the Image Src A Image Src B is the reference to the source input image B error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src A IMAQ Vision for G Reference Manual 15 8 O
6. IMAQ Vision for G Reference Manual 15 10 O National Instruments Corporation Chapter 15 Operator VIs error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAO VI Error Clusters 1n Chapter 9 VI Overview and Programming Concepts All connected images must be the same image type An operation between an image and a constant occurs when the input Image Src B is not connected This VI is performed for each pixel x y in the following manner If two images are connected on input then Dst x y 2 SrcA x y AND SrcB x y If the input Image Src B is not connected then Dst x y 2 SrcA x y AND Constant IMAQ Or Performs an OR or NOR operation on two images or an image and a constant e he F IPIS r Mar Or aida Image Src A Image List Out Image List Image Src B Constant L error out error in no error Or Nor Or is the result from a logic operation If set to TRUE the result of a logic operation is the negative of the performed logic operation NOR instead of OR The default is FALSE which specifies a positive operation OR 3 Image Src A is the reference to the source input image A Image Dst is the reference to the destination image If it is connected it must be the same type as the Image Src A Image Src B is the reference to the source input image B Constant is a binary constant used for ima
7. Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src A error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ Vision for G Reference Manual 15 14 National Instruments Corporation Chapter 15 Operator VIs IMAQ Compare Regroups all comparison operations between two images or an image and a constant An operation between an image and a constant occurs when the input Image Src B is not connected e he F 8 12 2 Operator Image Src A Image List Out Image Dst Image Src B B Constant E errar out Operator specifies the comparison operator to use The valid operators are described in the following table e mme ETS Extracts the smallest value 3 Clear if SrcA x y lt SrcB x y or a constant Dst x y 0 Dst x y 2 SrcA x y 4 Clear if lt or SrcA x y SrcB x y or a constant Dst x y 0 Dst x y 2 SrcA x y Clear if SrcA x y SrcB x y or a constant Dst x y 0 Dst x y Src A x y Clear if gt or SrcA x y 2 SrcB x y or a constant Dst x y 0 Dst x y 2 SrcA x y 7 Clear 1f g
8. Index edge extraction and edge highlighting 5 7 to 5 9 edge thickness 5 9 example 5 5 filter axis and direction 5 6 to 5 7 kernel definition 5 5 to 5 6 predefined gradient kernels 5 10 to 5 12 Prewitt filters 5 10 Sobel filters 5 11 to 5 12 Laplacian filters 5 12 to 5 17 contour extraction and highlighting 5 14 to 5 15 contour thickness 5 15 to 5 to 16 example 5 12 to 5 13 kernel definition 5 13 predefined kernels 5 16 to 5 17 overview 5 3 to 5 4 linear histogram 2 5 logarithmic and inverse gamma correction 3 7 to 3 9 Logarithmic function logarithmic and inverse gamma correction 3 7 transfer function and effect table 3 3 Logic Operator VIs 15 10 to 15 17 IMAQ And 15 10 to 15 11 IMAQ Compare 15 15 to 15 16 IMAQ LogDiff 15 13 to 15 14 IMAQ Mask 15 17 IMAQ Or 15 11 to 15 12 IMAQ Xor 15 12 to 15 13 logic operators 4 2 to 4 7 example 1 4 5 to 4 6 example 2 4 6 to 4 7 list of operators table 4 2 truth tables 4 4 uses 4 3 lookup table transformations 3 1 to 3 11 See also Processing VIs definition 3 1 equalization 3 4 to 3 5 example 3 2 to 3 3 IMAQ Vision for G Reference Manual Index exponential and gamma correction 3 9 to 3 11 logarithmic and inverse gamma correction 3 7 to 3 9 overview 3 1 to 3 2 predefined lookup tables 3 3 to 3 4 Reverse function 3 6 to 3 7 lowpass FFT filters 6 6 to 6 9 attenuation 6 7 to 6 8 overview 6 2 truncation 6 8 to 6 9 lowpass filters
9. O National Instruments Corporation 16 11 IMAQ Vision for G Reference Manual Chapter 16 Processing Vls a The following elements are specified in this cluster Minimum is the smallest value used for processing After processing all pixel values that are less than or equal to the Minimum in the original image are set to 0 for an 8 bit image In 16 bit and 32 bit floating point images these pixel values are set to the smallest pixel value found in the original image Maximum is the largest value used for processing After processing all pixel values that are greater than or equal to the Maximum in the original image are set to 255 for an 8 bit image In 16 bit and 32 bit floating point images these pixel values are set to the largest pixel value found in the original image error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Ov
10. Threshold Upper Threshold In the case of binary objects the Threshold Interval is 1 1 IMAQ Vision for G Reference Manual 8 2 O National Instruments Corporation Connectivity Chapter 8 Quantitative Analysis Once the pixels belonging to a specified intensity threshold are identified they are grouped into objects This process introduces the notion of adjacent pixels or connectivity In a rectangular pixel frame each pixel Pj has eight neighbors as shown in the following graphic From a mathematical point of view the pixels P P4 P5 P are closer to P than the pixels P5 P4 Pe and Ps Pg P P P5 Po P4 P Ps P If D is the distance from P to P then the distances between P and its eight neighbors can range from D to 4 2 D as shown in the following graphic J2D D 2D D 0 D J2D D J2D Connectivity 8 A pixel belongs to an object if it is at a distance D or 2 D from another pixel in the object Two pixels are considered as part of a same object if they are horizontally vertically or diagonally adjacent In the following image the object count equals 1 e EA ka O National Instruments Corporation 8 3 IMAQ Vision for G Reference Manual Chapter 8 Quantitative Analysis Connectivity 4 A pixel belongs to an object if it is at a distance D from another pixel in the object Two pixels are considered as part of a same object if they are horizontally or vertically adjacent They are consider
11. 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Gaussian Filters A Gaussian filter attenuates the variations of light intensity in the neighborhood of a pixel It smoothes the overall shape of objects and attenuates details It is similar to a smoothing filter but its blurring effect is more subdued Example This example uses the following source image IMAQ Vision for G Reference Manual 5 20 National Instruments Corporation Chapter 5 Spatial Filtering A Gaussian filter produces the following image Kernel Definition A Gaussian convolution filter is an averaging filter and its kernel uses the following model a Se ue amp a a 5 where a b c and d are integers and x gt 1 Since all the coefficients in a Gaussian kernel are positive each pixel becomes a weighted average of its neighbors The stronger the weight of a neighboring pixel the more influence it has on the new value of the central pixel Unlike a smoothing kernel the central coefficient of a Gaussian filter is greater than 1 Therefore the original value of a pixel is multiplied by a weight greater than the weight of any of its neighbors As a result a greater central coefficient corresponds to a more subtle smoothing effect A larger kernel size corresponds to a stronger smoothing effect Predefined Gaussian Kernels The following tables list the predefined Gaussian kernels Table 5 11 Gaussian 3 x 3 0 1 0 0 1 0
12. Chapter 7 Morphology Analysis Erosion Function A gray level erosion reduces the brightness of pixels that are surrounded by neighbors with a lower intensity The concept of neighborhood is determined by the template of the structuring element Concept and Mathematics Each pixel Po in an image becomes equal to the minimum value of its neighbors For a given pixel Po the structuring element is centered on Po The pixels masked by a coefficient of the structuring element equal to 1 are then referred as P In the example of a 3 x 3 structuring element P can range from Pg to Pg Po min Pj Lz Note A gray level erosion using a structuring element f x f with all its coefficients set to I is equivalent to an Nth order filter with a filter size f x f and the value N equal to 0 refer to the nonlinear spatial filters Dilation Function The gray level dilation has the same effect as the gray level erosion because dilating bright regions is equivalent to eroding dark regions This function increases the brightness of each pixel that is surrounded by neighbors with a higher intensity The concept of neighborhood is determined by the structuring element Concept and Mathematics Each pixel Po in an image becomes equal to the maximum value of its neighbors For a given pixel Po the structuring element is centered on Po The pixels masked by a coefficient of the structuring element equal to 1 are then referred as Pj In the example
13. The default is 0 which specifies RGB E O Default RGB 1 HSL 2 HSV ImageRGB RGB is the input source image used for calculating the histogram It must be an RGB chunky image Image Mask if connected must be an 8 bit image Number of Classes specifies the number of classes used to classify the pixels The default is 256 error in no error is a cluster that describes the error status before this 2 0 VI executes For more information about this control see the section IMAO VI Error Clusters in Chapter 9 VI Overview and Programming Concepts T Red or Hue Histogram Report is a cluster that returns the detailed results from a histogram calculated on a red or hue plane depending on the Color Mode This cluster is the same as the cluster used by IMAQ Histogram It contains the following elements O National Instruments Corporation 22 IMAQ Vision for G Reference Manual Chapter 22 Color Vis zmn B H B B B B B Histogram returns the histogram values in an array The elements found in this array are the number of pixels per class The nth class contains all pixel values belonging to the interval Starting Value n 1 x Interval Width Starting Value n x Interval Width 1 Minimal Value returns the smallest pixel value used in calculating the histogram Maximal Value returns the largest pixel value used in calculating the histogram Starting Value is always equal to 0 here It returns the smal
14. 0 and max 255 Use file values Pixel values from the file are scanned one time to determine the minimum and maximum Then a linear interpolation is performed before loading the image 2 Use optional values Uses the two values described below Optional Min Value is the minimum value of the pixels 1f Use Min Max is selected in mode 2 Use optional values In this 11 2 O National Instruments Corporation Chapter 11 File Vis case pixels with a smaller value are altered to match the chosen minimum The default is 0 Optional Max Value is the maximum value of the pixels if Use Min Max was selected in mode 2 Use optional values In this case pixels with a greater value are truncated to match the chosen maximum The default is 255 Byte Order determines if the byte weight is to be swapped Intel or Motorola The default is FALSE which specifies Big endian Motorola TRUE specifies Little endian Intel This function is only useful if the pixels are encoded on more than 8 bits File Path is the complete path name including drive directory and filename for the file to be loaded This path can be supplied either by the user or the VI File Dialog from LabVIEW or BridgeVIEW Ep error in no error isa cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Out is the refere
15. Chapter 12 Display IMAQ WindSetROI Associates an ROI with an image window window Number 0 15 ROI Descriptor erar in na error Window Number 0 15 is a number from 0 to 15 that specifies the image window The default value is 0 ROI Descriptor is the descriptor that defines the region of interest that is associated with an image window error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts The following graphic illustrates how an ROI can be created from events generated in an image window raha Een ha haa sl KE lo RRE RIRS Bo Case of Point Tool Bit poe i go 5 FE IHR indToelsShow EB a AED ACE do a A ET IMAOMaskTORO Bee National Instruments Corporation 12 25 IMAQ Vision for G Reference Manual Chapter 12 Display This example creates a very useful type of ROI called Magic Wand A Magic Wand is a technique of selecting an ROI based on the pixel intensity value selected by the user A Magic Wand ROI selects the contours of those pixels with values that fall in the range determined by an input pixel value In this e
16. Connec UVY 41 8a eese E euet TE ER 9 15 Structurino Bement an cr 9 16 SU AIS iba 9 16 Chapter 10 Management VIs IMA Creatina ida 10 1 IMAO Create amp Lock Spa titan dra ERR RAS 10 3 IMAO DISDOSE ia ias 10 4 E A A 10 5 IMAO Sal a o 10 6 Chapter 11 File Vis IMAO Read e eti debtor t o Mnt NOU is dome n ie 11 1 IMA GetEtle Dionisio ee Es dedos edu o ROMS ce Red ATE solet Ba duebin cU dd dUeE 11 4 IMAO Writere uiii pibe ee o Aa Meo iaa 11 5 O National Instruments Corporation Xi IMAQ Vision for G Reference Manual Contents Chapter 12 Display Erit tOGQUC LOI o aset aet dd 12 1 Display Basi c a a tecew ol aacaaemeen ons 12 2 IMAO W GID Mesta 12 2 IMA Wind Close ANS 12 4 IMA NIDOS Wat 12 5 IMAO IN MONO VE o due dete CEDAR adas 12 6 IMAO NV DASS 12 7 IMA G fe Paste 12 8 IMAQ PaletteTolerance Macintosh Power Macintosh only 12 9 Display TO Rc tp 12 10 IMAO Wind Tools Se lDus s tsp teodii qaas dne ods ee o cb EUR IIR DAE Ee 12 12 IMAO Wind POOISS leon aa 12 14 IMAO Wii TOOLS SIO Wa il as 12 16 IMAO WindTools MOVE ci tias 12 17 IMAO Wind Tools CIOSE in otuos enia ote ot hose oom ete e aoa rente eo ts reet teen 12 18 INIAQ WatdLbEdstBYCHEbn eee bo PbLU A donc eed amne aioe 12 18 IMAO Wind o0 M sb sonde ges sa sede dee oda R abeo it 12 21 INEAQOON IROORIG ta rette tUe on bertus ueste n var ttu 12 22 PRES 10S OR Interes uem doseteois dm it Eten otra uus 12 23 IMAO WAndGet RO Laia 12 24 IMAO MIBndS ARO satis 12 25 IMAO
17. Example dada 7 4 NS A b adton oi oEe map istas tu docet 7 6 h fsplo p E 7 6 Moonie EP e AP atomos anes essences ances 7 6 Intetcldss VArtdns66 cose b uie UNI EE ad e RUM aM TN De PRATO UNS 7 6 A Oo 7 7 Primary Binary Morphology Fun ctions ccccccccccccccceeeeceeeaeeeeeeseesssessessesseeeceeeeeeeseees 7 9 ETOSIOU ENC 01 ON Nr 2 A ater carae sus dio e pert co nono ee 7 9 Concept and Mathematics dida 7 9 ALONE WACOM uen ac ive a te ost ABE de AP REESE nee 7 9 Concept and Mathematics na 7 9 Erosion and Dilation Examples cccccccsscccsscceseecessnsseeesseeeseeeesesseeeseeeeeeeees 7 10 Opening FUNCION Ni isa 7 12 AS o AAA e ue o Ae 7 12 GOpenins a d Closing Examples ads 7 13 External Edge PUNA 7 13 Mermal Base Eutic COT sedo E li 7 13 External and Internal Edge Example ooooooooonnnnnnncnnnncncnnnnnnnnnnnnnnnonononnnnnononaonos 7 14 Hit Mass UNC OMG laced icant E A A 7 14 Concept and Mathematics oooonnnnnncncnnnnnnnnnnnnnnnnnnnonnnnnnnonannnnannnnnnnnnnoss 7 15 Example L as id aio da 7 15 EXAample Zarra na 925909999250 4008 5 05 13d chedesdiba eei 7 16 Thinnes PUTCO se aede ERG dead ias 7 17 A uto cM m SAID IE DL CE EUM 7 17 Whicker Enc Hob it lios 7 18 Example S3 edad t ANM Falcu t0 7 19 Proper Opentne Funct Onc artis o 7 20 IMAQ Vision for G Reference Manual viii National Instruments Corporation Contents Proper Close PUNCH OM o cero Arr dep id 7 21 Ato Media BUCO Baia sta vec dedu edd are
18. The other VIs are auxiliary VIs that enable the user to extract or replace a pixel a line or a part of an image convert the image from one color model to another and convert the image to and from an array of data Color Planes Inversion PC Prior to version 4 0 color pixels RGB CHUNKY were organized the same way across all platforms All Platforms When processing the pixels as 32 bits with the Color 11b library there was a difference in the 32 bits value depending on the host machine Macintosh 68k Power PC SUN PC Biz Endian Little Endisn IMAQ Vision for G Reference Manual 22 2 National Instruments Corporation Chapter 22 Color VIs From the 4 0 version on a new memory organization 1s used The pixel bytes are stored according to the CPU logic but the 32 bit access register order 1s constant across all platforms Macintosh 68k Power PC and Windows The following graphic describes a color pixel for all platforms This solution offers many advantages including the ability to write real multi platform applications using the Color 11b library For color image transfer from an image grabber to the host memory use DMA direct or BlockMove instructions can be used for better performance Note that this change does not improve color images display speed under LabVIEW or Bridge VIEW because of overhead processing needed to organize display data as 24 bit triplets O National Instruments Corporation 2
19. see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts a An operation between an image and a constant occurs when the input Image Src B is not connected The two possibilities are distinguished in the following equations Dst x y SrcA x y SrcB x y or Dst x y SrcA x y Constant The different image type combinations supported by this VI are described below The first symbol represents the image connected to Image Src A and the second symbol represents the image type connected to Image Src B The third symbol represents the image type that should be connected to the output Image Dst S B B E R B R Q Q B B B B A A A To divide an image by a constant the output Image Dst must be connected to the same image type as the input Image Src A Division by 0 is not allowed If the constant is O it automatically is replaced by 1 If one of the two source images is empty the result is a copy of the other IMAQ Vision for G Reference Manual 15 6 O National Instruments Corporation Chapter 15 Operator VIs IMAQ MulDiv Computes a ratio between two images Each pixel in input Image Src A is multiplied by the integer value specified in the input Constant before being divided by the equivalent pixel found in input Image Src B If the background is lighter than the image this function can be used to correct the background In a background correction image Image Src A is the acquired imag
20. the histogram O National Instruments Corporation 19 5 IMAQ Vision for G Reference Manual Chapter 19 Analysis VIs Standard Deviation returns the standard deviation from the histogram The higher this value the better the distribution of the values in the histogram and the image error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAO VI Error Clusters in Chapter 9 VI Overview and Programming Concepts The following figure shows the interval for calculating a histogram where n 1s the number of pixels and c is the indexing number IMAQ LineProfile Calculates the profile of a line of pixels This VI returns a data type cluster compatible with a LabVIEW or BridgeVIEW graph The relevant pixel information is taken from the specified vector line e he F n Image LU Line Graph Line Coordinates a ine Information TF fo 3 nbal Rectangle eror in no error at error out an Image is the input source image used for calculating the line profile Line Coordinates are an array specifying the pixel coordinates that 132 form the end points of the line IMAQ Vision for G Reference Manual 19 6 O National Instruments Corporation Chapter 19 Analysis VIs Iu Note A line with the coordinates 0 0 0 255 is formed from 256 pixels Any pixels designated by the Line Coordinates found outside the actual image are set to 0 in
21. 1 1 1 0 1 0 1 2 1 0 2 1 0 S Edge S Image SE Edge SE Image 1 2 1 1 1 2 1 0 2 1 0 0 0 0 1 0 1 1 1 1 1 2 1 1 2 1 0 1 2 0 1 2 E Edge E Image NE Edge NE Image 1 0 1 1 0 2 0 1 2 0 1 2 2 0 2 2 1 2 1 0 1 1 1 1 1 0 1 1 0 1 2 1 0 2 1 0 N Edge N Image NW Edge NW Image 2 1 1 2 1 2 1 0 2 1 0 0 0 0 0 1 0 1 0 1 1 1 1 2 1 1 2 1 0 1 2 0 1 2 O National Instruments Corporation 5 11 IMAQ Vision for G Reference Manual Chapter 5 Spatial Filtering The following tables list the predefined gradient 5 x 5 and 7 x 7 kernels Table 5 3 Gradient 5 x 5 W Edge W Image 0 1 0 1 O0 0 1 0 1 O0 1 2 0 2 1 2 0 2 1 2 0 2 1 12 1 2 1 1 2 0 2 1 2 0 2 1 0 1 0 1 O0 0 1 0 1 O0 Table 5 4 Gradient 7 x 7 W Edge W Image 0 1 1 0 1 1 O0 0 1 1 0 1 1 O0 1 2 2 0 2 2 1 2 2 0 2 2 1 1 2 3 03 2 1 1 2 3 03 2 1 2 3 0 3 2 1 2 3 1 3 2 1 2 3 0 3 2 1 2 3 03 2 1 1 2 3 03 2 1 2 3 03 2 1 0 1 1 0 1 1 O0 0 1 1 0 1 1 O0 Laplacian Filters A Laplacian filter highlights the variation of the light intensity surrounding a pixel The filter extracts the contour of objects and outlines details Unlike the gradient filter it is omni directional Example This example uses the following source image IMAQ Vision for G Reference Manual 5 12 National Instruments Corporation Chapter 5 Spatial Filtering A Laplacian filter extracts contours to produce the following image Kernel Definitio
22. 12 10 IMAQ Quantify VI 19 9 to 19 10 IMAQ ReadFile VI 11 1 to 11 4 IMAQ RejectBorder VI 18 11 to 18 12 IMAQ RemoveParticle VI 18 9 to 18 10 IMAQ ReplaceColorPlane VI 22 5 to 22 6 IMAQ Resample VI 13 10 to 13 11 IMAQ RGBTocolor VI 22 23 to 22 24 IMAQ ROIToMask VI 12 27 to 12 28 IMAO Rotate VI 20 4 to 20 5 IMAQ Vision for G Reference Manual l 8 IMAQ Segmentation VI 18 14 to 18 15 IMAQ Separation VI 18 17 to 18 18 IMAQ SetCalibration VI 13 12 to 13 13 IMAQ SetColorPixelLine VI 22 20 to 22 21 IMAQ SetColorPixelValue VI 22 17 to 22 18 IMAQ SetImageSize VI 13 3 IMAQ SetOffset VI 13 9 IMAQ SetPixelLine VI 13 20 IMAQ SetPixelValue VI 13 17 IMAQ SetRowCol VI 13 21 to 13 22 IMAQ SetupBrush VI 12 43 to 12 45 IMAQ SetUserPen VI 12 40 to 12 42 IMAQ Shift VI 20 5 to 20 6 IMAQ Shiftl6to8 VI 14 5 to 14 6 IMAQ Skeleton VI 18 15 to 18 16 IMAQ Status VI 10 6 to 10 7 IMAQ Subtract VI 15 2 to 15 4 IMAQ Symmetry VI 20 7 to 20 8 IMAQ Threshold VI 16 1 to 16 2 IMAQ UserLookup VI 16 7 to 16 8 IMAQ Vision programming concepts See programming concepts IMAQ WindClose VI 12 4 to 12 5 IMAQ WindDraw VI 12 2 to 12 4 IMAQ WindDrawRect VI 12 37 IMAQ WindEraseROI VI 12 26 IMAQ WindGetMouse VI 12 35 to 12 36 IMAQ WindGetROI VI 12 24 IMAQ WindGrid VI 12 22 to 12 23 IMAQ WindLastEvent VI 12 18 to 12 21 IMAQ WindMove VI 12 6 IMAQ WindRoiColor VI 12 36 IMAQ WindSetROI VI 12 25 to 12 26 IMAQ WindSetup VI 12 34 to 12 35 IMAQ
23. 13 IMAO C olorBaualtZe iioc atl utei eee Lans en but a e posee 22 15 INIAQ Get ColorPIXelValU e snif 22 16 IMAO SetColorPrxel Value ada 22 17 IMAQ GetColotPIXelEMIe idas 22 18 IMAO Set ColorPIxelb I6 inet daa 22 20 IMAQ ColorImageToArray essen 22 2 IMAO Array TOC OLOR IBSIDO 0 eoe e ul lau itd 22 22 INLAO RGB POC Olot us dede 22 23 IMAO Intecer FoColory alue ni ios 22 24 IMAO Color Value Folie Erica dara 22 26 Chapter 23 External Library Support Vis IMAO Getlmage Pixel PIE o iio 23 1 Darme A PE PCE O EUS td E ATESAT 23 4 IMAO C Hat Ptr ToS Ng scooter la ci eie teca 23 6 IMAO Me mP Ce Knecht esi aa tetto des 23 7 Example a 23 8 INDAO Ma o ios 23 9 IMAQ Vision for G Reference Manual xvi National Instruments Corporation Contents IMAQ ImageBorderOperation sse 23 10 IMAO H dscBOotdet91Z6 as 23 11 Appendix A Customer Communication Glossary Index Figures Eieure el Rectangular Prime ai 1 7 Foue t2 Hexagonal Eramos lisa cia 1 8 Proure 22 Lihear Vertical Calas 2 5 Fisure 2 2 Linear Cumulative Scale is 2 6 Proure 2 3 Lincar Vertical Scale 2 7 Figure 2 4 Logarithmic Vertical Scale essen 2 7 Tables Table 5 1 Prewttb Ui a 5 10 Table 5 2 SODE LEET Sincan tale Coes eter A news eee 5 11 Table 5 3 Cas da MMC 5 12 Table 5 4 A PEE 5 12 Table 5 5 ES TERT 5 16 Table 5 6 Laplacian 3 X dit 5 17 Table 5 7 baplacrdia T X assente tecto tada 5 17 Tabl
24. 17 7 IMAQ GetKernel 17 3 to 17 5 IMAQ LowPass 17 10 to 17 11 IMAQ NthOrder 17 8 to 17 9 Geometry 20 1 to 20 8 IMAQ 3DView 20 1 to 20 4 IMAQ Rotate 20 4 to 20 5 National Instruments Corporation l 17 Index IMAQ Shift 20 5 to 20 6 IMAQ Symmetry 20 7 to 20 8 image type icons 9 2 to 9 3 Logic Operators 15 10 to 15 17 IMAQ And 15 10 to 15 11 IMAQ Compare 15 15 to 15 16 IMAQ LogDiff 15 13 to 15 14 IMAQ Mask 15 17 IMAQ Or 15 11 to 15 12 IMAQ Xor 15 12 to 15 13 Management VIs 10 1 to 10 7 IMAQ Create 10 1 to 10 3 IMAQ Create amp LockSpace 10 3 to 10 4 IMAQ Dispose 10 4 to 10 5 IMAQ Error 10 5 to 10 6 IMAQ Status 10 6 to 10 7 Morphology 18 1 to 18 18 IMAQ Circles 18 13 to 18 14 IMAQ Convex 18 12 IMAQ Danielsson 18 8 IMAQ Distance 18 7 to 18 8 IMAQ FillHole 18 10 to 18 11 IMAQ GrayMorphology 18 5 to 18 7 IMAQ Morphology 18 3 to 18 5 IMAQ RejectBorder 18 11 to 18 12 IMAQ RemoveParticle 18 9 to 18 10 IMAQ Segmentation 18 14 to 18 15 IMAQ Separation 18 17 to 18 18 IMAQ Skeleton 18 15 to 18 16 overview 18 1 to 18 3 Processing 16 1 to 16 14 IMAQ AutoBThreshold 16 4 to 16 5 IMAQ AutoMThreshold 16 5 to 16 7 IMAQ Equalize 16 11 to 16 12 IMAQ Label 16 13 to 16 14 IMAQ MathLookup 16 8 to 16 10 IMAQ MultiThreshold 16 2 to 16 4 IMAQ Vision for G Reference Manual Index IMAQ Threshold 16 1 to 16 2 W IMAQ UserLookup 16 7 to 16 8 Waddel disk diameter 8 16 to 8 18 Regions of Interest 12
25. 19 Analysis VIs The following values are possible for selecting complex measurements from Complex Reports 0 Area pixels 1 Area calibrated 2 Number of holes 3 Hole s area pixels 4 9 unused 10 Left column X 11 Upper row Y 12 Right column X 13 Lower row Y 14 15 unused 16 Longest segment length 17 Longest segment left column X 18 Longest segment top row Y 19 Perimeter 20 Hole s Perimeter 21 SumX 22 SumY 23 SumXX 24 Sum Y Y 25 SumXY IMAQ Vision for G Reference Manual surface area of particle in pixels surface area of particle in user units number of holes surface area of the holes in pixels left X coordinate of bounding rectangle top Y coordinate of bounding rectangle right X coordinate of bounding rectangle bottom Y coordinate of bounding rectangle length of longest horizontal line segment left most X coordinate of longest horizontal line Y coordinate of longest horizontal line segment length of outer contour of particle perimeter of all holes sum of the X axis for each pixel of the particle sum of the Y axis for each pixel of the particle sum of the X axis squared for each pixel of the particle sum of the Y axis squared for each pixel of the particle sum of the X axis and Y axis for each pixel of the particle 19 22 O National Instruments Corporation Chapter 19 Analysis VIs 26 Corrected projection corrected in x projection X N 7 Corrected project
26. 2 Plane Image Image Pisels float Optional Rectangle eror in na error PE error aut Plane indicates which component of the complex image is extracted into an array The following values are valid O Default Real Imaginary 2 Magnitude 3 Phase Image is the reference to the input complex image 13 2 Optional Rectangle specifies a rectangular region of the complex image to be extracted The operation is applied to the entire image if the input is empty or not connected IMAQ Vision for G Reference Manual 21 16 O National Instruments Corporation Chapter 21 Complex VIs error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Pixels float is a 2D floating point array Line Column containing all the pixel values that comprise the image The first index corresponds to the vertical axis and the second to the horizontal index The final size of the array is equal to the size of the image or to the size of the optional rectangle m gn Tn P error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ ArrayToComplexPlane Replaces the real part or the imaginary part of a complex i
27. 3 respectively Structuring elements greater than these sizes require corresponding increases in the image border F 3x3 The coordinate locations of the central pixel the pixel being processed is determined as a function of the structuring element In this example the coordinates of the processed pixels are 1 1 2 2 and 3 3 Note that the origin is always the upper left hand corner pixel Square Hexa Remember that a digital image is a 2D array of pixels arranged in a regular rectangular grid In image processing this grid can have two different pixel frames square or hexagonal Therefore the structuring element that is applied during a morphological transformation can have either a square frame or hexagonal frame you decide whether to use a square frame or hexagonal frame This decision affects how the algorithm perceives the image during processing when using those functions that use this concept of a frame The chosen pixel frame directly affects the output from morphological measurements for example perimeter and surface Notice however that the frame has no effect on the availability of the pixel in memory By default the square frame is used in IMAQ Vision The use of a hexagonal frame is advised for obtaining highly precise results As shown in the following graphics the even lines with respect to the odd lines have shifted a half pixel right The hexagonal frame places the pixels in a configuration ap
28. 38 O National Instruments Corporation Chapter 12 Display Zoom Factor Y ranges from 16 to 16 Center Point is a structure containing two elements that describe the x y coordinates used to center the image in the image window Using Center Point you can center an image with respect to a user chosen region Additionally you can use Center Point to place only a part of an image into an image window X 1s the horizontal coordinate of the center point Y is the vertical coordinate of the center point This value is adjusted automatically in cases in which the Center Point value is not coherent with the size of the image window and zoom factor For example an image at 256 x 256 displayed in an image window of 256 x 256 containing a zoom factor of 1 1 by definition has a single Center Point of 127 127 An erroneously entered value is corrected which produces an output value that is different than the input value Get Set Status Set specifies whether the user wants to know the present status or modify the Zoom Factor and Center Point TF error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAO VI Error Clusters in Chapter 9 VI Overview and Programming Concepts a Zoom Factors X and Y returns the actual Zoom Factor in both the axis Zoom Factor X returns the horizontal Zoom Factor Zoom Factor Y returns the vertical Zoo
29. Chapter 19 Analysis VIs X coordinate of the center of gravity Y coordinate of the center of gravity left X coordinate of bounding rectangle top Y coordinate of bounding rectangle right hand X coordinate of bounding rectangle bottom Y coordinate of bounding rectangle width of bounding rectangle in user units height of bounding rectangle in user units length of longest horizontal line segment left most X coordinate of longest horizontal line segment Y coordinate of longest horizontal line segment length of outer contour of particle in user units perimeter of all holes in user units sum of the X axis for each pixel of the particle sum of the Y axis for each pixel of the particle sum of the X axis squared for each pixel of the particle sum of the Y axis squared for each pixel of the particle sum of the X axis and Y axis for each pixel of the particle IMAQ Vision for G Reference Manual Chapter 19 Analysis VIs 26 2T 28 29 30 31 32 33 34 35 36 37 38 39 40 41 IMAQ Vision for G Reference Manual Corrected projection X Corrected projection Y Moment of inertia Ixx Moment of inertia Iyy Moment of inertia Ixy Mean chord X Mean chord Y Max intercept Mean intercept perpendicular Particle orientation Equivalent ellipse minor axis Ellipse major axis Ellipse minor axis Ratio of equivalent ellipse axis Rectangle big side Rectangle small side 19 18 proje
30. Color Mode 2 It must be an 8 bit image The input must be connected for the color plane to be extracted IMAQ Vision for G Reference Manual 22 4 O National Instruments Corporation Chapter 22 Color VIs error in no error is a cluster that describes the error status before this E VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts arr Red or Hue Plane out is the reference to the image containing the red or hue plane of the source input image zu Green or Sat Plane out is the reference to the image containing the green or saturation plane of the source input image zu Blue or Light or Val Plane out is the reference to the image containing the blue or lightness or value plane of the source input image zu error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ ReplaceColorPlane Replaces one or more image planes from a color image RGB HSL or HSV Only the planes connected at the input are replaced If all three planes are connected then the input Image Src is not necessary and only the Image Dst is used The image is resized to the dimensions of the planes passed on input therefore their size must be identical If one or two planes are connected then the pl
31. Color Palette No determines whether the user wants to load the color table present in the file if it exists If loaded this table is read and made available to the output Color palette The default is FALSE File Options is a cluster of user optional values that permits the user to read non standard file formats The file structure must be known to the user This cluster consists of the following elements File Data Type indicates how the image file is encoded The possible formats are O 1 bit 1 2 bits 2 4bits 3 8 bits default O National Instruments Corporation 11 1 IMAQ Vision for G Reference Manual Chapter 11 File Vis IMAQ Vision for G Reference Manual 10 11 12 13 14 16 bits unsigned 16 bits signed 16 bits RGB chunky 24 bits RGB chunky 24 bits RGB planar 32 bits unsigned 32 bits signed 32 bits RGB chunky 32 bits float 48 bits Complex 2 x 24 int 64 bits Complex 2 x 32 float Offset to Data specifies the size in bytes of the file header This part of the file is not taken into account when read The pixel values are read from the byte immediately after the offset size The default is 0 Use Min Max determines if the user is using a predetermined minimum and maximum The technique to determine this minimum and maximum depends on the following input values 0 Don tuse min max Minimum and maximum are dependent 1 on the type of image For an 8 bit image min
32. Corporation l 3 Index D Danielsson function advanced binary morphology 7 29 to 7 30 See also IMAQ Danielsson VI densitometry parameters 8 18 to 8 19 destroying images See IMAQ Dispose VI Difference operator equation table 4 2 differentiation filter 5 25 digital image processing 1 1 digital images See images digital object definition 8 2 to 8 5 area threshold 8 4 to 8 5 connectivity 8 2 to 8 4 intensity threshold 8 2 dilation function gray level morphology 7 33 to 7 34 primary binary morphology 7 9 to 7 11 Display VIs Display Basics 12 2 to 12 10 IMAQ GetPalette 12 8 to 12 9 IMAQ PaletteTolerance Macintosh Power Macintosh only 12 9 to 12 10 IMAQ WindClose 12 4 to 12 5 IMAQ WindDraw 12 2 to 12 4 IMAQ WindMove 12 6 IMAQ WindShow 12 5 IMAQ WindSize 12 7 to 12 8 Display Special 12 34 to 12 46 IMAQ GetLastKey 12 46 IMAQ GetScreenSize 12 37 to 12 38 IMAQ GetUserPen 12 42 to 12 43 IMAQ SetupBrush 12 43 to 12 45 IMAQ SetUserPen 12 40 to 12 42 IMAQ WindDrawRect 12 37 IMAQ WindGetMouse 12 35 to 12 36 IMAQ WindRoiColor 12 36 IMAQ WindSetup 12 34 to 12 35 IMAQ WindXYZoom 12 38 to 12 40 IMAQ Vision for G Reference Manual Index Display Tools 12 10 to 12 23 IMAQ WindGrid 12 22 to 12 23 IMAQ WindLastEvent 12 18 to 12 21 IMAQ WindToolsClose 12 18 IMAQ WindToolsMove 12 17 IMAQ WindToolsSelect 12 14 to 12 16 IMAQ WindToolsSetup 12 12 to 12 14 IMAQ WindToolsShow 1
33. Dilation A pixel is set to 1 if it 1s equal to 1 or if it has one of its three upper left neighbors equal to 1 The dilation expands the lower right borders of the objects A pixel is set to 1 if it is equal to 1 or if it has its lower or right neighbor equal to 1 The dilation expands the upper and left borders of the objects The opening function is an erosion followed by a dilation This function removes small objects and smoothes boundaries Zf I is an image opening l dilation erosion I This operation does not alter the area significantly and shape of objects because erosion and dilation are dual transformations Borders removed by the erosion are restored by the dilation However small objects that vanish during the erosion do not reappear after the dilation The closing function is a dilation followed by an erosion It fills tiny holes and smoothes boundaries f is an image closing I erosion dilation I This operation does not alter significantly the area and shape of objects because dilation and erosion are morphological complements Borders expanded by the dilation function are reduced by the erosion function However tiny holes filled during the dilation do not reappear after the erosion IMAQ Vision for G Reference Manual 12 National Instruments Corporation Chapter 7 Morphology Analysis Opening and Closing Examples The following series of graphics illustrate examples of openings and c
34. Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src IMAQ Vision for G Reference Manual 13 10 O National Instruments Corporation Chapter 13 Tool Vls Eu error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ GetCalibration Obtains the present image calibration 8 he E Es Ls La Image error in na error an Image is the reference to the source input image Ep error in no error is acluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Unit is the measuring unit associated with the image It can have the following values O Undefined Angstrom 2 micrometer 3 millimeter 4 centimeter 5 meter 6 kilometer 7 microinch National Instruments Corporation 18 11 IMAQ Vision for G Reference Manual Chapter 13 Tool Vls 8 inch 9 feet 10 nautical miles 11 standard miles X Step specifies the horizontal distance separating two a
35. External Library Support VIs in IMAQ Vision Appendix A Customer Communication contains forms you can use to request help from National Instruments or to comment on our products and manuals The Glossary contains an alphabetical list and description of terms used in this manual including abbreviations acronyms metric prefixes mnemonics and symbols The ndex contains an alphabetical list of key terms and topics in this manual including the page where you can find each one XX National Instruments Corporation About This Manual Conventions Used in This Manual The following conventions are used in this manual bold italic bold italic monospace bold monospace lt gt lt Control gt paths National Instruments Corporation XXi Bold text denotes the names of menus menu items parameters dialog box buttons or options icons Windows 95 tabs or LEDs Italic text denotes variables emphasis a cross reference or an introduction to a key concept Bold italic text denotes an activity objective note caution or warning Text in this font denotes text or characters that you should literally enter from the keyboard sections of code programming examples and syntax examples This font also is used for the proper names of disk drives paths directories programs subprograms subroutines device names filenames and extensions and for statements and comments taken from program code
36. Function The Danielsson function also creates a distance map but is a more accurate algorithm than the classical distance function Use the Danielsson function instead of the distance function when possible Example This example uses the following source threshold image O National Instruments Corporation 7 29 IMAQ Vision for G Reference Manual Chapter 7 Morphology Analysis Circle Function The image is sequentially processed with a lowpass filter hole filling and the Danielsson function The Danielsson function produces the following distance map image It is useful to view this final image with a binary palette In this case each level corresponds to a different color The user easily can determine the relation of a set of pixels to the border of an object The first layer the layer that forms the border is colored red The second layer the layer closest to the border 1s green the third layer is blue and so forth The circle function enables the user to separate overlapping circular objects The circle function uses the Danielsson coefficient to reconstitute the form of an object provided that the objects are essentially circular The objects are treated as a set of overlapping discs that is then separated into separate discs Therefore it is possible to trace circles corresponding to each object IMAQ Vision for G Reference Manual 30 National Instruments Corporation Chapter 7 Morphology Analysis Exampl
37. Gauss an FTE aia 5 20 Example taa idea 5 20 Kernel STIL OI cese ea n e E E E S 5 21 Predefined Gaussian Kernels ea 5 21 Nonlincar Ee ienn E cand ese a d doedentos adidas 5 22 Nonlinear Prewitt EAE oto eite ete uoto a t ehe eom tar e fette Renan 5 23 Nonlinear SOBEL Elite sia naaa cessat o Eon 5 23 Exalead n 5 24 Nonlinear Gradiente ea a EAA 5 25 ROBEN Me E UU 5 25 Ditterentiation RET TM 5 25 SII M CE UO D T DONT et taasvaantd 5 26 LOMpass ler a IM ERN e eatamiats tenes 5 26 Median EMT UE T 5 27 Nik Order rca 5 27 A a a 5 28 Chapter 6 Frequency Filtering Introduction to Frequency Filters cccccessesssssssessesseeseeeseeeceeecceeeeceeeeceeeeeeeeeeeeeeeeeess 6 1 Ixowpass REP PUES oio td cd 6 2 ich pass BET Pilters tritt ein e UE 9050094900857 0535 2t T2427 4292 1624032002 0299 6 2 Mas EET PAGES nta ocio 6 3 DEMONIO cis 6 3 FTE 1S e IT 6 4 Standard Representa isidro 6 6 Opucal Representado serosa lidad 6 6 O National Instruments Corporation vii IMAQ Vision for G Reference Manual Contents Feegueney FIO man a a OS o 6 7 Lowpass Prequency Fie eann e ture ba ru e o E 6 7 Lowpass uXtEe HU ELOTI eeo a E UDI 6 7 Ow pass Trum atO ienna a asc 6 8 Hiehpass Frequency FEN aora ca 6 9 FLT ASS AMERO id 6 10 Hiehipass Truc aseo 6 10 Chapter 7 Morphology Analysis TIEM aan dla 7 1 De E O oO I O son DU E LDotOU E CE LUE 7 2 Thiresholdimo a Color Imas tata 7 3 A tomatie ANO bes 7 3 O o pshet uds pA eI S E n Ed 7 3
38. Gives variable effects depending on the value of X The default value of X is 1 5 6 Power I X Gives variable effects depending on the value of X The default value of X 1s 1 5 AP Note For an 8 bit image the minimum is always 0 and the maximum is always 255 For 32 bit floating point images the minimum and maximum are the endpoint values found in the image prior to processing error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAO VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAO VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ Vision for G Reference Manual 16 10 National Instruments Corporation Chapter 16 Processing VIs IMAQ Equalize Produces a histogram equalization of an image This VI redistributes the pixel values of an image in order to provide an accumulated linear histogram It is necessary to execute IMAQ Histogram prior to this VI in order to supply Histogram Report as input The
39. Image 5rc A Image Dst Out Image List erar in na error uk error out Image Src is the handle of the source image for the image to be 2 0 transposed This input can accept only a complex image ER Image Dst is the handle of the complex image that contains the resulting FFT image This input can accept only a complex image a error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAO VI Error Clusters in Chapter 9 VI Overview and Programming Concepts zu Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src IMAQ Vision for G Reference Manual 21 4 O National Instruments Corporation Chapter 21 Complex VIs Eu error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ ComplexConjugate Computes the conjugate of a complex image This VI converts the complex pixel data z a ib of an FFT image into z a ib 5 PP Image Src Image Dist Out Image Dat eror in na error E error aut Image Src is the handle of the source image for the image that is used to measure t
40. Image Src B is the handle of the second source image This input can accept an 8 bit 16 bit 32 bit floating point or complex image E error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src A O National Instruments Corporation 21 11 IMAQ Vision for G Reference Manual Chapter 21 Complex VIs ET error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts An operation between an image and a constant occurs when the input Image Src B is not connected The two possibilities are distinguished in the following equations Dst x y 2 SrcA x y x SrcB x y or Dst x y 2 SrcA x y x Constant The different image type combinations supported by this VI are described in the following table where I is the resulting image that is connected to the output Image Dst Image Connected to Image Connected Image Src A to Image Src B Equations a complex image an 8 bit
41. Line Graph Ep error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Line Graph is a cluster that contains the line profile with an X origin at 0 and an increment of 1 The cluster contains the following elements x0 always returns Q BH dx always returns 1 st Pixels Line returns the line profile calculated in an array in which elements represent the pixel values belonging to the specified vector Line Information is a cluster containing relevant information about the pixels found in the specified vector This cluster contains the following elements Min returns the smallest pixel value found in the line profile Max returns the largest pixel value found in the line profile Mean returns the mean value of the pixels found in the line profile Var returns the standard deviation from the line profile Count found in the line profile HB BB B E Global Rectangle is a cluster that contains the coordinates of a bounding rectangle for the line in the image The following elements are included in the cluster x1Left indicates the coordinates for the upper left corner of the rectangle O National Instruments Corporation 19 7 IMAQ Vision for G Reference Manual Chapter 19 Analysis VIs y1Top indicates the coordinates for the top left corner of the rectan
42. National Instruments Corporation Chapter 15 Operator VIs Eu error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts An operation between an image and a constant occurs when the input Image Src B is not connected The two possibilities are distinguished in the following equations Dst x y 2 SrcA x y 9o SrcB x y or Dst x y 2 SrcA x y 9o Constant If Image Src A is a 32 bit floating point image then the following operation is performed Dst x y SrcA x y SrcB x y x E SrcA x y SrcB x y or Dst x y SrcA x y Constant x E SrcA x y Constant where E x is the integer part of x The different image type combinations supported by this VI are described in the following equations The first symbol represents the image connected to Image Src A and the second symbol represents the image type connected to Image Src B The third symbol represents the image type that should be connected to the output Image Dst 8 8 16 s IF 8 f 16 he IF re e IF R F To modulo divide an image by a constant the output Image Dst must be connected to the same image type as the input Image Src A Division by 0 is not allowed If 0 is found in the divider it automatically is replaced by 1 If one of the two source images is empty th
43. Possible Inputs Resulting Type of Output Complex Reports and Parameters Coefficients 2D Complex Reports and Parameter Coefficients 1D Complex Report and Parameters Coefficients 1D IMAQ ChooseMeasurements Returns a selection of particle measurements that are sent from IMAQ BasicParticle or IMAQ ComplexParticle based on a minimum and maximum criteria With this VI you choose which measurements you want to obtain from a particle detection process PP Reject Border Mo EET E Image E Basic Reports Basic Reporte Out 1 Number of Basic Particles Complex Reports g Selection Values r TT n Complex Reports Out Selection Value i Number of Complex Particles erar in na error ib error cut A Reject Border No determines whether particles touching the border should be measured If set to TRUE the measurements for particles touching the border are rejected In this case the input image source must be connected to the input Image The default is FALSE Image is the same input source image that is used to measure the particle coefficients by IMAQ BasicParticle or IMAQ ComplexParticle This input is used only in a case in which particles touching the border are discarded for measurement calculations Reject Border is set to TRUE IMAQ Vision for G Reference Manual 19 20 O National Instruments Corporation i Note 10 11 12 13 Chapter 19 Analysis VIs Basic Reports is the output array of measurements
44. Reference Manual 5 14 National Instruments Corporation Chapter 5 Spatial Filtering Notice that the Laplacian 2 kernel can be decomposed as follows 1 1 1 1 l 0 0 0 1 9 1 1 8 1 O 1 0 0 1 1 1 1 1 0 0 0 s Note The convolution filter using the second kernel on the right side of the equation reproduces the source image All neighboring pixels are multiplied by 0 and the central pixel remains equal to itself Po 7 1E x PG y This equation indicates that the Laplacian 2 kernel adds the contours extracted by the Laplacian 1 kernel to the source image Laplacian 1 Laplacian 2 Source Image For example if the central coefficient of Laplacian 2 kernel is 10 the Laplacian filter adds the contours extracted by Laplacian 1 kernel to the source image times 2 and so forth A greater central coefficient corresponds to less prominent contours and details highlighted by the filter Contour Thickness Larger kernels correspond to larger contours The following image is a Laplacian 3 x 3 National Instruments Corporation 5 15 IMAQ Vision for G Reference Manual Chapter 5 Spatial Filtering The following image is a Laplacian 7 x 7 Predefined Laplacian Kernels The following tables list the predefined Laplacian kernels IMAQ Vision for G Reference Manual Contour 4 0 1 0 1 4 1 0 1 0 Contour 8 x el 8 4 else Contour 12 El 2 12 2 2 I Table 5 5 Laplacian 3 x 3 Im
45. The auto median function uses dual combinations of openings and closings It generates simpler objects that have fewer details If Iis the source image the auto median extracts the minimum value of each pixel between the two images obtained by applying a proper opening and a proper closing of the source image 7 auto median I min OCO I COC I or auto median T mn DEEDDE I EDDEED I where I is the source image E 1s an erosion D 1s a dilation O is an opening C is a closing F I is the image obtained after applying the function F to the image and GF I is the image obtained after applying the function F to the image followed by the function G to the image IMAQ Vision for G Reference Manual 38 National Instruments Corporation Chapter Quantitative Analysis This chapter provides an overview of quantitative image analysis The quantitative analysis of an image consists of obtaining densitometry and object measurements Before starting this analysis it is necessary to calibrate the image spatial dimensions and intensity scale to obtain measurements expressed in real units spatial Calibration Spatial calibration consists of correlating the area of a pixel with physical dimensions The latter can be defined by three parameters X Step Y Step and Unit X Step and Y Step are the horizontal and vertical lengths of a pixel Unit is the selected unit of distance The area of a pixel is then equa
46. Tool Point Get Set Status Set error in no error IMAQ Vision for G Reference Manual 12 14 O National Instruments Corporation Chapter 12 Display Tool Point can have the following values 0 1 E NA EJ No Selection P oint Select a pixel in the image Draw a line in the image ectangle Draw a rectangle or square in the image Draw an oval or circle in the image Draw a polygon in the image Draw a freehand region in the image nused 1 gt Zoom in or zoom out in an image Unused 2 LEN LS Free Hand Line Draw a free hand line in the image National Instruments Corporation 12 15 IMAQ Vision for G Reference Manual d Chapter 12 Display Get Set Status Set specifies 1f the user wants to know the present status or modify the status of the available region tools The default is TRUE Set Ep error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Tool returns the chosen region tool zu error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Note This VI can be used even if the WindTools palette is not displayed IMAQ WindToolsShow Show
47. V using the VI IMAQ IntegerToColorV alue 5 Image Image Pisels U32 Optional Rectangle error in no error aE error aut Image must be an RGB chunky image rma Ll 132 Optional Rectangle designates a rectangular region Left Top Right Bottom within an image in which the pixels are to be changed If this array is empty the entire image is changed error in no error isa cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Pixels U32 returns the pixel values as a 2D array of unsigned 32 bit integer indicators E National Instruments Corporation 22 21 IMAQ Vision for G Reference Manual Chapter 22 Color Vis ET error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts The following graphic illustrates the use of this VI m zb Color value arra Optional Rectangle FEF FEF E Red Values Optional Rectangle IMAQ ArrayToColorimage Creates a color image from a 2D array This VI receives the values as a 2D array of unsigned 32 bit integer controls A 2D array of clusters coding the three color values as either R G B H S L or H S V can be converted into a 2D array of pixels unsigned 32 bit
48. Vision for G Reference Manual 18 12 National Instruments Corporation Chapter 18 Morphology VIS IMAQ Circles Separates overlapping circular objects and classifies them based on their radius surface area and perimeter Starting from a binary image it finds the radius and center of the circular objects even when multiple circular objects overlap In addition this VI can trace the circles in the destination image It constructs and uses a Danielsson distance map to determine the radius of each object La ib Image Src Image List Out Image Dist 3 Nb Circles Min Radius ri 273 Circles Data Max R adius error aut erar in na errar Ly Note IMAQ Circles works correctly only for circles that have a radius less than or equal to 256 pixels Image Src is the reference to the source input image Image Dst is the reference to the destination image If it is connected it must be the same type as the Image Src Min Radius is the smallest radius in pixels that is detected Circles possessing a radius smaller than this value do not appear in the destination image and have a negative radius value in the output Circles Data The default is 1 BEE Max Radius default 10 is the largest radius in pixels that is detected Circles possessing a radius larger than this value do not appear in the destination image and have a negative radius value in the output Circles Data The default 1s 10 E Ep error in no
49. Vision for G Reference Manual 21 8 O National Instruments Corporation Chapter 21 Complex VIs An operation between an image and a constant occurs when the input Image Src B is not connected The two possibilities are distinguished in the following equations Dst x y 2 SrcA x y SrcB x y or Dst x y 2 SrcA x y Constant The different image type combinations supported by this VI are described in the following table where is the resulting image that is connected to the output Image Dst Image Connected Image Connected to Image Src A to Image Src B Equations a complex image J an 8 bit 16 bit or 32 bit Real Real Ue yi Lie pits OF Lao pis floating point image Imaginary Imaginary la oio Li bie OF L52 bit a complex image L another complex image Real Real Real Imaginary Imaginary 1 Imaginary IMAQ ComplexSubtract Subtracts two images where the first is a complex image or subtracts a complex constant from a complex image 3 La 2 Constant Image Sre A Image Dat Out Image List Image Src B Ti eror in no errar in error out Constant is the complex constant subtracted from the input Image Src A for image constant operations The default is 0 Image Src A is the handle of the first source image and must be a complex image Image Dst is the handle of the complex image that contains the resulting FFT image This input can accept onl
50. WindDraw 5 Palette Number gray Color Palette error in no error at error out Palette Number gray enables the user to select one of the five predefined palettes The relationship between the value and Palette Number is described below Gray Gray scale is the default palette The color tables are all identical Binary Binary palette is designed especially for binary images Gradient Gradient palette Rainbow Rainbow palette Temperature Temperature palette Ep error in no error is acluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts 20 Color Palette indicates an array of clusters composed of 256 elements for each of the three color planes A specific color is the result of applying a value between 0 and 255 for each of the three color planes red green and blue If the three planes have the identical value then IMAQ Vision for G Reference Manual 12 8 National Instruments Corporation zmn Chapter 12 Display a gray level is obtained 0 specifies black and 255 specifies white This output is to be directly connected to the input Color Palette of IMAQ WindDraw error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming C
51. WindShow VI 12 5 IMAQ WindSize VI 12 7 to 12 8 IMAQ WindToolsClose VI 12 18 IMAQ WindToolsMove VI 12 17 IMAQ WindToolsSelect VI 12 14 to 12 16 IMAQ WindToolsSetup VI 12 12 to 12 14 IMAQ WindToolsShow VI 12 16 to 12 17 IMAQ WindUserClose VI 12 33 O National Instruments Corporation IMAQ WindUserEvent VI 12 33 to 12 34 IMAQ WindUserMove VI 12 32 IMAQ WindUserSetup VI 12 29 to 12 30 IMAQ WindUserShow VI 12 31 to 12 32 IMAQ WindUserStatus VI 12 30 to 12 31 IMAQ WindXYZoom VI 12 38 to 12 40 IMAQ WindZoom VI 12 21 to 12 22 IMAQ WriteFile VI 11 5 to 11 6 IMAQ Xor VI 15 12 to 15 13 intensity calibration 8 2 intensity range 8 2 intensity threshold 8 2 interclass variance automatic thresholding 7 6 internal edge function primary binary morphology 7 13 to 7 14 L L skeleton function 7 26 labeling function advanced binary morphology 7 23 See also IMAQ Label VI Laplacian convolution filter 5 13 Laplacian filters 5 12 to 5 17 contour extraction and highlighting 5 14 to 5 15 contour thickness 5 15 to 5 to 16 definition 5 12 example 5 12 to 5 13 kernel definition 5 13 predefined kernels 5 16 to 5 17 length parameters 8 7 to 8 8 breadth 8 7 height 8 8 holes perimeter 8 7 particle perimeter 8 7 line entity 9 14 line profile 2 7 to 2 8 linear filters defined 5 2 linear filters or convolution filters 5 3 to 5 22 gradient filter 5 4 to 5 12 O National Instruments Corporation l 9
52. X Duplication Step and Y Duplication Step are both equal to 2 then the resulting image has a resolution of 512 x 512 Each pixel in the original image now is represented by four pixels in new image 2 x 2 The input images must be of the same image type IMAQ Vision for G Reference Manual 13 6 National Instruments Corporation Chapter 13 Tool Vls The following graphic illustrates an expansion of an image where X Duplication Step equals 2 and Y Duplication Step equals 3 a0 ae 9 ve aq 20 0 30 a9 aq 029 20 0 se sponso 00001010 20 20 30 30 ewe eea o poer on oxpeiepperpsos5 os ae ve ve ee as as se oe ae ve ve 0222 3232 s as ve se ea 2 32 32 IMAQ GetOffset Returns the position of an image mask in relation to the origin of the coordinate system 0 0 The default offset value 0 0 is established when the image is initially created by IMAQ Create The offset is used only for masked images With this offset the mask can be moved to any location in the image without having to create a new image for each mask La 2 error in na error Image is the reference to the source input image error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAO VI Error Clusters 1n Chapter 9 VI Overview and Programming Concepts HE X Offset specifies the horizontal offset of the image mask O National Inst
53. a National Instruments Corporation 13 17 IMAQ Vision for G Reference Manual Chapter 13 Tool VIs IMAQ GetPixelLine Extracts the intensity values of a line of pixels e he F n Pitels Line US Line Coordinates Fisel Line 116 I Pixels Line SGL erar in na error a error out Image is the reference to the source input image 132 Line Coordinates are the coordinates of the line to extract These coordinates are in the form of an array specifying the endpoints of the line Note that a line with the coordinates 0 0 0 255 is formed from 256 pixels The output Pixels Line is an array containing the intensity values of the pixels in the selected line Any pixels designated by the Line Coordinates found outside the actual image are set to zero in Pixels Line error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Pixels Line US returns the intensity values for the specified line of pixels This output 1s used only for an 8 bit image r3 E LJ Pixels Line 116 returns the intensity values for the specified line of pixels This output 1s used only for a 16 bit image Pixels Line SGL returns the intensity values for the specified line of pixels This output is used only for a 32 bit floating point image error out is a cluster that d
54. and is equal to Q u v atan qui 2 Given an image with a resolution NM and given A x and A y the spatial step increments the FFT of the source image has the same resolution NM and its frequency step increments A u and A v which are defined in the following equations l l Pur Bea The FFT of an image has the following two properties e tis periodic F u v F u N v M e tis conjugate symmetric F u v F u v These properties result in two possible representations of the Fast Fourier Transform of an image the standard representation and the optical representation O National Instruments Corporation 6 5 IMAQ Vision for G Reference Manual Chapter 6 Frequency Filtering Standard Representation High frequencies are grouped at the center while low frequencies are located at the edges The constant term or null frequency is in the upper left corner of the image The frequency range is 0 NAu x 0 MAv Low frequencies B Optical Representation Low frequencies are grouped at the center while high frequencies are located at the edges The constant term or null frequency is at the center of the image The frequency range is N N M M Au zan x zy Ay High frequencies C E low B i rirequenciezj IMAQ Vision for G Reference Manual 6 6 O National Instruments Corporation Chapter 6 Frequency Filtering You can switch from the standard representation to the optical representation by pe
55. area can be used focus further processing Inverts the pixel values in an image producing a photometric negative of the image Color image encoding using red green and blue colors Color encoding scheme using red green and blue RGB color information where each pixel in the color image is encoded using 32 bits 8 bits for red 8 bits for green 8 bits for blue and 8 bits for the alpha value unused Extracts the contours edge detection in gray level favoring diagonal edges Region of interest G 9 IMAQ Vision for G Reference Manual S segmentation function separation function Sigma filter skeleton function skiz smoothing filter Sobel filter spatial calibration spatial filters spatial resolution Square function Square Root function standard representation structuring element IMAQ Vision for G Reference Manual Fully partitions a labeled binary image into non overlapping segments with each segment containing a unique object Separates objects that touch each other by narrow isthmuses A highpass filter that outlines edges Applies a succession of thinning operations to an object until its width becomes one pixel Obtains lines in an image that separate each object from the others and are equidistant from the objects that they separate Blurs an image by attenuating variations of light intensity in the neighborhood of a pixel Extracts the contours edge detection in gray level
56. between an image and a constant occurs when the input Image Src B is not connected This VI is performed for each pixel x y in the following manner If two images are connected on input then Dst x y SrcA x y XOR SrcB x y If the input Image Src B is not connected then Dst x y SrcA x y XOR Constant IMAQ LogDiff Keeps bits found in Image Src A that are absent from image Image Src B S te R Constant Image Src A i Image List Out Image Dat Image Src B T eror in na errar a error aut National Instruments Corporation 15 13 IMAQ Vision for G Reference Manual Chapter 15 Operator VIs This VI is performed for each pixel x y in the following manner If two images are connected on input then Dst x y SrcA x y And Not SrcB x y Ifthe input Image Src B is not connected then Dst x y 2 SrcA x y And Not Constant Constant is a constant value that can replace Image Src B for image constant operations The default is 0 Image Src A is the reference to the source input image A it must be the same type as the Image Src A mu Image Dst is the reference to the destination image If it is connected Image Src B is the reference to the source input image B E error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts
57. by a hard return Color is the mode for writing the text The default is 0 which specifies white 0 White Default White on the image background Black Black on the image background 2 Inverted Text inverted on the image background 3 Black on White 4 White on Black Image Src is the image reference source It must be an 8 bit or RGB DE image zz Image Dst is the reference of the image destination If it is connected it must be the same type as the Image Src 132 Insertion Point is an array x and y specifying the location in which the text 1s inserted The text position depends on the alignment mode chosen The default is 0 0 zn Font Size amp Style is a cluster that enables the user to choose the font size style and alignment and contains the following elements desired font Application specifies the character type of the ui use text The following values are possible O User specified Font Default Application Font 2 System Font 3 Dialog Font IMAQ Vision for G Reference Manual 13 26 National Instruments Corporation Chapter 13 Tool Vls DET user specified font is a cluster containing the specific font characteristics for the text to draw This specification is ignored unless the desired font control is set to user specified font ie Note The list of fonts on a Macintosh and Windows are different Font Name is the name of the user specified font Strikeout If TRUE text appears i
58. corresponds to 234 corresponds to 253 corresponds to 128 corresponds to corresponds to corresponds to The histogram of a reversed image 1s equal to the histogram of the original image after a vertical symmetry centered on the gray level value 128 when processing an 8 bit image Example This example uses the following original image and histogram IMAQ Vision for G Reference Manual 3 6 O National Instruments Corporation Chapter 3 Lookup Transformations A Reverse transformation produces the following histogram and image x Y E Pa Logarithmic and Inverse Gamma Correction The logarithmic and inverse gamma corrections expand low gray level ranges while compressing high gray level ranges When using the B amp W or Gray palette these transformations increase the overall brightness of an image and increase the contrast in dark areas at the expense of the contrast in bright areas The following graphs show how the transformations behave The horizontal axis represents the input gray level range and the vertical axis represents the output gray level range Each input gray level value is plotted vertically and its point of intersection with the lookup curve is plotted horizontally to give an output value 1 4 1 3 1 e The Logarithmic Square Root and Power 1 Y functions expand intervals containing low gray level values while compressing intervals containing high gray level values The higher th
59. definition 1 2 number of planes 1 2 processing color images 1 5 to 1 6 programming concepts 9 9 to 9 17 arithmetic or logical operations 9 13 combinations of input and output 9 11 connectivity 4 8 9 15 creating images 9 10 Image Dst input 9 10 to 9 13 Image Mask input 9 11 to 9 12 Image Src input 9 10 9 12 to 9 13 image structure 9 9 line entity 9 14 overview 9 1 to 9 2 rectangle entity 9 14 Square Hexa input 9 16 to 9 17 structuring element 9 16 table of pixels 9 15 properties of digitized image 1 1 to 1 2 resolution 1 1 types and formats 1 3 to 1 4 IMAQ 3DView VI 20 1 to 20 4 O National Instruments Corporation IMAQ Add VI 15 1 to 15 2 IMAQ And VI 15 10 to 15 11 IMAQ ArrayToColorImage VI 22 22 to 22 23 IMAQ ArrayToComplexImage VI 21 15 to 21 16 IMAQ ArrayToComplexPlane VI 21 17 to 21 18 IMAQ ArrayTolmage VI 13 23 to 13 24 IMAQ AutoBThreshold VI 16 4 to 16 5 IMAQ AutoMThreshold VI 16 5 to 16 7 IMAQ BuildKernel VI 17 5 to 17 6 IMAQ Cast VI 14 2 to 14 3 IMAQ Centroid VI 19 10 to 19 11 IMAQ CharPtrToString VI 23 6 to 23 7 IMAQ ChooseMeasurements VI 19 20 to 19 23 IMAQ Circles VI 18 13 to 18 14 IMAQ ClipboardToImage VI 13 25 IMAQ ColorEqualize VI 22 15 IMAQ ColorHistogram 22 7 to 22 8 IMAQ ColorHistograph VI 22 9 to 22 10 IMAQ ColorImageToArray VI 22 2 to 22 22 IMAQ ColorThreshold VI 22 11 to 22 12 IMAQ ColorUserLookup VI 22 13 to 22 14 IMAQ ColorValuetoInteger VI 22 26 to
60. depending on the error condition chosen Dialog Stop or Ignore a programmed action is taken The reading of the last occurring error then is reset IMAQ Status Lists all the images created and the space in memory occupied Le he IF LE Es 5 This VI can not be used as a subVI it must be executed from its front panel All existing images are written at intervals or step by step depending on the action chosen This VI IMAQ Vision for G Reference Manual 10 6 National Instruments Corporation Chapter 10 Management VIs also gives the total space in kilobytes occupied by the existing images It can be used during the writing of an application B Imaq Status l File Edt Operate Project windows Help Imag Status v 4 0 National Instruments Corporation 10 7 IMAQ Vision for G Reference Manual File Vis Chapter This chapter describes the File VIs in IMAQ Vision IMAQ ReadFile Reads an image file The file format can be a standard format APD TIF BMP and PICT Macintosh Only or a non standard format known to the user In all cases the read pixels are converted automatically into the image type passed by Image Le fe F I i 5 Image Image Out File Type File Options r a File Data Type File Path i Esa Color Palette error in na error aE error cut Image is the reference to the image structure to which the data from the zm image file 1s applied Load
61. element Fills all holes in objects that are present in a binary image Color encoding scheme in Hue Saturation and Lightness Color encoding scheme in Hue Saturation and Value A two dimensional light intensity function f x y where x and y denote spatial coordinates and the value f at any point x y is proportional to the brightness at that point A file containing image information and data Encompasses various processes and analysis functions which you can apply to an image The presentation display of an image image data to the user Finds the inner boundary of objects Assigning user defined quantities such as optical densities or concentrations to the gray level values in an image Defines the range of gray level values in an object of an image Characterizes an object based on the range of gray level values in the object If the intensity range of the object falls within the user specified range it is considered as an object otherwise it is considered as part of the background 6 5 IMAQ Vision for G Reference Manual L labeling Laplacian filter line profile linear filter logarithmic and inverse gamma corrections Logarithmic function Logic operators lookup table lowpass attenuation lowpass FFT filter lowpass filter lowpass frequency filter IMAQ Vision for G Reference Manual The process by which each object in a binary image is assigned a unique value This process is
62. erosion It removes dark spots isolated in bright regions and smoothes boundaries The effects of the function are moderated by the configuration of the structuring element closing I erosion dilation I This operation does not alter significantly the area and shape of objects because dilation and erosion are morphological opposites Bright borders expanded by the dilation are reduced by the erosion However small dark objects that vanish during the dilation do not reappear after the erosion Opening and Closing Examples This example uses the following source image National Instruments Corporation 35 IMAQ Vision for G Reference Manual Chapter 7 Morphology Analysis The opening function produces the following image Consecutive applications of an opening or closing command always give the same results A closing function produces the following image Proper Opening Function The gray level proper opening 1s a finite and dual combination of openings and closings It removes bright pixels isolated in dark regions and smoothes the boundaries of bright regions The effects of the function are moderated by the configuration of the structuring element If I is the source image the proper opening extracts the minimum value of each pixel between the source image and its transformed image obtained after a closing followed by an opening and followed by another closing proper opening I min 1 OCO J or prope
63. error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ Vision for G Reference Manual 17 10 O National Instruments Corporation mn mn Note Chapter 17 Filter Vis Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts See the Nonlinear Filters section of Chapter 5 Spatial Filtering for more information about the lowpass filter Any image connected to the input Image Dst must be the same image type connected to Image Src The image type connected to the input Image Mask must be an 8 bit image The connected source image must have been created with a border capable of supporting the size of the convolution matrix A 3 x 3 matrix must have a minimum border of 1 a5 x5 matrix must have a minimum border of 2 and so forth The border size of the destination image is not important IMAQ Correlate Computes the normalized cross correlation between the source image and th
64. executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ ImageBorderSize Sets the border size of the image and determines the current border size of the image e he F c Es n F 4 3 BE Get Set Status Set Image in Image out Image border size in Image border size out error in no error aE error aut Get Set Status Get determines whether the image border size is changed to the Image border size value Set or the current image border size value is retrieved Get Image in is the reference to the image that has to be modified Image border size in determines the new border size of the image error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Out is the reference to the destination output image Image border size out is the border size of the image error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts National Instruments Corporation 23 11 IMAQ Vision for G Reference Manual Appendix Customer Communication For your convenience this appendix contains forms to help yo
65. for G Reference Manual Chapter 12 Display a template for the final destination image by connecting 1t to Image Model The output image Image Out automatically acquires the size of the image and location of the ROI as found in the original source image However you do not have to connect an Image Model In this case the ROI requires an offset that is determined automatically from the upper left corner of the bounding rectangle described by the ROI The bounding rectangle information is part of the ROI Descriptor IMAQ MaskToROI Transforms an image mask into a region of interest 5 Ie F eternal edges only T Er E E Image qe ROI Descriptor Max number of vectors in ROI eror in no error d error aut TE External edges only T specifies whether only the external edges are transformed The default is TRUE Image is the image containing the image mask that is transformed into a region of interest This image must be an 8 bit image Max number of vectors in ROI is the limit of points that define the contour of a region of interest This value is 2500 by default but can be increased if necessary ROI Descriptor returns the descriptor for a region of interest error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Fr I E ol Lil IMAQ Vision for G Refere
66. from IMAO BasicParticle The measurements stored in each element of this array are described in the MAQ BasicParticle section Complex Reports is the output array of measurements from IMAQ ComplexParticle The measurements stored in each element of this array are described in the MAQ ComplexParticle section Selection Values is an array of selection criteria Each criteria 1s composed of the following elements Parameter is an indicator that determines the coefficient measurement to be selected Parameter can have values compatible to those described in IMAQ ComplexMeasure The validity of these values depends on the type of measurements passed as input for example through Basic Reports or Complex Reports Only the particle measurements that respond to the selection criteria are selected The coefficient values must be contained in the interval between Lower Value and Upper Value Area pixels Area calibrated unused Left column X Upper row Y Right column X Lower row Y 14 27 unused O National Instruments Corporation The following values are possible for selecting basic measurements from Basic Reports surface area of particle in pixels surface area of particle in user units left X coordinate of bounding rectangle top Y coordinate of bounding rectangle right X coordinate of bounding rectangle bottom Y coordinate of bounding rectangle 19 21 IMAQ Vision for G Reference Manual Chapter
67. image with binary objects the transformed image turns entirely red because it is entirely composed of pixels set to 1 Comparisons Between Segmentation and Skiz Functions The segmentation function extracts segments that each contain one object and represent the area in which this object can be moved without intercepting another object assuming that all objects move at the same speed The edges of these segments give a representation of the external skeletons of the objects As opposed to the skiz function segmentation does not involve median distances Segments are obtained by successive dilations of objects until they touch each other and cover the entire image The final image contains as many segments as there were objects in the original image On the other hand if you consider the inside of closed skiz lines as segments you might produce more segments than objects originally present in the image Notice the upper right region in the following example IMAQ Vision for G Reference Manual 28 National Instruments Corporation Chapter 7 Morphology Analysis The following image shows e Original objects in black e Segments in dotted patterns e Skiz lines Distance Function The distance function assigns to each pixel a gray level value equal to the shortest distance to the border of the object That distance may be equal to the distance to the outer border of the object or to a hole within the object Danielsson
68. in connectivity mode 8 FALSE Connectivity 4 Particle detection is performed in connectivity mode 4 Ep error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Complex Reports is an array that returns a set of measurements from the detected particles This cluster contains the following elements O National Instruments Corporation 19 13 IMAQ Vision for G Reference Manual Chapter 19 Analysis VIs E B BB a B HB B B IMAQ Vision for G Reference Manual Area pixels indicates the surface area of a particle in number of pixels Area calibrated indicates the surface area of a particle in user defined units Perimeter is the perimeter size in user units Number of Holes is the number of holes in the particle Hole s Area pixels is the total surface area of all the holes in a particle in pixels Hole s Perimeter is the total perimeter size calculated from all the holes in a particle in user units Global Rectangle is a cluster that contains the coordinates of a bounding rectangle for a particle The following elements are included in the cluster x1Left indicates the coordinates for the upper left corner of the rectangle y1Top indicates the coordinates for the top left corner of the rectangle x2Right indicates the coordinates for the lower ri
69. in na error aE error out IMAQ Vision for G Reference Manual 22 24 National Instruments Corporation Chapter 22 Color VIs Color Mode defines the image color format to use for the output The default 1s 0 which specifies that the input and output values are E the same O RGB Default no change 1 HSL Convert to HSL 2 HSV Convert to HSV U32 value a color value encoded as an unsigned 32 bit integer control 1D U32 array a set of color values encoded as a 1D array of unsigned 32 bit integer controls 2D U32 array a set of color values encoded as a 2D array of unsigned 32 bit integer controls error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts a Color Value is a cluster containing the color value resulting from the input U32 Value This cluster can contain the values R G B H S L or H S V depending on the status of the set Color Mode The cluster is composed of the following elements Red or Hue Value is the first color plane value depending on the Color Mode Green or Sat Value is the second color plane value depending on the Color Mode Blue or Light or Val Value is the third color plane value depending on the Color Mode e05 1D Color value array is a 1D array containing the color value resulting from the input
70. integer controls using the VI IMAQ ColorValueToInteger Fi E E Image Pixels error in no error ET Image must be an RGB chunky image ux2 Image Pixels U32 contains the pixel values as a 2D array of unsigned 32 bit integer controls error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ Vision for G Reference Manual 22 22 National Instruments Corporation Chapter 22 Color VIs zu Image Out is the reference to the destination output image zu error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts The following graphic illustrates the use of this VI E Image Out zb Color value EN E arra ESI A 2D array of red green and blue values also can be modified with the following sequence Image Out Red Values ED Blue V aluez IMAQ RGBToColor Converts an RGB color value into another format HSL or HSV F ES Color Made Hed value Red ar Hue value Green value Green or Sat value Blue value Blue ar Light ar Vv al value eror in na error eror aut Color Mode defines the image color format conversion to perform The default 1s 0 which specifies no change 0 R
71. intensity decreases IMAQ Vision for G Reference Manual 5 6 National Instruments Corporation Chapter 5 Spatial Filtering Examples The following two kernels emphasize edges oriented at 135 degrees Gradient 1 Gradient 2 0 1 1 0 1 1 1 0 Gradient 1 highlights pixels where the light Gradient 2 highlights pixels where the light intensity increases along the direction going intensity increases along the direction going from northeast to southwest It darkens pixels from southwest to northeast It darkens pixels where the light intensity decreases along that where the light intensity decreases along that same direction This processing outlines the same direction This processing outlines the northeast front edges of bright regions such as southwest front edges of bright regions such as the ones in the illustration the ones in the illustration s Note Applying Gradient Z1 to an image gives the same results as applying Gradient 2 to its photometric negative because reversing the lookup table of an image converts bright regions into dark regions and vice versa Edge Extraction and Edge Highlighting The gradient filter has two effects depending on whether the central coefficient x 1s equal to 1 or 0 e Ifthe central coefficient is null x 0 the gradient filter highlights the pixels where variations of light intensity occur along a direction specified by the configuration of the coefficients a b c and d
72. inverted when using Windows IMAQ Vision for G Reference Manual 23 6 National Instruments Corporation Chapter 23 External Library Support VIs IMAQ Interlace Extracts odd and even fields from an interlaced image or builds an image using two field images e he F c Es n Interlace Separate Interlace Image frame Image frame Out Image even Image even Out Image add F mage add Out eror in fno error E errar out Interlace Separate Interlace The default is the interlace mode which specifies that an interlaced image is built using two field images Image even and Image odd In the separate mode the odd and even fields from an interlaced image Image frame are extracted Image frame 1s the reference to the image in which odd and even fields have to be extracted Image even is the reference to the image that forms the even lines of the interlaced image Image odd is the reference to the image that forms the odd lines of the interlaced image error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts E B E 7 Image Frame Out contains the interlaced image Image even Out contains the even lines of the input image Image odd Out contains the odd lines of the input image a National Instruments Corporation 23 9 IMAQ Vision f
73. is TRUE Set Get Set Status Set specifies whether the user needs to know the present status or modify the status of the zones The default is TRUE Set error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts O National Instruments Corporation 12 31 IMAQ Vision for G Reference Manual Chapter 12 Display TF Visible returns the present visibility status of the tools palette A visible tools palette returns TRUE T error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Obtains or sets the position of a user window This VI functions in the same way as IMAQ WindMove which is used for moving image windows 5 Window Number 1 7 22 Coordinatez Coordinates Get Set Status Set error in na error af error out Window Number 17 22 is a number from 17 to 22 that specifies the user window The default value is 17 Coordinates is a structure that contains the screen coordinates in X and Y positions where the tools palette is located or where the tools palette will be placed This input is necessary only when Get Set Status Set is set to TRUE Set Get Set Status Set specifies whether
74. is an even number This modification is due to the use of erosions to determine if a narrowing has to be broken or kept The function cannot discriminate a narrowing with a width of 2k pixels from a narrowing with a width of 2k 1 pixels For example one erosion breaks both a narrowing that is two pixels wide and a narrowing that 1s one pixel wide O National Instruments Corporation 25 IMAQ Vision for G Reference Manual Chapter 7 Morphology Analysis The precision of the separation is then limited to the elimination of constrictions having a width lesser than an even number of pixels e lfNisaneven number 2k the separation breaks a narrowing with a width smaller than or equal to 2k 2 pixels It uses k 1 erosions e Jf Nis an odd number 2k 1 the separation breaks a narrowing with a width smaller than or equal to 2k It uses k erosions Skeleton Functions A skeleton function applies a succession of thinnings until the width of each object becomes equal to one pixel The skeleton functions are both time and memory consuming They are based on conditional applications of thinnings and openings using various configurations of structuring elements L Skeleton Function The L skeleton function indicates the L shaped structuring element skeleton function For example notice the following original image The L skeleton function produces the following rectangle pixel frame image x 2 IMAQ Vision fo
75. is representative of the local maximum from the source image O National Instruments Corporation 17 9 IMAQ Vision for G Reference Manual Chapter 17 Filter Vis IMAQ LowPass Calculates the inter pixel variation between the pixel being processed and those pixels surrounding it If the pixel being processed has a variation greater than a specified percentage it is set to the average pixel value as calculated from the neighboring pixels e he F ena zmn zmn HAR Size amp Tolerance Image Src l Image List Out Image Mask Image Ost Ti emor in na error E error aut Size amp Tolerance is a cluster that specifies the following variables X Size is the size of the horizontal matrix axis The default is 3 Y Size is the size of the vertical matrix axis The default 1s 3 9o Tolerance is the maximum variation authorized The default 1s 4096 Image Src is the image reference source Image Mask is an 8 bit image that specifies the region in the image to modify Only pixels in the original image that correspond to the equivalent pixel in the mask are replaced by the values in the lookup table provided that the value in the mask is not 0 All pixels not corresponding to this criteria keep their original value The complete image is modified if Image Mask is not connected Image Dst is the reference of the image destination If it is connected it must be the same type as the Image Src error in no
76. it must be the same type as the Image Src Truncation Frequency is the percentage of the frequencies that are retained within a Fourier transformed image This percentage is expressed with respect to the length of the diagonal of the FFT image and the Boolean Low pass High pass Low pass The default value is 10 Ep error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts O National Instruments Corporation 21 7 IMAQ Vision for G Reference Manual Chapter 21 Complex VIs For example the defaults Low pass F and 10 result in retaining 10 percent of the frequencies starting from the center low frequencies The selection of High pass T and 10 results in retaining 10 percent of the frequencies starting from the outer periphery IMAQ ComplexAdd Adds two images where the first is a complex image or adds a
77. its boundary and eliminates isolated points in the image Expand the high gray level information in an image while suppressing low gray level information Decreases the brightness and increases the contrast in bright regions of an image and decreases contrast in dark regions A method used to compute the Fourier transform of an image Fast Fourier Transform The magnitude information of the Fourier transform of an image Transforms an image from the spatial domain to the frequency domain Counterparts of spatial filters in the frequency domain For images frequency information is in the form of spatial frequency G 3 IMAQ Vision for G Reference Manual Gaussian filter gradient convolution filter gradient filter gray level gray level dilation gray level erosion gray level images gray level morphology H highpass attenuation highpass FFT filter highpass filter highpass frequency filter highpass truncation IMAQ Vision for G Reference Manual The graphical programming language used to develop LabVIEW and Bridge VIEW applications A filter similar to the smoothing filter but using a Gaussian kernel in the filter operation The blurring in a Gaussian filter is more gentle than a smoothing filter See gradient filter Extracts the contours edge detection in gray level values Gradient filters include the Prewitt and Sobel filters The brightness of a point pixel in an image Increases th
78. lightness plane Color Mode 1 or the value plane Color Mode 2 It must be an 8 bit image The color plane is not replaced if the input is not connected error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Dst Out RGB is the reference to the output RGB image that is obtained by replacing one or more planes of the source color image error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ Vision for G Reference Manual 22 6 O National Instruments Corporation Chapter 22 Color VIs IMAQ ColorHistogram Calculates the histograms extracted from the three planes of an image This VI can function in one of three modes corresponding to the three color models RGB HSL or HS V IMAQ ColorHistograph a variant of the IMAQ ColorHistogram VI has the advantage that its output data is directly compatible with a LabVIEW or BridgeVIEW graph R E E Color Made ImageHGB RGB Red or Hue Histogram Report Image Mask areen or Sat Histogram He Number of Classes 7 a Blue or Light or al Hist error in no error aE error out Color Mode defines the image color format to use for the operation
79. maximum values for the range to modify The dynamic range of the entire image is modified if this cluster is not connected or the defaults 0 and O are used as input The dynamic range of the destination image is dependent on the type of input image The dynamic range for an 8 bit image is between O and 255 The dynamic range for 16 bit and 32 bit floating point images IMAQ Vision for G Reference Manual 16 8 O National Instruments Corporation Chapter 16 Processing VIs 1s the smallest and largest pixel value contained in the original image prior to processing The default is 0 0 Note The dynamic range for 16 bit and 32 bit floating point images is not modified Only the distribution of the values is changed The following elements are specified in the Range cluster Minimum is the smallest value used for processing After processing all pixel values that are less than or equal to the Minimum in the original image are set to O for an 8 bit image In 16 bit and 32 bit floating point images these pixel values are set to the smallest pixel value found in the original image Maximum is the largest value used for processing After processing all pixel values that are greater than or equal to the Maximum in the original image are set to 255 for an 8 bit image In 16 bit and 32 bit floating point images these pixel values are set to the largest pixel value found in the original image X value is a value used only for the oper
80. morphology 7 9 to 7 11 error clusters 9 4 to 9 5 error management See IMAQ Error VI exponential and gamma correction 3 9 to 3 11 Exponential function exponential and gamma correction 3 9 transfer function and effect table 3 4 external edge function primary binary morphology 7 13 to 7 14 External Library Support VIs 23 1 to 23 11 IMAQ CharPtrToString 23 6 to 23 7 IMAQ GetImagePixelPtr 23 1 to 23 5 IMAQ ImageBorderOperation 23 10 to 23 11 IMAQ ImageBorderSize 23 11 IMAO Interlace 23 9 to 23 10 IMAQ MemPeek 23 7 to 23 8 O National Instruments Corporation F Fast Fourier Transform See also frequency filters complex images 1 3 definition of Fourier Transform function 6 3 to 6 4 FFT display 6 4 to 6 7 optical representation 6 6 to 6 7 standard representation 6 6 File VIs 11 1 to 11 6 IMAQ GetFileInfo 11 4 to 11 5 IMAQ ReadFile 11 1 to 11 4 IMAQ WriteFile 11 5 to 11 6 Filter VIs 17 1 to 17 12 See also Complex VIs IMAQ BuildKernel 17 5 to 17 6 IMAQ Convolute 17 2 to 17 3 IMAQ Correlate 17 11 to 17 12 IMAQ EdgeDetection 17 6 to 17 7 IMAQ GetKernel 17 3 to 17 5 IMAQ LowPass 17 10 to 17 11 IMAQ NthOrder 17 8 to 17 9 filtering See spatial filtering Fourier Transform function 6 3 to 6 4 frequency filters 6 1 to 6 12 See also Complex VIs definition 6 3 to 6 4 FFT display 6 4 to 6 7 optical representation 6 6 to 6 7 standard representation 6 6 highpass FFT filters 6 9 to 6 12 attenuatio
81. of National Instruments Corporation Product and company names listed are trademarks or trade names of their respective companies WARNING REGARDING MEDICAL AND CLINICAL USE OF NATIONAL INSTRUMENTS PRODUCTS National Instruments products are not designed with components and testing intended to ensure a level of reliability suitable for use in treatment and diagnosis of humans Applications of National Instruments products involving medical or clinical treatment can create a potential for accidental injury caused by product failure or by errors on the part of the user or application designer Any use or application of National Instruments products for or involving medical or clinical treatment must be performed by properly trained and qualified medical personnel and all traditional medical safeguards equipment and procedures that are appropriate in the particular situation to prevent serious injury or death should always continue to be used when National Instruments products are being used National Instruments products are NOT intended to be a substitute for any form of established process procedure or equipment used to monitor or safeguard human health and safety in medical or clinical treatment Contents About This Manual Oreanizationof This Mandala as XiX Conventions Usedin This Mantal smania n ri XXi Related DOCENA IM VPE EDI MEI DU MU Id xxil Customer COMMUNICA ON s o eco aea ed a xxil Chapter 1 Algorithms and Principles of Im
82. of a structuring element 3 x 3 Pj can range from Pg to Pg P max P Lz Note A gray level dilation using a structuring element f x f with all its coefficients set to I is equivalent to an Nth order filter with a filter size f x f and the value N equal to f x f 1 refer to the nonlinear spatial filters O National Instruments Corporation 33 IMAQ Vision for G Reference Manual Chapter 7 Morphology Analysis Erosion and Dilation Examples This example uses the following source image The following table provides example structuring elements and the corresponding eroded and dilated images Opening Function The gray level opening function consists of a gray level erosion followed by a gray level dilation It removes bright spots isolated in dark regions and smoothes boundaries The effects of the function are moderated by the configuration of the structuring element opening 1 dilation erosion D IMAQ Vision for G Reference Manual 34 National Instruments Corporation Closing Function Chapter 7 Morphology Analysis This operation does not alter significantly the area and shape of objects because erosion and dilation are morphological opposites Bright borders reduced by the erosion are restored by the dilation However small bright objects that vanish during the erosion do not reappear after the dilation The gray level closing function consists of a gray level dilation followed by a gray level
83. on one byte at the bit level The truth tables for logic operators are presented in the Truth Tables section Operator Equation D p AND p IMAQ Vision for G Reference Manual 4 2 O National Instruments Corporation Chapter 4 Operators if p 0 then p 0 else p P In the case of images with 8 bit resolution logic operators mainly are designed to combine gray level images with mask images composed of pixels equal to 0 or 255 in binary format 0 is represented as 00000000 and 255 1s represented as 11111111 The following table illustrates how logic operations can be used to extract or remove information in an image NAND p NAND 0 255 NOR p NOR 255 0 p NOR 0 NOT p XOR pa XOR 255 NOT p p XORO p Logic Difference p NOT 255 p pa NOTO0z0 O National Instruments Corporation 4 3 IMAQ Vision for G Reference Manual Chapter 4 Operators Truth Tables The following truth tables describe the rules used by the logic operators The top row and left column give the values of input bits The cells in the table give the output value for a given set of two input bits AND NAND b 0b 1 b 0b 1 NOR b 0b 1 ERES n ojo XOR NOT NOT a a 0 a 0 a 1 a 1 0 IMAQ Vision for G Reference Manual 4 4 National Instruments Corporation Chapter 4 Operators Example 1 The following series of graphics illustrates images in which regions of interest have been isolated in a binary form
84. precision of the VI is dependent on the histogram precision which in turn is dependent on the number of classes used in the histogram Le rej La 2 Histogram Report Image Src Image Dist Out Image Mask Image Dat changes E error out eror in na errar Ep Histogram Report is the histogram from the source image This histogram is supplied from the output of the VI IMAQ Histogram No processing occurs if this input is not connected therefore you need to connect the same image to both IMAQ Histogram and this VI zn Image Src is the reference to the source input image Ep Image Mask is an 8 bit image that specifies the region in the image to modify Only pixels in the original image that correspond to the equivalent pixel in the mask are replaced by the values in the lookup table provided that the value in the mask is not 0 All pixels not corresponding to this criteria keep their original value The complete image is modified if Image Mask is not connected zz Image Dst is the reference to the destination image If it is connected it must be the same type as the Image Src Range isa cluster containing the minimum and maximum values for the range to equalize The equalization of the entire image occurs if this cluster is not connected or the defaults 0 and O are used as input In this case the Minimal Value and Maximal Value contained in Histogram Report are considered to be the min and max The default is 0 0
85. rad eterno eA peuSU o oum dee bae Saa Red 7 21 Advanced Binary Morphology Functions eese enne 7 22 Border eiiitie seit M eto 7 22 Mole Filhos EURO Fe sU quip Etpe cav EaDe enue asia 7 22 ae ling Func GO aaa 7 23 Ow pass Miter Sex sai N 7 23 Erehpass Ett ld da 7 24 Lowpass and Mighpass Example dada 7 24 Separation EURO sida 7 25 Skeleton Puficttolls o atu te eu ha e eade OE eau PLU Ee Rod Lade ue teenies 7 26 L Skeleton Uncle 7 26 MESkel ton Ponciano 7 27 SA e AE EEEE ux tas Edid 7 27 Sesmentation PUNCHON an ai nantes 7 27 Comparisons Between Segmentation and Skiz Functions 7 28 Distance Functio icasi a iio 7 29 DA E E OTUA TEREN A E 7 29 Example ta a a a N 7 29 Cele tio A Pr O ene dE 7 30 EXIME la dde 7 31 COlVe XP IC COD etapa A 7 31 Iz Cine ux eee nnnnRCD eT OR rere tte 7 32 GrayeLevel Morphology iia 7 32 Ero On FUNC OM oco oodd tius uscite atus viene ossa do oa Ina Eo dM Mei od 7 33 Concept and Mathematics asnicar aaa 7 33 Dulatton PUDE odo i 7 33 Concept and Mathematics occcccccncncnnnnnnnnnnnnnnnnonononononnnnnnnnnncnnnnnnnnnnnos 7 33 Erosi n and Dilation Examples eis een delusions teta ale Sas 7 34 Osio AAA e o o A oa cedo quid 7 34 AA A 7 35 Opening and Closing Examples ooocccnnnnncnoncnonononnnnnonnnnnnnnnnnnnnnnnnnnnnnnonnnnnnnnnnns 7 35 Proper Opening Function sso ainia 7 36 Proper Closing PUNCH OM uns geste to ostenta teet A teda 1 37
86. resolution of mn This image has n pixels along its horizontal axis and m pixels along its vertical axis O National Instruments Corporation 1 1 IMAQ Vision for G Reference Manual Chapter 1 Algorithms and Principles of Image Files and Data Structures Image Definition The definition of an image also called pixel depth indicates the number of colors or shades that you can see in the image Pixel depth 1s the number of bits used to code the intensity of a pixel For a given definition of n a pixel can take 2 different values For example if n equals 8 bits a pixel can take 256 different values ranging from 0 to 255 If n equals 16 bits a pixel can take 65 536 different values ranging from 0 to 65 535 or 32 768 to 32 767 Number of Planes The number of planes in an image is the number of arrays of pixels that compose the image A gray level or pseudo color image is composed of one plane while a true color image is composed of three planes one for the red component one for the blue and one for the green as shown in the following figure L o mf m c o E a gray level In gray level images the red green and blue intensities RGB of a pixel combine to produce a single value This single value is converted back to an RGB intensity when displayed on a monitor This conversion is performed by a color lookup table CLUT transformation In three plane or true color images the red green and blue intensities
87. resulting from the input 1D En error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAO VI Error Clusters 1n Chapter 9 VI Overview and Programming Concepts O National Instruments Corporation 22 27 IMAQ Vision for G Reference Manual Chapter I External Library Support Vis This chapter describes the External Library Support VIs in IMAQ Vision This set of VIs allows G programmers who have a good understanding of DLLs Windows or Shared Libraries Macintosh to write their own image grabber device VIs These VIs give you additional functionalities that are not provided by LabVIEW or BridgeVIEW when using an external library These VIs allow you to do the following actions e Get a pointer in the pixel space of an image e Copy the data of a char type pointer to a G programming language string e Copy a memory block addressed by a pointer to a G programming language string e Change the border size of an image e Modify the pixel values at the border of an image e nterlace or separate images IMAQ GetlmagePixelPtr Obtains a pointer on the pixels of an image This VI also returns information on the organization of the image pixels in memory e he F c Es n Function Image border size Image Pitel Painter aut Fisel Painter in Line W idth Pixels amp Coordinate Piel Size Bytes Y Coordinate i Transfer Max Size erar in
88. significant Given M the mean value of P p and its neighbors and S their standard deviation each pixel P is set to the mean value M if it falls inside the range M S M S i j then Pj else Py M y Pa j Lowpass Filter The lowpass filter reduces details and blurs edges by setting pixels to the mean value found in their neighborhood if their deviation from this value is large Given M the mean value of P and its neighbors and S their standard deviation each pixel P j is set to the mean value M if it falls outside the range M S M S then P Pap else Pq M IMAQ Vision for G Reference Manual 5 26 National Instruments Corporation Chapter 5 Spatial Filtering Median Filter The median filter is a lowpass filter It assigns to each pixel the median value of its neighborhood effectively removing isolated pixels and reducing details However the median filter does not blur the contour of objects Pa median value of the series P m Nth Order Filter The Nth order filter is an extension of the median filter It assigns to each pixel the Nth value of its neighborhood when sorted in increasing order The value N specifies the order of the filter which you can use to moderate the effect of the filter on the overall light intensity of the image A lower order corresponds to a darker transformed image a higher order corresponds to a brighter transformed image Each pixe
89. sum of the elements in the matrix in order to obtain a new pixel value The size of the convolution matrix or kernel does not have a theoretical limit and can be either square or rectangular 3 x 3 5 x5 5 x 7 9 x 3 127 x 127 and so forth The convolutions are divided into four families gradient Laplacian smoothing and Gaussian This grouping is determined by the convolution matrix contents or the weight assigned to each pixel depending on the geographical position of that pixel in relation to the central matrix pixel IMAQ Vision supplies a set of standard convolution kernels for each family and for the usual sizes 3 x 3 5 x 5 and 7 x 7 These convolution kernels are accessible from the VI IMAQ GetKernel You can also create your own kernels The contents of these user defined kernels are chosen by the user and the size of the kernel is virtually unlimited With this capability you can create special effect filters The purpose of the nonlinear filters is to either extract the contours edge detection or remove the effect or the isolated pixels The VI IMAQ EdgeDetection provides six different methods for contour extraction Differentiation Gradient Prewitt Roberts Sigma Sobel The harmonization of pixel values can be performed with two VIs each using a different method IMAQ NthOrder and IMAQ LowPass These VIs require that a kernel size and order number IMAQ NthOrder or percentage IMAQ LowPass is specified on input O N
90. the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts O National Instruments Corporation 16 7 IMAQ Vision for G Reference Manual Chapter 16 Processing Vls The following example creates a negative of an 8 bit image 256 values by applying IMAQ UserLookup s Image Cst Out rage Es E Each gray level value is replaced by the value 255 n The result is a negative of the original image placed in Image Dst IMAQ MathLookup Converts the pixel values of an image by replacing them with values from a defined lookup table This VI modifies the dynamic range of either part of an image or the complete image depending on the type of curve chosen lhal La La Range E Value Image Src Image List Out Image Mask A Image Dist T Dperator L error out eror in na error n Note This VI is fundamental for many image processing procedures You can use this VI with 8 bit and 16 bit images to create your own lookup table You can then apply your new curve with the VI IMAQ UserLookup Range isa cluster containing the minimum and
91. the size of this array The array can be generated by using standard G programming techniques or the VIs IMAQ GetKernel or IMAQ BuildKernel If the dimensions XY produced by this array are not greater than 3 the filter is considered null and the output image is identical to the input image error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ Vision for G Reference Manual 17 2 O National Instruments Corporation Chapter 17 Filter Vis Image Dst Out is the reference to the destination output image which 2 0 receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src T error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Any image connected to the input Image Dst must be the same image type connected to Image Src The image type connected to the input Image Mask must be an 8 bit image The connected source image must have been created with a border capable of supporting the size of the convolution matrix A 3 x 3 matrix must have a minimum border of 1 a5x 5 matrix must have a mi
92. the user needs to know the present status or modify the status of the zones The default 1s TRUE Set Ep error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Coordinates indicates the relative position of the event error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ Vision for G Reference Manual 12 32 National Instruments Corporation Chapter 12 Display IMAQ WindUserClose Closes a user window This VI functions in the same way as IMAQ WindClose which is used for closing image windows Window Number 17 22 Close All windows M eror in no error Window Number 17 22 is a number from 17 to 22 that specifies the user window The default value is 17 Close All Windows N specifies if all the image windows are to be closed The default value FALSE No closes only the specified window Setting this value to TRUE closes all windows simultaneously Ep error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts T error out
93. they occupy in memory during the execution of your application error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ Vision for G Reference Manual 10 2 O National Instruments Corporation Chapter 10 Management VIs IMAO VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ Create amp LockSpace Creates a new image that has a permanently allocated maximum memory space Using this VI the pixel memory space allocated to an image can increase but never decreases This mechanism guarantees that an image that has filled a certain amount of memory always is able to occupy the same space regardless of memory fragmentation Le fe lr e E 5 is Note Note a E E Border Size Image Hame Image Type 4 Resolution Y Resolution eror in na errar IMAO Create is recommended over IMAO Create amp LockSpace for most applications IMAQ Create amp LockSpace must be used only in applications in which the memory requirements are stringent IMAQ Create amp LockSpace must be used in conjunction with IMAQ Dispose to avoid saturating the memory reserved for LabVIEW or BridgeVIEW IMAO Create amp LockSpace is hidden in the Image palette but can be found in Manage llb Border Size determines the width in pixels of the border created around an image These pixels are used only for specific VIs You should create a border at th
94. to Image Src A and the second column describes the image type connected to Image Src B The third column describes the image type that should be connected to the output Image Dst The different image type combinations supported by this VI are described in the following table where is the resulting image that is connected to the output Image Dst Image Connected to Image Src A a complex image J Image Connected to Image Src B Equations floating point image BP Imaginary Imaginary Lg bivo L16 bi OF L5 it IMAQ Vision for G Reference Manual 21 10 O National Instruments Corporation Chapter 21 Complex VIs Image Connected Image Connected to to Image Src A Image Src B Equations a complex image another complex image I Reall Real Real Imaginary Imaginary 1 Imaginary 7 IMAQ ComplexMultiply Multiplies two images where the first is a complex image or multiples a complex image and a complex constant 5 La 2 Constant Image Sre A Image Dist Out Image Dist Image Src E ri eror in na errar da error aut Constant The input Image Src A is multiplied by this complex constant for image constant operations The default is 0 E Image Src A is the handle of the first source image and must be a D complex image ER Image Dst is the handle of the complex image that contains the resulting FFT image This input can accept only a complex image E
95. to low spatial frequencies For example an image can have extraneous noise such as periodic stripes introduced during the digitization process In the frequency domain the periodic pattern is reduced to a limited set of high spatial frequencies Truncating these particular frequencies and converting the filtered FFT image back to the spatial domain produces a new image in which the grid pattern has disappeared yet the overall features remain O National Instruments Corporation 6 1 IMAQ Vision for G Reference Manual Chapter 6 Frequency Filtering Lowpass FFT Filters A lowpass FFT filter attenuates or removes high frequencies present in the FFT plane It has the effect of suppressing information related to rapid variations of light intensities in the spatial image In this case the Inverse FFT command produces an image in which noise details texture and sharp edges are smoothed Highpass FFT Filters A highpass FFT filter attenuates or removes low frequencies present in the FFT plane It has the effect of suppressing information related to slow variations of light intensities in the spatial image In this case the Inverse FFT command produces an image in which overall patterns are attenuated and details are emphasized FCU Vel IMAQ Vision for G Reference Manual 6 2 National Instruments Corporation Chapter 6 Frequency Filtering Mask FFT Filters A mask filter removes frequencies contained in a mask specified by the u
96. transfer mode is the actual transfer mode Pen transfer mode has four possible values srcCopy Overwrites the background and foreground with specified colors srcOr Overwrites only the foreground srxXor Inverts the pixels below the foreground pixels The new value equals 255 minus the old value this operation occurs for each plane of an RGB image srcBic Forces the background color on foreground pixels Pen style is the actual pen style Pen Style has five possible values Solid Dash Dot DashDot and DashDotDot Foreground color is the actual foreground color IMAQ Vision for G Reference Manual 12 42 National Instruments Corporation Chapter 12 Display Foreground color is the actual foreground color Background color is the actual background color A E Pen pattern is the actual pen pattern TRUE values are assigned to the foreground while FALSE values are assigned to the background The pattern size 1s a 8 x 8 2D array Fr 1 E User pen active If TRUE the user pen is active Pen width is the actual pen width E B Ep error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAO VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ SetupBrush Configures the shape of a brush used in ROI tracing in conjunction with freehand tools A brush is a mask that indicates the neighborhood of pixels th
97. useful for identifying the number of objects in the image and giving each object a unique identity Extracts the contours of objects in the image by highlighting the variation of light intensity surrounding a pixel Represents the gray level distribution along a line of pixels in an image A special algorithm that calculates the value of a pixel based on its own pixel value as well as the pixel values of its neighbors The sum of this calculation is divided by the sum of the elements in the matrix to obtain a new pixel value Expand low gray level information in an image while compressing information from the high gray level ranges Increases the brightness and contrast in dark regions of an image and decreases the contrast in bright regions of the image The image operations AND NAND OR XOR NOR difference mask mean max and min Table containing values used to transform the gray level values of an image For each gray level value in the image the corresponding new value is obtained from the lookup table Applies a linear attenuation to the frequencies in an image with no attenuation at the lowest frequency and full attenuation at the highest frequency Removes or attenuates high frequencies present in the FFT domain of an image Attenuates intensity variations in an image You can use these filters to smooth an image by eliminating fine details and blurring edges Attenuates high frequencies present in the frequenc
98. value is used for 8 bit 16 bit and 32 bit floating point images El O National Instruments Corporation 18 31 IMAQ Vision for G Reference Manual Chapter 13 Tool Vls Color Pixel Value specifies the value used for filling a color image error in no error is a cluster that describes the error status before this zm n VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts zu Image Out contains the image that has been filled with the specified pixel value zn error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ Vision for G Reference Manual 13 32 National Instruments Corporation Conversion VIs IMAQ Convert Chapter This chapter describes the Conversion VIs in IMAQ Vision Converts the image type specified by Image Src into the image type specified by zmn zmn zmn a Image 5rc Image Dist Out Image Dst erar in na errar HL error aut Image Src is the reference to the source input image Image Dst is the reference to the destination image error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Progra
99. version of the theoretically binary original The blurring that is produced from the acquisition process electronic noise or slight defocalization 1s treated as if the statistical moments average and variance were the same for both the blurred image and the original image This function recalculates a theoretical binary image Interclass Variansce Interclass variance is a classical statistic technique used in discriminating factorial analysis This method is well suited for images in which classes are not too disproportionate For satisfactory results the smallest class must be at least five percent of the largest one Note that this method has the tendency to underestimate the class of the smallest standard deviation if the two classes have a significant variation IMAQ Vision for G Reference Manual 6 National Instruments Corporation Chapter 7 Morphology Analysis Structuring Element A structuring element is a binary mask used by most morphological transformations You can use a structuring element to weigh the effect of these functions on the shape and the boundary of objects A morphological transformation using a structuring element alters a pixel P so that it becomes a function of its neighboring pixels These neighboring pixels are masked by 1 when the structuring element is centered on P A neighbor masked by 0 simply is discarded by the function structuring element source image transform image A 4 M E neigh
100. 1 1 1 l l l l 2 4d 0 1 0 0 0 1 1 l 2 1 1 4 I l l 2 4 4 16 4 1 1 1 Lx d 1 4 I National Instruments Corporation 5 21 IMAQ Vision for G Reference Manual Chapter 5 Spatial Filtering Table 5 12 Gaussian 5 x 5 1 24 2 1 24 8 4 2 4 816 8 4 2 4 8 4 2 1 24 2 1 Table 5 13 Gaussian 7 x 7 m me PON NO Lm ePMmON BN NY oa Www B CO BNW LO I VW 200000 Lr Www B CO BW LO ePmMmwN BN NY a m me N NN e Nonlinear Filters A nonlinear filter replaces each pixel value with a nonlinear function of its surrounding pixels Like the convolution filters the nonlinear filters operate on a neighborhood The following notations describe the behavior of the nonlinear spatial filters If P p represents the intensity of the pixel P with the coordinates 1 j the pixels surrounding P can be indexed as follows in the case of a 3 x 3 matrix In the case of a 5 x 5 neighborhood the i and j indexes vary from 2 to 2 and so forth The series of pixels including P p and its surrounding pixels is annotated as P n m IMAQ Vision for G Reference Manual 5 22 O National Instruments Corporation Chapter 5 Spatial Filtering Nonlinear Prewitt Filter The nonlinear Prewitt filter is a highpass filter that extracts the outer contours of objects It highlights significant variations of the light intensity along the vertical and horizontal axes Each pixel is assigned the maximum value of its horizontal and vertical gradient ob
101. 1 then O National Instruments Corporation 9 IMAQ Vision for G Reference Manual Chapter 7 Morphology Analysis are referred to as P In the example of a structuring element 3 x 3 the P can range from P itself to Ps 1 Ifthe value of one pixel P is equal to 1 then P is set to 1 else Py is set to O 2 If OR P 1 then P 1 else Py 0 Erosion and Dilation Examples This example uses the following binary source image IMAQ Vision for G Reference Manual 10 National Instruments Corporation Chapter 7 Morphology Analysis The next example uses the following source image Gray cells indicate pixels equal to 1 The following tables show how the structuring element can be used to control the effect of an erosion or a dilation The larger the structuring element the more templates can be edited and the more selective the effect Structuring Element After Erosion A pixel is cleared if it is equal to 1 and does not have its three upper left neighbors equal to 1 The erosion truncates the upper left borders of the objects A pixel is cleared if it is equal to 1 and does not have its lower and right neighbors equal to 1 The erosion AA HHHHC truncates the bottom and right borders of the objects but retains the corners O National Instruments Corporation 11 IMAQ Vision for G Reference Manual Chapter 7 Morphology Analysis Opening Function Closing Function Structuring Element After
102. 11 max chord length 8 10 max intercept 8 10 mean chord X 8 10 mean chord Y 8 10 mean intercept perpendicular 8 10 particle orientation 8 10 to 8 11 circle function advanced binary morphology 7 30 to 7 31 See also IMAQ Circles VI closing function gray level morphology 7 35 to 7 36 primary binary morphology 7 12 to 7 13 clustering automatic thresholding 7 3 to 7 5 color images histogram of 2 6 number of bytes per pixel table 1 4 processing 1 5 to 1 6 thresholding 7 3 color lookup table CLUT transformation 1 2 Color VIs 22 1 to 22 27 color planes inversion PC 22 2 to 22 23 IMAQ ArrayToColorImage 22 22 to 22 23 IMAQ Vision for G Reference Manual l 2 IMAQ ColorEqualize 22 15 IMAQ ColorHistogram 22 7 to 22 8 IMAQ ColorHistograph 22 9 to 22 10 IMAQ ColorlmageToArray 22 21 to 22 22 IMAQ ColorThreshold 22 11 to 22 12 IMAQ ColorUserLookup 22 13 to 22 14 IMAQ ColorValuetoInteger 22 26 to 22 27 IMAQ ExtractColorPlanes 22 4 to 22 5 IMAQ GetColorPixelLine 22 18 to 22 19 IMAQ GetColorPixelValue 22 16 to 22 17 IMAQ IntegerToColorValue 22 24 to 22 26 IMAQ ReplaceColorPlane 22 5 to 22 6 IMAQ RGBTocolor 22 23 to 22 24 IMAQ SetColorPixelLine 22 20 to 22 21 IMAQ SetColorPixelValue 22 17 to 22 18 overview 22 1 to 22 2 compactness factor shape feature parameters 8 15 complex images number of bytes per pixel table 1 4 Complex VIs 21 1 to 21 20 IMAQ Array ToComplexImage 21 15 to 21 16 IMAQ
103. 16 bit or 32 bit Real Real x Ja y Li pip OF Lao pit floating point i oating point Image Imaginary 7 Imaginary Vgc Fo OE as 8 bit 16 bit 32 bit x I spit 16 bit OF I2 vit a complex image another complex image Real Real x Real Imaginary 4 x Imaginary 1 Imaginary Imaginary 1 x Real Real x Imaginary J IMAQ ComplexDivide Divides one image by another where the first is a complex image or divides a complex image by a complex constant 3 La 2 Constant Image Src A Image List Out Image List Image Src B B eror in na errar yA error aut IMAQ Vision for G Reference Manual 21 12 O National Instruments Corporation Chapter 21 Complex VIs Constant The input Image Src A is divided by this complex constant for image constant operations The default is 0 El Note Division by 0 is not allowed If the constant is 0 it automatically is replaced by 1 If one of the two source images is empty the result is a copy of the other Image Src A is the handle of the first source image and must be a complex image Image Dst is the handle of the complex image that contains the resulting 2 0 FFT image This input can accept only a complex image zn Image Src B is the handle of the second source image This input can accept an 8 bit 16 bit 32 bit floating point or complex image zu error in no error is a cluster that describes the
104. 1D U32 Array This array can contain the values R G B H S L or H S V depending on the status of the set Color Mode O National Instruments Corporation 22 25 IMAQ Vision for G Reference Manual Chapter 22 Color Vis 2D Color value array is a 2D array containing the color value resulting from the input 2D U32 Array This array can contain the values R G B H S L or H S V depending on the status of the set Color Mode T error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ ColorValueTolnteger Converts clusters composed of three colors in mode R G B H S L or H S V into colors encoded in the form of an unsigned 32 bit integer control The elements of these clusters can contain single values 1D arrays 2D arrays or a combination of the above 5 Color Mode Color Value Em 032 value 10 Color value array 1D 1132 array 2D Color value array Es DP 52D 32 array erar in na error aE error out Color Mode defines the image color format to use for the output The default is 0 which specifies that the input and output values are the same O RGB Default no change 1 HSL Convert to HSL 2 HSV Convert to HSV E Color Value is a cluster containing a color in R G B H S L or H S V depending on the Color Mode Red Hue
105. 1s not important 8 re F HPF Square H exa 5 quare M E Image Src Image Dist Out Image Dat Operation TT Structuring Element error out erar in no eror Square Hexa Square specifies whether the pixel frame is treated as square or hexagonal during the transformation The default is square ET Image Src is the reference to the source input image O National Instruments Corporation 18 5 IMAQ Vision for G Reference Manual Chapter 18 Morphology VIs 132 Image Dst is the reference to the destination image If it is connected it must be the same type as the Image Src Operation specifies the type of morphological transformation procedure to use The default is O O AutoM Default Auto median Close Dilation followed by an erosion 2 Dilate Dilation 3 Erode Erosion 4 unused 5 unused 6 unused 7 unused 8 Open Erosion followed by a dilation 9 PClose A succession of 7 closings and openings 10 POpen A succession of 7 openings and closings Structuring Element is a 2D array that contains the structuring element to be applied to the image The size of the structuring element the size of this array determines the processing size A structuring element of 3 x 3 is used if this input is not connected error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapte
106. 2 NAND operator equation table 4 2 truth table 4 4 nonlinear filters 5 22 to 5 28 classification summary table 5 3 definition 5 2 5 22 differentiation filter 5 25 example 5 24 gradient filter 5 25 lowpass filter 5 26 National Instruments Corporation l 11 Index median filter 5 27 Nth order filter 5 27 to 5 28 Prewitt filter 5 23 Roberts filter 5 25 Sigma filter 5 26 Sobel filter 5 23 NOR operator equation table 4 2 truth table 4 4 normalization factor 5 3 NOT operator truth table 4 4 Nth order filter 5 27 to 5 28 0 object measurements 8 5 to 8 18 areas 8 5 to 8 7 chords and axes 8 9 to 8 11 coordinates 8 8 to 8 9 lengths 8 7 to 8 8 shape equivalence 8 11 to 8 14 shape features 8 14 to 8 18 opening function gray level morphology 7 34 to 7 36 primary binary morphology 7 12 to 7 13 operators See also Arithmetic Operator VIs Logic Operator VIs arithmetic 4 2 concepts and mathematics 4 1 logic 4 2 to 4 7 example 1 4 5 to 4 6 example 2 4 6 to 4 7 list of operators table 4 2 truth tables 4 4 optical representation FFT display 6 6 to 6 7 OR operator See also Logic Operator VIs equation table 4 2 truth table 4 4 IMAQ Vision for G Reference Manual Index p palettes 2 1 to 2 4 2 1 to 2 8 binary palette 2 4 B amp W gray palette 2 2 definition 2 1 gradient palette 2 3 image histogram 2 4 overview 2 1 to 2 2 rainbow palette 2 3 temperatu
107. 2 16 to 12 17 IMAQ WindZoom 12 21 to 12 22 Display User 12 29 to 12 34 IMAQ WindUserClose 12 33 IMAQ WindUserEvent 12 33 to 12 34 IMAQ WindUserMove 12 32 IMAQ WindUserSetup 12 29 to 12 30 IMAQ WindUserShow 12 31 to 12 32 IMAQ WindUserStatus 12 30 to 12 31 Regions of Interest 12 23 to 12 28 IMAQ MaskToROI 12 28 IMAQ ROIToMask 12 27 to 12 28 IMAQ WindEraseROI 12 26 IMAQ WindGetROI 12 24 IMAQ WindSetROI 12 25 to 12 26 disposing of images See IMAQ Dispose VI distance calibration 8 1 distance function advanced binary morphology 7 29 See also IMAQ Distance VI diverse tool VIs See Tools Diverse VIs diverse measurement parameters 8 19 Division operator table 4 2 documentation conventions used in manual xxi organization of manual xix to xx related documentation xxii IMAQ Vision for G Reference Manual 4 E edge extraction gradient filters 5 7 to 5 9 edge highlighting gradient filters 5 7 to 5 9 edge thickness gradient filters 5 9 electronic support services A 1 to A 2 ellipse major axis 8 12 to 8 13 ellipse minor axis parameter 8 13 ellipse ratio parameter 8 13 elongation factor parameter 8 15 entropy automatic thresholding 7 6 Equalize function See also IMAQ Equalize VI example 1 3 4 to 3 5 example 2 3 5 purpose and use 3 4 transfer function and effect table 3 3 equivalent ellipse minor axis parameter 8 12 erosion function gray level morphology 7 33 to 7 34 primary binary
108. 2 3 IMAQ Vision for G Reference Manual Chapter 22 Color Vis IMAQ ExtractColorPlanes Extracts the three planes RGB HSV or HSL from an image 5 Color Made Image 5rc RGE Red ar Hue Plane out Red or Hue Plane Green or Sat Plane out Green or Sat Plane P Blue or Light or Val Flan Blue or Light oral Plane E error out eror in no error Color Mode defines the image color format to use for the operation The default 1s 0 which specifies RGB E O Default RGB 1 HSL 2 HSV Image Src RGB is the reference to an image that has its three planes extracted RGB HSV or HSL It must be an RGB chunky image Red or Hue Plane is the reference to the destination image It mn contains the first color plane This plane can be either the red plane Color Mode 0 or the hue plane Color Mode 1 or 2 It must be an 8 bit image The color plane is not extracted if the input is not connected E Green or Sat Plane is the reference to the destination image It contains the second color plane This plane can be either the green plane Color Mode 0 or the saturation plane Color Mode 1 or 2 It must be an 8 bit image The color plane is not extracted if the input is not connected Blue or Light or Val Plane is the reference to the destination image It contains the third color plane This plane can be either the blue plane Color Mode 0 the lightness plane Color Mode 1 or the value plane
109. 22 27 IMAQ Compare VI 15 15 to 15 16 IMAQ ComplexAdd VI 21 8 to 21 9 IMAQ ComplexAttenuate VI 21 6 IMAQ ComplexConjugate VI 21 5 IMAQ ComplexDivide VI 21 12 to 21 14 IMAQ ComplexFlipFrequency VI 21 4 to 21 5 IMAQ ComplexImageToArray VI 21 14 to 21 15 IMAQ ComplexMeasure VI 19 15 to 19 20 IMAQ ComplexMultiply VI 21 11 to 21 12 IMAQ ComplexParticle VI 19 13 to 19 15 IMAQ ComplexPlaneToArray VI 21 16 to 21 17 National Instruments Corporation l 7 Index IMAQ ComplexPlaneToImage VI 21 18 to 21 19 IMAQ ComplexSubtract VI 21 9 to 21 11 IMAQ ComplexTruncate VI 21 7 to 21 8 IMAQ Convert VI 14 1 to 14 2 IMAQ ConvertByLookup VI 14 4 to 14 5 IMAQ Convex VI 18 12 IMAQ Convolute VI 17 2 to 17 3 IMAQ Copy VI 13 1 to 13 2 IMAQ Correlate VI 17 11 to 17 12 IMAQ Create VI 10 1 to 10 3 IMAQ Create amp LockSpace VI 10 3 to 10 4 IMAQ Danielsson VI 18 8 IMAQ Dispose VI 10 4 to 10 5 IMAQ Distance VI 18 7 to 18 8 IMAQ Divide VI 15 5 to 15 6 IMAQ Draw VI 13 26 to 13 27 IMAQ DrawText VI 13 27 to 13 30 IMAQ EdgeDetection VI 17 6 to 17 7 IMAQ Equalize VI 16 11 to 16 12 IMAQ Error VI 10 5 to 10 6 IMAQ Expand VI 13 5 to 13 7 IMAQ Extract VI 13 4 to 13 5 IMAQ ExtractColorPlanes 22 4 to 22 5 IMAQ FFT VI 21 2 to 21 3 IMAQ FillHole VI 18 10 to 18 11 IMAQ FillImage VI 13 31 to 13 32 IMAQ GetCalibration VI 13 11 to 13 12 IMAQ GetColorPixelLine VI 22 18 to 22 19 IMAQ GetColorPixelValue VI 22 16 to 22 17 IMAQ GetFil
110. 23 to 12 28 definitions of primary IMAQ MaskToROI 12 28 measuremente 6 16 IMAQ ROITOMask 12 27 to 12 28 derived measurements table IMAQ WindEraseROI 12 26 3 17 to 8 18 MAO WindGetROl ee windows management See Display VIs IMAQ WindSetROI 12 25 to 12 26 Tools Diverse 13 24 to 13 32 IMAQ ClipboardToImage 13 25 X IMAQ Draw 13 26 to 13 27 IMAQ DrawText 13 27 to 13 30 IMAQ FillImage 13 31 to 13 32 IMAQ ImageToClipboard 13 24 to 13 25 IMAQ MagicWand 13 30 to 13 31 Tools Image IMAQ Copy 13 1 to 13 2 IMAQ Expand 13 5 to 13 7 IMAQ Extract 13 4 to 13 5 IMAQ GetCalibration 13 11 to 13 12 IMAQ GetImageSize 13 2 IMAQ GetOffset 13 7 to 13 8 IMAQ ImageTolImage 13 14 to 13 15 IMAQ Resample 13 10 to 13 11 IMAQ SetCalibration 13 12 to 13 13 IMAQ SetImageSize 13 3 IMAQ SetOffset 13 9 Tools Pixel 13 16 to 13 24 IMAQ ArrayTolmage 13 23 to 13 24 IMAQ GetPixelLine 13 18 IMAQ GetPixelValue 13 16 IMAQ GetRowCol 13 19 IMAQ ImageToArray 13 22 to 13 23 IMAQ SetPixelLine 13 20 IMAQ SetPixelValue 13 17 IMAQ SetRowCol 13 21 to 13 22 XOR operator equation table 4 2 See also Logic Operator VIs IMAQ Vision for G Reference Manual I 18 National Instruments Corporation
111. 3 3 RGB chunky image type 1 3 9 1 Roberts filter 5 25 S scale of histogram 2 7 segmentation function See also IMAQ Segmentation VI advanced binary morphology 7 27 to 7 29 compared with skiz function 7 28 to 7 29 National Instruments Corporation I 13 Index separation function advanced binary morphology 7 25 to 7 26 See also IMAQ Separation VI shape equivalence parameters 8 11 to 8 14 ellipse major axis 8 12 to 8 13 ellipse minor axis 8 13 ellipse ratio 8 13 equivalent ellipse minor axis 8 12 rectangle big side 8 13 rectangle ratio 8 14 rectangle small side 8 14 shape feature parameters 8 14 to 8 18 compactness factor 8 15 elongation factor 8 15 Heywood circularity factor 8 15 hydraulic radius 8 15 to 8 16 moments of inertia Iyy Iyy Ixy 8 14 Waddel disk diameter 8 16 to 8 18 definitions of primary measurements 8 16 derived measurements table 8 17 to 8 18 Sigma filter 5 26 skeleton functions 7 26 to 7 27 See also IMAQ Skeleton VI L skeleton 7 26 M skeleton 7 27 skiz 7 27 skiz function compared with segmentation function 7 28 to 7 29 purpose and use 7 27 smoothing convolution filter 5 18 smoothing filter 5 17 to 5 20 definition 5 17 example 5 17 to 5 18 kernel definition 5 18 to 5 19 predefined smoothing kernels 5 19 to 5 20 Sobel filters nonlinear 5 23 spatial calibration 8 1 spatial filtering 5 1 to 5 28 categories 5 1 IMAQ Vision for G Reference Manual I
112. 3 IMAQ Vision for G Reference Manual Chapter 16 Processing Vls This example shows two threshold ranges with an overlap between 120 and 150 Therefore the pixels between 120 and 150 are treated only by the first threshold The following results occur after execution of this VI e Pixel values between O and 79 are replaced by 0 e Pixel values between 80 and 150 are replaced by 255 e Pixel values between 151 and 200 keep their original values e Pixel values greater than 200 are set to 0 IMAQ AutoBThreshold Applies an automatic binary threshold to an image that initially possesses 256 gray levels in two classes Performs a statistical calculation to determine the optimal threshold La La Image Threshold Value Method Lookup Table Threshold Data error in no errar i error out E Image is the reference to the source input image Method is the threshold method used The following values are valid O0 clustering entropy 2 metric 3 moments 4 inter class variance ie Note See the Thresholding section of Chapter 7 Morphology Analysis for more information about these methods IMAQ Vision for G Reference Manual 16 4 O National Instruments Corporation Chapter 16 Processing Vls error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAO VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Thr
113. 85 0086 Canada Quebec 514 694 8521 514 694 4399 Denmark 45 76 26 00 45 76 26 02 Finland 00 725 725 11 09 725 725 55 France 01 48 14 24 24 01 48 14 24 14 Germany 089 741 31 30 089 714 60 35 Hong Kong 2645 3186 2686 8505 Israel 03 5734815 03 5734816 Italy 02 413091 06 57284309 Japan 03 5472 2970 03 5472 2977 Korea 02 596 7456 02 596 7455 Mexico 5 520 2635 5 520 3282 Netherlands 0348 433466 0348 430673 Norway 32 84 84 00 32 84 86 00 Singapore 2265886 2265887 Spain 91 640 0085 91 640 0533 Sweden 08 730 49 70 08 730 43 70 Switzerland 056 200 51 51 056 200 51 55 Taiwan 02 377 1200 02 737 4644 United States U K 512 794 0100 01635 523545 512 794 8411 01635 523154 Technical Support Form Photocopy this form and update it each time you make changes to your software or hardware and use the completed copy of this form as a reference for your current configuration Completing this form accurately before contacting National Instruments for technical support helps our applications engineers answer your questions more efficiently If you are using any National Instruments hardware or software products related to this problem include the configuration forms from their user manuals Include additional pages if necessary Name Company Address Fax Phone ___ Computer brand Model Processor Operating system include version number Clock speed MHz RAM MB Display adapter Mouse yes __ no Other adapters installed Hard disk capacit
114. 9 600 baud 8 data bits 1 stop bit no parity France 01 48 65 15 59 Up to 9 600 baud 8 data bits 1 stop bit no parity FTP Support To access our FTP site log on to our Internet host ftp natinst com as anonymous and use your Internet address such as joesmith anywhere com as your password The support files and documents are located in the support directories National Instruments Corporation A 1 IMAQ Vision for G Reference Manual 4 Fax on Demand Support Fax on Demand is a 24 hour information retrieval system containing a library of documents on a wide range of technical information You can access Fax on Demand from a touch tone telephone at 512 418 1111 E Mail Support currently U S only You can submit technical support questions to the applications engineering team through e mail at the Internet address listed below Remember to include your name address and phone number so we can contact you with solutions and suggestions support finatinst Com Telephone and Fax Support National Instruments has branch offices all over the world Use the list below to find the technical support number for your country If there is no National Instruments office in your country contact the source from which you purchased your software to obtain support SQ Telephone Fax Australia 03 9879 5166 02 9874 4455 Austria 0662 45 79 90 0 0662 45 79 90 19 Belgium 02 757 00 20 02 757 03 11 Canada Ontario 905 785 0085 905 7
115. Area of an object including the area of its holes This value is equal to Particle Area Holes Area An object located inside a hole of a bigger object is identified as a separate object The area of a hole that contains an object includes the area covered by the object Object 2 Object 1 an B q n q B q Dhr n IMAQ Vision for G Reference Manual 8 6 National Instruments Corporation Chapter 8 Quantitative Analysis Object Particle Area Total Area Object 2 Object 4 Object 3 Lengths This section describes the following length parameters e Particle perimeter Length of the outer contour e Holes perimeter Sum of the perimeters of the holes within the object e Width Distance between the left most and right most pixels in the object e Height Distance between the upper most and lower most pixels in the object Particle Perimeter Length of the outer contour of an object Holes Perimeter Sum of the perimeters of the holes within an object Lz Note Holes measurements can turn into valuable data when studying constituents A and B such that B is occluded in A If the image can be processed so that the B regions appear as holes in A regions after a threshold the ratio Holes Area Particle Total Area gives the percentage of B in A Holes perimeter gives the length of the boundary between A and B Breadth Distance between the left most and right most pixels in an object or m
116. ArrayToComplexPlane 21 17 to 21 18 IMAQ ComplexAdd 21 8 to 21 9 IMAQ ComplexAttenuate 21 6 IMAQ ComplexConjugate 21 5 IMAQ ComplexDivide 21 12 to 21 14 IMAQ ComplexFlipFrequency 21 4 to 21 5 IMAQ ComplexImageToArray 21 14 to 21 15 IMAQ ComplexMultply 21 11 to 21 12 IMAQ ComplexPlaneToArray 21 16 to 21 17 O National Instruments Corporation IMAQ ComplexPlaneTolImage 21 18 to 21 19 IMAQ ComplexSubtract 21 9 to 21 11 IMAQ ComplexTruncate 21 7 to 21 8 IMAQ FFT 21 2 to 21 3 IMAQ ImageToComplexPlane 21 19 to 21 20 IMAQ InverseFFT 21 3 to 21 4 overview 21 1 to 21 2 connectivity connectivity 4 8 4 connectivity 8 8 3 overview 8 3 connectivity 4 8 input 9 15 18 3 contour extraction and highlighting Laplacian filters 5 14 to 5 15 contour thickness Laplacian filters 5 15 to 5 16 Conversion VIs 14 1 to 14 6 IMAQ Cast 14 2 to 14 3 IMAQ Convert 14 1 to 14 2 IMAQ ConvertByLookup 14 4 to 14 5 IMAQ Shiftl6to8 14 5 to 14 6 convex function advanced binary morphology 7 31 to 7 32 See also IMAQ Convex VI convolution defined 5 3 17 1 convolution filters See linear filters or convolution filters convolution kernel defined 5 3 convolution matrix 17 1 coordinates 8 8 to 8 9 center of mass X and center of mass Y 8 8 max chord X and max chord Y 8 9 min X Y and max X Y 8 9 creating images See image creation cumulative histogram 2 6 customer communications xxii A 1 to A 2 O National Instruments
117. Auto Mediam FUNCOM eacus dede o eo deosque spp ded debate dena etu ade 7 38 Chapter 8 Quantitative Analysis palta ali Dra M a a N a os 8 1 Intensity Calibrador eso 8 2 Detiniion OF a DistaLOD Elida aci abel 8 2 Intensity Tarento ic to oca 8 2 O National Instruments Corporation Ix IMAQ Vision for G Reference Manual Contents ECOMECA oa 8 3 COIBCCLLVIDV iia 8 3 COMEN OOO Ii 8 4 Arca Ote SOI atacando ete 8 4 Ob col Meds MENIS dia 8 5 ATC in 8 5 Particle Number che eter lee ee De Rad eR tes boe ales Uu ss d 8 5 Numberor PIXelS uestem ri diia 8 5 Paracle Ar ito 8 5 SCIE A O A d ei tM ELE 8 6 A A A UM 8 6 Number Ob Holes slds 8 6 HOIS Adicto iia 8 6 E A E O dere aen Seu Eos 8 6 A tied caseaacteeaies 8 7 Par cte PermieleE anda dol Geniatenks 8 7 Holes Pernm ter anda lidad 8 7 DE ACU ypu tonnes A uae Ea 8 7 A II 8 8 NP A TN 8 8 Center of Mass X and Center of Mass Y oocccccccnnncncncnnnnnnnnnononnnnnonnnos 8 8 MIOS Y add MIXA Y less ir 8 9 Max Chord X and Max hord Via ove o HE uoti usa unt Fue ds 8 9 Chords and Axesor e a causa desine Niobe cese edo aS LRta 8 9 Max Chord Len id 8 10 Meat C OLG Central Ara 8 10 Meam Chord Y a 8 10 E rt oe LUN Erie ccce 8 10 Mean Intercept Perpendicular 00 is 8 10 Particle Orem aoee A a 8 10 Shape Equivalencia cio pe M ica RI DE 8 11 Equivalent Ellipse Minor Axis sese 8 12 Elipse VE ATOR ARIS aos qd btiptiu tes ec nct seu tis 8 12 Elltbse NHBnOE AS t
118. Bold text in this font denotes the messages and responses that the computer automatically prints to the screen This font also emphasizes lines of code that are different from the other examples Angle brackets enclose the name of a key on the keyboard for example PageDown A hyphen between two or more key names enclosed in angle brackets denotes that you should simultaneously press the named keys for example lt Control Alt Delete gt Key names are capitalized The symbol leads you through nested menu items and dialog box options to a final action The sequence File Page Setup Options Substitute Fonts directs you to pull down the File menu select the Page Setup item select Options and finally select the Substitute Fonts option from the last dialog box Paths in this manual are denoted using backslashes 1 to separate drive names directories and files as 1n C NdirlnameNdir2nameNM filename This 1con to the left of bold italicized text denotes a note which alerts you to important information The Glossary lists abbreviations acronyms metric prefixes mnemonics symbols and terms IMAQ Vision for G Reference Manual About This Manual Related Documentation The following documents contain information that you may find helpful as you read this manual e LabVIEW User Manual e LabVIEW Tutorial e BridgeVIEW User Manual e G Programming Reference Manual Customer Communication National Instruments
119. COVER DAMAGES CAUSED BY FAULT OR NEGLIGENCE ON THE PART OF NATIONAL INSTRUMENTS SHALL BE LIMITED TO THE AMOUNT THERETOFORE PAID BY THE CUSTOMER NATIONAL INSTRUMENTS WILL NOT BE LIABLE FOR DAMAGES RESULTING FROM LOSS OF DATA PROFITS USE OF PRODUCTS OR INCIDENTAL OR CONSEQUENTIAL DAMAGES EVEN IF ADVISED OF THE POSSIBILITY THEREOF This limitation of the liability of National Instruments will apply regardless of the form of action whether in contract or tort including negligence Any action against National Instruments must be brought within one year after the cause of action accrues National Instruments shall not be liable for any delay in performance due to causes beyond its reasonable control The warranty provided herein does not cover damages defects malfunctions or service failures caused by owner s failure to follow the National Instruments installation operation or maintenance instructions owner s modification of the product owner s abuse misuse or negligent acts and power failure or surges fire flood accident actions of third parties or other events outside reasonable control Under the copyright laws this publication may not be reproduced or transmitted in any form electronic or mechanical including photocopying recording storing in an information retrieval system or translating in whole or in part without the prior written consent of National Instruments Corporation IMAQ LabVIEWS and BridgeVIEW are trademarks
120. Chapter 9 VI Overview and Programming Concepts error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ Vision for G Reference Manual 12 36 National Instruments Corporation Chapter 12 Display IMAQ WindDrawRect Refreshes a rectangle in an image window The advantage of this VI is that refreshing part of an image is always faster than drawing the whole image Window Number L 15 Update Rectangle error in no error Window Number 0 15 selects the window to refresh The default is O Update Rectangle is an array of elements They are the coordinates of the rectangle to be refreshed Left Top Right Bottom rmm LII 132 error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAO VI Error Clusters 1n Chapter 9 VI Overview and Programming Concepts a error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts a Note There is a direct relationship between a window number and the last drawn image Therefore specifying only the window number is enough to know which image is to be refreshed
121. Example This example uses the following source image A gradient filter extracts horizontal edges to produce the following image A gradient filter highlights diagonal edges to produce the following image Kernel Definition A gradient convolution filter is a first order derivative and its kernel uses the following model a b c b x d c d a O National Instruments Corporation 5 5 IMAQ Vision for G Reference Manual Chapter 5 Spatial Filtering where a b and c are integers and x 0 or 1 This kernel has an axis of symmetry that runs between the positive and negative coefficients of the kernel and through the central element This axis of symmetry gives the orientation of the edges to outline Filter Axis and Direction The axis of symmetry of the gradient kernel gives the orientation of the edges to outline For example where a 0 b 1 c 1 d 1 and x 0 the kernel is the following O 1 1 0 1 1 0 The axis of symmetry is at 135 degrees For a given direction you can design a gradient filter to highlight or darken the edges along that direction The filter actually is sensitive to the variations of intensity perpendicular to the axis of symmetry of its kernel Given the direction D going from the negative coefficients of the kernel towards the positive coefficients the filter highlights the pixels where the light intensity increases along the direction D and darkens the pixels where the light
122. For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts This operation applies a color to all pixels composing the same group of pixels a particle This color level is encoded in 8 or 16 bits depending on the image type Therefore 255 particles can be labeled in an 8 bit image and 65535 particles in a 16 bit image If you want to label more than 255 particles in an 8 bit image you need to perform a threshold operation with an interval of 255 255 after processing the first 254 O National Instruments Corporation 16 13 IMAQ Vision for G Reference Manual Chapter 16 Processing VIs particles The goal of this threshold operation 1s to eliminate the first 254 particles in order to visualize the next 254 particles Image Src is the input image and Image Dst is the resulting image This operation requires that Image Src and Image Dst be the same image type and that the border for these images be greater or equal to 2 IMAQ Vision for G Reference Manual 16 14 National Instruments Corporation Chapter Filter Vis This chapter describes the Filter VIs in IMAQ Vision The filters are divided into two types linear also called convolution and nonlinear A convolution is a special algorithm that consists of recalculating the value of a pixel based on its own pixel value as well as the pixel values of its neighbors The sum of this calculation is divided by the
123. GB Default no change 1 HSL Convert to HSL 2 HSV Convert to HSV National Instruments Corporation 22 23 IMAQ Vision for G Reference Manual Chapter 22 Color Vis Red value is the input red value Blue value is the input blue value Green value is the input green value Ep error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Red or Hue value is the output value for the first color plane depending on the Color Mode chosen Green or Sat value is the output value for the second color plane depending on the Color Mode chosen Blue or Light or Val value is the output value for the third color plane depending on the Color Mode chosen error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ IntegerToColorValue Converts colors in the form of an unsigned 32 bit integer control into a cluster composed of the three colors in mode R G B H S L or H S V These colors can be entered as a single value a 1D array a 2D array or a combination of the above 5 Color Mode 032 value E Color Value 1D LES array T zz 10 Color value array D L2 array Ti zm 1 Color value array error
124. Gradient in Hit miss Open PClose POpen Thick Thin Default Auto median Dilation followed by an erosion Dilation the opposite of an erosion Erosion that eliminates isolated background pixels Extraction of internal and external contours of a particle Extraction of exterior contours of a particle Extraction of interior contours of a particle Elimination of all pixels that do not have the same pattern as found in the structuring element Erosion followed by a dilation A succession of 7 closings and openings A succession of 7 openings and closings Activation of all pixels matching the pattern in the structuring element Activation of all pixels matching the pattern in the structuring element Structuring Element is a 2D array that contains the structuring element to be applied to the image The size of the structuring element the size of this array determines the processing size A structuring element of 3 x 3 is used if this input is not connected error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts 18 4 National Instruments Corporation Chapter 18 Morphology VIs Image Dst Out is the reference to the destination output image which 2 0 receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the
125. IMAO Vision for G Reference Manual June 1997 Edition Part Number 321379B 01 TA bla e c A Copyright 1996 1997 National Instruments Corporation All rights reserved E Internet Support E mail support natinst com TAtolnatIMHSt Com FTP Site Ptp natrnsticcom Web Address http www natinst com u Bulletin Board Support BBS United States 512 794 5422 BBS United Kingdom 01635 551422 BBS France 01 48 65 15 59 J Fax on Demand Support 512 418 1111 Kv Telephone Support U S Tel 512 795 8248 Fax 512 794 5678 Kv International Offices Australia 03 9879 5166 Austria 0662 45 79 90 0 Belgium 02 757 00 20 Canada Ontario 905 785 0085 Canada Qu bec 514 694 8521 Denmark 45 76 26 00 Finland 09 725 725 11 France 01 48 14 24 24 Germany 089 741 31 30 Hong Kong 2645 3186 Israel 03 5734815 Italy 02 413091 Japan 03 5472 2970 Korea 02 596 7456 Mexico 5 520 2635 Netherlands 0348 433466 Norway 32 84 84 00 Singapore 2265886 Spain 91 640 0085 Sweden 08 730 49 70 Switzerland 056 200 51 51 Taiwan 02 377 1200 U K 01635 523545 Lm National Instruments Corporate Headquarters 6504 Bridge Point Parkway Austin TX 78730 5039 Tel 512 794 0100 Important Information Warranty Copyright Trademarks The media on which you receive National Instruments software are warranted not to fail to execute programming instructions due to defects in materials and workmanship
126. IMAQ GetScreenSize Returns the screen size in pixels Ret Point a Screen width Ref Point r 4 Screen Height error in mo error ll error out O National Instruments Corporation 12 37 IMAQ Vision for G Reference Manual Chapter 12 Display El El zmn Ref Point X Unused Ref Point Y Unused error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Screen Width gives the X size of screen Screen Height gives the Y size of screen error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ WindXYZoom This VI is similar to IMAQ WindZoom but allows the user to zoom the image at different scales in X and Y IMAQ WindXY Zoom produces rectangular pixels in displaying the image Window Number L 15 zaamF actors 2 and Y E ZoomF actors 2 and Y Center Point Center Point et Set Status Set mE eror in na errar E error out Window number 0 15 is a number that specifies the image window The default value is 0 ZoomFactors X and Y is a cluster containing the zoom factors for X and Y scale Zoom Factor X ranges from 16 to 16 IMAQ Vision for G Reference Manual 12
127. IMAQ VI Error Clusters zmn Your IMAQ VIs use a standard control and indicator error in and error out to notify you that an error has occurred The error in and error out parameters are described here error in no error is a cluster that describes the error status before this VI executes If error in indicates that an error occurred before this VI was called this VI might choose not to execute its function but just pass the error through to its error out cluster If no error has occurred IMAQ Vision for G Reference Manual 9 4 O National Instruments Corporation 3 T O National Instruments Corporation 9 5 Chapter 9 VI Overview and Programming Concepts this VI executes normally and sets its own error status in error out Use the Error Handler VIs to look up the error code and to display the corresponding error message Using error in and error out clusters is a convenient way to check errors and to specify execution order by wiring the error output from one subVI to the error input of the next status is TRUE if an error occurred before this VI was called or FALSE if not If status is TRUE code is a nonzero error code If status is FALSE code can be 0 or a warning code code is the number identifying an error or warning If status is TRUE code is a nonzero error code If status is FALSE code can be 0 or a warning code Use the Error Handler VIs to look up the meaning of this code and to display the corresponding error me
128. NIul Ehtesholg ss usd te o dte tutes Rus oa epe uva 16 2 IMAC AMoB Tesouro 16 4 IMAO AttoMTiresho duna iii 16 5 IM AO USGrEOORUD aiii te aes lodos odia ned 16 7 IMAQ Mathbooku p uds 16 8 EIA A Oa TR 16 11 IMAO Edel is 16 13 Chapter 17 Filter Vis IMAO CONVOI lc eueniee 17 2 IMAO GEUR Cine E A A 17 3 Exa E e ER 17 5 IMAO Bull Gls eme lenaren oh Eee patito A AAA 17 5 IMAO EdoeDelectlOBs eieaa E eena a nta E ATAR 17 6 IMAO NHO e orra a a E AR 17 8 IMAO LOWE AS ni ia 17 10 IMAO Corie ernan oidos 17 11 IMAQ Vision for G Reference Manual XIV O National Instruments Corporation Chapter 18 Morphology Vis Chapter 19 Analysis Vis Chapter 20 Geometry Vis Chapter 21 Complex Vis Contents IMAO MOFDhOlOE V icono i oti e std tudo Pert e etn bu odd sns 18 3 IMAQ GrayMorphology ida 18 5 IMAO BIET UU TT 18 7 IMAO Damel sonent a o 18 8 IMAO Remove Parie E ss e a Ete 18 9 MAO PHO le cool 18 10 IMAO Re ect ordenata 18 11 IMAO C OOV X usui mR tne ettao E E NRE SSE SU NS QUI RU NH FS 18 12 IMA 18 13 IMAO SePImerit 3tOlEo iio 18 14 IMAO Ske EOD TU TET 18 15 IMAO Sc pardOn aeie A Spenser tan imoneeanennus 18 17 A a rutsot ta fosa pasto dorut us 19 1 INMEACEEBStOBEADIE eio er ext HOPED Mv teu R osea bare omega 19 3 IMAO Line Prot rette pn eee Eod bei ture Dep i aids 19 6 IMAO LiDcatA Vera ces ue i puteos ove ei eup tu I aD Uus 19 8 TNEAQ QUANTIFY aceti quu Midi EdeU aa EUR Mdb 19 9 TINEA OCCU OI T m m t 19 10 IMAO Basic P
129. O o Oe utt Doom e pode uu E Etre 13 16 TMAO SetPrrcl abies ot ERR reet at ai 13 17 IMAGE PRIM sud tii eode 13 18 IMAO CEIROWC obli 13 19 IMAO Set Pike EID araen a a dub evi edition 13 20 IMA O Set Row Ol 13 21 IMAQ Timase FOAUIAY las died 13 22 IMAQ Array Tomato m hawaii 13 23 EEEIEE PEA PIEN ENNE A EEEN EE PAE AA A E E MERC 13 24 IMAQ Tintagel OC hpboatd ania ii 13 24 IMAQ Clipboard Tolma eG usar lit dean 13 25 EMA OD I io cocos 13 26 IMAO Draw Tere ERE UM 13 27 IMAQ Magic WAT eea a eed ve E 13 30 IMAO STI UNE 13 31 IMAO CONV 14 1 IMA Ca en heey erent rer reer reer arene cree nt ee eer er eee ey ere 14 3 IMAO Convertby Loop cis 14 4 IMAO SMAN GOS sust dobles tod eot ceateatannaasiaset denser iadaateuckacaness 14 5 O National Instruments Corporation Xiii IMAQ Vision for G Reference Manual Contents Chapter 15 Operator Vis Adttitie tic Operators taa dama date dm dnb uiri odd 15 1 INAO Ag sm duae e E IL CM aa 15 1 INAO SU tha clara ada 15 2 IMAO Mi aii 15 4 IMAO Diderot 15 5 IMAO NIU boc tritt NS 15 7 MAO Modulos aaa 15 8 Logic Opcion a 15 10 IMA TIG Apis 15 10 IMAO cT rc EPUM 15 11 INAO X OF werk thst uisi a ets toC CA co tL ae 15 12 IMAO LOS DI ctio oo oet uam us dog uolunt susp Santen 15 13 IMAO COMP due kuddes Dui estdomeiet dde udt dudes due n dose E due EU 15 15 IMAO Mask conan Hie tee eod OH tlt sais tesa ecoute us 15 17 Chapter 16 Processing VIs INDAO ihe SOG aaa aaa 16 1 INDNO
130. Palettes Chapter This chapter describes the tools and utilities used in IMAQ Vision At the time an image is displayed on the screen the value of each pixel is converted into a red green and blue intensity which produces a color This conversion is defined in a table called color lookup table CLUT For 8 bit images it associates a color to each gray level value and produces a gradation of colors called a palette With palettes you can produce different visual representations of an image without altering the pixel data Palettes can generate effects such as a photonegative display or color coded displays In the latter case palettes are useful for detailing particular image constituents in which the total number of colors are limited Displaying images in different palettes helps emphasize regions with particular intensities identify smooth or abrupt gray level variations and convey details that might be lost in a gray scale image In the case of 8 bit resolution pixels can take 2 or 256 values ranging from 0 to 255 A black and white palette associates different shades of gray to each value so as to produce a linear and continuous gradation of gray from black to white At this point the palette can be set up to assign the color black to the value O and white to 255 or vice versa Other palettes can reflect linear or nonlinear gradations going from red to blue light brown to dark brown and so forth The gray level val
131. R a E RJ be x e e A x A A To multiply a constant and an image the output Image Dst must be connected to the same image type as the input Image Src A If one of the two source images is empty the result is a copy of the other IMAQ Divide Divides one image by another or an image by a constant e he R PP Constant Image Src A Image List Out Image Dat Image Src B erar In na errar q error aut Constant The input Image Src A is divided by the Constant value for image constant operations The default is 1 Image Src A is the reference to the source input image A J 5 B Image Dst is the reference to the destination image O National Instruments Corporation 15 5 IMAQ Vision for G Reference Manual Chapter 15 Operator VIs Image Src B is the reference to the source input image B E error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAO VI Error Clusters in Chapter 9 VI Overview and Programming Concepts a Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src A a error out is a cluster that describes the error status after this VI executes For more information about this indicator
132. RUE The default value is FALSE which specifies the use of the standard pen j Pen width specifies the pen width The default value is 0 which specifies no change error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAO VI Error Clusters 1n Chapter 9 VI Overview and Programming Concepts error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAO VI Error Clusters 1n Chapter 9 VI Overview and Programming Concepts Note In zoom mode greater than 3 the values of Paint mode and Pen Style are ignored O National Instruments Corporation 12 41 IMAQ Vision for G Reference Manual Chapter 12 Display IMAQ GetUserPen Returns the user pen status Paint made Fen transfer made Pen style Foreground color l Background color eror in no error e Pen pattern User pen active Fen width erar out error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Paint mode is used for zoom factors greater than 3 If the value is Paint the rectangles which compose the ROI bounds are painted if the value if Frame these rectangles are framed only the contour is traced Pen
133. SetOffset 13 9 Tools Pixel VIs 13 16 to 13 24 IMAQ ArrayTolmage 13 23 to 13 24 IMAQ GetPixelLine 13 18 IMAQ GetPixelValue 13 16 IMAQ GetRowCol 13 19 IMAQ ImageToArray 13 22 to 13 23 IMAQ SetPixelLine 13 20 IMAQ SetPixelValue 13 17 IMAQ SetRowCol 13 21 to 13 22 truth tables for logic operators 4 2 U utilities See image histogram palettes National Instruments Corporation I 15 Index in advanced version of IMAQ Vision table 9 7 to 9 9 Analysis 19 11 to 19 23 IMAQ BasicParticle 19 11 to 19 13 IMAQ Centroid 19 10 to 19 11 IMAQ ChooseMeasurements 19 20 to 19 23 IMAQ ComplexMeasure 19 15 to 19 20 IMAQ ComplexParticle 19 13 to 19 15 IMAQ Histograph 19 3 to 19 6 IMAQ History 19 1 to 19 3 IMAQ LinearAverages 19 8 to 19 9 IMAO LineProfile 19 6 to 19 8 IMAQ Quantify 19 9 to 19 10 Arithmetic Operators 15 1 to 15 9 IMAQ Add 15 1 to 15 2 IMAQ Divide 15 5 to 15 6 IMAQ Modulo 15 8 to 15 9 IMAQ MulDiv 15 7 to 15 8 IMAQ Multiply 15 4 to 15 5 IMAQ Subtract 15 2 to 15 4 in base and advanced versions of IMAQ Vision table 9 6 to 9 7 Color 22 1 to 22 27 color planes inversion PC 22 2 to 22 23 IMAQ ArrayToColorImage 22 22 to 22 23 IMAQ ColorEqualize 22 15 IMAQ ColorHistogram 22 7 to 22 8 IMAQ ColorHistograph 22 0 to 22 10 IMAQ ColorImageToArray 22 21 to 22 22 IMAQ ColorThreshold 22 11 to 22 12 IMAQ ColorUserLookup 22 13 to 22 14 IMAQ Vision for G Referen
134. The Image Dst image is the image that receives the processing results Depending on the functionality of the VI this image can be either the same or a different image type as that of the source image IMAQ Vision for G Reference Manual 9 12 National Instruments Corporation Chapter 9 VI Overview and Programming Concepts The description of each VI and the type of image that can be connected to their Image inputs are described in the VI reference chapters 10 through 23 of this manual In all cases the size of an image connected to Image Dst is irrelevant as it is modified automatically by the VI to correspond to the source image size The existence of the output Image Dst Out enables you to synchronize the various processes without systematically creating a new LabVIEW or BridgeVIEW sequence structure The name available from the output Image Dst Out is the same as that supplied by the Image Dst except its contents are different after executing the VI The following connection schema applies to VIs that perform arithmetic or logical operations between two images Image Sra Image Dst Image Dst Out Image Src E Farameterz Two source images exist for the destination image The user can perform an operation between two images A and B and then either store the result in another image or in one of the two source images In the latter case you can consider the original data to be unnecessary after the processing has occurred The f
135. The default value of 0 0 insures that the real minimum value is determined by the source image as described in the following table Image Type Minimum Value Used 0 0 Bc Minimum pixel value found in the image Minimum pixel value found in the image Maximum is the maximum interval value The default value of 0 0 insures that the real maximum value is determined by the source image as described in the following table Image Type Maximum Value Used B Maximum pixel value found in the image Bc Maximum pixel value found in the image Ep error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts zu Histogram Report is a cluster that returns the histogram values This cluster contains the following elements IMAQ Vision for G Reference Manual Histogram returns the histogram values in an array The elements found in this array are the number of pixels per class The nth class contains all pixel values belonging to the interval Starting Value n 1 x Interval Width Starting Value n x Interval Width 1 19 2 O National Instruments Corporation Chapter 19 Analysis VIs Minimal Value returns the smallest pixel value used in calculating the histogram Maximal Value returns the largest pixel value used in calculating the histogram Sta
136. VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ Vision for G Reference Manual 14 4 O National Instruments Corporation Chapter 14 Conversion VIs ET Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src T error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ Shift16to8 Converts a 16 bit image to an 8 bit image The VI executes this conversion by shifting the 16 bit pixel values right by the specified number from 1 to 8 of shift operations and then truncating to get an 8 bit value 5 Shift Value Image Src Image List Out Image Dst error in na errar ll error out Shift Value specifies the number of right shifts between 1 and 8 by which each pixel value in the input image 1s shifted Image Src is the reference to the 16 bit image zm zz Image Dst is the reference to the 8 bit output image zz error in no error isa cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts zu Image Dst O
137. Value is the first color plane value depending on the Color Mode Green Sat Value is the second color plane value depending on the Color Mode IMAQ Vision for G Reference Manual 22 26 National Instruments Corporation Chapter 22 Color VIs Blue Light Val Value is the third color plane value wa gt depending on the Color Mode 1D Color value array is a 1D array of clusters containing the color values The values are in R G B H S E or H S V depending on the status of the set Color Mode These clusters are the same type as Color Value r1 iD ol L 2D Color value array is a 2D array of clusters containing the color values The values are in R G B H S L or H S V depending on the status of the set Color Mode These clusters are the same type as Color Value EE error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts U32 value receives the color value resulting from the input Color Value and it is encoded as an unsigned 32 bit integer control Color Value Array and it is encoded as a 1D array of unsigned 32 bit integer controls 2D U32 array receives the color value resulting from the input 2D Color Value Array and it is encoded as a 2D array of unsigned 32 bit integer controls 1D U32 array receives the color value
138. WindEraseR OLD x fepe RED obe tates eivai testo bres 12 26 IMAO ROTO Vlad e 12 27 IMAO MaskTORO Load 12 28 DIS RUOTE ICH c 12 29 IMAO Wind UserSetup ei uio treten ond bes vn made 12 29 IMAOWindUSerStatls rta latina 12 30 IMAO Wind User SOM oi 12 31 IMAO WindUscrMove di dd cd 12 32 IMAO WindUsert 088 eter co Ec AE 12 33 INIAQ WindUsetE vedada atinada 12 33 Display Special al ono oo 12 34 IMAO Wind Se iii as 12 34 IMAO W i d Get MOUSE nd Soda 12 35 IMAO WinGR OIC OO surtir 12 36 IMAO WindDraW Re tus a 12 37 IMAQ Ge S Cheeni Ie AT 12 37 IMAO WindXYZL00Miisi aid 12 38 IMAC Set U SEPPOE e ertt aet ates EAN 12 40 IMAO Get SEL PC Elo cos tI eO oo ida 12 42 IMAQ Vision for G Reference Manual Xii O National Instruments Corporation Chapter 13 Tool Vis Tools Image Tools Pixel Tools Diverse Chapter 14 Conversion Vis Contents IMAO Setup Bra Ud da 12 43 IMAO GetE ast S e youre ata 12 46 A 13 1 IMAO COPs ion 13 1 MAQ Get MAS o aca 13 2 IMAO Semas laica 13 3 IMAO ETIC Ug out N A SDN EDDIE 13 4 IMAO Ex paid anren a fatiode tus maii odas 13 5 IMAGE Os a A a 13 7 IMAO SEC OSC hrenin A dece dt deg 13 9 IMAO Remp iate a A S 13 10 IMA Q Get Ca HDi ati On cid ci ve dae NE 13 11 INEAO Set C aBbEOUIODsn d vods bm obe out va oe sa 13 12 IMAO Iriage l OIm ge det eta eto Eu oo ve sexe dote 13 14 E Demi ia Ue EN NUMINA E 13 16 IMAO GP AUC ausser e eot e
139. a Perot ea us Pi T ernn A nonlinear filter assigns to P a value that is not a linear combination of the surrounding values For example Pa p max Pa joo Parij Pa jm Parjan IMAQ Vision for G Reference Manual 5 2 O National Instruments Corporation Chapter 5 Spatial Filtering Spatial Filter Classification Summary The following table describes the classification of spatial filters Highpass Filters Lowpass Filters Linear Filters Gradient Smoothing Laplacian Gaussian Nonlinear Filters Gradient Roberts Sobel Prewitt Median Nth Order Differentiation Sigma Lowpass Linear Filters or Convolution Filters A convolution is a mathematical function that replaces each pixel by a weighted sum of its neighbors The matrix defining the neighborhood of the pixel also specifies the weight assigned to each neighbor This matrix is called the convolution kernel For each pixel P in an image where i and j represent the coordinates of the pixel the convolution kernel is centered on P jv Each pixel masked by the kernel is multiplied by the coefficient placed on top of it Pa becomes the sum of these products In the case of a 3 x 3 neighborhood the pixels surrounding P and the coefficients of the kernel K can be indexed as follows The pixel P is given the value 1 N X K P py With a ranging from i 1 to i 1 and b ranging from j 1 to j 1 N is the normalization factor equal to X Ka p
140. about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts The conversion rules are the same as the rules for IMAQ Convert IMAQ ConvertByLookup Converts an image by using a lookup table which is encoded in floating point values 8 he IF 5 Lookup T able Image Src Image Dist Out Image Dst erar in na error iL error aut 561 Lookup Table is an array consisting of 256 elements maximum if Image Src has an 8 bit or a maximum of 65536 elements if the Image Src has a 16 bit image This array is filled with values equal to the index if it has less elements than the amount demanded by the image type in Image Src The lookup table can be used to calculate a polynomial giving a relation between a gray level value and a user value VIs capable of analyzing floating point type images can be used to directly quantify an image or regions from an image in user values after converting the image into a floating point type image zu Image Src is the image to be converted It must be an 8 bit or 16 bit image ER Image Dst is the image that receives the conversion The image type for Image Dst can take the following values e 16 bit if Image Src has an 8 bit image e 32 bit floating point if Image Src has an 8 bit or 16 bit image ER error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ
141. ace scroll bars in an image window error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts O National Instruments Corporation 12 3 IMAQ Vision for G Reference Manual Chapter 12 Display The following graphic illustrates how to use IMAQ WindDraw IMC reate INA Re adF ile IHAW indDr aw IMAQ WindClose Closes an image window Note that this VI also clears the space reserved in memory for the image window Window Number 0 15 Close All windows M error in no error Window Number 0 15 specifies the image window to close It is 132 132 specified by a number from O to 15 The default value is O Close All Windows N specifies if all the image windows are to be closed The default value FALSE No closes only the specified window Setting this value to TRUE closes all windows simultaneously EE error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts EE error out is a cl
142. ad tb 8 13 A RaO A UE casis E taies oca 8 13 R ectaitble Bis S106 resto as 8 13 Recta sle Ss mall Sidi idas 8 14 Rectancle Rao rain erra oia 8 14 A A o A A eee reer rece 8 14 Moments of Inertia Txx Dy ys AS 8 14 oo xe ra bet Rose ood E esa 8 15 COmpaciness Factor atinado 8 15 Heywood Circulanty Factor dias diia 8 15 IMAQ Vision for G Reference Manual X O National Instruments Corporation Contents Fly Grate Radisson oia UE 8 15 Weaddel Disk Dime ds 8 16 Definitions of Primary MeasurementS oooccccnccnnncnnnnneninininnno 8 16 Derived Measurement ede De eed tero dais 8 17 Deos iret T MT Ter 8 18 Diverse MIS asurements ai aSiSn 8 19 Chapter 9 VI Overview and Programming Concepts O 9 1 IMAONV BOR Visitadas 9 2 Image Type Con inen e E a a N G 9 2 MMX Compatibility of IMAQ Vision for G eese 9 3 About Intel MMX Technology ccccccccccnnncnnnnnonononcnnnonononnnnonnnnonnnnoss 9 3 Overview of MMX Features in IMAQ Vision for G 9 4 MMX ICO e ER 9 4 IMAO MLBEFOE C 111s E oc ae tu bad dicun e E ner dn e 9 4 Base and Advanced Versions of IMAQ Vision eee 9 6 VIs in the Base and Advanced Versions sss 9 6 VIs in the Advanced Version Only coccccnnncnnnnnnnnnnnnnnnnnnnnnnnonnnnnnnoss 9 7 Manipulation of Images by IMAQ Vision ssseseseeeeeeeeeee eene 9 0 IROCLAMOIC m 9 14 A O pete EE A toe A 9 14 Table of piel rta lada 9 15
143. advanced binary morphology functions 7 23 to 7 25 classification summary table 5 3 definition 5 1 nonlinear 5 26 LUT See lookup table transformations M skeleton function 7 27 Management VIs 10 1 to 10 7 IMAQ Create 10 1 to 10 3 IMAQ Create amp LockSpace 10 3 to 10 4 IMAQ Dispose 10 4 to 10 5 IMAQ Error 10 5 to 10 6 IMAQ Status 10 6 to 10 7 manual See documentation mask FFT filters overview 6 3 masking images with operators 4 1 max chord length parameter 8 10 max chord X and max chord Y coordinates 8 9 max intercept parameter 8 10 mean chord X parameter 8 10 mean chord Y parameter 8 10 mean intercept perpendicular parameter 8 10 median filter 5 27 metric technique automatic thresholding 7 6 min X Y and max X Y coordinates 8 9 IMAQ Vision for G Reference Manual 1 10 MMX compatibility of IMAQ Vision for G 9 3 to 9 4 Intel MMX technology 9 3 MMX icon 9 4 overview of MMX features 9 4 moments of inertia Iyy Ly y Ixy shape feature parameters 8 14 moments technique automatic thresholding 7 6 morphology analysis 7 1 to 7 38 advanced binary morphology functions 7 22 to 7 32 border function 7 22 circle function 7 30 to 7 31 convex function 7 31 to 7 32 Danielsson function 7 29 to 7 30 distance function 7 29 highpass filters 7 24 to 7 25 hole filling function 7 22 labeling function 7 23 lowpass filters 7 23 to 7 25 segmentation function 7 27 to 7 29 separation function 7 25
144. age Files and Data Structures Introductio to Dista oi epu topi tuor aree il rupi oo 1 1 Proper esoEa Dz iMac 1 1 masa Resol a dois 1 1 maso Denia disipa 1 2 Number or Planes ai ao ee ees ae 1 2 Image Lypes and Lora alias 1 3 Grace MS cn 1 3 Color TMA COS taaan cod ia 1 3 Complex Imag6S cos 1 3 A A 1 5 Processing Color Inidses a 1 5 Iniaec Pixel DESIBG atan 1 6 Rectangular Frani ouod ter n von n anite iaa 1 7 Hexagonal rimel 1 8 Chapter 2 Tools and Utilities Poo 2 1 BEW Gray Pale ia iaa 2 2 Temperature Pat e or load 2 3 Rainbow Paleta o 2 3 Gradient Pal oia 2 3 Dinar Dale le tad dao 2 4 Mas ESOS ET 24 PA A A Se Lea d 2 4 Linear FHStOSTAD is 2 5 National Instruments Corporation V IMAQ Vision for G Reference Manual Contents Cumuldtve istot tam eann a is 2 6 Interpretation a N Co e o PRU E 2 6 Histogram or Color TInmgge S a 2 6 EU stosram Scale asar nadaa 2 7 A Esos ucu diae iut b Den pete fuu itus i Ue DURUM pos Rap ERN 2 7 LON AGW CT 2 8 Chapter 3 Lookup Transformations About Lookup Table Transformations ss 2 nero ete a x eda Van 3 FE KAMION E 3 2 Predetined Lookup T3bl6s dioe E do e ei Dens di uuu Re cias 3 3 IS DP IA Pc 3 4 Example E E 3 4 Example ns aos e a a a r decade C oes 3 5 REVES lao 3 6 Example di ea 3 6 Logarithmic and Inverse Gamma CorrectiON oooooonnncncnnnnnnnnnnnnnnnnnnnnnnnnnnononononos 3 7 Exponential and Gamma Correction ooooooooooonanononnonnn
145. age must be binary A particle is considered to consist of pixels that do not contain a null 0 value The source image must have been created with a border size of at least 2 Connectivity 4 8 specifies the type of connectivity used by the algorithm for particle detection The connectivity mode directly National Instruments Corporation 19 11 IMAQ Vision for G Reference Manual Chapter 19 Analysis VIs determines whether an adjacent pixel belongs to the same particle or a different particle The default is 8 The following values are possible TRUE Connectivity 8 Default Particle detection is performed in connectivity mode 8 FALSE Connectivity 4 Particle detection is performed in connectivity mode 4 Ep error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts 20 Basic Reports is an array that returns a set of measurements from the detected particles This cluster contains the following elements Area pixels indicates the surface area of a particle in number of pixels Area calibrated indicates the surface area of a particle in user defined units E E Global Rectangle is a cluster that contains the coordinates of a bounding rectangle for a particle The following elements are included in the cluster x1Left indicates the coordinates for the upper left
146. age reference source Image Mask is an 8 bit image that specifies the region in the image to modify Only pixels in the original image that correspond to the equivalent pixel in the mask are replaced by the values in the lookup table provided that the value in the mask is not 0 All pixels not corresponding to this criteria keep their original value The complete image is modified if Image Mask is not connected Image Dst is the reference of the image destination If it is connected it must be the same type as the Image Src error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ Vision for G Reference Manual 17 8 O National Instruments Corporation Chapter 17 Filter Vis Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts zmn Note See the Nonlinear Filters section of Chapter 5 Spatial Filtering for more information about the Nth order filter An
147. age type is encoded in 32 bits 8 bits for the alpha channel not used in IMAQ Vision and 8 bits each for the red green and blue planes The most common operation applied to this image type is the extraction of the color light saturation or hue component from the image The final result is an 8 bit image that can be processed as a classical monochrome image National Instruments Corporation 9 1 IMAQ Vision for G Reference Manual Chapter 9 VI Overview and Programming Concepts The image types mentioned above are all supported by IMAQ Vision However certain operations on specific image types do not have any practical sense for example applying the logic operator AND to a complex image Other image types particularly images encoded in files as 1 bit 2 bit or 4 bit images are not directly supported by IMAQ Vision In these cases IMAQ Vision automatically transforms the image into an 8 bit image minimum for IMAQ Vision when opening the image file This transformation is transparent and has no effect on the use of these image types in IMAQ Vision In IMAQ Vision the image type is defined at the creation of the image object by the VI IMAQ Create The default image type is 8 bit a single image plane encoded in 8 bits per pixel the most prevalent image type for the scientific and industrial fields IMAQ Vision however is designed to acquire and process images encoded in 10 bit 12 bit or 16 bit as well as in floating point and t
148. age x 1 Image x 2 0 1 0 0 1 0 5 1 6 1 0 1 0 0 1 0 Image x 1 Image x 2 1 l 1 l 9 1 10 1 1 l 1 l Image x 1 2 1 2 13 2 2 l 5 16 O National Instruments Corporation Chapter 5 Spatial Filtering Table 5 6 Laplacian 5 x 5 Contour 24 Image x 1 1 1 1 l 1 1 1 l 1 1 1 l 1 1 1 l 1 24 1 l 1 25 1 1 1 1 1 l 1 1 1 l 1 1 1 1 1 1 1 1 Table 5 7 Laplacian 7 x 7 Contour 48 Image x 1 1 1 1 1 1 l 1 1 1 1 1 l 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 l 1 1 48 1 1 l 1 1 49 1 1 l 1 1 1 1 1 l 1 1 1 1 1 l 1 1 1 1 1 l 1 1 1 1 1 l 1 1 1 1 1 l 1 1 1 1 1 1 Smoothing Filter A smoothing filter attenuates the variations of light intensity in the neighborhood of a pixel It smoothes the overall shape of objects blurs edges and removes details Example This example uses the following source image En il National Instruments Corporation 5 17 IMAQ Vision for G Reference Manual Chapter 5 Spatial Filtering A smoothing filter produces the following image Kernel Definition A smoothing convolution filter is an averaging filter and its kernel uses the following model Cy Sa Qa Aa a 5 where a b c and d are integers and x 0 or 1 Because all the coefficients in a smoothing kernel are posit
149. aining a zoom factor of 1 by definition has a single O National Instruments Corporation 12 21 IMAQ Vision for G Reference Manual Chapter 12 Display Center point of 127 127 An erroneously entered figure is corrected automatically making the output value different than the input value Get Set Status Set specifies 1f the user wants to know the present status or modify the Zoom Factor and Center Point The default is TRUE Set ER error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAO VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Zoom Factor returns the present zoom factor error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAO VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Center Point returns the present coordinates of the Center Point IMAQ WindGrid Obtains or modifies the status of the grid The grid can be used to help trace a region of interest accurately 5 3 amp t Set Status Set eror in na error Grid Size is a structure containing two elements that encode the size of the horizontal and vertical steps for the grid The cursor is moved by steps as defined in this VI when tracing a region of interest The default value is 1 1 Get Set Status Set specifies wheth
150. alue k is where k is the gray level value n 1s the number of pixels in an image with a gray level value equal to k and Y n n is the total number of pixels in an image IMAQ Vision for G Reference Manual 2 4 National Instruments Corporation Chapter 2 Tools and Utilities The following histogram plot reveals which gray levels occur frequently and which occur rarely K Gray scale range Two types of histograms can be plotted per image the linear and cumulative histograms In both cases the horizontal axis represents the gray level range from 0 to 255 For a gray level value k the vertical axis of the linear histogram indicates the number of pixels nj set to the value k and the vertical axis of the cumulative histogram indicates the percentage of pixels set to a value less than or equal to k Linear Histogram The density function is Hy ineark ny where H k 18 the number of pixels equal to k The probability function is Prinear k n fn where Pi inear K is the probability that a pixel is equal to k y rE Figure 2 1 Linear Vertical Scale National Instruments Corporation 2 5 IMAQ Vision for G Reference Manual Chapter 2 Tools and Utilities Cumulative Histogram The distribution function is k H cuu k 7 n 0 where Hc Kk is the number of pixels that are less than or equal to k The probability function is k n P Cumul k 3 0 where P k 18 the probability that a pix
151. anes must have the same dimension as the source image 5 Color Made Image Sre RGB Image Ost Out RGB Image Dist HGB Red or Hue Plane f error out Green or Sat Plane gt T Blue ar Light oral Plane eror in no error O National Instruments Corporation 22 5 IMAQ Vision for G Reference Manual Chapter 22 Color Vis E zmn zmn zmn a a Color Mode defines the image color format to use for the operation The default is 0 which specifies RGB O Default RGB 1 HSL 2 HSV Image Src RGB is the reference to an image that has its three color planes replaced It must be an RGB chunky image This image is not necessary 1f the destination image and the three color planes are connected Image Dst RGB is the reference to the destination image It must be an RGB chunky image Red or Hue Plane is the reference to the first color plane This plane can be either the red plane Color Mode 0 or the hue plane Color Mode 1 or 2 It must be an 8 bit image The color plane is not replaced if the input is not connected Green or Sat Plane is the reference to the second color plane This plane can be either the green plane Color Mode 0 or the saturation plane Color Mode 1 or 2 It must be an 8 bit image The color plane is not replaced if the input is not connected Blue or Light or Val Plane is the reference to the third color plane This plane can be either the blue plane Color Mode 0 the
152. at retouched with morphological manipulations and finally multiplied by 255 The following gray level source image is used for this example The operation source image AND mask image has the effect of restoring the original intensity of the object regions in the mask O National Instruments Corporation 4 5 IMAQ Vision for G Reference Manual Chapter 4 Operators The operation source image OR mask image has the effect of restoring the original intensity of the background region in the mask Example 2 An image revealing two groups of objects that require different processing results in two binary images Multiplying each binary image by a constant and applying an OR operation produces an image that shows their union as illustrated in the following series of graphics The following image illustrates Object Group 1 x 128 The following image illustrates Object Group 2 x 255 IMAQ Vision for G Reference Manual 4 6 National Instruments Corporation Chapter 4 Operators Object Group 1 OR Object Group 2 produces a union as shown in the following image National Instruments Corporation 4 7 IMAQ Vision for G Reference Manual Chapter Spatial Filtering This chapter provides an overview of the spatial filters including linear and nonlinear filters used in IMAQ Vision Concept and Mathematics Spatial filters alter pixel values with respect to variations in light intensity in their neighborho
153. at are colored when painting Normally you use a brush in which the only pixel involved in drawing is the one under the cursor However with this VI you can define any shape 5 Color LLIT Get Get 7 Set DUE i Brush shape in Brush shape aut Brush element size n 2a Brush element size out Brush Parameters in oS ees Bes Brush Parameters out Brush active False T Brush active out eror in na error E error out g Note Do not use this VI in zoom mode Color LUT is an array of clusters with the following fields Pixvalue R G and B This array of clusters changes the value of a pixel in the image making a multicolored brush possible The new pixel value is O National Instruments Corporation 12 43 IMAQ Vision for G Reference Manual Chapter 12 Display given by Pixvalue On the display window the appearance of this pixel changes to the color specified by R G and B This array has 256 clusters each containing the following fields Pixvalue This field indicates the new pixel value Pixels affected include those in the last image connected to the window specified by the parameter Brush Window When touched by the brush each pixel that has a value equal to the array entry is changed For example if entry 7 of the Color LUT array parameter specifies a Pixvalue of 127 every pixel with a value of 7 that the brush touches is changed to 127 R G and B These three parameters specify the color on the disp
154. at describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Divider is the normalization factor associated with the retrieved kernel IMAQ Vision for G Reference Manual 17 4 O National Instruments Corporation Chapter 17 Filter Vis Kernel is the resulting matrix It corresponds to a kernel encoded by a code specified from the inputs Kernel Family Kernel Size and Kernel Number or a from a code directly passed through the input Kernel Code This output can be connected directly to the input Kernel in IMAQ Convolute SGL Kernel code indicates the code that was used to retrieve the kernel error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Example For the kernel code 1300 the kernel family is gradient the kernel size is 3 x 3 and the kernel number nn is 00 The matrix is 0 I 0 I O0 1 IMAQ BuildKernel Constructs a convolution matrix by converting a string This string can represent either integers or floating point values Kernel String kermel erar in na error ak error out Kernel String is a string listing the coefficients forming the matrix error in no error is a cluster that describes the error status before thi
155. ate In most cases it is recommended that you use this function instead of IMAQ Distance La La Image 5rc Image Dist Out Image List error in na errar a error aut Image Src is the reference to the source input image 2 0 p Image Dst is the reference to the destination image If it is connected it must be the same type as the Image Src ER error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src zn error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ Vision for G Reference Manual 18 8 O National Instruments Corporation Chapter 18 Morphology VIS IMAQ RemoveParticle Eliminates or keeps particles resistant to a specified number of 3 x 3 erosions The particles that are kept are exactly the same as those found in the original source image The source image must be an 8 bit binary image This function requires the creation of a temporary memo
156. ational Instruments Corporation 17 1 IMAQ Vision for G Reference Manual Chapter 17 Filter Vis IMAQ Convolute Filters an image using a linear filter The calculations are performed either with integers or floating points depending on the image type and the contents of the kernel BITIG m o SGL zmn HAJA Divider kernel sum Image 5rc Image Dist Out Image Mask Image Dist Kernel de error aut error in no error Divider kernel sum is a normalization factor that can be applied to the sum of the obtained products Under normal conditions the divider should not be connected If connected and not equal to 0 the elements internal to the matrix are summed and then divided by this normalization factor Image Src is the image reference source It must be an 8 bit or RGB image Image Mask is an 8 bit image that specifies the region in the image to modify Only pixels in the original image that correspond to the equivalent pixel in the mask are replaced by the values in the lookup table provided that the value in the mask is not 0 All pixels not corresponding to this criteria keep their original value The complete image is modified if Image Mask is not connected Image Dst is the reference of the image destination If it is connected it must be the same type as the Image Src Kernel is a 2D array that contains the convolution matrix to be applied to the image The size of the convolution is fixed by
157. ators Power X and Power 1 X Ep Image Src is the reference to the source input image Ep Image Mask is an 8 bit image that specifies the region in the image to modify Only pixels in the original image that correspond to the equivalent pixel in the mask are replaced by the values in the lookup table provided that the value in the mask is not 0 All pixels not corresponding to this criteria keep their original value The complete image is modified if Image Mask is not connected Image Dst is the reference to the destination image If it is connected it must be the same type as the Image Src Operator specifies the remapping procedure used The horizontal axis represents the pixel values before processing between Minimum and Maximum and the vertical axis represents the pixel values between Dynamic Minimum and Dynamic Maximum after processing The default is 0 which specifies linear remapping O National Instruments Corporation 16 9 IMAQ Vision for G Reference Manual Chapter 16 Processing Vls O Linear Linear remapping Log A logarithmic remapping operation that gives extended contrast for small pixel values and less contrast for large pixel values 2 Exp An exponential remapping operation that gives extended contrast for large pixel values and less contrast for small pixel values 3 Square Similar to Exponential but with a more gradual effect Square Root Similar to Logarithmic but with a more gradual effect 5 Power X
158. atti e m eid petet oth nia quls ta ne Posuere aae 19 11 IMAQ CoinplexParticle its etre p a eed 19 13 IMAO Complex NIC AS ULE aran 19 15 IMAQ Choose Measurements ia da 19 20 IMA DN I iio e E 20 1 INAO Rotten oa 20 4 ITAM io 20 5 IMAO Stet aaa ol 20 7 MAOT dot 21 2 IMAO NES ERE cti cia 21 3 IMAQ ComplexFlipFrequency essen 21 4 O National Instruments Corporation XV IMAQ Vision for G Reference Manual Contents IMAQ ComplexConjugate ooccccccncnnnnnnnnnnnnnnnnnnnnnnnononononannnanannnnnnnnnnnss 21 5 IMAO Complex ten ale 21 6 IMAO Complex MUNCI dai 21 7 IMA C Omple X AGO italia darla 21 8 IMAGO Complex SUD traia DA 21 9 IMAO Complex Multiply asias ia as 21 11 IMAQ Complex Divid ide 21 12 IMAQ Complex mageToArray eee 21 14 IMAQ ArrayToComplexImage eene 21 15 IMAQ ComplexPlaneToArray coccccccoooocoonoonnnononoccnnnnnnnnnnannon nono nnnnnnnnnos 21 16 IMAQ Array ToComplexPlane ici tna ado eh eoo h debeas 21 17 IMAQ ComplexPlaneTolmage essere 21 18 IMAGO ImaseToCotniplexPlane 4 tee e eee tti tue deca oceans 21 19 Chapter 22 Color Vis Color Planes Inversiom Plans asec aise ADA SA 22 2 IMAO ExtraciColorelanes aaa 22 4 IMAO ReplaceColorP lane usada dicta donde 22 5 IMAO ColorHisto sta oso erre i 22 7 IMAQ ColorHistograph eeseseeeeeeeeerrnn nme 22 0 IMAO Color Tire Sil oi 22 11 IMAQ ColorUserLookup eee 22
159. ax X min X It is also equal to the horizontal side of the smallest horizontal rectangle containing the object or the difference maxX minX O National Instruments Corporation 8 IMAQ Vision for G Reference Manual Chapter 8 Quantitative Analysis Height Distance between the upper most and lower most pixels in an object or max Y min Y It is also equal to the vertical side of the smallest horizontal rectangle containing the object or the difference maxY minY Coordinates Coordinates are expressed with respect to an origin 0 0 located at the upper left corner of the image This section describes the following coordinate parameters e Center of Mass X Y Coordinates of the center of gravity e Min X Min Y Upper left corner of the smallest horizontal rectangle containing the object e Max X Max Y Lower right corner of the smallest horizontal rectangle containing the object e Max chord X and Y Left most point along the longest horizontal chord Center of Mass X and Center of Mass Y Coordinates of the center of gravity of an object The center of gravity of an object composed of N pixels P is defined as the point G such that i N OG 1 OG N OP and N X 1 NEG center of mass Xg N l Xg gives the average location of the central points of horizontal segments in an object EN Center of Mass Y P Y I Y gives the average location of the central points of
160. ay level images Four representations of a complex image can be given the real part imaginary part magnitude and phase The following table shows how many bytes are used per pixel in gray level color and complex images For an identical spatial resolution a color image occupies four times the memory space used by an 8 bit National Instruments Corporation 1 3 IMAQ Vision for G Reference Manual Chapter 1 Algorithms and Principles of Image Files and Data Structures Image Type 8 bit Unsigned Integer Gray Level 1 byte or 8 bit 16 bit Signed Integer Gray Level 2 bytes or 16 bit 32 bit Floating Point Gray Level 4 bytes or 32 bit Color 3 bytes or 24 bit Complex 8 bytes or 64 bit gray level image and a complex image occupies eight times this amount Number of Bytes Per Pixel Data 8 bit for the gray level intensity 16 bit for the gray level intensity 32 bit floating for the gray level intensity 8 bit for the alpha 8 bit for the value not used red intensity 32 bit floating for the real part IMAQ Vision for G Reference Manual 1 4 8 bit for the 8 bit for the green intensity blue intensity 32 bit floating for the imaginary part O National Instruments Corporation Chapter 1 Algorithms and Principles of Image Files and Data Structures Image Files An image file is composed of a header followed by pixel values Depending on the file format the header contain
161. bes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Dst is the handle of the 8 bit 16 bit or 32 bit floating point E Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src O National Instruments Corporation 21 3 IMAQ Vision for G Reference Manual Chapter 21 Complex VIs ET error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts n Note This VI uses a buffer equal to the size of the complex image An 8 bit image with a resolution of 256 x 256 pixels uses 64 KB of memory The FFT associated with this image requires eight times the memory or 64 x 8 512KB The calculation of the inverse FFT also requires a temporary buffer of 512 KB Therefore the total memory necessary for this operation is 1080 KB IMAQ ComplexFlipFrequency Transposes the complex components of an FFT image of a complex image The high and low frequency components of an FFT image are inverted to produce a central symmetric representation of the spatial frequencies 5 PP
162. ble by IMAQ Multi Threshold Threshold Data IMAQ Vision for G Reference Manual 16 6 National Instruments Corporation IMAQ UserLookup Chapter 16 Processing VIs Performs a user chosen lookup table transformation by remapping the pixel values in an image La 2 Lookup Table Image Src T Image Dist Out Image Mask Image Dist rr error in no error E error out Lookup Table is a color replacement table This array can contain 256 elements 8 bit or 65536 elements 16 bit depending on the type of image Individual pixels within the image are not modified in cases in which the lookup table is missing a corresponding value Image Src is the reference to the source input image Image Mask is an 8 bit image that specifies the region in the image to modify Only pixels in the original image that correspond to the equivalent pixel in the mask are replaced by the values in the lookup table provided that the value in the mask is not 0 All pixels not corresponding to this criteria keep their original value The complete image is modified if Image Mask is not connected Image Dst is the reference to the destination image If it is connected it must be the same type as the Image Src error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAO VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Dst Out is
163. bors used E new Fs value to calculate the new Pe value The structuring element is a binary mask composed of 1 and O values It is used to determine which neighbors of a pixel contribute to its new value A structuring element can be defined in the case of a rectangular or hexagonal pixel frame as shown in the following examples O National Instruments Corporation IMAQ Vision for G Reference Manual Chapter 7 Morphology Analysis The following graphic illustrates a morphological transformation using a structuring element This example uses a 3 x 3 image which has a rectangular frame gt P o T po P Das Ds P7 Rectangular Frame Neighborhood 3 x 3 The next graphic illustrates a morphological transformation using a structuring element for an image that has a hexagonal frame This example uses a 5 x 3 image gt P o T Po p Pas Po Hexagonal Frame Neighborhood 5 x 3 The default configuration of the structuring element is a 3 x 3 matrix with each coefficient set to 1 1 1 1 1 1 1 1 1 1 IMAQ Vision for G Reference Manual 7 8 National Instruments Corporation Chapter 7 Morphology Analysis Primary Binary Morphology Functions The primary morphology functions apply to binary images in which objects have been set to 1 and the background is equal to 0 They include three fundamental binary processing functions erosion dilation and hit miss The other transformations derive from combinations o
164. ce Manual Index IMAQ ColorValuetoInteger 22 26 to 22 27 IMAQ ExtractColorPlanes 22 4 to 22 5 IMAQ GetColorPixelLine 22 18 to 22 19 IMAQ GetColorPixel Value 22 16 to 22 17 IMAQ IntegerToColorValue 22 24 to 22 26 IMAQ ReplaceColorPlane 22 5 to 22 6 IMAQ RGBTocolor 22 23 to 22 24 IMAQ SetColorPixelLine 22 20 to 22 21 IMAQ SetColorPixel Value 22 17 to 22 18 overview 22 1 to 22 2 Complex 21 1 to 21 20 IMAQ ArrayToComplexImage 21 15 to 21 16 IMAQ ArrayToComplexPlane 21 17 to 21 18 IMAQ ComplexAdd 21 8 to 21 9 IMAQ ComplexAttenuate 21 6 IMAQ ComplexConjugate 21 5 IMAQ ComplexDivide 21 12 to 21 14 IMAQ ComplexFlipFrequency 21 4 to 21 5 IMAQ ComplexImageToArray 21 14 to 21 15 IMAQ ComplexMultiply 21 11 to 21 12 IMAQ ComplexPlaneToArray 21 16 to 21 17 IMAQ ComplexPlaneTolImage 21 18 to 21 19 IMAQ ComplexSubtract 21 9 to 21 11 IMAQ ComplexTruncate 21 7 to 21 8 IMAQ FFT 21 2 to 21 3 IMAQ Vision for G Reference Manual 1 16 IMAQ ImageToComplexPlane 21 19 to 21 20 IMAQ InverseFFT 21 3 to 21 4 overview 21 1 to 21 2 Conversion 14 1 to 14 6 IMAQ Cast 14 2 to 14 3 IMAQ Convert 14 1 to 14 2 IMAQ ConvertByLookup 14 4 to 14 5 IMAQ Shiftl6to8 14 5 to 14 6 Display Basics 12 2 to 12 10 IMAQ GetPalette 12 8 to 12 9 IMAQ PaletteTolerance Macintosh Power Macintosh only 12 9 to 12 10 IMAQ WindClose 12 4 to 12 5 IMAQ WindDraw 12 2 to 12 4 IMAQ WindMove 12 6 IMAQ Win
165. ce Manual 5 24 O National Instruments Corporation Chapter 5 Spatial Filtering Nonlinear Gradient Filter The nonlinear gradient filter outlines contours where an intensity variation occurs along the vertical axis The new value of a pixel becomes the maximum absolute value between its deviation from the upper neighbor and the deviation of its two left neighbors P y max IPu Pa gl IP is Pai pl i j Fi 1 d Roberts Filter The Roberts filter outlines the contours that highlight pixels where an intensity variation occurs along the diagonal axes The new value of a pixel becomes the maximum absolute value between the deviation of its upper left neighbor and the deviation of its two other neighbors P 7 max IPa jj Pa jl Pa o Pai 91 i j ma om Differentiation Filter The differentiation filter produces continuous contours by highlighting each pixel where an intensity variation occurs between itself and its three upper left neighbors The new value of a pixel becomes the absolute value of its maximum deviation from its upper left neighbors Poy max lPG_ 1 Po pl Pa 1 9 Pau Pao Po gll O National Instruments Corporation 5 25 IMAQ Vision for G Reference Manual Chapter 5 Spatial Filtering Sigma Filter The Sigma filter is a highpass filter It outlines contours and details by setting pixels to the mean value found in their neighborhood if their deviation from this value is not
166. closing F I 1s the image obtained after applying the function F to the image and GF 1 is the image obtained after applying the function F to the image followed by the function G to the image Auto Median Function The auto median function uses dual combinations of openings and closings It generates simpler objects that have fewer details If I is the source image the auto median function extracts the intersection between the proper opening and proper closing of the source image auto median T AND OCO I COC I or auto median T AND DEEDDE I EDDEED O National Instruments Corporation 21 IMAQ Vision for G Reference Manual Chapter 7 Morphology Analysis where I is the source image E 1s an erosion Dis a dilation O 1s an opening C is a closing F I is the image obtained after applying the function F to the image and GF I is the image obtained after applying the function F to the image I followed by the function G to the image 7 Advanced Binary Morphology Functions The advanced morphology functions are conditional combinations of fundamental transformations such as the binary erosion and dilation They apply to binary images in which a threshold of 1 has been applied to objects and the background is equal to 0 The advanced binary morphology functions include the border hole filling labeling lowpass filters highpass filters separation skeleton segmentation distance Danielsson ci
167. complex image and a complex constant 5 PP Constant Image Src A P Image List Out Image List Image Src B ri eror in na errar E error aut Constant is the complex constant added to the input Image Src A for image constant operations The default is 0 E Image Src A is the handle of the first source image and must be a complex image a Image Dst is the handle of the complex image that contains the resulting FFT image This input can accept only a complex image a Image Src B is the handle of the second source image This input can accept an 8 bit 16 bit 32 bit floating point or complex image If the image is not a complex image then the imaginary part of the Image Dst is equal to Image Src A a error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts a Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src A a Ep error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAO VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ
168. corner of the rectangle y1Top indicates the coordinates for the top left corner of the rectangle x2Right indicates the coordinates for the lower right corner of the rectangle y2Bottom indicates the coordinates for the bottom right corner of the rectangle Number of Particles returns the number of pixels detected in a particle IMAQ Vision for G Reference Manual 19 12 National Instruments Corporation Chapter 19 Analysis VIs Eu error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ ComplexParticle Detects and measures particles This VI returns a set of measurements made from particles in a binary image PP Lomplex Reports Number of Particles error in na error E error out Ep Image is the input source image used for calculating the matrices The image must be binary A particle is considered to consist of pixels that do not contain a null 0 value The source image must have been created with a border size of at least 2 Connectivity 4 8 specifies the type of connectivity used by the algorithm for particle detection The connectivity mode directly determines whether an adjacent pixel belongs to the same particle or a different particle The default is 8 The following values are possible TRUE Connectivity 8 Default Particle detection is performed
169. ction corrected in x projection corrected in y inertia matrix coefficient in xx inertia matrix coefficient in yy inertia matrix coefficient in xy mean length of horizontal segments mean length of vertical segments length of longest segment mean length of the chords in an object perpendicular to its max intercept direction of the longest segment total length of the axis of the ellipse having the same area as the particle and a major axis equal to half the max intercept total length of major axis having the same area and perimeter as the particle in user units total length of minor axis having the same area and perimeter as the particle in user units fraction of major axis to minor axis length of the large side of a rectangle having the same area and perimeter as the particle in user units length of the small side of a rectangle having the same area and perimeter as the particle in user units O National Instruments Corporation Chapter 19 Analysis VIs 42 Ratio of equivalent ratio of rectangle big side to rectangle rectangle sides small side 43 Elongation factor max intercept mean perpendicular intercept 44 Compactness factor particle area breadth x width 45 Heywood circularity particle perimeter perimeter of circle factor having same area as particle 46 Type Factor a complex factor relating the surface area to the moment of inertia 47 Hydraulic Radius particle area particle perimeter 48 Waddel di
170. d IMAQ AutoBThreshold and so forth Binary morphology is divided into two groups in IMAQ Vision The primary operations are all performed by a single VI IMAQ Morphology This VI performs erosions dilations openings closings and contour extractions The advanced operations are performed by multiple VIs each responsible for a single type of operation These types of operations include the separation of particles removing either small or large particles filling holes in particles removing particles that touch the boundary of the image border and creating the skeleton of particles Morphological transformations are performed using an object known as a structuring element This structuring element allows you to control the effect of the functions on the shape and the boundary of object In IMAQ Vision the structuring element is a 2D array that specifies by its size and contents which pixels are to be processed and which pixels are to be left unchanged A structuring element must have a center pixel and therefore must contain an odd sized axis The contents of the structuring element are also considered to be binary 0 or not 0 The most often used structuring element is 3 x 3 and contains only values of 1 This is usually the default model for binary and gray level National Instruments Corporation 18 1 IMAQ Vision for G Reference Manual Chapter 18 Morphology VIs morphological transformations You need at least a basic understand
171. d green blue gives a stronger contrast but changes the hue and saturation of the color image The default is FALSE Ep Image Src RGB is the reference to the source image It must be an RGB chunky image Ep Image Dst RGB is the reference to the destination image If connected it must be an RGB chunky image Ep error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Dst Out RGB is the reference to the output RGB image that is obtained after equalization of the source color image error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts O National Instruments Corporation 22 15 IMAQ Vision for G Reference Manual Chapter 22 Color Vis IMAQ GetColorPixelValue Reads the pixel values from a color image This VI returns the pixel value as an unsigned 32 bit integer indicator This indicator can be converted into a cluster containing three elements possessing either R G B H S L or H S V using the VI IMAQ IntegerToColorV lue 5 Image amp Fisel Value U32 amp Coordinate Y Coordinate eror in na errar error out Image must be an RGB chunky image Y Coordinate is the vertical po
172. d directly by IMAQ Create Each image must be given a unique name that is a generic structure representing all aspects contained and associated with an image An image structure can contain different data or information The image structure is dependent on the image processing and type of functions that you need to perform This image structure which enters each VI is a specific data type a cluster in the G programming language resulting directly or indirectly form the execution of IMAQ Create In order to execute its operation the VI must have information about which image is processed and which image the original or another should receive the results This image structure provides this information when entering a VI O National Instruments Corporation 9 9 IMAQ Vision for G Reference Manual Chapter 9 VI Overview and Programming Concepts To create an image use the procedure illustrated in the following graphic Mew Image nn Greate An image is created and referenced by the name Image Src This name is displayed in the VI front panel of all VIs that receive data from this image structure The cluster New Image resulting from the output must be connected with the Image type input This connection identifies the image to be processed Multiple images can be created by executing IMAQ Create the number of times corresponding to the number of images desired Each image created requires a unique name The number or required images ca
173. d programming languages such as C via a Code Interface Node Le te R 5 Image Image Pisels U8 Optional Rectangle Image Pisels 116 l mi Image Pixels SGL error in no error Y error out zu Image is the reference to the source input image 13 2 Optional Rectangle defines an array four elements containing the coordinates Left Top Right Bottom of the region to extract The operation is applied to the entire image if the input is empty or not connected Ep error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Pixels US returns the extracted pixel values into a 2D array line column This output is used only for an 8 bit image r3 E LJ Image Pixels 116 returns the extracted pixel values into a 2D array 116 e line column This output is used only for a 16 bit image IMAQ Vision for G Reference Manual 13 22 O National Instruments Corporation Chapter 13 Tool Vls sci Image Pixels SGL returns the extracted pixel values into a 2D array line column This output is used only for a 32 bit floating point image Ep error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAO VI Error Clusters 1n Chapter 9 VI Overview and Programmi
174. d vertically and its point of intersection with the lookup curve then is plotted horizontally to give an output value The Exponential Square and Power Y functions expand intervals containing high gray level values while compressing intervals containing low gray level values The higher the gamma coefficient Y the stronger the intensity correction The Exponential correction has a stronger effect than the Power Y function O National Instruments Corporation 3 9 IMAQ Vision for G Reference Manual Chapter 3 Lookup Transformations The following series of illustrations presents the linear and cumulative histograms of an image after various LUT transformations The more the histogram 1s compressed on the left the darker the image The following graphic shows the original image and histograms A Power Y transformation where Y 1 5 produces the following image and histograms A Square or Power Y transformation where Y 2 produces the following image and histograms IMAQ Vision for G Reference Manual 3 10 O National Instruments Corporation Chapter 3 Lookup Transformations An Exponential transformation produces the following image and histograms National Instruments Corporation 3 11 IMAQ Vision for G Reference Manual Chapter Operators This chapter describes the arithmetic and logic operators used in IMAQ Vision Concepts and Mathematics Arithmetic and logic operators mask combine and com
175. dShow 12 5 IMAQ WindSize 12 7 to 12 8 Display Special 12 34 to 12 46 IMAQ GetLastKey 12 46 IMAQ GetScreenSize 12 37 to 12 38 IMAQ GetUserPen 12 42 to 12 43 IMAQ SetupBrush 12 43 to 12 45 IMAQ SetUserPen 12 40 to 12 42 IMAQ WindDrawRect 12 37 IMAQ WindGetMouse 12 35 to 12 36 IMAQ WindRoiColor 12 36 IMAQ WindSetup 12 34 to 12 35 IMAQ WindXYZoom 12 38 to 12 40 Display Tools 12 10 to 12 23 IMAQ WindGrid 12 22 to 12 23 IMAQ WindLastEvent 12 18 to 12 21 IMAQ WindToolsClose 12 18 IMAQ WindToolsMove 12 17 IMAQ WindToolsSelect 12 14 to 12 16 O National Instruments Corporation IMAQ WindToolsSetup 12 12 to 12 14 IMAQ WindToolsShow 12 16 to 12 17 IMAQ WindZoom 12 21 to 12 22 Display User 12 29 to 12 34 IMAQ WindUserClose 12 33 IMAQ WindUserEvent 12 33 to 12 34 IMAQ WindUserMove 12 32 IMAQ WindUserSetup 12 29 to 12 30 IMAQ WindUserShow 12 31 to 12 32 IMAQ WindUserStatus 12 30 to 12 31 error clusters 9 4 to 9 5 External Library Support 23 1 to 23 11 IMAQ CharPtrToString 23 6 to 23 7 IMAQ GetImagePixelPtr 23 1 to 23 5 IMAQ ImageBorderOperation 23 10 to 23 11 IMAQ ImageBorderSize 23 11 IMAQ Interlace 23 9 to 23 10 IMAQ MemPeek 23 7 to 23 8 File VIs 11 1 to 11 6 IMAQ GetFileInfo 11 4 to 11 5 IMAQ ReadHile 11 1 to 11 4 IMAQ WriteFile 11 5 to 11 6 Filter 17 1 to 17 12 IMAQ BuildKernel 17 5 to 17 6 IMAQ Convolute 17 2 to 17 3 IMAQ Correlate 17 11 to 17 12 IMAQ EdgeDetection 17 6 to
176. djacent pixels in the specified Unit Y Step specifies the vertical distance separating two adjacent pixels in the specified Unit error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ SetCalibration Sets the calibration scale for an image Le he F c Es PP Unit Image A Step Y 5tep erar in na error Unit is the measuring unit associated with the image It can have the following values 0 Undefined Angstrom 2 micrometer 3 millimeter 4 centimeter IMAQ Vision for G Reference Manual 13 12 National Instruments Corporation Chapter 13 Tool VIs 5 meter 6 kilometer 7 microinch 8 inch 9 feet 10 nautical miles 11 standard miles Image is the reference to the source input image in the specified Unit Y Step specifies the vertical distance separating two adjacent pixels in the specified Unit X Step specifies the horizontal distance separating two adjacent pixels error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts zu Image Out is the reference to the destination output image zu error out is a cluster that describes the error status after this VI
177. e This example uses the following source image The circle function produces the following processed image Convex Function The convex function is useful for closing particles so that measurements can be made on the particle even though the contour of the object is discontinuous This command is usually needed in cases in which the sample object is cut because of the acquisition process The convex function calculates a convex envelope around the perimeter of each object effectively closing the object The image to be treated must be both binary and labeled O National Instruments Corporation 31 IMAQ Vision for G Reference Manual Chapter 7 Morphology Analysis Example This example uses the following original binary labeled image The convex function produces the following image Gray Level Morphology The gray level morphology functions apply to gray level images You can use these functions to alter the shape of regions by expanding bright areas at the expense of dark areas and vice versa These functions smooth gradually varying patterns and increase the contrast in boundary areas The gray level morphology functions include the erosion dilation opening closing proper opening proper closing and auto median functions These functions derive from the combination of gray level erosions and dilations that use the structuring element IMAQ Vision for G Reference Manual 32 National Instruments Corporation
178. e and Image Src B is the light background 2 te R La 2 Constant Image Sre A Image Dist Out Image Dist Image Src B ri erar in na errar x error aut Constant Each pixel in Image Src A is multiplied by the Constant value prior to being divided by the equivalent pixel in Image Src B The default is 255 which corresponds to the maximum value for a pixel encoded in an 8 bit image El Image Src A is the reference to the source input image A Image Dst is the reference to the destination image If it is connected it must be the same type as the Image Src A Image Src B is the reference to the source input image B error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts J H HE Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src A T error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts O National Instruments Corporation 15 7 IMAQ Vision for G Reference Manual Chapter 15 Operator VIs
179. e 5 8 MIO OLMIS 3 dd IAN 5 19 Table 5 9 A D X Oeo iueci i Ic dave eects Merit e t ed lev DEN UID S Noe PUR dA od 5 20 Table MODOS TX Tuta din 5 20 Table GAUSS d s 5 21 Tabele GAUSS O aa aisla 5 22 Table Sloe GAUSS RT cnc x ts ene aie ANEN 5 22 National Instruments Corporation xvii IMAQ Vision for G Reference Manual The IMAO Vision for G Reference Manual describes the features functions and operation of IMAQ Vision for G To use this manual effectively you should be familiar with image processing your image capture hardware and LabVIEW or Bridge VIEW Organization of This Manual The IMAO Vision for G Reference Manual is organized as follows e Chapter 1 Algorithms and Principles of Image Files and Data Structures contains an overview of image files and data structures e Chapter 2 Tools and Utilities describes the tools and utilities used in IMAQ Vision e Chapter 3 Lookup Transformations provides an overview of lookup table transformations e Chapter 4 Operators describes the arithmetic and logic operators used in IMAQ Vision e Chapter 5 Spatial Filtering provides an overview of the spatial filters including linear and nonlinear filters used in IMAQ Vision e Chapter 6 Frequency Filtering describes the frequency filters used in IMAQ Vision Chapter 7 Morphology Analysis provides an overview of morphology image analysis e Chapter 8 Quantitative Analysis provides an overview of quan
180. e 5rc Image Dist Out Image Det Coordinates Shape to draw q E error aut error in no error Draw Mode defines how to draw the object and has the following E choices O Frame Default Specifies the use of Pixel Color in tracing the contour Paint Specifies the use of Pixel Color in tracing the contour and the interior of the shape 2 Invert Frame Specifies the use of the inverse of the pixel values when drawing the contour 3 Invert Paint Specifies the use of the inverse of the pixel values when drawing the contour and the interior of the shape Pixel Color is the pixel value used for tracing the design This value is not used when in the mode Invert Frame or Invert Paint The default is O Image Src is the reference to the source input image Image Dst is the reference to the destination image If it is connected it must be the same type as the Image Src iH B 132 Coordinates is an array of four elements A line is specified by the two points forming it Rectangles and ovals are specified by their bounding rectangle with the format Left Top Right Bottom In these cases the tracing of a rectangle or oval stops at the column Right 1 and at the row Bottom 1 The values by default are 0 0 SizeX SizeY IMAQ Vision for G Reference Manual 13 26 O National Instruments Corporation Chapter 13 Tool Vls where SizeX SizeY is the resolution of the image The default is used if the inp
181. e B error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src A error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ Vision for G Reference Manual 15 4 National Instruments Corporation Chapter 15 Operator VIs An operation between an image and a constant occurs when the input Image Src B is not connected The two possibilities are distinguished in the following equations Dst x y 2 SrcA x y x SrcB x y or Dst x y 2 SrcA x y x Constant The different image type combinations supported by this VI are described in the following equations The first symbol represents the image connected to Image Src A and the second symbol represents the image type connected to Image Src B The third symbol represents the image type that should be connected to the output Image Dst le x le S be x e be RJ x s IF 8 x b e ie x be ne R x be
182. e Increases the intensity dynamic by evenly distributing a given gray level interval min max over the full gray scale 0 255 Min and max default values are O and 255 for an 8 bit image Reverse Reverses the pixel values producing a photometric negative of the image Logarithmic Increases the brightness and contrast Power 1 Y in dark regions Decrease the Square Root contrast in bright regions National Instruments Corporation 3 3 IMAQ Vision for G Reference Manual Chapter 3 Lookup Transformations Transfer Shading Correction Function Exponential Decreases the brightness and Power Y increases the contrast in bright Square regions Decreases the contrast in the dark regions Equalize The Equalize function alters the gray level value of pixels so they become distributed evenly in the defined gray scale range 0 to 255 for an 8 bit image The function associates an equal amount of pixels per constant gray level intervals and takes full advantage of the available shades of gray Use this transformation to increase the contrast of images in which gray level intervals are not used The equalization can be limited to a gray level interval also called the equalization range In this case the function evenly distributes the pixels belonging to the equalization range over the full interval 0 to 255 for an 8 bit image and the other pixels are set to 0 The image produced reveals details in the regions that have an int
183. e associated to summits and low intensity values are associated to valleys IMAQ Vision for G Reference Manual 2 8 National Instruments Corporation Chapter Lookup Transformations This chapter provides an overview of lookup table transformations About Lookup Table Transformations The lookup table LUT transformations are basic image processing functions that you can use to improve the contrast and brightness of an image by modifying the intensity dynamic of regions with poor contrast The LUT transformations can highlight details in areas containing significant information at the expense of other areas These functions include histogram equalization histogram inversion Gamma corrections Inverse Gamma corrections logarithmic corrections and exponential corrections An LUT transformation converts input gray level values those from the source image into other gray level values in the transformed image The transfer function has an intended effect on the brightness and contrast of the image Each input gray level value is given a new value such that output value F input value where F 1s a linear or nonlinear continuous or discontinuous transfer function defined over the interval 0 max National Instruments Corporation 3 1 IMAQ Vision for G Reference Manual Chapter 3 Lookup Transformations In the case of an 8 bit resolution an LUT is a table of 256 elements Each element of the array represents an
184. e beginning of your application if an image is to be processed later using functions that require a border for example labeling and morphology The default value 0 creates no border To optimize transfer time especially for real time acquisition use a border that is an even number of pixels wide Image Name is the name that is associated with the created image Image Type specifies the image type Refer to the MAQ Create section for a description of the various image types supported in IMAQ Vision X Resolution specifies the X size of the image to be created O National Instruments Corporation 10 3 IMAQ Vision for G Reference Manual Chapter 10 Management VIs Y Resolution specifies the Y size of the image to be created This parameter X Resolution and Border Size define the memory that is allocated permanently for this image an error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAO VI Error Clusters in Chapter 9 VI Overview and Programming Concepts zu New Image is the image structure that 1s supplied as input to all subsequent functions used by IMAQ Vision zu error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ Dispose Destroys an image and frees the space i
185. e brightness of pixels in an image that are surrounded by other pixels with a higher intensity Reduces the brightness of pixels in an image that are surrounded by other pixels with a lower intensity Images with monochrome information Functions that perform morphological operations on a gray level image Inverse of lowpass attenuation Removes or attenuates low frequencies present in the FFT domain of an image Emphasizes the intensity variations in an image detects edges or object boundaries and enhances fine details in an image Attenuates or removes truncates low frequencies present in the frequency domain of the image A highpass frequency filter suppresses information related to slow variations of light intensities in the spatial image Inverse of lowpass truncations G 4 O National Instruments Corporation histogram histogram equalization hit miss function hole filling function HSL HSV image image file image processing image visualization inner gradient intensity calibration intensity range intensity threshold O National Instruments Corporation Indicates the quantitative distribution of the pixels of an image per gray level value Transforms the gray level values of the pixels of an image to occupy the entire range 0 to 255 in an 8 bit image of the histogram increasing the contrast of the image Locates objects in the image similar to the pattern defined in the structuring
186. e from the connection panel but is visible from the front panel of the VI For example the cluster TIFF Options allows the user to specify the value of certain tags for example RowsPerStrip PhotometricInterpretation or ByteOrder To change the default values for a TIFF file it is sufficient to modify the parameter in the front panel of IMAQ WriteFile IMAQ Vision for G Reference Manual 11 6 National Instruments Corporation Chapter Display This chapter describes the Display VIs in IMAQ Vision Introduction The control of image visualization is of primary importance in an imagery application mage processing and image visualization are distinct and separate elements that should not be confused An IMAQ Vision image is controlled by IMAQ Create which is responsible for the manipulation of the image data and its proper preparation for the various processing and analysis functions that can be applied to the image data On the other hand image visualization involves the presentation of the image data to the user and how the user works with the visualized images Note that a typical imagery application has many more images than the number of image windows IMAQ Vision is used for a wide variety of imagery needs by users with varying skill levels Four Display sections exist so that the novice user can easily access the basic Display functions while OEMs and other professional users can create imagery applications containing s
187. e gamma coefficient Y the stronger the intensity correction The Logarithmic correction has a stronger effect than the Power 1 Y function O National Instruments Corporation 3 7 IMAQ Vision for G Reference Manual Chapter 3 Lookup Transformations The following series of illustrations presents the linear and cumulative histograms of an image after various LUT transformations The more the histogram is compressed on the right the brighter the image The following graphic shows the original image and histograms A Power 1 Y transformation where Y 1 5 produces the following image and histograms A Square Root or Power 1 Y transformation where Y 2 produces the following image and histograms IMAQ Vision for G Reference Manual 3 8 National Instruments Corporation Chapter 3 Lookup Transformations A Logarithm transformation produces the following image and histograms Exponential and Gamma Correction The exponential and gamma corrections expand high gray level ranges while compressing low gray level ranges When using the B amp W or Gray palette these transformations decrease the overall brightness of an image and increase the contrast in bright areas at the expense of the contrast in dark areas The following graphs show how the transformations behave The horizontal axis represents the input gray level range and the vertical axis represents the output gray level range Each input gray level value is plotte
188. e histograms extracted from the three planes of an image This VI can function in one of three modes corresponding to the three color models RGB HSL or HSV The output from this VI is directly compatible with a LabVIEW or Bridge VIEW graph 5 Color Made ImageRGB RGE Red or Hue Histogram Graph Image Mask eer Green or Sat Histogram Graph Humber of Clas Ti Blue or Light or Wal Hist error in no error J error out Color Mode defines the image color format to use for the operation The default is 0 which specifies RGB E O RGB default 1 HSL 2 HSV ImageRGB RGB is the RGB chunky input source image used for calculating the histogram Image Mask if connected must be an 8 bit image Number of Classes specifies the number of classes used to class the pixels The default is 256 error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Red or Hue Histogram Graph is a cluster that returns the detailed results from a histogram calculated on a red or hue plane depending on the Color Mode This cluster is the same as the cluster used by IMAQ Histograph It contains the following elements National Instruments Corporation 22 9 IMAQ Vision for G Reference Manual Chapter 22 IMAQ Vision for G Reference Manual 22 10 Color Vis z
189. e in the image Icons per Line 4 determines the number of icons per line The subsequent lines are set as a function of the number of remaining available icons i Note The WindTools palette automatically displays cursor information if the input Icons per Line is set to 3 or higher for the Macintosh version and 4 or higher for the Windows version With IMAQ WindLastEvent you can find the coordinates of a selected region The functionality of region tools can be altered by using a tool while pressing certain keyboard keys Keyboard options are the same for all platforms Shift before a Click adds an ROI Shift while drawing constrains square angles Control before a Click displaces an ROI Control and Click while drawing produces the last point of a polygon O National Instruments Corporation 12 13 IMAQ Vision for G Reference Manual Chapter 12 Display The following examples of the WindTools palette have three icons per line Image type indicator 8 bit 16 bit RGB Pixel intensity Coordinates of a region within an image Anchoring coordinates of a region Size of an active region DO _ af Length and vertical displacement angle of a line region The WindTools palette on the left 1s transformed automatically to the palette on the right when the user manipulates a region tool in an image window IMAQ WindToolsSelect Obtains or modifies the status of the region tools
190. e perpendicular segments It is defined as max intercept mean perpendicular intercept The more elongated the shape of an object the higher its elongation factor Compactness Factor The compactness factor is the ratio of an object area to the area of the smallest rectangle containing the object It is defined as particle area breadth x width The compactness factor belongs to the interval 0 1 The closer the shape of an object is to a rectangle the closer to 1 the compactness factor Heywood Circularity Factor The Heywood circularity factor is the ratio of an object perimeter to the perimeter of the circle with the same area It is defined as particle perimeter _ particle perimeter perimeter of circle with same area as particle 2 gx particle area The closer the shape of an object is to a disk the closer the Heywood circularity factor to 1 Hydraulic Radius The hydraulic radius is the ratio of an object area to its perimeter It is defined as particle area particle perimeter O National Instruments Corporation 8 15 IMAQ Vision for G Reference Manual Chapter 8 Quantitative Analysis If a particle is a disk with a radius R then its hydraulic radius is equal to nR R RR 2 The hydraulic radius is equal to half the radius R of the circle such that circle area particle area circle perimeter particle perimeter Waddel Disk Diameter Diameter of the disk with the same area as the particle It 1s de
191. e result is a copy of the other O National Instruments Corporation 15 9 IMAQ Vision for G Reference Manual Chapter 15 Operator VIs Logic Operators IMAQ And Performs an AND or NAND operation on two images or an image and a constant e he F H TJ a HAR And MN and And PT Image Src A Image Dist Out Image Dist Image Src B Constant LE error out error in na error And Nand And is the result from a logic operation If set to TRUE the result of a logic operation is the negative of the performed logic operation NAND instead of AND The default is FALSE which specifies a positive operation AND Image Src A is the reference to the source input image A Image Dst is the reference to the destination image If it is connected it must be the same type as the Image Src A Image Src B is the reference to the source input image B Constant is a binary constant used for image constant operations The default is O error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src A
192. e specified pixel value This output is used only for an 8 bit or 16 bit image Pixel Value SGL returns the specified pixel value The SGL format can accept values from all supported image types 8 bit 16 bit or 32 bit floating point error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ Vision for G Reference Manual 13 16 National Instruments Corporation Chapter 13 Tool Vls IMAQ SetPixelValue Changes the pixel value in an image e he F n Image 2 Coordinate Y Coordinate Pixel Value eror in no error Image is the reference to the source input image X Coordinate is the horizontal coordinate of the pixel to modify Y Coordinate is the vertical coordinate of the pixel to modify Pixel Value contains the replacement pixel value EHHBE error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts al Image Out is the reference to the destination output image E error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAO VI Error Clusters 1n Chapter 9 VI Overview and Programming Concepts
193. e template image HAJR Optional Rectangle Image Sre Image List Out Image Template Image List eror in na errar error aut Optional Rectangle defines an array four elements containing the coordinates Left Top Right Bottom of the region in the source image that is used for the correlation process Correlation is applied to the entire image if the input is empty or not connected Image Src is a reference to the source image The normalized cross correlation is performed between this image and the template image This image must be an 8 bit image O National Instruments Corporation 17 11 IMAQ Vision for G Reference Manual Chapter 17 Filter Vis uo uo uo uo uo s Note Image Template is a reference to a template image This image must be an 8 bit image For the correlation the center of the template image is used as the origin Image Dst is the reference of the image destination If it is connected it must be the same type as the Image Src error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Dst Out is an 8 bit image that contains the cross correlation values normalized to lie in the range 0 255 A value of 255 indicates a very high correlation and a value of 0 indicates no correlation error out is a cluster that describe
194. e type as the input Image Src A IMAQ Subtract Subtracts one image from another or a constant from an image Le he R P 2 3 Constant Image 5rc A Image Dist Out Image List Image Src B Ti emor in no error E error out IMAQ Vision for G Reference Manual 15 2 O National Instruments Corporation Chapter 15 Operator VIs Constant is the value subtracted from the input Image Src A for image constant operations The constant is rounded down in the cases in which the image is encoded as an integer The default is 0 E Image Src A is the reference to the source input image A al Image Dst is the reference to the destination image al Image Src B is the reference to the source input image B E error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAO VI Error Clusters in Chapter 9 VI Overview and Programming Concepts a Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src A error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts An operation betw
195. eInfo VI 11 4 to 11 5 IMAQ GetImagePixelPtr VI 23 1 to 23 5 IMAQ GetlmageSize VI 13 2 IMAQ GetKernel VI 17 3 to 17 5 IMAQ GetLastKey VI 12 46 IMAQ GetOffset VI 13 7 to 13 8 IMAQ GetPalette VI 12 8 to 12 9 IMAQ GetPixelLine VI 13 18 IMAQ GetPixelValue VI 13 16 IMAQ GetRowCol VI 13 19 IMAQ GetScreenSize VI 12 37 to 12 38 IMAQ GetUserPen VI 12 42 to 12 43 IMAQ Vision for G Reference Manual Index IMAQ GrayMorphology VI 18 5 to 18 7 IMAQ Histograph VI 19 3 to 19 6 IMAQ History VI 19 1 to 19 3 IMAQ ImageBorderOperation VI 23 10 to 23 11 IMAQ ImageBorderSize VI 23 11 IMAQ ImageToArray VI 13 22 to 13 23 IMAQ ImageToClipboard VI 13 24 to 13 25 IMAQ ImageToComplexPlane VI 21 19 to 21 20 IMAQ ImageTolmage VI 13 14 to 13 15 IMAQ IntegerToColorValue VI 22 24 to 22 26 IMAO Interlace VI 23 9 to 23 10 IMAQ InverseFFT VL 21 3 to 21 4 IMAQ Label VI 16 13 to 16 14 IMAQ LinearAverages VI 19 8 to 19 9 IMAO LineProfile VI 19 6 to 19 8 IMAQ LogDiff VI 15 13 to 15 14 IMAQ LowPass VI 17 10 to 17 11 IMAQ MagicWand VI 13 30 to 13 31 IMAQ Mask VI 15 17 IMAQ MaskToROI VI 12 28 IMAQ MathLookup VI 16 8 to 16 10 IMAQ MemPeek VI 23 7 to 23 8 IMAQ Modulo VI 15 8 to 15 9 IMAQ Morphology VI 18 3 to 18 5 IMAQ MulDiv VI 15 7 to 15 8 IMAQ Multiply VI 15 4 to 15 5 IMAQ MultiThreshold VI 16 2 to 16 4 IMAQ NthOrder VI 17 8 to 17 9 IMAQ Or VI 15 11 to 15 12 IMAQ PaletteTolerance Macintosh Power Macintosh only VI 12 9 to
196. ed as part of two different objects if they are diagonally adjacent In the following image the object count equals 4 Area Threshold Finally a size criteria can be specified to detect only objects falling in a given area range The area threshold is defined by the two parameters Minimum Area Maximum Area Examples In the following example 1 pixel 1 square inch Black objects gray level 0 as small as 1 sq ui e nrc 65536 White objects gray level 255 bigger than 65536 500 sq Lu Light gray objects belonging to the gray level range 190 200 and smaller than 3000 sq u1 Labeled objects placed in a black background 1000 and ranging from 200 to 1000 sq Lu IMAQ Vision for G Reference Manual 8 4 National Instruments Corporation rp Note Chapter 8 Quantitative Analysis The most straightforward way to isolate objects is to use the threshold function and convert them to binary objects This method offers the advantage of clearly showing the objects while the threshold interval remains constant and equal to 1 1 Object Measurements Areas A digital object can be characterized by a set of morphological and intensity parameters described in the Areas Lengths Coordinates Chords and Axes Shape Equivalence Shape Features Densitometry and Diverse Measurements sections This section describes the following area parameters e Number of pixels Area in number of pixels e Particle area
197. een an image and a constant occurs when the input Image Src B is not connected The two possibilities are distinguished in the following equations Dst x y SrcA x y SrcB x y or Dst x y SrcA x y Constant The different image type combinations supported by this VI are described in the following equations The first symbol represents the image connected to Image Src A and the second symbol represents the image type connected to Image Src B The third symbol represents the image type that should be connected to the output Image Dst 8 a l ba leba F e F 16 fie te R fte R IF F F O National Instruments Corporation 15 3 IMAQ Vision for G Reference Manual Chapter 15 Operator VIs To subtract a constant from an image the output Image Dst must be connected to the same image type as the input Image Src A If one of the two source images is empty the result is a copy of the other IMAQ Multiply Multiplies two images or an image and a constant Le te R el E T El E b b Constant Image Src A Image Dist Out Image List Image Src B BH erar in na error E error aut Constant The input Image Src A is multiplied by the Constant value for image constant operations The default is 1 Image Src A is the reference to the source input image A Image Dst is the reference to the destination image Image Src B is the reference to the source input imag
198. el is less than or equal to k Figure 2 2 Linear Cumulative Scale Interpretation The gray level intervals with a concentrated set of pixels reveal the presence of significant components in the image and their respective intensity ranges In the previous example the linear histogram reveals that the image is composed of three major elements The cumulative histogram shows that the two left most peaks compose approximately 80 percent of the image while the remaining 20 percent corresponds to the third peak Histogram of Color Images The histogram of a color image is expressed as a series of three tables corresponding to the histograms of the three primary components R G and B H S and L or H S and V IMAQ Vision for G Reference Manual 2 6 National Instruments Corporation Histogram Scale Line Profile Chapter 2 Tools and Utilities The vertical axis of a histogram plot can be shown in a linear or logarithmic scale A logarithmic scale lets you visualize gray level values used by small numbers of pixels These values might appear unused when the histogram is displayed in a linear scale In the case of a logarithmic scale the vertical axis of the histogram gives the logarithm of the number of pixels per gray level value The use of minor gray level values is made more prominent at the expense of the dominant gray level values The following two figures illustrate the difference between the display of the histogra
199. el values between 32768 and 32767 are recopied Pixel values greater than 32767 are set to 32767 Same conversion rule as 16 bit to RGB IMAQ Vision for G Reference Manual 14 2 National Instruments Corporation Chapter 14 Conversion VIs IMAQ Cast Converts the current image type of an image to the image type specified by Image Type Le he E Es E Image Image Type erar in na error Image is both the image to be converted input and the image that receives the conversion output With this VI only the image type of the image changes The conversion rules are the same as described in IMAQ Convert Image Type determines into what image type the input Image is converted The following values are valid O 8 bits 8 bits per pixel unsigned standard monochrome 1 16bits 16 bits per pixel signed 2 float 32 bits floating point per pixel 3 Unused 4 RGB 32 bits per pixel RGB chunky standard color 5 Unused error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Out is the reference to the input image with the new image type O National Instruments Corporation 14 3 IMAQ Vision for G Reference Manual Chapter 14 Conversion VIs ET error out is a cluster that describes the error status after this VI executes For more information
200. ensity in the equalization range other areas are cleared Example 1 This example shows how an equalization of the interval 0 255 can spread the information contained in the three original peaks over larger intervals The transformed image reveals more details about each component in the original image The following graphics show the original image and histograms IMAQ Vision for G Reference Manual 3 4 O National Instruments Corporation Chapter 3 Lookup Transformations An equalization from 0 255 to 0 255 produces the following image and histograms Note The cumulative histogram of an image after a histogram equalization always has a linear profile as seen in the preceding example Example 2 This example shows how an equalization of the interval 166 200 can spread the information contained in the original third peak ranging from 166 to 200 to the interval 1 255 The transformed image reveals details about the component with the original intensity range 166 200 while all other components are set to black An equalization from 166 200 to 0 255 produces the following image and histograms National Instruments Corporation 3 5 IMAQ Vision for G Reference Manual Chapter 3 Lookup Transformations Reverse The Reverse function displays the photometric negative of an image G Maximum G output input For an 8 bit image Maximum 255 Therefore O uda i 255 Ginput 0 corresponds to 255
201. er and IMAQ FillHole These VIs use this input to determine whether or not a neighboring pixel is considered to be part of same particle The difference is illustrated below Connectivity 4 Connectivity 8 IMAQ Morphology Performs primary morphological transformations All source images must be 8 bit binary images The connected source image for a morphological transformation must have been created with a border capable of supporting the size of the structuring element A 3 x 3 structuring element requires a minimal border of 1 a 5 x 5 structuring element requires a minimal border of 2 and so forth The border size of the destination image is not important Fs La La Square H exa Square A E Image 5rc Image Dst Out Image Dist Operation TT Structuring Element error out eror in na errar i Square Hexa Square specifies whether the pixel frame is treated as square or hexagonal during the transformation The default is square aT Image Src is the reference to the source input image zu Image Dst is the reference to the destination image If it is connected it must be the same type as the Image Src O National Instruments Corporation 18 3 IMAQ Vision for G Reference Manual Chapter 18 IMAQ Vision for G Reference Manual Morphology VIs 132 Operation specifies the type of morphological transformation procedure to use The default is 0 10 11 12 AutoM Close Dilate Erode Gradient Gradient out
202. er as that which is connected to the input Image Dst Therefore it would seem that the connections from the input Image Dst or the output Image Dst Out to subsequent VIs downstream in the processing flow are equivalent However the difference between the two is that Image Dst Out can be used to synchronize processes without resorting to using a LabVIEW or BridgeVIEW sequence structure The following graphic shows several connection types used in IMAQ Vision Image Results Parameters This connection schema applies only to VIs that analyze an image and therefore do not modify either the size or contents of the image Examples of these types of operations include particle analysis and histogram calculations In the following schema an Image Mask is introduced Image Hu Image Mask Hun Results Parameters The presence of an Image Mask input indicates that the processing or analysis is dependent on the contents of another image the Image Mask The processing of each pixel in Image is dependent on the corresponding pixel residing in the Image Mask having a value different than zero This image mask must be an 8 bit image type and its contents are considered to be binary zero or different than zero National Instruments Corporation 9 11 IMAQ Vision for G Reference Manual Chapter 9 VI Overview and Programming Concepts If you want to apply a processing or analysis function to the entire image do not connect the I
203. er as the object Ellipse Ratio Ratio of the major axis of the equivalent ellipse to its minor axis Rectangle big side Big side of the rectangle that has the same area and same perimeter as the object Rectangle small side Small side of the rectangle that has the same area and same perimeter as the object Rectangle ratio Ratio of the big side of the equivalent rectangle to its small side 8 11 IMAQ Vision for G Reference Manual Chapter 8 Quantitative Analysis Equivalent Ellipse Minor Axis The equivalent ellipse minor axis is the minor axis of the ellipse that has the same area as the object and a major axis equal to half the max intercept of the object This definition gives the following set of equations particle area Trab and max intercept 2a The equivalent ellipse minor axis is defined as _ 4x particle area TEX max intercept 2b Ellipse Major Axis The ellipse major axis is the total length of the major axis of the ellipse that has the same area and same perimeter as an object This length is equal to 2a This definition gives the following set of equations Area Tab Perimeter xA2 a t b This set of equations can be expressed so that the sum a b and the product ab become functions of the parameters Particle Area and Particle Perimeter a and b then become the two solutions of the polynomial equation X a b X ab 0 IMAQ Vision for G Reference Manual 8 12 O National Ins
204. er that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Out is the reference to the destination output image error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ Vision for G Reference Manual 13 20 National Instruments Corporation Chapter 13 Tool Vls IMAQ SetRowCol Changes the intensity values in either a row or a column of pixels in an image e he F Z em ec CRF 1 r3 ca Li re I16 GL Haw Fi Column id Humber Image Fisels LI8 Pisel 11 6 Pitels Float errar in no errar Each Pixels input is specific for a particular type of data Row Column uses the row Number by default the default is FALSE When the TRUE value is connected the column Number is used Number is the row or column number to be replaced in the image Image is the reference to the source input image Pixels is an array specifying the coordinates of the pixel row or column to be drawn This input must be used if the image connected is an 8 bit image The drawing is made between the endpoints of the line and contains the values supplied from Pixels Pixels 116 is an array of 16 bit inte
205. er the user wants to know the present status or modify the step values for the grid The default 1s TRUE Set IMAQ Vision for G Reference Manual 12 22 O National Instruments Corporation Chapter 12 Display error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAO VI Error Clusters 1n Chapter 9 VI Overview and Programming Concepts Grid Size returns the present grid step size E error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Regions of Interest Regions of interest can be used to focus your processing and analysis on part of an image An ROI can be traced using standard contours oval rectangle and so forth or free contours freehand The IMAQ Vision user has the following options e Associate an ROI with an image window e Extract an ROI associated with an image window e Erase the current ROI from an image window e Transform an ROI into an image mask e Transform an image mask into an ROI An image mask that is converted into an ROI must support an offset The offset is used to place a newly converted ROI into the space of another image This offset associates the ROI with an image window that possesses the image data The offset defines the upper left hand corner coord
206. erations between pixels These operations consist of applying a new value to a pixel in relation to the value of its neighbor The advantage of the border is that all pixels can be treated the same when performing these types of operations A detailed discussion of the techniques used for image analysis can be found in chapters 1 through 8 of this manual These methods can be applied directly to an application built with IMAQ Vision and LabVIEW or BridgeVIEW MMX Compatibility of IMAQ Vision for G This section discusses MMX technology and the MMX features available in IMAQ Vision for G About Intel MMX Technology Intel released its first Pentium chip with MMX technology early in 1997 and since then has released the Pentium II chip a Pentium Pro chip with MMX technology These new chips are completely compatible with existing Intel architecture and operating systems and are applications transparent MMX technology consists of 57 new instructions which operate on a new 64 bit data type QWORD and eight new 64 bit registers Those instructions can do calculations on eight BYTE four WORD or two DWORD simultaneously which theoretically can speed up calculations two four or eight times However MMX has some restrictions A significant restriction is that MMX instructions cannot handle floating point calculations and extra CPU time is need to switch from MMxX instructions to regular floating point instructions O National Instruments Co
207. error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src O National Instruments Corporation 18 13 IMAQ Vision for G Reference Manual Chapter 18 Morphology VIs Nb Circles returns the number of detected circles in the image Note Circles with a radius outside the limits of Min Radius or Max Radius also are included in this number us Circles Data returns an array of measurements for all detected circles Each element in the array has a structure containing the following elements Pos X is the horizontal position in pixels of the center of the circle Pos Y is the vertical position in pixels of the center of the circle Radius is the radius of the circle in pixels Circles with a radius outside the limits of Min Radius or Max Radius contain negative radius values Core Area is the surface area in pixels of the nucleus of the circle as defined by the Danielsson distance map error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI E
208. error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Dst Out RGB is the reference to the output RGB image that is obtained by applying the color LUT to the source image error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts For example you can use IMAQ ColorUserLookup to inverse the lightness plane for an RGB chunky image Image Dst Qut EGB Image Sre RGB Image Dst RGB Each level n is replaced by the value 255 n resulting in an inverse of the lightness plane IMAQ Vision for G Reference Manual 22 14 National Instruments Corporation Chapter 22 Color VIs IMAQ ColorEqualize Equalizes a color image This VI equalizes either the lightness plane default or all three planes red green and blue 5 Light R G B Light Image 5rc RGE Image Dist Out RGE Image Dst RGB error in na error ib error out Light R G B Light specifies whether the operation is performed on the lightness plane or on all three planes red green blue An equalization on the lightness plane conserves the hue and saturation from the color image An equalization of the three planes re
209. error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src A zu error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts O National Instruments Corporation 21 13 IMAQ Vision for G Reference Manual Chapter 21 Complex VIs An operation between an image and a constant occurs when the input Image Src B is not connected The two possibilities are distinguished in the following equations Dst x y 2 SrcA x y SrcB x y or Dst x y 2 SrcA x y Constant The different image type combinations supported by this VI are described in the following table where I is the resulting image that is connected to the output Image Dst Connected to Connected to Image Src A Image Src B Equations a complex an 8 bit Real Reall Ug yi Li vio OF D55 5 image I 16 bit or l 32 bit Imaginary Imaginary 4 Is yi 16 bit OY L32 pit floating point image Is pits Lt6 pit OT I 32 bit a complex another ima
210. ers in Chapter 9 VI Overview and Programming Concepts Window number indicates the window in which the key was caught TF Key present If TRUE a new key was pressed If FALSE no new keys were pressed and the VI returns the last key pressed Modifiers specifies a set of flags that identifies the modifiers Some flags are platform dependent Key pressed indicates the last key pressed e Option e Shift e Caps Lock e Cmd e Ctrl e Menu error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAO VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ Vision for G Reference Manual 12 46 O National Instruments Corporation Chapter Tool Vis This chapter describes the Tool VIs used in IMAQ Vision for G Tools Image IMAQ Copy Copies the specifications and pixels of one image into another image of the same type This function is used for keeping an original copy of an image for example before processing an image fe lr le Es 5 Image Src PE Image Dist Out Image Dst error in na error at error aut Image Src is the reference to the source input image Image Dst is the reference to the destination image If it is connected it must be the same type as the Image Src error in no error is a cluster that describes the error status before this VI executes For more information about this con
211. erview and Programming Concepts The modification to the pixel value is dependent on the histogram contents regardless of the image type used All pixels entering into the same histogram class have an identical value after equalization IMAQ Vision for G Reference Manual 16 12 National Instruments Corporation IMAQ Label Chapter 16 Processing VIs Labels the particles in a binary image T a HEHE 2 a Connectivity rE 8 s Image Src Image List Out Image Dat Number of Particles erar in no errar a error aut Connectivity 4 8 8 specifies the connectivity used for particle detection The default is 8 Image Src is the reference to the source input image Image Dst is the reference to the destination image If it is connected it must be the same type as the Image Src error in no error is acluster that describes the error status before this VI executes For more information about this control see the section IMAO VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src Number of Particles indicates the number of particles detected in the image error out is a cluster that describes the error status after this VI executes
212. erview and Programming Concepts error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Display Tools This library enables the user to perform the following functions e Select a region tool for defining an ROI e Manage a standard palette of display tools e Retrieve both the events generated by a user and the associated data from an image window With IMAQ WindToolStatus you can select from a number of region tools including point line rectangle oval polygon and freehand With these tools you can decide which sub region of an image to analyze or process These selected regions then can be transformed into an image mask with IMAQ WinGetROI and IMAQ ROIToMask It is possible to program a region by using the VIs IMAQ MaskToROI and IMAQ WindSetROI Also you can configure a floating palette of tools from which you can choose a tool by clicking its icon This palette displays the coordinates of the cursor within the image and the parameters of the active region You can also magnify zoom an image IMAQ WindLastEvent is used to retrieve and manage the events resulting from the interaction in an image window IMAQ Vision for G Reference Manual 12 10 National Instruments Corporation Chapter 12 Display The following figure illustrates the possible interactions found be
213. escribes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts rr r1 2 v E C kA IMAQ Vision for G Reference Manual 13 18 O National Instruments Corporation Chapter 13 Tool Vls IMAQ GetRowCol Extracts a range of pixel values either a row or column from an image e he F n Image Fisela US Humber Pisels 116 Haw Column Haw 7 Fisele SGL error in no error E error out Image is the reference to the source input image Number is the row or column number to be extracted 2 0 Row Column uses the row Number by default the default is FALSE When the TRUE value 1s connected the column Number is used Ep error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Pixels US returns the intensity values for the specified row or column us of pixels This output is used only for an 8 bit image 116 Pixels 116 returns the intensity values for the specified row or column of pixels This output is used only for a 16 bit image sel Pixels SGL returns the intensity values for the specified row or column of pixels This output 1s used only for a 32 bit floating point image error out is a cluster that describes t
214. esents the image type connected to Image Src B The third symbol represents the image type that should be connected to the output Image Dst 8 8 he pe ie fie a he R he ba R s R 3 i IF m For all comparison operations the output Image Dst must be connected to the same image type as the input Image Src A If one of the two source images is empty the result is a copy of the other 15 16 National Instruments Corporation Chapter 15 Operator VIs IMAQ Mask Recopies the Image Src into the Image Dst If a pixel value is 0 OFF in the Image Mask then all corresponding pixels in Image Dst are reset to 0 e he F les LE IPIS Image 5rc Image Dist Out Image Mask Image Dat error in no error j error out Image Src is the reference to the source input image Image Mask is an 8 bit image that specifies the region in the image to modify Only pixels in the original image that correspond to the equivalent pixel in the mask are replaced by the values in the lookup table provided that the value in the mask is not 0 All pixels not corresponding to this criteria keep their original value The complete image is modified if Image Mask is not connected Image Dst is the reference to the destination image If it is connected it must be the same type as the Image Src error in no error is a cluster that describes the error status before this VI executes For more information about
215. eshold Value outputs the threshold value This value can be directly connected to Lower value from IMAQ Threshold provided that 255 is connected to Upper value Lookup Table outputs a lookup table containing 256 elements encoded in O and 1 If the threshold value is 160 then the values between O and 159 become zero and the values between 160 and 255 become 1 This array can be used directly by IMAQ UserLookup e05 Threshold Data outputs an array containing two clusters compatible with IMAQ MultiThreshold The elements in this array define a set of intervals equivalent to the LUT outputted by Lookup Table error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAO VI Error Clusters 1n Chapter 9 VI Overview and Programming Concepts The VI outputs the threshold data in three forms The threshold data directly Threshold Value An LUT directly usable by IMAQ UserLookup An array directly usable by IMAQ MultiThreshold Threshold Data IMAQ AutoMThreshold Applies an automatic multi threshold by using a variant of the classification by clustering method Starting from a random sort the gray scale values are determined This technique is rapid La 2 Image Lookup Table Number of Classes Threshold Data erar in no errar aE error aut National Instruments Corporation 16 5 IMAQ Vision for G Reference Manual Chapter 16 Processing Vls Image
216. eshold interval are set to O and considered as part of the background area Pixels inside the threshold interval are set to 1 and considered as part of an object area Example This example uses the following source image Highlighting the pixels that belong to the threshold interval 166 255 the darkest areas produces the following image Highlighting produces the following binary image A critical and frequent problem in segmenting an image into an object and a background region occurs when the boundaries are not sharply demarcated In such a case the choice of a correct threshold becomes subjective Therefore it is highly recommended that images be IMAQ Vision for G Reference Manual 7 2 O National Instruments Corporation Chapter 7 Morphology Analysis enhanced prior to thresholding so as to outline where the correct borders lie Observing the intensity profile of a line crossing a boundary area can also be helpful in selecting a correct threshold value Finally keep in mind that morphological transformations can help you retouch the shape of binary objects and therefore correct unsatisfactory selections that occurred during the thresholding Thresholding a Golor Image To threshold a color image three threshold intervals need to be specified one for each color component The final binary image is the intersection of the three binary images obtained by thresholding each color component separately Automatic Thre
217. exTruncate A highpass frequency filter attenuates or remove truncates low frequencies present in the FFT plane This filter suppresses information related to slow variations of light intensities in the spatial image In this case an inverse FFT after a highpass frequency filter produces an image National Instruments Corporation 21 1 IMAQ Vision for G Reference Manual Chapter 21 Complex VIs IMAQ FFT in which overall patterns are sharpened and details are emphasized IMAQ ComplexAttenuate or IMAQ ComplexTruncate A mask frequency filter removes frequencies contained in a mask specified by the user IMAQ Mask The display of complex images is handled by IMAQ WindDraw This VI displays an image by inverting the high and low frequencies and then dividing their values by a size factor This size factor m is calculated from the following formula m f w h f 32 2n 2 4n where w is the width of the image and h is the height Computes the FFT of an image Le te R d a a MAJA Image Src Image List Out Image Dst error in na error E error aut Image Src is the handle of the source image The image must have a resolution of 2 x 2 Image Dst is the handle of the complex image that contains the resulting FFT image This input can accept only a complex image 2 x 32 bit floating point which is an image created with IMAQ Create using type 3 The complex image is resized to the Image Src err
218. executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts O National Instruments Corporation 13 13 IMAQ Vision for G Reference Manual Chapter 13 Tool VIs IMAQ ImageTolmage Copies a small image into part of another larger image This VI is useful for making thumbnail sketches from multiple miniature images e he F ls n Offset Left Top Image Src Image List Out Image Dst eror in na error eror aut I32 Offset Left Top is an array specifying the Image Dst pixel coordinates that receive the image copied from Image Src Image Src is the reference to the source input image it must be the same type as the Image Src error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src mn Image Dst is the reference to the destination image If it is connected error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chap
219. f these three functions The primary morphology transformations are described in detail in this section of the manual They include erosion dilation opening closing inner gradient outer gradient hit miss thinning thickening proper opening proper closing and auto median Note In the following descriptions the term pixel denotes a pixel equal to 1 and the term object denotes a group of pixels equal to 1 Erosion Function An erosion eliminates pixels isolated in the background and erodes the contour of objects with respect to the template defined by the structuring element Concept and Mathematics For a given pixel P the structuring element is centered on Po The pixels masked by a coefficient of the structuring element equal to 1 are then referred as P In the example of a structuring element 3 x 3 the P can range from P itself to Pg 1 Ifthe value of one pixel P is equal to 0 then P is set to O else Po is set to 1 2 If AND P 1 then P 1 else P 0 Dilation Function A dilation has the reverse effect of an erosion because dilating objects is equivalent to eroding the background This function eliminates tiny holes isolated in objects and expands the contour of the objects with respect to the template defined by the structuring element Concept and Mathematics For a given pixel P the structuring element is centered on Py The pixels masked by a coefficient of the structuring element equal to
220. ference Manual Chapter 18 Morphology VIs ET error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ FillHole Fills the holes found in a particle The holes are filled with a pixel value of 1 The source image must be an 8 bit binary image This operation requires the creation of a temporary memory space that is equal to the size of the source image EVRY Image 5rc Image Dat Out Image List erar In na errar a error aut Image Src is the reference to the source input image it must be the same type as the Image Src error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Dst is the reference to the destination image If it is connected T Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src T error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programmin
221. fined as 2 J particle area y The following tables list the definition of the primary measurements and the measurements that are derived from them Definitions of Primary Measurements A Area D Perimeter Left Left most point Top Top most point Right Right most point Bottom Bottom most point P Projection x X p Projection y IMAQ Vision for G Reference Manual 8 16 National Instruments Corporation Chapter 8 Quantitative Analysis Derived Measurements h Height Bottom Top ma E md D 4 d Ca DP ax C Mean Perpendicular A Smax Intercept Ap Equivalent Ellipse 4 x A x Smax Minor Axis If La Ly 2 d then d 45 Orientation 90 IfI 2 L5 and Z gt 0 then d 180 d ax xy else d If Lx 2 lyy and I 0 then d d DL then d 90 d If d 6 then d 0 E Ellipse major axis 2a O National Instruments Corporation 8 17 IMAQ Vision for G Reference Manual Chapter 8 Quantitative Analysis Symbol Derived Measurement Primary Measurement 2 gt pe Ellipse minor axis 25 14 p 1 where t Jp 16A Heywood Circularity factor gt Type factor mE Waddel Disk Diameter Densitometry IMAQ Vision contains the following densitometry parameters e Minimum Gray Value Minimum intensity value in gray level units e Maximum Gray Value Maximum intensity value in gray level units e Sum Gray Value Sum of the intensities in the ob
222. for G Reference Manual Chapter 22 Color Vis Red or Hue Range is a cluster used to determine the thresholding range for the red or hue plane depending on the Color Mode Any pixel values not included in this range are reset to zero in the destination image The pixel values included in this range are altered depending on the status of the Replace input By default all pixel values are included 0 255 Lower Value is the minimal pixel value in the red or hue plane 132 p p Lag that is used for the threshold The default 1s O 132 Upper Value is the maximal pixel value in the red or hue plane BETA that is used for the threshold The default 1s 255 Green or Sat Range is a cluster used to determine the thresholding range for the green or saturation plane depending on the Color Mode Any pixel values not included in this range are reset to zero in the destination image The pixel values included in this range are altered depending on the status of the Replace input By default all pixel values are included 0 255 Green or Sat Range has the same elements as found in Red or Hue Range Blue or Light or Val Range is a cluster used to determine the thresholding range for the blue lightness or value plane depending on the Color Mode Any pixel values not included in this range are reset to zero in the destination image The pixel values included in this range are altered depending on the status of the Replace input By defa
223. for a period of 90 days from date of shipment as evidenced by receipts or other documentation National Instruments will at its option repair or replace software media that do not execute programming instructions if National Instruments receives notice of such defects during the warranty period National Instruments does not warrant that the operation of the software shall be uninterrupted or error free A Return Material Authorization RMA number must be obtained from the factory and clearly marked on the outside of the package before any equipment will be accepted for warranty work National Instruments will pay the shipping costs of returning to the owner parts which are covered by warranty National Instruments believes that the information in this manual is accurate The document has been carefully reviewed for technical accuracy In the event that technical or typographical errors exist National Instruments reserves the right to make changes to subsequent editions of this document without prior notice to holders of this edition The reader should consult National Instruments if errors are suspected In no event shall National Instruments be liable for any damages arising out of or related to this document or the information contained in it EXCEPT AS SPECIFIED HEREIN NATIONAL INSTRUMENTS MAKES NO WARRANTIES EXPRESS OR IMPLIED AND SPECIFICALLY DISCLAIMS ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE CUSTOMER S RIGHT TO RE
224. fore this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src a error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts a IMAQ Filllmage Fills an image and its border with a specified value fe F le Es 5 Complex Pinel Value Fisel Value LI8 116 Float Color Pixel Value error in no error Complex Pixel Value specifies the value used for filling a complex image B Image is the reference to the source input image Image Mask is an 8 bit image that specifies the region in the image to modify Only pixels in the original image that correspond to the equivalent pixel in the mask are replaced by the values in the lookup table provided that the value in the mask is not 0 All pixels not corresponding to this criteria keep their original value The complete image is modified if Image Mask is not connected a Pixel Value US 116 Float specifies the value with which the image is to be filled This
225. fter this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ ComplexMeasure Calculates the coefficients of all detected particles This VI returns an array of coefficients whose measurements are based on the results sent from IMAQ ComplexParticle pA Image Complex Reports Coefficients 2D Comples Report Coefficients 1D Parameters ri Coefficient Parameter i error out erar in na error O National Instruments Corporation 19 15 IMAQ Vision for G Reference Manual Chapter 19 Analysis VIs zm Fea zm 132 El Image is the same input source image that is used to measure the particle coefficients by IMAQ ComplexParticle Complex Reports is the output array of measurements from IMAQ ComplexParticle The measurements stored in each element of this array are described in the MAQ ComplexParticle section Complex Report is an extraction of the output array of measurements from IMAQ ComplexParticle The measurements stored in each element of this array are described in the MAQ ComplexParticle section This input is used only in a case in which Complex Reports is not connected thereby specifying that the measurements are to be made on a single particle Parameters is an array specifying a descriptor list of the coefficients that the user wants to calculate The user can calculate one or more coefficients for
226. functions that require a border for example labeling and morphology The default value 0 creates no border To optimize transfer time especially for real time acquisition use a border that is an even number of pixels wide The following graphic illustrates an 8 x 6 image with a border equal to 0 O National Instruments Corporation 10 1 IMAQ Vision for G Reference Manual Chapter 10 Management VIs zmn zmn In the following 8 x 6 image the border equals 2 Image Name is a name that is associated with the created image Each image created must have a unique name Image Type This parameter specifies the image type This input can accept the following values 0 8 bits per pixel unsigned standard monochrome per pixel unsig 1 16 bits per pixel signed per pixel signed 2 F 32 bits floating point per pixel 3 i 2 x 32 bits floating point per pixel native format after an FFT 4 32 bits per pixel RGB chunky standard color error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts New Image is the Image structure that is supplied as input to all subsequent downstream functions used by IMAQ Vision Multiple images can be created in a LabVIEW or BridgeVIEW application Activating the IMAQ ImageStatus VI shows you all created images and the space
227. g Concepts IMAQ Vision for G Reference Manual 18 10 O National Instruments Corporation Chapter 18 Morphology VIS In the following example the central empty portion is a hole and therefore is filled with a connectivity of 8 With a connectivity of 4 this function leaves the hole unchanged iz Note The holes found in contact with the image border are never filled because it is impossible to determine whether these holes are part of a particle or not IMAQ RejectBorder Eliminates particles that touch the border of an image The source image must be an 8 bit binary This operation requires the creation of a temporary memory space that is equal to the size of the source image La ib Image 5rc E Image Dist Out Image Dat error in na errar E error aut Image Src is the reference to the source input image Image Dst is the reference to the destination image If it is connected it must be the same type as the Image Src error in no error isa cluster that describes the error status before this 2 0 VI executes For more information about this control see the section IMAO VI Error Clusters in Chapter 9 VI Overview and Programming Concepts zu Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src O Natio
228. g operations to smooth the boundaries of objects An image containing objects usually represented with a pixel intensity of 1 or 255 and the background of 0 Functions that perform morphological operations on a binary image G 1 IMAQ Vision for G Reference Manual BMP border function C circle function closing color images color lookup table complex images connectivity connectivity 4 connectivity 8 convex function convolution convolution kernel D Danielsson function IMAQ Vision for G Reference Manual Image format commonly used for 8 bit images on PCs Removes objects or particles in a binary image that touch the image border Detects circular objects in a binary image A dilation followed by an erosion A closing fills small holes in objects and smooths the boundaries of objects Images containing color information usually encoded in the RGB form Table for converting the value of a pixel in an image into a red green and blue RGB intensity Save information obtained from the FFT of an image The complex numbers which compose the FFT plane are encoded in 64 bit floating point values 32 bits for the real part and 32 bits for the imaginary part Defines which of the surrounding pixels of a given pixel constitute its neighborhood Only pixels adjacent in the horizontal and vertical directions are considered as neighbors All adjacent pixels are considered as neighbors Compu
229. ge complex Real 7 1 x Real Imaginary 7 1 x Imaginary Z2 Real J nte Real ay Imaginary 7 F Imaginary 7 1 X Real 5 Real 7 1 x Imaginary 1 5 AA gt A REO Real Imaginary 1 5 IMAQ CompleximageToArray Extracts the pixels from a complex image 2 x 32 bit floating point into a 2D complex array CSG ic PP Image Pisels Complex Optional Rectangle error in no error aE error aut IMAQ Vision for G Reference Manual 21 14 National Instruments Corporation Chapter 21 Complex VIs Image is the reference to the complex image 13 2 Optional Rectangle specifies a rectangular region of the complex image to be extracted The operation is applied to the entire image if the input is empty or not connected Ep error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Pixels Complex is a 2D array Line Column containing all the pixel values that comprise the image The first index corresponds to the vertical axis and the second to the horizontal index The final size of the array is equal to the size of the image or to the size of the optional rectangle T error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error C
230. ge constant operations The default 1s O O National Instruments Corporation 15 11 IMAQ Vision for G Reference Manual Chapter 15 Operator VIs error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAO VI Error Clusters in Chapter 9 VI Overview and Programming Concepts a Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src A a error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts All connected images must be the same image type An operation between an image and a constant occurs when the input Image Src B is not connected This VI is performed for each pixel x y in the following manner If two images are connected on input then Dst x y SrcA x y OR SrcB x y If the input Image Src B is not connected then Dst x y SrcA x y OR Constant IMAQ Xor Performs an XOR or XNOR operation on two images or an image and a constant Le he F AJA onno or an E Image Src A Image List Out Image Dist Image Src B Constant E errar aut error in no erro
231. gers specifying the coordinates of the pixel row or column to be drawn This input must be used if the image connected is a 16 bit image The drawing is made between the endpoints of the line and contains the values supplied from Pixels Pixels float is an array of floating point values specifying the coordinates of the pixel row or column to be drawn This input must be used if the image connected is a 32 bit floating point image The drawing is made between the endpoints of the line and contains the values supplied from Pixels error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts O National Instruments Corporation 13 21 IMAQ Vision for G Reference Manual Chapter 13 Tool VIS zu Image Out is the reference to the destination output image T error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ ImageToArray Extracts copies the pixels from an image or part of an image into a 2D array encoded in 8 bits 16 bits or floating point which is determined by the type of input image Various processing can be applied to this array These arrays can be programmed either from LabVIEW or BridgeVIEW or from standar
232. ght corner of the rectangle y2Bottom indicates the coordinates for the bottom right corner of the rectangle Y x is the sum of the X axis for each pixel of the particle Y y is the sum of the Y axis for each pixel of the particle Y xx is the sum of the X axis squared for each pixel of the particle Y xy is the sum of the X axis and Y axis for each pixel of the particle yy is the sum of the Y axis squared for each pixel of the particle 19 14 O National Instruments Corporation Chapter 19 Analysis VIs Longest Segment Length is the longest segment length of the particle Longest Segment Coordinates are the coordinates of the left most pixel in the Longest Segment Length of the particle The top most segment coordinates are used in a case in which more than one Longest Segment Length exist This cluster contains the following parameters x is the x axis coordinate of the pixel the furthest left in the Longest Segment Length in the particle y is the y axis coordinate of the pixel the furthest left in the Longest Segment Length in the particle Projection x is half the sum of the horizontal segments in a particle that do not overlap another adjacent horizontal segment Projection y is half the sum of the vertical segments in a particle that do not overlap another adjacent vertical segment Number of Particles returns the number of detected particles error out is a cluster that describes the error status a
233. gle x2Right indicates the coordinates for the lower right corner of the rectangle y2Bottom indicates the coordinates for the bottom right corner of the rectangle Ep error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAO VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ LinearAverages Computes the average pixel intensity mean line profile on whole or part of the image S te R 5 Image Src A Axis Averages Optional Rectangle i Y Axis Averages SY Axis Averages error in na error I AY Asis Averages error out Image Src is the reference to the source input image 132 Optional Rectangle defines an array four elements containing the coordinates Left Top Right Bottom of the region to extract The operation is applied to the entire image if the input is empty or not connected zu error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts sL X Axis Averages is the linear average along each column in the image 561 Y Axis Averages is the linear average along each row in the image IMAQ Vision for G Reference Manual 19 8 O National Instruments Corporation Chapter 19 Analysis VIs X Y Axis Averages is the linear average a
234. he number of pixels per line and the memory address increment to the next line IMAQ Vision for G Reference Manual 23 4 National Instruments Corporation Chapter 23 External Library Support VIs The following code uses IMAQ GetImagePixelPtr to apply a function f on the pixels of a floating point image The pointer on the pixel 0 0 of the image FirstPixelPtr has been retrieved from the VI In the following C code xSize ySize and LineWidth have been obtained from other VIs int xS1ize is the x size of the image int ySize is the y size of the image Given by IMAQ GetImageSize or IMAQ GetImageInfo int LineWidth is the line width of the image Given by IMAQ GetImagePixelPtr float FirstPixelPtr Given by IMAQ GetImagePixelPtr float TempPixelPtr int i 4 for J 0 j lt ySize J for each line of the image TempPixelPtr FirstPixelPtr for qu D GLo ocx5dxes eS for sach pixel of the Lane TempPixelPtr f TempPixelPtr apply the function TempPixelPtr pixel increment FirstPixelPtr LineWidth line increment National Instruments Corporation 23 5 IMAQ Vision for G Reference Manual Chapter 23 External Library Support VIs IMAQ CharPtrToString Copies a C character string to a G programming language string In LabVIEW 4 0 and Bridge VIEW 1 0 the Call Library function does not directly support entry points returning a character pointer char This VI all
235. he conjugate This input can accept only a complex image Image Dst is the handle of the complex image that contains the resulting FFT image This input can accept only a complex image error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAO VI Error Clusters 1n Chapter 9 VI Overview and Programming Concepts a HE Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts O National Instruments Corporation 21 5 IMAQ Vision for G Reference Manual Chapter 21 Complex VIs IMAQ ComplexAttenuate Attenuates the frequencies of a complex image 5 PP Low pass High pass Low pass Image Src Ms Image List Out Image List eror in no error Za eror aut T Low pass High pass Low pass determines which frequencies are attenuated Choose low pass F to attenuate the high frequencies or high pass T to attenuate the low frequencies The default is FALSE which specifies lowpass H Sen Image Src is the image reference s
236. he error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts O National Instruments Corporation 13 19 IMAQ Vision for G Reference Manual Chapter 13 Tool VIs IMAQ SetPixelLine Changes the intensity values in a line of pixels from an image e he F rs Note 132 rr MAE 116 LL SGL LL a a Line Coordinates Image Pitels Line U 8 Fisel Line 11 6 Pisels Line Float error in no error Each Pixels Line input is specific for a particular type of data Line Coordinates are the coordinates of the line to change These coordinates are in the form of an array specifying the endpoints of the line Any pixels designated by the Line Coordinates found outside the actual image are not replaced Image is the reference to the source input image Pixels Line US is an array containing the coordinates of the pixel line to be drawn This input must be used if the image connected is an 8 bit image The drawing is made between the endpoints of the line and contains the values supplied from Pixels Line Pixels Line I16 is an array of 16 bit integers This input must be used if the image connected is a 16 bit image Pixels Line float is an array of floating point values This input must be used if the image connected is a 32 bit floating point image error in no error is a clust
237. he image The default is 0 Y Offset is the vertical offset added to an image The default is 0 3 B I error in no error is a cluster that describes the error status before this m VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts zu Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts The following graphic illustrates the functionality of this VI mage Ste IMAQ Vision for G Reference Manual 20 6 National Instruments Corporation Chapter 20 Geometry VIs IMAQ Symmetry Transforms an image through its symmetry EVEL 5 Type of 5ymmetry Image Src Image List Out Image Dist m error in na error at error aut Type of Symmetry specifies the symmetry used The default is 0 O Horizontal Default Based on the horizontal axis of the image Vertical Based on the vertical axis of the image 2 Central Based on the center of the image 3 stDiagonal Based on the first diagonal of the image the image
238. he section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts O National Instruments Corporation 15 1 IMAQ Vision for G Reference Manual Chapter 15 Operator VIs Image Dst Out is the reference to the destination output image which m receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Srce A ar error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts An operation between an image and a constant occurs when the input Image Src B is not connected The two possibilities are distinguished in the following equations Dst x y 2 SrcA x y SrcB x y or Dst x y 2 SrcA x y Constant The different image type combinations supported by this VI are described in the following equations The first symbol represents the image connected to Image Src A and the second symbol represents the image type connected to Image Src B The third symbol represents the image type that should be connected to the output Image Dst 8 8 8 e leJ h 8 R s P 8 he t e he he R be FS 8 rf IR pe R R R A To add a constant to an image the output Image Dst must be connected to the same imag
239. he structuring element thickening can be used to fill holes smooth right angles along the edges of objects and so forth The larger the size of the structuring element the more specific the template can be IMAQ Vision for G Reference Manual 7 18 O National Instruments Corporation Chapter 7 Morphology Analysis The thickening function extracts the union between a source image and 1ts transformed image after a hit miss function that uses the structuring element specified for the thickening In binary terms the operation adds a hit miss transformation to a source image If I is an image thickening I I hit miss T OR I hit miss I This operation is useless when the central coefficient of the structuring element is equal to 1 In such case the hit miss function only can turn certain pixels of the objects from 1 to 0 The addition of the thickening function resets these pixels to 1 anyway Examples This example uses the following binary source image O National Instruments Corporation 19 IMAQ Vision for G Reference Manual Chapter 7 Morphology Analysis The next example uses the following source image The following series of graphics shows the results of three thickenings applied to the source image Each thickening uses a different structuring element specified on top of each transformed image Gray cells indicate pixels equal to 1 Proper Opening Function The proper opening function 1s a finite and dua
240. hold Value is the minimum pixel value to appear in the resulting image It is rare to use a value greater than 0 for this type of processing because the results from this processing are usually very dark and are not very dynamic The default is 0 E Image Src is the image reference source Image Mask is an 8 bit image that specifies the region in the image to modify Only pixels in the original image that correspond to the equivalent pixel in the mask are replaced by the values in the lookup table provided that the value in the mask is not 0 All pixels not IMAQ Vision for G Reference Manual 17 6 National Instruments Corporation Chapter 17 Filter Vis corresponding to this criteria keep their original value The complete image is modified if Image Mask is not connected an Image Dst is the reference of the image destination If it is connected 1t must be the same type as the Image Src Method specifies the type of edge detection filter to use The following table lists some of the available filters O Differentiation Default Processing with a 2 x 2 matrix Gradient Processing with a 2 x 2 matrix 2 Prewitt Processing with a 3 x 3 matrix 3 Roberts Processing with a 2 x 2 matrix 4 Sigma Processing with a 3 x 3 matrix 5 Sobel Processing with a 3 x 3 matrix EP Note See the Nonlinear Filters section of Chapter 5 Spatial Filtering for more information about these filters EE error in no error is a cluster that desc
241. hord in an object Mean Chord X Mean length of horizontal segments in an object Mean Chord Y Mean length of vertical segments in an object Mean Perpendicular Max Intercept Intercept Marx Chord Breadth Max Intercept Length of the longest segment in an object in all possible directions of projection Mean Intercept Perpendicular Mean length of the segments in an object perpendicular to the max intercept paricle area Mean intercept perpendicular p p p max intercept Particle Orientation The angle of the longest axis with respect to the horizontal axis The value can be between 0 and 180 IMAQ Vision for G Reference Manual 8 10 National Instruments Corporation Chapter 8 Quantitative Analysis Notice that this value does not give information regarding the symmetry of the particle Therefore an angle of 190 is considered the same as 10 Shape Equivalence Longest axis Particle orientation Horizontal axis in decrees This section describes the following shape equivalence parameters O National Instruments Corporation Equivalent ellipse minor axis Minor axis of the ellipse that has the same area as the object and a major axis equal to half its max intercept Ellipse major axis Major axis of the ellipse that has the same area and same perimeter as the object Ellipse minor axis Minor axis of the ellipse that has the same area and same perimet
242. horizontal segments in an object i Note G can be located outside an object if the latter has a convex shape IMAQ Vision for G Reference Manual 8 6 National Instruments Corporation Chapter 8 Quantitative Analysis Min X Y and Max X Y Coordinates of the upper left and lower right corners of the smallest horizontal rectangle containing an object The origin 0 X Y has two pixels that have the coordinates minX minY and maxX maxY such that minX min X minY min Y maxX max X maxY max Y where X and Y are the coordinates of the pixels P in an object Max Chord X and Max Chord Y Coordinates of the left most pixel along the longest horizontal chord in an object has 0 0 Min s Chord Mara hin Max Chord r Breadth Chords and Axes This section describes the following chord and axis parameters e Max chord length Length of the longest horizontal chord e Mean chord X Mean length of horizontal segments e Mean chord Y Mean length of vertical segments e Max intercept Length of the longest segment in all possible directions National Instruments Corporation 8 9 IMAQ Vision for G Reference Manual Chapter 8 Quantitative Analysis Mean intercept perpendicular Mean length of the segments perpendicular to the max intercept e Particle orientation Orientation in degree with respect to the horizontal axis Max Chord Length Length of the longest horizontal c
243. ignated by the coordinates 0 0 0 255 consists of 256 pixels The output Pixels Line contains the values specified by this line Any pixel values outside the image automatically is set to 0 in Pixels Line error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAO VI Error Clusters 1n Chapter 9 VI Overview and Programming Concepts Pixels Line U32 returns the pixel values as a 1D array of unsigned 32 bit integer indicators error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAO VI Error Clusters in Chapter 9 VI Overview and Programming Concepts B E The following graphic illustrates the use of this VI 1D Color value arra a Line Coordinates National Instruments Corporation 22 19 IMAQ Vision for G Reference Manual Chapter 22 Color Vis IMAQ SetColorPixelLine Changes a line of pixels from a color image This VI receives an array of unsigned 32 bit integer controls An array of clusters coding the color three values R G B H S L or H S V can be converted into an array of pixels unsigned 32 bit integer controls using the VI IMAQ IntegerToColorValue m n gi 5 Line Coordinates Image Pixels Line L 32 erar in na errar 132 Line Coordinates is an array specifying the two endpoints of the line to modify Any p
244. iguration of the structuring element the hit miss function can be used to locate single isolated pixels cross shape or longitudinal patterns right angles along the edges of objects and other user specified shapes The larger the size of the structuring element the more specific the researched template can be IMAQ Vision for G Reference Manual 14 National Instruments Corporation Chapter 7 Morphology Analysis Concept and Mathematics For a given pixel Po the structuring element is centered on Po The pixels masked by the structuring element are then referred as P In the example of a structuring element 3 x 3 the P range from P to Ps If the value of each pixel P is equal to the coefficient of the structuring element placed on top of it then the pixel P is set to 1 else the pixel P is set to 0 In other words if the pixels P define the exact same template as the structuring element then P is set to 1 else P is set to Q A hit miss function using a structuring element with a central coefficient equal to O changes all pixels set to 1 in the source image to the value 0 Example 1 This example uses the following source image source Image The following series of graphics shows the results of three hit miss functions applied to the same source image Each hit miss function uses a different structuring element specified above each transformed image Gray cells indicate pixels equal to 1 O National Ins
245. il the previous ROI is recovered using IMAQ WindGetROI Use this parameter to synchronize brush drawing with ROI recovering Brush active False activates or deactivates the special brush feature ER error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAO VI Error Clusters 1n Chapter 9 VI Overview and Programming Concepts Brush shape out indicates the current shape of the brush Brush element size out indicates the X and Y dimensions of the brush parameters Brush Window Density Left 1 Pix No and Synchronous TE Brush active out indicates whether the brush is active error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Brush Parameters out indicates the current settings of the brush TF National Instruments Corporation 12 45 IMAQ Vision for G Reference Manual Chapter 12 Display IMAQ GetLastKey Returns the last key pressed when the focus was on the window indicated by the Window ID input 5 Window number kep present Rey pressed Ti Modifiers eror in no error i eror out Ep error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clust
246. image illustrates gradient west east 7 x 7 National Instruments Corporation 5 9 IMAQ Vision for G Reference Manual Chapter 5 Spatial Filtering Predefined Gradient Kernels The tables in this section list the predefined gradient kernels Prewitt Filters The Prewitt filters have the following kernels The notations West W South S East E and North N indicate which edges of bright regions they outline Table 5 1 Prewitt Filters W Edge W Image SW Edge SW Image 0 1 1 0 1 O 1 1 O 1 1 0 1 1 1 0 1 1 1 0 1 0 1 1 1 0 1 1 0 S Edge S Image SE Edge SE Image 1 1 1 1 1 1 1 1 0 1 1 0 0 0 0 1 1 0 1 1 1 1 1 l 1 l 0 1 1 0 1 1 E Edge E Image NE Edge NE Image 1 0 4 0 1 0 1 1 0 1 1 1 0 4 1 1 1 0 1 1 1 1 1 0 2 0 1 1 1 0 1 1 0 N Edge N Image NW Edge NW Image 1 1 1 l 1 1 0 1 1 0 0 0 0 1 1 0 1 1 1 1 1 1 1 1 1 O 1 1 O 1 1 IMAQ Vision for G Reference Manual 5 10 O National Instruments Corporation Chapter 5 Spatial Filtering Sobel Filters The Sobel filters are very similar to the Prewitt filters except that they highlight light intensity variations along a particular axis that 1s assigned a stronger weight The Sobel filters have the following kernels The notations West W South S East E and North N indicate which edges of bright regions they outline Table 5 2 Sobel Filters W Edge W Image SW Edge SW Image 1 0 1 0 1 0 1 2 0 1 2 2 0 2 2 1 2 0
247. imum is the maximum interval value The default value of 0 0 insures that the real maximum value is determined by the source image as described in the following table Image Type Maximum Value Used B Maximum pixel value found in the image B Maximum pixel value found in the image Ep error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts T Histogram Graph is a cluster that returns the histogram values This cluster contains the following elements Starting Value returns the smallest pixel value from the first class calculated in the histogram It can be equal to the Minimal value from the Interval Range or the smallest value found for the image type connected Incremental Value returns the incrementing value that specifies how much to add to Starting Value in calculating the median value of each class from the histogram The median value x from the nth class is Xn Starting Value n x Incremental Value ux2 Histogram returns the histogram values in an array The elements found in this array are the number of pixels per class The nth class contains all pixel values belonging to the interval Starting Value n 1 x Interval Width Starting Value n x Interval Width 1 Mean Value returns the mean value of the pixels used in calculating
248. inates x y for the bounding rectangle belonging to the ROI The default value of the offset is 0 0 Image with an ROI Mask without Offset Mask with Offset O National Instruments Corporation 12 23 IMAQ Vision for G Reference Manual Chapter 12 Display Advanced users only The ROI Descriptor cluster contains the following two elements e Bounding rectangle for an ROI Regions list which contains e contour identifier where O specifies an exterior contour and 1 specifies an interior contour e contour type point line rectangle oval freehand and so forth and e list of points x y describing the contour IMAQ WindGetROI Returns the descriptor for an ROI window Number L 15 7 HUI Descriptor eror in no error uk error out Window Number 0 15 is a number from 0 to 15 that specifies the image window The default value is 0 error in no error is acluster that describes the error status before this VI executes For more information about this control see the section IMAO VI Error Clusters in Chapter 9 VI Overview and Programming Concepts a ROI Descriptor returns the descriptor for an ROI E error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAO VI Error Clusters in Chapter 9 VI Overview and Programming Concepts a IMAQ Vision for G Reference Manual 12 24 National Instruments Corporation
249. ination output image zu error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts O National Instruments Corporation 13 9 IMAQ Vision for G Reference Manual Chapter 13 Tool VIS IMAQ Resample Redraws an image in a user defined size This VI is useful for displaying a reduced or enlarged image for example a zoom in or zoom out image 5 Interpolation Type Optional Rectangle Image Src E Image Dist Out Image Dist 2 Resolution r1 Y Resolution c error aut erar in no errar l Interpolation Type specifies the type of interpolation zero order or bilinear used to resample the image E Optional Rectangle defines an array four elements containing the coordinates Left Top Right Bottom of the region to redraw The operation is applied to the entire image if the input is empty or not connected I32 LL Image Src is the reference to the source input image Image Dst is the reference to the destination image If it is connected it must be the same type as the Image Src X Resolution gives the final horizontal size of the image Y Resolution gives the final vertical size of the image J EBEE error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAO VI
250. ing of structuring elements before experimenting with user chosen sizes and contents The majority of the VIs for advanced morphology do not possess an input for structuring element because only the standard 3 x 3 default 1s useful The connected source image for a morphological transformation must have been created with a border capable of supporting the size of the structuring element A 3 x 3 structuring element requires a minimal border of 1 a 5 x 5 structuring element requires a minimal border of 2 and so forth The input Square Hexa is available for certain VIs that perform morphological transformations This concept introduces a variable for the perception of an image frame aligned or shifted which has an influence on the decision to include or not include pixels in the processing The figure shown below illustrates the difference between a 3 x 3 and 5 x 5 structuring element in a square frame and a hexagonal frame Square 5x 5 Hexagonal 5 x 5 When processing in hexagonal mode the elements 2 0 and 2 2 from the 3 x 3 structuring element are not used The same holds true for the elements 0 0 4 0 4 1 4 3 0 4 and 4 4 if the transformation is made with a 5 x 5 structuring element IMAQ Vision for G Reference Manual 18 2 National Instruments Corporation Chapter 18 Morphology VIs The input Connectivity 4 8 default is 8 is used for the advanced morphology VIs IMAQ RemoveParticle IMAQ RejectBord
251. ing this origin the VI searches for its neighbors with an intensity equal to or falling within the tolerance value of the point of reference The resulting image is binary The image passed as input for Image Dst must be an 8 bit image If the same image is entered for Image Src and Image Dst then both must be 8 bit images Le te R 5 LConnectrity 4 8 B8 Fill Value Image Src EE Image List Out Image Dist Hot spot x y r7 Tolerance E error out eror in no error Connectivity 4 8 8 determines the type of connectivity to be used by the algorithm creating the mask The default is 8 Fill Value is the value that 1s used for the lit pixels in the destination image The default is 1 Image Src is the image reference source It must be an 8 bit or RGB image Image Dst is the reference of the image destination It must be an 8 bit image ABBA Hot spot x y is an array counting the x y coordinates of the origin I32 pixel chosen from the image source LLLI Tolerance is the maximum authorized deviation from the origin All pixels satisfying the tolerance criteria origin pixel tolerance origin pixel tolerance and connectivity criteria as specified in Connect 4 8 8 are lit and all other pixels are turned off The default is 20 E IMAQ Vision for G Reference Manual 13 30 O National Instruments Corporation Chapter 13 Tool Vls error in no error is a cluster that describes the error status be
252. input gray level value Its content indicates the output value input histogram output histogram input 255 Example In this example the following source image is used In the histogram of the source image the gray level intervals 0 49 and 191 255 do not contain significant information Using the following LUT transformation any pixel with a value less than 49 is set to 0 and any pixel with a value greater than 191 is set to 255 The interval 50 190 expands to 1 255 increasing the intensity dynamic of the regions with a concentration of pixels in the gray level range 50 190 If G input 18 between 0 49 or 191 2252 then F Ginn 0 else F G 1 8 x G 91 input IMAQ Vision for G Reference Manual 3 2 National Instruments Corporation Chapter 3 Lookup Transformations The LUT transform produces the following image The histogram of the new image only contains the two peaks of the interval 50 190 Predefined Lookup Tables Fight predefined LUTs are available in IMAQ Vision Reverse Equalize Logarithmic Power 1 Y Square Root Exponential Power Y and Square The following table shows the transfer function for each LUT and describes its effect on an image displayed in a palette that associates dark colors to low intensity values and bright colors to high intensity values such as the B amp W or Gray palette LUT Transfer Shading Correction Function Equaliz
253. ion corrected in y projection y Lower Value is the minimum value boundary for the values to be selected Upper Value is the maximum value boundary for the values to be selected Selection Value is a selection criteria This value is used only if the array of selection criteria is not connected to Selection Values The selection criteria possess the same structure as each element in the array Selection Values The default value for Parameter is 1 which specifies that all measurements are made no selection Ep error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Basic Reports Out is an output containing an array of the basic measurements selected a I L B Number of Basic Particles is an output containing the number of basic measurements selected Complex Reports Out is an output containing an array of the complex measurements selected Number of Complex Particles is an output containing the number of complex measurements selected error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts O National Instruments Corporation 19 23 IMAQ Vision for G Reference Manual Chapter Geometry Vis
254. is greater than the truncation frequency f If f gt fo then C f 0 else C f 1 The following series of graphics illustrates the behavior of each type of filter They give the 3D view profile of the magnitude of the FFT This example uses the following original FFT IMAQ Vision for G Reference Manual 6 8 National Instruments Corporation Chapter 6 Frequency Filtering After lowpass attenuation the magnitude of the central peak has been attenuated and variations at the edges almost have disappeared After lowpass truncation with f fo 20 fnax fo spatial frequencies outside the truncation range fo f are removed The part of the central peak that remains is identical to the one in the original FFT plane Highpass Frequency Filters A highpass frequency filter attenuates or removes low frequencies present in the FFT plane It has the effect of suppressing information related to slow variations of light intensities in the spatial image In this case the inverse FFT produces an image in which overall patterns are attenuated and details are emphasized A highpass frequency filter removes or attenuates spatial frequencies located inside a frequency range centered on the fundamental or null frequency National Instruments Corporation 6 9 IMAQ Vision for G Reference Manual Chapter 6 Frequency Filtering Highpass Attenuation Highpass attenuation applies a linear attenuation to the full fre
255. is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ WindUserEvent Returns the events generated through the user windows and the data associated with them Window Number 17 22 User Click User Number User State eror in no error i error aut National Instruments Corporation 12 33 IMAQ Vision for G Reference Manual Chapter 12 Display error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Window Number 17 22 indicates the image window that is queried for events TF User Click returns TRUE if a zone has been chosen by a user User Number returns the zone number chosen by the user TF User State returns the present status TRUE or FALSE of each zone after a click has been registered This output is by definition TRUE when the Mechanical Action of the zone is Latch reading this event causes the zone to pass to FALSE error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Display Special The Display special library contai
256. is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image border size is the border size of the image IMAQ Vision for G Reference Manual 23 2 O National Instruments Corporation Chapter 23 External Library Support VIs Pixel Pointer Out is the pointer on the pixels of the image This pointer is obtained only in the Map Pixel Pointer mode The following table gives the pointer type for different platforms Platform Pointer Type IMAQ Vision for LabVIEW 4 for Windows 3 1 16 bit FAR Other platforms 32 bit flat LineWidth Pixels returns the total number of pixels in a horizontal line in the image This is the sum of the X size of the image the borders of the image and the left and right alignments of the image as shown in the following image This number may not match the horizontal size of the image line Width All ben order Pes border alg dpient border 3 E border gt Pixel Size Bytes returns the size in bytes of each pixel in the image This value multiplied with the Line Width gives the number of bytes occupied by a line of the image in memory O National Instruments Corporation 23 3 IMAQ Vision for G Reference Manual Chapter 23 External Library Support VIs Transfer Max Size returns the number of bytes from the pixel pointer to the end of the i
257. is the reference to the source input image mn Number of Classes is the number of desired phases This algorithm uses a clustering method and can use any value between 2 and 256 The default is 2 error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Lookup Table is an array containing the values of the 256 transformed elements encoded between 0 and the n 1 where nis the Number of Classes This array can be connected directly to IMAQ UserLookup r3 fuis S Threshold Data outputs an array containing the Number of Classes compatible with IMAQ MultiThreshold The results range from 0 to n 1 where n 1s the Number of Classes r1 iD ol LI error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts This method is based on a reiterated measurement of an histogram After finding the best result a very rapid process the histogram is segmented into n groups These groups are based on the fact that each point in a group 1s closer to the barycenter of its own group than the other group The VI outputs the threshold data in two forms A LUT directly usable by IMAQ UserLookup An array directly usa
258. isibility of an image window The default is set to TRUE Set Bring To Front N determines if a windows is to be brought to the Ep error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Visible returns the present visibility status of the window A visible image window returns TRUE Frontmost Window returns TRUE if an image window is in the front Ep error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAO VI Error Clusters 1n Chapter 9 VI Overview and Programming Concepts O National Instruments Corporation 12 5 IMAQ Vision for G Reference Manual Chapter 12 Display IMAQ WindMove Indicates and sets the position of an image window Window Number 0 15 Coordinates screen Coordinates screen Get Set Status Set error in na error error out Window Number 0 15 is a number from 0 to 15 that specifies the image window The default value is 0 Coordinates screen is a structure that contains the screen coordinates in X and Y positions where the image window is located or where the image window will be placed This input is only necessary when the input Get Set Status is set to Set TF Get Set Status Set specifies 1f the user wants to know the co
259. ity 9 14 overview 9 1 to 9 2 rectangle entity 9 14 Square Hexa input 9 16 to 9 17 structuring element 9 16 table of pixels 9 15 MMX compatibility 9 3 to 9 4 proper closing function gray level morphology 7 37 primary binary morphology 7 21 proper opening function gray level morphology 7 36 to 7 37 primary binary morphology 7 20 Q quantitative analysis 8 1 to 8 19 definition of digital object 8 2 to 8 5 area threshold 8 4 to 8 5 connectivity 8 2 to 8 4 intensity threshold 8 2 densitometry 8 18 to 8 19 diverse measurements 8 19 intensity calibration 8 2 object measurements 8 5 to 8 18 areas 8 5 to 8 7 chords and axes 8 9 to 8 11 coordinates 8 8 to 8 9 O National Instruments Corporation lengths 8 7 to 8 8 shape equivalence 8 11 to 8 14 shape features 8 14 to 8 18 spatial calibration 8 1 R rainbow palette 2 3 RASTR format gray level image 1 3 rectangle big side shape equivalence parameters 8 13 rectangle entity 9 14 rectangle ratio shape equivalence parameters 8 14 rectangle small side shape equivalence parameters 8 14 rectangular frame 1 7 Regions of Interest 12 23 to 12 28 IMAQ MaskToROI 12 28 IMAQ ROIToMask 12 27 to 12 28 IMAQ WindEraseROI 12 26 IMAQ WindGetROI 12 24 IMAQ WindSetROI 12 25 to 12 26 Remainder operator table 4 2 resolution of images 1 1 spatial 1 1 Reverse function example 3 6 to 3 6 purpose and use 3 6 transfer function and effect table
260. ive each central pixel becomes a weighted average of its neighbors The stronger the weight of a neighboring pixel the more influence it has on the new value of the central pixel For a given set of coefficients a b c d a smoothing kernel with a central coefficient equal to 0 x 0 has a stronger blurring effect than a smoothing kernel with a central coefficient equal to 1 x 1 Examples Notice the following smoothing kernels and filtered images A larger kernel size corresponds to a stronger smoothing effect Kernel 1 Filtered Image pom IMAQ Vision for G Reference Manual 5 18 O National Instruments Corporation Chapter 5 Spatial Filtering Kernel 2 Filtered Image cuy Kernel 3 Filtered Image pm Kernel 4 Filtered Image p omm Predefined Smoothing Kernels The following tables list the predefined smoothing kernels Table 5 8 Smoothing 3 x 3 0 1 0 0 1 0 0 2 0 0 4 0 1 l 1 1 1 2 1 2 4 1 4 0 1 0 0 1 0 0 2 0 0 4 0 l 1 1 1 2 WE 4 4 4 l l 1 1 1 2 P 2 4 1 4 1 1 1 1 1 1 2 2 2 4 4 4 National Instruments Corporation 5 19 IMAQ Vision for G Reference Manual Chapter 5 Spatial Filtering Table 5 9 Smoothing 5 x 5 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 10 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Table 5 10 Smoothing 7 x 7 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 10 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
261. ixels designated by the Line Coordinates found outside the actual image are not replaced rma LL Image must be an RGB chunky image a Pixels Line U32 contains the pixel values as a 1D array of unsigned 32 bit integer controls E error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAO VI Error Clusters in Chapter 9 VI Overview and Programming Concepts a Image Out is the reference to the destination output image error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts El T The following graphic illustrates the use of this VI Line Coordinates Image Out 10 Color value arra E IMAQ Vision for G Reference Manual 22 20 National Instruments Corporation Chapter 22 Color VIs An array of red green and blue values also can be modified with the following sequence Line Caordinatez 132 an mage Ou Red Values Image E NE Blue Values IMAQ ColorlmageToArray Extracts the pixels from a color image or from part of a color image into a 2D array This VI returns the values as a 2D array of unsigned 32 bit integer indicators This 2D array can be converted into a 2D array of clusters coding the three color values as either R G B H S L or H S
262. ject expressed in gray level units e Mean Gray Value Mean intensity value in the object expressed in gray level units e Standard deviation Standard deviation of the intensity values e Minimum User Value Minimum intensity value in user units IMAQ Vision for G Reference Manual 8 18 National Instruments Corporation Chapter 8 Quantitative Analysis Maximum User Value Maximum intensity value in user units Sum User Value Sum of the intensities in the object expressed in user units Mean User Value Mean intensity value in the object expressed in user units Standard deviation Unit Standard deviation of the intensity values in user units Diverse Measurements These primary coefficients are used in the computation of measurements such as moments of inertia and center of gravity IMAQ Vision contains the following diverse measurement parameters O National Instruments Corporation SumX Sum of the x coordinates of each pixel in a particle SumY Sum of the y coordinates of each pixel in a particle SumXX SumYY SumXY Sum of x coordinates squared sum of y coordinates squared and sum of xy coordinates for each pixel in a particle Corrected Projection X Sum of the horizontal segments that do not superimpose any other horizontal segment Corrected Projection Y Sum of the vertical segments that do not superimpose any other horizontal segment 6 19 IMAQ Vision for G Reference Manual Chapter VI Ove
263. l combination of openings and closings It removes small particles and smoothes the contour of objects with respect to the template defined by the structuring element If I is the source image the proper opening extracts the intersection between the source image and its transformed image obtained after a closing followed by and opening and followed by another closing proper opening I AND I OCO I or proper opening I AND I DEEDDE where I is the source image E 1s an erosion D 1s a dilation O is an opening C is aclosing IMAQ Vision for G Reference Manual 7 20 O National Instruments Corporation Chapter 7 Morphology Analysis F I is the image obtained after applying the function F to the image and GF I is the image obtained after applying the function F to the image followed by the function G to the image 7 Proper Closing Function The proper closing function is a finite and dual combination of closings and openings It fills tiny holes and smoothes the inner contour of objects with respect to the template defined by the structuring element If I is the source image the proper closing extracts the union of the source image and its transformed image obtained after an opening followed by and closing and followed by another opening proper closing T ORU COC I or proper closing I OR J EDDEED D where I is the source image E is an erosion D 1s a dilation O is an opening C is a
264. l is assigned the Nth value of its neighborhood N being specified by the user P p Nth value in the series P m where the Pin m are sorted in increasing order The following example uses a 3 x 3 neighborhood Ps The following table shows the new output value of the central pixel for each Nth order value Nth Order New Pixel Value Note that for a given filter size f the Nth order can rank from 0 to f _ 1 For example in the case of a filter size 3 the Nth order ranges from 0 to 8 3 1 O National Instruments Corporation 5 27 IMAQ Vision for G Reference Manual Chapter 5 Spatial Filtering Examples To see the effect of the Nth order filter notice the example of an image with bright objects and a dark background When viewing this image with the B amp W or Gray palette the objects have higher gray level values than the background For a Given Filter Size f x f Example of a Filter Size 3 x 3 e If fN F 1 2 the Nth order Order 0 filter has the tendency to erode bright regions or dilate dark regions smoothes image erodes bright objects e If N 0 each pixel is replaced by its local minimum e IfN f 1 2 each pixel is Order 4 replaced by its local median value Dark pixels isolated in objects are removed as well as bright pixels isolated in the background The overall area of the background and object regions does not change equivalent to a median filter
265. l to X Step x Y Step Unit A Step mu If a pixel represents a square area then Y Step X Step Y Step Sampling Step The spatial calibration of an image can be performed using two methods e Pixel calibration or editing the dimensions of a single pixel e Distance calibration or editing a the length of a line selected in the image O National Instruments Corporation 8 1 IMAQ Vision for G Reference Manual Chapter 8 Quantitative Analysis Intensity Calibration Intensity calibration consists of correlating the gray scale values to user defined quantities such as optical densities or concentrations The intensity calibration of an image 1s performed in two steps e Selection of sample points in an image and calibration of their gray level value e Selection of a curve fitting algorithm to calibrate the entire gray scale The following example uses an 8 bit image or 256 gray levels Optical Density LUT p m c d V 2 220 Gray Level Unit Definition of a Digital Object In digital images objects can be defined by three criteria intensity threshold connectivity and area threshold Intensity Threshold Objects are characterized by an intensity range They are composed of pixels with gray level values belonging to a given threshold interval overall luminosity or gray shade Then other pixels are considered part of the background The threshold interval is defined by the two parameters Lower
266. lay window of pixels that have a value equal to Pixvalue For example if entry 7 of the Color LUT array parameter specifies R 255 G 0 B 0 every pixel with value 7 that the brush touches is painted red Get Set Set specifies that input parameters are set when the value is TRUE Set If the value is FALSE Get input parameters are ignored Output parameters are always effective H T Brush shape in This Boolean 2D array specifies the shape of the brush TRUE values in conjunction with brush width define the pixels that are affected in your drawing If your shape is described in a 3 x 3 grid use a pen size of 3 for viewing a complete portion of the shape If all values are FALSE the brush shape is not changed Fr 1 E Brush element size in specifies parameters that define the dimension of the brush element zu Brush Parameters in is a cluster consisting of the following parameters Brush Window is the number of the window in which the brush is active Density is a parameter with a value between 1 and 100 that defines the probability D 100 that a pixel will be written Use this parameter to generate spray effects Left 1 pix No is a Boolean that specifies whether a separation pixel is used between brush elements y IMAQ Vision for G Reference Manual 12 44 O National Instruments Corporation Chapter 12 Display Synchronous If this parameter is TRUE the drawing of the brush is denied unt
267. lest pixel value from the first class calculated in the histogram It can be equal to the Minimal value from the Interval Range or the smallest value found for the image type connected Interval Width returns the length of each class Mean Value returns the mean value of the pixels used in calculating the histogram Standard Deviation returns the standard deviation from the histogram A higher value corresponds to a better distribution of the values in the histogram and the image Area pixels returns the number of pixels used in the histogram calculation This is influenced by the contents of Image Mask Green or Sat Histogram Report is a cluster that returns the detailed results from a histogram calculated on the green or saturation plane depending on the Color Mode It has the same elements as found in Red or Hue Histogram Report Blue or Light or Val Histogram Report is a cluster that returns the detailed results from a histogram calculated on the blue lightness or value planes depending on the Color Mode It has the same elements as found in Red or Hue Histogram Report error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ Vision for G Reference Manual 22 8 O National Instruments Corporation Chapter 22 Color VIs IMAQ ColorHistograph Calculates th
268. long each diagonal running 5GL from bottom left to top right sL X Y Axis Averages is the linear average along each diagonal running from top left to bottom right arr error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ Quantify Quantifies the contents of an image or the regions within an image The region definition is performed with a labeled image mask Each mask has a single unique value e he R La 2 Image Global Report Image Mask Region Reports error in ho error at error out Image is the in rce image age 1s the input source g Image Mask is an 8 bit image specifying the regions to quantify in the image Only pixels in the original image that correspond to the equivalent pixel in the mask are used for the quantification Each pixel in this image mask indicates by its value which region belongs the corresponding pixel in Image 255 different regions can be quantified directly from the Image A quantification 1s performed on the complete image if the Image Mask is not connected error in no error is acluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Global Report is a cluster containing the q
269. losings 1 1 1 1 1 1 Lu Original Image Structuring Element After Opening After Closing 1 1 1 1 00100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 011 1 90 l l i i 00100 Ma Structuring Element After Opening Structuring Element After Closing External Edge Function The external edge subtracts the source image from the dilated image of the source image The remaining pixels correspond to the pixels added by the dilation Zf I is an image external edge I dilation I I XOR I dilation I Internal Edge Function The internal edge subtracts the eroded image from its source image The remaining pixels correspond to the pixels eliminated by the erosion If is an image internal edge TI I erosion I XORU dilation I O National Instruments Corporation 7 18 IMAQ Vision for G Reference Manual Chapter 7 Morphology Analysis External and Internal Edge Example This example uses the following binary source image Extraction using a 3 x 5 structuring element produces the following image The superimposition of the internal edge 1s in white and the external edge is in gray The thickness of the extracted contours depends on the size of the structuring element Hit Miss Function You can use the hit miss function to locate particular configurations of pixels It extracts each pixel of an image that is placed in a neighborhood matching exactly the template defined by the structuring element Depending on the conf
270. lusters in Chapter 9 VI Overview and Programming Concepts IMAQ ArrayToCompleximage Creates a complex image starting from a complex 2D array CSG ic PP Image Image Pixels Complex error in na error EET Image is the reference to the complex image to be created coal Image Pixels Complex is the complex 2D array Line Column containing all the pixel values that form the image The first index corresponds to the vertical axis and the second to the horizontal index The final size of the image is equal to the size of the array The image passed in the input Image is forced to the same size as the complex 2D array encoded by Input Pixels O National Instruments Corporation 21 15 IMAQ Vision for G Reference Manual Chapter 21 Complex VIs error in no error is a cluster that describes the error status before this zm n VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts zu Image Out is the reference to the destination output image zu error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ ComplexPlaneToArray Extracts the pixels from the real part imaginary part magnitude or phase from a complex image into a floating point 2D array 3 La
271. m Factor Center Point returns the actual Center Point X is the horizontal coordinate National Instruments Corporation 12 39 IMAQ Vision for G Reference Manual Chapter 12 Display zmn Note Y is the vertical coordinate error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts The interactive zoom tool produces the same results as a homogeneous X and Y zoom it doubles or reduces by shift clicking the dimensions of the pixels in the image window by a factor of 2 For example if you have a 5 x 3 zoom and you click with the zoom tool you produce a 10 x 6 zoom If you shift click you produce a 2 x 1 zoom Note that zoom is bounded by the highest absolute value in X or Y if you have a 10 x 2 you cannot zoom in because the double of I0 is greater than 16 IMAQ SetUserPen Defines a pen with user specified features The user pen affects each region tracked with the freehand tools No other ROI selection tools work with user pen A Note 5 Paint made Fen transfer made Pen style Foreground color Background color Pen pattern 8x8 User pen active no Fen width eror in na error Paint mode indicates the mode of painting in zoom mode Paint mode has three possible values don t change Paint or Frame This mode is useful only in positive zo
272. m of the same image in a linear and logarithmic scale In this particular image three pixels are equal to 0 This information is unobservable in the linear representation of the histogram but evident in the logarithmic representation Phy Figure 2 3 Linear Vertical Scale Figure 2 4 Logarithmic Vertical Scale A line profile plots the variations of intensity along a line This utility is helpful for examining boundaries between components quantifying O National Instruments Corporation 2 IMAQ Vision for G Reference Manual Chapter 2 3D View Tools and Utilities the magnitude of intensity variations and detecting the presence of repetitive patterns The following figure illustrates a line profile Intensity Max Intensity Min Starting point Ending Point The peaks and valleys reveal increases and decreases of the light intensity along the line selected in the image Their width and magnitude are proportional to the size and intensity of their related regions For example a bright object with uniform intensity appears in the plot as a plateau The higher the contrast between an object and its surrounding background the steeper the slopes of the plateau Noisy pixels on the other hand produce a series of narrow peaks The 3D view illustrated in the following graphic displays a three dimensional perspective of the light intensity in an image It gives a relief map of the image in which high intensity values ar
273. mage This size represents the maximum size of bytes that can be transferred For example for an 8 bit image of size 256 x 256 and border 1 the line width 1s 272 and the maximum transfer size from pixel 0 0 1s 69632 bytes error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAO VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Example The following graphic illustrates a typical implementation scheme for IMAQ GetImagePixelPtr a True le Call Library Function E transferivoid buffer int x 2 Lint y int de int di zm am oy lot F d Unmap Pixel Pointer This VI receives an image and a rectangle The transfer call needs five parameters destination address X and Y start coordinates and the X and Y size of the transfer This VI uses the following steps e From the image rectangle computes the image size e Resizes the image and obtains a pixel pointer on the coordinates 0 0 of the image e Verifies that the maximum transfer size is compatible with the parameters needed by the called library e If everything is correct begins transferring e Unmaps the pixel pointer Note The transfer call as it is shown above only supports images with a border width of zero that have a horizontal size aligned on a multiple of 8 This restriction exists because no passed parameter discriminates between t
274. mage starting from a 2D array of floating point values 5 La 2 Plane Image Image Pixels float error in na error Plane specifies which component of the complex image is replaced with the values encoded in the array of floating points Image Pixels The following values are valid O Default Real 1 Imaginary Image is the reference to the input complex image sL Image Pixels Float is a 2D floating point array Line Column containing all the pixel values that form the image The first index corresponds to the vertical axis and the second to the horizontal index National Instruments Corporation 21 17 IMAQ Vision for G Reference Manual Chapter 21 Complex VIs zmn zmn zmn The final size of the image is equal to the size of the array The image passed in the input Image is forced to the same size as the array encoded by Input Pixels error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Out is the reference to the destination output image error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ ComplexPlaneTolmage Extracts the pixels from the real part imagi
275. mage Mask input The connection of the same image to both inputs Image and Image Mask also gives the same effect as leaving the input Image Mask unconnected except in this case the Image must be an 8 bit image The following connection schema applies to VIs performing an operation that fills an image Image Image Out Parameters Examples of this type of operation include reading a file a video acquisition or transforming a G 2D array IMAQ ArrayTolmage into an image This type of VI can modify the size of an image The following connection schema applies to VIs that process an image Image Src Image Dst Image Dzt Out Parameters This connection is the most common type in IMAQ Vision The Image Src input receives the image to process The Image Dst output can receive either another image or the original depending on your goals If two different images are connected to the two inputs then the original Image Src image is not modified If the Image Dst and Image Src inputs receive the same image then the processed image is placed into the original image and the original image data is lost A shortcut exists to join the two inputs if you prefer to have a single image for both source and destination In this case you can connect only the Image Src input Functionally this shortcut is equivalent to connecting the same image to Image Dst The following graphic illustrates the two functionally equivalent connections
276. mension 1s the horizontal axis In memory the pixels are stored in the order of the X axis Y Dimension 132 X Dimension 132 Array 0 0 Array 1 0 Array X Dimension 1 0 Array 0 Y Dimension 1 Array X Dimension 1 Y Dimension 1 Connectivity 4 8 Specific label and particle measurement VIs possess the input Connectivity 4 8 This parameter determines how the algorithm determines whether two adjacent pixels are part of the same particle Connectivity 4 Connectivity 8 Example The gray points in the original image define the particle In connectivity 4 six particles are detected In connectivity 8 three particles are detected B E na ann E ma n arae aat EA EE Lum E EE LLL LESSESM Original Image Connectivity 4 Connectivity 8 Particles O National Instruments Corporation 9 15 IMAQ Vision for G Reference Manual Chapter 9 VI Overview and Programming Concepts us Structuring Element A structuring element is a 2D G array It is used specifically for morphological transformations The values contained in this array are either 0 or 1 These values dictate which pixels are to be taken into account during processing The use of a structuring element requires that the image contain a border The application of a 3 x 3 structuring element requires a minimal border size of 1 In the same way a structuring elements of 5 x 5 and 7 x 7 require a minimal border size of 2 and
277. mming Concepts Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts O National Instruments Corporation 14 1 IMAQ Vision for G Reference Manual Chapter 14 Conversion VIs The conversion rules are performed as a function of the image type specified by Image Src and Image Dst The image type encoded by Image Dst defines the how the conversion is performed The conversion rules are described in the following table Pixel values are recopied 0 to 255 Pixel values are copied into each of the three color planes red green and blue Pixel values less than 0 are set to 0 Pixel values between 0 and 255 are recopied Pixel values greater than 255 are set to 255 Pixel values are recopied 32768 to 32767 Pixel values are copied into each of the three color planes red green and blue with the same conversion rule as 16 bit to 8 bit Pixel values less than 0 are set to 0 Pixel values between 0 and 255 are recopied Pixel values greater than 255 are forced to 255 Pixel values less than 32768 are set to 32768 Pix
278. mn B B Starting Value is always equal to O here This parameter is returned in the type Histogram Report as in the VI IMAQ Histograph Incremental Value returns the incrementing value that specifies how much to add to Starting Value in calculating the median value of each class from the histogram The median value x from the nth class is x Starting Value n x Incremental Value Histogram returns the histogram values in an array The elements found in this array are the number of pixels per class the nth class contains all pixel values belonging to the interval Starting Value n 1 x Interval Width Starting Value n x Interval Width 1 Green or Sat Histogram Graph is a cluster that returns the detailed results from a histogram calculated on the green or saturation plane depending on the Color Mode It has the same elements as found in Red or Hue Histogram Graph Blue or Light or Val Histogram Graph is a cluster that returns the detailed results from a histogram calculated on the blue lightness or value planes depending on the Color Mode It has the same elements as found in Red or Hue Histogram Graph error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts O National Instruments Corporation Chapter 22 Color VIs IMAQ ColorThreshold Applie
279. mputes the energy center of the image Le te R La 2 Image Image Mask eror in no error IMAQ Vision for G Reference Manual 19 10 O National Instruments Corporation Chapter 19 Analysis VIs Image is the reference to the image whose centroid has to be calculated a Image Mask is an 8 bit image specifying the region in the image to use for calculating a centroid Only pixels in the original image that correspond to the equivalent pixel in the mask are used for calculating the centroid provided that the value in the mask is not 0 A centroid on the complete image occurs if the Image Mask is not connected a error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Centroid is a cluster containing the X and Y coordinates of the centroid of the image a Ep error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAO VI Error Clusters 1n Chapter 9 VI Overview and Programming Concepts IMAQ BasicParticle Detects and measures particles This VI returns the area and position of particles in a binary image Ls La Image Basic Reports Mumber of Particles error in no error af error out Image is the input source image used for calculating the matrices The im
280. must be square 4 2nd Diagonal Based on the second diagonal of the image the image must be square Image Src is the reference to the source input image Image Dst is the reference of the image destination If it is connected cmo it must be the same type as the Image Src asr error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAO VI Error Clusters in Chapter 9 VI Overview and Programming Concepts zu Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src O National Instruments Corporation 20 7 IMAQ Vision for G Reference Manual Chapter 20 Geometry VIs zu error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ Vision for G Reference Manual 20 6 National Instruments Corporation Chapter Complex Vis This chapter describes the Complex VIs Frequency processing 1s another technique for extracting information from an image Instead of using the location and direction of light intensity variations frequency processing allows you to manipulate the frequency of
281. n Chapter 2 Tools and Utilities Temperature Palette This palette has a gradation from light brown to dark brown 0 is black and 255 is white Rainbow Palette This palette has a gradation from blue to red with a prominent range of greens in the middle value range 0 is black and 255 is white o ee 128 192 255 Gradient Palette This palette has a gradation from red to white with a prominent range of light blue in the upper value range 0 is black and 255 is white AZ 125 192 255 O National Instruments Corporation 2 3 IMAQ Vision for G Reference Manual Chapter 2 Tools and Utilities Binary Palette This palette has 16 cycles of 16 different colors where g 1s the gray level value and g 0 corresponds to R 0 G 0 B 0 which appears black g 1 corresponds to R 1 G 0 B 0 which appears red g 2 corresponds to R 0 G 1 B 0 which appears green and so forth Red Green Blue 1h This periodic palette is appropriate for the display of binary and labeled images Image Histogram Definition The histogram of an image indicates the quantitative distribution of pixels per gray level value It provides a general description of the appearance of an image and helps identify various components such as the background objects and noise The histogram is the function H defined on the gray scale range O k 255 such that the number of pixels equal to the gray level v
282. n The Laplacian convolution filter is a second order derivative and its kernel uses the following model a Sa Qa amp a Snog where a b c and d are integers The Laplacian filter has two different effects depending on whether the central coefficient x is equal to or greater than the sum of the absolute values of the outer coefficients x 2 2 al b c d National Instruments Corporation 5 13 IMAQ Vision for G Reference Manual Chapter 5 Spatial Filtering Contour Extraction and Highlighting If the central coefficient is equal to this sum x 2 a b c d the Laplacian filter extracts the pixels where significant variations of light intensity are found The presence of sharp edges boundaries between objects modification in the texture of a background noise and other effects can cause these variations The transformed image contains white contours on a black background Examples Notice the following source image Laplacian kernel and filtered image Source Image Laplacian 1 Filtered Image If the central coefficient is greater than the sum of the outer coefficients x gt 2 a b c d the Laplacian filter detects the same variations as mentioned above but superimposes them over the source image The transformed image looks like the source image with all significant variations of the light intensity highlighted Source Image Laplacian 2 Filtered Image IMAQ Vision for G
283. n 6 10 overview 6 2 truncation 6 10 to 6 12 lowpass FFT filters 6 6 to 6 9 attenuation 6 7 to 6 8 overview 6 2 truncation 6 8 to 6 9 mask FFT filters overview 6 3 overview 6 1 to 6 3 frequency processing 21 1 O National Instruments Corporation l 5 Index G Gaussian convolution filter 5 20 Gaussian filters 5 20 to 5 22 definition 5 20 example 5 20 to 5 21 kernel definition 5 21 predefined Gaussian kernels 5 21 to 5 22 Geometry VIs 20 1 to 20 8 IMAQ 3DView 20 1 to 20 4 IMAQ Rotate 20 4 to 20 5 IMAQ Shift 20 5 to 20 6 IMAQ Symmetry 20 7 to 20 8 gradient convolution filter 5 5 gradient filter 5 4 to 5 12 definition 5 4 edge extraction and edge highlighting 5 7 to 5 9 edge thickness 5 9 example 5 5 filter axis and direction 5 6 to 5 7 kernel definition 5 5 to 5 6 nonlinear 5 25 predefined gradient kernels 5 10 to 5 12 Prewitt filters 5 10 Sobel filters 5 11 to 5 12 gradient palette 2 3 gray B amp W palette 2 2 gray level images number of bytes per pixel table 1 4 types of 1 3 gray level morphology 7 32 to 7 38 See also IMAQ GrayMorphology VI auto median function 7 38 closing function 7 35 to 7 36 dilation function 7 33 to 7 34 erosion function 7 33 to 7 34 opening function 7 34 to 7 36 proper closing function 7 37 proper opening function 7 36 to 7 37 gray level value 1 1 IMAQ Vision for G Reference Manual Index H hexagonal frame 1 8 See also Square Hexa inp
284. n IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts a IMAQ Vision for G Reference Manual 18 16 National Instruments Corporation Chapter 18 Morphology VIS IMAQ Separation Separates touching particles particularly small isthmuses found between particles It performs n erosions n Nb of erosions and then reconstructs the final image based on the results of the erosion If during the erosion process an existing isthmus has been broken or removed then the particles are reconstructed without the isthmus The reconstructed particles however have the same size as the initial particles except that they are separated If during the erosion process no isthmus has been broken then the particles are reconstructed as they were initially found no changes are made The source image must be an 8 bit binary image The source image must have a border greater than or equal to 1 La 3 Square Hexa Square Image Src Image List Out Image Dist Mb af Erosion TT Structuring Element j error out error in na error E Square Hexa Square specifies whether the pixel frame is treated as square or hexagonal during the transformation The default 1s square 3 Image Src is the reference to the source input image a Image Dst is the reference to the destination image If it is connected it must be the same type as the Image Src Nb of Erosion specifies the number of erosions that are used to
285. n IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts zu Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src IMAQ Vision for G Reference Manual 13 4 National Instruments Corporation Chapter 13 Tool VIs Eu error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts For example if a 512 x 512 image is connected and the X Step Size and Y Step Size are both equal to 2 then the resulting image has a resolution of 256 x 256 The resulting image contains the lines from the Image Src 0 2 4 510 and the columns 0 2 4 510 from the Image Src The input images must be of the same image type The following graphic illustrates an extraction of an image where X Step Size equals 2 and Y Step Size equals 3 aver s ve sz s IMAQ Expand Expands duplicates an image or part of an image with adjustment of the horizontal and vertical resolution e he F ls n Optional Rectangle Image Src Image Dst Out Image List 2 Duplication Step Ti Y Duplication Step LE error aut eror in na error 13 2 Optional Rectangle defines an array fou
286. n be determined from an analysis of your intended application The decision is based upon different processing phases and your need to keep the original image after each processing step Video Acquisition Captured Image in Gray MAG Fe shed In the preceding example two images Gray and Binary are created and at the first stage are completely empty the size is equal to 0 0 After the video acquisition the Gray image contains the captured image at a size x y Then a thresholding is performed using the VI IMAQ Threshold Note that this VI possesses two inputs Image Src and Image Dst that receive the images Gray and Binary respectively Immediately prior to the execution of this function IMAQ Threshold the size of the Binary image is 0 0 Immediately following this IMAQ Vision for G Reference Manual 9 10 National Instruments Corporation Chapter 9 VI Overview and Programming Concepts threshold the Binary image has the exact same size as the Gray image and contains the data resulting from the threshold Gray image Depending on the type of function performed by a VI different combinations of input and output are possible In the above example the Gray image is intact because it is connected only to the input Image Src You can use this flexibility to decide as in the case above which image is to be processed and where the resulting image is to be stored The output Image Dst Out from a VI gives the same image clust
287. n icon that denotes whether the VI is included in both the Base and Advanced versions Fi or the Advanced version only FY Vis in the Base and Advanced Versions Both versions of IMAQ Vision contain the following VI families Name p VI p Chapter Functionality of VIs Management Creating listing and disposing of image structures Error handling for all the VIs in IMAQ Vision Files Image acquisition Reading and writing images to and from disk files Display All aspects of image visualization color palettes and basics special its control you can control up to 16 image windows as tools and user well as six user floating windows Image window managers that you can use to select various tools for creating and manipulating a region of interest Tools Manipulation of images for example reduction pixels image expansion extraction and modification of pixel values and diverse Transformation of the contents of an image to and from a LabVIEW array Certain Tools and Analysis VIs are restricted to the Advanced version of IMAQ Vision IMAQ Vision for G Reference Manual 9 6 National Instruments Corporation Chapter 9 VI Overview and Programming Concepts Analysis Analysis of the contents of an image Geometry 3D view rotate shift and symmetry threshold Manipulation of color images planes conversions External Library Support Access to information about image pixel organization Useful for creating de
288. n strikeout Italic If TRUE text appears in italic Underline If TRUE text appears underlined Outline If TRUE text appears outlined Shadow If TRUE text appears shadowed Bold If TRUE text appears in bold Size is the size of the font The default is 9 Alignment specifies the alignment of the text The followin 132 g p 2 8 132 values are possible Left default Center and Right error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAO VI Error Clusters 1n Chapter 9 VI Overview and Programming Concepts Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src E StringWidth returns the string length from the text O National Instruments Corporation 13 29 IMAQ Vision for G Reference Manual Chapter 13 Tool VIS ET error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ MagicWand Creates an image mask by extracting a region surrounding a reference pixel called the origin and using a tolerance or of intensity variations based on this reference pixel Us
289. na error E error out O National Instruments Corporation 23 1 IMAQ Vision for G Reference Manual Chapter 23 External Library Support VIs B i Note Function has three modes O Map Pixel Pointer Obtains the pointer on a pixel of an image and obtains information related to the organization of the pixels of this image in memory Unmap Pixel Pointer Frees the pointer and related information previously obtained using Map Pixel Pointer 2 Get Pixel Info Obtains information related to the organization of the pixels of an image in memory without mapping a pointer Image is the reference of the image on which the pointer is obtained Pixel Pointer in is only used in the Unmap Pixel Pointer mode see the Function description When the VI is executed to obtain a pointer using the Map Pixel Pointer function some information regarding the pointer that is required to unmap the pixel pointer is recorded You need to give this pointer to the VI to retrieve this information when executing the Unmap Pixel Pointer function X Coordinate allows you to select the X coordinate of the pixel in the image on which the pointer is required This parameter is not used in the mode Unmap Pixel Pointer mode The default is 0 Y Coordinate allows you to select the Y coordinate of the pixel in the image on which the pointer is required This parameter is not used in the mode Unmap Pixel Pointer mode The default is 0 error in no error
290. nal Instruments Corporation 18 11 IMAQ Vision for G Reference Manual Chapter 18 Morphology VIs ET error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ Convex Calculates a convex envelope for particles that are labeled in an image You need to execute IMAQ Label prior to this VI in order to label the objects in the image La La Image Src Image Dst Out Image List erar in na errar E error aut Image Src is the reference to the source input image Image Dst is the reference to the destination image If it is connected it must be the same type as the Image Src error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src a error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAO VI Error Clusters in Chapter 9 VI Overview and Programming Concepts a IMAQ
291. nal values F El Image Src is the reference to the source input image Image Dst is the reference to the destination image If it is connected it must be the same type as the Image Src Range is a cluster specifying the threshold range It is composed of the following elements E B E Lower value is the lowest pixel value used during a threshold The default is 128 Upper value is the highest pixel value used during a threshold The default is 255 O National Instruments Corporation 16 1 IMAQ Vision for G Reference Manual Chapter 16 Processing Vls All pixels not contained between Lower value and Upper value are set to 0 All values found between this range are replaced by the value entered in Replace Value if Keep Replace Value Replace is set to TRUE Replace Value is the value used to replace pixels between the Lower value and Upper value This operation requires that Keep Replace Value Replace be set to TRUE El dE Note You should use a binary palette when you plan to visualize an image to which a threshold has been applied in Replace mode However which palette to use for visualization depends on the value of Replace Value For example the visualization of a threshold image could be performed with a gray palette However in this case it is advised that you use a replacement value of 255 white to see the threshold image better Ep error in no error isa cluster that describes the error status befo
292. nary part magnitude or phase from a complex image 2 x 32 bit floating point into an 8 bit 16 bit or 32 bit floating point image PP Plane Image Src E Image Dist Out Image List eror in no error E error out Plane indicates which component of the complex image is extracted The following values are valid O Default Real Imaginary 2 Magnitude 3 Phase IMAQ Vision for G Reference Manual 21 18 National Instruments Corporation Chapter 21 Complex VIs Image Src must be a complex image Image Dst must be an 8 bit 16 bit or 32 bit floating point image an error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAO VI Error Clusters 1n Chapter 9 VI Overview and Programming Concepts zu Image Dst Out is the reference to the destination output image which receives the processing results of the VI It is the same as Image Dst zu error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ ImageToComplexPlane Extracts the pixels from an 8 bit 16 bit or 32 bit floating point image into the real part or imaginary part of a complex image 2 x 32 bit floating point 8 he e La 2 Plane Image 5rc E Image Dist Out Image List erar in na error ab e
293. nce Manual 12 28 National Instruments Corporation Chapter 12 Display Display User This library enables the advanced user to create and manipulate user windows These palettes user windows are defined by the user and can be used to create sophisticated applications The user window is constructed from two images that are dynamically loaded Within these images there are defined zones that respond to a user click just like the buttons in LabVIEW or BridgeVIEW These zones can be used to control events and their actions interpreted and processed by LabVIEW or Bridge VIEW These palettes are created in the following manner e Loading a foreground image that appears when a zone has not been chosen e Loading a background image that appears when a zone has been chosen e Specifying the coordinates of the zones and their mechanical action how they function IMAQ WindUserSetup Loads and configures the user window Window Number 17 22 Foreground Image Background Image User Mechanical Actions User Rectangles error in no error Window Number 17 22 is a number from 17 to 22 that specifies the user window It is possible to manipulate six different user windows The default value is 17 E Foreground Image is an 8 bit or RGB user image The corresponding part of the image is displayed when a zone within this image is FALSE E Background Image is an 8 bit or RGB user image The corresponding part of the image i
294. nce to the image structure containing the data read from the image file File Type indicates the file type that is read This string contains the three indicative characters of the read file APD internal file format TIF BMP Windows only and PICT Macintosh only File Type returns xxx if the file format is unknown E T File Data Type indicates the pixel size defined in the header for standard image file types File Options are not necessary for reading standard image files For other types of image files the returned values are passed from File Options File Data Type Note that the original file type is never modified because only the image in memory is converted Color Palette contains the RGB color table 1f the file has one read from the file when the user passes the value TRUE for the input Load Color Palette No r1 iD ol Lal National Instruments Corporation 11 3 IMAQ Vision for G Reference Manual Chapter 11 File Vis Y ou can use this VI to open and display an image as illustrated in the following graphic False Jr rrr roro rororo rororo rar IMAQ GetFilelnfo Obtains information regarding the contents of the file This information is supplied only if the file has a standard file format APD BMP TIF PICT n Calibration File Path File Type i File Data Type 2 Resolution error in no error y Y Resolution error out File Path is the complete path name including drive direc
295. ncepts IMAQ Vision for G Reference Manual 12 20 O National Instruments Corporation Chapter 12 Display The following graphic illustrates how to use IMAQ WindLastEvent MAD indToolsSetuph Case of Draw Event window number where the event appeared i Event Click Draw Move Resize Scroll Activate Close E j Tool used for Drawing Line Rectangle ete IB ind Tools Shows 2 m M Draw Coordinates in the image width amp Height Other parameters if Tools is a Line IMAQ WindZoom Obtains or modifies the status of the zoom factor Window Number 0 15 oom Factor oom Factor Center Point Center Point Get Set Status Set T eror in na error error aut Window Number 0 15 is a number from 0 to 15 that specifies the image window The default value is O Zoom Factor can have the following values 1 to 16 and 1 to 16 The default value is 1 1mage is displayed at its original size Center Point is a structure containing two elements containing the x y coordinates used to center the image in the image window This enables the user to center an image with respect to a user chosen region Additionally Center Point can be used to place only a part of an image into an image window This value is adjusted automatically when Center Point is not coherent with the size of the image window and the zoom factor For example an image at 256 x 256 displayed in an image window of 256 x 256 cont
296. ndex classification summary table 5 3 definition 5 1 Gaussian filters 5 20 to 5 22 example 5 20 to 5 21 kernel definition 5 21 predefined Gaussian kernels 5 21 to 5 22 gradient filter 5 4 to 5 12 edge extraction and edge highlighting 5 7 to 5 9 edge thickness 5 9 example 5 5 filter axis and direction 5 6 to 5 7 kernel definition 5 5 to 5 6 predefined gradient kernels 5 10 to 5 12 Prewitt filters 5 10 Sobel filters 5 11 to 5 12 Laplacian filters 5 12 to 5 17 contour extraction and highlighting 5 14 to 5 15 contour thickness 5 15 to 5 to 16 example 5 12 to 5 13 kernel definition 5 13 predefined kernels 5 16 to 5 17 linear filters or convolution filters 5 3 to 5 22 nonlinear filters 5 22 to 5 28 differentiation filter 5 25 example 5 24 gradient filter 5 25 lowpass filter 5 26 median filter 5 27 Nth order filter 5 27 to 5 28 Prewitt filter 5 23 Roberts filter 5 25 Sigma filter 5 26 Sobel filter 5 23 smoothing filter 5 17 to 5 20 example 5 17 to 5 18 kernel definition 5 18 to 5 19 predefined smoothing kernels 5 19 to 5 20 IMAQ Vision for G Reference Manual 1 14 spatial resolution 1 1 Square function example 3 10 exponential and gamma correction 3 9 transfer function and effect table 3 4 Square Root function example 3 8 logarithmic and inverse gamma correction 3 7 transfer function and effect table 3 3 Square Hexa input 9 16 to 9 17 18 2 standard representation FFT dis
297. ng Concepts IMAQ ArrayTolmage Creates an image from a 2D array Ls he F n Image Image Pisels L18 Image Pirels 116 Image Pisele float error in na error Note For this VI you have a choice of inputs depending on how the data is encoded see the following descriptions Image is the reference to the source input image us Image Pixels is a 2D array Line Column containing all the pixel values that form the image The first index corresponds to the vertical axis and the second to the horizontal index The final size of the image 1s equal to the size of the array The image passed in the input image 1s forced to the same size as the array encoded by Input Pixels This input should only be used to create an 8 bit image 116 Image Pixels 116 is a 2D array of 16 bit integers This input must be used 1f the image connected is a 16 bit image This input should only be used to create a 16 bit signed image 561 Image Pixels float is a 2D array of floating point values This input must be used if the image connected is a 32 bit floating point image This input only should be used to create single plane images that are not encoded as 8 bit 16 bit signed or complex O National Instruments Corporation 13 23 IMAQ Vision for G Reference Manual Chapter 13 Tool Vls error in no error is a cluster that describes the error status before this zm n VI executes For more information about this control see the sec
298. ng erosions dilations closings openings edge detection thinning thickening hole filling low pass high pass distance mapping and rejection of particles touching the border Morphology functions for modifying gray scale images including erosions dilations closings openings and auto median Frequency processing including FFT Inverse FFT Truncation Attenuation Addition Subtraction Multiplication and Division for complex images Functions for extraction and manipulation of planes 9 8 O National Instruments Corporation Chapter 9 VI Overview and Programming Concepts In the Advanced version the following VIs are added to the existing VI families Name of VI Icon Family Chapter Functionality of VIs Tools 13 Calibration control of offset and the ability to create a mask starting from a user selected point and a user defined tolerance value Analysis 19 Simple and complex particle detection Extraction of measurement and morphological coefficients for each object in an image Manipulation of Images by IMAQ Vision An 8 bit encoded image possessing a resolution 512 x 512 occupies 262 144 bytes or 256 KB of memory Because LabVIEW and Bridge VIEW cannot realistically handle these large regions of memory IMAQ Vision itself is responsible for managing these image spaces Inherent in all VIs belonging to the IMAQ Vision library is an input of one or more image structures These structures are manage
299. nge are replaced by the value entered in Replace if Replace is set to TRUE Image Src is the reference to the source input image Image Dst is the reference to the destination image If it is connected it must be the same type as the Image Src Ep error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src T error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts The threshold operations are performed in the order that the data is received from Threshold Data A pixel can be taken into account only once even if the pixel is included in the threshold range of two different thresholds by Threshold Data For example a VI contains two clusters on input Cluster 1 Lower value 80 Upper value 150 Keep Replace Value TRUE Replace Value 255 Cluster 2 Lower value 120 Upper value 200 Keep Replace Value FALSE O National Instruments Corporation 16
300. nimum border of 2 and so forth The border size of the destination image is not important A convolution matrix must have odd sized dimensions so that it contains a central pixel The function does not take into account the odd boundary furthest out on the matrix if one of the Kernel dimensions is even For example if the input Kernel is 6 x 4 X 26 and Y 4 the actual convolution is 5 x 3 Both the sixth line and the fourth are ignored Remember the second dimension in a G array is the vertical direction Y Calculations made with an 8 bit or 16 bit Image Src input are made in integer mode provided that the kernel contains only integers Calculations made with a 32 bit floating point Image Src input are made in floating point mode Note that the processing speed 1s correlated with the size of the kernel A 3 x 3 convolution processes nine pixels while a 5 x 5 convolution processes 25 pixels IMAQ GetKernel Reads a predefined kernel This VI uses the contents of a convolution catalog imaqknl txt This VI outputs a specified kernel after reading the kernel associated code This code consists of three separate units Kernel Family Kernel Size and Kernel Number If you already know the code you can enter it directly with Kernel Code La La Kernel Family Rernel Size 3 5 Kernel Humber Kernel code Kernel Cade y E error out error in na error O National Instruments Corporation 17 3 IMAQ Vision for G Reference Ma
301. nnonnnnnnnnnnnnnnnnnnnnnnonnnononnnnnos 3 0 Chapter 4 Operators Concepts and Mathematics dd 4 Are LIC OPAOS dd 4 2 LOGIC Opera a iD ner 4 2 Bach A A nnn re RE en nrc ren te eRe re ee eee 4 4 Example lt ata 4 5 EXAMPLE Os 4 6 Chapter 5 Spatial Filtering Concept and Mathematica 5 1 Spatial Filter Classification Summary ccccccessccceeccceccceeceeceeeeceeeeeeeeeeeeeeess 5 3 Linear Filters or Convolution Pts ei rH HT Pr TR S ARR CO REENERE 5 3 Gradient A O a une as tot Use Pus 5 4 PExanmplectu cece anal 5 5 Gs AAA ERE EDU yummie p Eo itu dass oi t don 5 5 Filter Axis and Direction 2 ete PUO is 5 6 A outta tipa er ieee nC REET rer de 5 7 Edge Extraction and Edge Highlighting ooooocconccncccnocnnnnnnnnnnnnns 5 7 Edse TTC kei ados ia 5 0 IMAQ Vision for G Reference Manual vi O National Instruments Corporation Contents Predefined Gradient Keenan das 5 10 Peut EE S ura 5 10 SOE Dl tels tata aii 5 11 Laplacian Fer E 5 12 DA A E O EE E O OO E dM LOP ELI SIM ILICE 5 12 Kernel Denia eda bea urba oda eatur adt 5 13 Contour Extraction and Highlighting eese 5 14 e A A 5 14 Contour Teknear aaa 5 15 Predefined Laplacian Kernels ee erret orto pes 5 16 SiG Othin Filter O Led EL eee Lp op avete e aU UU 5 17 EXample ie 5 17 Kernel Delbtniblof o ecoute omar uerit A A ed or enel 5 18 EXAMPLES Is ies 5 18 Predefined Smoothing Kernels seen 5 19
302. not transfer the original image into a new memory space The original image is lost IMAQ Vision for G Reference Manual Chapter 13 Tool Vls IMAQ Extract Extracts reduces an image or part of an image with adjustment of the horizontal and vertical resolution Le he F ls n Optional Rectangle Image 5rc Image Dist Out Image List A Step IZ ri Y Step Size j error out error in no error Optional Rectangle defines an array four elements containing the coordinates Left Top Right Bottom of the region to extract The operation is applied to the entire image if the input is empty or not connected I32 LL Image Src is the reference to the source input image Image Dst is the reference to the destination image If it is connected it must be the same type as the Image Src X Step Size is the vertical sampling step which defines the columns to be extracted the horizontal reduction ratio For example with an X Step Size equal to 3 one out of every three columns is extracted from the Image Src into the Image Dst Each column is extracted if the default value 1 1s used E HE Y Step Size is the horizontal sampling step which defines the lines to be extracted the vertical reduction ratio Each row is extracted if the default value 1 is used error in no error is a cluster that describes the error status before this E VI executes For more information about this control see the sectio
303. ns 12 new VIs that help you make more sophisticated user front panels IMAQ WindSetup Configures the look and attributes of an image window Window Number 0 22 Window can grow Yes Window has tithe bar Yes 7 7 Window is floating Ma 7 error in no error Window Number 0 22 selects the window to configure The default is O IMAQ Vision for G Reference Manual 12 34 O National Instruments Corporation Chapter 12 Display T Window can grow Yes enables or disables the user resize window box Default is TRUE which indicates windows the user can resize T Window can close Yes shows or does not show the close box of the window The default is TRUE which shows the close box T Window has title bar Yes shows or does not show the title bar The default is TRUE which shows the title bar T Window is floating No produces either a normal or a floating window The default is FALSE which produces a floating window error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAO VI Error Clusters 1n Chapter 9 VI Overview and Programming Concepts Ep error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAO VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ WindGetMouse When the mouse is moved over an active
304. nsigned 32 bit integer control 2 0 Y Coordinate is the vertical position of the pixel error in no error isa cluster that describes the error status before this VI executes For more information about this control see the section IMAO VI Error Clusters 1n Chapter 9 VI Overview and Programming Concepts zu Image Out is the reference to the destination output image O National Instruments Corporation 22 17 IMAQ Vision for G Reference Manual Chapter 22 Color Vis ET error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts The following graphic illustrates the use of this VI Image Out A Coordinate Y Coordinate A Coordinate T Coordinate IMAQ GetColorPixelLine Extracts a line of pixels from a color image This VI returns an array of unsigned 32 bit integer indicators This array can be converted into an array of clusters coding the three color values as either R G B H S L or H S V using the VI IMAQ IntegerToColorValue 5 Fisele Line 113 2 Line Coordinates error in na error d E error aut Image must be an RGB chunky image IMAQ Vision for G Reference Manual 22 18 O National Instruments Corporation Chapter 22 Color VIs 132 Line Coordinates is an array specifying the two endpoints of the line to extract Note A line des
305. nual Chapter 17 Filter Vis zmn Kernel Family determines the type of matrix The valid values are between 1 and 4 each associated with a particular type This value corresponds to the thousandth unit in the researched code Gradient 2 Laplacian 3 Smoothing 4 Gaussian Kernel Size 3 5 determines the horizontal and vertical matrix size The values are 3 5 and 7 corresponding to the convolutions 3 x 3 5 x 5 and 7 x 7 supplied in the matrix catalog This value corresponds to the hundredth unit in the researched code Kernel Number is the matrix family number It is a two digit number between 0 and n belonging to a family and a size A number of predefined matrices are available for each type and size Kernel Code is a code that permits direct access to a convolution matrix cataloged in the file imagkn1 txt Each code specifies a specific convolution matrix This input is used under the conditions that it is connected and is not 0 The kernel located in the file then is transcribed into a 2D G array that is available from the output Kernel The user can use the codes to specify a predefined kernel as well as to create new user coded kernels The coding syntax is simple to employ and is broken down in he following manner FSnn where F is the kernel family 1 to 4 S is the kernel size 3 5 and so forth and nn is the kernel number based on the family and size of the kernel error in no error is a cluster th
306. ociated with it Note This value is independent of the size of the scroll bars T Scrollbars N controls the presence of scroll bars in an image window By default scroll bars are not used An image window can be resized and moved by the user in the presence or absence of scroll bars Get Set Status Set determines if the user wants to know the position of an image window or specify the position of an image window The default value is TRUE Set H TJ Ep error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Width amp Height returns the present width and height of an image window 7g Note The returned value includes the size of the scroll bars Has Scrollbars returns the present scroll bar status for an image window O National Instruments Corporation 12 7 IMAQ Vision for G Reference Manual Chapter 12 Display ET error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ GetPalette Selects a display palette Five predefined palettes are available To activate a color palette choose a code 0 to 4 for Palette Number and connect the output Color Palette to the input Palette Number of IMAQ
307. od The neighborhood of a pixel is defined by the size of a matrix or mask centered on the pixel itself These filters can be sensitive to the presence or absence of light intensity variations Spatial filters can serve a variety of purposes such as the detection of edges along a specific direction the contouring of patterns noise reduction and detail outlining or smoothing Spatial filters can be divided into two categories e Highpass filters emphasize significant variations of the light intensity usually found at the boundary of objects e Lowpass filters attenuate variations of the light intensity They have the tendency to smooth images by eliminating details and blurring edges In the case of a 3 x 3 matrix as illustrated in the following illustration the value of the central pixel shown in solid derives from the values of its eight surrounding neighbors shown in shaded pattern O National Instruments Corporation 5 1 IMAQ Vision for G Reference Manual Chapter 5 Spatial Filtering A 5 x 3 matrix specifies 24 neighbors a 7 x 7 matrix specifies 48 neighbors and so forth filtering function ES central pixel E neighbors If P represents the intensity of the pixel P with the coordinates 1 j the pixels surrounding P p can be indexed as follows in the case of a 3 x 3 matrix i j A linear filter assigns to P a value that is a linear combination of its surrounding values For example Po
308. of a pixel are coded into three different values The image is the combination of three arrays of pixels corresponding to the red green and blue components IMAQ Vision for G Reference Manual 1 2 National Instruments Corporation Chapter 1 Algorithms and Principles of Image Files and Data Structures Image Types and Formats The IMAQ Vision libraries can manipulate three types of images gray level color and complex images Gray Level Images Gray level images are composed of a single plane of pixels Standard gray level formats are 8 bit PICT Macintosh only BMP PC only TIFF RASTR and AIPD Standard 16 bit gray level formats are TIFF and AIPD AIPD is an internal file format that offers the advantage of storing the spatial calibration of an image Gray level images that use other formats and have a pixel depth of 8 bit 16 bit or 32 bit can be imported into the IMAQ Vision libraries Color Images Color images are composed of three planes of pixels in which each pixel has a red green and blue intensity each coded on 8 bit planes Color images coded using the RGB chunky standard contain an extra 8 bit plane called the alpha channel These images have a definition of 32 bit or 4 x 8 bit Standard color formats are PICT BMP TIFF and AIPD Complex Images Complex images are composed of complex data in which pixel values have a real part and an imaginary part Such images are derived from the Fast Fourier Transform of gr
309. of an image e he F Image Histogram Report Image Mask Number of Classes E r1 Interval Range L error out eror in no error i Image is the input source image used for calculating the histogram Image Mask is an 8 bit image specifying the region in the image to use for calculating a histogram Only pixels in the original image that correspond to the equivalent pixel in the mask are used for calculating the histogram provided that the value in the mask is not 0 A histogram on the complete image occurs if the Image Mask is not connected Number of Classes specifies the number of classes used to classify the pixels The number of obtained classes differs from the specified amount in a case in which the minimum and maximum boundaries are overshot in the Interval Range It is advised to specify an even number of classes for example 2 4 or 8 for 8 bit or 16 bit images The default value is 256 which is designed for 8 bit images This value gives a uniform class distribution or one class for each pixel in a 8 bit image Interval Range is a cluster specifying the minimum and maximum boundaries for the histogram calculation Only pixels having a value that falls in this range are taken into account by the histogram calculation This cluster is composed of the following elements National Instruments Corporation 19 1 IMAQ Vision for G Reference Manual Chapter 19 Analysis VIs Minimum is the minimum interval value
310. ollowing combinations are possible in this schema In the schema on the left the three images are all different Image Src A and Image Src B are intact after processing and the results from this operation are stored in Image Dst In the schema in the center Image Src A is also connected to the Image Dst which therefore receives the results from the operation In this operation the source data for Image Src A is overwritten In the schema on the right Image Src B receives the results from the operation Any operation between two images requires that the images have the same size However arithmetic operations can be performed between two different types of images for example 8 bit and 16 bit O National Instruments Corporation 9 13 IMAQ Vision for G Reference Manual Chapter 9 VI Overview and Programming Concepts I32 I32 Certain other data structures are frequently used in IMAQ Vision AII VIs that use coordinates for example line or rectangle use an array of integers Rectangle The entity Rectangle is composed of four coordinates Left Top Right Bottom A rectangle is specified by constructing an array of integers containing the following information Rectangle 0 L where Lis the left horizontal position Rectangle 1 T where T is the top vertical position Rectangle 2 R where R is the right horizontal position Rectangle 3 B where B is the bottom vertical position An image with a resolu
311. om mode greater than 3 in this mode the ROI is tracked using pen size 1 and ignoring the pen width value Pen transfer mode describes the mode in which the foreground and the background of the pen affect the image Pen transfer mode has five possible values don t change Default IMAQ Vision for G Reference Manual 12 40 O National Instruments Corporation Chapter 12 Display srcCopy Overwrites the background and foreground with specified colors srcOr Overwrites only the foreground srx Xor Inverts the pixels below the foreground pixels The new value equals 255 minus the old value this operation occurs for each plane of an RGB image srcBic Forces the background color on foreground pixels Pen style specifies the pen style Pen Style has six possible values Don t change Solid Dash Dot DashDot and DashDotDot Foreground color specifies the color of the foreground pixels Use a LabVIEW or Bridge VIEW color box for color specification Background color specifies the color of the background pixels Use a LabVIEW or Bridge VIEW color box for color specification Pen pattern 8x8 This Boolean 2D array describes the pattern associated with the user pen TRUE value is associated to foreground while FALSE is associated to background The pattern is always an 8 x 8 matrix The default is FALSE which specifies that the current pattern is not changed rmm 1 Li User pen active no enables the pen when set to T
312. on in the image to use for calculating a histogram Only pixels in the original image that correspond to the equivalent pixel in the mask are used for calculating the histogram provided that the value in the mask is not 0 A histogram on the complete image occurs if the Image Mask is not connected Number of Classes specifies the number of classes used to classify the pixels The number of obtained classes differs from the specified amount in a case in which the minimum and maximum boundaries are overshot in the Interval Range You are advised to specify an even number of classes for example 2 4 or 8 for 8 bit or 16 bit images The default value is 256 which is designed for 8 bit images This value gives a uniform class distribution or one class for each pixel in a 8 bit image Ep Interval Range is a cluster specifying the minimum and maximum boundaries for the histogram calculation Only pixels having a value that falls in this range are taken into account by the histogram calculation This cluster is composed of the following elements Minimum is the minimum interval value The default value of 0 0 insures that the real minimum value is determined by the source image as described in the following table Image Type Minimum Value Used B Minimum pixel value found in the image B Minimum pixel value found in the image IMAQ Vision for G Reference Manual 19 4 National Instruments Corporation Chapter 19 Analysis VIs Max
313. on supplied with our products This information helps us provide quality products to meet your needs Title IMAQ Vision for G Reference Manual Edition Date June 1997 Part Number 321379B 01 Please comment on the completeness clarity and organization of the manual If you find errors in the manual please record the page numbers and describe the errors Thank you for your help Name Title Company Address Phone Fax __ Mail to Technical Publications Fax t0 Technical Publications National Instruments Corporation National Instruments Corporation 6504 Bridge Point Parkway 512 794 5678 Austin TX 78730 5039 Numbers Symbols 1D 2D 3D 3D view AIPD area threshold arithmetic operators auto median function binary image binary morphology National Instruments Corporation Glossary One dimensional Two dimensional Three dimensional Displays the light intensity of an image in a three dimensional coordinate system where the spatial coordinates of the image form two dimensions and the light intensity forms the third dimension National Instruments internal image format used for saving calibration information associated with an image and for saving complex images Detects objects based on their size which can fall within a user specified range The image operations multiply divide add subtract and remainder A function that uses dual combinations of opening and closin
314. oncepts IMAQ PaletteTolerance Macintosh Power Macintosh only LF E National Instruments Corporation 12 9 Defines the tolerance for the colors associated to an image window Note Note Window Number 0 15 Exact Talerant Tolerant error in no error This VI is specific to Macintosh or Power Macintosh users of IMAO Vision This VI is useful only if the display is limited to 8 bits 256 colors or gray scales By changing the palette tolerance using this VI you can display a full palette of 256 colors or gray scales even with an 8 bit display mode Window Number 0 15 is a number from 0 to 15 that specifies the image window The default value is 0 Exact Tolerant Tolerant sets the tolerance level of the image window In the Exact mode 256 colors are associated with an image window and therefore the other inactive image windows temporarily lose their color In Exact mode the user can have 256 colors or gray scale even when the display is limited to 8 bits The user only has a limited number about 12 of gray scales or colors when working under LabVIEW in the Tolerant mode while in 8 bit display mode The default mode is Tolerant IMAQ Vision for G Reference Manual Chapter 12 Display zmn zmn error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Ov
315. one or more particles The descriptor list is described in the table for the Parameter control Parameter is an array specifying a descriptor list of the coefficients that the user wants to calculate The user can calculate one or more coefficients for one or more particles This input is used only in a situation in which the input Parameters is not connected The descriptor list is described in the following table O Area pixels surface area of particle in pixels Area calibrated surface area of particle in user units 2 Number of holes number of holes 3 Hole s Area surface area of the holes in user units 4 Total area total surface area holes and particles in user units 5 Scanned Area surface area of the entire image in user units 6 Ratio Area percentage of the surface area of a particle Scanned Area in relation to the Scanned Area 7 Ratio Area percentage of a particle s surface area in Total Area relation to the Total Area IMAQ Vision for G Reference Manual 19 16 O National Instruments Corporation 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 225 O National Instruments Corporation Center of mass X Center of mass Y Left column X Upper row Y Right column X Lower Row Y Width Height Longest segment length Longest segment left column X Longest segment row Y Perimeter Hole s Perimeter SumX SumY SumXX Sum Y Y SumX Y 19 17
316. ontally or vertically adjacent Illustration For a same pixel pattern different sets of objects can be identified MEN HE ll Example For a given filter size N the lowpass filter eliminates objects with a width less than or equal to N 1 pixels These objects are those that would disappear after N 1 2 erosions O National Instruments Corporation 1 28 IMAQ Vision for G Reference Manual Chapter 7 Morphology Analysis Highpass Filters The highpass filter removes large objects with respect to their width specified by a parameter called filter size For a given filter size N the highpass filter eliminates objects with a width greater than or equal to N pixels These objects are those which would not disappear after N 2 1 erosions Both the highpass and lowpass morphological filters use erosions to determine if an object is to be removed Therefore they cannot discriminate objects with a width of 2k pixels from objects with a width of 2k 1 pixels For example one erosion eliminates both objects that are 2 pixels and 1 pixel wide The precision of the filters then depends on the parity of the filter size N Highpass filter Lowpass filter If N is an even removes objects with a width removes objects with a width number N 2k greater than or equal to 2k less than or equal to 2k 2 uses k 1 erosions uses k 1 erosions If Nis an odd number removes objects with a width removes object
317. ophisticated display and control capabilities The Display basics library contains VIs that control the display of images in image windows as well as the positioning opening and closing of these windows on the display screen These image windows can be resized and the user can place scroll bars in these image windows The user also can regulate when the image data is displayed Note that these image windows are not LabVIEW or BridgeVIEW panels and they are directly managed by IMAQ Vision The Display tools library contains VIs for controlling image window tools These tools include points lines rectangles ovals and freehand contours that can be used to physically access the image data displayed in the image window Once accessed this data can be converted into a region of interest or ROZI The VIs also regulate the user interaction in the IMAQ Vision image windows as well as the events that occur in these image windows O National Instruments Corporation 12 1 IMAQ Vision for G Reference Manual Chapter 12 Display The Display user library enables the advanced user to create and manipulate user windows These palettes user windows are defined by the user and can be used to create sophisticated applications The Display Special library contains advanced functionalities and user interface management Display Basics IMAQ WindDraw Displays an image in an image window The image window appears automatically when the VI i
318. or 1 whichever is greater Finally if the new value P p is negative it is set to O If the new value Pap 18 greater than 255 it is set to 255 in the case of 8 bit resolution The greater the absolute value of a coefficient K p the more the pixel P y contributes to the new value of Pa p If a coefficient Ka is null O National Instruments Corporation 5 3 IMAQ Vision for G Reference Manual Chapter 5 Spatial Filtering Gradient Filter the neighbor Pia does not contribute to the new value of P p notice that Pa p might be P p itself If the convolution kernel is 0 0 0 2 1 2 0 0 0 then Pos C2ZPa aatfggt2Pas3 If the convolution kernel is 0 1 O0 1 O 1 0 1 O0 then loy Para t eap Gap t so If the kernel contains both negative and positive coefficients the transfer function is equivalent to a weighted differentiation and produces a sharpening or highpass filter Typical highpass filters include gradient and Laplacian filters If all coefficients in the kernel are positive the transfer function 1s equivalent to a weighted summation and produces a smoothing or lowpass filter Typical lowpass filters include smoothing and Gaussian filters A gradient filter highlights the variations of light intensity along a specific direction which has the effect of outlining edges and revealing texture IMAQ Vision for G Reference Manual 5 4 O National Instruments Corporation Chapter 5 Spatial Filtering
319. or G Reference Manual Chapter 23 External Library Support VIs ET error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts n Note When two fields are interlaced the first line in the resulting frame comes from the even field and the second comes from the odd field IMAQ ImageBorderOperation Fills the border of an image 8 fe IF e Es A Image in Function eror in na error ER Image in is the reference to the image that has to be modified Function indicates the method used to fill the border of the image This parameter has three possible values O Border Mirror Repeats the pixel values of the image near the border into the border by symmetry Border Copy Sets the value of the border pixels to the value of the image pixel near the border 2 Border Clear Sets all border pixels to 0 error in no error is acluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Out is the reference to the destination output image IMAQ Vision for G Reference Manual 23 10 O National Instruments Corporation zmn Chapter 23 External Library Support VIs error out is a cluster that describes the error status after this VI
320. or in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src IMAQ Vision for G Reference Manual 21 2 O National Instruments Corporation Chapter 21 Complex VIs Eu error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts n Note The FFT that is calculated is not normalized you can use IMAQ Complex Divide to normalize the complex image The FFT is a complex image in which high frequencies are grouped at the center while low frequencies are located at the edges IMAQ InverseFFT Computes the inverse FFT of a complex image 2 x 32 bit floating point 5 WAR Image 5rc i Image Dist Out Image Dst error in na error E error aut Image Src is the handle of the source image This input can accept only a complex image The image must have a resolution of 2 x 2 image that contains the resulting spatial image error in no error is a cluster that descri
321. ordinates of an image window or change the position of an image window The default is set to TRUE Set error in no error is a cluster that describes the error status before this zm n VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Coordinates screen returns the present coordinates X and Y of an image window zu error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ Vision for G Reference Manual 12 6 National Instruments Corporation Chapter 12 Display IMAQ WindSize Indicates and sets the size of an image window You also can use this VI to set scroll bars for image windows and test for the presence of scroll bars in an image window 5 Window Mumber y Width amp Height i Width amp Height Scrollbars M Has Scrallbarz Get Set Status Set E error in no error l error out Window Number is a number from 0 to 15 that specifies the image window The default value is 0 Width amp Height is a cluster containing two elements Setting the input Get Set Status to TRUE Set allows the user to specify the width and height of an image window If the input is not connected or if the value is 0 0 the image window is resized automatically to the image ass
322. orth West O Default North West 1 South West 2 South East 3 North East Image Src is the reference to the source input image Image Dst must be an 8 bit image Size reduction is a factor applied to the source image to calculate the final dimensions of the 3D view image This factor is a divisor that is applied to the source image when determining the final height and width of the 3D view image A factor of uses all of the pixels of the source image when determining the 3D view image A factor of 2 uses every other line and every other column of the pixels of the source image to determine the 3D view image The default 1s 2 Maximum height defines the maximum height of a pixel from the image source that is drawn in 3D This value is mapped from a maximum of 255 from the source image in relation to the baseline in the 3D view A value of 255 therefore gives a one to one correspondence between the intensity value in the source image and the display in 3D view The default value of 64 results in a reduction of O National Instruments Corporation Chapter 20 Geometry VIs 4 fold between the original intensity value of the pixel in the source image and the final displayed 3D image error in no error is a cluster that describes the error status before this E VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts zu Image Dst O
323. ource Image Dst is the reference of the image destination an error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAO VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ Vision for G Reference Manual 21 6 O National Instruments Corporation Chapter 21 Complex VIs IMAQ ComplexTruncate Truncates the frequencies of a complex image 5 La 2 Low pass High pass Low pass Image Src rl Image List Out Image Dist Truncation Frequency lt J eror in no error i error out Low pass High pass Low pass determines which frequencies are truncated Choose low pass F to remove the high frequencies or high pass T to remove the low frequencies The default is FALSE which specifies lowpass Image Src is the image reference source It must be an 8 bit or RGB mn image Image Dst is the reference of the image destination If it is connected
324. ower threshold gray level value and the upper threshold gray level value Image format commonly used for encoding 8 bit and 16 bit images and color images on both Macintosh and PC platforms A table associated with a logic operator which describes the rules used for that operation Areas in a displayed image that respond to user clicks You can use these zones to control events which can then be interpreted within LabVIEW or Bridge VIEW G 11 IMAQ Vision for G Reference Manual Numbers 3D view 2 8 See also IMAQ 3DView VI A Addition operator table 4 2 advanced binary morphology functions See binary morphology functions AIPD format gray level image 1 3 alpha channel 1 3 Analysis VIs 19 11 to 19 23 IMAQ BasicParticle 19 11 to 19 13 IMAQ Centroid 19 10 to 19 11 IMAQ ChooseMeasurements 19 20 to 19 23 IMAQ ComplexMeasure 19 15 to 19 20 IMAQ ComplexParticle 19 13 to 19 15 IMAQ Histograph 19 3 to 19 6 IMAQ History 19 1 to 19 3 IMAQ LinearAverages 19 8 to 19 9 IMAQ LineProfile 19 6 to 19 8 IMAQ Quantify 19 9 to 19 10 AND operator See also Logic Operator VIs equation table 4 2 truth table 4 4 area parameters 8 5 to 8 7 holes area 8 6 number of holes 8 6 number of pixels 8 5 particle area 8 5 particle number 8 5 ratio 8 6 scanned area 8 6 total area 8 6 to 8 7 area threshold 8 4 National Instruments Corporation Arithmetic Operator VIs 15 1 to 15 9 IMAQ Add 15 1 to 15 2 IMAQ Di
325. ows the use of a char pointer to get the associated string n char G programming language string erar in na error 1 error aul char is the C character string pointer The end of the character string is marked with a 0 100 value The following table gives the pointer type for different platforms Platform Pointer Type IMAQ Vision for LabVIEW 4 for Windows 3 1 16 bit FAR Other platforms 32 bit flat universal type The copied string size is limited to 65536 bytes error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts G programming language string is a G programming language string containing all characters before 100 end of string mark in C error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ Vision for G Reference Manual 23 6 O National Instruments Corporation Chapter 23 External Library Support VIs The following graphic illustrates a typical implementation scheme for IMAQ CharPtrToString Call Library Function char get_cameracnamet camera name IMAQ MemPeek Copies a memory zone in a G programming language string In LabVIEW 4 0 and BridgeVIEW 1 0 the Call Librar
326. pare images Common applications of these operators include time lapse comparisons identification of the union or intersection between images and comparisons between several images and a model Operators also can be used to threshold or mask images and to alter contrast and brightness An arithmetic or logic operation between images is a pixel by pixel transformation It produces an image in which each pixel derives from the values of pixels with the same coordinates in other images If A 1s an image with a resolution XY B 1s an image with a resolution XY and Op is the operator then the image N resulting from the combination of A and B through the operator Op is such that each pixel P of N is assigned the value Pn QGD G where p 1s the value of pixel P in image A and p is the value of pixel P in image B O National Instruments Corporation 4 1 IMAQ Vision for G Reference Manual Chapter 4 Operators Arithmetic Operators In the case of images with 8 bit resolution the following equations describe the usage of the arithmetic operators Operator Equation Multiply p min p x Py 255 Divide p max p lp 0 Add p min p Pp 255 Subtract p max p Pp 0 Remainder P p modp If the resulting pixel value p is negative it is set to 0 If it is greater than 255 it is set to 255 Logic Operators Logic operators are bit wise operators They manipulate gray level values coded
327. play 6 6 status See IMAQ Status VI structuring element 7 7 to 7 8 definition 7 7 dilation function example 7 12 erosion function example 7 11 morphological transformation 7 7 to 7 8 programming concepts 9 16 T table of pixels entity 9 15 technical support A 1 to A 2 temperature palette 2 3 thickening function primary binary morphology 7 18 to 7 20 thinning function primary binary morphology 7 17 to 7 18 3D view 2 8 See also IMAQ 3DView VI threshold interval 8 2 thresholding 7 1 to 7 7 See also Processing VIs automatic 7 3 to 7 7 clustering 7 3 to 7 5 entropy 7 6 interclass variance 7 6 metric 7 6 moments 7 6 color image 7 3 example 7 2 to 7 3 with operators 4 1 overview 7 1 to 7 2 O National Instruments Corporation TIFF format gray level image 1 3 tools and utilities See image histogram palettes Tools Diverse VIs 13 24 to 13 32 IMAQ ClipboardToImage 13 25 IMAQ Draw 13 26 to 13 27 IMAQ DrawText 13 27 to 13 30 IMAQ FillImage 13 31 to 13 32 IMAQ ImageToClipboard 13 24 to 13 25 IMAQ MagicWand 13 30 to 13 31 tools for display See Display VIs Display Tools Tools Image VIs IMAQ Copy 13 1 to 13 2 IMAQ Expand 13 5 to 13 7 IMAQ Extract 13 4 to 13 5 IMAQ GetCalibration 13 11 to 13 12 IMAQ GetImageSize 13 2 IMAQ GetOffset 13 7 to 13 8 IMAQ ImageTolmage 13 14 to 13 15 IMAQ Resample 13 10 to 13 11 IMAQ SetCalibration 13 12 to 13 13 IMAQ SetImageSize 13 3 IMAQ
328. proaching a true circle In those cases when IMAQ Vision for G Reference Manual 9 16 O National Instruments Corporation Chapter 9 VI Overview and Programming Concepts the hexagonal frame is used not all the structuring element values are used Only the values possessing an x are used All VIs that use this information have the input Square Hexa Square 3 x 3 Hexagonal 3 x 3 The size of the structuring element directly determines the speed of the morphological transformation Different results occur when the contents of the structuring element are changed It is recommended that you understand morphology or learn how to use these elements before changing the standard structuring element The structuring elements shown below each give a different result O National Instruments Corporation 9 17 IMAQ Vision for G Reference Manual Chapter Management Vis This chapter describes the functionality of the IMAQ Vision Management VIs IMAQ Create Creates an image E Note IMAO Create must be used in conjunction with IMAQ Dispose in order to avoid saturating the memory reserved for LabVIEW or BridgeVIEW Le fe R E Es 5 Barder Size Image Mame Image Type erar in na errar Border Size determines the width in pixels of the border created around an image These pixels are used only for specific VIs You should create a border at the beginning of your application if an image is to be processed later using
329. quency range decreasing from f to fy This is done by multiplying each frequency by a coefficient C which is a function of its deviation from the fundamental and maximum frequencies en So vi p Jona fo where C fy 1 and C fax 0 1 cert to faar Highpass Truncation Highpass truncation removes a frequency f if it falls inside the truncation range fo f This is done by multiplying each frequency f by a coefficient C equal to 1 or 0 depending on whether the frequency fis greater than the truncation frequency f If f lt fo then C f 0 else CUm ci IMAQ Vision for G Reference Manual 6 10 National Instruments Corporation Chapter 6 Frequency Filtering The following series of graphics illustrates the behavior of each type of filter They give the 3D view profile of the magnitude of the FFT This example uses the following original FFT image After highpass attenuation the central peak has been removed and variations present at the edges remain National Instruments Corporation 6 11 IMAQ Vision for G Reference Manual Chapter 6 Frequency Filtering After highpass truncation with f fo 2096 fmax fo spatial frequencies inside the truncation range fo f are set to 0 The remaining frequencies are identical to the ones in the original FFT plane IMAQ Vision for G Reference Manual 6 12 National Instruments Corporation Chapter Morphology Analysis This chapte
330. r Xor Xnor Xor is the result from a logic operation If set to TRUE the result of a logic operation is the negative of the performed logic operation XNOR instead of XOR The default is FALSE which specifies a positive operation XOR Ep Image Src A is the reference to the source input image A IMAQ Vision for G Reference Manual 15 12 O National Instruments Corporation Chapter 15 Operator VIs Image Dst is the reference to the destination image If it is connected it must be the same type as the Image Src A a Image Src B is the reference to the source input image B a Constant is a binary constant used for image constant operations The default is 0 error in no error is a cluster that describes the error status before this E VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts zu Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src A error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts All connected images must be the same image type An operation
331. r 9 VI Overview and Programming Concepts IMAQ Vision for G Reference Manual 18 6 National Instruments Corporation Chapter 18 Morphology VIs Image Dst Out is the reference to the destination output image which 2 0 receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src T error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts A structuring element must have odd sized dimensions so that it contains a central pixel The function does not take into account the odd boundary farthest out on the matrix if one of the dimensions for the structuring element is even For example if the input structuring element is 6 x 4 X 2 6 and Y 4 the actual processing is performed at 5 x 3 Both the sixth line and the fourth row are ignored Recall that the second dimension in a G array is the vertical direction Y The processing speed is correlated with the size of the structuring element For example a 3 x 3 convolution processes nine pixels while a 5 x 5 convolution processes 25 pixels IMAQ Distance Encodes a pixel value of a particle as a function of the location of that pixel in relation to the distance to the border of the particle The source image m
332. r Clusters in Chapter 9 VI Overview and Programming Concepts T error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ ClipboardTolmage Copies the clipboard data into an image A Image Lut 3 Color Palette T Clipboard has an image erar in na errar 1 emere Image is the reference to the source input image error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Out contains a copy of the clipboard if the clipboard is an image E Color Palette is the color palette that is stored on the clipboard A gray ramp is returned if no color palette is found on the clipboard r1 iD El ol L Clipboard has an image returns a TRUE value if the clipboard contains an image El Ep error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAO VI Error Clusters in Chapter 9 VI Overview and Programming Concepts O National Instruments Corporation 13 25 IMAQ Vision for G Reference Manual Chapter 13 Tool VIs IMAQ Draw Draws geometric objects in an image e he F n Draw Made Fisel Color Imag
333. r G Reference Manual 26 O National Instruments Corporation Chapter 7 Morphology Analysis M Skeleton Function The M skeleton M shaped structuring element function extracts a skeleton with more dendrites or branches Using the same original image as in the previous example the M skeleton function produces the following image Skiz Function The skiz skeleton of influence zones function behaves like an L skeleton applied to the background regions instead of the object regions It produces median lines that are at an equal distance from the objects Using the same source image as in the previous example the skiz function produces the following image shown after superimposition on top of the source image FS e z Segmentation Function The segmentation function is only applied to labeled images It partitions an image into segments each centered on an object such that they do not overlap each other or leave empty zones This result is obtained by dilating objects until they touch one another O National Instruments Corporation 7 27 IMAQ Vision for G Reference Manual Chapter 7 FP Note Morphology Analysis The segmentation function is time consuming It is recommended that you reduce the image to its minimum significant size before selecting this function In the following image binary objects shown in black are superimposed on top of the segments shown in gray shades When applied to an
334. r elements containing the coordinates Left Top Right Bottom of the region to expand The operation is applied to the entire image if the input is empty or not connected O National Instruments Corporation 13 5 IMAQ Vision for G Reference Manual Chapter 13 Tool Vis Image Src is the reference to the source input image Image Dst is the reference to the destination image If it is connected it must be the same type as the Image Src X Duplication Step specifies the number of pixel duplications per column The column is recopied if the default value 1 is used Y Duplication Step specifies the number of pixel duplications per line The row is recopied if the default value 1 is used error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAO VI Error Clusters in Chapter 9 VI Overview and Programming Concepts For example if a 256 x 256 image is connected and the
335. r opening I mind DEEDDEX I where I is the source image IMAQ Vision for G Reference Manual 36 National Instruments Corporation Chapter 7 Morphology Analysis E is an erosion D is a dilation O is an opening C is a closing F I is the image obtained after applying the function F to the image and GF I is the image obtained after applying the function F to the image followed by the function G to the image Proper Closing Function The proper closing is a finite and dual combination of closings and openings It removes dark pixels isolated in bright regions and smoothes the boundaries of dark regions The effects of the function are moderated by the configuration of the structuring element If I is the source image the proper closing extracts the maximum value of each pixel between the source image and its transformed image obtained after an opening followed by a closing and followed by another opening proper closing I max 1 COC I or proper closing I max f EDDEED D where I is the source image E is an erosion D 1s a dilation O is an opening C is a closing F I is the image obtained after applying the function F to the image and GF 1 is the image obtained after applying the function F to the image followed by the function G to the image 7 O National Instruments Corporation 3 IMAQ Vision for G Reference Manual Chapter 7 Morphology Analysis Auto Median Function
336. r provides an overview of morphology image analysis Morphological transformations extract and alter the structure of objects in an image You can use these transformations to prepare objects for quantitative analysis observe the geometry of regions extract the simplest forms for modeling and identification purposes and so forth The morphological transformations can be used for expanding or reducing objects filling holes closing inclusions smoothing borders removing dendrites and more They can be divided into two categories e Gray level morphology functions which apply to gray level images e Binary Morphology functions which apply to binary images A binary image 1s an image that has been segmented into an object region pixels equal to 1 and a background region pixels equal to 0 Such an image is generated by the thresholding process Thresholding Thresholding consists of segmenting an image into two regions an object region and a background region This is performed by setting to 1 all pixels that belong to a gray level interval called the threshold interval All other pixels in the image are set to O You can use this operation to extract areas that correspond to significant structures in an image and to focus the analysis on these areas image histogram threshold inter yal National Instruments Corporation 1 IMAQ Vision for G Reference Manual Chapter 7 Morphology Analysis Pixels outside the thr
337. rcle and convex functions Note In this section of the manual the term pixel denotes a pixel equal to 1 and the term object denotes a group of pixels equal to I Border Function The border function removes objects that touch the border of the image These objects may have been truncated during the digitization of the image and their elimination might be useful to avoid erroneous particle measurements and statistics Hole Filling Function The hole filling function fills the holes within objects IMAQ Vision for G Reference Manual 22 National Instruments Corporation Chapter 7 Morphology Analysis Labeling Function The abeling function assigns a different gray level value to each object The image produced is not a binary image but a labeled image using a number of gray level values equal to the number of objects in the image plus the gray level O used in the background area The labeling function can identify objects using connectivity 4 or connectivity 8 criteria Lowpass Filters The owpass filter removes small objects with respect to their width specified by a parameter called filter size Connectivity 4 Connectivity 8 Definition The pixels are considered The pixels are considered as as part of two different part of the same object if objects if they are they are horizontally diagonally adjacent vertically or diagonally adjacent Two pixels are considered as part of the same object if they are horiz
338. re palette 2 3 particle orientation parameter 8 10 to 8 11 PICT format gray level image 1 3 pixel calibration 8 1 pixel depth 1 2 pixel frame See image pixel frame pixel tool VIs See Tools Pixel VIs pixels table of 9 15 planes See also Color VIs color planes inversion PC 22 2 to 22 23 planes number of 1 2 Power 1 Y function example 3 8 logarithmic and inverse gamma correction 3 7 transfer function and effect table 3 3 Power Y function example 3 10 exponential and gamma correction 3 9 transfer function and effect table 3 4 predefined gradient kernels 5 11 to 5 12 predefined lookup tables 3 3 to 3 4 Prewitt filters nonlinear 5 23 predefined gradient kernels 5 10 primary binary morphology functions See binary morphology functions Processing VIs 16 1 to 16 14 IMAQ AutoBThreshold 16 4 to 16 5 IMAQ AutoMThreshold 16 5 to 16 7 IMAQ Equalize 16 11 to 16 12 IMAQ Label 16 13 to 16 14 IMAQ MathLookup 16 8 to 16 10 IMAQ Vision for G Reference Manual 1 12 IMAQ MultiThreshold 16 2 to 16 4 IMAQ Threshold 16 1 to 16 2 IMAQ UserLookup 16 7 to 16 8 programming concepts 9 1 to 9 17 See also VIs manipulation of images 9 9 to 9 17 arithmetic or logical operations 9 13 combinations of input and output 9 11 connectivity 4 8 9 15 creating images 9 10 Image Dst input 9 10 to 9 13 Image Mask input 9 11 to 9 12 Image Src input 9 10 9 12 to 9 13 image structure 9 9 line ent
339. re this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ MultiThreshold Applies a multi threshold to an image e fe r La La Threshold Data i Image 5rc Image Dat Out Image List erar In na errar at error aut IMAQ Vision for G Reference Manual 16 2 National Instruments Corporation Chapter 16 Processing VIs ens Threshold Data is an array of clusters specifying the mode and threshold range This operation is analogous to the process in IMAQ Threshold Each cluster is composed of the following elements Lower value is the lowest pixel value to be taken into account during a threshold The default is 128 Upper value default 255 is the highest pixel value to be taken into account during a threshold The default is 128 All pixels not contained between these the two values Lower value and Upper value are set to 0 All values found between this ra
340. rea and same perimeter as an object This length is equal to b Rectangle Ratio Rectangle ratio is the ratio of the big side of the equivalent rectangle to 1ts small side rectangle big side a cnn rectangle small side b The more elongated the equivalent rectangle the higher the Rectangle ratio The closer the equivalent rectangle 1s to a square the closer to 1 the Rectangle ratio Shape Features This section describes the following shape feature parameters e Moments of Inertia Moments of Inertia I the center of gravity ld with respect to e Elongation factor Ratio of the longest segment within the object to the mean length of the perpendicular segments e Compactness factor Ratio of the object area to the area of the smallest rectangle containing the object e Heywood Circularity factor Ratio of the object perimeter to the perimeter of the circle with the same area e Hydraulic Radius Ratio of the object area to its perimeter e Waddel Disk Diameter Diameter of the disk with the same area as the object Moments of Inertia hx lyy by The moments of inertia give a representation of the distribution of the pixels in an object with respect to its center of gravity IMAQ Vision for G Reference Manual 8 14 National Instruments Corporation Chapter 8 Quantitative Analysis Elongation Factor The elongation factor is the ratio of the longest segment within an object to the mean length of th
341. ribes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src a error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts a National Instruments Corporation 17 7 IMAQ Vision for G Reference Manual Chapter 17 Filter Vis IMAQ NthOrder Orders or classifies the pixel values surrounding the pixel being processed The data is placed into an array and the pixel being processed is set to the Nth pixel value the Nth pixel being the ordered number Ls he F ena zmn zmn Pa h La Size Order H Image Src Image Dist Out Image Mask Image Det Ti eror in na errar E error out Size amp Order is a cluster that specifies the following variables X Size is the size of the horizontal matrix axis The default is 3 Y Size is the size of the vertical matrix axis The default is 3 Order is the order number chosen after classing the values The default is 4 Image Src is the im
342. ring element the more specific the template can be The thinning function extracts the intersection between a source image and its transformed image after a hit miss function In binary terms the operation subtracts its hit miss transformation from a source image IfI is an image thinning I I hit miss I XOR I hit miss I This operation is useless when the central coefficient of the structuring element is equal to 0 In such cases the hit miss function can only change the value of certain pixels in the background from 0 to 1 The subtraction of the thinning function then resets these pixels back to O anyway Examples This example uses the following binary source image This example uses the thinning function and the following structuring element O O om O National Instruments Corporation 1 17 IMAQ Vision for G Reference Manual Chapter 7 Morphology Analysis Thinning produces the following image Single pixels in the background of this image have been removed The following series of graphics shows the results of three thinnings applied to the source image Each thinning uses a different structuring element specified above each transformed image Gray cells indicate pixels equal to 1 Thickening Function The thickening function adds to an image those pixels located in a neighborhood that matches a template specified by the structuring element Depending on the configuration of t
343. rmuting the A B C and D quarters Intensities in the FFT image are proportional to the amplitude of the displayed component Frequency Filters This section describes the frequency filters in detail and includes information on lowpass and highpass attenuation and truncation Lowpass Frequency Filters A lowpass frequency filter attenuates or removes high frequencies present in the FFT plane This filter suppresses information related to rapid variations of light intensities in the spatial image In this case the Inverse FFT command produces an image in which noise details texture and sharp edges are smoothed A lowpass frequency filter removes or attenuates spatial frequencies located outside a frequency range centered on the fundamental or null frequency Lowpass Attenuation Lowpass attenuation applies a linear attenuation to the full frequency range decreasing from f to f This is done by multiplying each frequency by a coefficient C which is a function of its deviation from the fundamental and maximum frequencies O National Instruments Corporation 6 7 IMAQ Vision for G Reference Manual Chapter 6 Frequency Filtering C f Inas z Tuaxo where C fy 1 and C f 0 Lowpass Truncation Lowpass truncation removes a frequency f if it falls outside the truncation range fo f This is done by multiplying each frequency f by a coefficient C equal to 0 or 1 depending on whether the frequency f
344. rogramming Concepts Ep error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAO VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ WindLastEvent Returns the events generated through the image windows as well as the data associated with them 5 Window Number 0 15 Events list all Event Tool TT Coordinates error in no error 1 Uther Parameters error out ux2 Event list all specifies which events to obtain The default case returns all events generated through the image windows as well as the IMAQ Vision for G Reference Manual 12 18 O National Instruments Corporation Chapter 12 Display data associated with them This VI enables you to specify the image window events that interest you O No event No event Click event A user has clicked in an image window 2 Draw event A user has drawn in an image window 3 Move event A user has moved an image window 4 Size event A user has resized an image window 5 Scroll event A user has moved the scroll bars in an image window 6 Activate event A user has chosen clicked once to activate an image window 7 Close event A user has closed an image window 8 Reserved error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAO VI Error Clusters 1n Chapter 9 VI O
345. rporation 9 3 IMAQ Vision for G Reference Manual Chapter 9 VI Overview and Programming Concepts Overview of MMX Features in IMAQ Vision for G Currently IMAQ Vision supports Intel MMX technology in the areas of arithmetic operations logic operations comparison operations linear filtering morphology and processing operations Only those algorithms suitable for MMX optimization were chosen At the first instance of a VI from IMAQ Vision the presence of the MMX capability of the CPU is automatically detected and a MMX enabling flag is set During subsequent VI executions IMAQ Vision will execute MMX instructions if the MMX enabling flag is set and regular instructions if the MMX enabling flag is not set The following special considerations apply to the use of MMX with IMAQ Vision e Only 8 bit image types are optimized e For operations where the use of a mask is permitted only the case where no mask is specified is optimized e For the maximum optimization of the MMX instructions you should try to align your image data width to a multiple of eight pixels For the following operations alignment of four pixels is required to achieve maximum optimization multiply multiply constant average average constant sigma Sobel Prewitt lowpass convolute and correlate e Convolution is best optimized when the scaling factor is 1 MMX Icon In this manual the following symbol designates functions that are optimized for MMX
346. rror Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ Segmentation Starting from a labeled image calculates the zones of influence between particles Each labeled particle grows until the particles reach their neighbors at which time this growth is stopped The source image must have a border greater than or equal to 1 La 2 Image Src Image List Out Image Dat error in na errar a error out ET Image Src is the reference to the source input image IMAQ Vision for G Reference Manual 18 14 O National Instruments Corporation Chapter 18 Morphology VIs Image Dst is the reference to the destination image If it is connected it must be the same type as the Image Src a error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts a Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src a error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts a IMAQ Skeleton Starting from a bina
347. rror out Plane specifies which component of the complex image is replaced The following values are valid O Default Real O Imaginary ET Image Src must be an 8 bit 16 bit or 32 bit floating point image E Image Dst must be a complex image O National Instruments Corporation 21 19 IMAQ Vision for G Reference Manual Chapter 21 Complex VIs a 2 a error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAO VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAO VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ Vision for G Reference Manual 21 20 National Instruments Corporation Chapter Color Vis This chapter describes the Color VIs in IMAQ Vision An RGB chunky image standard color is a color image coded in three parts red green and blue A pixel encoded in 32 bits is actually four channels alpha channel not used EN 1 1 3 red channel A 1 3 green channel C bl
348. rs They mainly are used to delineate objects and prepare them for quantitative inspection analysis Uses an M shaped structuring element in the skeleton function Operations on a point in an image that take into consideration the values of the pixels neighboring that point Replaces each pixel value with a nonlinear function of its surrounding pixels A highpass edge extraction filter that favors vertical edges G 7 IMAQ Vision for G Reference Manual nonlinear Prewitt filter nonlinear Sobel filter Nth order filter 0 opening operators optical representation outer gradient p palette PICT picture element pixel pixel calibration pixel depth Power 1 Y function Power Y function IMAQ Vision for G Reference Manual A highpass edge extraction filter that favors horizontal and vertical edges in an image A highpass edge extraction filter that favors horizontal and vertical edges in an image Filters an image using a nonlinear filter This filter orders or classifies the pixel values surrounding the pixel being processed The pixel being processed is set to the Nth pixel value where N is the order of the filter An erosion followed by a dilation An opening removes small objects and smoothes boundaries of objects in the image Allow masking combination and comparison of images You can use arithmetic and logic operators in IMAQ Vision Contains the low frequency information at the center and
349. rting Value returns the smallest pixel value from the first class calculated in the histogram It can be equal to the Minimal value from the Interval Range or the smallest value found for the image type connected B HB Interval Width returns the length of each class Mean Value returns the mean value of the pixels used in calculating the histogram Standard Deviation returns the standard deviation from the histogram A higher value corresponds to a better distribution of the values in the histogram and the image Area pixels returns the number of pixels used in the histogram calculation This is influenced by the values specified in Interval Range and the contents of Image Mask E B B B error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ Histograph Calculates the histogram from an image This VI returns a data type cluster compatible with a LabVIEW or BridgeVIEW graph S te R 5 Image Histagram Graph Image Mask l Mean Value Number of Classes f TT Standard Deviation Interval Range E error aut eror in no error an Image is the input source image used for calculating the histogram O National Instruments Corporation 19 3 IMAQ Vision for G Reference Manual Chapter 19 Analysis VIs p Image Mask is an 8 bit image specifying the regi
350. rue color RGB IMAQ Vision Vis This section describes the organization of the IMAQ Vision VIs It also describes the icons used in both IMAQ Vision and the VI reference chapters in this manual Image Type Icons In this manual the following icons describe the image types supported by each VI 8 bits per pixel unsigned standard monochrome 16 bits per pixel signed 2 x 32 bits floating point per pixel native format after a FFT 32 bits per pixel RGB chunky standard color ES 32 bits floating point per pixel IMAQ Vision for G Reference Manual 9 2 National Instruments Corporation Chapter 9 VI Overview and Programming Concepts An IMAQ Vision image has other attributes in addition to its type and size The calibration attribute defines the physical horizontal and vertical dimensions of the pixels The ability to calibrate two axes permits you to correct defaults resulting from the captor not uncommon These coefficients are used only when performing calculations for example surface or perimeter based on morphological transformations They have no effect on either processing or operations between images For optimization reasons a border also exists This border is a space that is physically reserved in the image and it is completely transparent to you This border is necessary when you want to perform a morphological transformation a convolution or particle analysis These processes all use neighboring op
351. ruments Corporation 3 IMAQ Vision for G Reference Manual Chapter 7 Morphology Analysis Example The automatic thresholding method most frequently used is clustering also known as multi class thresholding This example uses a clustering technique in two and three phases on an image Note that the results from this function are generally independent of the lighting conditions as well as the histogram values from the image This example uses the following original image IMAQ Vision for G Reference Manual 4 O National Instruments Corporation Chapter 7 Morphology Analysis Clustering in two phases produces the following image O National Instruments Corporation 7 5 IMAQ Vision for G Reference Manual Chapter 7 Morphology Analysis Entropy Based on a classical image analysis technique this method is best suited for detecting objects that are present in minuscule proportions on the image For example this function would be suitable for default detection Metric Use this technique in situations similar to interclass variance For each threshold a value is calculated that is determined by the surfaces representing the initial gray scale The optimal threshold corresponds to the smallest value Moments This technique is suited for images that have poor contrast an overexposed image is better processed than an underexposed image The moments method is based on the hypothesis that the observed image is a blurred
352. ruments Corporation 13 7 IMAQ Vision for G Reference Manual Chapter 13 Tool Vls Y Offset specifies the vertical offset of the image mask error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts zmn The following graphic illustrates the use of a mask with two different offsets 0 0 and 3 1 Image B A VI processing Image A and using the Image Mask with an offset of 0 0 and 3 1 gives the results as shown in Image B and Image C respectively Notice the location of the pixels Pixels from the border O Pixels outside the mask Ea Pixels from the Image Mask IMAQ Vision for G Reference Manual 13 8 National Instruments Corporation Chapter 13 Tool Vls IMAQ SetOffset Defines the position of an image mask in relation to the origin of the coordinate system 0 0 La 2 Image A Offset Y Offset error in no error Image is the reference to the source input image Y Offset specifies the vertical offset of the image mask error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAO VI Error Clusters in Chapter 9 VI Overview and Programming X Offset specifies the horizontal offset of the image mask Concepts zu Image Out is the reference to the dest
353. rview and Programming Concepts This chapter contains an overview of IMAQ Vision programming concepts describes the Base and Advanced versions of IMAQ Vision and lists the VIs included in these versions It also provides a summary of the icons used in the function reference chapters of this manual Images An image is a function of the light intensity f x y where x and y represent the spatial coordinates of a point in an image and f is the brightness of the point x y The pixel depth and the number of planes in an image determines the image type Multiple image types are supported by IMAQ Vision The decision to encode an image in 8 bits 16 bits or in a floating value is influenced by several factors the nature of the image the type of image processing you need to use and the type of analysis you need to perform For example 8 bit encoding is sufficient if you plan to perform a morphology analysis for example surface or elongation factor On the other hand if the goal is to obtain a highly precise quantification of the light intensity from an image or a region of an image then 16 bit or 32 bit floating point encoding is required VIs that perform frequency domain operations can be applied to images that are Fourier transformed Each pixel in a Fourier transformed image called a complex image is encoded as 2 x 32 bit floating It is also possible to acquire and process a real color image known as RGB chunky This im
354. ry image calculates a skeleton from particles within an image or the lines delineating the zones of influence skeleton of an inverse image The source image must have a border greater than or equal to 1 La 3 Mode Image Src Image List Out Image List erar in na error JE error aut Mode specifies the type of skeleton to perform The default is 0 O Skeleton L uses this type structuring element jT 1 j1 l nj 1 O National Instruments Corporation 18 15 IMAQ Vision for G Reference Manual Chapter 18 Morphology VIs Skeleton M uses this type structuring element 2 Skizisan inverse skeleton Skeleton L on an inverse image Image Src is the reference to the source input image Image Dst is the reference to the destination image If it is connected it must be the same type as the Image Src error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src a error out is a cluster that describes the error status after this VI executes For more information about this indicator see the sectio
355. ry space that is twice the size of the source image La ib Connectrvity 4 8 B8 SquareHexa 5 quare ae Image Src Image Dist Out Image Dist Number of Erosion r7 Low Pass High Pass Law E error out error in no error TE Connectivity 4 8 8 specifies how the algorithm determines whether an adjacent pixel is the same or different particle The default is 8 TF Square Hexa Square specifies whether the pixel frame is treated as square or hexagonal during the transformation The default is square Image Src is the reference to the source input image Image Dst is the reference to the destination 1mage If it is connected it must be the same type as the Image Src Number of Erosion specifies the number of 3 x 3 erosions to apply to the image The default 1s 2 TE Low Pass High Pass Low specifies whether the objects resistant to n erosions are discarded or kept default error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts T Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src O National Instruments Corporation 18 9 IMAQ Vision for G Re
356. s VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts National Instruments Corporation 17 5 IMAQ Vision for G Reference Manual Chapter 17 Filter Vis Kernel is the resulting matrix converted from the input string This naL et output can be connected directly to the input Kernel in IMAQ Convolute T error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts The column separator can be either a comma a semi colon or a blank space The line separator is a hard return For example the string 1 1 1 1 1 1 1 1 1 produces a 3 x 3 matrix with all coefficients set to 1 IMAQ EdgeDetection Extracts the contours detects edges in gray level values Any image connected to the input Image Dst must be the same image type connected to Image Src The image type connected to the input Image Mask must be an 8 bit image The connected source image must have been created with a border capable of supporting the size of the processing matrix For example a 3 x 3 matrix has a minimum border size of 1 The border size of the destination image is not important e he F HAR Threshold Value Image Src Image List Out Image Mask Image List x Method E errar out eror in na error Thres
357. s a structure that contains the screen coordinates in X and Y positions where the tools palette is located or where the tools palette will be placed This input is necessary only when Get Set Status Set is set to TRUE Set Get Set Status Set specifies 1f the user wants to know the present status or modify the status of the available region tools The default 1s TRUE Set error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAO VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Coordinates indicates the relative position of the event error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAO VI Error Clusters in Chapter 9 VI Overview and Programming Concepts O National Instruments Corporation 12 17 IMAQ Vision for G Reference Manual Chapter 12 Display IMAQ WindToolsClose Closes the WindTools window This VI functions in the same way as IMAQ WindClose which is used for closing image windows Note that this function also destroys the space reserved in memory for the WindTools window 5 error in na error ik error aut ER error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAO VI Error Clusters in Chapter 9 VI Overview and P
358. s a threshold to the three planes of an RGB chunky image and places the result into an 8 bit image A test is performed with each range Red or Hue Range Green or Sat Range and Blue or Light or Val Range to determine whether the corresponding pixel from the Image Src is set to the value specified in Replace Value If a pixel from the Image Src does not have corresponding pixel values specified in all three ranges then the corresponding pixel in Image Dst Out is set to O 5 Replace Value Color Made Image 5rc RGE Image List Out Image Dst Red or Hue Range error out Green or Sat Range n Blue or Light ar Val Range eror in na error Lz Note By default the pixels in the Image Dst Out take the new value specified by Replace Value as all three ranges are set for 0 to 255 Therefore you easily can apply a threshold to one of the three ranges without having to set the values of the other two ranges Replace Value specifies the value applied to the destination image when the corresponding pixel from the Image Src is found in all three ranges The default is 1 Color Mode defines the image color format to use for the operation The default 1s 0 which specifies RGB O Default RGB 1 HSL 2 HSV EET Image Src RGB is the reference to the image to threshold It must be an RGB chunky image Image Dst must be connected and must be an 8 bit image O National Instruments Corporation 22 11 IMAQ Vision
359. s displayed when a zone within this image is TRUE O National Instruments Corporation 12 29 IMAQ Vision for G Reference Manual Chapter 12 Display 432 User Mechanical Actions specifies the method of operation of each zone Two modes are possible O Switch The first click causes the zone to change to TRUE A second click on the same zone causes it to change to FALSE Latch A click on the zone causes it to change to TRUE temporarily Note In both cases the status of the zone can be determined using IMAO WindUserEvent or IMAQ WindUserStatus 13 2 User Rectangles is a 2D array that defines the coordinates of each zone in the user window Each line in this array must contain the four coordinates that specify the position of the zone Ep error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts T error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ WindUserStatus Obtains or modifies the status of each zone in a user window Window Number 17 22 Region Status Region Status Get Set Status Set error in no error af error aut Window Number 17 22 is anumber from 17 to 22 that specifies
360. s executed Note that by default the image window does not have scroll bars Scroll bars can be added by using the IMAQ WindSize VI 8 fe FE les 5 Window Number L 15 Image Title 7 5 Color Palette Resize to Image Size Y eee error in no error Window Number 0 15 specifies the image window in which the image is displayed As many as 16 windows can be displayed simultaneously Each window is specified with an indicator ranging from 0 to 15 Only the specified image window is affected and all other image windows remain the same The default value is 0 Image specifies the image reference for the displayed image Note 16 bit and floating point images can be displayed by using an 8 bit image buffer Tmp This 8 bit image buffer used only to display the image is calculated as a function of the dynamic range from the image source The minimum value min and the maximum value max are calculated automatically Then the following formula is applied to each pixel Tmp x y Src x y min x 255 max min IMAQ Vision for G Reference Manual 12 2 O National Instruments Corporation Note Note Note Note Chapter 12 Display Title is an image window name If a string is attached to this input then the image window automatically takes that name The default name for the image window is Image lt Window Number Color Palette is used to apply a color palette to an image windo
361. s information such as the image horizontal and vertical resolution its pixel definition the physical calibration and the original palette Processing Color Images Most image processing and analysis functions apply to 8 bit images However you also can process color images by manipulating their color components individually You can break down a color image into various sets of primary components such as RGB red green and blue ASL hue saturation and lightness or ASV hue saturation and value Each component becomes an 8 bit image and can be processed as any gray level image O National Instruments Corporation 1 5 IMAQ Vision for G Reference Manual Chapter 1 Algorithms and Principles of Image Files and Data Structures You can reassemble a color image later from a set of three 8 bit images taking the place of 1ts RGB HSL or HSV components color image color image Image Pixel Frame As introduced earlier a digital image is a two dimensional array of pixel values Using this definition you might assume that pixels are arranged in a regular rectangular frame However from an image processing point of view you can consider another grid arrangement such as a hexagonal pixel frame which offers the advantage that the six neighbors of a pixel are equidistant The pixels in an image are arranged in a rectangular grid However some image processing algorithms can reproduce a hexagonal neighborhood using the represen
362. s or hides the WindTools palette and sets the region status This VI functions in the same way as IMAQ WindShow which is used for displaying image windows 5 Hide Show Show F Visible Get Set Statue Set error in no error af error aut Hide Show Show specifies whether the tools palette is visible Use this input only when Get Set Status Set is TRUE Set Get Set Status Set specifies if the user wants to know the present status or modify the status of the available region tools The default is TRUE Set error in no error is acluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts T Visible returns the present visibility status of the tools palette A visible tools palette returns TRUE d IMAQ Vision for G Reference Manual 12 16 O National Instruments Corporation Chapter 12 Display Eu error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ WindToolsMove Obtains or sets the position of the WindTools palette This VI functions in the same way as IMAQ WindMove which is used for moving image windows 5 Coordinatez Coordinatez Get Set Status Set error in na error af error aut Coordinates i
363. s the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Correlation is a time intensive operation You can reduce the time required to perform a correlation by keeping the template size small and reducing the search area in the source image by using the optional rectangle IMAQ Vision for G Reference Manual 17 12 National Instruments Corporation Chapter Morphology Vis This chapter describes the Morphology VIs in IMAQ Vision The morphological transformations are divided into two groups binary morphology and gray level morphology In binary morphology the pixels are considered to exist in either of two states The pixels are present for pixel values other than 0 or absent for pixel values equal to 0 The two types of binary processing available primary and advanced perform one of two actions They activate and deactivate pixels However with gray level morphology a pixel is compared to those pixels surrounding it to keep those pixel values that are the smallest erosion or the largest dilation VIs responsible for binary morphological transformations only accept an 8 bit image while the VI for gray level morphological transformations using IMAQ GrayMorphology accepts 8 bit 16 bit or 32 bit floating point images An image is considered to be binary after it has undergone a threshold IMAQ Threshol
364. s the number of pixels per column error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ Vision for G Reference Manual 13 2 National Instruments Corporation Chapter 13 Tool Vls IMAQ SetlmageSize Modifies the resolution of an image 8 fe F ec Es 5 CRF O National Instruments Corporation 13 3 Note Image 2 Resolution Y Resolution error in na error Image is the reference to the image whose size has to be modified X Resolution gives the new horizontal resolution of the image Y Resolution gives the new vertical resolution of the image error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAO VI Error Clusters 1n Chapter 9 VI Overview and Programming Concepts Image Out is the reference to the image whose size is modified to a resolution specified by the X Resolution and Y Resolution parameters error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAO VI Error Clusters in Chapter 9 VI Overview and Programming Concepts This function reuses the space previously occupied by the pixels of the image This function is used in preparation for a fill in and does
365. s with a width N 2k 1 greater than or equal to 2k 1 less than or equal to 2k uses k erosions uses k erosions Lowpass and Highpass Example This example uses the following binary source image IMAQ Vision for G Reference Manual 7 24 National Instruments Corporation Chapter 7 Morphology Analysis For a given filter size a highpass filter produces the following image Gray objects and white objects are filtered out by a lowpass and highpass filter respectively Separation Function The separation function breaks narrow isthmuses and separates objects that touch each other with respect to an user specified filter size For example after thresholding an image two gray level objects overlapping one another might appear as a single binary object A narrowing can be observed where the original objects intersected each other f the narrowing has a width of M pixels a separation using a filter size of M 1 breaks it and restore the two original objects This applies at the same time to all objects that contain a narrowing shorter than N pixels For a given filter size N the separation function segments objects having a narrowing shorter than or equal to N 1 pixels These objects are those that are divided into two parts after N 1 2 erosions This operation uses erosions labeling and conditional dilations The above definition is true when N is an odd number It needs to be modified slightly when N
366. same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src T error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts A structuring element must have odd sized dimensions so that it contains a central pixel The function does not take into account the odd boundary furthest out on the matrix if one of the dimensions for the structuring element is even For example if the input structuring element is 6 x 4 X 2 6 and Y 4 the actual processing is performed at 5 x 3 Both the sixth line and the fourth row are ignored Recall that the second dimension in a G array is the vertical direction Y The processing speed is correlated with the size of the structuring element for example a 3 x 3 convolution processes nine pixels while a 5 x 5 convolution processes 25 pixels IMAQ GrayMorphology Performs morphological transformations that can be directly applied to gray level images All source and destination image types must be the same The connected source image for a morphological transformation must have been created with a border capable of supporting the size of the structuring element A 3 x 3 structuring element requires a minimal border of 1 a 5 x 5 structuring element requires a minimal border of 2 and so forth The border size of the destination image
367. separate the particles The default is 1 E 7 Structuring Element is a 2D array that contains the structuring element to be applied to the image The size of the structuring element the size of this array determines the processing size A structuring element of 3 x 3 1s used if this input is not connected y T I error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts O National Instruments Corporation 18 17 IMAQ Vision for G Reference Manual Chapter 18 Morphology VIs Image Dst Out is the reference to the destination output image which m receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Sre arr error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts The following graphic illustrates the processing performed with this function Source Image Resulting Image IMAQ Vision for G Reference Manual 18 18 National Instruments Corporation Analysis Vis IMAQ Histogram Chapter This chapter describes the Analysis VIs in IMAQ Vision Calculates the histogram
368. ser Depending on the mask definition this filter may behave as a lowpass bandpass highpass or any type of selective filter Definition The spatial frequencies of an image are calculated by a function called the Fourier Transform It is defined in the continuous domain as co co F u v fe yje 7 TO 1 dy 00 00 where f x y is the light intensity of the point x y and u v are the horizontal and vertical spatial frequencies The Fourier Transform assigns a complex number to each set u v Inversely a Fast Fourier Transform F u v can be transformed into a spatial image f x y using the following formula AQ ux vy N 1M 1 paa fa y Y Y Flu ve u 0v 0 In the discrete domain the Fourier Transform is calculated with an efficient algorithm called the Fast Fourier Transform FFT This algorithm requires that the resolution of the image be 2 2 Notice that the values and n and m can be different which indicates that the image does not have to be square N 1M 1 Ja 1 F u v Nu da de f x y e M National Instruments Corporation 6 3 IMAQ Vision for G Reference Manual Chapter 6 Frequency Filtering FFI Display where NM is the resolution of the spatial image f x y Because e cos2zux jsin2nux F u v is composed of an infinite sum of sine and cosine terms Each pair u v determines the frequency of its corresponding sine and cosine pair For a given set u
369. shold A number of different automatic thresholding techniques are available including clustering entropy metric moments and interclass variance In contrast to manual thresholding these methods do not require that the user set the minimal and maximal light intensities These techniques are well suited for conditions in which the light intensity varies Depending on your source image it is sometimes useful to invert reverse the original gray scale image before applying an automatic threshold function for example moments and entropy This is especially true for cases in which the region you want to threshold is black and the background you want to eliminate 1s red when viewing with a binary palette Clustering is the only multi class thresholding method available Clustering operates on multiple classes so you can create tertiary or even higher level images The other four methods entropy metric moments and interclass variance are reserved for strictly binary thresholding techniques The choice of which algorithm to apply depends on the type of image to threshold Clustering In this rapid technique the image is randomly sorted within a discrete number of classes corresponding to the number of phases perceived in an image The gray values are determined and a barycenter is determined for each class This process is repeated until a value is obtained that represents the center of mass for each phase or class O National Inst
370. sition of the pixel X Coordinate is the horizontal position of the pixel ER error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Pixel Value U32 returns the pixel value as an unsigned 32 bit integer indicator zu error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts The following graphic illustrates the use of this VI Image Sre EGB A Coordinate Y Coordinate IMAQ Vision for G Reference Manual 22 16 O National Instruments Corporation Chapter 22 Color VIs The red green and blue values also can be manipulated with the following sequence Image Src RGB Coordinate Y Coordinate IMAQ SetColorPixelValue Changes the pixel value for a color image This VI receives the pixel value as an unsigned 32 bit integer control The values R G B H S L or H S V can be converted into an unsigned 32 bit integer control using the VI IMAQ ColorValueToInteger m n E 5 Image A Coordinate Y Coordinate Pinel Value eror in na error Image must be an RGB chunky image X Coordinate is the horizontal position of the pixel Pixel Value U32 contains the pixel value as an u
371. sk diameter diameter of the disk having the same area as the particle in user units 49 Diagonal diagonal of an equivalent rectangle in user units error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Coefficients 2D is a 2D array containing the specified measurements This array is used only when the user has specified multiple coefficients measurements for each particle The data is stored by particle followed by the coefficients m gn T uar sL Coefficients 1D is a 1D array containing the specified measurements This array is used only when the user has specified either multiple coefficients measurements for a single particle or a single coefficient for multiple particles Coefficient is the measurement specified for a single particle arr error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts National Instruments Corporation 19 19 IMAQ Vision for G Reference Manual Chapter 19 Analysis VIs The output from this VI can be in one of three forms Coefficients 2D Coefficients 1D or Coefficient The final type of output is dependent on the connected inputs as shown in the following table
372. ssage source is a string that indicates the origin of the error if any Usually source is the name of the VI in which the error Occurred error out is a cluster that describes the error status after this VI executes If an error occurred before this VI was called error out is the same as error in Otherwise error out shows the error if any that occurred in this VI Use the Error Handler VIs to look up the error code and to display the corresponding error message Using error in and error out clusters is a convenient way to check error and to specify execution order by wiring the error output from one subVI to the error input of the next status is TRUE if an error occurred or FALSE if not If status is TRUE code is a nonzero error code If status is FALSE code can be 0 or a warning code code is the number identifying an error or warning If status is TRUE code is a nonzero error code If status is FALSE code can be 0 or a warning code Use the Error Handler VIs to look up the meaning of this code and to display the corresponding error message source is a string that indicates the origin of the error if any Usually source is the name of the VI in which the error Occurred IMAQ Vision for G Reference Manual Chapter 9 VI Overview and Programming Concepts Base and Advanced Versions of IMAQ Vision IMAQ Vision is available in both a Base version and an Advanced version The description of each VI is accompanied by a
373. status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ WriteFile Writes an image in a file 8 he E Es A Image File Type File Path erar in na errar Image is the reference to the image structure to which the data from the image file is applied File Type describes the file type to be written The default file type is APD The file types supported are BMP TIFF PICT Macintosh only and AIPD internal file format File Path is the complete path name including drive directory and filename for the file to be loaded This path can be supplied either by the user or the VI File Dialog from LabVIEW or BridgeVIEW i National Instruments Corporation 11 5 IMAQ Vision for G Reference Manual Chapter 11 File Vis error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAO VI Error Clusters in Chapter 9 VI Overview and Programming Concepts zmn error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts zmn n Note The options regulating the saving of an image file can be used for certain file types These options exist as a cluster that is not visibl
374. t Src A x y gt SrcB x y or a constant Dst x y 0 Dst x y SrcA x y O National Instruments Corporation 15 15 IMAQ Vision for G Reference Manual Chapter 15 IMAQ Vision for G Reference Manual Operator VIs Image Src A is the reference to the source input image A Image Dst is the reference to the destination image If it is connected it must be the same type as the Image Src A Image Src B is the reference to the source input image B Constant is the value used in comparison with Image Src A for image constant operations The default is 0 error in no error is acluster that describes the error status before this VI executes For more information about this control see the section IMAO VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts The different image type combinations supported by this VI are described in the following equations The first symbol represents the image connected to Image Src A and the second symbol repr
375. t facility for IMAQ Vision that can be programmed to perform specific actions in case of an error The previous error code also can be read e fe E Es 5 Error Pracessing Last Error Code Set Error Condition Last Error Message Error Processing is a number representing the type of error processing you need to use This value is used only when the Boolean Set Error Condition is set to TRUE The following values are possible O Dialog Displays a Stop Continue dialog box to determine whether to stop or continue when an error occurs Dialog is the default value Stop Stops in case of error 2 Ignore Ignores all errors and does not display an error message O National Instruments Corporation 10 5 IMAQ Vision for G Reference Manual Chapter 10 Management VIs Set Error Condition rereads the last occurring error FALSE or programs a procedure when an error occurs TRUE The default value 1s FALSE Last Error Code contains the last occurring error code if the Boolean Set Error Condition is set to FALSE This error code is accessible only once and is reset automatically after reading Last Error Message contains the message associated with the last error code if the Boolean Set Error Condition is set to FALSE As in Last Error Code this error message is accessible only once and is reset automatically after reading Note Error codes returned from the VIs in IMAQ Vision are not accessible directly If an error occurs
376. t occupied in memory This VI must be used for each image created in an application to free the memory allocated to IMAQ Create IMAQ Dispose is only executed when the image reference is no longer used in an application You can use IMAQ Dispose for each call to IMAQ Create or just once for all images created with IMAQ Create fe R C E 5 Image All Images Ma erar in na error DT Image is the name of the image to be destroyed All Images No determines whether the user wants to destroy a single image or all previously created images Giving a TRUE value on input destroys all images previously created The default is FALSE This function must be used at the end of an application to free the memory occupied by the images error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ Vision for G Reference Manual 10 4 O National Instruments Corporation Chapter 10 Management VIs IMAO VI Error Clusters 1n Chapter 9 VI Overview and Programming Concepts Ep error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAO VI Error Clusters 1n Chapter 9 VI Overview and Programming Concepts EP Note When a LabVIEW or Bridge VIEW application is aborted the image space remains occupied Image Processing Generic IMAQ Error An error managemen
377. tained with the following Prewitt convolution kernels Kernel 1 Kernel 2 1 O 1 1 1 I 1 O 1 0 00 1 0 1 1 1 1 Pay 7max lPG 1 57 Pis ij p Par Pa 1 p Pas jen 7 Pai jm Piojo Picuj po t Pa jen Paj Pisas p 7 Pisa yl Nonlinear Sobel Filter The nonlinear Sobel filter 1s a highpass filter that extracts the outer contours of objects It highlights significant variations of the light intensity along the vertical and horizontal axes Each pixel is assigned the maximum value of its horizontal and vertical gradient obtained with the following Sobel convolution kernels Kernel 1 Kernel 2 1 O 1 eL 2 2 0 2 0 00 1 O 1 1 2 1 As opposed to the Prewitt filter the Sobel filter assigns a higher weight to the horizontal and vertical neighbors of the central pixel Pa y max IPG_ 57 Parij AP G1 y Paip t PGi jay Par jo i j lIPa 1 9 7 Paci 2P6 5 Pa er Peso O National Instruments Corporation 5 23 IMAQ Vision for G Reference Manual Chapter 5 Spatial Filtering Example This example uses the following source image A nonlinear Prewitt filter produces the following image Both filters outline the contours of the objects Because of the different convolution kernels they combine the nonlinear Prewitt has the tendency to outline curved contours while the nonlinear Sobel extracts square contours This difference is noticeable when observing the outlines of isolated pixels IMAQ Vision for G Referen
378. tations illustrated in the following table The pixels considered as neighbors of the given pixel shown in solid are indicated by the shaded pattern IMAQ Vision for G Reference Manual 1 6 National Instruments Corporation Chapter 1 Algorithms and Principles of Image Files and Data Structures Neighborhood Size Rectangular Hexagonal Rectangular Frame Each pixel is surrounded by eight neighbors Figure 1 1 Rectangular Frame If d 1s the distance from the vertical and horizontal neighbors to the central pixel then the diagonal neighbors are at a distance of 2d from the central pixel O National Instruments Corporation 1 7 IMAQ Vision for G Reference Manual Chapter 1 Algorithms and Principles of Image Files and Data Structures Hexagonal Frame Each pixel is surrounded by six neighbors Each neighbor is found at an equal distance d from the central pixel Figure 1 2 Hexagonal Frame This notion of pixel frame is important for a category of image processing functions called neighborhood operations These functions alter the value of pixels depending on the intensity values of their neighbors They include spatial filters which alter the intensity of a pixel with respect to variations in intensities of neighboring pixels and morphological transformations which extract and alter the structure of objects in an image IMAQ Vision for G Reference Manual 1 6 National Instruments Corporation Tools and Utilities
379. ter 20 Geometry VIs Replace Value defines the filling value created by the rotation The default is 0 El error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAO VI Error Clusters in Chapter 9 VI Overview and Programming Concepts a Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src a error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts a mege Src Replace Value IMAQ Shift Translates an image based on a horizontal and vertical offset laibalkEs 5 Replace Value Image 5rc Image Dist Out Image Lat Offset YOffset E error out error in no error Replace Value defines the filling value created by the shift The default is O ER Image Src is the reference to the source input image O National Instruments Corporation 20 5 IMAQ Vision for G Reference Manual Chapter 20 Geometry VIs Image Dst is the reference of the image destination If it is connected it must be the same type as the Image Src XOffset is the horizontal offset added to t
380. ter 9 VI Overview and Programming Concepts IMAQ Vision for G Reference Manual 13 14 National Instruments Corporation Chapter 13 Tool Vls For example an Image Dst with a resolution of 512 x 512 and an Image Src with a resolution of 256 x 256 having an Offset Left Top value 256 256 produce the following operation However using an Offset Left Top value 256 256 and a resolution of 384 x 384 for the Image Src produce the following operation With an Image Dst with a resolution of 512 x 512 and an Image Src with a resolution of 512 x 512 produce the following operation National Instruments Corporation 13 15 IMAQ Vision for G Reference Manual Chapter 13 Tool VIs Tools Pixel IMAQ GetPixelValue Reads or extracts a pixel value from an image e he F Image Pitel Value LI8 A Coordinate Pitel Value 116 Y Coordinate d Pitel Value SGL error in no error aE error aut Image is the reference to the source input image X Coordinate is the horizontal coordinate of the pixel to read Y Coordinate is the vertical coordinate of the pixel to read error in no error is acluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Pixel Value U8 returns the specified pixel value This output is used only for an 8 bit image Pixel Value 116 returns th
381. tes the convex regions of objects in a binary image See linear filter Simple3x3 5x5 0r7 x 7 matrices or templates used to represent the filter in the filtering process The contents of these kernels are a discrete two dimensional representation of the impulse response of the filter that they represent Similar to the distance functions but with more accurate results G 2 O National Instruments Corporation density function differentiation filter digital image dilation distance calibration distance function E Equalize function erosion exponential and gamma corrections Exponential function F Fast Fourier Transform FFT Fourier spectrum Fourier Transform frequency filters O National Instruments Corporation For each gray level in a linear histogram 1t gives the number of pixels in the image that have the same gray level Extracts the contours edge detection in gray level An image f x y that has been converted into a discrete number of pixels Both spatial coordinates and brightness are specified Increases the size of an object along 1ts boundary and removes tiny holes in the object Determination of the physical dimensions of a pixel by defining the physical dimensions of a line in the image Assigns to each pixel in an object a gray level value equal to its shortest Euclidean distance from the border of the object See histogram equalization Reduces the size of an object along
382. the user window The default value is 17 TF Region Status modifies the status of a user zone TRUE or FALSE when the input Get Set Status is TRUE Set IMAQ Vision for G Reference Manual 12 30 National Instruments Corporation Chapter 12 Display Get Set Status Set specifies whether the user needs to know the present status or modify the status of the zones The default is TRUE Set zz error in no error isa cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts TF Regions Status returns the present status TRUE or FALSE of each zone E error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ WindUserShow Obtains or modifies the status regarding the visibility of a user window This VI functions in the same way as IMAQ WindShow which is used for displaying image windows 5 Window Number 1 7 22 Hide Show Show FRE Visible Get Set Statue Set error in no error il error aut Window Number 17 22 is a number from 17 to 22 that specifies the user window The default value is 17 Hide Show Show specifies whether the tools palette is visible Use this input only when Get Set Status Set
383. the high frequency information at the corners of an FFT transformed image Finds the outer boundary of objects The gradation of colors used to display an image on screen usually defined by a color lookup table Image format commonly used for 8 bit images on Macintosh and Power Macintosh platforms An element of a digital image Picture element Directly calibrating the physical dimensions of a pixel in an image The number of bits used to represent the gray level of a pixel Similar to a logarithmic function but with a weaker effect See exponential function G 8 O National Instruments Corporation Prewitt filter probability function proper closing proper opening Q quantitative analysis R region of interest Reverse function RGB RGB chunky Roberts filter ROI O National Instruments Corporation Extracts the contours edge detection in gray level values using a 3 x 3 filter kernel Defines the probability that a pixel in an image has a certain gray level value A finite combination of successive closing and opening operations that you can use to fill small holes and smooth the boundaries of objects A finite combination of successive opening and closing operations that you can use to remove small particles and smooth the boundaries of objects Obtaining various measurements of objects in an image An area of the image that is graphically selected from a window displaying the image This
384. the occurrence of these variations in the spatial domain This new component is called the spatial frequency which is the frequency with which the light intensity in an image varies as a function of spatial coordinates Spatial frequencies of an image are computed with the Fast Fourier Transform FFT The FFT is calculated in two steps a one dimensional transform of the rows followed by a one dimensional transform of the columns of the previous results The complex numbers that compose the FFT plane are encoded in a 64 bit floating point image called a complex image 32 bits for the real part and 32 bits for the imaginary part IMAQ Vision can read and write complex images through IMAQ ReadFile and IMAQ WiriteFile In an image details and sharp edges are associated with high spatial frequencies because they introduce significant gray level variations over short distances Gradually varying patterns are associated with low spatial frequencies Filtering spatial frequencies allows you to remove attenuate or highlight the spatial components to which they relate You can use a lowpass frequency filter to attenuate or remove truncate high frequencies present in the FFT plane This filter suppresses information related to rapid variations of light intensities in the spatial image An inverse FFT after a lowpass frequency filter produces an image in which noise details texture and sharp edges are smoothed IMAQ ComplexAttenuate or IMAQ Compl
385. this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts a 7 Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts The Image Mask contents are considered to be binary All pixel values other than zero are lit and all pixel values of O are turned off Image Mask must be an 8 bit image if it is different than the Image Src Image Dst must be the same image type as Image Src O National Instruments Corporation 15 17 IMAQ Vision for G Reference Manual Chapter Processing VIs This chapter describes the Processing VIs in IMAQ Vision IMAQ Threshold Applies a threshold to an image lham BAJA keep Replace Value Replace eereeeeees Image Src Image List Out Image Dist Hange B Replace Value j E error out error in no error Keep Replace Value Replace determines whether the pixels existing in the range between Lower value and Upper value are to be replaced by another value The default TRUE replaces these pixel values and the status FALSE keeps the origi
386. tion IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts zu Image Out is the reference to the destination output image zu error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts See the additional VIs in Chapter 21 Complex VIs for performing array to image transformations with complex images Tools Diverse IMAQ ImageToClipboard Copies the image to the clipboard n Image Color Palette eror in na error Image is the reference to the source input image us Color Palette can be applied to an 8 bit image It can be taken directly from the output of IMAQ GetPalette or specified by the user It is formed from an array of clusters composed of 256 elements for each of the three color planes A specific color is the result of affecting a value between 0 and 255 for each of the three color planes red green and blue If the three planes have the identical value then a gray level is obtained 0 specifies black and 255 specifies white By default the palette is a gray scale ramp IMAQ Vision for G Reference Manual 13 24 National Instruments Corporation Chapter 13 Tool Vls EET error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Erro
387. tion of 256 x 256 is composed of the points 0 0 to 255 255 but the rectangle takes into account the entirety of the image 0 0 256 256 The right horizontal and the bottom vertical positions must be greater than 1 for the last specified column and line The default coordinates for a rectangle are 0 0 32767 32767 If these coordinate values are shown in the front panel of the VI the rectangle input is not connected In this case the entire image is taken into account when the operation is performed Line The entity Line is composed of four coordinates distributed in two points Each point contains horizontal and vertical information An array of integers must be constructed to specify a line This includes the following information Line 0 x where x is the horizontal starting position Line 1 2 y where y is the vertical starting position Line 2 x where x is the horizontal end point position Line 3 2 y where y 1s the vertical end point No default vector is defined In executing this type of VI you must connect a table of four elements Note that a line contains 256 points the line 0 0 255 255 also contains 256 points IMAQ Vision for G Reference Manual 9 14 National Instruments Corporation Chapter 9 VI Overview and Programming Concepts us r16 Table of pixels The entity table of pixels is represented as a 2D array The first dimension in a G array 1s the vertical axis and the second di
388. titative image analysis e Chapter 9 IMAQ Vision Programming Concepts contains an overview of IMAQ Vision programming concepts a description of the Base and Advanced versions of IMAQ Vision and a listing of the VIs included in these versions It also provides a summary of the icons used in the function reference chapters of this manual e Chapter 10 Management VIs describes the Management VIs in IMAQ Vision e Chapter 11 File VIs describes the File VIs in IMAQ Vision O National Instruments Corporation XIX IMAQ Vision for G Reference Manual About This Manual IMAQ Vision for G Reference Manual Chapter 12 Display VIs describes various Display VIs in IMAQ Vision Chapter 13 Tool VIs describes the image pixel and diverse Tool VIs in IMAQ Vision Chapter 14 Conversion VIs describes the Conversion VIs in IMAQ Vision Chapter 15 Operator VIs describes the Operator VIs in IMAQ Vision Chapter 16 Processing VIs describes the Processing VIs 1n IMAQ Vision Chapter 17 Filter VIs describes the Filter VIs in IMAQ Vision Chapter 18 Morphology VIs describes the Morphology VIs in IMAQ Vision Chapter 19 Analysis VIs describes the Analysis VIs in IMAQ Vision Chapter 20 Geometry VIs describes the Geometry VIs in IMAQ Vision Chapter 21 Complex VIs describes the Complex VIs in IMAQ Vision Chapter 22 Color VIs describes the Color VIs in IMAQ Vision Chapter 23 External Library Support VIs describes the
389. to 7 26 skeleton functions 7 26 to 7 27 gray level morphology 7 32 to 7 38 auto median function 7 38 closing function 7 35 to 7 36 dilation function 7 33 to 7 34 erosion function 7 33 to 7 34 opening function 7 34 to 7 36 proper closing function 7 37 proper opening function 7 36 to 7 37 overview 7 1 primary binary morphology functions 7 9 to 7 22 auto median function 7 21 to 7 22 closing function 7 12 to 7 13 dilation function 7 9 to 7 11 erosion function 7 9 to 7 11 external edge function 7 13 to 7 14 hit miss function 7 14 to 7 16 internal edge function 7 13 to 7 14 O National Instruments Corporation opening function 7 12 to 7 13 proper closing function 7 21 proper opening function 7 20 thickening function 7 18 to 7 20 thinning function 7 17 to 7 18 structuring element 7 7 to 7 8 thresholding 7 1 to 7 7 automatic 7 3 to 7 7 clustering 7 3 to 7 5 color image 7 3 entropy 7 6 example 7 2 to 7 3 interclass variance 7 6 metric 7 6 moments 7 6 Morphology VIs 18 1 to 18 18 IMAQ Circles 18 13 to 18 14 IMAQ Convex 18 12 IMAQ Danielsson 18 8 IMAQ Distance 18 7 to 18 8 IMAQ FillHole 18 10 to 18 11 IMAQ GrayMorphology 18 5 to 18 7 IMAQ Morphology 18 3 to 18 5 IMAQ RejectBorder 18 11 to 18 12 IMAQ RemoveParticle 18 9 to 18 10 IMAQ Segmentation 18 14 to 18 15 IMAQ Separation 18 17 to 18 18 IMAQ Skeleton 18 15 to 18 16 overview 18 1 to 18 3 Multiplication operator table 4
390. tory and filename for the file to be loaded This path can be supplied either by the user or the VI File Dialog from LabVIEW or Bridge VIEW i error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Calibration is a cluster containing the following elements X Step is the horizontal distance separating two adjacent pixels in user units Y Step is the vertical distance separating two adjacent pixels in user units Unit is the measuring unit associated with the image It can have the following values IMAQ Vision for G Reference Manual 11 4 National Instruments Corporation Chapter 11 File Vis Iu Note This data is accessible only if the image is saved in the internal APD file format For all other file types this VI returns the values in mm X Step 1 Y Step 1 and Unit 3 File Type indicates the file type that 1s read This string contains the three indicative characters of the read file APD internal file format BMP TIF or PICT Macintosh only File Data Type indicates the pixel size defined in the header for standard image file types X Resolution indicates the horizontal resolution in pixels of the image file Y Resolution indicates the vertical resolution in pixels of the image file error out is a cluster that describes the error
391. trol see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src National Instruments Corporation 13 1 IMAQ Vision for G Reference Manual Chapter 13 Tool VIS ET error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts n Note The images to be copied must be the same type The full definition of the source image as well as the pixel data are copied to the destination image The border size of the destination image also is modified to be equal to that of the source image Gives information regarding the size resolution of the image Le he F c le FY Image Resolution Y Resolution error in na errar at error out Image is the reference to the image whose size has to be determined error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts X Resolution gives the number of pixels per line Y Resolution give
392. truments Corporation Chapter 8 Quantitative Analysis Notice that for a given area and perimeter only one solution a b exists Ellipse Minor Axis The ellipse minor axis is the total length of the minor axis of the ellipse that has the same area and same perimeter as an object This length is equal to 2b Ellipse Ratio The ellipse ratio is the ratio of the major axis of the equivalent ellipse to its minor axis ellipse major axis a It is defined as ellipse minor axis b The more elongated the equivalent ellipse the higher the ellipse ratio The closer the equivalent ellipse is to a circle the closer to 1 the ellipse ratio Rectangle Big Side Rectangle big side 1s the length of the big side a of the rectangle that has the same area and same perimeter as an object This definition gives the following set of equations Area ab Perimeter 2 a b This set of equations can be expressed so that the sum a b and the product ab become functions of the parameters Particle Area and Particle Perimeter a and b then become the two solutions of the polynomial equation x a D X ab 0 Notice that for a given area and perimeter only one solution a b exists O National Instruments Corporation 8 13 IMAQ Vision for G Reference Manual Chapter 8 Quantitative Analysis Rectangle Small Side Rectangle small side 1s the length of the small side of the rectangle that has the same a
393. truments Corporation 7 15 IMAQ Vision for G Reference Manual Chapter 7 Morphology Analysis Example 2 This example uses the following binary source image Given this binary image the hit miss function can be used to locate pixels surrounded by various patterns specified via the structuring element Use the hit miss function to locate pixels isolated in a background The structuring element presented on the right extracts all pixels equal to 1 that are surrounded by at least two layers of pixels equal to 0 Use the hit miss function to locate single pixel holes in objects The structuring element presented on the right extracts all pixels equal to 0 that are surrounded by at least one layer of pixels equal to 1 Use the hit miss function to locate pixels along a vertical left edge The structuring element presented on 1 the right extracts pixels surrounded by 1 10 at least one layer of pixels equal to 1 to 1 the left and pixels equal to O to the right IMAQ Vision for G Reference Manual 16 National Instruments Corporation Thinning Function Chapter 7 Morphology Analysis The thinning function eliminates pixels that are located in a neighborhood that matches a template specified by the structuring element Depending on the configuration of the structuring element thinning can be used to remove single pixels isolated in the background and right angles along the edges of objects The larger the size of the structu
394. tween a user IMAQ Vision and LabVIEW or Bridge VIEW Selection Region Selection gt Image IMAQ Vision Display basics Display tools LabVIEW or Display user Bridge VIEW Application O National Instruments Corporation 12 11 IMAQ Vision for G Reference Manual Chapter 12 Display IMAQ WindToolsSetup Configures the appearance and availability of the region tools found in the WindTools palette By default with no input connections a palette is displayed containing all nine region tools The WindTools palette is a floating palette and is always visible Sha Coordinates T di a Tools Icons per Line 4 eror in no error Show Coordinates T specifies if the active pixel coordinates are shown Coordinates are shown TRUE by default Note Unlike an image window the WindTools window is not visible unless activated by calling IMAQ WindToolsShow Note You must have LabVIEW version 3 1 or higher to access the pixel coordinate and parameter information Tools specifies which icons are displayed in the WindTools window There are seven region tools available 1 Select a pixel in the image Draw a rectangle or square in the image Draw an oval or circle in the image IMAQ Vision for G Reference Manual 12 12 National Instruments Corporation Chapter 12 Display Zoom Zoom in or zoom out in an image Mim E Draw a broken line in the image Free Hand Line Draw a free hand lin
395. u gather the information necessary to help us solve your technical problems and a form you can use to comment on the product documentation When you contact us we need the information on the Technical Support Form and the configuration form if your manual contains one about your system configuration to answer your questions as quickly as possible National Instruments has technical assistance through electronic fax and telephone systems to quickly provide the information you need Our electronic services include a bulletin board service an FTP site a fax on demand system and e mail support If you have a hardware or software problem first try the electronic support systems If the information available on these systems does not answer your questions we offer fax and telephone support through our technical support centers which are staffed by applications engineers Electronic Services Bulletin Board National Instruments has BBS and FTP sites dedicated for 24 hour support with a collection of files and documents to answer most common customer questions From these sites you can also download the latest instrument drivers updates and example programs For recorded instructions on how to use the bulletin board and FTP services and for BBS automated information call 512 795 6990 You can access these services at United States 512 794 5422 Up to 14 400 baud 8 data bits 1 stop bit no parity United Kingdom 01635 551422 Up to
396. uantification data relative to all the regions within an image or the entire image if the Image Mask is not connected The following elements are contained in this cluster O National Instruments Corporation 19 9 IMAQ Vision for G Reference Manual Chapter 19 Analysis VIs Mean Value of the pixels is returned Standard Deviation of the pixel values is returned It indicates the distribution of the values in relation to the average The higher this value the better the distribution of the pixel values Minimal Value returns the smallest pixel value Maximal Value returns the largest pixel value Area calibrated returns the analyzed surface area in user units Area pixels returns the analyzed surface area in pixels returns the percentage of the analyzed surface in relation to the complete image EE eee BB Region Reports is a cluster containing the quantification data relative to each region within an image or the entire image 1f the Image Mask is not connected The nth element in this array contains the data regarding the nth region The size of this array is equal to the largest pixel value in Image Mask The returned data is identical to the data in Global Report r1 iD ol LI error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ Centroid Co
397. ue channel L I I EE A color pixel encoded as an unsigned 32 bit integer control can be decomposed as shown in the following graphic 1 Cus Red vaiu Il A color image always is encoded in memory in the form R G B However there are a number of other coding models such as H S L and H S V The H S L model is composed as hue saturation and lightness and the H S V model as hue saturation and value To recuperate the values for hue saturation lightness or value a measurement is made from the red green and blue components Note that these measurements require time depending on the values to extract These extractions are not completely objective In effect a color converted between two of the different color models for instance RGB to HSL and then reconverted back to the original color model does not have exactly the same values as the original image This difference is because of the 8 bit encoding of the image planes which causes some loss of data National Instruments Corporation 22 1 IMAQ Vision for G Reference Manual Chapter 22 Color Vis The principal operations that can be performed on color images are e Extraction or replacement of a color image plane R G B H S L V e Application of a threshold to a color image based on one of the three color models RGB HSL or HSV e Performance of a histogram on a color image based on one of the three color models RGB HSL or HSV
398. ue of a pixel acts as an address that is indexed into three tables with three values corresponding to a red green and blue RGB intensity This set of three conversion tables defines a palette in O National Instruments Corporation 2 1 IMAQ Vision for G Reference Manual Chapter 2 Tools and Utilities which varying amounts of red green and blue are mixed to produce a color representation of the value range 0 255 Lal Sly ea Color Lookup Table Five pseudo color palettes are predefined in the programs and libraries Each palette emphasizes different shades of gray However they all use the following conventions e Gray level 0 is assigned to black e Gray level 255 is assigned to white Because of these conventions you can associate bright areas to the presence of pixels with high gray level values and dark areas to the presence of pixels with low gray level values The following sections introduce the five predefined palettes The graphs in each section represent the three RGB lookup tables used by each palette The horizontal axes of the graphs represent the input gray level range 0 255 while the vertical axes give the RGB intensities assigned to a given gray level value B amp W Gray Palette This palette has a gradual gray level variation from black to white Each value is assigned to an equal amount of the RGB intensities 777 IMAQ Vision for G Reference Manual 2 2 National Instruments Corporatio
399. ult all pixel values are included 0 255 Blue or Light or Val Range has the same elements as found in Red or Hue Range error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Dst Out is the reference to the destination output image which receives the processing results of the VI Image Dst Out is the same as Image Dst error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ Vision for G Reference Manual 22 12 O National Instruments Corporation Chapter 22 Color VIs IMAQ ColorUserLookup Applies a lookup table LUT to each color plane 5 Lolor Made Image Src HGB Image Dt Out HGB Image Dist RGB P Red or Hue Lookup T able error out Green or Sat Lookup T able l Blue or Light oral Look error in no error zu Image Mask if connected must be an 8 bit image Color Mode defines the image color format to use for the operation The default is 0 which specifies RGB O Default RGB 1 HSL 2 HSV E Image Src RGB is the reference to the source image It must be an RGB chunky image E Image Dst RGB is the reference to the destination image If connected it m
400. ust be an RGB chunky image 116 Red or Hue Lookup Table is the LUT applied to the first color plane depending on the Color Mode This array can contain a maximum of 256 elements The array is filled automatically when less than 256 elements are specified This procedure does not change pixel values that are not explicitly specified from the values of the LUT given by the user on input By default this array is empty and no replacement occurs on this plane O National Instruments Corporation 22 13 IMAQ Vision for G Reference Manual Chapter 22 Color Vis Green or Sat Lookup Table is the LUT applied to the second color plane depending on the Color Mode This array can contain a maximum of 256 elements The array is filled automatically when less than 256 elements are specified This procedure does not change pixel values that are not explicitly specified from the values of the LUT given by the user on input By default this array is empty and no replacement occurs on this plane 116 Blue or Light or Val Lookup Table is the LUT applied to the third color plane depending on the Color Mode This array can contain a maximum of 256 elements The array is filled automatically when less than 256 elements are specified This procedure does not change pixel values that are not explicitly specified from the values of the LUT given by the user on input By default this array is empty and no replacement occurs on this plane 116 Y
401. ust have been created with a border size of at least 1 and must be an 8 bit binary image This function requires the creation of a temporary memory space that is twice the size of the source image La ib Image Src Image Dist Out Image Dist erar in na errar a error aut Image Src is the reference to the source input image mu E Image Dst is the reference to the destination image If it is connected it must be the same type as the Image Src zz error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts O National Instruments Corporation 18 7 IMAQ Vision for G Reference Manual Chapter 18 Morphology VIs Eu Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src T error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ Danielsson Returns a distance map based on the algorithms of Danielsson The Danielsson distance map produces images and data that are similar to IMAQ Distance but are much more accur
402. uster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Note At the end of an application it is necessary to remove all image windows from memory Otherwise LabVIEW or BridgeVIEW will not have sufficient memory possibly causing stability problems The use of this VI is similar to the use of IMAQ Dispose In the case of IMAQ WindClose you IMAQ Vision for G Reference Manual 12 4 National Instruments Corporation Chapter 12 Display remove image windows from memory and in the case of IMA O Dispose you remove image data from memory In both cases you reallocate free memory to LabVIEW or Bridge VIEW after executing these functions IMAQ WindShow Shows or hides an image window Window Number 0 15 Hide Show Shaw Visible Bring To Front M Frantmast window Get Set Status Set E error in na error eror out Window Number 0 15 specifies the image window to show or hide It is specified by a number from 0 to 15 The default value is 0 TF Hide Show Show specifies 1f an image window is visible This input is used only when Get Set Status is TRUE Set front This input is only used when Get Set Status is TRUE Set and Hide Show is also TRUE Get Set Status Set specifies if the user wants to know if the image window is visible or if the user wants to modify the v
403. ut Image Model serves as a template for the destination image where the mask is placed Image takes the characteristics of Image Model size and location of ROI when Image Model is connected However the connection of Image Model is optional This can be any image type supported by IMAQ Vision Image is the destination image where the mask is copied This image must be an 8 bit image type ROI Descriptor is the descriptor that defines the region of interest Filling Value 255 is the pixel value of the mask All pixels inside the region of interest take this value The default value is 255 error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Out is the reference to the image mask transformed from the ROI descriptor Coordinates out of space returns TRUE if any ROI data is found outside the space associated with the image error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts You can use this VI in two ways The simplest technique is to connect the input Image Model In this case you can use the source image in which the image ROI was drawn as O National Instruments Corporation 12 27 IMAQ Vision
404. ut Heywood circularity factor shape feature parameters 8 15 highpass FFT filters 6 9 to 6 12 attenuation 6 10 overview 6 2 truncation 6 10 to 6 12 highpass filters advanced binary morphology functions 7 24 to 7 25 classification summary table 5 3 definition 5 1 histogram See also image histogram definition 2 4 histogram VIs IMAQ Histogram 19 1 to 19 3 IMAQ Histograph 19 3 to 19 6 hit miss function primary binary morphology 7 14 to 7 16 concept and mathematics 7 15 example 1 7 15 example 2 7 16 hole filling function advanced binary morphology 7 22 HSL hue saturation and lightness component 1 5 hydraulic radius shape feature parameters 8 15 to 8 16 image creation IMAQ Create VI 10 1 to 10 2 IMAQ Create amp LockSpace VI 10 3 to 10 4 programming concepts 9 10 Image Dst input 9 10 to 9 13 image files 1 5 image histogram 2 4 to 2 8 3D view 2 8 of color images 2 6 IMAQ Vision for G Reference Manual 1 6 cumulative 2 6 definition 2 4 to 2 5 interpretation 2 6 line profile 2 7 to 2 8 linear 2 5 scale of histogram 2 7 Image Mask input 9 11 to 9 12 image pixel frame 1 6 to 1 8 hexagonal frame 1 8 neighborhood size table 1 7 rectangular frame 1 7 Image Src input 9 10 9 12 to 9 13 image tool VIs See Tools Image VIs image type icons 9 2 to 9 3 image visualization 12 1 images color images 1 3 complex images 1 3 to 1 4 definition 1 1 9 1 gray level images 1 3 image
405. ut is O or is not connected Shape to draw is the form to draw The following shapes are available E 0 Line Default Defined by the two points specified in the array Coordinates Rectangle Defined by the bounding rectangle specified in the array Coordinates 2 Oval Defined by the bounding rectangle specified in the array Coordinates ER error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ DrawText Inserts text in an image Fl String Color Image Sre Image List Out Image Dat String width Insertion Point E Font Size le Style errar aut erar in na error O National Instruments Corporation 13 27 IMAQ Vision for G Reference Manual Chapter 13 Tool Vls String empty by default is the text to write in an image The string can be composed of multiple lines separated
406. ut is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src O National Instruments Corporation 14 5 IMAQ Vision for G Reference Manual Chapter 14 Conversion VIs zu error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ Vision for G Reference Manual 14 6 National Instruments Corporation Chapter Operator Vis This chapter describes the Operator VIs in IMAQ Vision Arithmetic Operators IMAQ Add Adds two images or an image and a constant e he F IPIS Constant Image Src A Image List Out Image Dat Image Src B T erar In na errar a error aut Constant is the value added to the input Image Src A for image constant operations The constant is rounded down in the cases in which the image is encoded as an integer The default is 0 El Image Src A is the reference to the source input image A zm n E Image Dst is the reference to the destination image E Image Src B is the reference to the source input image B E error in no error is a cluster that describes the error status before this VI executes For more information about this control see t
407. ut is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts The following graphic illustrates the cardinal coordinates of an image EHHH MEM O National Instruments Corporation 20 3 IMAQ Vision for G Reference Manual Chapter 20 Geometry VIs The North West direction and the South West direction are depicted in the following graphic IMAQ Rotate Rotates an image Let tees BEBE IMAQ Vision for G Reference Manual l i i A i N E e A South West Color Replace Value Image Src Image Dist Angle degrees Replace Value erar in na error 20 4 Image Dist Out error aut Color Replace Value is a cluster containing the Alpha Red Green and Blue channel values used for filling a color image The default is 0 Image Src is the reference to the source input image Image Dst is the reference of the image destination If it is connected it must be the same type as the Image Src Angle degrees defines the angle in degrees to rotate The default O National Instruments Corporation Chap
408. v note that all values f x y contribute to F u v Because of this complexity the FFT calculation is time consuming The relation between the sampling increments in the spatial domain Ax Ay and the frequency domain Au A v is 1 1 dal E dal The FFT of an image F u v is a two dimensional array of complex numbers or a complex image It represents the frequencies of occurrence of light intensity variations in the spatial domain The low frequencies u v correspond to smooth and gradual intensity variations found in the overall patterns of the source image The high frequencies u v correspond to abrupt and short intensity variations found at the edges of objects around noisy pixels and around details An FFT image can be visualized using any of its four complex components real part imaginary part magnitude and phase The relation between these components is expressed by F u v R u v jl u v where R u v 1s the real part and u v is the imaginary part and F u v F u v x eje where F u v 1s the magnitude and Q u v 1s the phase The magnitude of F u v is also called the Fourier spectrum and is equal to IF u v 4 R u v I u D The Fourier spectrum to the power of two is known as the power spectrum or spectral density IMAQ Vision for G Reference Manual 6 4 O National Instruments Corporation Chapter 6 Frequency Filtering The phase u v is also called the phase angle
409. values using a 3 x 3 filter kernel Assigning physical dimensions to the area of a pixel in an image Alter the intensity of a pixel with respect to variations in intensities of its neighboring pixels You can use these filters for edge detection image enhancement noise reduction smoothing and so forth The number of pixels in an image in terms of the number of rows and columns in the image See exponential function See logarithmic function Contains the low frequency information at the corners and high frequency information at the center of an FFT transformed image A binary mask used in most morphological operations A structuring element is used to determine which neighboring pixels contribute in the operation G 10 O National Instruments Corporation T thickening thinning threshold threshold interval TIFF truth table ZOnes O National Instruments Corporation Alters the shape of objects by adding parts to the object that match the pattern specified in the structuring element Alters the shape of objects by eliminating parts of the object that match the pattern specified in the structuring element Separates objects from the background by assigning all pixels with intensities within a specified range to the object and the rest of the pixels to the background In the resulting binary image objects are represented with a pixel intensity of 255 and the background is set to 0 Two parameters the l
410. verview and Programming Concepts Window Number 0 15 indicates the image window that is queried for events Event indicates the type of event Tool returns a code indicating the region tool used Coordinates indicates the relative position of the event y T M Other Parameters supplies information associated with an event such as positioning and region distances rma PGL Ld National Instruments Corporation 12 19 IMAQ Vision for G Reference Manual Chapter 12 Display The following table describes the possible values for the Event Tool Coordinates and Other Parameters indicators Click 0 1 position x y of click 0 1 2 pixel value 8 Zoom position of click 0 zoom factor position of image center 2 Draw Line 0 1 position of starting point 0 1 width and height 2 3 position of ending point 2 vertical segment angle segment length 5 0 1 position of image window 4 Size 0 1 width and height of image empty window A Pixel values are stored in the first element of the array for 8 bit 16 bit and floating point images The RGB values of color images are stored in the order 0 1 2 The real and imaginary values of a complex image are stored in the order 0 1 error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Co
411. vice driver VIs Color image processing and analysis histogram Certain Tools and Analysis VIs are restricted to the Advanced version of IMAQ Vision Vis in the Advanced Version Only IMAQ Vision Advanced contains all the functions found in Base as well as an additional set of VIs Name of VI Chapter Functionality of VIs Conversion 14 Linear or nonlinear conversions from one image type into another O National Instruments Corporation 9 7 IMAQ Vision for G Reference Manual Chapter 9 VI Overview and Programming Concepts Name of VI Family Operators Arithmetic Logic and Comparison Morphology IMAQ Vision for G Reference Manual Chapter Functionality of VIs Addition Subtraction Multiplication Division Ratio and Modulo between two images or between one image and a constant Logic operators include AND NAND OR NOR XOR XNOR and LogDiff between two images or between one image and a constant Clear or Set as a function of a relational operator between two images or between one image and a constant Masking and the extraction of a minimum maximum or average can be performed between two images or between an image and a constant Threshold Label LUT lookup table Transformation and so forth Convolutions construction and choosing of user defined kernels Nonlinear Filters for example gradient lowpass Prewitt Sobel and Roberts Morphology functions for editing binary images includi
412. vide 15 5 to 15 6 IMAQ Modulo 15 8 to 15 9 IMAQ MulDiv 15 7 to 15 8 IMAQ Multiply 15 4 to 15 5 IMAQ Subtract 15 2 to 15 4 arithmetic operators 4 2 auto median function gray level morphology 7 38 primary binary morphology 7 21 to 7 22 axes See chord and axis parameters axis of symmetry of gradient kernel 5 6 B amp W gray palette 2 2 binary morphology functions advanced 7 22 to 7 32 border function 7 22 circle function 7 30 to 7 31 convex function 7 31 to 7 32 Danielsson function 7 29 to 7 30 distance function 7 29 highpass filters 7 24 to 7 25 hole filling function 7 22 labeling function 7 23 lowpass filters 7 23 to 7 25 segmentation function 7 27 to 7 29 separation function 7 25 to 7 26 skeleton functions 7 26 to 7 27 primary 7 9 to 7 22 auto median function 7 21 to 7 22 closing function 7 12 to 7 13 dilation function 7 9 to 7 11 erosion function 7 9 to 7 11 IMAQ Vision for G Reference Manual Index external edge function 7 13 to 7 14 hit miss function 7 14 to 7 16 internal edge function 7 13 to 7 14 opening function 7 12 to 7 13 proper closing function 7 21 proper opening function 7 20 thickening function 7 18 to 7 20 thinning function 7 17 to 7 18 binary palette 2 4 BMP format gray level image 1 3 border function advanced binary morphology 7 22 B amp W gray palette 2 2 C center of mass X and center of mass Y coordinates 8 8 chord and axis parameters 8 9 to 8
413. w Color Palette is an array of clusters constructed by the user or supplied by IMAQ GetPalette This palette is composed of 256 elements for each of the three color planes A specific color is the result of applying a value between 0 and 255 for each of the three color planes red green and blue If the three planes have the identical value then a gray level is obtained 0 specifies black and 255 specifies white A color palette is not used for a true color image RGB You should use a screen capable of displaying thousands 15 16 bit or 16 million colors 24 bit Currently LabVIEW and BridgeVIEW do not display a full palette of 256 colors or gray scales unless your monitor has a display capability of 16 million colors A true color image does not use a display palette and therefore displays in true color if your monitor is ina 24 bit display mode Macintosh only You can change the palette tolerance in a Macintosh or Power Macintosh You can display a full palette of 256 colors or gray scales even with an 8 bit display mode In this case it is necessary to use the IMAQ PaletteTolerance VI and change from Tolerant mode to Exact mode Resize to Image Size Y specifies whether the user wants to resize the image window automatically to fit the image size The default is set to TRUE yes in which case the user does not have to know the size of a source image prior to displaying it You must use the IMAQ WindSize function to pl
414. wants to receive your comments on our products and manuals We are interested in the applications you develop with our products and we want to help if you have problems with them To make it easy for you to contact us this manual contains comment and configuration forms for you to complete These forms are in Appendix A Customer Communication at the end of this manual IMAQ Vision for G Reference Manual XXII National Instruments Corporation Algorithms and Principles of Image Files and Data structures Chapter This chapter describes the algorithms and principles of image files and data structures Introduction to Digital Images An image is a function of the light intensity f x y where f is the brightness of the point x y and x and y represent the spatial coordinates of a picture element abbreviated pixel By default the spatial reference of the pixel with the coordinates 0 0 is located at the upper left corner of the image In digital image processing an acquisition device converts an image into a discrete number of pixels This device assigns a numeric location and gray level value which specifies the brightness of pixels Properties of a Digitized Image A digitized image has three basic properties image resolution image definition and number of planes Image Resolution The spatial resolution of an image is its number of rows and columns of pixels An image composed of m rows and n columns has a
415. window this VI returns the window number and the mouse coordinates 5 Window Number A mouse coordinate Y mouse coordinate error in no error at error aut error in no error is acluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Window Number gives the number of active windows X mouse coordinate gives the X coordinate of the mouse in the active screen National Instruments Corporation 12 35 IMAQ Vision for G Reference Manual Chapter 12 Display Y mouse coordinate gives the Y coordinate of the mouse in the active screen Ep error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAO VI Error Clusters in Chapter 9 VI Overview and Programming Concepts IMAQ WindROIColor Selects the color of ROI lines Color of ROI white eror in no error Color of ROI is a cluster that specifies the color of the ROI The default color is white Red gives the red plane intensity The default 1s 255 Green gives the green plane intensity The default is 255 Blue gives the blue plane intensity The default 1s 255 Ep error in no error is acluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in
416. xample IMAQ WindLastEvent is used to retrieve the pixel value directly from a user click in an image window This value is released to the Tools VI IMAQ MagicWand which creates an image mask based on the input pixel value and a tolerance level also set in IMAQ MagicWand The mask is then transformed into an ROI IMAQ MaskToROI and IMAQ WindSetROI IMAQ WindEraseROI Erases the active region of interest associated with an image window Window Number error in no error Window Number 0 15 is a number from 0 to 15 that specifies the image window The default value is 0 error in no error is a cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts LP Note You can erase an ROI in an image window by pressing Backspace when the current image window is active IMAQ Vision for G Reference Manual 12 26 National Instruments Corporation IMAQ ROIToMask Chapter 12 Display Transforms a region of interest into a mask al 1H E H H E Image Model Image T ES Image Out ROI Descriptor Coordinates out of space Filling Value 255 r error in na error errar o
417. y MB Brand Instruments used National Instruments hardware product model Revision Configuration National Instruments software product Version Configuration The problem is List any error messages The following steps reproduce the problem IMAQ Vision for G Hardware and Software Configuration Form Record the settings and revisions of your hardware and software on the line to the right of each item Complete a new copy of this form each time you revise your software or hardware configuration and use this form as a reference for your current configuration Completing this form accurately before contacting National Instruments for technical support helps our applications engineers answer your questions more efficiently National Instruments Products DAQ hardware Interrupt level of hardware DMA channels of hardware Base I O address of hardware Programming choice BridgeVIEW or LabVIEW Other boards in system Base I O address of other boards DMA channels of other boards Interrupt level of other boards Other Products Computer make and model Microprocessor Clock frequency or speed Type of video board installed Operating system version Operating system mode Programming language Programming language version Other boards in system Base I O address of other boards DMA channels of other boards Interrupt level of other boards Documentation Comment Form National Instruments encourages you to comment on the documentati
418. y a complex image J 5 B O National Instruments Corporation 21 9 IMAQ Vision for G Reference Manual Chapter 21 Complex VIs a a a Image Src B is the handle of the second source image This input can accept an 8 bit 16 bit 32 bit floating point or complex image If the image is not a complex image then the imaginary part of the Image Dst is equal to Image Src A error in no error is acluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Image Dst Out is the reference to the destination output image which receives the processing results of the VI If the Image Dst is connected then Image Dst Out is the same as Image Dst Otherwise Image Dst Out refers to the image referenced by Image Src A error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts An operation between an image and a constant occurs when the input Image Src B is not connected The two possibilities are distinguished in the following equations Dst x y SrcA x y SrcB x y or Dst x y SrcA x y Constant The different image type combinations supported by this VI are described below The first column describes the image connected
419. y domain of the image A lowpass frequency filter suppresses information related to fast variations of light intensities in the spatial image G 6 O National Instruments Corporation lowpass truncation L skeleton function mask mask filter mask image mechanical action median filter morphological transformations M skeleton neighborhood operations nonlinear filter nonlinear gradient filter O National Instruments Corporation Removes all frequency information above a certain frequency Uses an L shaped structuring element in the Skeleton function Isolates parts of an image for further processing Removes frequencies contained in a mask range specified by the user An image containing a value of and values of 0 Pixels in the source image with a corresponding mask image value of 1 are processed while the others are left unchanged Specifies how a zone is activated In the Switch mode the first click on a zone turns the zone to TRUE and a second click turns it to FALSE In the Latch mode a click causes the zone to be temporarily TRUE A low pass filter that assigns to each pixel the median value of its neighbors This filter effectively removes isolated pixels without blurring the contours of objects Extract and alter the structure of objects in an image You can use these transformations for expanding dilating or reducing eroding objects filling holes closing inclusions or smoothing borde
420. y function does not directly manipulate a C structure this VI provides this function n Data string Bytes count erar in na error E error aut void is the pointer on the memory zone to be copied The following table gives the pointer type for different platforms 32 bit flat universal type The size of the memory zone 1s not limited Bytes count is the number of bytes to be copied in the G programming language string Ep error in no error isa cluster that describes the error status before this VI executes For more information about this control see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts O National Instruments Corporation 23 IMAQ Vision for G Reference Manual Chapter 23 External Library Support VIs Data string is the G programming language string containing the bytes of the specified memory zone zu error out is a cluster that describes the error status after this VI executes For more information about this indicator see the section IMAQ VI Error Clusters in Chapter 9 VI Overview and Programming Concepts Example In this example a function returning a pointer on a structure has the following description typedef struct theStruct unsigned long a long b short c theStruct It is possible to find this structure using the following diagram ccn exo LabVIEW and BridgeVIEW map flat data in BigEndian mode so the bytes need to be
421. y image connected to the input Image Dst must be the same image type connected to Image Src The image type connected to the input Image Mask must be an 8 bit image The connected source image must have been created with a border capable of supporting the size of the convolution matrix A 3 x 3 matrix must have a minimum border of 1 a5x 5 matrix must have a minimum border of 2 and so forth The border size of the destination image is not important The default for this VI is a 3 x 3 Median operation with X 2 3 Y 2 3 and Order 4 To change to a 5 x 5 Median operation the cluster must take the values X 5 Y 5 and Order 12 In this last example the order number is determined by calculating the central pixel number in the array For a 5 x 5 convolution Order 12 the thirteenth pixel because that pixel is the center pixel number for a 2D array of 25 pixels A lighter image results when using a higher order number such as 7 in a 3 x 3 matrix Darker images result when using a lower order number such as 1 in a 3 x 3 matrix A median center pixel operation is advantageous because it standardizes the gray level values without significantly modifying the form of the objects or the overall brightness in the image If the order value that is entered is O then the image obtained is representative of the local minimum from the source image If the order value that is passed is equal to X Size x Y Size 1 then the obtained image

Download Pdf Manuals

image

Related Search

Related Contents

O5- AGENTS- ELUS Bibliothèque de questions pour les  Nextel comm IR1200 User's Manual    BENDIX TCH-001-028 User's Manual  DVDO EP757 User's Manual  2. - Confetti World  Características nuevas - IBM Cognos Express Manager  統計演算プリンタ デジマチックミニプロセッサ DP  Product Label  vksd - Altra Industrial Motion Literature Portal  

Copyright © All rights reserved.
Failed to retrieve file