Commit ddf2610b authored by Cristian Duguet's avatar Cristian Duguet

making minRepDistance not quadratically dependent on the image pizel size anymore

parent 83cfc88a
...@@ -738,7 +738,7 @@ void detectCharucoDiamond(InputArray _image, InputArrayOfArrays _markerCorners, ...@@ -738,7 +738,7 @@ void detectCharucoDiamond(InputArray _image, InputArrayOfArrays _markerCorners,
CV_Assert(_markerIds.total() > 0 && _markerIds.total() == _markerCorners.total()); CV_Assert(_markerIds.total() > 0 && _markerIds.total() == _markerCorners.total());
const float minRepDistanceRate = 0.12f; const float minRepDistanceRate = 1.302455f;
// create Charuco board layout for diamond (3x3 layout) // create Charuco board layout for diamond (3x3 layout)
Ptr<Dictionary> dict = getPredefinedDictionary(PREDEFINED_DICTIONARY_NAME(0)); Ptr<Dictionary> dict = getPredefinedDictionary(PREDEFINED_DICTIONARY_NAME(0));
...@@ -771,7 +771,7 @@ void detectCharucoDiamond(InputArray _image, InputArrayOfArrays _markerCorners, ...@@ -771,7 +771,7 @@ void detectCharucoDiamond(InputArray _image, InputArrayOfArrays _markerCorners,
perimeterSq += edge.x*edge.x + edge.y*edge.y; perimeterSq += edge.x*edge.x + edge.y*edge.y;
} }
// maximum reprojection error relative to perimeter // maximum reprojection error relative to perimeter
float minRepDistance = perimeterSq * minRepDistanceRate * minRepDistanceRate; float minRepDistance = sqrt(perimeterSq) * minRepDistanceRate;
int currentId = _markerIds.getMat().at< int >(i); int currentId = _markerIds.getMat().at< int >(i);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment