Binary Morphology
Useful set of operations for post- or pre-processing segmentation.
We saw that in Niemeijer et al. the pixel classification approach only used the green channel of the retinal images.
This is also mentioned in this lecture. Apparently the green band contains the most information about morphology. The red channel is not very useful because the retinal images are generally very red/orange, i.e. this channel usually has high intensities overall.
When finding the binary segmentation, we often have black dots within the vessels. (These will obviously be penalized by performance metrics). It's however obvious they belong to the same branch, so using morphology operations (e.g. "dilation") we can fill in these black holes as a post-processing step.
Mathematical Morphology
Aims at analyzing the shape and form of objects, based on set theory and lattice algebra.
As image probes structuring elements (SE) are used. These are small point sets with their own local origin (so very much like a filter used in convolution). It could be the case that the origin itself is excluded. We put the origin over each input pixel.
A morphological transformation records locations where a relation between the image and the SE is satisfied.
If the SE applied, apply the origin pixel if I understand correctly.
Dilation
Only if the origin of the SE is positive in the image as well (e.g. after binary thresholding), only then apply the structuring element to that position. Applying the structuring element means you fill in all pixels that are "positive" in the SE.
So dilation is basically combining two sets by vector addition.
$$X \bigoplus B = { x + b : x \in X, b \in B} = \cup_{b \in B} X_b$$
The behavior is different when you dilate when the origin is not positive in the SE. In that case, when the origin of the SE is on a positive pixel, this application will actually remove that pixel.
Dilation e.g. with a "cross" can help fill in unconnected pieces of the retinal vessels.
Erosion
Erosion is the opposite of dilation and essentially does vector subtraction.
$$X \bigomin B = { x : x+b \in X \forall b \in B} = \cap_{b \in B} X_b$$
It only keeps the pixels if all of the positive pixels are also positive in the SE.
This can be seen as "pattern detection", i.e. only exact matches to the pattern are kept.
When the center pixel is not positive in the SE, you instead only keep the center pixel in case a pattern matches.
Erosion can be used e.g. to remove the circumference of the retinal pictures.
Opening
We can combine erosion and dilation. An opening is an erosion followed by dilation. This can be used to:
- smooth contours
- cut narrow bridges
- remove small islands and sharp corners
The erosion gets rid of the circumference of the retinal image, and the dilation afterwards helps recovering some of the sparser regions we didn't want to be removed.
Closing
A closing is a dilation followed by erosion.
This helps:
- Fill narrow channels
- Fill small holes