Mathematical Morphology
lesson
Another non-linear operation on the pixels in the box around the input pixel is to test whether they match a reference shape. This is a very powerful and useful approach to cleaning up noisy binary images known as mathematical morphology and objects in the image are treated according to their compatibility with a structuring element. […]