mirror of
https://github.com/zxing/zxing.git
synced 2025-02-02 05:41:08 -08:00
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:
parent
1e5964024b
commit
27be3fb930
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue