Tightened a condition to reduce accidentally detecting the alignment pattern as a...
authorsrowen <srowen@59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Sun, 15 Feb 2009 09:43:40 +0000 (09:43 +0000)
committersrowen <srowen@59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Sun, 15 Feb 2009 09:43:40 +0000 (09:43 +0000)
git-svn-id: http://zxing.googlecode.com/svn/trunk@856 59b500cc-1b3d-0410-9834-0bbf25fbcc57

core/src/com/google/zxing/qrcode/detector/FinderPatternFinder.java
core/test/src/com/google/zxing/qrcode/QRCodeBlackBox4TestCase.java

index c8370d5..63592bf 100755 (executable)
@@ -462,7 +462,7 @@ final class FinderPatternFinder {
       FinderPattern pattern = (FinderPattern) possibleCenters.elementAt(i);\r
       totalDeviation += Math.abs(pattern.getEstimatedModuleSize() - average);\r
     }\r
       FinderPattern pattern = (FinderPattern) possibleCenters.elementAt(i);\r
       totalDeviation += Math.abs(pattern.getEstimatedModuleSize() - average);\r
     }\r
-    return totalDeviation <= 0.15f * totalModuleSize;\r
+    return totalDeviation <= 0.05f * totalModuleSize;\r
   }\r
 \r
   /**\r
   }\r
 \r
   /**\r
index 5653740..02168f9 100644 (file)
@@ -29,7 +29,7 @@ public final class QRCodeBlackBox4TestCase extends AbstractBlackBoxTestCase {
 
   public QRCodeBlackBox4TestCase() {
     super("test/data/blackbox/qrcode-4", new MultiFormatReader(), BarcodeFormat.QR_CODE);
 
   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);
     addTest(33, 33, 90.0f);
     addTest(32, 32, 180.0f);
     addTest(32, 32, 270.0f);