public abstract class Binarizer extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
Binarizer(LuminanceSource
|
| Modifier and Type | Method and Description |
|---|---|
abstract Binarizer |
createBinarizer(LuminanceSource
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
Converts one row of luminance data to 1 bit data.
|
int |
getHeight()
|
LuminanceSource |
getLuminanceSource()
|
int |
getWidth()
|
protected Binarizer(LuminanceSourcesource)
public final LuminanceSourcegetLuminanceSource()
public abstract BitArraygetBlackRow(int y, BitArray row) throws NotFoundException
y - The row to fetch, which must be in [0, 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 - if row can't be binarized
public abstract BitMatrixgetBlackMatrix() throws NotFoundException
NotFoundException - if image can't be binarized to make a matrix
public abstract BinarizercreateBinarizer(LuminanceSource source)
source - The LuminanceSource this Binarizer will operate on.
public final int getWidth()
public final int getHeight()