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
This commit is contained in:
srowen 2009-12-08 19:49:52 +00:00
parent 1e5964024b
commit 27be3fb930
2 changed files with 4 additions and 4 deletions

View file

@ -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;
}
}
}

View file

@ -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;
}