Composition of basic operators#
Opening#
Opening (french: ouverture) consists of an erosion followed by a dilation. The erosion removes small objects but also decreases the size of bigger objects. To avoid this, the result is dilated with the same structuring element.
Property#
Opening is an idempotent operation, that is to say, applying twice the same opening gives the same result as only one opening:
\[ (I \circ E) \circ E = I \circ E \]
Closing#
Contrary to opening, closing (french: fermeture) is firstly a dilation, then an erosion. Indeed, expansion closes holes but enlarges objects. To avoid the widening of the objects, an erosion can be applied with the same structuring element.
Properties#
Similarly to opening, closing is an idempotent operation:
\[ (I \bullet E) \bullet E = I \bullet E \]
Hit-or-miss transform#
The hit-or-miss transform (french: transformée tout-ou-rien) is used to detect objects of a particular shape. It is the intersection of the two sets given by:
the erosion by a first structuring element \(E_1\): \(I \ominus E_1\),
and the erosion of the background by a second structuring element \(E_2\): \(I^\mathrm{c} \ominus E_2\)
with \(E_1 \cap E_2 = \varnothing\) (the structuring elements must be disjointed).
The hit-or-miss transform by the two structuring elements \(E_1\) and \(E_2\) is noted \(I \otimes (E_1, E_2)\):
Sometimes, the two structuring elements are combined into a single structuring element whose pixels have the following values:
\(1\): pixels that belong to the object to detect,
\(-1\): pixels that do not belong to the object to detect (i.e pixels of the background),
\(0\): unused pixels (also called “don’t care pixels”).
With this notation, the structuring element of the hit-or-miss transform in Fig. 72 writes