DIP05-DFT Domain Image Filtering
DIP05-DFT Domain Image Filtering
Image Enhancement
in Frequency Domain
Contents
• Inverse Fourier transform: f ( x) F (u )e j 2ux du
The two-dimensional Fourier transform and its inverse
• Fourier transform (continuous case)
F (u , v) f ( x, y )e j 2 ( ux vy ) dxdy
• Inverse Fourier transform:
f ( x, y ) F (u , v)e j 2 ( ux vy ) dudv
M 1
1 j 2ux / M
F (u )
M
f ( x )e
x 0
for u 0,1,2,..., M 1
Power spectrum: 2
P(u ) F (u ) R 2 (u ) I 2 (u )
Rectangle
Its DFT
Impulses
Its DFT
M N
f ( x, y )(1) x y
F (u , v ) (shift)
2 2
M 1 N 1
1
F (0,0)
MN
f ( x, y)
x 0 y 0
(average)
shift
Image Enhancement in Frequency Domain 18
Properties of Fourier transform: Separable
DFT
DFT
A
DFT
B
DFT
0.25 * A
+ 0.75 * B
DFT
A
DFT
B DFT
Lowpass filter
Highpass filter
f ( x, y ) h( x, y ) F (u , v) H (u , v)
f ( x, y )h( x, y ) F (u , v) H (u , v)
One very useful property of the Gaussian function is that both it and
its Fourier transform are real valued; there are no complex values
associated with them.
In addition, the values are always positive. So, if we convolve an
image with a Gaussian function, there will never be any negative
output values to deal with.
There is also an important relationship between the widths of a
Gaussian function and its Fourier transform. If we make the width
of the function smaller, the width of the Fourier transform gets larger.
This is controlled by the variance parameter 2 in the equations.
These properties make the Gaussian filter very useful for lowpass
filtering an image. The amount of blur is controlled by 2. It can be
implemented in either the spatial or frequency domain.
Other filters besides lowpass can also be implemented by using two
different sized Gaussian functions.
Butterworth lowpass
filters (BLPFs)
n=2
D0=5,15,30,80,and 230
Gaussian Lowpass
Filters (FLPFs)
H hp (u , v) 1 H lp (u , v)
Ideal highpass filter
0 if D (u , v ) D0
H (u , v)
1 if D (u , v) D0
0 if D (u , v) D0
H (u , v)
1 if D (u , v) D0
D 2 ( u ,v ) / 2 D02
H (u , v) 1 e
Spatial domain
For display
purposes only
shift
Separability
Convolution
f ( x ) h( x )
M 1
1
M
f ( m) h( x m)
m 0
extend