Professional Documents
Culture Documents
03 Enhancement
03 Enhancement
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
Enhancement methods
Spatial Domain (in this chapter)
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
3.1 Background
3.2 Some basic gray level transformations
3.3 Histogram processing
3.4 Enhancement using arithmetic/logic operations
3.5 Basics of spatial filtering
3.6 Smoothing spatial filters
3.7 Sharpening spatial filters
3.8 Combining spatial enhancement methods
2002 R. C. Gonzalez & R. E. Woods
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
3.1 Background
Spatial domain methods operate directly on
image pixels
g (x, y ) = T [ f (x, y )]
(3.1 - 1)
s = T (r )
(3.1 - 2)
Mapping
Contrast Stretching
Thresholding
Binary Image
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
3.1 Background
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
3.1 Background
T operates with neighboring pixels
Mask (filter, kernel, template, window)
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
3.1 Background
m00
Mask = m10
m20
m01
m11
m21
m02
m12
m22
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
3.1 Background
Original
1
9
Mask = 1
9
Image 19
1
1
1
9
9
9
1
9
1
9
1
9
Processed Image
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
s = (L 1) r
(3.2 - 1)
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
Processed Image
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
s = c log(1 + r )
(3.2 - 2)
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
Original Image
Processed Image
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
s = cr
(3.2 - 3)
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
Original Image
Processed Image
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
Original Image
Processed Image
10
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
11
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
12
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
Transformation Function
s = T (r )
0 r 1
(3.3 - 1)
Conditions:
(a) T(r) is single valued and
monotonically increasing
(b) 0 T(r) 1 for 0 r 1
Inverse function
r = T 1 (s )
0 s 1
(3.3 - 2)
*(a)(b)
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
PDFs() of r and s
r pr
(r )
sps
(s ) = pr (r ) dr
ds
(3.3 - 3)
s3.3-1s
r
13
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
*(a)(b)
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
ps (s ) = pr (r )
dr
ds
14
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
Discrete Version
rk = k, nk rk
0 sk 1
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
Histogram Equalization
to produce an output image that has a uniform
histogram
procedures
Histogram
CDF()T()
T()
15
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
16
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
17
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
Discrete Version
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
18
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
Implementation
1.Histogram
2.(3.3-13) sk
3.(3.3-14)pz(z)G
4.(3.3-17) zk
5.2-4
rk sk
skzk
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
19
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
20
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
N-Norm
mean value
2-Norm
Standard Deviation
Sx,y
21
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
22
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
AND
OR
NOT
Arithmetic Operations
Substraction
Averaging
23
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
24
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
25
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
26
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
27
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
28
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
29
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
Max filter
Min filter
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
30
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
Second-order derivative
31
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
32
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
33
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
34
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
35
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
36
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
37
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
38
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
Digital
Digital Image
Image Processing,
Processing, 2nd
2nd ed.
ed.
www.imageprocessingbook.com
39