tutorial on advances in morphological image processing and...

11
Invited Paper TUTORIAL ON ADVANCES IN MORPHOLOGICAL IMAGE PROCESSING AND ANALYSIS Petros Maragos Division of Applied Sciences, Harvard University, Cambridge, MA 02138 ABSTRACT - This paper reviews some recent advances in the theory and applications of morphological image anal- ysis. In applications, we show how the morphological filters can be used to provide simple and systematic algorithms for image processing and analysis tasks as diverse as nonlinear image filtering; noise suppression; edge detection; region fill- ing; skeletonization; coding; shape representation, smooth- ing, and recognition. In theory, we summarize the represen- tation of a large class of translation- invariant nonlinear fil- ters (including morphological, median, order -statistics, and shape recognition filters) as a minimal combination of mor- phological erosions or dilations; these results provide new realizations of these filters and lead to a unified image alge- bra. 1 Introduction Digital image processing and analysis in the U.S.A. was de- veloped from the 1960's motivated mainly by problems in remote sensing and scene analysis; its main mathematical tools included classical linear filters, Fourier analysis, and statistical or syntactic pattern recognition. Parallel to and independently from these ideas, mathematical morphol- ogy evolved in Europe from the 1960's as a set -theoretic method for image analysis motivated mainly by problems in quantitative microscopy; its mathematical tools are related to integral geometry and stereology. The theoretical foun- dations of mathematical morphology, its main image opera- tions (which stem from Minkowski set operations [1,2]) and their properties, and a wide range of its applications were in- troduced systematically by Matheron [3] and Serra [4]. The image operations of mathematical morphology, which we call morphological filters, are more suitable for shape analysis than linear filters. Many of the well -established applica- tions of morphological filters are in broad areas including biomedical image processing, metallography, geology, geog- raphy, remote sensing, astronomy, and automated industrial inspection [4,5,6,7,8]. Recently [9,10,11,12,13] mathematical morphology was applied to standard areas of macroscopic image processing and analysis such as nonlinear image filtering; edge detec- tion; noise suppression; shape representation, smoothing, and recognition; skeletonization; coding; and the develop- ment of a theory for a unified image algebra. In this paper we shall briefly review these recent advances. Although, there are many different techniques for solving these prob- 64 / SPIE Vol. 707 Visual Communications and Image Processing (1986) lems (e.g., see [14,15,16] for reviews), our only aim is to show that a variety of tasks in image processing /analysis can be approached or solved using morphological concepts, and that many algorithms can be expressed compactly and systematically in terms of morphological filters. 2 General Concepts In the Appendix we give the definitions of the basic morpho- logical filters for discrete (i.e., sampled) images. These are nonlinear translation -invariant image or signal transforma- tions that locally modify the geometric features of signals such as their peaks and valleys; they involve the interaction, through set operations, of the graph (and its interior) of sig- nals and some compact sets of rather simple shape and size, called the structuring elements. To better understand the similarities and differences between morphological filtering of binary and graytone images, we use the following formal- ism. Binary discrete images are represented by 2 -D sets in the discrete plane Z2, where Z is the set of integers and R is the set of real numbers. Graytone discrete images are represented by 2 -D functions whose domains are subsets of Z' and ranges are subsets of R. Thus, henceforth, set will imply a binary image, whereas function will refer to a gray - tone image. Since morphological filters are defined through set operations, the main concept here is sets. Hence, a 2 -D graytone image function f (x), z E Z2, is also represented by a family of 2 -D sets (binary images). That is, by threshold - ing f at all possible amplitudes t E R we generate a family of 2 -D sets Xt(f) _ {x E Z2 : f (x) > t } , t ER, (1) which are called the cross -sections of f . The sets Xt(f) are decreasing as t increases; i.e., t2 >_ ti Xt2(f)ÇXt1(f). Further, we can reconstruct exactly f if we know all its cross- sections [4,11]. Set union and intersection of the cross - sections of two functions f and g correspond, respectively, to the nonlinear function operations of pointwise maximum and minimum; i.e., Xt(f) U Xt (g) = Xt(f V g) and Xt(f) f1 Xt(g) = Xt(f A g), where (f V g)(z) = max[f(x),g(z)] and (f A g) (z) = min[ f (z), g(z)]. Set inclusion of cross - sections corresponds to an ordering of functions; i.e., Xt (f )Ç Xt (g) Vt E R . . f < g, where "f < g" denotes f(z) g(x) `dx E Z2. An image processing system whose input and output are Invited Paper TUTORIAL ON ADVANCES IN MORPHOLOGICAL IMAGE PROCESSING AND ANALYSIS Petros Maragos Division of Applied Sciences, Harvard University, Cambridge, MA 02138 ABSTRACT - This paper reviews some recent advances in the theory and applications of morphological image anal- ysis. In applications, we show how the morphological filters can be used to provide simple and systematic algorithms for image processing and analysis tasks as diverse as nonlinear image filtering; noise suppression; edge detection; region fill- ing; skeletonization; coding; shape representation, smooth- ing, and recognition. In theory, we summarize the represen- tation of a large class of translation-invariant nonlinear fil- ters (including morphological, median, order-statistics, and shape recognition filters) as a minimal combination of mor- phological erosions or dilations; these results provide new realizations of these filters and lead to a unified image alge- bra. 1 Introduction Digital image processing and analysis in the U.S.A. was de- veloped from the 1960's motivated mainly by problems in remote sensing and scene analysis; its main mathematical tools included classical linear filters, Fourier analysis, and statistical or syntactic pattern recognition. Parallel to and independently from these ideas, mathematical morphol- ogy evolved in Europe from the 1960's as a set-theoretic method for image analysis motivated mainly by problems in quantitative microscopy; its mathematical tools are related to integral geometry and stereology. The theoretical foun- dations of mathematical morphology, its main image opera- tions (which stem from Minkowski set operations [1,2]) and their properties, and a wide range of its applications were in- troduced systematically by Matheron [3] and Serra [4]. The image operations of mathematical morphology, which we call morphological filters, are more suitable for shape analysis than linear filters. Many of the well-established applica- tions of morphological filters are in broad areas including biomedical image processing, metallography, geology, geog- raphy, remote sensing, astronomy, and automated industrial inspection [4,5,6,7,8]. Recently [9,10,11,12,13] mathematical morphology was applied to standard areas of macroscopic image processing and analysis such as nonlinear image filtering; edge detec- tion; noise suppression; shape representation, smoothing, and recognition; skeletonization; coding; and the develop- ment of a theory for a unified image algebra. In this paper we shall briefly review these recent advances. Although, there are many different techniques for solving these prob- lems (e.g., see [14,15,16] for reviews), our only aim is to show that a variety of tasks in image processing/analysis can be approached or solved using morphological concepts, and that many algorithms can be expressed compactly and systematically in terms of morphological filters. 2 General Concepts In the Appendix we give the definitions of the basic morpho- logical filters for discrete (i.e., sampled) images. These are nonlinear translation-invariant image or signal transforma- tions that locally modify the geometric features of signals such as their peaks and valleys; they involve the interaction, through set operations, of the graph (and its interior) of sig- nals and some compact sets of rather simple shape and size, called the structuring elements. To better understand the similarities and differences between morphological filtering of binary and gray tone images, we use the following formal- ism. Binary discrete images are represented by 2-D sets in the discrete plane Z 2 , where Z is the set of integers and R is the set of real numbers. Gray tone discrete images are represented by 2-D functions whose domains are subsets of Z 2 and ranges are subsets of R. Thus, henceforth, set will imply a binary image, whereas function will refer to a gray- tone image. Since morphological filters are defined through set operations, the main concept here is sets. Hence, a 2-D gray tone image function /(a;), x 6 Z 2 , is also represented by a family of 2-D sets (binary images). That is, by threshold- ing f at all possible amplitudes t R we generate a family of 2-D sets Xt (f) = (* e Z 2 : f(x) > t}, te R, (1) which are called the cross-sections of /. The sets X^(f) are decreasing as t increases; i.e., t 2 > ti => X^ 2 (/)CX^(/). Further, we can reconstruct exactly / if we know all its cross-sections [4,11]. Set union and intersection of the cross- sections of two functions / and g correspond, respectively, to the nonlinear function operations of pointwise maximum and minimum; i.e., Xt (f) VXt (g) = Xt (fVg) and Xt (f) n Xt (g) = Xt (fAg), where (/ V g)(x) = max[f(x),g(x)] and (/ A g)(x) = min[f(x),g(x)]. Set inclusion of cross- sections corresponds to an ordering of functions; i.e., Xt (f}CXt (g) V* e R <=» / < g, where «/ < g" denotes f(x) < g(x) Vx Z 2 . An image processing system whose input and output are 64 / SPIE Vol. 707 Visual Communications and Image Processing (1986) DownloadedFrom:http://proceedings.spiedigitallibrary.org/on06/21/2016TermsofUse:http://spiedigitallibrary.org/ss/TermsOfUse.aspx

Upload: others

Post on 12-Mar-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Tutorial On Advances In Morphological Image Processing And Analysiscvsp.cs.ntua.gr/publications/jpubl+bchap/1986_Maragos... · 2016-06-21 · Invited Paper TUTORIAL ON ADVANCES IN

Invited Paper

TUTORIAL ON ADVANCES IN MORPHOLOGICALIMAGE PROCESSING AND ANALYSIS

Petros Maragos

Division of Applied Sciences, Harvard University, Cambridge, MA 02138

ABSTRACT - This paper reviews some recent advancesin the theory and applications of morphological image anal-ysis. In applications, we show how the morphological filterscan be used to provide simple and systematic algorithms forimage processing and analysis tasks as diverse as nonlinearimage filtering; noise suppression; edge detection; region fill-ing; skeletonization; coding; shape representation, smooth-ing, and recognition. In theory, we summarize the represen-tation of a large class of translation- invariant nonlinear fil-ters (including morphological, median, order -statistics, andshape recognition filters) as a minimal combination of mor-phological erosions or dilations; these results provide newrealizations of these filters and lead to a unified image alge-bra.

1 IntroductionDigital image processing and analysis in the U.S.A. was de-veloped from the 1960's motivated mainly by problems inremote sensing and scene analysis; its main mathematicaltools included classical linear filters, Fourier analysis, andstatistical or syntactic pattern recognition. Parallel to andindependently from these ideas, mathematical morphol-ogy evolved in Europe from the 1960's as a set -theoreticmethod for image analysis motivated mainly by problems inquantitative microscopy; its mathematical tools are relatedto integral geometry and stereology. The theoretical foun-dations of mathematical morphology, its main image opera-tions (which stem from Minkowski set operations [1,2]) andtheir properties, and a wide range of its applications were in-troduced systematically by Matheron [3] and Serra [4]. Theimage operations of mathematical morphology, which we callmorphological filters, are more suitable for shape analysisthan linear filters. Many of the well -established applica-tions of morphological filters are in broad areas includingbiomedical image processing, metallography, geology, geog-raphy, remote sensing, astronomy, and automated industrialinspection [4,5,6,7,8].

Recently [9,10,11,12,13] mathematical morphology wasapplied to standard areas of macroscopic image processingand analysis such as nonlinear image filtering; edge detec-tion; noise suppression; shape representation, smoothing,and recognition; skeletonization; coding; and the develop-ment of a theory for a unified image algebra. In this paperwe shall briefly review these recent advances. Although,there are many different techniques for solving these prob-

64 / SPIE Vol. 707 Visual Communications and Image Processing (1986)

lems (e.g., see [14,15,16] for reviews), our only aim is toshow that a variety of tasks in image processing /analysiscan be approached or solved using morphological concepts,and that many algorithms can be expressed compactly andsystematically in terms of morphological filters.

2 General ConceptsIn the Appendix we give the definitions of the basic morpho-logical filters for discrete (i.e., sampled) images. These arenonlinear translation -invariant image or signal transforma-tions that locally modify the geometric features of signalssuch as their peaks and valleys; they involve the interaction,through set operations, of the graph (and its interior) of sig-nals and some compact sets of rather simple shape and size,called the structuring elements. To better understand thesimilarities and differences between morphological filteringof binary and graytone images, we use the following formal-ism.

Binary discrete images are represented by 2 -D sets inthe discrete plane Z2, where Z is the set of integers and Ris the set of real numbers. Graytone discrete images arerepresented by 2 -D functions whose domains are subsets ofZ' and ranges are subsets of R. Thus, henceforth, set willimply a binary image, whereas function will refer to a gray -tone image. Since morphological filters are defined throughset operations, the main concept here is sets. Hence, a 2 -Dgraytone image function f (x), z E Z2, is also represented bya family of 2 -D sets (binary images). That is, by threshold -ing f at all possible amplitudes t E R we generate a familyof 2 -D sets

Xt(f) _ {x E Z2 : f (x) > t } , t ER, (1)

which are called the cross -sections of f . The sets Xt(f) aredecreasing as t increases; i.e., t2 >_ ti Xt2(f)ÇXt1(f).Further, we can reconstruct exactly f if we know all itscross- sections [4,11]. Set union and intersection of the cross -sections of two functions f and g correspond, respectively, tothe nonlinear function operations of pointwise maximumand minimum; i.e., Xt(f) U Xt (g) = Xt(f V g) and Xt(f) f1Xt(g) = Xt(f A g), where (f V g)(z) = max[f(x),g(z)]and (f A g) (z) = min[ f (z), g(z)]. Set inclusion of cross -sections corresponds to an ordering of functions; i.e.,Xt (f )Ç Xt (g) Vt E R . . f < g, where "f < g" denotesf(z) g(x) `dx E Z2.

An image processing system whose input and output are

Invited Paper

TUTORIAL ON ADVANCES IN MORPHOLOGICAL IMAGE PROCESSING AND ANALYSIS

Petros Maragos

Division of Applied Sciences, Harvard University, Cambridge, MA 02138

ABSTRACT - This paper reviews some recent advances in the theory and applications of morphological image anal­ ysis. In applications, we show how the morphological filters can be used to provide simple and systematic algorithms for image processing and analysis tasks as diverse as nonlinear image filtering; noise suppression; edge detection; region fill­ ing; skeletonization; coding; shape representation, smooth­ ing, and recognition. In theory, we summarize the represen­ tation of a large class of translation-invariant nonlinear fil­ ters (including morphological, median, order-statistics, and shape recognition filters) as a minimal combination of mor­ phological erosions or dilations; these results provide new realizations of these filters and lead to a unified image alge­ bra.

1 Introduction

Digital image processing and analysis in the U.S.A. was de­ veloped from the 1960's motivated mainly by problems in remote sensing and scene analysis; its main mathematical tools included classical linear filters, Fourier analysis, and statistical or syntactic pattern recognition. Parallel to and independently from these ideas, mathematical morphol­ ogy evolved in Europe from the 1960's as a set-theoretic method for image analysis motivated mainly by problems in quantitative microscopy; its mathematical tools are related to integral geometry and stereology. The theoretical foun­ dations of mathematical morphology, its main image opera­ tions (which stem from Minkowski set operations [1,2]) and their properties, and a wide range of its applications were in­ troduced systematically by Matheron [3] and Serra [4]. The image operations of mathematical morphology, which we call morphological filters, are more suitable for shape analysis than linear filters. Many of the well-established applica­ tions of morphological filters are in broad areas including biomedical image processing, metallography, geology, geog­ raphy, remote sensing, astronomy, and automated industrial inspection [4,5,6,7,8].

Recently [9,10,11,12,13] mathematical morphology was applied to standard areas of macroscopic image processing and analysis such as nonlinear image filtering; edge detec­ tion; noise suppression; shape representation, smoothing, and recognition; skeletonization; coding; and the develop­ ment of a theory for a unified image algebra. In this paper we shall briefly review these recent advances. Although, there are many different techniques for solving these prob­

lems (e.g., see [14,15,16] for reviews), our only aim is to show that a variety of tasks in image processing/analysis can be approached or solved using morphological concepts, and that many algorithms can be expressed compactly and systematically in terms of morphological filters.

2 General Concepts

In the Appendix we give the definitions of the basic morpho­ logical filters for discrete (i.e., sampled) images. These are nonlinear translation-invariant image or signal transforma­ tions that locally modify the geometric features of signals such as their peaks and valleys; they involve the interaction, through set operations, of the graph (and its interior) of sig­ nals and some compact sets of rather simple shape and size, called the structuring elements. To better understand the similarities and differences between morphological filtering of binary and gray tone images, we use the following formal­ ism.

Binary discrete images are represented by 2-D sets in the discrete plane Z2 , where Z is the set of integers and R is the set of real numbers. Gray tone discrete images are represented by 2-D functions whose domains are subsets of Z2 and ranges are subsets of R. Thus, henceforth, set will imply a binary image, whereas function will refer to a gray- tone image. Since morphological filters are defined through set operations, the main concept here is sets. Hence, a 2-D gray tone image function /(a;), x 6 Z2 , is also represented by a family of 2-D sets (binary images). That is, by threshold­ ing f at all possible amplitudes t R we generate a family of 2-D sets

Xt (f) = (* e Z2 : f(x) > t}, te R, (1)

which are called the cross-sections of /. The sets X^(f) are decreasing as t increases; i.e., t2 > ti => X^2 (/)CX^(/). Further, we can reconstruct exactly / if we know all its cross-sections [4,11]. Set union and intersection of the cross- sections of two functions / and g correspond, respectively, to the nonlinear function operations of pointwise maximum and minimum; i.e., Xt (f) VXt (g) = Xt (fVg) and Xt (f) n Xt (g) = Xt(fAg), where (/ V g)(x) = max[f(x),g(x)]

and (/ A g)(x) = min[f(x),g(x)]. Set inclusion of cross- sections corresponds to an ordering of functions; i.e., Xt (f}CXt (g) V* e R <=» / < g, where «/ < g" denotes f(x) < g(x) Vx Z 2 .

An image processing system whose input and output are

64 / SPIE Vol. 707 Visual Communications and Image Processing (1986)

Downloaded From: http://proceedings.spiedigitallibrary.org/ on 06/21/2016 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx

Page 2: Tutorial On Advances In Morphological Image Processing And Analysiscvsp.cs.ntua.gr/publications/jpubl+bchap/1986_Maragos... · 2016-06-21 · Invited Paper TUTORIAL ON ADVANCES IN

binary images is called a 2 -D set -processing (SP) filter.Likewise, a system that transforms an input graytone to anoutput graytone image is called a 2 -D function -processing(FP) filter. A subclass of FP filters can produce an outputbinary image when the input is also binary; these are called2 -D function- and set -processing (FSP) filters. We alsouse the same definitions for filters processing binary or mul-tilevel signals of any dimensionality. Tables 1,2,3 in the Ap-pendix give the definitions of various nonlinear SP, FP, orFSP filters.

The simplest SP morphological filters are the erosion, di-lation, opening, and closing of a set by a finite structuring set(see Table 1). Figure 1 shows that erosion of a 2 -D set X (bi-nary image of an island) in R2 by a compact set B (a struc-turing disk) shrinks X, whereas dilation expands it. Erosionand dilation are dual filters; i.e., X ®B = (XceB)c. Theopening and closing smooth the contours of X from the in-side and outside, respectively, so that always XBC XÇ XB.Moreover, the opening suppresses the sharp capes and cutsthe narrow isthmuses of the image object X, whereas theclosing fills up its thin gulfs and small holes. Opening andclosing are dual filters, because XB = [(XC)B]c.

Parallel to the evolution of all these morphological fil-ters in [3,4], since the 1960's there have been many otherresearchers who have been using similar operations of theshrink /expand type (or cascades of shrink /expand's) for dig-ital (binary) image processing and for cellular array comput-ers designed for image analysis. (See [17,15] for surveys ofthese approaches.)

The morphological filters have been extended to func-tions too [4,5,6,11,18,19,20]. Table 2 contains the most gen-eral morphological FP filters; these involve the morphologi-cal convolution (max of sums and /or min of differences) ofa function f with a structuring function g that has a finiteregion of support. However, the simplest morphological fil-ters for graytone images, which have also received the mostattention so far, are the FSP filters of Table 3. These FSPfilters are the erosion (local min), dilation (local max), open-ing (local min /max), and closing (local max /min) of a 2 -Dfunction f by a 2 -D finite structuring set A; they result assimple cases of the general FP filters of Table 2 by usinga binary structuring function g whose region of support isequal to A. Figure 2 shows that the erosion of a functionf (x), x E Z, by a finite set BC Z broadens the minima off, whereas dilation broadens the maxima. The opening off by B cuts down the peaks of f, whereas the closing fillsup its valleys, so that always fB < f < 113. Thus the FSPerosion and dilation of a function by a small set can detectthe minima and maxima of the function; the FSP openingand closing can detect the peaks and valleys of the func-tion, or suppress impulsive noise from signals in cases wherethe noise manifests itself as random patterns of positive andnegative noise spikes.

All the FSP filters of Table 3 enjoy an important prop-erty: they commute with thresholding. That is, let 4denote such a FSP filter and let denote its respective SPfilter. Then, we say that commutes with thresholding iff

(1.[Xt(f)1 = Xt[0(f)] , Vt E R, (2)

for all functions f . That is, if 4) is applied to all the cross -sections of f, then its outputs are identical to the cross -sections of the output of 0, where 0 operates on the inputf. In this way, the filtering of a multilevel signal reducesto a stack of filters for binary signals, which are easier toanalyze and implement. For example, if ç(f) = f ®A is theFSP Minkowski function addition with A, its respective SPsystem is 4)(X) = X ®A, i.e., the Minkowski set additionwith A, and we have that [Xt(f)] ®A= Xt(f ®A) 'It E R.

Finally, examples and interpretations of morphologicalfiltering of a function f by a multilevel structuring functiong (i.e., the FP filters of Table 2, which do not commute withthresholding), as well as detailed properties of the basic SPand FP morphological filters can be found in [4,6,11,13,20].

3 Unified Image AlgebraIn [10,11] we introduced a general theory to unify manyconcepts encountered in signal processing and image analysisand to represent a broad class of nonlinear and linear SPand FP filters as a minimal combination of morphologicalerosions or dilations. This theory applies to filters processingsignals of any dimensionality and of both continuous anddiscrete argument or amplitude. However, in this paper wesummarize (in a simplified way) the main results of thistheory only for discrete images.

Consider any 2 -D SP filter W that is defined on the classP(Z2) of all subsets of Z2. The filter is called translation -invariant (TI) iff W(Xp) _ [W(X)]p, VXÇ Z2, tip E Z2.IF is called increasing iff AC B P(A)C W(B), for anyA, BC Z2. An increasing SP filter is upper semicontin-uous (u.s.c.) iff, for any decreasing sequence (Xn,) of in-put sets (i.e., Xn + 1Ç Xn), nn W(Xn) _ W (fn Xn). Thedual (with respect to set complementation) filter of W isdefined as W *(X) = [AY(Xc)]c, XC_ Z2. Any TI filter 'Y isuniquely characterized by its kernel that is defined in [3] asthe (infinite) subclass K(OP) = {XC Z2 : 0 E W(X)} of inputsets. The pair (K(W), Ç ) is a partially ordered set (poset)with respect to set inclusion C . A minimal element of(K (W), Ç) is any set G E KR) that is not preceded (withrespect to C_ ) by any other kernel set. In [10,11] we definedthe basis BR) of the TI filter W as the set of all its minimalkernel elements, and we showed that the basis exists (i.e., isnonempty) if W is increasing and u.s.c. The importance ofthe basis is revealed by the following theorem.

THEOREM 1. [10,11] (SP Filters). Let W : P(Z2) -4P(Z2) be a 2 -D discrete SP filter that is TI, increasing, andu.s.c. Then can be represented exactly as the union oferosions by its basis sets. Further, if its dual filter le* isu.s.c., Ili can be also represented exactly as the intersectionof dilations by the basis sets of l*. That is, VXC Z2,

W(X) = U X-G8 = n X ®H8 (3)G E B (W) H E B0111

We extended in [10,11] the kernel and basis representa-tion to FP filters in the following way. Let tb be a 2-D FPfilter defined on the class Y of all real -valued functions whose

SPIE Vol. 707 Visual Communications and Image Processing (1986) / 65

binary images is called a 2-D set-processing (SP) filter. Likewise, a system that transforms an input gray tone to an output graytone image is called a 2-D function-processing (FP) filter. A subclass of FP filters can produce an output binary image when the input is also binary; these are called 2-D function- and set-processing (FSP) filters. We also use the same definitions for filters processing binary or mul­ tilevel signals of any dimensionality. Tables 1,2,3 in the Ap­ pendix give the definitions of various nonlinear SP, FP, or FSP filters.

The simplest SP morphological filters are the erosion, di­ lation, opening, and closing of a set by a finite structuring set (see Table 1). Figure 1 shows that erosion of a 2-D set X (bi­ nary image of an island) in R2 by a compact set B (a struc­ turing disk) shrinks X, whereas dilation expands it. Erosion and dilation are dual filters; i.e., X®B = (XceB)c . The opening and closing smooth the contours of X from the in­ side and outside, respectively, so that always XgC XC. X . Moreover, the opening suppresses the sharp capes and cuts the narrow isthmuses of the image object X, whereas the closing fills up its thin gulfs and small holes. Opening and closing are dual filters, because X = [(Xc)g]c .

Parallel to the evolution of all these morphological fil­ ters in [3,4], since the 1960's there have been many other researchers who have been using similar operations of the shrink/expand type (or cascades of shrink/expand's) for dig­ ital (binary) image processing and for cellular array comput­ ers designed for image analysis. (See [17,15] for surveys of these approaches.)

The morphological filters have been extended to func­ tions too [4,5,6,11,18,19,20]. Table 2 contains the most gen­ eral morphological FP filters; these involve the morphologi­ cal convolution (max of sums and/or min of differences) of a function / with a structuring function g that has a finite region of support. However, the simplest morphological fil­ ters for graytone images, which have also received the most attention so far, are the FSP filters of Table 3. These FSP filters are the erosion (local min), dilation (local max), open­ ing (local min/max), and closing (local max/min) of a 2-D function / by a 2-D finite structuring set A\ they result as simple cases of the general FP filters of Table 2 by using a binary structuring function g whose region of support is equal to A. Figure 2 shows that the erosion of a function /(x), x G Z, by a finite set BC Z broadens the minima of /, whereas dilation broadens the maxima. The opening of f by B cuts down the peaks of /, whereas the closing fills up its valleys, so that always fB <f< fB . Thus the FSP erosion and dilation of a function by a small set can detect the minima and maxima of the function; the FSP opening and closing can detect the peaks and valleys of the func­ tion, or suppress impulsive noise from signals in cases where the noise manifests itself as random patterns of positive and negative noise spikes.

All the FSP filters of Table 3 enjoy an important prop­ erty: they commute with thresholding. That is, let </> denote such a FSP filter and let $ denote its respective SP filter. Then, we say that <t> commutes with thresholding iff

*[xt (fl] = xt (*(f)] , vt e R, (2)

for all functions /. That is, if $ is applied to all the cross- sections of /, then its outputs are identical to the cross- sections of the output of ^, where <t> operates on the input /. In this way, the filtering of a multilevel signal reduces to a stack of filters for binary signals, which are easier to analyze and implement. For example, if <f>(f) = /(B-A is the FSP Minkowski function addition with A, its respective SP system is $(X) = X0A, i.e., the Minkowski set addition with A, and we have that [X$(/)]0A = Xt (f@A) Vt 6 R.

Finally, examples and interpretations of morphological filtering of a function / by a multilevel structuring function g (i.e., the FP filters of Table 2, which do not commute with thresholding), as well as detailed properties of the basic SP and FP morphological filters can be found in [4,6,11,13,20].

3 Unified Image Algebra

In [10,11] we introduced a general theory to unify many concepts encountered in signal processing and image analysis and to represent a broad class of nonlinear and linear SP and FP filters as a minimal combination of morphological erosions or dilations. This theory applies to filters processing signals of any dimensionality and of both continuous and discrete argument or amplitude. However, in this paper we summarize (in a simplified way) the main results of this theory only for discrete images.

Consider any 2-D SP filter ^ that is defined on the class P(Z2 ) of all subsets of Z2 . The filter is called translation- invariant (TI) iff tfpfp) = [*(X)]p, VXCZ2 , Vp 6 Z2 . ^ is called increasing iff AC B =» #(A)C V(B), for any A,BC. Z2 . An increasing SP filter ^ is upper semicontin- uous (u.s.c.) iff, for any decreasing sequence (Xn) of in- put sets (i.e., Xn + iCXn), rin*(*n) = *(fln*n). The dual (with respect to set complementation) filter of ^ is defined as **(X) = [V(XC )} C , XCZ2 . Any TI filter * is uniquely characterized by its kernel that is defined in [3] as the (infinite) subclass K(V) = {XC Z2 : 0 <E *(X)} of inPut sets. The pair (K(W),C) is a partially ordered set (poset) with respect to set inclusion C. A minimal element of (K(#),C) is any set G e K(V) that is not preceded (with respect to C) by any other kernel set. In [10,11] we defined the basis B (V) of the TI filter tf as the set of all its minimal kernel elements, and we showed that the basis exists (i.e., is nonempty) if ^ is increasing and u.s.c. The importance of the basis is revealed by the following theorem.

THEOREM 1. [10,11] (SP Filters). Let # : P(Z2 ) -> P(Z 2 ) be a 2-D discrete SP filter that is TI, increasing, and u.s.c. Then V can be represented exactly as the union of erosions by its basis sets. Further, if its dual filter #* is u.s.c., *& can be also represented exactly as the intersection of dilations by the basis sets of V*. That is, VXC Z2 ,

= U p| X<&Ha (3)

We extended in [10,11] the kernel and basis representa­ tion to FP filters in the following way. Let ^ be a 2-D FP filter defined on the class / of all real-valued functions whose

SPIE Vol. 707 Visual Communications and I mage Processing (1986) / 65

Downloaded From: http://proceedings.spiedigitallibrary.org/ on 06/21/2016 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx

Page 3: Tutorial On Advances In Morphological Image Processing And Analysiscvsp.cs.ntua.gr/publications/jpubl+bchap/1986_Maragos... · 2016-06-21 · Invited Paper TUTORIAL ON ADVANCES IN

domains are subsets of Z2. Then t, is called translation -invariant (TI) iff t,b[f(x - y) + e] = [W(f)](x - y) + c,Vf(x) E F, Vy E Z2, Vc E R. That is, z(' is TI iff it com-mutes with a shift of both the argument and the amplitudeof its input functions. Such a TI filter is uniquely character-ized by its kernel that we defined as the (infinite) subclassK (0) = { f E F : [W (f MO) >_ 0} of input functions. Thepair (K(0), <) is a poset with respect to the function or-dering <. A minimal function -element in (K(0),<) is afunction g E K(0) that is not preceded (with respect tofunction <) by any other kernel function. We defined thebasis B (W) of 0 as the set of its minimal kernel functions.A FP filter t/' is increasing iff f < g 'W(f). < W(g),for any f,g E F. An increasing FP filter t& is u.s.c. iff,

for each decreasing sequence (fn) of input functions (i.e.,In +1 <_ fn) with f (x) = infn{ fn(x)} Vx, we have that[0(f)](x) = infn {[tk(fn)](x) }. The basis of any TI, increas-ing, u.s.c. FP filter exists and can exactly represent it, asexplained below.

THEOREM 2. [10,11] (a) -(Any FP filter). Let t,b :

F -4 3 be a 2 -D discrete FP filter that is TI, increas-ing, and u.s.c. Then W can be represented exactly as thepointwise supremum of erosions by its basis functions; i.e.,Vf E F, dx E Z2,

[ &(f)](x) = sup {(fegs)(x)} (4)g E B (W)

(b) -(FSP filters). Let 0 : F -* I be a FSP 2 -D discreteTI filter and let 11) be its respective SP filter. If 0 commuteswith thresholding and the dual SP filter 0* is u.s.c., then 0can be represented exactly as the supremum of erosions bythe basis sets of 4i and also as the infimum of dilations bythe basis sets of (I)*; i.e.,

0(f)(x) =G E

sup{f

eG5(x)} =Ei8(

{f ®H8(x)}

(5)Note that in Theorem 2b we omitted the assumptions

about 0 and ' being increasing and u.s.c. The reason is thatthe assumption about 0 being a TI FSP filter commutingwith thresholding is sufficient to show that is TI and thatboth , and 4i are increasing and u.s.c.; hence (1)* is also TIand increasing.

In the next section we will apply the general Theorems 1,2to some special cases of nonlinear filters for discrete images.

4 Morphological, Median, and OSFilters

Median and, their generalization, order -statistics (OS) fil-ters are nonlinear TI filters that have recently become pop-ular for smoothing and enhancement of image and speechsignals. (See [14,211 for reviews.) Let WC Z2 be a finite setwith n points; i.e., I W n. As defined in Table 3, fork = 1, 2, ... , n, the output of the FSP k -th OS filter by Wat any location x E Z2 is obtained by sorting at descendingorder the n values of the input function f inside the shifted

66 / SPIE Vol 707 Visual Communications and Image Processing (1986)

window Wx and picking the k -th number from the sortedlist. If n is odd and k = (n + 1)/2 we have the special caseof the median filter med (f ; W) of f by W. The respec-tive OS and median SP filters are defined in Table 1; theirdefinition involves only counting of points and no sorting.

The theoretical analysis of these useful filters becomesintractable beyond a small number of quantitative results,because all the well -known tools from the theory of linearfilters do not apply here since these filters are nonlinearand have a nonzero memory. However, by using math-ematical morphology and the theory of minimal elements(section 3), we developed in [10,11] a framework that facili-tates the theoretical analysis of these filters, related themto morphological filters, and provided some new realiza-tions for them. Specifically, from their definitions it is clearthat the FSP or SP first (k = 1) OS filter by W is iden-tical to the FSP or SP dilation by W; likewise, the last(k = n) OS filter is identical to the erosion by W. Fur-ther, OS and median filters commute with thresholding; e.g.,Xt[med(f;W)] = med[Xt(f);W], Vt E R. The FSP mor-phological filters of Table 3 commute also with thresholding.This property allows us to study all the FSP filters of Ta-ble 3 for graytone images by focusing on their respective SPfilters of Table 1 for binary images; further, the SP filtersare easier to analyze and implement. From these generalconcepts we showed in [10,11] that

(A) All FSP filters of Table 3 and their respective SP fil-ters of Table 1 are TI, increasing, and u.s.c. Hence their ba-sis exists and exactly represents them through Theorems 1,2.

(B) Let AC Z2 be finite with I A I= m. The basis ofthe SP erosion by A has one element, the set A. The basisof the SP dilation by A has m elements, the one -point sets{a} with a E A. The basis of the SP opening by A has melements, the sets A_a with a E A. The basis of the SPclosing by A is the set of all minimal subsets M of AGMssuch that 0 E MA.

(C) The basis of the SP k -th OS filter by WC Z2 (I W I=n) is the set of all subsets G of W with I GI= k. If n is odd,the basis of the SP median by W is the set of all subsets Mof W with I M I= (n + 1)/2. The dual filter of the SP k -thOS by W is the (n -k + 1) -th OS filter by W. Thus, fromTheorem 2b, OS k (f ; W) is equal to the maximum of thelocal minima of f inside all GC W with I G I= k and alsoequal to the minimum of the local maxima of f inside allHC W with I H I= n -k +1. For the median med(f;W) weobtain the same representation with the only difference thatthe subsets G and H are identical because k = (n + 1)/2.

(D) Let AC Z be convex with I A I= n + 1, n > 1,and let WC Z be convex and symmetric (W = W8) withW I= 2n + 1. Then, for any 1 -D function f (x), x E Z,

(i) Openings and closings by A are lower and upper boundsof medians by W; i.e., fA < med(f;W) < fA.

(ii) A finite extent signal f is a fixed point (root) of themedian by W iff it is a root of the opening and closingby A; i.e., f = IA= fA f = med(f;W).

(iii) Let medl°°l (f ; W) denote the median root obtained

domains are subsets of Z 2 . Then ^ is called translation- invariant (TI) iff 0[/(x - y) + c] = ty>(/)](x - y) + c, V/(x) G J, Vy G Z 2 , Vc G R. That is, V> is TI iff it com­ mutes with a shift of both the argument and the amplitude of its input functions. Such a TI filter is uniquely character­ ized by its kernel that we defined as the (infinite) subclass K($) = {f G 7 : [V>(/)](0) > °> of inPut functions. The pair (K(0)><) is a poset with respect to the function or­ dering <. A minimal function-element in (K(^>),<) is a function g G K(V? ) that is not preceded (with respect to function <) by any other kernel function. We defined the basis B (ip) of ^ as the set of its minimal kernel functions. A FP filter ^ is increasing iff / < g => ^(/) < $(g), for any f,g G 7. An increasing FP filter if> is u.s.c. iff, for each decreasing sequence (fn) of input functions (i.e., /n .f 1 < fn) with f(x) = mfn{fn(x)} Vx, we have that [^(/)](x) = infn{[^(/n)](z)}. The basis of any TI, increas­ ing, u.s.c. FP filter exists and can exactly represent it, as explained below.

THEOREM 2. [10,11] (a)-(Any FP filter). Let $ : ? -* 7 be a 2-D discrete FP filter that is TI, increas- ing, and u.s.c. Then ^ can be represented exactly as the pointwise supremum of erosions by its basis functions; i.e., V/ G 7, Vx G Z2 ,

= sup {(/0/)(x)} (4)

(b)-(FSP filters). Let </> : 7 -> 7 be a FSP 2-D discrete T I filter and let $ be its respective SP filter. If <t> commutes with thresholding and the dual SP filter $* is u.s.c., then <f> can be represented exactly as the supremum of erosions by the basis sets of $ and also as the infimum of dilations by the basis sets of $*; i.e.,

*(/)(*)= sup {feGs (x)}= inf {f®Hs (x)}GeS($) He8($*)

(5)Note that in Theorem 2b we omitted the assumptions

about (j> and $ being increasing and u.s.c. The reason is that the assumption about </> being a TI FSP filter commuting with thresholding is sufficient to show that $ is TI and that both </> and $ are increasing and u.s.c.; hence $* is also TI and increasing.

In the next section we will apply the general Theorems 1,2 to some special cases of nonlinear filters for discrete images.

4 Morphological, Median, and OS Filters

Median and, their generalization, order-statistics (OS) fil­ ters are nonlinear TI filters that have recently become pop­ ular for smoothing and enhancement of image and speech signals. (See [14,21] for reviews.) Let WC Z2 be a finite set with n points; i.e., | W |= n. As defined in Table 3, for k = 1,2, ... ,n, the output of the FSP fc-th OS filter by W at any location x G Z2 is obtained by sorting at descending order the n values of the input function / inside the shifted

window Wx and picking the fc-th number from the sorted list. If n is odd and k = (n + l)/2 we have the special case of the median filter med(f\W) of f by W. The respec­ tive OS and median SP filters are defined in Table 1; their definition involves only counting of points and no sorting.

The theoretical analysis of these useful filters becomes intractable beyond a small number of quantitative results, because all the well-known tools from the theory of linear filters do not apply here since these filters are nonlinear and have a nonzero memory. However, by using math­ ematical morphology and the theory of minimal elements (section 3), we developed in [10,11] a framework that facili­ tates the theoretical analysis of these filters, related them to morphological filters, and provided some new realiza­ tions for them. Specifically, from their definitions it is clear that the FSP or SP first (k = 1) OS filter by W is iden­ tical to the FSP or SP dilation by W] likewise, the last (k = n) OS filter is identical to the erosion by W. Fur­ ther, OS and median filters commute with thresholding; e.g., Xt [med(f]W)] = mcd[Xt (f)',W], Vt G R. The FSP mor­ phological filters of Table 3 commute also with thresholding. This property allows us to study all the FSP filters of Ta­ ble 3 for graytone images by focusing on their respective SP filters of Table 1 for binary images; further, the SP filters are easier to analyze and implement. From these general concepts we showed in [10,11] that

(A) All FSP filters of Table 3 and their respective SP fil­ ters of Table 1 are TI, increasing, and u.s.c. Hence their ba­ sis exists and exactly represents them through Theorems 1,2.

(B) Let AC, Z2 be finite with | A \= m. The basis of the SP erosion by A has one element, the set A. The basis of the SP dilation by A has m elements, the one-point sets {a} with a G A. The basis of the SP opening by A has m elements, the sets A a with a G A. The basis of the SP closing by A is the set of all minimal subsets M of A®AS such that 0 G MA .

(C) The basis of the SP Ar-th OS filter by WC Z2 (| W |= n) is the set of all subsets G of W with | G \= k. If n is odd, the basis of the SP median by W is the set of all subsets M of W with | M |= (n + l)/2. The dual filter of the SP Jk-th OS by W is the (n - k + l)-th OS filter by W. Thus, from Theorem 2b, OS'c (f]W) is equal to the maximum of the local minima of / inside all GC W with | G \= k and also equal to the minimum of the local maxima of / inside all HC W with \H\=n-k + I. For the median med(f\ W) we obtain the same representation with the only difference that the subsets G and H are identical because k = (n + l)/2.

(D) Let AC Z be convex with | A |= n + 1, n > 1, and let WCZ be convex and symmetric (W = Ws) with | W \= 2n + 1. Then, for any 1-D function /(x), x G Z,

(i) Openings and closings by A are lower and upper bounds of medians by W] i.e., fA < med(f; W) < fA .

(ii) A finite extent signal / is a fixed point (root) of the median by W iff it is a root of the opening and closing by A; i.e., f = fA = f

(iii) Let med^(fjW) denote the median root obtained

66 / SPIE Vol. 707 Visual Communications and Image Processing (1986)

Downloaded From: http://proceedings.spiedigitallibrary.org/ on 06/21/2016 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx

Page 4: Tutorial On Advances In Morphological Image Processing And Analysiscvsp.cs.ntua.gr/publications/jpubl+bchap/1986_Maragos... · 2016-06-21 · Invited Paper TUTORIAL ON ADVANCES IN

by iterating (a finite number of times) the medianfilter by W on a finite extent 1 -D signal f . Thenthe open -closing (opening followed by closing by thesame set) (fA)A and the clos- opening (closing fol-lowed by opening) (fA)A are median roots with re-spect to W and they bound med(°°) (f ; W) since

IA < (fA)A < med(°°)(f;W) < (fA)A < fA

(iv) Similar results as in (i,ii) were obtained for 2 -D open -ing /closing and median filters.

Next we illustrate some of the results in (A),(B),(C),(D)through the following simple example. Let A = {0, 11 andW = {- 1,0,1 }. Consider the SP opening 4?(X) = XA,XC_ Z; its dual SP filter is the closing (1,* (X) = XA. Thenthe basis of 4i has two minimal elements, the sets {0,1}and { -1,0 }. The basis of 4?* has two elements, the sets{0} and {-1, 1}. Thus, from Theorem 2b, the FSP opening(f) = fA is a maximum of erosions by the basis sets of <1.and a minimum of dilations by the basis sets of 40*; i.e.,

fA(x) = max {min[ f (x - 1), f (x)] , min[ f (x), f (x + 1)]}= min{ f (x) , max[ f (x - 1), f (x + 1)]} (6)

for any function 1(x), x E Z. Since opening and closingare dual filters, if we interchange max and min everywherein (6) we obtain a formula for the closing fA. The basis ofthe SP median by W has three elements, the sets { -1,0 },{ -1,1} and {0,1 }. Thus, from Theorem 2b,

min[f (x - 1), f(x)1med[ f (x- 1),1(x), f (x +1)] = max min[ f (x - 1), f (x + 1)]

min[ f (x), f (x + 1)](7)

Because the SP median is equal to its dual filter, we caninterchange min and max in (7). From (6) and (7) it followsthat fA < med(f;W) < fA, in agreement with result (D -i).

Figure 3 compares the nonlinear smoothing results of 1-D open -closings, clos- openings, and iterated medians. Fig-ure 3a shows an original 1 -D function (an image intensityprofile) containing many narrow peaks and valleys; Figs. 3b,cshow the open -closing and clos- opening of f by a 3- pointsset L; Fig. 3d shows the median root g obtained by iterat-ing four times a median filter by a 5- points window B. Theopen -closing (and clos- opening) by L is a median root withrespect to B, smooths the signal very similarly to the me-dian root g, lies close to g, and is computationally much lesscomplex [11] than iterating the median by B.

5 Edge Detection [4,5,11,12]Let B be one of the unit -size structuring elements of Fig. 4.Then

nB = B ®B ®... eB (n times)denotes an element of size n, where n is any nonnegativeinteger. If B is convex, then nB has the same shape as B;if n = 0, then nB is just the one -point set {0 }. If B is 2 -D

symmetric, then the set difference X - (XenB) gives theboundary of a binary image X, and the algebraic differencef - (f enB) enhances the edges of a graytone image f, asFig. 5 shows. The size n of nB controls the thickness ofthe edge -markers. Edges in different orientations can be ob-tained by using a 1 -D structuring set B properly oriented.A more symmetric treatment between the image and itsbackground would be the edge- estimator (f enB)-(f enB),which approximates the gradient of f [4].

6 Noise SuppressionFigure 6a shows a graytone image f corrupted by salt -and-pepper noise. Figure 6b shows the opening fB (B =borneof Fig. 4), which cuts down the positive noise spikes. Thenegative noise spikes are cleaned (filled up) by the open -closing (fB)B, as shown in Fig. 6c. The cleaning effects ofthe open -closing are comparable to the median filtering (seeFig. 6d) of f by the window W= square of Fig. 4. However,the open -closing by B is computationally less complex thanthe median by W and can decompose the noise suppressioninto two separate tasks: cleaning of the positive or negativespikes (see also Fig. 2). Related approaches to image clean-ing from impulsive noise can be found in [4,5,6,15,17,18,19].

7 Region FillingWe present here a compact algorithm [11,12] for region fill-ing that requires only set dilations, complementation, andintersections. Figure 7a shows the boundaries of two dis-joint regions, whose union represents a binary image X. Theproblem is to fill in (paint) the interior of the left region (callit set F) if we know a point p inside it. Figure 7b shows thecomplement of X. Let B D {0} be a symmetric structuringelement whose half diameter does not exceed the width ofthe boundary. If Y0 = {p} and

Yi =(Yi -1 B)nXc, i= 1,2,3,...,then the filled interior is given in general by F = Y°°. Thus,the dilation tends to fill the whole area, whereas the inter-section with Xc limits the result inside the left region. Ofcourse, practically we need only a finite number of iterationsto find F, since the condition Yi + 1 = Yi signals that theregion F has been fully painted. Figure 7d shows the fullypainted left region after only eighteen iterations of the abovealgorithm. (Fig. 7c shows the intermediate result after the8 -th iteration.)

8 Skeletonization, Shape Smooth-ing, Coding

The skeleton (or medial axis) of a finite discrete binary im-age X has been extensively studied and used for image anal-ysis. (See [22,15,16] for reviews.) In [4,23,11,13] and indi-rectly in [24] it was shown that the skeleton can be obtainedby erosions and openings. Specifically, if B is any discrete

SPIE VoL 707 Visual Communications and Image Processing (1986) / 67

by iterating (a finite number of times) the median filter by W on a finite extent 1-D signal /. Then the open-closing (opening followed by closing by the same set) (/A) and the clos-opening (closing fol­

lowed by opening) (/ )^ are median roots with re­ spect to W and they bound med^(f\ W) since

/A < < (fA ) A < f

(iv) Similar results as in (i,ii) were obtained for 2-D open­ ing/closing and median filters.

Next we illustrate some of the results in (A),(B),(C),(D) through the following simple example. Let A = {0, 1} and W = {-1,0,1}. Consider the SP opening $(X) = XA , XC Z; its dual SP filter is the closing $*(X) = XA . Then the basis of $ has two minimal elements, the sets {0, 1} and { 1,0}. The basis of $* has two elements, the sets {0} and {-1, 1}. Thus, from Theorem 2b, the FSP opening (f>(f) = /^ is a maximum of erosions by the* basis sets of $ and a minimum of dilations by the basis sets of $*; i.e.,

fA (x) = max{min[/(x - 1), /(«)

= min{/(x) , max[/(x -

(x), f(x + 1)]}

1)]} (6)

for any function /(z), x £ Z. Since opening and closing are dual filters, if we interchange max and min everywhere in (6) we obtain a formula for the closing / . The basis of the SP median by W has three elements, the sets { 1,0}, {-1, 1} and {0, 1}. Thus, from Theorem 2b,

fmin[/(* -!),/(*)] ] med[f(x-l), /(x), /(*+!)] = max { min[/(x - 1), f(x + 1)]

I min[/(*), /(* + !)] J (7)

Because the SP median is equal to its dual filter, we can interchange min and max in (7). From (6) and (7) it follows that /A < med(f\W) < / , in agreement with result (D-i).

Figure 3 compares the nonlinear smoothing results of 1- D open-closings, clos-openings, and iterated medians. Fig­ ure 3a shows an original 1-D function (an image intensity profile) containing many narrow peaks and valleys; Figs. 3b,c show the open-closing and clos-opening of / by a 3-points set L\ Fig. 3d shows the median root g obtained by iterat­ ing four times a median filter by a 5-points window B. The open-closing (and clos-opening) by L is a median root with respect to B, smooths the signal very similarly to the me­ dian root g, lies close to g, and is computationally much less complex [11] than iterating the median by B.

5 Edge Detection [4,5,11,12]

Let B be one of the unit-size structuring elements of Fig. 4. Then

nB = B@B@ . . . ® B (n times)

denotes an element of size n, where n is any nonnegative integer. If B is convex, then nB has the same shape as B\ if n = 0, then nB is just the one-point set {0}. If B is 2-D

symmetric, then the set difference X — (XQnB) gives the boundary of a binary image X, and the algebraic difference / ~ (fQnB) enhances the edges of a graytone image /, as Fig. 5 shows. The size n of nB controls the thickness of the edge-markers. Edges in different orientations can be ob­ tained by using a 1-D structuring set B properly oriented. A more symmetric treatment between the image and its background would be the edge-estimator (f®nB) — (fQnB), which approximates the gradient of / [4].

6 Noise Suppression

Figure 6a shows a graytone image / corrupted by salt-and- pepper noise. Figure 6b shows the opening fp (B—boxne of Fig. 4), which cuts down the positive noise spikes. The negative noise spikes are cleaned (filled up) by the open- closing (/#) , as shown in Fig. 6c. The cleaning effects of the open-closing are comparable to the median filtering (see Fig. 6d) of / by the window W= square of Fig. 4. However, the open-closing by B is computationally less complex than the median by W and can decompose the noise suppression into two separate tasks: cleaning of the positive or negative spikes (see also Fig. 2). Related approaches to image clean­ ing from impulsive noise can be found in [4,5,6,15,17,18,19],

7 Region Filling

We present here a compact algorithm [11,12] for region fill­ ing that requires only set dilations, complementation, and intersections. Figure 7a shows the boundaries of two dis­ joint regions, whose union represents a binary image X. The problem is to fill in (paint) the interior of the left region (call it set F) if we know a point p inside it. Figure 7b shows the complement of X. Let IO{0} be a symmetric structuring element whose half diameter does not exceed the width of the boundary. If Y° = {p} and

V* I — * — 1 9t 1, Z,

then the filled interior is given in general by F — Y°°. Thus, the dilation tends to fill the whole area, whereas the inter­ section with Xc limits the result inside the left region. Of course, practically we need only a finite number of iterations to find F, since the condition y* + * = y* signals that the region F has been fully painted. Figure 7d shows the fully painted left region after only eighteen iterations of the above algorithm. (Fig. 7c shows the intermediate result after the 8-th iteration.)

8 Skeletonization, Shape Smooth­ ing, Coding

The skeleton (or medial axis) of a finite discrete binary im­ age X has been extensively studied and used for image anal­ ysis. (See [22,15,16] for reviews.) In [4,23,11,13] and indi­ rectly in [24] it was shown that the skeleton can be obtained by erosions and openings. Specifically, if B is any discrete

SPIE Vol. 707 Visual Communications and Image Processing (1986) / 67

Downloaded From: http://proceedings.spiedigitallibrary.org/ on 06/21/2016 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx

Page 5: Tutorial On Advances In Morphological Image Processing And Analysiscvsp.cs.ntua.gr/publications/jpubl+bchap/1986_Maragos... · 2016-06-21 · Invited Paper TUTORIAL ON ADVANCES IN

structuring element with 0 E B, then the morhologicalskeleton, SK(X), of X (with respect to B) is the finiteunion of disjoint skeleton subsets Sn(X); i.e.,

SK(X) =. U Sn(X) (8)0 < n < N

whereSn(X) = (XenBs) - (XenBs)B (9)

and n = 0,1, 2, ... , N = max {k : XekBs 0 }. The im-age X can be reconstructed as the union of all the skeletonsubsets dilated by an element of proper size; i.e.,

X = U [Sn(X)enB] . (10)0 < n < N

If the first k lower- indexed skeleton subsets are omitted in(10), then we reconstruct the opening of X by kB; i.e.,

XkB = (XekBs)ekB = U [Sn(X)enB] . (11)k<n<N

If B is convex, these openings XkB represent smoothed ver-sions of X, where the degree of smoothness depends onlyon the size k of kB; i.e., the larger the size k, the smootherthe opening XkB. Because X can be reconstructed eitherexactly from all Sn(X) using (10) or partially (smoothedversions) using (11), we can view the skeleton subsets as"shape components ". That is, skeleton subsets of small in-dices n are associated with the lack of smoothness of theboundary of X, whereas skeleton subsets of large indices nare related to the bulky interior parts of X that are shapedsimilarly to nB. Thus (10) and (11) imply that an arbi-trary shape X is smooth to a degree k with respect to afixed shape B (i.e., X = XkB) if the first k shape compo-nents of X (i.e., first k Sn(X)) are empty. The converse,i. e., X= XkB =Sn(X)= Ofor0<n<k- listrueifboth X and B are convex [13].

Symmetric (disk -like) structuring elements produce a skele-ton that looks like a "symmetry axis ". At the expense ofloosing this property, we can use the above morphologicalskeletal decomposition and reconstruction algorithms withan asymmetric, or even a 1 -D, element. Figure 8 illustratesthe variety of skeletons that result from varying the struc-turing element. It also shows the ability of morphologicalfilters to extract different structural information by usingdifferent structuring elements. One application for asym-metric or 1 -D structuring elements for skeletonization wasdescribed in [11,13], where we searched for the element giv-ing the skeleton with fewest points, and hence lowest infor-mation rate required to encode the image.

All the skeletons of Fig. 8 can reconstruct X and retainsome of the axial character of a skeleton. However, they maybe redundant. Thus, at the expense of producing a skeletonthat may not look like a skeletal axis, we defined the min-imal skeleton to be a proper subset of the original skele-ton whose points are sufficient for exact reconstruction, butremoval of just one point would result in partial reconstruc-tion. In [11,13] we provided a fast algorithm that finds sucha minimal skeleton, if it exists. Figure 9 shows two originalbinary images of different spatial resolution together with

68 / SPIE Vol. 707 Visual Communications and Image Processing (1986)

their original and minimal skeletons.In [11,13] we showed that encoding of the minimal skele-

ton information using Elias codes results in higher com-pression than either optimum block -Huffman or optimumrunlength- Huffman coding of the original image. Figure 10shows an application of simultaneous skeleton coding andmorphological smoothing of a binary image X. By elimi-nating the first skeleton subset S0(X) and encoding the restskeleton subsets (thus reconstructing the opening XB) theoriginal information of 65.5Kbits in X and XB was com-pressed down to 5.7Kbits; i.e., a compression ratio of 11.4:1.Further decimation of X by keeping one out of every 4 x 4pixels and skeleton- encoding of the decimated image com-presses the information down to 1.2Kbits; i.e., a compressionratio of 53:1. In addition, morphological post- filtering cansmooth the jagged contours of the interpolated image.

Finally, the morphological skeletonization has been ex-tended to multilevel signals (e.g., graytone images) in [25]and in [11].

9 Shape RecognitionMinimal Skeletons. The minimal skeleton was also usedfor minimal shape representation and recognition of blob -shaped images in [11]. That is, consider the problem: "Givena fixed convex shape B, find a minimum number of maxi-mal scaled and shifted versions, (nB)z, of B (i.e., find theirlocations z and sizes n) that fit inside an image object Xand whose union exactly represents X." Since the morpho-logical skeletonization of X by B gives all the locations andsizes of maximal elements (nB)z whose union reconstructsX, the minimal skeleton gives, by definition, an exact so-lution to the above problem. Figure lla shows a discretebinary image X that was formed as the union of three ele-ments nB (B= circle of Fig. 4), two of size n = 1 and one ofsize n = 2; its original skeleton with respect to B has eightpoints. Its minimal skeleton (in Fig. 11b) contains only thethree centers, recognizing thus the existence, location, andsize of the three overlapping blobs. Thus both skeletons canreconstruct X exactly, but the the minimal skeleton displaysclearly that the composite shape X consists of three simplerblobs.

Hit -or -miss transforms. Let X be an image objectand A a fixed structuring element; e.g., Fig. 12 shows anobject X consisting of three disks of different radii, and A isthe medium size disk. Suppose now that W is a small win-dow surrounding A. The local background of A with respectto W is the set difference (W - A). The set of locations atwhich A exactly fits inside X, denoted by SRW (X; A), is theintersection of the erosion of X by A and the erosion of Xcby W -A (see Fig. 12). This set transform uses erosion asa matched filter for shape recognition; it was introduced in[26] and was shown to be the prototype of a class of TI imagetransforms for pattern recognition. However, this transformis a special case of the general morphological hit -or -misstransform defined in Table 1; i.e., SRw(X; A) = X®(A, B)with B = W -A. Based on this latter observation we showedin [11] that such increasing pattern recognition transforms

structuring element with 0 6 .0, then the morhological skeleton, SK(X), of X (with respect to B) is the finite union of disjoint skeleton subsets Sn (X)\ i.e.,

SK(X) = |J (8)0<n< N

whereSn (X) = (XQnBs ) - (XQnBs ) B (9)

and n = 0,1,2,...,TV = max{fc : XekBs ^ 0}. The im­ age X can be reconstructed as the union of all the skeleton subsets dilated by an element of proper size; i.e.,

X= |J [Sn (X)®nB]. 0< n< N

(10)

If the first k lower-indexed skeleton subsets are omitted in (10), then we reconstruct the opening of X by kB\ i.e.,

XkB = (XekBs)®kB = |J [Sn (X)®nB] . (11) k<n<N

If B is convex, these openings X^g represent smoothed ver­ sions of X, where the degree of smoothness depends only on the size k of kB\ i.e., the larger the size fc, the smoother the opening Xfcg. Because X can be reconstructed either exactly from all Sn (X) using (10) or partially (smoothed versions) using (11), we can view the skeleton subsets as "shape components" . That is, skeleton subsets of small in­ dices n are associated with the lack of smoothness of the boundary of X, whereas skeleton subsets of large indices n are related to the bulky interior parts of X that are shaped similarly to nB. Thus (10) and (11) imply that an arbi­ trary shape X is smooth to a degree k with respect to a fixed shape B (i.e., X = X^p) if the first k shape compo­ nents of X (i.e., first k Sn (X)) are empty. The converse, i.e., X = XkB =>> Sn (X) = 0 for 0 < n < k - I is true if both X and B are convex [13].

Symmetric (disk-like) structuring elements produce a skele­ ton that looks like a "symmetry axis". At the expense of loosing this property, we can use the above morphological skeletal decomposition and reconstruction algorithms with an asymmetric, or even a 1-D, element. Figure 8 illustrates the variety of skeletons that result from varying the struc­ turing element. It also shows the ability of morphological filters to extract different structural information by using different structuring elements. One application for asym­ metric or 1-D structuring elements for skeletonization was described in [11,13], where we searched for the element giv­ ing the skeleton with fewest points, and hence lowest infor­ mation rate required to encode the image.

All the skeletons of Fig. 8 can reconstruct X and retain some of the axial character of a skeleton. However, they may be redundant. Thus, at the expense of producing a skeleton that may not look like a skeletal axis, we defined the min­ imal skeleton to be a proper subset of the original skele­ ton whose points are sufficient for exact reconstruction, but removal of just one point would result in partial reconstruc­ tion. In [11,13] we provided a fast algorithm that finds such a minimal skeleton, if it exists. Figure 9 shows two original binary images of different spatial resolution together with

their original and minimal skeletons.In [11,13] we showed that encoding of the minimal skele­

ton information using Elias codes results in higher com­ pression than either optimum block-Huffman or optimum runlength-Huffman coding of the original image. Figure 10 shows an application of simultaneous skeleton coding and morphological smoothing of a binary image X. By elimi­ nating the first skeleton subset SQ(X) and encoding the rest skeleton subsets (thus reconstructing the opening Xg) the original information of 65.5Kbits in X and XB was com­ pressed down to 5.7Kbits; i.e., a compression ratio of 11.4:1. Further decimation of X by keeping one out of every 4x4 pixels and skeleton-encoding of the decimated image com­ presses the information down to 1.2Kbits; i.e., a compression ratio of 53:1. In addition, morphological post-filtering can smooth the jagged contours of the interpolated image.

Finally, the morphological skeletonization has been ex­ tended to multilevel signals (e.g., gray tone images) in [25] and in [11].

9 Shape Recognition

Minimal Skeletons. The minimal skeleton was also used for minimal shape representation and recognition of blob- shaped images in [11]. That is, consider the problem: "Given a fixed convex shape B, find a minimum number of maxi­ mal scaled and shifted versionst (nB) z , of B (i.e. } find their locations z and sizes n) that fit inside an image object X and whose union exactly represents X." Since the morpho­ logical skeletonization of X by B gives all the locations and sizes of maximal elements (nB)z whose union reconstructs X, the minimal skeleton gives, by definition, an exact so­ lution to the above problem. Figure lla shows a discrete binary image X that was formed as the union of three ele­ ments nB (B=circle of Fig. 4), two of size n = 1 and one of size n = 2; its original skeleton with respect to B has eight points. Its minimal skeleton (in Fig. lib) contains only the three centers, recognizing thus the existence, location, and size of the three overlapping blobs. Thus both skeletons can reconstruct X exactly, but the the minimal skeleton displays clearly that the composite shape X consists of three simpler blobs.

Hit-or-miss transforms. Let X be an image object and A a fixed structuring element; e.g., Fig. 12 shows an object X consisting of three disks of different radii, and A is the medium size disk. Suppose now that W is a small win­ dow surrounding A. The local background of A with respect to W is the set difference (W — A) . The set of locations at which A exactly fits inside X, denoted by SRyy (X; A), is the intersection of the erosion of X by A and the erosion of Xc by W — A (see Fig. 12). This set transform uses erosion as a matched filter for shape recognition; it was introduced in [26] and was shown to be the prototype of a class of TI image transforms for pattern recognition. However, this transform is a special case of the general morphological hit-or-miss transform defined in Table 1; i.e., SRW (X\ A) = X®(A,B) with B = W—A. Based on this latter observation we showed in [11] that such increasing pattern recognition transforms

68 / SPIE Vol. 707 Visual Communications and Image Processing (1986)

Downloaded From: http://proceedings.spiedigitallibrary.org/ on 06/21/2016 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx

Page 6: Tutorial On Advances In Morphological Image Processing And Analysiscvsp.cs.ntua.gr/publications/jpubl+bchap/1986_Maragos... · 2016-06-21 · Invited Paper TUTORIAL ON ADVANCES IN

can be realized more efficiently (computationally) via ero-sions by their minimal elements.

10 DiscussionWe have only mentioned a few among the numerous applica-tions of morphological filters to image processing /analysis.A much broader spectrum of applications and algorithmsin image processing /analysis expressed using morphologicalconcepts and filters can be found in [4] and in the referencesof [11,12,13,20]. These illustrations demonstrate the utilityof such image operations and thus the potential value of theunified image algebra that we developed in [10,11] to en-compass a broad class of such systems. That is, we havetheoretically founded all these evidences by showing thatmorphological erosions and dilations are the prototypes of alarge class of nonlinear filters processing binary or graytoneimages and signals. We call this unified image algebra thetheory of minimal elements, because filters are realized asa minimal combination of morphological convolutions withsome characteristic input signals, i.e., the minimal elements.Among the filters that this theory unifies we examined heresome morphological, median, and OS filters; in [11] we alsoapplied the theory to classical linear filters and shape recog-nition transforms. In short, this unifying theory is attractivebecause:

1) It is developed for the large class of TI, increasing,u.s.c. filters, whose importance is profound in image pro-cessing and analysis. Moreover, some TI systems that arenot increasing, e.g., the skeleton, or the hit -or -miss trans-form, can be expressed as the difference of two TI increasingsystems.

2) It provides new realizations of many nonlinear andlinear filters. For example, 1 -D openings and closings wereimplemented faster by using the minimal elements of theirdual filters; median and OS filters were expressed througha closed formula involving min /max on prespecified setsof numbers and no sorting. Some of these new realiza-tions could have been derived by using combinatorial proofs,which we provided in [11]. However, there was a total lackof similarity in these proofs and a need for inventing new"tricks" in each case. This contrasts unfavourably with thegenerality of the theory of minimal elements, from which thespecial cases result as simple corollaries.

5) The prototype filters of this theory are simple andattractive for parallel implementation. That is, erosions ordilations by sets can be simply implemented as a parallellogical AND or OR of shifted versions of the input signal[27,11,13]. There are also many commercialized computerarchitectures that implement morphological filters; refer-ences can be found in [4,6,11,20].

.¢) Erosions, dilations, and the rest of morphological fil-ters (which are combinations of erosions or dilations) aredefined by logical operations on sets representing signals.This makes them well- suited for shape analysis or extrac-tion of geometrical and topological features from signals orimage objects. It also helps to obtain the solution of a class

of problems directly from their statement as a morphologicaloperation. Moreover, morphological filters are based on theprinciples of mathematical morphology which is an area richin concepts and mathematical formalism. All these factorscreate an interesting circle of ideas and problems to whichthe theory of minimal elements applies.

5) The theory can lead to synthesis and design of newsystems.

6) From this unified image algebra autonomous machinevision modules could be designed, which could perform alarge variety of complex image processing /analysis tasks basedon a small set of simple and parallel image operations.

Concluding, for future work there are still many issuesyet to be investigated. For example, systematic general al-gorithms are needed for obtaining the basis of an arbitraryfilter and for determining in advance whether it contains afinite or infinite number of minimal elements. The synthe-sis of systems based on their minimal elements remains anopen area. Finally, there is a total lack of analytic criteriato design the generalized morphological filters for graytoneimages of Table 2 and thus solve more complex image pro-cessing tasks.

11 AppendixHere we define the morphological filters only for discreteimages defined on Z2. (The notation {x : P} is used every-where to denote the set of points x satisfying a property P.)To obtain the respective definitions for non -sampled imagesdefined on the continuous plane R2, the reader must replacein Tables 2,3 the maximum with supremum and the mini-mum with infimum, and assume that the structuring set Ais compact and the structuring function g has a compactregion of support.

SPIE Vol. 707 Visual Communications and Image Processing (1986) / 69

can be realized more efficiently (computationally) via ero­ sions by their minimal elements.

10 Discussion

We have only mentioned a few among the numerous applica­ tions of morphological filters to image processing/analysis. A much broader spectrum of applications and algorithms in image processing/analysis expressed using morphological concepts and filters can be found in [4] and in the references of [11,12,13,20]. These illustrations demonstrate the utility of such image operations and thus the potential value of the unified image algebra that we developed in [10,11] to en­ compass a broad class of such systems. That is, we have theoretically founded all these evidences by showing that morphological erosions and dilations are the prototypes of a large class of nonlinear filters processing binary or graytone images and signals. We call this unified image algebra the theory of minimal elements, because filters are realized as a minimal combination of morphological convolutions with some characteristic input signals, i.e., the minimal elements. Among the filters that this theory unifies we examined here some morphological, median, and OS filters; in [11] we also applied the theory to classical linear filters and shape recog­ nition transforms. In short, this unifying theory is attractive because:

1) It is developed for the large class of TI, increasing, u.s.c. filters, whose importance is profound in image pro­ cessing and analysis. Moreover, some TI systems that are not increasing, e.g., the skeleton, or the hit-or-miss trans­ form, can be expressed as the difference of two TI increasing systems.

2) It provides new realizations of many nonlinear and linear filters. For example, 1-D openings and closings were implemented faster by using the minimal elements of their dual filters; median and OS filters were expressed through a closed formula involving min/max on prespecified sets of numbers and no sorting. Some of these new realiza­ tions could have been derived by using combinatorial proofs, which we provided in [11]. However, there was a total lack of similarity in these proofs and a need for inventing new "tricks" in each case. This contrasts unfavourably with the generality of the theory of minimal elements, from which the special cases result as simple corollaries.

3) The prototype filters of this theory are simple and attractive for parallel implementation. That is, erosions or dilations by sets can be simply implemented as a parallel logical AND or OR of shifted versions of the input signal [27,11,13]. There are also many commercialized computer architectures that implement morphological filters; refer­ ences can be found in [4,6,11,20].

4) Erosions, dilations, and the rest of morphological fil­ ters (which are combinations of erosions or dilations) are defined by logical operations on sets representing signals. This makes them well-suited for shape analysis or extrac­ tion of geometrical and topological features from signals or image objects. It also helps to obtain the solution of a class

of problems directly from their statement as a morphological operation. Moreover, morphological filters are based on the principles of mathematical morphology which is an area rich in concepts and mathematical formalism. All these factors create an interesting circle of ideas and problems to which the theory of minimal elements applies.

5) The theory can lead to synthesis and design of new systems.

6) From this unified image algebra autonomous machine vision modules could be designed, which could perform a large variety of complex image processing/analysis tasks based on a small set of simple and parallel image operations.

Concluding, for future work there are still many issues yet to be investigated. For example, systematic general al­ gorithms are needed for obtaining the basis of an arbitrary filter and for determining in advance whether it contains a finite or infinite number of minimal elements. The synthe­ sis of systems based on their minimal elements remains an open area. Finally, there is a total lack of analytic criteria to design the generalized morphological filters for graytone images of Table 2 and thus solve more complex image pro­ cessing tasks.

11 Appendix

Here we define the morphological filters only for discrete images defined on Z2 . (The notation {x : P} is used every­ where to denote the set of points x satisfying a property P.) To obtain the respective definitions for non-sampled images defined on the continuous plane R2 , the reader must replace in Tables 2,3 the maximum with supremum and the mini­ mum with infimum, and assume that the structuring set A is compact and the structuring function g has a compact region of support.

SPIE Vol. 707 Visual Communications and Image Processing (1986) / 69

Downloaded From: http://proceedings.spiedigitallibrary.org/ on 06/21/2016 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx

Page 7: Tutorial On Advances In Morphological Image Processing And Analysiscvsp.cs.ntua.gr/publications/jpubl+bchap/1986_Maragos... · 2016-06-21 · Invited Paper TUTORIAL ON ADVANCES IN

Table 1: SP Filters for Binary Discrete Images

Name Definition*set translation of A by p Ap = {p + a : a E A}set symmetric of A A8 = {-a : a E Alset difference of B from A A -B = {a : a E A, a V B}set complement of A Ac = {a E Z2 : a V A} = Z2 -AMinkowski set addition of A and B A ® B = {a + b : a E A, b E B} = Ub F B AbMinkowski set subtraction of B from A A e B = (Ac®B)c = (Ìb F B Abdilation of X by A X®As = {p E Z2 : Ap n X # fS}erosion of X by A XeAs = {p E Z2 : ApÇ X}closing of X by A X``i = (X®As)eAopening of X by A XA = (XeAs)®Ahit-or-miss transform of X by (A, B) XO(A, B) = (XeAs) n (XceBs)k-th order-statistic of X by W OSk(X;W) _ {p E Z2 :1 X n Wp I> k}

median of X by W (1W 1= n =odd) med(X;W) = OS(n+ 1)/2(X;W)

* X, A, B,WÇ Z2; p E Z2 * I W 1=cardinality of W

Table 2: FP Filters for Graytone Discrete Images

Name Definition (x, y E Z2)function symmetric of g(x) gs(x) = g( -x)Minkowski function addition of f and g (f ®g) (x) = max{ f (y) + g(x - y) : y E Z2}Minkowski function subtraction of g from f (f eg) (x) = min{ f (y) - g(x - y) : y E Z2}dilation of f by g (f egs) (x) = max{ f (y) + g(y - x) : y E Z2}erosion off by g (f egs) (x) = min{ f (y) - g(y - x) : y E Z2}closing of f by g fg(x) = (fegs)(x)]eg(x)opening of f by g fg(x) _ (fegs)(x)jeg(x)

Table 3: FSP Filters for Graytone and Binary Discrete Images

Minkowski addition of f and A (f ®A) (x) = max{ f (y) : y E (A8)x}Minkowski subtraction of A from f (feA)(x) = min{ f (y) : y E (A8)x}dilation of f by A (f 9,48)(x) = max{ f (y) : y E Ax}

(feA8)(x) = min {f(y) : y E Ax}erosion of f by Aclosing of f by A 1A = (f®As)eAopening of f by A 1A= (1e448)®Ak -th OS of f by W [OSk(f;W)](x) = k -th largest of f (y), y E Wxmedian of f by W med(f;W)= 05(n +1) /2(f ;W)

70 / SPIE Vol. 707 Visual Communications and /mage Processing (1986)

Table 1: SP Filters for Binary Discrete Images

Nameset translation of A by pset symmetric of Aset difference of B from Aset complement of AMinkowski set addition of A and BMinkowski set subtraction of B from Adilation of X by Aerosion of X by Aclosing of X by Aopening of X by Ahit-or-miss transform of X by (A, B)k-th order-statistic of X by Wmedian ofXbyW (\W\=n =odd)

* X,A,B,WCZ2 ]p€Z*

Definition*Ap = {p + a : a 6 A}As = {-a : a 6 A}A-B = {a:a€A, a & B}Ac = {a G Z 2 : a g A} = Z2 - AA@B = {a + b:aeA, b € B} = \Jb ^ B AbAeB = (Ac ®B) c = nh ^BAhX®AS = {p 6 Z 2 : Ap 0 X ^ 0}XQAS = {p e z2 : ApC x}x^ = (xeA5 )eAXA --= (XeAs )@AXQ(A,B) = (xe^i5 ) n (xceJ5s )05*(X;W) = {p e Z 2 :| XnP^p |> k}med(X;W) = O5(n+ ^^(XjW)

* VF |=cardinality of W

Table 2: FP Filters for Graytone Discrete Images

Namefunction symmetricMinkowski functionMinkowski function

ofg(x)addition of f and gsubtraction of g from f

dilation of f by gerosion of f by gclosing of f by gopening of f by g

Definition (z, y G Z 2 )</5 (z) = <7(-z)(f®ff)(x) = max{/(y) 4- g(x - y) : y G Z2 }(/60)(z) = mm{/(y) g(x - y(f®9S)(x) = niax{/(y) + ^(y -(/e^)(z)=min{/(y)-^(y-

) -yx):z):

GZ2 }

yez2 }[/ Z2 }

fg (x) = [(f@gs)(x)]Sg(x)fg(*) = [(f^9s)(x)]eg(x)

Table 3: FSP Filters for Graytone and Binary Discrete Images

Minkowski addition of f and A = max{/(y) : yMinkowski subtraction of A from fdilation of f by Aerosion of f by Aclosing of f by A fA = (f®As)eAopening of f by A fA = (f&As)®A_____________

[OSk (f; W)](x) = fc-th largest of /(yj7k-th OS of f by Wmedian of f by W med(f; W) =

70 / SPIE Vol. 707 Visual Communications and Image Processing (1986)

Downloaded From: http://proceedings.spiedigitallibrary.org/ on 06/21/2016 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx

Page 8: Tutorial On Advances In Morphological Image Processing And Analysiscvsp.cs.ntua.gr/publications/jpubl+bchap/1986_Maragos... · 2016-06-21 · Invited Paper TUTORIAL ON ADVANCES IN

EROSION: X O B

OPENING: XB

B

DILATION: X O B

CLOSING: X3

Figure 1. Erosion, dilation, opening, and closing of X byB. (The shaded areas correspond to the interior of the sets,the dark solid curve to the boundary of the transformedsets, and the dashed curve to the original boundary of X.)

CIIàCLE WARE RHOMBUS RUNE

+ + + +

LIN000 LIN048 LIN090 LIN130

+ + + +

VEC000 vEC048 VEC090 VEC135

+ + + +

fA

Figure 4. Discrete structuring elements in Z2. (+ marksthe origin (0, 0) of Z2.)

ORIGINAL FUNCTION

m 40 Ao eoSOPLE

EROSION BY SET B CIBI=S)

OPENING BY SET B CIBI=5)

OILATION BY SET B CIBI =S)

CLOSING BY SET B CIBI.S)

Figure 2. Erosion, dilation, opening, and closing of a 1 -Dsampled function by a 1 -D set B. (B = {-2,-1,O,1,2};the dashed curve refers to the original function.)

ORIGINAL FUNCTION OPEN - CLOSING BY L C1L1 =3)

( r

Ñ Im InSAMPLE

CLOS - OPENING BY L CILIa3)

(c)

a IseSAMPLE

t ae

(b)

N 12! ѢSAME

NEOIAN ROOT N.R.TO B CIBteS)

no

(d)

M ImSAlPLE

ri¢

Figure 3. Median filtering via opening -closing: (a) Orig-inal function f. (b) Open -closing (f4L. (c) Clos- opening(f L)L. (d) Median root of f by B. (L = { -1, 0,1} andB={-2, -1, 0,1, 2 })

SPIE Vol. 707 Visual Communications and Image Processing (1986) / 71

ORIGINAL FUNCTION

0 B

EROSION: XQB DILATION: X©B

OPENING: X

EROSION BY SET B CIBI-53 DILATION BY SET B CIBI-55

OPENING BY SET B CIBI«5) CLOSING BY SET B CIB!»5D

Figure 2. Erosion, dilation, opening, and closing of a 1-DFigure 1. Erosion, dilation, opening, and closing of X by sampled function by a 1-D set B. ( B = {-2,-1,0,1,2}; B. (The shaded areas correspond to the interior of the sets, the dashed curve refers to the original function.) the dark solid curve to the boundary of the transformed sets, and the dashed curve to the original boundary of X.)

ORIGINAL FUNCTION OPEN - CLOSING BY L CILI»3D

SQUARE BQXNE

• • • • •• • -f • •• • • • •

VECOOO

LIN045

VEC045

LINO90

VEC090

LIN135

VEC135

+

SAMPLE

CLOS - OPENING BY L CILI*3>

192 256 SAMPLE

MEDIAN ROOT M.R.TO B (IBI=5)

I9Z 296

Figure 4. Discrete structuring elements in Z 2 . (-f- marks the origin (0,0) of Z 2 .)

Figure 3. Median filtering via opening-closing: (a) Orig­ inal function /. (b) Open-closing (/L)L > (c) Clos-opening (fL ) L . (d) Median root of / by B. (L = {-1,0,1} and B = {-2,-1,0,1,2})

SPIE Vol. 707 Visual Communications and Image Processing (1986} / 71

Downloaded From: http://proceedings.spiedigitallibrary.org/ on 06/21/2016 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx

Page 9: Tutorial On Advances In Morphological Image Processing And Analysiscvsp.cs.ntua.gr/publications/jpubl+bchap/1986_Maragos... · 2016-06-21 · Invited Paper TUTORIAL ON ADVANCES IN

(a) (b)

(c) (d)

Figure 5. (a) A binary image X. (b) X - (XeB). (c) Agraytone image f. (d) f - (feB). (B= circle of Fig. 4.)

(a) (b)

go

4.0(c) (d)

Figure 7. Region filling by dilation and intersections. (Allimages have 256 x 256 pixels.)

72 / SPIE Vol. 707 Visual Communications and Image Processing (1986)

(a) (b)

(c) (d)

Figure 6. (a) An image f with salt- and -pepper noise(probability of occurrence of noisy samples is 0.1). (b) Open-ing A. (c) Open -closing (fB)B. (d) Median of f by thewindow W. (B =boxne and W= square of Fig. 4.)

(a)

(b)

,...:,..,,...

:::-:::.:

.....

- ar4! ->-012(

-_ a

I1 ..o.,.....,.. ..... ..... y-

I1,1 \-L; --- .-';

/ < .-1

1 H L._ I --, -- __I ELI

Figure 8. (a) A 64 x 64- pixels binary image. (b) Itsmorphological skeletons with respect to all the structuringelements of Fig. 4 (keeping the same order).

(a)

Figure 5. (a) A binary image X. (b) X - (X&B). (c) A graytone image /. (d) / - (fQB). (B=circle of Fig. 4.)

Figure 6. (a) An image / with scdt-and-pepper noise (probability of occurrence of noisy samples is 0.1). (b) Open­ ing /B. (c) Open-closing (/B) B - (d) Median of / by the window W. (B=boxne and W=square of Fig. 4.)

(a)

(b)

- n xnv m .

_ CH

Figure 7. Region filling by dilation and intersections. (All images have 256 x 256 pixels.) Figure 8. (a) A 64 x 64-pixels binary image, (b) Its

morphological skeletons with respect to all the structuring elements of Fig. 4 (keeping the same order).

72 / SPIE Vol. 707 Visual Communications and Image Processing (1986)

Downloaded From: http://proceedings.spiedigitallibrary.org/ on 06/21/2016 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx

Page 10: Tutorial On Advances In Morphological Image Processing And Analysiscvsp.cs.ntua.gr/publications/jpubl+bchap/1986_Maragos... · 2016-06-21 · Invited Paper TUTORIAL ON ADVANCES IN

ORIGINALIMAGES

_

ORIGINALSKELETONS

MINIMALSKELETONS

.t,. .:.

¡.`1. Y

Figure 9. Minimal skeletonization (by the square of Fig. 4).(The (enlarged) images on the left have 64 x 64 pixels; im-ages on the right have 256 x 256 pixels.)

00000 000000000000 000000000000000000000 000000000000000000000000000000 00000000000000000000.0000 00000000000000000000000000000 000000000000000000000000000000 000000000000000 0 0 0 0 0 0 0 0 0 0 0 0 000000 00000

(a) (b)

Figure 11. Minimal shape representation and blob recog-nition. (o, = image points; = skeleton points.)

image object X

shapeA

XQAs

W

image background Xc

W-Alocal backgroundof A with respectto window W

Xc0 (W-A)s

location of shape A

Figure 12. A shape recognition transform (adapted fromCrimmins & Brown [261).

Figure 10. (a) Original binary image X (256 x 256 pix-els resolution). (b) Opening XB by B= square of Fig. 4.(Image data =65536 bits; after skeleton coding, 5734 bits.)(c) Image Y obtained by 4 x 4- decimating X and then 4 x 4-interpolating it back. (Image data =4096 bits; after skele-ton coding, 1246 bits.) (d) Clos- opening (Y2A)2A, whereA= rhombus of Fig. 4.

SPIE Vol. 707 Visual Communications and Image Processing (1986) / 73

ORIGINAL IMAGES

00000o o o o o o o

oooooooooooooo oooooooooooooooo00«««00«00«»*«00oooooooooooooooo oooooooooooooo

o o o o o o o o o o o o

o o o o o o o o o o o o

oooooooooooooo oooooooooooooooo oo«oooo»ooooo»oo oooooooooooooooo oooooooooooooo

o o o o o o o o o o o o

(a) (b)

Figure 11. Minimal shape representation and blob recog­ nition, (o, • = image points; • = skeleton points.)

image object X image background X°

MINIMAL SKELETONS / \

shape A

window W-Alocal background °f A with respect to window W

W

XC ©(W-A)S

Figure 9. Minimal skeletonization (by the square of Fig. 4) (The (enlarged) images on the left have 64 x 64 pixels; im­ ages on the right have 256 x 256 pixels.)

location of shape A

Figure 12. A shape recognition transform (adapted from Crimmins & Brown [26]).

Figure 10. (a) Original binary image X (256 x 256 pix­ els resolution), (b) Opening XB by B—square of Fig. 4. (Image data=65536 bits; after skeleton coding, 5734 bits.) (c) Image Y obtained by 4 x 4-decimating X and then 4x4- interpolating it back. (Image data=4096 bits; after skele­ ton coding, 1246 bits.) (d) Clos-opening (Y2A) 2A , where A=rhombus of Fig. 4.

SPIE Vol. 707 Visual Communications and I mage Processing (1986) / 73

Downloaded From: http://proceedings.spiedigitallibrary.org/ on 06/21/2016 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx

Page 11: Tutorial On Advances In Morphological Image Processing And Analysiscvsp.cs.ntua.gr/publications/jpubl+bchap/1986_Maragos... · 2016-06-21 · Invited Paper TUTORIAL ON ADVANCES IN

AcknowledgmentsThis work was supported by the National Science Founda-tion under Contract CDR -8500108.

References[1] H. Minkowski, "Volumen und Oberflache ", Math. An-

nalen, Vol. 57, pp.447 -495, 1093.

[2] H. Hadwiger, Vorlesungen uber Inhalt, Oberflache, undIsoperimetrie, Berlin: Springer Verlag, 1957.

[31 G. Matheron, Random Sets and Integral Geometry, NY:Wiley, 1975.

[4] J. Serra, Image Analysis and Mathematical Morphology,NY: Acad. Press, 1982.

V. Goetcherian, "From Binary To Grey Tone ImageProcessing Using Fuzzy Logic Concepts," Pattern Recog-nition, Vol. 12, pp.7 -15, 1980.

[6] S.R. Sternberg, "Biomedical Image Processing ", IEEEComputer, Jan. 1983, pp.22 -34.

S.R. Stenrberg and E.S. Sternberg, "Industrial Inspec-tion by Morphological Virtual Gauging ", Proc. IEEEWorkshop Comp. Archit. for Pattern Anal. ImageDatab. Manag., Pasadena CA, Oct. 1983.

[5]

[7]

[8] J.R. Mandeville, "Novel Method for Analysis of PrintedCircuit Images ", IBM J. Res. Develop., 29, Jan. 1986.

P. Maragos and R.W. Schafer, "Morphological SkeletonRepresentation and Coding of Binary Images ", Proc.IEEE Int. Conf. Acoust., Speech, Signal Processing,San Diego CA, April 1984, pp.29.2.1- 29.2.4.

[10] P. Maragos and R.W. Schafer, "A Unification of Lin-ear, Median, Order -Statistics, and Morphological Fil-ters under Mathematical Morphology ", Proc. IEEEInt. Conf. Acoust., Speech, Signal Processing, TampaFL, March 1985, pp.34.8.1- 34.8.4.

[11] P. Maragos, A Unified Theory of Translation- InvariantSystems With Applications to Morphological Analysisand Coding of Images, Ph.D. Thesis, School of Electr.Enginr., Georgia Inst. of Technology, Atlanta GA, July1985; also as Tech. Rep. DSPL -85 -1.

[12] P. Maragos and R.W. Schafer, "Applications of Mor-phological Filtering to Image Analysis and Processing ",Proc. IEEE Int. Conf. Acoust., Speech, Signal Process-ing, Tokyo Japan, April 1986, pp.2067 -2070.

[13] P. Maragos and R.W. Schafer, "Morphological Skele-ton Representation and Coding of Binary Images ", toappear in IEEE Trans. Acoust., Speech, Signal Process-ing, Oct. 1986.

[9]

[14] W.K. Pratt, Digital Image Processing, NY: Wiley, 1978.

74 / SPIE Vol. 707 VisualCommunications and Image Processing (1986)

[15] A. Rosenfeld and A.C. Kak, Digital Picture Processing,Vols. 1 & 2, NY: Acad. Press, 1982.

[16] T. Pavlidis, Algorithms for Graphics and Image Pro-cessing, Computer Science Press, 1982.

[17] K. Preston, Jr., M.J.B. Duff, S. Levialdi, P.E. Nor -gren, and J -I. Toriwaki, "Basics of Cellular Logic withSome Applications in Medical Image Processing ", Proc.IEEE, Vol. 67, pp.826 -856, May 1979.

[18] Y. Nakagawa and A. Rosenfeld, "A Note on the Useof Local Min and Max Operations in Digital PictureProcessing ", IEEE Trans. Syst., Man, and Cybern.,Vol. SMC -8, Aug.1978, pp.632 -635.

[19] C. Lantuejoul and J. Serra, "M- Filters," Proc. IEEEInt. Conf. Acoust., Speech, Signal Processing, ParisFrance, May 1982, pp.2063 -2066.

[20] R.M. Haralick, S.R. Sternberg and X. Zhuang, "Gray -scale Morphology ", Proc. IEEE Comp. Soc. Conf.Comp. Vision Pattern Recogn., Miami FL, June 1986.

[21] T.S. Huang, Ed., Two -Dimensional Digital Signal Pro-cessing II: Transforms and Median Filters, NY: SpringerVerlag, 1981.

[22] H. Blum, "Biological Shape and Visual Sciences (PartI) ", J. Theor. Biology, Vol. 38, pp.205 -287, 1973.

[23] C. Lantuejoul, "Skeletonization in Quantitative Metal -lography", in Issues of Digital Image Processing, R.M.Haralick & J.C. Simon, Eds., Sijthoff & Noordhoff, 1980.

[24] J.C. Mott -Smith, "Medial Axis Transformations ", inPicture Processing and Psychopictorics, B.S. Lipkin andA. Rosenfeld, Eds., NY: Acad. Press, 1970.

[25] S. Peleg and A. Rosenfeld, "A Min -Max Medial AxisTransformation ", IEEE Trans. Pattern Anal. MachineIntellig., Vol. PAMI -3, pp.208 -210, Mar. 1981.

[26] T.R. Crimmins and W.R. Brown, "Image Algebra andAutomatic Shape Recognition ", IEEE Trans. Aerosp.and Electron. Syst., Vol. AES -21, pp.60 -69, Jan. 1985.

[27] S.R. Sternberg, "Parallel Architectures for Image Pro-cessing", Proc. IEEE Int. Comp. Softw. Appl. Conf.,Chicago IL, 1979, pp.712 -717.

AcknowledgmentsThis work was supported by the National Science Founda­ tion under Contract CDR-8500108.

References

[1] H. Minkowski, "Volumen und Oberflache", Math. An- nalen, Vol. 57, pp.447-495, 1093.

[2] H. Hadwiger, Vorlesungen uber Inhalt, Oberflache, und Isoperimetrie, Berlin: Springer Verlag, 1957.

[3] G. Matheron, Random Sets and Integral Geometry, NY: Wiley, 1975.

[4] J. Serra, Image Analysis and Mathematical Morphology, NY: Acad. Press, 1982.

[5] V. Goetcherian, "From Binary To Grey Tone Image Processing Using Fuzzy Logic Concepts," Pattern Recog­ nition, Vol. 12, pp.7-15, 1980.

[6] S.R. Sternberg, "Biomedical Image Processing", IEEE Computer, Jan. 1983, pp.22-34.

[7] S.R. Stenrberg and E.S. Sternberg, "Industrial Inspec­ tion by Morphological Virtual Gauging", Proc. IEEE Workshop Comp. Archit. for Pattern Anal. Image Datab. Manag., Pasadena CA, Oct. 1983.

[8] J.R. Mandeville, "Novel Method for Analysis of Printed Circuit Images", IBM J. Res. Develop., 29, Jan. 1986.

[9] P. Maragos and R.W. Schafer, "Morphological Skeleton Representation and Coding of Binary Images", Proc. IEEE Int. Conf. Acoust., Speech, Signal Processing, San Diego CA, April 1984, pp.29.2.1-29.2.4.

[10] P. Maragos and R.W. Schafer, "A Unification of Lin­ ear, Median, Order-Statistics, and Morphological Fil­ ters under Mathematical Morphology", Proc. IEEE Int. Conf. Acoust., Speech, Signal Processing, Tampa FL, March 1985, pp.34.8.1-34.8.4.

[11] P. Maragos, A Unified Theory of Translation-Invariant Systems With Applications to Morphological Analysis and Coding of Images, Ph.D. Thesis, School of Electr. Enginr., Georgia Inst. of Technology, Atlanta GA, July 1985; also as Tech. Rep. DSPL-85-1.

[12] P. Maragos and R.W. Schafer, "Applications of Mor­ phological Filtering to Image Analysis and Processing", Proc. IEEE Int. Conf. Acoust., Speech, Signal Process­ ing, Tokyo Japan, April 1986, pp.2067-2070.

[13] P. Maragos and R.W. Schafer, "Morphological Skele­ ton Representation and Coding of Binary Images", to appear in IEEE Trans. Acoust., Speech, Signal Process­ ing, Oct. 1986.

[14] W.K. Pratt, Digital Image Processing, NY: Wiley, 1978.

[15] A. Rosenfeld and A.C. Kak, Digital Picture Processing, Vols. 1 & 2, NY: Acad. Press, 1982.

[16] T. Pavlidis, Algorithms for Graphics and Image Pro­ cessing, Computer Science Press, 1982.

[17] K. Preston, Jr., M.J.B. Duff, S. Levialdi, P.E. Nor- gren, and J-I. Toriwaki, "Basics of Cellular Logic with Some Applications in Medical Image Processing", Proc. IEEE, Vol. 67, pp.826-856, May 1979.

[18] Y. Nakagawa and A. Rosenfeld, "A Note on the Use of Local Min and Max Operations in Digital Picture Processing", IEEE Trans. Syst., Man, and Cybern., Vol. SMC-8, Aug.1978, pp.632-635.

[19] C. Lantuejoul and J. Serra, "M-Filters," Proc. IEEE Int. Conf. Acoust., Speech, Signal Processing, Paris France, May 1982, pp.2063-2066.

[20] R.M. Haralick, S.R. Sternberg and X. Zhuang, "Gray­ scale Morphology", Proc. IEEE Comp. Soc. Conf. Comp. Vision Pattern Recogn., Miami FL, June 1986.

[21] T.S. Huang, Ed., Two-Dimensional Digital Signal Pro­ cessing II: Transforms and Median Filters, NY: Springer Verlag, 1981.

[22] H. Blum, "Biological Shape and Visual Sciences (Part I)", J. Theor. Biology, Vol. 38, pp.205-287, 1973.

[23] C. Lantuejoul, "Skeletonization in Quantitative Metal­ lography" , in Issues of Digital Image Processing, R.M. Haralick & J.C. Simon, Eds., Sijthoff & Noordhoff, 1980.

[24] J.C. Mott-Smith, "Medial Axis Transformations", in Picture Processing and Psychopictorics, B.S. Lipkin and A. Rosenfeld, Eds., NY: Acad. Press, 1970.

[25] S. Peleg and A. Rosenfeld, "A Min-Max Medial Axis Transformation", IEEE Trans. Pattern Anal. Machine Intellig., Vol. PAMI-3, pp.208-210, Mar. 1981.

[26] T.R. Crimmins and W.R. Brown, "Image Algebra and Automatic Shape Recognition", IEEE Trans. Aerosp. and Electron. Syst., Vol. AES-21, pp.60-69, Jan. 1985.

[27] S.R. Sternberg, "Parallel Architectures for Image Pro­ cessing", Proc. IEEE Int. Comp. Softw. Appl. Conf., Chicago IL, 1979, pp.712-717.

74 / SPIE Vol. 707 Visual Communications and Image Processing (1986)

Downloaded From: http://proceedings.spiedigitallibrary.org/ on 06/21/2016 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx