From 27be3fb9305df7b78cf5723e993d168b24ee11fc Mon Sep 17 00:00:00 2001 From: srowen Date: Tue, 8 Dec 2009 19:49:52 +0000 Subject: [PATCH] Oops, last change meant to include this -- changelist got split git-svn-id: https://zxing.googlecode.com/svn/trunk@1142 59b500cc-1b3d-0410-9834-0bbf25fbcc57 --- .../google/zxing/qrcode/detector/AlignmentPatternFinder.java | 4 ++-- .../com/google/zxing/qrcode/detector/FinderPatternFinder.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/com/google/zxing/qrcode/detector/AlignmentPatternFinder.java b/core/src/com/google/zxing/qrcode/detector/AlignmentPatternFinder.java index df158b6d0..83a035d91 100644 --- a/core/src/com/google/zxing/qrcode/detector/AlignmentPatternFinder.java +++ b/core/src/com/google/zxing/qrcode/detector/AlignmentPatternFinder.java @@ -234,7 +234,7 @@ final class AlignmentPatternFinder { } int stateCountTotal = stateCount[0] + stateCount[1] + stateCount[2]; - if (5 * Math.abs(stateCountTotal - originalStateCountTotal) >= originalStateCountTotal) { + if (5 * Math.abs(stateCountTotal - originalStateCountTotal) >= 2 * originalStateCountTotal) { return Float.NaN; } @@ -276,4 +276,4 @@ final class AlignmentPatternFinder { return null; } -} \ No newline at end of file +} diff --git a/core/src/com/google/zxing/qrcode/detector/FinderPatternFinder.java b/core/src/com/google/zxing/qrcode/detector/FinderPatternFinder.java index eb23e7939..776f72638 100755 --- a/core/src/com/google/zxing/qrcode/detector/FinderPatternFinder.java +++ b/core/src/com/google/zxing/qrcode/detector/FinderPatternFinder.java @@ -290,11 +290,11 @@ public class FinderPatternFinder { return Float.NaN; } - // If we found a finder-pattern-like section, but its size is more than 20% different than + // If we found a finder-pattern-like section, but its size is more than 40% different than // the original, assume it's a false positive int stateCountTotal = stateCount[0] + stateCount[1] + stateCount[2] + stateCount[3] + stateCount[4]; - if (5 * Math.abs(stateCountTotal - originalStateCountTotal) >= originalStateCountTotal) { + if (5 * Math.abs(stateCountTotal - originalStateCountTotal) >= 2 * originalStateCountTotal) { return Float.NaN; }