Calculating scale, rotation and translation from Homography matrix

if you can use opencv 3.0, this decomposition method is available http://docs.opencv.org/3.0-beta/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html#decomposehomographymat


The right answer is to use homography as it is defined dst = H ⋅ src and explore what it does to small segments around a particular point.

Translation

Given a single point, for translation do

T = dst - (H ⋅ src)

Rotation

Given two points p1 and p2

p1 = H ⋅ p1

p2 = H ⋅ p2

Now just calculate the angle between vectors p1 p2 and p1' p2'.

Scale

You can use the same trick but now just compare the lengths: |p1 p2| and |p1' p2'|.

To be fair, use another segment orthogonal to the first and average the result. You will see that there is no constant scale factor or translation one. They will depend on the src location.