Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

So you find the rvec and tvec to each marker. Let's say A and B. So you know where the camera is relative to each marker.

What you need to do is invert one (I can never remember which one, I think B) and then yes, chain it to the other one.

You invert by using this bit of code.

Rodrigues(rotation, R);
R = R.t();
translation = -R * translation;
Rodrigues(R, rotation);

Then you use the function composeRT to do the actual chaining. Then you know where B is, so once A passes from the frame and C shows up, you can do the same, just not starting from 0,0,0.