Setting matching parameters and tolerances, Setting matching parameters and tolerances -17, Gure 5-11 – National Instruments IMAQTM User Manual

Page 69: 11a sh, Figure 5-11b, Re 5-11c and figure 5-11d, Match mode

Advertising
background image

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 images
and pattern matching parameters used in machine vision applications.
These assumptions work for a high percentage of the applications.
However, there may be applications in which the assumptions used in the
algorithm are not optimal. To efficiently select the best pattern matching
parameters for the application, you must have a clear understanding of the
application and the images you want to process. The following sections
discuss parameters that influence the IMAQ Vision pattern matching
algorithm.

Match Mode

You can set the match mode to control how the pattern matching algorithm
handles the template at different orientations. If you expect the orientation
of valid matches to vary less than ±5

° from the template, set

CWIMAQMatchPatternOptions.MatchMode

to

cwimaqMatchShiftInvariant

. Otherwise, set the mode element

to

cwimaqMatchRotationInvariant

.

Note

Shift-invariant matching is faster than rotation-invariant matching.

d.

c.

b.

a.

Advertising