Chapter 3
Making Grayscale and Color Measurements
©
National Instruments Corporation
3-13
IMAQ Vision for LabWindows/CVI User Manual
Ignoring Learned Colors
Ignore certain color components in color matching by replacing the
corresponding component in the input color spectrum array to –1. For
example, by replacing the last component in the color spectrum with –1,
the white color is ignored during the color matching process. By replacing
the second to last component in the color spectrum, the black color is
ignored during the color matching process.
To ignore other color components in color matching, determine the index
to the color spectrum by locating the corresponding bins in the color wheel,
where each bin corresponds to a component in the color spectrum array.
Ignoring certain colors such as the background color results in a more
accurate color matching score. Ignoring the background color also provides
more flexibility when defining the regions of interest in the color matching
process. Ignoring other, non-background colors, such as the white color
created by glare on a metallic surface, also improves the accuracy of the
color matching. Experiment learning the color information about different
parts of the images to determine which colors to ignore. Refer to
Chapter 14,
Color Inspection
, of the
IMAQ Vision Concepts Manual
for more information about the color wheel and color bins.