Page 2 - Worldwide Technical Support and Product Information
Support Worldwide Technical Support and Product Information ni.com National Instruments Corporate Headquarters 11500 North Mopac Expressway Austin, Texas 78759-3504 USA Tel: 512 683 0100 Worldwide Offices Australia 1800 300 800, Austria 43 0 662 45 79 90 0, Belgium 32 0 2 757 00 20, Brazil 55 11 326...
Page 3 - Important Information; Warranty; WARNING REGARDING USE OF NATIONAL INSTRUMENTS PRODUCTS
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...
Page 4 - Contents; About This Manual
© National Instruments Corporation v IMAQ Vision for Visual Basic User Manual Contents About This Manual Conventions ................................................................................................................... ixRelated Documentation...............................................
Page 7 - Glossary
Contents IMAQ Vision for Visual Basic User Manual viii ni.com Chapter 6Calibrating Images Perspective and Nonlinear Distortion Calibration......................................................... 6-1 Defining a Calibration Template........................................................................
Page 8 - IMAQ Vision for Visual Basic User Manual; Conventions; File»Page Setup»Options; italic
© National Instruments Corporation ix IMAQ Vision for Visual Basic User Manual About This Manual The IMAQ Vision for Visual Basic User Manual is intended for engineers and scientists who have knowledge of Microsoft Visual Basic and need to create machine vision and image processing applications usin...
Page 9 - Related Documentation; IMAQ Vision; IMAQ Vision Concepts Manual; Start»Programs»National Instruments»; NI Vision Assistant; NI Vision Assistant Tutorial; NI Vision Builder for Automated Inspection; NI Vision Builder for Automated Inspection Tutorial
About This Manual IMAQ Vision for Visual Basic User Manual x ni.com Related Documentation This manual assumes that you are familiar with Visual Basic and can use ActiveX controls in Visual Basic. The following are good sources of information about Visual Basic and ActiveX controls: • msdn.microsoft....
Page 10 - NI Vision Builder for Automated Inspection: Inspection Help; Other Documentation; NI OCR Training Interface Help
About This Manual © National Instruments Corporation xi IMAQ Vision for Visual Basic User Manual • NI Vision Builder for Automated Inspection: Inspection Help —If you need information about how to run an automated vision inspection system using NI Vision Builder AI, refer to this help file. Other Do...
Page 11 - Introduction to IMAQ Vision; Note; About IMAQ Vision; and other C development environments, as well as; Documentation and Examples; Documentation that accompanies Microsoft Visual Studio
© National Instruments Corporation 1-1 IMAQ Vision for Visual Basic User Manual 1 Introduction to IMAQ Vision This chapter describes the IMAQ Vision for Visual Basic software and associated software products, discusses the documentation and examples available, outlines the IMAQ Vision for Visual Bas...
Page 12 - Start; IMAQ Vision for Visual Basic Organization
Chapter 1 Introduction to IMAQ Vision IMAQ Vision for Visual Basic User Manual 1-2 ni.com In addition to this manual, several documentation resources are available to help you create a vision application: • IMAQ Vision Concepts Manual —If you are new to machine vision and imaging, read this manual t...
Page 13 - ActiveX Objects; CWIMAQ Control; CWIMAQVision Control
Chapter 1 Introduction to IMAQ Vision © National Instruments Corporation 1-3 IMAQ Vision for Visual Basic User Manual cwimaq.ocx cwimaq.ocx contains the following three ActiveX controls and a collection of ActiveX objects: CWIMAQ, CWIMAQVision, and CWIMAQViewer. Refer to the ActiveX Objects section ...
Page 14 - NIOCR control; CWMachineVision control; Performing Machine Vision Tasks
Chapter 1 Introduction to IMAQ Vision IMAQ Vision for Visual Basic User Manual 1-4 ni.com niocr.ocx niocr.ocx provides one ActiveX control and a collection of ActiveX objects you use in a machine vision application to perform optical character recognition (OCR). NIOCR control Use this control to per...
Page 15 - Tip; Creating IMAQ Vision Applications
Chapter 1 Introduction to IMAQ Vision © National Instruments Corporation 1-5 IMAQ Vision for Visual Basic User Manual Tip Refer to the source code of the CWMachineVision control for an example of how to use the CWIMAQVision methods. ActiveX Objects Use the objects to group related input parameters a...
Page 18 - Set Up Your Imaging System; Follow the guidelines below to set up an imaging system.
© National Instruments Corporation 2-1 IMAQ Vision for Visual Basic User Manual 2 Getting Measurement-Ready Images This chapter describes how to set up an imaging system, acquire and display an image, analyze the image, and prepare the image for additional processing. Set Up Your Imaging System Befo...
Page 19 - Measurement & Automation; Calibrate Your Imaging System; Calibrating; Create an Image
Chapter 2 Getting Measurement-Ready Images IMAQ Vision for Visual Basic User Manual 2-2 ni.com color and monochrome devices as well as digital devices. Visit ni.com/imaq for more information about IMAQ devices. 4. Configure the driver software for the image acquisition device. If you have a National...
Page 20 - Complex; property on the image object to change the image type.; parameter indicates that the processing or
Chapter 2 Getting Measurement-Ready Images © National Instruments Corporation 2-3 IMAQ Vision for Visual Basic User Manual • Complex • 32-bit RGB • 32-bit HSL • 64-bit RGB When you create an image, it is an 8-bit image by default. You can set the Type property on the image object to change the image...
Page 21 - Acquire or Read an Image; Acquiring an Image; Acquisition Type; snap
Chapter 2 Getting Measurement-Ready Images IMAQ Vision for Visual Basic User Manual 2-4 ni.com Acquire or Read an Image After you create an image, you can acquire an image into the imaging system in one of the following three ways: • Acquire an image with a camera through the image acquisition devic...
Page 22 - sequence; Continuous Acquisition; grab
Chapter 2 Getting Measurement-Ready Images © National Instruments Corporation 2-5 IMAQ Vision for Visual Basic User Manual If you want to acquire multiple frames, set the image count to the number of frames you want to acquire. This operation is called a sequence . Use a sequence for applications th...
Page 23 - Reading a File; Converting an Array to an Image; Display an Image
Chapter 2 Getting Measurement-Ready Images IMAQ Vision for Visual Basic User Manual 2-6 ni.com Private Sub Stop_Click() CWIMAQ1.Stop End Sub Reading a File Use the CWIMAQVision.ReadImage method to open and read data from a file stored on the computer into the image reference. You can read from image...
Page 24 - Display; Attach Calibration Information; Analyze an Image
Chapter 2 Getting Measurement-Ready Images © National Instruments Corporation 2-7 IMAQ Vision for Visual Basic User Manual the viewer. You can set the CWIMAQPalette.Type property to apply predefined color palettes. For example, if you need to display a binary image—an image that contains particle re...
Page 25 - Improve an Image
Chapter 2 Getting Measurement-Ready Images IMAQ Vision for Visual Basic User Manual 2-8 ni.com Use CWIMAQVision.Histogram2 to analyze the overall grayscale distribution in the image. Use the histogram of the image to analyze two important criteria that define the quality of an image—saturation and c...
Page 26 - Lookup Tables; lookup table; Image Processing; Filters
Chapter 2 Getting Measurement-Ready Images © National Instruments Corporation 2-9 IMAQ Vision for Visual Basic User Manual Improve an Image Using the information you gathered from analyzing the image, you may want to improve the quality of the image for inspection. You can improve the image with loo...
Page 27 - Convolution Filter; Grayscale Morphology
Chapter 2 Getting Measurement-Ready Images IMAQ Vision for Visual Basic User Manual 2-10 ni.com Highpass filters emphasize details, such as edges, object boundaries, or cracks. These details represent sharp transitions in intensity value. You can define your own highpass filter with CWIMAQVision.Con...
Page 28 - FFT
Chapter 2 Getting Measurement-Ready Images © National Instruments Corporation 2-11 IMAQ Vision for Visual Basic User Manual Use CWIMAQVision.GrayMorphology to perform one of the following seven transformations: • Erosion—Reduces the brightness of pixels that are surrounded by neighbors with a lower ...
Page 29 - or; Complex Image Operations; and
Chapter 2 Getting Measurement-Ready Images IMAQ Vision for Visual Basic User Manual 2-12 ni.com 2. Improve the image in the frequency domain with a lowpass or highpass frequency filter. Specify which type of filter to use with CWIMAQVision.CxAttenuate or CWIMAQVision.CxTruncate . Lowpass filters smo...
Page 30 - Defining Regions Interactively
© National Instruments Corporation 3-1 IMAQ Vision for Visual Basic 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 in ...
Page 31 - Tool Name
Chapter 3 Making Grayscale and Color Measurements IMAQ Vision for Visual Basic User Manual 3-2 ni.com Table 3-1. Tools Palette Functions Tool Name Function None Disable the tools. Selection Tool Select an ROI in the image and adjust the position of its control points and contours. Action: Click the ...
Page 32 - Show
Chapter 3 Making Grayscale and Color Measurements © National Instruments Corporation 3-3 IMAQ Vision for Visual Basic User Manual Hold down <Shift> when drawing an ROI if you want to constrain the ROI to the horizontal, vertical, or diagonal axes, when possible. Use the selection tool to posit...
Page 34 - Defining Regions Programmatically; Method
Chapter 3 Making Grayscale and Color Measurements © National Instruments Corporation 3-5 IMAQ Vision for Visual Basic User Manual During design time, use the Menu property page to select which tools appear in the right-click menu. You also can designate a default tool from this property page. During...
Page 35 - Defining Regions with Masks; Performing Particle Analysis; Measure Grayscale Statistics; Use; to measure the; to get the pixel value statistics
Chapter 3 Making Grayscale and Color Measurements IMAQ Vision for Visual Basic User Manual 3-6 ni.com CWIMAQRegion contains. When you know the type of shape that the region contains, you can set the region into a shape variable and use that variable to manipulate the shape properties. For example, t...
Page 36 - Measure Color Statistics
Chapter 3 Making Grayscale and Color Measurements © National Instruments Corporation 3-7 IMAQ Vision for Visual Basic User Manual minimum intensity, and maximum intensity. Use CWMachineVision.LightMeterRectangle to get the pixel value statistics within a rectangular region in an image. Use CWIMAQVis...
Page 37 - A color pixel encoded as a; value can be decomposed into its
Chapter 3 Making Grayscale and Color Measurements IMAQ Vision for Visual Basic User Manual 3-8 ni.com Figure 3-3. Primary Components of an 32-bit Color Image Figure 3-4. Primary Components of a 64-bit Color Image A color pixel encoded as a Long value can be decomposed into its individual components ...
Page 38 - Comparing Colors; Color Inspection; to compare the learned color; Learning Color Information; Choose colors that you want to ignore during matching.
Chapter 3 Making Grayscale and Color Measurements © National Instruments Corporation 3-9 IMAQ Vision for Visual Basic 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 follow...
Page 39 - Specifying the Color Information to Learn; Using the Entire Image
Chapter 3 Making Grayscale and Color Measurements IMAQ Vision for Visual Basic User Manual 3-10 ni.com Specifying the Color Information to Learn Because color matching only uses color information to measure similarity, the image or regions in the image representing the object should contain only the...
Page 40 - Using a Region in the Image; Using Multiple Regions in the Image
Chapter 3 Making Grayscale and Color Measurements © National Instruments Corporation 3-11 IMAQ Vision for Visual Basic User Manual Using a Region in the Image You can select a region in the image to provide the color information for comparison. A region is helpful for pulling out the useful color in...
Page 41 - Choosing a Color Representation Sensitivity; parameter of; to specify the granularity you want to
Chapter 3 Making Grayscale and Color Measurements IMAQ Vision for Visual Basic User Manual 3-12 ni.com fuses much better and results in high match scores—around 800—for both the fuses. You can use an unlimited number of samples to learn the representative color spectrum for a specified template. Fig...
Page 42 - Ignoring Learned Colors; Copy; Set the corresponding components of the array.
Chapter 3 Making Grayscale and Color Measurements © National Instruments Corporation 3-13 IMAQ Vision for Visual Basic User Manual Ignoring Learned Colors You can ignore certain color components in color matching by setting the corresponding component in the input color spectrum array to –1. To set ...
Page 43 - to threshold the image.
© National Instruments Corporation 4-1 IMAQ Vision for Visual Basic User Manual 4 Performing Particle Analysis This chapter describes how to perform particle analysis on the images. Use particle analysis to find statistical information about particles, such as the presence, size, number, and locatio...
Page 44 - Improve the Binary Image; connectivity
Chapter 4 Performing Particle Analysis IMAQ Vision for Visual Basic User Manual 4-2 ni.com If all the objects in the grayscale image are either brighter or darker than the background, you can use CWIMAQVision.AutoThreshold to automatically determine the optimal threshold range and threshold the imag...
Page 45 - Removing Unwanted Particles; Binary Morphology; Separating Touching Particles
Chapter 4 Performing Particle Analysis © National Instruments Corporation 4-3 IMAQ Vision for Visual Basic User Manual Removing Unwanted Particles Use CWIMAQVision.RejectBorder to remove particles that touch the border of the image. Reject particles on the border of the image when you suspect that t...
Page 46 - Improving Particle Shapes; Binary; Make Particle Measurements; Measurement
Chapter 4 Performing Particle Analysis IMAQ Vision for Visual Basic User Manual 4-4 ni.com Improving Particle Shapes Use CWIMAQVision.FillHole to fill holes in the particles. Use CWIMAQVision.Morphology to perform a variety of operations on the particles. You can use the Open, Close, Proper Open, Pr...
Page 54 - Locate Objects to Inspect; Set Search Areas
Chapter 5 Performing Machine Vision Tasks IMAQ Vision for Visual Basic User Manual 5-2 ni.com Figure 5-1. Steps to Performing Machine Vision Note Diagram items enclosed with dashed lines are optional steps. Locate Objects to Inspect In a typical machine vision application, you extract measurements f...
Page 55 - Dimensional Measurements; Using Edge Detection to Build a Coordinate Transformation; to define a
Chapter 5 Performing Machine Vision Tasks © National Instruments Corporation 5-3 IMAQ Vision for Visual Basic User Manual to as the measurement coordinate system. The measurement methods automatically move the ROIs to the correct position using the position of the measurement coordinate system with ...
Page 56 - If you use
Chapter 5 Performing Machine Vision Tasks IMAQ Vision for Visual Basic User Manual 5-4 ni.com Figure 5-2. Coordinate Systems of a Reference Image and Inspection Image b. If you use CWMachineVision.FindCoordTransformUsingTwoRects , specify two rectangular ROIs, each containing one separate, straight ...
Page 57 - Using Pattern Matching to Build a Coordinate Transformation
Chapter 5 Performing Machine Vision Tasks © National Instruments Corporation 5-5 IMAQ Vision for Visual Basic User Manual Figure 5-3. Locating Coordinate System Axes with Two Search Areas 2. Choose the parameters you need to locate the edges on the object. 3. Choose the coordinate system axis direct...
Page 58 - Find Measurement Points
Chapter 5 Performing Machine Vision Tasks IMAQ Vision for Visual Basic User Manual 5-6 ni.com 1. 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, refer to the Find Measurement Points section. 2. Defi...
Page 59 - Choosing a Method to Build the Coordinate Transformation
Chapter 5 Performing Machine Vision Tasks © National Instruments Corporation 5-7 IMAQ Vision for Visual Basic User Manual Choosing a Method to Build the Coordinate Transformation Figure 5-4 guides you through choosing the best method for building a coordinate transformation for the application. Figu...
Page 60 - Making Grayscale; CWMachineVision ROI Selection Methods
Chapter 5 Performing Machine Vision Tasks IMAQ Vision for Visual Basic User Manual 5-8 ni.com Set Search Areas Select ROIs in the images to limit the areas in which you perform the processing and inspection. You can define ROIs interactively or programmatically. Defining Regions Interactively Follow...
Page 61 - Making Grayscale and Color Measurements; Finding Features Using Edge Detection
Chapter 5 Performing Machine Vision Tasks © National Instruments Corporation 5-9 IMAQ Vision for Visual Basic User Manual Defining Regions Programmatically When you have an automated application, you need to define regions of interest programmatically. You can programmatically define regions by prov...
Page 62 - Finding Lines or Circles; finds edges based; finds edges based
Chapter 5 Performing Machine Vision Tasks IMAQ Vision for Visual Basic 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 CWMachineVision.FindStraightEdge and CWMachineVision.FindConcentricEdge . CWMachineV...
Page 63 - Finding Edge Points Along One Search Contour
Chapter 5 Performing Machine Vision Tasks © National Instruments Corporation 5-11 IMAQ Vision for Visual Basic User Manual Figure 5-6. Finding a Circular Feature These methods locate the intersection points between a set of search lines in the search region and the edge of an object. Specify the sep...
Page 64 - Finding Edge Points Along Multiple Search Contours; Finding Points Using Pattern Matching
Chapter 5 Performing Machine Vision Tasks IMAQ Vision for Visual Basic User Manual 5-12 ni.com Finding Edge Points Along Multiple Search Contours Use the CWIMAQVision.Rake , CWIMAQVision.Spoke , and CWIMAQVision.ConcentricRake methods to find edge points along multiple search contours. These methods...
Page 65 - Test the search algorithm on test images using; Verify the results using a ranking method.; Defining and Creating Effective Template Images
Chapter 5 Performing Machine Vision Tasks © National Instruments Corporation 5-13 IMAQ Vision for Visual Basic User Manual 3. Define an image or an area of an image as the search area. A small search area reduces the time to find the features. 4. Set the tolerances and parameters to specify how the ...
Page 66 - Positional Information
Chapter 5 Performing Machine Vision Tasks IMAQ Vision for Visual Basic User Manual 5-14 ni.com 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....
Page 67 - Training the Pattern Matching Algorithm; to learn the template. The learning
Chapter 5 Performing Machine Vision Tasks © National Instruments Corporation 5-15 IMAQ Vision for Visual Basic User Manual Background Information Unique background information in a template improves search performance and accuracy. Figure 5-10. Background Information Training the Pattern Matching Al...
Page 68 - Defining a Search Area
Chapter 5 Performing Machine Vision Tasks IMAQ Vision for Visual Basic User Manual 5-16 ni.com Defining a Search Area Two equally important factors define the success of a pattern matching algorithm: accuracy and speed. You can define a search area to reduce ambiguity in the search process. For exam...
Page 69 - Setting Matching Parameters and Tolerances; Match Mode; from the template, set; to
Chapter 5 Performing Machine Vision Tasks © National Instruments Corporation 5-17 IMAQ Vision for Visual Basic 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 image...
Page 70 - Minimum Contrast; to set the; Rotation Angle Ranges; , provide this restriction information to; Pattern Matching; Testing the Search Algorithm on Test Images
Chapter 5 Performing Machine Vision Tasks IMAQ Vision for Visual Basic User Manual 5-18 ni.com Minimum Contrast Contrast is the difference between the smallest and largest pixel values in a region. You can set the minimum contrast to potentially increase the speed of the pattern matching algorithm. ...
Page 71 - Using a Ranking Method to Verify Results
Chapter 5 Performing Machine Vision Tasks © National Instruments Corporation 5-19 IMAQ Vision for Visual Basic User Manual Using a Ranking Method to Verify Results The manner in which you interpret the pattern matching results depends on the application. For typical alignment applications, such as f...
Page 72 - Color Information
Chapter 5 Performing Machine Vision Tasks IMAQ Vision for Visual Basic User Manual 5-20 ni.com 5. Set the tolerances and parameters to specify how the algorithm operates at run time using CWIMAQMatchColorPatternOptions . 6. Test the search algorithm on test images using CWIMAQVision.MatchColorPatter...
Page 73 - Training the Color Pattern Matching Algorithm
Chapter 5 Performing Machine Vision Tasks © National Instruments Corporation 5-21 IMAQ Vision for Visual Basic User Manual Background Information Unique background information in a template improves search performance and accuracy during the grayscale pattern matching phase. This requirement could c...
Page 75 - Color Sensitivity; Search Strategy
Chapter 5 Performing Machine Vision Tasks © National Instruments Corporation 5-23 IMAQ Vision for Visual Basic 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 red...
Page 76 - Use one of the following four search strategies:; to select; Color Score Weight; property to set the color score weight.
Chapter 5 Performing Machine Vision Tasks IMAQ Vision for Visual Basic User Manual 5-24 ni.com Use one of the following four search strategies: • Very aggressive—Uses the largest step size, the most sub-sampling and only the dominant color from the template to search for the template. Use this strat...
Page 77 - to set the minimum contrast. Refer to the; Finding Points Using Color Location; Use color location under the following circumstances:
Chapter 5 Performing Machine Vision Tasks © National Instruments Corporation 5-25 IMAQ Vision for Visual Basic User Manual Minimum Contrast Use the minimum contrast to increase the speed of the color pattern matching algorithm. The color pattern matching algorithm ignores all image regions where gra...
Page 78 - Convert Pixel Coordinates to Real-World Coordinates; Distance Measurements
Chapter 5 Performing Machine Vision Tasks IMAQ Vision for Visual Basic User Manual 5-26 ni.com • Does not always require the location with sub-pixel accuracy • Does not require shape information for the region Complete the following steps to find features in an image using color location: 1. Define ...
Page 79 - MeasurementAxis; Analytic Geometry Measurements
Chapter 5 Performing Machine Vision Tasks © National Instruments Corporation 5-27 IMAQ Vision for Visual Basic User Manual the rake method, and then they compute the distance between the points detected on the edges along each search line of the rake and return the largest or smallest distance in ei...
Page 80 - Instrument Reader Measurements; Identify Parts Under Inspection; Classifying Samples
Chapter 5 Performing Machine Vision Tasks IMAQ Vision for Visual Basic User Manual 5-28 ni.com • FindMidLine —Finds the line that is midway between a point and a line and is parallel to the line. • FindPolygonArea —Calculates the area of a polygon specified by its vertex points. Instrument Reader Me...
Page 81 - Start»; Reading Characters; Start»Programs»National Instruments»Vision»OCR; Reading Barcodes; BarcodeType
Chapter 5 Performing Machine Vision Tasks © National Instruments Corporation 5-29 IMAQ Vision for Visual Basic User Manual Before you classify objects, you must create a classifier file with samples of the objects using the NI Classification Training Interface. Go to Start» Programs»National Instrum...
Page 82 - Read Data Matrix Barcode
Chapter 5 Performing Machine Vision Tasks IMAQ Vision for Visual Basic User Manual 5-30 ni.com types: Codabar, Code 39, Code 93, Code 128, EAN 8, EAN 13, Interleaved 2 of 5, MSI, and UPCA. Read Data Matrix Barcode Use CWIMAQVision.ReadDataMatrixBarcode to read values encoded in a Data Matrix barcode...
Page 83 - Display Results
Chapter 5 Performing Machine Vision Tasks © National Instruments Corporation 5-31 IMAQ Vision for Visual Basic User Manual By default, CWIMAQVision.ReadDataMatrixBarcode automatically detects the type of barcode to read. You can improve the performance of the function by specifying the type of barco...
Page 86 - Calibrating Images; Perspective and Nonlinear Distortion Calibration; Follow these general steps to calibrate the imaging system:
© National Instruments Corporation 6-1 IMAQ Vision for Visual Basic User Manual 6 Calibrating Images This chapter describes how to calibrate the imaging system, save calibration information, and attach calibration information to an image. After you set up the imaging system, you may want to calibrat...
Page 87 - Defining a Calibration Template; The displacement in the x and y directions must equal (; Start»Programs»; . The dots have radii
Chapter 6 Calibrating Images IMAQ Vision for Visual Basic 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 supp...
Page 88 - Defining a Reference Coordinate System; The angle is set to 0; first column of the dots in the grid, as shown in Figure 6-3b.
Chapter 6 Calibrating Images © National Instruments Corporation 6-3 IMAQ Vision for Visual Basic User Manual Defining a Reference Coordinate System To express measurements in real-world units, you must define a coordinate system in the image of the grid. Use CWIMAQLearnCalibrationOptions.Calibration...
Page 90 - Learning Calibration Information; to learn the calibration information.
Chapter 6 Calibrating Images © National Instruments Corporation 6-5 IMAQ Vision for Visual Basic 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 setup....
Page 91 - Specifying Scaling Factors; Choosing a Region of Interest; Choosing a Learning Algorithm
Chapter 6 Calibrating Images IMAQ Vision for Visual Basic 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 CWIMAQCalibrationGridOpti...
Page 92 - to choose the perspective calibration; to chose the nonlinear calibration; Using the Learning Score
Chapter 6 Calibrating Images © National Instruments Corporation 6-7 IMAQ Vision for Visual Basic User Manual Choose the perspective projection algorithm when the system exhibits perspective errors only. A perspective projection calibration has an accurate transformation even in areas not covered by ...
Page 93 - Learning the Error Map; System Setup and
Chapter 6 Calibrating Images IMAQ Vision for Visual Basic User Manual 6-8 ni.com Note A high score does not reflect the accuracy of the system. If the learning process returns a learning score below 600, try the following: 1. Make sure the grid complies with the guidelines listed in the Defining a C...
Page 94 - Calibration Invalidation; Simple Calibration
Chapter 6 Calibrating Images © National Instruments Corporation 6-9 IMAQ Vision for Visual Basic User Manual Calibration Invalidation Any image processing operation that changes the image size or orientation voids the calibration information in a calibrated image. Examples of methods that void calib...
Page 95 - Save Calibration Information; to save the image of; . For more information; to attach the
Chapter 6 Calibrating Images IMAQ Vision for Visual Basic User Manual 6-10 ni.com Figure 6-7. Defining a Simple 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 CWIM...
Page 96 - to save the image and all of the attached; , you must relearn the calibration
Chapter 6 Calibrating Images © National Instruments Corporation 6-11 IMAQ Vision for Visual Basic User Manual CWIMAQVision.ConvertPixelToRealWorldCoordinates . If the application requires shape measurements, correct the image by removing distortion with CWIMAQVision.CorrectCalibratedImage . Note Cor...
Page 98 - Numbers
© National Instruments Corporation G-1 IMAQ Vision for Visual Basic 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 imag...
Page 99 - BMP
Glossary IMAQ Vision for Visual Basic User Manual G-2 ni.com barycenter The grayscale value representing the centroid of the range of an image’s grayscale values in the image histogram. binary image An image in which the objects usually have a pixel intensity of 1 (or 255) and the background has a p...
Page 101 - See
Glossary IMAQ Vision for Visual Basic User Manual G-4 ni.com connectivity-4 Only pixels adjacent in the horizontal and vertical directions are considered neighbors. connectivity-8 All adjacent pixels are considered neighbors. contrast A constant multiplication factor applied to the luma and chroma c...
Page 104 - See also
Glossary © National Instruments Corporation G-7 IMAQ Vision for Visual Basic User Manual hit-miss function Locates objects in the image similar to the pattern defined in the structuring element. HSI A color encoding scheme in hue, saturation, and intensity. HSL A color encoding scheme using hue, sat...
Page 105 - Red
Glossary IMAQ Vision for Visual Basic User Manual G-8 ni.com image enhancement The process of improving the quality of an image that you acquire from a sensor in terms of signal-to-noise ratio, image contrast, edge definition, and so on. image file A file containing pixel data and additional informa...
Page 106 - JPG
Glossary © National Instruments Corporation G-9 IMAQ Vision for Visual Basic User Manual intensity calibration Assigns user-defined quantities such as optical densities or concentrations to the gray-level values in an image. intensity profile The gray-level distribution of the pixels along an ROI in...
Page 110 - PNG
Glossary © National Instruments Corporation G-13 IMAQ Vision for Visual Basic User Manual optical representation Contains the low-frequency information at the center and the high- frequency information at the corners of an FFT-transformed image. outer gradient Finds the outer boundary of objects. P ...
Page 114 - value
Glossary © National Instruments Corporation G-17 IMAQ Vision for Visual Basic User Manual V value The grayscale intensity of a color pixel computed as the average of the maximum and minimum red, green, and blue values of that pixel.
Page 115 - Index; Numerics; attenuation
© National Instruments Corporation I-1 IMAQ Vision for Visual Basic User Manual Index Numerics 1D barcodes, 5-29 reading, 5-29 A acquiring images, 2-4 continuous acquisition, 2-5one-shot acquisition, 2-4 Acquisition Type combo box, 2-4ActiveX objects, 1-5adding shapes to ROIs, 3-5analyzing images, 2...
Page 116 - ix
Index IMAQ Vision for Visual Basic User Manual I-2 ni.com color pattern matching finding points, 5-19optimize speed with search strategy, 5-23setting rotation angle ranges, 5-25 color pattern matching algorithms training, 5-21using contrast, 5-25 color scores, 5-24color sensitivity, using to control...
Page 118 - xi
Index IMAQ Vision for Visual Basic User Manual I-4 ni.com imaging systems, setting up, 2-1IMAQ Vision applications, creating, 1-5improving binary images, 4-2images, 2-9particle shapes, 4-4 increasing speed of the color pattern matching algorithm, 5-25 speed of the pattern matching algorithm, 5-18 in...
Page 121 - using
Index © National Instruments Corporation I-7 IMAQ Vision for Visual Basic User Manual testing search algorithms, 5-18, 5-25tolerances, setting for pattern matching, 5-17touching particles, separating, 4-3training characters, 5-29color pattern matching algorithms, 5-21pattern matching algorithm, 5-15...