L19-20 ColorImageProcessing
L19-20 ColorImageProcessing
Preview
Why use color in image processing?
Color is a powerful descriptor
Object identification and extraction
e.g., Face detection using skin colors
Humans can discern thousands of color shades and
intensities
c.f. Human discern only two dozen shades of grays
Preview
Two category of color image processing
Full color processing
Images are acquired from full-color sensor or
equipments
Pseudo-color processing
In the past decade, color sensors and processing
hardware are not available
Colors are assigned to a range of monochrome
intensities
Color fundamentals
Physical phenomenon
Physical nature of color is known (1666, Isaac Newton)
Physiopsychological phenomenon
How human brain perceive and interpret color?
Color fundamentals
The color that human perceive in an object =
the light reflected from the object
scene
Illumination source
eye
reflection
Y
y
X Y Z
Z
z
X Y Z
By additivity of colors:
Any color inside the
triangle can be produced
by combinations of the
three initial colors
RGB gamut of
monitors
Color gamut of
printers
Color models
Color model, color space, color system
Specify colors in a standard way
A coordinate system that each color is
represented by a single point
RGB model
CYM model
CYMK model
HSI model
Pixel depth
Pixel depth: the number of bits used to
represent each pixel in RGB space
Full-color image: 24-bit RGB color image
(R, G, B) = (8 bits, 8 bits, 8 bits)
(6)3 = 216
C 1 R
M 1 G
Y 1 B
Brightness
Amount of light emitted.
Distinguishes the grey levels.
The human eye perceives about 100 levels.
Intensity
line
saturation
HSI model
RGB to HSI
; B G
H
360 ; B G
cos {
1
[( R G ) ( R B)]
2
2
1/2
[( R G) ( R B)(G B)]
S 1
3
[ MIN ( R, G, B)]
( R G B)
( R G B)
I
3
HSI to RGB
RG Sector
(0H<120):
B I (1 S )
S cos H
R I [1
]
cos(60 H )
G 3I ( R B )
BR Sector
(240H<360):
H H 240
G I (1 S )
GB Sector
(120H<240):
H H 120
R I (1 S )
S cos H
]
cos(60 H )
B 3I ( R G )
G I [1
S cos H
]
cos(60 H )
R 3I ( B G )
B I [1
R,G,B
saturation
Hue
intensity
Example 1
Color Image
Hue
Saturation
Luminance
Example 2
Color Image
Hue
Saturation
Luminance
Color spaces
triangle
HSI
HLS
Lecture 20
Color Image Processing
Intensity slicing
3-D view of intensity image
Color 1
Color 2
Image plane
Intensity slicing
Alternative representation of intensity slicing
Application 1
Intensity slicing
More slicing plane, more colors
Application 2
8 color regions
Application 1
Rainfall statistics
Washington D.C.
R+G+B
Near
Infrared
(sensitive
to biomass)
near-infrared+G+B
Color pixel
A pixel at (x,y) is a vector in the color space
RGB color space
R ( x, y )
c( x, y ) G ( x, y )
B( x, y )
c.f. gray-scale image
f(x,y) = I(x,y)
Color transformation
Similar to gray scale transformation
g(x,y)=T[f(x,y)]
Color transformation
si Ti (r1 , r2 ,..., rn ) , i 1,2,..., n
g(x,y)
s1
s2
sn
f(x,y)
T1
T2
Tn
f1
f2
fn
H,S
1-D intensity
prototype color
Sphere region
prototype color
Cube region
Application
cube
sphere
1
c( x, y )
K
c( x, y )
( x , y )S xy
R ( x, y )
K ( x , y )S xy
c( x, y )
G ( x, y )
K ( x , y )S xy
K B ( x, y )
( x , y )S xy
vector processing
Neighborhood
Centered at (x,y)
per-component processing
original
RGB model
Smooth I
in HSI model
difference
Lighting conditions
The lighting conditions of the scene have a large
effect on the colours recorded.
Lighting conditions
The following four images of the same scene were acquired under different lighting
conditions.