M-File Help: otsu View code for otsu

otsu

Threshold selection

T = otsu(im) is an optimal threshold for binarizing an image with a bimodal intensity histogram. T is a scalar threshold that maximizes the variance between the classes of pixels below and above the thresold T.

Example

t = otsu(im);
idisp(im >= t);

Notes

Reference

A Threshold Selection Method from Gray-Level Histograms, N. otsu IEEE Trans. Systems, Man and Cybernetics Vol SMC-9(1), Jan 1979, pp 62-66

See also

niblack, ithresh


 

© 1990-2012 Peter Corke.