Oops, last change meant to include this -- changelist got split
authorsrowen <srowen@59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Tue, 8 Dec 2009 19:49:52 +0000 (19:49 +0000)
committersrowen <srowen@59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Tue, 8 Dec 2009 19:49:52 +0000 (19:49 +0000)
git-svn-id: http://zxing.googlecode.com/svn/trunk@1142 59b500cc-1b3d-0410-9834-0bbf25fbcc57

core/src/com/google/zxing/qrcode/detector/AlignmentPatternFinder.java
core/src/com/google/zxing/qrcode/detector/FinderPatternFinder.java

index df158b6..83a035d 100644 (file)
@@ -234,7 +234,7 @@ final class AlignmentPatternFinder {
     }\r
 \r
     int stateCountTotal = stateCount[0] + stateCount[1] + stateCount[2];\r
-    if (5 * Math.abs(stateCountTotal - originalStateCountTotal) >= originalStateCountTotal) {\r
+    if (5 * Math.abs(stateCountTotal - originalStateCountTotal) >= 2 * originalStateCountTotal) {\r
       return Float.NaN;\r
     }\r
 \r
@@ -276,4 +276,4 @@ final class AlignmentPatternFinder {
     return null;\r
   }\r
 \r
-}
\ No newline at end of file
+}\r
index eb23e79..776f726 100755 (executable)
@@ -290,11 +290,11 @@ public class FinderPatternFinder {
       return Float.NaN;\r
     }\r
 \r
-    // If we found a finder-pattern-like section, but its size is more than 20% different than\r
+    // If we found a finder-pattern-like section, but its size is more than 40% different than\r
     // the original, assume it's a false positive\r
     int stateCountTotal = stateCount[0] + stateCount[1] + stateCount[2] + stateCount[3] +\r
         stateCount[4];\r
-    if (5 * Math.abs(stateCountTotal - originalStateCountTotal) >= originalStateCountTotal) {\r
+    if (5 * Math.abs(stateCountTotal - originalStateCountTotal) >= 2 * originalStateCountTotal) {\r
       return Float.NaN;\r
     }\r
 \r