Skip to main content
Erschienen in: Pattern Analysis and Applications 2/2009

01.06.2009 | Theoretical Advances

Optimizing two-pass connected-component labeling algorithms

verfasst von: Kesheng Wu, Ekow Otoo, Kenji Suzuki

Erschienen in: Pattern Analysis and Applications | Ausgabe 2/2009

Einloggen

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

Abstract

We present two optimization strategies to improve connected-component labeling algorithms. Taking together, they form an efficient two-pass labeling algorithm that is fast and theoretically optimal. The first optimization strategy reduces the number of neighboring pixels accessed through the use of a decision tree, and the second one streamlines the union-find algorithms used to track equivalent labels. We show that the first strategy reduces the average number of neighbors accessed by a factor of about 2. We prove our streamlined union-find algorithms have the same theoretical optimality as the more sophisticated ones in literature. This result generalizes an earlier one on using union-find in labeling algorithms by Fiorio and Gustedt (Theor Comput Sci 154(2):165–181, 1996). In tests, the new union-find algorithms improve a labeling algorithm by a factor of 4 or more. Through analyses and experiments, we demonstrate that our new two-pass labeling algorithm scales linearly with the number of pixels in the image, which is optimal in computational complexity theory. Furthermore, the new labeling algorithm outperforms the published labeling algorithms irrespective of test platforms. In comparing with the fastest known labeling algorithm for two-dimensional (2D) binary images called contour tracing algorithm, our new labeling algorithm is up to ten times faster than the contour tracing program distributed by the original authors.

Sie haben noch keine Lizenz? Dann Informieren Sie sich jetzt über unsere Produkte:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Fußnoten
1
An implementation of the Contour Tracing algorithm distributed by the original authors of the algorithm is available from http://​www.​iis.​sinica.​edu.​tw/​∼fchang/​03src.​html.
 
2
Note that we have made an arbitrary choice of denoting a background pixel by 0 and an object pixel by 1; however, there are other equally valid choices [38]. It is also possible to use other types of labels than the integers used in this paper.
 
3
In C++ convention, all indices to arrays start from 0. The word array or vector in all pseudo-code segments is a short-hand of C++ STL type std::vector<unsigned> .
 
4
The computation uses the function lsqlin from the optimization toolbox of MATLAB.
 
Literatur
1.
Zurück zum Zitat Agarwal PK, Arge L, Ke Yi (2006) I/O-efficient batched union-find and its applications to terrain analysis. In: SCG ’06: Proceedings of the 22nd annual symposium on computational geometry. ACM Press, New York, pp 167–176 Agarwal PK, Arge L, Ke Yi (2006) I/O-efficient batched union-find and its applications to terrain analysis. In: SCG ’06: Proceedings of the 22nd annual symposium on computational geometry. ACM Press, New York, pp 167–176
2.
Zurück zum Zitat Aho AV, Hopcroft JE, Ullman JD (1974) The design and analysis of computer algorithms. Addison–Wesley, ReadingMATH Aho AV, Hopcroft JE, Ullman JD (1974) The design and analysis of computer algorithms. Addison–Wesley, ReadingMATH
3.
Zurück zum Zitat Aho AV, Ullman JD, Hopcroft JE (1983) Data structures and algorithms. Addison–Wesley, ReadingMATH Aho AV, Ullman JD, Hopcroft JE (1983) Data structures and algorithms. Addison–Wesley, ReadingMATH
4.
Zurück zum Zitat Alnuweiri HM, Prasanna VK (1992) Parallel architectures and algorithms for image component labeling. IEEE Trans Pattern Anal Mach Intell 14(10):1014–1034CrossRef Alnuweiri HM, Prasanna VK (1992) Parallel architectures and algorithms for image component labeling. IEEE Trans Pattern Anal Mach Intell 14(10):1014–1034CrossRef
5.
Zurück zum Zitat Alstrup S, Ben-Amram AM, Rauhe T (1999) Worst-case and amortised optimality in union-find. In: Proceedings of 31th Annual ACM symposium on theory of computing (STOC’99). ACM Press, New York, pp 499–506 Alstrup S, Ben-Amram AM, Rauhe T (1999) Worst-case and amortised optimality in union-find. In: Proceedings of 31th Annual ACM symposium on theory of computing (STOC’99). ACM Press, New York, pp 499–506
6.
Zurück zum Zitat Amin A, Fisher S (2000) A document skew detection method using the Hough transform. Pattern Anal Appl 3(3):243–253MATHCrossRef Amin A, Fisher S (2000) A document skew detection method using the Hough transform. Pattern Anal Appl 3(3):243–253MATHCrossRef
7.
Zurück zum Zitat Ballard DH (1982) Computer vision. Prentice-Hall, Englewood Ballard DH (1982) Computer vision. Prentice-Hall, Englewood
8.
Zurück zum Zitat Bollobás B, Simon I (1985) On the expected behavior of disjoint set union algorithms. In: STOC ’85: Proceedings of the 17th annual ACM symposium on theory of computing. ACM Press, New York, pp 224–231 Bollobás B, Simon I (1985) On the expected behavior of disjoint set union algorithms. In: STOC ’85: Proceedings of the 17th annual ACM symposium on theory of computing. ACM Press, New York, pp 224–231
9.
Zurück zum Zitat Chang F, Chen C-J, Lu C-J (2004) A linear-time component-labeling algorithm using contour tracing technique. Comput Vis Image Underst 93(2):206–220CrossRef Chang F, Chen C-J, Lu C-J (2004) A linear-time component-labeling algorithm using contour tracing technique. Comput Vis Image Underst 93(2):206–220CrossRef
10.
Zurück zum Zitat Dillencourt MB, Samet H, Tamminen M (1992) A general approach to connected-component labeling for arbitrary image representations. J ACM 39(2):253–280MATHCrossRefMathSciNet Dillencourt MB, Samet H, Tamminen M (1992) A general approach to connected-component labeling for arbitrary image representations. J ACM 39(2):253–280MATHCrossRefMathSciNet
12.
13.
Zurück zum Zitat Fiorio C, Gustedt J (1997) Memory management for union-find algorithms. In: Proceedings of 14th symposium on theoretical aspects of computer Science. Springer, New York, pp 67–79 Fiorio C, Gustedt J (1997) Memory management for union-find algorithms. In: Proceedings of 14th symposium on theoretical aspects of computer Science. Springer, New York, pp 67–79
14.
Zurück zum Zitat Gabow HN, Tarjan RE (1983) A linear-time algorithm for a special case of disjoint set union. In: STOC ’83: Proceedings of the 15th annual ACM symposium on theory of computing. ACM Press, New York, pp 246–251 Gabow HN, Tarjan RE (1983) A linear-time algorithm for a special case of disjoint set union. In: STOC ’83: Proceedings of the 15th annual ACM symposium on theory of computing. ACM Press, New York, pp 246–251
15.
Zurück zum Zitat Galil Z, Italiano GF (1991) Data structures and algorithms for disjoint set union problems. ACM Comput Surv 23(3):319–344CrossRef Galil Z, Italiano GF (1991) Data structures and algorithms for disjoint set union problems. ACM Comput Surv 23(3):319–344CrossRef
16.
Zurück zum Zitat Galler BA, Fisher MJ (1964) An improved equivalence algorithm. Commun ACM 7(5):301–303MATHCrossRef Galler BA, Fisher MJ (1964) An improved equivalence algorithm. Commun ACM 7(5):301–303MATHCrossRef
17.
Zurück zum Zitat Gonzalez RC, Woods RE (2002) Digital Image Processing, 2nd edn. Prentice-Hall, New Jersy Gonzalez RC, Woods RE (2002) Digital Image Processing, 2nd edn. Prentice-Hall, New Jersy
18.
Zurück zum Zitat Gotoh T, Ohta Y, Yoshida M, Shirai Y (1987) Component labeling algorithm for video rate processing. In: Proceedings of SPIE 1987. Advances in image processing, vol 804, pp 217–224 Gotoh T, Ohta Y, Yoshida M, Shirai Y (1987) Component labeling algorithm for video rate processing. In: Proceedings of SPIE 1987. Advances in image processing, vol 804, pp 217–224
19.
Zurück zum Zitat Haralick RM (1981) Some neighborhood operations. Plenum Press, New York, pp 11–35 Haralick RM (1981) Some neighborhood operations. Plenum Press, New York, pp 11–35
20.
Zurück zum Zitat Haralick RM, Shapiro LG (1985) Image segmentation techniques. Comput Vis Graph Image Process 29(1):100–132CrossRef Haralick RM, Shapiro LG (1985) Image segmentation techniques. Comput Vis Graph Image Process 29(1):100–132CrossRef
21.
Zurück zum Zitat Hayashi H, Kudo M, Toyama J, Shimbo M (2001) Fast labelling of natural scenes using enhanced knowledge. Pattern Anal Appl 4(1):20–27MATHCrossRefMathSciNet Hayashi H, Kudo M, Toyama J, Shimbo M (2001) Fast labelling of natural scenes using enhanced knowledge. Pattern Anal Appl 4(1):20–27MATHCrossRefMathSciNet
22.
Zurück zum Zitat Qingmao H, Guoyu Q, Nowinski WL (2005) Fast connected-component labelling in three-dimensional binary images based on iterative recursion. Comput Vis Image Underst 99:414–434CrossRef Qingmao H, Guoyu Q, Nowinski WL (2005) Fast connected-component labelling in three-dimensional binary images based on iterative recursion. Comput Vis Image Underst 99:414–434CrossRef
23.
Zurück zum Zitat Kim J-H, Kim KK, Suen CY (2000) An HMM-MLP hybrid model for cursive script recognition. Pattern Anal Appl 3(4):314–324CrossRefMathSciNet Kim J-H, Kim KK, Suen CY (2000) An HMM-MLP hybrid model for cursive script recognition. Pattern Anal Appl 3(4):314–324CrossRefMathSciNet
24.
Zurück zum Zitat Knop F, Rego V (1998) Parallel labeling of three-dimensional clusters on networks of workstations. J Parallel Distrib Comput 49(2):182–203MATHCrossRef Knop F, Rego V (1998) Parallel labeling of three-dimensional clusters on networks of workstations. J Parallel Distrib Comput 49(2):182–203MATHCrossRef
25.
Zurück zum Zitat Knuth DE, Schönhage A (1978) The expected linearity of a simple equivalence algorithm. Theor Comput Sci 6:281–315MATHCrossRef Knuth DE, Schönhage A (1978) The expected linearity of a simple equivalence algorithm. Theor Comput Sci 6:281–315MATHCrossRef
27.
Zurück zum Zitat Lumia R (1983) A new three-dimensional connected components algorithm. Comput Vis Graph Image Process 23(2):207–217CrossRef Lumia R (1983) A new three-dimensional connected components algorithm. Comput Vis Graph Image Process 23(2):207–217CrossRef
28.
Zurück zum Zitat Lumia R, Shapiro L, Zungia O (1983) A new connected components algorithm for virtual memory computers. Comput Vis Graph Image Process 22(2):287–300CrossRef Lumia R, Shapiro L, Zungia O (1983) A new connected components algorithm for virtual memory computers. Comput Vis Graph Image Process 22(2):287–300CrossRef
29.
Zurück zum Zitat Moga AN, Gabbouj M (1997) Parallel image component labeling with watershed transformations. IEEE Trans Pattern Anal Mach Intell 19(5):441–450CrossRef Moga AN, Gabbouj M (1997) Parallel image component labeling with watershed transformations. IEEE Trans Pattern Anal Mach Intell 19(5):441–450CrossRef
30.
Zurück zum Zitat Naoi S (1995) High-speed labeling method using adaptive variable window size for character shape feature. In: IEEE Asian Conference on computer vision, vol 1, pp 408–411 Naoi S (1995) High-speed labeling method using adaptive variable window size for character shape feature. In: IEEE Asian Conference on computer vision, vol 1, pp 408–411
31.
Zurück zum Zitat Otsu N (1979) A threshold selection method from gray level histograms. IEEE Trans Syst Man Cybern 9:62–66CrossRef Otsu N (1979) A threshold selection method from gray level histograms. IEEE Trans Syst Man Cybern 9:62–66CrossRef
32.
Zurück zum Zitat Regentova E, Latifi S, Deng S, Yao D (2002) An algorithm with reduced operations for connected components detection in itu-t group 3/4 coded images. IEEE Trans Pattern Anal Mach Intell 24(8):1039–1047CrossRef Regentova E, Latifi S, Deng S, Yao D (2002) An algorithm with reduced operations for connected components detection in itu-t group 3/4 coded images. IEEE Trans Pattern Anal Mach Intell 24(8):1039–1047CrossRef
34.
Zurück zum Zitat Rosenfeld A, Kak AC (1982) Digital picture processing, 2nd edn. Academic Press, San Diego Rosenfeld A, Kak AC (1982) Digital picture processing, 2nd edn. Academic Press, San Diego
35.
Zurück zum Zitat Shi J, Malik J (2000) Normalized cuts and image segmentation. IEEE Trans Pattern Anal Mach Intell 22(8):888–905CrossRef Shi J, Malik J (2000) Normalized cuts and image segmentation. IEEE Trans Pattern Anal Mach Intell 22(8):888–905CrossRef
36.
Zurück zum Zitat Stockman GC, Shapiro LG (2001) Computer Vision. Prentice-Hall, Englewood Stockman GC, Shapiro LG (2001) Computer Vision. Prentice-Hall, Englewood
37.
Zurück zum Zitat Suri JS, Singh B, Reden L (2002) Computer vision and pattern recognition techniques for 2-d and 3-d MR cerebral cortical segmentation: a state-of-the-art review. Pattern Analy Appl 5(1):46–76CrossRefMathSciNet Suri JS, Singh B, Reden L (2002) Computer vision and pattern recognition techniques for 2-d and 3-d MR cerebral cortical segmentation: a state-of-the-art review. Pattern Analy Appl 5(1):46–76CrossRefMathSciNet
38.
Zurück zum Zitat Suzuki K, Horiba I, Sugie N (2003) Linear-time connected-component labeling based on sequential local operations. Comput Vis Image Underst 89(1):1–23MATHCrossRef Suzuki K, Horiba I, Sugie N (2003) Linear-time connected-component labeling based on sequential local operations. Comput Vis Image Underst 89(1):1–23MATHCrossRef
39.
Zurück zum Zitat Tarjan RE, van Leeuwen J (1984) Worst-case analysis of set union algorithms. J ACM 31(2):245–281MATHCrossRef Tarjan RE, van Leeuwen J (1984) Worst-case analysis of set union algorithms. J ACM 31(2):245–281MATHCrossRef
41.
Zurück zum Zitat Tarjan RE (1977) Reference machines require non-linear time to maintain disjoint sets. In: STOC ’77: Proceedings of the 9th annual ACM symposium on theory of computing. ACM Press, pp 18–29 Tarjan RE (1977) Reference machines require non-linear time to maintain disjoint sets. In: STOC ’77: Proceedings of the 9th annual ACM symposium on theory of computing. ACM Press, pp 18–29
42.
Zurück zum Zitat Udupa JK, Ajjanagadde VG (1990) Boundary and object labelling in three-dimensional images. Comput Vis Graph Image Process 51(3):355–369CrossRef Udupa JK, Ajjanagadde VG (1990) Boundary and object labelling in three-dimensional images. Comput Vis Graph Image Process 51(3):355–369CrossRef
43.
Zurück zum Zitat Wang K-B, Chia T-L, Chen Z, Lou D-C (2003) Parallel execution of a connected component labeling operation on a linear array architecture. J Inf Sci Eng 19:353–370 Wang K-B, Chia T-L, Chen Z, Lou D-C (2003) Parallel execution of a connected component labeling operation on a linear array architecture. J Inf Sci Eng 19:353–370
44.
Zurück zum Zitat Wang Y, Bhattacharya P (2003) Using connected components to guide image understanding and segmentation. Mach Graph Vis 12(2):163–186 Wang Y, Bhattacharya P (2003) Using connected components to guide image understanding and segmentation. Mach Graph Vis 12(2):163–186
45.
Zurück zum Zitat Wu K, Otoo E, Shoshani A (2005) Optimizing connected component labeling algorithms. In: Proceedings of SPIE medical imaging conference 2005, San Diego, CA, 2005. LBNL report LBNL-56864 Wu K, Otoo E, Shoshani A (2005) Optimizing connected component labeling algorithms. In: Proceedings of SPIE medical imaging conference 2005, San Diego, CA, 2005. LBNL report LBNL-56864
47.
Zurück zum Zitat Yapa RD, Koichi H (2007) A connected component labeling algorithm for grayscale images and application of the algorithm on mammograms. In: SAC’07: Proceedings of the 2007 ACM symposium on applied computing. ACM Press, New York, pp 146–152 Yapa RD, Koichi H (2007) A connected component labeling algorithm for grayscale images and application of the algorithm on mammograms. In: SAC’07: Proceedings of the 2007 ACM symposium on applied computing. ACM Press, New York, pp 146–152
Metadaten
Titel
Optimizing two-pass connected-component labeling algorithms
verfasst von
Kesheng Wu
Ekow Otoo
Kenji Suzuki
Publikationsdatum
01.06.2009
Verlag
Springer-Verlag
Erschienen in
Pattern Analysis and Applications / Ausgabe 2/2009
Print ISSN: 1433-7541
Elektronische ISSN: 1433-755X
DOI
https://doi.org/10.1007/s10044-008-0109-y

Weitere Artikel der Ausgabe 2/2009

Pattern Analysis and Applications 2/2009 Zur Ausgabe