• No results found

Color Space

In document Image and Video Processing (Page 162-165)

Color Processing

4.2 Color Space

In an optical color camera, we have three sensors, each operating at different zones of the optical wavelengths, namely, with small wavelengths (blue zone), mid wavelength range (green zone), and large wavelengths (red zone). Let r(λ), g(λ), and b(λ) be relative spectral responses of sensors corresponding to red, green, and blue zones of the optical spectrum. We also consider E(λ) to be the SPD of the light source whose rays are reflected from an object surface point X and projected on x in the image plane. Let ρ(λ) represent the surface reflectance spectrum at X. In a simplified model, we compute the output of an individual sensor by accumulating spectral responses over the range of wavelength λ on which it is active. Assuming all the reflecting bodies as ideal 2-D flat Lambertian surfaces, the brightness values R, G, and B for respective sensors at an image coordinate x are expressed in the following form:

R = R

λE(λ)ρ(λ)r(λ)dλ,

G = R

λE(λ)ρ(λ)g(λ)dλ,

B = R

λE(λ)ρ(λ)b(λ)dλ.

(4.1)

4.2.1 RGB Color Space

In Eq. (4.1), the color of the pixel at x in the image plane is represented by the vector (R, G, B), whose each field denotes the amount of red, green, and blue to be mixed for producing the color according to our perception. The display devices also work on the same principle of mixing these three primary colors in the same proportion. The color space representing a color in this way is called the RGB color space. It may be noted that not all colors are reproducible by adding three primary colors. Some of them require subtraction of a primary color from the mixture of the other two. The major problem of representing a color in the RGB space is that it does not provide the perceptual factors of color representation, in particular, hue and saturation. That is why different other color spaces are proposed and used in various applications of color processing.

4.2.2 CIE XYZ Color Space

The International Commission on Illumination, better known as CIE (Com-mission Internationale d’Eclairage), is the primary organization that drives the standardization of color metrics and terminologies. In 1931, CIE defined its first colorimetry standard by providing two different but equivalent sets of CMFs. The first set of CMFs is called the CIE red–green–blue (RGB) CMFs, which are based on monochromatic primaries at wavelengths of 700 nm, 546.1 nm, and 435.8 nm, respectively [29]. The second set of CMFs, known as the

CIE XYZ CMFs, are defined in terms of a linear transformation of the CIE RGB CMFs [71]. The choice of this transformation was made in such a way that the CMF of the Y component represents the luminous efficiency func-tion [159]. The other considerafunc-tion was to yield equal tristimulus values for the equienergy spectrum through normalization of the three CMFs. Moreover, the transformation takes care of the fact that all the CMFs become nonnega-tive. This makes the CIE primaries physically nonrealizable. The Y tristimulus value is usually called the luminance and correlates with the perceived bright-ness of the radiant spectrum. The linear transformation from RGB to XYZ color space is given below.

Though a color is represented in a 3-D space, its chromatic information are represented in a 2-D space. One simple way to achieve this representation is to normalize the vector by its brightness value or the sum of the stimuli.

This makes one of the coordinates redundant. It is obtained from the other two, as the three chromaticity coordinates sum up to unity. Hence, colors are represented using only two chromaticity coordinates. The plot of these points in the normalized 2-D space is known as the chromaticity diagram.

The most commonly used chromaticity diagram is the CIE xy chromaticity diagram. The CIE xyz chromaticity coordinates are obtained from the X,Y, and Z tristimulus values in CIE XYZ space as given below:

x = X

InFigure 4.1, the plot of the curve corresponding to the visible monochro-matic spectra on the CIE xy chromonochro-maticity diagram is shown. This shark-fin-shaped curve, along which the wavelength (in nm) is indicated, is called the spectrum locus. In the figure, a few typical points corresponding to optical wavelengths are also marked. All the physically realizable colors lie in the region inside the closed curve formed by the spectrum locus, and the line joining its two extremes of 360 nm and 830 nm is known as the purple line.

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9

Figure 4.1: CIE chromaticity diagram

However, given the chormaticity coordinates of the three primary colors, the reproducible colors from their additive mixture lie within the convex hull or the triangle formed by them. This triangle is referred to as the gamut triangle (as shown in the figure), and the set of reproducible colors within it is called the color gamut. The coordinate point (0.33, 0.33) is the achromatic point in the chromaticity chart. This point is known as the reference white point (marked as ‘W’ in the figure).

4.2.4 YCbCr Color Space

It was already discussed in Chapter 1 (see Section 1.4.1) that the color space used in the JPEG compression is the YCbCr color space. The transformation from the RGB color space is shown below:

In this space, Y represents the luminance component, while Cb and Cr rep-resent the chromatic parts. The above transformation is not linear. However,

if Cb and Cr are translated by −128, it becomes linear. In that case, the corresponding color space is also known as YUV color space.

In document Image and Video Processing (Page 162-165)