Thresholding aims to reduce the number of grey levels, for grey images, or the number of colors, for color images. In particular binarization is an extreme case of threshoolding in which the final image has only two levels, ie, is a binary image.
Grey-level thresholding methods are determined by the threshold level that separates the image pixels in two classes. The pixels above this level belong to one class (say foreground), and those below belong to the other class (say background). The thresholding algorithm are therefore distinguished by the way the threshold is computed. They are global if there is a unique threshold for the whole image, or local if the threshold varies for each pixel.
Niblack method
Niblack W., An introcuction to digital image procesing p. 115-116, Prentice Hall, 1986.
The threshold is computed locally using the local statistics around the pixel. The statistics is evaluated over a window of half-size w centered at the pixels. Let M and S denote the mean and variance (square root of the second central moment) of the local statistics. The threshold is
where K and R are parameters.
Otsu method
Otsu N., A threshold selection method from gray-level histograms, IEEE SMC 9 (1979) 62-66.
Otsu method is global. It assumes that the pixel levels distribution is bimodal, ie, has essentially two peaks as the superposition of two distribution with different means. It tries to find the level that achieves the best separation of the two distributions.
For any given threshold t it computes the means, m1 and m2, of the two distributions, of levels above t and levels below t. Next it computes the weighted separation of the means
and
where s = E[x2] for the global distribution. The threshold is adjusted to maximize
In a simplified form, the Otsu algorithm maximizes Dm.
Kapur method
Kapur J.N. et al. A new method for gray-level picture thresholding using the entropy of its histogram, Comp. Vision, Graph. Im. Process. 29 (1985) 273-825.
Given the pixel levels distribution, p(x), let
Q(a)=∑x < a p(x) and consider
the two distributions
p'(x) = p(x)/Q(a) for x < a
p"(x) = p(x)/(1-Q(a)) for x > a
Compute the two Shannon entropies H'(a) and H"(a) of these two distributions and the total entropy H(a) = H'(a) + H"(a). The best threshold is the value a that maximizes H(a).
Integrated Function Method
J.M. White, G.D.Rohrer, Image thresholding for optical character
recognition and other applications requiring character image extraction
IBM J. Research Devel. 27 (1983) 400-411.
O.D. Trier, T. Taxt, Improvement of "Integrated Function Algorithm"
for Binirazation of Document Images (1994)
The image is smoothed with a mean filter (e.g. a 5x5 filter). Next the X and Y gradients, Gx and Gy, are computed on the smoothed image and the activity map is constructed,
where the sum runs over a 3x3 neighborhood of the pixel (i,j). The Lapalcian is evaluated for all the pixels for which the activity is larger that a given threshold, A(i,j)>Ta,
The label image has three values:
Trier and Taxt provide a further improvement: for each '0'-marked (4-connected) region count the number N- of 8-connected neighbor '-' pixels, and N+ of neighbor '+' pixels. Next threshold the three level label image so that '+' pixels are foreground and '-' and '0' pixels are background. Finally for each 4-connected foreground component compute the average gradient of the edge pixels, and remove the component if the average is below a threshold Tg.
The algorithm has two parameters, Ta and Tg, besides the size of the smooting window.
Other methods
Bernsen J. Dynamic thresholding of grey-level images,
Proc. 8-th Int. Conf. Pattern Recogn. 1986, p. 1251-1255.
Marco Corvi - Page hosted by
geocities.com.
Chow C.K. and Kaneko T., Automatic detection of the left ventricle
from cineangiograms, Comp. and Biomed. Research 5 (1972) 388-410.
Eikvil L. et al., A fst adaptive method for binarization of document
images, Proc. 1-st Int. Conf. Docum. Anal. Recogn. 1991, p. 435-443.
Mardia K.V. and Hainsworth T.J., A spatial thresholding method for
image segmentation, IEEE PAMI 10 (1988) 919-927.
Yanowitz S.D. and Bruckstein A.M., A new method for image segmentation
Comp. Vision Graph. Im. Process. 46 (1989) 82-95
Taxt T. et al., Segmentation of document images,
IEEE PAMI 11 (1989) 1322-1329.
Parker J.R., Gray-level thresholding in badly illuminated images
IEEE PAMI 13 (1991) 813-819