Abstract
This paper proposes a fast algorithm for integrating connected-component labeling and Euler number computation. Based on graph theory, the Euler number of a binary image in the proposed algorithm is calculated by counting the occurrences of four patterns of the mask for processing foreground pixels in the first scan of a connected-component labeling process, where these four patterns can be found directly without any additional calculation; thus, connected-component labeling and Euler number computation can be integrated more efficiently. Moreover, when computing the Euler number, unlike other conventional algorithms, the proposed algorithm does not need to process background pixels. Experimental results demonstrate that the proposed algorithm is much more efficient than conventional algorithms either for calculating the Euler number alone or simultaneously calculating the Euler number and labeling connected components.
Similar content being viewed by others
Notes
A run is a block of contiguous object pixels in a row.
References
Gonzalez, R.C., Woods, R.E.: Digital image processing. Third ed., Pearson Prentice Hall, Upper Saddle River, NJ 07458 (2008)
Horn, B.P.K.: Robot Vision, pp. 73–77. McGraw-Hill, New York (1986)
Srihari, S.N.: Document image understanding. In: Proceedings ACM/IEEE Joint Fall Computer Conference, Dallas, TX, pp. 87–95 (1986)
Rosin, P.L., Ellis, T.: Image difference threshold strategies and shadow detection. In: Proceedings British Machine Vision Conference, pp. 347–356 (1995)
Nayar, S.K., Bolle, R.M.: Reflectance-based object recognition. Int. J. Comput. Vis. 17(3), 219–240 (1996)
Rosenfeld, A., Pfalts, J.L.: Sequential operations in digital picture processing. J. ACM 13(4), 471–494 (1966)
Suzuki, K., Horiba, I., Sugie, N.: Linear-time connected-component labeling based on sequential local operations. Comput. Vis. Image Understand. 89, 1–23 (2003)
Gotoh, T., Ohta, Y., Yoshida, M., Shirai, Y.: Component labeling algorithm for video rate processing. Proc. SPIE 804, 217–224 (1987)
Tarjan, R.E.: Efficiency of a good but not linear set union algorithm. J. ACM 22(2), 215–225 (1975)
He, L., Chao, Y., Suzuki, K.: A linear-time two-scan labeling algorithm. Image Processing, 2007. ICIP 2007. IEEE Int. Conf., pp. V-241–V-244, San Antonio (2007)
He, L., Chao, Y., K, Suzuki: A run-based two-scan labeling algorithm. IEEE Trans. Image Process. 17(5), 749–756 (2008)
He, L., Chao, Y., Suzuki, K., Wu, K.: Fast Connected-Component Labeling. Patt. Recognit. 42(9), 1977–1987 (2009)
He, L., Chao, Y., Suzuki, K.: An efficient first-scan method for label-equivalence-based labeling algorithms. Patt. Recognit. Lett. 31(1), 28–35 (2010)
Grana, C., Borghesani, D., Cucchiara, R.: Optimized Block-Based Connected Components Labeling With Decision Trees. IEEE Trans. Image Process. 19(6), 1596–1609 (2010)
Chang, F., Chen, C.J., Lu, C.J.: A linear-time component-labeling algorithm using contour tracing technique. Comput. Vis. Image Understand. 93, 206–220 (2004)
Gray, S.B.: Local properties of binary images in two dimensions. IEEE Trans. Comput. C-20:551–561 (1971)
http://www.mathworks.com/access/helpdesk/help/toolbox/images/bweuler.html
Chen, M.H., Yan, P.F.: A fast algorithm to calculate the Euler number for binary image. Pattern Recognit. Lett. 8(5), 295–297 (1988)
Juan, L.D.S., Juan, H.S.: On the computation of the Euler number of a binary object. Pattern Recognit. 29(3), 471–476 (1996)
Zenzo, S., Cinque, L., Levialdi, S.: Run-based algorithms for binary image analysis and processing. IEEE Trans. 18(1), 83–89 (1996)
He, L., Chao, Y., Suzuki, K.: An Algorithm for Connected-Component Labeling, Hole Labeling and Euler Number Computing. J. Comput. Sci. Technol. 28(3), 468–478 (2013)
He, L., Zhao, X., Yao, B., Yang, Y., Chao, Y., Shi, Z., Suzuki, K.A.: Combinational algorithm for connected-component labeling and euler number computing. J. Real Time Image Process. doi:10.1007/s11554-014-0433-y
West, D.B.: Introduction to graph theory. Second edition, Prentice Hall (2001)
He, L., Yao, B., Zhao, X., Yan, Y., Chao, Y., Ohta A.: A graph-theory-based algorithm for euler number computing. IEICE TRANSACTIONS on Information and Systems. E98-D(2), 457–461 (2015)
Otsu, N.A.: threshold selection method from gray-level histograms. IEEE Trans. Syst. Man Cybernet. 9, 62–66 (1979)
Acknowledgments
We thank the anonymous referees for their valuable comments that greatly improved this paper. This work was supported in part by the National Natural Science Foundation of China under Grant No. 61471227, the Grant-in-Aid for Scientific Research (C) of the Ministry of Education, Science, Sports, and Culture of Japan under Grant No. 26330200, and the Key Science and Technology Program for Social Development of Shaanxi Province, China (Program No. 2014K11-02-01-13).
Author information
Authors and Affiliations
Corresponding author
Appendices
Appendix 1: Pseudo code of the HCS algorithm
Appendix 2: Pseudo code of the GLC (proposed) algorithm
Appendix 3: Pseudo code for calculating the Euler number only using the proposed strategy
Rights and permissions
About this article
Cite this article
He, L., Yao, B., Zhao, X. et al. A fast algorithm for integrating connected-component labeling and euler number computation. J Real-Time Image Proc 15, 709–723 (2018). https://doi.org/10.1007/s11554-015-0499-1
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11554-015-0499-1