connected components in OpenCV

EyalG picture EyalG · Oct 2, 2012 · Viewed 66.4k times · Source

I am looking for an OpenCV function that can find connected components and perform a few tasks on them ( like getting the number of pixels, contour, list of pixels in the object etc.. )

Is there a function of OpenCV (C++) that is similar to MatLab's regionprops ?

Answer

Alessandro Jacopson picture Alessandro Jacopson · Sep 8, 2014

Starting from version 3.0, OpenCV has connectedComponents function.