From: srowen Date: Sun, 15 Feb 2009 09:43:40 +0000 (+0000) Subject: Tightened a condition to reduce accidentally detecting the alignment pattern as a... X-Git-Url: http://git.rot13.org/?p=zxing.git;a=commitdiff_plain;h=d43168d98bdf7330a69fa3245da441309d487b29 Tightened a condition to reduce accidentally detecting the alignment pattern as a finder pattern git-svn-id: http://zxing.googlecode.com/svn/trunk@856 59b500cc-1b3d-0410-9834-0bbf25fbcc57 --- diff --git a/core/src/com/google/zxing/qrcode/detector/FinderPatternFinder.java b/core/src/com/google/zxing/qrcode/detector/FinderPatternFinder.java index c8370d55..63592bf9 100755 --- a/core/src/com/google/zxing/qrcode/detector/FinderPatternFinder.java +++ b/core/src/com/google/zxing/qrcode/detector/FinderPatternFinder.java @@ -462,7 +462,7 @@ final class FinderPatternFinder { FinderPattern pattern = (FinderPattern) possibleCenters.elementAt(i); totalDeviation += Math.abs(pattern.getEstimatedModuleSize() - average); } - return totalDeviation <= 0.15f * totalModuleSize; + return totalDeviation <= 0.05f * totalModuleSize; } /** diff --git a/core/test/src/com/google/zxing/qrcode/QRCodeBlackBox4TestCase.java b/core/test/src/com/google/zxing/qrcode/QRCodeBlackBox4TestCase.java index 5653740f..02168f92 100644 --- a/core/test/src/com/google/zxing/qrcode/QRCodeBlackBox4TestCase.java +++ b/core/test/src/com/google/zxing/qrcode/QRCodeBlackBox4TestCase.java @@ -29,7 +29,7 @@ public final class QRCodeBlackBox4TestCase extends AbstractBlackBoxTestCase { public QRCodeBlackBox4TestCase() { super("test/data/blackbox/qrcode-4", new MultiFormatReader(), BarcodeFormat.QR_CODE); - addTest(32, 32, 0.0f); + addTest(33, 33, 0.0f); addTest(33, 33, 90.0f); addTest(32, 32, 180.0f); addTest(32, 32, 270.0f);