1 | initial version |
Hi!,
in this line:
...
cv::projectPoints(TheMarkers[i],TheMarkers[i].Rvec,TheMarkers[i].Tvec,TheCameraParameters.CameraMatrix,TheCameraParameters.Distorsion,projectedPoints);
...
TheMarkers[i] is a std::vector<cv::Point2f>
, i.e. a vector composed by the 2D coordinates of the four marker's corners in the image.
You are trying to project 2D points, which is probably producing the error.
Anyway, I dont see the point of your project. You say you want to "define the camera position in world coordinates system using AR markers". You already have this information in TheMarkers[i].Rvec and TheMarkers[i].Tvec.
2 | No.2 Revision |
Hi!,
in this line:
...
cv::projectPoints(TheMarkers[i],TheMarkers[i].Rvec,TheMarkers[i].Tvec,TheCameraParameters.CameraMatrix,TheCameraParameters.Distorsion,projectedPoints);
...
TheMarkers[i] is a std::vector<cv::Point2f>
, (aruco::Marker
inherits from std::vector<cv::Point2f>
), i.e. a vector composed by the 2D coordinates of the four marker's corners in the image.
You are trying to project 2D points, which is probably producing the error.
Anyway, I dont see the point of your project. You say you want to "define the camera position in world coordinates system using AR markers". You already have this information in TheMarkers[i].Rvec and TheMarkers[i].Tvec.