Class GlobalHistogramBinarizer
This Binarizer implementation uses the old ZXing global histogram approach. It is suitable for low-end mobile devices which don't have enough CPU or memory to use a local thresholding algorithm. However, because it picks a global black point, it cannot handle difficult shadows and gradients.
Faster mobile devices and all desktop applications should probably use HybridBinarizer instead.
<author>dswitkin@google.com (Daniel Switkin)</author>
<author>Sean Owen</author>
public class GlobalHistogramBinarizer : Binarizer
- Inheritance
-
GlobalHistogramBinarizer
- Derived
- Inherited Members
Constructors
GlobalHistogramBinarizer(LuminanceSource)
Initializes a new instance of the GlobalHistogramBinarizer class.
public GlobalHistogramBinarizer(LuminanceSource source)
Parameters
source
LuminanceSourceThe source.
Properties
BlackMatrix
Does not sharpen the data, as this call is intended to only be used by 2D Readers.
public override BitMatrix BlackMatrix { get; }
Property Value
Methods
createBinarizer(LuminanceSource)
Creates a new object with the same type as this Binarizer implementation, but with pristine state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache of 1 bit data. See Effective Java for why we can't use Java's clone() method.
public override Binarizer createBinarizer(LuminanceSource source)
Parameters
source
LuminanceSourceThe LuminanceSource this Binarizer will operate on.
Returns
- Binarizer
A new concrete Binarizer implementation object.
getBlackRow(int, BitArray)
Applies simple sharpening to the row data to improve performance of the 1D Readers.
public override BitArray getBlackRow(int y, BitArray row)