Advertisement

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

  • Xianyi Zhu
  • Yi XiaoEmail author
  • Guanghua Tan
  • Shizhe Zhou
  • Chi-Sing Leung
  • Yan Zheng
Original Research Paper
  • 38 Downloads

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.

Keywords

2D OTSU thresholding 2D entropy-based thresholding GPU acceleration Image binarization 2D histogram generation 

Notes

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).

References

  1. 1.
    Abutaleb, A.S.: Automatic thresholding of gray-level pictures using two-dimensional entropy. Comput. Vis. Graph. Image Process. 47(1), 22–32 (1989)CrossRefGoogle Scholar
  2. 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)CrossRefGoogle Scholar
  3. 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)CrossRefGoogle Scholar
  4. 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)MathSciNetCrossRefzbMATHGoogle Scholar
  5. 5.
    Chen, L.Q., Yang, P., Wu, J.H.: Implement real-time matting technology in stage environment. Comput. Eng. Appl. 16, 055 (2008)CrossRefGoogle Scholar
  6. 6.
    Chen, W.T., Wen, C.H., Yang, C.W.: A fast two-dimensional entropic thresholding algorithm. Pattern Recogn. 27(7), 885–893 (1994)CrossRefGoogle Scholar
  7. 7.
    Crow, F.C.: Summed-area tables for texture mapping. ACM SIGGRAPH Comput. Graph. 18(3), 207–212 (1984)CrossRefGoogle Scholar
  8. 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. 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. 10.
    Gao, L.: Natural gesture based interaction for handheld augmented reality. Ph.D. thesis, University of Canterbury (2013)Google Scholar
  11. 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. 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. 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)CrossRefGoogle Scholar
  14. 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)CrossRefGoogle Scholar
  15. 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. 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)CrossRefGoogle Scholar
  17. 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)CrossRefGoogle Scholar
  18. 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)CrossRefGoogle Scholar
  19. 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. 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)CrossRefGoogle Scholar
  21. 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. 22.
    Otsu, N.: A threshold selection method from gray-level histograms. Automatica 11(285–296), 23–27 (1975)Google Scholar
  23. 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. 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)CrossRefGoogle Scholar
  25. 25.
    Sezgin, M., Sankur, B.: Survey over image thresholding techniques and quantitative performance evaluation. J. Electron. Imaging 13(1), 146–168 (2004)CrossRefGoogle Scholar
  26. 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. 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)CrossRefGoogle Scholar
  28. 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)MathSciNetGoogle Scholar
  29. 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. 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)CrossRefGoogle Scholar
  31. 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)CrossRefGoogle Scholar
  32. 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

Copyright information

© Springer-Verlag GmbH Germany, part of Springer Nature 2019

Authors and Affiliations

  • Xianyi Zhu
    • 1
  • Yi Xiao
    • 1
    Email author
  • Guanghua Tan
    • 1
  • Shizhe Zhou
    • 1
  • Chi-Sing Leung
    • 2
  • Yan Zheng
    • 3
  1. 1.College of Computer Science and Electronic EngineeringHunan UniversityChangshaPeople’s Republic of China
  2. 2.Department of Electronic EngineeringCity University of Hong KongKowloon TongHong Kong
  3. 3.College of Electrical and Information EngineeringHunan UniversityChangshaPeople’s Republic of China

Personalised recommendations