Skip to main content
Log in

A fast algorithm for integrating connected-component labeling and euler number computation

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

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.

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.

Institutional subscriptions

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9

Similar content being viewed by others

Notes

  1. A run is a block of contiguous object pixels in a row.

References

  1. Gonzalez, R.C., Woods, R.E.: Digital image processing. Third ed., Pearson Prentice Hall, Upper Saddle River, NJ 07458 (2008)

  2. Horn, B.P.K.: Robot Vision, pp. 73–77. McGraw-Hill, New York (1986)

    Google Scholar 

  3. Srihari, S.N.: Document image understanding. In: Proceedings ACM/IEEE Joint Fall Computer Conference, Dallas, TX, pp. 87–95 (1986)

  4. Rosin, P.L., Ellis, T.: Image difference threshold strategies and shadow detection. In: Proceedings British Machine Vision Conference, pp. 347–356 (1995)

  5. Nayar, S.K., Bolle, R.M.: Reflectance-based object recognition. Int. J. Comput. Vis. 17(3), 219–240 (1996)

    Article  Google Scholar 

  6. Rosenfeld, A., Pfalts, J.L.: Sequential operations in digital picture processing. J. ACM 13(4), 471–494 (1966)

    Article  MATH  Google Scholar 

  7. Suzuki, K., Horiba, I., Sugie, N.: Linear-time connected-component labeling based on sequential local operations. Comput. Vis. Image Understand. 89, 1–23 (2003)

    Article  MATH  Google Scholar 

  8. Gotoh, T., Ohta, Y., Yoshida, M., Shirai, Y.: Component labeling algorithm for video rate processing. Proc. SPIE 804, 217–224 (1987)

    Article  Google Scholar 

  9. Tarjan, R.E.: Efficiency of a good but not linear set union algorithm. J. ACM 22(2), 215–225 (1975)

    Article  MathSciNet  MATH  Google Scholar 

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

  11. He, L., Chao, Y., K, Suzuki: A run-based two-scan labeling algorithm. IEEE Trans. Image Process. 17(5), 749–756 (2008)

    Article  MathSciNet  Google Scholar 

  12. He, L., Chao, Y., Suzuki, K., Wu, K.: Fast Connected-Component Labeling. Patt. Recognit. 42(9), 1977–1987 (2009)

    Article  MATH  Google Scholar 

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

    Article  Google Scholar 

  14. Grana, C., Borghesani, D., Cucchiara, R.: Optimized Block-Based Connected Components Labeling With Decision Trees. IEEE Trans. Image Process. 19(6), 1596–1609 (2010)

    Article  MathSciNet  MATH  Google Scholar 

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

    Article  Google Scholar 

  16. Gray, S.B.: Local properties of binary images in two dimensions. IEEE Trans. Comput. C-20:551–561 (1971)

  17. http://www.mathworks.com/access/helpdesk/help/toolbox/images/bweuler.html

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

    Article  MATH  Google Scholar 

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

    Article  Google Scholar 

  20. Zenzo, S., Cinque, L., Levialdi, S.: Run-based algorithms for binary image analysis and processing. IEEE Trans. 18(1), 83–89 (1996)

    Google Scholar 

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

    Article  MathSciNet  MATH  Google Scholar 

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

  23. West, D.B.: Introduction to graph theory. Second edition, Prentice Hall (2001)

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

  25. Otsu, N.A.: threshold selection method from gray-level histograms. IEEE Trans. Syst. Man Cybernet. 9, 62–66 (1979)

    Article  Google Scholar 

  26. http://sampl.ece.ohio-state.edu/data/stills/sidba/index.htm

  27. http://sipi.usc.edu/database/

  28. http://www1.cs.columbia.edu/CAVE/software/curet/

Download references

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

Authors

Corresponding author

Correspondence to Lifeng He.

Appendices

Appendix 1: Pseudo code of the HCS algorithm

figure a

Appendix 2: Pseudo code of the GLC (proposed) algorithm

figure b

Appendix 3: Pseudo code for calculating the Euler number only using the proposed strategy

figure c

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

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

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11554-015-0499-1

Keywords

Navigation