thresOtsu

[ XITE Reference Manual | XITE home ]

Name

thresOtsu - threshold by the method of Otsu

Syntax

 thresOtsu [-l <lpv>] [-h <hpv>] <inimage> [<outimage>]

Description

thresOtsu calculates, and eventually applies, the threshold value by using the method of Otsu. The method attempts to maximize the between-class variance between the class of pixels above the threshold, and the class of pixels below.

If an output image is given, the input image is thresholded and written to the output image. Otherwise the threshold value is only reported to standard output.

Options

-l lpv
Output for low pixels (below threshold). Default 0.

-h hpv
Output for high pixels (above threshold). Default 255.

Reference

Otsu, N.
"A Threshold Selection Method from Gray-Level histograms" IEEE Trans. Syst., Man and Cyb., Vol SMC-9, No.1, pp.62-66.

See also

thresOtsu(3), threshold(1), thresPtile(1), thresRidCal(1), thresLloyd(1)

Restrictions

inimage must have bands with pixel type unsigned byte.

Author

Tor Lønnestad, BLAB, Ifi, UiO

Examples

 thresOtsu mona.img
 thresOtsu -h 1 mona.img monaThres.img

Id

$Id: thresOtsu.c,v 1.20 1997/01/14 13:11:08 svein Exp $