Training The Color Pattern Matching Algorithm - National Instruments IMAQ Vision for Measurement Studio User Manual

For measurement studio
Table of Contents

Advertisement

Chapter 5
Machine Vision
IMAQ Vision for LabWindows/CVI User Manual
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.
Background Information
Unique background information in a template improves search
performance and accuracy during the grayscale pattern matching phase.
This requirement could conflict with the "color information" requirement
because background colors may not be desirable during the color location
phase. Avoid this problem by choosing a template with sufficient
background information for grayscale pattern matching while specifying
the exclusion of the background color during the color location phase.
Refer to the Training the Color Pattern Matching Algorithm section for
more information about how to ignore colors.

Training the Color Pattern Matching Algorithm

After you have created a good template image, the color pattern
matching algorithm learns the important features of the template. Use
imaqLearnColorPattern()
depends on the type of matching that you expect to perform. By default,
the color pattern matching algorithm learns only those features from the
template that are necessary for shift-invariant matching. However, if you
want to match the template at any orientation, the learning process must
consider the possibility of arbitrary orientations. Use the
element of the
imaqLearnColorPattern()
specify which type of learning mode to use.
Exclude colors in the template that you are not interested in using during
the search phase. Typically you should ignore colors that either belong to
the background of the object or are not unique to the template, reducing the
potential for incorrect matches during the color location phase. You can
ignore certain predefined colors using the
options parameter. To ignore other colors, first learn the colors to ignore
using
imaqLearnColor()
options parameter to the resulting
imaqLearnColor()
to learn the template.The learning process
ignoreMode
. Then set the
colorsToIgnore
ColorInformation
.
5-20
learnMode
options parameter to
element of the
element of the
structure from
ni.com

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the IMAQ Vision for Measurement Studio and is the answer not in the manual?

This manual is also suitable for:

Imaq vision

Table of Contents