Search in sources :

Example 1 with GridShape

use of boofcv.struct.GridShape in project BoofCV by lessthanoptimal.

the class TestECoCheckDetector method createMarker.

private GrayU8 createMarker(ECoCheckUtils utils, int markerID) {
    int squareWidth = 80;
    GridShape shape = utils.markers.get(markerID);
    var engine = new FiducialImageEngine();
    engine.configure(10, squareWidth * (shape.cols - 1), squareWidth * (shape.rows - 1));
    var renderer = new ECoCheckGenerator(utils);
    renderer.render = engine;
    renderer.squareWidth = squareWidth;
    renderer.render(markerID);
    truthCorners = renderer.corners;
    return engine.getGray();
}
Also used : FiducialImageEngine(boofcv.alg.drawing.FiducialImageEngine) GridShape(boofcv.struct.GridShape)

Example 2 with GridShape

use of boofcv.struct.GridShape in project BoofCV by lessthanoptimal.

the class TestCalibrationDetectorMultiECoCheck method renderPattern.

@Override
public GrayF32 renderPattern(int marker, List<PointIndex2D_F64> calibrationPoints) {
    GridShape shape = utils.markers.get(marker);
    int squareLength = 60;
    var engine = new FiducialImageEngine();
    engine.configure(20, squareLength * (shape.cols - 1), squareLength * (shape.rows - 1));
    var generator = new ECoCheckGenerator(utils);
    generator.squareWidth = squareLength;
    generator.setRender(engine);
    generator.render(marker);
    BoofMiscOps.forIdx(generator.corners, (idx, c) -> calibrationPoints.add(new PointIndex2D_F64(c.x, c.y, idx)));
    return engine.getGrayF32();
}
Also used : PointIndex2D_F64(boofcv.struct.geo.PointIndex2D_F64) FiducialImageEngine(boofcv.alg.drawing.FiducialImageEngine) ECoCheckGenerator(boofcv.alg.fiducial.calib.ecocheck.ECoCheckGenerator) GridShape(boofcv.struct.GridShape)

Example 3 with GridShape

use of boofcv.struct.GridShape in project BoofCV by lessthanoptimal.

the class ECoCheckGenerator method render.

public void render(int marker) {
    corners.clear();
    GridShape shape = utils.markers.get(marker);
    render.init();
    // First build the chessboard pattern
    renderSquares(shape);
    // Render the unique ID for all inner squares
    renderCodes(marker, shape);
    // save ground truth corner location
    saveCornerLocations(shape);
}
Also used : GridShape(boofcv.struct.GridShape)

Aggregations

GridShape (boofcv.struct.GridShape)3 FiducialImageEngine (boofcv.alg.drawing.FiducialImageEngine)2 ECoCheckGenerator (boofcv.alg.fiducial.calib.ecocheck.ECoCheckGenerator)1 PointIndex2D_F64 (boofcv.struct.geo.PointIndex2D_F64)1