Rg-chromaticity

From Wikipedia, the free encyclopedia

The rg-chromaticity space is a two-dimensional color space in which there is no color intensity information. In the RGB color space a pixel is identified by the intensity of red, green and blue values. Therefore a bright red can be represented as (r,g,b) (255,0,0), while a dark red may be (40,0,0).

In the rg-chromaticity space, a color is instead represented by the proportion of red, green and blue in the color, rather than by the intensity of each. Since these proportions must always add up to a total of 1, we are able to quote just the red and green proportions of the color, and can calculate the blue value if necessary.

Although rg-chromaticity contains less information than RGB or HSV color spaces, it has a number of useful properties for computer vision applications. Notably, where a scene viewed by a camera is not lit evenly - for example if lit by a spotlight - then an object of a given color will change in apparent color as it moves across the scene. Where color is being used to track an object in an RGB image, this can cause problems. The lack of intensity information in rg-chromaticity images removes this problem, and the apparent color remains constant. Note that in the case where different parts of the image are lit by different colored light sources, problems can still emerge.

[edit] Conversion between RGB and rg-chromaticity

Given a color (R,G,B) where R, G, B = intensity of Red, Green and Blue, this can be converted to color (r,g) where r,g imply the proportion of red and green in the original color:

r = \frac{R}{R+G+B}
g = \frac{G}{R+G+B}

The reverse conversion is not possible, as the intensity information is lost during the conversion to rg-chromaticity, e.g. (1/3, 1/3) has equal proportions of each colour, but it is not possible to determine whether this corresponds to black, grey, or white.