Skip to main content
Log in

GPU-accelerated 2D OTSU and 2D entropy-based thresholding

  • Original Research Paper
  • Published:
Journal of Real-Time Image Processing Aims and scope Submit manuscript

Abstract

Image thresholding methods are commonly used to distinguish foreground objects from a background. 2D thresholding methods consider both the value of a pixel and the mean of the pixel’s neighbors, so they are less sensitive to noises than 1D thresholding methods. However, the time complexity increases from \(O(\ell ^2)\) to \(O(\ell ^4)\), where \(\ell\) is the number of gray levels. This paper proposes a parallel algorithm (\(O(\ell + \ell \log \ell )\) ) to accelerate both 2D OTSU and 2D entropy-based thresholding on GPU. By dividing the thresholding methods into seven cascaded parallelizable computational steps, our algorithm performs all the computations on GPU and requires no data transfer between GPU memory and main memory. The time complexity analysis explains the theoretical superiority over the state-of-the-art CPU sequential algorithm (O( \(\ell ^2)\)). Experimental results show that our parallel thresholding runs 50 times faster than the sequential one without loss of accuracy.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5

Similar content being viewed by others

Notes

  1. We have made our implementation of the parallel 2D OTSU and 2D entropy-based thresholding publicly available for the research community.https://github.com/xianyizhu1024/GPU_2D_Thresholding.git.

References

  1. Abutaleb, A.S.: Automatic thresholding of gray-level pictures using two-dimensional entropy. Comput. Vis. Graph. Image Process. 47(1), 22–32 (1989)

    Google Scholar 

  2. Acharya, K.A., Babu, R.V., Vadhiyar, S.S.: A real-time implementation of SIFT using GPU. J. Real Time Image Process. 14(2), 267–277 (2018)

    Google Scholar 

  3. Bhandari, A.K., Singh, V.K., Kumar, A., Singh, G.K.: Cuckoo search algorithm and wind driven optimization based study of satellite image segmentation for multilevel thresholding using Kapur’s entropy. Expert Syst. Appl. 41(7), 3538–3560 (2014)

    Google Scholar 

  4. Borji, A., Sihite, D.N., Itti, L.: Quantitative analysis of human-model agreement in visual saliency modeling: a comparative study. IEEE Trans Image Process 22(1), 55–69 (2013)

    MathSciNet  MATH  Google Scholar 

  5. Chen, L.Q., Yang, P., Wu, J.H.: Implement real-time matting technology in stage environment. Comput. Eng. Appl. 16, 055 (2008)

    Google Scholar 

  6. Chen, W.T., Wen, C.H., Yang, C.W.: A fast two-dimensional entropic thresholding algorithm. Pattern Recogn. 27(7), 885–893 (1994)

    Google Scholar 

  7. Crow, F.C.: Summed-area tables for texture mapping. ACM SIGGRAPH Comput. Graph. 18(3), 207–212 (1984)

    Google Scholar 

  8. Dailiang, X., Haifeng, J., Zhiyao, H., Baoliang, W., Haiqing, L.: A new void fraction measurement method for gas-oil two-phase flow based on electrical capacitance tomography system and OTSU algorithm. In: Fifth World Congress on Intelligent Control and Automation, IEEE, vol. 4, pp. 3753–3756 (2004). https://doi.org/10.1109/WCICA.2004.1343302

  9. Fengjie, S., He, W., Jieqing, F.: 2d OTSU segmentation algorithm based on simulated annealing genetic algorithm for iced-cable images. In: International Forum on Information Technology and Applications, IEEE, vol. 2, pp. 600–602 (2009). https://doi.org/10.1109/IFITA.2009.171

  10. Gao, L.: Natural gesture based interaction for handheld augmented reality. Ph.D. thesis, University of Canterbury (2013)

  11. Jianzhuang, L., Wenqing, L.: The automatic thresholding of gray-level pictures via two-dimensional OTSU method. Acta Autom. Sin. 1, 015 (1993)

    Google Scholar 

  12. Jianzhuang, L., Wenqing, L., Yupeng, T.: Automatic thresholding of gray-level pictures using two-dimension OTSU method. In: International Conference on Circuits and Systems, IEEE, pp. 325–327 (1991). https://doi.org/10.1109/CICCAS.1991.184351

  13. Kapur, J.N., Sahoo, P.K., Wong, A.K.: A new method for gray-level picture thresholding using the entropy of the histogram. Comput. Vision Graph. Image Process. 29(3), 273–285 (1985)

    Google Scholar 

  14. Kohlhoff, K.J., Pande, V.S., Altman, R.B.: K-means for parallel architectures using all-prefix-sum sorting and updating steps. IEEE Trans. Parallel Distrib. Syst. 24(8), 1602–1612 (2013)

    Google Scholar 

  15. Li-Sheng, J., Lei, T., Rong-ben, W., Lie, G., Jiang-wei, C.: An improved OTSU image segmentation algorithm for path mark detection under variable illumination. In: IEEE Proceedings. Intelligent Vehicles Symposium, IEEE, pp. 840–844 (2005). https://doi.org/10.1109/IVS.2005.1505209

  16. Lin, Y.C., Wang, C.Y., Zeng, J.Y.: A case study on mathematical expression recognition to GPU. J. Supercomput. 73(8), 3333–3343 (2017)

    Google Scholar 

  17. Manikandan, S., Ramar, K., Iruthayarajan, M.W., Srinivasagan, K.: Multilevel thresholding for segmentation of medical brain images using real coded genetic algorithm. Measurement 47, 558–568 (2014)

    Google Scholar 

  18. Matsushita, Y., Nishino, K., Ikeuchi, K., Sakauchi, M.: Illumination normalization with time-dependent intrinsic images for video surveillance. IEEE Trans. Pattern Anal. Mach. Intell. 26(10), 1336–1347 (2004)

    Google Scholar 

  19. Nafchi, H.Z., Ayatollahi, S.M., Moghaddam, R.F., Cheriet, M.: Persian heritage image binarization competition (PHIBC 2012). In: First Iranian Conference on Pattern Recognition and Image Analysis, IEEE, pp. 1–4 (2013). https://doi.org/10.1109/PRIA.2013.6528442

  20. Nehab, D., Maximo, A., Lima, R.S., Hoppe, H.: GPU-efficient recursive filtering and summed-area tables. ACM Trans. Graph. 30(6), 176 (2011)

    Google Scholar 

  21. Noh, J.S., Rhee, K.H.: Palmprint identification algorithm using HU invariant moments and OTSU binarization. In: In: Fourth Annual ACIS International Conference on Computer and Information Science, IEEE, pp. 94–99. IEEE (2005). https://doi.org/10.1109/ICIS.2005.97

  22. Otsu, N.: A threshold selection method from gray-level histograms. Automatica 11(285–296), 23–27 (1975)

    Google Scholar 

  23. Pare, S., Bhandari, A.K., Kumar, A., Singh, G.K., Khare, S.: Satellite image segmentation based on different objective functions using genetic algorithm: a comparative study. In: International Conference on Digital Signal Processing, IEEE, pp. 730–734 (2015). https://doi.org/10.1109/ICDSP.2015.7251972

  24. Patra, S., Ghosh, S., Ghosh, A.: Histogram thresholding for unsupervised change detection of remote sensing images. Int. J. Remote Sens. 32(21), 6071–6089 (2011)

    Google Scholar 

  25. Sezgin, M., Sankur, B.: Survey over image thresholding techniques and quantitative performance evaluation. J. Electron. Imaging 13(1), 146–168 (2004)

    Google Scholar 

  26. Singh, B.M., Sharma, R., Mittal, A., Ghosh, D.: Parallel implementation of OTSU’s binarization approach on GPU. Int. J. Comput. Appl. 32(2), 16–21 (2010)

    Google Scholar 

  27. Soua, M., Kachouri, R., Akil, M.: GPU parallel implementation of the new hybrid binarization based on Kmeans method (HBK). J. Real Time Image Process. 14(2), 363–377 (2018)

    Google Scholar 

  28. Wang, H.Y., Dl, Pan, Xia, D.S.: A fast algorithm for two-dimensional OTSU adaptive threshold algorithm. Acta Autom. Sin. 33(9), 968–971 (2007)

    MathSciNet  Google Scholar 

  29. Wei, K., Zhang, T., He, B.: Detection of sand and dust storms from MERIS image using FE-OTSU alogrithm. In: 2nd International Conference on Bioinformatics and Biomedical Engineering, IEEE, pp. 3852–3855 (2008). https://doi.org/10.1109/ICBBE.2008.464

  30. Wu, X.J., Zhang, Y.J., Xia, L.Z.: A fast recurring two-dimensional entropic thresholding algorithm. Pattern Recogn. 32(12), 2055–2061 (1999)

    Google Scholar 

  31. Xiao, Y., Feng, R.B., Han, Z.F., Leung, C.S.: GPU accelerated self-organizing map for high dimensional data. Neural Process. Lett. 41(3), 341–355 (2015)

    Google Scholar 

  32. Ying, W., Cunxi, C., Tong, J., Xinhe, X.: Segmentation of regions of interest in lung CT images based on 2-D OTSU optimized by genetic algorithm. In: Chinese Control and Decision Conference, IEEE, pp. 5185–5189 (2009). https://doi.org/10.1109/CCDC.2009.5195024

Download references

Acknowledgements

The work is supported by the National Key R & D Program of China (2018YFB0203904), NSFC from PRC (61872137, 61502158, 61602165, 61303147), Hunan NSF (2017JJ3042, 2018JJ3074) and GRF from Hong Kong (Project Num.: CityU 11259516).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Yi Xiao.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Zhu, X., Xiao, Y., Tan, G. et al. GPU-accelerated 2D OTSU and 2D entropy-based thresholding. J Real-Time Image Proc 17, 993–1005 (2020). https://doi.org/10.1007/s11554-018-00848-5

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11554-018-00848-5

Keywords

Navigation