Skip to content

Commit c828c75

Browse files
author
AleksandrPanov
committed
add camera parameters for the tutorial
1 parent a22e5a8 commit c828c75

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

modules/aruco/tutorials/aruco_detection/aruco_detection.markdown

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,13 @@ The aruco module provides a function to estimate the poses of all the detected m
267267

268268
@code{.cpp}
269269
cv::Mat cameraMatrix, distCoeffs;
270+
// To work with examples from the tutorial, you can use these camera parameters:
271+
// Size imgSize = inputImage.size();
272+
// cameraMatrix = Mat::eye(3, 3, CV_64FC1);
273+
// cameraMatrix.at<double>(0, 0) = cameraMatrix.at<double>(1, 1) = 650;
274+
// cameraMatrix.at<double>(0, 2) = imgSize.width / 2;
275+
// cameraMatrix.at<double>(1, 2) = imgSize.height / 2;
276+
// distCoeffs = Mat(5, 1, CV_64FC1, Scalar::all(0));
270277
...
271278
std::vector<cv::Vec3d> rvecs, tvecs;
272279
cv::aruco::estimatePoseSingleMarkers(markerCorners, 0.05, cameraMatrix, distCoeffs, rvecs, tvecs);

0 commit comments

Comments
 (0)