hi,
Can you pleas tell me how to write these imagemagick commands in perlmagick..... i tried but i'm nt getting the required output. the output should be a silhoutte with white contour ad black background....so it should be a perfect black and white image.
convert a.png -fuzz 10% -fill white -opaque white a_f.png
convert a_f.png -transparent white a_tr.png
convert a_tr.png -alpha extract -edge 2 OUTPUT1.png
here the image a.png is
http://www.fmwconcepts.com/misc_tests/e ... ree_01.png
the result should be
http://www.fmwconcepts.com/misc_tests/e ... _edge2.png
I got this in imagemagick but im nt getting in this way in perlmagick
please guide me...!!!!!!!!!!!!!
imagemagick commands in perlmagick
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: imagemagick commands in perlmagick
I am not certain what the first two commands are doing, a threshold on the extracted alpha channel would probably do just as well.
As for the edge, of a binary image using morphology will probably give you much more control, and can get you the inside/outside. or both sides of the binary (or non-binary) edge.
convert a.png -alpha extract -threshold 90% \
-morphology EdgeIn Square:2 OUTPUT1.png
I known morphology is available in perl magick as Morphology() but I am not certain how 'alpha' channel operator is accessed. in the perl API.
http://imagemagick.org/script/perl-magick.php
As for the edge, of a binary image using morphology will probably give you much more control, and can get you the inside/outside. or both sides of the binary (or non-binary) edge.
convert a.png -alpha extract -threshold 90% \
-morphology EdgeIn Square:2 OUTPUT1.png
I known morphology is available in perl magick as Morphology() but I am not certain how 'alpha' channel operator is accessed. in the perl API.
http://imagemagick.org/script/perl-magick.php
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: imagemagick commands in perlmagick
anthony wrote:I am not certain what the first two commands are doing, a threshold on the extracted alpha channel would probably do just as well.
As for the edge, of a binary image using morphology will probably give you much more control, and can get you the inside/outside. or both sides of the binary (or non-binary) edge.
convert a.png -alpha extract -threshold 90% \
-morphology EdgeIn Square:2 OUTPUT1.png
I known morphology is available in perl magick as Morphology() but I am not certain how 'alpha' channel operator is accessed. in the perl API.
http://imagemagick.org/script/perl-magick.php
this morphology command doesnt work for my logic....
can you please tell me the substitution command of "-edge" in perlmagick??