Applications#
The four morphological tools seen above are the elementary operations for more complex processing. In this section, we focus on some specific processings, others are given by [Bloch 2005, chapter 6].
Top-hat transform#
The top-hat transformation (French: transformée du chapeau haut-de-forme) keeps in the image only the objects that are narrower than the structuring element. There are two dual top-hat transforms:
The white top-hat transform is defined as the difference between the image \(I\) and its opening by the structuring element \(E\):
\[ T_w = I \setminus I \circ E. \]The black top-hat transform is defined as the difference between the closing by the structuring element \(E\) and the image:
\[ T_b = I \bullet E \setminus I. \]
Fig. 88 shows the effect of a white top-hat transform (only the white objects narrower than the structuring element are kept) and a black top-hat transform (only the black objects narrower than the structuring element are kept). Note that the structuring element, present in the original image, is not kept because it is not narrower than itself. The results also show many of very small artifacts that can be easily removed by discarding the objects whose size is smaller than a predefined threshold.
Granulometry#
Granulometry (French: granulométrie) is an approach that successively selects particles of increasing sizes in a binary image. It consists of successive openings of an image \(I\) by a sequence of structural elements \(E_k\) of increasing size (usually, \(E_k = \underbrace{E\oplus \ldots \oplus E} _{k{\mbox{ times}}}\)) where \(E\) is a disk).
At each stage of opening, the finer details are successively eliminated, and the area of the image is reduced (the area is the total number of pixels in the objects.).
Fig. 90 shows the granulometry function obtained on the binary image of Fig. 89 by openings with a disk of different sizes. When the size of the opening corresponds to the characteristic size of most objects, a jump appears in the curve.
Hit-or-miss transform#
The hit-or-miss transform (French: transformée tout-ou-rien) is used to detect objects of a particular shape. Contrary to the transformations seen so far, the hit-or-miss transform examines configurations where certain pixels verify a relationship with the object and others verify a relationship with the complement of the object. Thus the structuring element \(E\) of this transformation is composed of two elements \(E_1\) and \(E_2\) (disjoint but with the same origin).
The result of the hit-or-miss transform is the intersection of the two sets given by:
the erosion of the image by \(E_1\): \(I \ominus E_1\),
the erosion of the image background by \(E_2\): \(I^\mathrm{c} \ominus E_2\)
The hit-or-miss transform by the two structuring elements \(E_1\) and \(E_2\) is noted \(I \otimes (E_1, E_2)\):
Skeleton#
The skeleton (French: squelette) is a useful notion in pattern recognition: it is a “compact” form of the objects (thin lines centered within the objects), with the same number of connected components and the same number of holes.
From a structuring element \(E\), let us define \(\forall k \in \mathbb{N}^*\):
The skeleton \(S(I)\) of image \(I\) is defined as: