View
246
Download
9
Category
Preview:
Citation preview
4.4 Image Sharpeningg p g
• Introduction • First-order derivative (in spatial domain)• Second-order derivative (in spatial domain)• High-pass filter in frequency domain
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
1
4.4 Image Sharpening4.4.1 Introduction
g p g
P t d t t dPurposes:highlight fine detaileasy to detect edges
Request: insensitive to noise
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
2
4.4 Image Sharpening4.4.1 Introduction: Sharpening filters
g p g
R b t(1) Fi t d d i ti Robert(1) First-order derivative :Prewitt
KirschRobinsonSobel Kirsch
(2) Second-order derivative : Laplacian
Robinson
LoG
(3) High-pass filter in frequency domain :Id hi h filt (IHPF)
LoG
Idea high-pass filter (IHPF)Butterworth high-pass filter (BHPF)Gaussian high-pass filter (GHPF)Gaussian high-pass filter (GHPF)
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
3
4.4 Image Sharpeningg p g4.4.2 first-order derivative : foundation
The derivatives of a digital function are defined in terms of differences e de v ves o d g u c o e de ed e s o d e e ces
(1) zero in flat segmentFor first derivative it must be
(1) zero in flat segment(2) nonzero at the onset of a gray-level step or ramp(3) nonzero along ramp
For second derivative it must be
(3) nonzero along ramp
(1) zero in flat segment(2) nonzero at the onset and end of a gray-level step or ramp(2) nonzero at the onset and end of a gray-level step or ramp(3) zero along ramp of constant slope
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
4
4.4 Image Sharpeningg p g4.4.2 first-order derivative : foundationA basic definition of the first-order derivative of a 1-D function f(x) is the difference
( 1) ( )f f x f xx∂
= + −∂
Similarly, we define a second-order derivative as the difference2
[ ( 1) ( )] [ ( ) ( 1)]f f f f f∂2 [ ( 1) ( )] [ ( ) ( 1)]
( 1) ( 1) 2 ( )
f f x f x f x f xx
f x f x f x
= + − − − −∂
= + + − −
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
5
4.4 Image Sharpeningg p g4.4.2 first-order derivative : foundation
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
6
4.4 Image Sharpeningg p g4.4.2 first-order derivative : foundationFirst-order derivatives of a digital image are based on various
Tf f⎡ ⎤∂ ∂
g gapproximations of the 2-D gradient. It is defined as the vector:
f ffx y
⎡ ⎤∂ ∂∇ = ⎢ ⎥∂ ∂⎣ ⎦
11222f ff
x y
⎡ ⎤⎛ ⎞∂ ∂⎛ ⎞∇ = +⎢ ⎥⎜ ⎟⎜ ⎟∂ ∂⎝ ⎠⎢ ⎥⎝ ⎠⎣ ⎦
f ffx y
⎛ ⎞∂ ∂⎛ ⎞∇ ≈ + ⎜ ⎟⎜ ⎟∂ ∂⎝ ⎠ ⎝ ⎠Magnitude:
f f⎧ ⎫∂ ∂⎪Direction: 1( , ) tan yGx yα − ⎛ ⎞
= ⎜ ⎟max ,f ff
x y⎧ ⎫∂ ∂⎪∇ ≈ ⎨ ⎬∂ ∂⎪ ⎭⎩
( , )x
yG⎜ ⎟
⎝ ⎠
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
7
4.4 Image Sharpeningg p g4.4.2 first-order derivative : foundation
h j( 1, ) ( , )x
fG f x y f x yx∂
= = + −∂
where y, j
( , 1) ( , )yfG f x y f x yy∂
= = + −∂ x, i
These equations can be implemented using masks
,
1 01 0xG−
=1 1
0 0yG−
=1 0 0 0
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
8
4.4 Image Sharpeningg p g4.4.2 first-order derivative : foundation
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
9
4.4 Image Sharpeningg p g4.4.2 first-order derivative : foundation
Spatial filter: the sign of filter coefficientsSpatial filter: the sign of filter coefficients
F(u) f(x)
Positiv and
u0
x
0
andnegative
(c) (d)
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
10
4.4 Image Sharpeningg p g4.4.2 first-order derivative : display
( , )f x y ( , )g x y f= ∇
0( )g x y f∇(1) ( , )g x y f= ∇(1)( , ) ( , )g x y f x y f= + ∇(2)
( , )g x yLinear scaling (3)<TbL f⎧ ∇
⎨ T
( , ) othewise
b
t
L fg x y
L⎧ ∇
= ⎨⎩
(4)
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
11
4.4 Image Sharpeningg p g4.4.2 first-order derivative : display
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
12
4.4 Image Sharpeningg p g4.4.2 first-order derivative : gradient operators
Roberts operator 1 0 0 1obe s ope o 1 00 1xG =
−0 11 0yG =−
Prewitt operator1 0 11 0 1G
−= −
1 1 10 0 0G 1 0 1
1 0 1yG
−0 0 01 1 1
xG =− − −
Sobel operator1 0 12 0 2G
−= −
1 2 10 0 0G = 2 0 2
1 0 1yG =
−0 0 01 2 1
xG =− − −
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
13
4.4 Image Sharpeningg p g4.4.2 first-order derivative : gradient operators
Roberts operatorobe s ope o
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
14
4.4 Image Sharpeningg p g4.4.2 first-order derivative : gradient operators
Prewitt operatorew ope o
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
15
4.4 Image Sharpeningg p g4.4.2 first-order derivative : gradient operators
Sobel operatorSobe ope o
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
16
4.4 Image Sharpeningg p g4.4.2 first-order derivative : gradient operators
Sobel operatorSobe ope o
i i l S b loriginal Sobel Binary display
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
17
4.4 Image Sharpeningg p g4.4.2 first-order derivative : gradient operators
Robinson
0
1 0 12 0 2G
−= − 1
0 1 21 0 1G
− −= − 2
1 2 10 0 0G− − −
= 3
2 1 01 0 1G
− −= −
0 2 0 21 0 1
G−
1 1 0 12 1 0
G 2 0 0 01 2 1
G 3
0 1 2
6
1 2 10 0 0G =
1 0 12 0 2G−
= − 5
0 1 21 0 1G = − 7
2 1 01 0 1G = −6
1 2 1− − −4 2 0 2
1 0 1G = −
−5
2 1 0− −7
0 1 2− −
GG2G3
G0
G1G3
G4}{
0,1...7max ii
f G=
∇ ≈
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
18G5
G6
G7
4.4 Image Sharpeningg p g4.4.2 first-order derivative : gradient operators
Kirsch
0
5 3 35 0 3G
− −= − 1
3 3 35 0 3G− − −
= − 2
3 3 33 0 3G− − −
= − − 3
3 3 33 0 5G− − −
= −0 5 0 3
5 3 3G
− −1 5 0 3
5 5 3G
−2 3 0 3
5 5 5G 3
3 5 5−
6
5 5 53 0 3G = − −
3 3 53 0 5G− −
= − 5
3 5 53 0 5G−
= − 7
5 5 35 0 3G
−= −6
3 3 3− − −4 3 0 5
3 3 5G = −
− −5
3 3 3− − −7
3 3 3− − −
GG2G3
G0
G1G3
G4}{
0,1...7max ii
f G=
∇ ≈
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
19G5
G6
G7
4.4 Image Sharpeningg p g4.4.3 second-order derivative : definitions
Th d d d i i i d fi d2 2
2 f ff ∂ ∂∇ = +
The second-order derivative is defined as
2 2fx y
∇ = +∂ ∂
where 2
( 1 ) ( 1 ) 2 ( )f f x y f x y f x y∂+ +w e e
2 ( 1, ) ( 1, ) 2 ( , )f f x y f x y f x yx
= + + − −∂2
( 1) ( 1) 2 ( )f f x y f x y f x y∂= + +
2 [ ( 1 ) ( 1 )f f x y f x y∇ = + + +namely
2 ( , 1) ( , 1) 2 ( , )f x y f x y f x yy
= + + − −∂
[ ( 1, ) ( 1, )( , 1) ( , 1) 4 ( , )]
f f x y f x yf x y f x y f x y∇ = + + − +
+ + − −
namely
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
20
4.4 Image Sharpeningg p g4.4.3 second-order derivative : Laplacian
It is well known as Laplacian operator. It can be implementedp p pas a mask
0 1 01 4 1G
−= − −
0 1 0−
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
21
4.4 Image Sharpeningg p g4.4.3 second-order derivative : Laplacian
2Experiment result 2( , ) ( , ) ( , )g x y f x y f x y= + ∇
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
22
4.4 Image Sharpeningg p g4.4.3 second-order derivative : LoG
S hi fiSmoothing first 2
22( )r
h r e σ−
= −
2 2r x y= +
Laplacian sharpeningp p g2
22 2
2 24( )
rrh r e σσσ
−⎡ ⎤−∇ = − ⎢ ⎥
⎣ ⎦⎣ ⎦
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
23
4.4 Image Sharpeningg p g4.4.3 second-order derivative : LoG
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
24
4.4 Image Sharpeningg p g4.4.3 second-order derivative : LoG
original Sobel LoG
Thresholded LoG
Zero cross
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
25
4.4 Image Sharpeningg p g4.4.3 High-pass filter: Ideal highpass filter (IHPF)
formula
00 ( , )( , )
1 ( )if D u v D
H u vif D D
≤⎧= ⎨⎩
formula
0
( , )1 ( , )if D u v D⎨ >⎩
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
26
4.4 Image Sharpening
cutoff frequencies set at radii values of 15、30、80
g p g4.4.3 High-pass filter: Ideal highpass filter (IHPF)
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
27
4.4 Image Sharpeningg p g4.4.3 High-pass filter: Ideal highpass filter (IHPF)cutoff frequencies set at radii values of 15、30、80
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
28
4.4 Image Sharpeningg p g4.4.3 High-pass filter: Butterworth highpass filter (BHPF)
1f l2
0
1( , )1 [ / ( , )] nH u v
D D u v=
+formula
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
29
4.4 Image Sharpeningg p g4.4.3 High-pass filter: Butterworth highpass filter (BHPF)cutoff frequencies set at radii values of 15、30、80
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
30
4.4 Image Sharpening
cutoff frequencies set at radii values of 15、30、80.
g p g4.4.3 High-pass filter: Butterworth highpass filter (BHPF)
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
31
4.4 Image Sharpeningg p g4.4.3 High-pass filter: Gaussian highpass filter (GHPF)
f l 2 20( , ) / 2( , ) 1 D u v DH u v e−= −
formula
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
32
4.4 Image Sharpeningg p g4.4.3 High-pass filter: Gaussian highpass filter (GHPF)cutoff frequencies set at radii values of 15、30、80.
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
33
4.4 Image Sharpeningg p g4.4.3 High-pass filter: Homomorphic filter
An image f(x y) can be expressed as the product ofAn image f(x,y) can be expressed as the product of illumination and reflectance components
( , ) ( , ) ( , )f x y i x y r x y=
let
( , ) ln ( , ) ln ( , ) ln ( , )z x y f x y i x y r x y= = +
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
34
4.4 Image Sharpeningg p g4.4.3 High-pass filter: Homomorphic filter
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
35
4.4 Image Sharpeningg p g4.4.3 High-pass filter: Homomorphic filter
Experimental resultp
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
36
4.5 Color Image Enhancementg
I t d ti• Pseudo color image processing
ll l h
• Introduction
• Full color enhancement
• Noise in color image
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
37
4.5 Color Image Enhancementg4.5.1 Introduction: review
1666, Sir Isaac Newton, optical prism
Digital Image Processing Prof. Zhengkai Liu Dr. Rong Zhang
38
4.5 Color Image Enhancementg4.5.1 Introduction: review
Digital Image Processing Prof. Zhengkai Liu Dr. Rong Zhang
39
4.5 Color Image Enhancementg4.5.1 Introduction: review
Primary colors of lightRotate slowly
Color wheel
Digital Image Processing Prof. Zhengkai Liu Dr. Rong Zhang
40
y
4.5 Color Image Enhancementg4.5.1 Introduction: review
[ ] [ ] [ ]C X R Y G Z B= + + Hue 色调[ ] [ ] [ ]C X R Y G Z B+ + Hue 色调
Saturation饱和度Eg:Red 1[R]+0[G]+0[B]
Intensity辉度
Chroma 色度
Red=1[R]+0[G]+0[B]Yellow=1[R]+1[G]+0[B]
Cyan=0[R]+1[G]+1[B] Chroma 色度Cyan 0[R] 1[G] 1[B]Magenta=1[R]+0[G]+1[B]
Black=0[R]+0[G]+0[B]White=1[R]+1[G]+1[B]
Digital Image Processing Prof. Zhengkai Liu Dr. Rong Zhang
41
4.5 Color Image Enhancementg4.5.1 Introduction: review
If the tristimulus values are denoted, X,Y and Z, then h i h i ffi i d fi d
(2.3.1)Xx =
the trichromatic coefficients are defined as:
(2 3 2)
xX Y Z+ +
Yy (2.3.2)yX Y Z
=+ +
Z(2.3.3)(2 3 4)
ZzX Y Z
=+ +
1x y z+ + =Digital Image Processing
Prof. Zhengkai Liu Dr. Rong Zhang42
(2.3.4)1x y z+ + =
4.5 Color Image Enhancement
Color Fundament: CIE chromaticity diagram
g4.5.1 Introduction: review
Color Fundament: CIE chromaticity diagram
Digital Image Processing Prof. Zhengkai Liu Dr. Rong Zhang
43
4.5 Color Image Enhancement
Color Model: RGB model
g4.5.1 Introduction: review
Color Model: RGB model
Digital Image Processing Prof. Zhengkai Liu Dr. Rong Zhang
44
4.5 Color Image Enhancement
Color Model: RGB model
g4.5.1 Introduction: review
Color Model: RGB model
Digital Image Processing Prof. Zhengkai Liu Dr. Rong Zhang
45
4.5 Color Image Enhancement
Color Model: RGB model
g4.5.1 Introduction: review
Color Model: RGB model
Digital Image Processing Prof. Zhengkai Liu Dr. Rong Zhang
46
4.5 Color Image Enhancement
Color Model: safe colors of RGB model
g4.5.1 Introduction: review
Digital Image Processing Prof. Zhengkai Liu Dr. Rong Zhang
47
4.5 Color Image Enhancement
Color Model: CMY model
g4.5.1 Introduction: review
Color Model: CMY model
⎡ ⎤ ⎡ ⎤ ⎡ ⎤11
C RM G⎡ ⎤ ⎡ ⎤ ⎡ ⎤⎢ ⎥ ⎢ ⎥ ⎢ ⎥= −⎢ ⎥ ⎢ ⎥ ⎢ ⎥
1Y B⎢ ⎥ ⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥ ⎢ ⎥⎣ ⎦ ⎣ ⎦ ⎣ ⎦
Digital Image Processing Prof. Zhengkai Liu Dr. Rong Zhang
48
4.5 Color Image Enhancement
Color Model: CMY model
g4.5.1 Introduction: review
Color Model: CMY model
Digital Image Processing Prof. Zhengkai Liu Dr. Rong Zhang
49
4.5 Color Image Enhancement
Color Model: HSI model
g4.5.1 Introduction: review
Color Model: HSI model
• Hue: associated with the dominant wavelength in a mixture of light waves
• Saturation: refer to the relative purity or the amount of white light mixed with hue.
• Intensity: brightness
Digital Image Processing Prof. Zhengkai Liu Dr. Rong Zhang
50
4.5 Color Image Enhancement
Color Model: HSI model
g4.5.1 Introduction: review
Color Model: HSI model
Digital Image Processing Prof. Zhengkai Liu Dr. Rong Zhang
51
4.5 Color Image Enhancement
Color Model: HSI model
g4.5.1 Introduction: review
Color Model: HSI model
Digital Image Processing Prof. Zhengkai Liu Dr. Rong Zhang
52
4.5 Color Image Enhancement
Color Model: HSI model
g4.5.1 Introduction: review
Color Model: HSI model
Color H S IColor H S IRed 0 1 0.5
Green 120 1 0.5G ee 0 0.5Blue 240 1 0.5
White 0 0 1Black 0 0 0
Digital Image Processing Prof. Zhengkai Liu Dr. Rong Zhang
53
Digital Image Processing Prof. Zhengkai Liu Dr. Rong Zhang
54
4.5 Color Image Enhancementg4.5.1 Introduction: review
R G BR G B
H S IDigital Image Processing
Prof. Zhengkai Liu Dr. Rong Zhang55
H S I
4.5 Color Image Enhancementg4.5.1 Introduction: review
The answer is:
Digital Image Processing Prof. Zhengkai Liu Dr. Rong Zhang
56
4.5 Color Image Enhancement
Color Model: converting colors from RGB to HSI
g4.5.1 Introduction: review
Color Model: converting colors from RGB to HSI1 ( )I R G B= + +
(2.3.5)( )
331 [ i ( )]S R G B31 [min( , , )]
( )S R G B
R G B= −
+ +
[( ) ( )] / 2R G R B⎧ ⎫+
(2.3.6)
2 1/ 2
[( ) ( )] / 2arccos[( ) ( )( )]
R G R BR G R B G B
θ⎧ ⎫− + −
= ⎨ ⎬− + − −⎩ ⎭ (2 3 7)
360H
θθ
⎧= ⎨ −⎩
(2.3.7)
others
B G≤
Digital Image Processing Prof. Zhengkai Liu Dr. Rong Zhang
57
⎩
4.5 Color Image Enhancement
Color Model: converting colors from HSI to RGB
g4.5.1 Introduction: review
Color Model: converting colors from HSI to RGB
RG Sector: 0 120o oH≤ <
(2 3 8)(2.3.8)(1 )B I S= −cosS H⎡ ⎤
(2.3.9)cos1
cos(60 )S HR I
H⎡ ⎤
= +⎢ ⎥−⎣ ⎦。
(2.3.10)
cos(60 )H⎣ ⎦3 ( )G I B R= − +
Digital Image Processing Prof. Zhengkai Liu Dr. Rong Zhang
58
( )( )
4.5 Color Image Enhancement
Color Model: converting colors from HSI to RGB
g4.5.1 Introduction: review
Color Model: converting colors from HSI to RGB
GB Sector: 120 240o oH≤ <
(2.3.11)(1 )R I S= − ( )(1 )R I S=
( )120S H⎡ ⎤。 (2.3.12)( )cos 1201
cos(180 )S H
G IH
⎡ ⎤−⎢ ⎥= +
−⎢ ⎥⎣ ⎦
。
。
(2.3.13)⎢ ⎥⎣ ⎦
3 ( )B I R G= − +Digital Image Processing
Prof. Zhengkai Liu Dr. Rong Zhang59
4.5 Color Image Enhancement
Color Model: converting colors from HSI to RGB
g4.5.1 Introduction: review
Color Model: converting colors from HSI to RGB
BR Sector: 240 360o oH≤ <
(2.3.14)(1 )G I S= −
(2 3 15)cos( 240 )1 S HB I⎡ ⎤−+⎢ ⎥
。
(2.3.15)1cos(300 )
B IH
= +⎢ ⎥−⎣ ⎦。
(2.3.16)3 ( )R I G B= − +
Digital Image Processing Prof. Zhengkai Liu Dr. Rong Zhang
60
4.5 Color Image Enhancement
Color Model: converting colors from HSI to RGB
g4.5.1 Introduction: review
Color Model: converting colors from HSI to RGB
Digital Image Processing Prof. Zhengkai Liu Dr. Rong Zhang
61
4.5 Color Image Enhancement
Color Model: converting colors from HSI to RGB
g4.5.1 Introduction: review
Color Model: converting colors from HSI to RGB
Digital Image Processing Prof. Zhengkai Liu Dr. Rong Zhang
62
4.5 Color Image Enhancementg4.5.2 Pseudo color image processing : Intensity Slicingformula
( , ) if ( , )k kf x y c f x y V= ∈
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
63
4.5 Color Image Enhancementg4.5.2 Pseudo color image processing : Intensity Slicingexample
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
64
4.5 Color Image Enhancementg4.5.2 Pseudo color image processing : Intensity Slicingexample
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
65
4.5 Color Image Enhancementg4.5.2 Pseudo color image processing : Gray level to color
In general we perform three independent transformationsIn general, we perform three independent transformations on the gray level of any input pixel
1
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
66
4.5 Color Image Enhancementg4.5.2 Pseudo color image processing : Gray level to colorFor example
t ftransforms
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
67
4.5 Color Image Enhancementg4.5.2 Pseudo color image processing : Gray level to color
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
68
4.5 Color Image Enhancementg4.5.2 Pseudo color image processing : Gray level to color
Combine several monochrome images into a single color compositeCombine several monochrome images into a single color composite
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
69
4.5 Color Image Enhancementg4.5.2 Pseudo color image processing : Gray level to color
band1 band2 band3 band1 2 3 false colorba d band2 band3 band1,2,3 false color
band5 band4 band3 band5,4,3 false colorDigital Image Processing
Prof.Zhengkai Liu Dr.Rong Zhang70
, ,
4.5 Color Image Enhancementg4.5.2 Pseudo color image processing : Gray level to color
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
71
4.5 Color Image Enhancementg4.5.3 Full color enhancement : Fundamentals
A full color image can be expressed asA full color image can be expressed as
( , ) ( , )Rc x y R x y⎡ ⎤ ⎡ ⎤( , ) ( , )( , ) ( , ) ( , )
( , ) ( , )
R
G
B
c x y R x yc x y c x y G x y
c x y B x y
⎡ ⎤ ⎡ ⎤⎢ ⎥ ⎢ ⎥= =⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥⎣ ⎦ ⎣ ⎦
A pixel in color image interpreted as vector
R
G
B
c Rc c G
c B
⎡ ⎤ ⎡ ⎤⎢ ⎥ ⎢ ⎥= =⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥⎣ ⎦ ⎣ ⎦B⎣ ⎦ ⎣ ⎦
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
72
4.5 Color Image Enhancementg4.5.3 Full color enhancement : Fundamentals
Mask operation in color imageMask operation in color image
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
73
4.5 Color Image Enhancementg4.5.3 Full color enhancement : Color transformations
Adjusting the intensity of an image:j g y g
in RGB color space three components must be transformed:
1, 2,3 0 1i is kr i k= = < <
in HSI color space only intensity components is modified:s kr3 3 s krs r==1 1
2 2
s rs r==
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
74
2 2
4.5 Color Image Enhancementg4.5.3 Full color enhancement : Color transformations
I HS
S HI
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
75
4.5 Color Image Enhancementg4.5.3 Full color enhancement : Color Complement
in RGB color space three components must be transformed:in RGB color space three components must be transformed:
1 1 2 3 0 1s r i k= − = < <1 1, 2,3 0 1i is r i k= − = < <in HSI color space only intensity components is modified:
1 1( +0.5) s r=
2 2s r=
3 31s r= −
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
76
4.5 Color Image Enhancementg4.5.3 Full color enhancement : Color Complement
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
77
4.5 Color Image Enhancementg4.5.3 Full color enhancement : color corrections
In RGB and CMY(K) space, map all tree (or four) ( ) p , p ( )color components with the same transform function
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
78
4.5 Color Image Enhancementg4.5.3 Full color enhancement : color corrections
examplep
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
79
4.5 Color Image Enhancementg4.5.3 Full color enhancement : color corrections
example
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
80
4.5 Color Image Enhancementg4.5.3 Full color enhancement : color corrections
example
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
81
4.5 Color Image Enhancementg4.5.3 Full color enhancement : Histogram processingIn the HSI color space, only the intensity component is modified
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
82
4.5 Color Image Enhancementg4.5.3 Full color enhancement : Histogram processing
originalI Histogram RGB Histogram
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
83
original EqualizationRGB HistogramEqualization
4.5 Color Image Enhancementg4.5.3 Full color enhancement : Smoothing and Sharping
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
84
4.5 Color Image Enhancementg4.5. 6 Noise in color image :Noise in RGB channels
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
85
4.5 Color Image Enhancementg4.5. 6 Noise in color image :Noise in HSI channels
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
86
Questions?4.20 在一条自动装配线上,有三类形状相同的工件,为了检测
方便,将工件用不同颜色标注,现只有1个单色摄象机,请
Questions?
方便,将工件用不同颜色标注,现只有1个单色摄象机,请提出一种用这个摄象机检测3种颜色的方法。
4.21设有一个能输出RGB模拟信号的彩色摄象机,一个能将这些模拟信号转化为以(1/30)s的视频速度输出RGB或HIS图象的数字化器 3块能以视频速度接受图象的帧缓存卡 以及 个的数字化器,3块能以视频速度接受图象的帧缓存卡,以及一个能以视频速度计算直方图的硬件。所有这些都可以与1台微机组合在一起,现要解决以下问题:生产线上有一系列形状相同但合在 起,现要解决以下问题:生产线上有 系列形状相同但颜色不同的工件,他们按红、黄、绿、蓝的次序排列。请借助以上硬件设计一个图象处理软件系统将工件的的颜色检测出来。这里假设工件移动速度相当慢,所以可忽略由此产生的图象模糊问题,请画出系统的流程图并对每个模块及所选处理技术进行讨论
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
87
行讨论。
Homework:
Page 99 (章): 4.2 为什么一般情况下对离散图象的直方图均衡并不能产生完全为什么 般情况下对离散图象的 方图均衡并不能产 完全
平坦的直方图?
设已用直方图均衡化技术对 幅图象进行了增强 试证明再4.3 设已用直方图均衡化技术对一幅图象进行了增强,试证明再用这个方法对所得结果增强并不会改变其结果
4.13讨论用于空间滤波的平滑滤波器和锐化滤波器的相同点、不同点以及联系。同点以及联系
4.17有一种常用的图象增强技术是将高频增强和直方图均衡化结合起来以达到使边缘锐化的反差增强效果 以上两个操作的先合起来以达到使边缘锐化的反差增强效果,以上两个操作的先后次序对增强结果有影响吗?为什么?
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
88
The End
Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang
89
Recommended