Академический Документы
Профессиональный Документы
Культура Документы
Chapter 5:
Color Image Processing
1666 Sir Isaac Newton, 24 year old, discovered white light spectrum.
Electromagnetic Spectrum
Primary colors:
Defined CIE in 1931
Red = 700 nm
Green = 546.1nm
Blue = 435.8 nm
CIE = Commission Internationale de lEclairage
(The International Commission on Illumination)
Primary
color
Secondary
colors
Primary
color
Hidden faces
of the cube
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
C
M
Y
1 R
1 G
1 B
Color carrying
information
Brightness
Color Characterization
Hue:
Saturation:
Brightness:
Hue
Saturation
amount of red (X), green (Y) and blue (Z) to form any particular
color is called tristimulus.
RGB Cube
Hue
Saturation
Intensity
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
if B G
if B G
(
R
G
)
(
R
B
)
1
2
cos
1/ 2
2
( R G ) ( R B )(G B )
3
S 1
RG B
1
I ( R G B)
3
S cos H
R I 1
cos(
60
H
)
B I (1 S )
G 1 ( R B)
BR sector: 240 H 360
H H 240
S cos H
B I 1
cos(
60
H )
G I (1 S )
R 1 (G B )
GB sector:120 H 240
H H 120
R I (1 S )
S cos H
G I 1
cos(
60
H
)
B 1 (R G)
RGB
Image
Saturation
Hue
Intensity
Hue
Saturation
Intensity
Hue
Intensity
Saturation
RGB
Image
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
if f ( x, y ) T
if f ( x, y ) T
C1 = Color No. 1
C2 = Color No. 2
Color
Formula:
C2
C1
0
A gray scale image viewed as a 3D surface.
T
Intensity
L-1
for lk 1 f ( x, y ) lk
Color
Ck = Color No. k
lk = Threshold level k
Ck
Ck-1
C3
C2
C1
0
l1
l2
l3
Intensity
lk-1
lk
L-1
for lk 1 f ( x, y ) lk
Ck = Color No. k
lk = Threshold level k
Blue component
Color
coded
images
An X-ray image of a
garment bag with a
simulated explosive
device
Transformations
Transformations
An X-ray image of a
garment bag with a
simulated explosive
device
Color
coded
images
Pseudocolor Coding
Used in the case where there are many monochrome images such as multispectral
satellite images.
CMYK components
RGB components
HSI components
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
Color Transformation
Use to transform colors to colors.
Formulation:
g ( x , y ) T f ( x, y )
si Ti ( r1 , r2 , , rn )
Where ri = color component of f(x,y)
si = color component of g(x,y)
i= 1, 2, , n
For RGB images, n = 3
sG ( x, y ) krG ( x, y )
s B ( x, y ) krB ( x, y )
Formula for HSI:
sI ( x, y ) krI ( x, y )
Formula for CMY:
k = 0.7
H,S
sC ( x, y ) krC ( x, y ) (1 k )
sM ( x, y ) krM ( x, y ) (1 k )
sY ( x, y ) krY ( x, y ) (1 k )
Color Complements
Color complement replaces each color with its opposite color in the
color circle of the Hue component. This operation is analogous to
image negative in a gray scale image.
Color circle
R ( x, y )
K ( x , y )S xy
1
c ( x, y )
c( x, y )
G ( x, y )
K ( x , y )S xy
K ( x , y )S xy
B
(
x
,
y
)
K ( x ,
y
)
S
xy
Color image
Red
Green
Blue
Color image
HSI Components
Hue
Saturation
Intensity
Color Segmentation
2 Methods:
1. Segmented in HSI color space:
A thresholding function based on color information in H and S
Components. We rarely use I component for color image
segmentation.
2.
Hue
Saturation
Intensity
Product of
2 and 5
Red pixels
7
(Images from Rafael C.
Gonzalez and Richard E.
Wood, Digital Image
Processing, 2nd Edition.
Histogram of 6
8
Segmentation of red color pixels
Color image
if D (c( x, y ), cT ) T
if D (c( x, y ), cT ) T
cT = color to be segmented.
c(x,y) = RGB vector at pixel (x,y).
Color image
Reference color cT to be segmented
cT average color of pixel in the box
Results of segmentation in
RGB vector space with Threshold
value
T = 1.25 times the SD of R,G,B values
In the box
(Images from Rafael C. Gonzalez and Richard E.
Wood, Digital Image Processing, 2nd Edition.
We see
4 objects.
Edges
F ( ) ( g xx g yy ) ( g xx g yy ) cos 2 2 g xy sin 2
2
2 g xy
1
1
tan
g xx g yy
2
2
R
G
B
g xx
x
x
x
R
G
B
g yy
y
y
y
R R G G B B
g xy
x y x y x y
1
2
Original
image
3
Sum of
gradients of
each color
component
Difference
between
22 and 33
Green
Blue