0
votes

What is the Effect of decreasing phase and magnitude of the Fourier transform of an image? How can that be done with matlab? I have an image A, I want to set the phase of image A's Fourier transform zero then make the magnitude of the image A's transform zero and see the effect on the image.

What should I do?

enter code here
    image=imread('sample.tif');
    F=fft2(image);
    F2=fftshift(F);
    F_inverse=ifft2(F);
    subplot(2,2,1);imshow(image);
    title('Original Image');
    subplot(2,2,2);imshow(log(1+abs(F2)),[]);
    title('Fourier Spectrum');
    subplot(2,2,3);imshow(angle(F2),[-pi pi]);
    title('Fourier Phase');
    subplot(2,2,4);imshow(F_inverse,[]);
    title('Inverse Fourier');
1

1 Answers

1
votes
f1 = real(F);
f2 = imag(F);
magnitude = abs(F);
Fnew=real(ifft2(f0)); % set all phases to zero
figure,imagesc(Fnew)

The pixels are all zero if you set all the magnitude zero. You can set two parameters a and b by yourself, and observe the change of real(ifft2(a*f1 + i*b*f2)) with imagesc