1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 08:13:04 +04:00

imgproc: accept CV_Bool masks in connected components

This commit is contained in:
jeevan6996
2026-07-27 18:54:59 +01:00
parent 53d308c2a5
commit e1f1495faa
2 changed files with 68 additions and 1 deletions
+1 -1
View File
@@ -5659,7 +5659,7 @@ namespace cv{
const char *currentParallelFramework = cv::currentParallelFramework();
const int nThreads = cv::getNumThreads();
CV_Assert(iDepth == CV_8U || iDepth == CV_8S);
CV_Assert(iDepth == CV_8U || iDepth == CV_8S || iDepth == CV_Bool);
//Run parallel labeling only if the rows of the image are at least twice the number of available threads
const bool is_parallel = currentParallelFramework != NULL && nThreads > 1 && L.rows / nThreads >= 2;