From Classic to Cutting-Edge: A Near-Perfect Global Thresholding Approach with Machine Learning
Source abstract
Abstract
Image binarization is an important process in many computer-vision applications. This transforms the color space of the original image into black and white. Global thresholding is a quick and reliable way to achieve binarization, but it is inherently limited by image noise and uneven lighting. This paper introduces a global thresholding method that uses the results of classical global thresholding algorithms and other global image features to train a regression model via machine learning. We prove through nested cross-validation that the model can predict the best possible global threshold with an average F-measure of 90.86% and a confidence of 0.79%. We apply our approach to a popular computer vision problem, document image binarization, and compare popular metrics with the best possible values achievable through global thresholding and with the values obtained through the algorithms we used to train our model. Our results show a significant improvement over these classical global thresholding algorithms, achieving near-perfect scores on all the computed metrics. We also compared our results with state-of-the-art binarization algorithms and outperformed them on certain datasets. The global threshold obtained through our method closely approximates the ideal global threshold and could be used in a mixed local-global approach for better results.
Source: crossref · Quality: baseline
Research context
OpenAlex topics: Image Retrieval and Classification Techniques · Medical Image Segmentation Techniques · Image and Signal Denoising Methods
SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.
Affiliations
Computer Science and Engineering Department, Faculty of Automatic Control and Computers, National University of Science and Technology Politehnica Bucharest, 060042 Bucharest, Romania
References (58)
Show source-provided references
1. Binarization Methods in Multimedia Systems when Recognizing License Plates of Cars
2. Image Thresholding Method Based on Tsallis Entropy Correlation10.1007/s11042-024-19332-3 ↗
3. Histogram-Based Global Thresholding Method for Image Binarization10.1016/j.ijleo.2024.171814 ↗
4. Adaptive Shock-Diffusion Model for Restoration of Degraded Document Images10.1016/j.apm.2019.10.052 ↗
5. Nonlinear Edge-Preserving Diffusion with Adaptive Source for Document Images Binarization
6. Mahani, Z., Zahid, J., Saoud, S., Rhabi, M.E., and Hakim, A. (2012). Text Enhancement by PDE’s Based Methods. Lecture Notes in Computer Science, Springer Nature.10.1007/978-3-642-31254-0_8 ↗
7. Bogiatzis, A., and Papadopoulos, B. (2019). Global Image Thresholding Adaptive Neuro-Fuzzy Inference System Trained with Fuzzy Inclusion and Entropy Measures. Symmetry, 11.10.3390/sym11020286 ↗
8. Multilevel Thresholding for Image Segmentation Using Mean Gradient10.1155/2022/1254852 ↗
9. A New Binarization Method for Degraded Document Images
10. A Selectional Auto-Encoder Approach for Document Image Binarization
11. Peng, X., Wang, C., and Cao, H. (2019, January 20–25). Document Binarization via Multi-Resolutional Attention Model with DRD Loss. Proceedings of the International Conference on Document Analysis and Recognition (ICDAR), Sydney, Australia.10.1109/ICDAR.2019.00017 ↗
12. DeepOtsu: Document Enhancement and Binarization Using Iterative Deep Learning10.1016/j.patcog.2019.01.025 ↗
13. Mondal, R., Chakraborty, D., and Chanda, B. (2019, January 20–25). Learning 2D Morphological Network for Old Document Image Binarization. Proceedings of the International Conference on Document Analysis and Recognition (ICDAR), Sydney, Australia.10.1109/ICDAR.2019.00020 ↗
14. Document Image Binarization Using Dual Discriminator Generative Adversarial Networks10.1109/LSP.2020.3003828 ↗
15. Two-Stage Generative Adversarial Networks for Binarization of Color Document Images10.1016/j.patcog.2022.108810 ↗
16. Document Image Binarization with Cascaded Generators of Conditional Generative Adversarial Networks10.1016/j.patcog.2019.106968 ↗
17. DE-GAN: A Conditional Generative Adversarial Network for Document Enhancement10.1109/TPAMI.2020.3022406 ↗
18. A Novel Degraded Document Binarization Model through Vision Transformer Network10.1016/j.inffus.2022.12.011 ↗
19. Yang, Z., Liu, B., Xxiong, Y., Yi, L., Wu, G., Tang, X., Liu, Z., Zhou, J., and Zhang, X. (November, January 29). DocDiff: Document Enhancement via Residual Diffusion Models. Proceedings of the 31st ACM International Conference on Multimedia (MM 2023), Ottawa, ON, Canada.10.1145/3581783.3611730 ↗
20. Souibgui, M.A., Biswas, S., Jemni, S.K., Kessentini, Y., Fornes, A., Llados, J., and Pal, U. (2022, January 21–25). DoCENTR: An End-to-End Document Image Enhancement Transformer. Proceedings of the 2022 26th International Conference on Pattern Recognition (ICPR), Montreal, QC, Canada.10.1109/ICPR56361.2022.9956101 ↗
21. Biswas, R., Roy, S.K., Wang, N., Pal, U., and Huang, G.B. (2023). DocBinFormer: A Two-Level Transformer Network for Effective Document Image Binarization. arXiv.
22. GDB: Gated Convolutions-Based Document Binarization10.1016/j.patcog.2023.109989 ↗
23. Siddiqui, F.U., and Yahya, A. (2021). Clustering Techniques for Image Segmentation, Springer Nature.10.1007/978-3-030-81230-0 ↗
24. Image Thresholding Using Standard Deviation
25. Minimum Cross Entropy Thresholding10.1016/0031-3203(93)90115-D ↗
26. A Survey on Global Thresholding Methods for Mapping Open Water Body Using Sentinel-2 Satellite Imagery and Normalized Difference Water Index10.1007/s11831-020-09416-2 ↗
27. Minimum Cross-Entropy Threshold Selection10.1016/0031-3203(95)00066-6 ↗
28. Bimodality Revisited10.22237/jmasm/1177992120 ↗
29. Tarbă, N., Voncilă, M.-L., and Boiangiu, C.-A. (2022). On Generalizing Sarle’s Bimodality Coefficient as a Path towards a Newly Composite Bimodality Coefficient. Mathematics, 10.10.3390/math10071042 ↗
30. Ahmed, Z., Amizadeh, S., Bilenko, M., Carr, R., Chin, W.-S., Dekel, Y., Dupre, X., Eksarevskiy, V., Filipi, S., and Finley, T. (2019, January 4–8). Machine Learning at Microsoft with ML.NET. Proceedings of the 25th ACM SIGKDD international conference on knowledge discovery & data mining, Anchorage, AK, USA.10.1145/3292500.3330667 ↗
31. Frugal Optimization for Cost-Related Hyperparameters
32. Ke, G., Meng, Q., Finley, T., Wang, T., Chen, W., Ma, W., Ye, Q., and Liu, T.-Y. (2017, January 4–9). LightGBM: A Highly Efficient Gradient Boosting Decision Tree. Proceedings of the 31st International Conference on Neural Information Processing Systems, Long Beach, CA, USA.
33. Hughes, A.J., and Grawoig, D.E. (1971). Statistics, a Foundation for Analysis, Addison-Wesley Educational Publishers Inc.
34. Berrar, D. (2018). Cross-Validation. Elsevier eBooks, Elsevier.
35. Cross-Validation: What Does It Estimate and How Well Does It Do It?10.1080/01621459.2023.2197686 ↗
36. Gatos, B., Ntirogiannis, K., and Pratikakis, I. (2009, January 26–29). ICDAR 2009 Document Image Binarization Contest (DIBCO 2009). Proceedings of the 2009 10th International Conference on Document Analysis and Recognition, Barcelona, Spain.10.1109/ICDAR.2009.246 ↗
37. Pratikakis, I., Gatos, B., and Ntirogiannis, K. (2010, January 16–18). H-DIBCO 2010—Handwritten Document Image Binarization Competition. Proceedings of the 2010 12th International Conference on Frontiers in Handwriting Recognition, Kolkata, India.10.1109/ICFHR.2010.118 ↗
38. Pratikakis, I., Gatos, B., and Ntirogiannis, K. (2011, January 18–21). ICDAR 2011 Document Image Binarization Contest (DIBCO 2011). Proceedings of the International Conference on Document Analysis and Recognition, Beijing, China.10.1109/ICDAR.2011.299 ↗
39. Pratikakis, I., Gatos, B., and Ntirogiannis, K. (2012, January 18–20). ICFHR 2012 Competition on Handwritten Document Image Binarization (H-DIBCO 2012). Proceedings of the International Conference on Frontiers in Handwriting Recognition, Bari, Italy.10.1109/ICFHR.2012.216 ↗
40. Pratikakis, I., Gatos, B., and Ntirogiannis, K. (2013, January 25–28). ICDAR 2013 Document Image Binarization Contest (DIBCO 2013). Proceedings of the 12th International Conference on Document Analysis and Recognition, Washington, DC, USA.10.1109/ICDAR.2013.219 ↗
41. Ntirogiannis, K., Gatos, B., and Pratikakis, I. (2014, January 1–4). ICFHR2014 Competition on Handwritten Document Image Binarization (H-DIBCO 2014). Proceedings of the 14th International Conference on Frontiers in Handwriting Recognition, Crete, Greece.10.1109/ICFHR.2014.141 ↗
42. Pratikakis, I., Zagoris, K., Barlas, G., and Gatos, B. (2016, January 23–26). ICFHR2016 Handwritten Document Image Binarization Contest (H-DIBCO 2016). Proceedings of the 15th International Conference on Frontiers in Handwriting Recognition (ICFHR), Shenzhen, China.10.1109/ICFHR.2016.0118 ↗
43. Pratikakis, I., Zagoris, K., Barlas, G., and Gatos, B. (2017, January 9–12). ICDAR2017 Competition on Document Image Binarization (DIBCO 2017). Proceedings of the 14th IAPR International Conference on Document Analysis and Recognition (ICDAR), Kyoto, Japan.10.1109/ICDAR.2017.228 ↗
44. Pratikakis, I., Zagori, K., Kaddas, P., and Gatos, B. (2018, January 5–8). ICFHR 2018 Competition on Handwritten Document Image Binarization (H-DIBCO 2018). Proceedings of the 16th International Conference on Frontiers in Handwriting Recognition (ICFHR), Niagara Falls, NY, USA.10.1109/ICFHR-2018.2018.00091 ↗
45. Pratikakis, I., Zagoris, K., Karagiannis, X., Tsochatzidis, L., Mondal, T., and Marthot-Santaniello, I. (2019, January 20–25). ICDAR 2019 Competition on Document Image Binarization (DIBCO 2019). Proceedings of the International Conference on Document Analysis and Recognition (ICDAR), Sydney, Australia.10.1109/ICDAR.2019.00249 ↗
46. An Evaluation Technique for Binarization Algorithms
47. CMATERdb (2025, May 22). The Pattern Recognition Database Repository. Available online: https://code.google.com/archive/p/cmaterdb/.
48. (2025, May 22). Einsiedeln, Stiftsbibliothek, Codex 611(89), from 1314. Available online: https://www.e-codices.unifr.ch/en/sbe/0611/.
49. (2025, May 22). Salzinnes Antiphonal Manuscript (CDM-Hsmu M2149.14). Available online: https://cantus.simssa.ca/manuscript/133/.
50. Lins, R.D., Torreão, G., and Silva, G.P.E. (2010). Content Recognition and Indexing in the LiveMemory Platform. Lecture Notes in Computer Science, Springer.10.1007/978-3-642-13728-0_20 ↗
51. Two Decades of Document Processing in Latin America
52. The NoisyOffice Database: A Corpus to Train Supervised Machine Learning Filters for Image Processing
53. Efficient Multiscale Sauvola’s Binarization10.1007/s10032-013-0209-0 ↗
54. Burie, J.-C., Coustaty, M., Hadi, S., Kesiman, M.W.A., Ogier, J.-M., Paulus, E., Sok, K., Sunarya, I.M.G., and Valy, D. (2016, January 23–26). ICFHR2016 Competition on the Analysis of Handwritten Text in Images of Balinese Palm Leaf Manuscripts. Proceedings of the 15th International Conference on Frontiers in Handwriting Recognition (ICFHR), Shenzhen, China.10.1109/ICFHR.2016.0114 ↗
55. Nafchi, H.Z., Ayatollahi, S.M., Moghaddam, R.F., and Cheriet, M. (2025, May 22). Persian Heritage Image Binarization Dataset (PHIBD 2012). Available online: http://tc11.cvc.uab.es/datasets/PHIBD 2012_1.10.1109/PRIA.2013.6528442 ↗
56. Adaptive Binarization of Severely Degraded and Non-Uniformly Illuminated Documents10.1007/s10032-014-0219-6 ↗
57. Hedjam, R., and Cheriet, M. (2013, January 25–28). Ground-Truth Estimation in Multispectral Representation Space: Application to Degraded Document Image Binarization. Proceedings of the 12th International Conference on Document Analysis and Recognition, Washington, DC, USA.10.1109/ICDAR.2013.45 ↗
58. Maddock, J., and Kormanyos, C. (2025, May 22). Boost Multiprecision. Available online: https://www.boost.org/doc/libs/1_85_0/libs/multiprecision/doc/html/boost_multiprecision/intro.html.