The BOTTOM LINE Quote Of The Day

The BOTTOM LINE Quote Of The Day

Don't Ever Tell GOD How BIG Your Problems are.
Just Tell Your Problems How BIG your GOD is ;)

Sunday, May 12, 2013

Finding Out the Fourier and Inverse Fourier Transform of an Image


A = [ 0 0 0 0 0 0 0 0;
         0 0 0 0 0 0 0 0;
         0 0 0 1 1 0 0 0;
         0 0 0 1 1 0 0 0;
         0 0 0 1 1 0 0 0;
         0 0 0 1 1 0 0 0;
         0 0 0 0 0 0 0 0;
         0 0 0 0 0 0 0 0]

iptsetpref('ImshowTruesize','manual') figure;
subplot(3,2,1); imshow(A); title('Original Image');
subplot(3,2,2); mesh(A); title('Mesh Plot of Original Image');

B = fft2(A);
subplot(3,2,3); imshow(B); title('2-D FFT of Original Image');
subplot(3,2,4); mesh(B); title('Mesh Plot of 2-D FFT');

C = ifft2(B);
subplot(3,2,5); imshow(C); title('Inv 2-D FFT of Above Image');
subplot(3,2,6); mesh(C); title('Mesh Plot of Inv 2-D FFT');

No comments:

Post a Comment