Hi, I have 1 camera that see 4 arUcos placed in a box, as shown in the image below, and I’m trying to get the pair wise tranformations between all of them. For that, I’m using Opencv’s detectMarkers() and estimatePoseSingleMarkers() to get the pose of each marker with respect to the camera.

I then obtain rvecs and tvecs of each arUco and I use Rodrigues’ Formula to get a rotation matrix out of rvecs. Then, I build the transformation matrix between each arUco and the camera. After this I get the inverses of this matrices and multiply them like this:

M12 = inv(M_cam_1) * M_cam_2

The problem is the rotation between 1 → 3 is not the same as 1 → 4, and it should be and should also be 90º. Below are the matrices between arUco 1 and 3 and 4 respectivly.

Do any of you as any ideia what i might be doing wrong? Thanks in advance for the help.