How to determine phase of a 2d sine grating image using fft

Hello everyone,

I have a question about FFT of an image.

I have two 2d singrating images and I want to mathematically find the phase shift between these images.

theoretically I know that there is a 120 degree phase difference between each image.

I have a few problems that I do not understand in my analysis in imagej.

1.bmp (2.1 MB)

some of the things I would like to ask for the region marked yellow in the fft spectrum image;

what does mean r value exactly (what is pixel per cycle), in figure r value is equal 6.04,
I know that theta value because this stripe orientation is 60 degree,
and last question,
I have two images like this, how can I calculate the phase difference between these two images?

Thank you all, and have a nice work.

Musa.

Hi,
r values means that between 2 repetitions, you have 6.04 pixels.
You can make a try with a grid image found on the internet. Make the FFT and check that r corresponds to the space between wires.
To compute the phase, you have to compute the complete FFT (with real and imaginary parts). To do so, you have to check “Compex FT” and “Do forward transform” under “Process > FFT > FFT Options”.
You will get a stack, the first slice gives you the Real part and the second the Imaginary part of the Fourier-spectrum.
Phase = arctan(val_Im/val_real)

Nico

Dear Nico,
Thank you for your answer,
I fully understood what is r value is and how it is calculated, thank you again,
but, I cant understand calculate of phase, rather, I cant understand which im_val and real value I should use. which peak value should I reference.

which of the numbered points 1 to 3 should be referenced in the image of the figure, and why?

Thank you for everything, You solved a very big problem of mine :slight_smile:
Musa.
2

Hi Musa,

2 is the central point ; it represents the continuous component of your image : the very low frequencies.
FFT is symetric, so 1 and 3 are the same. You can take one of them.

Nico

Hi Nico,
Thank for your reply, I understand now, and I calcuated phase as you described its correct with real phase number.
thank you for giving a time.
Best.
Musa.