Aruco giving weird rotations

asked 2018-05-14 06:33:08 -0500

changh95 gravatar image

I'm doing a simple aruco tracking on MATLAB, using mexopencv package.

Currently I'm using an overhead camera looking down on a 2D plane, where my aruco marker lies.

I want to see if the orientation accuracy of aruco markers are good or not. To do this, I plan to see if the rotation of 90, 180, 270 degrees on a 2D plane gives accurate results (ideally, I want to see [0,0,90],[0,0,180],[0,0,270]). I have recorded rvecs of the aruco marker at its origin position, after 90 degrees, 180 degrees, and 270 degrees rotation on the 2D plane. I turned the rvecs into a 3x3 matrix using cv.Rodrigues function. Hence,

  • M1 = 3x3 matrix of rvecs at origin position.
  • M2 = 3x3 matrix of rvecs after 90 degrees rotation.
  • M3 = 3x3 matrix of rvecs after 180 degrees rotation.
  • M4 = 3x3 matrix of rvecs after 270 degrees rotation.

I believe these matrices are relative to the camera frames, therefore essentially being orientation matrix. To find the rotation matrix between M1 and M2, I inversed M1, and then multiplied M2 on it (i.e. M2 * M1^-1). I used cv.Rodrigues on the output matrix to achieve the angles again. However, I'm getting some inconsistent results, especially on 180 degrees rotation as

  • 90 degrees rotation: cv.Rodrigues(M2*M1^-1) to show [-0.6,-4,90.3] degrees, this isn't too bad

  • 180 degrees rotation: cv.Rodrigues(M3M1^-1) to show [125,-4,126] degrees, it doesn't seem right*

  • 270 degrees rotation: cv.Rodrigues(M4*M1^-1) to show [0.9,3,-90] degrees, this isn't too bad either,

Is there something that I'm doing it wrong?

Thanks

edit retag flag offensive close merge delete