beautypg.com

Color sensitivity, Search strategy – National Instruments IMAQ Vision for Measurement Studio User Manual

Page 69

background image

Chapter 5

Machine Vision

© National Instruments Corporation

5-23

IMAQ Vision for LabWindows/CVI User Manual

The following are some elements in the IMAQ Vision pattern matching
algorithm and how they influence pattern matching: color sensitivity,
search strategy, color score weight, ignore background colors, minimum
contrast, and rotation angle ranges.

Color Sensitivity

Use the

sensitivity

element to control the granularity of the color

information in the template image. If the background and objects in the
image contain colors that are very close to colors in the template image, use
a higher color sensitivity setting. A higher sensitivity setting distinguishes
colors with very close hue values. Three color sensitivity settings are
available in IMAQ Vision:

IMAQ_SENSITIVITY_LOW

,

IMAQ_SENSITIVITY_MED

, and

IMAQ_SENSITIVITY_HIGH

. Use the

default Low setting if the colors in the template are very different from the
colors in the background or other objects that you are not interested in.
Increase the color sensitivity settings as the color differences decrease. For
more information on color sensitivity, see Chapter 14, Color Inspection, of
the IMAQ Vision Concepts Manual.

Search Strategy

Use the

strategy

element to optimize the speed of the color pattern

matching algorithm. The search strategy controls the step size,
sub-sampling factor, percentage of color information used from the
template.

Choose from four different strategies:

IMAQ_VERY_AGGRESSIVE

—Uses the largest step size, the most

sub-sampling and only the dominant color from the template to search
for the template. Use this strategy when the color in the template is
almost uniform, the template is well contrasted from the background
and there is a good amount of separation between different occurrences
of the template in the image. This strategy is the fastest way to find
templates in an image.

IMAQ_AGGRESSIVE

—Uses a large step size, a lot of sub-sampling,

and little of the color information from the template.

IMAQ_BALANCED

—Uses values in between the

IMAQ_AGGRESSIVE

and

IMAQ_CONSERVATIVE

strategies.

IMAQ_CONSERVATIVE

—Uses a very small step size, a sub-sampling

factor of two, and all the color information present in the template.
This strategy is the most reliable method to look for a template in any
image at potentially reduced speed.