C# Class ZXing.Common.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. [email protected] (Daniel Switkin) Sean Owen
Inheritance: Binarizer
Exibir arquivo Open project: Redth/ZXing.Net.Mobile

Public Methods

Method Description
GlobalHistogramBinarizer ( LuminanceSource source )

Initializes a new instance of the GlobalHistogramBinarizer class.

createBinarizer ( LuminanceSource source ) : Binarizer

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.

getBlackRow ( int y, BitArray row ) : BitArray

Applies simple sharpening to the row data to improve performance of the 1D Readers.

Private Methods

Method Description
estimateBlackPoint ( int buckets, int &blackPoint ) : bool
initArrays ( int luminanceSize ) : void

Method Details

GlobalHistogramBinarizer() public method

Initializes a new instance of the GlobalHistogramBinarizer class.
public GlobalHistogramBinarizer ( LuminanceSource source )
source LuminanceSource The source.

createBinarizer() public method

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 createBinarizer ( LuminanceSource source ) : Binarizer
source LuminanceSource The LuminanceSource this Binarizer will operate on.
return Binarizer

getBlackRow() public method

Applies simple sharpening to the row data to improve performance of the 1D Readers.
public getBlackRow ( int y, BitArray row ) : BitArray
y int
row BitArray
return BitArray