Digital Signal Processing Reference
In-Depth Information
EXAMPLE 14.11
Determine the 2D-DFT coefficients and magnitude spectrum for the following 2 2 image:
"
100 50
100 10
#
¼ p
0; 0
e
j
2pu0
þ p
0; 1
e
j
2pu0
e
j
2pv0
e
j
2pv1
2
2
2
2
þp
e
j
2pu1
2
þ p
e
j
2pu1
2
e
j
2pv0
2
e
j
2pv1
2
1; 0
1; 1
For u ¼ 0 and v ¼ 0, we have
X
0; 0
¼ 100e
j0
e
j0
þ 50e
j0
e
j0
þ 100e
j0
e
j0
10e
j0
e
j0
¼ 100 þ 50 þ 100 10 ¼ 240
For u ¼ 0 and v ¼ 1, we have
X
0; 1
¼ 100e
j0
e
j0
þ 50e
j0
e
jp
þ 100e
j0
e
j0
10e
j0
e
jp
¼ 100 þ 50 ð1Þþ100 10 ð1Þ¼160
Following similar operations,
X ð1; 0Þ¼60; and X ð1; 1Þ¼60
Thus, we have the following DFT coefficients:
"
240 160
60 60
#
X
u; v
¼
Using Equation
(14.17)
, we can calculate the magnitude spectrum as
"
60 40
15 15
#
A
u; v
¼
We can use the MABLAB function
fft2()
to verify the calculated DFT coefficients:
>> X¼fft2([100 50;100 -10])
X ¼
240 160
60 60
EXAMPLE 14.12
Given the 200 200 grayscale image shown in
Figure 14.35A
with a white rectangle (11 3 pixels) at its center
and a black background, we can compute its magnitude spectrum (which ranges from 0 to 255). We can display
the spectrum in terms of the grayscale.
Figure 14.35B
shows the spectrum image.
The displayed spectrum has four quarters. The left upper quarter corresponds to the frequency components,
and the other three quarters are the image counterparts. In the spectrum image, the upper left corner area in the
left upper quarter is white and hence has a highest scale value. Therefore, the image signal has low-frequency
Search WWH ::
Custom Search