Class MultiFinderPatternFinder
java.lang.Object
com.google.zxing.qrcode.detector.FinderPatternFinder
com.google.zxing.multi.qrcode.detector.MultiFinderPatternFinder
This class attempts to find finder patterns in a QR Code. Finder patterns are the square markers at three corners of a QR Code.
This class is thread-safe but not reentrant. Each thread must allocate its own object.
In contrast to FinderPatternFinder
, this class will return an array of all possible
QR code locations in the image.
Use the TRY_HARDER hint to ask for a more thorough detection.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final class
A comparator that orders FinderPatterns by their estimated module size. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final float
More or less arbitrary cutoff point for determining if two finder patterns might belong to the same code if they differ less than DIFF_MODSIZE_CUTOFF pixels/module in their estimated modules sizes.private static final float
More or less arbitrary cutoff point for determining if two finder patterns might belong to the same code if they differ less than DIFF_MODSIZE_CUTOFF_PERCENT percent in their estimated modules sizes.private static final FinderPattern[][]
private static final FinderPattern[]
private static final FinderPatternInfo[]
private static final float
private static final float
Fields inherited from class com.google.zxing.qrcode.detector.FinderPatternFinder
MAX_MODULES, MIN_SKIP
-
Constructor Summary
ConstructorsConstructorDescriptionMultiFinderPatternFinder
(BitMatrix image, ResultPointCallback resultPointCallback) -
Method Summary
Modifier and TypeMethodDescriptionfindMulti
(Map<DecodeHintType, ?> hints) private FinderPattern[][]
Methods inherited from class com.google.zxing.qrcode.detector.FinderPatternFinder
clearCounts, doClearCounts, doShiftCounts2, foundPatternCross, foundPatternDiagonal, getImage, getPossibleCenters, handlePossibleCenter, handlePossibleCenter, shiftCounts2
-
Field Details
-
EMPTY_RESULT_ARRAY
-
EMPTY_FP_ARRAY
-
EMPTY_FP_2D_ARRAY
-
MAX_MODULE_COUNT_PER_EDGE
private static final float MAX_MODULE_COUNT_PER_EDGE- See Also:
-
MIN_MODULE_COUNT_PER_EDGE
private static final float MIN_MODULE_COUNT_PER_EDGE- See Also:
-
DIFF_MODSIZE_CUTOFF_PERCENT
private static final float DIFF_MODSIZE_CUTOFF_PERCENTMore or less arbitrary cutoff point for determining if two finder patterns might belong to the same code if they differ less than DIFF_MODSIZE_CUTOFF_PERCENT percent in their estimated modules sizes.- See Also:
-
DIFF_MODSIZE_CUTOFF
private static final float DIFF_MODSIZE_CUTOFFMore or less arbitrary cutoff point for determining if two finder patterns might belong to the same code if they differ less than DIFF_MODSIZE_CUTOFF pixels/module in their estimated modules sizes.- See Also:
-
-
Constructor Details
-
MultiFinderPatternFinder
-
-
Method Details
-
selectMultipleBestPatterns
- Returns:
- the 3 best
FinderPattern
s from our list of candidates. The "best" are those that have been detected at least 2 times, and whose module size differs from the average among those patterns the least - Throws:
NotFoundException
- if 3 such finder patterns do not exist
-
findMulti
- Throws:
NotFoundException
-