
ECE468: HOMEWORK 4
due 02/05
1) (80pts) Problems from the textbook:
•4.17 (10pts)
•4.23 (10pts)
•4.26 (20pts)
•4.28 (20pts)
•4.29 (10pts)
•4.33 (10pts)
2) (20pts) Write a MATLAB code for computing the DFT of an image, F(u, v) = |F(u, v )|ejΦ(u,v)↔
f(x, y). Use the image for Problem 2 that is available on the class website as input. Your report
should include:
2.1) M-file with a well commented code;
2.2) Figure 1: Surface and contour plots of the magnitude |F(u, v)|, with labeled axes, in the hsv
colormap;
2.3) Figure 2: Surface and contour plots of the phase Φ(u, v), with labeled axes, in the hsv colormap;
2.4) Figure 3: Inverse DFT of F1(u, v)obtained from F(u, v )by setting all magnitude values of
F(u, v)to a nonzero constant c= 1;
2.5) Figure 4: Inverse DFT of F2(u, v)obtained from F(u, v )by setting all phase values of F(u, v)
to zero;
2.6) Which result looks more like the original image, the one in Figure 3 or the one in Figure 4?
(Hint: Use ‘surfc’, ‘fft2’, ‘fftshift’, ‘real’)