# Variant of discrete fourier transform that isolates phase delay?

I'm not quite sure of the mathematical terminology here but...

Is there a variant (or post-processing) of a Discrete Fourier Transform that separates the shape of a signal from any phase shift applied to the whole signal?

For example this image:

and this one:

should differ in at most 2 coefficients (one for each dimension in which it is shifted) in the frequency domain.

Alternatively is there a way to index images so that any image can be found in a database given a translated copy as a key?

Notes

1. My images are all 1D or 2D with power-of-two sizes (but not necessarily square.)
2. This project has nothing to do with OCR (even though I used a character glyph in the example.) Please do not suggest OCR-specific algorithms/libraries!
• You should be able to do this by taking a normal FFT, calculating the phase for each bin (atan2(re, im)), then performing phase unwrapping. See e.g. ljmu.ac.uk/GERI/90202.htm and ccrma.stanford.edu/~jos/fp/Phase_Unwrapping.html – Paul R Jul 12 '11 at 5:52
• It should be mentioned that 2+D phase unwrapping is a hard problem. – Emanuel Landeholm Oct 1 '11 at 12:19
• Look up phase transform (PHAT) – Phonon Jul 3 '12 at 16:52
• You may be able to use the DFT. A circular shift in the time/spatial domain like what you've shown will show up as a phase shift that varies linearly with frequency. Perhaps that is useful? – Jason R Jul 3 '12 at 17:38
• It's a translation. I'll edit the question as it is confusing; I used the word "rotation" in the sense of bitwise rotation. – finnw Jul 11 '12 at 7:12