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.

\mathbf{I}_a = \mathcal{F}\{i_a\}, \; \mathbf{I}_b = \mathcal{F}\{i_b\}

Take the complex conjugate of the second image. Multiply the Fourier transforms together elementwise. Normalize this product elementwise (yielding a normalized cross power spectrum).

NCS = \frac{ \mathbf{I}_a \mathbf{I}_b^*}{|\mathbf{I}_a \mathbf{I}_b^*|}

Inverse transform the normalized cross power spectrum.

PC = \mathcal{F}^{-1}\{NCS\}

Determine peak in inverse transform (possible using sub-pixel edge detection).

xy) = argmaxΔxy{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:

i_b(x,y) \ \stackrel{\mathrm{def}}{=}\   i_a(x - \Delta x, y - \Delta y)

then, the discrete Fourier transform of the images will be shifted relatively in phase:

\mathbf{I}_b(u,v) = \mathbf{I}_a(u,v) e^{-2 \pi i (\frac{u \Delta x}{M} + \frac{v \Delta y}{N}) }

One can then calculate the normalized cross correlation (NCS) to factor out the phase difference:

NCS = \frac{ \mathbf{I}_a \mathbf{I}_b^*}{|\mathbf{I}_a \mathbf{I}_b^*|} = \frac{ \mathbf{I}_a \mathbf{I}_a^* e^{2 \pi i (\frac{u \Delta x}{M} + \frac{v \Delta y}{N}) }}{|\mathbf{I}_a \mathbf{I}_a^* e^{2 \pi i (\frac{u \Delta x}{M} + \frac{v \Delta y}{N}) }|} = \frac{ \mathbf{I}_a \mathbf{I}_a^* e^{2 \pi i (\frac{u \Delta x}{M} + \frac{v \Delta y}{N}) }}{|\mathbf{I}_a \mathbf{I}_a^*|} = e^{2 \pi i (\frac{u \Delta x}{M} + \frac{v \Delta y}{N}) }

since the magnitude of a complex exponential always is one, and the phase of \mathbf{I}_a \mathbf{I}_a^* always is zero. Altogether, this results in a single peak at xy) 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). Image:Phase correlation.png

[edit] See also

[edit] References