In the pinhole camera model, I can get the homography 3x3 matrix of two images.

My problems is: provided an camera intrinsic matrix(the projection matrix), can I find the find the rotation matrix R and the translation matrix T from the 3x3 homography matrix?

I have found some of the following code here:

https://gist.github.com/inspirit/740979

There are two things I am confused:

1.Why the svd decomposition and then multiply vu again to get the rotation matrix again? 2.Can I simulate arbitrary camera intrinsic parameters? or the camera intrinsic parameters is determined by the homography matrix. Because as the code in the above link shows: ||r1|| == ||r2||, supposed R=CxH, R is the rotation matrix, C is the inverse of the projection matrix, H is the homography matrix,

r1 = lambdaCxH1 r2 = lambdaCxH2

as ||CxH1|| must be the same as ||CxH2||, I have an intuition that once H1 and H2 is known, c can not be arbitrary to meet the condition that ||r1|| == ||r2||.

But if C can not be simulated, how I can get the camera parameters, and if I get get camera parameters, but if the calculation has minor erros, how can I made up for this?

Thank you.