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();
}
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();
}
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);
}
Aggregations