# Revision history [back]

So you need to invert one of the rotation/translation matrices first.

Rodrigues(rvec1, R);
R = R.t();
t = (-R * tvec1);


That is the code to do that. The result there is the rotation and translation from the camera to the chessboard. If you chain that with the rotation and translation from the chessboard to the second camera, you have it's location and orientation with respect to the first camera (which is now all zeros in rvec and tvec).

Fortunately, OpenCV has a function for that, composeRT.

Give that a try and see if it helps.