chapter 13: color processing
DESCRIPTION
Chapter 13: Color Processing. 。 Color: An important descriptor of the world 。 The world is itself colorless 。 Color is caused by the vision system responding differently to different wavelengths of light. 。 Image color depends on: - PowerPoint PPT PresentationTRANSCRIPT
13-1
Chapter 13: Color Processing
。 Color: An important descriptor of the
world
。 The world is itself colorless
。 Color is caused by the vision system
responding differently to different
wavelengths of light.
13-2
。 Image color depends on:
(1) The color of the incidence light (2) The color of the scene surface (3) The nature of the visual sensor
13-3
○ The Human Eye
13-4
Two kinds of photoreceptors: rods, cones
13-5
Rods -- sensitive to lightCones -- sensitive to color
Three types of cones:
, , ( , , )S M L R G B
13-6
○ RGB Color Space -- Many colors are made
up of varying amounts of red, green and
blue
R, G, B: primary colors, real 1 2 3( ) ( ) ( ) ( )C w R w G w B
1 2 3, ,w w w : color matching functions may be negative
13-7
○ CIE XYZ Color Space
CIE (Commission Internationale d’Eclairage):
an organization responsible for color standardX,Y,Z: not real primaries, Y: luminanceTheir color matching functions are positive everywhere
。 The volume of visible
colors in CIE XYZ
space is a cone
13-8
。 The relationship between RGB and XYZ
0.431 0.342 0.178
0.222 0.707 0.071
0.02 0.130 0.939
X R
Y G
Z B
3.063 1.393 0.476
0.969 1.876 0.042
0.068 0.229 1.069
R X
G Y
B Z
13-9
○ CIE xy Color Space -- A constant brightness
section intersects the XYZ space with the
plane 1X Y Z
, , X Y Z
x y zX Y Z X Y Z X Y Z
Since x + y + z = 1, a color can be specifiedby x and y alone.
13-10
。 Chromaticity Diagram
(i) Spectral locus: the curved boundary along which colors of single wavelengths are viewed(ii) Neutral point: the color whose weights are equal for all three primaries(iii) Colors that lie farther away from the neutral point are more saturated
13-11
。 RGB Gamut – The colors correspond to
positive matching values
13-12
。 Secondary colors (primaries of pigments):
Magenta (purple) = R + B = W - G
Cyan = G + B = W - R
Yellow = R + G = W - B
。 Pigments remove color from incident light,
which is reflected from paper
e.g., Red ink absorbs green and blue light;
incident red light passes through the
ink and is reflected from the paper
13-13
○ HSV (Hue, Saturation, Value) Color Space
Hue: varies from red greenSaturation: varies from red pinkBrightness: varies from black white
13-14
○ (i) RGB HSV
If R = V, then
If G = V, then
If B = V, then
If H ends up being negative, add 1
If (R,G,B) = (0,0,0), then (H,S,V) = (0,0,0)
max{ , , },
min{ , , }, /
V R G B
V R G B S V
1
6
G BH
1
26
B RH
1
46
R GH
13-15
。 Example: (R, G, B) = (0.2, 0.4, 0.6)
max{ , , } max{0.2,0.4,0.6} 0.6
min{ , , } 0.6 min{0.2,0.4,0.6} 0.4
/ 0.4 / 0.6 0.6667
V R G B
V R G B
S V
Since 0.6,
1 1 0.2 0.44 4 0.5833
6 6 0.4
B V
R GH
13-16
(ii) HSV RGB
6
6
(1 )
(1 )
[1 (1 )]
H H
F H H
P V S
Q V SF
T V S F
0
1
2
3
4
5
H R G B
V T P
Q V P
P V T
P Q V
T P V
V P Q
13-17
。 Example: (H, S, V) = (0.5833, 0.6667, 0.6)
6 6(0.5833) 3
6 6(0.5833) 3 0.5
(1 ) 0.6(1 0.6667) 0.2
(1 ) 0.6(1 0.6667 0.5) 0.4
[1 (1 )] 0.6[1 0.6667
(1 0.5)] 0.4
H H
F H H
P V S
Q V SF
T V S F
Since 3,
( , , ) ( , , ) (0.2, 0.4, 0.6)
H
R G B P Q V
13-18
○ YIQ Color Space – Used for TV and video
Y : luminance information
I, Q : color information
0.299 0.587 0.114
0.596 0.274 0.322
0.211 0.523 0.312
Y R
I G
Q B
1.0 0.956 0.621
1.0 0.272 0.647
1.0 1.106 1.703
R Y
G I
B Q
13-19
○ Uniform Color Space
-- The distance in the space is a guide to
color difference
。 Noticeable difference – the difference when
modifying a color until one can tell it has
changed
。 Macadam ellipse -- the noticeable difference
of a color forms the boundary of the color in
a color space and can be fitted with an ellipse
13-20
The color difference in CIE xy space is poor: (a) the ellipses at the top are larger than those at the bottom (b) the ellipses rotate as they move up
13-21
。 CIE u’v’ Color Space – a more uniform
space than the CIE xy color space 4 9
( , ) ( , )15 3 15 3
X Yu v
X Y Z X Y Z
13-22
○ CIE Lab Color Space
– another substantial uniform space* 1/3
* 1/3 1/3
* 1/3 1/3
116( ) 16
500[( ) ( ) ]
200[( ) ( ) ]
n
n n
n n
YL
Y
X Ya
X Y
Y Zb
Y Z
where , ,n n nX Y Z : the XYZ coordinates of a reference white patch
13-23
◎ Color Images
13-24
13-25
◎ Pseucoloring
。 Intensity Slicing
13-26
。 Transformation
Define colormap functions:
( ), ( ), ( ), : gray levelR G Bf x f x f x x
13-27
◎ Processing of Color Images
Two methods:
(a) (b)
13-28
○ Noise Reduction
R G B
Apply medianfilter to R,G,B
Apply medianfilter to Y
13-29
○ Contrast Enhancement
Perform on the intensity component (1) RGB YIQ (2) Apply histogram equalization to Y Y’ (3) Y’IQ R’G’B’
13-30
○ Spatial Filtering
Both low- and high- pass filters are better
off applying to the intensity component
13-31
○ Edge Detection
Two ways:
(1) Apply edge detection to the intensity
component
(2) Apply edge detection to each RGB
component