Closed tischi closed 2 years ago
See also #61
Draft branch is #278
Hi @tischi,
I would separate morphological filtering applied to binary and gray scale values. For the moment only work on morphological filtering for binary images
.
What do you think?
Antonio
Hi @tischi, a fill operation is it a morphological filter? I do not know exactly and I think it depends on the algorithm. You can compute the connected component of the background and omit the components that touch the border (MATLAB imfill). https://docs.scipy.org/doc/scipy/reference/generated/scipy.ndimage.binary_fill_holes.html does it differently and use a dilation operation.
is a "fill operation" a "morphological filter"?
I don't know... @dlegland, what would you say?
Hi all, I would say: yes, fill holes belongs to morphological operators. To me, it belongs to the class of "reconstruction-based" operators.
By the way, both Matlab and scipy implementation rely on the same idea; the morphological reconstruction can be obtained by iterating dilations, and constraining each dilation to a mask (here the background).
Great thank you.
One could also do fill holes by performing a CCA on the background pixels and then remove objects that touch the boundary. All objects found are associated to fg and added to the original image.
Yes, this should work.
Actually, the principle for fill holes is to use reconstruction on the BG pixels/voxels, by using as marker the BG pixels/voxels on the border of the image. The nice point of this approch is that one only needs to keep initial and result image. Using CCA on BG rely on the same idea, but this requires creating an intermediate label image, that can be memory-costly.
First nearly finished draft of module is now ready to merge. Thanks again @dlegland for the very useful comments. It start to make sense in my mind.
Merge
filter_rank.md
intofilter_morphologial.md
.Content (distribute across activities and exercises): min/erode, max/dilate, opening, closing, top-hat, inner-edge, outer-edge