National Instruments IMAQTM 用户手册

下载
页码 121
Chapter 5
Performing Machine Vision Tasks
© National Instruments Corporation
5-17
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.