Setting matching parameters and tolerances, Setting matching parameters and tolerances -17, Gure 5-11 – National Instruments IMAQ Vision for LabWindows TM /CVI User Manual

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

Advertising
background image

Chapter 5

Performing Machine Vision Tasks

© National Instruments Corporation

5-17

IMAQ Vision for LabWindows/CVI 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. Knowing your particular application and the
images you want to process is useful in selecting the pattern matching
parameters. Use the

imaqMatchPattern2()

function to set the following

elements that influence the IMAQ Vision pattern matching algorithm:
match mode, minimum contrast, and rotation angle ranges.

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 the

mode

element of the options parameter to

IMAQ_MATCH_SHIFT_INVARIANT

.

Otherwise, set the mode element to

IMAQ_MATCH_ROTATION_INVARIANT

.

Note

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

a.

d.

b.

c.

Advertising