understanding of Fast Fourier Transform

5 views (last 30 days)
Rehan Ali
Rehan Ali on 10 Mar 2015
Edited: dpb on 10 Mar 2015
I am also working on same project... can anyone please tell me whats going on in fft enhancement i am unable to understand the loop as well as why we are diving picture into 32 by 32 pixel...!!!
function [final]=fftenhance(image,f)
I = 255-double(image);
[w,h] = size(I); %out = I;
w1=floor(w/32)*32; h1=floor(h/32)*32;
inner = zeros(w1,h1);
for i=1:32:w1
for j=1:32:h1
a=i+31;
b=j+31;
F=fft2( I(i:a,j:b) );
factor=abs(F).^f;
block = abs(ifft2(F.*factor));
larv=max(block(:));
if larv==0
larv=1;
end;
block= block./larv;
inner(i:a,j:b) = block;
end;
end;
%out(1:w1,1:h1)=inner*255;
final=inner*255;
%d=max(out(:)); %Find max pixel value in C.
%c=min(out(:));
%figure
%imshow(out,[c d]);

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!