I have a image and I want calculate fft2 of it, after it I want recover image only by magnitude of it. how can I achieve this work?
I=imread('1.bmp');
I = rgb2gray(I);
imafft = fft2(double(I));
% Gets magnitude and phase.
mag = abs(imafft);
% Generates the modified spectrum
newfft = mag.*exp(0*angle(imafft));
ima_out = ifft2(newfft);
imshow(abs(ima_out));
this is return me white page.
No comments:
Post a Comment