The design of morphological filters using multiple structuring elements, Part II: open(close) and...

7
Pattern Recognition Letters 13 (1992) 175-181 North-Holland March 1992 The design of morphological filters multiple structuring elements, Part II: open(close) and close(open) using Ron Jones and Imants Svalbe Dt'partment of Physh's, CaulfieM Campus, Monash University, P.O. Box 197, 3145, Australia Received 15 April 1991 Abstract Jones, R. and I. Svalbe, The design of morphological filters using multiple structuring elements, Part 11: open(close) and close(open), Pattern Recognition Letters 13 (1992) 175-181. The decomposition of morphological operations into equivalent sets of basis filters has applications not only to parallel process- ing bu! also has imp, '~tions for the design of more efficient structuring elements. Previous work in this area has lead to the decomposition of botl~ the opening and closing operations. That work is extended to include the close(open) and open(close) operations for both single and muhiple binary structuring elements. Kt:wvords. Morphology, ~,hapc prc.,,crving fihcrs, tnuhiple structuring elements, nlorphological decomposition. I. Introduction Morphological filters are designed to use shapes (structuring elements) to extract shape dependent information from signals or images. Usually the choice of a structuring element(s) used to perform a particular type of filtering is governed by a trial and error approach. This is often due to a lack of detailed understanding as to what a particular filter does to an image at the data level. Maragos [1] developed principles that allow the decomposi- tion of individual opening ('o') or closing ('e') operations into a union of erosions ('Q'), or in- tersection of dilations ('(~'), by basis filters, in this paper we use the following definitions [2] (A(~B) = {c~ E/v: c=a+b, 3a~A, ::lb~B},(l) (AOB)={x~EIv: x+b~A, Vb~B}, (2) (AOB)=(AOB)@B, (3) (A O B) = (A (~ B)O B. (4) We focus on binary structuring elements only. The binary definitions in equations (1) and (2) have been used because these equations will be applied to bin- ary structuring elements, and not general images. The decomposition of morphological operations has applications not only to parallel processing, but importantly allows one to see, at the data level, what parts of the image are being affected by the particular structuring element chosen. Studying the decomposition sets for structuring elements provides insight into the generation of more effi- cient filters to best approach the constraints re- quired. We analyse the decomposition of close- (open) and open(close) operations for single and multiple structuring elements. 2. Decomposition of a single structuring element As has been shown in [1], the morphological operations of opening and closing can be expressed 0167-8655/92/$05.00 ~.~, 1992 -- Elsevier Science Publishers B.V. All rights reserved 175

Transcript of The design of morphological filters using multiple structuring elements, Part II: open(close) and...

Page 1: The design of morphological filters using multiple structuring elements, Part II: open(close) and close(open)

Pattern Recognition Letters 13 (1992) 175-181 North-Holland

March 1992

The design of morphological filters multiple structuring elements, Part II: open(close) and close(open)

using

Ron Jones and Imants Svalbe

Dt'partment of Physh's, CaulfieM Campus, Monash University, P.O. Box 197, 3145, Australia

Received 15 April 1991

Abstract

Jones, R. and I. Svalbe, The design of morphological filters using multiple structuring elements, Part 11: open(close) and close(open), Pattern Recognition Letters 13 (1992) 175-181.

The decomposition of morphological operations into equivalent sets of basis filters has applications not only to parallel process- ing bu! also has imp, '~tions for the design of more efficient structuring elements. Previous work in this area has lead to the decomposition of botl~ the opening and closing operations. That work is extended to include the close(open) and open(close) operations for both single and muhiple binary structuring elements.

Kt:wvords. Morphology, ~,hapc prc.,,crving fihcrs, tnuhiple structuring elements, nlorphological decomposition.

I. Introduction

Morphological filters are designed to use shapes (structuring elements) to extract shape dependent information from signals or images. Usually the choice of a structuring element(s) used to perform a particular type of filtering is governed by a trial and error approach. This is often due to a lack of detailed understanding as to what a particular filter does to an image at the data level. Maragos [1] developed principles that allow the decomposi- tion of individual opening ( 'o ' ) or closing ( ' e ' ) operations into a union of erosions ( 'Q ' ) , or in- tersection of dilations ('(~'), by basis filters, in this paper we use the following definitions [2]

(A(~B) = {c~ E/v: c=a+b, 3a~A, ::lb~B},(l)

(AOB)={x~EIv: x+b~A, Vb~B}, (2)

(AOB)=(AOB)@B, (3)

(A O B) = (A (~ B)O B. (4)

We focus on binary structuring elements only. The binary definitions in equations (1) and (2) have been used because these equations will be applied to bin- ary structuring elements, and not general images.

The decomposition of morphological operations has applications not only to parallel processing, but importantly allows one to see, at the data level, what parts of the image are being affected by the particular structuring element chosen. Studying the decomposition sets for structuring elements provides insight into the generation of more effi- cient filters to best approach the constraints re- quired. We analyse the decomposition of close- (open) and open(close) operations for single and multiple structuring elements.

2. Decomposition of a single structuring element

As has been shown in [1], the morphological operations of opening and closing can be expressed

0167-8655/92/$05.00 ~.~, 1992 -- Elsevier Science Publishers B.V. All rights reserved 175

Page 2: The design of morphological filters using multiple structuring elements, Part II: open(close) and close(open)

Volume 13, Number 3 PATTERN RECOGNITION LETTERS March 1992

as a union of erosions by basis sets of filters, such that

(XOA)-U(XGA~), (5) (X®A)=_U(XOA j) (6)

where X is the image and A is the structuring element.

The set ~ of A i, which will be referred to as the basis set for opening, is defined [l] by the following

~ ( X = XOA)= {A~}

= { ( A ) - a : a ~ A }. (7)

The set f~ of A j, which will be referred to as the basis set for closing, is defined [1] by

W(X = X , A ) = {A j} = {A j c_ A@A:O6(AJOA)}

and A j is minimal. (8)

The opening basis members A~ can be obtained directly from equation (7)--each A, is simply a translate of A. For the closing basis members A j, equation (8) only provides constraints on A j and not a means to find them. An algorithm that will find {A j} for any giving structuring element A can be found in Svalbe [3]. An improved open and closing algorithm which permits synthesis and decomposition of structuring elements is in pre- paration [7].

Any translation-invariant, upper semicontin- uous system processing multilevel (binary) signals can be represented exactly as the supremum (union) of erosions by their basis functions (sets) [1]. So that, given an image X, and structuring ele- ment A, it is possible to express the total operation of (X©A)OA or (X®A)©A as a union of erosions by a complete minimal basis set of filters {A t} or {At } such that

(XOA )OA - O(.,x @At), (9)

(XOA )OA =_ U(XGAt ) . (10)

it remains to find what the basis functions A t and At are exactly--this will depend on the struc- turing element A and the particular operation.

2. !. The basis set A t for the close(open) operation

We wish to find the set {At}, such that when an image X is opened then closed by a structuring

element A, this operation is equivalent to taking the union of erosions of X by the set {AI}. Such an equivalence is expressed in equation (9). As we require any image X to satisfy this equivalence, so too must the image A l, such that

(A t©A )OA - U(A t@ A t). (11)

Because U ( A t O A !) must contain the origin, it follows that

O~(AIOA)OA for any A l. (12)

It is important to note that the basis shapes At (or At), used in equation (9) (or equation (10)), directly represent the structure of the data in a binary image X. Only if the structure surrounding any point in X has the form of any one of these shapes will this element be present in the final image.

We use the constraint in (12) to find the set of basis shapes A t that satisfy equation (9). We define the intermediate image, B, and final image, C, by

B=At©A, (13)

C=BOA. (14)

From equation (5), equation (13) becomes

B = A t©A -- O (A t@A~) (15) i

where A~ are members of the opening basis set ~J. From the definition of erosion (2) we obtain

AtOAi= {x: x+ai~A !, VaieAi} (16)

so that

U(AtGAi) "- {x: x+ai~A t, i

VaiEAi, 3AiE ( /} (17) from which

B={x: x(~Aic_A I, 3 A i ~ }. (18)

The image B, defined by the elements x in (18), is then closed by A to produce the final image C. Using equation (6)

C=B®A--U(BGA j) (19) J

where A ) are members of the closing set '~. From the definition of erosion

C={y: y+aJ~B, VaJeAJ, 3AJe~} . (20)

176

Page 3: The design of morphological filters using multiple structuring elements, Part II: open(close) and close(open)

Volume 13, Number 3 PATTERN RECOGNITION LETTERS March 1992

Our constraint in equation (12) dictates that the origin must be a member of this set 5, so that we must have y = 0 as a member. This constraint flows back to the original image A t and determines its structure; from (20)

y = 0 =* aJEB, V a J E A j 3 A j E ~ (21)

but from (18)

a J e B = a J ( ~ A i c _ A 1 3 A i E ~ (22)

so that, in all

y = 0 = aJOAic_At, V a J e A j,

::IAJE 5 , 3Ai~ ~. (23)

We want the set of A t to consist of the bare minimum number of members required to satisfy the relationship in (9), and we would also like these A t to be of minimal size. For a given Ai, there will be one smallest A t that will satisfy the contain- ment relation in equation (23), and that is the one that satisfies aJ(~Ai = A I. All other A t, satisfying aJ(~Aic_A t, will be supersets of this. When we come to use these superset A t in (9), they will all be redundant due to this minimal member. With regard to this then we replace the containment rela- tion for an equality and obtain

{A t } = {At: A I =a.i(~A, Va .j e A .i,

3 A .i e ~', 3 A i e (; }. (24)

We thus find that the necesssary A t basis members needed to satisfy (9) have the shape of any A j member of the closing basis set, with each element in this A j dilated by any one of the cor- responding opening basis members A~.

For a binary image this result can be explained intuitively as follows: for a pixel to be present in the final image it must have been produced by the closing of the intermediate image B. Because we can express closing as a union of erosions (6), the corresponding structure of the pixels in image B must look like at least one of the closing basis members A .i of the set 5. All points comprising the structure of A j in image B must have survived the initial opening. We can express this opening as a union of erosions (5)--this time by opening basis members A~. Each element of A j must have a sur- rounding structure in the original image X that

looks like at least one of the A i. The full comple- ment of points in image X is needed to survive the close(open) operation, so that an element at the origin of this structure will occur in the final im- age. These compound structures in X form the A i basis members that satisfy (9).

2.2. The basis set At for the open(close) operation

We now wish to find the set {AI}, such that when an image X is closed and then opened by a structuring element A, this operation is equivalent to taking the union of erosions of X by the set {At}. Such an equivalence is expressed in equation

(10). This time we define the intermediate image, B,

and final image, C, by

B= At®A -- O (X@AJ), (25) J

C=BOA-O(B@Ai). (26) i

By replacing X with A t in equation (10), we find

that because 0 e U(AtQAt) , then

0 e (AtOA)OA,

so that once again we require the origin to be an

element of the final image C. if we compare equation (25) with (15) and equa-

tion (26) with (19) it is apparent that the argument presented in Section 2. i applies in exactly the sarne way here--the only difference being that the sub- scripts i and j have been interchanged.

Hence we state immediately that the basis sets

At that satisfy equation (10) are given by

{At} = {At: At=aiOAJ, VaieA~,

3A ie (), 3A i ~ ~"}. (27)

The shape of the necessary Al basis members are given by tile shape of any one Ai opening basis member, with each element in this A, dilated by one of the closing basis members A j.

For a binary image, we can think of this in- tuitively as follows: for a pixel to be present in the final image it must have survived the opening of the intermediate image B by structuring element A. We express this opening as a union of erosions (5), so that the corresponding structure in image B must look like one of the Ai opening basis

177

Page 4: The design of morphological filters using multiple structuring elements, Part II: open(close) and close(open)

Volume 13, Number 3 PATTERN RECOGNITION LETTERS March 1992

members. For this entire structure to be present in image B, each of the surrounding pixels must have been put there as a result of the initial closing operation. Again we express closing as a union of erosions (6)--this time by closing basis members A t. Each element of the Ai in B must have a cor- responding structure in the original image X that looks like one of the A t. The full complement of points is needed in image X to survive the open(close) operation, so that an element at the origin of this structure will occur in the final im- age. These compound structures are the basis members A t which satisfv equation (10).

2.3. An example o f a minimal basis set

As an example of a minimal basis set we have ex- tracted {A t} for the (X©A)OA operation using as A a 'L ' type structuring element, as in Figure 1. The opening basis set t~ and the closing basis set for this structuring element are shown in Figures l(a) and l(b) respectively.

By following the prescription of equation (24) there are many possible ways to independently combine the A j and A; shapes to produce a member of the basis set A t . For the example shown, there are

!*(I *3) + 8*(3*3) = 75

possible (non-unique) combinations. This total arises from the one l-element A j (the origin) and the eight 3-element A y, with each element in each A j surrounded by one of the three possible open- ing basis members. Of these 75 possible shapes there are 30 non-redundant members, as shown in Figure l(c).

There are two ways in which members of either {A t } or {At} become redundant. The first is if one member is identical to another member. Matching combinations of the A t and A i shapes in Figures I(a) and l(b) it becomes evident that this occurs frequently. The second way is if a particular A I (or At) is a superset of another A t (or At) as any members that are supersets of other members are redundant under a union of erosions operation. In the example in Figure I we find many At that are supersets of the first three AI (produced by taking A j as the origin), and hence are redundant.

3. Decomposition of multiple structuring elements

The use of interacting multiple structuring elements is one way in which we can refine the con- straint of the filtering action of morphological operations on images. Song and Delp [4] have reported the use of a set of h multiple structuring elements ~ = {Kh} in the following way

B = U ( X O K h) where K h a n , (28)

C=[')(BOKD where Khe,%. (29)

The use of a union of openings, and an intersec- tion of closings, effectively contains the decreasing and increasing properties of the respective opera- tions on the image--we wish the final filtered im- age to stay as close to the original image as possible while still removing unwanted shapes.

We want to express the entire operation of X = C as a union of erosions, such that

NI(UtxoKh))OKj, I-U(x®A t) (30)

and also the complementary relation

U[tN(xoKh))OKh]- U(x®At). (31)

After defining a joint closing decomposition set, and a joint opening decomposition set, the argu- ments for extracting basis shapes follow in exactly the same way as for a single structuring element.

3. !. The basis set A t Jbr the ~ ciose(U open(X)) operation

We define the intermediate image B and final image C as

B= U(At©K,,)=. U I y (A t(~K,,) ] ,, (32)

where we have used the Maragos equations (5) and (6) to decompose the open and close operations. The Khi are members of the opening basis set for the structuring element Kh, and the K~/are mem- bers of the closing basis set for structuring element Kh.

We define the joint opening decomposition set ~ such that

@={Ki}={(K,,)-k: keK,,,3K,,e.X}. (34)

178

Page 5: The design of morphological filters using multiple structuring elements, Part II: open(close) and close(open)

Volume 13, Number 3 PATTERN RECOGNITION LETTERS March 1992

0

O o =* • 0 .

• + 0

• 0 .

• 0 •

0 + 0

q . .

0

O 0

• 0 •

• O 0

o o o

0 + .

• • 0

• 0 .

. O 0

{b)

O 0 .

0 o , 0 . .

• + . 0 + 0

. 0 0 . . .

(o)

0 . o . o

. . . . O 0

0 • 0 0

• 0 .

• .I, o

• 0 0

• 0 .

0 + .

• . 0

0 o °

• 4- 0

• 0 •

• 0 . . . 0 , . . 0 . . . 0 . , 0 . . . 0 . . .

• 0 0 . . O 0 . . 0 0 . . 0 0 . 0 0 0 . 0 0 0 .

0 + 0 0 . + 0 0 0 + 0 . . + 0 . 0 + 0 0 . + 0 0

0 0 . . . 0 , . 0 0 0 0 . 0 0 0 0 0 . . . 0 . .

. . . . . O 0 . . . . . . O 0 . . . . . . 0 0 .

0 . . . 0 . . . . . 0 . . . . 0 . .

0 0 . . 0 0 . . 0 . 0 0 . 0 . 0 0 .

0 + 0 . . + 0 0 0 + 0 0 0 0 + 0 .

0 0 0 0 . 0 0 0 . . . 0 0

. 0 0 o

. 0 . . .

0 0 0 0 .

0 0 + 0 0

. 0 . . ,

0 0 0 . .

0 0 + 0 .

. . . 0 0

0 . . . . 0 , . . 0 . . . . 0 . . . . 0 . . . . 0 . . . .

0 0 . . 0 0 0 . . 0 0 . . . 0 0 . . . 0 0 . . . 0 0 . . .

0 + . . 0 0 ÷ . . . 0 + 0 . . 0 + . . 0 0 + 0 . 0 0 + . .

0 0 0 . . . . O . . 0 0 0 0 . 0 0 0 . . . . O 0 . . . 0 .

• . 0 0 . . . 0 0 . . . 0 0 . . . 0 0

0 . . . 0 . . . . 0 . . . . 0 . . . . 0 . . . . . 0 . .

O 0 • . O 0 • • • O 0 . . . O 0 • 0 • O 0 • 0 • . O 0 .

• + . . . . ÷ 0 . . . + . . 0 0 + 0 0 . 0 + 0 0 0 + . .

• O 0 . • • 0 0 0 • • O 0 • • O 0 • • D O 0 •

• 0 0 0 • • O 0 • • • 0 0 0 • • O 0

O . . . . O . . O . . . .

O O . O . O O . O O . O .

+ . . O O ÷ . . . . ÷ O O

O O . . . . O , . . O , ,

0 0 0 • • • O 0 • • O 0 •

(c)

Figure !. A 'L' shaped structuring element: (a) the closing decomposition set {A i} (not showing the origin), (b) the ot,ening decom- position set {Ai}, (c) the close{open) decomposition set {AI}.

This set is a pool of all the opening basis shapes Ktzi, over all the structuring elements Kh. Now we may write equation (32) as

-U(AIGKi) where Kie~ (35) i

and this is of the exact same form as equation (15). We now define the joint closing decomposition

set ¢ such that

- { l : J } = { r , / c_

O~(Kj®Kh),VKh~Jt}. (36)

The set ~ is a set of all the basis shapes KI/that satisfy X e K ~ - U(XOKi~) , f o r all the structuring elements Kh. Examples of joint decomposition sets can be found in Svalbe [5]. Having defined ~ equa- tion (33) may be written

C=~ [ j

--U[BOK j] where KY~. (37) J

179

Page 6: The design of morphological filters using multiple structuring elements, Part II: open(close) and close(open)

Volume 13, Number 3 PATTERN RECOGNITION LETTERS March 1992

Note that this is of the exact same form as equation (19).

As in Sections 2.1 and 2.2 we also require that the origin be a member of the final image C--this follows directly from taking A x as the image X in equation (30).

We now are in a very similar position as in Sec- tion 2.1, the only difference being that whereas previously we had Aie ~, we now have K~e ~, and whereas before we had A J E ~ , we now have KJE ~. The argument presented in Section 2.1 ap- plies in exactly the same way here, so that we state immediately the result that

{A t } = {At: A t =kJ@Ki, VkJEKJ,

:tK j ~ , ::IK~ ~ ~}. (38)

We find this time that the necessary basis shapes A t that satisfy equation (30) are produced by tak- ing a member of the joint closing decomposition set ¢~, and dilating each element of this member by one of the shapes in the joint opening set c~.

3.2. The basis set At for the U open(~ close(X)) operation

For this last case we define the intermediate im- age B and final image C by

l , , ,, , - -U[AIGKJ l where KJe~ ', (39)

J

C-U h

-U[BGKi] where KieC~ (40) i

using the results from Section 3.1. Again we know the origin is an element of the final image C (by substituting At for X in equation (31)), and we use the argument in Section 2.1 to produce the result for {At} as

{At} = {At: At=ki~K~ Vki~K i,

=lKie ~, 3KJ e~e[. (41)

The basis shapes {At} that satisfy equation (31) are produced by taking a member of the joint opening decomposition set and dilating each

element of this member by a member of the joint closing decomposition set.

The joint open and close decomposition defini- tions developed here can be applied [7] to simplify the procedure for the decomposition of known structuring elements A and to synthesise unknown A shapes directly from the data contained in residue images.

4. Conclusion

We have demonstrated that the close(open) and open(close) operations for single and multiple structuring elements can be broken down into equivalent sets of morphological filters and have derived a method to define these filters. The output of close(open) and open(close) filters contain the output from the statistical median (and median root) filters [61, so that the A t and At may serve to explore the link between these filters. The sets {A t } and {At} are potential- ly quite large, especially for multiple structur- ing elements, and this fact would detract from their application to parallel processing. However, these basis sets have wider uses: they directly represent the image at the data level. As such we may be able to start with these basis sets themselves and work backwards to obtain the optimum structuring element, or structuring elements, to best do the filtering job required. This approach has been developed and a paper is in preparation [71. By using partial sets [51 of these basis shapes we can also synthesise struc- turing elements that are not realisable in any discrete form.

References

[!1 Maragos, P. (1989). A representation theory for morpho- logical image and signal processing. IEEE Trans. Pattern Anal Machine hztell. 11 (6), 586-599.

[21 Haralick, R.L., S.R. Sternberg and X. Zhuang (1987). lin- age analysis using mathematical morphology. IEEE Trans. Pattern Anal Machine lntell. 9, 523-550.

[31 Svalbe, I.D. {1991). The geometry of basis sets for mor- phologic closure. IEEE Trans. Pattern Anal. Machine in- tell. 13 (12), 1214-1224.

180

Page 7: The design of morphological filters using multiple structuring elements, Part II: open(close) and close(open)

Volume 13, Number 3 PATTERN RECOGNITION LETTERS March 1992

[4] Song, J. and E.J. Delp (1990). The analysis of morpho- logical filters with multiple structuring elements. Computer Vision, Graphics, and linage Processing 50 (3), 308-328.

[5] Svalbe, i.D. and R. Jones (1992). The design of morpho- iogi~ filters using multiple structuring elements, Part l: openings and closings. Pattern Recognition Letters 13, 123-129.

[6] Maragos, P. and R.W. Schafer (1987). Morphological filters - Part ll: their relations to median, order-statistic, and stack filters. IEEE Trans. Acoust. Speech Signal Pro- cess. 35 (8) 1170-1184.

[7] Jones, R. and I.D. Svalbe (1991). The corrposition and de- composition of multiple structuring elements using basis sets of filters. Submitted to Pattern Recognition Letters.

181