use of boofcv.abst.geo.calibration.DetectorFiducialCalibration in project BoofCV by lessthanoptimal.
the class GenericPlanarCalibrationDetectorChecks method checkPointIndexIncreasingOrder.
/**
* Observations points should always be in increasing order
*/
@Test
public void checkPointIndexIncreasingOrder() {
for (Object layout : targetConfigs) {
DetectorFiducialCalibration detector = createDetector(layout);
GrayF32 original = renderEasy(layout, null);
assertTrue(detector.process(original));
CalibrationObservation found = detector.getDetectedPoints();
assertEquals(detector.getLayout().size(), found.size());
for (int i = 0; i < found.size(); i++) {
assertEquals(i, found.get(i).index);
}
}
}
use of boofcv.abst.geo.calibration.DetectorFiducialCalibration in project BoofCV by lessthanoptimal.
the class CalibrateFisheyePlanarGuiApp method main.
public static void main(String[] args) {
DetectorFiducialCalibration detector = // FactoryFiducialCalibration.squareGrid(new ConfigSquareGrid(4,3,30,30));
FactoryFiducialCalibration.chessboard(new ConfigChessboard(7, 5, 30));
// FactoryFiducialCalibration.circleHexagonalGrid(new ConfigCircleHexagonalGrid(5, 8, 1, 6));
List<String> images;
images = UtilIO.listAll(UtilIO.pathExample("calibration/fisheye/chessboard"));
// images = UtilIO.listAll(UtilIO.pathExample("calibration/fisheye/square_grid"));
CalibrateFisheyePlanarGuiApp app = new CalibrateFisheyePlanarGuiApp();
app.configure(detector, images).configureUniversalOmni(true, 2, false);
JFrame frame = new JFrame("Fisheye Calibration with Planar Targets");
frame.add(app, BorderLayout.CENTER);
frame.pack();
frame.setVisible(true);
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
app.process("intrinsic.yaml");
}
use of boofcv.abst.geo.calibration.DetectorFiducialCalibration in project BoofCV by lessthanoptimal.
the class TestCreateCalibrationTarget method circle_regular.
@Test
public void circle_regular() throws IOException, InterruptedException {
createDocument("-r 8 -c 6 -o target -t CIRCLE_GRID -u cm -w 2 -d 3 -p LETTER");
BufferedImage image = loadImage();
GrayF32 gray = new GrayF32(image.getWidth(), image.getHeight());
ConvertBufferedImage.convertFrom(image, gray);
DetectorFiducialCalibration detector = FactoryFiducialCalibration.circleRegularGrid(new ConfigCircleRegularGrid(8, 6, 2, 3));
assertTrue(detector.process(gray));
}
Aggregations