The rg chromaticity space, two dimensions of the ''normalized RGB'', or rgb, space,
is a
chromaticity space
Chromaticity is an objective specification of the quality of a color regardless of its luminance. Chromaticity consists of two independent parameters, often specified as hue (h) and colorfulness (s), where the latter is alternatively called ...
, a two-dimensional
color space
A color space is a specific organization of colors. In combination with color profiling supported by various physical devices, it supports reproducible representations of colorwhether such representation entails an analog or a digital represen ...
in which there is no intensity information.
In the
RGB color space
An RGB color space is any additive color space based on the RGB color model. An RGB color space is defined by chromaticity coordinates of the red, green, and blue additive primaries, the white point which is usually a standard illuminant, an ...
a pixel is identified by the intensity of red, green, and blue
primary color
A set of primary colors or primary colours (see spelling differences) consists of colorants or colored lights that can be mixed in varying amounts to produce a gamut of colors. This is the essential method used to create the perception of a ...
s. 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 normalized rgb space or rg space, a color is 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.
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
where
imply the proportion of red, green and blue in the original color:
The sum of rgb will always equal one, because of this property the b dimension can be thrown away without causing any loss in information. The reverse conversion is not possible with only two dimensions, as the intensity information is lost during the conversion to rg chromaticity, e.g. (1/3, 1/3, 1/3) has equal proportions of each color, but it is not possible to determine whether this corresponds to black, gray, or white. If R, G, B, is normalized to r, g, G color space the conversion can be computed by the following:
The conversion from rgG to RGB, is the same as the conversion from xyY to XYZ. The conversion requires at least some information relative to the intensity of the scene. For this reason if the G is preserved then the inverse is possible.
Pixel-based photometric invariance
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.
Computer vision algorithms tend to suffer from varying imaging conditions. To make more robust computer vision algorithms it is important to use a color invariant color space. Color invariant color spaces are desensitized to disturbances in the image. One common problem in computer vision is varying light source (color and intensity) between multiple images and within a single image. To properly perform image segmentation and
object detection
Object detection is a computer technology related to computer vision and image processing that deals with detecting instances of semantic objects of a certain class (such as humans, buildings, or cars) in digital images and videos. Well-researched ...
requires an increased need for images that are stable to variations in imaging conditions. Normalizing RGB color space to rgb color system performs a linear transform. Normalized rgb space eliminates the effect of varying intensities from the light source. Uniform surfaces of color with varying geometric features are affected by the angle and intensity of the light source. Where a uniform red surface with a uniform green object placed on top, should easily be segmented. Due to the shape of the 3D object shades are formed preventing uniform fields of color. Normalizing intensity out removes the shadow. A lambertian reflector under a white illumination is defined by the equation below:
When the r,g,b normalized equations are substituted into the equation above the equations below are derived, which define the invariant properties of the rgb color system.
Where
and
. The
coefficient which denotes the relationship between the white light source and the surface reflectance. This coefficient is cancelled out, assuming a lambertian reflection and white illumination the rgb color space only depends on
. The normalized image is free from shadow and shading effects. The rgb color space is dependent on the color of the light source. The color space is only dependent on
which is made up of
and
,
and
are determined by the sensor and surface of object.
Illustration
rg color space
r, g, and b chromaticity coordinates are ratios of the one tristimulus value over the sum of all three tristimulus values. A neutral object infers equal values of red, green and blue stimulus. The lack of luminance information in rg prevents having more than 1 neutral point where all three coordinates are of equal value. The white point of the rg chromaticity diagram is defined by the point (1/3,1/3). The white point has one third red, one third green and the final third blue. On an rg chromaticity diagram the first quadrant where all values of r and g are positive forms a right triangle. With max r equals 1 unit along the x and max g equals 1 unit along the y axis. Connecting a line from the max r (1,0) to max g (0,1) from a straight line with slope of negative 1. Any sample that falls on this line has no blue. Moving along the line from max r to max g, shows a decrease in red and an increase of green in the sample, without blue changing. The further a sample moves from this line the more blue is present in the sample trying to be matched.
RGB color specification system
RGB
The RGB color model is an additive color model in which the red, green and blue primary colors of light are added together in various ways to reproduce a broad array of colors. The name of the model comes from the initials of the three addi ...
is a color mixture system. Once the color matching function are determined the tristimulus values can be determined easily. Since standardization is required to compare results, CIE established standards to determine color matching function.
- The reference stimuli must be monochromatic lights R, G, B. With wavelengths respectively.
- The basic stimulus is white with equal energy spectrum. Require a ratio of 1.000:4.5907:0.0601 (RGB) to match white point.
Therefore, a white with equi-energy lights of 1.000 + 4.5907 + 0.0601 = 5.6508 lm can be matched by mixing together R, G and B. Guild and Wright used 17 subjects to determine RGB color matching functions.
[
] RGB color matching serve as the base for rg chromaticity. The RGB color matching functions are used to determine the tristimulus RGB values for a spectrum. Normalizing the RGB tristimulus values converts the tristimulus into rgb. Normalized RGB tristimulus value can be plotted on an rg chromaticity diagram.
An example of color matching function below.