National Instruments IMAQTM manuel d'utilisation
- Voir en ligne ou télécharger le manuel d’utilisation
- 121 pages
- 2.01 mb
Aller à la page of
Les manuels d’utilisation similaires
-
Digital Camera
National Instruments Smart Camera
11 pages 0.42 mb -
Digital Camera
National Instruments NI-IMAQ
52 pages 0.43 mb -
Digital Camera
National Instruments NI 17xx
90 pages 1.6 mb -
Digital Camera
National Instruments NI 1450 Series
83 pages 1.49 mb -
Digital Camera
National Instruments IMAQTM
121 pages 2.01 mb
Un bon manuel d’utilisation
Les règles imposent au revendeur l'obligation de fournir à l'acheteur, avec des marchandises, le manuel d’utilisation National Instruments IMAQTM. Le manque du manuel d’utilisation ou les informations incorrectes fournies au consommateur sont à la base d'une plainte pour non-conformité du dispositif avec le contrat. Conformément à la loi, l’inclusion du manuel d’utilisation sous une forme autre que le papier est autorisée, ce qui est souvent utilisé récemment, en incluant la forme graphique ou électronique du manuel National Instruments IMAQTM ou les vidéos d'instruction pour les utilisateurs. La condition est son caractère lisible et compréhensible.
Qu'est ce que le manuel d’utilisation?
Le mot vient du latin "Instructio", à savoir organiser. Ainsi, le manuel d’utilisation National Instruments IMAQTM décrit les étapes de la procédure. Le but du manuel d’utilisation est d’instruire, de faciliter le démarrage, l'utilisation de l'équipement ou l'exécution des actions spécifiques. Le manuel d’utilisation est une collection d'informations sur l'objet/service, une indice.
Malheureusement, peu d'utilisateurs prennent le temps de lire le manuel d’utilisation, et un bon manuel permet non seulement d’apprendre à connaître un certain nombre de fonctionnalités supplémentaires du dispositif acheté, mais aussi éviter la majorité des défaillances.
Donc, ce qui devrait contenir le manuel parfait?
Tout d'abord, le manuel d’utilisation National Instruments IMAQTM devrait contenir:
- informations sur les caractéristiques techniques du dispositif National Instruments IMAQTM
- nom du fabricant et année de fabrication National Instruments IMAQTM
- instructions d'utilisation, de réglage et d’entretien de l'équipement National Instruments IMAQTM
- signes de sécurité et attestations confirmant la conformité avec les normes pertinentes
Pourquoi nous ne lisons pas les manuels d’utilisation?
Habituellement, cela est dû au manque de temps et de certitude quant à la fonctionnalité spécifique de l'équipement acheté. Malheureusement, la connexion et le démarrage National Instruments IMAQTM ne suffisent pas. Le manuel d’utilisation contient un certain nombre de lignes directrices concernant les fonctionnalités spécifiques, la sécurité, les méthodes d'entretien (même les moyens qui doivent être utilisés), les défauts possibles National Instruments IMAQTM et les moyens de résoudre des problèmes communs lors de l'utilisation. Enfin, le manuel contient les coordonnées du service National Instruments en l'absence de l'efficacité des solutions proposées. Actuellement, les manuels d’utilisation sous la forme d'animations intéressantes et de vidéos pédagogiques qui sont meilleurs que la brochure, sont très populaires. Ce type de manuel permet à l'utilisateur de voir toute la vidéo d'instruction sans sauter les spécifications et les descriptions techniques compliquées National Instruments IMAQTM, comme c’est le cas pour la version papier.
Pourquoi lire le manuel d’utilisation?
Tout d'abord, il contient la réponse sur la structure, les possibilités du dispositif National Instruments IMAQTM, l'utilisation de divers accessoires et une gamme d'informations pour profiter pleinement de toutes les fonctionnalités et commodités.
Après un achat réussi de l’équipement/dispositif, prenez un moment pour vous familiariser avec toutes les parties du manuel d'utilisation National Instruments IMAQTM. À l'heure actuelle, ils sont soigneusement préparés et traduits pour qu'ils soient non seulement compréhensibles pour les utilisateurs, mais pour qu’ils remplissent leur fonction de base de l'information et d’aide.
Table des matières du manuel d’utilisation
-
Page 1
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[...]
-
Page 2
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 Offices Australia 1800 300 800, Austria 43 0 662 45 79 90 0, Belgium 32 0 2 757 00 20, Brazil 55 11 3262 3599, Canada (Calgary) 403 274 9391, Ca nada ([...]
-
Page 3
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. N ational Instruments will , at its option, repa[...]
-
Page 4
© National Instruments Cor poration v IMAQ Vision for Visual Basic User Manual Contents About This Manual Conventions ............ .............. ........... .............. ............ .............. .............. ........... ............. i x Related Documentation ............ .............. ........... .............. .............. ...........[...]
-
Page 5
Contents IMAQ Vision for Visual Basic User Manual vi ni.com Improve an Image ............... .............. ............... ........... .............. .............. ........... ............ 2-9 Lookup Tables ............ ........................................................ ............ ........... ...... 2-9 Filters ..... .............. ......[...]
-
Page 6
Contents © National Instruments Cor poration vii IMAQ Vision for Visual Basic User Manual Set Search Areas ............. .............. ............ .............. ........... .............. .............. ............ .... 5-8 Defining Regions Interactivel y................. .............. ........... .............. ............ .... 5-8 Defining[...]
-
Page 7
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............ .............. ............ .............. .............. ... 6-2 Defining a Reference Coordi nate [...]
-
Page 8
© 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. The manual guides yo [...]
-
Page 9
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.microsoft.com • Documentation that accompanie s [...]
-
Page 10
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. Other Documentation • NI OCR Training Interface[...]
-
Page 11
© 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 software products, disc usses the documentation and examples av ailable, outlines the IMA Q V ision fo r V isual Basic architecture, and lists the steps f[...]
-
Page 12
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 applicati on: • IMAQ Vision Concepts Manual —If you are new to machine vision and imaging, read this manual to understand the concepts behind IMA Q V i[...]
-
Page 13
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. Refer to the ActiveX Objects section for information about the ActiveX objects. C[...]
-
Page 14
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). NIOCR control Use this control to perform OCR, which is the process by which the m[...]
-
Page 15
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. ActiveX Objects Use the objects to group related input p arameters and output param eters to certain methods[...]
-
Page 16
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 Imaging System Create an Image Acquire or Read an Image Display an Image Attach Calibration Information Analyze an Image Improve an Image Make Measuremen[...]
-
Page 17
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 of Interest Chapter 3: Making Grayscale and Color Measurements Measure Grayscale Statistics Measure Color Statistics 2 Create a Binary Image Improve a[...]
-
Page 18
© 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. Set Up Y our Imaging System Before you acquire, anal yze, and process images ,[...]
-
Page 19
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. If you hav e a National Instruments im age acquisition device,[...]
-
Page 20
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. When you create an image, no[...]
-
Page 21
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. • Load an image from a file stored on t[...]
-
Page 22
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 . Use a sequence for applications that process multip le images. The following cod[...]
-
Page 23
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. You can read from image files stored in several standard formats , su[...]
-
Page 24
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.Type property to apply predefined color palettes . For ex ample, if you need t o display a binary image—an image that cont ains particle regions with pixel values of 1 and a bac[...]
-
Page 25
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. If the image does not have enough l[...]
-
Page 26
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. You can im prove the image with lookup tables, filters, grayscale morph ology, [...]
-
Page 27
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.Convolute or CWIMAQVision.NthOrder , or you can [...]
-
Page 28
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 . • Dilation—Increases the [...]
-
Page 29
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.CxTruncate . Lowpass f ilters smooth noise, details, textures, and sharp e[...]
-
Page 30
© 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. Based on the image statistics, you [...]
-
Page 31
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. Action: Click the appropriate ROI or control points. Point[...]
-
Page 32
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. Use the selection tool to posit ion an R OI by its control points or vert[...]
-
Page 33
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 3 Zoom Factor 4 Image Type Indicator (8-bit, 16-bit, Float, RGB32, RGBU64, HSL, Complex) 5 Pixel Intensity 6 Coordinates of the Mouse 7 Size of an Ac[...]
-
Page 34
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. During ru n time, set t he CWIMAQViewer.MenuIt [...]
-
Page 35
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. F or example, the follo wing code resizes a rectangle select[...]
-
Page 36
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. Use CWIMAQVision.Quantify to obtain the follo wing stat[...]
-
Page 37
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.IntegerToCo lorValue . Y ou c[...]
-
Page 38
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. Complete the f ollo wing step s to compare co lors using c olor [...]
-
Page 39
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 measure similarity, the image or regions in the image representing the object should contain only the significant colors that represent the object, as[...]
-
Page 40
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. A region is helpful for pul ling out the useful color information in an image. Figure 3-7 shows an[...]
-
Page 41
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. Figure 3-8. Using Multiple Regions to Learn [...]
-
Page 42
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. To set a particular color component, follow the[...]
-
Page 43
© 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. With this information, [...]
-
Page 44
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. Automatic thresholdi ng techniques offer m[...]
-
Page 45
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.RejectBorder to remove particles that touch the border of the image. Reject particles on the border of the image when you suspect that the information abou t those particles is incom[...]
-
Page 46
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. You can use the Open, Close, Proper Open, Proper Close, and auto-median operation s to smooth[...]
-
Page 47
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. cwimaqMeasurementBoun[...]
-
Page 48
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). cwimaqMeasurementEquiv alentE[...]
-
Page 49
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. cwimaqMeasurementHuMoment1 The f irst Hu moment. cwimaqMeasurementHuM[...]
-
Page 50
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. cwimaqMeasurementMaxHo rizSegmentLengthLeft X-coordinate of the leftmost pixel in the longest row of conti[...]
-
Page 51
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. c[...]
-
Page 52
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. cwimaqMeasurementSumXYY The sum of all X-coordinates times Y -coor[...]
-
Page 53
© 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. The most common inspection tasks are detecting the presence or absence of parts in an image an d measuring the dim ensions of parts to see if the[...]
-
Page 54
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. Locate Objects to Inspect In a typical machine vision applicati on, you extract measurements from regions of interest rather than th e enti[...]
-
Page 55
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. The measurement methods automatically move the R OIs to the corr ect position using the positio n of the measurement coordinate system with respect to the reference coordinate system[...]
-
Page 56
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 . If you use CWMachineVision.FindCoordTransformUs ingTwoRects , specify two rectangular R OIs, each containing one s eparate, straight boundary of the object, as sh own in Figur[...]
-
Page 57
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. 3. Choose the coordinate system axis direction. 4. Choose the results th at you want t[...]
-
Page 58
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. 2. Define a re ctangular search area in which [...]
-
Page 59
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 . Figure 5-4. Building a Coordinate T ransform[...]
-
Page 60
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. Defining Regions Interactively Follow these steps to interactively define an ROI: [...]
-
Page 61
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. You can pr ogrammatical ly define regions by providing basic parameters that describe the r[...]
-
Page 62
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.FindConcentricEdge . CWMachineVision.FindStraightEdge fi nds edges based on r[...]
-
Page 63
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. Specify the separation between the lines that the method s[...]
-
Page 64
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. These methods behave like CWIMAQVision.FindEdges2 , but the[...]
-
Page 65
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. Set the t olerances and p arameters to specify h ow t he algorithm operates at run time using CWI[...]
-
Page 66
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 . Figure 5-8. Fe ature Detail Positional Info[...]
-
Page 67
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. Figure 5-10. Background In formation T raining the Pattern Matching Algorithm After you create a good template im[...]
-
Page 68
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. For example, if the image has multiple instances of a p[...]
-
Page 69
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 Setting Matching Parameters and T olerances Every pattern matching algor ithm makes assumptions about th e images and pattern matching parameters used [...]
-
Page 70
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. The pattern matchin g algorithm ignores all [...]
-
Page 71
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. For ty pical alignment applicat i ons, such as finding a fiducial on a wafer, the most i[...]
-
Page 72
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.MatchColorPattern . 7. V erify the results using a rankin[...]
-
Page 73
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. This requirement could conflict with the “color information” requ[...]
-
Page 74
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. For example, if the image has multiple instanc[...]
-
Page 75
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. Increasing the [...]
-
Page 76
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. Use this strategy when the color in the template is a[...]
-
Page 77
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. The color pattern matching algorithm ignores all image regions where grayscale contrast values fall beneath a set m[...]
-
Page 78
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. Define a reference pa ttern in the form of [...]
-
Page 79
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. [...]
-
Page 80
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. Instrument Reader Measurements You can make measurements b[...]
-
Page 81
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. Go to Start » Programs»National Instrument s»Cla ssification Training to lau[...]
-
Page 82
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. This method can automatically det ermine t[...]
-
Page 83
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. IMA Q V ision supp[...]
-
Page 84
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. • DrawPicture —Overlays a picture ob ject onto the image. • [...]
-
Page 85
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. Use CWIMAQVision.WriteImageAndVisionIn fo [...]
-
Page 86
© 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. If the imaging setup is su ch[...]
-
Page 87
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. Defining a Calibration T emplate You can define a calibration tem plate by su pplying an image of a grid or providing a list [...]
-
Page 88
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. Use CWIMAQLearnCalibrationOptions.Calibr ationAxisInfo to define a coordinate system by it[...]
-
Page 89
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. The origin is placed at the point in the list with the lo west[...]
-
Page 90
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. For information about acqu iring images, ref[...]
-
Page 91
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. Use CWIMAQCalibrationGridOptions.GridDes criptor to specify the scaling facto[...]
-
Page 92
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 . A persp ectiv e projection calibration has an accurate transformation e v en in areas not co vered b y the calibration grid, as shown in Fi[...]
-
Page 93
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. 2. Check the ligh[...]
-
Page 94
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. Examples of methods that void calibration in formation include CWIMAQVision.Re[...]
-
Page 95
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. Use CWIMAQVision.WriteImageAndVisionInfo to save th[...]
-
Page 96
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.CorrectCalibratedImage . Note Correcting images is a time-intensive operation.[...]
-
Page 97
© 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.com/support include the following: – [...]
-
Page 98
© 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). alignment The process by [...]
-
Page 99
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. binary morphol ogy Fun[...]
-
Page 100
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 calcu lates di stances, angles, circular f its, and the center of mass based on posi tions giv en by edge detection, particle analysis, centroid, and[...]
-
Page 101
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. connecti vity-8 All adjacent pixe ls are considered neighbors. contrast A constant multiplication factor applied to the lu ma and chroma components of a color pixel in the color deco[...]
-
Page 102
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 . equalize function See histo gram equalization . erosion Reduces the size of an object [...]
-
Page 103
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. gray-lev el dilation Increases the brightness of pi xels in an image that are surrou[...]
-
Page 104
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 . HSL A color encoding scheme using hue, saturation, and luminance informat ion where each[...]
-
Page 105
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. image format Defines ho[...]
-
Page 106
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. intensity range Defines the ra[...]
-
Page 107
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. logarithmic functio n Inc[...]
-
Page 108
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 . machine vision An automated a pp[...]
-
Page 109
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. nonlinear Prewitt filter A h[...]
-
Page 110
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. P palette The gradation of colors used to displa[...]
-
Page 111
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. proper-opening A finite combination of successi ve opening and closing operations that you can use to remov e small particles and s[...]
-
Page 112
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. (2) A hardware-program mable rectangular portion of the acquisition window . R OI tools A col[...]
-
Page 113
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. spatial resolution The number of pix els in an image, in terms of th[...]
-
Page 114
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.[...]
-
Page 115
© 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 acquisition, 2-4 Acquisition Type combo box, 2-4 ActiveX objects, 1-5 adding shapes to ROIs, 3-5 analyzing images, 2-7, 2-8 Annulus tool, 3 -2 Application, 1-[...]
-
Page 116
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 matching algo rithms training, 5- 21 using contrast, 5-25 color scores, 5-24 color sensitivity, using to cont rol granularity in templa te images, 5- 23 [...]
-
Page 117
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-1 NI-IMAQ, xi E edge detection, 5-3 finding f eatures, 5-9 edge points, finding along multipl e search contours, 5-12 error map, learning, 6-8 evalua[...]
-
Page 118
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 increasing speed of the color p attern matching algorithm, 5-25 speed of the patter n matching algorithm, 5-18 instrument, A-1 instrument drivers, xi instr[...]
-
Page 119
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 of t he color pattern m atching algorithm, 5-23 Oval tool, 3-2 P Pan tool, 3-3 particle analysis, 4-1 performing, 4-1 particle measurements, 4-4 partic[...]
-
Page 120
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, 5-25 setting for pattern matchin g, 5-18 rotationally symm etric template, 5-20 S saving calibration inform ation, 6-10 scaling factors, specifying, 6[...]
-
Page 121
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, separating , 4-3 training characters, 5-29 color pattern matching algo rithms, 5-21 pattern matching algorit hm, 5-15 training and certificatio n (NI resour[...]