mirror of
https://github.com/zxing/zxing.git
synced 2024-11-10 04:54:04 -08:00
Tiny logic improvement
git-svn-id: https://zxing.googlecode.com/svn/trunk@123 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
74ff130112
commit
f7ef069a47
|
@ -76,9 +76,9 @@ public final class BlackPointEstimator {
|
|||
}
|
||||
|
||||
// Find a valley between them that is low and closer to the white peak
|
||||
int bestValley = secondPeak;
|
||||
int bestValley = secondPeak - 1;
|
||||
int bestValleyScore = Integer.MAX_VALUE;
|
||||
for (int i = secondPeak; i > firstPeak; i--) {
|
||||
for (int i = secondPeak - 1; i > firstPeak; i--) {
|
||||
int distance = secondPeak - i + 3;
|
||||
int score = distance * histogram[i];
|
||||
if (score < bestValleyScore) {
|
||||
|
|
Loading…
Reference in a new issue