Search in sources :

Example 1 with AztecPyramid

use of boofcv.alg.fiducial.aztec.AztecPyramid in project BoofCV by lessthanoptimal.

the class AztecCodePreciseDetector method process.

@Override
public void process(T gray) {
    // Reset and initialize
    allMarkers.reset();
    detected.clear();
    failed.clear();
    // Detect finder patterns
    inputToBinary.process(gray, binary);
    detectorPyramids.process(gray, binary);
    // Attempt to decode candidate markers
    List<AztecPyramid> pyramids = detectorPyramids.getFound().toList();
    if (verbose != null)
        verbose.println("Total pyramids found: " + pyramids.size());
    for (int locatorIdx = 0; locatorIdx < pyramids.size(); locatorIdx++) {
        AztecPyramid pyramid = pyramids.get(locatorIdx);
        if (verbose != null)
            verbose.println("Considering pyramid at: " + pyramid.get(0).center);
        AztecCode marker = allMarkers.grow();
        if (decoder.process(pyramid, gray, marker)) {
            detected.add(marker);
        } else {
            failed.add(marker);
        }
    }
}
Also used : AztecPyramid(boofcv.alg.fiducial.aztec.AztecPyramid) AztecCode(boofcv.alg.fiducial.aztec.AztecCode) VerbosePrint(org.ddogleg.struct.VerbosePrint)

Aggregations

AztecCode (boofcv.alg.fiducial.aztec.AztecCode)1 AztecPyramid (boofcv.alg.fiducial.aztec.AztecPyramid)1 VerbosePrint (org.ddogleg.struct.VerbosePrint)1