Image Enhancement – Frequency Domain Filter
Document Sample


Digital Image Processing
Image Enhancement – Frequency Domain
Filter
School of Electronics & Information Engineering
Soochow University
Digital Image Processing
Image Enhancement - 3
Outline
Frequency vs. spatial domain
Different approaches
2
Digital Image Processing
1-D Discrete Fourier Transform
f(x), x=0,1,…,M-1 . discrete function
F(u), u=0,1,…,M-1. DFT of f(x)
Forward discrete Fourier transform:
M 1 j 2
u
1
x
F (u ) f ( x )e M
M x 0
Inverse transform:
M 1 j 2
u
F (u )e
x
f ( x) M
u 0
3
Digital Image Processing
2-D DFT
2-D: x-axis then y-axis
N 1 M 1 j 2 (
u
x
v
1
f ( x, y)e
y)
F (u, v) M M
MN y 0 x 0
M 1 N 1 j 2 (
u
x
v
F (u , v)e
y)
f ( x, y ) M M
u 0 v 0
4
Digital Image Processing
Complex Quantities to Real Quantities
Useful representation
magnitude
F (u, v) [ R (u, v) I (u, v)]
2 2 1/ 2
I (u , v) phase
(u , v) tan [ 1
]
R (u , v)
Power spectrum
P(u, v) F (u, v) R 2 (u, v) I 2 (u, v)
2
5
Digital Image Processing
DFT: example
log(F)
7
Digital Image Processing
Fourier Transform
FT – example 1
8
Digital Image Processing
Fourier Transform
FT – example 2
9
Digital Image Processing
Fourier Transform
FT – example 2
10
Digital Image Processing
Properties in the frequency domain
Fourier transform works globally
No direct relationship between a specific components in an image and
frequencies
Intuition about frequency
Frequency content
Rate of change of gray levels in an image
11
Digital Image Processing
+45,-45 degree
artifacts
12
Digital Image Processing
Image Enhancement - 3
Frequency vs. spatial domain
Enhancement in frequency domain in principle is
straightforward. However, it makes more sense to filter
in the spatial domain using small filter masks.
The relationship between frequency and spatial domain
is the convolution theorem
Select H(u,v) so that the desired image g(x,y) exhibits
some highlighted features of f(x,y)
g ( x, y) f ( x, y) * h( x, y) G(u, v) F (u, v) H (u, v)
g ( x, y) F 1F (u, v) H (u, v)
13
Digital Image Processing
Image Enhancement - 3
Frequency vs. spatial domain
14
Digital Image Processing
Image Enhancement - 3
Basic steps in the frequency domain
15
Digital Image Processing
Image Enhancement - 3
Different approaches
Lowpass filters
Ideal Lowpass filters
Butterworth Lowpass filters
Gaussian Lowpass filters
Highpass filters
Homomorphic filters
16
Digital Image Processing
Image Enhancement - 3
Lowpass filters
1, if D(u, v) D0
Ideal filters :H (u, v)
0, if D(u, v) D0
D(u,v) : distance from point (u,v) to the original
D0 : cutoff frequency
Ideal filter is nonphysical
Radially symmetric about the original
Special case : notch filter
Power ratio of enhanced and original image
100 P(u, v) / PT
u v
17
Digital Image Processing
Image Enhancement - 3
Lowpass filters – notch filter
H ( M / 2, N / 2) 0
18
Digital Image Processing
Image Enhancement - 3
Lowpass filters – ideal lowpass filter
19
Digital Image Processing
Image Enhancement - 3
Lowpass filters – ideal lowpass filter
20
Digital Image Processing
Image Enhancement - 3
Lowpass filters – ideal lowpass filter
21
Digital Image Processing
Image Enhancement - 3
Lowpass filters – ideal lowpass filter
The blurring and ringing phenomenon
22
Digital Image Processing
Image Enhancement - 3
Lowpass filters - Butterworth
Butterworth lowpass filters
1
H (u , v)
1 D (u , v) / D0
2n
23
Digital Image Processing
Image Enhancement - 3
Lowpass filters – Butterworth examples
24
Digital Image Processing
Image Enhancement - 3
Lowpass filters – Butterworth examples
25
Digital Image Processing
Image Enhancement - 3
Lowpass filters - Gaussian
Guassian lowpass filters
D2 (u ,v ) / 2 2
H (u, v) e
26
Digital Image Processing
Image Enhancement - 3
Lowpass filters - Gaussian
27
Digital Image Processing
Image Enhancement - 3
Highpass filters
H hp (u , v) 1 H lp (u , v)
0, if D(u, v) D0
Ideal filters : H (u, v)
1, if D(u, v) D0
1
Butterworth highpass : H (u , v)
1 D0 / D (u , v)
2n
D2 (u ,v ) / 2 D0
2
Gaussian lowpass : H (u, v) 1 e
28
Digital Image Processing
Image Enhancement - 3
Highpass filters (cont’)
29
Digital Image Processing
Spatial-domain HPF
ideal Butterworth Gaussian
negative 30
Digital Image Processing
original
Ideal high-pass filters
0 if D(u, v) D0
H (u, v)
1 if D(u, v) D0
ringing
D0=15 D0=30 D0=80
31
Digital Image Processing
Butterworth high-pass filters
1
H (u , v)
1 [ D0 / D(u , v)] 2 n
n=2, D0=15 D0=30 D0=80
32
Digital Image Processing
Gaussian high-pass filters
D2 (u ,v ) / 2 D0
2
H (u, v) 1 e
D0=15 D0=30 D0=80
33
Digital Image Processing
Laplacian frequency-domain filters
Spatial-domain Laplacian (2nd derivative)
2 f 2 f
2 f 2 2
x y
Fourier transform
n f ( x)
( ju) n F (u )
x n
2 f ( x, y ) 2 f ( x, y )
( ju ) 2 F (u , v) ( jv) 2 F (u , v)
x 2 y 2
(u 2 v 2 ) F (u , v)
34
Digital Image Processing
Laplacian frequency-domain filters
Input
F(u,v)
f(x,y) F
Laplacian -(u2+v2)
2 f 2 f
2 f 2 2
x y -(u2+v2)F(u,v)
F
The Laplacian filter in the frequency domain is
H(u,v) = -(u2+v2)
35
0 Digital Image Processing
H(u,v) = -(u2+v2) frequency
36
spatial
Digital Image Processing
original Laplacian
Scaled original+
Laplacian Laplacian
37
Digital Image Processing
Image Enhancement - 3
Homomorphic filters
A simple image model: illumination–reflection model
f(x,y) : the intensity is called gray level for monochrome image
f(x,y)=i(x,y)*r(x,y)
0<i(x,y)<inf, the illumination
0<r(x,y)<1, the reflection
38
Digital Image Processing
Image Enhancement - 3
Homomorphic filters (cont’)
The illumination component
Slow spatial variations
Low frequency
The reflectance component
Vary abruptly, particularly at the junctions of dissimilar objects
High frequency
Homomorphic filters
Effect low and high frequency differently
Compress the low frequency dynamic range
Enhance the contrast in high frequency
39
Digital Image Processing
Image Enhancement - 3
Homomorphic filters (cont’)
40
Digital Image Processing
Image Enhancement - 3
Homomorphic filters (cont’)
f(x,y)=i(x,y)*r(x,y)
z(x,y)=ln f(x,y) = ln i(x,y) + ln r(x,y)
F{z(x,y)} = F{ln i(x,y)} + F{ln r(x,y)}
S(u,v) = H(u,v) I(u,v) + H(u,v) R(u,v)
s(x,y) = i’(x,y) + r’(x,y)
g(x,y) = exp[s(x,y)] = exp[i’(x,y)]exp[r’(x,y)]
41
Digital Image Processing
Image Enhancement - 3
Homomorphic filters (cont’)
42
Digital Image Processing
Image Enhancement - 3
Homomorphic filters - example
H (u, v) ( H L )[1 e c ( D2 ( u ,v ) / D0
)] L
2
43
Related docs
Get documents about "