Skip to content

Commit 5e2d202

Browse files
committed
Merge pull request #1332 from cduguet:charuco_diamonds_hires
2 parents 7238308 + ddf2610 commit 5e2d202

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/aruco/src/charuco.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ void detectCharucoDiamond(InputArray _image, InputArrayOfArrays _markerCorners,
738738

739739
CV_Assert(_markerIds.total() > 0 && _markerIds.total() == _markerCorners.total());
740740

741-
const float minRepDistanceRate = 0.12f;
741+
const float minRepDistanceRate = 1.302455f;
742742

743743
// create Charuco board layout for diamond (3x3 layout)
744744
Ptr<Dictionary> dict = getPredefinedDictionary(PREDEFINED_DICTIONARY_NAME(0));
@@ -771,7 +771,7 @@ void detectCharucoDiamond(InputArray _image, InputArrayOfArrays _markerCorners,
771771
perimeterSq += edge.x*edge.x + edge.y*edge.y;
772772
}
773773
// maximum reprojection error relative to perimeter
774-
float minRepDistance = perimeterSq * minRepDistanceRate * minRepDistanceRate;
774+
float minRepDistance = sqrt(perimeterSq) * minRepDistanceRate;
775775

776776
int currentId = _markerIds.getMat().at< int >(i);
777777

0 commit comments

Comments
 (0)