Using multiple regions in the image – National Instruments IMAQ Vision for Measurement Studio User Manual

Page 37

Advertising
background image

Chapter 3

Grayscale and Color Measurements

© National Instruments Corporation

3-11

IMAQ Vision for LabWindows/CVI User Manual

Figure 3-7. Using a Single Region to Learn Color Distribution

Using Multiple Regions in the Image

The interaction of light with an object’s surface creates the observed
color of that object. The color of a surface depends on the directions of
illumination and the direction from which the surface is observed. Two
identical objects may have different appearances because of a difference in
positioning or a change in the lighting conditions. Figure 3-8 shows how
light reflects differently off of the 3D surfaces of the fuses, resulting in
slightly different colors for identical fuses. (Compare the 3 amp fuse in the
upper row with the 3 amp fuse in the lower row.) This results in different
color spectra for identical fuses.

If you learn the color spectrum by drawing a region of interest around the
3 amp fuse in the upper row, and then do a color matching for the 3 amp
fuse in the upper row, you get a very high match score for it (close to 1000).
But the match score for the 3 amp fuse in the lower row is quite low (around
500). This problem could cause a mismatch for the color matching in a fuse
box inspection process.

IMAQ Vision’s color learning software uses a clustering process to find
the representative colors from the color information specified by one or
multiple regions in the image. To create a representative color spectrum for
all 3 amp fuses in the learning phase, draw an ROI around the 3 amp fuse
in the upper row, hold down <Shift>, and draw another ROI around the 3
amp fuse in the lower row. The new color spectrum results in similar, high
match scores (around 800) for both 3 amp fuses. Use as many samples as
you want in an image to learn the representative color spectrum for a
specified template.

Advertising