Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Sean Owen

Hierarchy

Index

Constructors

constructor

Properties

Private buckets

buckets: Int32Array

Private luminances

luminances: Uint8ClampedArray

Static Private EMPTY

EMPTY: Uint8ClampedArray = Uint8ClampedArray.from([0])

Static Private LUMINANCE_BITS

LUMINANCE_BITS: number = 5

Static Private LUMINANCE_BUCKETS

LUMINANCE_BUCKETS: number = 1 << GlobalHistogramBinarizer.LUMINANCE_BITS

Static Private LUMINANCE_SHIFT

LUMINANCE_SHIFT: number = 8 - GlobalHistogramBinarizer.LUMINANCE_BITS

Methods

createBinarizer

getBlackMatrix

getBlackRow

getHeight

  • getHeight(): number

getLuminanceSource

getWidth

  • getWidth(): number

Private initArrays

  • initArrays(luminanceSize: number): void

Static Private estimateBlackPoint

  • estimateBlackPoint(buckets: Int32Array): number

Generated using TypeDoc