From dc8e29a0add8e55a3c2746819b4c11291c530459 Mon Sep 17 00:00:00 2001 From: catree Date: Fri, 26 May 2017 22:35:01 +0200 Subject: [PATCH] Update doCornerRefinement() parameter to cornerRefinementMethod(). --- modules/aruco/samples/detector_params.yml | 2 +- .../tutorials/aruco_detection/aruco_detection.markdown | 8 ++++---- .../charuco_detection/charuco_detection.markdown | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/aruco/samples/detector_params.yml b/modules/aruco/samples/detector_params.yml index ab94c03cf..6f804e500 100644 --- a/modules/aruco/samples/detector_params.yml +++ b/modules/aruco/samples/detector_params.yml @@ -12,7 +12,7 @@ minCornerDistance: 10.0 minDistanceToBorder: 3 minMarkerDistance: 10.0 minMarkerDistanceRate: 0.05 -doCornerRefinement: false +cornerRefinementMethod: 0 cornerRefinementWinSize: 5 cornerRefinementMaxIterations: 30 cornerRefinementMinAccuracy: 0.1 diff --git a/modules/aruco/tutorials/aruco_detection/aruco_detection.markdown b/modules/aruco/tutorials/aruco_detection/aruco_detection.markdown index f049a3bec..b641d3a48 100644 --- a/modules/aruco/tutorials/aruco_detection/aruco_detection.markdown +++ b/modules/aruco/tutorials/aruco_detection/aruco_detection.markdown @@ -702,23 +702,23 @@ Default value: 0.6 #### Corner Refinement After markers have been detected and identified, the last step is performing subpixel refinement -in the corner positions (see OpenCV ```cornerSubPix()```) +in the corner positions (see OpenCV ```cornerSubPix()``` and ```cv::aruco::CornerRefineMethod```) Note that this step is optional and it only makes sense if the position of the marker corners have to be accurate, for instance for pose estimation. It is usually a time consuming step and it is disabled by default. -- ```bool doCornerRefinement``` +- ```int cornerRefinementMethod``` This parameter determines if the corner subpixel process is performed or not. It can be disabled if accurate corners are not necessary. -Default value: false. +Default value: ```CORNER_REFINE_NONE```. - ```int cornerRefinementWinSize``` This parameter determines the window size of the subpixel refinement process. -High values can produce that close image corners are included in the window region, so that the +High values can produce the effect that close image corners are included in the window region, so that the marker corner moves to a different and wrong location during the process. Furthermore it can affect to performance. diff --git a/modules/aruco/tutorials/charuco_detection/charuco_detection.markdown b/modules/aruco/tutorials/charuco_detection/charuco_detection.markdown index 7273550d3..dcba5f93b 100644 --- a/modules/aruco/tutorials/charuco_detection/charuco_detection.markdown +++ b/modules/aruco/tutorials/charuco_detection/charuco_detection.markdown @@ -142,7 +142,7 @@ are optional. A similar example without these parameters would be: std::vector markerIds; std::vector> markerCorners; cv::Ptr params; - params->doCornerRefinement = false; + params->cornerRefinementMethod = cv::aruco::CORNER_REFINE_NONE; cv::aruco::detectMarkers(inputImage, board.dictionary, markerCorners, markerIds, params); // if at least one marker detected @@ -207,7 +207,7 @@ Finally, this is a full example of ChArUco detection (without using calibration cv::Ptr board = cv::aruco::CharucoBoard::create(5, 7, 0.04, 0.02, dictionary); cv::Ptr params; - params->doCornerRefinement = false; + params->cornerRefinementMethod = cv::aruco::CORNER_REFINE_NONE; while (inputVideo.grab()) { cv::Mat image, imageCopy;