Mathematical morphology


Mathematical morphology is a theory and technique for the analysis and processing of geometrical structures, based on set theory, lattice theory, topology, and random functions. MM is most commonly applied to digital images, but it can be employed as well on graphs, surface meshes, solids, and many other spatial structures.
Topological and geometrical continuous-space concepts such as size, shape, convexity, connectivity, and geodesic distance, were introduced by MM on both continuous and discrete spaces. MM is also the foundation of morphological image processing, which consists of a set of operators that transform images according to the above characterizations.
The basic morphological operators are erosion, dilation, opening and closing.
MM was originally developed for binary images, and was later extended to grayscale functions and images. The subsequent generalization to complete lattices is widely accepted today as MM's theoretical foundation.

History

Mathematical Morphology was developed in 1964 by the collaborative work of Georges Matheron and Jean Serra, at the École des Mines de Paris, France. Matheron supervised the PhD thesis of Serra, devoted to the quantification of mineral characteristics from thin cross sections, and this work resulted in a novel practical approach, as well as theoretical advancements in integral geometry and topology.
In 1968, the Centre de Morphologie Mathématique was founded by the École des Mines de Paris in Fontainebleau, France, led by Matheron and Serra.
During the rest of the 1960s and most of the 1970s, MM dealt essentially with binary images, treated as sets, and generated a large number of binary operators and techniques: Hit-or-miss transform, dilation, erosion, opening, closing, granulometry, thinning, skeletonization, ultimate erosion, conditional bisector, and others. A random approach was also developed, based on novel image models. Most of the work in that period was developed in Fontainebleau.
From the mid-1970s to mid-1980s, MM was generalized to grayscale functions and images as well. Besides extending the main concepts to functions, this generalization yielded new operators, such as morphological gradients, top-hat transform and the Watershed.
In the 1980s and 1990s, MM gained a wider recognition, as research centers in several countries began to adopt and investigate the method. MM started to be applied to a large number of imaging problems and applications, especially in the field of non-linear filtering of noisy images.
In 1986, Serra further generalized MM, this time to a theoretical framework based on complete lattices. This generalization brought flexibility to the theory, enabling its application to a much larger number of structures, including color images, video, graphs, meshes, etc. At the same time, Matheron and Serra also formulated a theory for morphological filtering, based on the new lattice framework.
The 1990s and 2000s also saw further theoretical advancements, including the concepts of connections and levelings.
In 1993, the first International Symposium on Mathematical Morphology took place in Barcelona, Spain. Since then, ISMMs are organized every 2–3 years: Fontainebleau, France ; Atlanta, USA ; Amsterdam, Netherlands ; Palo Alto, CA, USA ; Sydney, Australia ; Paris, France ; Rio de Janeiro, Brazil ; Groningen, Netherlands ; Intra, Italy ; Uppsala, Sweden ; Reykjavík, Iceland ; Fontainebleau, France ; and Saarbrücken, Germany.

Binary morphology

In binary morphology, an image is viewed as a subset of a Euclidean space or the integer grid, for some dimension d.

Structuring element

The basic idea in binary morphology is to probe an image with a simple, pre-defined shape, drawing conclusions on how this shape fits or misses the shapes in the image. This simple “probe” is called the structuring element, and is itself a binary image.
Here are some examples of widely used structuring elements :
  • Let ; is an open disk of radius, centered at the origin.
  • Let ; is a square, that is,.
  • Let ; is the “cross” given by.

    Basic operators

The basic operations are shift-invariant operators strongly related to Minkowski addition.
Let E be a Euclidean space or an integer grid, and A a binary image in E.

Erosion

The erosion of the binary image by the structuring element is defined by
where is the translation of by the vector, i.e.,
When the structuring element has a center, and this center is located on the origin of, then the erosion of by can be understood as the locus of points reached by the center of when moves inside. For example, the erosion of a square of side, centered at the origin, by a disc of radius, also centered at the origin, is a square of side centered at the origin.
The erosion of by is also given by the expression.
Example application: Assume we have received a fax of a dark photocopy. Everything looks like it was written with a pen that is bleeding. Erosion process will allow thicker lines to get skinny and detect the hole inside the letter “o”.

Dilation

The dilation of A by the structuring element B is defined by
The dilation is commutative, also given by.
If B has a center on the origin, as before, then the dilation of A by B can be understood as the locus of the points covered by B when the center of B moves inside A. In the above example, the dilation of the square of side 10 by the disk of radius 2 is a square of side 14, with rounded corners, centered at the origin. The radius of the rounded corners is 2.
The dilation can also be obtained by, where Bs denotes the symmetric of B, that is,.
Example application: dilation is the dual operation of the erosion. Figures that are very lightly drawn get thick when "dilated". Easiest way to describe it is to imagine the same fax/text is written with a thicker pen.

Opening

The opening of A by B is obtained by the erosion of A by B, followed by dilation of the resulting image by B:
The opening is also given by, which means that it is the locus of translations of the structuring element B inside the image A. In the case of the square of side 10, and a disc of radius 2 as the structuring element, the opening is a square of side 10 with rounded corners, where the corner radius is 2.
Example application: Let's assume someone has written a note on a non-soaking paper and that the writing looks as if it is growing tiny hairy roots all over. Opening essentially removes the outer tiny "hairline" leaks and restores the text. The side effect is that it rounds off things. The sharp edges start to disappear.

Closing

The closing of A by B is obtained by the dilation of A by B, followed by erosion of the resulting structure by B:
The closing can also be obtained by, where Xc denotes the complement of X relative to E. The above means that the closing is the complement of the locus of translations of the symmetric of the structuring element outside the image A.

Properties of the basic operators

Here are some properties of the basic binary morphological operators :
In grayscale morphology, images are functions mapping a Euclidean space or grid E into, where is the set of reals, is an element larger than any real number, and is an element smaller than any real number.
Grayscale structuring elements are also functions of the same format, called "structuring functions".
Denoting an image by f, the structuring function by b and the support of b by B, the grayscale dilation of f by b is given by
where "sup" denotes the supremum.
Similarly, the erosion of f by b is given by
where "inf" denotes the infimum.
Just like in binary morphology, the opening and closing are given respectively by

Flat structuring functions

It is common to use flat structuring elements in morphological applications. Flat structuring functions are functions b in the form
where.
In this case, the dilation and erosion are greatly simplified, and given respectively by
In the bounded, discrete case, the supremum and infimum operators can be replaced by the maximum and minimum. Thus, dilation and erosion are particular cases of order statistics filters, with dilation returning the maximum value within a moving window, and the erosion returning the minimum value within the moving window B.
In the case of flat structuring element, the morphological operators depend only on the relative ordering of pixel values, regardless their numerical values, and therefore are especially suited to the processing of binary images and grayscale images whose light transfer function is not known.