How do I get image point projected onto aruco board based on pose estimation?

asked 2019-10-07 10:21:09 -0600

genesys gravatar image

updated 2019-10-07 10:22:46 -0600

If I do

std::vector<int> markerIds;
std::vector<std::vector<cv::Point2f>> markerCorners;
cv::aruco::detectMarkers(inputImage, board.dictionary, markerCorners, markerIds);
// if at least one marker detected
if(markerIds.size() > 0) {
    cv::Vec3d rvec, tvec;
    int valid = cv::aruco::estimatePoseBoard(markerCorners, markerIds, board, cameraMatrix, distCoeffs, rvec, tvec);
}

I get the transformation of the arucoboard back via rvec and tvec.

But after that, how can I then project a specific point in the image plane (from 0,0 in the top left corner to 1,1 in the bottom right corner) onto the board, so that I get it in the coordinate frame of the board?

edit retag flag offensive close merge delete