I have a stack of binary images of an open porous structure and I want to get a binary mask which covers the whole volume of the structure (the structure itself and the void contained in the structure). I think a good way to achieve my goal would be to calculate the convex hull of the image. This works fine in Python using skimage.morphology.convex_hull_image
(see images).
But I need this functionality in C++ and I want to use the DIPlib library. Unfortunately I'm struggeling with the correct implementation since the documentation confuses me a bit.
- Could you provide a minimal example which explains how to derive the the convex hull of a binary object as an image?
- Does the DIPlib implementation also handle 3D images?