clear dots on edge commands

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
like_php
Posts: 1
Joined: 2011-05-15T13:42:08-07:00
Authentication code: 8675308

clear dots on edge commands

Post by like_php »

Hello all

i am new at imagemagik developement.
i try create clear edges photos but not working with me, always have dots and dont know how to clean it, see this photo as an example:
orginal photo:
Image
converted image:
Image

and this is a code i used

Code: Select all

exec('convert bill.jpg -flatten -colorspace GRAY -negate -edge 3 -negate -normalize -threshold 9% -despeckle -contrast-stretch 0x100% bill.png');
thanks in advanced
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: clear dots on edge commands

Post by fmw42 »

the dots are Bill Gates freckles in his face. try doing a -median or -selective blur before edge detection or try using -morphology open after edge detection

see http://www.imagemagick.org/Usage/morphology/
Post Reply