I need to find the phase of the images.
71 views (last 30 days)
Hi,i need to find the phase of the images. I am really new to the MatLab software. when browsed about the same it is told to take fft2 of the images. Then want to take complex conjugate of the second image and so on. but when i done so i didn't get the expected result. Any guidence regarding the same will be helpful.
Constantino Carlos Reyes-Aldasoro on 22 Jul 2021
The image that you show could be that of a phase, but it is hard to judge from what you are showing. In any case, here is how this works. Take an image for instance the moon that Matlab has pre-installed.
Now, calculate the Fourier transform, notice that we will need to shift it to have the low frequencies in the centre:
image1_fft = fftshift(fft2(image1));
The Fourier transform returns a series of complex numbers (a + b*i):
With the complex numbers you can have the real part (0.5811) the imaginary part (1.7218), absolute value, or the phase, i.e. the angle. So, let's display them. First real and imaginary:
Now the absolute value (i.e. the magnitude)
It would seem that the image is empty, but the issue is that the centre is very very large as compared with the rest, to compensate let's use the log
Finally, let's look at the phase, or the angle
And there you go, that is the phase of the moon image.
Hope this helps. If this answers your question, please accept the answer. If not, do let me know.