Rationale
The method is based on the Fourier shift theorem. Let the two images and be circularly-shifted versions of each other:
(where the images are in size).
Then, the discrete Fourier transforms of the images will be shifted relatively in phase:
One can then calculate the normalized cross-power spectrum to factor out the phase difference:
since the magnitude of an imaginary exponential always is one, and the phase of always is zero.
The inverse Fourier transform of a complex exponential is a Kronecker delta, i.e. a single peak:
This result could have been obtained by calculating the cross correlation directly. The advantage of this method is that the discrete Fourier transform and its inverse can be performed using the fast Fourier transform, which is much faster than correlation for large images.
Read more about this topic: Phase Correlation