A. Anamorphic Property of the Fourier Transform
We tried to get the Fourier transform of a sinusoidal object similar to a corrugated roof. The first sinusoid has a frequency of 2. Its Fourier transform is shown as two dots above and below the center of the FFT and symmetric about the origin. We explored what would happen if we increase the frequency to 4. The two spots move further away from each other. We rotated the sinusoid. The FFT was rotated in the opposite direction. Next, we superpose a horizontal and a vertical sinusoid, both with frequency = 2, by simply adding them. The resulting FFT is the superposition of the FFTs of each sinusoid, since we already know that the FFT of the vertical sinusoid is the same as that of the horizontal sinusoid only that it is rotated 90 degrees.
B. Fingerprints: Ridge Enhancement
Here, we try to enhance the picture of a fingerprint in such a way as to make the ridges more visible. We created an aperture shown below which we multiplied by the Fourier transform of the fingerprint image.
We made sure that the position of the mask corresponds to that of the secondary bright spots in the fingerprint image's FFT.
Code:
mask = imread('square6.bmp');
finger = imread('fingerprint2.jpg');
maskgray = im2gray(mask);fingergray = im2gray(finger);
FFT_finger_mask = fft2(fingergray).*fftshift(maskgray);
Image_filtered = abs(ifft(fftshift(FFT_finger_mask)));
Image_filtered = Image_filtered-mean(mean(Image_filtered));
scf,imshow(Image_filtered,[]);
scf, imshow(fingergray,[]);
scf,imshow(log(fftshift(abs(fft2(fingergray)))),[]);
scf,imshow(log(fftshift(abs(FFT_finger_mask))),[]);
C. Lunar Landing Scanned Pictures: Line Removal
Here, we try to remove the vertical lines regarded as artifacts in the image. The original photo is taken from http://www.lpi.usra.edu/lunar/missions/apollo/apollo_11/images. We get the FFT transform of the image. If it fringe-free, we expect that it should only possess a DC component or a zero-order frequency indicated by a very bright central spot. However, if this is not the case, we expect the spots that are less bright than the DC would appear. For the original image with vertical lines, the FFT had horizontal slits to the left and right of the DC component. We therefore, make a mask that would cover these slits and multiply them to the FFT of the original image. We see in the final image, that the vertical lines reduced in visibility.
Code:
M = imread('hi_res_vertical_lg.gif');
K = imread('slit2.bmp');
K = im2gray(K);
FFT_M = fft2(M);
FFT_MK = FFT_M.*fftshift(K);
imshow(log(fftshift(abs(FFT_MK))),[]);
MK = (ifft(FFT_MK));
MKimage = abs(MKimage)/max(max(abs(MKimage)));
scf,imshow(abs(MK),[]);
scf,imshow(log(fftshift(abs(FFT_M))),[]);
scf,imshow(M,[]);
SELF-EVALUATION: 10/10.
Fun activity, practical but tedious.
Credits:
Ma'am Jing, Andrew Banas, Gerold Pedemonte and Beth Prieto for answering some of my questions.
1 comment:
grainy image quality. Bakit kaya?
Post a Comment