Lec 4 Frequency Domain Filtering-I
Lec 4 Frequency Domain Filtering-I
where
2D DFT
The 2D DFT is given by Z = T · A · T', where T is the matrix of the
1D DFT.
x 0 y 0
2D DFT
The matrix T is complex, that is, its elements are complex numbers, not
real numbers.
The same is generally true for the transform Z of an image. Its elements
have a real part R(u,v) and an imaginary part I(u,v) :
Log enhanced
Original image
Fourier transform
The spectrum of DFT
Why are the low frequencies at the four corners of the transform?
We will visualize the rows of the matrix, which give the basis of the
transform, by connecting these points with edges.
Low and high frequencies
The DFT matrix for n=7:
where
Low and high frequencies
A complex number can be described by the pair (r,φ) where r is its
distance from the origin and φ its angle with the x-axis.
If z1 = (r1 , φ1) and z2 = (r2 , φ2) are two complex numbers then:
z1 · z2 = (r1 · r2 , φ1 + φ2)
ωn = (1 , 2πn / 7)
Low and high frequencies
The visualisation of the first row of the matrix (first element of the new
basis) is trivial as there is only one point.
Low and high frequencies
The visualisation of the last row. We made one full clockwise circle.
Low and high frequencies
High frequencies
High
Low
Low
Low Low Low
High High
Shifted
Log enhanced
Original image log enhanced
transform
transform
Overview
f ( x, y ) h( x, y ) H (u, v) F (u, v)
The symbol on the left hand side denotes convolution. That is,
the usual linear filtering of the image f by the filter h, as described
earlier in the course.
Assume that the frequency domain has been shifted and the low
frequencies are at the centre of the transform.
Consider the filter H with values 1 near the centre of the image and
values 0 further from the centre.
Ideal lowpass filter
This filter retains the low frequencies and eliminates the high
frequencies.
1 if d (u, v) d 0
H (u, v)
0 if d (u, v) d 0
where d(u,v) is the distance of (u,v) from the centre of the filter and d0 is
a positive number (the radius of the white circle).
Lowpass filters
The ideal lowpass filter is discontinuous. Frequencies just inside the
white circle are preserved, while neighbouring frequencies just outside
the white circle are completely eliminated.
The details of the image correspond to the high frequencies of the DFT
and can be extracted by a highpass filter.
H highpass 1 H lowpass
Highpass filters
Shifted DFT