Journal of Real-Time Image Processing

, Volume 15, Issue 1, pp 173–196 | Cite as

Parallel Light Speed Labeling: an efficient connected component algorithm for labeling and analysis on multi-core processors

  • Laurent CabaretEmail author
  • Lionel Lacassagne
  • Daniel Etiemble
Special Issue Paper


In the last decade, many papers have been published to present sequential connected component labeling (CCL) algorithms. As modern processors are multi-core and tend to many cores, designing a CCL algorithm should address parallelism and multithreading. After a review of sequential CCL algorithms and a study of their variations, this paper presents the parallel version of the Light Speed Labeling for connected component analysis (CCA) and compares it to our parallelized implementations of State-of-the-Art sequential algorithms. We provide some benchmarks that help to figure out the intrinsic differences between these parallel algorithms. We show that thanks to its run-based processing, the LSL is intrinsically more efficient and faster than all pixel-based algorithms. We show also, that all the pixel-based are memory-bound on multi-socket machines and so are inefficient and do not scale, whereas LSL, thanks to its RLE compression can scale on such high-end machines. On a 4 × 15-core machine, and for 8192 × 8192 images, LSL outperforms its best competitor by a factor ×10.8 and achieves a throughput of 42.4 gigapixel labeled per second.


Image processing Computer vision Connected component labeling Connected Component analysis Multi-core processor Multithreading parallel processing 



The authors gratefully acknowledge Francois Hannebicq from Intel France for his valuable help and the access to the high-end 4 × 15-core IvyBridge Xeon machine.


  1. 1.
    Bailey, D., Johnston, C.: Single pass connected component analysis. In: Image and Vision New Zeland (IVNZ), pp. 282–287 (2007)Google Scholar
  2. 2.
    Blelloch, G.: Vector Models for Data-Parallel Computing. MIT Press, Cambridge (1990)Google Scholar
  3. 3.
    Cabaret, L., Lacassagne, L.: A review of world’s fastest connected component labeling algorithms: speed and energy estimation. In: IEEE International Conference on Design and Architectures for Signal and Image Processing (DASIP), pp. 1–8 (2014)Google Scholar
  4. 4.
    Cabaret, L., Lacassagne, L.: What is the world’s fastest connected component labeling algorithm? In: IEEE International Workshop on Signal Processing Systems (SiPS), pp. 97–102 (2014)Google Scholar
  5. 5.
    Chang, F., Chen, C.: A linear-time component-labeling algorithm using contour tracing technique. Comput. Vision Image Underst. 93, 206–220 (2004)CrossRefGoogle Scholar
  6. 6.
    Chen, C.-W., Wu, Y.-T., Tseng, S.-Y., Wang, W.-S.: Parallelization of connected-component labeling on TILE64 many-core platform. J. Signal Process. Syst. 75(2), 169–183 (2013)CrossRefGoogle Scholar
  7. 7.
    Cormen, T., Leiseirson, C., Rivest, R., Stein, C.: Introduction to Algorithms. MIT Press, Cambridge (2001)Google Scholar
  8. 8.
    Grana, C., Borghesani, D., Cucchiara, R.: Fast block based connected components labeling. In: ICIP, pp. 4061–4064. IEEE (2009)Google Scholar
  9. 9.
    Gupta, S., Palsetia, D., Patwary, M.A., Agrawal, A., Choudhary, A.: A new parallel algorithm for two-pass connected component labeling. In: Parallel & Distributed Processing Symposium Workshops (IPDPSW), pp. 1355–1362. IEEE (2014)Google Scholar
  10. 10.
    Haralick, R.: Some neighborhood operations. In: Real-Time Parallel Computing Image Analysis, pp. 11–35. Plenum Press (1981)Google Scholar
  11. 11.
    He, L., Chao, Y., Suzuki, K.: A run-based two-scan labeling algorithm. In: ICIAR, pp. 131–142. LNCS 4633 (2007)Google Scholar
  12. 12.
    He, L., Chao, Y., Suzuki, K.: An efficient first-scan method for label-equivalence-based labeling algorithms. Pattern Recognit. Lett. 31(1), 28–35 (2010)CrossRefGoogle Scholar
  13. 13.
    He, L., Chao, Y., Suzuki, K.: A new two-scan algorithm for labeling connected components in binary images. In: World Congress (ed.) Proceedings of the World Congress on Engineering, vol. 2, pp. 1141–1146 (2012)Google Scholar
  14. 14.
    Hernandez-Belmonte, U., Ayala-Ramirez, V., Sanchez-Yanez, R.: Enhancing CCL algorithms by using a reduced connectivity mask. In: Mexican Conference on Pattern Recognition, pp. 195–203 (2013)Google Scholar
  15. 15.
    Hopcroft, J., Ullman, J.: Set merging algorithms. J. Comput. 2(4), 294–303 (1973)MathSciNetzbMATHGoogle Scholar
  16. 16.
    Hwu, W.W. (ed.) GPU Computing Gems, chapter 35: Connected Component Labeling in CUDA. Morgan Kaufman (2001)Google Scholar
  17. 17.
    Klaiber, M., Bailey, D., Ahmed, S., Baroud, Y., Simon, S.: A high-throughput FPGA architecture for parallel connected components analysis based on label reuse. In: International Conference on Field Programmable Technology (FPT), pp. 302–305. IEEE (2013)Google Scholar
  18. 18.
    Klaiber, M., Rockstroh, L., Wang, Z., Baroud, Y., Simon, S.: A memory-efficient parallel single pass architecture for connected component labeling of streamed images. In: International Conference on Field Programmable Technology (FPT), pp. 159–165. IEEE (2012)Google Scholar
  19. 19.
    Lacassagne, L., Zavidovique, B.: Light speed labeling: efficient connected component labeling on RISC architectures. J. Real-Time Image Process. 6(2), 117–135 (2011)CrossRefGoogle Scholar
  20. 20.
    Lumia, R., Shapiro, L., Zungia, O.: A new connected components algorithms for virtual memory computers. Comput. Vision Graph. Image Process. 22(2), 287–300 (1983)CrossRefGoogle Scholar
  21. 21.
    Ma, N., Bailey, D., Johnston, C.: Optimised single pass connected component analysis. In: International Conference on Field Programmable Technology (FPT), pp. 185–192. IEEE (2008)Google Scholar
  22. 22.
    Matsumoto, M., Nishimura, T.: Mersenne twister: a 623-dimensionally equidistributed uniform pseudorandom number generator. Trans. Model. Comput. Simul. 8(1), 3–30 (1998)CrossRefzbMATHGoogle Scholar
  23. 23.
    Niknam, M., Thulasiraman, P., Camorlinga, S.: A parallel algorithm for connected component labeling of gray-scale images on homogeneous multicore architectures. J. Phys. High Perform. Comput. Symp. (HPCS) (2010)Google Scholar
  24. 24.
    Otsu, N.: A threshold selection method from gray-level histograms. Trans. Syst. Man Cybern. 9, 62–66 (1979)CrossRefGoogle Scholar
  25. 25.
    Patwary, M., Blair, J., Manne, F.: Experiments on union-find algorithms for the disjoint-set data structure. In: International Symposium on Experimental Algorithms (SEA), pp. 411–423. Springer, New York (2010)Google Scholar
  26. 26.
    Ronse, C., Dejvijver, P.: Connected components in binary images: the detection problems. Research Studies Press (1984)Google Scholar
  27. 27.
    Rosenfeld, A., Platz, J.: Sequential operator in digital pictures processing. J. ACM 13(4), 471–494 (1966)CrossRefGoogle Scholar
  28. 28.
    Tarjan, R., Leeuwen, J.: Worst-case analysis of set union algorithms. J. ACM 31, 245–281 (1984)MathSciNetCrossRefzbMATHGoogle Scholar
  29. 29.
    van Leeuwen, J., van der Weide, T.: Alternative path compression techniques. Technical report. University Utrecht, The Netherlands (1977)Google Scholar
  30. 30.
    Vandewalle, P., Kovacevic, J., Vetterli, M.: Reproducible research in signal processing. Signal Process. Mag. 26(3), 37–47 (2009)CrossRefGoogle Scholar
  31. 31.
    Wu, K., Otoo, E., Shoshani, A.: Optimizing connected component labeling algorithms. In: Pattern Analysis and Applications (2008)Google Scholar
  32. 32.
    Ziegler, G.: Connected components revisited on Kepler. In: GPU Technology Conference, pp. 1–56. Nvidia (2013)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2016

Authors and Affiliations

  • Laurent Cabaret
    • 1
    Email author
  • Lionel Lacassagne
    • 2
  • Daniel Etiemble
    • 1
  1. 1.Laboratoire de Recherche en Informatique (LRI)Univ. Paris-Sud, CNRS UMR 8623OrsayFrance
  2. 2.Sorbonne UniversitesUPMC Univ Paris 06, CNRS UMR 7606ParisFrance

Personalised recommendations