I am performing blob analysis using connectedComponentsWithStats, which returns elementary statistics about the blobs (AABB and area). It is also possible to compute geometric moments.

Anyway, I need to compute my own features and for this I need the detailed geometry, be it a chain of outline pixels, a run-lengh-coded description or similar.

I know that the contours can be obtained by other means (findContours), but I would like to know if the connected components engine can help me achieve my goal or if it is a black box forever.


1 Answer 1


Instead of connected components you may also use blob detector mentioned here

It provides some information on the shape and geometry of blob

For geometric moments you will have to compute contours.

I am not sure what do you mean by connected components being a black box.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.