COLOR IMAGE THRESHOLDING
In most cases, color images are thresholded by setting threshold values on one
or several of the individual color channels (RGB or HSI). In cases requiring more
than one channel, the results are combined using a Boolean AND. In other words,
the yellow candies in Figure 3.67(a) could be selected by separately thresholding
the red channel for all of the features containing a high red intensity (the red, orange
and yellow objects), and the green channel for all features containing a high green
intensity (the green and yellow objects), and then combining the images to keep
only those pixels that were selected in both channels. Examples of such Boolean
combinations will be discussed in the next chapter.
Alternately, for a simple image such as this one, the yellow features could be
thresholded by setting levels on the hue channel to distinguish the yellow objects
from all of the others. That would not work, however, for the brown candies since
they have the same hue as the orange ones. Combining that selection with limits on
the saturation (brown is less saturated than orange) and/or intensity (brown is darker
than orange) would require thresholding the H, S, and I channels separately and
performing a Boolean AND to keep just the pixels in the brown features. The
procedure would be significantly complicated by the bright reflections from the
surface of each candy.
Thresholding color images requires that the user understand the various color
spaces in which the image can be represented, as discussed in the preceding chapter,
and what distinguishing color characteristics of the features of interest have. The
individual RGB or HSI channel histograms are not much help because they contain
no information about the combination of color values for the various pixels. Color
space is three dimensional, and so some kind of three-dimensional histogram pre-
sentation is very useful. One way to do this is shown in Figure 3.67. The HSI space
is modeled in this illustration as a cylinder. The circular cross-section of that cylinder
is the Hue-Saturation wheel, in which hue is the angle and saturation is the radius.
The fraction of pixels in the image with each combination of hue and saturation is
shown as the intensity of the corresponding point on the circle. The axis of the
cylinder is the intensity scale, with a conventional histogram display.
Clusters of points in the hue-saturation plane typically indicate the presence of
specific colors in the image. Marking a region in this plane, and setting limits on
the intensity histogram, selects the ranges of values for the threshold. The require-
ment that the pixel values must meet all three requirements (the Boolean AND) is
automatic and produces an interactive display on the image. In the example in the
figure, the cluster of points between cyan and blue, with a range of saturations
(representing the reflections from the shiny candy surfaces) correspond to the blue
candies. The thresholded image shows the selection.
Using a three-dimensional color space threshold is not only useful as a tool, it
is also a good way to learn about color representations and to educate the eye to
recognize the components that distinguish colored features. The display contains
other information as well. Note that the various colors are represented in the hue-
saturation wheel by spots that are generally elongated in the radial (saturation)
direction. This corresponds to the variation in color that results from the shiny reflections
2241_C03.fm Page 205 Thursday, April 28, 2005 10:28 AM
Copyright © 2005 CRC Press LLC