2

I need to find out rotation angle and translation value using given images (Original and Transformed).

Original Image

Original Image

Transformed Image

Transformed Image

The Centroids for Original Image

The Centroids for Original Image

The Centroids for Transformed Image

enter image description here

After finding the centroids I have tried to determine rotation angle using the centroid points' coordinates. For example in the first image chimney's coordinates are (256,84) in the original image and (284,81) in the transformed image.

I have made a calculation like

angle = atan(abs(284-256)/abs(81-84))/pi*180;

But I have found different angles for different points.

I want to know how to determine rotation angle and translation value of the transformed image.

zkanoca
  • 9,664
  • 9
  • 50
  • 94
  • Your missing the correct centre of rotation, but in any case this is a possible duplicate of [How to know rotation degree in matlab for a rotated image?](http://stackoverflow.com/questions/18703995/how-to-know-rotation-degree-in-matlab-for-a-rotated-image) With MATLAB, try using [`fitgeotrans`](http://www.mathworks.co.uk/help/images/ref/fitgeotrans.html). – Roger Rowland May 08 '14 at 10:39
  • It's actually a simple application of SVD. There are some details [here](http://nghiaho.com/?page_id=671) and python and matlab code are at the bottom. – Raab70 May 08 '14 at 12:37
  • Thanks @Raab70. I have already read it – zkanoca May 08 '14 at 13:06

0 Answers0