Search in sources :

Example 1 with CalibrationDetectorSquareGrid

use of boofcv.abst.fiducial.calib.CalibrationDetectorSquareGrid in project BoofCV by lessthanoptimal.

the class TestCreateCalibrationTarget method square_grid.

@Test
void square_grid() throws IOException {
    createDocument("-r 4 -c 3 -o target -t SQUARE_GRID -u cm -w 3 -s 3 -p LETTER\n");
    BufferedImage image = loadPDF();
    GrayF32 gray = new GrayF32(image.getWidth(), image.getHeight());
    ConvertBufferedImage.convertFrom(image, gray);
    CalibrationDetectorSquareGrid detector = FactoryFiducialCalibration.squareGrid(null, new ConfigGridDimen(4, 3, 3, 3));
    assertTrue(detector.process(gray));
}
Also used : ConfigGridDimen(boofcv.abst.fiducial.calib.ConfigGridDimen) GrayF32(boofcv.struct.image.GrayF32) CalibrationDetectorSquareGrid(boofcv.abst.fiducial.calib.CalibrationDetectorSquareGrid) BufferedImage(java.awt.image.BufferedImage) ConvertBufferedImage(boofcv.io.image.ConvertBufferedImage) Test(org.junit.jupiter.api.Test)

Aggregations

CalibrationDetectorSquareGrid (boofcv.abst.fiducial.calib.CalibrationDetectorSquareGrid)1 ConfigGridDimen (boofcv.abst.fiducial.calib.ConfigGridDimen)1 ConvertBufferedImage (boofcv.io.image.ConvertBufferedImage)1 GrayF32 (boofcv.struct.image.GrayF32)1 BufferedImage (java.awt.image.BufferedImage)1 Test (org.junit.jupiter.api.Test)1