In the GIMP UI, there is an Apply Threshold functionality (GIMP 2.6) which has an option called Auto. This automatically calculates an appropriate lower threshold value for the image. Is this function/option available to use in a plugin? The gimp-threshold and gimp-histogram functions don’t seem to have this option.
Share
Here’s the solution I finally used. Works only for grayscale images. Its the same algorithm as in the gimp_histogram_get_threshold function in gimphistogram.c
http://git.gnome.org/browse/gimp/tree/app/base/gimphistogram.c