M-File Help: niblack | View code for niblack |
Adaptive thresholding
T = niblack(im, k, w2) is the per-pixel (local) threshold to apply to image im. T has the same dimensions as im. The threshold at each pixel is a function of the mean and standard deviation computed over a WxW window, where W=2*w2+1.
[T,m,s] = niblack(im, k, w2) as above but returns the per-pixel mean m and standard deviation s.
t = niblack(im, -0.2, 20); idisp(im >= t);
An Introduction to Digital Image Processing, W. niblack, Prentice-Hall, 1986.
© 1990-2012 Peter Corke.