On topology as applied to image analysis

On topology as applied to image analysis

COMPUTER VISION, GRAPHICS, AND IMAGE PROCESSING 52, 409-415 (1990) NOTE On Topology as Applied to Image Analysis GABOR T. HERMAN Medical Image...

562KB Sizes 2 Downloads 60 Views

COMPUTER

VISION,

GRAPHICS,

AND

IMAGE

PROCESSING

52, 409-415 (1990)

NOTE On Topology as Applied to Image Analysis GABOR T. HERMAN Medical

Image

Processing

Group, Department of Radiology, University Philadelphia, Pennsylvania 19104

of Pennsylvania,

Received August 16, 1989; revised March 30, 1990 We discuss the recently published claim of V. A. Kovalevsky that the topology of cellular complexes is the only appropriate topology for image analysis. In some sense we confirm this claim and even generalize it from the finite domain to an infinite one. We prove some results which can be interpreted to show that the class of partially ordered sets is strictly equivalent to a class of topological spaces which is certainly powerful enough to handle all of image analysis. However, such equivalence does not carry over when the partially ordered sets are complemented with a dimension function so as to form cellular complexes. In fact, it remains unclear whether the subclass of cellular complexes which use the assignment of dimension which is standard in image analysis is indeed powerful enough to encompass all problems of image analysis. 0 1990 Academic Press, Inc. 1. INTRODUCTION

In a recent publication V. A. Kovalevsky [l] surveyed the difficulties that have arisen in trying to adapt classical topological notions to image analysis and came up with the suggestion that the appropriate approach is that based on the notion of a cellular complex. Since we independently came to the same conclusion [2], we were particularly pleased to see the strong claim in [l] that “the topology of cellular complexes is the only possible topology for finite sets.” However, when we looked at the paper, we found that the logical flow of the actual presentation does not do justice to the underlying ideas. The following theorem is proved: “Every finite separable topological space is an abstract cellular complex.” After contemplating the statement of this theorem, we have come to the conclusion that it is rather vacuous, since the precise (mathematical) sense in which a topological space “is” a cellular complex is never defined. The proof of the theorem gives a way of defining a cellular complex from a finite separable topological space, but it does not discuss in a precise way the sense in which the topological structure is preserved under this transformation or the more subtle question of how much extra structure is introduced in order to map the topological space into the cellular complex. Hence, we were not convinced of the correctness of Kovalevsky’s conclusion that the “theorem is of great importance since it shows that the search for finite topological structures different from cellular complexes is hopeless.”

However, studying the details of Kovalevsky’s discussion and adding a few ideas of our own, we have come to the conclusion that there is a precise mathematical sense in which his strongly worded claim is correct. Much of our paper is devoted to clarifying the precise sense in which Kovalevsky’s claim is valid. In deriving the results, we have observed that the finiteness condition was used by Kovalevsky only very weakly. We have, therefore, replaced it with a lesser restriction, which makes our results applicable to image analysis over infinite domains (e.g., the infinite plane tesselated into equal-sized squares). 409 0734-189X/90

$3.00

Copyright 0 1990 by Academic Press, Inc. All rights of reproduction in any form reserved.

410

GABOR

T. HERMAN

Even though in some sense we confirm (and even generalize) Kovalevsky’s claim, we feel that its statement may very well be misleading. There are two reasons for this. The first is that there are much stronger senses in which a certain type of structure may suffice than the one proven for cellular complexes. For example, in what follows we prove some theorems, which may be interpreted as saying that the class of partially ordered sets is strictly equivalent to a class of topological spaces which is clearly powerful enough to encompass all topological problems of image analysis. Similar results apply to the finite and the “limited” variants of these classes. (Limited is defined in the body of the article.) No corresponding results exist if we put “cellular complexes” in place of “partially ordered sets.” In order to prove Kovalevsky’s claim, one complements the partially ordered sets with a dimension function to turn them into cellular complexes. This brings us to our second source of discomfort with Kovalevsky’s claim. The way dimension is assigned to geometrical objects in order to make the claim valid is quite different from the natural “geometrical” dimension of these objects. It is not clear that if the class of cellular complexes were restricted to the subclass in which all geometrical objects are given their natural dimension, we would still retain a large enough set of structures for handling the whole of image analysis. The rest of this note consists of formal definitions and proofs; for motivation and justification of the particular choice of definitions the reader is directed to the earlier literature ([l, 21 and the references in them). Since the note is aimed at the image analysis community, it is written to be mathematically self-contained. Hence it repeats such material that can be found in the mathematics literature, especially in [3, 41. For those who wish to see a recent survey on digital topology, [.5] is recommended. 2. THE

EQUIVALENCE ORDERED

OF CERTAIN SETS, AND

TOPOLOGICAL CELLULAR

SPACES, COMPLEXES

PARTIALLY

A TO-space (TS) is a pair (E, Y 1, where E is a set and Y is a set of subsets of E (called open sets) such that: Al. The empty set 0 and E are open. A2. The union of any collection of open sets is open. A3. The intersection of any two open sets is open. A4. For any two distinct elements e and e’ in E, there exists an open set S such that exactly one of e and e’ is in S. A TS (E, Y) is said to be finite if E is a finite set. Kovalevsky [l] deals only with finite TS; here we also discuss some weaker restrictions. We say that a TS (E, Y) is sparse if for every e in E there exists an open set (called the smallest neighborhood of e and denoted by NS(e)) which contains e and which is a subset of any open set that contains e. (In his 1937 paper, Alexandroff [3] introduced the notion of a sparse TS as a “diskreter TO-Raum.” For this reason, some later authors refer to a sparse TS as an “Alexandrov topology” [6].) PROPOSITION1.

Every finite TS is sparse.

Proo$ SN(e) is the intersection of all the (finitely many) open sets containing e. This is open by A3. 0

TOPOLOGY

FOR

IMAGE

ANALYSIS

411

PROPOSITION2. If (E, Y) is a sparse TS and e and e’ are distinct elements of E such that e’ E SN(e), then e e SN(e’). ProoJ Let S be the open set which by A4 contains exactly one of e and e’. If S contained e, then we would have that e’ E SN(e) c S, contrary to the choice of S. Hence e’ E S and e G S. It follows that SN(e’) G S and hence e G SN(e’). 0 We now show that Proposition 2 leads to a natural partial ordering of the elements of E. For any sparse TS (E, Y) we define the binary relation on E by (e, e’) E B, if, and only if, e’ # e and e’ E SN(e). PROPOSITION 3. For any sparse TS (E, Y), the binary relation B, antisymmetric and transitive.

on E is

Proof That B, is antisymmetric is immediate from Proposition 2. Suppose now that (e, e’) E B, and (e’, e”) E B,, i.e., that e’ E SN(e) and e” E SN(e’). By Proposition 2, this implies that en # e. By the definition of the smallest neighborhood it also follows that e” E SN(e”) c SN(e’) c SN(e) and so (e, e”) E B,. 0 We now introduce the notion of a partially ordered set and proceed to prove the essential equivalence of sparse To-spaces with partially ordered sets. A partially ordered set (POS) is a pair (E, B), where E is a set and B is an antisymmetric and transitive binary relation on E. A POS is said to be finite if E is a finite set. Let (E, B) be a POS and S be a subset of E. We say that S is B-open if, and only if, whenever e E S and (e, e’) E B it is also the case that e’ E S. We denote by Ys the set of B-open subsets of E. PROPOSITION4.

Zf (E,

B) is a POS, then (E, Y,) is a sparse TS.

Proof: We need to show that Al-A4 are satisfied by (E, Ys). For Al-A3 this is straightforward; we give details only for A4. For any e in E, we define ST(e) to be the set containing e and also all e’ such that (e, e’) E B. This set is B-open by the transitiveness of B. Now consider two distinct elements e and e’ in E. Clearly e E ST(e) and e’ E ST(e’). If e’ P ST(e), then ST(e) provides us with the S required by A4. If e’ E ST(e), then (e, e’) E B. By the antisymmetry of B, (e’, e) G B, and so e E ST(e’) and ST(e’) provides us with the S required by A4. This completes the proof that (E, Ye) is a TS. Finally, we have to show that (E, Ye) is sparse. In fact, the ST(e) defined in the previous paragraph will serve as the smallest neighborhood of e in (E, Y,). Clearly, ST(e) is B-open and contains e and, by definition, if S is a B-open set containing e, then S contains all e’ such that (e, e’) E B, i.e., S contains all elements of ST(e). 0 THEOREMS. (a) If (E, Y) is a (finite) sparse TS, then (E, BY) is a (finite) POS. Furthermore, YCBy,= Y. (b) If (E, B) is a (finite) POS, then (E, Y,) is a (finite) sparse TS. Furthermore, Bmd = B. Proo$ That a finite TS gives rise to a finite POS (and vice versa) is obvious, and will be ignored in the rest of the proof.

412

GABOR

T. HERMAN

(a) That given a sparse TS (E, Y), (E, BY) is a POS is immediate from Proposition 3. To complete this part of the proof, we need to show that a set S is B,-open if, and only if, S E Y. Suppose that S E Y. To show that S is &-open we need to show that whenever e E S and (e, e’> E B,, then e’ E S. By definition of B,, (e, e’) E B, implies that e’ E SN(e). This, together with e E S, gives that e’ E S. Suppose that S is B,-open. In order to show that S E Y, it is sufficient to show (by A21 that for every e E S, SN(e) c S (since in this case S is the union of those SN(e) for which e E S). Suppose e’ E SN(e) and e’ # e. By definition of B,, (e, e’) E B, and, by definition of B,-open, e’ E S. (b) That given a POS (E, B), (E, Ysl is a sparse TS is Proposition 4. To complete the proof, we need to show that, for any e and e’ in E, (e, e’) E Bcy,, if, and only if, (e, e’) E B. Suppose that (e, e’) E Bcysj. By definition, this means that e’ # e and e’ is in the smallest neighborhood of e in 05, Y,). It was shown in the proof of Proposition 4 that ST(e) is the smallest neighborhood of e in (E, Y,>. By definition of ST(e), it follows that (e, e’) E B. Suppose that (e, e’) E B. Then, e’ E ST(e), which is the smallest neighborhood of e in (E, YB). Also, by the antisymmetry of B, e’ # e. Hence, by definition of B cyBj, k 4 E BcyB,. 0 We interpret Theorem 1 as saying that the concepts of a sparse T,-space and of a partially ordered set are strictly equivalent. The theorem describes ways of defining a POS from an arbitrary sparse TS and of defining a sparse TS from an arbitrary POS, such that application of these two definitions (in either order) always gets us back to the very structure which was our starting point. Hence, if we believe (as indeed is reasonable) that sparse 7’,-spaces are sufficiently rich to handle problems of image analysis, there is nothing lost (and in principle nothing gained) if we use partially ordered sets instead. However, for some of us, the notion of partial ordering may be intuitively closer to the application than sparseness and T,,-separability (i.e., A4). Kovalevsky [l] takes this further: his aim is to deal with a notion which is intuitively even more appealing for image analysis, namely the notion of a cellular complex. In what follows we get to that notion via an intermediate step. Prior to doing that, we wish to make an important point: the appeal to intuition to which we referred above may be misleading. Consider the following example. Let E consist of point sets on the real line which are either of the form (n) or of the form {xln < x < II + l), where IZ is an integer. Let a subset S of E be defined to be open, if the union of elements of S (considered as subsets of the real line) is an open set in the classical topology of the real line. (E.g., {(xl0 < x < l), {l), (xl1 < x < 2)) is open, but ((xl0 < x < l), 11)) is not.) It is easy to see that this is a sparse TS, with SN((n)) = ((xln - 1
TOPOLOGY

FOR IMAGE

ANALYSIS

413

to the POS (E, BY) provided by our theory. (For further related discussion, see L7l.j After this diversion we proceed towards the notion of a cellular complex as applied to image analysis. A sparse TS (E, Y) is said to be limited if there exists an integer 1 such that, for any e in E, CARD(SN(e)) I 1. (CARD(S) denotes the number of elements in a finite set S. An implication of the definition is that, for a limited sparse TS, SN(e) is finite for all e E E.) We call the smallest such I the limit of the limited sparse TS. PROPOSITION

Prooj

5.

Obvious.

Every finite TS is a limited sparse TS. q

The converse of Proposition 5 is not true and some structures which are potentially interesting for image analysis are limited but not finite. (An example is given in our “diversion” above. It can easily be generalized to one based on the tesselation of the infinite plane into square-shaped pixels.) The following proposition points out a property of a limited sparse TS which is not necessarily a property of a sparse TS, in general. It is used later on in our discussion. PROPOSITION 6. If (E, Y) is a limited sparse TS, then there e&s an e in E such that SN(e) contains only e.

ProojI Take any e0 in E. By definition, CARD(SN(e,)) I I, where I is the limit of (E, Y). We now define inductively e, for i = 0, 1,2,. . . , such that as long as CARD(SN(ei)) > 1, CARD(SN(e,+,>) < CARD(SN(ei)). Clearly, if we succeed in doing this, then we must in a finite number of steps find an e such that SN(e) contains only e. The definition of ei+ r is simple: just take any element from SN(eJ other than ei. By Proposition 2, ei G SN(e,+i>. On the other hand, SN(e,+i) c SN(ei), as follows easily from the transitivity of B, as proved in Proposition 3. Hence CARD(SN(e,+ ,>I < CARD(SN(eJ). 0 A POS (E, B) is said to be limited if there exists an integer 1, such that for any e in E, the number of distinct e’ such that (e, e’) E B is strictly less than 1. We call the smallest such 1 the limit of the limited POS. PROPOSITION

Proo$

7.

Obvious.

Every finite POS is limited. •I

THEOREM 2. (a> Zf (E, Y) is a limited sparse TS with limit I, then (E, B,) is a limited POS with limit 1. Furthermore, TB,,, = Y. (b) Zf (E, B) is a limited POS with limit I, then (E, YB) is a limited sparse TS with limit 1. Furthermore, BCy,, = B.

ProoJ Most of the theorem is an immediate consequence of Theorem 1. The rest follows by observing that by the definition of B,, for any e in E, the number of distinct e’ such that (e, e’) E B, is one less than CARD(SN(e)) and the corresponding fact regarding ST(e) in the proof of Proposition 4. 0

414

GABOR

T. HERMAN

We can interpret Theorem 2 as saying that the concepts of a limited sparse To-space and of a limited partially ordered set are strictly equivalent. Our discussion following Theorem 1 is applicable here as well. Now we reproduce Kovalevsky’s definition of a cellular complex El]. A cellular complex (CC) is a triple (E, B, dim), where (E, B) is a partially ordered set and dim is a function from E into the set of nonnegative integers such that dim(e) < dim(&) for all pairs (e, e’) E B. A CC (E, B, dim) is said to be finite if E is finite. It is said to be limited if there exists an integer 1 such that dim(e) < 1, for all e E E. We call the smallest such 1 the limit of the limited CC. PROPOSITION8.

Every finite CC is limited.

Pro05

0

Obvious.

PROPOSITION9. For every limited POS (E, B) with limit 1, there exists a function dim, ffom E into the set of non-negative integers such that (E, B, dim,) LTa limited CC with limit 1.

Proof Let, for any e in E, l(e) be the number of distinct e’ such that (e, e’) E B. By definition, f(e) < E. We define dim.(e) = 1 - I(e) - 1. Clearly, 0 I dim,(e) < 1. For any (e, e’) E B we need to show that dim(e) < dim(e’). It suffices to show that I(e) > l(e’). This follows straightaway from the transitivity of B combined with the facts that (e, e’) E B but (e’, e’) g B. Finally, to see that the limit of (E, B, dim,) is 1, we need to show that there is an e in E such that l(e) = 0. This can be easily proved directly along the lines of the proof of Proposition 6, or can be considered to be a consequence of Theorem 2(b) and Proposition 6, noting that l(e) = CARD(ST(e)) - 1, where ST(e) is defined and discussed in the proof of Proposition 4. 0 Now let us examine Kovalevsky’s claim that “the topology of cellular complexes is the only possible topology of finite sets” in view of the results presented here. Every finite To-space is a limited sparse TS (Proposition 5). Every limited sparse TS is a .limited POS (Theorem 2(a)). Every limited POS can be complemented with a dim function which turns it into a (limited) cellular complex (Proposition 9). In this sense Kovalevsky’s claim has been reconfirmed and in fact generalized from finite T,,-spaces to limited sparse T,,-spaces. Nevertheless, there is something in the claim that might mislead people, in spite of its correctness in the strict mathematical sense. The concepts of limited sparse To-space and of limited cellular complex are not equivalent in the strict sense illustrated in Theorems 1 and 2 for other pairs of concepts. The dim function that one attaches in Proposition 9 is an additional structure. Neither we here nor Kovalevsky in El] provided a uniform way of getting from an arbitrary finite cellular complex to a finite To-space so that the method described above would get us back to the cellular complex with which we started. So the problem is not so much that cellular complexes are not rich enough, rather that they are too rich; a particular choice of the dim function may send us down a blind alley in our search for the “right” topology for image analysis.

TOPOLOGY

FOR IMAGE

ANALYSIS

41.5

That this point is not picayune is demonstrated by the fact that the way the dim function is defined in Proposition 9 (and this is based on the corresponding definition in [l]) leads to a definition which is quite different from what is “natural” in image processing. Take, for example, the two-dimensional generalization of the one-dimensional example given in the “diversion” above. Elements of E would then be pixel vertices, pixel edges, and pixel faces. Each vertex would bound (this is the relation B) four edges and four faces, and each edge would bound two faces. This would result (applying Proposition 9) in the limit 1 being 9, and dim assigning values 0, 6, and 8 to vertices, edges, and faces, respectively. These are, of course, not at all what we think of as the “dimensions” of these geometrical objects. Nor can the problem be simply overcome by remapping dim so that order is preserved but all contiguous integer values from zero on are assigned. For example, it is possible that in some application we may have to work in a subcomplex which contains no edges, then the remapping would assign to faces the “dimension” 1. So a question remains: if we allow only those cellular complexes in which geometrical objects have their “correct dimension” assigned by the dim function, do we still have a rich enough framework to cover all reasonable topological approaches to image analysis? 3. DISCUSSION

In attempting to fill in what we perceived as some logical gaps in Kovalevsky’s fascinating paper [l], we have ended up with some somewhat different results. We have succeeded in proving the strict equivalence (in the sense of the discussion given after Theorem 1) of the concepts of a sparse To-space and of a partially ordered set, as well as of the finite and limited versions of these concepts. For the limited (and hence the finite) versions of the concepts we have also shown, following Kovalevsky’s approach, that they can be complemented with a dim function so that the resulting structure is a cellular complex. However, we have found that this cellular complex is not one that we would naturally choose for image analysis and we have failed to see a way of showing the strict equivalence of a natural subclass of cellular complexes with a class of topological spaces which is clearly large enough to handle all potential image analysis problems. ACKNOWLEDGMENTS The work of the author is supported by NIH Grants HL28438 and CA50851. The author is grateful to Drs. T. Y. Kong, R. D. Kopperman, P. R. Meyer, J. K. Udupa, and to one of the referees for suggesting appropriate changes to earlier versions, and to Mary A. Blue for typing the manuscript. REFERENCES 1. V. A. Kovalevsky, Finite topology as applied to image analysis, Comput. V&ion Graphics Process. 46, 1989, 141-161. 2. G. T. Herman and D. Webster, A topological proof of a surface tracking algorithm, Comput. Graphics

Image

Process.

23, 1983,

Image vision

162-177.

3. P. Alexandroff, Diskrete Rlume, Mat. Sb. 2 44, 1937, 501-518. 4. E. Khalimsky, Finite, primitive and Euclidean spaces, J. Appl. Math. Simul. 1, 1988, 177-196. 5. T. Y. Kong and A. Rosenfeld, Digital topology: Introduction and survey, Comput. Ksion Graphics Image Process. 48, 1989, 357-393. 6. P. T. Johnstone, Stone Spaces, Cambridge Univ. Press, Cambridge, 1982. 7. E. Khalimsky, Pattern analysis of n-dimensional digital images, in Proceedings, IEEE Int. Conf. Syst. Man. Cyber., Atlanta, 1983, pp. 1559-1562.