Package com.google.zxing.multi
Class GenericMultipleBarcodeReader
- java.lang.Object
-
- com.google.zxing.multi.GenericMultipleBarcodeReader
-
- All Implemented Interfaces:
MultipleBarcodeReader
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
ResultPoints are scanned, recursively.A caller may want to also employ
ByQuadrantReaderwhen 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
Readera caller might passnew ByQuadrantReader(reader).
-
-
Field Summary
Fields Modifier and Type Field Description private Readerdelegate(package private) static Result[]EMPTY_RESULT_ARRAYprivate static intMAX_DEPTHprivate static intMIN_DIMENSION_TO_RECUR
-
Constructor Summary
Constructors Constructor Description GenericMultipleBarcodeReader(Reader delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Result[]decodeMultiple(BinaryBitmap image)Result[]decodeMultiple(BinaryBitmap image, java.util.Map<DecodeHintType,?> hints)private voiddoDecodeMultiple(BinaryBitmap image, java.util.Map<DecodeHintType,?> hints, java.util.List<Result> results, int xOffset, int yOffset, int currentDepth)private static ResulttranslateResultPoints(Result result, int xOffset, int yOffset)
-
-
-
Field Detail
-
MIN_DIMENSION_TO_RECUR
private static final int MIN_DIMENSION_TO_RECUR
- See Also:
- Constant Field Values
-
MAX_DEPTH
private static final int MAX_DEPTH
- See Also:
- Constant Field Values
-
EMPTY_RESULT_ARRAY
static final Result[] EMPTY_RESULT_ARRAY
-
delegate
private final Reader delegate
-
-
Constructor Detail
-
GenericMultipleBarcodeReader
public GenericMultipleBarcodeReader(Reader delegate)
-
-
Method Detail
-
decodeMultiple
public Result[] decodeMultiple(BinaryBitmap image) throws NotFoundException
- Specified by:
decodeMultiplein interfaceMultipleBarcodeReader- Throws:
NotFoundException
-
decodeMultiple
public Result[] decodeMultiple(BinaryBitmap image, java.util.Map<DecodeHintType,?> hints) throws NotFoundException
- Specified by:
decodeMultiplein interfaceMultipleBarcodeReader- Throws:
NotFoundException
-
doDecodeMultiple
private void doDecodeMultiple(BinaryBitmap image, java.util.Map<DecodeHintType,?> hints, java.util.List<Result> results, int xOffset, int yOffset, int currentDepth)
-
-