From 4c77068196ffda575c100956f2a7fd910b0a4efa Mon Sep 17 00:00:00 2001 From: AleksandrPanov Date: Wed, 24 Nov 2021 10:22:41 +0300 Subject: [PATCH] add camera parameters for the tutorial --- .../tutorials/aruco_detection/aruco_detection.markdown | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/aruco/tutorials/aruco_detection/aruco_detection.markdown b/modules/aruco/tutorials/aruco_detection/aruco_detection.markdown index 741ee3c77aa..51f292b758d 100644 --- a/modules/aruco/tutorials/aruco_detection/aruco_detection.markdown +++ b/modules/aruco/tutorials/aruco_detection/aruco_detection.markdown @@ -267,6 +267,13 @@ The aruco module provides a function to estimate the poses of all the detected m @code{.cpp} cv::Mat cameraMatrix, distCoeffs; +// To work with examples from the tutorial, you can use these camera parameters: +// Size imgSize = inputImage.size(); +// cameraMatrix = Mat::eye(3, 3, CV_64FC1); +// cameraMatrix.at(0, 0) = cameraMatrix.at(1, 1) = 650; +// cameraMatrix.at(0, 2) = imgSize.width / 2; +// cameraMatrix.at(1, 2) = imgSize.height / 2; +// distCoeffs = Mat(5, 1, CV_64FC1, Scalar::all(0)); ... std::vector rvecs, tvecs; cv::aruco::estimatePoseSingleMarkers(markerCorners, 0.05, cameraMatrix, distCoeffs, rvecs, tvecs);