Computing the Component-Labeling and the Adjacency Tree of a Binary Digital Image in Near Logarithmic-Time

  • Fernando Díaz del Río
  • Helena Molina-AbrilEmail author
  • Pedro Real
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 11382)


Connected component labeling (CCL) of binary images is one of the fundamental operations in real time applications. The adjacency tree (AdjT) of the connected components offers a region-based representation where each node represents a region which is surrounded by another region of the opposite color. In this paper, a fully parallel algorithm for computing the CCL and AdjT of a binary digital image is described and implemented, without the need of using any geometric information. The time complexity order for an image of \(m \times n\) pixels under the assumption that a processing element exists for each pixel is near \(O(log(m+n))\). Results for a multicore processor show a very good scalability until the so-called memory bandwidth bottleneck is reached. The inherent parallelism of our approach points to the direction that even better results will be obtained in other less classical computing architectures.


Component-Labeling Adjacency tree Digital image Parallelism 


  1. 1.
    Bhattacharya, P.: Connected component labeling for binary images on a reconfigurable mesh architecture. J. Syst. Arch. 42(4), 309–313 (1996)CrossRefGoogle Scholar
  2. 2.
    Buneman, O.P.: A grammar for the topological analysis of plane figures. Mach. Intell. 15, 383–393 (1969)zbMATHGoogle Scholar
  3. 3.
    Chiavetta, F., Di Gesù, V.: Parallel computation of the Euler number via connectivity graph. Pattern Recognit. Lett. 14, 849–859 (1993)CrossRefGoogle Scholar
  4. 4.
    Diaz-del-Rio, F., Real, P., Onchis, D.: A parallel homological spanning forest framework for 2D topological image analysis. Pattern Recognit. Lett. 83, 49–58 (2016)CrossRefGoogle Scholar
  5. 5.
    Cohn, A., Bennett, B., Gooday, J., Gotts, N.: Qualitative spacial representation and reasoning with the region connection calculus. GeoInformatica 1(3), 275–316 (1997)CrossRefGoogle Scholar
  6. 6.
    Costanza, E., Robinson, J.: A region adjacency tree approach to the detection and design of fiducials. Video Vis. Graph., 63–99 (2003)Google Scholar
  7. 7.
    Cucchiara, R., Grana, C., Prati, A., Seidenari, S., Pellacani, G.: Building the topological tree by recursive FCM color clustering. In: 16th IEEE ICPR, vol. 1, pp. 759–762 (2002)Google Scholar
  8. 8.
    Gupta, S., Palsetia, D., Patwary, M.M.A., Agrawal, A., Choudhary, A.N.: A new parallel algorithm for two-pass connected component labeling. In: IEEE IPDP Symposium, pp. 1355–1362 (2014)Google Scholar
  9. 9.
    Heijmans, H.J.: Connected morphological operators for binary images. Comput. Vis. Imag. Understand. 73(1), 99–120 (1999)MathSciNetCrossRefGoogle Scholar
  10. 10.
    Kalentev, O., Rai, A., Kemnitz, S., Schneider, R.: Connected component labeling on a 2D grid using CUDA. J. Parallel Distrib. Comput. 71, 615–620 (2011)CrossRefGoogle Scholar
  11. 11.
    Kovalevsky, V.: Algorithms in digital geometry based on cellular topology. In: Klette, R., Žunić, J. (eds.) IWCIA 2004. LNCS, vol. 3322, pp. 366–393. Springer, Heidelberg (2004). Scholar
  12. 12.
    Keshet, R.: Shape-tree semilattice. J. Math. Imag. Vis. 22(2–3), 309–331 (2005)MathSciNetCrossRefGoogle Scholar
  13. 13.
    Murty, A., Natarajan, V., Vadhiyar, S.: Efficient homology computations on multicore and manycore systems. In: 20th Annual International Conference on High Performance Computing, pp. 333–342 (2013)Google Scholar
  14. 14.
    Oxley, J.G.: Matroid Theory, vol. 3. Oxford University Press, Oxford (2017). NVIDIA, Cuda C best practices guide version.
  15. 15.
    Patwary, M., Ali, M., Refsnes, P., Manne, F.: Multi-core spanning forest algorithms using the disjoint-set data structure. In: 26th IEEE IPDP Symposium, pp. 827–835 (2012)Google Scholar
  16. 16.
    Institute of Computer Science, Jagiellonian University (2017). REDHOM, Redhom.
  17. 17.
    Ranwez, V., Soille, P.: Order independent homotopic thinning for binary and grey tone anchored skeletons. Pattern Recognit. Lett. 23(6), 687–702 (2002)CrossRefGoogle Scholar
  18. 18.
    Rosenfeld, A.: Adjacency in digital pictures. Inf. Control 26, 24–33 (1974)MathSciNetCrossRefGoogle Scholar
  19. 19.
    Serra, J.: Image Analysis and Mathematical Morphology. Academic Press, Cambridge (1982)zbMATHGoogle Scholar
  20. 20.
    Stell, J., Worboys, M.: Relations between adjacency trees. Theor. Comput. Sci. 412(34), 4452–4468 (2011)MathSciNetCrossRefGoogle Scholar
  21. 21.
    Williams, S., Waterman, A., Patterson, D.A.: Roofline: an insightful visual performance model for multicore architectures. Commun. ACM 52, 65–76 (2009)CrossRefGoogle Scholar
  22. 22.
    YACCLAB - Yet Another Connected Components Labeling Benchmark (2017).

Copyright information

© Springer Nature Switzerland AG 2019

Authors and Affiliations

  • Fernando Díaz del Río
    • 1
  • Helena Molina-Abril
    • 2
    Email author
  • Pedro Real
    • 2
  1. 1.Department of Computer Architecture and TechnologyUniversity of SevilleSevilleSpain
  2. 2.Department of Applied MathematicsUniversity of SevilleSevilleSpain

Personalised recommendations