Keywords:

λ-medial axis as constraint set 4.3.2 The DLMA map and topological lumps . . . . .

A B S T R A C T

These last years, the domain of image analysis has drastically evolved. The progresses in technology brought higher resolution images and allowed to obtain three (even, in some cases, four) dimensional images. These progresses came with an important increase of the amount of information to analyse, and only tools capable of automatically extracting important characteristics from images can manage this flow of data. Digital topology offers a set of tools adapted to image analysis, especially the skeletonization process (also called homotopic thinning) which can simplify input data while keeping specific information untouched. In this thesis, we focus on how digital topology can help material image analysis.

In the first part, we study fluid flow simulation. In the images used for such simulations, it is necessary to remove small parts of the material not connected with the rest of the object (the grains). However, in some cases, the images are considered to be embedded in a toric space, where detection of grains can be hard. Thanks to the characterization of the fundamental group of the torus, we propose an original algorithm for detecting and removing these grains.

The rest of this thesis covers the field of skeletonization methods. The goal of a skeletonization process is to remove unnecessary information from an input, and provide a simplified object, called the skeleton, having the same characteristics as the original data. It is then possible to perform some computations on the skeleton and generalise their results to the original data. In the second part of this thesis, we propose some new tools for preserving, during skeletonization, important geometrical features of the original data, and obtain a skeleton recalling the visual aspect of the input. This method, which works in all dimensions, requires from the user a filtering parameter. We compare our method with other tools used for visual aspect preservation during homotopic thinning.

In the last part, we present the cubical complex framework, where objects are no more made only of voxels. We propose in this framework new skeletonization algorithms, some of them preserving automatically the visual aspect of the input during the thinning process (no filtering parameter from the user is required). These algorithms work in 2d and 3d, and we compare them to other thinning methods. We then show how a skeleton, in the cubical complexes framework, can be decomposed into basic parts, and we show some applications of these algorithms to material image analysis and medical image analysis. keywords: topology, skeleton, medial axis, voxels, cubical complexes, fundamental group, toric space, lambda-medial axis, parallel skeletonization, skeleton decomposition R É S U M É L'analyse d'images est devenue ces dernières années une discipline de plus en plus riche de l'informatique. L'accroissement de la taille des données à traiter, due à l'amélioration de la résolution des dispositifs de capture d'images ainsi qu'à l'utilisation de plus en plus fréquente de la troisième (voir même, dans certains cas, de la quatrième) dimension, nécessite des outils plus élaborés afin de pouvoir extraire des informations pertinentes de ces images, et simplifier le travail des chercheurs en aval. La topologie discrète propose un panel d'outils incontournables dans le traitement d'images, notamment grâce à l'outil du squelette, qui permet de simplifier des objets tout en conservant certaines informations intactes. Cette thèse étudie comment certains outils de la topologie discrète peuvent être utilisés pour le traitement d'images de matériaux.

Dans un premier temps, nous nous intéressons à la simulation d'écoulements de fluide. Dans les images où se déroulent ces simulations, il est nécessaire de retirer les morceaux du matériau qui ne sont pas connectés au reste du matériau (des graines). Dans certains cas, les images sont plongées dans un espace dit "torique", rendant la détection des graines difficile. Grâce à la caractérisation du groupe fondamental du tore, nous avons élaboré un algorithme permettant de détecter ces graines, afin de pouvoir les retirer.

La suite de la thèse est dédiée aux squelettes. Le squelette d'un objet peut être vu comme une simplification d'un objet, possédant certaines caractéristiques identiques à celles de l'objet original. Il est alors possible d'étudier un squelette et de généraliser certains résultats à l'objet entier. Dans la seconde partie de la thèse, nous proposons une nouvelle méthode pour conserver, dans un squelette, certaines caractéristiques géométriques de l'objet original (méthode nécessitant un paramètre de filtrage de la part de l'utilisateur) et obtenir ainsi un squelette possédant le même aspect que l'objet original. Notre méthode, qui fonctionne en toute dimension, est comparée à d'autres méthodes déjà existantes.

Enfin, la dernière partie propose de ne plus travailler avec des objets constitués de voxels, mais avec des objets constitués de complexes cubiques. Dans ce nouveau cadre, nous proposons de nouveaux algorithmes de squelettisation, dont certains permettent de conserver certaines caractéristiques géométriques de l'objet de départ dans le squelette, de façon automatique (aucun paramètre de filtrage ne doit être donné par l'utilisateur). Nos algorithmes, fonctionnant en 2d et en 3d, seront comparés à d'autres algorithmes de squelettisation. Nous montrerons ensuite comment un squelette, dans le cadre des complexes cubiques, peut être décomposé en différentes parties. Enfin, nous montrerons nos résultats sur différentes applications, allant de l'étude des matériaux à l'imagerie médicale.

mots clefs : topologie, squelette, axe médian, voxels, complexes cubiques, groupe fondamental, espace torique, lambda-medial axis, squelettisation parallèle, décomposition du squelette

A C K N O W L E D G E M E N T S / R E M E R C I E M E N T S
Je souhaiterais avant tout dire un très grand merci à Michel Couprie, mon directeur de thèse, qui m'a accompagné pendant toutes ces années. Il a toujours su montrer une grande patience face à ma grande inertie pour écrire des articles, et a toujours attentivement écouté mes différentes idées, dont certaines ne méritaient pas d'écoute attentive... Je souhaiterai aussi remercier Gilles Bertrand, directeur du laboratoire A3SI, qui m'a accompagné pendant ma thèse, m'a souvent conseillé sur différents choix, a toujours su écouter mes questions et y répondre malgré les grandes charges de travail qui lui incombaient, et qui fut mon principal fournisseur de Schoko-Bons.

Je souhaite remercier aussi les autres membres de mon jury de thèse, c'est à dire Jacques-Olivier Lachaud, Christian Ronse, Dominique Attali, Dominique Bernard et Edouard Thiel, qui ont accepté de consacrer du temps à la relecture de mon manuscrit, et qui ont aussi fait l'expérience de ma grande inertie à écrire cette thèse. Un second merci à Dominique Bernard, qui m'a souvent accueilli dans son laboratoire à Bordeaux, et m'a fait découvrir le merveilleux mur d'écran (dont je n'ai malheureusement pas pu emporter un petit morceau chez moi).

Ma thèse s'est déroulée au sein du laboratoire A3SI, où l'équipe qui m'a accueillie m'a très vite considéré comme l'un des ses membres, et m'a fait me sentir au bureau comme dans une seconde maison (simplement un peu moins chauffée en hiver). Merci pour toutes les discussions à la cantine, autour du café, ou dans les couloirs, et pour tous ces échanges d'idées si fructueuses (notamment l'épique discussion sur le problème des Sophie). Merci donc à Hugues, Yukiko, Denis, Xavier, Laurent, Michel, Gilles, Venceslas, Vincent, Dror, Marcin, les deux Jean, Mohammed et Thierry. Évidemment, je n'oublie pas mes compagnons de guerre, les autres doctorants (et bientôt docteurs) du laboratoire A3SI. Les moments partagés avec vous, dans le bureau ou hors du bureau (ou sur canal IRC) ont été réellement formidables et furent souvent l'occasion de joindre la procrastination à l'élévation de ma culture générale (surtout grâce à Quizyou). Un très grand merci à vous tous, Olena, Benjamin, Fabrice, Camille, Adrien, Nadine, Anthony. Un merci très spécial s'adresse à mes compagnons de bureau, qui m'ont accompagné (et supporté) pendant presque toutes ces quatre années: merci à Emilie qui est aujourd'hui docteur (avec mention spéciale du jury pour avoir tenu trois ans dans le même bureau que moi et Yohan), merci à Mohammed qui fit un passage court mais empli de rires au bureau, et Michal. J'adresse aussi un remercient très spécial à mon compagnon de thèse Yohan, qui m'accompagna dans le même bureau pendant presque quatre ans, travaillant sur un sujet assez différent du mien: sans lui, la thèse aurait peut-être été un tout petit peu plus productive (et j'aurai économisé de l'argent en n'achetant pas les tanks télécommandés), mais beaucoup plus austère... Merci aussi à David Menotti-Gomes, André Vital Saúde, et Nicolas Passat, qui sont partis depuis vers d'autres laboratoires, et avec qui j'ai pu échanger beaucoup d'idées lors de leur passage.

Je tiens aussi à remercier tous les acteurs de l'ombre qui m'ont aidé (plus sur le plan moral que sur les problèmes de fond de la thèse): ma famille. Merci à mes parents, mes grands-parents, mon frère et ma soeur (et leurs familles respectives) pour leur soutien quotidien et leur compréhension lors de mes longs silence, pendant les dîners, où je réfléchissais à mes problèmes. Même si j'use de moins de mots pour vous remercier, je n'en suis pas moins reconnaissant pour tout le soutien que vous m'avez apporté. Un très très grand merci à ma femme, Sophia, qui pendant ces quatre années m'a accompagné au quotidien dans mes joies et mes peines, a su rendre les moments difficiles plus simples à passer, et a sacrifié ses vacances pour rester auprès de moi pendant l'été au travail. Un grand merci aussi à ma belle famille, en Corée du Sud, et spécialement ma belle-maman, qui m'a toujours encouragé (avec des mots que je ne comprenais pas forcément) pendant ces années.

Enfin, merci à tous mes autres amis (Eric, Olivier, Frédéric, Ehan, Damien, Nicolas, Emilie, Benoît, Valérie, Christophe, Angeline, Stéphane) qui, autour d'un verre, d'une pizza ou d'une manette de jeu, m'ont souvent écouté expliquer mes idées et mes avancées, tout en cachant leur faible intérêt pour mon discours.

De façon plus générale, merci à toutes les personnes de mon entourage et toutes les personnes rencontrées pendant cette thèse, "avec qui mes rapports furent aussi divers qu'enrichissants". • [START_REF] Chaussard | Robust skeletonization using the discrete lambda-medial axis[END_REF] Robust skeletonization using the discrete lambda-medial axis, by John Chaussard, Michel Couprie and Hugues Talbot, in Pattern Recognition Letters, accepted (2010).

I N T R O D U C T I O N

1.1 general setting of this work 1.1.1 digital image processing and topology

In the 60s, it became realistic that computers could be used in order to automatically process data from digital images. The bank industry was mostly interested by these techniques in order to perform automatic text recognition in order to speed up the processing of checks. Text recognition is easily performed by human brain in every day life (less easily when reading a doctor's prescription), but automatically processing hand-written text with a computer is a difficult task, specifically because two different persons don't have the same writing.

A letter can be recognized by looking at various characteristics, such as how many pieces it is made of (for example, the letter "i" is made of two pieces), how many cavity it has (the letter "o" has one cavity), and its general shape ("a" has one cavity and is small, while "q" has also one cavity but is more elongated. Moreover, if one looks the result of a same letter written by different persons, he or she will realize that each letter is different from the other, although they define the same alphabetical symbol. In order to recognize a hand-written letter, an algorithm must therefore be insensitive to slight deformations of a shape.

Topology is the domain of mathematics studying the invariant properties of objects under continuous deformations, and is able to provide tools in order to solve such a problem. Among these tools, skeletonization is widespread in image processing: it consists in removing some data from the input image, in order to obtain at the end a simplified object with the same topological properties than the input (and, sometimes, the same shape). This powerful method found applications in many other domains, such as medical image processing ( [START_REF] Ma | A fully parallel 3D thinning algorithm and its applications[END_REF], [START_REF] Nivando | Réduction d'anisotropie des squelettes en niveaux de gris[END_REF], [START_REF] Daragon | Segmentation topologique du neo-cortex cérébral depuis des données IRM[END_REF], [START_REF] Dokládal | Liver Blood Vessels extraction by a 3-D topological approach[END_REF]), material image analysis ([JAB + 10], [START_REF] Plougonven | Lien entre la microstructure des matériaux poreux et leur perméabilité : mise en évidence des paramètres géométriques et topologiques influant sur les propriétés de transport par analyses d'images microtomographiques[END_REF], [Com]), environmental sciences ( [START_REF] Faucon | Application of Surface Topological Segmentation to Seismic Imaging[END_REF]), fingerprint analysis ( [START_REF] Couprie | Topological operators for grayscale image processing[END_REF]), polyhedrization ( [START_REF] Burguet | Strong thinning and polyhedric approximation of the surface of a voxel object[END_REF]), motion capture ([BMV10]), etc.

In the following, we leap back in time to the origins of topology...

presentation of topology 1.1.2.1 (hi)story of topology

In 1736, Euler solved the famous problem of the Seven Bridges of Königsberg ([Eul41]), by building the basis of what will become later the graph theory (although Euler did not mention any graph in his preliminary solution [START_REF] Hopkins | The truth about Königsberg[END_REF]). The problem consisted in knowing if, given a set of islands and a set of bridges connecting these islands, it was possible to walk through each bridge once and only once, and come back to the starting point. The elegant solution proposed by Euler expressed that, in order to solve this problem, no metric measure of the bridges (length of the bridges, angles between the bridges) was necessary: only the number of bridges connecting each island was to be taken into account. Euler continued to work on the field of what he called geometria situs (geometry of position), where the basic information contained in the shapes of geometric figures is solely studied. The term topology was introduced for the first time by Johann Benedict Listing ( [START_REF] Benedikt | Vorstudien zur Topologie[END_REF]) and slowly replaced the term geometria situs. Poincaré defined, in the end of the 19th century, the fundamental notions of homotopy, homology and fundamental group ( [START_REF] Poincaré | Analysis Situs[END_REF]). Popularity of topology grew larger during the 20th century, when it appeared that this new domain of mathematics was in fact a root of mathematics at the base of many new concepts.

Leonhard Euler Johann Benedict Listing

continuous deformation and topological invariants

In topology, two objects are equivalent if one can be obtained from the other by continuous deformation: intuitively, a continuous deformation is any transformation that does not involve cutting or piercing the object, or gluing together separate parts. Some examples of continuous deformations are stretching, bending, torsion. For this reason, topology is also nicknamed the geometry of plasticine, as topologists often consider objects as if they were made of deformable material.

Continuous deformation were formalized by Poincaré through three main concepts: homotopy of functions, homotopy of spaces and homeomorphism. Two objects which are equivalent by continuous deformation are said to be homeomorphic (homotopy is a more general kind of deformation which allows infinite pinching of some parts of the objects). Knowing if two objects are homotopic or homeomorphic is generally undecidable [START_REF] Andreyevich | Insolubility of the problem of homeomorphy[END_REF]).

Based on this, it appeared that, under continuous deformation, some characteristics of an object stay invariant. Among these characteristics appear, in all dimension, the number of connected components (number of pieces) of the object: whatever the continuous deformation applied to an object, its number of connected components stay the same (although their relative size and shape might change). In two dimensions and more, another topological invariant appear: the number of cavities of the object (number of connected components of the complement). In three dimensions and more, 1.1 general setting of this work the number of tunnels (or holes) of the object appears to be another topological invariant. Indeed, one can say that, in n-dimensions, there exists n "types" of invariants to take into account in an object.

Topological invariants of an object are intrinsic properties of the object, and should not depend of the ambient space where the object is embedded. For this reason, all topological invariants of objects were defined "inside" objects. For example, in 2d, the cavities of objects are not defined as connected components of the non-object, but rather as families of loops, inside the object, that cannot be continuously distorted into a single point. In 3d, the cavities are defined as families of 2 dimensional manifolds inside the object that cannot be distorted to a single point, while tunnels are defined as families of loops that cannot be reduced to a point. In 4d, the cavities are families of 3 dimensional manifolds that cannot be reduced to a single point. This has been formalized by Poincaré through the notions of homotopy group and n-dimensional cycles.

deformation retract and skeleton

Deformation retract is another type of deformation, which can qualify two homotopic spaces such that one of them is a subset of the other: this continuous deformation can be seen as a simplification of an object which preserves the topological invariants. As said previously, knowing if an object is the deformation retract of another is generally undecidable.

In the 60s, Blum introduced the notion of skeleton ( [START_REF] Blum | An Associative Machine for Dealing with the Visual Field and Some of its Biological Implications[END_REF], [START_REF] Blum | A transformation for extracting new descriptors of shape[END_REF]) in order to compute a particular deformation retract from a shape. First defined as the meeting point of a grassfire propagating from the border of a shape, it was then defined as the set of centers of maximal balls contained in the object. Other definitions (from various domains, such as mathematical morphology [START_REF] Serra | Image Analysis and Mathematical Morphology[END_REF], [START_REF] Schmitt | Morphologie mathématique. Collection logique mathématiques informatique[END_REF], [START_REF] Soille | Morphological Image Analysis[END_REF] and computational geometry [START_REF] Ogniewicz | Hierarchic Voronoi skeletons[END_REF] [AM96] [NSK + 97] [AL01]) were given, leading to various efficient methods for computing (homotopic) skeletons of a shape.

In an n-dimensional space, the skeleton of a shape is at most an (n -1)-dimensional shape: we say that the skeleton is thin.

digital topology

In order to apply topological concepts to digital image processing, it was necessary to propose discrete versions of the main fundamental topological concepts. This lead some authors in proposing discrete versions of homotopy, fundamental group, deformation retract, etc, such as Rosenfeld [START_REF] Rosenfeld | Arcs and Curves in Digital Pictures[END_REF], [START_REF] Rosenfeld | Three-dimensional digital topology[END_REF]), Kong ([Kon89], [START_REF] Kong | Concepts of digital topology[END_REF]), Malgouyres ([Mal00])... Skeletonization algorithms were also proposed in the digital topology framework ( [START_REF] Roy | Thinning algorithms: A critique and a new methodology[END_REF], [START_REF] Luc | Efficient computation of various types of skeletons[END_REF], [START_REF] Talbot | Euclidean skeletons and conditional bisectors[END_REF], [START_REF] Pudney | Distance-Ordered Homotopic Thinning: A Skeletonization Algorithm for 3D Digital Images[END_REF]). A more extensive description of skeletonization algorithms in the discrete framework is given in Sec. 3. In this work, we focus on homotopic thinning: basically, it consists in removing points from a discrete object, in order to obtain, at each step, a new object homotopic to the previous one, until stability is reached.

In applications, discrete skeletons are used to simplify a shape in the two or three dimensional discrete space, while preserving its topological characteristics. It is more easy to study the skeleton of a shape rather than the shape itself, as it contains less data. In the discrete framework, skeletons are not always thin (of course, it depends on what definition of thinness is used in the discrete framework).

contributions and contents of this thesis

This thesis initially aimed at studying how topological tools can help material analysis. All along the chapters of this work, images of materials will be used as examples and results of new algorithms. Moreover, results will be also presented on other types of shapes, in order to prove that the methods exposed here are not aimed at only one domain.

• The first part will be about fluid flow simulation. The global goal of the project surrounding this work was to decide if it is possible to reduce fluid flow simulation calculation of a material to the skeleton of the pore space of this material, and still obtain precise measures on the tested material. In this work, the skeleton should be a curvilinear object, and the sample of the tested material is considered as embedded in a toric space. Detecting and removing parts of the material which do not wrap around the toric space allows to remove a "source" of surfaces in the skeleton of the pore space.

-In order to do so, we first define basic notions in the toric space, such has neighbourhood, homotopy and loops. Our definition of loops allow to avoid some problems that might occur in small toric spaces.

-Then, we define the wrapping vector of loop, which is invariant under homotopic deformation. Based on this, we find some well-known results about the fundamental group of the torus.

-Finally, we propose an algorithm which allows to detect if some connected components of an object are wrapped around the torus or not. We show also that our algorithm allows to precisely understand how a component wraps around the torus.

• The second part of this thesis is about a new shape descriptor, called the discrete λ-medial axis, in the discrete framework. In some applications, the topology of a shape is not sufficient for characterizing the shape: it is also necessary to study its geometry. This new shape descriptor can be used during skeletonization algorithm in order to retain, during the thinning, important visual features of an object. Moreover, in the continuous framework, it possesses good stability to contour deformation of the shape: we evaluate this stability in the discrete framework by comparing the discrete version of the λ-medial axis to other medial axes.

-We first define the λ-medial axis as it was originally defined in the continuous framework ( [START_REF] Chazal | The λ-Medial Axis[END_REF]), and then adapt this definition to the discrete framework.

-We then give an algorithm for computing the discrete λ-medial axis and, as the proposed algorithm is not linear in time (depending on the number of points of the object), we propose a second shape descriptor, called the discrete λ ′ -medial axis, which can be computed in linear time.

-We perform a series of tests, in order to compare these two shape descriptors with other medial axes (the Euclidean medial axis and the integer medial axis): we compare the stability of each axis to rotation and to noise.

• The last part is taking place in the cubical complex framework. In this framework, we show that decomposition of a skeleton is straightforward and has properties, close to the ones of the continuous framework.

-After introducing some basic notions about cubical complexes, we propose a parallel-thinning scheme for performing homotopic thinning of objects embedded in the cubical complex framework. We also give a methodology for using any shape descriptor of the discrete framework in this new framework (and preserve, during homotopic thinning, important visual information on the shape). Finally, we prove that, under some conditions, the results of this thinning is thin.

-We give an algorithm, in the cubical complex framework, for performing homotopic thinning which preserves some visual features of the object and which does not require any user input. After proving that the result of this algorithm produces thin result, we compare this algorithm with other "parameter-free" skeletonization algorithms of the discrete framework. To do so, we give a measure of the visual quality of a skeleton.

-We finally explain how a skeleton can be decomposed easily into components in the cubical complex framework, and we study the results of the decomposition.

• In the appendix, we give some basic definitions about digital topology and image analysis, as well as extra algorithms that were isolated from the rest of this work in order to keep fluent the reading of this thesis.

detecting object wrapped inside toric spaces 2.1 how are material analysis and toric spaces related?

porous materials and skeletons

A percolating porous material is "a solid punctured by voids, through which, when connected to the exterior, a fluid or gas can flow" ( [START_REF] Plougonven | Lien entre la microstructure des matériaux poreux et leur perméabilité : mise en évidence des paramètres géométriques et topologiques influant sur les propriétés de transport par analyses d'images microtomographiques[END_REF]). These materials are used in many applications, such as car industry where ceramics are used in the manufacturing of particle filters, petrology where studying sandstones can help extracting more oil from wells, agriculture where understanding soils structures can help predicting water retention process, etc. The set of the voids of a porous material is called the porosity, or the pore space. Many applications involving porous materials require measuring the permeability of the material, which tells how easily a fluid can flow through the pore space of a material. The permeability can be obtained by computing the flow map of the fluid through the pore space (to each point of the pore space, a vector giving the direction and velocity of the flow is associated). Computation of such map can be performed on the image of the material and the result is an image where a vector is associated to each voxel of the porous space ([ABE94], [START_REF] Bernard | Numerical study of the coupled evolution of microgeometry and transport properties of simple 3D porous media[END_REF], [START_REF] Bernard | Permeability assessment by 3D interdendritic flow simulations on microtomography mappings of Al-Cu alloys[END_REF]).

As pointed out in [START_REF] Plougonven | Lien entre la microstructure des matériaux poreux et leur perméabilité : mise en évidence des paramètres géométriques et topologiques influant sur les propriétés de transport par analyses d'images microtomographiques[END_REF], the computation of the flow map is "computationally intensive", and can therefore be long. For this reason, it is necessary to use simplified models of the pore space in order to compute the flow map.

The skeletonization operation allows to simplify an object's structure while preserving important topological information of the original data. The main motivation of this work is to test if the skeleton of the pore space could be used as a valid simplified model in order to compute a flow map.

The work presented hereafter focuses on obtaining a curvilinear skeleton from the pore space of a material's image. Computation of a flow map based on the skeleton and testing the validity of the results will be presented in [Com].

from grey scale images to binary images

The work presented here starts with a grey-level image obtained with 3d microtomography imagery. The first step is to perform a binarisation (also called segmentationn) of the image, meaning that each voxel of the image must be labelled as part of the material (the foreground) or part of the pore space (the background). The most popular segmentation methods involve thresholding (

[SS01]), level sets ([OS88], [ZCMO96], [OP03]), region growing([PL90], [CL94], [FZBH05]), graph partitioning ([Gra06], [WL93], [Zah71]), wa- tershed ([BM92], [CB97], [CBNC10]),

split and merge algorithms ([HP76]) or energy minimization ([LV01], [BVZ01]).

In our case, the grey-level images of porous material are segmented using a filtering step based on anisotropic diffusion, followed by a threshold ([PM90], [MN01]).

embedding the image in a toric space

When simulating a fluid flow through a porous material, we only possess the image of a sample of this material. The simulation calculation, in order to produce correct results, should be performed on the whole material, and not only on one of its sample. However, it is not usually possible to obtain the image of the whole piece of material (which is very big). Therefore, the whole material is approximated by the tessellation of the space made up by copies of the sample we have, under the condition that the sample's volume exceeds the Representative Elementary Volume1 of the material ([Bea72], [START_REF] Scheidegger | The Physics of Flow Through Porous Media[END_REF], [START_REF] Gérard | Assessment of geometrical and transport properties of a fibrous C/C composite preform as digitized by X-ray computerized microtomography: Part II. Heat and gas transport properties[END_REF]).

When the whole Euclidean space is tiled this way, the results of the fluid flow simulation is itself a tessellation of the local flow obtained inside any copy of the sample (see Fig. 2a). When considering the flow obtained inside any copy of the sample, it appears that the flow leaving the sample by one side comes back inside the sample by the opposite side (see Fig. 2b). Thus, it is possible to perform the fluid flow simulation only on the sample (and not on the tessellation), under the condition that its opposite sides are joined: with this construction, the sample is embedded inside a toric space ([Hat02], [START_REF] Stillwell | Classical Topology and Combinatorial Group Theory[END_REF]). As depicted on the sequence shown on Fig. 1, when joining the opposite's border of an image, one obtains a torus. In the following chapter, we consider all image-spaces as toric spaces. sample, it is necessary to remove its grains. Typically, in a finite Euclidean space, a grain is a connected component which does not "touch" the borders of the space). However, considering the sample inside a toric space leads to new difficulties. Indeed, such a space does not possess any border, therefore, the definition of a grain cannot rely on the space's borders. In order to understand what is a grain (or cavity) in a toric space, let us consider an image and let us tessellate the entire infinite space with it. Intuitively, a grain is a component which, in the tessellation, is contained in a finite bounding box; in other words, in the (infinite) tessellation, the grain does not "spread to the infinite" and does not touch the borders of the space. Any component which is not a grain spreads to the infinite of the space.

For example, when the whole Euclidean space is tessellated with the image presented on Fig. 4a (on the left), then the piece of material can be "enclosed inside a curve" (the dotted lines on the right side) and produces a grain in the tessellation. On the other hand, when the whole Euclidean space is tessellated with the image presented on Fig. 4b, the piece of material "spreads to the infinite" and cannot be considered as a grain in the tessellation.

This intuitive characterization requires to tessellate the infinite space with the image, and cannot be used directly for characterizing efficiently grains and cavities in toric spaces. We need to find another definition in order to produce an algorithm detecting grains in a toric space.

toric spaces are not simply connected

A space is said to be simply connected if every loop inside the space is homotopic to a single point (in other words, it can be continuously distorted into a point). The fundamental group of the space is said to be trivial. In a toric space, some loops are not homotopic to a point: these loops wrap around the torus and cannot be continuously distorted into a point: they are called toric loops. The figure 3a, which must be seen as a 2d toric space (opposite sides joint together), provides an example of a toric loop (in green) and an example of a loop homotopic to a point. Indeed, the green loop wraps around the torus (see Fig. 3b) while the blue loop can be distorted into a single point (see Fig. 3c to i).

characterizing grains in a toric space

A grain is a component which does not wrap completely around the toric space, and can therefore be enclosed in a finite bounding box when tessellating the Euclidean space with the image. On the opposite, a non-grain wraps around the toric space and produces infinite components when tessellating the Euclidean space with the image. In other words, a non-grain contains a toric loop, while a grain does not.

One can see, on Fig. 4a, that any closed curve drawn inside the piece of material can be reduced to a point: the piece is a grain in the toric space. However, on Fig. 4b, there exists some curves inside the piece of material (the dotted line) which cannot be reduced to a point: the piece contains a toric loop and is not a grain.

Generally, in digital topology, deciding if two objects are homotopic is most of the time undecidable. However, deciding if a loop in discrete toric spaces can be continuously reduced to a points is possible. We build, in the following, a simple framework adapted to discrete toric spaces leading to an algorithm allowing to know if a component contains a toric loop (and therefore, allowing to decide if it is a grain or not).

Figure 4: Grains in toric spaces -The image in a contains no grain based on the 'border criterion'; when the Euclidean space is tessellated with copies of the image, grains appear (the circled connected component is an example of grain). In b, the connected component has toric loops (e.g. the dotted line) and when the Euclidean space is tessellated with copies of the image, no grain appear.

basic notions in toric spaces

In order to define formally a toric loop, we give additional definitions related to toric spaces.

discrete toric spaces

An n-dimensional torus is classically defined as the direct product of n circles (see [START_REF] Hatcher | Algebraic topology[END_REF]). In the following, we give a discrete definition of toric space, based on modular arithmetic (see [START_REF] Graham | Concrete Mathematics: A Foundation for Computer Science[END_REF]). Given

, ..., b n ) ∈ Z n , a ⊕ d b = (a 1 ⊕ d 1 b 1 , ..., a n ⊕ d n b n ). The group (T n , ⊕) is the direct product of the n groups (Z d i , ⊕ d i ) (1 i n)
, and is an n-dimensional discrete toric space [START_REF] Hatcher | Algebraic topology[END_REF].

The scalar d i is the size of the i-th dimension of T n , and d is the size (vector) of T n . For simplicity, the operation ⊕ d will be also denoted by ⊕.

neighbourhood in toric space

As in Z n (see appendix, Sec. 9.1, p. 204), various neighbourhood relations can be defined in a toric space.

Definition 2.2.1 An m-step (0 < m n) is a vector s = (s 1 , ..., s n ) of Z n such that, for all i ∈ [1; n], s i ∈ {-1, 0, 1} and |s 1 | + ... + |s n ] m.
Two points a, b ∈ T n are m-adjacent if there exists an m-step s such that a ⊕ s = b.

Note that the steps must not be considered as elements of T n , but rather as elements of Z n . From this definition, we derive the m-neighbourhood of a point x as the set of all points which are m-adjacent to x.

In 2D, the 1-and 2-adjacency relations respectively correspond to the 4-and 8neighbourhood [START_REF] Kong | Digital topology: introduction and survey[END_REF] (defined in Sec. 9.1, p. 204) adapted to two-dimensional toric spaces. In 3D, the 1-, 2-and 3-adjacency relations can be respectively seen as the 6-, 18and 26-neighbourhood [START_REF] Kong | Digital topology: introduction and survey[END_REF] adapted to three-dimensional toric spaces (defined in Sec. 9.1, p. 204).

If the coordinates of the size vector of T n are all strictly greater than 2, then the m-neighbourhood of any element of T n is isomorphic to the m-neighbourhood of any element of Z n . Based on the m-adjacency relation previously defined, we introduce the notion of m-connectivity.

Definition 2.2.2 A set of points X of T n is m-connected if, for all a, b ∈ X, there exists a sequence (x 1 , ..., x k ) of elements of X such that x 1 = a, x k = b and for all i ∈ [1; k -1],
x i and x i+1 are m-adjacent.

loops in toric spaces

Classically, in Z n , an m-loop is defined as a sequence of m-adjacent points such that the first point and the last point of the sequence are equal [START_REF] Kong | A digital fundamental group[END_REF]. In this paper, we define a loop as a sequence of m-steps, which describes the direction followed by the loop in the toric space. This new definition allows us to give simple intermediate properties and proofs leading to our main theorem (Th. 2.4.11).

Definition 2.2.3 Given

p ∈ T n , an m-loop (of base point p) is a pair L = (p, V), where V = (v 1 , ..., v k ) is a sequence of m-steps such that (p ⊕ v 1 ⊕ ... ⊕ v k ) = p.
The number k is the length of L. We call i-th point of L, with

1 i k + 1, the point (p ⊕ v 1 ⊕ ... ⊕ v i-1 ). The loop (p, ()) is called the trivial loop of base point p.
Remark In this definition, the (k + 1)-th point of L is p, and has been defined in order to make some propositions and proofs more simple.

Remark This definition of loops in toric space allows to remove an ambiguity which can exist in small toric spaces. Indeed, when considering loops as a sequence of m-adjacent points, an ambiguity arises in toric spaces where one dimension has a size equal to 1 or 2. For example, let us consider the two-dimensional toric space T 2 = Z 3 × Z 2 , and the 2-adjacency relation on T 2 . Let us also consider x 1 = (1, 0) and x 2 = (1, 1) in T 2 , and let us consider the sequence of points L = (x 1 , x 2 , x 1 ).

The sequence L could either be the loop passing by x 1 and x 2 and doing a 'u-turn' to come back to x 1 , or either be the loop passing by x 1 and x 2 , and 'wrapping around' the toric space in order to reach x 1 without making any 'u-turn', as shown on Fig. 5. In toric spaces of small size, defining a loop as a sequence of m-adjacent points may lead to such ambiguity.

However, considering a loop as a sequence of m-steps removes the ambiguity: let v be the vector (0, 1), the loop passing by x 1 and x 2 and making a u-turn is (x 1 , (v, -v)) (see Fig. 5-b), while the loop wrapping around the toric space is (x 1 , (v, v)) (see Fig. 5-c). Since m-steps are elements of Z n , we have v = -v.

loop homotopy in toric spaces

homotopic loops

We now define an equivalence relation between loops, corresponding to an homotopy, inside a discrete toric space. An equivalence relation between loops inside Z 2 and Z 3 was defined in [START_REF] Kong | A digital fundamental group[END_REF], however, it cannot be adapted to discrete toric spaces. Observe that the following definition does not constrain the loops to lie in a subset of the space, on the contrary of the definition given in [START_REF] Kong | A digital fundamental group[END_REF].

Definition 2.3.1 Let K = (p, U) and R = (p, V) be two m-loops of base point p ∈ T n , with U = (u 1 , ..., u k ) and V = (v 1 , ..., v r ). The two m-loops K and R are directly homotopic if one of the three following conditions is satisfied:

1. There exists j ∈ [1; r] such that v j = 0 and U = (v 1 , ..., v j-1 , v j+1 , ..., v r ).

2. There exists j ∈ [1; k] such that u j = 0 and V = (u 1 , ..., u j-1 , u j+1 , ..., u k ).

There exists

j ∈ [1; k -1] such that • V = (u 1 , ..., u j-1 , v j , v j+1 , u j+2 , ..., u k ), and • u j + u j+1 = v j + v j+1 , and • (u j -v j ) is an n-step.

Remark

In the case 1 (resp. 2 and 3), we have k = r -1 (resp. (r = k -1) and (r = k)).

Remark It may be observed that in the above definition, the parameter m is used to specify that we consider m-loops, but it is not taken into account in order to decide if two m-loops are directly homotopic. Definition 2.3.2 Two m-loops K and R of base point p ∈ T n are homotopic if there exists a sequence of m-loops (C 1 , ..., C q ) such that C 1 = K, C q = R and for all j ∈ [1; q -1], C j and C j+1 are directly homotopic.

loop homotopy in toric spaces

Example

In the toric space Z 4 × Z 2 , let us consider the point p = (0, 0), the 1-steps v 1 = (1, 0) and v 2 = (0, 1), and the 1-loops L a , L b , L c and L d (see Fig. 6). The loops L a and L b are homotopic (two insertions of null vector have been performed), the loops L b and L c are directly homotopic, and the loops L c and L d are also directly homotopic. Thus, L a and L d are homotopic. On the other hand, it may be seen that the 1-loops depicted on Fig. 5-b and on Fig. 5-c are not directly homotopic.

fundamental group

Initially defined in the continuous space by Henri Poincaré in 1895 [START_REF] Poincaré | Analysis Situs[END_REF], the fundamental group is an essential concept of topology, based on the homotopy relation, which has been transferred into different discrete frameworks (see e.g. [START_REF] Kong | A digital fundamental group[END_REF], [START_REF] Malgouyres | Computing the Fundamental Group in Digital Spaces[END_REF], [START_REF] Bertrand | A note on 3-D simple points and simpleequivalence[END_REF]).

Given two m-loops K = (p, (u 1 , ..., u k )) and R = (p, (v 1 , ..., v r )) of same base point

p ∈ T n , the product of K and R is the m-loop K.R = (p, (u 1 , ..., u k , v 1 , ..., v r )).
The identity element of this product operation is the trivial loop (p, ()), and for each m-loop K = (p, (u 1 , ..., u k )), we define the inverse of K as the m-loop K -1 = (p, (-u k , ..., -u 1 )). The symbol will be used for the iteration of the product operation on loops.

Given a positive integer w, and an m-loop K of base point p, we set K w = w i=1 K and

K -w = w i=1 K -1 . We also define K 0 = (p, ()).
The homotopy of m-loops is a reflexive, symmetric and transitive relation: it is therefore an equivalence relation and the equivalence class, called homotopy class, of an m-loop R is denoted by [R]. The product operation can be extended to the homotopy classes of m-loops of same base point: the product of

[K] and [R] is [K].[R] = [K.R].
It may be easily seen that this binary operation is well defined since, if

K ′ ∈ [K] and R ′ ∈ [R], then K ′ .R ′ ∈ [K.R].
We now define the fundamental group of T n .

Definition 2.3.3 Given an m-adjacency relation on T n and a point p ∈ T n , the m-fundamental group of T n with base point p is the group formed by the homotopy classes of all m-loops of base point p ∈ T n under the product operation.

The identity element of this group is the homotopy class of the trivial loop, and for each m-loop K of base point p, the inverse of

[K] is [K -1 ], since [K.K -1 ] = [(p, ())].
The choice of the base point leads to different fundamental groups which are isomorphic to each other ([Mau96], Th. 3.2.16). Thus, in the following, we sometimes talk about the m-fundamental group of T n , without specifying the base point.

toric loops: characterization and detection

The toric loops, informally evoked in the introduction, can now be formalised using the definitions given in the previous sections. Definition 2.4.1 In T n , we say that an m-loop is a toric m-loop if it does not belong to the homotopy class of a trivial loop.

A connected subset of T n is wrapped in T n if it contains a toric m-loop.

The notion of grain introduced informally in Sec. 2.1.3.3 may now be defined:

Definition 2.4.2 A connected component of T n is a grain if it is not wrapped in T n .

algorithm for detecting wrapped subsets in a toric space

In order to know whether a connected subset of T n is wrapped or not, it is not necessary to build all the m-loops which can be found in the subset: the Wrapped Subset Detector (WSD) algorithm (see Alg. 1) answers this question in linear time (more precisely, in O(N.M), where N is the number of points of T n , and M is the number of distinct m-steps, under the condition of choosing the right data structures, such as arrays for the image and for the map HasCoord), as stated by the following proposition.

Proposition 2.4.3 Let T n be an n-dimensional toric space of size vector d. A non-empty m-connected subset X of T n is wrapped in T n if and only if WSD(n,m, T n ,d,X) is non-empty (see Alg. 1).

Remark

In Alg. 1, the division operation performed on line 11 is a 'coordinate by coordinate' division between elements of Z n .

To summarize, Alg. 1 'tries to embed' the subset X of T n in Z n : if some incompatible coordinates are detected by the test achieved on l. 10 of Alg. 1, then the object has Example Let us consider a subset X of points of Z 4 × Z 4 (see Fig. 7-a) and the 2adjacency relation. In Fig. 7-a, one element of X is chosen as p and is given the coordinates of the origin (see l. 1 of Alg. 1); then we set x = p. In Fig. 7-b, every neighbour y of x (l. 7,8) which is in X (l. 14) is given coordinates depending on its position relative to x (l. 15) and is added to the set S (l. 16).

Then, in Fig. 7-c, one element of S is chosen as x (l. 5). Every neighbour y of x is scanned (l. 7,8). If y is in X and has already been given some coordinates (l. 9), it is compared with x: as the coordinates of x and y are compatible in Z 2 (the test achieved l. 10 returns false), the set B remains empty. Else, if y is in X and has not previously been given coordinates (l. 14) (see Fig. 7-d), then it is given coordinates depending on its position relative to x (l. 15) and added to the set S.

Finally, in Fig. 7-e, another element of S is chosen as x. The algorithm tests one of the neighbours y of x (the left neighbour) which is in X and has already some coordinates (l. 9). As the coordinates of y and x are incompatible in Z 2 (the points (-1, 1) and (2, 1) are not neighbours in Z 2 ), the algorithm adds (-1,1)+(-1,0)-(2,1) 4 = (-1, 0) to B (l. 11): according to Prop. 2.4.3, the subset X is wrapped in T n .

wrapping vector and homotopy classes in toric spaces

Deciding if two loops L 1 and L 2 belong to the same homotopy class can be difficult if one attempts to do this by building a sequence of directly homotopic loops which 'links' L 1 and L 2 . However, this problem may be solved using the wrapping vector, a characteristic which can be easily computed on each loop.

wrapping vector of a loop

The wrapping vector of a loop is the sum of all the elements of the m-step sequence associated to the loop. Definition 2.4.4 Let L = (p, V) be an m-loop, with V = (v 1 , ..., v k ). Then the wrapping

vector of L is w L = k i=1 v i .
Remark In Def. 2.4.4, the symbol stands for the iteration of the classical addition operation on Z n , not of the operation ⊕ defined in Sec. 2.2.1. 8-a) has a wrapping vector equal to (4, 4), while the loop

Example In T 2 = Z 4 × Z 4 , depicted on Fig. 8, the loop K = (p, (v 3 , v 2 , v 3 , v 1 , v 3 )) (see Fig.
L = (p, (v 3 , v 1 , v 1 , -v 2 , -v 1 , -v 3 , -v 3 , -v 1 , -v 1 , v 2 , v 1 , v 1 , v 2
)) has a wrapping vector equal to (0, 0) (see Fig. 8-b).

We now define the notion of 'basic loops', which will be used for the proof of Prop. 2.4.6 and for building, in Def. 2.4.9, a canonical loop for a given wrapping vector. Remark For all i ∈ [1; n], the wrapping vector of the i-th basic loop of base point p is equal to

(d i .b i ).
The next property establishes that the wrapping vector of any m-loop can only take specific values in Z n . The proof may be found in Sec. 2.4.3. Proposition 2.4.6 Let T n be an n-dimensional toric space of size vector d = (d 1 , ..., d n ). A vector w = (w 1 , ..., w n ) of Z n is the wrapping vector of an m-loop of T n if and only if, for all i ∈ [1; n], w i is a multiple of d i .

Thanks to Prop. 2.4.6, we can now define the normalized wrapping vector of an m-loop. Definition 2.4.7 Given T n of size vector d = (d 1 , ..., d n ), let L be an m-loop of wrapping vector w = (w 1 , ..., w n ). The normalized wrapping vector of L is w

* = (w 1 /d 1 , ..., w n /d n ).
Remark It may be pointed out that, in Alg. 1, the set B contains the normalized wrapping vectors of loops contained in a set X (see Prop. 2.4.14).

Example

The wrapping vector and the normalized wrapping vector give information on how a loop 'wraps around' each dimension of a toric space before 'coming back to its starting point'. For example, let T 3 = Z 2 × Z 5 × Z 7 (hence, the size vector of T 3 is (2, 5, 7)). A loop with wrapping vector (4,5,0) has a normalized wrapping vector equal to (2,1,0): it wraps two times in the first dimension, one time in the second, and does not wrap in the third dimension.

On Fig. 8, the normalized wrapping vector of loop K (see Ex. 2.4.2.1), depicted on Fig. 8-a, is equal to (1, 1) (the loop K loops one time in each dimension), while the normalized wrapping vector of L (see Ex. 2.4.2.1), depicted on Fig. 8-b, is equal to (0, 0) (the loop L does not wrap in the toric space).

It may easily be seen that, in T n , for each i ∈ [1; n], the normalized wrapping vector of the i-th basic loop of any base point is equal to b i (see Def. 2.4.5).

equivalence between homotopy classes and wrapping vector

It can be seen that two directly homotopic m-loops have the same wrapping vector, as their associated m-step sequences have the same sum (see Def. 2.3.1). Therefore, we have the following property. Proposition 2.4.8 Two homotopic m-loops of T n have the same wrapping vector.

The following definition is necessary in order to understand Prop. 2.4.10 and its demonstration, leading to the main theorem of this chapter. Definition 2.4.9 Let p be an element of T n , and w * = (w * 1 , ..., w * n ) ∈ Z n . The canonical loop of base point p and normalized wrapping vector w * is the 1-loop

n i=1 (p, B i ) w * i , where (p, B i ) is the i-th basic loop of base point p. Example Consider T 3 = Z 3 × Z 2 × Z 2 , w * = (1, 1, -2
) and p = (0, 0, 0). The canonical loop of base point p and normalized wrapping vector w * is the 1-loop (p, V) with:

V=(     1 0 0     ,     1 0 0     ,     1 0 0     ,     0 1 0     ,     0 1 0     ,     0 0 -1     ,     0 0 -1     ,     0 0 -1     ,     0 0 -1     )
Proposition 2.4.10 Any m-loop of base point p ∈ T n and of normalized wrapping vector w * ∈ Z n is homotopic to the canonical loop of base point p and of normalized wrapping vector w * .

The proof of this proposition may be found in Sec. 2.4.3. This proposition shows that the canonical loop of base point p and of normalized wrapping vector w * can be seen as a canonical form for all loops of base point p and normalized wrapping vector w * .

From this, we deduce that two m-loops of same base point p and same normalized wrapping vector w * are homotopic, as they both belong to the homotopy class of the canonical loop of base point p and of normalized wrapping vector w * .

Example

In T 2 = Z 4 × Z 4 , let L be the 2-loop of base point p represented on Fig. 9-a. It can be seen that the normalized wrapping vector of L is equal to (1, -1): this means that the loop wraps 1 time around the first dimension, with a "clockwise" direction, and one time around the second dimension, with an "anti-clockwise". The canonical loop of base point p and of normalized wrapping vector (1, -1), represented on Fig. 9-b, belongs to the same homotopy class as L (Prop. 2.4.10).

We can now state the main theorem of this article, which is a direct consequence of Prop. 2.4.8 and Prop. 2.4.10. Remark According to Th. 2.4.11, the homotopy class of the trivial loop (p, ()) is the set of all m-loops of base point p that have a null wrapping vector. Thus, the loop depicted on Fig. 8-b belongs to the homotopy class of the trivial loop.

wrapping vector and fundamental group

Given a point p ∈ T n , we set Ω = {w * ∈ Z n / there exists an m-loop in T n of base point p and of normalized wrapping vector w * } (see Def. 2.4.7). From Prop. 2.4.6, it is plain that Ω = Z n . Therefore, (Ω, +) is precisely (Z n , +) Theorem 2.4.11 states that there exists a bijection between the set of the homotopy classes of all m-loops of base point p and Ω. The product (see Sec. 2.3.2) of two m-loops K and L of same base point p and of respective wrapping vectors w k and w l is the loop (K.L) of base point p and of wrapping vector (w k + w l ). Therefore we can state that there exists an isomorphism between the fundamental group of T n and (Ω, +).

Consequently, we retrieve in our discrete framework a well-known property of the fundamental group of toric spaces [START_REF] Hatcher | Algebraic topology[END_REF].

Proposition 2.4. [START_REF] Rosenfeld Thinning | [END_REF] The fundamental group of T n is isomorphic to (Z n , +).

proof of algorithm wsd

Proof (of Prop. 2.4.3) For all y ∈ X such that y = p, there exists a point x such that the test performed on l. 14 of Alg. 1 is true: we call x the label predecessor of y.

• At the end of the execution of Alg. 1, if the set B is empty, then the test performed l. 10 was never true. Let L = (p, V) be an m-loop contained in X, with V = (v 1 , ..., v k ), and let us denote by x i the i-th point of L. As the test performed l. 10 was always false, we have the following:

for all i ∈ [1; k -1], v i = Coord(x i+1 ) -Coord(x i ) v k = Coord(x 1 ) -Coord(x k )
The wrapping vector of L is

w = k-1 i=1 (Coord(x i+1 ) -Coord(x i )) +Coord(x 1 ) -Coord(x k ) = 0
Thus, if the algorithm returns false, each m-loop of X has a null wrapping vector and, according to Th. 2.4.11, belongs to the homotopy class of a trivial loop: there is no toric m-loop in X which is therefore not wrapped in T n .

• If B is not empty, then, there exists x, y ∈ X and an m-step a such that x ⊕ a = y and Coord(y) -Coord(x) = a.

It is therefore possible to find two sequences γ x and γ y of m-adjacent points in X, with γ x = (p = x 1 , x 2 , ..., x q = x) and γ y = (y = y t , ..., y 2 , y 1 = p), such that, for all i ∈ [1; q -1], x i is the label predecessor of x i+1 , and for all i ∈ [1; t -1], y i is the label predecessor of y i+1 . Therefore, we can set

           . for all i ∈ [1; q -1], u i = Coord(x i+1 ) -Coord(x i ) is an m-step such that x i ⊕ u i = x i+1 . for all i ∈ [1; t -1], v i = Coord(y i ) -Coord(y i+1 ) is an m-step such that y i+1 ⊕ v i = y i
Let N = (p, V) be the m-loop such that V = (u 1 , ..., u q-1 , a, v t-1 , ..., v 1 ). The m-loop N is lying in X and its wrapping vector w is equal to:

w = q-1 i=1 u i + a + t-1 i=1 v i = a -(Coord(y) -Coord(x)) = 0
Thus, when the algorithm returns a non-empty set, it is possible to find, inside X, an m-loop with a non-null wrapping vector: by Th. 2.4.11, there is a toric m-loop in X which is therefore wrapped in T n .

computing a basis for toric loops in a subset of a toric space

In this part, we show that Alg. 1 builds a basis for all normalized wrapping vectors of all toric m-loops contained in a subset of T n .

Given T n of size vector d and an m-connected subset X of T n , we consider having run WSD(n, m, T n , d, X), and we will use Coord, the function built on l. 15 of Alg. 1.

Given an m-step v and two points x, y ∈ X such that x ⊕ v = y, the points x and y are conflictive through v if Coord(x) + v = Coord(y). Observe that, for all conflictive pairs of points x, y through v contained in the subset X of T n , the vector ((Coord(x) + v -Coord(y))/d) is added to the set B built on l. 11 of Alg. 1.

The next lemma establishes that, in order to calculate the wrapping vector of an m-loop (and therefore, its homotopy class, as stated by Th. 2.4.11), only the conflictive pairs of points in the loop need to be considered: Lemma 2.4. [START_REF] Zhang | [END_REF] Let p ∈ X and let K = (p, V) be an m-loop in X, with V = (v 1 , ..., v k ). For all i ∈ [1; k + 1], we denote by x i the i-th point of K, and we set C = {i ∈ [1; k]|x i and x i+1 are conflictive through v i }. Let w be the wrapping vector of K. We have:

w = j∈C (Coord(x j ) + v j -Coord(x j+1 ))
Proof The wrapping vector w of K is by definition: Coord(x 1 ) = 0, we get the lemma proved.

w = k j=1 v j = j/ ∈C v j + j∈C v j = j/ ∈C (Coord(x j+1 ) -Coord(x j )) + j∈C v j = k j=1 (Coord(x j+1 ) -Coord(x j )) - j∈C (Coord(x j+1 ) -Coord(x j )) + j∈C v j As k j=1 (Coord(x j+1 ) -Coord(x j ))) = Coord(x k+1 ) -
We now focus on the set B, result of WSD(n, m, T n , d, X). For all x, y ∈ X that are conflictive through an m-step v, the vector ((Coord(x) + v -Coord(y))/d) is in B. The next proposition states that B can be seen as a generating set for all (normalized) wrapping vectors of all m-loops of X. Proposition 2.4.14 Let the set B = {w 1 , ..., w k } be the result of WSD(n,m, T n ,d, X). A vector w * ∈ Z n is the normalized wrapping vector of an m-loop of X if and only if there exists k non-negative integers α 1 , ..., α k such that

w * = k i=1 α i .w i (2.1)
Remark If x and y are conflictive through v, then y and x are conflictive through (-v): therefore, if u belongs to B, then -u also belongs to B. This is why it is possible, in Prop. 2.4.14, to restrain the choice of the coefficients α 1 , ..., α k to the set of non-negative integers.

Proof If L is an m-loop in X of normalized wrapping vector w * , then, by Lem. 2.4.13 and by construction of B, we deduce that w * satisfies Equ. 2.1. Now, let w * be a vector which satisfies Equ. (L w i ) α i . By construction, L * is contained in X, and its wrapping vector is equal to w * .

Thus, algorithm 1 builds a (non-minimal) basis allowing to compute the normalized wrapping vector of any m-loop of X: the normalized wrapping vector of any m-loop lying inside X is the linear combination of elements of B. The set B, result of Alg. 1, allows to get information on how X wraps inside the toric space.

additional proofs and lemmas

In the following, we give some proofs and lemmas that were useful for establishing proof of Alg. 1. We decided to move these proofs in this section in order to keep the reading of section 2.4 fluent.

Proof of Prop. 2.4.6 -First, let L = (p, V) be an m-loop of wrapping vector w = (w 1 , ..., w n ), with p = (p 1 , ...,

p n ). As L is a loop, for all i ∈ [1; n], p i ⊕ d i w i = p i . Hence, for all i ∈ [1; n], w i ≡ 0(mod d i ), proving that w i is a multiple of d i for all i ∈ [1; n].
Let w = (w 1 , ..., w n ) be a vector of Z n such that for all i ∈ [1; n], w i is a multiple of d i .

If we denote by (p, B i ) the i-th basic loop of base point p, we see that (

n i=1 (p, B i ) w i /d i )
is an m-loop whose wrapping vector is equal to w.

Lemma 2.4.15 Any m-loop L = (p, V) is homotopic to a 1-loop.

Proof Let us write V = (v 1 , ..., v k ) and let j ∈ [1; n] be such that v j is not a 1-step. The m-loop L is directly homotopic to L 1 = (p, V 1 ), with V 1 = (v 1 , ..., v j-1 , v j , 0, v j+1 , ..., v k ). As v j is not a 1-step, there exists an (m-1)-step v ′ j and a 1-step v j1 such that v j = (v j1 + v ′ j ). The m-loop L 1 is directly homotopic to L 2 = (p, V 2 ), with V 2 = (v 1 , ..., v j-1 , v j1 , v ′ j , v j+1 , ..., v k ).
By iteration, it is shown that L is homotopic to a 1-loop. Lemma 2.4. 16 Let L A = (p, V A ) and L B = (p, V B ) be two m-loops such that V A = (v 1 , ..., v j-1 , v j1 , v j2 , v j+1 , ..., v k ) and V B = (v 1 , ..., v j-1 , v j2 , v j1 , v j+1 , ..., v k ) where v j1 and v j2 are 1-steps. Then, L A and L B are homotopic.

Proof As v j1 and v j2 are 1-steps, they have at most one non-null coordinate. If (v j1v j2 ) is an n-step, the two loops are directly homotopic. If (v j1v j2 ) is not an n-step, then necessarily v j1 = (-v j2 ). Therefore, L A is directly homotopic to L C = (p, V C ), with

V C = (v 1 , ..., v j-1 , 0, 0, v j+1 , ..., v k ). Furthermore, L C is also directly homotopic to L B .
Proof of Prop. 2.4.10 -Let a and b be two non-null 1-steps. Let i (resp. j) be the index of the non-null coordinate of a (resp b). We say that a is index-smaller than b if i < j.

Let L = (p, V) be an m-loop of normalized wrapping vector w * ∈ Z n .

• 1 -The m-loop L is homotopic to a 1-loop L 1 = (p, V 1 ) (see Lem. 2.4.15).

• 2 -By Def. 2.3.1 and 2.3.2, the 1-loop L 1 is homotopic to a 1-loop L 2 = (p, V 2 ), where V 2 contains no null vector.

• 3 -Let L 3 = (p, V 3 ) be such that V 3 is obtained by iteratively permuting all pairs of consecutive 1-steps (v j , v j+1 ) in V 2 such that v j+1 is index-smaller than v j . Thanks to Lem. 2.4.16, L 3 is homotopic to L 2 .

• 4 -Consider L 4 = (p, V 4 ), where V 4 is obtained by iteratively replacing all pairs of consecutive 1-steps (v j , v j+1 ) in V 3 such that v j+1 = (-v j ) by two null vectors, and then removing these two null vectors. The loop L 4 is homotopic to L 3 (see Def. 2.3.1).

The 1-loop L 4 is homotopic to L, it has therefore the same normalized wrapping vector w * = (w * 1 , ..., w * n ) (see Prop. 2.4.8). By construction, each pair of consecutive 1-steps (v j , v j+1 ) of V 4 is such that v j and v j+1 are non-null and either v j = v j+1 or v j is index-smaller than v j+1 .

Let d = (d 1 , ..., d n ) be the size vector of T n . As the normalized wrapping vector of L 4 is equal to w * , we deduce that the ( We propose an adaptation of our definition of loop homotopy to Z 2 and Z 3 , and we show that the resulting definition is equivalent to the definition of loop equivalence given in [START_REF] Kong | A digital fundamental group[END_REF]. In the following definition, a loop is a sequence of point (x 1 , ..., x k ) of Z n (with n = 2 or n = 3) such that x 1 = x k and, for all i ∈ [1; k], x i and x i+1 are adjacent (the definition of a loop depends on a chosen adjacency relation).

Definition 2.5.1 [START_REF] Kong | A digital fundamental group[END_REF] In Z n (with n = 2 or n = 3), two loops C 1 = (x 1 , ..., x k ) and C 2 = (y 1 , ..., y j ) differ only in a set K if k = j, and for all i ∈ [1; k], p i = q i iff q i / ∈ K, and p i ∈ K iff q i ∈ K.

In Z n (with n = 2 or n = 3), two loops C 1 = (x 1 , ..., x k ) and C 2 = (y 1 , ..., y j ) are directly equivalent if

• The loops are equal after removing all consecutive duplicate points in each loops, or • The two loops only differ in a unit lattice square or a unit lattice cube.

The previous definition is a simplified version of the original definition given in [START_REF] Kong | A digital fundamental group[END_REF], where the author is concerned by homotopy inside objects (this part of the definition has been removed as it irrelevant for the following study).

It is possible to adapt all definitions given previously in this thesis to Z n , by replacing the operation '⊕' by the usual operation '+'. This way, we define the direct homotopy of m-loops in Z n : two m-loops of same base point p ∈ Z n are directly homotopic if they are directly homotopic in the sense of definition 2.3.1 adapted to Z n .

We accordingly define the homotopy of m-loops in Z n : two m-loops K and R of same base point p ∈ Z n are homotopic if there exists a sequence (K = C 1 , ..., C i = R) of m-loops such that, for all j ∈ [1; i -1], C i and C i+1 are directly homotopic.

A non self-intersecting loop is an m-loop (p, (u 1 , ..., u k )) such that, for all i ∈ [1; k[, and for all j ∈]i; k], with (i, j) = (1; k), j h=i u h = 0. We now introduce a lemma which will be used in the proof of the forthcoming proposition. When considering all possible symmetries and rotations in the unit lattice cube of Z 3 , only 5 kinds of non self-intersecting (and non trivial) 1-loops can be built (as shown on Fig. 10). For example, only one kind of 1-loop composed of eight 1-steps can be built (see Fig. 10a): let us call it (p, (u 1 , ..., u 8 )). It is plain that, in order to pass by each of the cube's eight vertices once and only once, we must have {u 1 , ...,

u 8 } = {v a , v a , -v a , -v a , v b , -v b , v c , -v c }, with v a , v b , v c being 1-steps of Z 3 such that v a = ±v b , v a = ±v c and v b = ±v c .
In order to avoid the loop to self-intersect, we must have

u 1 = v a or u 2 = v a .
If we choose u 2 = v a , then, in order to avoid the loop to self-intersect, we need u 6 = v a and u 4 = u 8 = -v a . Then, we set u 1 = v b , and consequently, u 3 = v c , u 5 = -v b , and

u 7 = -v c . Choosing u 1 = v a leads to a symmetrical loop.
A similar reasoning, in the case |U| = 6, shows that the two loops 10c) are the only configurations of non self-intersecting loops that can be built in the unit lattice cube of Z 3 . The cases |U| = 4 and |U| = 2 are even simpler, each with one possible configuration of non-self intersecting loop: (p, (v a , v b , -v a , -v b )) (see Fig. 10d) and (p, (v a , -v a )) (see Fig. 10e).

(p, (v a , v b , v c , -v a , -v b , -v c )) (Fig. 10b) and (p, (v a , v b , -v a , v c , -v b , -v c )) (see Fig.
The five kinds of non self-intersecting 1-loop which can exist in a unit lattice cube are represented on Fig. 10. It is plain that each of these loops can be reduced to a trivial loop if the cube does not contain two diametrically opposite points not belonging to the loop.

The next proposition establishes that, in Z n , m-loop homotopy and m-loop equivalence defined in [START_REF] Kong | A digital fundamental group[END_REF]

Proof

In the following proof, we set U = (u 1 , ..., u k ), V = (v 1 , ..., v r ), and, for all i ∈ [1; k + 1], we denote by x i the i-th point of K, and for all i ∈ [1; r + 1], we denote by y i the i-th point of R. We have, for all i ∈ [1; k], u i = (x i+1x i ) and, for all i ∈ [1; r], v i = (y i+1y i ).

If k = r, then it can be easily seen that K and R are directly equivalent if and only if they are homotopic. Now, let us consider the case where k = r. We define

D K = {x ∈ K| there exists i ∈ [2; k] such that x i = y i } D R = {y ∈ R| there exists i ∈ [2; k] such that y i = x i }.
Note that, for all i ∈ [2; k], x i ∈ D K if and only if y i ∈ D R . Thus, (D K ∪ D R ) is the set of all points of K which differ from the corresponding point of R, and vice versa. i) Suppose that K and R are directly homotopic (see Def. 2.3.1, case 3), then there exists j ∈ [1; k -1] such that V = (u 1 , ..., u j-1 , v j , v j+1 , u j+2 , ..., u k ), where (u jv j ) is an n-step and (u j + u j+1 = v j + v j+1 ). Obviously, we have

(D K ∪ D R ) = {x j+1 , y j+1 }.
As (x j+1y j+1 ) = (u jv j ), the points x j+1 and y j+1 lie in a same unit lattice square or cube. Furthermore, if n = 3 and m = 1, (u jv j ) is a 2-step, proving that x j+1 and y j+1 lie in a same unit lattice square (no diametrically opposite points to matter): the m-loops K and R are directly equivalent.

ii) Reciprocally, suppose that K and R are directly equivalent.

• In the case where (n, m) ∈ {(2, 2), (3, 3)}, we set, for all h ∈ [1; k], S h = (v 1 , ..., v h-1 , x h+1y h , u h+1 , ..., u k ) and C h = (p, S h ).

First, we prove that for all h ∈ [1; k], C h is an m-loop of base point p, by proving that (x h+1y h ) is an m-step. As K and R are directly equivalent, we either have x h = y h or x h+1 = y h+1 (the result is then directly obtained), or we have x h , y h , x h+1 and y h+1 lying in a same unit lattice cube or square: (x h+1y h ) is therefore an n-step, and also an m-step since n = m. We are going to prove that for all h ∈ [1; k -1], C h and C h+1 are directly homotopic by proving that they match the case 3 of Def. 2.3.1. We set S h = (a 1 , ..., a k ), and

S h+1 = (b 1 , ..., b k ): • S h+1 = (a 1 , ..., a h-1 , b h , b h+1 , a h+2 , ..., a k ), • (a h + a h+1 ) = x h+1 -y h + u h+1 = x h+2 -y h , and (b h + b h+1 ) = v h + x h+2 -y h+1 = x h+2 -y h , • (a h -b h ) = x h+1 -y h -v h = x h+1
y h+1 is an n-step, as either x h+1 = y h+1 or x h+1 and y h+1 belong to a same unit lattice cube or square, and also an m-step since n = m.

Finally, by pointing out that C 1 is equal to K and that C k is equal to R, we conclude that K and R are homotopic.

• In the case where (n, m) = (3, 1), let us assume that the set D K (resp. D R ) contains only consecutive points of the loop K (resp. R): if it was not the case, the following reasoning could still be performed on each consecutive elements of D K and D R in order to obtain the same result.

Thus, there exists i ∈ [2; k] and j ∈ [i; k] such that (D K ∪ D R ) = {x i , ..., x j , y i , ..., y j } is included in a unit lattice square or a unit lattice cube which does not contain two diametrically opposite points not belonging to (D K ∪ D R ). Therefore, we have V = (u 1 , ..., u i-2 , v i-1 , ..., v j , u j+1 , ..., u k ). It is possible to simplify the problem in two ways:

• As m = 1, y ix i-1 and x ix i-1 are 1-steps. Therefore, x i-1 , x i and y i are in a same unit lattice square and, as x i = y i , we find that x i-1 lie in the same unit lattice cube or square than the elements of (D K ∪ D R ). The same way, we prove that x j+1 lie in the same unit lattice cube or square than the elements of (D K ∪ D R ).

It may be seen that K is homotopic to the 1-loop K ′ = (p, (u 1 , ..., u j , -v j , ...,

-v i-1 , v i-1 , ..., v j , u j+1 , ..., u k )).
Hence, proving that K ′ and R are homotopic can be achieved by proving that the 1-loop (x i-1 , (u i-1 , ..., u j , -v j , ..., -v i-1 )), whose points are contained inside the same unit lattice cube or square than (D K ∪ D R ), is homotopic to the trivial loop

(x i-1 , ()).
• Let C = (p, (w 1 , ..., w i , ..., w j , ..., w k )) be a self intersecting 1-loop such that p + w 1 + ... + w i = p + w 1 + ... + w j . The problem of showing that C is homotopic to (p, ()) can be decomposed into two smaller problems: to prove that C ′ = (p + w 1 + ... + w i , (w i+1 , ..., w j )) is homotopic to (p + w 1 + ... + w i , ()), and then to prove that C ′′ = (p, (w 1 , ..., w i , w j+1 , ..., w k )) is homotopic to (p, ()). Therefore, in order to prove that a 1-loop is homotopic to a trivial loop, we can consider only, without loss of generality, non self-intersecting 1-loops.

Therefore, in order to prove that the two 1-loops K and L are homotopic, it is sufficient to prove that any non self-intersecting 1-loop, contained in a unit lattice cube which does not contain two diametrically opposite points not belonging to the loop, is homotopic to a trivial loop: this is established by Lem. 2.5.2.

As the case (n, m) = (2, 1) is included in the case (n, m) = (3, 1), it can be concluded that K and R are homotopic.

results and conclusion

In this chapter, we gave a formal definition of loops and homotopy, which suits all dimensions, inside discrete toric spaces in order to define various notions such as the fundamental group and the wrapping vector. Moreover, we show that wrapping vectors completely characterize toric loops (see Th. 2.4.11) and lead to a linear time algorithm for the detection of such loops in a subset X of T n . In addition, this algorithm allows to build, for each subset X of T n , a basis of vectors which characterizes all toric loops contained in X and describes how X wraps around T n .

In Sec. 2.1, we have seen that detecting toric loops is important in order to filter grains from a material's sample and perform a fluid flow simulation on the sample. The WSD algorithm proposed in this article detects which subsets of a sample, embedded inside a toric space, will create grains and should be removed. The WSD algorithm can also be used to validate the sample extracted from the material and used for the simulation: if an important portion of the sample is classified as grain, then deleting the grain would remove a big portion of material. In this case, one can say that the sample was not correctly chosen, and another sample should be taken. An example of toric loops detection, in 2d, is shown on Fig. 11: the WSD algorithm is used on Fig. 11a, and detects a connected component containing a toric loop (highlighted on Fig. 11). On Fig. 12, we show how, in 3d, toric loops detection allows to obtain a surface-free skeleton of the porous space of a material.

a) b) c) d) e)
Figure 12: Results of WSD algorithm in 3d -On a, we consider a sample of porous material, embedded in a toric space. The toric skeleton of the porous space contains a surface patch, as shown on b (the red square shows the zone where the surface appears, a close-up of this zone is displayed on d). After removing components of the material which do not contain a toric cycle, the toric skeleton of the filtered porous space does not contain any surface patch, as shown on c (the red square shows the zone where the surface appeared before, a close-up of this zone is displayed on e).

In this chapter, we give a global overview of the state of the art of skeletonization in the digital topology framework (also called, sometimes, voxel framework), at the time when this thesis was written. We talk about skeleton computation, skeleton analysis and preservation of the visual aspect (medial axes, ...) of the input during skeletonization.

Contents

thinning methodologies

The skeletons were originally defined by Blum ([Blu62]) through an analogy with a grassfire. Imagine an object as made of grass; if you set on fire the contour of the object, then the meeting points of the flame fronts would constitute the skeleton of the object.

In the continuous framework, this definition is equivalent to saying that the skeleton if the set of points which are centers of maximal balls (balls included in the object, and not strictly included in any other such ball -see Sec. 9.1 p.204) ( [START_REF] Calabi | A study of the skeleton of plane figures[END_REF]).

In 1969, Hilditch gave four properties that a skeleton in a bidimensional space should possess [START_REF] Hilditch | Linear Skeletons From Square Cupboards[END_REF]). Adapted to the general case of n-dimensional skeletons, these properties are that a skeleton should be homotopic to the original object, it should be thin (in an n-dimensional space, the skeleton of an object should be at most (n -1)dimensional), it should be centered in the original object, and skeletonizing a skeleton should not change anything.

In the continuous framework, the set of centers of maximal balls, called the medial axis, holds these properties [START_REF] Lieutier | Any open bounded subset of R n has the same homotopy type as its medial axis[END_REF]. In the discrete framework Z n , the discrete medial axis does not hold two of these properties: it is not always homotopic to the original object, and it is not always thin (see, for example, Fig. 30b).

Various methods have been developed for performing skeletonization of a discrete object, and we will have an overview of these methods in this chapter. According to [START_REF] Palágyi | A 3D fully parallel surface-thinning algorithm[END_REF], discrete skeletons can be computed using four types of methods: Voronoi-based transformations( [START_REF] Rumpf | A continuous skeletonization method based on level sets[END_REF]) and thinning. In this thesis, we will focus only on thinning methods.

[BA92], [NSK + 97], [AM97], [AL99],[AL01]), distance-based transforma- tions ([ST96], [BNS99], [TM01]), general-field methods ([AC97],

simple points in 2d and 3d

In the world of thinning, the atom is the simple point. Intuitively, a point is simple if it can be removed from an object without changing its topology. In the digital topology (DT) framework, the topology of an object depends on the chosen adjacency relation; for this reason, when considering a k-connected object, we will talk about k-simple points. The notion of simple point is central for homotopic thinning in the digital framework: a skeleton is obtained by removing iteratively simple points from an object.

According to [START_REF] Lam | Thinning Methodologies-A Comprehensive Survey[END_REF], in the 60s, 2d simple points were characterized based on connectivity: a point p is k-simple for an object X if its removal does not change the number of k-connected components of X nor the number of k-connected components of X (where k is the usual adjacency for X when k is chosen as adjacency relation for [START_REF] Marcel | Hexagonal Parallel Pattern Transformations[END_REF]). This definition does not yield efficient algorithms: indeed, in order to test if a single point is simple, it requires to scan the whole object in order to enumerate its connected components. Fortunately, local characterizations of deletable points in 2d began to appear in the mid 60s, based on crossing numbers ([Rut66], [START_REF] Hilditch | Linear Skeletons From Square Cupboards[END_REF]), connectivity numbers ( [START_REF] Yokoi | An analysis of topological properties of digitized binary pictures using local features[END_REF]) and simplicity [START_REF] Rosenfeld | Connectivity in Digital Pictures[END_REF]).

X) ([BDM65],
All these works established that, in order to decide whether a point is deletable or not, it is only necessary to look at the configuration of the point's neighbourhood (no need to count the number of connected components of the whole object). Consequently, in 2d, deciding if a point is simple can be done in constant time.

Proposition 3.1.1 [START_REF] Rosenfeld | Digital topology[END_REF] Let X ⊂ Z 2 , p ∈ X, and N(k) be the adjacency relation chosen for X (see Sec. 9.1, p. 204 for notations). If X ∩ Γ * 8 (p) has the same number of k-connected components as X ∩ Γ 8 (p), and that X ∩ Γ * 4 (p) = ∅, then p is simple for X.

In 3d, the removal of a point may not only change the number of connected components of the object or its complementary, but may also change the number of tunnels of the object (see, for example, Fig. 13). As in the 2d case, 3d simple points can be locally characterized ( [START_REF] George | Three-dimensional simple points: serial erosion, parallel thinning and skeletonization[END_REF]). Further work on 3d simple points have established only connectivity of X and X is sufficient in order to characterize 3d simple points ([MB92], [START_REF] Bertrand | A new characterization of three-dimensional simple points[END_REF], [START_REF] Bertrand | A Boolean characterization of three-dimensional simple points[END_REF], [START_REF] Kumar Saha | Topology preservation in 3D digital space[END_REF], [START_REF] Kumar | Detection of 3-D Simple Points for Topology Preserving Transformations with Application to Thinning[END_REF]). As in 2d, deciding if a point is simple can be done in constant time in 3d. In order to do so, Bertrand and Malandain introduce topological numbers T 6 and T 26 : Proposition 3.1.2 [START_REF] Bertrand | A new characterization of three-dimensional simple points[END_REF] Let X ⊆ Z 3 and x ∈ X, let T 26 (x, X) be the number of 26-connected components of (X ∩ Γ * 26 (x)), and let T 6 (x, X) be the number of 6-connected components of

(X ∩ Γ * 18 (x)). In 26-connectivity, x is simple for X iff T 26 (x, X) = 1 and T 6 (x, X) = 1. In 6-connectivity, x is simple for X iff T 6 (x, X) = 1 and T 26 (x, X) = 1
Studies of simple points in 4-dimensions have also been achieved, leading once more to a local characterization of such points ([Kon97] [START_REF] Couprie | New Characterizations of Simple Points in 2D, 3D, and 4D Discrete Spaces[END_REF]). Thanks to these works, characterization of simple points in 4d can be done once again in constant time. Local characterization of simple points exist in higher dimension, but efficient (constant in time) methods for computing them has not yet been proposed.

simple sets

In general, an object possesses more than one simple point. When a simple point is removed from an object, three events can take place: non-simple points can become simple, simple points can become non-simple, or nothing changes. Notice that removing two or more simple points simultaneously from an object may lead in obtaining a set non homotopic to the original object (as shown, for example, on Fig 14). Parallel thinning (removing simultaneously many simple points) is possible but must be performed under certain conditions if topology is to be preserved. In the following, we will give an overview of the breakthroughs performed in the theoretical aspects of simple sets.

A B C a) b) c)
Figure 14: Removing simple points in parallel -On a, the initial shape is a rectangle made of six pixels. Pixels A, B and C are simple: removing one of them from the shape preserves the homotopy of the shape. On b, removing A and B at the same type preserves the homotopy of the shape. On c, removing A and C at the same time "breaks" in two the shape: it gives a result non-homotopic to the initial shape.

Given an object X ⊂ R n , we say that D ⊂ X is k-simple for X if D consists only of k-simple points of X and that there exists a discrete thinning process allowing to transform X into X\D. In 2d, this definition is equivalent to saying that X and X\D have the same number of connected components (with regards to the adjacency relation of X) and X and X ∪ D have the same number of connected components (with regards to the adjacency relation of X).

minimal non-deletable sets

Minimal non-deletable sets were introduced by C. Ronse ([Ron88]), in order to characterize under which conditions could simple points be removed simultaneously from a 2d object without "breaking" the topology. Minimal non-deletable sets rely on the notion of strong deletability, previously introduced by the same author in [START_REF] Ronse | A topological characterization of thinning[END_REF].

Definition 3.1.3 [Ron88] Let X ⊂ Z 2 , and let k be equal to 4 or 8. A minimal non-k-deletable set U ⊆ X from X is a set that is not k-simple for X but every proper non void subset of U is k-simple for X.
This definition is not the exact version presented in [START_REF] Ronse | Minimal test patterns for connectivity preservation in parallel thinning algorithms for binary digital images[END_REF] (for example, it does not take into account the frame of the image which is considered by Ronse). The following allows to locally characterize sets of simple points which can be removed in parallel while preserving the object's topology. Proposition 3.1.4 [START_REF] Ronse | Minimal test patterns for connectivity preservation in parallel thinning algorithms for binary digital images[END_REF] Let X ⊂ Z 2 , and let k be equal to 4 or 8. A set U ⊆ X is a minimal non-k-deletable set from X iff one of the following holds:

• U consists of a single pixel that is not k-simple for X (in the sense of the k-connectivity).

• U consists of a pair of 8-adjacent pixels which are k-simple for X, but U is not k-simple for X.

• If k = 8, U consists of a triple or quadruple of pairwise 8-adjacent pixels, and U is an 8-connected component of X.

Thanks to this last proposition, minimal non-deletable sets define "forbidden features" that should not appear in a set of pixels in order for it to be simple. Minimal nondeletable sets were designed in order to prove that 2d parallel thinning algorithms were topology preserving (and therefore valid) by testing only a small number of configurations of points. A computer-based implementation of these tests was later proposed in [START_REF] Hall | Tests for connectivity preservation for parallel reduction operators[END_REF], a 3d implementation of these sets was proposed in [START_REF] Kong | Problem of determining whether a parallel reduction operator for n-dimensional binary images always preserves topology[END_REF], [START_REF] Ma | On topology preservation in 3D thinning[END_REF] and [START_REF] Wu | On Topology Preservation in 2-D and 3-D Thinning[END_REF], and a 4d implementation was proposed in [START_REF] Gau | Minimal non-simple sets in 4D binary images[END_REF] and [START_REF] Kong | Minimal Non-simple Sets in 4-Dimensional Binary Images with (8,80)-Adjacency[END_REF].

p-simple points

In 1995, Bertrand introduced the P-simple points in order to characterize, in 3d, which simple points could be removed simultaneously ( [START_REF] Bertrand | On P-simple points[END_REF]). To do so, given X ⊂ Z 3 and x ∈ X, he sets the geodesic n-neighbourhood of order k of x inside X (n being equal to 6 or 26) as the set

Γ k n (x, X) = ∪{Γ n (y) ∩ Γ * 26 (x) ∩ X|y ∈ Γ k-1 n (x, X)}, with Γ 1 n (x, X) = Γ * n (x) ∩ X.
Definition 3.1.5 [START_REF] Bertrand | Sufficient conditions for 3D parallel thinning algorithms[END_REF] Let X ∈ Z 3 , P ⊂ X, x ∈ P and n equals to 26 or 6. The point x is P n -simple if, for all S ⊂ (P\{x}), x is n-simple for X\S.

Let S n (P) be the set of all P n -simple points. A set

D is P n -simple if D ⊂ S n (P).
Based on this definition, one can see that, given the definition of P-simple points, if a set D is P-simple, then X and X\D are homotopic. The P-simple points allow to define sets of points that can be removed at once from an object during homotopic thinning. Let G 6 (x, X) = Γ 2 6 (x, X) and G 26 (x, X) = Γ 1 26 (x, X), the next proposition allows to locally characterize P-simple points: Proposition 3.1.6 [START_REF] Bertrand | Sufficient conditions for 3D parallel thinning algorithms[END_REF] Let X ⊂ Z 3 , P ⊂ X, x ∈ P, n be equal to 6 or 26 and n be equal to 32n.

x is P n -simple iff            The number of n-connected components of G n (x, X\P) is equal to 1, and
The number of n-connected components of G n (x, X) is equal to 1, and

For all y ∈ Γ * n (x) ∩ P, Γ * n (y) ∩ G n (x, X\P) is not void, and For all y ∈ Γ * n (x) ∩ P, Γ * n (y) ∩ G n (x, X) is not void
As with the minimal non-deletable sets, the P-simple points allow to check if existing parallel 3d thinning algorithms work: indeed, in [START_REF] Bertrand | Sufficient conditions for 3D parallel thinning algorithms[END_REF], the author gives a method for checking, based on the P-simple points framework, the topological validity of thinning algorithms. Moreover, P-simple points were widely used in order to propose new parallel 3d thinning algorithms (an example of a new algorithm is given in [START_REF] Bertrand | Sufficient conditions for 3D parallel thinning algorithms[END_REF]).

critical kernels

Critical kernels, introduced in [Ber07], constitute a new framework for performing parallel thinning in 2d, 3d and 4d (see [START_REF] Bertrand | A new 3D parallel thinning scheme based on critical kernels[END_REF] and [START_REF] Bertrand | Two-Dimensional Parallel Thinning Algorithms Based on Critical Kernels[END_REF]). In relation with the DT framework, a new definition of simple points in 2d, 3d and 4d (see [START_REF] Couprie | New Characterizations of Simple Points in 2D, 3D, and 4D Discrete Spaces[END_REF]) has been proposed, and links between this framework, P-simple points and minimal non-deletable sets were established in [START_REF] Couprie | New characterizations of simple points, minimal non-simple sets and P-simple points in 2D, 3D and 4D discrete spaces[END_REF]. Critical kernels were also used to prove that some thinning algorithms were valid, while others were not correct ( [START_REF] Couprie | Note on fifteen 2D parallel thinning algorithms[END_REF]).

Although they have applications in the voxel framework, the critical kernels rely on the cubical complex framework which is presented in Sec. 5.2.

simple pairs and non-simple points

In order to conclude this overview of simple points, let us quickly talk of recent developments showing that simple points are not the only interesting elements in homotopic thinning. Recent work from Passat et al. ( [START_REF] Passat | Minimal Simple Pairs in the 3-D Cubic Grid[END_REF]) is based on cubical complex framework in order to exhibit a new concept called Minimal Simple Sets, an example of which is the simple pair: in such pair of points, none of the point is simple but the pair itself is simple and can be removed without changing topology of the object.

Other works have shown that, in 3d, some points are not simple (relying on the local characterization given previously) but can still be removed without changing the topology of the input [BCP09] [Mor81].

simple points and multi-label images

In some applications, an object can be decomposed in multiple parts: each voxel of the object has a label depending on the part to which it belongs. Recent work [START_REF] Dupas | Multi-Label Simple Points Definition for 3D Images Digital Deformable Model[END_REF] proposed to define multi label simple points: such a point can be switched from one label to some other label, without changing the topology of the different parts of the object.

thinning process: simple points removal

Homotopic thinning in the digital framework consists of removing simple points from an object, until either no more simple point can be found, or a satisfactory subset of voxels has been reached: this method will reduce a ring into a circle, or a ball into a single point.

Two main strategies are possible for removing simple points: sequential removal and parallel removal. In the following, when giving pseudo-code for algorithms or definitions, unless the contrary is explicitly said, the objects will be considered as 8-connected in 2d, and 26-connected in 3d.

sequential removal of simple points

Sequential removal of simple points can be achieved by iteratively detecting a simple point in an object, and removing it, until no more simple point can be found. Such basic strategy does not guarantee the result to be centered in the original object, and does not preserve the "visual characteristics" of the object during thinning. It is important, when designing a sequential thinning algorithm, to decide of a removal order of simple points, and of a strategy for preserving interesting visual features of the object (this last part is studied in Sec. 3.3). In order to obtain a centered skeleton, one must define a particular order of removal of simple points (generally, choosing randomly the simple points to remove does not yield good results, as shown on Fig. 15). Usually, in order to get a centered skeleton, it is necessary to delete simple points "layer by layer", from the outer layer to the most inner one. Many strategies have been proposed in 2d for deciding of a removal order (a very exhaustive survey of thinning methods in 2d before 1992 can be found in [START_REF] Lam | Thinning Methodologies-A Comprehensive Survey[END_REF]) : for example, in the 80s, it was proposed to follow an object's contour in order to find and remove simple points "layer by layer" ([Arc81], [START_REF] Pavlidis | A thinning algorithm for discrete binary images[END_REF]). This strategy was also used in 3d in [START_REF] Srihari | Understanding the bin of parts[END_REF]. A typical thinning algorithm consists of looking at all simple points situated at the border of the object (see Sec. 9.1 p.204), and remove them. Taking as input an object X, this basic thinning scheme is described on Alg. 2. One can see that the order of removal of points p from the input X is important: once an element p of S has been removed from X, another element of S might no more be simple: this is called an order-dependent thinning algorithm. Sequential thinning is usually order-dependent, as it implies removing simple points one after the other, and as one removal might prevent another removal.

Order-independent thinning has been proposed in [START_REF] Ranwez | Order independent homotopic thinning for binary and grey tone anchored skeletons[END_REF] and [START_REF] Kardos | An Order-Independent Sequential Thinning Algorithm[END_REF]. In the first work, although the authors actually proposed a fully parallel thinning algorithm, they introduce the basic definitions of order-independency. An order-independent thinning algorithm must give the same result whatever the scanning order of the input's pixels. Such algorithm should therefore remove only simple points whose removal does not change other simple points to non-simple points. In the second work, the authors propose a sequential order-independent thinning algorithm. Such thinning scheme hardly generalizes to 3d or more.

A widely used strategy to obtain a centered skeleton with a sequential thinning process consists of computing a priority function on the object and removing the simple points of X according to the value of this function ( [START_REF] Roy | Thinning algorithms: A critique and a new methodology[END_REF]) : at each step, the simple point that is removed is one with the lowest value. The Euclidean distance map is widely used as priority function in order to remove points "layer by layer" ([TV92], [START_REF] Couprie | Discrete bisector function and Euclidean skeleton in 2D and 3D[END_REF], [START_REF] Malandain | Euclidean skeletons[END_REF]). Other works use discrete distances, such as the chamfer distance ([Pud98]), to decide of a removal order.

Algorithm 3: Basic Thinning with Priority(X, W, D, k)

Data: A k-connected shape X, a priority function D and a subset W ⊆ X Result: A skeleton of X while there exists a k-simple point in

X\W do A = {y ∈ X\W|y is k-simple for X} B = {x ∈ A| for all y ∈ A, D(x) D(y)} Let z ∈ B X = X\{z} end return X
Algorithm 3 shows the basic thinning scheme based on a priority function. The set W, called inhibitor set, is a set of points of the input object which should be in the resulting skeleton, and D is the priority function used to decide of an order of points removal (here, the lower priority means faster removal, so it is possible to use an Euclidean distance map as priority function and obtain satisfying results, as shown on Fig. 15a).

An inhibitor set allows to choose "anchor points" for the skeleton, and therefore preserve the visual aspect of the original object in the skeleton, with an appropriate choice of anchor points (see Sec. 3.3): for example, in [START_REF] Roy | Thinning algorithms: A critique and a new methodology[END_REF], the authors use the Euclidean medial axis as inhibitor set. However, when performing a thinning guided by an Euclidean distance map, the points of the inhibitor set and the directions of thinning followed by the algorithm are not always "compatible" (see Fig. 16b). In [START_REF] Talbot | Euclidean skeletons and conditional bisectors[END_REF], the authors use a thinning algorithm where the slope of the priority function is used to dynamically add points to the constraint set. In [START_REF] Couprie | Discrete bisector function and Euclidean skeleton in 2D and 3D[END_REF], the authors propose to merge the slope calculation with the priority function, leading to a new priority function and a new thinning algorithm which works in 2d and 3d (see Fig. 16c).

parallel removal of simple points

As previously explained in section 3.1.2, removing simple points simultaneously from an object usually "breaks" the topology. However, some theories have been elaborated in order to characterize sets of simple points which can be removed at the same time.

In a parallel thinning scheme, the decision of removing a point during an iteration must be completely independent of other removal decisions taken during the same a) b) c)

Figure 16: Priority function and inhibitor sets -a) The original shape (in grey), and the inhibitor set (in black). b) The result of the homotopic thinning of the image, using the Euclidean distance map as priority function: "spurious branches" appeared in the center of the shape. c) The result of the homotopic thinning of the image, using the method described in [START_REF] Couprie | Discrete bisector function and Euclidean skeleton in 2D and 3D[END_REF] for building an efficient priority function.

iteration: during a same iteration, all point removals could be performed by independent processors. When performing parallel thinning, priority function are rarely used as points are naturally removed "layer by layer". According to Palágyi ([Pal08]), parallel thinning algorithms can be divided into three categories. In directional thinning algorithms, the main loop is divided into sub-iterations, and the thinning operator (the considered configurations of simple points) is changed from one sub-iteration to another. In subfieldbased thinning algorithms, the points of the grid are decomposed into subsets, and at a given iteration of the algorithm, only simple points in a given subset are studied. Finally, in fully parallel thinning algorithms, no sub-iteration takes place : the same thinning operations (which usually removes sets of simple points) are performed on the object at each iteration of the main loop.

fully parallel algorithms

Given an object X ⊂ Z n , a fully parallel thinning algorithm consists of deciding of a set of simple points to be removed based on a criterion C, and removing all this set from the input object. The global scheme of fully parallel thinning algorithms is presented in Alg. 4.

Algorithm 4: Basic Fully Parallel Thinning(X) repeat Y = {x ∈ X | x is simple for X and C(x) is true} X = X\Y until Y = ∅;
Rutovitz was the first to propose a (fully) parallel thinning algorithm, in 1966 ( [START_REF] Rutovitz | Pattern Recognition[END_REF]). However, it is well known that Rutovitz's algorithm does not always preserve topology, and "patches" exists in order to correct it ([Eck88], [START_REF] Couprie | Note on fifteen 2D parallel thinning algorithms[END_REF]).

A fully parallel thinning algorithm -Pavlidis in 1981

In 1981, Pavlidis published a fully parallel thinning algorithm ([Pav81]), in 2d for 8-connected objects, that preserve topology ( [START_REF] Couprie | Note on fifteen 2D parallel thinning algorithms[END_REF]). In this algorithm, the author defines multiple pixels, corner pixels and contour pixels. Given X ⊂ Z 2 and x ∈ X, the point x is a contour point of X if it has an element of X in its 4-neighbourhood.

Definition 3.2.1 [Pav82b] Let X ⊂ Z 2 , a contour point x ∈ X is a multiple point of X if one
of the following condition is satisfied :

• One or none of its 8-neighbours belongs to X.

• Its neighbourhood conforms to the pattern shown Fig. 17-(a,b) or any pattern obtained from them by a rotation multiple of Π/2. In this figure, the points marked 0 are elements of X, the points marked 2 are contour points of X, and each group of pixels marked A or B must contain at least one element of X.

• Its neighbourhood conforms to the pattern shown Fig. 17-c or any pattern obtained from them by a rotation multiple of Π/2. In this figure, the points marked 0 are elements of X, the points marked 2 are contour points of X, and each group of pixels marked A, B or C must contain at least one element of X. Moreover, if both pixels marked C are elements of X, then the values of pixels A and B can be anything.

The point x is a corner point if its neighbourhood conforms to the pattern shown Fig. 17-d or any pattern obtained from them by a rotation multiple of Π/2. In this figure, the points marked 0 are elements of X, the points marked 2 are contour points of X, and the points marked 1 are elements of X. Most fully parallel thinning algorithm are based on the same scheme: some masks are tested on the simple points of an object, and depending on the results of the test (some masks should be matched by the points, and others should not be matched), they are marked for removal; then, all marked simple points are removed simultaneously. Algorithm 5 produces a symmetrical skeleton, and uses four masks of nine pixels each (it can be legitimately argued that the rotations and the various conditions set on points A, B and C give birth to more masks), of size 3x3 each. Several other 2d parallel thinning algorithms have been proposed since, using other masks for simple points removal or for detecting interesting features in the skeleton. The algorithm proposed in [START_REF] Hall | Fast parallel thinning algorithms: parallel speed and connectivity preservation[END_REF] uses 4 masks (plus their Π/2 rotations) of size 5x5 to decide if a point should be flagged, and the resulting skeleton is symmetric. In [START_REF] Eckhardt | Invariant Thinning[END_REF], the author uses the notion of perfect points (based on 5x5 masks) to produce Algorithm 5: Pavlidis81(X) [START_REF] Pavlidis | An Asynchronous Thinning Algorithm[END_REF] Data: An 8-connected shape X Result: A skeleton of X

A A A 0 x 0 B B B A A A A x 0 A 0 2 A A C 0 x 2 B B C 0 0 0 0 x 2 0 2 1 (a) (b) (c) (d)
1 repeat 2 C = {x ∈ X|x is a contour point of X} 3 M = {x ∈ X|x is a multiple point of X} 4 N = {x ∈ X|x is a corner point of X} 5 Y = C\{M ∪ N} 6 X = X\Y 7 until Y = ∅;
8 return X a symmetric skeleton. Moreover, the author proves that using 3x3 masks only in a fully parallel thinning algorithms gives limited freedom of action for points removal.

In [START_REF] Thierry | Improved Low Complexity Fully Parallel Thinning Algorithm[END_REF], the author gives a method for producing a symmetric skeleton with three masks (and their rotations).

Although fully parallel thinning algorithms are order independent algorithms, the inverse is not always true. Indeed, in some order independent algorithms, such as the one proposed in [START_REF] Kardos | An Order-Independent Sequential Thinning Algorithm[END_REF], in order to classify a point, it is necessary to know how its neighbours were classified: these algorithms are not parallel, although removal could be done, at a certain stage of the algorithm, in parallel.

Small masks algorithm -Guo and Hall in 1992

It was proven by [START_REF] Hall | Optimally Small Operator Supports for Fully Parallel Thinning Algorithms[END_REF] that, when designing a fully parallel algorithm with endpoints preservation, at least 11 pixels masks should be used for a correct detection of simple points to remove. Moreover, these masks should contain the 8-neighbourhood of each point. The algorithm presented in [START_REF] Guo | Fast fully parallel thinning algorithms[END_REF] (see alg. 6) uses such mask, and produces asymmetrical results. ): the basic definitions of simple sets were used in this work for building masks and properties that simple points should fulfil in order to be removed simultaneously. In this work, the authors characterize first curves points which should be kept safe from deletion (called endpoints), and then define how to remove simultaneously simple points that are not end points.

0 1 x 1 1 1 1 0 1 1 0 1 x 0 1 1 0 0 0 0 1 x 0 1 1 0 0 (a) (b) (c)
to the work presented in [START_REF] Bertrand | On critical kernels[END_REF]. Bertrand defined in 2006 the concept of crucial faces, which can be seen as the set of voxels which should not be removed from an object in order to preserve its topology. The authors define four masks for detecting crucial voxels, as shown in Figure 20. If a pixel p of the object can be placed as a pixel labelled P in the mask, and that the rest of the pixels around p match the mask, then p matches the mask.

C C 1 C 2 C 3 C 4
Figure 20: The four masks used by Bertrand and Couprie's algorithm (MK2) -In each mask, pixels labelled 0 must belong to the background, pixels labelled P must be simple in the object, and in the mask C, at least one pixels labelled A and one pixel labelled B must belong to the object. The tested pixels can be any of the pixels labelled P. All masks come with their Π/2 rotations (total: 11 masks).

The authors characterize crucial pixels thanks to the masks shown on Fig. 20.

Proposition 3.2.3 [BC08] Let X ∈ Z 2
, and let P be the set of simple pixels in X.

• The pixel p is 1-crucial for < X, P > if and only if it matches the pattern C on Fig. 20.

• The pixel p is 0-crucial for < X, P > if and only if it matches any of the pattern C 1 , C 2 , C 3 , C 4 on Fig. 20.

Algorithm 8: MK 2 α (X) [BC08] Data: An 8-connected shape X Result: A skeleton of X 1 repeat 2 P = {p ∈ X|p is simple for X} 3 R = {p ∈ P|p is 1-crucial or 0-crucial for < X, P >} 4 X = (X\P) ∪ R 5 until (P\R) = ∅; 6 return X
The algorithm produces symmetrical skeletons. 3d fully parallel thinning -Manzanera in 1999 In the mid 90s, important results in three-dimensional fully parallel thinning were established by Ma, who based his work on 3d extensions of Ronse's minimal non-deletable sets ( [START_REF] Ma | On topology preservation in 3D thinning[END_REF]). The main theorem established by Ma states that only verifications on limited configurations of points (unit square or cube) is sufficient in order to prove the topological soundness of an algorithm : Theorem 3.2.4 [START_REF] Ma | On topology preservation in 3D thinning[END_REF] Let X ⊂ Z 3 and let us consider 26-connectivity. An algorithm that removes points in parallel in X removes 26-simple sets from X if no connected component of X contained in a unit lattice cube is completely removed, and every subset of X that is contained in a unit lattice square and that is removed by the algorithm is 26-simple.

Thanks to this work, it was then possible to test the validity of 3d parallel thinning algorithms. However, the same author later proposed two fully parallel 3d thinning algorithms in [START_REF] Ma | A 3D fully parallel thinning algorithm for generating medial faces[END_REF] and [START_REF] Ma | A fully parallel 3D thinning algorithm and its applications[END_REF], which were later proved to be false in [START_REF] Lohou | Contribution à l'analyse topologique des images : Étude d'algorithmes de squelettisation pour images 2D et 3D selon une approche topologie digitale ou topologie discrète[END_REF], [START_REF] Wang | A note on 'A fully parallel 3D thinning algorithm and its applications[END_REF], [START_REF] Lohou | Detection of the non-topology preservation of Ma's 3D surface-thinning algorithm, by the use of P-simple points[END_REF] and [START_REF] Lohou | Detection of the non-topology preservation of Ma and Sonka's algorithm, by the use of P-simple points[END_REF]. The first (valid) fully parallel 3d thinning algorithm was proposed by Manzanera et al. in 1999, in [MBPL99], and uses five masks (see, Fig. 21 and hit-or-miss based operations. The authors used the results established in [START_REF] Ma | On topology preservation in 3D thinning[END_REF] in order to prove validity of their method. Given X ⊂ Z 3 and p ∈ X, we say that the k-neighbourhood of p fits the mask A if general method for performing 3d fully parallel thinning in [START_REF] Bertrand | A new 3D parallel thinning scheme based on critical kernels[END_REF]. As for the 2d case, this thinning is based on the notion of crucial elements, based on four masks shown Fig. 22. Definition 3.2.5 [START_REF] Bertrand | A new 3D parallel thinning scheme based on critical kernels[END_REF] Let X ⊂ Z 3 , let M be a set of voxels of X, and let us consider the masks shown on Fig. 22.

α1 α2 α3 β1 β2
A ⊆ Γ k (p).
M 0 M 1 M ′ 2 M 2
• The set M matches the mask M 2 if:

-M = {A, B}, and all elements of M are simple for X, and -In the 2d configuration M ′ 2 obtained by setting R ∈ M ′ 2 and, for all i ∈ {0, ..., 7},

Q i ∈ M ′ 2 if C i ∈ X or D i ∈ X, the pixel R is simple in the 2d sense. • The set M matches the mask M 1 if: -M = {E, F, G, H} ∩ X,
and all elements of M are simple and do not match mask M 2 , and -{E, G} ⊆ M or {F, H} ⊆ M (inclusive or), and we either have ({A, B, C, D} ∩ X = ∅ and {I, J, K, L} ∩ X = ∅) or ({A, B, C, D} ∩ X = ∅ and {I, J, K, L} ∩ X = ∅).

• The set M matches the mask M 0 if: • The set M is a 2-crucial clique for < X, K > iff M matches the mask M 2 .

-M = {A, B, C, D, E, F, G, H} ∩ X,
• The set M is a 1-crucial clique for < X, K > iff M matches the mask M 1 .

• The set M is a 0-crucial clique for < X, K > iff M matches the mask M 0 .

Algorithm 10: SK 3 (X) [START_REF] Bertrand | A new 3D parallel thinning scheme based on critical kernels[END_REF] Data: A 26-connected shape X, a set of voxels K Result: A skeleton of X

1 repeat 2 P = {p ∈ X|p is not simple for X} ∪ K 3 R 2 = {p ∈ X|p belongs to a 2-crucial clique included in S\P} 4 R 1 = {p ∈ X|p belongs to a 1-crucial clique included in S\(P ∪ R 2 )} 5 R 0 = {p ∈ X|p belongs to a 0-crucial clique included in S\(P ∪ R 2 ∪ R 1 )} 6 X = P ∪ R 2 ∪ R 1 ∪ R 0 7 until X is stable; 8 return X
The set K allows to define a set of voxels which should not be removed (in order, for example, to preserve some important visual features from the original object). The result of algorithm 10 is symmetrical.

It can be legitimately argued that this algorithm is not fully parallel thinning algorithm, as the classification of a point as, for example, part of a 1-crucial clique depends on its neighbours' classification as part of a 2-crucial clique. It is therefore not possible, with these masks, to pass on one pixel only one time, and decide if it should be removed or not.

However, the decision of classifying each point as part of a k-crucial clique (k being equal to 0, 1 or 2) can be fully made in parallel. For example, in Alg. 10, the classification of each point as part of the set R 1 can be fully done in parallel, but needs to be done after the classification of points as part of R 2 . This algorithm cannot be classified as a directional algorithm, as the removal of points is made only once after all the classifications were made.

This particular algorithm could be classified in another category, that could be called substep parallel thinning algorithm.

directional algorithms

Given an object X ⊂ Z n , directional thinning algorithms consists of dividing the simple points into several directions: at each step of the algorithm, only simple points of a given direction are removed. Directional thinning algorithms usually iterate through all possible directions in order to obtain a visually "interesting" result. With a fully parallel thinning algorithm, only one criterion C is used for deciding if a point should be added to the set of removable points; with a directional thinning algorithm, various criteria are used (one criterion per direction). The global scheme of directional algorithms is presented in Alg. 11.

Algorithm 11: Basic Directional Thinning(X) repeat for all direction d do Y d = {x ∈ X | x is simple for X and C d (x) is true} X = X\Y d end until all Y d are empty;
Rosenfeld, a first directional algorithm in 4 sub-iterations In 1975, Rosenfeld proposed a popular method for performing directional thinning in 2d ( [START_REF] Rosenfeld | A characterization of parallel thinning algorithms[END_REF]). The method consists in dividing simple points according to four directions (called north, east, west and south). We give here the 8-connected version of this thinning algorithm. Definition 3.2.7 [START_REF] Rosenfeld | A characterization of parallel thinning algorithms[END_REF] Let X ⊂ Z 2 , a simple point x of X is a north (resp. east, south, west)-simple point, also called a simple point of direction 1 (resp. 2, 3, 4) if its neighbour numbered 1 (resp. 2, 3, 4) is in X and if x has at least two 8-neighbours belonging to X. Considering the figure 23, we denote by north (resp. south, east, and west) neighbour of a pixel the neighbour labelled 1 (resp. 3, 2, 4). For the sake of clarity, we define the following (these definitions were not given "as is" by the original authors) :

Definition 3.2.8 Given X ⊂ Z 2 , a point x ∈ X is a ZS-point if 2 (Γ * 8 (x) ∩ X) 6 and if Γ * 8 (x) ∩ X consists of exactly one 4-connected component.
Given X ⊂ Z 2 , a point x ∈ X is a ZS simple point of direction 1 if x is a ZS-point, if the north, east or the south neighbour of x is in X, and if the east, south or the west neighbour of x is in X.

Given X ⊂ Z 2 , a point x ∈ X is a ZS simple point of direction 2 if x is a ZS-point, if the north, east or the west neighbour of x is in X, and if the north, south or the west neighbour of x is in X.

The thinning methodology proposed in [START_REF] Zhang | A fast parallel algorithm for thinning digital patterns[END_REF] is explained in Alg. [START_REF] Zhang | [END_REF]. In [START_REF] Zhang | A fast parallel algorithm for thinning digital patterns[END_REF], the two authors give additional information about implementation and execution time of their algorithm. Tsao and Fu, the first 3d directional thinning algorithm (in 6 sub-iterations) A natural extension of the thinning methodology proposed by Rosenfeld in [START_REF] Rosenfeld | A characterization of parallel thinning algorithms[END_REF] would consists in a 6 sub-iterations algorithm removing all simple points of a given type (up, bottom, north, south, east, west simple points). However, in 3d, this strategy cannot be straightly applied : consider a rectangle made of voxels, of thickness one and two voxels wide. In such shape, all voxels would be labelled as a same type of simple point (for example, all voxels would be labelled as up simple points) and removed simultaneously. The first 3d directional thinning algorithm (to our knowledge) was proposed by Tsao and Fu in 1981, in [START_REF] Tsao | Parallel Thinning Operations for Digital Binary Images[END_REF] (the two same authors proposed, earlier in the same year, another 3d thinning algorithm in [START_REF] Tsao | A parallel thinning algorithm for 3-D pictures[END_REF], which may be directional, but it was not possible to obtain the original article in order to read it). This algorithm runs with 6 sub-iterations.

The two authors give, in this paper, a definition of simple points using masks, and then give conditions for simultaneous simple point removal. On Fig. 24, we present the labels of the 26 neighbours of a point x ∈ Z 3 : the point x ∈ X ⊂ Z 3 is labelled as an U border point of X (resp. D, N, S, E or W border point) if its neighbour with position 18 (resp. 9, 1, 5, 3, 7) is in X. 17

Window W i Window W j Window W k Figure 25: Three windows W i , W j , W k .
In the following, we give the directional thinning algorithm for 6-connected objects (a 26-connected version is given in [START_REF] Tsao | Parallel Thinning Operations for Digital Binary Images[END_REF]). Therefore, the term "simple point" refers to "simple point in 6 connectivity".

Definition 3.2.9 A simple point x ∈ X ⊂ Z 3 is a TF simple point of direction U (resp. D) if

• it is an U (resp. D) border point of X and,

• it is simple in the sense of 4-connectedness in W i ∩ X and in W j ∩ X (see Fig. 25) and,

• it has at least two 8-neighbours belonging to X in one of the two windows W i or W j , and it has at least one 8-neighbour belonging to X in the other window and,

• its neighbour on position 9 (resp. 18) belongs to X.

The same characteristics should be matched for TF simple point of direction N (resp. S), except that W i and W k should be the two windows to consider in the second and third conditions, and the neighbour on position 5 (resp. 1) should be considered in the last condition.

The same characteristics should be matched for TF simple point of direction E (resp. W), except that W j and W k should be the two windows to consider in the second and third conditions, and the neighbour on position 7 (resp. 3) should be considered in the last condition.

Based on this, the authors propose a 6 sub-iterations directional thinning algorithm, presented in Alg. 14. Definition 3.2.10 Given X ⊂ Z 3 and x ∈ X, we define the two following sets : Algorithm 15 gives the thinning scheme proposed in [START_REF] Bertrand | A parallel thinning algorithm for medial surfaces[END_REF].

• A 26 = {y ∈ (X ∩ Γ * 26 (x)) | Γ * 26 (y) ∩ Γ * 18 (x) ∩ X = ∅} • A 26 = {y ∈ (X ∩ Γ * 26 (x)) | Γ * 26 (y) ∩ Γ * 18 (x) ∩ X = ∅} A d-
Palágyi in 2002, a directional thinning algorithm in 3 sub-iterations In 2002, Palágyi proposed in [START_REF] Palágyi | A 3-subiteration 3D thinning algorithm for extracting medial surfaces[END_REF] a 3 sub-iterations 3d directional thinning algorithm, which preserves medial surfaces of an object. This algorithm removes, in a same iteration, border points of "opposite directions" (i.e. U and D-border points, N and S-border points, E and W-border points). In order to do so, the author proposes a set of masks: on Fig. 26, we present the masks for the UD directions. By performing a rotation of Π/2 around the i or j axis, one can obtain the masks for the NS directions or for the EW directions. Algorithm 16 gives the thinning scheme originally proposed in [START_REF] Palágyi | A 3-subiteration 3D thinning algorithm for extracting medial surfaces[END_REF]. Figure 26: Masks used by Palágyi for the UD direction: Given X ⊂ Z 3 , x ∈ X matches the mask j (with j ∈ {a, b, c, d, e, f, g, h}) iff all the grey points of the mask belong to X, all the white points of the mask belong to X, at least one point marked "a" belongs to X, and at least one point marked "c" belongs to X. Each mask comes with its Π/2, Π and 3Π/2 rotations around the vertical (or k) axis (the vertical direction being the one pointing to the top of the page). On Fig. 24, the k axis was represented as piercing through the paper; here, the k axis goes to the top of the page.

The following definitions applies for the U-border points. In order to apply it for other directions, the masks of Fig. 27 should be rotated in order to match the good direction.

Definition 3.2.11 Let X ⊂ Z 3 , we define P 2 (U) = {x ∈ X | x matches one of the masks of Fig. 27}.

For all x ∈ Z 3 , we set P x 2 (U) = {y ∈ Γ 26 (x) | y matches one of the masks presented on Fig. 27 restricted to only the points located in Γ 26 (x)}.

In Alg. 17, P-simple points are used to choose points to be deleted: the reader can find the definition of such points in Def. 3.1.5 p.53.

Other periods exist for directional algorithms Many other directional thinning algorithms were proposed in 3d, and making a precise description of all of them would be too exhaustive. However, a quick overview of the thinning algorithms proposed show that algorithms with a period of 6 (the most "natural" way of considering directions in the three-dimensional space) are the most widespread ([GB90], [START_REF] Mukherjee | On connectivity issues of ESPTA[END_REF],

x x x a) b) c) x x x d) e) f)
Figure 27: Masks used by Lohou and Bertrand for the U direction: Given X ⊂ Z 3 , x ∈ X matches the mask j (with j ∈ {a, b, c, d, e, f}) iff all the grey points of the mask belong to X and all the white points of the mask belong to X. Each mask comes with its Π/2, Π and 3Π/2 rotations around the vertical axis (same axis as on Fig. 26).

[LKC94], [START_REF] Palágyi | A 3D 6-subiteration thinning algorithm for extracting medial lines[END_REF], [START_REF] Ma | Parallel Thinning Algorithms on 3D (18, 6) Binary Images[END_REF] (working for 18-connected object), [START_REF] Xie | A topology-preserving parallel 3D thinning algorithm for extracting the curve skeleton[END_REF]). Other algorithms were proposed with different periods, such as in [START_REF] Palágyi | A Parallel 3D 12-Subiteration Thinning Algorithm[END_REF] or [START_REF] Lohou | A 3D 12-subiteration thinning algorithm based on P-simple points[END_REF], where the authors propose algorithms in 12 sub-iterations, [START_REF] Palágyi | Directional 3D Thinning Using 8 Subiterations[END_REF] where an algorithm with a period of 8 is given, or [START_REF] Palágyi | A 3-subiteration 3D thinning algorithm for extracting medial surfaces[END_REF] (previously detailed) and [START_REF] Palágyi | A Subiteration-Based Surface-Thinning Algorithm with a Period of Three[END_REF] where algorithms based on 3 sub-iterations are given. In 2d, although 4 sub-iterations algorithms are the most usual, we can point out the work presented in [START_REF] Chen | A systematic approach for designing 2-subcycle and pseudo 1-subcycle parallel thinning algorithms[END_REF] (completed with a note in [START_REF] Chen | Comments on "A systematic approach for designing 2-subcycle and pseudo 1-subcycle parallel thinning algorithms[END_REF]) where the authors give a method for designing 2 sub-iterations directional thinning algorithms.

subfield algorithms

Given an object X ⊂ Z n , thinning algorithms based on subfields consists of partitioning the discrete space Z n into several subsets S 0 , ..., S k-1 , called subfields. Such algorithms usually iterate through all possible subfields, and at each step, remove all simple points located in a given subfield. Subfield based algorithms use two kind of criteria : one criterion C is based on the point's neighbourhood and remains constant during the thinning, and one criterion is based on the point's position and changes during the thinning.

Directional thinning algorithms use a collection of criteria (called directions) based on the point's neighbourhood for deciding of deletion, fully parallel thinning algorithms use one criterion based on the point's neighbourhood for deciding of deletion, and subfield based thinning algorithms use one criterion based on the point's neighbourhood and various criteria based one the point's position in the grid for deciding of deletion.

The general scheme of a subfield based thinning algorithm is given in Alg. is simple or not. Therefore, two simple points x and y can be simultaneously removed if y / ∈ Γ 8 (x). Based on this, we can partition the space into 4 subfields (S 0 , S 1 , S 2 , S 3 ), as depicted on Fig. 28a: this partition of the space ensures that two points which are In this very basic algorithm, little care is given to the visual aspect of the final result (the algorithm will result in a topological kernel of the input). In [START_REF] Kumar Saha | A new shape preserving parallel thinning algorithm for 3D digital images[END_REF], [START_REF] Bertrand | A 3D thinning algorithm using subfields[END_REF] and [START_REF] Németh | Topology Preserving 3D Thinning Algorithms Using Four and Eight Subfields[END_REF], the authors give various strategies in order to preserve the visual aspect of the input during thinning: in the last article, the authors give also a different thinning scheme which consists of deleting only simple points which were on the border of the object when the iteration over the subfields started.

Németh, Kardos and Palágyi in 2010, a 3d thinning algorithm based on 4 subfields

In [START_REF] Németh | Topology Preserving 3D Thinning Algorithms Using Four and Eight Subfields[END_REF], the authors proposed a 3d thinning algorithm based on a decomposition of the grid into 4 subfields: results established in [START_REF] Ma | Three-dimensional topology preserving reduction on the 4-subfields[END_REF], where other algorithms based on 4 subfields were presented, are used to prove the topological soundness of the algorithms. Definition 3.2.12 Given a 26 connected object X ⊂ Z 3 and x ∈ X, the point x is SF-4deletable if it is simple for X and if, for each y ∈ (X ∩ (Γ 26 (x)\Γ 18 (x))) such that y comes before x in the lexicographic order of voxels, y is not simple for X.

Algorithm 21 is the 4 subfields algorithm proposed in [START_REF] Németh | Topology Preserving 3D Thinning Algorithms Using Four and Eight Subfields[END_REF]: it uses a decomposition of the space into 4 subfields (S 0 , S 1 , S 2 , S 3 ), presented on Fig. 28c. In this algorithm, the authors separate the removal process from the geometric analysis, by defining points of type ǫ as points which should not be removed during thinning: later, the authors give various definitions of ǫ, leading to various results (topological kernel, curvilinear skeleton, surfacic skeleton). Definition 3.2.13 Given X ⊂ Z 3 , the point x is a self-ǫ-deletable point for X if it is not a point of type ǫ and it is simple for X, the point x is a square-ǫ-deletable point for X if it is self-deletable, and that for any self-deletable point q ∈ Γ 18 (x)\Γ 6 (x), q is simple for X\{p} or p is simple for X\{q}, the point x is a cube-ǫ-deletable point for X if it does not match the mask presented in figure 29.

Algorithm 21: Nemeth 4 subfields(X) Data: A 26-connected shape X Result: A skeleton of X 1 repeat 2 E = {p | p is a border point of X, but not a point of type ǫ of X} 3 for i = 0 → 3 do 4 Y i = {x ∈ X | x is SF-4-deletable for X, and x ∈ S i } 5 X = X\Y i 6 end 7 until Y 0 ∪ Y 1 ∪ Y 2 ∪ Y 3 = ∅;

block algorithms

We conclude this state of the art of skeletonization with another category of parallel algorithms: the "block" algorithms. In a block algorithm, the image is partitioned into several blocks (usually of same size), and each block is thinned independently from other blocks using a classical thinning strategy (sequential, fully parallel, ...).

x x x x x a) b) c) d) e) x x x x x f) g) h) i) j)
Figure 29: Masks used by Németh and al: Given X ⊂ Z 3 , x ∈ X matches the mask k (with k ∈ {a, b, c, d, e, f, g, h, i, j}) iff all the grey points of the mask belong to X and all the white points of the mask belong to X. Only these masks should be taken into account: no rotation should be considered.

There is three main "challenges" when elaborating such algorithm: the process of dividing the image and performing thinning on each block can be repeated only a fixed amount of time, topology should be preserved (this can be a problem in the zones where the blocks meet), and the visual result should be satisfying ("close" to what would have resulted the use of the classical thinning strategy on the whole image. These algorithms allow to perform thinning of very large images, that cannot be entirely loaded into memory.

Such algorithm is presented in [FMP + 04]: the main idea of the authors consists in, given X ⊂ Z n , finding the size R of the biggest ball contained in X, and then decomposing the original image into blocks. The thinning is performed, in parallel, in each block: only points whose distance from the block's border is greater than the distance from the object's border will be considered (and eventually removed) by the algorithm. Then, all blocks are translated in order to now take into account points which were previously ignored by the thinning, and the whole process is iterated.

In order to obtain a thin skeleton, the size of each block should strictly superior to 2R. Moreover, using blocks of size 4R allows to iterate the whole process (thinning and block translation) exactly (n + 1) times (when working in an n-dimensional space).

reconstructibility: preserving the visual aspect during thinning

When performing thinning of a shape, only the topological information of the shape is preserved during the process, and visual information (elongated parts, surfacic parts, curvature, ...) are not guaranteed to be preserved. By preserving, in the skeleton, some information about the original visual aspect of the shape, it is possible to perform better and thinner analysis of the initial object. This criteria if often called in literature the reconstructibility: it denotes the capacity to regenerate the original shape from its skeleton. When trying, for example, to recognize automatically the letter "a" from the letter "q", which are topologically equivalent (one connected component, one cavity), only geometric information about the presence of an elongated part can help in distinguishing the two shapes. If one uses a skeletonization algorithm for shapes simplification, and that the algorithm does not preserve any visual information from the initial shape, it will be impossible to discriminate an "a" from a "q". For this reason, it is necessary to have thinning algorithms "who care" about the preservation of the visual aspect of the shape.

Methods proposed in order to perform this task can be divided in two categories: either the points of the (filtered) medial axis of the shape is chosen as undeletable elements during thinning (and then transmitted as an inhibitor set, like in Alg. 3), or some points are, during the thinning process, dynamically chosen as undeletable points.

We will give a quick overview of the major methods used in both categories.

medial axes

the euclidean medial axis

In the 60s, Blum ([Blu62], [START_REF] Blum | A transformation for extracting new descriptors of shape[END_REF]) introduced the notion of medial axis, which has since been the subject of numerous theoretical studies and has also proved its usefulness in practical applications. Although initially introduced as the outcome of a propagation process, the medial axis can also be defined in simple geometric terms. In the continuous Euclidean space, the two following definitions can be used to formalise this notion: let X be a bounded subset of R n :

• Interpretation (a) of the medial axis of X consists of the centers of the n-dimensional balls that are included in X but that are not included in any other n-dimensional ball included in X.

• Interpretation (b) of the medial axis of X consists of the points x ∈ X that have more than one nearest point on the boundary of X.

These two definitions differ only by a negligible set of points (see [START_REF] Matheron | Examples of topological properties of skeletons[END_REF]), and in general, interpretation (a) of the medial axis is a strict subset of interpretation (b). The following formally defines interpretation (a) based on Euclidean balls (the reader should refer to Sec. 9.1 p.204 for a definition of Euclidean balls): Definition 3.3.1 Given X ⊂ Z n and D X its Euclidean distance transform (see Sec. 9.1 p.204), the Euclidean medial axis of X is the set EMA

(X) = {x ∈ X|for all y ∈ X\{x}, B < (x, D X (x)) ⊂ B < (y, D X (y))}.
It is possible to adapt this definition to various distances (4, 8, 6, 26-distances for example) by changing all references to the Euclidean distances with another distance.

To compute the medial axis approximately or exactly, different methods have been proposed, relying on different frameworks: discrete geometry [BRS91, GF96, MFV98, RT02a, RT05, CM07, HR08], digital topology [DP81, Vin91, TV92, Pud98], mathematical morphology [Ser82, Soi99], computational geometry [AL01, OK95, AM96], partial differential equations [START_REF] Siddiqi | The Hamilton-Jacobi skeleton[END_REF], and level-sets [START_REF] Kimmel | Skeletonization via Distance Maps and Level Sets[END_REF]. We focus here on medial axes in the discrete grid Z 2 or Z 3 , which are centered in the shape with respect to the Euclidean distance.

The (discrete) Euclidean medial axis of a shape allows reconstruction of the initial shape and is centered in the shape, but is not homotopic to the initial shape. To cope with this problem, the Euclidean medial axis can be combined (as previously explained) with an homotopic thinning algorithm in order to obtain a centered skeleton which contains visual features of the initial shape.

In the discrete framework, the Euclidean medial axis is not thin: in some parts, it can be two pixels thick. To cope with this problem, Saúde et al. propose, in [START_REF] Vital Saúde | Exact Euclidean Medial Axis in Higher Resolution[END_REF], an Euclidean medial axis on higher resolution and give some thinness properties of this axis. A study of the various properties of medial axes in the discrete framework is done in [START_REF] Hulin | Axe Médian Discret : Propriétés Arithmétiques et Algorithmes[END_REF].

Filtering the Euclidean medial axis A major difficulty when using the medial axis in applications (eg. shape recognition) is its sensitivity to small contour perturbations (see, for example, Fig. 30), in other words, its lack of stability. A recent survey [START_REF] Attali | Stability and computation of the medial axis -a state-of-the-art report[END_REF] summarizes selected relevant studies dealing with this topic. This difficulty can be expressed mathematically: the transformation which associates a shape to its medial axis is only semi-continuous (see [START_REF] Attali | Stability and computation of the medial axis -a state-of-the-art report[END_REF]). This fact, among others, explains why it is usually necessary to add a filtering step (or pruning step) to any method that aims at computing the medial axis. a) b)

Figure 30: Sensitivity of the Euclidean medial axis -In a, a binary shape (in grey) and its Euclidean medial axis (in black). In b, the same shape, but with noise added on the contour: the medial axis of the shape changed a lot compared to the medial axis of the original shape.

The first possibility to filter the medial axis is to keep only points which are centers of maximal balls of at least a given diameter. This method allows to remove spurious branches from a medial axis, but will also remove small branches which might be important for the shape understanding (see Fig. 31a to d). Indeed, some visual features of a shape can have the same size than noise features located elsewhere. The threshold makes no difference between these two features, and it can be difficult to find a satisfactory filtering parameter in some cases.

In 1992, Talbot and Vincent proposed in [START_REF] Talbot | Euclidean skeletons and conditional bisectors[END_REF] (generalizing a notion proposed in [START_REF] Meyer | Cytologie quantitative et morphologie mathématique[END_REF]) another method for filtering elements from the Euclidean medial axis, which relies on angles. In the continuous framework, given X ⊂ R 2 , D X its Euclidean distance transform and x ∈ X, we consider the set A x = {p ∈ X|d(x, p) = D X (x)}. The set A x is the set of contact points between the maximal ball centered on x and the border of X. The bisector angle associated to x is the maximal angle p 1 xp 2 , where p 1 and p 2 are elements of A x .

As pointed out in [START_REF] Luc | Efficient computation of various types of skeletons[END_REF] and [START_REF] Attali | Modelling noise for a better simplification of skeletons[END_REF], the bisector angle has good properties: basically, the lower the bisector angle of x is, and the "less interesting" the point x is. In [START_REF] Talbot | Euclidean skeletons and conditional bisectors[END_REF] and [START_REF] Couprie | Discrete bisector function and Euclidean skeleton in 2D and 3D[END_REF], the authors propose efficient methods for computing the bisector angle in the discrete framework. The bisector angle criteria is usually used with the distance map criteria in order to provide a robust filtering criteria [AM96, AL01, MFV98]: two filtering parameters must therefore be provided by the user. This two criteria allows to achieve more efficient filtering than what could be achieved with the only radius of the balls (see Fig. The medial axis has many "spurious points" due to the noise of the original shape. In b, removing all points which are center of an Euclidean ball of radius inferior to 3.6 allows to obtain a less noisy axis, but still noisy points remains. In c, higher filtering (remove all points center of an Euclidean ball of radius inferior to 6) remove some "spurious points", but remove also the tail of the shape. In d, using the bisector function combined with c, and filtering all points with a bisector angle inferior to 70 • and radius inferior to 6, removes most "spurious points" and keeps important visual information from the shape.

Efficient computation of the medial axis: Rémy and Thiel in 2003 [RT03]

The following naive algorithm computes the Euclidean medial axis of a shape X:

Algorithm 22: Naive Euclidean Medial Axis(X) Data: A shape X Result: The Euclidean medial axis of X D =the Euclidean distance transform of X; EMA = X;

foreach x ∈ X do foreach y ∈ (X\{x}) do if B < (x, D X (x)) ⊆ B < (y, D X (y)) then EMA = EMA\{x}; end end end return EMA
For every point x of the shape X, we look at all other points y ∈ X (although it would be sufficient to simply look at all the other points in EMA) in order to see if the maximal ball of X centered on x is included in the maximal ball of X centered on y. If it is the case, the point does not belong to the Euclidean medial axis. Algorithm 22 is not efficient in terms of computation time: let N be the number of points of the shape, the worst case complexity of this algorithm is N 3 .

Fortunately, in 2003, Rémy and Thiel proposed an efficient method for computing the Euclidean medial axis of a discrete shape ([RT03], [START_REF] Rémy | Exact Medial Axis with Euclidean Distance[END_REF]). Their method proposes to compute two look-up tables, which both rely on a parameter R max , which must be a supremum for the values of the Euclidean distance transform of the shape (if it is not, it is necessary to compute larger look-up tables).

The table M R max is the set of vectors to explore, from a point x of a shape X, in order to check if x is center of a maximal ball of X: if, for each v ∈ M R max , B < (x, D X (x))

B < (x + v, D X (x + v))}, then
x is center of a maximal ball for X. Thanks to this table, it is not necessary to scan all points y of the shape X in order to check for maximal ball inclusion (on the contrary of what was done in Alg. 22).

The table Lut gives, for any pair (v, R), the minimal radius R ′ necessary for having, for any x ∈ X, B < (x, R) ⊆ B < (x + v, R ′ )}. Thanks to this table, it is not necessary to test each point of each balls in order to test for the ball inclusion (on the contrary of what was done in Alg. 22).

Algorithm 23: Remi Thiel Axis(X)

Data: A shape X Result: The Euclidean medial axis of X In [START_REF] Rémy | Look-Up Tables for Medial Axis on Squared Euclidean Distance Transform[END_REF] and [START_REF] Rémy | Exact Medial Axis with Euclidean Distance[END_REF], the authors explain how to build the look-up tables, and study the size of the set M R max in order to provide an evaluation of their algorithm's average complexity. Mainly, the set M R max grows slowly compared to R max : Alg. 23 brings a huge gain when computing the Euclidean medial axis compared to the naive method (it also has an inferior worst case complexity).

1 D =the Euclidean distance transform of X; 2 EMA = X; 3 foreach x ∈ X do 4 foreach v ∈ M R max do 5 if D X (x + v) Lut(v,

the λ-medial axis of chazal and lieutier

The λ-medial axis was introduced and studied by Chazal and Lieutier in the continuous framework [START_REF] Chazal | The λ-Medial Axis[END_REF]).

Consider a bounded subset X of R n , as for example, for n = 2, the region enclosed by the solid curve depicted in Fig. 32 (left). Let x be a point in X, we denote by Π X (x) the set of points of the boundary of X that are closest to x. For example in Fig. 32, we have

Π X (x) = {a, b}, Π X (x ′ ) = {a ′ , b ′ } and Π X (x ′′ ) = {a ′′ }.
Given λ ∈ R, the λ-medial axis of X is the set of points x ∈ X such that the radius of the smallest ball containing Π(x) is superior or equal to λ. We give in the following a more formal definition of the λ-medial axis.

Let X ⊂ §, we denote by R(X) the radius of the smallest ball enclosing X, that is,

R(X) = min{r ∈ R + | ∃y ∈ R n , X ⊆ B(y, r)}. Definition 3.3.2 ([CL05]
) Let X be an open bounded subset of S, and let λ ∈ R + . The λmedial axis of X is the set of points x in X such that R(Π X (x)) λ.

A point x ∈ X belongs to the λ-medial axis of X if the contact points between the maximal ball of X centered on x and the border of X do not hold inside a ball of radius strictly less than λ. A major outcome of [START_REF] Chazal | The λ-Medial Axis[END_REF] is the stability of the λ-medial axis to noise: informally, for "regular" values of λ, the λ-medial axis remains stable under small perturbations of the complement of X (in regards of the Hausdorff distance). Typical non-regular values are radii of locally largest maximal balls. Such property was never proved for any other filtering criteria, this is why we chose to adapt the λ-medial axis to discrete framework in order to see how it would help in filtering skeletons. In the following chapter, we provide a discrete definition of the λ-medial axis, and we compare this axis with the two previous axes studied here. We show, on Fig. 33, the result of the discrete version of the λ-medial axis of a shape, filtered at different values.

In the field of computational geometry, the λ-medial axis has been exploited in particular by [START_REF] Samozino | Reconstruction with Voronoi Centered Radial Basis Functions[END_REF] to propose a robust method for reconstructing surfaces from point clouds. Also, notions closely related to the λ-medial axis have led Chazal et al. to propose stable approximations of tangent planes and normal cones from noisy samples ([CCSL09]).

the integer medial axis

The integer medial axis was introduced by Hesselink and Roerdink in 2008 [START_REF] Wim | Euclidean Skeletons of Digital Image and Volume Data in Linear Time by the Integer Medial Axis Transform[END_REF]. Let X be a subset of Z n , and let x ∈ X. We denote by Π ′ X (x) the element of Π X (x) that is the smallest with respect to the lexicographic ordering of its coordinates.

Definition 3.3.3 ([HR08]

) Let X be a finite subset of Z n , and let γ ∈ R + . The γ-integer medial axis (or GIMA) of X is the set of points x in X such that at least one y ∈ N(x) verifies: • d(Π ′ X (x), Π ′ X (y)) > γ, and

λ = 3 λ = 3.5 λ = 4 λ = 5
• d(m, Π ′ X (y)) d(m, Π ′ X (x)), where m = x+y 2 .
The integer medial axis of X is the γ-integer medial axis of X for γ = 1.

The second condition in Def. 3.3.3 allows to get a thinner set of points, compared to what would result of such definition without the second condition.

Parameter γ allows to keep more or less elements in the result: it acts as a filtering parameter for spurious elements. On Fig. 34, we show the impact of the variations of γ on the integer medial axis of a shape. The integer medial axis will be compared with other medial axes in the next chapter.

finding interesting features during thinning

The second strategy in order to find important visual features of an object is to detect these features during thinning, as the detection of curves or surfaces becomes more easy with the removal of points from the input object.

The detection of visual features is dependent on how the simple points are detected and removed, and two algorithms based on the same detection of visual features but different simple point removal techniques will produce different results. A large part of the literature devoted to skeletonization algorithms which preserve the visual aspect propose new methods for simple points removal, while the visual aspect detection itself remains globally the same.

In all the algorithms cited hereafter, once a point has been labelled as an important visual feature of the shape, it won't be erased.

bidimensional skeletons

In the following, a reference with a star means that an example of the algorithm proposed in the cited article can be found on Fig. 35 and Fig. 36.

In 2d, in order to preserve the visual aspect of a shape during thinning, it is necessary to detect the curvilinear elements relevant of the shape and ignore the spurious branches. A common strategy ([Rut66]*, [START_REF] Hilditch | Linear Skeletons From Square Cupboards[END_REF]

, [SR71], [Deu72], [Pav81]*, [Pav82b], [HSCP87]*, [CH88], [GH89], [ Hal89
]*) in order to preserve these curvilinear elements is to detect end points after each thinning step (a step being the complete processing of all simple points located at the border of the object): a point x ∈ X is an end point if |N * (8)(x) ∩ X| = 1 (the point has only one neighbour in X). Although these algorithms rely on the same rule for preserving visual features of the input, they produce different skeletons due to the different methods they use for simple point removal.

Observe that, given a diagonal 4-connected line of pixels, it is possible to remove simple points from the line's extremities, without meeting any end point, until the line is reduced to a single point. In [START_REF] Jean | SPTA: A Proposed Algorithm for Thinning Binary Patterns[END_REF] and [START_REF] Lü | A comment on "A fast parallel algorithm for thinning digital patterns[END_REF], the authors propose to extend end points definition in order to include points who have two 4-connected object points in their 8-neighbourhood, thus avoiding the complete reduction of the line example.

Some authors recommend detecting curve points rather than end points, in order to avoid keeping some spurious branches from the result: in [HSCP87]*, the author propose to detect, on vertical lines, points that have only two 8-neighbours, one of those having to be an end point. In [START_REF] Beun | A flexible method for automatic reading of hand written numerals[END_REF], it is proposed to detect points whose 8-neighbourhood can be divided in two parts, one part containing only one object point, and the other having up to three object points.

Another common strategy used for aspect preservation is the use of masks in order to detect interesting visual features ([MU74], [WT92]*, [START_REF] Frank | Fully Parallel Thinning With Tolerance To Boundary Noise[END_REF], [BM99]*). This strategy allows to define specific collections of visual features which should be preserved, and generally produces less spurious results than the end point detection method. Masks are also used as restoring templates when performing parallel thinning: they avoid removing interesting visual features in a same loop, and are usually specific to a particular simple point removal method ([CH89], [CWSI87]*).

Some authors are concerned with the thinness of the resulting skeleton, a property hard to obtain when performing parallel thinning. Typically, a skeleton is thin if the only simple points it contains are end points. Some thinning methods ([Hil69], [START_REF] Jean | SPTA: A Proposed Algorithm for Thinning Binary Patterns[END_REF], [START_REF] Habib Abdulla | A preprocessing algorithm for hand written character recognition[END_REF], [START_REF] Keung | An alternate smoothing and stripping algorithm for thinning digital binary patterns[END_REF], [START_REF] Humberto | An Improved Parallel Algorithm for Thinning Digital Patterns[END_REF]) allow to obtain directly a "thin" result while others don't ([ZS84], [START_REF] Pavlidis | A thinning algorithm for discrete binary images[END_REF], [Rut66]*). In [START_REF] Shen | Further improved fast parallel thinning algorithm for digital patterns[END_REF], the authors observe that a simple one-pass thinning is sufficient for removing "extra pixels" from a thick skeleton.

For retaining as less spurious branches as possible, some authors recommend detecting end points (or other points of interest) only after the thinning algorithm removed a given number of layers of simple points ([Izu74] -the author of this thesis could not access any information on this article, and relied on a survey for citing this source), while others propose to smooth the shape after removing a whole layer of simple points ( [START_REF] Keung | An alternate smoothing and stripping algorithm for thinning digital binary patterns[END_REF]).

Estimating the local curvature of the shape can also help in detecting interesting curvilinear parts: in [START_REF] Gallus | Improved Computer Chromosome Analysis Incorporating Preprocessing and Boundary Analysis[END_REF] and [START_REF] Govindan | A pattern adaptive thinning algorithm[END_REF], Freeman chain codes are used on the contour in order to detect high curvature zones; in [START_REF] Riazanoff | Parametrisable Skeletonization of Binary and Multilevel Images[END_REF], curvature is simply estimated by counting, in the 8-neighbourhood of a point, the number of 4-connected points not belonging to the shape; in [START_REF] Arcelli | Medial Lines and Figure Analysis[END_REF] and [START_REF] Arcelli | A Thinning Algorithm Based on Prominence Detection[END_REF], "protusions" (points whose distance from interior points of the shape is superior to a given value) are detected and retained.

In [START_REF] Eckhardt | Invariant Thinning[END_REF]*, the authors use morphological tools in order to find, after each step of the thinning, points which would not survive to an opening with a 4-connected ball of radius 1: these points are labelled as visually interesting points. Scan lines [START_REF] Pavlidis | Algorithms for Graphics and Image Processing[END_REF][START_REF] Kedem | A fast algorithm for skeletonizing lines by midline technique[END_REF] can also be used in order to detect interesting curves and compute object's skeletons at the same time: it consists in scanning the shape line per line, and retaining only one point in the middle of each interval of object's points. This method gives good results when the object has a particular orientation in space.

Many more information on features preservation during thinning (and also on thinning) in 2d can be found in [START_REF] Lam | Thinning Methodologies-A Comprehensive Survey[END_REF].

[Rut66] [Pav81] [HSCP87] [CWSI87] [Hal89] [WT92] [EM93] [BM99]
Figure 35: A few examples of 2d skeletons obtained with various algorithms. The original shape is shown in grey, the skeleton is in black.

[Rut66]

[Pav81] [HSCP87] [CWSI87] [Hal89] [WT92] [EM93] [BM99]
Figure 36: A few examples of 2d skeletons obtained with various algorithms. The original shape is shown in grey, the skeleton is in black.

three dimensional skeletons

In three dimensions, the detection techniques's literature is globally more "poor" than in the bidimensional framework. Indeed, in most works, high efforts were made in order to produce a good thinning technique, and basic detections of end points (curve points, surface points, ...) is sufficient for obtaining satisfactory skeletons. This part will be therefore shorter than its bidimensional counterpart.

In [START_REF] Ma | A 3D fully parallel thinning algorithm for generating medial faces[END_REF], the author detects and preserves edge points by examining, during the thinning process, each point's neighbourhood and counting the number of object's points in it. For a point x ∈ X, if Γ * 26 (x) ∩ X is a singleton, or if any of the three 3x3 squares centered on x contains only one other point of X, then x is labelled as an edge point. At the end, the author preserves surface and curvilinear parts of an input object (in the edge point definition, the first part is dedicated to curve detection, while the second part is dedicated to surface detection).

In [START_REF] Bertrand | A parallel thinning algorithm for medial surfaces[END_REF], the author points out the importance of preserving border points in order to preserve medial faces and curves of the object in the skeleton. After characterizing the border points which should be preserved, the author gives a unique and unified characterization of simple border points, making the implementation of his method easy.

The strategy adopted in [START_REF] Kumar Saha | A new shape preserving parallel thinning algorithm for 3D digital images[END_REF] differs from common strategy in the fact that the author uses two images during his thinning : one image is thinned "layer by layer", and another image, which is regularly updated, is used for detecting which points should be preserved during the current iteration (although, as the author specifies in his article, an implementation using a single image is possible). The result might contain thick elements, so the author performs an extra thinning iteration using no constraint set in order to obtain a thin skeleton.

Most works on parallel thinning are based on the use of masks (see Sec.3.2.2), and many authors propose masks with a double purpose: on one hand, the masks allow to remove simple sets of points from the object, and on the other hand, they allow to preserve interesting features in the final skeleton ([MBPL99], [START_REF] Palágyi | A 3D 6-subiteration thinning algorithm for extracting medial lines[END_REF], [START_REF] Palágyi | A 3-subiteration 3D thinning algorithm for extracting medial surfaces[END_REF], [START_REF] Palágyi | A 3-subiteration surface-thinning algorithm[END_REF]).

Recent works based on the cubical complexes framework have been achieved in order to propose dynamic detection of interesting points during thinning. In [START_REF] Bertrand | A new 3D parallel thinning scheme based on critical kernels[END_REF], the authors propose, thanks to a new characterization of simple points based on critical kernels and to the usual definitions of end points and surface points, a new definition of isthmuses which, paired with a new thinning technique, gives very good visual results. Finally, in [START_REF] Ju | Computing a family of skeletons of volumetric models for shape description[END_REF], the authors propose a dynamic end points detection which requires two filtering parameters from the user (one for filtering curvilinear elements, one for filtering surface elements).

On Fig. 94 p.168, we show some examples of 3d skeletons obtained with some of the algorithms previously cited.

T H E D I S C R E T E λ -M E D I A L A X I S

In this chapter, we propose a new discrete filtered medial axis, derived from the λmedial axis, initially defined by Chazal and Lieutier in the continuous framework ( [START_REF] Chazal | The λ-Medial Axis[END_REF]). This axis was proved to be stable under small perturbations of the object's border (except for "critical" values of the parameter). After giving a definition of the λ-medial axis in the discrete framework, we define another axis similar to the discrete version of the λ-medial axis, only cheaper and quicker to compute. We then propose an evaluation of our axes' stability under noise and rotation (in 2d and 3d) and we compare our axes with other well-known axes. We also explain how to use this new discrete medial axis in order to perform homotopic thinning (see Sec. 4.3), so as to obtain a skeleton with good reconstruction capacity.

The work exposed in this chapter was presented during the DGCI 2009 conference, held in Montreal (Canada). A conference article was published in [START_REF] Chaussard | A discrete lambda-medial axis[END_REF], and an extended version was accepted by Pattern Recoginition Letters [START_REF] Chaussard | Robust skeletonization using the discrete lambda-medial axis[END_REF]. 4.1 the discrete λ-medial axis (dlma)

The λ-medial axis was proposed by Chazal and Lieutier in a continuous framework.

Adapting plainly definition 3.3.2 to the discrete framework would consists in declaring, in Def.3.3.2, S = Z n . Consider a horizontal ribbon in Z 2 with constant even width and infinite length (as depicted on Fig. 37a). Every point of this set has a projection on its complementary that is reduced to a singleton. Hence, if we keep the same definition, any λ-medial axis of this object with λ > 0 would be empty. Thus, a plain adaptation of the λ-medial axis to the discrete framework does not produce interesting results.

the extended projection of a point

In order to address this problem, we use the extended projection (see [START_REF] Couprie | Discrete bisector function and Euclidean skeleton in 2D and 3D[END_REF]) of a point. For each point x ∈ Z n , we define the direct neighborhood of x as N(x) = {y ∈

Z n | d(x, y) 1} (in 2d, N(x) = Γ 4 (x)
, and in 3d, N(x) = N(6)(x)). The direct neighbourhood comprises 2n + 1 points. Definition 4.1.1 ([CCZ07]) Let X ⊆ Z n , and let x ∈ X. The extended projection of x on X, denoted by Π e X (x), is the union of the sets Π X (y) (defined in Sec 9.1), for all y in N(x) such that d(y, X) d(x, X) (4.1)

Using the extended projection allows us to cope with the problem pointed out previously. Considering the example of an horizontal ribbon in Z 2 with constant even width and infinite length, points close to the "middle" of the ribbon will each have an extended projection consisting of four points (see Fig. 37b). Informally, the extended projection permits to "see" both sides of the object from a point x close to the "middle" of the object, whereas only one side is taken into account when considering only the projection of x.

definition of the discrete λ-medial axis (dlma)

We give the definition of the discrete λ-medial axis (DLMA), using the same notations as the ones used in Sec. 3.3.1.3. Definition 4.1.2 Let X be a finite subset of Z n , and let λ ∈ R + . We define the function F X which associates, to each point x of X, the value F X (x) = R(Π e X (x)). The discrete λ-medial axis (or DLMA) of X is the set of points x in X such that F X (x) λ.

As illustrated in Fig. 38, equation 4.1 (see Def. 4.1.1) avoids producing multiple medial axis points when only one is sufficient; in other words, it yields a thinner axis.

Example Consider the object X (white pixels) depicted in Fig. 38a, and the two pixels x, y in X. Fig. 38b shows the squared Euclidean distance map of X, that is, the value in each pixel is the square Euclidean distance between this pixel and the nearest background pixel. We can see that d(x, X) = 4 and d(y, X) = 5. The projection of x (resp. y) on X is {b} (resp. {d}). We have Π e X (x) = {a, b, c}, and Π e X (y) = {d, b, c}. The function F X is displayed in Fig. 38c and the 4-medial axis of X (threshold of F X for λ = 4) is displayed in Fig. 38d.

In Fig. 38e, we show how the function F X would look like if we suppress condition 4.1 from the definition 4.1.2. In this case, the extended projection of x would be {a, b, c, d} instead of {a, b, c}, therefore giving higher value of F X (x). Figure 38f shows that, in this case, the 4-medial axis of X would be different (thicker). On Fig. 39 (right), we show two examples of DLMAs of a shape. More examples are given in Fig. 40 and Fig. 41. Notice that DLMA in general does not exhibit the same topological characteristics as the original shape.

dlma vs. gima

There are indeed some links between the GIMA (see Def. 3.3.3) and the DLMA. In 2D, in the case of a point x that is, conceptually, a "regular medial axis point" (neither a branch extremity nor a branch junction), the first condition of Def. 3.3.3 p.80 is similar to the condition R(Π X (x)) λ in Def. 3.3.2 p.80.

Condition 2 of Def. 3.3.3 plays a role analogous to condition d(y, X) d(x, X) in the Def. 4.1.1 of the extended projection, that is to get a thinner axis.

However, there are sensible differences in the results of the DLMA and the GIMA transformations (see Fig. 41). For example, in definition 3.3.3, Π ′ X (x) is the only element of the projection Π X (x) that is taken into account into the computation of the integer medial axis of X, while all the elements of Π e X (x) are taken into account into the computation of the discrete lambda medial axis. Moreover, in definition 3.3.3, the result depends on the longest distance between two elements of the (reduced) projection, while in definition 4.1.2, the result depends on the size of the smallest ball including the whole projection.

Generally speaking, one can say that the lambda medial axis "takes into account" more elements than the integer medial axis. We analyse quantitatively the consequences In order to compute, for every x ∈ X, the value of F X (x), it is necessary to compute the extended projection of x, and to be able to compute the radius of the smallest enclosing ball of a given set. Thanks to an algorithm proposed by D. Coeurjolly in [START_REF] Couprie | Discrete bisector function and Euclidean skeleton in 2D and 3D[END_REF], the extended projection of a point x can be computed in optimal time and space, that is, in O(N) where N = x∈X |Π e X (x)|. Thanks to an algorithm proposed by E. Welzl in [START_REF] Welzl | Smallest enclosing disks (balls and ellipsoids)[END_REF], it is possible to compute the smallest enclosing ball of a set in linear time relatively to the cardinality of this set (see Alg. 24). The reader interested by smallest enclosing ball problem can find a very good overview of the problem in [START_REF] Menguy | Optimisation quadratique et géométrique de problèmes de dosimétrie inverse[END_REF]. From all the algorithms existing for computing the smallest enclosing ball of a set, we chose the algorithm of Welzl (described in Alg. 24) as it is multi-dimensional, linear and easy to program (thanks to a recursive procedure). Please note that the algorithm takes two parameters as input: in order to call the program, the second parameter should be the empty set while the first parameter should be the considered set of points.

The discrete λ-medial axis of an object can be computed using Alg. 25. Another method for computing the DLMA of a shape X at a value λ 1 consists of computing the map F X , and then threshold this map at value λ 1 . If another DLMA of X needs to be computed at a value λ 2 , only a simple threshold of F X at value λ 2 would be necessary. retaining the points of its filtered medial axis M, that is to say, of iteratively removing simple points [KR89, Ber94, CB09] from X that do not belong to M. The thinning algorithm used can be, for example, the one presented on Alg. 3, p.56. Removal order has an important effect on the final result, and a defined order must be precisely set during the thinning in order to obtain a satisfying (centered) result. In Alg. 3, the removal order is defined by a map P : X → R, associating to each point of the input object a value in R. Simple points are then removed based on the map, points with lowest map value being removed first. In the general case, the choice of this priority function is not obvious (see [START_REF] Talbot | Euclidean skeletons and conditional bisectors[END_REF][START_REF] Couprie | Discrete bisector function and Euclidean skeleton in 2D and 3D[END_REF]).

An example is shown on Fig. 42, where the filtered DLMA of an object X is used as a constraint set during skeletonization. Choosing the Euclidean distance transform of X as a priority function for removing simple points from the object may lead to geometric distortions (see [START_REF] Talbot | Euclidean skeletons and conditional bisectors[END_REF]). In some cases, "extra branches", not corresponding to any geometric feature of the original object, may even appear, as shown on Fig. 42c. In our example, the skeletonization algorithm "reached too quickly" the elements of the constraint set (see Fig. 43a), which could not be removed, and continued removing elements around.

Choosing the map F X as priority function yields more satisfying results on Fig. 42d, as it guides the thinning process towards elements that belong to the discrete λ-medial axes (see Fig 43b). Although this solution works in the 2d case, unfortunately, as we will see in the following, using such map in 3d is generally not a good solution, as it does not, on the contrary of the Euclidean distance map, result in an isotropic removal of simple points.

the dlma map and topological lumps

An object can be generally divided into layers of points: the outer layer is made of points on the border of the object object, the second layer is made of points neighbouring the outer layer, etc. Distance maps are generally used as priority functions for simple points removal because they allow to "simulate" a thinning process "layer by layer": simple points deep inside the object have a higher value than simple points on the border of the object, and the thinning process generally removes all simple points of a layer before removing points from a deeper layer. Removing simple points layer by layer yields generally good results (when no constraint set is used) as it "imitates" parallel removal of simple points. The map F X does not offer in general such configuration, and points deep inside the object can have a lower value than points on the border. The result is that the simple points removal will not imitate a "layer by layer" removal, and the process will start digging very deeply a given spot of the object before digging another spot: this can be clearly seen on Fig 43b . In 3d (or more), homotopic thinning using the map F X as a priority function may result in a skeleton containing lumps (see [START_REF] Passat | Minimal Simple Pairs in the 3-D Cubic Grid[END_REF]). A lump is defined as a set of voxels P, homotopic to a subset Q ⊂ P, and containing no simple point. Indeed, in order to obtain Q from P by an homotopic operation, it is necessary to have a step performing homotopic enlargement of P (add simple point(s) to P); this step can also be seen as an homotopic thinning of P. The Bing's house [START_REF]Some aspects of the topology of 3-manifolds related to the Poincaré Conjecture[END_REF] is a famous example of lump: it contains no simple points, and it is homotopy equivalent to a single voxel.

An example is given on : removing simple points "layer by layer" reduces the chances of obtaining lumps in the skeleton. A further analysis using methods proposed in [START_REF] Passat | Minimal Simple Pairs in the 3-D Cubic Grid[END_REF] reveals that some of these lumps can be reduced by removing simple pairs of points. We may point out that F X can be used for thinning in 2d, as "topological lumps" do not appear in this dimension.

another priority function for thinning with the λ-medial axis in 3d

At the time this thesis is written, finding a way to use the map F X for homotopic 3d thinning is still under investigation. A solution was recently tested: it consists in choosing a threshold value t for the map F X , such that any value under t in F X is considered as irrelevant and corresponding voxels will be removed "layer by layer", using the Euclidean distance transform. Points x such that F X (x) is superior to t are removed based on their value. Typically, this task can be achieved with only one map as priority function: let D X be the Euclidean distance transform of X, let m = max x∈X D X (x), we set When the parameter t is well chosen, the homotopic thinning using E X as a priority function, and a λ-medial axis as a constraint set gives good results: no extra branches appear on the skeleton of the tested shapes, and no lumps neither. Thanks to the map E X , some points of the shape are removed with a "layer by layer" strategy, while others are removed based on the values of F X : this strategy seems to be sufficient for avoiding lumps in the resulting skeleton, and for guiding the thinning towards elements of the constraint set.

E X (x) = F X (x) + m if F X (x) > t D X (x) else (a) (b) (c) (d) (e)

results and comparisons

In this section, we compare the stability of DLMA, DL'MA, GIMA, and the well-known filtered Euclidean Medial Axis (EMA), defined as the set of the centers of maximal balls that have a radius greater than a parameter ρ (see Sec. 3.3.1, p.76). We will see how these axes behave to noise or rotation, in 2d and 3d.

Let us give first some definitions that are useful for describing our experiments and analysing their results. Let X be a finite subset of Z n , and Y be a subset of X; we set REDT X (Y) = y∈Y B < (y, d(y, X)). The set REDT X (Y), sometimes called reverse Euclidean distance transform [START_REF] Coeurjolly | d-dimensional reverse Euclidean distance transformation and Euclidean medial axis extraction in optimal time[END_REF], tells us how much information of X can be retrieved from Y.

It is well known that any object can be fully reconstructed from its medial axis, more precisely, we have X = REDT X (M) whenever M is the (exact and non-filtered) medial axis of X. This property holds if M is the set of the centers of all maximal balls of X (EMA of X with ρ = 0), the DLMA of X with λ = 1, the DL'MA of X with λ ′ = 0 (of course, as it is equal to X), or the integer medial axis of X with γ = 1. However, it is no longer true if we consider filtered medial axes, eg. EMA, DLMA, DL'MA or GIMA with arbitrary ρ, λ, λ ′ or γ.

It is interesting to measure how much information about the original object is lost when we raise the filtering parameter of an axis. We set

L X (λ) = |X\REDT X (LM X (λ))|

|X|

where LM X (λ) is the DLMA of X. In words, L X (λ) is the normalized area of the difference between X and the set reconstructed from its DLMA. We call L X (λ) the (normalised) residual of the DLMA of X filtered at value λ. The same way, we define L ′ X (λ ′ ) (resp. I X (γ), M X (ρ)) as the (normalized) residuals of the DL'MA (resp. GIMA, EMA) of X filtered at value λ ′ (resp. γ, ρ). Residuals bring a numerical evaluation of how much an object can be reconstructed from its filtered medial axis: the lower the value, the more can be reconstructed.

Figure 47 shows the evolution of the residuals for the EMA, GIMA, DLMA and DL'MA versus the filtering value. Since differences are not negligible, to ensure a fair evaluation we compare the results of methods for approximately equal values of their residuals, rather than for equal values of their parameters. Therefore, in the following, we compare DLMA, DL'MA, GIMA and EMA for filtering parameter λ, λ ′ , γ and ρ yielding (approximately) a same residual (L X (λ) = L ′ X (λ ′ ) = I X (γ) = M X (ρ)). An example of a filtered DLMA and a filtered GIMA giving the same residual is presented on Fig. 46.

Object GIMA DLMA

Figure 46: Comparison of DLMA and GIMA in 3d -On this example, the GIMA and the DLMA of the leftward shape were filtered in order to yield a residual of 5%. Here, the best aspect preservation is achieved by the DLMA.

Globally, stability of the medial axes will be tested by measuring the "difference" between the filtered medial axis of a shape X, and the filtered medial axis (same filtering parameter) of T (X), where T is a transformation on X (such as noise addition). The "difference" will be measured using the Hausdorff distance (see below) or a dissimilarity measure proposed by [START_REF] Jain | A modified Hausdorff distance for object matching[END_REF]. The drawback of Hausdorff distance for measuring shape dissimilarity is its extreme sensibility to outliers, the latter measure performs better in this respect.

Let X, Y be two subsets of R n . We set We conducted our experiments on a database of 216 two-dimensional shapes, divided into 18 classes, provided by B. Kimia [START_REF] Sharvit | Symmetry-based indexing of image databases[END_REF], and 20 three-dimensional objects gathered on the Internet or created ourselves. Figure 48 shows one (reduced) image of each class of the bidimensional shapes, and a sample of the 20 three-dimensional objects.

H(X|Y) =

stability to noise

Medial axes are notoriously sensitive to border noise. Since the λ-medial axis is supposed to cope reasonably well with shape deformation, it is useful to test how it fares in practice.

To introduce noise to the boundary of an object we propose deforming it using a process derived from the Eden accretion process [START_REF] Eden | A two-dimensional growth process[END_REF]. The Eden process, in its simplest form, deforms a shape by randomly choosing points on the shape's border and adding them to the shape (each border point have the same probability to be chosen). In spite of its simplicity, the Eden process exhibits good asymptotic isotropy [START_REF] Thomas | A Stochastic Tesselation of Digital Space[END_REF]. In our process, we require accretion steps to concern only simple points. This way, at each step, the object's homotopy type remains unchanged. Moreover, only point addition is performed: points removal is avoided as it is a deformation which will affect regular values of the medial axis. We denote by E(X, n) the result of applying n steps of this process to the shape X. In this experiment, we compare the (filtered) medial axis of an original shape with the one of a deformed shape. In Table 1 (resp. Table 2) we give the average Hausdorff distance (resp. dissimilarity) between M(X) and M(E(X, n)) on the 216 shapes of Kimia's database and the 20 shapes of our 3d database, for different definitions of M (filtered EMA, GIMA, DLMA or DL'MA of X). Filtering parameters ρ, γ, λ and λ ′ were chosen in order to give a normalised residual varying from 5 to 30 in 2d, and a normalised residual varying from 3 to 10 in 3d. Results are given for values of n equal to 3%, 6% and 9% of object's surface/volume (values shown are averages of results obtained for all tested residuals), and the last column indicates all results averaged together.

Note that the tested residual values are not the same in the 2d and 3d case. Indeed, in 3d, choosing a residual superior to 10 usually gives a medial axis which contains very little information about the original object (surfacic parts are mostly deleted). We constrained our study to medial axes holding enough information on the original objects, and ignored normalised residual superior to 10 in the 3d case.

On Fig. 50 and 51, we show the evolution of the Hausdorff distance and the dissimilarity between M(X) and M(E(X, n)) against the quantity of noise added to the shape, for DLMA, DL'MA, GIMA and EMA algorithms. The results shown are average of the results obtained on the 216 shapes of Kimia's 2D image database. Figure 52 shows the same experimental results on the 20 shapes of our 3d database. As we expected, DLMA fares better on the average than other axes, with regard to Hausdorff distance criterion. Its faster variant DL'MA ranks second. According to the dissimilarity criterion, DLMA and DL'MA yield the best results in 3d, and in 2d, DLMA performs nearly as well as EMA.

2D

rotation invariance

Rotation invariance is an important property of the Euclidean medial axis that holds in the continuous framework. If R θ denotes the rotation of angle θ about the origin, and M denotes the Euclidean medial axis transformation, the rotation invariance property states that M(R θ (X)) = R θ (M(X)), irrespective of X and θ.

In a discrete framework, this property holds only in particular cases (eg. when θ is a multiple of 90 degrees). Nevertheless, we can experimentally measure the dissimilarity between M(R θ (X)) and R θ (M(X)) for different instances, and different definitions of the medial axis. The lower this dissimilarity, the more stable under rotation the method is.

For each shape of Kimia's database and of our database, we computed the Hausdorff distance and the dissimilarity between M(R θ (X)) and R θ (M(X)) for values of the parameters yielding a normalized residual of 5, 10, 15, 20, 25 and 30, and for rotation angles varying from 0 to 89 degrees by 3 degrees steps. In 3d, rotations were successively performed around the Y and Z axis. Moreover, in 3d, only parameters yielding a normalized residual of 3, 5 and 10 were tested: higher residual values yielded skeletons that were not keeping enough information from the original object (see discussion in Sec. 4.4.1).

Figures 53 and54 show detailed results of such experiment in 2d, while Fig. 55 and Fig. 56 show results in 3d. For both cases, an inverse truncated real rotation algorithm was used to perform images rotation.

The results are summarised in Tables 3 and4. In Table 3 (resp. Table 4) we give the average Hausdorff distance (resp. dissimilarity) between M(R θ (X)) and R θ (M(X)) on the 216 shapes of Kimia's database and on the 20 3d shapes of our database, for θ varying from 0 to 89 degrees (in 3d shapes, rotation was performed independently around Y and Z axes), and for normalized residual values equal to 5, 10, 15, 20, 25 and 30 (for 3d shapes, only 3, 5 and 10 were tested). We show, in the first three columns, the average value obtained for all tested rotation angles for a given residual, while the fourth column indicates the average value obtained for all residuals and all rotation angles.

In 3d, λ ′ -and λ-medial axis yield, in average, the best results for both measures. In Part III

O B TA I N I N G A N D A N A LY S I N G A S K E L E T O N I N T H E C U B I C A L C O M P L E X F R A M E W O R K 5.1

unsatisfying results in the dt framework

In the previous chapter, we saw that various tools exist in the digital topology framework in order to provide skeletons with good reconstruction properties (containing important visual features from the original shape). Shape analysis based on the skeleton usually involves decomposing the skeleton into basic "parts" in order to better understand the structure of the initial object. Typically, in the continuous framework, a skeleton is a set of curves in 2d, and a set of curves and surfaces in 3d. Moreover, the skeleton is thin in any dimension, and the classical properties of the continuous framework can be applied: the intersection of two curves or more is a point, the intersection of two surfaces or more is a curve, ... When working with voxels, the various parts of a skeleton are usually classified in two steps: first, each point is labelled according to the configuration of a more or less wide range of neighbour points. Then, the skeleton is divided into basic parts, each part being connected sets of points having "compatible" labels (

[MBA93], [MFV98], [BPA01], [GK04], [Str05], [Kle06], [RT08], [JAB + 10]
). The results of the decomposition of a skeleton does not, in the digital topology framework, have the same properties than in the continuous framework: most thinning methods fail to always guarantee a thin result (for example, in 3d, some points of the skeleton can be classified as volume points), the intersection of two curves is not necessarily a single voxel, the intersection of two surfaces is not necessarily a set of voxels forming a curve (see, for example, Fig. 64). Thus, studying some specific parts of the skeleton, such as surfaces intersections, can be difficult in the DT framework. To our knowledge, there exists no decomposition nor thinning method in the DT framework which holds the properties listed in the first paragraph.

a) b)

Figure 64: Decomposition of a skeleton made of voxels -In a), a skeleton made of voxels is decomposed into three basic parts, thanks to the method proposed in [START_REF] Malandain | Topological segmentation of discrete surfaces[END_REF]. In b), a close-up to the center of the decomposition: voxels in grey were labelled as "surface intersection", however, put together, they do not form a simple curve.

The cubical complex framework is different from the DT framework, in the way that objects are made of basic bricks of various dimensions (not only voxels). As we show in Chap. 7, it is possible to obtain a sound decomposition of objects in the cubical complex framework, with the guarantee that the intersection between two curves is a point, the intersection between two surfaces is a curve, ... We propose, in Chap. 6, various thinning algorithms, requiring no filtering parameter from the user, and allowing to obtain, in the cubical complex framework, a skeleton with good reconstruction properties. Moreover, we propose a methodology (based on thinning) in order to embed skeletons of the DT framework into the cubical complex framework, and obtain a thin skeleton. Finally, we give a method for embedding our skeletons in the DT framework, and we compare various thinning algorithms with our thinning method. We also prove that our skeleton, in the cubical complex framework, are thin (see Prop. 6.3.7 p. 145).

In the following chapter, we introduce the basis of cubical complex framework.

a formal introduction to the cubical complex framework

In the following, we formally define some important concepts of the cubical complex framework.

basic definitions

In the cubical complex framework, objects are made of various kind of basic bricks: a three-dimensional cubical complex is made of cubes, squares, lines and points. These basic bricks are called faces, defined hereafter. Let Z be the set of integers, we consider the family of sets F 1 0 and F 1 1 , such that We denote by F n the set composed of all faces in Z n . Given m ∈ {0, . . . , n}, we denote by F n m the set composed of all m-faces in Z n . Let f ∈ F n . We set f = {g ∈ F n |g ⊆ f}, and f * = f \ {f}. Any element of f is a face of f, and any element of f * is a proper face of f. We call star of f the set f = {g ∈ F n |f ⊆ g}, and we write f * = f \ {f}: any element of f is a coface of f. It is plain that g ∈ f iff f ∈ ǧ.

F 1 0 = {{a} | a ∈ Z} and F 1 1 = {{a, a + 1} | a ∈ Z}. Any subset f of Z n such that f is the cartesian product of m elements of F 1 1 and (n -m) elements of F 1 0 is called a face or an m-face of Z n , m is the dimension of f, we write dim(f) = m. A 0-face is called a vertex,
A set X of faces in F n is a cell, or m-cell, if there exists an m-face f ∈ X such that X = f. The closure of a set of faces X is the set

X -= ∪{ f|f ∈ X}. The set X is F n \ X.
Definition 5.2.1 A finite set X of faces in F n is a cubical complex if X = X -, and we write X F n . Any subset Y of X which is also a complex is a subcomplex of X, and we write Y X. c,d). The set B is not a complex, as two squares miss an edge, and four edges miss a vertex. The set D is neither a complex, but A and C are complexes. Moreover, A = B -. The complex A is pure as all its facets are squares, the complex C is not pure as some of its facets are squares while some others are edges. We have D = C + . The complexes A and C have a dimension equal to 2.

Informally, in 2d, a set of face is a cubical complex if, for each square of the complex, the four edges (sides) of the complex also belong to the complex, and for each edge of the complex, the two vertices (extremities) of the edge belong to the complex (see Fig. 66). In 3d, a set of face is a cubical complex if, for each cube of the complex, the six squares (sides) of the cube are also in the complex, for each square of the complex, the four edges (sides) of the square are also in the complex, and for each edge of the complex, the two vertices (extremities) of the edge are also in the complex.

A face f ∈ X is a facet of X if f is not a proper face of any face of X (see Fig. 67). We denote by X + the set composed of all facets of X . A complex X is pure if all its facets have the same dimension (see Fig. 66

). The dimension of X is dim(X) = max{dim(f) | f ∈ X}. If dim(X) = d,

thinning: the collapse operation

The collapse operation is the basic operation for performing homotopic thinning of a complex. It consists of removing two distinct elements (f, g) from a complex X under the condition that g is contained in f and is not contained in any other element of X. This operation may be repeated several times. A more precise definition follows.

Definition 5.2.2 Let X F n , and let f, g be two faces of X. The face g is free for X, and the pair (f, g) is a free pair for X if f is the only face of X such that g is a proper face of f.

In other terms, (f, g) is a free pair for X whenever ǧ * ∩ X = {f} (g is included only in f). It can be easily seen that if (f, g) is a free pair for X and dim(f) = m, then f is a facet and dim(g) = m -1.

Definition 5.2.3 Let X F n , and let (f, g) be a free pair for X. The complex X \ {f, g} is an elementary collapse of X.

Let Y F n , the complex X collapses onto Y if there exists a sequence of complexes (X 0 , ..., X ℓ ) of F n such that X = X 0 , Y = X ℓ and for all i ∈ {1, . . . , ℓ}, X i is an elementary collapse of X i-1 . We also say, in this case, that Y is a collapse of X. Let f 0 , f ℓ be two n-faces of F n (with ℓ being even). An (n -1)-path from f 0 to f ℓ is a sequence π = (f 0 , ..., f ℓ ) of faces of F n such that for all i ∈ {0, . . . , ℓ}, either i is even and f i is an n-face, or i is odd and f i is an (n -1)-face with fi * = {f i-1 , f i+1 } (such path always exists).

The following proposition will serve us to prove the thinness of our skeletons.

Proposition 5.2.4 Let X F n be an n-complex, with n > 0. Then X has at least one free (n -1)-face.

Proof Since X is an n-complex (hence X is finite) there exists an n-face a in X and an n-face b in X. Obviously, there exists an (n -1)-path from a to b. Let h be the first n-face of π that is not in X, let k be the last n-face of π before h (thus k is in X), and let e = k ∩ h be the (n -1)-face of π between k and h. Since k and h are the only two n-faces of F n that contain e, we see that the pair (k, e) is free for X.

In conclusion, in F 3 , as long as a complex still contains 3-faces, it has a free 2-face and more collapse operations can be performed. Therefore, it is possible to perform collapse on a complex until no more 3-faces (volumes) can be found. When an n-complex has no n-faces, then it is said to be thin.

As in the DT framework, it is sometimes necessary to perform collapse in the cubical complex framework while preserving some faces safe from deletion: these faces are the so-called inhibitor set. When using an inhibitor set during collapse, the guarantee of having a thin result does no more hold. If the inhibitor set is not thin, the result of the thinning constrained by the inhibitor set cannot be thin. However, as illustrated on figure 69, the inhibitor set can be thin and the result of the constrained thinning can still not be thin.

a) b) c)

Figure 69: The collapse of a complex may not be thin -We consider the complex X in a, and the inhibitor set W highlighted in b. The set W is thin, but the result of the thinning of X constrained to keep W, presented in c, is not thin.

Under some conditions, it is possible to use an inhibitor set while collapsing, and still have the guarantee of getting a thin result. In order to prove this, let us state the following: Lemma 5.2.5 Let X F n , let (f 1 , g 1 ) be a free pair of X, and (f 2 , g 2 ) be a free pair of

(X\{f 1 , g 1 }). If dim(f 2 ) > dim(f 1 ), then (f 2 , g 2 ) is free for X. Proof If (f 2 , g 2 ) is a free pair of (X\{f 1 , g 1 }), then g 2 is included in only one face of (X\{f 1 , g 1 }), which is f 2 . As (dim(g 2 ) = dim(f 2 ) -1) and (dim(f 1 ) (dim(f 2 ) -1)), then g 2 f 1 and g 2 g 1 . Therefore, g 2 is included in only one face of X, which is f 2 : therefore, (f 2 , g 2 ) is free for X.
This lemma implies that, when one has a sequence of removal of free pairs of faces from a complex, one can only keep the free pairs of highest dimension and still have a sequence of removal of free pairs from the complex.

The following proposition states that, under some conditions on the inhibitor set (denoted W), it is possible to guarantee the thinness of the result of the constrained thinning. Proposition 5.2.6 Let X be an n-complex with n > 0, let S be a collapse of X such that dim(S) (n -1) and let W S. Let Y be a collapse of X such that W ⊆ Y and such that there are no free pairs in Y included in Y\W. Then, the dimension of Y is inferior or equal to (n -1).

Proof

In the following, we show that if there exists an n-face in Y, then it belongs to a free pair for Y that is included in Y\W, a contradiction with the hypothesis of the proposition.

Let C = ((a 1 , b 1 ), ..., (a k , b k )) be a sequence of removal of free faces which allows to obtain S from X:

for all i ∈ [1; k], (a i , b i ) is free for X\{a 1 , b 1 , ..., a i-1 , b i-1 } and S = X\{a 1 , b 1 , ..., a k , b k }. Let C ′ be the sequence C restrained only to free pairs containing an n-face: C ′ = ((f 1 , g 1 ), ..., (f h , g h )). A consequence of lemma 5.2.5 is that, for all i ∈ [1; h], (f i , g i ) is free for X\{f 1 , g 1 , ..., f i-1 , g i-1 } and (X\{f 1 , g 1 , ..., f k , g k }) is a collapse of X.
Any n-face c ∈ Y is such that c ∈ X and c / ∈ S, and therefore there exists j ∈ [1; h] such that c = f j . Without loss of generality, let j be the smallest integer such that

f j ∈ Y: for all k ∈ [1; j -1], f k / ∈ Y and g k / ∈ Y.
As previously said, (f j , g j ) is free for

(X\{f 1 , g 1 , .
.., f j-1 , g j-1 }): g j is included in only one face of (X\{f 1 , g 1 , ..., f j-1 , g j-1 }), and this face is f j .

As {f 1 , g 1 , ..., f j-1 , g j-1 } ∩ Y = ∅ and that f j ∈ Y, then g j is included in only one face of Y, and that face is f j . Consequently, the pair (f j , g j ) is free for Y. Moreover, the pair (f j , g j ) belongs to the sequence C, therefore f j / ∈ S and g j / ∈ S. As W ⊆ S, the pair (f j , g j ) is included in Y\W.

from binary images to cubical complex

Traditionally, a binary image is defined as a finite subset of Z n (with n = 2 or n = 3). Given S ⊆ Z n , the object voxels are the elements of S. This kind of image is the most common one in the field of image processing so, in order to work in cubical complex framework, we need to find a way to transpose a binary image to cubical complex framework.

Informally, to do so, we associate to each element of S ⊆ Z n an n-face of F n (to a pixel we associate a square, to a voxel we associate a cube). More precisely, let x = (x 1 , ..., x n ) ∈ S, we define the n-face Φ(x) = {x 1 , x 1 + 1} × . . . × {x n , x n + 1}. We can extend the map Φ to sets: Φ(S) = {Φ(x)|x ∈ S}. Given a binary image S, we associate to it the cubical complex Φ(S) -(see Fig. 70).

In the following, most of the objects we consider were indeed binary images which were then transposed into cubical complex framework: this is why most of the twodimensional complexes we show are pure 2-complexes, and most of the three-dimensional complexes we show are pure 3-complexes.

a) b)

Figure 70: From voxels to complex -In a, a discrete object made of voxels. In b, its transposition to the cubical complex framework through the application Φ.

H O M O T O P I C T H I N N I N G I N T H E C U B I C

A L C O M P L E X F R A M E W O R K
We propose in this chapter new parallel thinning algorithms in the cubical complex framework. One of the algorithm (see Sec. 6.2) allows to use digital topology framework tools (like the λ'-medial axis) in order to obtain a skeleton with good reconstruction properties (a skeleton containing visual information from the original object), in the cubical complex framework. In Sec. 6.3, we propose various thinning methods for obtaining skeletons with good reconstruction properties, and requiring no filtering parameter (no input from the user). We show that all these thinning methods produce a thin skeleton. Finally, in Sec. 6.4, we propose an algorithm for embedding skeletons of the cubical complex framework inside the digital topology (DT) framework, and we compare a wide range of thinning algorithms with our own thinning methods.

The work exposed in this chapter was partially presented during the IWCIA 2009 conference, held in Cancun (Mexico). A conference article, partially covering the work presented in this chapter, was published in [START_REF] Chaussard | Surface Thinning in 3D Cubical Complexes[END_REF]. 6.1 parallel directional thinning based on cubical complex Generally, the most "natural" method to thin an object consists of removing its border elements in parallel, in a symmetrical way. However, in general, removing at the same time two free pairs from a complex does not guarantee topology preservation (see Fig. 71a andb). In the 2d digital topology framework (pixels framework), A. Rosenfeld [Ros75] proposed a method for removing sets of simple points from an object without modifying its topology: this method consists of removing only simple points that have no neighbour in a given direction, and then change direction in order to scan all possible directions.

Knowing if this method can have an extension in 3D was pointed out by Kong, Litherland and Rosenfeld as an important problem in [START_REF] Kong | Problems in the topology of binary digital images[END_REF] (question 547) (direct application of such method in 3D fails in preserving topology). In [START_REF] Bertrand | On critical kernels[END_REF], Bertrand developed a new framework, the critical kernel framework, relying on the cubical complexes, to give a method on how to remove, in the DT framework, multiple simple points at the same time (this method extends to all dimensions, although computation problems appear after the 4th dimension). Using this framework, question 547 of [START_REF] Kong | Problems in the topology of binary digital images[END_REF] receives a first answer in [START_REF] Couprie | New characterizations of simple points, minimal non-simple sets and P-simple points in 2D, 3D and 4D discrete spaces[END_REF].

In the following, we show that the directional strategy can also be extended to 3d cubical complexes, and we propose new thinning algorithms allowing to obtain thin skeletons. The thinness of the skeletons we obtain will allow to easily analyse and decompose them (see Sec. 7.1).

removing free pairs in parallel

In the cubical complex framework, parallel removal of simple pairs can be easily achieved when following simple rules that we will give now. First, we need to define the direction and the orientation of a free face.

Let f ∈ F n , the center of f is the center of mass of the points in f, that is,

c f = 1 |f| a∈f a. The center of f is an element of [ Z 2 ]
n , where Z 2 denotes the set of half integers. Let X F n , let (f, g) be a free pair for X, and let c f and c g be the respective centers of the faces f and g. We denote by V(f, g) the vector (c fc g ) of [ Z 2 ] n . We define a surjective function Dir() : F n × F n → {0, . . . , n -1} such that, for all free pairs (f, g) and (i, j) for X, Dir(f, g) = Dir(i, j) if and only if V(f, g) and V(i, j) are collinear (we don't bother defining Dir() for non free pairs as it won't be useful in this case). The number Dir(f, g) is called the direction of the free pair (f, g). Let (f, g) be a free pair, the vector V(f, g) has only one non-null coordinate: the pair (f, g) has a positive orientation, and we write Orient(f, g) = 1, if the non-null coordinate of V(f, g) is positive; otherwise (f, g) has a negative orientation, and we write Orient(f, g) = 0. On Fig. 71, the free pair (a, c) and the free pair (d, e) have different directions; the free pairs (a, b) and (d, e) have the same direction, but opposite orientations. Now, we give a property of collapse which brings a necessary and sufficient condition for removing two free pairs of faces in parallel from a complex, while preserving topology (see Fig. 71c). Proposition 6.1.1 Let X F n , and let (f, g) and (k, ℓ) be two distinct free pairs for X. The complex X collapses onto X \ {f, g, k, ℓ} if and only if f = k.

Proof If f = k, then it is plain that (k, ℓ) is not a free pair for Y = X \ {f, g} as k = f / ∈ Y. Also, (f, g) is not free for X \ {k, ℓ}. If f = k, then we have g = ℓ, ǧ * ∩ X = {f} (g
is free for X) and ľ * ∩ X = {k} (ℓ is free for X). Thus, we have ľ * ∩ Y = {k} as ℓ = g and k = f. Therefore, (k, ℓ) is a free pair for Y.

From Prop. 6.1.1, the following corollary is immediate. Corollary 6.1.2 Let X F n , and let (f 1 , g 1 ) . . . (f m , g m ) be m distinct free pairs for X such that, for all a, b ∈ {1, . . . , m} (with a = b), f a = f b . The complex X collapses onto X \ {f 1 , g 1 . . . f m , g m }.

Considering two distinct free pairs (f, g) and (i, j) for X F n such that Dir(f, g) = Dir(i, j) and Orient(f, g) = Orient(i, j), we have f = i. From this observation and Cor. 6.1.2, we deduce the following property. Corollary 6.1.3 Let X F n , and let (f 1 , g 1 ) . . . (f m , g m ) be m distinct free pairs for X having all the same direction and the same orientation. The complex X collapses onto X \ {f 1 , g 1 . . . f m , g m }.

a directional parallel thinning algorithm

We say that a d-face of X is a border face if it contains a free (d -1)-face. Define CBorder(X) as the set of all border faces of X. We are now ready to introduce a directional parallel thinning algorithm (Alg. 27).

Intuitively, we want the algorithm to remove free faces "layer by layer": we don't want, after a single execution (ℓ = 1), to have unequal thinning of the input complex. Therefore, we want each execution of the algorithm to remove free faces located on the border of the input complex: this is why we introduce, on line 4 the set L, and that we remove only faces located in L on line 17. The sets E (line 12) and G (line 15) allows to remove whole sets of free faces in parallel from X, thanks to the direction and a)

Figure 72: One iteration of the ParDirCollapse algorithm -On a, the original complex, and on b, the border of the complex (the clear faces do not belong to the border): no face outside the border will be removed during the iteration of the ParDirCollapse algorithm. The face will be removed in the following direction/orientation: rightward, leftward, downward, upward. On c, all free pairs consisting of a square and an edge, and having a rightward direction/orientation, are represented with a clear colour, and removed on d. On e, all free pairs consisting of an edge and a vertex, and having a rightward direction/orientation, are represented with a clear colour, and removed on f. The rest of the steps of the algorithm are represented from g to l.

Algorithm 27: ParDirCollapse(X, W, ℓ) Data: A cubical complex X F n , a subcomplex W X which represents faces of X which should not be removed, and ℓ ∈ N, the number of layers of free faces which should be removed from X Result: A cubical complex Different definitions of the orientation and direction can be given, corresponding to different order of removal of free faces in the complex. These changes lead to different results, but arbitrary choices on the order of removal of free pairs must be made in order to obtain, at the end, a thin skeleton (no more n-faces when working in the n-dimension). Once orientation and direction have been defined, the results of the algorithm are uniquely defined.

E = {(f, g) free for X | g / ∈ W, 13 Dir(f, g) = t, Orient(f, g) = s, dim(f) = d}; 15 15 G = {(f, g) ∈ E | f ∈ L and g ∈ L};
Algorithm 27 may be easily implemented to run in linear time complexity (proportionally to the number of faces of the complex). Indeed, checking if a face is free or not may be easily done in constant time. Moreover, when a free pair (f, g) is removed from the input complex, it is sufficient to scan the faces of f and the cofaces of g in order to find new free faces, as other faces' status won't change (the implemented algorithm contains these optimizations).

As shown in Fig. 73, when the input complex has a nearly constant thickness, it is possible to obtain a surface skeleton of X by choosing a convenient value of ℓ as the last parameter of Alg. 27. However, in most cases, it is not possible to find a value of ℓ which is satisfying for the whole complex. In the next section, we explain how to use the directional thinning strategy to obtain a surface skeleton from a complex without having to tune any "thickness" parameter. 6.2 aspect preservation during thinning: a method based on medial axes

As said previouly, alg. 27 can perform satisfactory thinning in some cases. However, setting the wrong value as third parameter of the algorithm may result either in loss of information, or in a complex which still contains volumic parts. If that parameter is set to infinity, the algorithm performs an ultimate thinning of the input: free faces are removed until no more can be found. If one wants to obtain a skeleton which keeps some "visual features" from the input, other strategies must be used. In order to obtain a satisfactory skeleton, which contains interesting visual information from the original object without containing "spurious" parts, it is usually necessary to use a filtering step, during or after the thinning, in order to remove unwanted "extra parts" from the skeleton. This step is usually difficult, as the skeleton is very sensitive to small contour perturbation. A recent survey [START_REF] Attali | Stability and computation of the medial axis -a state-of-the-art report[END_REF] summarizes recent studies dedicated to this matter in the digital topology (DT) framework. In the following, we propose various methods for obtaining a filtered skeleton in the cubical complex.

criterion for dynamic anchor detection

We will, in the following, propose two strategies for obtaining a skeleton which retains visual information from the original object, each involving the use of Alg. 27. These two methods have drawbacks, but will allow to point out the difficulty of the skeleton filtering task.

Both algorithms proposed hereafter are based on the same principle: a single layer of faces is removed using Alg. 27, then all facets of a given dimension are detected and kept safe from any future removal. This process is repeated until stability.

On Fig. 74, we present various steps of Alg. 28 running on Fig. 72a. Figure 76a shows the result of CollapseFacet(X, ∅), where X is the tube shown in Fig. 73a. The resulting complex is a 2-complex containing some "branches" and "surface patches" (as shown on the detailed view) which do not represent significant "surfacic features" of the original complex, containing important "shape information" from the initial object. However, even if Alg. 29 produces better results than Alg. 28, it fails in obtaining a completely satisfactory skeleton. In the next section, we will see how to perform better filtering with two different methods.

Proposition 6.2.1 Let X be an n-complex, the results of CollapseIsthmus(X, ∅) and Colla-pseFacet(X, ∅) do not contain any n-face (the results are thin).

Following Prop. 5.2.4, proposition 6.2.1 is straightforward: any n-face would become free after some iteration of the loop of the algorithms, and the only elements added to the inhibitor set are faces not included in any n-face. The results of Alg. 28 and Alg. 29 are thin in 3d (they do not contain any 3-face), provided that the input parameter W is set to ∅. However, thanks to parameter W, it is possible to constrain these algorithms to preserve selected parts of the original object, in addition to the surface parts that are automatically detected.

using medial axes: an application with dl'ma

In the following, we will see how filtering tools from the DT framework can be directly used in the cubical complex framework in order to obtain a filtered skeleton.

Let S denote our original binary set, a finite subset of Z n , and let T be a subset of S. Typically, the set T would have been computed from S, and should contain interesting visual information of S (for example, T could be the discrete λ ′ -medial axis of S thresholded at a given value). In this part, the function Φ, introduced in Sec.5.2.3, which allows to embed a subset of Z n into F n .

Here is a description of the methodology to follow in order to obtain, from a binary set S ⊂ Z n , a "thin" skeleton in the cubical complex framework. First, a subset T of S representing the important visual features of S which should be kept, must be computed. For example, T could be the discrete λ ′ -medial axis of S for a chosen value of λ. From here, we will consider the complexes X = Φ(S) and W = Φ(DL ′ MA(S, λ)).

The step consists of computing, using Alg. 27, the complex Y = ParDirCollapse(X, W, +∞) that contains W and that is topologically equivalent to X. Now, if X is an n-complex, then W is also an n-complex (see, in 3d, the close-up of Fig. 76c). Therefore, Y is also an n-complex; in order to obtain a "thin" result (an (n -1)-complex), we set Z = CollapseIsthmus(Y, ∅) which is both thin (following Prop. 5.2.4 there is no n-face in this complex) and topologically equivalent to X. See the close-up of Fig. 76d for an illustration.

The centering of Z in X is achieved thanks to the use of the DL'MA, based on the Euclidean distance. The parameter λ can be tuned in order to adjust the filtering of the characteristics (size, smoothness of contours . . .) of the input shape, and to the requirements of the user.

As previously said, the user may use any subset of S rather than the DL'MA in order to filter the interesting visual features in the first step. Algorithm 30 sumarizes the previous description. Figures 76d and 77 show various results using algorithm 30 and the DL'MA. It can be seen that the resulting 2-complexes indeed capture the main surfacic features of the original objects, without spurious branches or surface patches. A significant advantage of the 2D nature of the obtained skeletons, is to enable an easy analysis of important shape features such as intersections of surface parts.

d) ParDirCollapse(X, ∅, 3) e) ParDirCollapse(X, ∅, 4) f) ParDirCollapse(X, ∅ , 5)
Figure 78: Computing the lifespan of a face -Let e be the edge of the complex X, pointed out by a red arrow on a. Two iterations of ParDirCollapse algorithm are necessary before e becomes a facet, as depicted on c. Therefore, Birth X (e) = 2. Five iterations of ParDirCollapse algorithm are necessary for removing e from the complex, as depicted in f. Therefore, Death X (e) = 5. We have Lifespan X (e) = 3.

The lifespan is a good indicator of how important a face can be in an object. Typically, higher the lifespan is, and more representative of an object's visual feature the face is. The lifespan, also called saliency, was used in [START_REF] Lui | A simple and robust thinning algorithm on cell complexes[END_REF] (under the name "medial persistence") in order to propose a thinning algorithm in cubical complexes based on two parameters.

distance map and opening function

In addition to the lifespan of a face, the proposed homotopic thinning method will use information on distance between faces in order to decide if a face should be kept safe from deletion. We define hereafter the various notions needed for this, based on distance in the DT framework.

Two points x, y ∈ Z n are 1-neighbours if the Euclidean distance between x and y is equal or inferior to 1 (also called direct neighbours). A 1-path from x to y is a sequence C = (z 0 , ..., z k ) of points of Z n such that z 0 = x, z k = y, and for all j ∈ [1; k], z j and z j-1 are 1-neighbours. The length of C is k.

We set d 1 (x, y) as the length of the shortest 1-path from x to y. Let S ⊂ Z n , we set d 1 (x, S) = min y∈S d 1 (x, y). The 1-ball of radius r centered on x is the set B 1 r (x) = {y ∈ Z n |d 1 (x, y) < r}. Remark that d 1 is indeed the so-called 4-distance in the 2d DT and a more efficient implementation (linear in time depending on the image's size) is discussed in the appendix (see Sec. 9.2.5, p. 209).

Algorithm 32: Opening(X) Data: A set X ⊂ Z n Result: The 1-distance opening function of X, that is, for all x ∈ X, ω 1 (x, X) In order to extend d 1 and ω 1 to the cubical complex framework, let us introduce the map Φ -1 , inverse of the bijective map Φ defined in Sec. 5.2.3. It is used to project any n-face of F n into Z n . We indifferently use Φ -1 as a map from F n n to Z n , and as a map from

1 for all x ∈ X do 2 ω 1 (x) = -1 3 end 4 for all x ∈ X do 5 for all y ∈ B1 X (x) do 6 if ω 1 (y) < d 1 (x, X) then 7 ω 1 (y) = d 1 (x, X)
P(F n n ) to P(Z n ). Given X F n , we set X v = Φ -1 (X ∩ F n n ): the set X v is a subset of Z n .
We define the map D1 (X) : F n → N as an extension of d 1 to the cubical complex framework: for all

f ∈ F n , D1 (X)(f) =    d 1 (Φ -1 (f), X v ) if f is an n-face max g∈ f * D1 (X)(g) else
The same way, we define Ω1 (X) : F n → N as an extension of ω 1 to the cubical complex framework.

parameter-free thinning based on the lifespan, opening function and decenterness

Thanks to these notions, we can now define sets of faces that will help preserve the visual aspect of an object during thinning. First, let us define the decenterness of a complex as the map Decenter(X) = Ω1 (X) -D1 (X). For each face of a complex X, the decenterness value of this face gives an information on how well a face is centered inside a visual feature of the object: the lower this value is, the better centered the face is. On Fig. 79, we give an example of the decenterness map of a shape, where the highest values are represented by the darkest colours. Faces relevant of the visual aspect of a complex must have a high lifespan ("survive" long to the homotopic thinning process) and a low decenterness (is centered in the object). In a 3-dimensional complex (resp. a 2-dimensional complex), squares (resp. lines) whose lifespan is higher than the decenterness will be chosen as relevant of the surfacic (resp. curvilinear) parts of the complex. Definition 6.3.4 Given X F n , the k-LC axis (stands for "Lifespan Centerness") of X is the set

LC k (X) = {f ∈ X | dim(f) = k and Lifespan X (f) > Decenter(X)(f)} -.
The LC-axis fails in selecting a good set of curves relevant of the curvilinear parts of a three-dimensional complex. Indeed, given a 3-complex X, the set LC 1 (X) contains generally too many curves. This happens because the algorithm ParDirCollapse "takes more time" to eliminate lines than to eliminate squares in a 3-complex. Consequently, lines of a 3-complex tend to have a high lifespan even though they are not representative of any curvilinear part of the complex. The thicker is the input object, and the more important is the phenomenon.

Lines relevant of the curvilinear parts of a 3-complex have a high lifespan and a low decenterness, especially in the thick parts of the complex. Lines whose lifespan is higher than the decenterness added to the local thickness of the complex will be relevant of the curvilinear parts of the complex. Definition 6.3.5 Given X F n , the k-LOC axis (stands for "Lifespan Opening Centerness") of X is the set

LOC k (X) = {f ∈ X | dim(f) = k and Lifespan X (f) > Ω1 (X)(f) + Decenter(X)(f)} -.
The various sets previously defined represent faces which should be kept safe from deletion during homotopic thinning of a complex in order to obtain a pruned skeleton containing visual features from the original object. The set LC 1 of a 2-complex represents curvilinear parts to keep in this complex, the set LOC 1 of a 3-complex represents curvilinear parts to keep in this complex, and the set LC 2 of a 3-complex represents surfacic parts to keep in this complex. Lemma 6.3.6 Given X F n , for every k < n, LC k (X) ⊆ CollapseFacet(X, ∅) and LOC k (X) ⊆ CollapseFacet(X, ∅). Lemma 6.3.6 is straightforward once observed that CollapseFacet(X, ∅) is indeed the set of k-faces of X (k < n) which have a strictly positive lifespan in X. Based on these sets, we propose three algorithms: one for computing a 1d skeleton from a bidimensional complex, one for computing a 2d skeleton (which can contain 1d parts) from a three-dimensional complex, and one for computing a curvilinear skeletons from a three-dimensional complex. This last algorithm should produce one-dimensional results (a set of lines) however, the output can be a two-dimensional complex.

Algorithm 33: 1DSkeleton(X)

Data: A cubical complex X F 2 Result: A cubical complex Y F 2 such that dim Y 1
On the objects of our test collection, algorithm 35 always gave a curvilinear output. When the input is a curvilinear object, the output skeleton is a curvilinear object describing well the shape of the original object. On surfacic parts, the skeleton produced by Alg. 35 may contain spurious branches. It is possible, for the three algorithms, to propose a version with a filtering parameter. This is also discussed in the appendix (see Sec. 9.2.4, p. 208) and in the general conclusion.

erosion on the borders

As it is the case for most thinning methods, our algorithm produces an "eroded" output, which means that the skeleton does not "stick" to the borders of the original complex. Although a methodology for completely reducing this erosion phenomenon is under investigation, we can already propose a general method for reducing the erosion around the object's holes.

On Fig. 82a, we show a surfacic object X with holes. On Fig. 82b, we show the results of Alg. 34 applied to X: the skeleton S does not stick to the original borders of X. In order to "glue back" the skeleton to the borders of the holes of X, it is possible to fill these holes with a hole-filling algorithm (see [START_REF] Janaszewski | Hole filling in 3D volumetric objects[END_REF] for example), thus obtaining the complex X ′ , and compute the skeleton W of X ′ with Alg. 34. Then, we compute the skeleton of X with Alg. 27, using the set W as an inhibitor set. The result is shown on Fig. 82c.

evaluating thinning algorithms performances

As we did for the lambda-medial axis in section 4.4, we compare our parallel parameterfree thinning methods with other parallel thinning methods, in 2d and 3d frameworks. [Hil83]), but they either focus on implementation or referencing specific properties of thinning algorithms (symmetric, asymmetric, etc). We propose hereafter a comparison based on the stability to rotation and to noise (the detailed methodology was previously described in Sec. 4.4), and also based on the visual results of algorithms. We point out the fact that the noise added to the object preserves the topology of the input (and can bring strong contour deformation) while the rotation algorithm does not necessarily preserve the topology (and contour deformation remains limited).

As we explain in the following, another criteria than stability must be taken into account when comparing thinning algorithms.

no common ground between algorithms

In section 4.4, various medial axes were tested and evaluated following this method: a filtering parameter was chosen in order for medial axes to give same residual, and then, stability to noise and rotation was tested. The major difference between parameter-free thinning algorithms and medial axes is the filtering criterion: when testing medial axes, a "common ground" can be built by choosing a filtering criterion giving the same residual when trying to rebuild the original object from one of its medial axis using the reverse Euclidean distance transform.

Parameter-free thinning algorithms do not have any filtering criterion, therefore, it is impossible to decide to compare them based on the residual they give when trying to rebuild the original object, as this residual is fixed for each algorithm (no parameter can be tuned in order to change the residual).

The lack of common ground between algorithms will give an advantage, in our evaluation tests, to algorithms producing "noisy" skeletons, with many spurious branches and surfaces. Indeed, our tests (noise and rotation) both consists in producing small perturbations of the object's border and measuring the effect on the skeleton.

A common idea is that a skeleton which does not change much under object's perturbations is a good skeleton. However, this assertion can be debated. Indeed, consider the example shown on figure 83. Two skeletons are shown on the left column: one with many spurious branches (on top), and one with less spurious elements (on the bottom). The second one may be commonly thought as better, as it still keeps important information about the original shape, while containing less points. Adding noise to the object's border have an effect on both skeletons, and, as in section 4.4, we measure this effect using a dissimilarity measure.

Results show that the "noisy" skeleton (top row of Fig. 83) changed less after the noise addition than the other skeleton, which was thought to be better. Indeed, the noise added on the object's border has an impact on the skeleton, but the measure of this impact is "diluted" into the existing noise of the skeleton (new branches does not represent an important change of the original skeleton). On the other hand, the impact of the noise on the filtered skeleton is greater. In order to have a fair evaluation of the skeletonization algorithms, we need to take into account, in addition to the stability to noise and rotation, the visual aspect of the skeleton. The original shape and its skeleton (in black) computed with the algorithm presented in [START_REF] Rutovitz | Pattern Recognition[END_REF]. b) The same shape with noise added to its boundary, and its skeleton (in black) computed with the algorithm presented in [START_REF] Rutovitz | Pattern Recognition[END_REF]. The dissimilarity between the two skeletons is approximately equal to 20. c) The original shape and its skeleton (in black) computed with the algorithm presented in [START_REF] Rosenfeld | A characterization of parallel thinning algorithms[END_REF]. d) The same shape with noise added to its boundary, and its skeleton (in black) computed with the algorithm presented in [START_REF] Rosenfeld | A characterization of parallel thinning algorithms[END_REF]. The dissimilarity between the two skeletons is approximately equal to 40.

evaluating visual aspect of skeletons

When evaluating the visual aspect of a skeleton, noisy skeletons must have a bad grade compared to filtered skeletons. Therefore, the evaluation should definitely give a score to each skeletons based on the number of points of the skeleton (lower being better). On the other hand, skeletons which do not carry enough visual information about the original object (because of a too high filtering like, for example, ultimate skeletons) should be penalised. Our evaluation should therefore take into account some information about the quality of the reconstruction of the original object from its skeleton using the reverse Euclidean distance (the higher the better).

quality of the reconstruction

The quality of the reconstruction is evaluated by counting, when reconstructing the original object from its skeleton, the number of missed points situated on the border of the original object. Given a binary object X ⊂ Z n and S ⊆ X, the normalized missed reconstructed border of S in X is

R B S X =
|Border(X)\Border(REDT X (S))| |Border(X)| We remind the reader that the reverse Euclidean distance transform (REDT), defined in section 4.4, allows to know how much information of X can be retrieved from S. The result R B S X is a real value between 0 (perfect reconstruction) and 1 (bad reconstruction).

size of the skeleton

The size of the skeleton can be easily computed by counting the number of points of the skeleton. In order to normalize this quantity, we must take into account a "reference" skeleton. In the digital topology framework, a skeleton constrained to contain all the centers of maximal balls will achieve a perfect reconstruction: we choose the skeleton obtained with the Euclidean distance transform as a priority function and the Euclidean medial axis as inhibitor set, as a reference skeleton.

Let X be a subset of Z n and S ⊆ X, the normalized skeleton size of S in X is

C S X = |S| |CenteredMedialSkeleton(X)|

visual quality factor of a skeleton

Given a subset X of Z n , and a subset S of X (S should be a skeleton), the visual quality factor of S in X is

VQF X (S) = C S X 2 + R B S X 2
The lower the visual quality factor of a skeleton is, the better. In order to test the robustness of this evaluation factor, we test it with the Euclidean medial axis, and the lambda' medial axis. Given a subset X of Z 2 or Z 3 , we compute EMA(X, ρ) (the Euclidean medial axis of X thresholded at the value ρ) and we then compute VQF X (EuclideanSkeleton(X, EMA(X, ρ))), for various ρ. On Fig. 84, we show, for a given shape, how the visual quality factor of the skeleton evolves with the filtering parameter ρ. In Fig. 85, we give the results of 3d skeletons constrained to contain the Euclidean medial axis achieving the best visual quality factor. In most cases, the skeleton misses important parts of the shape: this is mainly due to the fact that filtering the Euclidean medial axis usually requires to choose between spurious elements or weak reconstruction.

The same process repeated with the DL'MA, instead of the EMA, fares better results. From Fig 58 p. 113, up to Fig. 63 p. 118, each skeleton at position c was obtained with the DL'MA achieving the best visual quality factor for the shape.

In the following, we use the visual quality factor as a criteria for evaluating how visually good is the result produced by a thinning technique.

results of evaluation

general evaluation methodology

In the following, we compare robustness to noise and rotation of various 2d and 3d parameter-free thinning algorithms. Our algorithms operate in the cubical complexes framework, while the other algorithms operate in the digital topology framework. In order to obtain a fair comparison between algorithms, we need to embed the results of our thinning algorithms into the DT framework. Algorithm 36 embeds a cubical complex S X into Z n . Typically, the input X F n is a pure n-complex and S is a collapse of X such that dim(S) = (n -1). Algorithm 36 scans each face f of S, and tries to find the last n-face of S which contained f during the collapse sequence: this face is added to a set R if there does not already exist a face in R which contains f. The set R is a set of n-face which can be embedded in the DT framework thanks to the Φ -1 application (see Sec. 6.3.2).

Algorithms 37, 38 and 39 allows to use previously defined thinning algorithms in the cubical complex framework in order to obtain "thin" subsets of Z 2 and Z 3 . In order to do so, a subset X of Z 2 or Z 3 is embedded in the cubical complex framework using the Φ application, resulting in a pure 2 or 3-complex Φ(X). This complex is thinned using one of the thinning algorithm previously defined, and the resulting skeleton is embedded in the DT framework using Alg. 36. The result W is not necessarily homotopic to the initial object X: a last thinning step of X constrained to contain W must take place in order to obtain a skeleton of X as output.

Thanks to these algorithms, the results produced by thinning algorithms working on voxel objects and the results produced by thinning algorithms working on cubical complexes can be fairly compared. Results of 3d thinning based on these algorithms can be seen on Fig. 95, 96 and 100, at the end of this chapter.

results in 2d

We compare our 2d thinning algorithm (see Alg. 37), with other 2d parallel thinning algorithms. The comparison covers stability properties to noise, to rotation, and visual quality. Visual examples of the behaviour of each tested thinning algorithm to noise addition and rotation is shown on Fig. 92 and 93, at the end of this chapter. The results are summarised in table 5 p. 155, as well as in Fig. 86 and 87. The algorithm "Euclidean medial axis" is the homotopic thinning guided by the Euclidean distance the difference between noise and visual features of the object. Some spurious branches appear on our skeleton, and stability drops. This matter is discussed in the general conclusion.

Even if our algorithm does not score the best visual quality factor (the best visual quality is reached by [START_REF] Jang | One-Pass Parallel Thinning: Analysis, Properties, and Quantitative Evaluation[END_REF]), it does produce visually good results (it ranks third based on the visual quality factor). Indeed, our algorithm has a little low visual quality factor because it tends to produce skeletons with little low reconstruction capacities, and with few points. Thanks to this, our 2d thinning algorithm has globally the best stability to noise (as long as the deformation is not too high) and rotation, and produces visually satisfying skeletons.

Rotation

Noise homotopic thinning guided by the Euclidean distance map and retaining all elements of the Euclidean medial axis. The visual quality factor is computed only on the original images (not on the deformed images).

Although the Euclidean medial axis fares good results on some points, it can be ignored: its good performances are explained by its bad visual quality factor (as detailed in Sec. 6.4.1). Among the algorithms with good visual quality factor (with visual quality factor inferior to 1, therefore producing filtered skeleton), our algorithm fares the best results, in average, for rotation stability and noise stability. We point out the fact that our thinning method is outperformed by [START_REF] Palágyi | A 3-subiteration 3D thinning algorithm for extracting medial surfaces[END_REF] and [START_REF] Bertrand | A new 3D parallel thinning scheme based on critical kernels[END_REF] (SK3) for noise stability measured with Hausdorff distance: this can be explained by the fact that our algorithm produces filtered skeleton, with less points than other skeletons, and the apparition of spurious branches when noise level is high gives bad results on noise stability measured with the Hausdorff distance.

Our thinning method does not have the best score for visual quality factor: this is explained by the fact that our method produces highly filtered skeleton, with lower reconstruction capacity than other algorithms. However, as shown on Fig. 94, it gives the most "understandable" skeleton, even when the noise level increases. Our algorithm produces visually good skeletons, and has, among algorithms producing filtered skeletons (visual quality factor inferior to one), the best average stability to noise and rotations.

Rotation

Noise

results in 3d: curvilinear skeletons

The visual quality factor is not relevant in this case Evaluation of curvilinear skeletons in 3d is more difficult. Performing a curvilinear skeletonization on a curvilinear shape makes sense, and the evaluation methodology used previously holds. However, a curvilinear skeletonization on a general shape which contains surfacic parts can have two goals: either the skeleton should allow a good reconstruction of the initial object (and should therefore contain spurious branches in the surfacic parts) or it should remain as simple as possible and contain few spurious branches (specifically in the surfacic parts).

The visual quality factor is built around a "reference point" which is the result of the skeletonization constrained to contain all points of the medial axis; indeed, the number of points and the reconstruction capacity of the tested skeletons are normalized depending on the results of this particular skeleton (this skeleton achieves total reconstruction of the border). However, this skeleton is generally a surface skeleton when the input shape contains surfacic parts, and using a surface skeleton as "reference point" for comparing curvilinear skeletons does not make sense. Doing so will give advantage to spurious curvilinear skeletons (who, even though they have lots of points, have much less points than a surface skeleton, and propose a fair reconstruction) over filtered skeletons (little points, but bad reconstruction of surfacic parts).

For this reason, we don't use the visual quality factor in this evaluation: instead, we show, for each skeletons, the reconstruction capacity and the number of points of the skeleton (with no normalization).

Results

We compare our 3d thinning algorithm (see Alg. 39), with other 3d curvilinear parallel thinning algorithms. The comparison covers stability properties to noise, to rotation, and visual quality (reconstruction capacity and number of points of the skeleton). Visual examples of the behaviour of each tested thinning algorithm to noise addition is shown on Fig. 94, at the end of this chapter. The results are summarised in table 7 p. 160, as well as in Fig. 90 and91.

In average, the best stability results are achieved by [BC] (CK3). However, the number of points of the skeleton is, in average, far superior to other skeletons: as shown on Fig. 94, this algorithm produces skeletons with many spurious branches (therefore achieving a good reconstruction), which explains this stability to noise and rotation (see Sec. 6.4.1). If we ignore this algorithm, the second best results are achieved, in average, by our thinning: lowest number of points in the skeleton (while keeping a correct reconstruction capacity, given the fact that it is a curvilinear thinning algorithm), best stability to noise, and first/second best algorithm for rotation stability (outperformed by [START_REF] Palágyi | Quantitative analysis of pulmonary airway tree structure[END_REF] for rotation stability measured with the Dubuisson dissimilarity).

Our algorithm produces visually good results (as can be seen on Fig. 94), and is very stable to noise and rotation. We should also point out the algorithm of [BC] (ACK3A), which is very stable as long as the border deformation is not too important, and produces also visually good results, with few spurious branches. Hausdorff distance between R θ (A(X)) and A(R θ (X)), with θ varying from 0 to 90 degrees. Columns 4 and 5 present the average Dubuisson and Hausdorff distance between A(X) and A(E(X, n)), with n varying from 0 to 10 percent of the shape's volume. Column 6 present gives the average size of the output skeleton, and column 7 gives the normalized missed reconstructed border of A(X) in X.

Rotation

conclusion

We showed in this chapter how cubical complexes could be used for performing homotopic thinning. We proposed a parallel thinning algorithm, and showed how to use the medial axes (of the DT framework) in order to propose, in the cubical complex framework, skeletons yielding good reconstruction properties (containing visual information of the original shape).

We then proposed three parameter-free thinning algorithms for obtaining, in the cubical complex framework, skeletons which preserve the visual aspect of the input shape. Thanks to a general methodology allowing to embed a cubical complex in the voxel space, we were able to transpose our algorithms to the DT framework. Finally, we compared our algorithms to other thinning algorithms, and concluded that, in general, our algorithms provide the best stability/visual quality ratio from all the other skeletons.

Noise 0%

Noise 1% Noise 2% Noise 3%

Original shape Figure 102: Elephant -Homotopic thinning of a statue representing an elephant. On the left, the original image (already presented before). In the middle, the result of SurfaceSkeleton algorithm (with the border of the original image superimposed). On the right, the result of CurvilinearSKeleton algorithm (with the border of the original image superimposed). The colours of the skeleton were obtained using the decomposition algorithm presented in Sec. 7.1.2.

D E C O M P O S I T I O N O F T H E S K E L E T O N I N T O B A S I C C O M P O N E N T S

In this chapter, we explain how a skeleton, in the cubical complex framework, can be decomposed into basic parts, and at the same time, we show that the choice of the cubical complex framework was good in order to obtain sound decomposition of a skeleton.

In Sec. 7.1, we explain how simple can the decomposition of a skeleton be done in this framework. Then, in Sec. 7.2, we study more closely how to characterize intersection between components, and we give a nice property that edges labelled as intersections between surfaces have in 3d. Finally, in Sec. 7.3, we show that the decomposition into components can have disappointing results, and we propose to use the thinning operation in order to enhance them. In 3d, a skeleton should be a bidimensional object, made of curves, surfaces, and junctions (junction between curves, between surfaces, between curves and surfaces, ...). Thanks to the use of cubical complexes and of our thinning algorithm, we have the guarantee that the results of algorithms 34 and 35 are bidimensional, and the results of algorithm 33 are one-dimensional.

7.1 characterizing simple components in the cubical complex framework 7.1.1 some definitions Regular neighbours is an important notion for understanding simple components in the cubical complex framework:

Definition 7.1.1 Given X F n and two k-faces f and g ∈ X + . The two faces f and g are regular neighbours in X if there exists a (k -1)-face e such that ( f ∩ ĝ) = ê and ě * ∩ X = {f, g}.

A face e ∈ X is a non-regular face of X if there exists f and g ∈ X + such that f and g are not regular neighbours in X and ( f ∩ ĝ) = ê.

In the three-dimensional cubical complex framework, two squares are regular neighbours in a complex X if they are facets of X and if they share an edge that is contained in only two squares (see Fig. 103); two edges are regular neighbours in X if they are facets of X and if they share a vertex that is contained in only two edges.

A non-regular face of dimension k is either contained in three or more facets of dimension (k + 1), either contained in two or more facets of various dimension, or either contained in two or more faces of dimension (k + 2) or more. For example, in Fig. 103b, the edge shared by the three squares is a non-regular face. Still in the three-dimensional cubical complex framework, the vertex located at the intersection between a square and an edge, both being facets of a complex, is a non-regular face. A vertex located at the intersection of two squares which do not share an edge is also a non-regular face. We now define connected components of a set of faces:

Definition 7.1.2 Given a set of faces X, a set S ⊆ X is a connected component of X if

• for all f, g ∈ S + , there exists a sequence (h 1 , ..., h i ) of faces of S such that f = h 1 , g = h i , and for each j ∈ [1; i -1], (h j ⊆ h j+1 ) or (h j+1 ⊆ h j ).

• The set S is maximal in the sense of the inclusion: there exists no sets S ′ ⊆ X such that S ′ possesses the previous property and strictly contains S. Definition 7.2.3 Let X F n and let P = {e ∈ X|e is a pinch face for X}. Let C be a connected component of (X ∩ \P -): the subcomplex C -is an intersection between simple components of X.

Thanks to pinch faces, we have the following property on intersections:

Proposition 7.2.4 Let X F n and let C be an intersection between simple components of X.

For every face f, g ∈ C + , if f belongs to a simple component S of X, then g belongs also to S.

Proof This property is a natural consequence of the use of pinch faces in Def. 7.2.3. The faces f and g being in the same intersection, there exists a sequence (e 1 , ..., e i ) of facets of C such that e 1 = f, e i = g and, for each j ∈ [1, i -1], e j and e j+1 are regular neighbours in X ∩ : for each j ∈ [1, i -1], h j = (e j ∩ e j+1 ) is such that dim(h j ) = dim(e j ) -1 and h j is not a pinch face. Therefore, for each j ∈ [1, i -1] and for all facet of X in ěj belonging to a simple component S, there exists a facet of X in ěj+1 belonging to S. In conclusion, for all facet of X in f belonging to a simple component S, there exists a facet of X in ǧ belonging to S.

In the three-dimensional framework, given a cubical complex X, some simple components S 1 , ..., S i of X (being, for example, surfaces), and an intersection C (being, for example, a curve) such that one facet of C is an intersection between S 1 , ..., S k , property 7.2.4 states that all faces of C are intersections between S 1 , ..., S k . On Fig. 104, the intersection edges (in red) form a curve : the pinch face (in green) marks the delimitation between the intersection of the purple and blue surfaces, and the intersection of the orange and blue face.

intersections in the 2d and 3d cubical complexes frameworks

In the following, we characterize more precisely all faces of an (n -1)-complex in an n-dimensional cubical complex framework (as would be a skeleton computed with the thinning methodologies previously proposed), with n = 2 or n = 3.

In the two-dimensional cubical complex framework, the decomposition of a 1dimensional complex X results in a set of curves and isolated vertices. Any edge of X is part of a curve of X, and the characterization of intersection faces is straightforward: Proposition 7.2.5 Let X F 2 be such that dim(X) = 1, the intersection faces of X are the vertices of X which are contained in three edges of X or more.

Label of the

0-face f ∈ X Value of | f * ∩ X| Isolated = 0 Border of a curve = 1 Interior of a curve = 2 Curves intersection > 2 Table 8: Labels of a 0-face f of a one-dimensional complex X F 2 . Label of the 1-face f ∈ X Value of | f * ∩ X| Part of a curve = 0 Border of a surface = 1 Interior of a surface = 2 Surfaces intersection > 2
Table 9: Labels of a 1-face f of a bi-dimensional complex X F 3 .

Table 8 gives an overview of all possible configurations that a vertex of a 1-complex can have in 2d.

In the three-dimensional cubical complex framework, the decomposition of a 2dimensional complex X results in a set of surfaces, curves and isolated vertices. Any square of X is part of a surface of X, and the characterization of intersection edges is straightforward: Proposition 7.2.6 Let X F 3 be such that dim(X) = 2, an edge of X is an intersection face of X if it is contained in three squares of X or more.

Classifying a vertex of a 2-complex still requires to study the decomposition into simple components of its star. Tables 9 and10 give an overview of all possible configurations that an edge and a vertex of a 2-complex can have in 3d.

results and enhancements of the decomposition

In the cubical complexes framework, the decomposition of a skeleton have sound properties: a skeleton is a thin complex (typically, in 3d, a skeleton contains no volumes), and intersections between simple components have the same properties than in the continuous framework (intersections between surfaces is a set of curves or points, and intersections between curves is a point).

simple components in the output skeleton must be balanced with the capacity of the skeleton to retain important visual information.

The apparition of small simple components in the skeleton, as depicted on Fig. 105, cannot be solved by adopting a global strategy of minimizing the number of simple components in the result during thinning. A local strategy, adopted during thinning, could exist in order to reduce this phenomenon, however, we did not find a solution in order to completely avoid these simple components. Indeed, this phenomenon mainly takes place around intersections between simple components, and we came across a strategy that seems to be producing interesting results. This strategy consists of performing a thinning of an object in order to locate the intersection faces, and then perform a second thinning of the same object which won't delete any face around the intersections previously located. Then, faces around the intersections are removed by testing locally all possible removal order and keeping the one which produces the less simple components in the result. This strategy seems to minimize the number of "small avoidable simple components" in the skeleton.

division of simple components into simple sub-components

On Fig. 108, we show an image depicting cracks inside concrete. Using our algorithm, we thin these cracks and decompose them into simple components. The results of the decomposition show that, in some cases in 3d, two different surfaces (visually different as they possess different orientation in space) may be joined by a "narrow bridge of squares" and be therefore identified as the same surface component. In order to avoid this phenomenon to happen, it is necessary to "destroy the bridge" before performing the decomposition into simple components of the skeleton.

We identified two different types of "bridges": real bridges, surrounded by the void (as shown on Fig. 106a), and connecting two surfaces, and bridges located near surface intersections (as shown on Fig. 107a). More thinning on the object would remove the first category of bridge (see Fig. 106c), while the second category of bridge would simply be shifted. Moreover, additional thinning removes more information from the skeleton, and we prefer avoid loosing information from the skeletons.

We propose with the following strategy in order to "ignore" the second category of bridges (see Alg. 42): once the skeleton S of the original object X has been computed, it is thinned again (the amount of thinning is decided by the user) in order to remove the first category of bridges and shift the second category (see Alg. 42, l. 2). The result of this second thinning is the skeleton S ′ see, (see, for example, Fig. 107d).

The skeleton S ′ is then decomposed into simple components (see Alg. 42, l. 4), using the set S ∩ as the set of "forbidden faces" that should not join faces of a same simple component (the set W of Alg. 40): this way, the second group of bridges connecting the surfaces, which were shifted inside the surface, cannot be used any more to propagate the label (see, for example, Fig. 107e). The labels of the squares of S ′ are then directly applied on the squares of S. Some squares of S still miss a label (the squares on the bridges destroyed by the "over collapse"): the labels of the squares of S are propagated in parallel on the whole skeleton (see, for example, Fig. 107f), so that all squares of S possess a label (see Alg. 42, l. 10). The final result is a decomposition of the skeleton into simple sub-components, that is a partition of a simple component S into pure subcomplexes of S, having the same dimension than S.

Results of this method are shown on Fig. 106, 107, and 108.

conclusion

In this chapter, we showed that cubical complexes have nice properties, bringing sound decomposition of skeletons into simple components. In this framework, we find many properties of the continuous framework (such as, the intersection between surfaces is a curve), and thanks to this, we can efficiently decompose a skeleton into basic parts. We also closely studied intersections between simple components and, thanks to pinch faces, we have nice properties, in 3d, of intersections between surfaces. We showed some examples where the decomposition did not match our expectations, and we proposed an algorithm based on more thinning in order to produce better results (see Alg. 42). The decomposition can also be used as a filtering criterion, in order to remove "spurious" simple components from a skeleton (see Fig. 108c). The cubical complexes reveals to be a very rich framework, giving nice properties for thinning (see previous chapter , we obtain a skeleton whose decomposition gives two large surfaces, and other small simple components. c) We remove small components from the skeleton (and use homotopic thinning to make sure we still have a skeleton). d) Using OverCollapseLabel (a parameter must be specified by the user), the decomposition gives five "sub-surfaces" (even though the three surfaces in green looks like they have the same color, it is not exactly the same green).

Figure 109: Metallic foam -Processing image of metallic foam. On the left, a slice of the original image. In the middle, using various segmentation method (including watershed), a 3d object is extracted (here, we only show a slice of the whole object). On the right, after thinning the object, we decompose the skeleton into simple components.

Figure 110: Lungs -Processing image of the bronchial tree. This work was realised in partnership with the Technical University of Lodz (Poland). On the left, the bronchial tree is segmented using techniques explained in [START_REF] Fabijaå Ďska | Airway Tree Segmentation from CT Scans Using Gradient-Guided 3D Region Growing[END_REF]. In the middle, using CurvilinearSkeleton algorithm, we obtain a curvilinear skeleton of the tree, that we then decompose into curves. On the right, a close-up on the decomposition of the skeleton.

Figure 111: Cerebral blood vessels -Processing image of blood vessels situated in the brain. This work was realised in partnership with the LSIIT laboratory in the Strasbourg University (France), and the Centre de Morphologie Mathématiques de l'Ecole des Mines-Paritech (France). On the left, some slices from the original image. In the middle, the vascular network is extracted using techniques published in [START_REF] Tankyevych | Direction-adaptive grey-level morphology. application to 3D vascular brain imaging[END_REF]. On the right, using CurvilinearSkeleton algorithm, we obtain a curvilinear skeleton of the blood vessels structure, that we then decompose into curves. This thesis covered a wide range of subjects related to digital topology and material analysis. The first part explained how fundamental concepts of topology (such as the fundamental group) could help proposing sound environment for fluid flow simulations.

We proposed an original algorithm for detecting when an object wraps around a toric space, and we explained how this problem was related with fluid flow simulation.

In the next parts, we treated more general problems which were no more exclusively related to material analysis. In the second part, we introduce the discrete λ-medial axis. We showed how this tool could be used with homotopic thinning algorithms in order to provide skeletons with good reconstruction capacities and few spurious elements. We provided an algorithm allowing to compute, in linear time, a variant of the λ-medial axis and we finally compared the stability to noise and rotation of our axis to the one of other well-known axes. We concluded that the λ-medial axis is a good shape descriptor with nice stability properties.

The DT (or voxel) framework does not provide sound properties for skeleton decomposition. In order to cope with this, we introduced the cubical complex framework in the third part. We showed how to perform parallel thinning in this framework, and how voxel tools (such as the discrete λ-medial axis) could be used in order to provide, in this new framework, skeletons with good reconstruction properties. We then proposed various parameter-free thinning algorithms in the cubical complex framework, and we explained how to adapt these thinning methods to voxel framework. We also prove that our thinning algorithms produce, in the cubical complex framework, thin results. We then compared our thinning methods with other parallel thinning methods; for the sake of a fair comparison, we introduced the visual quality factor of a skeleton, which gives an estimation of how representative of the original shape a skeleton is. Our comparisons showed that our thinning algorithms possess the best stability properties and has among the best visual quality (the results, in 3d, tend to be a little "over filtered" according to the visual quality factor).

Finally, we explained how to decompose a cubical complex into basic elements. We showed that the decomposition of a skeleton in the cubical complex framework can, depending on how the thinning was performed, be more or less satisfactory. We proposed an algorithm that can, thanks to a filtering parameter given by the user, enhance the decomposition of a skeleton (but cannot solve all the problems related with the decomposition). We quickly explained how the decomposition could be used in order to filter the skeleton, and we provided some applications of this work in the material analysis and the medical fields.

In the appendix, we propose different versions of various algorithms presented throughout this thesis, achieving better worst-case complexity.

perspectives

Future developments mostly involve the various thinning techniques developed in the cubical complex framework. The first main development that we would like to achieve is to be able to use the skeleton decomposition in order to decompose the original object into various parts (some preliminary results are shown on Fig. 112). The decomposition of a skeleton in the cubical complex framework could be used in order to provide a decomposition of a voxel object into elements. In order to perform this task, it seems necessary to associate, to each face of a complex, another face related to it by a collapse operation. Based on this, we could build a sort of graph that would allow to associate, to each face of the skeleton, some voxels of the border of the original object. Another development would be to provide a thinning algorithm more robust to noise. Indeed, when the noise level is high on the input shape, some spurious elements appear on our skeletons (as it does for every thinning methods). When using a filtering parameter with the homotopic thinning algorithm (see Sec. 9.2.4), we realise that spurious branches can be characterized by the fact that they can disappear all of a sudden with only a small increase of the filtering parameter (see Fig. 113). Computing a map of the lifespan of all faces of a complex, and studying carefully this map might help in finding and removing spurious branches automatically.

We saw, in the previous chapters, that it can be very difficult to characterize the "visual quality" of a skeleton. We tried to provide the "visual quality factor", but it seems to be globally advantaging "spurious" skeletons. In fact, in the visual quality The original shape has a very noisy border: the result of DT2-1 algorithm is a skeleton with many spurious branches. b) When isolating only the faces which are kept safe because of their lifespan, and not because of topological considerations, we realise that the spurious branches mainly consist of points that don't have a very high lifespan (only extremities of the spurious branches have a high lifespan). c), d), e), f), g) When using a thinning algorithm with a filtering parameter (as explained in 9.2.4), we realise that little increase of the filtering parameter can remove whole spurious branches, while the "interesting branches" have a more "regular" behaviour to filtering parameter increase.

factor, we look at how a skeleton allows to reconstruct the border of the original object. This criteria is a bit too restrictive, and although a skeleton "looks like" the object it was computed from, it may not reconstruct the border very well (especially in 3d).

After some test, using the information of the reconstructed volume does not yield good results. A solution might be to compute the dissimilarity between the reconstructed object and the original object. To sum up, the visual quality factor that we introduced previously is not, to our opinion, completely satisfactory, and additional work on it should be achieved. Finally, we should complete our comparison of thinning algorithms with a study of 3d curvilinear thinning on "curvilinear shaped" objects only, in order to be able to judge of the visual quality of these particular skeletons. Moreover, we would like to add a study on scale invariance of the thinning algorithms.

201 Algorithm 45: CollapseFacet2(X, W) Data: An n-dimensional cubical complex X F n , a subcomplex W X which represents faces of X which should not be removed The opening function gives, for all points x of a subset X of Z n , the size of the maximal ball of X which contains x (the radius of the ball is the value given to the point). We gave, in Alg. 32 p. 143, a naive version of the opening function which is time consuming. The opening function based on discrete distances can be seen as the successive dilation of the distance transform of an object, by the values of each points: for example, if the value of the distance transform of a point x is 3, than the value 3 should be copied to all points located at a distance of less than 3 of x. Repeating this procedure for all points, from the lowest value to the highest value, allows to obtain the opening function. This procedure is also time consuming, however, interpretation of the opening function as the successive dilation of values of the distance map helps understanding the following algorithm. 1 MyList = GenerateEmptyList(); 2 max = 0; 3 for i = 1 → n do AddT oT ail(MyList, i); also cover B on the column and rank of x (see Fig. 116a for an example). Thanks to this property, on l. 21 of Alg. 51, only one value is saved in the cell, and not the entire list MyList. Thanks to this, we keep manipulating arrays of integer in Alg. 52, and not arrays of lists. When working with 6-maximal balls (or 4-maximal balls in 2d), the previous property does not hold (see a counter example on Fig. 116b), and the general scheme or Alg. 52 does not allow to obtain the opening function of an object in 4 or 6 connectivity. However, a non-tested strategy would be to not scan the image by rows, columns, ranks, etc..., but rather scan it in diagonal directions (as if the image had been rotated of 45 • ). Thanks to this scan strategy, we could build a similar proposition than Prop. 9. Figure 116: A nice property on squares -On a, we consider the grey 8-ball of center A and radius 4 and the dotted 8-ball of center B and radius 3. For every point x located in the grey ball and located on the same line than A, and for every point y located on a same column than x, if y is contained in the dotted ball, then it is contained in the grey ball. On b, we consider the same balls as previously, but in 4-connectivity.

The point B is located on the same line than A, is included in the grey ball, however, there exists a point on the same column than B, contained in the dotted ball and not contained in the grey ball (third line from the top, seventh column from the left). 14 Removing simple points in parallel . . . . . . . . . . . . . . . . . . . . . Figure 15 Various removal order of simple points . . . . . . . . . . . . . . . . . . . Figure 16 Priority function and inhibitor sets . . . . . . . . . . . . . . . . . . . . . . Figure 17 Patterns used for thinning in alg. 5 . . . . . . . . . . . . . . . . . . . . . . Figure 18 Patterns used for thinning in alg. 6 . . . . . . . . . . . . . . . . . . . . . . Figure 19 Patterns used for thinning in Alg. 7 . . . . . . . . . . . . . . . . . . . . . Figure 20 The four masks used by Bertrand and Couprie's algorithm (MK2) . . . Figure 21 The five masks used by Manzanera et al.'s algorithm . . . . . . . . . . . Figure 22 The four masks used by Bertrand and Couprie's algorithm (SK3) . . . . Figure 23 Numbering the 8-neighbours of a pixel. . . . . . . . . . . . . . . . . . . . Figure 24 Numbering the 26-neighbours of a voxel x = (i, j, k). . . . . . . . . . . . Figure 25 Three windows W i , W j , W k . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 26 Masks used by Palágyi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 27 Masks used by Lohou and Bertrand . . . . . . . . . . . . . . . . . . . . . Figure 28 Basic partitioning of the space for subfield based algorithms . . . . . . . Figure 29 Masks used by Németh and al. . . . . . . . . . . . . . . . . . . . . . . . . Figure 30 Sensitivity of the Euclidean medial axis . . . . . . . . . . . . . . . . . . . Figure 31 Filtering the Euclidean medial axis . . . . . . . . . . . . . . . . . . . . . . Figure 32 Illustration of the λ-medial axis . . . . . . . . . . . . . . . . . . . . . . . . Figure 33 The discrete λ-medial axis . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 34 The integer medial axis . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 35 A few examples of 2d skeletons . . . . . . . . . . . . . . . . . . . . . . . Figure 36 A few examples of 2d skeletons . . . . . . . . . . . . . . . . . . . . . . .

L I S T O F F I G U R E S

Figure 37

The λ-medial axis cannot be plainly transcripted to discrete spaces . . . Figure 38 Detailed results of DLMA and GIMA . . . . . . . . . . . . . . . . . . . . The collapse of a complex may not be thin . . . . . . . . . . . . . . . . . Detailed view of the opening function of a shape . . . . . . . . . . . . . Figure 81 A few examples of skeletons obtained with 1DSkeleton . . . . . . . . . Figure 82 Avoiding holes enlargement during thinning . . . . . . . . . . . . . . . . Figure 83 Noisy skeletons are more stable to noise addition . . . . . . . . . . . . . Figure 84 Evolution of the visual quality factor . . . . . . . . . . . . . . . . . . . . Figure 85 Visual quality factor and Euclidean medial axis . . . . . . . . . . . . . . Figure 86 Stability of 2d thinning algorithms to rotation . . . . . . . . . . . . . . . Figure 87 Stability of 2d thinning algorithms to noise . . . . . . . . . . . . . . . . . Figure 88 Stability of 3d thinning algorithms to noise . . . . . . . . . . . . . . . . . Figure 89 Stability of 3d thinning algorithms to rotation . . . . . . . . . . . . . . . Figure 90 Stability of 3d curvilinear thinning algorithms to noise . . . . . . . . . . Figure 91 Stability of 3d curvilinear thinning algorithms to rotation . . . . . . . . Figure 92 Example 93 Example of the behaviour of various 2d thinning algorithms to rotation Figure 93 Example of the behaviour of various 2d thinning algorithms to rotation Figure 93 Example of the behaviour of various 2d thinning algorithms to rotation Figure 94 Example of the behaviour of various 3d thinning algorithms to noise addition . . . .

P

  U B L I C AT I O N S Some of the work explained in this thesis was already presented in the following publications: C O N F E R E N C E S • [CBC08] Characterizing and detecting toric loops in n-dimensional discrete toric spaces, by John Chaussard, Michel Couprie and Gilles Bertrand, in DGCI 2008, pages 129-140. • [CCT09] A discrete lambda-medial axis, by John Chaussard, Michel Couprie and Hugues Talbot, in DGCI 2009, pages 421-433. • [CC09] Surface thinning in 3d cubical complexes, by John Chaussard and Michel Couprie, in IWCIA 2009, pages 135-148. J O U R N A L S • [CBC10] Characterization and Detection of Toric Loops in n-Dimensional Discrete Toric Spaces, by John Chaussard, Michel Couprie and Gilles Bertrand, in Journal of Mathematical Image and Vision, volume 36, pages 111-124 (2010).

(

  1707 -1783) (1808 -1882) (1854 -1912)

Figure 1 :Figure 2 :

 12 Figure 1: Simulating a fluid flow -When simulating a fluid flow, a porous material (in gray) can be approximated by the tessellation of one of its samples (see a). When the results of the simulation are obtained (the dotted lines), one can see that the fluid flow through the mosaic is the tessellation of the fluid flow simulation results obtained in one sample. For example, one can look at the bold dotted line in a): the flow going from A1 to B1 is the same than the flow going from A2 to B2. It is therefore possible to perform the fluid flow simulation through only one sample and, in order to obtain the same results than in a, connect the opposite sides of the sample (see b): the sample is embedded inside a toric space.

Figure 3 :

 3 Figure 3: Loops in toric space -In a toric space, some loops cannot be reduced to a single point while other can. The green loop on a cannot be reduced to a point by continuous deformation, as it wraps around the torus (see b). The blue loop on a be continuously distorted into a single point (see c to i).

  d a positive integer, we set Z d = Z/dZ = {0, ..., d -1}, and we denote by ⊕ d the operation such that for all a, b ∈ Z, (a ⊕ d b) is the element of Z d congruent to (a + b) modulo d. We point out that (Z d , ⊕ d ) is the cyclic group of order d. Let n be a positive integer, d = (d 1 , ..., d n ) ∈ N n , and T n = Z d 1 × ... × Z d n , we denote by ⊕ d the operation such that for all a = (a 1 , ..., a n ) ∈ Z n and b = (b 1

Figure 5 :

 5 Figure 5: Loops in small toric spaces -In the toric space Z 3 × Z 2 (see a), the sequence of points (x 1 , x 2 , x 1 ) can be interpreted in two different ways: b) and c).

Figure 6 :

 6 Figure 6: Homotopic loops -The 1-loops L a , L b , L c and L d are homotopic.

Algorithm 1 :1 6 S 8 y 10 if 11 B 16 S = S ∪{y}; 17 HasCoord

 16810111617 WSD(n,m,T n ,d,X) Data: An n-dimensional toric space T n of dimension vector d and a non-empty m-connected subset X of T n . Result: A set B of elements of Z n Let p ∈ X; Coord(p) = 0 n ; S = {p }; B = ∅; 2 Let HasCoord be a map from T n to {true, false}; 3 foreach x ∈ X do HasCoord(x) = ❢❛•s❡; 4 HasCoord(p) = tr✉❡; 5 while there exists x ∈ S do = S \{x}; 7 foreach non-null n-dimensional m-step v do = x ⊕ d v; 9 if y ∈ X and HasCoord(y) = tr✉❡ then Coord(y) = Coord(x) + v then = B ∪ ((Coord(x) + v -Coord(y))/ d); ∈ X and HasCoord(y) = ❢❛•s❡ then 15 Coord(y) = Coord(x) + v;a feature (a toric loop) which is incompatible with Z n . A toric 2-loop lying in X is depicted in Fig.7-f. Before proving Prop.2.4.3 (see Sec. 2.4.2.4), new definitions and theorems must be given: in particular, Th. 2.4.11 establishes an important result on homotopic loops in toric spaces. Before, let us study an example of execution of Alg. 1.

Figure 7 :

 7 Figure 7: Example of execution of WSD -see Ex. 21 for a detailed description.

Figure 8 :

 8 Figure 8: Wrapping vector -In T 2 = Z 4 × Z 4 , the 2-loop in a) has a wrapping vector equal to (4, 4), and the 2-loop in b) has a wrapping vector equal to (0, 0).

Figure 9 :

 9 Figure 9: Canonical loops -In T 2 = Z 4 × Z 4 , the 2-loop in a) has a normalized wrapping vector equal to (1, -1). The 1-loop in b) is the canonical loop of base point p and normalized wrapping vector (1, -1). On b), the numbers represent the positions of the 1-steps in the 1-step sequence associated to the loop.

2 . 1 .

 21 For each b ∈ B, there exists x and y in X and an m-step a such that x and y are conflictive through a and such that b = (Coord(x) + a -Coord(y))/(d). Consider the m-loop N (see the second part of proof of Prop. 2.4.3), lying inside X, and whose wrapping vector is equal to (Coord(x) + a -Coord(y)): the normalized wrapping vector of N is b. Therefore, for each b ∈ B, there exists an m-loop L b inside X, whose normalized wrapping vector is equal to b. Let L * = k i=1

Figure 11 :

 11 Figure 11: Results of WSD algorithm in 2d -The WSD algorithm is used on a, where it detects a toric loop for one connected component, highlighted in b.

Figure 13 :

 13 Figure 13: Tunnels in 3d -In the set of nine voxels shown in a, removing the central voxel as shown in b does not change the number of connected components of the object, neither the number of connected components of its complementary, yet the topology of the object has changed: it now has a tunnel (hole).

Figure 15 :

 15 Figure 15: Various removal order of simple points produce various skeletons (shown in black): on the left, the simple points were removed from the borders of the shape (shown in grey) towards the inside, while on the right, they were removed randomly.

Algorithm 2 :

 2 Basic Thinning(X) S = {p ∈ X|p belongs to the border of X} while S = ∅ do foreach p ∈ S do S = S\{p} if p is still simple for X then X = X\{p} end end S = {p ∈ X|p belongs to the border of X} end

Figure 17 :

 17 Figure 17: Patterns used for thinning in alg. 5

  Figures 35 p.

  83 and 36 p.83 show the results produced by Alg. 5.

Figure 18 :

 18 Figure 18: Patterns used for thinning in alg. 6 -empty cells can either contains 1s or 0s

Figure 21 :

 21 Figure 21: The five masks used by Manzanera et al.'s algorithm -In each mask, dark voxelis the considered voxel, grey voxels must belong to the object, and white voxels must belong to the background (unrepresented voxels can be any kind of voxels). All masks come with their Π/2 rotations around Ox, Oy or Oz.

Algorithm 9 :repeat 2 A 5 Y

 925 Manzanera99(X) Data: A 26-connected shape X Result: A skeleton of X 1 = {x ∈ X|x fits the mask α1, α2 or α3 (see Fig. 21) or any of their Π/2 rotations around Ox, Oy or Oz} 3 B = {x ∈ X|the 18-neighbourhood of x fits the mask β1 (see Fig. 21) or any of its Π/2 rotations around Ox, Oy or Oz} 4 C = {x ∈ X|the 26-neighbourhood of x fits the mask β2 (see Fig. 21) or any of its Π/2 rotations around Ox, Oy or Oz} = A\(B ∪ C) 6 X = X\Y

Figure 22 :

 22 Figure 22: The four masks used by Bertrand and Couprie's algorithm (SK3) -Each circle represents a voxel. All masks come with their Π/2 rotations around Ox, Oy or Oz (total: 7 masks).

  and all elements of M are simple and do neither match mask M 2 nor mask M 1 , and -{A, G} ⊆ M or {B, H} ⊆ M or {C, E} ⊆ M or {D, F} ⊆ M (inclusive or). Definition 3.2.6[START_REF] Bertrand | A new 3D parallel thinning scheme based on critical kernels[END_REF] Let X ⊂ Z 3 , K ⊂ Z 3 , let M be a set of voxels of X\K, and let us consider the masks shown on Fig.22.

Figure 23 :

 23 Figure 23: Numbering the 8-neighbours of a pixel.

Algorithm 12 : 5 Y 6 if

 1256 Rosenfeld75(X) Data: An 8-connected shape X Result: A skeleton of X 1 remove = true 2 while remove do 3 remove = false 4 for i : 1 → 4 do = {x ∈ X|x is a simple point of direction i} Zhang and Suen, a directional thinning algorithm in 2 sub-iterations In 1984, Zhang and Suen proposed in [ZS84] a 2d directional thinning algorithm in 2 subiterations. The algorithm consists of removing south-east corner points and north or west boundary point, and then removing north-west corner points and south or east boundary points.

Algorithm 13 : 5 Y 6 if

 1356 ZhangSuen84(X) Data: An 8-connected shape X Result: A skeleton of X 1 remove = true 2 while remove do 3 remove = false 4 for i : 1 → 2 do = {x ∈ X|x is a ZS simple point of direction i}

Figure 24 :

 24 Figure 24: Numbering the 26-neighbours of a voxel x = (i, j, k).

Algorithm 14 : 5 Y 6 if

 1456 TsaoFu81(X) Data: A 6-connected shape X Result: A skeleton of X 1 remove = true 2 while remove do 3 remove = false 4 for i ∈ {U,D,N,S,E,W} do = {x ∈ X|x is a TF simple point of direction i} Bertrand in 1995, a surface preserving directional thinning algorithm In 1995, Bertrand proposes in [Ber95a] a 6 sub-iterations 3d directional thinning algorithm, which preserves surfaces. The following definitions and algorithms are given for a 6-connected object of Z 3 . Moreover, we re-use the definition of (U,D,N,S,E,W)-border point given in the previous paragraph.

  border point (with d ∈ {U, D, N, S, E, W}) is not an end-point iff |A 26 | = 0 and |A 26 | = 0 and |Γ * 6 (x) ∩ X| |A 26 | + 2.

  Lohou and Bertrand in 2005, a directional thinning algorithm based on P-simple points In 2005, Lohou and Bertrand proposed in [LB05] a 6 sub-iterations 3d directional thinning algorithm based on P-simple points (one year earlier, a 12 sub-iterations directional thinning algorithm was proposed by the same authors in [LB04]).

Algorithm 15 : 5 Y 6 ifAlgorithm 16 : 5 Y 6 if

 15561656 Bertrand95(X) Data: A 6-connected shape X Result: A skeleton of X 1 remove = true 2 while remove do 3 remove = false 4 for d ∈ {U,D,N,S,E,W} do = {x ∈ X|x is a d-border point which is simple and not an end point} Palágyi02(X) Data: A 26-connected shape X Result: A skeleton of X 1 remove = true 2 while remove do 3 remove = false 4 for d ∈ {UD,NS,EW} do = {x ∈ X | x matches one of the mask for the d directions}

Figure 28 :

 28 Figure 28: Basic partitions of the space: An example of a) partition of the discrete space Z 2 into 2 subfields and b) partition of the discrete space Z 3 into 8 subfields. The space should be regularly tiled with the given pattern; two points belong to the same subfield iff they have the same label. Partition into 4 subfielsd (resp. 2 subfields) is shown on c (resp. d).

8 - 5 Y

 85 neighbours cannot belong to the same subfield. Algorithm 19 presents a very basic 2d thinning algorithm based on 4 subfields. A 3d thinning algorithm based on 8 subfields The same way than in the previous paragraph, we can propose a basic 3d thinning scheme based on 8 subfields using the partition (S 0 , ..., S 7 ) depicted on Fig. 28b: this partition of the space ensures that Algorithm 19: Basic 4 subfields(X) Data: An 8-connected shape X Result: A skeleton of X 1 remove = true 2 while remove do 3 remove = false 4 for i = 0 → 3 do = {x ∈ X|x is a simple point and x ∈ S i (see Fig.

  28a}

5 Y

 5 two points which are 26-neighbours cannot belong to the same subfield. Algorithm 20 presents a very basic 3d thinning algorithm based on 8 subfields. Algorithm 20: Basic 8 subfields(X) Data: A 26-connected shape X Result: A skeleton of X 1 remove = true 2 while remove do 3 remove = false 4 for i = 0 → 7 do = {x ∈ X|x is a simple point and x ∈ S i (see Fig.

  28b}

8 return X Németh ,

 Németh Kardos and Palágyi in 2010, a 3d thinning algorithm based on 2 subfieldsIn[START_REF] Németh | Topology preserving 2-subfield 3D thinning algorithms[END_REF], the authors propose to use a decomposition of the grid into two subfields (S 0 , S 1 ), presented on Fig.28d. As they did in[START_REF] Németh | Topology Preserving 3D Thinning Algorithms Using Four and Eight Subfields[END_REF] (see previous paragraph), the authors again define points of type ǫ as points which should not be removed during thinning: various definitions of epsilon are then proposed, giving various visual results.The following definition is a 3d version of Def. 3.2.2 p.60.

Figure 31 :

 31 Figure31: Filtering the Euclidean medial axis -In a, a (noisy) shape representing a ray (in grey) and its Euclidean medial axis (in black). The medial axis has many "spurious points" due to the noise of the original shape. In b, removing all points which are center of an Euclidean ball of radius inferior to 3.6 allows to obtain a less noisy axis, but still noisy points remains. In c, higher filtering (remove all points center of an Euclidean ball of radius inferior to 6) remove some "spurious points", but remove also the tail of the shape. In d, using the bisector function combined with c, and filtering all points with a bisector angle inferior to 70 • and radius inferior to 6, removes most "spurious points" and keeps important visual information from the shape.

D X (x)) then 6 EMA

 6

Figure 32 :

 32 Figure 32: Illustration of the λ-medial axis -Left: Points x, x ′ and x ′′ and their respective closest boundary points. Top right: λ-medial axis with λ = ǫ, a very small positive real number. Bottom right: λ-medial axis with λ = d(a ′ , b ′ ) + ǫ.

Figure 33 :

 33 Figure 33: The discrete λ-medial axis -Some examples of discrete λ-medial axis of the shape in grey, filtered at different values.

Figure 34 :

 34 Figure 34: The integer medial axis -Some examples of γ-integer medial axis of the shape in grey, filtered at different values.

Contents 4 . 1

 41 The discrete λ-medial axis (DLMA) . . . . . . . . . . . . . . . . . . . . 88 4.1.1 The extended projection of a point . . . . . . . . . . . . . . . . 88 4.1.2 Definition of the discrete λ-medial axis (DLMA) . . . . . . . . 89 4.1.3 DLMA vs. GIMA . . . . . . . . . . . . . . . . . . . . . . . . . . 89 4.2 Algorithms -The discrete λ'-medial axis (DL'MA) . . . . . . . . . . . 91 4.2.1 Computing the DLMA . . . . . . . . . . . . . . . . . . . . . . . 91 4.2.2 The discrete λ'-medial axis (DL'MA) . . . . . . . . . . . . . . . 94 4.3 Topology preservation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 4.3.1 Skeletonisation algorithm with the λ-medial axis as constraint set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 4.3.2 The DLMA map and topological lumps . . . . . . . . . . . . . 95 4.3.3 Another priority function for thinning with the λ-medial axis in 3d . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 4.4 Results and comparisons . . . . . . . . . . . . . . . . . . . . . . . . . . 99 4.4.1 Stability to noise . . . . . . . . . . . . . . . . . . . . . . . . . . 101 4.4.2 Rotation invariance . . . . . . . . . . . . . . . . . . . . . . . . . 103 4.4.3 Computing time . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 4.5 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105

Figure 37 :

 37 Figure 37: The λ-medial axis cannot be plainly transcripted to discrete spaces -Consider a ribbon (in white), with infinite length and 6 pixels high. (a) The projection of the point x is the point y: by symmetry, all points of the ribbon would have a singleton as projection, producing a empty λ-medial axis for any λ > 0. (b) The extended projection of the point x is the set {y, a, b, c}: by symmetry, the points located near the center of the ribbon would all have an extended projection consisting of four points, leading to a more "interesting" λ-medial axis.

Figure 38 :

 38 Figure 38: (a): An object X (white pixels). We have Π e X (x) = {a, b, c}, and Π e X (y) = {d, b, c}. (b): The squared Euclidean distance map of X. (c): The function F X (truncated to the first decimal). (d): The λ-medial axis of X, for λ = 4 (black disks). (e,f): Same as (c,d) assuming that equ. 4.1 is omitted from the definition of the extended projection (Def. 4.1.1). (g): The function F ′ X (truncated to the first decimal). (h): The λ ′ -medial axis of X, for λ ′ = 4 (black disks). (i,j): Same as (g,h) for the integer medial axis.

Figure 39 :

 39 Figure 39: Example of DLMA in 2d -Left: The function F X superimposed to the shape X.Darkest colours represent highest values of F X (x). Any DLMA of X is a threshold of this function at a particular value λ. Top right: discrete 10-medial axis. Bottom right: discrete 30-medial axis of X.

Figure 40 :Algorithm 26 :

 4026 Figure 40: Example of DLMA in 3d -Top-right: The function F X superimposed to the top-left shape X. Red colour represents highest values of F X (x), and blue colour represents lowest. Bottom left: discrete 11-medial axis. Bottom right: discrete 15-medial axis of X.

Figure 42 :

 42 Figure 42: Problems related to using the DLMA map as a priority function during thinning -(a) The original object (in white). (b) The 50-medial axis of the shape (the medial axis is in black, the original shape appears in grey, the background is in white). (c) Result of the skeletonization using the Euclidean distance transform as a priority function, and the 50-medial axis as inhibitor set. (d) Result of the skeletonization using the DLMA map as a priority function, and the 50-medial axis as inhibitor set.

Fig 44 ,

 44 where the object X (Fig 44a) is skeletonized using the map F X as a priority function, and the filtered DLMA as constraint set. The resulting a) Euclidean distance b) λ-medial axis

Figure 43 :

 43 Figure 43: Problems related to using the DLMA map as a priority function during thinning (close-up) -a) : A detailed view of the center of the shape presented in Fig 42, while performing thinning using the Euclidean distance transform as a priority function, and the 50-medial axis as inhibitor set (the shape is in grey, the inhibitor set is in black). Images from left to right show the progress of the thinning. b) : Same as sub figure a, but for the thinning process using the DLMA map as a priority function, and the 50-medial axis as inhibitor set.

Figure 44 :

 44 Figure 44: Homotopic thinning of the Stanford dragon with various priority functions and a DLMA as constraint set -(a) : The original image, "Stanford dragon". (b) : The λ-medial axis of the shape a), for λ = 35. (c) : Result of the homotopic thinning of the shape (a) using (b) as an inhibitor set and the Euclidean distance transform of (a) as a priority function. (d) : Same as (c), but using the DLMA map as a priority function. Some "lumps" appear on the resulting skeleton, outlined by the arrows. (e) : Close view of the top-right lump of (d). This group of voxels does not contain any simple voxel, but is homotopic to a single voxel.

Figure 45 :

 45 Figure 45: Homotopic thinning with our new priority function and a DLMA as constraint set -(a) : The result of the homotopic thinning of Fig. 42a, using the 50-medial axis as inhibitor and the map E X as priority function. (b) : The result of the homotopic thinning of Fig. 44a, using the 35-medial axis as inhibitor and the map E X as priority function.

Figure 47 :

 47 Figure 47: Residuals vs. filtering parameter -Residuals L X (λ) (2 variants) and I X (γ), for the set X depicted in Fig. 39. Horizontal axis: the value of the parameter (λ or γ). Vertical axis: the value of the residual. Notice that curves corresponding to DLMA and DL'MA are superimposed.

Figure 48 :

 48 Figure 48: A sample of the 216 shapes of Kimia's database, and of the 3d shapes from our database.

Figure 49 :

 49 Figure 49: Illustration of the Eden process -Illustration of the border deformation process, after 0 (original image), 50, 100, 150 and 200 steps. The function F X is superimposed to each shape X.

Figure 52 :

 52 Figure 52: Hausdorff distance (on the left) and dissimilarity measure (on the right) between M(X) and M(E(X, n)) on the 20 shapes of our 3D image database for normalised residual values equal to 3, 5 and 10. Noise level (parameter n) is expressed as a percentage of object area. When the DLMA curve is not visible, it is superimposed with DL'MA curve.

Figure 53 :

 53 Figure 53: Hausdorff distance (on the left) and dissimilarity measure (on the right) between M(R θ (X)) and R θ (M(X)) on the 216 shapes of Kimia's 2D image database for normalised residual values equal to 5, 10 and 15. Noise level (parameter n) is expressed as a percentage of object area.

Figure 54 :

 54 Figure 54: Hausdorff distance (on the left) and dissimilarity measure (on the right) between M(R θ (X)) and R θ (M(X)) on the 216 shapes of Kimia's 2D image database for normalised residual values equal to 20, 25 and 30. The rotation angle is represented on the horizontal axis.

Figure 55 :Figure 56 :

 5556 Figure 55: Hausdorff distance between M(R θ (X)) and R θ (M(X)) on the 20 shapes of our 3D image database, for normalised residual values equal to 3 (top images), 5 (bottom left image) and 10 (bottom right image) (the horizontal axes represent the rotation angle around the Y and Z axis). The top right image represent a close-up of the top left image.

Figure 57 :

 57 Figure 57: Computing times (in seconds, vert. axis) versus image sizes (horiz. axis).

5 Figure 58 :

 558 Figure 58: Neptune shape and DL'MA -The Neptune shape (in a) and various homotopic thinning using a λ ′ -medial axis as constraint set (in b, c and d). The λ ′ parameter used for filtering the DL'MA map is specified under each image.

  (a) Stanford dragon (b) λ ′ = 8 (c) λ ′ = 13.2 (d) λ ′ = 19

Figure 59 :

 59 Figure 59: Stanford dragon shape and DL'MA -The Stanford dragon shape [CL96] (in a) and various homotopic thinning using a λ ′ -medial axis as constraint set (in b, c and d). The λ ′ parameter used for filtering the DL'MA map is specified under each image.

  (a) Chair 04 (b) λ ′ = 7.5 (c) λ ′ = 12.8 (d) λ ′ = 18

Figure 60 :

 60 Figure 60: A chair shape and DL'MA -The Chair 04 shape (in a) and various homotopic thinning using a λ ′ -medial axis as constraint set (in b, c and d). The λ ′ parameter used for filtering the DL'MA map is specified under each image.

  (a) Stanford bunny (b) λ ′ = 12 (c) λ ′ = 19.7 (d) λ ′ = 24

Figure 61 :

 61 Figure 61: Stanford bunny shape and DL'MA -The Stanford bunny shape (in a) and various homotopic thinning using a λ ′ -medial axis as constraint set (in b, c and d). The λ ′ parameter used for filtering the DL'MA map is specified under each image.

5 Figure 62 :

 562 Figure 62: Pegasus shape and DL'MA -The Pegasus shape (in a) and various homotopic thinning using a λ ′ -medial axis as constraint set (in b, c and d). The λ ′ parameter used for filtering the DL'MA map is specified under each image.

  λ ′ = 12 (c) λ ′ = 18.3 (d) λ ′ = 25

Figure 63 :

 63 Figure 63: Fertility shape and DL'MA -The Fertility shape (in a) and various homotopic thinning using a λ ′ -medial axis as constraint set (in b, c and d).The λ ′ parameter used for filtering the DL'MA map is specified under each image.

Figure 65 :

 65 Figure 65: Example of faces in the cubical complex framework, from a to d. In e, example of a cell (here, a bidimensional cell).

Figure 66 :

 66 Figure 66: Some examples of sets of faces -Let A (resp. B, C, D) be the set of faces represented on a (resp. b,c, d). The set B is not a complex, as two squares miss an edge, and four edges miss a vertex. The set D is neither a complex, but A and C are complexes. Moreover, A = B -. The complex A is pure as all its facets are squares, the complex C is not pure as some of its facets are squares while some others are edges. We have D = C + . The complexes A and C have a dimension equal to 2.

Figure 67 :

 67 Figure67: Facets in complexes -The square a is a facet, as well as the edge b. The edge c is not a facet, as it is included in a square. The vertex d is not a facet, as it is included in two edges.

Figure 68 :

 68 Figure 68: Collapse of complexes -Let A (resp. B, C, D) be the set of faces represented on a (resp. b, c, d). In the complex A, the edge b is only included in the square a: the pair (a, b) is free for A. The edge c is included in two squares of A, it is therefore not free for A. The complex B = A\{a, b} is an elementary collapse of A. In B, the vertex e is included in only one edge: the pair (d, e) is free for B, and C = B\{d, e} is an elementary collapse of B. The complex D is an elementary collapse of C, and therefore, D is a collapse of A.

Contents 6 . 1 6 . 2 6 . 5

 616265 Parallel directional thinning based on cubical complex . . . . . . . . . 130 6.1.1 Removing free pairs in parallel . . . . . . . . . . . . . . . . . . 130 6.1.2 A directional parallel thinning algorithm . . . . . . . . . . . . 131 Aspect preservation during thinning: a method based on medial axes 134 6.2.1 Criterion for dynamic anchor detection . . . . . . . . . . . . . 134 6.2.2 Using medial axes: an application with DL'MA . . . . . . . . 137 6.3 Aspect preservation during thinning: a parameter-free method . . . . 139 6.3.1 The lifespan of a face . . . . . . . . . . . . . . . . . . . . . . . . 139 6.3.2 Distance map and opening function . . . . . . . . . . . . . . . 140 6.3.3 Parameter-free thinning based on the lifespan, opening function and decenterness . . . . . . . . . . . . . . . . . . . . . . . 143 6.3.4 Visual results of thinning algorithms and possible enhancements in 3d . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 6.4 Evaluating thinning algorithms performances . . . . . . . . . . . . . . 146 6.4.1 No common ground between algorithms . . . . . . . . . . . . 148 6.4.2 Evaluating visual aspect of skeletons . . . . . . . . . . . . . . 150 6.4.3 Results of evaluation . . . . . . . . . . . . . . . . . . . . . . . . 151 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160

Figure 71 :

 71 Figure 71: Parallel removal of free pairs -Let us consider, in the complex A depicted in a), the two squares a and d and the three edges b, c and e. The pairs (a, b), (a, c) and (d, e) are free for A. Parallel removal of free pairs does not guarantee topology preservation: as shown on b), A\{a, b, c} is not a collapse of A. However, as shown on c), as a = d, A\{a, b, d, e} is a collapse of A.

2 2 4 L 6 for t = 0 → n -1 do 8 8 for s = 0 → 1 do 10 10 for d = n → 1 do 12 12

 24681012 while there exists free faces in X \ W and ℓ > 0 do 4 = CBorder(X) -; 6

l

  = l -1; 23 end 25 25 return X; orientation of faces previously defined. A detailed view of each step of the algorithm is shown on Fig. 72.

Figure 73 :

 73 Figure 73: Example of thinning with ParDirCollapse algorithm -(a): A 3-complex X having the shape of a thick tube with a skewed axis. (b): The result of ParDirCollapse(X, ∅, 10) is not thin, some 3-faces remain in the object. (c): The result of ParDirCollapse(X, ∅, 15) is a 2-complex. (d): The result of ParDirCollapse(X, ∅, ∞) does not contain any cube nor any square, it is composed of edges and points.

Figure 75 :

 75 Figure 75: The CollapseIsthmus algorithm -a) After one iteration of Alg. 29 applied on shape of Fig. 72a, all the edges which are isthmus (not contained in any square and do not contain any free vertex) are marked in red and won't be deleted by the thinning. b) After a second iteration, new isthmus appear and are marked in red. c) The result of the thinning, after a third iteration.

Figure 76 :

 76 Figure 76: Results of different thinning algorithms performed on the complex X presented in Fig 73a. (a) : CollapseFacet(X, ∅). (b) : CollapseIsthmus(X, ∅). (c) : The discrete λ-medial axis (Sec. 4.1) of X, with λ = 18. (d) : Result of the method described in Sec. 6.2.2 performed on X, with λ = 18.

Algorithm 30 :

 30 CollapseVox(S, T ) Data: A finite set S ⊂ Z n , and a set T ⊆ S representing important visual features of S Result: A cubical complex of dimension (n -1)

Figure 77 :

 77 Figure 77: Results of CollapseVox with DL'MA -Results of the methodology described in Sec. 6.2.2, using the DL'MA. On the left, the original object; on the right, the result obtained by our method. (a): A bumped and skewed tube, λ = 20. (b): A rocker arm, λ = 8. (c): A pelvis bone, λ = 5.

Figure 80 :

 80 Figure 79: Global view of the opening function and of the decenterness function of a shape -a) The 4-distance map of the shape depicted on Fig. 30a, p. 77. b) The 4-opening function of the same shape. c) The decenterness function of the same shape.

Figure 81 :

 81 Figure 81: A few examples of skeletons obtained with Alg. 33. The original shape is shown in grey, the skeleton is in black. The result of a can be compared with Fig. 36 p. 84, and the result of b can be compared with Fig. 35 p. 83. On the PDF version, a zoom on the figures shows that both skeletons are made of edges and vertices (no voxels).

Figure 82 :

 82 Figure 82: Avoiding holes enlargement during thinning -a) The original shape. b) The homotopic thinning of the shape using Alg. 34. c) With a hole-filling algorithm as post-processing, it is possible to reduce the enlargement of the shape's holes during the thinning.

Figure 83 :

 83 Figure83: Noisy skeletons are more stable to noise addition -a) The original shape and its skeleton (in black) computed with the algorithm presented in[START_REF] Rutovitz | Pattern Recognition[END_REF]. b) The same shape with noise added to its boundary, and its skeleton (in black) computed with the algorithm presented in[START_REF] Rutovitz | Pattern Recognition[END_REF]. The dissimilarity between the two skeletons is approximately equal to 20. c) The original shape and its skeleton (in black) computed with the algorithm presented in[START_REF] Rosenfeld | A characterization of parallel thinning algorithms[END_REF]. d) The same shape with noise added to its boundary, and its skeleton (in black) computed with the algorithm presented in[START_REF] Rosenfeld | A characterization of parallel thinning algorithms[END_REF]. The dissimilarity between the two skeletons is approximately equal to 40.

Figure 84 :Figure 85 :

 8485 Figure 84: Evolution of the visual quality factor -a) Evolution of the visual quality factor of EuclideanSkeleton(X, EMA(X, ρ)) in X, against the filtering parameter ρ, where X is the fish shape shown in Fig. 83. There exists a value ρ where the visual quality reaches a minimal value: this parameter gives the filtered Euclidean medial axis with has the best visual quality factor. b), c), d), e) Euclidean skeletons constrained to an Euclidean medial axis filtered at various values. The shape c) achieves the best visual quality factor.

Figure 86 :

 86 Figure 86: Stability of 2d thinning algorithms to rotation -Dissimilarity measure (on the left)and Hausdorff distance (on the right) between A(R θ (X)) and R θ (A(X)) on the 216 shapes of Kimia's 2D image database (shape X), using various thinning algorithms A.

Figure 87 :

 87 Figure 87: Stability of 2d thinning algorithms to noise -Dissimilarity measure (on the left)and Hausdorff distance (on the right) between A(E(X, n)) and E(A(X), n) on the 216 shapes of Kimia's 2D image database (shape X), using various thinning algorithms A.

Figure 89 :

 89 Figure 89: Stability of 3d thinning algorithms to rotation -Dissimilarity measure (on the left)and Hausdorff distance (on the right between A(R θ (X)) and R θ (A(X)) on 3d shapes of our database (shape X), using various 3d thinning algorithms A.

Figure 90 :Figure 91 :

 9091 Figure 90: Stability of 3d curvilinear thinning algorithms to noise -Dissimilarity measure (on the left) and Hausdorff distance (on the right) between A(E(X, n)) and E(A(X), n) on 3d shapes of our database (shape X), using various 3d curvilinear thinning algorithms A.

Figure 92 :

 92 Figure 92: Example of the behaviour of various thinning algorithms to noise addition -From left to right, more noise is added to the border of the input.

Figure 92 :

 92 Figure 92: Example of the behaviour of various thinning algorithms to noise addition -From left to right, more noise is added to the border of the input.

Figure 93 :Figure 94 :

 9394 Figure 93: Example of the behaviour of various thinning algorithms to rotation -From left to right, the input is rotated with a greater angle.

Figure 94 :

 94 Figure 94: Example of the behaviour of various 3d thinning algorithms to noise addition -From left to right, more noise is added to the border of the input. Algorithm "Euclidean medial axis" is the homotopic thinning guided by the Euclidean distance map, and retaining all elements of the Euclidean medial axis.

Figure 95 :Figure 96 :Figure 96 :

 959696 Figure 95: Walking girl -Homotopic thinning of a human silhouette. On the left, the original image. In the middle, the result of DT3-2 algorithm (with the border of the original image superimposed). On the right, the result of DT3-1 algorithm (with the border of the original image superimposed).

Figure 97 :

 97 Figure 97: Neptune -Homotopic thinning of a statue representing Neptune. On the left, the original image (already presented before). In the middle, the result of SurfaceSkeleton algorithm (with the border of the original image superimposed). On the right, the result of CurvilinearSKeleton algorithm (with the border of the original image superimposed). The colours of the skeleton were obtained using the decomposition algorithm presented in Sec. 7.1.2.

Figure 98 :

 98 Figure 98: Fertility -Homotopic thinning of the Fertility statue. On the left, the original image (already presented before). In the middle, the result of SurfaceSkeleton algorithm (with the border of the original image superimposed). On the right, the result of CurvilinearSKeleton algorithm (with the border of the original image superimposed).The colours of the skeleton were obtained using the decomposition algorithm presented in Sec. 7.1.2.

Figure 99 :Figure 100 :Figure 101 :

 99100101 Figure 99: Chinese dragon -Homotopic thinning of the Chinese dragon statue. On the left, the original image. In the middle, the result of SurfaceSkeleton algorithm (with the border of the original image superimposed). On the right, the result of Curvilin-earSKeleton algorithm (with the border of the original image superimposed). The colours of the skeleton were obtained using the decomposition algorithm presented in Sec. 7.1.2.

Contents 7 . 1

 71 Characterizing simple components in the cubical complex framework 182 7.1.1 Some definitions . . . . . . . . . . . . . . . . . . . . . . . . . . 182 7.1.2 Algorithm for decomposing a complex into simple components 183 7.2 Intersections between simple components . . . . . . . . . . . . . . . . 184 7.2.1 Intersections in the n-dimensional cubical complex framework 184 7.2.2 Intersections in the 2d and 3d cubical complexes frameworks 185 7.3 Results and enhancements of the decomposition . . . . . . . . . . . . 186 7.3.1 Analysing the results of the decomposition . . . . . . . . . . . 187 7.3.2 Division of simple components into simple sub-components . 188 7.4 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189

Figure 103 :

 103 Figure 103: Regular neighbours : in a), the two squares are regular neighbours. However, in b), non of the three squares is a regular neighbour of another square.

Figure 104 :

 104 Figure 104: An example of a pinch face -The vertex in green is a pinch face, the edges in red are intersection edges.

Algorithm 42 :2 2 S 11 stop = true; 12 foreach f ∈ V do 13 ifthen 14 for all g ∈ f do 15 L 25 G 26 foreach g ∈ G do 27 L 28 end 29 cpt

 42211121314152526272829 OverCollapseLabel(S, m)Data: A cubical complex S F 3 such that dim S = 2 (S is usually a skeleton), an integer m which represents the maximum width of "bridges" to ignore when labelling simple components Result: A map L ′ : S → P(Z) such that, for all f, g ∈ S, (L ′ (f) ∩ L ′ (g)) = ∅ → f and g belong to a same simple sub-component of S ′ = ParDirCollapse(S, ∅, m); 4 4 L ′ = LabelComponents(S ′ , S ∩ ); 6 6 V = (S + \(S ′ ) + ) ∩ F 3 2 ; 8 8 stop = false; 10 10 while !stop do there exists h ∈ S + such that f and h are regular neighbours in S and h /∈ V ′ (g) = L ′ (h); = max f∈S ′ ( max i∈L ′ (f) i);24 while there exists f ∈ S + such that L ′ (f) = ∅ do = GetAllFacesOfComponent(S, f); ′ (g) = L ′ (g) ∪ {(cpt + 1)}; = cpt + 1; 30 end 31 return L ′ ;

Figure 105 :Figure 106 :Figure 107 :Figure 108 :

 105106107108 Figure 105: Various collapse leads to various decomposition -In b), we present a 3-complex, made of the basic pieces presented on a). The dark cube is a 3-face, and the two squares a and b are free. The other faces of the complex are not free (we consider them as belonging to an inhibitor set). Removing the free pair made of the face a and the cube leads to the decomposition presented on c) and d), which is made of five simple 2-components. Removing the free pair made of the face b and the cube leads to the decomposition presented on e) and f), which is made of six simple 2-components: there is an extra simple component compared to the decomposition presented in d).

8 C

 8 O N C L U S I O N A N D P E R S P E C T I V E S 8.1 contribution of this thesis

Figure 112 :

 112 Figure112: After decomposing a skeleton into simple components, it is possible to propagate the labels of the skeleton throughout the input object in order to obtain a decomposition of the original volume.

Figure 113 :

 113 Figure113: Homotopic thinning with filtering parameter, and noise -a) The original shape has a very noisy border: the result of DT2-1 algorithm is a skeleton with many spurious branches. b) When isolating only the faces which are kept safe because of their lifespan, and not because of topological considerations, we realise that the spurious branches mainly consist of points that don't have a very high lifespan (only extremities of the spurious branches have a high lifespan). c), d), e), f), g) When using a thinning algorithm with a filtering parameter (as explained in 9.2.4), we realise that little increase of the filtering parameter can remove whole spurious branches, while the "interesting branches" have a more "regular" behaviour to filtering parameter increase.

Result: A cubical complex 1 S 5 S 6 ; 7 ( 8 ; 9 for t = 0 → n -1 do 10 for s = 0 → 1 do 11 for d = n → 1 do 12 foreach 13 if f / ∈ X then 14 Eforeach e ∈ E do 21 if 23 W = W ∪ ê ; 24 end 25 end 26 W = W ∪ W ′ ; 27 W ′ = ∅; 28 end 29 return X; 9 . 2 .

 1567891011121314212325262792 = InitSetS(X, W); 2 W ′ = { f ∈ X | f ∈ X + and dim(f) (n -1)} 3 ; 4 while S has a non-empty set as image do ′ = S; E = ∅ X, S) = ParDirCollapse2(X, W, 1, S) (f, g) ∈ S ′ (t, s, d) do = E ∪ { f ∩ X}; e ∈ X +and dim(e) (n -1) then 23 5 another algorithm for computing the opening function 9.2.5.1 an opening function for 2d and 3d images, in 8/26 connectivity

Algorithm 51 :

 51 LineScanDirect(T , n) Data: A one-dimensional array T of size n Result: The procedure dilates, from left to right, all values of T (see detailed explanation in the text).

5 5 6 if max + T [max] i then 8 8 while 10 max = PopHead(MyList); 11 end 12 if max + T [max] i then 14 14 max = i; 15 end 16 end 17 else

 56810111214151617 RemoveSmallerT han(MyList, T [i], T ); max + T [max] i and MyList is not empty do10 if T [max] > T [i] then 19 19 T [i] = max; 21 21

  2.1 adapted to 6 or 4 connectivity, and propose a version of Alg. 52 for 6 or 4 connectivity.

Algorithm 52 :

 52 QuickOpening3d(X)Data: A set X ⊂ Z 3 Result: The 1-distance opening function of X, that is, for all x ∈ X, ω 1 (x, X)Let D be the 26-distance transform of X, considered as a three-dimensional array;for k = 0 → DepthOf(D) do for j = 0 → HeightOf(D) do LineScanDirect(D[k][j][ * ], LengthOf(D)); LineScanIndirect(D[k][j][ * ], LengthOf(D)); end end for k = 0 → DepthOf(D) do for i = 0 → LengthOf(D) do LineScanDirect(D[k][ * ][i], HeightOf(D)); LineScanIndirect(D[k][ * ][i],HeightOf(D)); end end for j = 0 → HeightOf(D) do for i = 0 → LengthOf(D) do LineScanDirect(D[ * ][j][i], DepthOf(D)); LineScanIndirect(D[ * ][j][i], DepthOf(D));

Figure 70

 70 Figure 64Decomposition of a skeleton made of voxels . . . . . . . . . . . . . . . . Figure65Example of faces in the cubical complex framework . . . . . . . . . . . . Figure66Some examples of sets of faces . . . . . . . . . . . . . . . . . . . . . . . . Figure 67 Facets in complexes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 68 Collapse of complexes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 69The collapse of a complex may not be thin . . . . . . . . . . . . . . . . . Figure70From voxels to complex . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Figure 71

 71 Figure 71Parallel removal of free pairs . . . . . . . . . . . . . . . . . . . . . . . . . Figure72One iteration of the ParDirCollapse algorithm . . . . . . . . . . . . . . . Figure73Example of thinning with ParDirCollapse algorithm . . . . . . . . . . . Figure74Results of the CollapseFacet algorithm . . . . . . . . . . . . . . . . . . .

Figure 75

 75 Figure 75Results of the CollapseIsthmus algorithm . . . . . . . . . . . . . . . . . . Figure76Results of various thinning strategies . . . . . . . . . . . . . . . . . . . . Figure77Results of CollapseVox with DL'MA . . . . . . . . . . . . . . . . . . . . . Figure78Computing the lifespan of a face . . . . . . . . . . . . . . . . . . . . . . . Figure79Global view of the opening function and of the decenterness function of a shape . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure80Detailed view of the opening function of a shape . . . . . . . . . . . . . Figure81A few examples of skeletons obtained with 1DSkeleton . . . . . . . . . Figure82Avoiding holes enlargement during thinning . . . . . . . . . . . . . . . . Figure83Noisy skeletons are more stable to noise addition . . . . . . . . . . . . . Figure84Evolution of the visual quality factor . . . . . . . . . . . . . . . . . . . . Figure 85 Visual quality factor and Euclidean medial axis . . . . . . . . . . . . . . Figure 86 Stability of 2d thinning algorithms to rotation . . . . . . . . . . . . . . . Figure 87 Stability of 2d thinning algorithms to noise . . . . . . . . . . . . . . . . . Figure 88 Stability of 3d thinning algorithms to noise . . . . . . . . . . . . . . . . . Figure 89 Stability of 3d thinning algorithms to rotation . . . . . . . . . . . . . . . Figure 90 Stability of 3d curvilinear thinning algorithms to noise . . . . . . . . . . Figure 91 Stability of 3d curvilinear thinning algorithms to rotation . . . . . . . . Figure 92 Example of the behaviour of various 2d thinning algorithms to noise addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 92 Example of the behaviour of various 2d thinning algorithms to noise addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 92 Example of the behaviour of various 2d thinning algorithms to noise addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure93Example of the behaviour of various 2d thinning algorithms to rotation Figure93Example of the behaviour of various 2d thinning algorithms to rotation Figure93Example of the behaviour of various 2d thinning algorithms to rotation Figure94Example of the behaviour of various 3d thinning algorithms to noise addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 94 Example of the behaviour of various 3d thinning algorithms to noise addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 94 Example of the behaviour of various 3d thinning algorithms to noise addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 94 Example of the behaviour of various 3d thinning algorithms to noise addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 95 Skeletons of walking girl shape . . . . . . . . . . . . . . . . . . . . . . . . Figure 96 Skeletons of chair shape . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 96 Skeletons of a chair shape . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 97 Skeletons of Neptune shape . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 98 Skeletons of Fertility shape . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 99 Skeletons of Chinese dragon shape . . . . . . . . . . . . . . . . . . . . . Figure 100 Skeletons of a hand shape . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 101 Skeletons of a hand shape . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 102 Skeletons of Elephant shape . . . . . . . . . . . . . . . . . . . . . . . . . .

Figure 10: Proving Lem. 2.5.2 -In

  a unit lattice cube, when considering all possible symmetries, only 5 different non self-intersecting 1-loops can be built. If the cube does not contain two diametrically opposite points not belonging to the loop, the 1-loops are all equivalent to a trivial loop.

	Lemma 2.5.2 In Z 3 , any non self-intersecting 1-loop contained in a unit lattice cube which
	does not contain two diametrically opposite points not belonging to the loop, is homotopic to a
	trivial loop.
	Proof A non self-intersecting 1-loop (p, U) holding inside a unit lattice cube is such
	that |U| ∈ {0, 2, 4, 6, 8}.

Proposition 2.5.3

  (see Def. 2.3.2) are equivalent. Two m-loops K = (p, U) and R = (p, V) in Z n (with (n, m) ∈ {(2, 1); (2, 2); (3, 1); (3, 3)}) are equivalent if and only if they are homotopic.

  Medial axes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Finding interesting features during thinning . . . . . . . . . .

	3.1 Thinning methodologies . . . . . . . . . . . . . . . . . . . . . . . . . .
	3.1.1 Simple points in 2d and 3d . . . . . . . . . . . . . . . . . . . .
	3.1.2 Simple sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
	3.1.3 Simple pairs and non-simple points . . . . . . . . . . . . . . .
	3.1.4 Simple points and multi-label images . . . . . . . . . . . . . .
	3.2 Thinning process: simple points removal . . . . . . . . . . . . . . . . .
	3.2.1 Sequential removal of simple points . . . . . . . . . . . . . . .
	3.2.2 Parallel removal of simple points . . . . . . . . . . . . . . . . .
	3.3 Reconstructibility: preserving the visual aspect during thinning . . .
	3.3.1 3.3.2

10 end 11 end 12 return

	8	end
	9	X = X\Y

18.

A 2d thinning algorithm based on 4 subfields As previously seen in Sec. 3.1.1 p.50, it is only necessary to look at the 8-neighbourhood of a point in order to decide if the point Algorithm 17: Lohou05(X) Data: A 26-connected shape X Result: A skeleton of X 1 remove = true 2 while remove do 3 remove = false 4 for d ∈ {U,D,N,S,E,W} do 5 Y = {x ∈ X|x is a P x 2 (d)-simple point and |Γ * 26 (x) ∩ X| > 1} 6 if Y = ∅ then 7 remove = true X Algorithm 18: Basic Subfield Thinning(X) repeat for all subfield S i do Y i = {x ∈ X | x is simple for X, C(x) is true, and x ∈ S i } X = X\Y d end until all Y i are empty;

Table 1 :

 1 Average Hausdorff distance between M(X) and M(E(X, n)). Noise level (parameter n) is expressed as a percentage of object area, results shown are averages of all tested residuals. Lowest values are highlighted in grey.

	3D

Table 2 :

 2 Average

dissimilarity between M(X) and M(E(X, n)). Noise level (parameter n) is expressed as a percentage of object area, results shown are averages of all tested residuals. Lowest values are highlighted in grey.

  2d, they are better than other axes with regards to Hausdorff distance, and are only outperformed by EMA with regards to dissimilarity.

	2D				3D
	Residual 10% 20%	30%	all	3%	5% 10%	all
	EMA 8,23 8,13 10,71 8.55 4,86 5,71 6,89 5.82
	GIMA 6,94 9,00 13,17 8.65 5,24 5,48 6,64 5.79
	DLMA 7,60 9,07 10,97 8.28 3,86 4,65 6,59 5.03
	DL'MA 7,41 8,67 10,62 8.02 4,14 4,80 7,26 5.40

Table 3 :

 3 Average Hausdorff distance between M(R

	2D			3D
	Residual 10% 20% 30%	all	3%	5% 10%	all
	EMA 1,21 1,34 3,88 1,71 0,72 0,72 0,73 0,72
	GIMA 1,50 2,41 6,09 2,27 1,40 1,43 1,52 1,45
	DLMA 1,46 1,89 3,72 1,94 0,66 0,66 0,76 0,69
	DL'MA 1,37 1,78 3,60 1,85 0,67 0,68 0,78 0,71

θ (X)) and R θ (M(X)) (in 3d, rotations shown were performed around the Y and around the Z axis). Results shown are averages of all tested angles. Lowest values are highlighted in grey.

Table 4 :

 4 Average dissimilarity between M(R θ (X)) and R θ (M(X)) (in 3d, rotations shown were performed around the Y and around the Z axis). Results shown are averages of all tested angles. Lowest values are highlighted in grey.

		Hausdorff distance for 5% residual		1.8		Dissimilarity measure for 5% residual
							1.6
							1.4
							1.2
							1
							0.8
							0.6
					DLMA							DLMA
					DL'MA		0.4					DL'MA
					GIMA		0.2					GIMA
				Euclidean medial axis						Euclidean medial axis
	0	0.02	0.04	0.06	0.08	0.1	0	0	0.02	0.04	0.06	0.08	0.1
			Noise (fraction of object volume)						Noise (fraction of object volume)
		Hausdorff distance for 10% residual		2		Dissimilarity measure for 10% residual
							1.8
							1.6
							1.4
							1.2
							1
							0.8
					DLMA		0.6					DLMA
					DL'MA		0.4					DL'MA
					GIMA		0.2					GIMA
				Euclidean medial axis						Euclidean medial axis
	0	0.02	0.04	0.06	0.08	0.1	0	0	0.02	0.04	0.06	0.08	0.1
			Noise (fraction of object volume)						Noise (fraction of object volume)
		Hausdorff distance for 15% residual		2.5		Dissimilarity measure for 15% residual
							2
							1.5
							1
					DLMA							DLMA
					DL'MA		0.5					DL'MA
					GIMA							GIMA
				Euclidean medial axis						Euclidean medial axis
	0	0.02	0.04	0.06	0.08	0.1	0	0	0.02	0.04	0.06	0.08	0.1
			Noise (fraction of object volume)						Noise (fraction of object volume)
	Figure 50: Hausdorff distance (on the left) and dissimilarity measure (on the right) between
		M(X) and M(E(X, n)) on the 216 shapes of Kimia's 2D image database for normalized
		residual values equal to 5, 10 and 15. Noise level (parameter n) is expressed as a
		percentage of object area.

Table 5 : Results of tests on 2d thinning algorithms -

 5 Results of the tests performed on the 216 shapes of Kimia database. Each shape X was thinned using one of the algorithms A presented one the first column of the table. Columns 2 and 3 present the average Dubuisson and Hausdorff distance between R θ (A(X)) and A(R θ (X)), with θ varying from 0 to 90 degrees. Columns 4 and 5 present the average Dubuisson and Hausdorff distance between A(X) and A(E(X, n)), with n varying from 0 to 10 percent of the shape's area. Column 6 present the average visual quality factor of A(X) in X. Lowest values are highlighted in grey.We compare our 3d thinning algorithm (see Alg. 38), with other 3d parallel thinning algorithms. The comparison covers stability properties to noise, to rotation, and visual quality. Visual examples of the behaviour of each tested thinning algorithm to noise addition is shown on Fig.94, at the end of this chapter. The results are summarised in table 6 p. 158, as well as in Fig.88and 89. The algorithm "Euclidean medial axis" is the

	6.4.3.3 results in 3d: general skeletons

Table 6 : Results of tests on 3d thinning algorithms -

 6 Results of the tests performed on 3d shapes. Each shape X was thinned using one of the algorithms A presented one the first column of the table. Columns 2 and 3 present the average Dubuisson and Hausdorff distance between R θ (A(X)) and A(R θ (X)), with θ varying from 0 to 90 degrees. Columns 4 and 5 present the average Dubuisson and Hausdorff distance between A(X) and A(E(X, n)), with n varying from 0 to 10 percent of the shape's volume. Column 6 present the average visual quality factor of A(X) in X. Lowest values are highlighted in grey.

Table 7 : Results of tests on 3d curvilinear thinning algorithms -

 7 Results of the tests performed on 3d shapes. Each shape X was thinned using one of the algorithms A presented one the first column of the table. Columns 2 and 3 present the average Dubuisson and

  1 Simulating a fluid flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 2 Making a toric space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 3 Loops in toric space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 4 Grains in toric spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 5 Loops in small toric spaces . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 6 Homotopic loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 7 Example of execution of WSD . . . . . . . . . . . . . . . . . . . . . . . . Figure 8 Wrapping vector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 9 Canonical loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 10 Proving Lem. 2.5.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 11 Results of WSD algorithm in 2d . . . . . . . . . . . . . . . . . . . . . . . Figure 12 Results of WSD algorithm in 3d . . . . . . . . . . . . . . . . . . . . . . . Figure 13 Tunnels in 3d . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure

39

  Examples of DLMA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 40 Example of DLMA in 3d . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 41 Examples of DLMA and GIMA . . . . . . . . . . . . . . . . . . . . . . . . Figure 42 Problems related to using the DLMA map as a priority function during thinning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 43 Problems related to using the DLMA map as a priority function during thinning (close-up) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 44 Homotopic thinning of the Stanford dragon with various priority functions and a DLMA as constraint set . . . . . . . . . . . . . . . . . . . . . Figure 45 Homotopic thinning with our new priority function and a DLMA as constraint set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 46 Comparison of DLMA and GIMA in 3d . . . . . . . . . . . . . . . . . . . Figure 47 Residuals vs. filtering parameter . . . . . . . . . . . . . . . . . . . . . . . Figure 48 A sample of the 216 shapes of Kimia's database, and of the 3d shapes from our database. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 49 Illustration of the Eden process . . . . . . . . . . . . . . . . . . . . . . . . Figure 50 Medial axes -stability to noise in 2d . . . . . . . . . . . . . . . . . . . . . Figure 51 Medial axes -stability to noise in 2d . . . . . . . . . . . . . . . . . . . . . Figure 52 Medial axes -stability to noise in 3d . . . . . . . . . . . . . . . . . . . . . Figure 53 Medial axes -stability to rotation in 2d . . . . . . . . . . . . . . . . . . . Figure 54 Medial axes -stability to rotation in 2d . . . . . . . . . . . . . . . . . . . Figure 55 Medial axes -stability to rotation in 3d, measured with the Hausdorff distance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 56 Medial axes -stability to rotation in 3d, measured with the dissimilarity measure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 57 Computation time of different medial axes . . . . . . . . . . . . . . . . . Figure 58 Results -DL'MA and Neptune shape . . . . . . . . . . . . . . . . . . . . Figure 59 Results -DL'MA and Stanford dragon shape . . . . . . . . . . . . . . . . Figure 60 Results -DL'MA and a chair shape . . . . . . . . . . . . . . . . . . . . . Figure 61 Results -DL'MA and Stanford bunny shape . . . . . . . . . . . . . . . . Figure 62 Results -DL'MA and Pegasus shape . . . . . . . . . . . . . . . . . . . . . Figure 63 Results -DL'MA and Fertility shape . . . . . . . . . . . . . . . . . . . . . Figure 64 Decomposition of a skeleton made of voxels . . . . . . . . . . . . . . . . Figure 65 Example of faces in the cubical complex framework . . . . . . . . . . . . Figure 66 Some examples of sets of faces . . . . . . . . . . . . . . . . . . . . . . . . Figure 67 Facets in complexes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 68 Collapse of complexes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 69

  of the behaviour of various 2d thinning algorithms to noise addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 92 Example of the behaviour of various 2d thinning algorithms to noise addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 92 Example of the behaviour of various 2d thinning algorithms to noise addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure

  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 94 Example of the behaviour of various 3d thinning algorithms to noise addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 94 Example of the behaviour of various 3d thinning algorithms to noise addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 94 Example of the behaviour of various 3d thinning algorithms to noise addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 95 Skeletons of walking girl shape . . . . . . . . . . . . . . . . . . . . . . . . Figure 96 Skeletons of chair shape . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 96 Skeletons of a chair shape . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 97 Skeletons of Neptune shape . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 98 Skeletons of Fertility shape . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 99 Skeletons of Chinese dragon shape . . . . . . . . . . . . . . . . . . . . . Figure 100 Skeletons of a hand shape . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 101 Skeletons of a hand shape . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 102 Skeletons of Elephant shape . . . . . . . . . . . . . . . . . . . . . . . . . . Regular neighbours . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 104 An example of a pinch face . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 105 Various collapse leads to various decomposition . . . . . . . . . . . . . . Figure 106 Two parts joined by a bridge . . . . . . . . . . . . . . . . . . . . . . . . . Figure 107 Three parts intersecting together . . . . . . . . . . . . . . . . . . . . . . . Figure 108 Cracks in concrete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 109 Decomposition of metallic foam . . . . . . . . . . . . . . . . . . . . . . . Figure 110 Decomposition of bronchial tree . . . . . . . . . . . . . . . . . . . . . . . Figure 111 Decomposition of the brain vascular network . . . . . . . . . . . . . . . Figure 112 Decomposition of a volumic object . . . . . . . . . . . . . . . . . . . . . . Figure 113 Homotopic thinning with filtering parameter, and noise . . . . . . . . . Figure 114 Neighbourhoods in Z 2 and Z 3 . . . . . . . . . . . . . . . . . . . . . . . . Figure 115 Result of Alg. 51 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 116 A nice property on squares . . . . . . . . . . . . . . . . . . . . . . . . . . L I S T O F TA B L E S Table Medial axes -stability to noise measured with the Hausdorff distance . 103 Table Medial axes -stability to noise measured with the dissimilarity measure 103 Table Medial axes -stability to rotation measured with the Hausdorff distance 104 Table Medial axes -stability to rotation measured with the dissimilarity measure104 Table Results of tests on 2d thinning algorithms . . . . . . . . . . . . . . . . . 155 Table Results of tests on 3d thinning algorithms . . . . . . . . . . . . . . . . . 158 Table Results of tests on 3d curvilinear thinning algorithms . . . . . . . . . . . 160 Table Labels of a 0-face f of a one-dimensional complex X F 2 . . . . . . . . . 186 Table Labels of a 1-face f of a bi-dimensional complex X F 3 . . . . . . . . . . 186 Table Label of a 0-face f of a bidimensional complex 3 F X . . . . . . . . . . . 187

	Figure 103

The Representative Elementary Volume of a material is the minimal volume that a sample of this material should have in order for a measurement performed on the sample be representative of the whole material.

until Y is empty;

return X Manzanera's algorithm remains very simple, thanks to the use of a very small number of masks. Moreover, it does not only use masks that should match or not a given point, but it use also masks that should match a point's neighbourhood. 3d fully parallel thinning based on critical kernels -Bertrand and Couprie in 2006 Based on the work proposed by Bertrand in [Ber07], Bertrand and Couprie proposed a

X = ParDirCollapse(Φ(S), Φ(W), +∞);

X = CollapseIsthmus(X, ∅);

return X;

W = LC 1 (X);

ParDirCollapse(X, W, +∞);

return X; Algorithm 33 produces as output a 1d complex, result of the homotopic thinning of a bi-dimensional complex. The output skeleton is a set of lines representative of the

and 102, all at the end of this chapter, for 3d. Visually, algorithms 33 and 34 achieve well in preserving the visual aspect of the input. Moreover, the result of algorithm 34 success in containing only lines in the curvilinear parts of the input, and squares in the surfacic parts.

Algorithm 6: GuoHall92(X) [START_REF] Guo | Fast fully parallel thinning algorithms[END_REF] Data: An 8-connected shape X Result: A skeleton of X [START_REF] Németh | Parallel Thinning Algorithms Based on Ronse's Sufficient Conditions for Topology Preservation[END_REF] Let X ⊂ Z 2 , a point x ∈ X is an endpoint if Γ * 8 (x) contains only one element of X, or contains two elements of X which are 4-neighbours.

The point x is a self-deletable point for X if it is not an endpoint and it is simple for X.

The point x is a double-deletable point for X if it is self-deletable, and that for any self-deletable point q ∈ Γ * 4 (x), q is simple for X\{p} or p is simple for X\{q}. The point x is a square-deletable point for X if it does not satisfy the mask presented in figure 19.

The point x is a deletable point if it is self-deletable, double-deletable and square-deletable (the self-deletable condition is unnecessary because naturally included in the double-deletable condition). 0 0 0 0 0 x 1 0 0 1 1 0 0 0 0 0 Algorithm 7: NemethPalagyi09(X) [START_REF] Németh | Parallel Thinning Algorithms Based on Ronse's Sufficient Conditions for Topology Preservation[END_REF] Data: An 8-connected shape X Result: A skeleton of X 1 repeat 2 X = X\{x ∈ X|x is deletable for X} 3 until stability; 4 return X Algorithm 7 produces symmetrical results on large shapes (when the mask presented in figure 19 is never matched).

Thinning based on critical kernels -Bertrand and Couprie in 2008 Critical kernels were used in order to design various thinning algorithms in [START_REF] Bertrand | Two-Dimensional Parallel Thinning Algorithms Based on Critical Kernels[END_REF], proved valid thanks

complexity

The worst case complexity of Alg. 25 is more than linear when the dimension of the space is equal to 2 or more. Indeed, the complexity of the operation performed on line 3 is proportional to |S|. Therefore, for each point x of the input shape, we perform a calculation which takes, to complete, an amount of time proportional to the number of points on the extended projection of x. For this reason, we introduce, in the following, a variant of the DLMA which can be computed in linear time. The discrete λ'-medial axis (DL'MA) is introduced in order to propose a medial axis close to the concept of the DLMA, only with linear complexity. In order to enhance the worst-case complexity of Alg. 25, the computation of the extended projection of a point

x on X has been modified in order to provide, as result, a subset of Π e X (x). The result is called the sub extended projection: basically, it consists of replacing, in Def. 4.1.1, the occurrences of Π . (.) by Π ′ . (.).

Definition 4.2.1 Let X ⊆ Z n , and let x ∈ X. The sub extended projection of x on X, denoted by Π e ′ X (x), is the union of the sets Π ′ X (y), for all y in N(x) such that d(y, X) d(x, X). We now define the DL'MA: Definition 4.2.2 Let X be a finite subset of Z n , and let λ ∈ R + . We define the function F ′ X which associates, to each point x of X, the value F ′ X (x) = R(Π e ′ X (x)). The discrete λ'-medial axis (or DL'MA) of X is the set of points x in X such that F ′ X (x) λ.

Algorithm 26 allows to compute a DL'MA of a shape. In this new algorithm, given

x ∈ X, we consider for each element of N(x), only one projection point on X (the sub extended projection of x): this point can be found in constant time [START_REF] Coeurjolly | d-dimensional reverse Euclidean distance transformation and Euclidean medial axis extraction in optimal time[END_REF][START_REF] Calvin | A Linear Time Algorithm for Computing Exact Euclidean Distance Transforms of Binary Images in Arbitrary Dimensions[END_REF][START_REF] Wim | Euclidean Skeletons of Digital Image and Volume Data in Linear Time by the Integer Medial Axis Transform[END_REF]. The computation of the DL'MA of a shape has therefore a complexity in o(n.d).

In Fig 38g andh, an example of the DL'MA is given.

topology preservation

skeletonisation algorithm with the λ-medial axis as constraint set

It is easy to see that the DLMA or the DL'MA of a given shape X does not exhibit, in general, the same homotopy type as X (see for example Fig. 41).

In order to guarantee topology preservation, a popular method [DP81, Vin91, TV92, Pud98] consists of performing an homotopic thinning of X with the constraint of

computing time

In Fig. 57, we show the results of computing time measurements that we performed on an Intel Core 2 Duo processor at 1.83 GHz. Computing times for the GIMA are the lowest, but DL'MA is only slightly slower (and also linear).

conclusion

We introduced in this chapter the definition of a discrete λ-medial axis (DLMA), and compared it with the integer medial axis and the Euclidean medial axis. The results of the comparison show that both the DLMA and its linear variant DL'MA provide good robustness to boundary noise and rotation. We also studied how DLMA could be used with an homotopic thinning algorithm in order to provide skeletons with good reconstruction capacities (in other words, containing important visual features from the original shape). We present, on Fig. 58, 59, 60, 61, 62 and 63 some results of homotopic thinning constrained by a filtered DL'MA.

For our experimental study of rotational invariance and border noise robustness, both in 2D and 3D, we introduced an original methodology that ensures a fair comparison between different methods, under the mere assumption that their result decreases in size under the control of a single parameter. This methodology could be of interest for comparing other medial axis filtering approaches.

In the next chapter, we will see that performing homotopic thinning in the digital topology framework does not give, in general, good results for the skeleton decomposition. We will therefore introduce a new framework which will allow to perform easily skeleton decomposition, and we will see how to use the DLMA (or any other medial axis) in this new framework. Finally, we will compare homotopic thinning algorithms, based on the same criteria as the ones used for comparing medial axis in this chapter.

In this chapter, we introduce the cubical complex framework. In Sec. 5.1, we explain why the digital topology (DT) framework does not suit skeleton decomposition. In Sec. 5.2, we introduce the various concepts of the cubical complex framework that will be useful in the rest of this work. Data: An n-dimensional cubical complex X F n , a subcomplex W X which represents faces of X which should not be removed

Result: A cubical complex

1 while there exists free faces for X in X\W do 2 X = ParDirCollapse(X, W, 1);

Figure 74: The CollapseFacet algorithm -a) After one iteration of Alg. 28 applied on shape of Fig. 72a, all the edges which are facets (not contained in any square) are marked in red and won't be deleted by the thinning. b) After a second iteration, new facets appear and are marked in red. c) The result of the thinning, after a third iteration.

object. This motivates the introduction of a variant of this method, which imposes a more restrictive condition to preserve 2-facets from removal. We say that a facet f ∈ X + is an isthmus of X if it contains no free face, in other words, if each face in f is included in a facet of X distinct from f.

In Alg. 29, the facets that are detected and kept safe from further removal are the isthmuses of X.

Algorithm 29: CollapseIsthmus(X, W)

Data: An n-dimensional cubical complex X F n , a subcomplex W X which represents faces of X which should not be removed

Result: A cubical complex

1 while there exists free faces for X in X\W do 2 X = ParDirCollapse(X, W, 1);

On Fig. 75, we present various steps of Alg. 29 running on Fig. 72a. Fig. 76b shows the result of CollapseIsthmus(X, ∅), where X is the tube shown in Fig. 73a. The resulting complex contains less branches and spurious surfaces (as shown on the detailed view) than the complex obtained with CollapseSurface(X, ∅).

The results obtained show that both algorithms presented above allow one to obtain a 2-dimensional skeleton from a 3-complex, or a 1-dimensional skeleton from a 2-6.3 aspect preservation during thinning: a parameter-free method

Even though methods seen in section 6.2.2 can produce satisfactory results in most case, they usually require some user input. For example, if one wants to use the DL'MA as the second parameter of alg. 30, he or she will need to choose a λ value for thresholding the DL'MA map.

In the following, we will see a new method in the cubical complex, requiring no user input, for obtaining a skeleton from a cubical complex, yielding satisfactory visual properties. Moreover, the algorithm can be modified in order to accept user input, in case results need to be filtered more or less in some cases.

the lifespan of a face

In the following, we define new notions in the cubical complex. The first one we present is the death date of a face.

The death date of a face indicates how many layers of free faces should be removed from a complex X, using alg. 27, before removing completely the face from X. We now define the birth date of a face:

F n , the birth date of f in X, denoted by Birth X (f), is the minimum between the smallest integer b such that f is a facet of ParDirCollapse(X, ∅, b), and Death X (f).

The birth date indicates how many layers of free faces must be removed from X with Alg.27 before transforming f into a facet of X (we consider a face "lives" when it is a facet). Finally, we can define the lifespan of a face :

The three parameters previously defined are dependant on the order of direction and orientation chosen for algorithm ParDirCollapse.

The lifespan of a face f of X indicates how many "rounds" this face "survives" as a facet in X, when removing free faces with algorithm 27. The lifespan, the death and the birth, as defined here, are dependant of Alg. 27, used for performing the thinning. It is of course possible to use another algorithm for performing the thinning, leading to other values of birth, death and lifespan. It is recommended, in order to have "comparable" values, to compute these three parameters with the same thinning technique.

Algorithm 31 computes the lifespan of all faces of a complex. The algorithm is not linear in time, however, a linear implementation of such algorithm exists and is presented in the appendix. On Fig. 78, we show a sequence of collapse allowing to compute the lifespan of an edge. framework, and the 6-distance in the 3d DT framework. Given X ⊂ Z n , the maximal

d 1 (y, X): this value indicates the radius of the largest maximal 1-ball contained in X and containing x.

The map ω 1 is known as the opening function (based on the 1-distance): it allows to compute efficiently results of openings by balls of various radius, and gives information on the local thickness of an object on each of its points. We show some examples of the opening function on Fig. 79 and 80. Given X F n , the value of ω 1 (x, X) of every x ∈ X can be computed by performing successive dilations of values of the map d 1 . The algorithm presented in Alg.32 is naive, Algorithm 34: SurfaceSkeleton(X)

shape (and of the topology) of the input. Algorithm 34 produces as output a 2d or 1d complex, result of the homotopic thinning of a three-dimensional complex. The skeleton produced by this algorithm contains squares representative of the surfacic parts of the input, and lines representative of the curvilinear parts of the input.

Finally, algorithm 35 produces as output a 2d or 1d complex, result of the homotopic thinning of a three-dimensional complex. The skeleton produced by this algorithm should be a set of lines describing the shape of the input, however, it may contain squares representative of the topology of the initial object (if the input complex contains a cavity, the skeleton will contain surfacic parts).

Figure 79c depicts the decenterness function of a shape. Dark zones of the image are zones where it is difficult for the faces to survive the thinning presented in Alg. 33 (high lifespan necessary), while bright zones represent zones where faces easily survive the thinning (low lifespan is sufficient).

The following is a direct consequence of Prop. 5.2.6 p.126, Prop. 6.2.1 p.136 and Lem. 6.3.6 p.144. Proposition 6.3.7 Given X F 2 , algorithm 1DSkeleton(X) produces a 1-dimensional skeleton.

Given X F 3 , algorithms SurfaceSkeleton(X) and CurvilinearSkeleton(X) produce a 2-dimensional skeleton.

Despite the use of constraint sets (sets of faces which should not be removed during thinning) in the three algorithms, they produce thin results.

visual results of thinning algorithms and possible enhancements in 3d

We show some results of the three algorithms on Fig. 81

4 return Basic Thinning with Priority(X, W, -D, 26); Algorithm 39: DT 3 -1(X)

4 return Basic Thinning with Priority(X, W, -D, 26); map and retaining all elements of the Euclidean medial axis. The visual quality factor is computed only on the original images (not on the deformed images).

Results show that our algorithm fares, in average, the best stability results (to both noise and rotation, with both distance measures). We must however point out the fact that, when noise level is very high, the stability of our algorithm is bad compared to other algorithms: indeed, when noise level becomes high, the algorithm cannot make Noise 0% Noise 0.5% Noise 1.5% Noise 2%

[PK98]

[PTHS06]

[BC] (ACK3A)

[BC] (CK3A)

Figure 94: Example of the behaviour of various 3d curvilinear thinning algorithms to noise addition -From left to right, more noise is added to the border of the input.

Noise 0% Noise 0.5% Noise 1.5% Noise 2%

[BC] (CK3B)

[BC] (CK3)

DT3-1 (Alg. 39) This definition is similar to the usual definition of connected components. We finally define simple components of a complex: Definition 7.1.3 Given X F n , let I = {f ∈ X|f is a non-regular face of X}. Let S be a connected component of (X\I -): the subcomplex S -is a simple component of X.

In the previous definition, the set I -acts as a barrier separating simple components of X: two faces must share a face outside of this barrier in order to belong to the same simple component. Two facets of X of different dimension either share a non-regular face, or do not share anything: therefore, a simple component is necessarily a pure complex. A simple k-component is a simple component of dimension k. Finally, we have the following property: two faces which are regular neighbours in X belong to the same simple component.

In the three-dimensional cubical complex framework, we call surface of X F n a simple 2-component of X, and curve of X is a simple 1-component of X (this key word holds also in the two-dimensional cubical complex framework).

The simple components of a complex is what we commonly called, previously, "basic components", "elements" or "parts".

algorithm for decomposing a complex into simple components

We give in the following two algorithms: algorithm 40 allows to find the simple component which contains a given facet of a complex, while algorithm 41 labels each facets of a complex depending on which simple component it belongs to. Algorithm 40 "assembles" regular neighbours together in order to form simple components (it is similar to the usual algorithm for labelling connected components with a list). Algorithm 41 gives as output the set of all simple components (represented as a set of integers) to which belongs the faces of X: faces of X which belong to more than one simple component are located at the junction between simple components. Both algorithms take as input a set W, which represents "forbidden faces" that two faces should not share in order to be considered as part of a same simple component: it will be useful later in this work (however, for the moment, it can be ignored).

Algorithm 40: GetAllFacesOfComponent(X, W, f) Data: A cubical complex X F n , a cubical complex W F n , and a face f ∈ X + Result: A cubical complex S F n such that f ∈ S and S is a simple component of X Algorithm 41: LabelComponent(X, W) Data: A cubical complex X F n and a cubical complex W F n Result: A map L : X → P(Z) such that, for all f, g ∈ X, L(f) ∩ L(g) = ∅ iff f and g belong to a same simple component of X

3 end 4 cpt = 1; 5 while there exists f ∈ X + such that L(f) = ∅ do

intersections between simple components 7.2.1 intersections in the n-dimensional cubical complex framework

We characterize in the following intersection faces and border faces of a simple component: Definition 7.2.1 Let X F n . The border of X, denoted by Border(X), is the closure of the set {f ∈ X | f is free in X}. A face belonging to the border of X is called a border face.

A face f ∈ X is an intersection face of X if ( f ∩ X) -contains more than one simple component. We denote by X ∩ the set of all intersection faces of X.

Note that an intersection face is necessarily a non-regular face. The border of an n-dimensional complex is at most an (n -1)-complex, and the set of intersection faces of a complex is also at most an (n -1)-complex. We now define the intersections of a complex. It would be tempting to say that an intersection of X is a simple component of X ∩ , however, in some configurations, this might lead to unwanted results, as shown on Fig 104 andexplained later.

We define pinch faces: Definition 7.2.2 Let X F n and let f, g be two k-faces belonging to X ∩ , such that e = f ∩ g is a (k -1)-face. The face e is smooth for X if, for every face h ∈ ( f ∩ X + ), there exists a face i ∈ ( ǧ ∩ X + ) such that h and i belong to the same simple component of ě ∩ X -.

The face e is a pinch face for X if it not smooth for X.

We now define intersections of a complex:

Table 10: Label of a 0-face f of a bidimensional complex 3 F X .

analysing the results of the decomposition

the order of removal of faces has an impact on the decomposition

Unfortunately, even though cubical complexes allow to obtain a good properties on the decomposition, the thinning process can lead to different decompositions based on how the free faces were removed.

In the DT framework, the Bing's house is a famous example of how removal order of simple points can have important consequences on the resulting skeleton. In the complex framework, the Bing's house phenomenon can also occur: homotopic thinning of a ball can either lead to a single vertex, or to a set of surfaces (called the Bing's house) containing no free faces. On Fig. 105, we present a 3-complex with free pairs of faces: the various orders of removal of the free pairs lead different decompositions of the resulting skeleton into simple 2-components.

avoiding this phenomenon: towards minimizing the number of simple components in the skeleton ?

The reader may wonder if it is possible to avoid this phenomenon by proposing an algorithm which would minimize the number of simple components obtained in the resulting skeleton. Proposing such an algorithm performing such task in an efficient way (which means avoiding to explore all the possible solutions in order to find the optimal one) would give the guarantee that the thinning of a three dimensional ball would lead to a single vertex or curve, thus avoiding the Bing's house configuration. Such problem has yet not been solved (as stated in the conclusion of [START_REF] Malgouyres | Determining whether a simplicial 3-complex collapses to a 1-complex is NP-complete[END_REF]), and many related problems were proved to be NP-hard ([MF08], [START_REF] Tancer | d-collapsibility is NP-complete for d 4[END_REF]) or undecidable ([Mar60]); there is therefore little chance to find an efficient thinning algorithm which minimizes the number of simple components of the resulting skeleton. Moreover, a skeleton with the minimum number of simple components is not, in the general case, giving an interesting result. Indeed, the minimization of the number of

A P P E N D I X

We give here some extra elements (mainly algorithms) that we decided to isolate from main text in order to keep the reading fluent. Moreover, we give some basic definitions of the main concepts used in digital topology.

basic definitions

Discrete objects An element of the discrete grid Z n is called pixel when n = 2, voxel when n = 3, and more generally, a point. A discrete object of Z n , also called object or shape, is a subset of Z n . Given X ⊂ Z n , we define the complementary of X as the set X = {y ∈ Z n |y / ∈ X}. The cardinality of X is denoted by |X|. We sometime refer to this framework as the digital topology (DT) framework, or as the voxel space.

Neighbourhood of a point

We define the function d : Z n × Z n → R which associates, to two points x = (x 1 , ..., x n ) and y = (y 1 , ..., y n ) of Z n , the Euclidean distance between x and y: d(x, y) = n i=1 (x iy i ) 2 . The function d can also be denoted by d e .

The neighbourhood of a point x is the set of points of the discrete grid considered to be the closest to x (see Fig. 114 for graphical representation).

Given x ∈ Z 2 ,

• the 4-neighbourhood of x is the set Γ 4 (x) = {y ∈ Z 2 |d(x, y) 1},

• the 8-neighbourhood of x is the set

• the 18-neighbourhood of x is the set

More generally speaking, given x ∈ Z n , the direct neighbourhood of x is the set

Figure 114: On a), the elements of Γ 4 (x) (x is the dark pixel in the centre), and on b), the elements of Γ 8 (x). On c), the elements of Γ 6 (x) (x is the dark pixel in the centre that can be seen through transparency of other pixels), on d), the elements of Γ 18 (x), and on e), the elements of Γ 26 (x).

Generally speaking, given two points x and y of Z n and an integer k such that Γ k is a neighbourhood defined on Z n , we say that x and y are k-neighbours if y ∈ Γ k (x). The strict k-neighbourhood of a point x is the set Γ * k (x) = Γ k (x)\{x}; the same way, we define N * (x) = N(x)\{x}.

In the following, when using a k-neighbourhood in the discrete space Z n , then it will be considered that Γ k is well defined on Z n .

In Z n , Γ k is an adjacency relation, defining which points can be considered as neighbours and which points cannot.

In Z 2 , when considering an object X with the 8-adjacency relation, its complementary should be considered with the 4-adjacency relation (and vice-versa) in order to have, for both sets, sound topological properties. In Z 3 , when considering an object X with the 26-adjacency relation, its complementary should be considered with the 6-adjacency relation (and vice-versa).

Given X ⊂ Z n a k-connected object, and k the connectivity of X, a point x ∈ X belongs to the border of

Distances and distance transform Given x and y ∈ Z n , a k-path between x and y is a sequence of points S = (p 1 , ..., p j ) such that x = p 1 , y = p j and, for each i ∈ [1, j -1], p i and p i+1 are k-neighbours. The length of S is (j -1).

The k-distance between x and y, denoted by d k (x, y), is the length of the shortest k-path between x and y. Given Y ⊂ Z n , we set

The k-distance transform of X allows to know, for each point x of X, the length of the shortest path between x and any element of X.

The exact same way, we can define the Euclidean distance transform of an object X, usually denoted by D X . Algorithms exist ([Hir96], [START_REF] Meijster | A General Algorithm for Computing Distance Transforms in Linear Time[END_REF]) in order to compute the Euclidean distance transform of a shape in linear time (with respect to the size of the input). The Euclidean distance transform of X is also called the Euclidean distance map of X.

Discrete balls and Euclidean balls

Given x ∈ Z n and r ∈ R, the k-ball of center x and radius r is the set B k (x, r) = {y ∈ Z n |d k (x, y) r}. The strict k-ball of center x and radius r is the set B < k (x, r) = {y ∈ Z n |d k (x, y) < r}. We also define the Euclidean ball of center x and radius r as the set B(x, r) = {y ∈ Z n |d(x, y) r}, and the strict Euclidean ball of center x and radius r as the set B < (x, r) = {y ∈ Z n |d(x, y) < r}.

Connected components Given X ⊂ Z n , X is k-connected if, for each x, y ∈ X, there exists a k-path between x and y and entirely lying inside

and if it is not strictly included in any other k-connected subset of X.

efficient algorithms

Here, we give more efficient (with regards to complexity) versions of some algorithms defined in chapter 6.

another directional parallel thinning algorithm

The ParDirCollapse algorithm (see Alg. 27, p. 133) is the basic homotopic thinning procedure used by most thinning algorithms proposed in Chap. 6. We propose, in Alg. 44, a modified version that will be useful for building efficient versions of other algorithm based on the ParDirCollapse. This algorithm relies on the map S which, when correctly initialized with Alg. 43, gives all free faces of a cubical complex X for a given type, orientation and dimension of faces.

Algorithm 44 performs the same task than Alg. 27, only in a more efficient way (with regards to the complexity). First, all the free faces of the cubical complex are classified in the set S according to their type, orientation and direction on line 4. Then, the border of the complex is built based on the set S, and free faces are removed in parallel. Once a removal took place, the algorithms looks for new free faces in the complex only in the star of the removed face, or in the faces it contained (see lines 31 and 37).

Notice that each free pair of faces stays in the set S for at most two iterations of the loop line 8. Indeed, the pair is removed from S in two cases:

• If the pair is no more free for X (see l. 24). In this case, as the pair was free before (only free pairs of faces are added to S), it means that the face of greater dimension of the pair was removed from the complex. The pair of faces will therefore never be added again to S.

• The pair is free for X and belongs to the border of X (see l. 22). In this case, the pair is removed also from the complex, and will therefore never be added again to S.

If the pair is free but does not belong to the border, it remains in S. In this case, the pair will necessarily, at the next iteration, either belong to the border of X (if it is still free at the end of the current iteration) or it won't be free any more: in both cases, the pair will be removed from S and will never be added again to it. Each free pair is therefore scanned at most twice on lines 22 and 24. The algorithm, for a given dimension, is linear with regards to the number of faces of the input. It is also quadratic with regards to the dimension. Algorithm 44: ParDirCollapse2(X, W, ℓ, S) Data: A cubical complex X F n , a subcomplex W X which represents faces of X which should not be removed, and ℓ ∈ N, the number of layers of free faces which should be removed from X, a map S of all free pairs of faces, categorised by type, orientation and direction (see Alg. 43). We give hereafter (see Alg. 28) a linear version (with regards to the number of faces of the object) of the CollapseFacet algorithm (Alg. 28), which removes free faces from an object layer by layer, and detects facets after each layer removed. Thanks to the use of Alg. 44, the algorithm keeps tracks of new free faces after removing one layer of free faces (see l. 8).

Result

Notice that, during the thinning, a facet appears after one of the face of its star was removed. Observe that only parts of the complex which were changed might be locations of new facets after removing one layer of free faces. Therefore, by saving, before each turn of collapse, the sets of free faces (see l. 6) in S ′ , we can limit the research of new facets in the complex to S ′ . In order to detect the facets already present in the complex before any thinning, we use the set W ′ which saves all the facets in the complex at the beginning (l. 3), and add them once to the inhibitor set (see l. 23).

As explained previously in Sec. 9.2.1, as each pair of face can only stay in S for at most two turns of the main loop, one can see that Alg. 28 is linear with regards to the number of faces of the object.

The same way, we can propose a linear version of algorithm 29 (CollapseIshtmus), by simply modifying the tests performed on l. 3 and 23 of Alg 45.

another algorithm for computing the lifespan of a face

We give hereafter (see Alg. 46) a linear version (with regards to the number of faces of the object) of the Lifespan algorithm (Alg. 31), which computes the lifespan of all faces of a complex. On l. 24, the detection of new facets in the set Y is only done "around" faces which were in S on l. 14 and are no more in Y: these faces were maybe removed from the complex, so we look if the faces they contained did not become facets. Indeed, new facets can only be located where other faces were removed. As a given pair of free faces can only stay in the set S ′ for at most two iterations of the main loop, Alg. 46 is linear with regards to the number of faces of the object.

homotopic thinning algorithms with a filtering parameter

In Chap. 6, we proposed three homotopic thinning algorithms in the cubical complex framework, which do not require any user input. When the input shape contains much noise, the skeletons produced by the algorithms may contain spurious branches. We propose hereafter another version of these algorithms (see Alg. 47, 48 and 49), taking as input a filtering parameter (a decimal value) in order to remove spurious branches if the user wishes to do so. The same way than we did in Chap. 6, we can adapt these algorithms to the DT framework.

We define the following sets: Algorithm 47: 1DSkeleton ′ (X, p)

Algorithm 52 allows to compute efficiently the opening transform of a 26-connected 3d object. It can be easily adapted for computing the opening transform of an 8connected 2d object. In order to do this, let us first explain the role of Alg. 51: given a one-dimensional array T of size n containing integer values, it produces an array T ′ such that, for each i ∈ {0, ..., n -1}, T ′ [i] = m iff m is the highest value such that there exists j < i such that T [j] = m and (ij) < m. In Alg. 51, there exists only one array, which is T at the beginning of the algorithm, and which is T ′ at the end.

Algorithm 51 can be seen as a procedure for spreading, in a one-dimensional array, values to the right of the array: a value of 3 would be spread up to three cells on the rights, while a value of 5 would be spread up to 5 cells on the right (when a pixel can have multiple values, only the highest value is kept). In order to do this, the algorithm scans the array from left to right, while keeping in a list (called MyList) the values that were previously read, and the highest value which should be spread for the moment. An example of the output of the algorithm is presented on Fig. 115.

When a new cell i is read, we first remove, with Alg. 50, all values of the list which are smaller than T [i]. Indeed, these values are dominated by T [i] for all cells located after i, so we don't need to keep them. Then, multiple cases can happen. First, the actual maximal value which was dilated until now must no more be dilated (for example, if the value was 5, it was already dilated four times). In this case (l. 8), the actual value is replaced by the highest value of the list which should now spread on the cell i (l. 10).

If the actual maximum value is higher than the value located in the cell i, then the content of the cell i is saved in the list (at the end of the list) and replaced by the actual maximal value (l. 19). On the opposite, if the actual maximum value is lower or equal than the value located in the cell i, then the maximal value is replaced by i (l. 26).

The opening function can be computed by using Alg. 51 one each lines, columns, etc, of an image. The process is detailed for 3d images in Alg. 52: the procedure LineScanIndirect is actually the same than Alg. 51, except that, on l. 5, the array should be scanned from the end to the beginning, and on l. 8, 10 and 14, the addition should be replaced a subtraction, and the " " should be replaced by a " ".

The function LineScanDirect is linear with regards to the number of cells of the input array. Indeed, in this function, elements are added to the end or to the head of the list (operation performed in constant time). Moreover, the function RemoveSmallerT han scans Algorithm 49: CurvilinearSkeleton ′ (X, p) Data: A cubical complex X F 3 , a decimal value p Result: A cubical complex Y F 3 such that dim Y 2 1 W = LOC >p 1 (X); 2 ParDirCollapse(X, W, +∞); 3 return X;

(and deletes) from the list, in total, at most (n -1) elements, where n is the number of cells of the input one-dimensional array. In conclusion, the function QuickOpening3d is linear with regards to the number of points of the object. In other words, this proposition states that, on a same line of an image, if a 26maximal ball A "covers" a 26-connected maximal ball B on a point x of X, then A will