Remove holes in an image without affecting the borders
Following is an example image and I would like to remove all the black part in the image with white. I can use a median filter to do it, but it will correspondingly also affect the borders.
Is there any idea how to do it?
Possible solution here?
great solution ! thank you for the link.