Assignment 2
Assignment 2
Assignment 2
Compute the inverse (ifft2, real) and display it using subplot, imagesc, log10 and abs.
Why do we have to use the absolute value when displaying the DFT?
Display the centralized DFT by applying fftshift. It has index (0,0) in the middle of the image.
Where, in the centralized DFT, do you find the low frequency values and where do you find the high
frequency values?
[x,y]=meshgrid(-127:128,-127:128);
z=sqrt(x.^2+y.^2);
filMask1=(z<20); % radius of the mask
Perform pixel-wise multiplication of filMask1 and the centralized DFT image, and display the result,
say “filDFT1”.
Perform the inverse process of fftshift (using ifftshift) on “filDFT1” to take indices back to their
original locations, and then apply ifft2 to get the image in spatial domain.
Page 1 of 2
Describe the resultant image by inspecting the operations that you have performed. Justify your
answer by changing the radius of the mask to 5, 10, 50, 100.
Here, you should justify your answer by changing one or both radii, but the first radius should be
less than the second.
Page 2 of 2