Reputation: 517
I need to remove small parts from a binary image. So I find its contours by findContour. Then I find the area of each contour by contourArea. Is there a function that paints all pixels on boundaries and within those contours?
Upvotes: 0
Views: 1230
Reputation: 1365
Or, rather, since you're using the OpenCV 2.x API:
drawContours(image, contours, contourIdx, Scalar(255,255,255))
See the documentation for more info.
Upvotes: 1