Calculating scale, rotation and translation from Homography matrix

Lakshya Kejriwal picture Lakshya Kejriwal · Sep 4, 2014 · Viewed 26.2k times · Source

I am trying to calculate scale, rotation and translation between two consecutive frames of a video. So basically I matched keypoints and then used opencv function findHomography() to calculate the homography matrix.
homography = findHomography(feature1 , feature2 , CV_RANSAC); //feature1 and feature2 are matched keypoints

My question is: How can I use this matrix to calculate scale, rotation and translation?.
Can anyone provide me the code or explanation as to how to do it?

Answer

Vineet picture Vineet · Mar 28, 2015