# Two Strategies to Speed up Connected Component LabelingAlgorithms

## Abstract

This paper presents two new strategies to speed up connectedcomponent labeling algorithms. The first strategy employs a decisiontreeto minimize the work performed in the scanning phase of connectedcomponent labeling algorithms. The second strategy uses a simplifiedunion-find data structure to represent the equivalence information amongthe labels. For 8-connected components in atwo-dimensional (2D) image,the first strategy reduces the number of neighboring pixels visited from4 to7/3 on average. In various tests, using a decision tree decreases thescanning time by a factor of about 2. The second strategy uses a compactrepresentation of the union-find data structure. This strategysignificantly speeds up the labeling algorithms. We prove analyticallythat a labeling algorithm with our simplified union-find structure hasthe same optimal theoretical time complexity as do the best labelingalgorithms. By extensive experimental measurements, we confirm theexpected performance characteristics of the new labeling algorithms anddemonstrate that they are faster than other optimal labelingalgorithms.

- Authors:

- Publication Date:

- Research Org.:
- Ernest Orlando Lawrence Berkeley NationalLaboratory, Berkeley, CA (US)

- Sponsoring Org.:
- USDOE Director. Office of Science. Advanced ScientificComputing Research

- OSTI Identifier:
- 929013

- Report Number(s):
- LBNL-59102

R&D Project: 429201; BnR: KJ0101030; TRN: US200811%%475

- DOE Contract Number:
- DE-AC02-05CH11231

- Resource Type:
- Journal Article

- Resource Relation:
- Journal Name: Pattern Analysis Application; Journal Volume: 0; Journal Issue: 0; Related Information: Journal Publication Date: 12/23/2007

- Country of Publication:
- United States

- Language:
- English

- Subject:
- 99; ALGORITHMS; PERFORMANCE; TREES; VELOCITY; Connected component labeling optimization union-find algorithmdecision tree equivalence relation

### Citation Formats

```
Wu, Kesheng, Otoo, Ekow, and Suzuki, Kenji.
```*Two Strategies to Speed up Connected Component LabelingAlgorithms*. United States: N. p., 2005.
Web.

```
Wu, Kesheng, Otoo, Ekow, & Suzuki, Kenji.
```*Two Strategies to Speed up Connected Component LabelingAlgorithms*. United States.

```
Wu, Kesheng, Otoo, Ekow, and Suzuki, Kenji. Sun .
"Two Strategies to Speed up Connected Component LabelingAlgorithms". United States.
doi:. https://www.osti.gov/servlets/purl/929013.
```

```
@article{osti_929013,
```

title = {Two Strategies to Speed up Connected Component LabelingAlgorithms},

author = {Wu, Kesheng and Otoo, Ekow and Suzuki, Kenji},

abstractNote = {This paper presents two new strategies to speed up connectedcomponent labeling algorithms. The first strategy employs a decisiontreeto minimize the work performed in the scanning phase of connectedcomponent labeling algorithms. The second strategy uses a simplifiedunion-find data structure to represent the equivalence information amongthe labels. For 8-connected components in atwo-dimensional (2D) image,the first strategy reduces the number of neighboring pixels visited from4 to7/3 on average. In various tests, using a decision tree decreases thescanning time by a factor of about 2. The second strategy uses a compactrepresentation of the union-find data structure. This strategysignificantly speeds up the labeling algorithms. We prove analyticallythat a labeling algorithm with our simplified union-find structure hasthe same optimal theoretical time complexity as do the best labelingalgorithms. By extensive experimental measurements, we confirm theexpected performance characteristics of the new labeling algorithms anddemonstrate that they are faster than other optimal labelingalgorithms.},

doi = {},

journal = {Pattern Analysis Application},

number = 0,

volume = 0,

place = {United States},

year = {Sun Nov 13 00:00:00 EST 2005},

month = {Sun Nov 13 00:00:00 EST 2005}

}