public final class MultiFinderPatternFinder extends FinderPatternFinder
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.
Modifier and Type | Class and Description |
---|---|
private static class |
MultiFinderPatternFinder.ModuleSizeComparator
A comparator that orders FinderPatterns by their estimated module size.
|
Modifier and Type | Field and Description |
---|---|
private static float |
DIFF_MODSIZE_CUTOFF
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 float |
DIFF_MODSIZE_CUTOFF_PERCENT
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 FinderPattern[][] |
EMPTY_FP_2D_ARRAY |
private static FinderPattern[] |
EMPTY_FP_ARRAY |
private static FinderPatternInfo[] |
EMPTY_RESULT_ARRAY |
private static float |
MAX_MODULE_COUNT_PER_EDGE |
private static float |
MIN_MODULE_COUNT_PER_EDGE |
MAX_MODULES, MIN_SKIP
Constructor and Description |
---|
MultiFinderPatternFinder(BitMatrix image,
ResultPointCallback resultPointCallback) |
Modifier and Type | Method and Description |
---|---|
FinderPatternInfo[] |
findMulti(java.util.Map<DecodeHintType,?> hints) |
private FinderPattern[][] |
selectMultipleBestPatterns() |
clearCounts, doClearCounts, doShiftCounts2, foundPatternCross, foundPatternDiagonal, getImage, getPossibleCenters, handlePossibleCenter, handlePossibleCenter, shiftCounts2
private static final FinderPatternInfo[] EMPTY_RESULT_ARRAY
private static final FinderPattern[] EMPTY_FP_ARRAY
private static final FinderPattern[][] EMPTY_FP_2D_ARRAY
private static final float MAX_MODULE_COUNT_PER_EDGE
private static final float MIN_MODULE_COUNT_PER_EDGE
private static final float DIFF_MODSIZE_CUTOFF_PERCENT
private static final float DIFF_MODSIZE_CUTOFF
public MultiFinderPatternFinder(BitMatrix image, ResultPointCallback resultPointCallback)
private FinderPattern[][] selectMultipleBestPatterns() throws NotFoundException
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 leastNotFoundException
- if 3 such finder patterns do not existpublic FinderPatternInfo[] findMulti(java.util.Map<DecodeHintType,?> hints) throws NotFoundException
NotFoundException