Does someone have an idea to get the size and the position from an object? The Object is detected in a binary image with white pixels:
For example: Detected / Original
http://ivrgwww.epfl.ch/supplementary_material/RK_CVPR09/Images/segmentation/2_sal/0_12_12171.jpg http://ivrgwww.epfl.ch/supplementary_material/RK_CVPR09/Images/comparison/orig/0_12_12171.jpg
I know about the CvMoments
- Method. But I don't know how to use it in this case.
By the way: How can I make my mask more clearly?
Simple algorithm:
findContours
to find all contours.countNonZero
or contourArea
to find area of each contour.