Page 1 of 1

Otsu' Thresholding Method to Binarize an image

Posted: 2007-01-22T14:51:13-07:00
by xinito
Is there an implementation of ImageMagick? Did adaptive-threshold use this algorithm?

Thanks:?

Posted: 2007-01-22T17:27:48-07:00
by anthony
You may like to explain to us dummys what a "Otsu' Thresholding Method" is!

Posted: 2007-01-23T08:51:08-07:00
by xinito
Ots thresholding is to choose a level from the histogram of the intensity image to threshold the image. Any pixel greater than the level will be white; any one below will be black.

The idea is to maximize the inter-class variance or minimize the within-class variance.

Posted: 2007-01-23T17:54:21-07:00
by anthony
Hmmm sounds like the threshold methods using a 2 color quantization.

Code: Select all

    convert  image.png  -colorspace gray  +dither  -colors 2  -normalize \
             threshold_colors.gif
this turns off dithering, then finds the best two grey level colors to represent the image, regardless of if the image is bright, dark or other. The two grey levels are then normalised to black and white.

For more info see
IM Examples, Color Quantization and Dithering, Two Color Quantization
http://www.cit.gu.edu.au/~anthony/graph ... colors_two