Ask Your Question

Revision history [back]

You can use opening with a rectangle kernel of size 3 and iterate (4 for posted image)

First image original

Second image result

third image difference between original and result : some pixels are lost

image description