National Instruments IMAQ Vision for LabWindows TM /CVI - Manuals
National Instruments IMAQ Vision for LabWindows TM /CVI – Manual in PDF format online.
Manuals:
Manual National Instruments IMAQ Vision for LabWindows TM /CVI
Summary
Important Information Warranty 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, for a period of 90 days from date of shipment, as evidenced by receipts or other documentation. Nati...
© National Instruments Corporation v IMAQ Vision for LabWindows/CVI User Manual Contents About This Manual Conventions ................................................................................................................... ixRelated Documentation.............................................
Contents IMAQ Vision for LabWindows/CVI User Manual viii ni.com Appendix ATechnical Support and Professional Services Glossary Index
© National Instruments Corporation ix IMAQ Vision for LabWindows/CVI User Manual About This Manual The IMAQ Vision for LabWindows/CVI User Manual is intended for engineers and scientists who have knowledge of the LabWindows ™ /CVI ™ programming environment and need to create machine vision and image...
About This Manual IMAQ Vision for LabWindows/CVI User Manual x ni.com Related Documentation In addition to this manual, the following documentation resources are available to help you create your vision application. IMAQ Vision • IMAQ Vision Concepts Manual —If you are new to machine vision and imag...
About This Manual © National Instruments Corporation xi IMAQ Vision for LabWindows/CVI User Manual Other Documentation • Your National Instruments image acquisition (IMAQ) device user manual—If you need installation instructions and device-specific information, refer to your device user manual. • Ge...
© National Instruments Corporation 1-1 IMAQ Vision for LabWindows/CVI User Manual 1 Introduction to IMAQ Vision This chapter describes the IMAQ Vision for LabWindows/CVI software, outlines the IMAQ Vision function organization, and lists the steps for making a machine vision application. Note Refer ...
Chapter 1 Introduction to IMAQ Vision IMAQ Vision for LabWindows/CVI User Manual 1-2 ni.com IMAQ Vision Function Tree The IMAQ Vision function tree ( NIVision.lfp ) contains separate classes corresponding to groups or types of functions. Table 1-1 lists the IMAQ Vision function types and gives a des...
Chapter 1 Introduction to IMAQ Vision © National Instruments Corporation 1-3 IMAQ Vision for LabWindows/CVI User Manual IMAQ Machine Vision Function Tree The IMAQ Machine Vision function tree ( NIMachineVision.fp ) contains separate classes corresponding to groups or types of functions. Table 1-2 li...
Chapter 1 Introduction to IMAQ Vision IMAQ Vision for LabWindows/CVI User Manual 1-4 ni.com Creating IMAQ Vision Applications Figures 1-1 and 1-2 illustrate the steps for creating an application with IMAQ Vision. Figure 1-1 describes the general steps to designing a Vision application. The last step...
© National Instruments Corporation 2-1 IMAQ Vision for LabWindows/CVI User Manual 2 Getting Measurement-Ready Images This chapter describes how to set up your imaging system, acquire and display an image, analyze the image, and prepare the image for additional processing. Set Up Your Imaging System ...
Chapter 2 Getting Measurement-Ready Images IMAQ Vision for LabWindows/CVI User Manual 2-2 ni.com 3. Select an IMAQ device that meets your needs. National Instruments offers several IMAQ devices, including analog color and monochrome devices as well as digital devices. Visit ni.com/imaq for more info...
Chapter 2 Getting Measurement-Ready Images © National Instruments Corporation 2-3 IMAQ Vision for LabWindows/CVI User Manual You can create multiple images by executing imaqCreateImage() as many times as you want. Determine the number of required images through an analysis of your intended applicati...
Chapter 2 Getting Measurement-Ready Images IMAQ Vision for LabWindows/CVI User Manual 2-4 ni.com Source and Destination Images Some IMAQ Vision functions that modify the contents of an image have source image and destination image input parameters. The source image receives the image to process. The...
Chapter 2 Getting Measurement-Ready Images © National Instruments Corporation 2-5 IMAQ Vision for LabWindows/CVI User Manual • imaqAdd(myImageA, myImageA, myImageB); This function adds two source images and stores the result in the first source image. • imaqAdd(myImageB, myImageA, myImageB); This fu...
Chapter 2 Getting Measurement-Ready Images IMAQ Vision for LabWindows/CVI User Manual 2-6 ni.com Acquiring an Image Use one of the following methods to acquire images with a National Instruments IMAQ device. • Acquire a single image using imaqEasyAcquire() . When you call this function, it initializ...
Chapter 2 Getting Measurement-Ready Images © National Instruments Corporation 2-7 IMAQ Vision for LabWindows/CVI User Manual Use imaqReadVisionFile() to open an image file containing additional information, such as calibration information, template information for pattern matching, or overlay inform...
Chapter 2 Getting Measurement-Ready Images IMAQ Vision for LabWindows/CVI User Manual 2-8 ni.com Attach Calibration Information If you want to attach the calibration information of the current setup to each image you acquire, use imaqCopyCalibrationInfo() . This function takes in a source image cont...
Chapter 2 Getting Measurement-Ready Images © National Instruments Corporation 2-9 IMAQ Vision for LabWindows/CVI User Manual If the image quality meets your needs, use the histogram to determine the range of pixel values that correspond to objects in the image. You can use this range in processing f...
Chapter 2 Getting Measurement-Ready Images IMAQ Vision for LabWindows/CVI User Manual 2-10 ni.com Lookup Tables Apply lookup table (LUT) transformations to highlight image details in areas containing significant information at the expense of other areas. A LUT transformation converts input grayscale...
Chapter 2 Getting Measurement-Ready Images © National Instruments Corporation 2-11 IMAQ Vision for LabWindows/CVI User Manual Convolution Filter The imaqConvolve() function allows you to use a predefined set of lowpass and highpass filters. Each filter is defined by a kernel of coefficients. Use ima...
Chapter 2 Getting Measurement-Ready Images IMAQ Vision for LabWindows/CVI User Manual 2-12 ni.com • Closing—Removes dark pixels isolated in bright regions and smooths boundaries. • Proper-opening—Removes bright pixels isolated in dark regions and smooths the inner contours of particles. • Proper-clo...
Chapter 2 Getting Measurement-Ready Images © National Instruments Corporation 2-13 IMAQ Vision for LabWindows/CVI User Manual attenuation increases. This operation preserves all of the zero frequency information. Zero frequency information corresponds to the DC component of the image or the average ...
© National Instruments Corporation 3-1 IMAQ Vision for LabWindows/CVI User Manual 3 Making Grayscale and Color Measurements This chapter describes how to take measurements from grayscale and color images. You can make inspection decisions based on image statistics, such as the mean intensity level i...
Chapter 3 Making Grayscale and Color Measurements IMAQ Vision for LabWindows/CVI User Manual 3-2 ni.com Table 3-1 describes each of the tools and the manner in which you use them. Table 3-1. Tools Palette Functions Icon Tool Name Function Selection Tool Select an ROI in the image and adjust the posi...
Chapter 3 Making Grayscale and Color Measurements IMAQ Vision for LabWindows/CVI User Manual 3-4 ni.com You can display the IMAQ Vision tools palette as part of an ROI constructor window or in a separate, floating window. Follow these steps to invoke an ROI constructor and define an ROI from within ...
Chapter 3 Making Grayscale and Color Measurements © National Instruments Corporation 3-5 IMAQ Vision for LabWindows/CVI User Manual 3. Click OK to populate a structure representing the ROI. You can use this structure as an input to a variety of functions, such as the following functions that measure...
Chapter 3 Making Grayscale and Color Measurements IMAQ Vision for LabWindows/CVI User Manual 3-6 ni.com The following list describes how you can display the tools palette in a separate window and manipulate the palette. • Use imaqShowToolWindow() to display the tools palette in a floating window. • ...
Chapter 3 Making Grayscale and Color Measurements © National Instruments Corporation 3-7 IMAQ Vision for LabWindows/CVI User Manual or a labeled version of the binary image as a mask image to the intensity measurement function. If you want to make color comparisons, convert the binary image into an ...
Chapter 3 Making Grayscale and Color Measurements © National Instruments Corporation 3-9 IMAQ Vision for LabWindows/CVI User Manual Comparing Colors You can use the color matching capability of IMAQ Vision to compare or evaluate the color content of an image or regions in an image. Complete the foll...
Chapter 3 Making Grayscale and Color Measurements IMAQ Vision for LabWindows/CVI User Manual 3-10 ni.com Figure 3-6. Template Color Information The following sections explain when to learn the color information associated with an entire image, a region in an image, or multiple regions in an image. U...
Chapter 3 Making Grayscale and Color Measurements © National Instruments Corporation 3-11 IMAQ Vision for LabWindows/CVI User Manual Figure 3-8. Using a Single Region to Learn Color Distribution Using Multiple Regions in the Image The interaction of light with the object surface creates the observed...
Chapter 3 Making Grayscale and Color Measurements IMAQ Vision for LabWindows/CVI User Manual 3-12 ni.com Figure 3-9. Using Multiple Regions to Learn Color Distribution Choosing a Color Representation Sensitivity When you learn a color, you need to specify the sensitivity required to specify the colo...
Chapter 3 Making Grayscale and Color Measurements © National Instruments Corporation 3-13 IMAQ Vision for LabWindows/CVI User Manual Ignoring Learned Colors Ignore certain color components in color matching by replacing the corresponding component in the input color spectrum array to –1. For example...
Chapter 4 Performing Particle Analysis IMAQ Vision for LabWindows/CVI User Manual 4-2 ni.com If all the objects in your grayscale image are either brighter or darker than your background, you can use imaqAutoThreshold() to automatically determine the optimal threshold range and threshold your image....
Chapter 4 Performing Particle Analysis © National Instruments Corporation 4-3 IMAQ Vision for LabWindows/CVI User Manual Removing Unwanted Particles Use imaqRejectBorder() to remove particles that touch the border of the image. Reject particles on the border of the image when you suspect that the in...
Chapter 4 Performing Particle Analysis IMAQ Vision for LabWindows/CVI User Manual 4-4 ni.com isthmuses while close widens the isthmuses. Close and proper-close fill small holes in the particle. Auto-median removes isthmuses and fills holes. Refer to Chapter 9, Binary Morphology , of the IMAQ Vision ...
Chapter 5 Performing Machine Vision Tasks IMAQ Vision for LabWindows/CVI User Manual 5-2 ni.com Figure 5-1 illustrates the basic steps involved in performing machine vision inspection tasks. Figure 5-1. Steps to Performing Machine Vision Note Diagram items enclosed with dashed lines are optional ste...
Chapter 5 Performing Machine Vision Tasks IMAQ Vision for LabWindows/CVI User Manual 5-4 ni.com Using Edge Detection to Build a Coordinate Transform You can build a coordinate transform using two edge detection techniques. Use imaqFindTransformRect() to define a coordinate system using one rectangul...
Chapter 5 Performing Machine Vision Tasks © National Instruments Corporation 5-5 IMAQ Vision for LabWindows/CVI User Manual b. If you use imaqFindTransformRects() , specify two rectangular objects, each containing one separate, straight boundary of the object, as shown in Figure 5-3. The boundaries ...
Chapter 5 Performing Machine Vision Tasks IMAQ Vision for LabWindows/CVI User Manual 5-6 ni.com Using Pattern Matching to Build a Coordinate Transform You can build a coordinate transform using pattern matching. Use imaqFindTransformPattern() to define a coordinate system based on the location of a ...
Chapter 5 Performing Machine Vision Tasks © National Instruments Corporation 5-7 IMAQ Vision for LabWindows/CVI User Manual Choosing a Method to Build the Coordinate Transform Figure 5-4 guides you through choosing the best method for building a coordinate transform for your application. Figure 5-4....
Chapter 5 Performing Machine Vision Tasks © National Instruments Corporation 5-9 IMAQ Vision for LabWindows/CVI User Manual Defining Regions Programmatically When you have an automated application, you need to define ROIs programmatically. You can programmatically define regions in two ways: • Speci...
Chapter 5 Performing Machine Vision Tasks IMAQ Vision for LabWindows/CVI User Manual 5-10 ni.com Finding Lines or Circles If you want to find points along the edge of an object and find a line describing the edge, use imaqFindEdge() and imaqFindConcentricEdges() . The imaqFindEdge() function finds e...
Chapter 5 Performing Machine Vision Tasks © National Instruments Corporation 5-11 IMAQ Vision for LabWindows/CVI User Manual If you want to find points along a circular edge and find the circle that best fits the edge, as shown in Figure 5-6, use imaqFindCircularEdge() . Figure 5-6. Finding a Circul...
Chapter 5 Performing Machine Vision Tasks IMAQ Vision for LabWindows/CVI User Manual 5-12 ni.com These functions require you to input the coordinates of the points along the search contour. Use imaqROIProfile() to obtain the coordinates along the edge of each contour in an ROI. If you have a straigh...
Chapter 5 Performing Machine Vision Tasks © National Instruments Corporation 5-13 IMAQ Vision for LabWindows/CVI User Manual Finding Points Using Pattern Matching The pattern matching algorithms in IMAQ Vision measure the similarity between an idealized representation of a feature, called a template...
Chapter 5 Performing Machine Vision Tasks IMAQ Vision for LabWindows/CVI User Manual 5-14 ni.com Symmetry A rotationally symmetric template, shown in Figure 5-7a, is less sensitive to changes in rotation than one that is rotationally asymmetric, shown in Figure 5-7b. A rotationally symmetric templat...
Chapter 5 Performing Machine Vision Tasks © National Instruments Corporation 5-15 IMAQ Vision for LabWindows/CVI User Manual Positional Information A template with strong edges in both the x and y directions is easier to locate. Figure 5-9a shows good positional information in both the x and y direc...
Chapter 5 Performing Machine Vision Tasks IMAQ Vision for LabWindows/CVI User Manual 5-16 ni.com the template that are necessary for shift-invariant matching. However, if you want to match the template at any orientation, use rotation-invariant matching. Use the learningMode parameter of imaqLearnPa...
Chapter 5 Performing Machine Vision Tasks © National Instruments Corporation 5-17 IMAQ Vision for LabWindows/CVI User Manual Figure 5-11. Selecting a Search Area for Grayscale Pattern Matching Setting Matching Parameters and Tolerances Every pattern matching algorithm makes assumptions about the ima...
Chapter 5 Performing Machine Vision Tasks IMAQ Vision for LabWindows/CVI User Manual 5-18 ni.com Minimum Contrast The pattern matching algorithm ignores all image regions in which contrast values fall below a set minimum contrast value. Contrast is the difference between the smallest and largest pix...
Chapter 5 Performing Machine Vision Tasks © National Instruments Corporation 5-19 IMAQ Vision for LabWindows/CVI User Manual Using a Ranking Method to Verify Results The manner in which you interpret the pattern matching algorithm depends on your application. For typical alignment applications, such...
Chapter 5 Performing Machine Vision Tasks IMAQ Vision for LabWindows/CVI User Manual 5-20 ni.com 5. Set the tolerances and parameters to specify how the algorithm operates at run time using the options parameter of imaqMatchColorPattern() . 6. Test the search algorithm on test images using imaqMatch...
Chapter 5 Performing Machine Vision Tasks © National Instruments Corporation 5-21 IMAQ Vision for LabWindows/CVI User Manual Background Information Unique background information in a template improves search performance and accuracy during the grayscale pattern matching phase. This requirement could...
Chapter 5 Performing Machine Vision Tasks © National Instruments Corporation 5-23 IMAQ Vision for LabWindows/CVI User Manual The time required to locate a pattern in an image depends on both the template size and the search area. By reducing the search area or increasing the template size, you can r...
Chapter 5 Performing Machine Vision Tasks IMAQ Vision for LabWindows/CVI User Manual 5-24 ni.com Choose from the following search strategies: • IMAQ_CONSERVATIVE —Uses a very small step size, the least amount of subsampling, and all the color information present in the template. The conservative str...
Chapter 5 Performing Machine Vision Tasks IMAQ Vision for LabWindows/CVI User Manual 5-26 ni.com 6. Test the color location algorithm on test images using imaqMatchColorPattern() . 7. Verify the results using a ranking method. You can save the template image using imaqWriteVisionFile() . Convert Pix...
Chapter 5 Performing Machine Vision Tasks © National Instruments Corporation 5-27 IMAQ Vision for LabWindows/CVI User Manual Analytic Geometry Measurements Use the following functions to make geometrical measurements from the points you detect in the image: • imaqFitLine() — Fits a line to a set of ...
Chapter 5 Performing Machine Vision Tasks IMAQ Vision for LabWindows/CVI User Manual 5-28 ni.com Use imaqFindLCDSegments() to calculate the ROI around each digit in an LCD or LED. To find the area of each digit, all the segments of the indicator must be activated. Use imaqReadLCD() to read multiple ...
Chapter 5 Performing Machine Vision Tasks © National Instruments Corporation 5-29 IMAQ Vision for LabWindows/CVI User Manual The following code sample provides an example of a typical classification application. ClassifierSession* session; Image* image; ROI* roi; char* fileName; // The classifier fi...
Chapter 5 Performing Machine Vision Tasks IMAQ Vision for LabWindows/CVI User Manual 5-30 ni.com Reading Barcodes Use barcode reading functions to read values encoded into 1D barcodes, Data Matrix barcodes, and PDF417 barcodes. Reading 1D Barcodes To read a 1D barcode, locate the barcode in the imag...
Chapter 5 Performing Machine Vision Tasks © National Instruments Corporation 5-31 IMAQ Vision for LabWindows/CVI User Manual By default, imaqReadDataMatrixBarcode() assumes the barcode cells are square. If the barcodes you need to read have round cells, set the cellShape element of the options param...
© National Instruments Corporation 6-1 IMAQ Vision for LabWindows/CVI User Manual 6 Calibrating Images This chapter describes how to calibrate your imaging system, save calibration information, and attach calibration information to an image. After you set up your imaging system, you may want to cali...
Chapter 6 Calibrating Images IMAQ Vision for LabWindows/CVI User Manual 6-2 ni.com Refer to Chapter 5, Performing Machine Vision Tasks , for more information about applying calibration information before making measurements. Defining a Calibration Template You can define a calibration template by su...
Chapter 6 Calibrating Images © National Instruments Corporation 6-3 IMAQ Vision for LabWindows/CVI User Manual Defining a Reference Coordinate System To express measurements in real-world units, you need to define a coordinate system in the image of the grid. Use the CoordinateSystem structure to de...
Chapter 6 Calibrating Images © National Instruments Corporation 6-5 IMAQ Vision for LabWindows/CVI User Manual Figure 6-4. Defining a Coordinate System Learning Calibration Information After you define a calibration grid and reference axis, acquire an image of the grid using the current imaging setu...
Chapter 6 Calibrating Images IMAQ Vision for LabWindows/CVI User Manual 6-6 ni.com Specifying Scaling Factors Scaling factors are the real-world distances between the dots in the calibration grid in the x and y directions and the units in which the distances are measured. Use the GridDescriptor stru...
Chapter 6 Calibrating Images © National Instruments Corporation 6-7 IMAQ Vision for LabWindows/CVI User Manual Choose the perspective projection algorithm when your system exhibits perspective errors only. A perspective projection calibration has an accurate transformation even in areas not covered ...
Chapter 6 Calibrating Images IMAQ Vision for LabWindows/CVI User Manual 6-8 ni.com If the learning process returns a learning score below 600, try the following: 1. Make sure your grid complies with the guidelines listed in the Defining a Calibration Template section of this chapter. 2. Check the li...
Chapter 6 Calibrating Images © National Instruments Corporation 6-9 IMAQ Vision for LabWindows/CVI User Manual Simple Calibration When the axis of your camera is perpendicular to the image plane and lens distortion is negligible, use simple calibration. In simple calibration, a pixel coordinate is t...
Chapter 6 Calibrating Images IMAQ Vision for LabWindows/CVI User Manual 6-10 ni.com Save Calibration Information After you learn the calibration information, you can save it so that you do not have to relearn the information for subsequent processing. Use imaqWriteVisionFile() to save the image of t...
© National Instruments Corporation G-1 IMAQ Vision for LabWindows/CVI User Manual Glossary Numbers 1D One-dimensional. 2D Two-dimensional. 3D Three-dimensional. A AIPD The National Instruments internal image file format used for saving complex images and calibration information associated with an im...
© National Instruments Corporation I-1 IMAQ Vision for LabWindows/CVI User Manual Index Numerics 1D barcodes, reading, 5-302D arrays, converting to images, 2-5, 2-7 A acquiring, images, 2-5analyzing components of color images, 3-7images, 2-8particles, 4-1 applications, creating Vision, 1-4applying, ...
National Instruments Manuals
-
National Instruments SCC-AI01
Manual
-
National Instruments USB-6008/6009
Manual
-
National Instruments 7334
Manual
-
National Instruments NI 9403E
Manual
-
National Instruments DIO 6533
Manual
-
National Instruments NI PCI-5114
Manual
-
National Instruments 1000DC
Manual
-
National Instruments 321518A-01
Manual
-
National Instruments NI 5672
Manual
-
National Instruments USB-9221
Manual
-
National Instruments PCI
Manual
-
National Instruments NI 9229
Manual
-
National Instruments 6211
Manual
-
National Instruments NI 9217
Manual
-
National Instruments NI USB-6009
Manual
-
National Instruments NI sbRIO-960x
Manual
-
National Instruments 6024E
Manual
-
National Instruments 3.x
Manual
-
National Instruments NI 784xR
Manual
-
National Instruments NI-Motion
Manual