Thinning on Quadratic, Triangular, and Hexagonal Cell Complexes

0 downloads 0 Views 350KB Size Report
that Kovalevsky's thinning method can be parallelized, by showing that the ... are congruent convex regular polygons: the quadratic one (where all polygons ... congruent to an equilateral triangle), and the hexagonal one (where the polygons ... identifying each (pixel) p ∈ D with the 2-cell given as the unit square centered.
Thinning on Quadratic, Triangular, and Hexagonal Cell Complexes Petra Wiederhold and Sandino Morales Department of Automatic Control, Centro de Investigacion y de Estudios Avanzados (CINVESTAV) - IPN Av. I.P.N. 2508, Col. San Pedro Zacatenco, Mexico 07000 D.F., Mexico {biene,smorales}@ctrl.mx

Abstract. This paper deals with a thinning algorithm proposed in 2001 by Kovalevsky, for 2D binary images modelled by cell complexes, or, equivalently, by Alexandroff T0 spaces. We apply the general proposal of Kovalevsky to cell complexes corresponding to the three possible normal tilings of congruent convex polygons in the plane: the quadratic, the triangular, and the hexagonal tilings. For this case, we give a theoretical foundation of Kovalevsky’s thinning algorithm: We prove that for any cell, local simplicity is sufficient to satisfy simplicity, and that both are equivalent for certain cells. Moreover, we show that the parallel realization of the algorithm preserves topology, in the sense that the numbers of connected components both of the object and of the background, remain the same. The paper presents examples of skeletons obtained from the implementation of the algorithm for each of the three cell complexes under consideration. Keywords: parallel thinning, 2D binary images, simple cell, locally simple cell, cellular complex, cell complex, Alexandroff space, Kovalevsky skeleton.

1

Introduction

This paper deals with theoretical aspects of thinning on 2D binary images. Thinning is an important and widely used preprocessing method in digital image processing, in order to facilitate the classification or recognition of objects of interest. In the case of binary digital images, where the set of objects has already been determined, thinning is an iterative procedure which produces a particular subset, named skeleton, from the set of all object elements. The skeleton should represent topological properties like connectedness, as well as geometrical properties related to size and form, of the object. At the same time, the skeleton should have as less as possible elements. During thinning, in each iteration, simple and non-final object elements are deleted from the “frontier” of the remaining object. Due to [17], final elements are situated at the end of arcs, which should be part of the skeleton, and simple elements are those whose deletion preserves the connectedness both of the object and of the background. In the spirit of this idea, we define the following: V.E. Brimkov, R.P. Barneva, H.A. Hauptman (Eds.): IWCIA 2008, LNCS 4958, pp. 13–25, 2008. c Springer-Verlag Berlin Heidelberg 2008 

14

P. Wiederhold and S. Morales

Definition 1. A thinning method, to be applied to an object within a 2D binary image, is said to preserve topology, whenever it preserves both the number of connected components of the object and the number of connected components of the background. Important theoretical questions about thinning are, 1) the characterization of simplicity by local properties considered only within certain neighborhood of the element, for example, by a local simplicity. 2) the question if a proposed method can be parallelized, that means, if the parallel implementation of the method preserves topology. What “connected component”, “frontier”, “simple”, and “final” mean, depends on the mathematical model used for the (domain of the) digital image. Digital images are usually modelled by adjacency graphs. In particular, for 2D digital binary images, the (4,8)- and (8,4)- adjacency graphs are applied, but there are also proposals for adjacency graphs related to the triangular and hexagonal tilings of the plane [2]. Theoretical treatments in a more general setting have been published, for example by Saha et al ([18], [6]), and by Kong [4]. The domain of a digital image can be alternatively modelled by a cell complex, or, equivalently, by an Alexandroff T0 space. This model has been introduced, justified, defended and applied by Kovalevsky, see for example [7], [8], [9], [10], [11], but also by other authors, see for example [5], [20] and [21]. In this regard, in a short note within [8], a thinning method was proposed, which seems to be the first proposal of a thinning algorithm on cell complexes. The same method was shortly described within [9] and [10], each time with augmented detail, but not enough to cover the theoretical background of this method. Due to our opinion, thinning on cell complexes is a very interesting topic, and the publications [8], [9] and [10] opened many theoretical questions, which provided the motivation of our investigations. The scope of our paper is to give some theoretical foundation of Kovalevsky’s thinning method. In this context, we will answer both theoretical questions cited above: First, we prove that a local simplicity is sufficient to satisfy simplicity, and that both are equivalent for certain elements. Second, we show that Kovalevsky’s thinning method can be parallelized, by showing that the parallel realization of the method preserves topology. The paper is organized as follows: In sections 2 and 3, preliminaries about cell complexes and their corresponding Alexandroff topological spaces, and important suppositions for this paper, are presented. In section 4, the relation between simplicity and local simplicity, as well as a characterization of simplicity by a connectivity number, are studied. Section 5 presents and analyzes Kovalevsky’s thinning algorithm. Section 6 presents an idea to prove that the parallel implementation of Kovalevsky’s algorithm preserves topology. Section 7 shows some examples of the application of Kovalevsky’s algorithm, and section 8 contains concluding remarks. In this conference paper, only the main ideas of the proofs are presented. All properties presented in this paper are proved in detail, under the same suppositions, in [13]. All proofs will be presented in detail, under more general suppositions, within a forthcoming journal paper.

Thinning on Quadratic, Triangular, and Hexagonal Cell Complexes

15

Throughout the paper, ZZ denotes the set of integer numbers, and IR the set of real numbers. In a topological space X, for M ⊆ X, clX (M ) denotes the closure of M , intX (M ) is the interior of M , f rX (M ) is the frontier of M , but we omit the index X if we work only in one space X. We denote by IR2 the Euclidean plane, equipped with the standard topology. For a finite set M , | M | denotes the number of its elements. For a subset M of a set X, M c denotes its complement X \ M .

2

Cell Complexes

Recall the definition of a cell complex, from [16], as it has been used in many papers of Kovalevsky: Definition 2. An abstract cell complex is a structure (X, ≤, dim), where (X, ≤) is a poset (partially ordered set, that is, ≤ is a binary reflexive transitive and antisymmetric relation on the set X), and dim : X → IN ∪ {0} is a function such that x ≤ y implies that dim(x) ≤ dim(y), for any x ∈ X. The elements of X are called cells, and, for x, y ∈ X, if dim(x) = k, x is named k-cell. The dimension of (X, ≤, dim) is defined by sup{dim(x) : x ∈ X}. If X = (X, ≤, dim) is an abstract cell complex, then a subcomplex M = (M, ≤M , dimM ) of X is entirely determined by the subset M ⊆ X, by defining ≤M as the restriction of ≤ onto M × M , and dimM as the restriction of the function dim onto M . In this paper, we consider particular abstract cell complexes, related to the three normal tilings of congruent regular convex polygons in the Euclidean plane IR2 . Recall that a normal tiling of the plane is a family of (closed) polygons whose union covers the plane, and where any intersection of two polygons, if non-empty, is a common side of both polygons, or a unique common vertex. It is well-known that there exist only three normal tilings of the plane whose elements are congruent convex regular polygons: the quadratic one (where all polygons are congruent to the same square), the triangular one (where the polygons are congruent to an equilateral triangle), and the hexagonal one (where the polygons are congruent to a regular hexagon), see section 8.3 of [15]. There is a natural bounding relation on the set C of all polygons of a tiling T , and all their sides and vertices: let M and N be subsets of IR2 each of which is an element of C, then define M ≤ N if and only if M ⊆ clIR2 (N ). Whereas the elements of C are considered as closed subsets of IR2 in [3], we consider C to be a decomposition of IR2 , so, the polygons are supposed to be open sets in IR2 , and each side is considered without its end points. There is a natural dimension on the set C of all polygons, sides of polygons, and vertices of polygons of T , given for any x ∈ C, by dim(x) = 2 if x is a polygon, dim(x) = 1 if x is a side, and dim(x) = 0 if x is a vertex. It is easy to see that (C, ≤, dim) is a two-dimensional abstract cell complex, for each of the three tilings under consideration.

16

P. Wiederhold and S. Morales

Because we study only topological (and not, geometrical) properties of the cell complex C, we permit the polygons of the triangular and hexagonal tilings to be no regular polygons (but they have to be congruent and convex). In the rest of this paper, the term cell complex C = (C, ≤, dim) always means an abstract cell complex, constructed as just explained, from the quadratic or triangular or hexagonal normal tiling of the plane. We suppose that a two-dimensional binary digital image is modelled by a cell complex C, where an object of interest is modelled by a finite subcomplex T , such that the image function assigns the value 1 to any cell of T , whereas each cell of T c has the value 0; T c is named the background. To model the digital image by a cell complex C, supposing that the 2D image is defined on a discrete set D ⊆ IR2 , there are two principal ideas, as follows: a) D is identified with the set of 2-cells (or, with the set of 0-cells [20]) of C, and the other cells of C are generated as an additional structure, which serves to describe (topological) properties of the set of 2-cells, or equivalently, of D. Starting with D = ZZ 2 , Kovalevsky constructed the quadratic cell complex by identifying each (pixel) p ∈ D with the 2-cell given as the unit square centered in p, and then, assigning 1- and 0-cells to the object by a maximum rule [7]; under this construction, the object is modelled by a closed subcomplex. This philosophy is also defended in [3], [5], and [21]. It is possible to identify D = ZZ 2 with the set of 2-cells of the triangular and the hexagonal cell complex, too. b) D is identified with C. Taking into account our supposition that the elements of C form a decomposition of IR2 , the natural quotient map π : IR2 → C, which assigns to each point x of IR2 the (unique) cell of C which contains x, is an example of a digitization map. For M ⊆ IR2 , π(M ) is the set of all cells which, as subsets of IR2 , intersect M , so, this is an analog to the Gauss digitization defined for a set of pixels, see page 56 of [3]. We applied this digitization scheme in order to generate the objects for our experiments. We are conscious that in practice, a digital image is modelled by a finite portion M of the cell complex C. For our implementations of the thinning algorithm to be correctly working, we suppose that the object of interest T does not touch the boundary of the image domain M , or, equivalently, T is completely surrounded by cells of M \ T . Our proofs do not need such a supposition, because they work in the complete cell complex C, and any object T is supposed to be finite.

3

Cell Complexes and Alexandroff Spaces

It is well-known that any poset (X, ≤) generates a topological T0 space, in which any element is contained in a minimal open neighborhood, given as the intersection of all open sets which contain this element. Such spaces were named discrete spaces by Alexandroff [1], but nowadays, they are usually called Alexandroff spaces ([5], [21]). Alexandroff T0 spaces and posets are equivalent structures: For a given poset (X, ≤), the set st(x) = {y ∈ X : x ≤ y}, named the open star of x, is the minimal open neighborhood of x, and the family {st(x) : x ∈ X} ∪ {∅} is

Thinning on Quadratic, Triangular, and Hexagonal Cell Complexes

17

a base of an Alexandroff T0 topology τ on X. Conversely, for a given Alexandroff T0 space (X, τ ), the corresponding partial order, called the specialization order of (X, τ ), is defined by x ≤ y ⇔ x ∈ cl(y) ⇔ y ∈ st(x). For this reason, a cell complex is a topological model for digital images. The specialization order ≤ of (X, τ ) can be used to describe topological properties in (X, τ ), for example as follows (see [1], [21]): cl(M ) = {y ∈ X : y ≤ m for some m ∈ M }, cl({x}) = {y ∈ X : y ≤ x}; int(M ) = {m ∈ M : st(m) ⊆ M } = {m ∈ M : m ≤ y implies y ∈ M }; f r(M ) = {y ∈ X : st(y) ∩ M = ∅ and st(y) ∩ M c = ∅} = {y ∈ X : y ≤ m for some m ∈ M and y ≤ m for some m ∈ M c }. In this work, we will also use a concept dual to the frontier, called open frontier, which was introduced in [8] and is important in order to formulate the thinning algorithm. Definition 3. Let (X, τ ) be an Alexandroff T0 space and M ⊆ X. The open frontier of M is defined to be the set of (M ) = {y ∈ X : cl({y}) ∩ M = ∅ and cl({y}) ∩ M c = ∅}. Using the properties quoted above, it is clear that of (M ) = {y ∈ X : m ≤ y for some m ∈ M and m ≤ y for some m ∈ M c }. In our two-dimensional cell complex C, for any M ⊆ X, f r(M ) does not contain any 2-cell, and of (M ) does not contain any 0-cell. The open frontier of M is the frontier of M in the dual topological space which is determined by the reversed specialization order ≥. Another important property is connectedness, which can be described by means of a graph theoretical one, derived from the specialization order, as we will see in what follows. Definition 4. Let (X, ≤) be a poset. Two elements x, y ∈ X are called incident if x ≤ y or y ≤ x. The set in(x) = {y ∈ X : x is incident with y}, for x ∈ X, is named incidence set of x. Note that the incidence relation is reflexive and symmetric. Hence, X with the incidence relation is an undirected graph, called incidence graph, which provides a well-known graph theoretical connectedness concept: Definition 5. Two elements p, q of X are named connected in X if there exist a finite sequence {p0 , p1 , ..., pn−1 , pn } of elements of X such that p0 = p and pn = q, and pi is incident with pi+1 , 0 ≤ i ≤ n − 1; this sequence is called a pq-path. A subset M of X is named connected in the incidence graph if any two p, q ∈ M are connected in M . Now, considering also the topological space (X, τ ) corresponding to the poset (X, ≤), recall that X is (topologically) connected if there are no two open disjoint non-empty proper subsets A and B of X such that A ∪ B = X. Then, a subset M ⊆ X is connected if the topological subspace M is connected. The following property is known (see [5]). Lemma 1. Let (X, τ ) be an Alexandroff T0 space, ≤ its specialization order, and M ⊆ X. Then, M is connected if and only if M is connected in the incidence graph.

18

P. Wiederhold and S. Morales

This lemma is true for the Alexandroff T0 space corresponding to any cell complex C, where we have for x ∈ C that in(x) = st(x) ∪ cl({x}); in particular, in(p) = st(p) for any 0-cell p, and in(q) = cl({q}) for any 2-cell q.

4

Simplicity, Local Simplicity, and Connectivity Number

In analogy to the usual definitions of simple points and end points in adjacency graphs, we define the following: Definition 6. Let T be an object in the cell complex C, and p ∈ T . (i) The cell p is named simple if T has the same number of connected components as T \ {p}, and, T c has the same number of connected components as T c ∪ {p}. (ii) The cell p is named final if it is incident with exactly one cell q ∈ T , q = p. Kovalevsky used in [9] another definition of simplicity, which we will name local simplicity and is defined in the following. We comment that in [10], another (local) simplicity (named IS-simplicity) was defined, which will be taken into account in our forthcoming paper, too. Definition 7. Let T be an object in the cell complex C, and p ∈ (f r(T ) ∪ of (T )) ∩ T . The cell p is named locally simple, in the case that p ∈ f r(T ), if (st(p) \ {p}) ∩ T and (st(p) \ {p}) ∩ T c both are non-empty and connected, and, in the case that p ∈ of (T ), if (cl({p}) \ {p}) ∩ T and (cl({p}) \ {p}) ∩ T c both are non-empty and connected. It is easy to see that any simple or final cell of T belongs to (f r(T ) ∪ of (T )) ∩ T . In practical thinning algorithms, the simplicity of an element x is checked using local properties, for example, by template matching, or, by calculating some connectivity number, usually based on adjacency graphs, whose value indicates simplicity, see [14]. The first idea was realized by implementations of Kovalevsky’s algorithm for the quadratic cell complex in [22], and for the hexagonal cell complex in [19]. The second idea was applied in [13] to implement the same algorithm on a triangular cell complex. In the following, a connectivity number for cell complexes is introduced, which can be used for deducing a characterization of simplicity by the local simplicity. First, observe the following important properties. Lemma 2. In any cell complex C, for any cell p ∈ C, the set of cells of (in(p) \ {p}) can be ordered in a cyclic sequence {c0 , c1 , ..., ck } such that, in this sequence, (i) any two consecutive cells are incident (including that c0 is incident with ck ), (ii) any cell is incident with exactly two other cells, (iii) the cells are alternating a-cells and b-cells, where (a, b) = (1, 2) for any 0-cell p, (a, b) = (0, 2) for any 1-cell p, (a, b) = (0, 1) for any 2-cell p. (iv) For any 1-cell p, the sequence has exactly four cells.

Thinning on Quadratic, Triangular, and Hexagonal Cell Complexes

19

Definition 8. Let T be an object in the cell complex C, and p ∈ T . If {c0 , ..., ck } is a cyclic sequence of the cells of (in(p) \ {p}), which satisfies all properties of lemma 2, and vi denotes the value of the cell ci in the binary image represented by C (for i = 0, 1, ..., k =| in(p) \ {p} |), then define the connectivity number of p to be the number |in(p)|−2

cn(p) =



| vi − v(i+1) |,

i=0

where the sum in the index set is calculated modulo (| in(p) | −1). The connectivity number is the number of changes from value 1 to value 0 or vice versa, in the set (in(p) \ {p}), and its definition depends on lemma 2. It is easy to see that cn(p) is independent of the selection of the cyclic sequence, and the following properties are proved in [13]: Lemma 3. Let T be an object in the cell complex C, and p ∈ T . Then, (i) cn(p) is strictly positive if and only if p ∈ f r(T ) ∪ of (T ). (ii) For p ∈ f r(T ) ∪ of (T ), the number of connected components of (in(p) \ {p}) ∩ T equals the number of connected components of (in(p) \ {p}) ∩ T c, and both are equal to 12 cn(p). The connectivity number will be used to characterize simplicity, based on the following property: Theorem 1. Let T be an object in the cell complex C, and p ∈ (f r(T )∪of (T ))∩ T . If p is locally simple then p is simple. Proof. Consider here only the case that p ∈ f r(T ). Assuming that p is not simple, we prove that (st(p) \ {p}) ∩ T or (st(p) \ {p}) ∩ T c is not connected: Based on definition 7, we have to study the following two suppositions: (1) T \ {p} has strictly more connected components than T . (2) T c ∪ {p} has strictly less connected components than T c . Consider (1) (the proof under (2) is similar). Since p ∈ f r(T ), dim(p) ∈ {0, 1}. (1a) If p is a 0-cell, the supposition (1) and lemma 1 imply that there exist q1 , q2 ∈ T \ {p} such that there is no q1 q2 -path in T \ {p}, but there exists a q1 q2 -path w in T . Provided that w is not a path in T \ {p}, it follows that w = {q1 = γ1 , ...γi−1 , p, γi+1 , ..., γn = q2 }, where 2 ≤ i ≤ n − 1 and γi−1 , γi+1 are distinct. Supposing that (st(p) \ {p}) ∩ T is connected, there is a γi−1 , γi+1 -path z in (st(p) \ {p}) ∩ T , implying that {q1 = γ1 , ...γi−1 } ∪ z ∪ {γi+1 , ..., γn = q2 } is a q1 q2 -path in T \ {p}, which contradicts our supposition. In consequence, (st(p) \ {p}) ∩ T is not connected. (1b) If p is a 1-cell, let {p1 , p2 } = cl({p})\{p}, and {c1 , c2 } = st(p)\{p}. Because p ∈ f r(T ) ∩ T , (st(p) \ {p}) ∩ T c = ∅. Furthermore, by studying the incidence set of p, it is not difficult to prove that (st(p) \ {p}) ∩ T = ∅, which implies by lemma 2 that (st(p) \ {p}) ∩ T c = {c1 , c2 } which is not connected. Now we apply theorem 1 in order to prove the following characterization of simplicity by means of the connectivity number.

20

P. Wiederhold and S. Morales

Proposition 1. Let T be an object in the cell complex C, and p ∈ (f r(T ) ∪ of (T )) ∩ T . Then p is simple if and only if cn(p) = 2 . Proof. Consider here only the case p ∈ f r(T ). Suppose first that cn(p) = 2. By theorem 1, for showing that p is simple, it is sufficient to prove that (st(p)\{p})∩ T and (st(p) \ {p}) ∩ T c both are non-empty and connected. It is easily seen that both sets are non-empty. Now, if p is a 0-cell then in(p) \ {p} = st(p) \ {p}, and lemma 3 implies that each of the sets (st(p)\{p})∩T and (st(p)\{p})∩T c consists of exactly one connected component. If p is a 1-cell then (st(p) \ {p}) ∩ T = ∅, or (st(p) \ {p}) ∩ T has exactly one element. In both situations, p is simple. Suppose now that cn(p) = 2, and let us prove that then p is not simple. By lemma 3 and using p ∈ f r(T ), we can assume that cn(p) ≥ 4. Hence each of the two sets (in(p) \ {p}) ∩ T and (in(p) \ {p}) ∩ T c has at least two connected components. Choose a cyclic sequence {c0 , c1 , ..., ck } of (in(p) \ {p}) such that the cells cα , cβ belong to distinct components of (in(p) \ {p}) ∩ T c , and cγ , cδ belong to distinct components of (in(p) \ {p}) ∩ T , and α < γ < β < δ. If cα , cβ belong to distinct components of T c then p is not simple because cα , cβ belong to the same component of T c ∪ {p}. Suppose now that cα , cβ belong to the same component of T c . If cγ , cδ belong to distinct components of T \{p} then again, p is not simple. But if cγ , cδ are cells of the same component of T \{p} then, by the alternating position of cα , cβ , cγ , cδ , the cells cα , cβ belong to distinct components of T c , which contradicts our supposition. In consequence, cn(p) = 2 implies that p is not simple. Proposition 1 and lemma 3 imply the following equivalence. Corollary 1. Let T be an object in the cell complex C, and let p ∈ (f r(T ) ∪ of (T )) ∩ T be a 0-cell or a 2-cell or a non-final 1-cell. Then p is simple if and only if p is locally simple .

5

Kovalevsky’s Thinning Algorithm

Recall that any object T is a finite subcomplex of a cell complex C, each cell of T has value 1, and each cell of T c has value 0. To delete a cell of T means that its value is changed from 1 to 0, so, after its deletion, the cell belongs to T c . We quote from [9] and [10] the following algorithm which in our paper will be named Kovalevsky’s algoritm: Definition 9. Kovalevsky’s algorithm: Let T be an object in a cell complex C. Each iteration consists in the following two steps: 1) Detect and delete all cells from f r(T ) ∩ T , which are simple and non-final. Count the number of cells which are deleted in this step, and denote it by a. Let T be the remaining object. 2) Detect and delete all cells from of (T ) ∩ T , which are simple and non-final. Count the number of cells which are eliminated in this step, and denote it by b. Let T be the remaining object.

Thinning on Quadratic, Triangular, and Hexagonal Cell Complexes

21

In the case that a + b = 0, perform the next iteration, starting with step 1; in the case a + b = 0, the algorithm is finished, and the actual remaining object T is considered the result of the algorithm, and will be called the Kovalevsky skeleton. Kovalevsky considered any subcomplex of an arbitrary cell complex as an input object. Nevertheless, the unique example of [9] and [10] involved a closed object. By our theorem 1, the global property of simplicity is guaranteed by the local simplicity. In [9], Kovalevsky defines a cell to be simple if it is locally simple due to our definition. Hence, his proposal of algorithm previews the detection of locally simple cells. However, our characterization of simplicity by the connectivity number is another useful base for the implementation of the algorithm. The definition of the algorithm does not specify whether a sequential or a parallel implementation is described. In a sequential implementation, step 1 of the algorithm (and, similarly, step 2) works in the following manner: First, determine f r(T ) ∩ T = {m1 , m2 , ..., mk }. Then, for i = 1, 2, ..., k, if mi is detected to be simple and non-final in T , then delete mi immediately from T , that is, T := T \ {mi }, before proceeding to check the next element mi+1 . In consequence, the deletion of some mi from T can have influence on whether mi+1 is simple and non-final in T or not. It is evident from the definition of simple elements, that the sequential deletion of simple elements always preserves topology. Hence, in particular, the application of a sequential implementation of Kovalevsky’s algorithm, applied to a non-empty connected object, produces a non-empty connected Kovalevsky skeleton. The situation is distinct for the parallel implementation of Kovalevsky’s algorithm. In this case, step 1 (and, similarly, step 2) works as follows: First, determine f r(T )∩T = {m1 , m2 , ..., mk }. Then, for i = 1, 2, ..., k, if mi is detected to be simple and non-final in T , then it is marked but not (yet) deleted. When all cells of {m1 , m2 , ..., mk } have been checked, then all marked cells are deleted, that is, T := T \ {m ∈ f r(T ) ∩ T : m simple and non-final in T }. In consequence, the fact that some cell mi is marked as to be deleted later, does not have any influence on whether mi+1 is simple in T or not. In other words, the simplicity of a cell is checked always with respect to the object which equals the actual remaining whole object at the beginning of the step. It is well-known that the resulting skeletons obtained from sequential and from parallel implementations of the same thinning algorithm can be quite distinct, and, that it is far from trivial whether a parallel implementation of a thinning algorithm, preserves topology. We will show in the next section that the parallel implementation of Kovalevsky’s algorithm preserves topology.

6

Parallel Thinning Due to Kovalevsky’s Algorithm

Recall from definition 9 that each iteration of Kovalevsky’s algorithm consists in two steps. The following theorem will imply that Kovalevsky’s algorithm can be parallelized.

22

P. Wiederhold and S. Morales

Theorem 2. Let T be an non-empty object in a cell complex C. Denote by Tk the remaining object after having applied k steps of the parallel implementation of Kovalevsky’s algorithm to the input object T , for k ≥ 0, where T0 = T . Then, for all k ≥ 1, the number of connected components of Tk is equal to the number of components of T , and also, the number of connected components of Tkc equals the number of components of T c. Proof. We give here only the main idea of the proof by induction on k. Let us call two objects equivalent if they have the same number of connected components, and if the numbers of connected components of their complements also coincide. In the induction base it is proved that T1 is equivalent to T , and then, under the induction hypothesis that Tk is equivalent to T , it is proved that Tk+1 is equivalent to T . Both the induction base and the induction step proof, are based on the following reasoning: Let R be an object which is is equivalent to T , and whose simple non-final cells r1 , ..., rn are cells of its frontier [or, analogously, of its open frontier], which are arbitrarily ordered and have been detected in a parallel manner. The latter means that each of these cells was detected to be simple and non-final, as a cell of the whole object R. It is proved using (n − 1) steps that R1 = R \ {r1 , ..., rn } is equivalent to T . The l-th step consists in proving that rl+1 , ..., rn are simple in R \ {r1 , ..., rl }. That R \ {r1 , ..., rl } is equivalent to T , is obtained in the (l − 1)-th step, for l > 1. In the case l = 1, we apply that R is equivalent to T . In the (n − 1)-th step, it is proved that the cell rn is simple in the object R\{r1 , ..., rn−1 }, so, it is proved that R1 is equivalent to T . Observe that R1 is the result of having applied to the object R one step of the parallel implementation of Kovalevsky’s algorithm, which corresponds to the treating of cells of the frontier [or, analogously, of the open frontier]. Corollary 2. The parallel implementation of Kovalevsky’s algorithm preserves topology. In particular, the Kovalevsky skeleton of any non-empty object, is nonempty; and, the Kovalevsky skeleton of any connected object, is connected.

7

Examples of Kovalevsky Skeletons

In this section we show some examples of skeletons, obtained by the parallel implementation of Kovalevsky’s algorithm. Figure 1 shows the skeletons of a capital “T”, in three distinct orientations. Observe the robustness of the skeleton with respect to rotations, on the hexagonal cell complex, which, due to our experiments, has “better” geometrical properties than the other two cell complexes; this topic will be treated in another paper. Figures 2 and 3 present objects and their skeletons on the quadratic cell complex.

Thinning on Quadratic, Triangular, and Hexagonal Cell Complexes

23

Fig. 1. On the hexagonal complex, the skeletons of a letter T, in three orientations

Fig. 2. On the quadratic cell complex, left: a closed object to be thinned, middle: a remaining object during the thinning process, right: the resulting skeleton

Fig. 3. On the quadratic cell complex, an object (left), which is neither closed nor open, and its corresponding skeleton (right)

The object in figure 3 present the interesting property that the skeleton can contain cells p, q, r, p a 0-cell, q a 1-cell, and r a 2-cell, such that p ≤ q ≤ r. Hence the skeleton is a subcomplex which has a topological dimension, as defined in [21] for Alexandroff spaces, equal to two. This contradicts the intuitive idea, that a skeleton should be “thin” or “curve-like”, but similar properties were observed for skeletons on adjacency graphs [12]. Figure 4 presents another example for this fact.

24

P. Wiederhold and S. Morales

Fig. 4. On the triangular cell complex, left: the original object, middle: its skeleton, right: a detail of the skeleton, where a chain of the form p < q < r in the poset can be observed

8

Concluding Remarks

In this paper, we give a theoretical foundation of Kovalevsky’s thinning algorithm, if it is applied to 2D binary images modelled by a quadratic, triangular, or hexagonal cell complex. We proved that local simplicity is sufficient for simplicity, and we characterized simplicity by a connectivity number which is locally computed. Moreover, we show that the parallel realization of the algorithm preserves topology. It is clear from Kovalevsky’s algorithm, that the resulting Kovalevsky skeleton is irreducible in the sense, that it does not contain any simple non-final cell, in analogy to the definition of irreducibility of subgraphs of certain adjacency graphs used in [12]. The Kovalevsky skeleton is unique if obtained from the parallel implementation; but for sequential implementations, there are various ways of tracing the (open) frontier, which can result in different skeletons. The example presented in figure 4 shows that the Kovalevsky skeleton can contain cells p, q, r, pairwise distinct, such that p ≤ q ≤ r. In this case, the topological dimension, as defined in [21] for Alexandroff spaces, of the skeleton is equal to two. Acknowledgements. The authors thank the referees for their useful comments. Figure 1 is from [19]; the authors thank Alfredo Trejo for having implemented Kovalevsky’s algorithm on the hexagonal cell complex.

References 1. Alexandroff, P.: Diskrete R¨ aume. Matematicheskij Sbornik 2(44), 501–519 (1937) 2. Deutsch, E.S.: Thinning Algorithms on Rectangular, Hexagonal, and Triangular Arrays. Communications of the ACM 15(9), 827–837 (1972) 3. Klette, R., Rosenfeld, A.: Digital Geometry - Geometric Methods for Digital Picture Analysis. Morgan Kaufman Publ., Elsevier, CA, U.S.A. (2004)

Thinning on Quadratic, Triangular, and Hexagonal Cell Complexes

25

4. Kong, T.Y.: On the Problem of Determining Whether a Parallel Reduction Operator for N-dimensional Images Always Preserves Topology. In: Vision Geometry II. SPIE Proc. Series, vol. 2060, pp. 69–77 (1993) 5. Kong, T.Y., Kopperman, R., Meyer, P.R.: A topological approach to digital topology. Amer. Math. Monthly 98, 901–917 (1992) 6. Kong, T.Y., Saha, P.K., Rosenfeld, A.: Strongly Normal Sets of Contractible Tiles in N Dimensions. Pattern Recognition 40, 530–543 (2007) 7. Kovalevsky, V.A.: Finite Topology as Applied to Image Analysis. Computer Vision, Graphics and Image Processing 46, 141–161 (1989) 8. Kovalevsky, V.A.: Finite Topology and Image Analysis. In: Hawkes, P.W. (ed.) Advances in Electronics and Electron Physics. Image Mathematics and Image Processing, vol. 84, pp. 197–259. Academic Press, San Diego (1992) 9. Kovalevsky, V.: Algorithms and Data Structures for Computer Topology. In: Bertrand, G., et al. (eds.) Digital and Image Geometry. LNCS, vol. 2243, pp. 38–58. Springer, Heidelberg (2001) 10. Kovalevsky, V.: Algorithms in Digital Geometry Based on Cellular Topology. In: ˇ c, J. (eds.) IWCIA 2004. LNCS, vol. 3322, pp. 366–393. Springer, Klette, R., Zuni´ Heidelberg (2004) 11. Kovalevsky, V.: Axiomatic Digital Topology. Journal of Mathematical Imaging and Vision 26, 41–58 (2006) 12. Latecki, L., Eckhardt, U., Rosenfeld, A.: Well-Composed Sets. Computer Vision and Image Understanding 61(1), 70–83 (1995) 13. Morales Ch´ avez, P.S.: Topolog´ıa del Adelgazamiento sobre el complejo celular cuadr´ atico y sobre el complejo celular triangular, Master thesis, Dept. of Automatic Control, CINVESTAV-IPN, Mexico City (2007), http://www.ctrl.cinvestav.mx/∼ biene/Thesis.htm 14. Parker, J.R.: Algorithms for Image Processing and Computer Vision. John Wiley and Sons, U.S.A./Canada (1997) 15. Quaisser, E.: Diskrete Geometrie, Spektrum Akademischer Verlag, Heidelberg Berlin Oxford (1994) 16. Rinow, W.: Lehrbuch der Topologie, VEB Deutscher Verlag der Wissenschaften, Berlin (1975) 17. Rosenfeld, A.: A Characterization of Parallel Thinning Algorithms. Information and Control 29, 286–291 (1975) 18. Saha, P.K., Rosenfeld, A.: Local and Global Topology Preservation on Locally Finite Sets of Tiles. Information Sciences 137, 303–311 (2001) 19. Trejo Mart´ınez, A.: Geometr´ıa del Adelgazamiento sobre el complejo celular cuadr´ atico y sobre el complejo celular hexagonal, Master thesis, Dept. of Automatic Control, CINVESTAV-IPN, Mexico City (2007), http://www.ctrl.cinvestav.mx/∼ biene/Thesis.htm 20. Webster, J.: Cell Complexes and Digital Convexity. In: Bertrand, G., et al. (eds.) Digital and Image Geometry. LNCS, vol. 2243, pp. 272–282. Springer, Heidelberg (2002) 21. Wiederhold, P., Wilson, R.G.: The Alexandroff dimension of digital quotients of Euclidean spaces. Discrete and Computational Geometry 27, 273–286 (2002) 22. Zempoalteca Ram´ırez, M.d.R.: Adelgazamiento de subcomplejos celulares 2D, Master thesis, Dept. of Automatic Control, CINVESTAV-IPN, Mexico City (2004), http://www.ctrl.cinvestav.mx/∼ biene/Thesis.htm

Suggest Documents