A Generalization of Otsu’s Method and Minimum Error Thresholding

Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 12350)


We present Generalized Histogram Thresholding (GHT), a simple, fast, and effective technique for histogram-based image thresholding. GHT works by performing approximate maximum a posteriori estimation of a mixture of Gaussians with appropriate priors. We demonstrate that GHT subsumes three classic thresholding techniques as special cases: Otsu’s method, Minimum Error Thresholding (MET), and weighted percentile thresholding. GHT thereby enables the continuous interpolation between those three algorithms, which allows thresholding accuracy to be improved significantly. GHT also provides a clarifying interpretation of the common practice of coarsening a histogram’s bin width during thresholding. We show that GHT outperforms or matches the performance of all algorithms on a recent challenge for handwritten document image binarization (including deep neural networks trained to produce per-pixel binarizations), and can be implemented in a dozen lines of code or as a trivial modification to Otsu’s method or MET.

Supplementary material

504441_1_En_27_MOESM1_ESM.pdf (1.1 mb)
Supplementary material 1 (pdf 1175 KB)


  1. 1.
    Cho, S., Haralick, R., Yi, S.: Improvement of Kittler and Illingworth’s minimum error thresholding. Pattern Recogn. 22(5), 609–617 (1989)CrossRefGoogle Scholar
  2. 2.
    Coudray, N., Buessler, J.L., Urban, J.P.: A robust thresholding algorithm for unimodal image histograms (2010)Google Scholar
  3. 3.
    Doane, D.P.: Aesthetic frequency classifications. Am. Stat. 30(4), 181–183 (1976)MathSciNetGoogle Scholar
  4. 4.
    Hassaïne, A., Al-Maadeed, S., Bouridane, A.: A set of geometrical features for writer identification. In: Huang, T., Zeng, Z., Li, C., Leung, C.S. (eds.) ICONIP 2012. LNCS, vol. 7667, pp. 584–591. Springer, Heidelberg (2012). Scholar
  5. 5.
    Hassaïne, A., Decencière, E., Besserer, B.: Efficient restoration of variable area soundtracks. Image Anal. Stereol. 28(2), 113–119 (2009)CrossRefGoogle Scholar
  6. 6.
    Howe, N.R.: Document binarization with automatic parameter tuning. Int. J. Doc. Anal. Recogn. 16, 247–258 (2013). Scholar
  7. 7.
    Kadhim, N., Mourshed, M.: A shadow-overlapping algorithm for estimating building heights from VHR satellite images. IEEE Geosci. Remote Sens. Lett. 15(1), 8–12 (2018)CrossRefGoogle Scholar
  8. 8.
    Kapur, J.N., Sahoo, P.K., Wong, A.K.: A new method for gray-level picture thresholding using the entropy of the histogram. Comput. Vis. Graph. Image Process. 29(3), 273–285 (1985)CrossRefGoogle Scholar
  9. 9.
    Katz, S., Tal, A., Basri, R.: Direct visibility of point sets. In: SIGGRAPH (2007)Google Scholar
  10. 10.
    Kittler, J., Illingworth, J.: Minimum error thresholding. Pattern Recogn. 19(1), 41–47 (1986)CrossRefGoogle Scholar
  11. 11.
    Kligler, N., Tal, A.: On visibility and image processing. Ph.D. thesis, Computer Science Department, Technion (2017)Google Scholar
  12. 12.
    Kulis, B., Jordan, M.I.: Revisiting K-means: new algorithms via Bayesian nonparametrics. In: ICML (2012)Google Scholar
  13. 13.
    Lindblad, J.: Histogram thresholding using kernel density estimates. In: SSAB Symposium on Image Analysis (2000)Google Scholar
  14. 14.
    Long, J., Shelhamer, E., Darrell, T.: Fully convolutional networks for semantic segmentation. In: CVPR (2015)Google Scholar
  15. 15.
    Lu, H., Kot, A.C., Shi, Y.Q.: Distance-reciprocal distortion measure for binary document images. IEEE Sig. Process. Lett. 11(2), 228–231 (2004)CrossRefGoogle Scholar
  16. 16.
    Onumanyi, A., Onwuka, E., Aibinu, A., Ugweje, O., Salami, M.J.E.: A modified Otsu’s algorithm for improving the performance of the energy detector in cognitive radio. AEU-Int. J. Electron. Commun. 79, 53–63 (2017)CrossRefGoogle Scholar
  17. 17.
    Otsu, N.: A threshold selection method from gray-level histograms. IEEE Trans. Syst. Man Cybern. 9(1), 62–66 (1979)CrossRefGoogle Scholar
  18. 18.
    Pratikakis, I., Zagoris, K., Barlas, G., Gatos, B.: ICFHR 2016 handwritten document image binarization contest (H-DIBCO 2016). ICFHR (2016)Google Scholar
  19. 19.
    Pun, T.: Entropic thresholding, a new approach. Comput. Graph. Image Process. 16(3), 210–239 (1981)CrossRefGoogle Scholar
  20. 20.
    Sahoo, P.K., Soltani, S., Wong, A.K.: A survey of thresholding techniques. Comput. Vis. Graph. Image Process. 41(2), 233–260 (1988)CrossRefGoogle Scholar
  21. 21.
    Salakhutdinov, R., Roweis, S.T., Ghahramani, Z.: Optimization with EM and expectation-conjugate-gradient. In: ICML (2003)Google Scholar
  22. 22.
    Sari, T., Kefali, A., Bahi, H.: Text extraction from historical document images by the combination of several thresholding techniques. Adv. Multimed. (2014).
  23. 23.
    Sauvola, J.J., Pietikäinen, M.: Adaptive document image binarization. Pattern Recogn. 33(2), 225–236 (2000)CrossRefGoogle Scholar
  24. 24.
    Sturges, H.A.: The choice of a class interval. J. Am. Stat. Assoc. 21(153), 65–66 (1926)CrossRefGoogle Scholar
  25. 25.
    Tensmeyer, C., Martinez, T.: Document image binarization with fully convolutional neural networks. In: ICDAR (2017)Google Scholar
  26. 26.
    Wolf, C., Jolion, J.M., Chassaing, F.: Text localization, enhancement and binarization in multimedia documents. In: Object Recognition Supported by User Interaction for Service Robots (2002)Google Scholar
  27. 27.
    Zhang, H., Fritts, J.E., Goldman, S.A.: Image segmentation evaluation: a survey of unsupervised methods. Comput. Vis. Image Underst. 110(2), 260–280 (2008)CrossRefGoogle Scholar
  28. 28.
    Ziaei Nafchi, H., Farrahi Moghaddam, R., Cheriet, M.: Historical document binarization based on phase information of images. In: Park, J.-I., Kim, J. (eds.) ACCV 2012. LNCS, vol. 7729, pp. 1–12. Springer, Heidelberg (2013). Scholar

Copyright information

© Springer Nature Switzerland AG 2020

Authors and Affiliations

  1. 1.Google ResearchSan FranciscoUSA

Personalised recommendations