Next: Color Predicate Training
Up: Application Overview
Previous: Application Overview
The color segmentation scheme is based on Color
Predicates. Color Predicates are essentially 2-D histograms in the HSV color
space. By disregarding the luminance term in the HSV space, hue and
saturation provide indices into this 2-D space. Using an NxN matrix as a
color predicate data structure, each hue and saturation indexes one location
in the matrix. In other words, there are N rows of hues and N columns of
saturation, each location in the matrix describes one color (or a particular
hue at a particular saturation). By incrementing locations in the matrix where
a desired segmentation color is located, and decrementing locations in the
matrix where background colors are located, a color predicate is defined.
Any color locations in the matrix with values greater than a threshold value
(always 0 in my case), are to be left in an image. Any color values below
that threshold are replaced with black pixels. See Figure 1 for a contour
map of a trained color predicate.
Figure 1:
Trained Color Predicate
![\begin{figure}
\begin{minipage}[t]
{85.0truemm}
\begin{minipage}[t]
{41.25truemm...
... {file=map3d.ps,width=41.25truemm}
\end {minipage}
\end{minipage}\end{figure}](img1.gif) |
The application described above uses these color predicates to segment the
images from file or video are as follows: Start with a RGB image (most images
end up in this format at one time or another), first convert the image to
HSV. For every pixel in the HSV image, use the hue and saturation as indexes
into the color predicate matrix. If the value at those indices is greater
than zero, either convert the pixel in the original image to true (for a
binary image) or leave the pixel values the same (for a color image).
If the value in the matrix at the indices is less than or equal to zero,
set the image to black (0 for binary).
Next: Color Predicate Training
Up: Application Overview
Previous: Application Overview
Greg Berry
9/15/1997