Function erode

Erosion is one of two fundamental operations (with dilatation) in morphological Image processing from which all other morphological operations are based (from Wikipedia). Replaces each value with it's local minimum among the pixels with a kernel value of 1.