Image Processing
Image Processing
Dr A S Jalal
Class Presentation on Image Processing and Computer Vision by Dr. Anand Singh Jalal
Color Fundamentals
identification
Humans can discern thousands of
Class Presentation on Image Processing and Computer Vision by Dr. Anand Singh Jalal
Color Fundamentals …
In 1666 Sir Isaac Newton discovered that when a beam
of sunlight passes through a glass prism, the emerging
beam is split into a spectrum of colours
Class Presentation on Image Processing and Computer Vision by Dr. Anand Singh Jalal
Light And The Electromagnetic Spectrum
Class Presentation on Image Processing and Computer Vision by Dr. Anand Singh Jalal
Color Fundamentals: Reflected Light
Class Presentation on Image Processing and Computer Vision by Dr. Anand Singh Jalal
Color Fundamentals …
3 basic qualities are used to describe the quality of a
chromatic light source:
Radiance: the total amount of energy that flows
from the light source (measured in watts)
Luminance: the amount of energy an observer
perceives from the light source (measured in lumens)
Note we can have high radiance, but low
luminance
Brightness: a subjective (practically unmeasurable)
notion that embodies the intensity of light
Class Presentation on Image Processing and Computer Vision by Dr. Anand Singh Jalal
Cones
6 to 7 million cones divided in to three
principal sensing categories
65% of cones sensitive to red light
RGB
Class Presentation on Image Processing and Computer Vision by Dr. Anand Singh Jalal
Color Fundamentals …
Class Presentation on Image Processing and Computer Vision by Dr. Anand Singh Jalal
Color Fundamentals …
The International Commission on Illumination (CIE) in
1931 designated specific wavelengths to the
primary colours
Blue = 435.8 nm
Green = 546.1 nm
Red = 700.0 nm
Class Presentation on Image Processing and Computer Vision by Dr. Anand Singh Jalal
Color Fundamentals …
Red,
Colours are
added Green,
Blue
Class Presentation on Image Processing and Computer Vision by Dr. Anand Singh Jalal
Color Fundamentals …
Class Presentation on Image Processing and Computer Vision by Dr. Anand Singh Jalal
Color Fundamentals …
Class Presentation on Image Processing and Computer Vision by Dr. Anand Singh Jalal
Color Fundamentals …
Class Presentation on Image Processing and Computer Vision by Dr. Anand Singh Jalal
Color Fundamentals …
The amounts of Red, Green & Blue needed to form
any particular color are called the Tristimulus
Values, denoted by X, Y & Z respectively.
A color is then specified by its trichromatic
coefficients, defined as
Class Presentation on Image Processing and Computer Vision by Dr. Anand Singh Jalal
CIE Chromaticity diagram
Specifying colors systematically can be
achieved using the CIE chromaticity diagram
On this diagram the x-axis represents the
Class Presentation on Image Processing and Computer Vision by Dr. Anand Singh Jalal
Chromaticity Diagram
Class Presentation on Image Processing and Computer Vision by Dr. Anand Singh Jalal
Chromaticity Diagram …
Any color located on the boundary of the
chromaticity chart is fully saturated
The point of equal energy has equal amounts of
each color and is the CIE standard for pure white
Any straight line joining two points in the diagram
defines all of the different colors that can be
obtained by combining these two colors additively
This can be easily extended to three points
Class Presentation on Image Processing and Computer Vision by Dr. Anand Singh Jalal
Chromaticity Diagram …
Entire color range cannot
be displayed based on any
three colors
The triangle shows the
typical color gamut
produced by RGB monitors
The irregular shape is the
gamut achieved by high
quality color printers
Class Presentation on Image Processing and Computer Vision by Dr. Anand Singh Jalal
Color Models
It is a specification of a coordinate system & a
subspace within that system where each color is
represented by a single point
There are different ways to model color
Class Presentation on Image Processing and Computer Vision by Dr. Anand Singh Jalal
Colour Models : RGB
In the RGB model each color appears in its primary
spectral components of red, green and blue
The model is based on a Cartesian coordinate system
RGB values are at 3 corners
Class Presentation on Image Processing and Computer Vision by Dr. Anand Singh Jalal
Color Models : RGB …
Class Presentation on Image Processing and Computer Vision by Dr. Anand Singh Jalal
Color Models : RGB …
Images represented in the RGB color model consist
of three component images – one for each primary
color
When fed into a monitor these images are
combined to create a composite color image
The number of bits used to represent each pixel is
referred to as the color depth
A 24-bit image is often3 referred to as a full color
image as it allows 28 = 16,777,216 colors
Class Presentation on Image Processing and Computer Vision by Dr. Anand Singh Jalal
Color Models : RGB …
Class Presentation on Image Processing and Computer Vision by Dr. Anand Singh Jalal
Color Models : RGB …
24-bit RGB image = 16,777,216 colours
Many systems today limited to 256 colours
Class Presentation on Image Processing and Computer Vision by Dr. Anand Singh Jalal
Assumption (Accepted standard notation):
Minimum colours that can be faithfully reproduced by any
system is 256
Remaining 216
de facto standard for safe colours,
especially in Internet Applications
Class Presentation on Image Processing and Computer Vision by Dr. Anand Singh Jalal
The HSI Color Model …
The HSI model uses three measures to describe
colors:
Hue: A color attribute that describes a pure color (pure
yellow, orange or red)
Saturation: Gives a measure of how much a pure color
is diluted with white light
Intensity: Brightness is nearly impossible to measure
because it is so subjective. Instead we use intensity.
Intensity is the same achromatic notion that we have
seen in grey level images
Class Presentation on Image Processing and Computer Vision by Dr. Anand Singh Jalal
The HSI Color Model …
Now the intensity component
of any color can be
determined by passing a
plane perpendicular to
the intensity axis and
containing the color
point
The intersection of the plane
with the intensity axis gives us
the intensity component of the
color
Class Presentation on Image Processing and Computer Vision by Dr. Anand Singh Jalal
The HSI Color Model …
In a similar way we can extract the hue from the RGB
color cube
Consider a plane defined by
the three points cyan, black
and white
All points contained in
this plane must have the
same hue (cyan) as black
and white cannot contribute
hue information to a color
Class Presentation on Image Processing and Computer Vision by Dr. Anand Singh Jalal
The HSI Color Model …
Consider if we look straight down at the RGB cube as it
was arranged previously
We would see a hexagonal
shape with each primary
color separated by 120°
and secondary colors
at 60° from the primaries
So the HSI model is
composed of a vertical
intensity axis and the locus of color points that lie on
planes perpendicular to that axis
Class Presentation on Image Processing and Computer Vision by Dr. Anand Singh Jalal
The HSI Color Model …
To the right we see a hexagonal
shape and an arbitrary color
point
The hue is determined by an
angle from a reference point,
usually red
The saturation is the distance from the origin to the point
Class Presentation on Image Processing and Computer Vision by Dr. Anand Singh Jalal
The HSI Color Model …
Class Presentation on Image Processing and Computer Vision by Dr. Anand Singh Jalal
The HSI Color Model …
Class Presentation on Image Processing and Computer Vision by Dr. Anand Singh Jalal
Converting From RGB To HSI
Achromatic axis
Hue
[1,1,1]
H
[0,0,0] Saturation
Brightness
Class Presentation on Image Processing and Computer Vision by Dr. Anand Singh Jalal
Converting From RGB To HSI …
Given a colour as R, G, and B its H, S, and I values are
calculated as follows:
if B G 1
1
2
R G R B
H cos 1
360 if B G R G
2
R B G B
2
3
S 1 min R,G,B I 1
3
R G B
R G B
Class Presentation on Image Processing and Computer Vision by Dr. Anand Singh Jalal
Converting From HSI To RGB …
Given a colour as H, S, and I it’s R, G, and B values are
calculated as follows:
RG sector (0 <= H < 120 )
S cos H
R I 1
cos 60 H
G 3I R B B I1 S
Class Presentation on Image Processing and Computer Vision by Dr. Anand Singh Jalal
Converting From HSI To RGB …
Given a colour as H, S, and I it’s R, G, and B values are
calculated as follows:
GB sector (120 <= H < 240 )
The given value of H is in this sector –
first subtract 1200 from it
H = H - 1200
S cos H 120
R I1 S G I 1 B 3I R G
cos H 60
Class Presentation on Image Processing and Computer Vision by Dr. Anand Singh Jalal
Converting From HSI To RGB …
BR sector (240 <= H <= 360 )
The given value of H is in this sector – first subtract 2400 from it
H = H - 2400
R 3I G B G I1 S
S cos H 240
B I 1
cos H 180
Class Presentation on Image Processing and Computer Vision by Dr. Anand Singh Jalal
Pseudo coloring
Eye can distinguish between ~30 different grey-levels
... and 350,000 different colors
Class Presentation on Image Processing and Computer Vision by Dr. Anand Singh Jalal
Intensity Slicing
(A Technique for Pseudo colouring)
For 3-D images, use a plane at f(x,y)=li to slice
the image function into two levels
Any pixel whose gray level is above the plane is
coded with one colour, and any pixel below the
plane is coded with the other
The result is a two-colour image whose relative
appearance can be controlled by moving the
slicing plane up and down the gray-level axis
In general, we can use multi-level slicing and
colour coding
Class Presentation on Image Processing and Computer Vision by Dr. Anand Singh Jalal
Intensity Slicing ...
(A Technique for Pseudo colouring)
Class Presentation on Image Processing and Computer Vision by Dr. Anand Singh Jalal
Intensity Slicing ...
Class Presentation on Image Processing and Computer Vision by Dr. Anand Singh Jalal
Intensity Slicing ...
Class Presentation on Image Processing and Computer Vision by Dr. Anand Singh Jalal
Any Questions ?
Class Presentation on Image Processing and Computer Vision by Dr. Anand Singh Jalal