public final class GenericMultipleBarcodeReader extends java.lang.Object implements MultipleBarcodeReader
Attempts to locate multiple barcodes in an image by repeatedly decoding portion of the image.
After one barcode is found, the areas left, above, right and below the barcode's
ResultPoint
s are scanned, recursively.
A caller may want to also employ ByQuadrantReader
when attempting to find multiple
2D barcodes, like QR Codes, in an image, where the presence of multiple barcodes might prevent
detecting any one of them.
That is, instead of passing a Reader
a caller might pass
new ByQuadrantReader(reader)
.
Modifier and Type | Field and Description |
---|---|
private Reader |
delegate |
(package private) static Result[] |
EMPTY_RESULT_ARRAY |
private static int |
MAX_DEPTH |
private static int |
MIN_DIMENSION_TO_RECUR |
Constructor and Description |
---|
GenericMultipleBarcodeReader(Reader delegate) |
Modifier and Type | Method and Description |
---|---|
Result[] |
decodeMultiple(BinaryBitmap image) |
Result[] |
decodeMultiple(BinaryBitmap image,
java.util.Map<DecodeHintType,?> hints) |
private void |
doDecodeMultiple(BinaryBitmap image,
java.util.Map<DecodeHintType,?> hints,
java.util.List<Result> results,
int xOffset,
int yOffset,
int currentDepth) |
private static Result |
translateResultPoints(Result result,
int xOffset,
int yOffset) |
private static final int MIN_DIMENSION_TO_RECUR
private static final int MAX_DEPTH
static final Result[] EMPTY_RESULT_ARRAY
private final Reader delegate
public GenericMultipleBarcodeReader(Reader delegate)
public Result[] decodeMultiple(BinaryBitmap image) throws NotFoundException
decodeMultiple
in interface MultipleBarcodeReader
NotFoundException
public Result[] decodeMultiple(BinaryBitmap image, java.util.Map<DecodeHintType,?> hints) throws NotFoundException
decodeMultiple
in interface MultipleBarcodeReader
NotFoundException
private void doDecodeMultiple(BinaryBitmap image, java.util.Map<DecodeHintType,?> hints, java.util.List<Result> results, int xOffset, int yOffset, int currentDepth)