Magick ++ dilate/erode

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply

Magick ++ dilate/erode

Post by cecchisandrone » 2008-02-17T02:10:36-07:00


I'm using Magick++ and I want to solve this problem. I have the following image. What that I need is to smooth it, to fill holes and make the difference between white and blue more clear. At the end I need only the colors previously existent: black, blue and white, with no shadings.
What kind of transformation do I need to solve this?

Thanks in advance for help.
Last edited by cecchisandrone on 2008-02-17T04:29:24-07:00, edited 1 time in total.


Re: Magick ++ to fill pixel holes

Post by cecchisandrone » 2008-02-17T03:55:03-07:00

I'm thinking about morphological opening/closing (dilate/erode) operations. How can I do them?

User avatar
Site Admin
Posts: 10790
Joined: 2003-05-31T11:32:55-07:00

Re: Magick ++ dilate/erode

Post by magick » 2008-02-17T09:00:37-07:00

ImageMagick does not include a dilation operations, however, you can implement one yourself by using a Magick++ pixel iterator.

User avatar
Posts: 8881
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Magick ++ dilate/erode

Post by anthony » 2008-02-20T17:42:42-07:00

Fred Wienhaus has some command line shell scripts that implements this, but we have yet to find anyone willing to create these image filters inside magick core library.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages

Post Reply