1 | initial version |
If the things you're trying to fill are consistently round as in your example, you can use findContours and use the returned hierarchy to only look at internal contours. Check them for circularity and only fill those that are circular enough.