Skip to content

Commit 27f6d4e

Browse files
committed
Merge pull request #1190 from catree:fix_aruco_doCornerRefinement
2 parents 2abf45d + dc8e29a commit 27f6d4e

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

modules/aruco/samples/detector_params.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ minCornerDistance: 10.0
1212
minDistanceToBorder: 3
1313
minMarkerDistance: 10.0
1414
minMarkerDistanceRate: 0.05
15-
doCornerRefinement: false
15+
cornerRefinementMethod: 0
1616
cornerRefinementWinSize: 5
1717
cornerRefinementMaxIterations: 30
1818
cornerRefinementMinAccuracy: 0.1

modules/aruco/tutorials/aruco_detection/aruco_detection.markdown

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -702,23 +702,23 @@ Default value: 0.6
702702
#### Corner Refinement
703703
704704
After markers have been detected and identified, the last step is performing subpixel refinement
705-
in the corner positions (see OpenCV ```cornerSubPix()```)
705+
in the corner positions (see OpenCV ```cornerSubPix()``` and ```cv::aruco::CornerRefineMethod```)
706706
707707
Note that this step is optional and it only makes sense if the position of the marker corners have to
708708
be accurate, for instance for pose estimation. It is usually a time consuming step and it is disabled by default.
709709
710-
- ```bool doCornerRefinement```
710+
- ```int cornerRefinementMethod```
711711
712712
This parameter determines if the corner subpixel process is performed or not. It can be disabled
713713
if accurate corners are not necessary.
714714
715-
Default value: false.
715+
Default value: ```CORNER_REFINE_NONE```.
716716
717717
- ```int cornerRefinementWinSize```
718718
719719
This parameter determines the window size of the subpixel refinement process.
720720
721-
High values can produce that close image corners are included in the window region, so that the
721+
High values can produce the effect that close image corners are included in the window region, so that the
722722
marker corner moves to a different and wrong location during the process. Furthermore
723723
it can affect to performance.
724724

modules/aruco/tutorials/charuco_detection/charuco_detection.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ are optional. A similar example without these parameters would be:
142142
std::vector<int> markerIds;
143143
std::vector<std::vector<cv::Point2f>> markerCorners;
144144
cv::Ptr<cv::aruco::DetectorParameters> params;
145-
params->doCornerRefinement = false;
145+
params->cornerRefinementMethod = cv::aruco::CORNER_REFINE_NONE;
146146
cv::aruco::detectMarkers(inputImage, board.dictionary, markerCorners, markerIds, params);
147147
148148
// if at least one marker detected
@@ -207,7 +207,7 @@ Finally, this is a full example of ChArUco detection (without using calibration
207207
cv::Ptr<cv::aruco::CharucoBoard> board = cv::aruco::CharucoBoard::create(5, 7, 0.04, 0.02, dictionary);
208208
209209
cv::Ptr<cv::aruco::DetectorParameters> params;
210-
params->doCornerRefinement = false;
210+
params->cornerRefinementMethod = cv::aruco::CORNER_REFINE_NONE;
211211
212212
while (inputVideo.grab()) {
213213
cv::Mat image, imageCopy;

0 commit comments

Comments
 (0)