Previous Table of Contents Next


Y'CbCr Model

The digital video industry uses the Y'CbCr model since it preserves image luminosities and facilitates chroma subsampling (which reduces transmission bandwidth via a color averaging technique) which is not particularly noticeable in most instances. This conserves transmission capacity by minimizing the information necessary for acceptable reception. As the TIFF Revision 6.0 specification indicates, literature and the multimedia industry often incorrectly refer to Y'CbCr, and the U.S. analog television industry’s YIQ system, as YUV—be warned.

The Y'CbCr model uses three components—the luma (Y') and two color components Cb and Cr. This model is related to the RGB model by the following linear relationships (CCIR Recommendation Standard 601-1 version titled Encoding Parameters of Digital Television for Studios):

Y' = 0.299*R' + 0.587*G' + 0.114*B'
Cb = 128 + 112*(0.5*(B' – Y')/(1 – 0.114))
Cr = 128 + 112*(0.5*(R' – Y')/(1 – 0.299))

where R', G', and B' are respective gamma corrected values for source R, G, and B values. The corresponding inverse relationship is this:

R' = Cr*(2 – 2*0.299) + Y'
B' = Cb*(2 – 2*0.114) + Y'
G' = (Y' – 0.114*B' – 0.299*R') / 0.587

Television transmissions devote most capacity to faithful luma preservation. If a receiver is a color television, it also presents the color information which is otherwise ignored. Thus, the luma formula illustrates one good way to reduce color images to black and white images—by replacing each color sample by its luma value. Note that look-up tables can replace the numerous multiplications and divisions.

HSV/HSB Model

In 1978, Alvy Ray Smith of the New York Institute of Technology’s Computer Graphics Lab adapted the HSV color perception model to computing. The acronym letters stand for hue, saturation, and value (intensity). Literature sometimes refers to this model as the HSB model where B stands for brightness (intensity). See Figure 13-3.

To understand the HSV model, first consider the RGB cube. If you position yourself to look directly at the white point along the achromatic diagonal with one eye, the three visible cube surfaces appear as a colored hexagon because you have no depth perception with one eye. Because the RGB contains an infinite number of subcubes, each containing the origin (0.0, 0.0, 0.0), similarly viewing these various subcubes produces different, various sized hexagons possessing unique tints, shades, and tones. The hexagons are actually geometric projections of cube shapes onto the plane perpendicular to the achromatic diagonal.


Figure 13-3  The HSV hexacone

Remembering the RGB model proportional coordinate discussion, it is clear that any given point on any one hexagon is uniquely related to a single point on any other hexagon. Any two such related points lie on the same line that passes through the points and the RGB cube origin. Hence, any two such related points only differ in their intensity (same proportional primary light mix but with different intensity values). Therefore, we only need to consider one hexagon to select individual proportional primary mixtures, and a luminosity to identify what specific tint, shade, or tone the point represents.

If you could stack all possible hexagons on top of each other with their centers and edges correctly aligned, the result is a three-dimensional, single hexagon solid, or hexacone, that collectively contains all red, green, and blue combinations within its distorted RGB space. The hexacone point corresponds to the RGB model’s (0.0, 0.0, 0.0) black point.

Referencing Figure 13-3, the HSV model involves distances as well as angles. The relative angle identifies the unsaturated hue with red conventionally defined at zero degrees. The relative distance from the white center point towards the hexagon edge, where the saturated hues are located, identifies the saturation value. Zero distance means achromatic with zero saturation and undefined hue. Maximum distance to the hexagon edge gives V a 1.0 value. Note this linear distance varies since it involves a hexagon rather than a circle. Finally, note the maximum value of the RGB values provide the subcube edge size which uniquely determines V’s value and that saturated hue complements are located directly opposite (180 degrees away) from a given hue.

The HSV model is useful because it decomposes RGB triad values into processes more closely related to human perception that uncouple intensity from hue and saturation color information. However, its simplistic approach provides differing intensities for a given V value. These luminosities are readily evident when running the VESAPCX.C program which contains the RGB/HSV conversion routines listed at the chapter’s end. PRINTPCX.C uses these routines extensively to produce its effects. Finally, note RgbToHsv() leaves hue angles expressed in degrees rather than normalized values.


Previous Table of Contents Next