National Instruments IMAQ Vision for Measurement Studio User Manual

For measurement studio
Table of Contents

Advertisement

Quick Links

IMAQ
IMAQ Vision
for Measurement Studio

User Manual

LabWindows/CVI
IMAQ Vision for LabWindows/CVI User Manual
May 2001 Edition
Part Number 323022A-01

Advertisement

Table of Contents
loading

Summary of Contents for National Instruments IMAQ Vision for Measurement Studio

  • Page 1: User Manual

    IMAQ ™ IMAQ Vision ™ for Measurement Studio User Manual LabWindows/CVI IMAQ Vision for LabWindows/CVI User Manual May 2001 Edition Part Number 323022A-01...
  • Page 2 Sweden 08 587 895 00, Switzerland 056 200 51 51, Taiwan 02 2528 7227, United Kingdom 01635 523545 For further support information, see the Technical Support Resources appendix. To comment on the documentation, send e-mail to techpubs@ni.com Copyright © 2001 National Instruments Corporation. All rights reserved.
  • Page 3: Important Information

    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.
  • Page 4 Conventions The following conventions are used in this manual: » The » symbol leads you through nested menu items and dialog box options to a final action. The sequence File»Page Setup»Options directs you to pull down the File menu, select the Page Setup item, and select Options from the last dialog box.
  • Page 5: Table Of Contents

    Complex Image Operations ...2-13 Chapter 3 Grayscale and Color Measurements Define Regions of Interest ...3-1 Interactively Defining Regions...3-1 Programmatically Defining Regions ...3-6 Defining Regions with Masks ...3-6 Measure Grayscale Statistics ...3-7 © National Instruments Corporation IMAQ Vision for LabWindows/CVI User Manual...
  • Page 6 Contents Measure Color Statistics... 3-7 Comparing Colors ... 3-8 Learning Color Information ... 3-9 Choosing the Right Color Information ... 3-9 Specifying the Color Information to Learn ... 3-10 Choosing a Color Representation Sensitivity ... 3-12 Ignoring Learned Colors... 3-13 Chapter 4 Blob Analysis Correct Image Distortion...
  • Page 7 Learning the Correction Table ...6-8 Setting the Scaling Method ...6-8 Calibration Invalidation ...6-8 Simple Calibration ...6-9 Save Calibration Information...6-10 Attach Calibration Information...6-10 Appendix A Technical Support Resources Glossary Index © National Instruments Corporation IMAQ Vision for LabWindows/CVI User Manual Contents...
  • Page 8: Introduction To Imaq Vision

    For information about the system requirements and installation procedure for Note IMAQ Vision for LabWindows/CVI, see the IMAQ Vision for Measurement Studio Release Notes that came with your software. About IMAQ Vision...
  • Page 9: Application Development Environments

    Application Notes—If you want to know more about advanced IMAQ Vision concepts and applications, refer to the Application Notes located on the National Instruments Web site at ni.com/appnotes.nsf/ NI Developer Zone (NIDZ)—If you want even more information about developing your vision application, visit the NI Developer Zone at .
  • Page 10 Functions that perform arithmetic, logic, and comparison operations with two images or with an image and a constant value. Analytic Functions that perform basic geometric calculations on an image. Geometry © National Instruments Corporation Table 1-1. IMAQ Vision Function Types Description Chapter 1 Introduction to IMAQ Vision...
  • Page 11: Imaq Machine Vision Function Tree

    Chapter 1 Introduction to IMAQ Vision Table 1-1. IMAQ Vision Function Types (Continued) Function Type Frequency Functions for the extraction and manipulation of complex planes. Functions of Domain this type perform FFTs, inverse FFTs, truncation, attenuation, addition, Analysis subtraction, multiplication, and division of complex images. Barcode A function that reads a barcode.
  • Page 12: Creating Imaq Vision Applications

    Vision application. For more information about items in either diagram, see the corresponding chapter listed to the right of the item. Diagram items enclosed with dashed lines are optional steps. Note © National Instruments Corporation Set Up Your Imaging System Calibrate Your Imaging System Acquire or Read an Image...
  • Page 13 Chapter 1 Introduction to IMAQ Vision Chapter 3: Grayscale and Color Measurements Correct Image Distortion Create a Binary Image Chapter 4: Improve a Binary Image Blob Analysis Make Particle Measurements Convert Pixel Coordinates to Real-World Coordinates IMAQ Vision for LabWindows/CVI User Manual Define Regions of Interest Measure Measure...
  • Page 14: Getting Measurement-Ready Images

    Follow the guidelines below to setup your imaging system. © National Instruments Corporation Determine the type of equipment you need given your space constraints and the size of the object you need to inspect. For more information, see Chapter 3, System Setup and Calibration, of the IMAQ Vision Concepts Manual.
  • Page 15: Calibrate Your Imaging System

    Configure the driver software for your image acquisition device. If you have a National Instruments image acquisition device, configure your NI-IMAQ driver software through Measurement & Automation Explorer (MAX). Open MAX by double-clicking the Measurement & Automation Explorer icon on your desktop. For more information, see the NI-IMAQ User Manual and the MAX online help.
  • Page 16 (after each processing step). At the end of your application, dispose of each image that you created using imaqDispose() © National Instruments Corporation Chapter 2 Description 8 bits per pixel—unsigned, standard monochrome 16 bits per pixel—signed, monochrome...
  • Page 17: Source And Destination Images

    Chapter 2 Getting Measurement-Ready Images 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 destination image receives the processing results.
  • Page 18: Acquire Or Read An Image

    Functions that acquire images, load images from file, or convert data from a 2D array automatically allocate the memory space required to accommodate the image data. © National Instruments Corporation Chapter 2 imaqAdd(myImageA, myImageA, myImageB); This function adds two source images and stores the result in the first source image.
  • Page 19: Acquiring An Image

    Chapter 2 Getting Measurement-Ready Images Acquiring an Image Use one of the following methods to acquire images with a National Instruments image acquisition (IMAQ) device: • • • • • You must use the Note acquisition device. Reading a File computer into the image reference.
  • Page 20: Converting An Array To An Image

    Chapter 2, Display, of the IMAQ Vision Concepts Manual. Note At the end of your application, you should close all open external windows using imaqCloseWindow() © National Instruments Corporation Chapter 2 to open an image file containing additional imaqReadVisionFile() imaqGetFileInfo() to convert a 2D array to an image.
  • Page 21: Attach Calibration Information

    Chapter 2 Getting Measurement-Ready Images Attach Calibration Information If you want to attach the calibration information of the current setup to each image you acquire, use function takes in a source image containing the calibration information and a destination image that you want to calibrate. The output image is your inspection image with the calibration information attached to it.
  • Page 22: Improve An Image

    IMAQ Vision provides four functions that directly or indirectly apply lookup tables to images: • © National Instruments Corporation Chapter 2 to get the pixel distribution along a line in the imaqLineProfile()
  • Page 23: Filters

    Chapter 2 Getting Measurement-Ready Images • • • Filters Filter your image when you need to improve the sharpness of transitions in the image or increase the overall signal-to-noise ratio of the image. You can choose either a lowpass or highpass filter depending on your needs. Lowpass filters remove insignificant details by smoothing the image, removing sharp details, and smoothing the edges between the objects and the background.
  • Page 24: Nth Order Filter

    In an image, details and sharp edges are associated with mid to high spatial frequencies because they introduce significant gray-level variations over short distances. Gradually varying patterns are associated with low spatial frequencies. © National Instruments Corporation Chapter 2 function allows you to define a lowpass or imaqNthOrderFilter()
  • Page 25 Chapter 2 Getting Measurement-Ready Images 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. Also, the imaging setup may produce non-uniform lighting of the field of view, which produces an image with a light drift superimposed on the information you want to analyze.
  • Page 26: Complex Image Operations

    You can also convert planes of a complex image to an array and back with imaqArrayToComplexPlane() © National Instruments Corporation Chapter 2 To transform your image back to the spatial domain, use imaqInverseFFT()
  • Page 27: Grayscale And Color Measurements

    Use the tools from the IMAQ Vision tools palette to interactively define and manipulate an ROI. Table 3-1 describes each of the tools and the manner in which you use them. © National Instruments Corporation Define Regions of Interest Measure Grayscale Statistics Figure 3-1.
  • Page 28 Chapter 3 Grayscale and Color Measurements Icon Tool Name Selection Tool Point Line Rectangle Rotated Rectangle Oval Annulus Broken Line Polygon Freehand Line IMAQ Vision for LabWindows/CVI User Manual Table 3-1. Tools Palette Functions Function Select an ROI in the image and adjust the position of its control points and contours.
  • Page 29 Follow these steps to invoke an ROI constructor and define an ROI from within the ROI constructor window: © National Instruments Corporation Draw a freehand region in the image. Action: Click on the initial position, drag to the desired shape and release the mouse button to complete the shape.
  • Page 30 Chapter 3 Grayscale and Color Measurements The tools palette, shown in Figure 3-3, automatically transforms from the palette on the left to the palette on the right when you manipulate an ROI tool in an image window. The palette on the right displays the characteristics of the ROI you are drawing.
  • Page 31 This function allows you to select a contour from the tools palette without opening the palette. © National Instruments Corporation Pixel Intensity Image-type indicator (8-bit, 16-bit, Float, RGB, HSL, Complex) Coordinates of the mouse...
  • Page 32: Programmatically Defining Regions

    Chapter 3 Grayscale and Color Measurements You can also use imaqSelectRect() interest. Follow these steps to use these functions: Programmatically Defining Regions When you have an automated application, you may need to define regions of interest programmatically. To programmatically define an ROI, create the ROI using A contour is a shape that defines an ROI.
  • Page 33: Measure Grayscale Statistics

    Blue), HSI (Hue, Saturation, and Intensity), HSL (Hue, Saturation, and Luminance), or HSV (Hue, Saturation, and Value). Each component becomes an 8-bit image that you can process like any other grayscale © National Instruments Corporation Blob Analysis. You can input the binary image or a labeled...
  • Page 34: Comparing Colors

    Chapter 3 Grayscale and Color Measurements image. Using image from a set of three 8-bit images, where each image becomes one of the three primary components. Figure 3-4 illustrates how a color image breaks down into its three components. Green Blue Saturation Color...
  • Page 35: Learning Color Information

    Figure 3-5a. Figure 3-5b illustrates an unacceptable region containing background colors. © National Instruments Corporation Use the entire image or regions in the image to learn the color information using...
  • Page 36: Specifying The Color Information To Learn

    Chapter 3 Grayscale and Color Measurements Specifying the Color Information to Learn You can learn the color information associated with an entire image, a region in an image, or multiple regions in an image. Using the Entire Image You can use an entire image to learn the color spectrum that represents the entire color distribution of the image.
  • Page 37 (around 800) for both 3 amp fuses. Use as many samples as you want in an image to learn the representative color spectrum for a specified template. © National Instruments Corporation 3-11 IMAQ Vision for LabWindows/CVI User Manual...
  • Page 38: Choosing A Color Representation Sensitivity

    Chapter 3 Grayscale and Color Measurements 1 Regions used to learn color information Choosing a Color Representation Sensitivity When you learn a color, you need to specify the sensitivity required to specify the color information. An image containing a few, well-separated colors in the color space requires a lower sensitivity to describe the color than an image that contains colors that are close to one another in the color space.
  • Page 39: Ignoring Learned Colors

    Experiment learning the color information on different parts of the images to determine which colors to ignore. For more information about the color wheel and color bins, see Chapter 14, Color Inspection, in the IMAQ Vision Concepts Manual. © National Instruments Corporation 3-13 IMAQ Vision for LabWindows/CVI User Manual...
  • Page 40: Blob Analysis

    Figure 4-1 illustrates the steps involved in performing blob analysis. Diagram items enclosed with dashed lines are optional steps. © National Instruments Corporation Correct Image Distortion Create a Binary Image Improve a Binary Image...
  • Page 41: Correct Image Distortion

    Chapter 4 Blob Analysis Correct Image Distortion If you need to make accurate shape measurements based on the blobs in an image containing perspective and nonlinear distortion errors, correct the distortion using the calibration information you attached to your image. Use your grayscale image before thresholding it.
  • Page 42: Improve The Binary Image

    For more information about structuring elements, see Chapter 9, Binary Morphology, of the IMAQ Vision Concepts Manual. © National Instruments Corporation to remove blobs that touch the border of the imaqRejectBorder()
  • Page 43: Separating Touching Blobs

    Chapter 4 Blob Analysis If you know enough about the shape features of the blobs you want to keep, you. If you do not have enough information about the particles you want to keep at this point in your processing, use the particle measurement functions to obtain this information before applying a particle filter.
  • Page 44 IMAQ_TOP_ROW IMAQ_RIGHT_COLUMN IMAQ_BOTTOM_ROW IMAQ_WIDTH IMAQ_HEIGHT IMAQ_MAX_SEGMENT_LENGTH © National Instruments Corporation commonly used measurements, including the area, projection along the x-axis and y-axis, and perimeter of each blob. —This function selects information about imaqSelectParticles() blobs from the reports generated by Blobs that do not meet the criteria you set are filtered from the reports.
  • Page 45 Chapter 4 Blob Analysis Table 4-1. Particle Measurements (Continued) Measurement IMAQ_MAX_SEGMENT_LEFT_COLUMN IMAQ_MAX_SEGMENT_TOP_ROW IMAQ_PERIMETER IMAQ_PERIMETER_OF_HOLES IMAQ_SIGMA_X IMAQ_SIGMA_Y IMAQ_SIGMA_XX IMAQ_SIGMA_YY IMAQ_SIGMA_XY IMAQ_PROJ_X IMAQ_PROJ_Y IMAQ_INERTIA_XX IMAQ_INERTIA_YY IMAQ_INERTIA_XY IMAQ_MEAN_H IMAQ_MEAN_V IMAQ_MAX_INTERCEPT IMAQ_MEAN_INTERCEPT IMAQ_ORIENTATION IMAQ_EQUIV_ELLIPSE_MINOR IMAQ Vision for LabWindows/CVI User Manual Description leftmost x-coordinate of longest horizontal line segment in a particle y-coordinate of longest horizontal line segment length of the outer contour of the particle in user-defined...
  • Page 46 If you need to find the location of the center of mass or the bounding rectangle of the blobs in real-world units, use imaqTransformPixelToRealWorld() © National Instruments Corporation Description total length of the major axis of the ellipse having the...
  • Page 47 Sensor resolution, lighting, optics, vibration control, part fixture, and general environment are key components of the imaging setup. All the elements of the image acquisition chain directly affect the accuracy of the measurements. © National Instruments Corporation IMAQ Vision for LabWindows/CVI User Manual...
  • Page 48: Convert Pixel Coordinates To Real-World Coordinates

    Chapter 5 Machine Vision Figure 5-1 illustrates the basic steps involved in performing machine vision. Diagram items enclosed with dashed lines are optional steps. Locate Objects to Inspect In a typical machine vision application, you extract measurements from regions of interest rather than the entire image. To use this technique, the parts of the object you are interested in must always appear inside the regions of interest you define.
  • Page 49: Using Edge Detection To Build A Coordinate Transform

    Follow the steps below to build a coordinate transform using edge detection: Note To use this technique, the object cannot rotate more than ±65° in the image. © National Instruments Corporation imaqFindTransformRect() imaqFindTransformRects() Specify one or two rectangular regions.
  • Page 50 Chapter 5 Machine Vision 1 Search Area for the Coordinate System 2 Object Edges IMAQ Vision for LabWindows/CVI User Manual 3 Origin of the Coordinate System 4 Measurement Area Figure 5-2. Coordinate Systems of a Reference Image and Inspection Image If you use imaqFindTransformRects() rectangles, each containing one separate, straight boundary of the...
  • Page 51: Using Pattern Matching To Build A Coordinate Transform

    The object may rotate ±360° in the image using this technique if you use Note rotation-invariant pattern matching. © National Instruments Corporation 3 Origin of the Coordinate System 4 Measurement Area Figure 5-3. Locating Coordinate System Axes with Two Search Areas...
  • Page 52 Chapter 5 Machine Vision IMAQ Vision for LabWindows/CVI User Manual Define a template that represents the part of the object that you want to use as a reference feature. For more information about defining a template, see the Find Measurement Points Define a rectangular search area in which you expect to find the template.
  • Page 53: Choosing A Method To Build The Coordinate Transform

    Build a coordinate transformation based on edge detection using a single search area. © National Instruments Corporation The object contains a second distinct edge not parallel to the main axis in a separate search area. Object positioning accuracy better than ±5 degrees.
  • Page 54: Set Search Areas

    Chapter 5 Machine Vision Set Search Areas Select regions of interest (ROIs) in your images to limit the areas in which you perform your processing and inspection. You can define ROIs interactively or programmatically. Interactively Defining Regions Follow these steps to interactively define an ROI: You can also use define regions of interest.
  • Page 55: Programmatically Defining Regions

    Figure 5-5. The imaqFindConcentricEdge() search areas. © National Instruments Corporation Specify the contours of the ROI. Specify individual structures by providing basic parameters that describe the region you want to define. You can specify a rotated rectangle by providing the coordinates of the center, the width, the height, and the rotation angle.
  • Page 56 Chapter 5 Machine Vision 1 Search Region 2 Search Lines IMAQ Vision for LabWindows/CVI User Manual 3 Detected Edge Points 4 Line Fit to Edge Points Figure 5-5. Finding a Straight Feature 5-10 ni.com...
  • Page 57: Finding Edge Points Along One Search Contour

    Finding Edge Points Along One Search Contour a contour. Using edge, or all edges along the contour. Use image contains little noise and the object and background are clearly differentiated. Otherwise, use © National Instruments Corporation Figure 5-6. Finding a Circular Feature imaqSelectRect() imaqSimpleEdge() imaqEdgeTool()
  • Page 58: Finding Edge Points Along Multiple Search Contours

    Chapter 5 Machine Vision These functions require you to input the coordinates of the points along the search contour. Use the edge of each contour in an ROI. If you have a straight line, use imaqGetPointsOnLine() using an ROI. These functions determine the edge points based on their contrast and slope.
  • Page 59: Finding Points Using Pattern Matching

    A rotationally symmetric template provides good positioning information but no orientation information. © National Instruments Corporation Define a reference or fiducial pattern in the form of a template image. Use the reference pattern to train the pattern matching algorithm with imaqLearnPattern() Define an image or an area of an image as the search area.
  • Page 60 Chapter 5 Machine Vision Feature detail A template with relatively coarse features is less sensitive to variations in size and rotation than a model with fine features. However, the model must contain enough detail to identify it. Positional information A template with strong edges in both the x and y directions is easier to locate.
  • Page 61: Training The Pattern Matching Algorithm

    For example, if your image has multiple instances of a pattern and only one of them is required for the inspection task, the presence of additional instances of the pattern can produce © National Instruments Corporation 5-15 IMAQ Vision for LabWindows/CVI User Manual...
  • Page 62: Setting Matching Parameters And Tolerances

    Chapter 5 Machine Vision incorrect results. To avoid this, reduce the search area so that only the desired pattern lies within the search area. 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 reduce the required search time.
  • Page 63 This information improves imaqMatchPattern() your search time because the pattern matching algorithm looks for the pattern at fewer angles. © National Instruments Corporation 5-17 IMAQ Vision for LabWindows/CVI User Manual...
  • Page 64: Testing The Search Algorithm On Test Images

    Chapter 5 Machine Vision Testing the Search Algorithm on Test Images To determine if your selected template or reference pattern is appropriate for your machine vision application, test the template on a few test images by using images generated by your machine vision application during true operating conditions.
  • Page 65: Defining And Creating Good Color Template Images

    A rotationally symmetric template in the luminance plane is less sensitive to changes in rotation than one that is rotationally asymmetric. © National Instruments Corporation Define a reference or fiducial pattern in the form of a template image. Use the reference pattern to train the color pattern matching algorithm...
  • Page 66: Training The Color Pattern Matching Algorithm

    Chapter 5 Machine Vision Feature Detail A template with relatively coarse features is less sensitive to variations in size and rotation than a model with fine features. However, the model must contain enough detail to identify it. Positional Information A template with strong edges in both the x and y directions is easier to locate.
  • Page 67: Defining A Search Area

    Figure 5-12 shows how search areas can be selected for different objects. © National Instruments Corporation 5-21 IMAQ Vision for LabWindows/CVI User Manual...
  • Page 68: Setting Matching Parameters And Tolerances

    Chapter 5 Machine Vision 1 Search Area for 20 Amp Fuses 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 reduce the required search time. Setting Matching Parameters and Tolerances Every color pattern matching algorithm makes assumptions about the images and color pattern matching parameters used in machine vision...
  • Page 69 Choose from four different strategies: • • • • © National Instruments Corporation element to control the granularity of the color sensitivity IMAQ_SENSITIVITY_LOW , and IMAQ_SENSITIVITY_HIGH element to optimize the speed of the color pattern strategy —Uses the largest step size, the most...
  • Page 70: Testing The Search Algorithm On Test Images

    Chapter 5 Machine Vision Note Use the IMAQ_CONSERVATIVE close to each other in the image. Decide on the best strategy by experimenting with the different options. Color Score Weight When you search for a template using both color and shape information, the color and shape scores generated during the match process are combined to generate the final color pattern matching score.
  • Page 71: Finding Points Using Color Location

    Follow these general steps to find features in an image using color location: You can save the template image using © National Instruments Corporation Requires the location and the number of regions in an image with their specific color information...
  • Page 72: Convert Pixel Coordinates To Real-World Coordinates

    Chapter 5 Machine Vision Convert Pixel Coordinates to Real-World Coordinates The measurement points you located with edge detection and pattern matching are in pixel coordinates. If you need to make measurements using real-world units, use the pixel coordinates into real-world units. Make Measurements You can make different types of measurements either directly from the image or from points that you detect in the image.
  • Page 73: Analytic Geometry Measurements

    © National Instruments Corporation —Fits a line to a set of points and computes the imaqFitLine() equation of the line.
  • Page 74: Display Results

    Chapter 5 Machine Vision each digit in an LCD or LED. To find the area of each digit, all the segments of the indicator must be activated. Use digits of an LCD or LED. specify a region of interest that encloses the barcode information, and specify the type of barcode.
  • Page 75 You can read the information from the file into an image using information, overlay information is removed from an image when the image size or orientation changes. © National Instruments Corporation imaqFindEdge() imaqFindCircularEdge() imaqFindConcentricEdge()
  • Page 76: Calibration

    See Chapter 4, Vision, for more information about applying calibration information before making measurements. © National Instruments Corporation Define a calibration template. Define a reference coordinate system. Learn the calibration information.
  • Page 77: Defining A Calibration Template

    Note You can use the calibration grid installed with IMAQ Vision at Start»Programs»National Instruments»Vision»Documentation»Calibration Grid. The dots have radii of 2 mm and center-to-center distances of 1 cm. Depending on your printer, these measurements may change by a fraction of a millimeter. You can purchase highly accurate calibration grids from optics suppliers, such as Edmund Industrial Optics.
  • Page 78 If you specify a grid for the calibration process, the software defines the following default coordinate system, as shown in Figure 6-3: © National Instruments Corporation Figure 6-2. Axis Direction in the Image Plane The origin is placed at the center of the left, topmost dot in the calibration grid.
  • Page 79 Chapter 6 Calibration 1 Origin of a Calibration Grid in the Real World Note If you specify a list of points instead of a grid for the calibration process, the software defines a default coordinate system, as follows: The origin is placed at the point in the list with the lowest x-coordinate value and then the lowest y-coordinate value.
  • Page 80: Learning Calibration Information

    If you want to specify a list of points instead of a grid, use imaqLearnCalibrationPoints() CalibrationPoints © National Instruments Corporation Figure 6-4. Defining a Coordinate System Acquire or Read an Image Images. The grid does not need to occupy the entire imaqLearnCalibrationGrid() to learn the calibration information.
  • Page 81: Specifying Scaling Factors

    Chapter 6 Calibration 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 factors. Choosing a Region of Interest Define a learning region of interest (ROI) during the learning process to define a region of the calibration grid you want to learn.
  • Page 82: Using The Learning Score

    If the learning process returns a low score, try the following: © National Instruments Corporation to choose the perspective calibration algorithm. to choose the nonlinear calibration algorithm.
  • Page 83: Learning The Error Map

    Chapter 6 Calibration Note A high score does not reflect the accuracy of your system. Learning the Error Map An error map helps you gauge the quality of your complete system. The error map returns an estimated error range to expect when a pixel coordinate is transformed into a real-world coordinate.
  • Page 84: Simple Calibration

    Use the method parameter to set the scaling method. Set the learnTable parameter to correction table. 1 Origin © National Instruments Corporation Figure 6-7. Defining a Simple Calibration IMAQ Vision for LabWindows/CVI User Manual Chapter 6...
  • Page 85: Save Calibration Information

    Chapter 6 Calibration 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() calibration information to a file. To read the file containing the calibration information use attaching the calibration information you read from another image, see the Attach Calibration Information section.
  • Page 86: Technical Support Resources

    Technical Support Resources Web Support National Instruments Web support is your first stop for help in solving installation, configuration, and application problems and questions. Online problem-solving and diagnostic resources include frequently asked questions, knowledge bases, product-specific troubleshooting wizards, manuals, drivers, software updates, and more. Web support is available...
  • Page 87 Appendix A Technical Support Resources Worldwide Support National Instruments has offices located around the world to help address your support needs. You can access our branch office Web sites from the Worldwide Offices section of up-to-date contact information, support phone numbers, e-mail addresses, and current events.
  • Page 88 Numbers/Symbols One-dimensional. Two-dimensional. Three-dimensional. AIPD National Instruments proprietary image file format used for saving complex images and calibration information pertaining to step and spatial units (extension APD). alignment The process by which a machine vision application determines the location, orientation, and scale of a part being inspected.
  • Page 89 Glossary Bit. One binary digit, either 0 or 1. Byte. Eight related bits of data, an eight-bit binary number. Also denotes the amount of memory required to store one byte of data. barycenter The grayscale value representing the centroid of the range of an image's grayscale values in the image histogram.
  • Page 90 Each class contains pixels that fall within a distinct range of grayscale values. The 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. © National Instruments Corporation IMAQ Vision for LabWindows/CVI User Manual Glossary...
  • Page 91 Glossary CLUT Color lookup table. Table for converting the value of a pixel in an image into a red, green, and blue (RGB) intensity. color images Images containing color information, usually encoded in the RGB form. color location The technique that locates a color template in a color image based on only the color information.
  • Page 92 Assigns to each pixel in an object a gray-level value equal to its shortest Euclidean distance from the border of the object. driver Software that controls a specific hardware device, such as an IMAQ or DAQ device. © National Instruments Corporation IMAQ Vision for LabWindows/CVI User Manual Glossary...
  • Page 93 Glossary edge Defined by a sharp change (transition) in the pixel intensities in an image or along an array of pixels. edge contrast The difference between the average pixel intensity before and the average pixel intensity after the edge. edge detection Any of several techniques to identify the edges of objects in an image.
  • Page 94 Reduces the brightness of pixels in an image that are surrounded by other pixels with a lower intensity. grayscale image An image with monochrome information. grayscale Functions that perform morphological operations on a gray-level image. morphology © National Instruments Corporation IMAQ Vision for LabWindows/CVI User Manual Glossary...
  • Page 95 Glossary highpass attenuation Applies a linear attenuation to the frequencies in an image, with no attenuation at the highest frequency and full attenuation at the lowest frequency. highpass FFT filter Removes or attenuates low frequencies present in the FFT domain of an image.
  • Page 96 Original input image. image understanding A technique that interprets the content of the image at a symbolic level rather than a pixel level. © National Instruments Corporation pixel depth. IMAQ Vision for LabWindows/CVI User Manual Glossary...
  • Page 97 Glossary image visualization The presentation (display) of an image (image data) to the user. imaging Any process of acquiring and displaying images and analyzing image data. IMAQ Image Acquisition. inner gradient Finds the inner boundary of objects. inspection The process by which parts are tested for simple defects such as missing parts or cracks on part surfaces.
  • Page 98 Increases the brightness and contrast in dark regions of an image and decreases the contrast in bright regions of the image. © National Instruments Corporation G-11 IMAQ Vision for LabWindows/CVI User Manual Glossary...
  • Page 99 Glossary logic operators The image operations AND, NAND, OR, XOR, NOR, XNOR, difference, mask, mean, max, and min. lossless compression Compression in which the decompressed image is identical to the original image. lossy compression Compression in which the decompressed image is visually similar but not identical to the original image.
  • Page 100 Operations on a point in an image that take into consideration the values of operations the pixels neighboring that point. NI-IMAQ Driver software for National Instruments IMAQ hardware. nonlinear filter Replaces each pixel value with a nonlinear function of its surrounding pixels.
  • Page 101 Glossary Nth order filter 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. number of planes The number of arrays of pixels that compose the image.
  • Page 102 A finite combination of successive opening and closing operations that you can use to remove small particles and smooth the boundaries of objects. © National Instruments Corporation exponential function. G-15...
  • Page 103 Glossary pyramidal matching A technique used to increase the speed of a pattern matching algorithm by matching subsampled versions of the image and the reference pattern. quantitative analysis Obtaining various measurements of objects in an image. real time A property of an event or system in which data is processed as it is acquired instead of being accumulated and processed at a later time.
  • Page 104 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. © National Instruments Corporation G-17 IMAQ Vision for LabWindows/CVI User Manual...
  • Page 105 Glossary spatial resolution The number of pixels in an image, in terms of the number of rows and columns in the image. square function square root function standard representation Contains the low-frequency information at the corners and high-frequency information at the center of an FFT-transformed image. structuring element A binary mask used in most morphological operations.
  • Page 106 Example materials include plastic film, cloth, paper and pulp products, metal, and glass. white reference level The level that defines what is white for a particular video system. See also © National Instruments Corporation black reference level. G-19 IMAQ Vision for LabWindows/CVI User Manual...
  • Page 107 4-3 to 4-4 separating touching blobs, 4-4 particle measurements, 4-4 to 4-7 steps (figure), 4-1 Broken Line tool (table), 3-2 © National Instruments Corporation calibration, 6-1 to 6-10 attaching calibration information to images, 2-8, 6-10 defining reference coordinate system,...
  • Page 108 Index defining template images, 5-19 to 5-20 setting matching parameters and tolerances, 5-22 to 5-24 color score weight, 5-24 color sensitivity, 5-23 minimum contrast, 5-24 rotation angle ranges, 5-24 search strategy, 5-23 to 5-24 testing search algorithm on test images, 5-24 to 5-25 training pattern matching algorithm, 5-20 to 5-21...
  • Page 109 2-9 to 2-10 imaging system calibrating, 2-2 setting up, 2-1 to 2-2 IMAQ Machine Vision function tree, 1-4 IMAQ Vision for Measurement Studio application development environments, 1-2 creating applications, 1-5 to 1-6 general steps (figure), 1-5 inspection steps (figure), 1-6...
  • Page 110 Index imaqAdd() function, 2-4 to 2-5 imaqAddRectContour() function, 3-6 imaqArrayToComplextPlane() function, 2-13 imaqArrayToImage() function, 2-7, 6-8 imaqAttenuate() function, 2-12 IMAQ_AUTOM method, 4-4 imaqAutoThreshold() function, 4-2 imaqCalcCoeff() function, 4-5 particle measurements returned (table), 4-5 to 4-7 imaqCannyEdgeFilter() function, 2-10 imaqCentroid() function, 3-7 imaqClampMax() function, 5-26, 5-29 imaqClampMin() function, 5-26, 5-29 imaqClearOverlay() function, 5-29...
  • Page 111 5-28 imaqOverlayROI() function, 5-28 imaqOverlayText() function, 5-28 imaqParticleFilter() function, 4-4 IMAQ_PCLOSE method, 4-4 IMAQ_POPEN method, 4-3, 4-4 © National Instruments Corporation imaqQuantify() function, 3-7 imaqRake() function, 5-12 imaqReadBarcode() function, 5-28 imaqReadFile() function, 2-6 imaqReadMeter() function, 5-27 imaqReadVisionFile() function, 2-7, 6-10...
  • Page 112 Index imaqWriteVisionFile() function, 5-15, 5-25, 6-10 imgInterfaceOpen() function, 2-6 imgSessionOpen() function, 2-6 imgSnap() function, 2-6 instrument reader measurements, 5-27 to 5-28 invalidation of calibration, 6-8 learning calibration information, 6-5 to 6-8 choosing learning algorithm, 6-6 to 6-7 choosing ROI, 6-6 correction table, 6-8 error map, 6-8 invalidation of calibration, 6-8...
  • Page 113 5-13 to 5-18 defining and creating template images, 5-13 to 5-15 defining search area, 5-15 to 5-16 general steps, 5-13 © National Instruments Corporation setting matching parameters and tolerances, 5-16 to 5-17 testing search algorithm on test images, 5-18...
  • Page 114 5-15 IMAQ Vision for LabWindows/CVI User Manual tools palette functions (table), 3-2 to 3-3 truncation highpass, 2-12 lowpass, 2-12 verifying pattern matching, 5-18 Web support from National Instruments, A-1 Worldwide technical support, A-2 Zoom tool (table), 3-3 ni.com...

This manual is also suitable for:

Imaq vision

Table of Contents