eLynx SDK
v3.3.0 C++ image processing API reference |
To describe a color, different models exists, they are called color spaces. The two main kinds of color space are RGB-based and CIE color spaces.
For more details on color spaces visit Theory of color, Color management, and Bruce Lindbloom pages.
The RGB space is a three-dimensional color space whose components are the red, green, and blue intensities that make up a given color. For example, scanners read the amounts of red, green, and blue light that are reflected from or transmitted through an image and then convert those amounts into digital values. Information displayed on a color monitor begins with digital values that are converted to analog or digital signals for display on the monitor. The signals are transmitted to the elements on the face of the monitor, causing them to glow at various intensities of red, green, and blue (the combination of which makes up the required hue, saturation, and brightness of the desired colors).
RGB-based color spaces are the most commonly used color spaces in computer graphics, primarily because they are directly supported by most color displays and scanners. RGB color spaces are device dependent and additive. The groups of color spaces within the RGB base family include RGB, HLS, ans HSI spaces.
Any color expressed in RGB space is some mixture of three primary colors: red, green, and blue. Most RGB-based color spaces can be visualized as a cube, with corners of black, the three primaries (red, green, and blue), the three secondaries (cyan, magenta, and yellow), and white. Most video monitors use red, green, and blue color sources as the primary colors for color image generation. RGB coordinates are commonly used for specifying and coding computer generated images.
The sRGB color space is based on the ITU-R BT.709 standard. It specifies a gamma of 2.2 and a white point of 6500 degrees K. You can read more about sRGB space at the International Color Consortium site. This space gives a complementary solution to the current strategies of color management systems, by offering an alternate, device-independent color definition that is easier to handle for device manufacturers and the consumer market. sRGB color space can be used if no other RGB profile is specified or available.
HLS and HSI spaces are transformation of RGB space that can describe colors in terms more natural to an artist. The name HLS stands for hue, lightness, and saturation. HSI stands for hue, saturation, intensity. HSV, HSB are synonymous with HSI where V stands for value. The two spaces can be thought of as being single and double cones. The components in HLS space are analogous, but not completely identical, to the components in HSI space:
CIE stands for Commission International de l'Eclairage. It defined device-independent spaces. The CIE space of visible color is expressed in several common forms: CIE xyz (1931), CIE L*a*b*, and CIE L u'v' (1976). Each contains the same colors, however they differ in how they distribute color onto a two-dimensional space.
CIE xyz is based on a direct graph of the original X, Y and Z tristimulus functions created in 1931. The problem with this representation is that it allocates too much area to the greens.
CIE L u'v' was created to correct for this distortion by distributing colors roughly proportional to their perceived color difference.
CIE L*a*b* transforms the CIE colors so that they extend equally on two axes conveniently filling a square. Furthermore, each axis in L*a*b* color space represents an easily recognizable property of color, such as the red-green and blue-yellow shifts.