ITK Pre-Processing Algorithm Wrappers in Python/GrayscaleMorphologicalClosingFilter
From FarsightWiki
Grayscale Morphological Closing Image Filter
This is implemented using the itkGrayscaleMorphologicalClosingImageFilter class of ITK. The mophological closing is a performed by a sequence of two operations - dilation followed by erosion. The operation results in the removal of small holes in the image.
Parameters:
- Radius - this specifies the radius of the structuring element that is used for the erosion and dilation operations. The radius specifies the size of the holes that will be removed from the foreground, when the opening operation is applied. Larger the size of the structuring element, larger holes are removed from the foreground. The radius for the closing operation must be carefully chosen. If the chosen radius is large, then adjacent objects might start getting connected to each other. Figures 1, 2, and 3 show the image obtained on applying the closing filter of seg_orig for radius values of 1, 3, and 5, respectively. The effect of closing can clearly be seen in the images.