mirror of
https://github.com/zxing/zxing.git
synced 2024-11-13 22:44:09 -08:00
Oops one more style change
git-svn-id: https://zxing.googlecode.com/svn/trunk@421 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
31b8b3d226
commit
038add9da1
|
@ -24,14 +24,14 @@ import com.google.zxing.ReaderException;
|
||||||
*/
|
*/
|
||||||
public abstract class BaseMonochromeBitmapSource implements MonochromeBitmapSource {
|
public abstract class BaseMonochromeBitmapSource implements MonochromeBitmapSource {
|
||||||
|
|
||||||
private int blackPoint;
|
|
||||||
private BlackPointEstimationMethod lastMethod;
|
|
||||||
private int lastArgument;
|
|
||||||
|
|
||||||
private static final int LUMINANCE_BITS = 5;
|
private static final int LUMINANCE_BITS = 5;
|
||||||
private static final int LUMINANCE_SHIFT = 8 - LUMINANCE_BITS;
|
private static final int LUMINANCE_SHIFT = 8 - LUMINANCE_BITS;
|
||||||
private static final int LUMINANCE_BUCKETS = 1 << LUMINANCE_BITS;
|
private static final int LUMINANCE_BUCKETS = 1 << LUMINANCE_BITS;
|
||||||
|
|
||||||
|
private int blackPoint;
|
||||||
|
private BlackPointEstimationMethod lastMethod;
|
||||||
|
private int lastArgument;
|
||||||
|
|
||||||
protected BaseMonochromeBitmapSource() {
|
protected BaseMonochromeBitmapSource() {
|
||||||
blackPoint = 0x7F;
|
blackPoint = 0x7F;
|
||||||
lastMethod = null;
|
lastMethod = null;
|
||||||
|
@ -53,7 +53,7 @@ public abstract class BaseMonochromeBitmapSource implements MonochromeBitmapSour
|
||||||
// decode a 1D barcode, and apply some sharpening.
|
// decode a 1D barcode, and apply some sharpening.
|
||||||
// TODO: We may want to add a fifth parameter to request the amount of shapening to be done.
|
// TODO: We may want to add a fifth parameter to request the amount of shapening to be done.
|
||||||
cacheRowForLuminance(y);
|
cacheRowForLuminance(y);
|
||||||
if (lastMethod == BlackPointEstimationMethod.ROW_SAMPLING) {
|
if (lastMethod.equals(BlackPointEstimationMethod.ROW_SAMPLING)) {
|
||||||
int left = getLuminance(startX, y);
|
int left = getLuminance(startX, y);
|
||||||
int center = getLuminance(startX + 1, y);
|
int center = getLuminance(startX + 1, y);
|
||||||
for (int x = 1; x < getWidth - 1; x++) {
|
for (int x = 1; x < getWidth - 1; x++) {
|
||||||
|
@ -119,5 +119,4 @@ public abstract class BaseMonochromeBitmapSource implements MonochromeBitmapSour
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue