Colors in digital images are typically specified using red, green, and blue (RGB) triples for each pixel. These primary colors are capable of producing every color in the visual spectrum, to an accuracy defined by the color depth - in this case, eight bits-per-pixel. A series of training color swatches were extracted from images of Doc, producing the regions shown in Figure 3 which are representative of the colors corresponding to his hat, suit, shoes, and skin. In processing these swatches it was found that their RGB ranges did not adequately capture the essence of the difference between each distinct section of Doc.
The hue-saturation-value (HSV) space is an alternate representation of colors in images. It is frequently used in situations where segmentation is to be performed based primarily on hue. The HSV cylindrical space shown in Figure 4 is a representation for a pixel's color. In it, the hue angle is determined by the pixel's pure color from the visual spectrum, the saturation is a measure of the whiteness of the color, ranging from 0 (grays), to 0.5 (pastels), and to 1.0 (pure colors), and the value is a measure of the brightness of the pixel.