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
cecchisandrone

Magick ++ dilate/erode

Post by cecchisandrone »

Hi,

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.
Image
Last edited by cecchisandrone on 2008-02-17T04:29:24-07:00, edited 1 time in total.
cecchisandrone

Re: Magick ++ to fill pixel holes

Post by cecchisandrone »

I'm thinking about morphological opening/closing (dilate/erode) operations. How can I do them?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Magick ++ dilate/erode

Post by magick »

ImageMagick does not include a dilation operations, however, you can implement one yourself by using a Magick++ pixel iterator.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Magick ++ dilate/erode

Post by anthony »

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.

http://www.fmwconcepts.com/imagemagick/
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply