Search in sources :

Example 6 with FiducialImageEngine

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();
}
Also used : FiducialImageEngine(boofcv.alg.drawing.FiducialImageEngine) MicroQrCode(boofcv.alg.fiducial.microqr.MicroQrCode) MicroQrCodeGenerator(boofcv.alg.fiducial.microqr.MicroQrCodeGenerator) MicroQrCodeEncoder(boofcv.alg.fiducial.microqr.MicroQrCodeEncoder)

Example 7 with FiducialImageEngine

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();
}
Also used : FiducialImageEngine(boofcv.alg.drawing.FiducialImageEngine) FiducialSquareGenerator(boofcv.alg.fiducial.square.FiducialSquareGenerator)

Example 8 with FiducialImageEngine

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();
}
Also used : FiducialImageEngine(boofcv.alg.drawing.FiducialImageEngine)

Aggregations

FiducialImageEngine (boofcv.alg.drawing.FiducialImageEngine)8 FiducialSquareGenerator (boofcv.alg.fiducial.square.FiducialSquareGenerator)2 GridShape (boofcv.struct.GridShape)2 ECoCheckGenerator (boofcv.alg.fiducial.calib.ecocheck.ECoCheckGenerator)1 MicroQrCode (boofcv.alg.fiducial.microqr.MicroQrCode)1 ErrorLevel (boofcv.alg.fiducial.microqr.MicroQrCode.ErrorLevel)1 MicroQrCodeEncoder (boofcv.alg.fiducial.microqr.MicroQrCodeEncoder)1 MicroQrCodeGenerator (boofcv.alg.fiducial.microqr.MicroQrCodeGenerator)1 PositionPatternNode (boofcv.alg.fiducial.qrcode.PositionPatternNode)1 PointIndex2D_F64 (boofcv.struct.geo.PointIndex2D_F64)1 DogArray (org.ddogleg.struct.DogArray)1 Test (org.junit.jupiter.api.Test)1