use of boofcv.abst.fiducial.calib.CalibrationDetectorChessboardX in project BoofCV by lessthanoptimal.
the class DetectCalibrationChessboardXCornerApp method createAlgorithm.
private void createAlgorithm() {
synchronized (lockAlgorithm) {
configDetector.detPyramidTopSize = controlPanel.detPyramidTop;
configDetector.detNonMaxRadius = controlPanel.detRadius;
configDetector.detNonMaxThresholdRatio = controlPanel.detNonMaxThreshold / 100.0;
configDetector.detRefinedXCornerThreshold = controlPanel.detRefinedXThresh;
configDetector.connEdgeThreshold = controlPanel.connEdgeThreshold;
configDetector.connOrientationTol = controlPanel.connOrientationTol;
configDetector.connDirectionTol = controlPanel.connDirectionTol;
configDetector.connAmbiguousTol = controlPanel.connAmbiguousTol;
if (controlPanel.connMaxDistance == 0)
configDetector.connMaxNeighborDistance = Double.MAX_VALUE;
else
configDetector.connMaxNeighborDistance = controlPanel.connMaxDistance;
configGridDimen.numCols = controlPanel.gridCols;
configGridDimen.numRows = controlPanel.gridRows;
// check to see if it should be turned off. 0 is allowed, but we will set it to less than zero
if (configDetector.connEdgeThreshold <= 0)
configDetector.connEdgeThreshold = -1;
detector = new CalibrationDetectorChessboardX(configDetector, configGridDimen);
detector.getDetector().getDetector().useMeanShift = controlPanel.meanShift;
if (controlPanel.anyGrid) {
detector.getClusterToGrid().setCheckShape(null);
}
}
}
use of boofcv.abst.fiducial.calib.CalibrationDetectorChessboardX in project BoofCV by lessthanoptimal.
the class TestCreateCalibrationTarget method chessboard.
@Test
void chessboard() throws IOException {
createDocument("-r 7 -c 5 -o target -t CHESSBOARD -u cm -w 3 -p LETTER");
BufferedImage image = loadPDF();
GrayF32 gray = new GrayF32(image.getWidth(), image.getHeight());
ConvertBufferedImage.convertFrom(image, gray);
CalibrationDetectorChessboardX detector = FactoryFiducialCalibration.chessboardX(null, new ConfigGridDimen(7, 5, 3));
assertTrue(detector.process(gray));
}
Aggregations