# Re: Cross Power Spectrum and Image Registration

"Jameson" <rtgroups@xxxxxxxxxxx> wrote in message <fuag2t\$mvq\$1\$8302bc10@xxxxxxxxxxxxxxxx>...
I've managed to recover the correct parameters for a translated image and in
a separate test, for a rotated image, using phase correlation. When I
combine the transforms on the input image applying both a translation and a
rotation, the results seem to be wrong.

Here is my algorithm:

(1) Given image A and image to register with B
(2) Recover (x,y) as ArgMaxX(F) and ArgMaxY(F) of the cross power spectrum
of A and B
(3) Convert original images A and B to Log Polar Space, A' and B'
(4) Recover (s, a) as ArgMaxX(F) and ArgMaxY(F) of the cross power spectrum
of A' and B'

When the image to register is only translated, or only rotated, the correct
values are found. When I apply both a rotation and a translation to the
original image, incorrect values result (or perhaps my interpretation of
ArgMaxX and ArgMaxY needs to be modified).

For example:

(A) Translate by 10, 10 with a rotation of 0, results in RegX = 10, RegY =
10, RegAngle= 357.1875
(B) Translate by 0, 10 with a rotation of 0, results in RegX = 0, RegY =
10, RegAngle= 0
(C) Translate by 0, 0 with a rotation of 45, results in RegX = -52, RegY
= -93, RegAngle= 45
(D) Translate by 20, 20 with a rotation of 22.5, results in RegX = 0, RegY =
12, RegAngle= 0.75

So my questions are:

in the above results, would the angle in (A) of 357 [it should be zero] be
likely caused by not applying a filter on my log polar transform? Given the
results of (C), a simple rotation of 45 degrees is recovered, but what
should I do with RegX and RegY? They should be zero. Given the results of
(D), where translation is applied alongside rotation, how should I interpret
this result (x = 0, y = 12, angle = 0.75)?

And one final question, am I supposed to recover the angle of rotation,
rotate/scale the image and *then* apply the phase correlation to this new,
rotated image, in order to recover the correct translation? Or visa-versa?
Or simply do this in two passes on the original images.

I'm so close to getting this working!

Thanks for any assistance you can give me.

Can you please send me your code of transform and inverse transform of log polar code?
Thanks -- Jin

.