The Journal of Supercomputing

, Volume 72, Issue 11, pp 4221–4232 | Cite as

Cellular automata labeling of connected components in n-dimensional binary lattices

  • Biljana Stamatovic
  • Roman Trobec


A new cellular automata-based algorithm for labeling of connected components in n-dimensional binary lattices, for \(n \ge 2\), is proposed. The algorithm for 3D binary images was implemented in NetLogo and MatLab programming environments. The algorithm is local and can be efficiently implemented on data-flow parallel platforms with an average asymptotic complexity of \(\mathcal{O}(L)\) on \(L^n \) binary lattices. However, some worst-case arrangements of the n-dimensional lattice cells could require \(\mathcal{O}(L^{n})\) calculation steps.


Connected components Lattice Image n-Dimensional Cellular automata Parallel algorithm Data-flow 



This work was partly supported by the Slovenian Research Agency under Grant P2-0095, Montenegrian national project “Discrete structures and their application” and COST programme Action IC1305, “Network for Sustainable Ultrascale Computing” (NESUS).


  1. 1.
    He L, Chao Y, Suzuki K, Wu K (2009) Fast connected-component labeling. Pattern Recogn 42:1977–1987CrossRefzbMATHGoogle Scholar
  2. 2.
    Suzuki K, Horiba I, Sugie N (2003) Linear-time connected-component labeling based on sequential local operations. Comput Vis Image Underst 89:1–23CrossRefzbMATHGoogle Scholar
  3. 3.
    Trobec R, Stamatovic B (2016) Analysis and classification of flow-carrying backbones in two-dimensional lattices. Advances in engineering software, available on-line. doi: 10.1016/j.advengsoft.2015.11.002
  4. 4.
    Yin WG, Tao R (2000) Algorithm for finding two-dimensional site percolation backbones. Phys B 279:84–86CrossRefGoogle Scholar
  5. 5.
    He L, Chao Y, Suzuki K (2012) A new two-scan algorithm for labeling connected components in binary images. Proc World Congr Eng II:1141–1146Google Scholar
  6. 6.
    He L, Chao Y, Suzuki K, Tang W, Shi Z (2010) An efficient run-based connected-component labeling algorithm for three-dimensional binary images. In: Proceedings of SPIE, international conference on image processing and pattern recognition in industrial engineering (7820)Google Scholar
  7. 7.
    Kong TY, Rosenffeld A (1996) Topological algorithms for digital image processing. North Holland, AmsterdamGoogle Scholar
  8. 8.
    Chang F, Chen CJ, Lu CJ (2004) A linear-time component-labeling algorithm using contour tracing technique. Comput Vis Image Underst 93:206–220CrossRefGoogle Scholar
  9. 9.
    Lumia R (1983) A new three-dimensional connected components algorithm. Comput Vis Gr Image Process 23:207–217CrossRefGoogle Scholar
  10. 10.
    Hu Q, Qian G, Nowinski WL (2005) Fast connected-component labelling in three-dimensional binary images based on iterative recursion. Comput Vis Image Underst 99:414–434CrossRefGoogle Scholar
  11. 11.
    Manohar M, Ramapriyan HK (1989) Connected component labeling of binary images on a mesh connected massively parallel processor. Comput Vis Gr Image Process 45:143–149Google Scholar
  12. 12.
    Zhao F, Lu HZ, Zhang ZY (2013) Real-time single-pass connected components analysis algorithm. EURASIP J Image Video Process 2013:21. doi: 10.1186/1687-5281-2013-21
  13. 13.
    Johnston CT, Bailey DG (2008) FPGA implementation of a single pass connected components algorithm, 4th IEEE international symposium on electronic design, test and applications 228–231Google Scholar
  14. 14.
    Benkrid K, Sukhsawas S, Crookes D, Benkrid A (2003) An FPGA-based image connected component labeller, field-programmable logic and applications. Springer, BerlinGoogle Scholar
  15. 15.
    Crookes D, Benkrid K (1999) FPGA implementation of image component labelling. Proc SPIE, Reconfig Technol FPGAs Comput Appl 3844:17–23CrossRefGoogle Scholar
  16. 16.
    Roy P, Biswas PK (2008) VLSI implementation of fast connected component labeling using finite state machine based cell network. Sixth Indian conference on computer vision, graphics and image processing (ICVGIP) 238–243Google Scholar
  17. 17.
    Zhao H, Sang H, Zhang T (2011) A novel algorithm and its VLSI architecture for connected component labeling. In: Proceedings of SPIE—international conference on image processing and pattern recognition in industrial engineering (7820)Google Scholar
  18. 18.
    Wuensche A (2003) Discrete dynamics lab: tools for investigating cellular automata and discrete dynamical networks. Kybernetes 32:77–104CrossRefGoogle Scholar
  19. 19.
    Oliveira GMB, Coelho AR, Monteiro LHA (2004) Cellular automata cryptographic model based on bi-directional toggle rules. Int J Modern Phys C 15:1061–1068CrossRefzbMATHGoogle Scholar
  20. 20.
    Hatzikirou H, Deutsch A (2008) Cellular automata as microscopic models of cell migration in heterogeneous environments. Curr Top Dev Biol 81:401–434CrossRefGoogle Scholar
  21. 21.
    Archer MD (2008) Theory and applications of cellular automata. In: Proceedings of automata 2008 (EPSRC workshop cellular automata theory and applications) 557–572Google Scholar
  22. 22.
    Spezzano G, Talia D (2002) Experiences using high-level programming for parallel cellular computation. High performance computing systems and applications, Kluwer Academic Publishers, pp 515–528Google Scholar
  23. 23.
    Cannataro M, Gregorio SD, Rongo R, Spataro W, Spezzano G, Talia DA (1995) Parallel cellular automata environment on multicomputers for computational science. Parallel Comput 21:803–824CrossRefzbMATHGoogle Scholar
  24. 24.
    Wilensky U, Rand W (2015) An introduction to agent-based modeling. MIT Press, CambridgeGoogle Scholar
  25. 25.
    Stamatovic B, Kosec G, Trobec R, Xuan X, Stamatovic S (2014) Cellular automata supporting n-connectivity. Math Probl Eng. doi: 10.1155/2014/765798
  26. 26.
    Stamatovic B, Trobec R (2014) Data parallel algorithm in finding 2-D site percolation backbones. In: Proceedings of the first international workshop on sustainable ultrascale computing systems (NESUS 2014), pp 65–70Google Scholar
  27. 27.
    Stamatovic B (2015) Labeling connected components in binary images based on cellular automata. In: Proceedings of the second international workshop on sustainable ultra scale computing systems (NESUS 2015), pp 36–39Google Scholar
  28. 28.
    Ito Y, Nakano K (2010) Low-latency connected component labeling using an FPGA. Int J Found Comput Sci 21:405–425MathSciNetCrossRefzbMATHGoogle Scholar
  29. 29.
    Hoekstra AG, Kroc J, Sloot PMA (2010) Simulating complex systems by cellular automata. Springer, BerlinzbMATHGoogle Scholar
  30. 30.
    Cypher RE, Snyder L, Sanz JLC (1990) Practical algorithms for image component labeling on SIMD mesh connected computers. IEEE Trans Comput 39:276–281CrossRefGoogle Scholar
  31. 31.
    Flynn MJ, Mencer O, Milutinovic V, Rakocevic G, Stenstrom P, Trobec R, Valero M (2013) Viewpoint-moving from petaflops to petadata. Commun ACM 56:39–42Google Scholar
  32. 32.
    Xu X, Wang J, Lv JP, Deng Y (2014) Simultaneous analysis of three-dimensional percolation models. Front Phys 9:113–119CrossRefGoogle Scholar

Copyright information

© Springer Science+Business Media New York 2016

Authors and Affiliations

  1. 1.Faculty of information systems and technologiesUniversity of Donja GoricaPodgoricaMontenegro
  2. 2.Institute Jožef StefanLjubljanaSlovenia

Personalised recommendations