Possible wrong Otsu (auto) threshold value for binarisation
Submitted by Vincent
Created attachment 218327 Picture-test to compute Otsu Thresholding
Gimp use the Otsu method to compute binarization threshold.
If you compute the auto-threshold for the attached picture with Gimp 2.8 (menu "Colors / Threshold - Auto" or "Couleurs / Seuil - Auto in french), Gimp find 185.
If you compute the auto-threshold for the attached picture with ImageJ (menu "Image / Adjust / Threshold - Otsu"), ImageJ find 195.
I think these two threshold (195 and 185) can be improved.
- Gimp return the threshold "s1" for maximum (GREATER) histogram standard variation.
- ImageJ return the threshold "s2" for maximum (GREATER OR EQUAL) histogram standard variation.
I think you must compute s1 and s2 and return s = ( s1 + s2 ) / 2
Otsu threshold must be ( 185 + 195 ) / 2 = 190 for the attached picture. Look at the histogram, it is the middle...
(In most cases, s1 = s2 = s...)
Attachment 218327, "Picture-test to compute Otsu Thresholding":