next up previous contents
Next: Opening and closing Up: Morphological processing Previous: Morphological processing

Dilation and erosion

The two most basic morphological operators are dilation and erosion. Dilation of the set A by set B, denoted by tex2html_wrap_inline6481 , is obtained by first reflecting B about its origin and then translating the result by x. All x such that A and reflected B translated by x that have at least one point in common form the dilated set.

displaymath6495

where, tex2html_wrap_inline6497 denotes the reflection of B i.e., tex2html_wrap_inline6501 and tex2html_wrap_inline6503 denotes the translation of B by tex2html_wrap_inline6507 i.e., tex2html_wrap_inline6509 . Thus, dilation of A by B expands the boundary of A.

It is easier to implement for gray-scales than the above description suggests.

equation3233

Here, f and b denote images f(x,y) and b(x,y). f is being dilated and b is called the structuring element and tex2html_wrap_inline6529 and tex2html_wrap_inline6531 are the domains of f and b respectively. Thus, in dilation we choose the maximum value of f+b in a neighborhood defined by b. If all elements of b are positive, the dilated image is brighter than the original and the dark details are either reduced or eliminated.

Erosion of A by B, denoted by tex2html_wrap_inline6547 , is the set of all x such that B translated by x is completely contained in A, i.e.,

displaymath6557

For gray-scale images we have,

equation3235

Erosion is thus based on choosing the minimum value of (f-b) in a neighborhood defined by the shape of b. If all elements of b are positive, the output image is darker than the original and the effect of bright details in the input image are reduced if they cover a region smaller than b.