mirror of
https://github.com/zxing/zxing.git
synced 2024-09-19 21:17:33 -07:00
In multi QR code finder, only consider multiply-confirmed centers as intended, to avoid extreme amounts of computation in large images without barcodes
This commit is contained in:
parent
75dbbb00dd
commit
78c2a9c440
|
@ -97,7 +97,12 @@ public final class MultiFinderPatternFinder extends FinderPatternFinder {
|
|||
* @throws NotFoundException if 3 such finder patterns do not exist
|
||||
*/
|
||||
private FinderPattern[][] selectMultipleBestPatterns() throws NotFoundException {
|
||||
List<FinderPattern> possibleCenters = getPossibleCenters();
|
||||
List<FinderPattern> possibleCenters = new ArrayList<>();
|
||||
for (FinderPattern fp : getPossibleCenters()) {
|
||||
if (fp.getCount() >= 2) {
|
||||
possibleCenters.add(fp);
|
||||
}
|
||||
}
|
||||
int size = possibleCenters.size();
|
||||
|
||||
if (size < 3) {
|
||||
|
|
|
@ -44,7 +44,7 @@ public final class FinderPattern extends ResultPoint {
|
|||
return estimatedModuleSize;
|
||||
}
|
||||
|
||||
int getCount() {
|
||||
public int getCount() {
|
||||
return count;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue