Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Pose of camera from the pose of marker

am currently working on a task to localize a vehicle using computer vision. Iḿ using openCV with c++. I implemented ArUco marker to get the pose of the camera placed on the vehicle.

I used "cv::aruco::estimatePoseSingleMarkers(markerCorners, markerLength, camMatrix, distCoeffs, rvecs,tvecs)" function to estimate pose of the marker. Later I found out that rvecs and tvecs are 1x1 arrays with 3 channels.(openCVDataType=CV_8UC3).

Now, I get R(3x3) matrix from cv::Rodrigues function say itś Ri. In order to get the pose of the camera wrt to marker, after a considerable amount of research I found out that the inverse transforms have to be taken. I got inverse if Ri. Now to get inverse of translation vector it is just the multiplication of the above inverse with the translation vector (tvecs). I am fairly new to c++ and my issues are: *

  • Is my approach correct in finding the pose of camera w.r.t marker.?

  • I am unable to change the tvecs into a mat object so that there is no multiplication error. How do I go about this?

I'm grateful for the suggestions/help received.