Skip to content

Commit

Permalink
Merge pull request opencv#17913 from asmorkalov:as/connected_componen…
Browse files Browse the repository at this point in the history
…ts_ref
mshabunin committed Jul 22, 2020
2 parents 0fa06b1 + abceef7 commit ef1690e
Showing 2 changed files with 16 additions and 3 deletions.
13 changes: 13 additions & 0 deletions doc/opencv.bib
Original file line number Diff line number Diff line change
@@ -1215,3 +1215,16 @@ @article{yang1996structure
year = {1996},
publisher = {Elsevier}
}
@Article{Wu2009,
author={Wu, Kesheng
and Otoo, Ekow
and Suzuki, Kenji},
title={Optimizing two-pass connected-component labeling algorithms},
journal={Pattern Analysis and Applications},
year={2009},
month={Jun},
day={01},
volume={12},
number={2},
pages={117-135},
}
6 changes: 3 additions & 3 deletions modules/imgproc/include/opencv2/imgproc.hpp
Original file line number Diff line number Diff line change
@@ -403,7 +403,7 @@ enum ConnectedComponentsTypes {

//! connected components algorithm
enum ConnectedComponentsAlgorithmsTypes {
CCL_WU = 0, //!< SAUF algorithm for 8-way connectivity, SAUF algorithm for 4-way connectivity
CCL_WU = 0, //!< SAUF @cite Wu2009 algorithm for 8-way connectivity, SAUF algorithm for 4-way connectivity
CCL_DEFAULT = -1, //!< BBDT algorithm for 8-way connectivity, SAUF algorithm for 4-way connectivity
CCL_GRANA = 1 //!< BBDT algorithm for 8-way connectivity, SAUF algorithm for 4-way connectivity
};
@@ -3842,7 +3842,7 @@ image with 4 or 8 way connectivity - returns N, the total number of labels [0, N
represents the background label. ltype specifies the output label image type, an important
consideration based on the total number of labels or alternatively the total number of pixels in
the source image. ccltype specifies the connected components labeling algorithm to use, currently
Grana (BBDT) and Wu's (SAUF) algorithms are supported, see the #ConnectedComponentsAlgorithmsTypes
Grana (BBDT) and Wu's (SAUF) @cite Wu2009 algorithms are supported, see the #ConnectedComponentsAlgorithmsTypes
for details. Note that SAUF algorithm forces a row major ordering of labels while BBDT does not.
This function uses parallel version of both Grana and Wu's algorithms if at least one allowed
parallel framework is enabled and if the rows of the image are at least twice the number returned by #getNumberOfCPUs.
@@ -3874,7 +3874,7 @@ image with 4 or 8 way connectivity - returns N, the total number of labels [0, N
represents the background label. ltype specifies the output label image type, an important
consideration based on the total number of labels or alternatively the total number of pixels in
the source image. ccltype specifies the connected components labeling algorithm to use, currently
Grana's (BBDT) and Wu's (SAUF) algorithms are supported, see the #ConnectedComponentsAlgorithmsTypes
Grana's (BBDT) and Wu's (SAUF) @cite Wu2009 algorithms are supported, see the #ConnectedComponentsAlgorithmsTypes
for details. Note that SAUF algorithm forces a row major ordering of labels while BBDT does not.
This function uses parallel version of both Grana and Wu's algorithms (statistics included) if at least one allowed
parallel framework is enabled and if the rows of the image are at least twice the number returned by #getNumberOfCPUs.

0 comments on commit ef1690e

Please sign in to comment.