Page 1 of 1

clear dots on edge commands

Posted: 2011-05-15T13:52:57-07:00
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

Re: clear dots on edge commands

Posted: 2011-05-15T15:50:19-07:00
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/