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 » 2011-12-15T11:53:08-07:00

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 » 2011-12-15T12:05:44-07:00

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 » 2011-12-15T12:57:45-07:00

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

Perfect!!! Thanks so much!
Blair Jones

Post Reply