Erosion is one of two fundamental operations in Morphological image processing from which all other morphological operations are based. The operation is a subset of set theory, where each pixel in an image is considered to be a member of a set of pixels, rather than the usual interpretation of an image being a strict function of two dimensions.
Definition
Erosion: Let A denote a binary image and B denote a structuring element. Then the erosion of A by B is given by: 
The concept of erosion can also be extended to greyscale images. See, for example, Gonzalez (2002).
Example
Suppose A is a 13 * 13 matrix and B is a 5 * 1 matrix:
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 1 1 1 1 1 1 1 0 0 0 1
0 0 0 1 1 1 1 1 1 1 0 0 0 1
0 0 0 1 1 1 1 1 1 1 0 0 0 1
0 0 0 1 1 1 1 1 1 1 0 0 0 1
0 0 0 1 1 1 1 1 1 1 0 0 0 1
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0
Assuming that the origin B is at its center, for each pixel in A superimpose the origin of B, if B is completely contained by A the pixel is retained, else deleted.
The Erosion of A by B is given by
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 1 1 1 1 1 1 1 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0
This means that only when B is completely contained inside A that the pixels values are retained, else it gets deleted or in other words it gets eroded.
See also
References
R. C. Gonzalez and R. E. Woods, Digital image processing, 2nd ed. Upper Saddle River, N.J.: Prentice Hall, 2002.
|