mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
Issue #914: increase heuristic to allow version 11-20 in non-try-harder mode
This commit is contained in:
parent
63bcf0ca9c
commit
3ae6b336e1
|
@ -240,7 +240,7 @@ final class MultiFinderPatternFinder extends FinderPatternFinder {
|
|||
// image, and then account for the center being 3 modules in size. This gives the smallest
|
||||
// number of pixels the center could be, so skip this often. When trying harder, look for all
|
||||
// QR versions regardless of how dense they are.
|
||||
int iSkip = (int) (maxI / (MAX_MODULES * 4.0f) * 3);
|
||||
int iSkip = (3 * maxI) / (4 * MAX_MODULES);
|
||||
if (iSkip < MIN_SKIP || tryHarder) {
|
||||
iSkip = MIN_SKIP;
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ public class FinderPatternFinder {
|
|||
|
||||
private static final int CENTER_QUORUM = 2;
|
||||
protected static final int MIN_SKIP = 3; // 1 pixel/module times 3 modules/center
|
||||
protected static final int MAX_MODULES = 57; // support up to version 10 for mobile clients
|
||||
protected static final int MAX_MODULES = 97; // support up to version 20 for mobile clients
|
||||
|
||||
private final BitMatrix image;
|
||||
private final List<FinderPattern> possibleCenters;
|
||||
|
|
|
@ -30,7 +30,7 @@ public final class QRCodeBlackBox6TestCase extends AbstractBlackBoxTestCase {
|
|||
super("src/test/resources/blackbox/qrcode-6", new MultiFormatReader(), BarcodeFormat.QR_CODE);
|
||||
addTest(15, 15, 0.0f);
|
||||
addTest(14, 14, 90.0f);
|
||||
addTest(12, 13, 180.0f);
|
||||
addTest(13, 13, 180.0f);
|
||||
addTest(14, 14, 270.0f);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue