Erosion modules are reiterative: repeating an erosion or dilation of size 1 N times has the same effect as performing a single erosion with a structuring element of size N.
In figure 1 the binary image is I, and X denotes the set of points with a value of 1. The erosion of I by the structuring element B results in the set of points x, where the disk representing B and cenetred on x is totally included in the set of points X. The erosion of I can be denoted as or .
Figure 1: Erosion applied to a binary image |
The eroded set of X by the structuring element B is:
It may also be written as:
The value of the structuring element (B) varies depending on the type of erosion. On a gray level image, the erosion by the structuring element B is the search for the minimal value of intensities within B.
2D image : .
3D image : .
When the point hits the edge of the image, the structuring element is composed of the intersection of B with the points of the structuring element totally within the image, and not the points outside the image.