Page 117 -
P. 117
Chapter 3 ■ Digital Morphology 91
To grow a layer of pixels in all directions, it seems to make sense to use a
structuring element having one pixel on every side of the origin — that is, a 3x3
square with the origin at the center. This structuring element will be named
‘‘simple’’ in the ensuing discussion and is correct in this instance, although it
is not always easy to determine the shape of the structuring element needed
to accomplish a specific task.
As a further example, consider the object and structuring element shown
in Figure 3.4. In this case, the origin of the structuring element B 1 contains a
white pixel, implying that theorigin isnot included in the set B 1 . There is no rule
against this, but it is more difficult to see what will happen, so the example
will be done in detail.
Structuring element B .
1
The object image A . A dilated B .
1
1
1
Figure 3.4: Dilation by a structuring element that does not include the origin. Some pixels
that are set in the original image are not set in the dilated image.
The image to be dilated, A 1 , has the following set representation:
A 1 ={(1, 1) (2, 2) (2, 3) (3, 2) (3, 3) (4, 4)}
The structuring element B 1 is:
B 1 ={(0, −1) (0, 1)}
The translation of A 1 by (0, −1) yields
(A 1 ) (0,−1) ={(1, 0) (2, 1) (2, 2) (3, 1) (3, 2) (4, 3)}
And the translation of A 1 by (0,1) yields:
(A 1 ) (0,1) ={(1, 2) (2, 3) (2, 4) (3, 3) (3, 4) (4, 5)}
The dilation of A 1 by B 1 is the union of (A 1 ) (0,−1) with (A 1 ) (0,1) ,and is shown
in Figure 3.11. Notice that the original object pixels, those belonging to A 1 ,are
not necessarily set in the result; (1,1) and (4,4), for example, are set in A 1 but
not in A 1 + B 1 . This is the effect of the origin not being a part of B 1 .
The manner in which the dilation is calculated above presumes that a
dilation can be considered to be the union of all the translations specified by
the structuring element — that is, as
(EQ 3.9)
A ⊕ B = ∪ (A) b
b ∈ B