Add Grana's connected components algorithm for 8-way connectivity. (#6823)
* Add Grana's connected components algorithm for 8-way connectivity. That algorithm is faster than Wu's one (currently implemented in opencv). For more details see https://github.com/prittt/YACCLAB. * New functions signature and distance transform compatibility * Add tests to imgproc/test/test_connectedcomponents.cpp * Change of test_connectedcomponents.cpp for c++98 support
This commit is contained in:
@@ -827,7 +827,7 @@ void cv::distanceTransform( InputArray _src, OutputArray _dst, OutputArray _labe
|
||||
if( labelType == CV_DIST_LABEL_CCOMP )
|
||||
{
|
||||
Mat zpix = src == 0;
|
||||
connectedComponents(zpix, labels, 8, CV_32S);
|
||||
connectedComponents(zpix, labels, 8, CV_32S, CCL_WU);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user