Lecture 12
Lecture 12
Lecture-12
2
of
36
Color Image Processing
The use of color in image processing is motivated
by:
Color is important in object recognition
Human eyes can discern thousands of colors
Color image processing:
Full color image processing
Pseudo color processing
Full color processing: image is acquired by a full-
color sensor
Pseudo color processing: assigning a shade of
color to a particular monochrome intensity or
range of intensities
3
of
36
Color Image Processing
In 1666 Newton discovered that a beam of sunlight
passed through a prism will break into a spectrum
of colors ranging from violet at one end to red at the
other
Color spectrum: violet, blue, green yellow, orange,
and red.
No color in the spectrum end abruptly
4
of
36
Color Image Processing
Color perceived from an object is determined by the
nature of light reflected from that object.
An object reflecting light that is balanced in all
visible light appears white.
An objects that favors reflectance in a limited range
of the visible spectrum exhibits a specific color
5
of
36
Color Image Processing
Achromatic light (without color) is described by
intensity (amount)
Chromatic light is described by 3 quantities:
Radiance
Luminance
Brightness
Radiance: total amount of energy that flows from
the light source
Luminance: a measure of the amount of energy
an observer perceives from a light source
Infrared source: zero luminance
Brightness: a subjective quantity
6
of
36
Color Image Processing
Cones can be divided into three principal sensing
categories: red, green and blue
7
of
36
Color Image Processing
Structure of human eye: all colors are seen as
variable combinations of 3 primary colors, Red,
Green and Blue
Primary colors can be added to produce secondary
colors:
Magenta: (red plus blue)
Cyan: (green plus blue)
Yellow: (red plus green)
Mixing three primary colors produce white.
Mixing a secondary color with its opposite primary
color produces white
8
of
36
Color Image Processing
Color TV: an example of the additive nature of light
colors
Interior of TV tube: a large array of triangular dot
patterns of electron sensitive phosphor
Each dot in a triangle produces one of the primary
colors
Intensity of red-emitting phosphor is modulated by
an electron gun.
Similarly for green-emitting and blue-emitting
Three primary colors are added and received by
the eye as a full-color image
9
of
36
Color Image Processing
One color from another is distinguished by 3
factors:
1. Brightness
2. Hue
3. Saturation
Hue: dominant wavelength (color) in a mixture of
light waves
Saturation: relative purity or the amount of white
light mixed with a hue
Pink is less saturated than red
10
of
36
Color Image Processing
Pigment =
Red + white Pink
Violet + white Lavender
11
of
36
Color Image Processing
The amounts of red, green and blue needed to form
a particular color are called tri-stimulus X, Y, Z
A color is specified by its tri-chromatic coefficients:
x+y+z=1
12
of
36
Color Image Processing
Another approach for
specifying colors is to use
CIE (International Commission on
Illumination) chromaticity
diagram which shows color
composition as a
function of x (red) and y
(green).
Various spectrum colors
are indicated around the
boundary of tongue-
shaped diagram (pure
colors).
13
of
36
Color Image Processing
Any point not actually on the boundary represents some
mixture of spectrum colors
Any point on the boundary of chart is fully saturated.
A straight-line segment joining any two points in the diagram
defines all different colors that can be obtained by combining
these two colors additively.
A line drawn from the point of equal energy (white) to any
point on the boundary will define all the shades on that color
To determine colors that can be obtained from any three
given colors, we draw connecting lines to each of the three
color points
Any color inside the triangle can be produced by various
combinations of the three initial colors
14
of
36
Color Image Processing
Color Models (Color Space or Color System)
Color models: used to specify colors in a standard
way
Color model is a coordinate system where each
color is represented by a single point
RGB (red, green, blue)
CMY (cyan, magenta, yellow)
HIS (hue, saturation, intensity)
15
of
36
Color Image Processing
Each model is oriented toward a hardware or
application.
RGB: color monitors, cameras, color image
processing
CMY: color monitor
HIS: color image processing
HIS has the advantage that it decouples color and gray
level information in an image making it suitable for many
gray scale techniques discussed before
16
of
36
RGB
Each color appears in its primary spectral components of
red, green and blue
Different colors in this model are points on or inside the
cube
Number of bits used to represent each pixel in RGB space is
called the pixel depth
If 8 bit is used to represent each color, 24-bit RGB color
image is obtained
Total number of colors: (28)3
A 24-bit RGB
color cube
17
of
36
RGB
A subset of colors that are likely to be reproduced
reasonably independent of viewer hardware is
called safe RGB color
216 colors have become the de facto standard for
safe colors
Each of 216 safe color is formed from three RGB
values but each value can only be 0, 51, 102, 153,
204 or 255.
18
of
36
RGB
Where all values are assumed to be in the range [0, 1]. The
conversions from CMYB to CMY are:
21
of
36
HSI
RGB and CMY color models are not well suited for
describing colors in terms that are practical for
human interpretation
HSI (hue, saturation and intensity) decouples
intensity components from the color-carrying
information
Hue: dominant color
Saturation: relative purity or the amount of white
mixed with a hue
22
of
36
HSI
Conceptual relationships between the RGB and HSI color
models.
23
of
36
HSI
Hue and saturation in the HSI color model. The dot is any color point.
The angle from the red axis gives the hue. The length of the vector is the
saturation. The intensity of all colors in any of these planes is given by
the position of the plane on the vertical intensity axis.
24
of
36
Converting Colors from RGB to HSI
25
of
36
Converting Colors from RGB to HSI
The HSI color model based on (a) triangular, and (b) circular
color planes. The triangles and circles are perpendicular to
the vertical intensity axis.
26
of
36
Converting Colors from RGB to HSI
(a) RGB image and
the components of
its corresponding
HSI image:
(b) hue,
(c) saturation, and
(d) intensity.
27
of
36
Converting Colors from HSI to RGB
RG sector (0≤ H < 120 : When H is in this sector, the RGB
components are given by the equations