Phase correlation
From Wikipedia, the free encyclopedia
Phase correlation is a frequency domain approach to determine the relative translative movement between two images.
Contents |
[edit] Method
Given two input images ia and ib:
Apply a window function (e.g the Hamming window) on both images to reduce edge effects. Then, calculate the discrete 2D Fourier transform of both images.
Take the complex conjugate of the second image. Multiply the Fourier transforms together elementwise. Normalize this product elementwise (yielding a normalized cross power spectrum).
Inverse transform the normalized cross power spectrum.
Determine peak in inverse transform (possible using sub-pixel edge detection).
- (Δx,Δy) = argmaxΔx,Δy{PC}
[edit] Proof
The proof is based on the Fourier shift theorem. Given two images, ia and ib, which are translated versions of each other:
then, the discrete Fourier transform of the images will be shifted relatively in phase:
One can then calculate the normalized cross correlation (NCS) to factor out the phase difference:
since the magnitude of a complex exponential always is one, and the phase of always is zero. Altogether, this results in a single peak at (Δx,Δy) after an inverse Fourier transform:
- PC = δ(x + Δx,y + Δy)
[edit] Example
The following image demonstrates the usage of phase-correlation to determine relative translative movement between two images corrupted by independent gaussian noise. One can clearly see a peak in the phase-correlation spectrum approximately at (30,33).
[edit] See also
[edit] References
- E. De Castro and C. Morandi "Registration of Translated and Rotated Images Using Finite Fourier Transforms", IEEE Transactions on pattern analysis and machine intelligence, Sept. 1987