Manuel d'utilisation / d'entretien du produit IMAQTM du fabricant National Instruments
Aller à la page of 121
IMAQ TM IMAQ Vision for Visual Basic User Manual IMAQ Vision for Visual Basic User Manual August 2004 Edi tion Part Number 3712 57A-01.
Support Worldwide Technical Support and Product Info rmation ni.com National Instruments Corporate Headquarters 11500 North Mopac Expressway Aust in, Texas 78759-3504 USA Tel: 512 683 0100 Worldwide O.
Important Information Warranty The media on which you receive Natio nal In struments software are warranted not to fail to execute p rogramming instruction s, due to defects in materials and workmanship, for a period of 90 days from date of shipment, as eviden ced by receipt s or other documentation.
© National Instruments Cor poration v IMAQ Vision for Visual Basic User Manual Contents About This Manual Conventions ............ .............. ........... .............. ............ .............. .............. ........... ............. i x Related Documentation .
Contents IMAQ Vision for Visual Basic User Manual vi ni.com Improve an Image ............... .............. ............... ........... .............. .............. ........... ............ 2-9 Lookup Tables ............ .............................
Contents © National Instruments Cor poration vii IMAQ Vision for Visual Basic User Manual Set Search Areas ............. .............. ............ .............. ........... .............. .............. ............ .... 5-8 Defining Regions Interactivel y.
Contents IMAQ Vision for Visual Basic User Manual viii ni.com Chapter 6 Calibrating Images Perspective and Nonl inear Distortion Calibration ........... ............... ........... .............. ...... 6-1 Defining a Calibration Template............ .
© National Instruments Corporation ix IMA Q 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 V isual Basic and need to create machine vision and image proce ssing applications using V isual Basic objects.
About This Manual IMAQ Vision for Visual Basic User Manual x ni.com Related Documentation This manual assumes that you are fami liar with V isual Basic and can us e Activ eX controls in V isual Basi c. The following are good sources of information about V isual Basic and Acti veX controls: • msdn.
About This Manual © National Instruments Corporation xi IMA Q Vision for Visual Basic User Manual • NI Vision Builder for Automated Inspection: Inspection Help —If you need information about ho w to ru n an automated vision inspection system using NI V ision Builder AI, refer to this help file.
© National Instruments Cor poration 1-1 IMAQ Vision for Visual Bas ic User Manual 1 Introduction to IMAQ Vision This chapter describes the IMA Q V ision for V isual Basic software and associated soft.
Chapter 1 Introductio n to IMAQ Vision IMAQ Vision for Visual Basic User Manual 1-2 ni.com In addition to this manual, several documentation resources are a v ailable to help you create a vision appli.
Chapter 1 Introductio n to IMAQ Vision © National Instruments Cor poration 1-3 IMAQ Vision for Visual Bas ic User Manual cwimaq.ocx cwimaq.ocx contains the following th ree ActiveX controls and a collection of ActiveX object s: CWIMAQ, CWIMAQVision, and CWIMAQViewer.
Chapter 1 Introductio n 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 Activ eX objects you use in a machine visi on appl ication to perform optical character recognition (OCR).
Chapter 1 Introductio n to IMAQ Vision © National Instruments Cor poration 1-5 IMAQ Vision for Visual Bas ic User Manual Tip Refer to the source code of the CWMachi neV ision cont rol for an example of how to use the CWIMA QV ision methods.
Chapter 1 Introductio n to IMAQ Vision IMAQ Vision for Visual Basic User Manual 1-6 ni.com Figure 1-1. General Steps for Designi ng a Vision Application Set Up Y our Imaging System Calibrate Y our Ima.
Chapter 1 Introductio n to IMAQ Vision © National Instruments Cor poration 1-7 IMAQ Vision for Visual Bas ic User Manual Figure 1-2. Inspection Steps for Building a Vision Application Define Regions .
© National Instruments Cor poration 2-1 IMAQ Vision for Visual Bas ic 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.
Chapter 2 Getting M easure ment-Ready Images IMAQ Vision for Visual Basic User Manual 2-2 ni.com color and monochro me devices as well as digital devices. V isit ni.com/imaq for more information about IMA Q de vices. 4. Configure the dri v er software fo r the image acquisition de vice.
Chapter 2 Getting Measurement-Ready Images © National Instruments Cor poration 2-3 IMAQ Vision for Visual Bas ic 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. Y ou can set th e Type property on the image o bject to change the image type.
Chapter 2 Getting M easure ment-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 imagi ng system in one of the following three ways: • Acquire an image with a camera through the image acqu isition device.
Chapter 2 Getting Measurement-Ready Images © National Instruments Cor poration 2-5 IMAQ Vision for Visual Bas ic 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 .
Chapter 2 Getting M easure ment-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 comp uter into the image refe rence.
Chapter 2 Getting Measurement-Ready Images © National Instruments Cor poration 2-7 IMAQ Vision for Visual Bas ic User Manual the vie wer . Y ou can set the CWIMAQPalette.
Chapter 2 Getting M easure ment-Ready Images IMAQ Vision for Visual Basic User Manual 2-8 ni.com Use CWIMAQVision.Histogram2 to analyze the ov erall grayscale distribution in the image. Use the histogram of the image to analyze two important criteria that define the quality of an image—saturati on and contrast.
Chapter 2 Getting Measurement-Ready Images © National Instruments Cor poration 2-9 IMAQ Vision for Visual Bas ic User Manual Improve an Image Using the information you gathered from analyzing the image, yo u may want to improve the quality o f the image for inspection.
Chapter 2 Getting M easure ment-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 int ensity value. Y ou can define your o wn highpass filter with CWIMAQVision.
Chapter 2 Getting Measurement-Ready Images © National Instruments Corporation 2-11 IMA Q Vision for Visual Bas ic User Manual Use CWIMAQVision.GrayMorphology to perform one of the follo wing se ven transformations: • Erosion—Reduces the brightness of pixels that are surrounded by neighbors with a lower intensity .
Chapter 2 Getting M easure ment-Ready Images IMAQ Vision for Visual Basic User Manual 2-12 ni.com 2. Improv e the image in the frequency domain with a lo wpass or highpass frequency f ilter . Speci fy which type of filter to use with CWIMAQVision.CxAttenuate or CWIMA QVision.
© National Instruments Cor poration 3-1 IMAQ Vision for Visual Bas ic User Manual 3 Making Grayscale and Color Measurements This chapter describes how to take m easurements from grayscale and color images. You can make inspection decisi ons based on image statistics, such as the mean intensity level in a region.
Chapter 3 Making Grayscale and Color Measurements IMAQ Vision for Visual Basic User Manual 3-2 ni.com Table 3-1. T ools Palette Functions To o l N a m e Function None Disable the tools. Selection T ool Select an R OI in the imag e and adjust the position of its control poin ts and contours.
Chapter 3 Making Graysca le and Color Measurements © National Instruments Cor poration 3-3 IMAQ Vision for Visual Bas ic User Manual Hold down <Shift> when drawing an R O I if you want to constrain the R OI to the horizontal, vertical, or di agonal axes, when possible.
Chapter 3 Making Grayscale and Color Measurements IMAQ Vision for Visual Basic User Manual 3-4 ni.com Figure 3-2. T ools Information 1 Anchoring Coordinates of a Region of Interest 2 Size of the Image.
Chapter 3 Making Graysca le and Color Measurements © National Instruments Cor poration 3-5 IMAQ Vision for Visual Bas ic User Manual During design time, use the Menu property page to select wh ich tools appear in the right-click menu. Y ou al so can designate a defa ult tool from this pro perty page.
Chapter 3 Making Grayscale and Color Measurements IMAQ Vision for Visual Basic User Manual 3-6 ni.com CWIMA QRegion contains. When you kn ow the type of shape that the region contains, you can set the region into a shape v ariable and use that variable to manipulate the shape pr operties.
Chapter 3 Making Graysca le and Color Measurements © National Instruments Cor poration 3-7 IMAQ Vision for Visual Bas ic User Manual minimum in tensity , and maximum int ensity . Use CWMachineVision.LightMeterRectangle to get the pixel value statistics within a rectangular region in an image.
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. Primar y Components of a 64-bit Color Image A color pixel encoded as a Long v alue can be decomposed into its individual components using CWIMAQVision.
Chapter 3 Making Graysca le and Color Measurements © National Instruments Cor poration 3-9 IMAQ Vision for Visual Bas ic User Manual Comparing Colors You can use the color matching capabilit y of IMAQ Vision to compare or evaluate the color content of an image or regions in an 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 colo r information to .
Chapter 3 Making Graysca le and Color Measurements © National Instruments Corporation 3-11 IMA Q Vision for Visual Bas ic User Manual Using a Region in the Image You can select a region in the image t o provide th e color inform ation for comparison.
Chapter 3 Making Grayscale and Color Measurements IMAQ Vision for Visual Basic User Manual 3-12 ni.com fuses much better and results in hi gh match scores—around 800 —for both the fuses. Y ou can use an unlimited number of samples to learn the representati ve color spectrum for a specif ied template.
Chapter 3 Making Graysca le and Color Measurements © National Instruments Corporation 3-13 IMA Q Vision for Visual Bas ic User Manual Ignoring Learned Colors You can ignore cer tain color compo nents in color m atching by setting the corresponding component in the inpu t color spectrum array to –1.
© National Instruments Cor poration 4-1 IMAQ Vision for Visual Bas ic User Manual 4 Performing Particle Analysis This chapter describes how to perform particle analysis on the images. Use particle analysis to find statistical in formation about particles, such as the presence, size, number, and location of particle regions.
Chapter 4 Per forming 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 determ ine the opti mal threshold rang e and thresh old the image.
Chapter 4 Per forming Particle Analysis © National Instruments Cor poration 4-3 IMAQ Vision for Visual Bas ic User Manual Removing Unwanted Particles Use CWIMAQVision.
Chapter 4 Per forming 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.
Chapter 4 Per forming Particle Analysis © National Instruments Cor poration 4-5 IMAQ Vision for Visual Bas ic User Manual cwimaqMeasurementA verageHorizSe gmentLength A v erage length of a horizontal segment in the particle. cwimaqMeasurementA vera geV ertSe gmentLe ngth A v erage length of a vertical segment in the particle.
Chapter 4 Per forming Particle Analysis IMAQ Vision for Visual Basic User Manual 4-6 ni.com cwimaqMeasurementCon v exHullPerimeter P erimeter of the small est con v e x polygon containing all points i n the particle. cwimaqMeasurementElongationF actor Max Feret Diameter divided b y Equi v alent Rect Short Side (Feret).
Chapter 4 Per forming Particle Analysis © National Instruments Cor poration 4-7 IMAQ Vision for Visual Bas ic User Manual cwimaqMeasurementHolesArea Sum of the areas of each hole in the particle. cwimaqMeasurementHolesPerimeter Sum of the perimeters of each hole in the particle.
Chapter 4 Per forming Particle Analysis IMAQ Vision for Visual Basic User Manual 4-8 ni.com cwimaqMeasurementMaxFeretDiameterStartY Y -coordinate of the start of the line segment connecting the two perimeter points that are the furthest apart.
Chapter 4 Per forming Particle Analysis © National Instruments Cor poration 4-9 IMAQ Vision for Visual Bas ic User Manual cwimaqMeasurementNor mMomentOfInertiaXY The normalized moment of inertia in the X and Y directions. cwimaqMeasurementNor mMomentOfInertiaXY Y The normalized moment of inertia in the X direction once and the Y direction twice.
Chapter 4 Per forming Particle Analysis IMAQ Vision for Visual Basic User Manual 4-10 ni.com cwimaqMeasurementSumXXY The sum of all X-coordinates squared times Y -coordinat es in the p article. cwimaqMeasurementSumXY The sum of all X-coordinates times Y -coordinates in the particle.
© National Instruments Cor poration 5-1 IMAQ Vision for Visual Bas ic User Manual 5 Performing Machine Vision Ta s k s This chapter describes how to perform many common machi ne vision inspection tas ks.
Chapter 5 Per forming Mac hine Vision T asks IMAQ Vision for Visual Basic User Manual 5-2 ni.com Figure 5-1. Steps to Performing Machine Vision Note Diagram items enclosed with da shed lines are optional steps.
Chapter 5 Per forming Machine Vision T asks © National Instruments Cor poration 5-3 IMAQ Vision for Visual Bas ic User Manual to as the measurement coordinate system.
Chapter 5 Per forming Mac hine Vision T asks IMAQ Vision for Visual Basic User Manual 5-4 ni.com Figure 5-2. Coordinate Systems of a Refere nce Image and Inspection Image b .
Chapter 5 Per forming Machine Vision T asks © National Instruments Cor poration 5-5 IMAQ Vision for Visual Bas ic User Manual Figure 5-3. Locating Coordinate System Ax es with T wo Search Areas 2. Choose the parameters you need to locate the edges on the object.
Chapter 5 Per forming Mac hine Vision T asks IMAQ Vision for Visual Basic User Manual 5-6 ni.com 1. Def ine a templa te that represen ts th e part of the object that you want to use as a reference feature. For more informatio n about defining a template, refer to th e Find Meas urement Poi nts section.
Chapter 5 Per forming Machine Vision T asks © National Instruments Cor poration 5-7 IMAQ Vision for Visual Bas ic User Manual Choosing a Method to Build the Coordinate T ransformation Figure 5-4 guides you thro ugh choosing the best method fo r building a coordinate transfor mation for the application .
Chapter 5 Per forming Mac hine Vision T asks IMAQ Vision for Visual Basic User Manual 5-8 ni.com Set Search Areas Select ROIs in the imag es to limit the areas in which you perform the processing and inspection. You can define ROIs inte ractively or programmatically.
Chapter 5 Per forming Machine Vision T asks © National Instruments Cor poration 5-9 IMAQ Vision for Visual Bas ic User Manual Defining Regions Programmatically When you have an automated application , you need to define regions of interest programmatically.
Chapter 5 Per forming Mac hine Vision T asks 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, us e CWMachineVision.FindStraightEdge and CWMachineVision.
Chapter 5 Per forming Machine Vision T asks © National Instruments Corporation 5-11 IMA Q Vision for Visual Bas ic User Manual Figure 5-6. Finding a Cir cular Feature These methods locate the intersection points between a set of search lines in the search region and the edge of an obj ect.
Chapter 5 Per forming Mac hine Vision T asks 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 contour s.
Chapter 5 Per forming Machine Vision T asks © National Instruments Corporation 5-13 IMA Q Vision for Visual Bas ic User Manual 3. Define an image or an area of an image as the search area. A small search area reduces the tim e to find the features. 4.
Chapter 5 Per forming Mac hine Vision T asks IMAQ Vision for Visual Basic User Manual 5-14 ni.com Feature Detail A template with relatively coarse features is less sensiti ve to variations in size and rotation than a model with fi ne features. However, the model must contain enough detail to identify it .
Chapter 5 Per forming Machine Vision T asks © National Instruments Corporation 5-15 IMA Q Vision for Visual Bas ic User Manual Background Information Unique background information in a template improves search performance and accuracy.
Chapter 5 Per forming Mac hine Vision T asks 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.
Chapter 5 Per forming Machine Vision T asks © National Instruments Corporation 5-17 IMA Q Vision for Visual Bas ic User Manual Figure 5-11. S electing a Sear ch Area for Grayscale P attern Matching S.
Chapter 5 Per forming Mac hine Vision T asks IMAQ Vision for Visual Basic User Manual 5-18 ni.com Minimum Contrast Contrast is the difference between the sm allest and lar gest pixel values in a region. You can set the minimum contra st to potentially increase the speed of the pattern matching algorithm.
Chapter 5 Per forming Machine Vision T asks © National Instruments Corporation 5-19 IMA Q Vision for Visual Bas ic User Manual Using a Ranking Method to V erify Results The manner in which you interpret the pattern matchin g results depends on the application.
Chapter 5 Per forming Mac hine Vision T asks IMAQ Vision for Visual Basic User Manual 5-20 ni.com 5. Set the t olerances and p arameters to specify h ow th e algorithm operates at run time using CWIMAQMatchColorPatternOptions . 6. T est the search algorith m on test images using CWIMAQVision.
Chapter 5 Per forming Machine Vision T asks © National Instruments Corporation 5-21 IMA Q Vision for Visual Bas ic User Manual Background Information Unique background information in a template improves search performance and accuracy during the grayscale pattern matching phase.
Chapter 5 Per forming Mac hine Vision T asks IMAQ Vision for Visual Basic User Manual 5-22 ni.com Defining a Search Area Two equally important factors define the success of a color pattern matching algorithm—accuracy and speed . You can define a search area to reduce ambiguity in the search proce ss.
Chapter 5 Per forming Machine Vision T asks © National Instruments Corporation 5-23 IMA Q Vision for Visual Bas ic 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 reduce the required search time.
Chapter 5 Per forming Mac hine Vision T asks IMAQ Vision for Visual Basic User Manual 5-24 ni.com Use one of the following four search strate gies: • V ery aggressiv e—Uses the lar gest step size, the most sub-sampling and only the dominant color from the template to search for the template.
Chapter 5 Per forming Machine Vision T asks © National Instruments Corporation 5-25 IMA Q Vision for Visual Bas ic User Manual Minimum Contrast Use the minimum contrast to increas e the speed of the color pattern matching algorith m.
Chapter 5 Per forming Mac hine Vision T asks IMAQ Vision for Visual Basic User Manual 5-26 ni.com • Does not always require the lo cation with sub-pix el accuracy • Does not require shape information for the region Complete the f ollo wing step s to f ind features in an ima ge using color location: 1.
Chapter 5 Per forming Machine Vision T asks © National Instruments Corporation 5-27 IMA Q Vision for Visual Bas ic User Manual the rake method, and then they compute the distance between the points detected on the edges along each search line of the rak e and return the largest or smallest distance in either the horizontal or v ertical direction.
Chapter 5 Per forming Mac hine Vision T asks 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 specif ied by its vertex points.
Chapter 5 Per forming Machine Vision T asks © National Instruments Corporation 5-29 IMA Q Vision for Visual Bas ic User Manual Before you classify objects, you must create a classifier f ile with samples of the objects using the NI Clas si fication T raining Interface.
Chapter 5 Per forming Mac hine Vision T asks 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.ReadDataMat rixBarcode to read v alues encoded in a Data Matrix barcode.
Chapter 5 Per forming Machine Vision T asks © National Instruments Corporation 5-31 IMA Q Vision for Visual Bas ic User Manual By default, CWIMAQVision.ReadDataMatrixBar code automatically detects the type of barcode to read. Y ou can improv e the performance of the function by specifying the type of b arcode in the application.
Chapter 5 Per forming Mac hine Vision T asks IMAQ Vision for Visual Basic User Manual 5-32 ni.com • DrawRectangle —Ov erlays a CWIMA QRectangle object on an image. • DrawOval —Overlays a CWIMA QOval object on an image. • DrawArc —Overlays a CWIMA QArc object on an image.
Chapter 5 Per forming Machine Vision T asks © National Instruments Corporation 5-33 IMA Q Vision for Visual Bas ic User Manual to True . W ith CWMachineVision.FindPattern , you can ov erlay the search area and the result. Use CWIMAQOverlay.Clear to clear an y pre vious ov erlay information from the image.
© National Instruments Cor poration 6-1 IMAQ Vision for Visual Bas ic User Manual 6 Calibrating Images This chapter describes how to ca librate the imaging system, save calibration information , and attach calibration in formation to an image. After you set up the imaging system, you may want to calibrat e the system.
Chapter 6 Calibrating Images IMAQ Vision for Visual Basic User Manual 6-2 ni.com Refer to Chapter 5, Performing Machine Vision Tasks , fo r more information about applying calibratio n information before making measurements.
Chapter 6 Calibr ating Images © National Instruments Cor poration 6-3 IMAQ Vision for Visual Bas ic User Manual Defining a Reference Coordinate System To express measurements in real-world units, you must define a coordinate system in the imag e of the grid.
Chapter 6 Calibrating Images IMAQ Vision for Visual Basic User Manual 6-4 ni.com Figure 6-3. A Calibration Grid and an Image of the Grid Note If you specify a list of points instead of a grid for the calibration process, the software def ines a default coordinate system, as follo ws: 1.
Chapter 6 Calibr ating Images © National Instruments Cor poration 6-5 IMAQ Vision for Visual Bas ic 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 se tup.
Chapter 6 Calibrating Images IMAQ Vision for Visual Basic User Manual 6-6 ni.com Specifying Scaling Factors Scaling factors are the real-wor ld distances between the dots in the calibration grid in the x and y directi ons and the units in which the distances are measured.
Chapter 6 Calibr ating Images © National Instruments Cor poration 6-7 IMAQ Vision for Visual Bas ic User Manual Choose the perspecti ve projection al gorithm when the system exhibits perspectiv e errors only .
Chapter 6 Calibrating Images IMAQ Vision for Visual Basic User Manual 6-8 ni.com Note A high score does not reflect the accurac y of the system. If the learning process returns a learni ng score below 600, try the follo wing: 1. Make sure the grid complies with the guidelines listed in the Defining a Calibration Tem plate section.
Chapter 6 Calibr ating Images © National Instruments Cor poration 6-9 IMAQ Vision for Visual Bas ic User Manual Calibration Invalidation Any image processing operation th at ch anges the image si ze or orientation voids the calibration information in a calibrated image.
Chapter 6 Calibrating Images IMAQ Vision for Visual Basic User Manual 6-10 ni.com Figure 6-7. Defini ng a Simp le Calibration Save Calibration Information After you learn th e calibration informatio n, you can save i t so that yo u do not have to relearn the informatio n for subsequent processing.
Chapter 6 Calibr ating Images © National Instruments Corporation 6-11 IMA Q Vision for Visual Bas ic User Manual CWIMAQVision.ConvertPixelToRealWorld Coordinates . If the application requires shape measurements, correct the image by removing distortion with CWIMAQVision.
© National Instruments Corporation A-1 IMAQ Vision for Visual Basic User Manual A T echnical Support and Professional Ser vices Visit the following sections of the National Instruments Web site at ni.com for technical support an d professional services: • Support —Online technical support resources at ni.
© National Instruments Corporation G-1 IMAQ Vision for Visual Basic User Manual Glossar y Numbers 1D One-dimensional. 2D T wo-dimensional. 3D Three-dimensional. A AIPD The National Instrument s internal image file format used for saving complex images and calib ration information associ ated with an image (extension APD).
Glossary IMAQ Vision for Visual Basic User Manual G -2 ni.com barycenter The grayscale value repres enting the centroid of the range of an image’ s grayscale v alues in the image histogram. binary image An image in which the objects usually have a pix el intensity of 1 (or 255) and the background has a pixel intensity of 0.
Glossary © National Instruments Corporation G-3 IMAQ Vision for Visual Basic User Manual C caliper (1) A function in the NI V ision Assistant and in NI V ision Buil der for Automated Inspec tion that.
Glossary IMAQ Vision for Visual Basic User Manual G -4 ni.com connectivity-4 Only pixels adjacent in the hori zontal and vertical dir ections are considered neighbors.
Glossary © National Instruments Corporation G-5 IMAQ Vision for Visual Basic User Manual edge steepness The number of pixels that co rresponds to the slope or transition area of an edge. energy center The center of mass of a grayscale image. See center of mass .
Glossary IMAQ Vision for Visual Basic User Manual G -6 ni.com gradient filter An edge detection al gorithm that extracts the contours in gray-le vel v alues. Gradient filters include the Pr ewitt and Sobel filters. gray lev el The brightness of a pixel in an image.
Glossary © National Instruments Corporation G-7 IMAQ Vision for Visual Basic User Manual hit-miss function Locates objects in the image similar to the patte rn defi ned in the structuring element. HSI A color encoding scheme in hue, saturation, and intensity .
Glossary IMAQ Vision for Visual Basic User Manual G -8 ni.com image enhancement The process of improving the quality of an i mage that you acqu ire from a sensor in terms of signal-to-noise ratio, imag e contrast, edge definition, and so on. image file A f ile containing pixel data and additional information about the image.
Glossary © National Instruments Corporation G-9 IMAQ Vision for Visual Basic User Manual intensity calibr ation Assigns user-def ined quantities such as optical densities or concentrations to the gray-le vel v alues in an image. intensity profile The gray-lev el distribution of the pix els along an R O I in an image.
Glossary IMAQ Vision for Visual Basic User Manual G-10 ni.com linear filter A special algorith m that calculates the v alue of a pixel based on its o wn pixel v alue as well as the pixel values of its neighbors. The sum of this calculation is d ivided b y the sum of th e elements in the matrix to obtain a new pixel v alue.
Glossary © National Instruments Corporation G-11 IMA Q Vision for Visual Basic User Manual M M (1) Mega, the standard metric prefix for 1 mil lion or 10 6 , when used w ith units of measure such as v olts and hertz. (2) Mega, the pref ix for 1,048,576, or 220, when used with B to quantify data or computer memo ry .
Glossary IMAQ Vision for Visual Basic User Manual G-12 ni.com NI-IMA Q The dri ver software for National Instruments IMA Q hardware. nonlinear f ilter Replaces each pix el v alue with a nonlinear function of its surrounding pixels. nonlinear gradient filter A highpass edge-extraction filter that f av ors vertical edges.
Glossary © National Instruments Corporation G-13 IMA Q Vision for Visual Basic User Manual optical representation Contains the low-frequenc y 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.
Glossary IMAQ Vision for Visual Basic User Manual G-14 ni.com proper-closing A finite combination of successi ve closing and opening operations that you can use to fill small holes and smooth the boundaries of objects.
Glossary © National Instruments Corporation G-15 IMA Q Vision for Visual Basic User Manual R OI Region of inter est. (1) An area of the image that is graphically selected from a windo w displaying the image. This area can be used focus further processing.
Glossary IMAQ Vision for Visual Basic User Manual G-16 ni.com spatial filters Alter the intensity of a pixel relative to variations in intensities of its neighboring pixels. Y ou can use these filters for edge detection, image enhancement, noise reduction, smoothing, and so forth.
Glossary © National Instruments Corporation G-17 IMA Q Vision for Visual Basic User Manual V v alue The grayscale intensity of a color pixel computed as the av erage of the maximum and min imum red, green, an d blue v alues of that pixel.
© National Instruments Cor poration I-1 IMAQ Vision for Vis ual Basic User Manual Index Numerics 1D barcodes, 5-29 reading, 5-29 A acquiring images, 2-4 continuous acquisition , 2-5 one-shot acquisit.
Index IMAQ Vision for Visual Basic User Manual I-2 ni.com color pattern matching finding points, 5-19 optimize speed w ith s earch strategy, 5-23 setting rotation angle ranges, 5- 25 color pattern mat.
Index © National Instruments Cor poration I-3 IMAQ Vision for Vis ual Basic User Manual documentation conventions used in manual, ix NI resources, A-1 related documentation, x drivers NI resources, A.
Index IMAQ Vision for Visual Basic User Manual I-4 ni.com imaging systems, sett ing up, 2- 1 IMAQ Vision applications, creating, 1-5 improving binary images, 4-2 images, 2-9 particle shapes, 4-4 incre.
Index © National Instruments Cor poration I-5 IMAQ Vision for Vis ual Basic User Manual O objects classifying, 5-29 detecting, 5-2 locating, 5-2 OCR, 5-29 one-shot acquisition, 2-4 optimizing speed o.
Index IMAQ Vision for Visual Basic User Manual I-6 ni.com ROIs adding shapes, 3-5 programmatically defining, 3-5 Rotated Rectangle tool, 3-2 rotation angle ranges setting for color pattern matc hing, .
Index © National Instruments Cor poration I-7 IMAQ Vision for Vis ual Basic User Manual testing search algorithms, 5-18, 5-25 tolerances, setting for pattern matching, 5-17 touching particles, separa.
Un point important après l'achat de l'appareil (ou même avant l'achat) est de lire le manuel d'utilisation. Nous devons le faire pour quelques raisons simples:
Si vous n'avez pas encore acheté National Instruments IMAQTM c'est un bon moment pour vous familiariser avec les données de base sur le produit. Consulter d'abord les pages initiales du manuel d'utilisation, que vous trouverez ci-dessus. Vous devriez y trouver les données techniques les plus importants du National Instruments IMAQTM - de cette manière, vous pouvez vérifier si l'équipement répond à vos besoins. Explorant les pages suivantes du manuel d'utilisation National Instruments IMAQTM, vous apprendrez toutes les caractéristiques du produit et des informations sur son fonctionnement. Les informations sur le National Instruments IMAQTM va certainement vous aider à prendre une décision concernant l'achat.
Dans une situation où vous avez déjà le National Instruments IMAQTM, mais vous avez pas encore lu le manuel d'utilisation, vous devez le faire pour les raisons décrites ci-dessus,. Vous saurez alors si vous avez correctement utilisé les fonctions disponibles, et si vous avez commis des erreurs qui peuvent réduire la durée de vie du National Instruments IMAQTM.
Cependant, l'un des rôles les plus importants pour l'utilisateur joués par les manuels d'utilisateur est d'aider à résoudre les problèmes concernant le National Instruments IMAQTM. Presque toujours, vous y trouverez Troubleshooting, soit les pannes et les défaillances les plus fréquentes de l'apparei National Instruments IMAQTM ainsi que les instructions sur la façon de les résoudre. Même si vous ne parvenez pas à résoudre le problème, le manuel d‘utilisation va vous montrer le chemin d'une nouvelle procédure – le contact avec le centre de service à la clientèle ou le service le plus proche.