I’m working on connected component analysis using OpenCV-CUDA, and I want to use the API ‘cv2.cuda.labelComponents’.
According to the official documentation of OpenCV 4.7.0, this API should exist.
However, when I try to use it in Python, I get an attribute error. Is there anyone who has experience using OpenCV-CUDA in Python and can offer an alternative method to obtain the center points of connected components?
Not only is it legacy it was disabled for CUDA >= 8.0. Whilst this does not make the issue on github a bug, it should probably be highlighted in the docs.
That said I suspect this won’t be any use to the Walterinuniverisity because there is no CUDA equivalent of cv::connectedComponentsWithStats to retrieve the coordinates of the centre of each connected region.
If they were using C++ I would suggest the NPP libs which have a set of connected component labeling routines, but I would advise caution as I have found them to be buggy and slow.