Chapter 5
Performing Machine Vision Tasks
IMAQ Vision for LabWindows/CVI User Manual
5-20
ni.com
5.
Set the tolerances and parameters to specify how the algorithm
operates at run time using the
options
parameter of
imaqMatchColorPattern()
.
6.
Test the search algorithm on test images using
imaqMatchColorPattern()
.
7.
Verify the results using a ranking method.
Defining and Creating Good Color Template Images
The selection of a good 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. Refer to the
section of this chapter for more
information about some of these factors.
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 a template that is rotationally asymmetric.
Feature Detail
A template with relatively coarse features is less sensitive to variations in
size and rotation than a template with fine features. However, the template
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.