Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Find rotational degree of an object by Two Dimensional Cross Correlation

[Background]

I am learning about two dimensional cross correlations (2DCC) to find how it can be applied to my current project. My current project is to make an efficient method to find displacement and rotation of an object on 2D surface.

To do this, I did the following experiment on my Software environment.

[Experiment]

  1. I have one 1024x1024 image with a duck located at its center.
    1024x1024 image with a duck located at center

  2. I have another 1024x1024 image with a duck located not at its center and rotated. 1024x1024 image with a duck at 752, 336 rotated 123

  3. Then, apply the two images to two dimensional cross correlation.
    I got the following amplitude and its peak index of cross correlation result almost matches to the duck displacement of my 2nd image.
    amplitude result of 2D Cross Correlation

  4. On the other hand, phase value at the index of corresponding amplitude peak does not match the duck rotation of my 2nd image. The expected phase value is 123[degree] as seen in 2nd image, but the actual value is very small.
    phase result of 2D Cross Correlation

[Question]

Is two dimensional cross correlation a right approach to recover the rotational degree of duck in this situation?

like image 938
Osamu Fujioka Avatar asked Sep 18 '25 15:09

Osamu Fujioka


1 Answers

The cross-correlation only yields a shift. What it does is compare the two images at all possible translations.

You computed the cross-correlation through the Fourier domain, and obtained a result that has very small imaginary values. These are the result of numerical inaccuracies, and should be ignored. The cross-correlation of two real-valued signals (or images) is a real-valued signal (or image).

To find the rotation, you should probably look into the Fourier-Mellin transform.

like image 158
Cris Luengo Avatar answered Sep 22 '25 11:09

Cris Luengo