• Aucun résultat trouvé

Two-dimensional thinning algorithms based on critical kernels

N/A
N/A
Protected

Academic year: 2022

Partager "Two-dimensional thinning algorithms based on critical kernels"

Copied!
41
0
0

Texte intégral

(1)

HAL Id: hal-00622001

https://hal-upec-upem.archives-ouvertes.fr/hal-00622001

Submitted on 11 Sep 2011

HAL is a multi-disciplinary open access archive for the deposit and dissemination of sci- entific research documents, whether they are pub- lished or not. The documents may come from

L’archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d’enseignement et de

Two-dimensional thinning algorithms based on critical kernels

Gilles Bertrand, Michel Couprie

To cite this version:

Gilles Bertrand, Michel Couprie. Two-dimensional thinning algorithms based on critical kernels.

Journal of Mathematical Imaging and Vision, Springer Verlag, 2008, 31 (1), pp.35-56. �hal-00622001�

(2)

Two-dimensional parallel thinning algorithms based on critical kernels

G. Bertrand and M. Couprie

Institut Gaspard-Monge Laboratoire A2SI, Groupe ESIEE

Cité Descartes, BP 99 93162 Noisy-le-Grand Cedex France

Abstract

Critical kernels constitute a general framework settled in the category of abstract complexes for the study of parallel thinning in any dimension. The most fundamental result in this framework is that, if a subsetY ofX contains the critical kernel ofX, then Y is guaranteed to have “the same topology as X”. Here, we focus on 2D structures in spaces of two and three dimensions. We introduce the notion of crucial pixel which permits to make a link with the framework of digital topology. Thanks to simple local characterizations, we are able to express thinning algorithms by the way of sets of masks. We propose several new parallel algorithms, which are both fast and simple to implement, to obtain symmetrical or non-symmetrical skeletons of 2D objects in 2D or 3D grids. We prove some properties of these skeletons, related to topology preservation, to minimality and to the inclusion of the topological axis which may be seen as a generalization of the medial axis. We also show how to use critical kernels in order to prove very simply the topological soundness of existing thinning schemes. At last, we make clear the link between critical kernels, minimal non-simple sets, and P-simple points.

Key words:

Parallel thinning algorithms, skeleton, simple point, collapse, critical kernel, medial axis, digital topology, minimal non-simple set, P-simple point

Email addresses: g.bertrand@esiee.fr (G. Bertrand), m.couprie@esiee.fr (M. Cou- prie).

(3)

Introduction

Forty years ago, in 1966, D. Rutovitz proposed an algorithm which is certainly the first parallel thinning algorithm [39]. Since then, many 2D parallel thinning algorithms have been proposed, see in particular [41,35,1,32,8,15,14,19,11,2,30].

A fundamental property required for such algorithms is that they do preserve the topology of the original objects. In fact, such a guarantee is not obvious to obtain, even for the 2D case. C. Ronse introduced theminimal non-simple sets [33] to study the conditions under which points may be removed simul- taneously while preserving topology of 2D objects. This leads to verification methods for the topological soundness of parallel thinning algorithms. Such methods have been proposed for 2D algorithms by C. Ronse [33] and R. Hall [16], they have been developed for the 3D case by T.Y. Kong [20,21] and C.M.

Ma [29], as well as for the 4D case by C-J. Gau and T.Y. Kong [12,24]. For the 3D case, G. Bertrand [3] introduced the notion ofP-simple pointas a verifica- tion method but also as a methodology to design parallel thinning algorithms [4,7,26,27].

In [5], one of the authors introduces a general framework for the study of parallel thinning in any dimension in the context of abstract complexes. A new definition of a simple point (a point which may be deleted without changing the topology of the object) is proposed, this definition is based on the collapse operation which is a classical tool in algebraic topology and which guarantees topology preservation. Then, the notions of anessential faceand of acoreof a face allow to define the critical kernel of an object X. The most fundamental result proved in [5] is that, if a subset Y of X contains the critical kernel of X, then Y has the same topology as X.

This article is the first of a series which develops and exploits the framework of critical kernels, recalled in Sec. 3. Here, we focus on 2D structures in 2D and 3D spaces. Of course, the important particular case of the 2D grid receives a special attention, and comparisons with previous works are made. We intro- duce the notions of crucial faces and pixels (Sec. 4, Sec. 6) which permit to make a link with the framework of digital topology [34,36,25]. Thanks to sim- ple local characterizations (Sec. 5), we are able to express thinning algorithms by the way of sets of masks, as in most papers related to parallel thinning.

In fact, we were able, in most cases, to reduce this set of masks to a single pattern, leading to algorithms which are both fast and extremely simple to implement. We introduce the formal definition of a minimal symmetric skele- ton, which is a well-defined object, and we propose an algorithm to compute it (Sec. 7). We propose several new parallel algorithms to compute curvilinear skeletons (Sec. 8), in which topological and geometrical conditions are clearly separated, unlike in many previous works.

(4)

The quality of a curvilinear skeleton is often assessed by the fact that it con- tains, approximately or completely, the medial axis of the shape. The medial axis is the set of centers of all maximal balls included in the shape; in [38]

A. Rosenfeld and J.L. Pfaltz have proved that, for the city block and the chessboard distances, the medial axis of a shape can be obtained by detecting the local maxima of its distance transform. We introduce the topological axis (Sec. 9), a generalization of the medial axis (which is not defined for the case of two-dimensional structures in discrete n-dimensional spaces, n > 2). The topological axis also unveils a deep link between the medial axis and the col- lapse operation. In 2D, we propose four new parallel algorithms (Sec. 10 and Sec. 11) to compute skeletons which are guaranteed to include the medial axis, and compare them with previously proposed ones in terms of the number of pixels retained in order to ensure topology preservation. Our third algorithm, which is not symmetrical, has the property of producing a result which is minimal, in the sense that any pixel which does not belong to the medial axis is not simple. We extend our algorithms to the 3D case by proposing a new algorithm to compute minimal symmetric skeletons of 2D objects in 3D grids, and also a new algorithm to compute skeletons of 2D objects in 3D grids which are guaranteed to contain the topological axis (Sec. 12).

We show (Sec. 13) that, thanks to the notions introduced in the paper, it is possible to check the topological soundness of thinning algorithms or thinning schemes. To illustrate this fact, we give new proofs relative to three popu- lar thinning schemes. These proofs are based on very simple arguments and consist in only few lines. The thinning schemes which are considered are the ones proposed by A. Rosenfeld [35], R. Hall. [15], U. Eckhardt and G. Mader- lechner [11]. We also report the work made in [10] where 15 parallel thinning algorithms are analyzed with the help of computer. At last (Sec. 14), we show that, with critical kernels, it is possible to recover the notion of a minimal non-simple set as well as the notion of a P-simple point.

1 Cubical complexes

In this section, we give some basic definitions for cubical complexes. We con- sider here only the two-dimensional case. The reader is invited to check that many of the notions introduced in the first sections make sense in arbitrary n-dimensional cubical spaces.

If T is a subset of S, we write T ⊆ S, we also write T ⊂ S if T ⊆ S and T 6=S.

LetZbe the set of integers. We consider the families of sets F10, F11, such that F10 ={{a} |a∈Z},F11 ={{a, a+ 1} |a∈Z}. A subset f ofZn,n≥2, which

(5)

x y z t

(a) (b) (c) (d) (e)

Fig. 1. (a): Four points x, y, z, t. (b): A graphical representation of the set of faces {{x, y, z, t},{x, y},{z}}(one 2-face, one 1-face, and one 0-face). (c): A set of facesX, which is not a complex. (d): The setX+, composed by all the facets ofX. (e): The setX,i.e. the closure ofX, which is a complex.

is the Cartesian product of exactly m elements of F11 and (n−m) elements of F10 is called a face or an m-face of Zn, m is the dimension of f, we write dim(f) =m.

We denote byFn2 the set composed of allm-faces ofZn,m= 0,1,2and n≥2.

Anm-faceof Zn is called apoint ifm = 0, a (unit) interval ifm = 1, a (unit) square if m= 2.

In this paper, we will consider only 2D objects which are in 2D or 3D spaces.

Thus, in the following, we suppose that n= 2 orn= 3.

Letf be a face inFn2. We set fˆ={g ∈Fn2 |g ⊆f} and fˆ = ˆf \ {f}.

Anyg ∈fˆis a face of f, and any g ∈fˆ is a proper face of f.

If X is a finite set of faces in Fn2, we write X = ∪{fˆ| f ∈ X}, X is the closure of X.

A set X of faces in Fn2 is a cell or an m-cell if there exists an m-face f ∈ X, such thatX = ˆf. Theboundary of a cell fˆis the set fˆ.

A finite setXof faces inFn2 is acomplex (inFn2)ifX =X. Any subsetY of a complexX which is also a complex is asubcomplex ofX. IfY is a subcomplex of X, we write Y X. If X is a complex in Fn2, we also write X Fn2. Let X Fn2. A face f ∈ X is a facet of X if there is no g ∈ X such that f ∈gˆ. We denote by X+ the set composed of all facets of X.

Observe thatX+ is, in general, not a complex, and that [X+] =X.

In Fig. 1, we give some illustrations of the notions defined above for some sets of faces in F22 (in the “2D square grid”).

LetX Fn2. Thedimension of X is the number:

dim(X) = max{dim(f)|f ∈X+}.

We say that X is an m-complex ifdim(X) =m.

We say that X is pure if, for each f ∈X+, we have dim(f) =dim(X).

(6)

(a) (b) (c)

Fig. 2. (a): A complex X1 which is not pure and not connected. Highlighted (bold edges and vertices): a subcomplex Y1 of X1 which is not a principal subcomplex.

(b): A connected, pure 2-complexX2. Highlighted: a subcomplex Y2 ofX2 which is a principal subcomplex, and which is also a pure 2-complex. (c): The detachment of Y2 fromX2, a pure 2-complex which is not connected.

LetX Fn2 andY X. IfY+ ⊆X+, we say thatY is aprincipal subcomplex of X and we write Y ⊑X. Observe that, for any X Fn2, ∅ ⊑X.

If XFn2 and if X is a pure 2-complex, we also writeX ⊑Fn2.

Let X Fn2 and let Y X. We set X ⊘ Y = [X+\Y+]. The set X ⊘ Y is a complex which is thedetachment of Y from X.

Two distinct faces f and g of Fn2 are adjacent iff ∩g 6=∅. Two complexes X, Y inFn2 are adjacent if there exist f ∈X and g ∈Y which are adjacent.

LetX Fn2. A sequence π=hf0, ..., fli of faces in X is apath in X (from f0

to fl) if fi and fi+1 are adjacent for each i= 0, ..., l−1; the number l is the length of π.

We say that X is connected if, for any pair of faces (f, g) in X, there is a path in X fromf tog. We say that Y X is a connected component of X if Y ⊆X,Y is connected, and if Y is maximal for these two properties (i.e., we have Z =Y whenever Y Z X and Z connected).

Fig. 2 illustrates the notions of pureness, connectedness, subcomplex, principal subcomplex and detachment for some 2D complexes in F32 (in the “3D cubic grid”).

Two 2-faces f and g of Fn2 are strongly adjacent if f∩g is a 1-face.

Let X ⊑Fn2. A sequence π =hf0, ..., fliof 2-faces in X is a strong path in X (from f0 to fl) if fi and fi+1 are strongly adjacent for each i= 0, ..., l−1; the number l is the length of π. We say that X is strongly connected if, for any pair of 2-faces(f, g)in X, there is a strong path in X fromf to g.

If f is a 2-face ofFn2, we set:

Γ(f) ={g ∈Fn2 | g is a 2-face adjacent to f},Γ(f) = Γ(f)∪ {f}; and ΓS(f) ={g ∈Fn2 | g is strongly adjacent to f}, ΓS(f) = ΓS(f)∪ {f}.

(7)

j f

(a) (b) (c)

g

f h

(d) (e) (f)

Fig. 3. (a) A complexX, (b) and (c) two steps of elementary collapse ofX, (d) the detachment offˆfromX, (e) the attachment of the 2-face f is highlighted, the face f is not simple, whereas g and h are simple, (f) the essential 0- and 1-faces for X are highlighted.

2 Simple cells

Intuitively a cell fˆof a complex X is simple if its removal from X “does not change the topology of X”. In this section we propose a definition of a simple cell based on the operation of collapse [13], which is a discrete analogue of a continuous deformation (a homotopy). Note that this definition is a rather general one, in particular, it may be directly extended ton-dimensional cubical complexes [5].

LetX be a complex inFn2 and letf ∈X+. The face f is aborder face forX if there exists one faceg ∈fˆ such thatf is the only face ofXwhich contains g.

Such a face g is said to be free for X and the pair (f, g) is said to be a free pair for X. We say that f ∈X+ is an interior face for X if f is not a border face. In Fig. 3 (a), the pair (f, j) is a free pair forX, and the complex X has no interior face.

LetX be a complex, and let(f, g)be a free pair forX. The complexX\{f, g}

is an elementary collapse of X.

LetX, Y be two complexes. We say that X collapses onto Y if there exists a collapse sequence from X toY, i.e., a sequence of complexes hX0, ..., Xli such that X0 = X, Xl = Y, andXi is an elementary collapse of Xi−1, i= 1, ..., l;

the number l is thelength of the collapse sequence.

We say that a complex X is collapsible if X collapses onto a complex which is made of a single point.

In Fig. 3, a complexX is depicted in (a), followed in (b) and (c) by two steps of elementary collapse.

(8)

We give now a definition of a simple point, it may be seen as a discrete analogue of the one given by T.Y. Kong in [22] which lies on continuous deformations in the n-dimensional Euclidean space.

Definition 1. Let X Fn2. Let f ∈X+.

We say that fˆand f are simple forX if X collapses onto X ⊘ fˆ.

The notion of attachment, as introduced by T.Y. Kong [21,22], leads to a local characterization of simple cells.

Definition 2. Let X Fn2 and letf ∈X+.

The attachment of fˆfor X is the complex Attach( ˆf , X) = ˆf∩[X ⊘ f].ˆ In other words, a face g is in Attach( ˆf , X) if g is in fˆ and if g is a (proper) face of a facet h distinct from f.

The following proposition is an easy consequence of the above definitions.

Proposition 3. Let X Fn2, and let f ∈X+.

The cell fˆis simple for X if and only if fˆcollapses onto Attach( ˆf , X).

The attachment of a 2-face f of a complex X is highlighted Fig. 3 (e) and X ⊘ fˆis depicted in (d). It may be seen that f is not simple: there is no collapse sequence from X (a) to X ⊘ fˆ(d). Observe that the complex is no more connected after the detachment offˆ. On the other hand the facesg and h are simple.

The next property may be directly derived from Prop. 3.

Proposition 4. Let X Fn2, and let f ∈X+. 1) If fˆis a 0-cell, then fˆis not simple for X;

2) If fˆis a 1-cell, then fˆis simple forX if and only if Attach( ˆf , X) is made of a single point;

3) If fˆis a 2-cell, then fˆis simple for X if and only if:

i) f is a border face; and

ii) Attach( ˆf , X) is non-empty and connected.

From Prop. 4, we easily derive a characterization of simple 2-faces which is an equivalent, in the framework of 2D complexes in Fn2, of the well-known characterization of simple pixels in the square grid given by A. Rosenfeld [34].

Proposition 5. LetX ⊑Fn2, and let f be a 2-face forX. The face f is simple for X if and only if:

i) f is a border face; and

ii) Γ(f)∩X is non-empty and connected.

(9)

3 Critical kernels

Let X be a complex in Fn2. We observe that, if we remove simultaneously simple cells from X, we may obtain a set Y such that X does not collapse ontoY. In other words, if we remove simple cells in parallel, we may “change the topology” of the original object X. For example, in Fig. 3 (e), g and h are simple for X, but the complexes X and X ⊘ [ˆg∪ˆh] have not “the same topology” (here, the same number of connected components). Thus, it is not possible to use directly the notion of simple cell for thinning discrete objects in a symmetrical manner.

In this section, we introduce a new framework for thinning in parallel discrete objects with the warranty that we do not alter the topology of these objects.

This method may be extended for complexes of arbitrary dimension [5]. As far as we know, this is the first method which allows to thin arbitrary complexes in a symmetric way.

This method is based solely on three notions, the notion of an essential face which allows to define the core of a face, and the notion of a critical face.

Definition 6. Let X Fn

2 and let f ∈ X. We say thatf is an essential face for X if f is precisely the intersection of all facets ofX which containf, i.e., if f = ∩{g ∈ X+ | f ⊆ g}. We denote by Ess(X) the set composed of all essential faces ofX. Iff is an essential face forX, we say thatfˆis anessential cell for X.

Observe that a facet of X is necessarily an essential face for X, i.e., X+ ⊆ Ess(X). Observe also that the non-empty intersection of any number of facets is an essential face. The essential 0- and 1-faces of the complex X of Fig. 3 (a) are highlighted Fig. 3 (f).

Definition 7. Let X Fn2 and let f ∈Ess(X). The core of fˆfor X is the complex, denoted by Core( ˆf , X), which is the union of all essential cells for X which are in fˆ, i.e., Core( ˆf, X) = ∪{ˆg |g ∈Ess(X)∩fˆ}.

The preceding definition may be seen as a generalization of the notion of at- tachment for arbitrary essential cells (which are not necessarily facets).

Proposition 8. Let X Fn2 and let f be a facet of X. The attachment of fˆ forX is precisely the core offˆforX, i.e, we haveAttach( ˆf , X) =Core( ˆf, X).

Definition 9. Let X Fn2 and let f ∈ X. We say that f and fˆare regular for X if f ∈ Ess(X) and if fˆcollapses onto Core( ˆf, X). We say that f and fˆare criticalfor X if f ∈Ess(X)and if f is not regular for X.

(10)

We set Critic(X) = ∪{fˆ| f is critical for X}, Critic(X) is a complex that we call the critical kernel of X. A face f in X is a maximal critical face, or an M-critical face for X, if f is a facet of Critic(X).

Again, the preceding definition of a regular cell is a generalization of the no- tion of a simple cell. As a corollary of Prop. 8, we have:

Proposition 10. Let X Fn2 and let f be a facet of X. The cell fˆis regular for X if and only if fˆis simple for X.

Furthermore, a face f is regular if and only if f is simple after removing all cells which contain f while keeping the cellfˆ:

Proposition 11. Let X Fn2 and let f ∈Ess(X). The cell fˆis regular for X if and only if fˆis simple for X = [X ⊘ Y]∪f, withˆ Y = ∪{ˆg |g ∈ X+ and f ⊆g}.

We propose the following classification of critical faces which is specific to the 2D case. This classification is made according to the “topological type” of a critical face.

Definition 12. Let X Fn2, and let f ∈Ess(X).

i) f is T0-critical for X if Core( ˆf, X) =∅;

ii)f isT1-critical for X if Core( ˆf , X) is not connected;

iii) f isT2-critical for X if f is an interior 2-face.

From Prop. 4 and 11, a facef is critical forX Fn2 if and only iff isTk-critical for some k∈ {0,1,2}.

Let X Fn2 and letf be an M-critical face for X. It means that f is critical forX andf is not a proper face of a face which is critical forX. Let us denote by D the complex which is the closure of the set composed of all faces which contain f (including f).

Informally, if we “deleteDfromX”,i.e., if we transformX intoX ⊘ D, then:

i) We delete a connected component (a 0D cycle) ofXiff is aT0-critical face;

ii) We split (create) a connected component or we delete 1D cycles (holes if n= 2, tunnels ifn = 3) if f is a T1-critical face;

iii) We create a 1D cycle or we delete 2D cycles (which induce cavities ifn= 3) if f is a T2-critical face.

The following theorem holds for complexes of arbitrary dimensions (see [5]), it may be proved quite in a simple manner in the 2D case (first, we collapse reg- ular 2-faces onto their core, then we collapse regular 1-faces onto their core).

This is our basic result in this framework.

(11)

(a) (b)

(c) (d)

Fig. 4. (a): a complexX0 inF32. (b): highlighted, X1 =Critic(X0). (c): highlighted, X2 =Critic(X1). (d): X2 is such thatCritic(X2) =X2.

Theorem 13. Let X Fn2. The complex X collapses onto its critical kernel.

Furthermore, if Y ⊑X is such that Y contains the critical kernel of X, then X collapses onto Y.

In Fig. 4 is depicted a complex X0 F32, as well as X1 = Critic(X0) and X2 =Critic(X1). The complex X2 is such that Critic(X2) =X2.

4 Crucial kernels

IfX is a complex inFn2, the subcomplex Critic(X)is not necessarily a princi- pal subcomplex ofX, as illustrated Fig. 4. In this paper we investigate thinning algorithms which take as input a pure 2-complex and which return a princi- pal subcomplex of the input (thus also a pure 2-complex). In this section, we propose some notions which allow to recover a principal subcomplex Y of an arbitrary complex X, with the constraint that X collapses ontoY.

Definition 14. Let X Fn2, and let f ∈X+ be a simple facet for X.

We say thatf andfˆare crucial forX, iffˆ contains a face which is M-critical for X. We say that f and fˆare Tk-crucial for X, if fˆ contains an M-critical face which isTk-critical for X, k = 0,1.

(12)

f

h g i

j

(a) (b) (c)

Fig. 5. (a): A complexX0and its M-critical faces (highlighted). (b):X1 =Cruc(X0) and its M-critical faces. (c): The complexX2 =Cruc(X1)contains only one M-crit- ical face (highlighted), andX2=Cruc(X2).

Thus, a critical face forX is either a facet which is not simple, or is included in a crucial face (which is a simple facet).

In Fig. 5 (a), the M-critical faces of a complex are highlighted. The faces f andg are crucial (T1-crucial), the facesiandhare simple but not crucial (the critical faces included in i and h are not M-critical), the face j is not simple (it is M-critical), thus j is not crucial.

Definition 15. Let X Fn2, and let K be a set of crucial faces for X.

We say that K is a (Tk-) crucial clique for X, if there exists a (Tk-critical) facef which is M-critical forX and such that K is precisely the set of facets of X which contain f. We also say thatK is the crucial clique induced by f.

In Fig. 5 (a), the set of faces K = {f, g} is a T1-crucial clique, in (c) the set K composed of the three 2-faces is a T0-crucial clique.

Definition 16. Let X Fn2 and letY ⊑X.

We say that Y is a crucial retraction of X if:

i) Y contains each facet of X which is critical; and

ii)Y contains at least one face of each crucial clique for X.

From the above definitions, we immediately derive the following property.

Proposition 17. Let X Fn2 and let Y ⊑X.

We have Critic(X)⊆Y if and only if Y is a crucial retraction of X.

Thus, by Th. 13, ifY is a crucial retraction ofX, thenX collapses ontoY. All algorithms proposed in this paper will iteratively compute crucial retractions.

Let us define thecrucial kernel of X as the setCruc(X)which is the union of all cells ofX which are either critical or crucial forX. In Fig. 5 (a), a complex X0 and its M-critical faces (three 2-faces and one 1-face) are depicted. The complex X1 = Cruc(X0) is given in (b) also with its M-critical faces (one 2-face and one 1-face, which are both T1-critical). Finally, in (c), the complex X2 =Cruc(X1) contains only one M-critical face (which isT0-critical), and it may be seen that X2 =Cruc(X2).

(13)

For thinning objects, we often want to keep other faces than the ones which are either not simple or crucial. That is why we introduce the following defi- nition; intuitively, the set K corresponds to a set we want to preserve during a thinning procedure (like extremities of curves, if we want to obtain a curvi- linear skeleton).

Definition 18. LetX Fn2, andK be a set of facets ofX. LetR0 be the set of all facets ofX which are critical forX, we set R1 =K∪R0. We say that a facet f of X is (Tk-) crucial for hX, Ki, if f belongs to a (Tk-) crucial clique for X which is included in X+\R1, (k = 0,1). Let R2 be the set of all faces which are crucial forhX, Ki. The complex R1 ∪R2 is the crucial kernel of X constrained by K.

Observe that a face is crucial forX if and only if it is crucial forhX, Ki, where K is the empty set.

Remark: The preceding definition will be a “template” for all the thinning algorithms presented hereafter: see the expression of these algorithms proposed in the next sections. In fact, all our algorithms iteratively compute, until idempotence, such constrained crucial kernels.

From the previous definitions, we immediately deduce the following proposi- tion which ensures that any constrained crucial kernel preserves topology.

Proposition 19. Let X Fn2, and let K be a set of facets of X. The crucial kernel of X constrained by K is a crucial retraction of X.

5 Combinatorial characterizations of crucial faces in F22

In order to design efficient parallel thinning algorithms, we need some charac- terizations of crucial faces which may be easily checked by inspecting a limited neighborhood of each face. For that purpose, we will examine the possible con- figurations of the 2-faces which contain an M-criticalk-face,k = 0,1. We focus on the important particular case ofF22 (a discrete plane).

Lemma 20. LetX ⊑F22, and letf be a 1-face ofX. Without loss of generality (up to aπ/2 rotation) let us assume that the neighborhood off is depicted by Fig. 6(a). The face f is M-critical for X if and only if:

i) a1 ∈X and a2 ∈X; and

ii) a1 and a2 are both simple for X; and

iii) either {b1, b2, b3, b4} ∩X =∅ or ({b1, b2} ∩X 6=∅ and {b3, b4} ∩X 6=∅).

Proof: Suppose thatf is M-critical forX. Since f has to be essential, botha1

(14)

anda2 are inX, hence i). By the very definition of an M-critical face, we must also have ii). Since f is critical for X, c1 and c2 are either both essential or both non-essential forX, hence condition iii). The proof that the conjunction of i), ii) and iii) is a sufficient condition is straightforward.

For the three following lemmas, we use the naming conventions depicted in Fig. 6(b). We prove only the necessary conditions, the sufficient conditions are straightforward.

Lemma 21. Let X ⊑ F22, and let f be a 0-face of X which is included in exactly two 2-faces of X. The face f is M-critical for X if and only if:

i) The two 2-faces of X that contain f are either {a0, a2} or {a1, a3} ; and ii) The two 2-faces of X that contain f are simple for X.

Proof: The two 2-faces which contain f cannot be {a0, a1} (or similar cases up to π/2 rotations), otherwise the face f would not be essential, hence not critical for X. Furthermore, whatever these 2-faces, they cannot be critical for X (by definition of an M-critical face).

Lemma 22. Let X ⊑ F22, and let f be a 0-face of X which is included in exactly three 2-faces of X. Without loss of generality (up to π/2 rotations), assume that these three 2-faces area0, a1 anda2. The facef is M-critical forX if and only if:

i) ai is simple for X, for any i= 0,1,2 ; and ii) di ∈/ X, for any i= 1,2,3,4.

Proof: If f is M-critical, we must have condition i), and also the facesbi must be not critical for X. It can be seen that b1, b2 are essential, thus they must also be regular for X. It implies that the faces c1, c2 must be non-essential, hence condition ii).

Lemma 23. LetX ⊑F22, and let f be a 0-face of X which is included in four 2-faces of X. The face f is M-critical for X if and only if:

f b1 b

c

a a

b b

2 1

1 2

3 4

c2

c f c

c c

b b

d d

d d

d d

d d a

a a

a

2 1

3 1 0 0

4 2 3 7

5 6

2 1

0

3 3 1

b2 b0

c c b a a

a a a

a

2 1

4 0

5 6 7

2 0

b a3

c1

a f b1 b2 0

3 c3

(a) (b) (c)

Fig. 6. Naming conventions for Lemmas 20-23 and Lemmas 48-49.

(15)

A B A B

P P 0

P 0 P

0 0 0 0 P P

0 P P P 0 0

0 0

0 0 0

0 0 0

0 0 P P P P

C C1 C2 C3 C4

Fig. 7. Patterns and masks for crucial pixels. The 11 masks corresponding to these 5 patterns are obtained from them by applying any series ofπ/2 rotations. The label 0 indicates pixels that must belong to the complement of S. The label P indicates pixels that must belong to the set P which is a set composed of simple pixels of S. For mask C, at least one of the pixels marked A and at least one of the pixels marked B must be in S. If one of these masks matches the sets S, P, then all the pixels which correspond to a label P in the mask are recorded as “matched”.

i) ai is simple for X, for any i= 0,1,2,3 ; and ii) di ∈/ X, for any i= 0, . . . ,7.

Proof: Iff is M-critical forX, we must have condition i), and also the facesbi

must be not critical forX. It can be seen that thebi are all essential, thus they must be regular for X. It means that the faces ci must all be non-essential, hence condition ii).

6 Crucial pixels in the square grid

We introduce the following definitions in order to establish a link between planar pure complexes (i.e., pure 2-complexes in F22) and the square grid as considered in image processing [34,36,25].

We define thesquare gridas the setG2 composed of all 2-faces ofF22. A 2-face of G2 is also called a pixel. In the sequel, we will consider only finite subsets of G2.

For any pure 2-complex in F22, i.e., for any X ⊑ F22, we associate the subset X+ of G2. In return, to each finite subset S of G2, we associate the complex S in F2

2. In the sequel, this will be our basic methodology to “interpret” a set of pixels. In particular, all definitions given for a facet in X+ have their counterparts for a pixel in G2. For example if S ⊆G2 and p∈S, we will say that the pixel p is simple for S if p is simple for S. Border, interior, (Tk-) critical, and (Tk-) crucial pixels are defined in the same manner. If K is a set made of pixels of S, we say that p is crucial for hS, Ki if p is crucial for hS, Ki.

Observe that, if p ∈ G2, Γ(p) and ΓS(p) correspond to the so-called 8- neighborhood and 4-neighborhood of p, respectively.

(16)

Thanks to the combinatorial characterizations of Section 5, we can give some simple local conditions, in the square grid, for crucial pixels. We express these local conditions by a set of masks, as in most papers related to parallel thinning in the digital topology framework.

The following property is a direct consequence of lemmas 20, 21, 22 and 23.

The definition of the masks C, C1, ..., C4 is given Fig. 7.

Proposition 24. Let S ⊆G2, and p∈S. Let P be a set composed of simple pixels of S.

i) The pixel p belongs to a T1-crucial clique included in P if and only if p is matched by pattern C;

ii) The pixel p belongs to a T0-crucial clique included in P if and only if p is matched by one of the patterns C1, ...C4.

Thus, the maskC is a mask for T1-crucial cliques, andC1, ..., C4 are masks for T0-crucial cliques. For each of these masks, the crucial clique is the set com- posed of P’s. In fact these masks are also masks for the minimal non-simple sets introduced by C. Ronse [33], see section 14. We observe that, since P is composed of simple pixels of S, the set of P’s of each mask C1, ..., C4 is necessarily surrounded by 0’s. Hence, we have the following property.

Proposition 25. Let S ⊆G2, and let U be a T0-crucial clique for S. ThenU is a connected component of S.

7 Minimal K-skeletons

A minimal symmetric skeleton of an object may be obtained by deleting iter- atively, in parallel, all pixels which are neither critical nor crucial.

Definition 26. LetS ⊆G2. Thecrucial kernel of S is the setCruc(S)which is composed of all critical pixels and all crucial pixels of S.

Let hS0, S1, ..., Ski be the unique sequence such that S0 = S, Cruc(Sk) = Sk

and Si =Cruc(Si−1), i= 1, ..., k. The set Sk is the minimal K-skeleton of S.

By Prop. 19 (here K = ∅), the minimal K-skeleton of a set S is a crucial retraction of S. The following algorithm computes a minimal K-skeleton.

Algorithm M Ka2 (Input/Output : a setS ⊆G2) 01. Repeat Until Stability

02. R1 ← set of pixels which are critical forS

03. R2 ← set of pixels belonging to a T0- or T1-crucial clique included inS\R1

04. S ← R1∪R2

(17)

Fig. 8. A subset S of G2 (in white) and its minimal K-skeleton (in gray).

From Prop. 24, we may check if a pixel is T1-crucial by using the pattern C.

Considering all possible rotations, there are in fact only two masks correspond- ing toC. On the other hand, it may be seen that the checking of a T0-crucial pixel with the patterns C1, ..., C4 involves 9 masks. In the following, we pro- pose an algorithm which avoids the use of these 9 masks. This algorithm is based on a technic used for computing the so-called ultimate erosions in the context of mathematical morphology (see [40]).

Let S ⊆ G2, we denote by S⊖Γ = {p ∈ S | Γ(p) ⊆ S}, the erosion of S by Γ, and by S⊕Γ =∪{Γ(p)|p∈S}, the dilation of S by Γ.

Algorithm M K2 (Input/Output : a setS ⊆G2) 01. Repeat Until Stability

02. R1 ← set of pixels which are critical forS

03. R2 ← set of pixels which belong to aT1-crucial clique included inS\R1

04. T ← R1∪R2

05. S ← T ∪[S\(T⊕Γ)]

The correctness of the algorithm lies on the following property.

Proposition 27. Let S ⊆G2, and let p∈S be a simple pixel.

i) If pis not crucial for S, then there exists q∈Γ(p)∩S such that q is either critical or T1-crucial for S.

ii) If p is T0-crucial for S, then any q ∈ Γ(p)∩S is neither critical, nor T1-crucial.

Proof:

i) Let p ∈ S be a simple pixel not crucial for S. Since p is simple, we have Γ(p)∩S 6=∅. Let us consider the two sets U =S\Γ(p) and V =S\Γ(p).

If any q ∈ Γ(p) ∩ S is neither critical nor crucial for S, by Th. 13, S would collapse onto U and also onto V. But U has one more connected component thanV, a contradiction with the fact that the collapse operation preserves the number of connected components. It follows that there exists q ∈Γ(p)∩S such thatq is either critical or crucial for S. Now, q cannot be T0-crucial, otherwise, from Prop. 25, p would also be T0-crucial.

(18)

ii) is a direct consequence of Prop. 25.

Let us denote by MK2(S) the result obtained by algorithm MK2 from the inputS. From Prop. 27, the pixels which are added to the set T at step 05 of MK2 are precisely T0-crucial pixels. Thus, we have the following property.

Proposition 28. Let S ⊆ G2. The set MK2(S) is the minimal K-skeleton of S.

An example of a minimalK-skeleton is given Fig. 8. As far as we know,MK2 is the first algorithm for a minimal symmetric skeleton. Furthermore, the result ofMK2 is an object which is well-defined. To our best knowledge, this is also the first attempt to give a precise definition of such a notion.

8 Curvilinear K-skeletons

Curvilinear skeletons keep track of some geometrical information relative to elongated or salient parts of the shape. In many thinning algorithms, such a skeleton is obtained thanks to the preservation of “end pixels” which are usually defined through a set of masks. We propose a general (i.e., rather non combinatorial) definition of an end, which arises naturally in the framework of critical kernels.

Definition 29. Let X Fn2, and let f ∈ X+. We say that the facet f is an end face for X if fˆ contains exactly one critical face for X.

LetS ⊆G2, let p∈S. We say that pis an end for Sif pis an end face forS.

Fig. 9. A complex X (all elements but the ones in black). In light gray: the critical faces for X. In dark gray: the end faces for X. The 2-faces which correspond to medial axis elements (see section 10) are highlighted by a bold contour.

(19)

A 0 0 0 A

0 0 A

p

E

Fig. 10. Characterization of ends. The masks obtained from this one byπ/2rotations must be added. The label 0 indicates pixels that must belong to the complement ofS. At least one pixel labeled A must belong to S.

An illustration is given Fig. 9, where the critical faces are depicted in light gray and the end faces are in dark gray.

We follow the methodology of the preceding sections, by first establishing a combinatorial characterization of end faces in F22. This characterization is given in appendix A by the Lemmas 48 and 49. As for the crucial faces in Sec. 7, we can then characterize with a set of masks the pixels of an object inG2 which are ends. The following property is a direct consequence of these two lemmas, the definition of the maskE is given Fig. 10.

Proposition 30. Let S ⊆ G2, and let p∈ S. The pixel p is an end for S if and only if the neighborhood of p matches the mask E.

The next property allows to avoid the checking forT0-crucial faces. It may be verified from Prop. 5 and by a direct inspection of the masks E, C1, ..., C4. Proposition 31. Let S ⊆G2, let p∈S.

i) If p is an end for S, then p is simple for S;

ii) If p isT0-crucial, then pis an end.

We are now ready to formulate an algorithm. Let us denote by EK2(S) the result of the algorithm,EK2(S)istheK-skeleton ofS based on ends. By Prop.

31 and 19,EK2(S) is a crucial retraction ofS. See Fig. 11 (a) for an example of such a skeleton.

Algorithm EK2 (Input /Output : a setS⊆G2) 01. Repeat Until Stability

02. R1 ← set of pixels which are either critical or ends for S

03. R2 ← set of pixels which belong to aT1-crucial clique included inS\R1

04. S ← R1∪R2

We will consider now another notion of extremity which is often used for thin- ning objects.

Definition 32. Let S⊆G2, let pbe a border pixel. We say thatp isresidual (for S) if there is no interior pixel in ΓS(p).

(20)

(a) (b)

Fig. 11. A subset S of G2 (in white), (a) its K-skeleton based on ends, (b) its K-skeleton based on residues.

We observe that a T0-crucial pixel is necessarily a residual pixel (but here a residual pixel is not necessarily simple). Thus, we may give the same algorithm as above for computingRK2(S)which istheK-skeleton ofSbased on residues.

See Fig. 11 (b) for an example.

Algorithm RK2 (Input/Output : a set S ⊆G2) 01. Repeat Until Stability

02. R1 ← set of pixels which are either critical or residual forS

03. R2 ← set of pixels which belong to aT1-crucial clique included inS\R1

04. S ← R1∪R2

Using the methodology of critical kernels, we may easily design parallel (here symmetrical) thinning algorithms based on different definitions of extremi- ties. These algorithms clearly separate the topological and the geometrical conditions. It should be noted that this is not often the case, many parallel thinning algorithms do not make explicit these two kinds of conditions which are different in nature (see [10]).

9 Topological axis and medial axis

The quality of a curvilinear skeleton is often assessed by the fact that it con- tains, approximately or completely, the medial axis of the shape. We introduce the following definitions in order to show that there is a deep link between the medial axis and the collapse operation, and in order to generalize the medial axis for pure 2-complexes in Fn2, for arbitrary n.

Definition 33. Let X ⊑ Fn2, and let f ∈ X+. We set ρ(f, X) as the min- imum length of a collapse sequence of X necessary to remove f from X, if such a sequence exists, and ρ(f, X) = ∞ otherwise. We define the topo-

(21)

logical axis of X as the set of faces f in X+ such that ρ(f, X) = ∞ or ρ(f, X)≥max{ρ(g, X)| g ∈ΓS(f)and ρ(g, X)6=∞}.

Note that we have ρ(f, X) = 1 if and only if f is a border face for X.

Let X ⊑Fn2, and let f ∈X+. We denote by π(f, X) the length of a shortest strong path, in X, from f to a border face of X, if such a path exists, and π(f, X) =∞otherwise. We denote by π(f, X)the length of a shortest strong path, inFn2, from f to a border face of X.

We observe that ρ(f, X) =π(f, X) + 1.

Now we focus our attention on the case n = 2. LetX ⊑F22, and let f ∈X+. We have necessarily ρ(f, X) 6= ∞. Furthermore, since any 1-face in F22 is included in precisely two 2-faces, it may be seen thatπ(f, X) =π(f, X), thus ρ(f, X) =π(f, X) + 1.

Let us recall a definition of the medial axis in the discrete grid G2 (see also [37]). Let p, q ∈ G2, we set d(p, q) as the length of a shortest strong path from p to q. This defines a distance (often called the 4-distance or the city block distance). Let p ∈ G2 and r ≥ 0, we denote by Br(p) the ball of radius r centered onp, defined byBr(p) ={q∈G2, d(p, q)≤r}. Observe that B1(p) = ΓS(p). LetS⊆G2,p∈S,r≥0. The ballBr(p)⊆Sismaximal forS if it is not strictly included in another ball included inS. Themedial axis ofS, denoted by MA(S), is the set of the centers of all the maximal balls for S. In [38], A. Rosenfeld and J.L. Pfaltz have proved that, for the city block and the chessboard distance, the medial axis of a shape can be obtained by detecting the local maxima of its distance transform. From the definition of the topo- logical axis, and from the preceding remarks, we may deduce the following property which proves that the notion of topological axis indeed generalizes the one of medial axis (which is not defined for the case of two-dimensional structures in discrete n-dimensional spaces, n >2).

Proposition 34. LetS ⊆G2. The medial axis of S is precisely the topological axis of S.

In the framework of mathematical morphology, C. Lantuejoul gave the fol- lowing characterization of the medial axis. Let S ⊆ G2, let i ∈ N, we set S⊖Bi ={p∈ S |Bi(p)⊆S}, and S⊕Bi =∪{Bi(p)|p∈S}. Observe that S⊖B0 =S⊕B0 =S. We have (see [40]):

MA(S) =∪{[S⊖Bi]\[(S⊖Bi+1)⊕B1]|i∈N} (1)

Let us examine now the K-skeleton based on ends with respect to the medial axis. For that purpose, let us consider again Fig. 9. The pixels (2-faces) which belong to the medial axis are highlighted by a bold contour. We observe that all end faces (in dark gray) belong to the medial axis. We also observe that

(22)

x

(a) (b)

Fig. 12. (a): A subset S of G2 (in white) which is equal to its medial axis MA(S).

(b): The complex X =S (all elements but the ones in black). In light gray: the critical faces forX. In dark gray: the end faces for X.

there is a simple 2-face (in white), at the bottom left of the shape, which corresponds to a medial axis element but which is not an end face. In this case, the pixel will be preserved by algorithmEK2 because it is a crucial pixel for hS, Ki where K is the set of end pixels. But in fact this is not always the case. Despite the appearances, the K-skeleton based on ends of the object depicted Fig. 11 (a) does not contain all pixels of its medial axis, this axis is depicted Fig. 13 (a). There are three pixels of the medial axis which are not in this skeleton. The simpler example of Fig. 12 shows a case where a pixel x belongs to the medial axis but is neither an end, nor a crucial pixel forhS, Ki.

In Appendix C (Fig. 21), we may find the number of medial axis pixels which are contained in three K-skeletons based on ends (EK2 algorithm) and on residual pixels (RK2 algorithm). By the very definition of a residual pixel, at the first iteration of RK2, the residual pixels are precisely the pixels of the medial axis which are border pixels. Thus, we could think that RK2 better preserves the medial axis. In fact the results given in Fig. 21 indicate that this is not always the case. An example where RK2 removes a medial axis pixel is given in Appendix B (Fig. 20).

10 K-skeletons and medial axis

For obtaining a skeleton which includes the medial axis of the original object, we define the following notion of K-skeleton which is constrained to include a given set K. According to Def. 18, if S ⊆ G2 and K ⊆ S, the crucial kernel of S constrained by K is the set which is the union of the set K, the set R0 composed of all critical pixels, and the set of all pixels which belong to a crucial clique included inS\(K∪R0).

Definition 35. Let S ⊆ G2 and let K ⊆ S. We denote by Cruc(S, K) the crucial kernel ofSconstrained byK. LethS0, S1, ..., Skibe the unique sequence

(23)

such that S0 = S, Sk = Cruc(Sk, K) and Si = Cruc(Si−1, K), i = 1, ..., k.

The setSk is the K-skeleton of S constrained by K.

By Prop 19, the K-skeleton of a set S constrained by a set K is a crucial retraction of S. We give now a general result on constrained thinning which permits, under some conditions, to avoid the checking of the 9 masks (corre- sponding to C1, ..., C4) for the detection of T0-crucial pixels. This result is a direct consequence of Prop. 25.

Proposition 36. Let S ⊆G2. Let K ⊆ S, such that each connected compo- nent of S contains at least one pixel of K. Then, it is not possible that there is a T0-crucial clique for S which is included in S\K.

For computing aK-skeleton constrained by the medial axis, we could first ex- tract the medial axis, and then compute the constrained skeleton, this method is followed by B.K. Jang and R.T. Chin [19]. We present here an algorithm which computes at the same time the medial axis and the skeleton.

Algorithm AK2 (Input /Output : setS ⊆G2) 00. K ← ∅ ;T ← S

01. Repeat Until Stability

02. E ← T ⊖ΓS ;D← T\[E⊕ΓS];T ← E ;K ← K∪D 03. R1 ← set of pixels which are either critical forS or inK

04. R2 ← set of pixels which belong to aT1-crucial clique included inS\R1

05. S ← R1∪R2

If we denote byAK2(S) the result obtained by algorithmAK2, we then have the following property.

Proposition 37. Let S ⊆ G2. The set AK2(S) is the K-skeleton of S con- strained by the medial axis of S.

Proof: Let us denote by AM the medial axis of the original set S. It can be easily seen, from Eqn. (1), that the pixels which are accumulated in the set K all belong to AM. Furthermore, at any step of the execution, any pixel of AM which is simple for the current set S is in the set K. Thus, at each step 04 ofAK2, the setS\R1 is composed precisely of the pixels ofS\AM which are simple for S. Now, by the very definition of the medial axis, we are in the conditions of Prop. 36. Hence, at each step 05 of AK2, all crucial pixels are preserved. This implies that the result of AK2 is precisely the K-skeleton of the original set S constrained by its medial axis.

In Fig. 13, we show a subset S ofG2 together with its medial axis (a) and its medialK-skeleton AK2(S)(b). In Fig. 21, we see that the result produced by AK2 contains more pixels than the one of Jang and Chin’s algorithm [19]. This is explained by the fact that this latter algorithm is not completely symmetri-

(24)

(a) (b)

Fig. 13. (a): a subset S of G2 (in white) and its medial axis MA(S) (in gray). (b):

in gray,AK2(S).

cal (see algorithmNK2below). The algorithm proposed by T. Pavlidis [31,32], in its “reconstructing” variant, was designed to ensure the reconstruction of the original object (and the preservation of the medial axis). In fact this is not always the case, a commented counter-example may be found in [10] (see also Fig. 21). As far as we know, AK2 is the first algorithm for a symmetric skeleton which contains the medial axis.

At each step of algorithmAK2, a pixel which is not strongly adjacent to a pixel in E belongs to the medial axis. It follows the idea to consider the following algorithm for simplifying AK2.

Algorithm BK2 (Input /Output : setS ⊆G2) 00. T ← S

01. Repeat Until Stability 02. T ← T ⊖ΓS

03. R1← set of pixels which are either critical forSor such thatΓS(p)∩T =∅ 04. R2 ← set of pixels which belong to aT1-crucial clique included inS\R1

05. S ← R1∪R2

At step 04 of algorithm BK2, a pixel in S \ R1 (a candidate for deletion) cannot belong to the medial axis of S. Thus, the skeleton BK2(S) obtained by BK2 necessarily contains the medial axis ofS. Furthermore, we are in the conditions of Prop. 36, this ensures the topological soundness of the algorithm.

In Fig. 21, we see that only few pixels are deleted by AK2 but not by BK2.

11 Minimal K-skeleton containing the medial axis

The framework of critical kernels may also be used to design non-symmetric parallel thinning algorithms. We propose here such an algorithm the result of

(25)

N1

A B A B

p P

N2

A A

P

p

B B

Fig. 14. Non-symmetric masks. No π/2 rotations are considered. The labels p and P indicate pixels that must belong to the setP which is a set composed of simple pixels; the labelp (lower case) indicates the position of the pixel which is currently examined. At least one of the pixels marked A and at least one of the pixels marked B must be inS.

which includes the medial axis. For that purpose, we consider the following asymmetric variants of the mask C for T1-crucial cliques.

Let S ⊆ G2, and let P be a set composed of simple pixels of S. We say that a pixel p inP belongs to a N-crucial clique included in P if p matches one of the masksN1,N2 which are defined Fig. 14.

Algorithm N K2 (Input /Output : setS ⊆G2) 00. K ← ∅ ;T ← S

01. Repeat Until Stability

02. E ← T ⊖ΓS ;D← T\[E⊕ΓS];T ← E ;K ← K∪D 03. R1 ← set of pixels which are either critical forS or inK

04. R2 ← set of pixels which belong to an N-crucial clique included inS\R1

05. S ← R1∪R2

Again we are in the conditions of Prop. 36, thusT0-crucial cliques are preserved byNK2. Furthermore, by the very definition of the masksN1 andN2, at each step 04 of the algorithm, each crucial T1-clique included in S \R1 contains a pixel which is in R2. This ensures the topological soundness of NK2. Let us denote by NK2(S) the result of NK2 from the input S. By construction, NK2(S) contains the medial axis of S. Furthermore we have the following property of minimality.

Proposition 38. LetS ⊆G2. Any pixel inNK2(S)which is not in the medial axis of S is not simple for NK2(S).

Proof: Suppose there are simple pixels inNK2(S) which do not belong to the medial axis of S, we denote byU the set composed of all these pixels. It may be seen that each pixel in U matches one of the two masks N1, N2 (otherwise such a pixel would have been removed). Let p be one pixel in U which is the

“most at the east”. Let q be the pixel in U which is the “most at the north of p” and on the same vertical line asp. It may be seen thatq cannot match one of the masksN1,N2, a contradiction.

An example of the result given by the algorithm is shown Fig. 15 (a). See also Fig. 21 for comparisons, in particular with Jang and Chin’s algorithm [19]

which, like NK2, preserves the medial axis and is asymmetric.

(26)

(a) (b) (c)

Fig. 15. (a) The non-symmetric skeleton N K2(S) of the objectS depicted Fig. 13, (b) and (c) two configurations where pixels which matchN1 (resp.N2) are depicted in black (resp. dark grey), other pixels of the object are in light grey.

The proof of Prop. 38 indicates that there may be the possibility to have, with NK2, a “propagation effect” for deleting a simple point. In Fig. 15 (b), all pixels but the extremities of the ribbon are preserved by N1 and N2. In Fig. 15 (c), the pixel in dark grey at the bottom can be deleted only after all pixels above it are deleted one by one. In fact, such configurations are very likely to contain points of the medial axis, even if they appear after several thinning steps. These points of the medial axis prevent the propagation effect.

AlgorithmNK2 has been tested on 139 binary images. If we denote by n the radius of the largest ball included in an object, the number of iterations was precisely n for 113 images,n+ 1 for 20 images, n+ 2 for 6 images, the radius of each object being between 25 and 110 pixels.

As forAK2, we may consider the following simplification ofNK2. The result of OK2 contains the medial axis and also few points which are simple and which do not belong to the medial axis, see Fig. 21.

Algorithm OK2 (Input /Output : setS ⊆G2) 00. T ← S

01. Repeat Until Stability 02. T ← T ⊖ΓS

03. R1← set of pixels which are either critical forSor such thatΓS(p)∩T =∅ 04. R2 ← set of pixels which belong to an N-crucial clique included inS\R1

05. S ← R1∪R2

12 K-skeletons of 2D objects in 3D grids

We consider in this section objects which are pure 2-complexes in F32 as well as objects which are composed of surfels of F32,i.e., 2-faces ofF32.

(27)

In Sec. 5, we were able to characterize M-critical 1-faces and 0-faces in F22 directly from the status of the neighboring 2-faces, opening the way for the simple expression of the masks and algorithms in Sec. 6 and Sec. 7. Although a little less simple, such a characterization is also possible in F32 for 1-faces.

Lemma 39. LetX ⊑F32, and letf be a 1-face ofX. Without loss of generality (up to π/2 rotations) let us assume that the neighborhood of f is depicted by Fig. 16. The face f is M-critical for X if and only if:

i) at least two faces ai are in X; and

ii) the faces ai which are in X are all simple for X; and

iii) either all the faces gi and hi are not in X; or [{g0, . . . , g7} ∩X 6= ∅ and {h0, . . . , h7} ∩X 6=∅].

Proof: Suppose thatf is M-critical for X. Since f has to be essential, at least two of theai’s are inX, hence i). By the very definition of an M-critical face, we must also have ii). Since f is critical, the 0-faces c and e are either both essential or both non-essential for X, hence iii). The proof of the converse implication is straightforward.

The case of 0-faces is much more complex. Take the 0-facee in Fig. 16. It can be seen that its status depends not only on the one of the 2-faces hi and ai

(twelve faces), but also on the status of the six neighboring 0-faces like c, and thus on the status of the 6×8 = 48 2-faces like the gi’s. Furthermore, the position of the gi’s which must belong to X in order to determine the status of the 0-face c depends on the number and position of the ai’s which belong to X. Of course, the same is true for the similar groups of 2-faces surrounding the five other 0-faces likec. In conclusion, a simple combinatorial characterization of M-critical 0-faces in pure 2-complexes in F32 cannot be proposed. Fortunately, such a characterization is not mandatory to implement parallel thinning operators based on crucial kernels.

We denote byG32 the set composed of all 2-faces of F32. A 2-face of G32 is also called a surfel. In the sequel, we consider only finite subsets of G32.

a0

a2 b0

b2

d0

d2 g0

g2

h0

h2 g3

g5

b1

g6 d3

h7

h3

h1 h5

h6 d1 b3

h4 g1

a3

a1 g4

g7

f

c e

Fig. 16. Naming conventions for Lemma 39.

Références

Documents relatifs

[r]

S’il s’était agi d’une barre rigide, nous aurions dû parler de la position d’équilibre θ = π , qui est une position d’équilibre instable. Les solutions sont

(Any such manifold C is of the simple homotopy type of the cell filtration consisting of a single point. It is not a neighborhood of the cell filtration, however.) An example of a

Because the contribution of obstacle geometry on hooking events was not investigated in the latter study, Brownian dynamics simulations of single DNA molecule colliding with

Les groupes se réunissent où ils veulent (en bibliothèque ou dans d’autres salles à disposition) et travaillent à leur rythme durant les cases horaires prévues, tandis que

Interposition de péritoine latéro- pelvien pour éviter le risque de fistule recto-vaginale après résection colorectale avec colpotomie pour endométriose... Interposition de

In other words, an analog algorithm is a signal-indexed deterministic state- transition system (Definitions 1 and 2), whose states are algebras that respect isomorphisms (Definition

Based on the relation between the medial axis and the obtained homotopic skeleton, we introduce two classification criteria to compare and classify them.. Proving that