I am new to opencv (python) and don't really know how to tackle my new task.
I have several images (binarized) and masks for them. I want to extract all Connected Components of the original image that are masked and see their shapes (bounding boxes). I'm mainly interested in their length to height ratio. I'd also like to get a mean (or better: median?) for those, because I'd like to analyse them.
I played around with cv2.connectedComponentsWithStats(), but I can't seem to get the information I want with it. The documentation sadly also didn't help me.
So: Is there a way to get all desired CCs in (i.e.) an array, where they have their location and shape listed? That would be tremendously helpful!
(Also I have quite a few of those images and would like to get a good average of all of them. Is there a way to do this for a whole folder full of images?)