ChArUco: adjust detector params, hide unused (#1463)

This commit is contained in:
Cameron (3539)
2024-10-13 16:42:53 -04:00
committed by GitHub
parent 30ee91379e
commit 48fc88c5e9
2 changed files with 10 additions and 0 deletions

View File

@@ -56,6 +56,11 @@ public class DrawCalibrationPipe
int i = 0;
for (var target : in.getRight()) {
for (var c : target.getTargetCorners()) {
if (c.x < 0 || c.y < 0) {
// Skip if the corner is less than zero
continue;
}
c =
new Point(
c.x / params.divisor.value.doubleValue(), c.y / params.divisor.value.doubleValue());

View File

@@ -116,6 +116,11 @@ public class FindBoardCornersPipe
Objdetect.getPredefinedDictionary(params.tagFamily.getValue()));
board.setLegacyPattern(params.useOldPattern);
detector = new CharucoDetector(board);
detector.getDetectorParameters().set_adaptiveThreshConstant(10);
detector.getDetectorParameters().set_adaptiveThreshWinSizeMin(11);
detector.getDetectorParameters().set_adaptiveThreshWinSizeStep(40);
detector.getDetectorParameters().set_adaptiveThreshWinSizeMax(91);
} else {
logger.error("Can't create pattern for unknown board type " + params.type);
}