Search in sources :

Example 11 with DetectorFiducialCalibration

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);
        }
    }
}
Also used : DetectorFiducialCalibration(boofcv.abst.geo.calibration.DetectorFiducialCalibration) GrayF32(boofcv.struct.image.GrayF32) CalibrationObservation(boofcv.alg.geo.calibration.CalibrationObservation) Test(org.junit.Test)

Example 12 with DetectorFiducialCalibration

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");
}
Also used : DetectorFiducialCalibration(boofcv.abst.geo.calibration.DetectorFiducialCalibration) ConfigChessboard(boofcv.abst.fiducial.calib.ConfigChessboard)

Example 13 with DetectorFiducialCalibration

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));
}
Also used : DetectorFiducialCalibration(boofcv.abst.geo.calibration.DetectorFiducialCalibration) GrayF32(boofcv.struct.image.GrayF32) BufferedImage(java.awt.image.BufferedImage) ConvertBufferedImage(boofcv.io.image.ConvertBufferedImage) Test(org.junit.Test)

Aggregations

DetectorFiducialCalibration (boofcv.abst.geo.calibration.DetectorFiducialCalibration)13 GrayF32 (boofcv.struct.image.GrayF32)10 Test (org.junit.Test)7 ConfigChessboard (boofcv.abst.fiducial.calib.ConfigChessboard)6 ConvertBufferedImage (boofcv.io.image.ConvertBufferedImage)4 BufferedImage (java.awt.image.BufferedImage)4 CalibrationObservation (boofcv.alg.geo.calibration.CalibrationObservation)3 ArrayList (java.util.ArrayList)3 CalibrateMonoPlanar (boofcv.abst.geo.calibration.CalibrateMonoPlanar)2 SimulatePlanarWorld (boofcv.simulation.SimulatePlanarWorld)2 CameraPinholeRadial (boofcv.struct.calib.CameraPinholeRadial)2 CameraUniversalOmni (boofcv.struct.calib.CameraUniversalOmni)2 PointIndex2D_F64 (boofcv.struct.geo.PointIndex2D_F64)2 Point2D_F64 (georegression.struct.point.Point2D_F64)2 Se3_F64 (georegression.struct.se.Se3_F64)2 File (java.io.File)1