Upcoming SlideShare
×

# Image fft

492 views

Published on

Fast Fourier Transform of images

Published in: Technology
0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

• Be the first to like this

Views
Total views
492
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
13
0
Likes
0
Embeds 0
No embeds

No notes for slide

### Image fft

1. 1. • >> I1=imread(lines1.png);• >> imshow(I1);• >> A1=fft2(I1);• >> A2=fftshift(A1);• >> imshow(A2);
2. 2. fft transform for the strip lines image
3. 3. Original image
4. 4. • I1=imread(lines1.png);• figure(1), imshow(I1);• A1=fft2(I1);• A2=fftshift(A1);• figure(2),imshow(A2);•• [m,n]=size(A2);•• %%%%%%%%%%%%%%%%%%%%%%%%%%%%%Here we retrieve part of the image fourier• %%%%%%%%%%%%%%%%%%%%%%%%%%%%%coefficients%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%• %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%•• A3=A2(0.4*m:m,0.4*n:n);•• figure(3),imshow(uint8(ifft2(A3)));•• title(Restructuring the image after removing some fourier coefficients);
5. 5. A3=A2(0.4*m:m,0.4*n:n);figure(3),imshow(uint8(abs((ifft2(A3)))));title(Restructuringthe image afterremoving somefouriercoefficients);
6. 6. • close all,clear all,clc• I1=imread(lines2.png);• figure(1), imshow(I1);• A1=fft2(I1);• A2=fftshift(A1);• [m,n]=size(A2);• nn=max(max(A2));• for i=1:m• for j=1:n• if A2(i,j)==nn• l=i• p=j• end• end• end• xx=(A2==nn);• figure(2),imshow(A2);•• [m,n]=size(A2);•• %%%%%%%%%%%%%%%%%%%%%%%%%%%%%Here we retrieve part of the image fourier• %%%%%%%%%%%%%%%%%%%%%%%%%%%%%coefficients%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%• %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%•• A3=A2(0.45*m:m,0.45*n:n);•• figure(3),imshow(uint8(abs((ifft2(A3)))));•• title(Restructuring the image after removing some fourier coefficients);
7. 7. The peak is at thecenter for vertical lines and horizontal lines