How to use Morphology method?

PerlMagick is an object-oriented Perl interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning PerlMagick.
Post Reply
abjones
Posts: 33
Joined: 2004-03-26T12:21:59-07:00

How to use Morphology method?

Post by abjones »

Howdy Folks,

I want to manipulate an image as from the command line

Code: Select all

convert target.png -morphology dilate disk:5 result.png
Can someone tell me how to correctly write my perl code:

Code: Select all

$error=$image->Morphology(kernel=>"dilate disk:5");
Thanks
Blair Jones
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: How to use Morphology method?

Post by magick »

Try something like this:
  • $x = $image->Morphology(method=>'Dilate',kernel=>'Diamond',iterations=>2);
abjones
Posts: 33
Joined: 2004-03-26T12:21:59-07:00

Re: How to use Morphology method?

Post by abjones »

$error = $image->Morphology(method=>'Dilate',kernel=>'Disk:5');

Perfect!!! Thanks so much!
Blair Jones
Post Reply