How to find phase difference between two images?

26 views (last 30 days)
Hi everyone,
I am trying to find the phase difference between two images. These images are from a NIFTI (.nii) file. I had the opportunity to take MRI scans of people who recently underwent multiple concussions and my research is focused on verifying a potential new treatment. However, I'm stuck on this code and I would love any assistance you guys can provide.

Answers (1)

Sindhuja Parimalarangan
Sindhuja Parimalarangan on 2 Nov 2016
A displacement in image space results in linear phase in Fourier space. A possible workflow would be the following:
1. Use " imread " to store the image details in variables - say "image1" and "image2"
2. Calculate the phase factor, say "Q" using " fft2 " function (FFT on "image1" and the complex conjugate FFT on "image2"; and then multiply them by each other and divide by the absolute value of them multiplied by each other)
3. Transform "Q" back to image space using inverse Fourier transform (" ifft2 " function). This should give a peak whose position relative to the center of the image will provide the required shifts.


Find more on Biomedical Imaging 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!