Small Spots in images

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
dmozca
Posts: 2
Joined: 2012-05-01T12:25:45-07:00
Authentication code: 13

Small Spots in images

Post by dmozca »

Hi Everybody:

I need to clean some images, because those have it small spots in random parts of them, in the next example, red circles remarks those spots, this spots are smaller than any letter, somebody can help me?

thanks in advance...

David Pantoja.

Image
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Small Spots in images

Post by fmw42 »

You can try either median filtering or -morphology close or open (not sure which as it depends upon whether white on black or black on white), I alway try both to make sure which is correct. But I think for your image it is close.

see
http://www.imagemagick.org/Usage/morphology/
dmozca
Posts: 2
Joined: 2012-05-01T12:25:45-07:00
Authentication code: 13

Re: Small Spots in images

Post by dmozca »

Basically are black spots in white background, in tif images in two colors format, I understand Morphology option, but i can't understand how can i do it?

thanks

David.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Small Spots in images

Post by fmw42 »

try this

convert example.jpg -morphology close disk:1 example2.png

or

convert example.jpg -median 5x5 example3.png
Post Reply