createBinarizer method

  1. @override
Binarizer createBinarizer(
  1. LuminanceSource source
)
override

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.

@param source The LuminanceSource this Binarizer will operate on. @return A new concrete Binarizer implementation object.

Implementation

@override
Binarizer createBinarizer(LuminanceSource source) {
  return HybridBinarizer(source);
}