Search in sources :

Example 1 with FiducialSquareGenerator

use of boofcv.alg.fiducial.square.FiducialSquareGenerator in project BoofCV by lessthanoptimal.

the class TestSquareBinary_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(345, 4);
    return render.getGrayF32();
}
Also used : FiducialImageEngine(boofcv.alg.drawing.FiducialImageEngine) FiducialSquareGenerator(boofcv.alg.fiducial.square.FiducialSquareGenerator)

Example 2 with FiducialSquareGenerator

use of boofcv.alg.fiducial.square.FiducialSquareGenerator in project BoofCV by lessthanoptimal.

the class CreateSquareFiducialDocumentPDF method configureRenderer.

@Override
protected void configureRenderer(PdfFiducialEngine pdfengine) {
    g = new FiducialSquareGenerator(pdfengine);
    g.setBlackBorder(blackBorderFractionalWidth);
    g.setMarkerWidth(markerWidth * UNIT_TO_POINTS);
}
Also used : FiducialSquareGenerator(boofcv.alg.fiducial.square.FiducialSquareGenerator)

Example 3 with FiducialSquareGenerator

use of boofcv.alg.fiducial.square.FiducialSquareGenerator in project BoofCV by lessthanoptimal.

the class CreateFiducialSquareImageGui method renderPreview.

@Override
protected void renderPreview() {
    String path = controls.selectedPattern;
    if (path == null) {
        imagePanel.setImageRepaint(null);
    } else {
        FiducialSquareGenerator generator = (FiducialSquareGenerator) this.generator;
        BufferedImage buffered = UtilImageIO.loadImageNotNull(path);
        GrayU8 gray = ConvertBufferedImage.convertFrom(buffered, (GrayU8) null);
        generator.setBlackBorder(controls.borderFraction);
        generator.generate(gray);
        buffered = ConvertBufferedImage.convertTo(render.getGray(), null, true);
        imagePanel.setImageRepaint(buffered);
    }
}
Also used : FiducialSquareGenerator(boofcv.alg.fiducial.square.FiducialSquareGenerator) GrayU8(boofcv.struct.image.GrayU8) BufferedImage(java.awt.image.BufferedImage) ConvertBufferedImage(boofcv.io.image.ConvertBufferedImage)

Example 4 with FiducialSquareGenerator

use of boofcv.alg.fiducial.square.FiducialSquareGenerator in project BoofCV by lessthanoptimal.

the class CreateFiducialSquareBinaryGui method renderPreview.

@Override
protected void renderPreview() {
    long pattern = controls.selectedPattern;
    if (pattern <= 0) {
        imagePanel.setImageRepaint(null);
    } else {
        FiducialSquareGenerator generator = (FiducialSquareGenerator) this.generator;
        generator.setBlackBorder(controls.borderFraction);
        generator.generate(controls.selectedPattern, controls.gridWidth);
        ConvertBufferedImage.convertTo(render.getGray(), buffered, true);
        imagePanel.setImageRepaint(buffered);
    }
}
Also used : FiducialSquareGenerator(boofcv.alg.fiducial.square.FiducialSquareGenerator)

Example 5 with FiducialSquareGenerator

use of boofcv.alg.fiducial.square.FiducialSquareGenerator 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)

Aggregations

FiducialSquareGenerator (boofcv.alg.fiducial.square.FiducialSquareGenerator)5 FiducialImageEngine (boofcv.alg.drawing.FiducialImageEngine)2 ConvertBufferedImage (boofcv.io.image.ConvertBufferedImage)1 GrayU8 (boofcv.struct.image.GrayU8)1 BufferedImage (java.awt.image.BufferedImage)1