Fundamental Concepts of Color
Fundamental Concepts of Color
(Unit: II)
Semester: I
Paper Code: GIS 04
Name of Paper: Digital Image Processing
PG Diploma in RS & GIS
Dr. SHYAMA PRASAD MUKHERJEE UNIVERSITY, RANCHI
CONCEPTS OF COLOR
1. Introduction:
The field of digital image processing relies on mathematical and probabilistic
formulations accompanied by human intuition and analysis based on visual and subjective
judgements. As such, among the various elements of image interpretation, color plays a crucial
role in identifying and extracting objects from an image. Color image processing can be broadly
classified into two categories- full color and pseudo color processing. Color images are usually
acquired by a color TV camera/ color scanner whereas pseudo color images are created by
assigning color to a gray scale image of monochrome intensity. A beam of light passing
through a glass prism branches into a continuous spectrum of light ranging from violet, blue,
green, yellow, orange to red. The colors that all living beings perceive in an object are basically
due to the nature of light reflected from the object. Within the electromagnetic spectrum, visible
light is composed of a very narrow band of frequencies. Achromatic light (i.e., light in a single
color) can be characterized based on its scalar measure of intensity ranging from black, to gray
and finally to white. On the other hand, chromatic light can be described using radiance,
luminance and brightness. Radiance, measured in watts refers to the total amount of energy
that flows from any light source. Of this, the amount of light energy perceived by an observer
is termed as luminance, measured in lumens (lm). Brightness is one of the essential factors in
describing color sensation. This module will discuss the fundamentals of color space.
2. Fundamentals:
In the human eye, the sensors responsible for color vision are termed as cones. Studies
have established that, of the 6-7 million cones of the human eye, approximately 65% are
sensitive to red light, 33% to green light and 2% to blue. Hence, colors to the human eye will
primarily be variable combinations of the primary colors of red, green and blue. The word
primary instills the impression that the three primary colors when mixed in varying proportions
will produce all visible colors. This interpretation will be proved wrong by the end of this
chapter.
The best example for additive nature of light colors is provided by a color Television. Color
1
TV tube interior will normally comprise of numerous arrays of triangular patterns of electron-
sensitive phosphor. When excited, the dot within each triad tends to produce light in one of the
three primary colors. The intensity of lights is modulated by electron guns inside the tubes that
generate pulses corresponding to the red energy seen by the TV camera. Similar function is
offered in the other two colors as well. The final effect seen on the TV, is the addition of three
primary colors from each triad perceived by the cones in the eye as a full color image. The
illusion of a continuously moving image is created by thirty such successive image changes
per second.
Colors are distinguished from one another using the characteristics of hue, saturation and
brightness. Hue refers to the dominant wavelength in a mixture of light waves and hence it
stands for the dominant color as perceived by an observed. When we see an object as blue or
yellow, we are actually referring to the hue of the object. Saturation stands for the amount of
white light mixed with hue. Together, hue and saturation can be termed as chromaticity. If X,
Y and Z be the amount/intensity of red, green and blue colors needed to generate any color,
then a color can be specified by the following terms:
Where X, Y, and Z are termed as tristimulus values. Curves or tables compiled using
experimental results (Poynton (1996), Walsh (1958) Kiver (1965), can be used to estimate the
tristimulus values required to generate color corresponding to any wavelength of light in the
visible spectrum.
Colors can also be specified using chromaticity diagrams, that show color composition as a
function of x (red) and y(green) and z (1- (x+y)). In the chromaticity diagram (Figure 1), the
pure colors from violet to red will usually be indicated along the boundary of the diagram while
the colors within the diagram will represent a mixture of spectrum colors. Within the diagram,
a straight line joining any two pure colors (of the boundary) will define all the different color
variations which can be generated using these two colors. Similarly, to determine the range
of colors which can be generated using any three given colors from the chromaticity diagram,
connecting lines need to be drawn to each of the three color points. The resulting triangular
2
region will enclose all the colors that can be produced by varying combinations of the three
corner colors.
3. Color Space
A color space/color system specifies a coordinate system within which each color can be
represented by a single point. The most commonly used models are the RGB (red, green, blue),
CMY (cyan, magenta, yellow), CMYK (cyan, magenta, yellow, black), IHS (intensity, hue,
saturation). The RGB models are usually used in video cameras, CMYK models for color
printing and IHS models resemble with the way humans interpret color. These models are
briefly described here.
3
2.1 RGB
In the RGB model, the primary colors of red, green and blue are used within a Cartesian
coordinate system. The RGB color model is shown in Figure 2 where the primary colors of red,
blue and green represent the three corners with black at the origin and cyan, magenta and
yellow representing the other three corners of the cube. The cube shown is a unit cube with the
underlying assumption that all color values have been normalized. Pixel depth is the name
given to the number of bits used to represent each pixel within an RGB space. An RGB image
represented by 24 bit consists of (28 )3 colors.
Cyan, magenta and yellow comprise the secondary colors of light. A cyan color tends to
subtract red from reflected white light. CMY to RGB conversion can be performed using the
relation:
CMY color space (Figure 3) is used usually to generate hardcopy output. Practically, a
combination of cyan, magenta and yellow produces a faint muddy black color when it should
theoretically produce pure black color. Hence, in order to produce pure black color, a fourth
color, black is added which results in CMYK color model. A four color printing means CMY
color model along with black color.
The RGB and CMY models fail to describe colors that are of practical interest to humans.
Humans define color in an object in terms of its hue, saturation and brightness. IHS color model
presents intensity (I), hue ( ) and saturation (S) within a color image and hence is suitable
for algorithms based on color descriptions more intuitive to humans. Within the IHS sphere,
intensity axis represents variations in brightness (black being 0 to white being 255). Hue
represents the dominant wavelength of color. (0 at mid point of red tones and increases anti
clockwise to 255). Saturation represents the purity of color and ranges from 0 at the center of
the sphere to 255 at the circumference. A saturation of 0 represents a completely impure color,
in which all wavelengths are equally represented (in grey tones).
Figure 4: The IHS model which shows the IHS solid on the left and the IHS triangle on the
right formed by taking a slice through the IHS solid at a particular intensity.
As shown in the figure, the corners of the equilateral triangle are located at the position of the
red, green and blue hue. The vertical axis represents intensity ranging from black (0) to white
(255); no color is associated with this axis. The circumference represents hue, i.e., the dominant
wavelength of color which commences with 0 at the midpoint and increases counter clockwise
direction around the triangle from red to green to blue and again to red with values increasing
6
to a maximum of 1 at the corners. Saturation denotes purity of color ranging from 0 at centre
of color sphere to 255 at the circumference. High values of saturation represent purer and
intense colors while intermediate values show pastel shades. The IHS system in detail can be
found in Buchanan (1979).
Bands of a sensor data, combined in the RGB system result in color images that lack saturation
even after contrast stretching due to the highest degree of correlation between the spectral
bands. To correct this issue, a technique is devised which enhances saturation:
A conversion from RGB to IHS model can be obtained using the relations
The Intensity images (I) will generally have high values for sunlit slopes, low values for water
and intermediate values for vegetation and rocks. In hue (H) image, vegetation will have
intermediate to light tones. In Saturation (S) image, just the shadows and rivers will be bright
indicating high saturation for these features. To enhance clarity to a remotely sensed image,
contrast stretching can be performed on the original saturation image. This will essentially
improve the overall discrimination between different terrain types due to increased brightness
of the enhanced image. The IHS images can be transformed back into images of RGB system;
which can then be used to prepare a new color composite image. This image will be a
significant improvement over its original counterpart. The HIS transformation and its inverse
7
Inverse transformation using the values of RGB can be obtained, given the values of HIS
depending on the values of H. Details regarding the range of H, and R, G, B equations are
provided in the table below:
The bands of a multispectral image usually comprise of the three primary color bands of red,
green and blue. When the colors of the resulting composite image resemble closely what would
be observed by the human eyes, they lead to true color composite images. Then, the appearance
of the displayed image will essentially represent a visible color photograph wherein vegetation
appears in green, water in blue, soil in grey etc. Such images are known as true color images.
Some refer to it as “natural color” images. For example, a Landsat Thematic Mapper image
can be assigned red to band 3, green to band 2, blue to band 1 to create true color composite.
The choice for color assignment can be done arbitrarily for any band of a multispectral image.
When the color of such a resulting image has no resemblance to its actual color, it results in a
false color composite (FCC). The principal use of such images is to aid in human visualization
8
(a) (b)
Figure 5 : (a) True color composite (band 321) (b) False color composite (band 543)
It should be noted that TM data can be used to generate two or more 3-band color
composites. Chavez et al (1984) came up with an index known as optimum index factor (OIF)
which can be relied to select the best combination of bands. OIF ranks all the three band
combinations that can possibly be generated using the six bands of TM data. OIF is given by
the expression:
Here, S K denotes the standard deviation for band K , RJ is the absolute value of the
correlation coefficient between any two of the three bands which are being evaluated. OIF is
based on the total variance and correlation within and between the various band
combinations. The combination having the largest value of OIF is generally treated as having
the highest amount of information as measured by variance with the least amount of duplication
9
10