Strange grid pattern in 2D Fourier transform
8 views (last 30 days)
Show older comments
Morgan Facchin on 14 Jan 2021
Answered: Hrishikesh Borate on 4 Feb 2021
I want to plot the phase of the 2D Fourier transform of a random phase mask with the following code:
Which gives this:
It has the expected global pattern, but there is an additional grid pattern on top of it.
Can anyone help me understand the origin of this and how to eliminate it?
Hrishikesh Borate on 4 Feb 2021
I understand that you are displaying phase spectrum of FFT of a mask. In the output image there is global grid pattern formed, which you are trying to remove.
One reason for this grid pattern is that mask_pad is not centered about zero, which results in a phase shift of the FFT output. The phase shift is essentially negating every other element (odd samples) of the output of the FFT which causes the high frequency oscillation you're observing (as explained here).
This can be corrected as follows :-
phase = angle(fftshift(fftshift((fft2(fftshift((mask_pad)))))));
More Answers (0)
Find more on Fourier Analysis and Filtering in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!