use of boofcv.alg.drawing.FiducialImageEngine in project BoofCV by lessthanoptimal.
the class TestMicroQrCodeDetectorPnP method renderFiducial.
@Override
public GrayF32 renderFiducial() {
MicroQrCode qr = new MicroQrCodeEncoder().addAutomatic("THE MESSAGE").fixate();
int width = MicroQrCode.totalModules(qr.version) * 6;
var engine = new FiducialImageEngine();
// interpolation gets messed up if it touches the border. plus scale is relative
engine.configure(1, width);
var generator = new MicroQrCodeGenerator();
generator.markerWidth = width;
generator.setRender(engine);
generator.render(qr);
return engine.getGrayF32();
}
use of boofcv.alg.drawing.FiducialImageEngine in project BoofCV by lessthanoptimal.
the class TestSquareImage_to_FiducialDetector method renderFiducial.
@Override
public GrayF32 renderFiducial() {
FiducialImageEngine render = new FiducialImageEngine();
render.configure(0, 200);
FiducialSquareGenerator generator = new FiducialSquareGenerator(render);
generator.setMarkerWidth(200);
generator.generate(chicken);
return render.getGrayF32();
}
use of boofcv.alg.drawing.FiducialImageEngine in project BoofCV by lessthanoptimal.
the class TestDetectFiducialSquareBinary method create.
public static GrayF32 create(int square, int value, int gridWidth, double borderFraction) {
int width = (int) Math.round((square * gridWidth) / (1 - 2.0 * borderFraction));
FiducialImageEngine render = new FiducialImageEngine();
render.configure(0, width);
FiducialSquareGenerator generator = new FiducialSquareGenerator(render);
generator.setMarkerWidth(width);
generator.setBlackBorder(borderFraction);
generator.generate(value, gridWidth);
return render.getGrayF32();
}
Aggregations