- Direct Known Subclasses:
public class ThresholdNiblackFamily extends Object implements InputToBinary<GrayF32>
Several related algorithms based off the Niblack's  paper which are intended for use in thresholding images as a preprocessing step for OCR. All algorithms are based on local image statistics.
- Niblack: T(x,y) = m(x,y) * [ 1 + k * (s(x,y)/R - 1)]
- Sauvola: T(x,y) = m(x,y) * [ 1 + k * (s(x,y)/R - 1)]
- Wolf-Jolion: T(x,y) = m(x,y) * [ 1 + k * (s(x,y)/R - 1)]
where T(x,y) is the pixel's threshold, m(x,y) is the local mean, s(x,y) is the local deviation, R is dynamic range of standard deviation, and k is a user specified threshold.
There are two tuning parameters 'k' a positive number and the the 'radius' of the local region. Recommended values:
- Niblack: k=0.3 and radius=15
- Sauvola: k=0.3 and radius=15
- Wolf-Jolion: k=0.5 and radius=15
 W.Niblack, An Introduction to Digital Image Processing. Prentice Hall, Englewood Cliffs, (1986).
 Sauvola, Jaakko, and Matti Pietikäinen. "Adaptive document image binarization." Pattern recognition 33.2 (2000): 225-236.
 C. Wolf, J-M. Jolion, “Extraction and Recognition of Artificial Text in Multimedia Documents”, Pattern Analysis and Applications, 6(4):309-326, (2003)
Nested Class Summary
Nested Classes Modifier and Type Class Description
static classWhich variant of this family is computed
ThresholdNiblackFamilypublic ThresholdNiblackFamily(ConfigLength width, float k, boolean down, ThresholdNiblackFamily.Variant variant)Configures the algorithm.
width- size of local region. Try 31
k- User specified threshold adjustment factor. Must be positive. Try 0.3
down- Threshold down or up