Skip to content

Commit 9695165

Browse files
authored
Merge pull request opencv#19631 from prittt:sota-ccl
* Add Spaghetti algorithm for CCL * Add stat tests for new and old algorithms * Switch license header to short version
1 parent 1a855fe commit 9695165

8 files changed

+3438
-120
lines changed

doc/opencv.bib

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,29 @@ @techreport{blanco2010tutorial
110110
year = {2010},
111111
url = {http://ingmec.ual.es/~jlblanco/papers/jlblanco2010geometry3D_techrep.pdf}
112112
}
113+
@inproceedings{Bolelli2017,
114+
title = {{Two More Strategies to Speed Up Connected Components Labeling Algorithms}},
115+
author = {Bolelli, Federico and Cancilla, Michele and Grana, Costantino},
116+
year = 2017,
117+
booktitle = {Image Analysis and Processing - ICIAP 2017},
118+
publisher = {Springer},
119+
volume = 10485,
120+
pages = {48--58},
121+
doi = {10.1007/978-3-319-68548-9_5},
122+
isbn = {978-3-319-68547-2}
123+
}
124+
@article{Bolelli2019,
125+
title = {{Spaghetti Labeling: Directed Acyclic Graphs for Block-Based Connected Components Labeling}},
126+
author = {Bolelli, Federico and Allegretti, Stefano and Baraldi, Lorenzo and Grana, Costantino},
127+
year = 2019,
128+
journal = {IEEE Transactions on Image Processing},
129+
publisher = {IEEE},
130+
volume = 29,
131+
number = 1,
132+
pages = {1999--2012},
133+
doi = {10.1109/TIP.2019.2946979},
134+
issn = {1057-7149}
135+
}
113136
@article{Borgefors86,
114137
author = {Borgefors, Gunilla},
115138
title = {Distance transformations in digital images},
@@ -420,6 +443,16 @@ @article{Gallego2014ACF
420443
volume = {51},
421444
pages = {378-384}
422445
}
446+
@article{Grana2010,
447+
title = {{Optimized Block-Based Connected Components Labeling With Decision Trees}},
448+
author = {Grana, Costantino and Borghesani, Daniele and Cucchiara, Rita},
449+
year = 2010,
450+
journal = {IEEE Transactions on Image Processing},
451+
volume = 19,
452+
number = 6,
453+
pages = {1596--1609},
454+
doi = {10.1109/TIP.2010.2044963}
455+
}
423456
@article{taubin1991,
424457
abstract = {The author addresses the problem of parametric representation and estimation of complex planar curves in 2-D surfaces in 3-D, and nonplanar space curves in 3-D. Curves and surfaces can be defined either parametrically or implicitly, with the latter representation used here. A planar curve is the set of zeros of a smooth function of two variables <e1>x</e1>-<e1>y</e1>, a surface is the set of zeros of a smooth function of three variables <e1>x</e1>-<e1>y</e1>-<e1>z</e1>, and a space curve is the intersection of two surfaces, which are the set of zeros of two linearly independent smooth functions of three variables <e1>x</e1>-<e1>y</e1>-<e1>z</e1> For example, the surface of a complex object in 3-D can be represented as a subset of a single implicit surface, with similar results for planar and space curves. It is shown how this unified representation can be used for object recognition, object position estimation, and segmentation of objects into meaningful subobjects, that is, the detection of `interest regions' that are more complex than high curvature regions and, hence, more useful as features for object recognition},
425458
author = {Taubin, Gabriel},

modules/imgproc/include/opencv2/imgproc.hpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -406,9 +406,13 @@ enum ConnectedComponentsTypes {
406406

407407
//! connected components algorithm
408408
enum ConnectedComponentsAlgorithmsTypes {
409-
CCL_WU = 0, //!< SAUF @cite Wu2009 algorithm for 8-way connectivity, SAUF algorithm for 4-way connectivity
410-
CCL_DEFAULT = -1, //!< BBDT algorithm for 8-way connectivity, SAUF algorithm for 4-way connectivity
411-
CCL_GRANA = 1 //!< BBDT algorithm for 8-way connectivity, SAUF algorithm for 4-way connectivity
409+
CCL_DEFAULT = -1, //!< BBDT @cite Grana2010 algorithm for 8-way connectivity, SAUF algorithm for 4-way connectivity. The parallel implementation described in @cite Bolelli2017 is available for both BBDT and SAUF.
410+
CCL_WU = 0, //!< SAUF @cite Wu2009 algorithm for 8-way connectivity, SAUF algorithm for 4-way connectivity. The parallel implementation described in @cite Bolelli2017 is available for SAUF.
411+
CCL_GRANA = 1, //!< BBDT @cite Grana2010 algorithm for 8-way connectivity, SAUF algorithm for 4-way connectivity. The parallel implementation described in @cite Bolelli2017 is available for both BBDT and SAUF.
412+
CCL_BOLELLI = 2, //!< Spaghetti @cite Bolelli2019 algorithm for 8-way connectivity, SAUF algorithm for 4-way connectivity.
413+
CCL_SAUF = 3, //!< Same as CCL_WU. It is preferable to use the flag with the name of the algorithm (CCL_SAUF) rather than the one with the name of the first author (CCL_WU).
414+
CCL_BBDT = 4, //!< Same as CCL_GRANA. It is preferable to use the flag with the name of the algorithm (CCL_BBDT) rather than the one with the name of the first author (CCL_GRANA).
415+
CCL_SPAGHETTI = 5, //!< Same as CCL_BOLELLI. It is preferable to use the flag with the name of the algorithm (CCL_SPAGHETTI) rather than the one with the name of the first author (CCL_BOLELLI).
412416
};
413417

414418
//! mode of the contour retrieval algorithm

0 commit comments

Comments
 (0)