In order for color sets to provide a useful characterization of region color, several objectives must be met. Firstly, each color in the binary color space
must be visually distinguishable from the others. Secondly, the binary color space
must satisfactorily include all distinguishable colors. The condition is usually application specific. For example, medical and satellite images have quite different sets of distinguishable colors. The transformation T and quantization
are designed to produce a representation that meets these objectives.
The first design parameter is the transformation T by which the new color space is reached from the RGB space. The RGB space has the major deficiency of not being perceptually uniform. Other color spaces such as CIE-LAB, CIE-LUV and Munsell offer improved perceptual uniformity [WS82]. In general they represent with equal emphasis the three color variants that characterize color: hue, lightness and saturation. This separation is attractive because color image processing performed independently on the color channels does not introduce false colors (hues) [Rus95]. Furthermore, it is easier to compensate for artifacts and color distortions. For example, lighting and shading artifacts are typically isolated to the lightness channel. However, these color spaces are often inconvenient due to the necessary non-linearity in forward and reverse transformations with RGB space. We utilize a tractable form of the hue, lightness and saturation transform from RGB to HSV that has the above mentioned characteristics and is non-linear but easily invertible. The transformation T from RGB to HSV is accomplished through the following equations [Hun89]: let the color triple (r,g,b) define a color in RGB space and let (h,s,v) be the transformed triple in HSV color space. For
then T gives
and
by
The next design parameter is the quantization
of the color space. The HSV color space is cylindrical, as illustrated in Figure 5. The long axis represents value: blackness to whiteness. Distance from the axis represents saturation: amount of color present. The angle around the axis is the hue: tint or tone. Since hue represents the most significant characteristic of the color, it requires the most fine quantization. In the hue circle the primaries red, green and blue are separated by 120 degrees. A circular quantization at 20 degree steps sufficiently separates the hues such that the three primaries and yellow, magenta and cyan are represented each with three sub-divisions. Saturation and value are each quantized to three levels yielding greater perceptual tolerance along these dimensions.
Figure 5: Transformation T from RGB to HSV and quantization gives 18 hues, 3 saturations, 3 values and 4 grays = 166 colors.