Page 1 of 1

whitening varying shapes of four to six pixels

Posted: 2012-06-06T03:00:49-07:00
by galwaylibrary
Hi,

I am working with an image with a lot of black marks on the background. The marks are about four to six pixels in size, but the shape varies greatly. However, all of these shapes are surrounded by a sea of white pixels. Is it possible to remove these marks?

Any help would be much appreciated.

Regards
John

Re: whitening varying shapes of four to six pixels

Posted: 2012-06-06T09:22:33-07:00
by fmw42
You can use -morphology open or close depending upon white on black or black on white. I never remember and have to try both. see http://www.imagemagick.org/Usage/morphology/#basic

can you post a link to your example image so others can experiment?

Re: whitening varying shapes of four to six pixels

Posted: 2012-06-07T01:52:56-07:00
by galwaylibrary
Hi,

Thanks for your reply. I have put the image at
http://places.galwaylibrary.ie/page.png

Regards
John

Re: whitening varying shapes of four to six pixels

Posted: 2012-06-07T09:20:21-07:00
by fmw42
try

convert page.png -median 3x3 show: