Hi! I have a micro robot with about height of 2.5cm and radius of 4cm.
On the top of the robot, I put a Aruco mark on it, and also at the bottom, there are two photoresistors which are very close to the ground.
cv::aruco::estimatePoseSingleMarkers(corners, length, cameraMatrix, distCoeffs, rvecs, tvecs)
I get rotation vector
rvecs and translation vector
tvecs of the maker.
tvecs is translation vector of the center of maker (in world coordinate).
axesPoints.push_back(Point3f(left_x, left_y,0)) axesPoints.push_back(Point3f(right_x, right_y,0))
left_y are X- and Y- axis coordinate of left photoresistor about center of maker, and
right_y are coordinates of right photoresistor.
cv::projectPoints(axesPoints, rvecs, tvecs, camera_matrix, distortion_coefficients, imagePoints)
to get the coordinates of two photoresistors in the image/pixel coordinate system. I can get
accurate coordinates of the two photoresistors just when the marker is directly below the camera, but in other positions, it’s a little bad.
Even if I take into account the height difference between the photoresistors and the marker,
axesPoints.push_back(Point3f(left_x, left_y,h)) axesPoints.push_back(Point3f(right_x, right_y,h))
it did not improve.
If I can get the translation and rotation of the plane where the photoresistors are located instead of the marker plane, I will get the exact coordinates of the photoresistors in the pixel coordinate system. However I don’t konw how to do it.
Or how can I get the accurate coordinates in the image/pixel coordinate system of two photoresistors by the maker on the top of robot.
Any hints would be appreciated