Setting matching parameters and tolerances, Setting matching parameters and tolerances -16 – National Instruments IMAQ Vision for Measurement Studio User Manual

Page 62

Advertising
background image

Chapter 5

Machine Vision

IMAQ Vision for LabWindows/CVI User Manual

5-16

ni.com

incorrect results. To avoid this, reduce the search area so that only the
desired pattern lies within the search area.

The time required to locate a pattern in an image depends on both the
template size and the search area. By reducing the search area or increasing
the template size, you can reduce the required search time.

In many inspection applications, you have general information about the
location of the fiducial. You should use this information to define a search
area. For example, in a typical component placement application, each
printed circuit board (PCB) being tested may not be placed in the same
location with the same orientation. The location of the PCB in various
images can move and rotate within a known range of values, as illustrated
in Figure 5-11. Figure 5-11a shows the template used to locate the PCB in
the image. Figure 5-11b shows an image containing a PCB with a fiducial
you want to locate. Notice the search area around the fiducial. If you know
before the matching process begins that the PCB can shift or rotate in the
image within a fixed range (as shown in Figure 5-11c and Figure 5-11d,
respectively), then you can limit the search for the fiducial to a small region
of the image.

Figure 5-11. Selecting a Search Area for Grayscale Pattern Matching

Setting Matching Parameters and Tolerances

Every pattern matching algorithm makes assumptions about the images
and pattern matching parameters used in machine vision applications.
These assumptions work for a high percentage of the applications.

d.

c.

b.

a.

Advertising