public class GlobalHistogramBinarizer extends Binarizer
| Constructor and Description |
|---|
GlobalHistogramBinarizer(LuminanceSource
|
| Modifier and Type | Method and Description |
|---|---|
Binarizer |
createBinarizer(LuminanceSource
Creates a new object with the same type as this Binarizer implementation, but with pristine state.
|
BitMatrix |
getBlackMatrix()
Converts a 2D array of luminance data to 1 bit data.
|
BitArray |
getBlackRow(int y, BitArray
Converts one row of luminance data to 1 bit data.
|
getHeight, getLuminanceSource, getWidthpublic GlobalHistogramBinarizer(LuminanceSourcesource)
public BitArraygetBlackRow(int y, BitArray row) throws NotFoundException
Binarizer
getBlackRow in class
Binarizer
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 BitMatrixgetBlackMatrix() throws NotFoundException
Binarizer
getBlackMatrix in class
Binarizer
NotFoundException - if image can't be binarized to make a matrix
public BinarizercreateBinarizer(LuminanceSource source)
Binarizer
createBinarizer in class
Binarizer
source - The LuminanceSource this Binarizer will operate on.