convex hull of connected components

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
alosca
Posts: 52
Joined: 2010-03-04T17:54:57-07:00
Authentication code: 8675308
Location: Pasadena, California

convex hull of connected components

Post by alosca »

Does IM compute convex hull of binary images ?

I have many binary images with a single (connected component) object in each image. Is there a way to use IM to determine the convex hull of the foreground object in a binary image and then paint its interior and produce another image with same size as the original but now containing the painted convex hull ? I don't care to know which points form the convex hull, just its filled, binary version. I have been using Matlab regionprops function to do just that but I would rather use IM.

Thanks for any input.
- alosca
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: convex hull of connected components

Post by fmw42 »

nothing explicitly exists today to my knowledge. however Anthony is still working on his morphology functionality and perhaps he might look into adding the convex hull if practical.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: convex hull of connected components

Post by anthony »

At this time there is not convex hul like functionality. However morphology does provide a way to generate hulls of specific shape. This however has no been built into IM yet!

Note there are two types convex hull of all elements in an image, and convex hulls of connected objects in the image.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply