mirror of
https://github.com/zxing/zxing.git
synced 2025-01-12 11:47:26 -08:00
More javadoc
git-svn-id: https://zxing.googlecode.com/svn/trunk@12 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
424c19f542
commit
cc66a80d3e
|
@ -58,8 +58,7 @@ public final class BlackPointEstimator {
|
||||||
int secondPeakScore = 0;
|
int secondPeakScore = 0;
|
||||||
for (int i = 0; i < numBuckets; i++) {
|
for (int i = 0; i < numBuckets; i++) {
|
||||||
int distanceToBiggest = i - firstPeak;
|
int distanceToBiggest = i - firstPeak;
|
||||||
// Encourage more distant second peaks by multiplying by square
|
// Encourage more distant second peaks by multiplying by square of distance
|
||||||
// of distance
|
|
||||||
int score = luminanceBuckets[i] * distanceToBiggest * distanceToBiggest;
|
int score = luminanceBuckets[i] * distanceToBiggest * distanceToBiggest;
|
||||||
if (score > secondPeakScore) {
|
if (score > secondPeakScore) {
|
||||||
secondPeak = i;
|
secondPeak = i;
|
||||||
|
@ -79,8 +78,7 @@ public final class BlackPointEstimator {
|
||||||
int bestValleyScore = 0;
|
int bestValleyScore = 0;
|
||||||
for (int i = firstPeak + 1; i < secondPeak; i++) {
|
for (int i = firstPeak + 1; i < secondPeak; i++) {
|
||||||
// Encourage low valleys near the mid point between peaks
|
// Encourage low valleys near the mid point between peaks
|
||||||
int score = (firstPeakSize - luminanceBuckets[i]) *
|
int score = (firstPeakSize - luminanceBuckets[i]) * (i - firstPeak) * (secondPeak - i);
|
||||||
(i - firstPeak) * (secondPeak - i);
|
|
||||||
if (score > bestValleyScore) {
|
if (score > bestValleyScore) {
|
||||||
bestValley = i;
|
bestValley = i;
|
||||||
bestValleyScore = score;
|
bestValleyScore = score;
|
||||||
|
|
|
@ -19,7 +19,10 @@ package com.google.zxing.common;
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is basically a substitute for <code>java.util.Collections</code>.
|
* <p>This is basically a substitute for <code>java.util.Collections</code>, which is not
|
||||||
|
* present in MIDP 2.0 / CLDC 1.1.</p>
|
||||||
|
*
|
||||||
|
* @author srowen@google.com (Sean Owen)
|
||||||
*/
|
*/
|
||||||
public final class Collections {
|
public final class Collections {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue