P. 1
Machine Vision Toolbox for MATLABr3

Machine Vision Toolbox for MATLABr3

|Views: 568|Likes:
Published by betogetherbeurself

More info:

Published by: betogetherbeurself on Apr 20, 2012
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

08/16/2013

pdf

text

original

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 aW ×W 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.

Example

t = niblack(im, -0.2, 20);
idisp(im >= t);

Notes

• This is an efficient algorithm very well suited for binarizing text.
w2 should be chosen to be half the “size” of the features to be segmented, for
example, in text segmentation, the height of a character.

• A common choice of k=-0.2

Reference

An Introduction to Digital Image Processing, W. niblack, Prentice-Hall, 1986.

Machine Vision Toolbox for MATLAB R

157

Copyright c Peter Corke 2011

CHAPTER2. FUNCTIONSANDCLASSES

See also

otsu, ithresh

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->