National Instruments IMAQTM User Manual

Page 72

Advertising
background image

Chapter 5

Performing Machine Vision Tasks

IMAQ Vision for Visual Basic User Manual

5-20

ni.com

5.

Set the tolerances and parameters to specify how the algorithm
operates at run time using

CWIMAQMatchColorPatternOptions

.

6.

Test the search algorithm on test images using

CWIMAQVision.MatchColorPattern

.

7.

Verify the results using a ranking method.

Defining and Creating Effective Color Template
Images

The selection of a effective template image plays a critical part in obtaining
accurate results with the color pattern matching algorithm. Because the
template image represents the color and the pattern that you want to find,
make sure that all the important and unique characteristics of the pattern are
well defined in the image.

Several factors are critical in creating a template image. These critical
factors include color information, symmetry, feature detail, positional
information, and background information.

Color Information

A template with colors that are unique to the pattern provides better results
than a template that contains many colors, especially colors found in the
background or other objects in the image.

Symmetry

A rotationally symmetric template in the luminance plane is less sensitive
to changes in rotation than one that is rotationally asymmetric.

Feature Detail

A template with relatively coarse features is less sensitive to variations in
size and rotation than a model with fine features. However, the model must
contain enough detail to identify it.

Positional Information

A template with strong edges in both the x and y directions is easier to
locate.

Advertising