A Geometrical Approach in Image Processing Henk J.A.M
Total Page:16
File Type:pdf, Size:1020Kb
237 Mathematical Morphology: a Geometrical Approach in Image Processing Henk J.A.M. Heijmans CW/, P.O. Box 4079, 1009 AB Amsterdam, The Netherlands Mathematical morphology is a theory of image operators and image functionals which is based on set-theoretical, geometrical and topological concepts. The methodology is particularly useful for the analysis of the geometrical structure in an image. The main goal of this paper is to give an impression of the underlying philosophy and the mathematical theories which are relevant to this field. We have tried to achieve this goal by discussing a number of theoretical problems we have been dealing with in the past five years. 1. INTRODUCTION In the early sixties two researchers at the Paris School of Mines in Fontainebleau, Georges Matheron and Jean Serra, worked on a number of problems in mineral ogy and petrography. Their main goal was to characterize physical properties of certain materials, e.g. the permeability of a porous medium, by examining their geometrical structure. Their investigations ultimately led to a new quantitative approach in image analysis, nowadays known as mathematical morphology. Thirty years later, mathematical morphology has achieved a status as a pow erful method for image processing which, besides having been applied success fully in various disciplines such as mineralogy, medical diagnostics and histology, has also become a solid mathematical theory leaning on concepts from algebra, topology, integral and stochastic geometry. To a large extent the current status is due to its founders MATHERON and SERRA [27, 39, 40] The central idea of mathematical morphology is to examine the geometrical structure of an image by matching it with small patterns at various locations in the image. By varying the size and the shape of the matching patterns, called structuring elements, one can obtain useful information about the shape of the different parts of the image and their interrelations. In general the procedure results in nonlinear image operators which are well-suited for the analysis of the geometrical and topological structure of an image. Originally, mathematical morphology has been developed for binary images which can be represented mathematically as sets. The corresponding morpho logical operators essentially use only four ingredients from set theory, namely set 238 H.J.A.M. Heijmans intersection, union, complementation and translation. But from the very begin ning there was a need for a more general theory powerful enough to deal with object spaces such as the closed subsets of a topological space, the convex sets of a (topological) vector space, and grey-scale images. It has been observed first by SERRA [39] that a theory of morphology essentially requires the underlying image space to be a complete lattice. This paper intends to give the reader a flavour of mathematical morphology. As such we do not aim for completeness. In fact the paper is rather fragmen tary and restricts to those subjects we consider interesting to a mathematical readership. In the final section we point out a few other subjects which are not discussed in this paper but which may also be of interest. For a general account on mathematical morphology we refer to the two books by SERRA [39, 40] and to a monograph by MATHERON [27] which contains a comprehensive dis cussion on random sets and integral geometry. Actually, it is this probabilistic branch which has made morphology into such a powerful methodology, and it is somewhat unfortunate that this aspect has been given so little attention in the recent literature. Furthermore we refer the interested reader to a forthcom ing monograph by the author [15] dealing with various mathematical aspects of morphology. Some other elementary references are [6, 7, 9]. Besides this introduction this paper comprises six sections, all dealing with different topics. In Section 2 we introduce the reader to morphology and discuss a number of classical, binary morphological operators which are invariant under translations. In Section 3 we discuss the extension to the framework of complete lattices. Such an abstract theory also enables the construction of operators which are invariant under other transformation groups than translations. In Section 4 we introduce the reader into the world of morphological filters; these are defined as operators which preserve the partial order structure and which are idempotent. We indicate how one can construct filters by iteration of operators which are not idempotent but do have certain continuity properties. Geometrical aspects of morphology are discussed in Section 5. Despite the patchy contents of that section we hope it gives the reader an intuition for the kind of problems which occur. Then, in Section 6 we discuss some extensions of the binary theory to grey-scale images, and finally in Section 7 we mention some problems which have not been given a place in this paper. 2. WHAT IS MATHEMATICAL MORPHOLOGY? A convenient way to model binary (=black and white) images, both continuous and discrete, is by means of sets. Unless stated otherwise we assume that E =]Rd or 'Jf By P(E) we denote the power set of E. Let X <;;; E be a binary image. The key principle underlying mathematical morphology is to gain geometric information about X by probing it with another small set, called the structuring element, at every position h E E. By 'probing' we mean testing whether the set Ah hits X (that is Ahn X i= 0) misses X (that is, Ahn X = 0), or lies entirely inside X (that is, Ah i; X). Here Ah denotes the translate of A along the vector h, Ah = {a + h I a E A}. The hit-or-miss operator is a mapping on the space of A Geometrical Approach in Image Processing 239 binary images P(E) which is based on this intuitive idea. Let A, B ~ Ebe two structuring elements such that A n B = 0 and define X@ (A, B) = {h EE I Ah~ x and Bh ~ xc}. (2.1) Here xc denotes the complement of X, or, in image processing terminology, the background of the image X. See Figure 1 for an example. It is obvious that A and B must have an empty intersection because otherwise the resulting set would be empty. • ••••••• 0 0000000 •• • •••• 00 OOO eo • • • • • • • eoo coo o • • • • • • • • • • 000000 0000 • ••••••••••• •0000000000 0 •• • ••••••••• eooooooooo 0 0 • ••••••• 00000000 • • •• • 0 • 0 FIGURE 1. Hit-or-miss operator for a discrete image. The struc turing element (left) is such that the operator detects the lower left corner points. The black dots in the right image form the transformed image X@ (A, B) of the original image X (middle). The hit-or-miss operator is an easy example of a set operator (i.e., a mapping 'I/;: P(E) -+ P(E)) which is translation invariant, that is, 'l/;(Xh) = ['1/;(X)]h, forX E P(E) and h EE. (2.2) Moreover, one can show that every translation invariant set operator can be represented as a union of hit-or-miss operators. PROPOSITION 2.1. Let 'I/; : P(E) -+ P(E) be a translation invariant operator. There is a family of pairs of structuring elements {(Ai, Bi) Ii E J} such that 'l/;(X) = LJ X@ (Ai, Bi)· iEI In fact, it is possible to give a characterization of the structuring elements re quired in this representation [l]. If we take B = 0 in (2.1) we obtain the Minkowski difference x 8 A= {h EE I Ah~ X}, which we shall call henceforth the erosion of X by A. Instead of X 8 A we shall also write .: A ( X). Note that X@ (A, B) = (X 8 A) n (Xc 8 B). (2.4) 240 H.J.A.M. Heijmans Erosion is a translation invariant operator which is increasing, that is x c;; Y ===:} x e A c;; Y e A. Instead of (2.3) we can also write XeA= n X-a· (2.5) a EA Another important operator is Minkowski sum given by (2.6) from now on called the dilation of X by A, and denoted as 8A(X). Note that X ffi A = {x + a I x E X, a E A}. Dilation and erosion are depicted in Figure 2. FIGURE 2. From left to right (in grey): the original set X and its dilation and erosion by a disk. Defining the reflection of A with respect to the origin as A= {-a I a EA}, we can also write It is clear that dilation defines an increasing translation invariant operator. After these definitions we could give a long list of properties of erosion and dilation. However, we refrain from doing so and mention only those properties which we think are essential here. If Xi <;; E for all i in some index set I, then (2.7) iE/ iE/ A Geometrical Approach in Image Processing 241 (2.8) iEI iEI In the next section where we discuss morphological operators in the context of complete lattices we meet these properties again. If X,A,B ~Ethen (X EB A) EBB = X EB (A EBB) (2.9) (X 8 A) 8 B = X 8 (A EBB). (2.10) These properties open the way to construct decompositions of erosion and di lation with large structuring elements in terms of erosions and dilations with smaller structuring elements. It is evident that 'clever' decomposition proce dures yield a powerful method for fast implementations of dilations and erosions. For example one has where the •'s represent the points in the structuring element. Note that in the last decomposition one of the 3 x 3-squares is replaced by its extreme points. This reduces the number of operations in expressions like (2.9) and (2.10).