public abstract class Binarizer extends Object
限定符 | 构造器和说明 |
---|---|
protected |
Binarizer(LuminanceSource source) |
限定符和类型 | 方法和说明 |
---|---|
abstract Binarizer |
createBinarizer(LuminanceSource source)
Creates a new object with the same type as this Binarizer implementation, but with pristine
state.
|
abstract BitMatrix |
getBlackMatrix()
Converts a 2D array of luminance data to 1 bit data.
|
abstract BitArray |
getBlackRow(int y,
BitArray row)
Converts one row of luminance data to 1 bit data.
|
int |
getHeight() |
LuminanceSource |
getLuminanceSource() |
int |
getWidth() |
protected Binarizer(LuminanceSource source)
public final LuminanceSource getLuminanceSource()
public abstract BitArray getBlackRow(int y, BitArray row) throws NotFoundException
y
- The row to fetch, 0 <= y < bitmap height.row
- An optional preallocated array. If null or too small, it will be ignored.
If used, the Binarizer will call BitArray.clear(). Always use the returned object.NotFoundException
public abstract BitMatrix getBlackMatrix() throws NotFoundException
NotFoundException
public abstract Binarizer createBinarizer(LuminanceSource source)
source
- The LuminanceSource this Binarizer will operate on.public final int getWidth()
public final int getHeight()
Copyright © 2007–2014. All rights reserved.