DSPB301 NOTES - 7 The 2D DFT - 1
DSPB301 NOTES - 7 The 2D DFT - 1
DSPB301 NOTES - 7 The 2D DFT - 1
j 2
WN e N
is the defining relation for the DFT and IDFT and included in the 1D DFT and IDFT formula
as follows:
N 1
X DFT [k ] x[n]WNnk , k 0, 1, ..., N 1
n 0
1 N 1
x[n]
N k 0
X DFT [k ].WNnk , n 0, 1, ..., N 1
The first set of N DFT equations in N unknowns may be expressed in matrix form as X WNX
Where X and x and (Nx1) matrices , and WNX is a (NxN) square matrix called the DFT matrix (kernel).
1 1 1 1 4 4
1 j 1 j 2 j 8
*
DFT{ X DFT }
1 1 1 1 0 4
1 j 1 j 2 j 0
Finally, conjugate the above result, if complex and divide by N=4 to get the IDFT of X DFT [k ] .
1
IDFT{ X DFT [k ]} {4, 8, 4 0} {1, 2, 1, 0}
4
Example 3:
Calculate the 4-point DFT for the digital sequence x[n] {0, 1, 2, 3} using the matrix method.
Example 4:
1 1 1 1
1 1 1 1
f (m, n)
1 1 1 1
1 1 1 1
F (k , l ) k f (m, n) k T
1 1 1 1
1 j 1 j
ker nel T (Interchange rows and columns)
1 1 1 1
1 j 1 j
Solution:
F (u, v) k f (m, n) k T
1 1 1 1 1 1 1 1 1 1 1 1
1 j 1 j 1 1 1 1 1 j 1 j
F (u, v)
1 1 1 1 1 1 1 1 1 1 1 1
1 j 1 j 1 1 1 1 1 j 1 j
4 4 4 4 1 1 1 1 16 0 0 0
0 0 0 0 1 j 1 j 0
0 0 0
0 0 0 0 1 1 1 1 0 0 0 0
0 0 0 0 1 j 1 j 0 0 0 0
plot(t,x);
figure (2);
plot(df,x_mag);
f2=fft2(id);
figure(2), imshow (f2);
ft_shift=fftshift(f2);
imshow (log(1+abs(ft_shift)),[])