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.





Similar content being viewed by others
Notes
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
Abutaleb, A.S.: Automatic thresholding of gray-level pictures using two-dimensional entropy. Comput. Vis. Graph. Image Process. 47(1), 22–32 (1989)
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)
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)
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)
Chen, L.Q., Yang, P., Wu, J.H.: Implement real-time matting technology in stage environment. Comput. Eng. Appl. 16, 055 (2008)
Chen, W.T., Wen, C.H., Yang, C.W.: A fast two-dimensional entropic thresholding algorithm. Pattern Recogn. 27(7), 885–893 (1994)
Crow, F.C.: Summed-area tables for texture mapping. ACM SIGGRAPH Comput. Graph. 18(3), 207–212 (1984)
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
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
Gao, L.: Natural gesture based interaction for handheld augmented reality. Ph.D. thesis, University of Canterbury (2013)
Jianzhuang, L., Wenqing, L.: The automatic thresholding of gray-level pictures via two-dimensional OTSU method. Acta Autom. Sin. 1, 015 (1993)
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
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)
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)
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
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)
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)
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)
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
Nehab, D., Maximo, A., Lima, R.S., Hoppe, H.: GPU-efficient recursive filtering and summed-area tables. ACM Trans. Graph. 30(6), 176 (2011)
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
Otsu, N.: A threshold selection method from gray-level histograms. Automatica 11(285–296), 23–27 (1975)
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
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)
Sezgin, M., Sankur, B.: Survey over image thresholding techniques and quantitative performance evaluation. J. Electron. Imaging 13(1), 146–168 (2004)
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)
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)
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)
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
Wu, X.J., Zhang, Y.J., Xia, L.Z.: A fast recurring two-dimensional entropic thresholding algorithm. Pattern Recogn. 32(12), 2055–2061 (1999)
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)
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
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
Corresponding author
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations
Rights and permissions
About this article
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
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11554-018-00848-5