+ All Categories
Home > Documents > Mesh Segmentation using the Object Skeleton Graph 2 colo–...1( N) deno ts hf k wicar . Th esk n...

Mesh Segmentation using the Object Skeleton Graph 2 colo–...1( N) deno ts hf k wicar . Th esk n...

Date post: 23-Sep-2020
Category:
Upload: others
View: 1 times
Download: 0 times
Share this document with a friend
8
0(6+6(*0(17$7,2186,1*7+(2%-(&76.(/(721*5$3+ David Brunner, Guido Brunnett TU-Chemnitz 09111 Chemnitz Germany {brunner, brunnett}@informatik.tu-chemnitz.de ABSTRACT We present a method for mesh segmentation based on the object skeleton graph. In this method, the triangle mesh is first transformed into a voxel representation. A thinning algorithm is employed to extract a voxel skeleton which is then transformed into a graph representation. The branching points of this graph are used to define the seg- mentation of the mesh. A main focus of this article lies on the data structure used to manage the voxel set. Our rasterization is not based on equilateral cells, leading to an efficient data structure in terms of memory usage. KEY WORDS Modelling, Segmentation, Medial Axis, Skeleton Graph 1. Introduction In recent years, there have been many attempts to improve the segmentation of surfaces, since it is the starting point for numerous applications, including the recognition, classification, and matching of objects or geometric re- constructions [1], [2]. Segmentations can be calculated on the basis of various object features, such as curvature [3], stereoscopic image pairs, and topological structures. The examination of topological and geometric features has led to a range of new techniques and data structures, including shock graphs [1], Reeb graphs [4], level set methods [5], dynamical systems [6], and medial axes [7]. To describe the basic ideas of our method we con- sider a closed 2D curve & and its interior medial axis $, i.e. the set of points in the interior of & with non-unique nearest neighbors in &. If & is smooth any branching of $ indicates that the shape of & branches into features that should possibly be separated by a segmentation method. Our method generalizes this idea to the segmentation of closed 3D-polygons by defining a graph whose branching points are used to define the segments of the surface. This graph is computed in a two-step procedure from a voxel representation of the mesh. In a first step the voxel representation is reduced to a YR[HO VNHOHWRQ by the use of a thinning algorithm. In this process, it must be ensured that the resulting voxel set is topologically equivalent to the original object. To guaran- tee this, we employ the criterion proposed by Bertrand und Malandain in [8] for classifying which voxels may be thinned within an iteration. In order to achieve adequate smoothness of the voxel skeleton for our purposes, we supplement our thinning method with an additional crite- rion, which was proposed by Tsao and Fu in [9] and en- sures uniform thinning. The transformation of the mesh into a raster represen- tation as described above is an area of focus of this article. The data structure we selected is based on similar ideas as the work of Aguilera [10], and can be considered a 3D equivalent of run length encoding in 2D images. This enables us to achieve quadratic growth in memory de- mand relative to the rasterization resolution, at least for practical models. With the aid of this data structure, it is possible to achieve considerably more detailed raster representations than in conventional representation with a voxel grid. This results in much finer skeletons that in- clude not only coarse but also fine features of the models. In a second step we transform the voxel skeleton into a graph structure which allows the application of algo- rithms from graph theory. To simplify this graph we in- troduce a cost function to find and remove redundant junctions through merging of knots. The junction knots of the resulting graph are used to define the segmentation. The results of our method are comparable to those of Dey et al. [6], although our approach uses different tech- niques. This paper is structured as follows: Basic concepts and various definitions are introduced in Section 2. Sub- sequently, the overall approach with all necessary algo- rithms is presented in Section 3. Section 4 describes the results we obtained, including an analysis of the method’s behavior with different models. Conclusions are drawn in Section 5. 2. Basic definitions In this section, we introduce our notation. We assume that the shape 6 of each object dealt with is represented as a consistent, closed triangle mesh 06 The first step of our method consists of the transformation of the mesh 06 and its interior into a volume representa-
Transcript
Page 1: Mesh Segmentation using the Object Skeleton Graph 2 colo–...1( N) deno ts hf k wicar . Th esk n ota rc l d i g b. um f neighboring knots #1(N) indicates the type of knots: - one

0(6+�6(*0(17$7,21�86,1*�7+(�2%-(&7�6.(/(721�*5$3+�

David Brunner, Guido Brunnett

TU-Chemnitz 09111 Chemnitz

Germany {brunner, brunnett}@informatik.tu-chemnitz.de

ABSTRACT

We present a method for mesh segmentation based on the object skeleton graph. In this method, the triangle mesh is first transformed into a voxel representation. A thinning algorithm is employed to extract a voxel skeleton which is then transformed into a graph representation. The branching points of this graph are used to define the seg-mentation of the mesh.

A main focus of this article lies on the data structure used to manage the voxel set. Our rasterization is not based on equilateral cells, leading to an efficient data structure in terms of memory usage.

��

KEY WORDS Modelling, Segmentation, Medial Axis, Skeleton Graph 1. Introduction In recent years, there have been many attempts to improve the segmentation of surfaces, since it is the starting point for numerous applications, including the recognition, classification, and matching of objects or geometric re-constructions [1], [2]. Segmentations can be calculated on the basis of various object features, such as curvature [3], stereoscopic image pairs, and topological structures. The examination of topological and geometric features has led to a range of new techniques and data structures, including shock graphs [1], Reeb graphs [4], level set methods [5], dynamical systems [6], and medial axes [7].

To describe the basic ideas of our method we con-sider a closed 2D curve & and its interior medial axis $, i.e. the set of points in the interior of & with non-unique nearest neighbors in &. If & is smooth any branching of $ indicates that the shape of & branches into features that should possibly be separated by a segmentation method. Our method generalizes this idea to the segmentation of closed 3D-polygons by defining a graph whose branching points are used to define the segments of the surface. This graph is computed in a two-step procedure from a voxel representation of the mesh.

In a first step the voxel representation is reduced to a YR[HO� VNHOHWRQ by the use of a thinning algorithm. In this

process, it must be ensured that the resulting voxel set is topologically equivalent to the original object. To guaran-tee this, we employ the criterion proposed by Bertrand und Malandain in [8] for classifying which voxels may be thinned within an iteration. In order to achieve adequate smoothness of the voxel skeleton for our purposes, we supplement our thinning method with an additional crite-rion, which was proposed by Tsao and Fu in [9] and en-sures uniform thinning.

The transformation of the mesh into a raster represen-tation as described above is an area of focus of this article. The data structure we selected is based on similar ideas as the work of Aguilera [10], and can be considered a 3D equivalent of run length encoding in 2D images. This enables us to achieve quadratic growth in memory de-mand relative to the rasterization resolution, at least for practical models. With the aid of this data structure, it is possible to achieve considerably more detailed raster representations than in conventional representation with a voxel grid. This results in much finer skeletons that in-clude not only coarse but also fine features of the models.

In a second step we transform the voxel skeleton into a graph structure which allows the application of algo-rithms from graph theory. To simplify this graph we in-troduce a cost function to find and remove redundant junctions through merging of knots. The junction knots of the resulting graph are used to define the segmentation.

The results of our method are comparable to those of Dey et al. [6], although our approach uses different tech-niques.

This paper is structured as follows: Basic concepts and various definitions are introduced in Section 2. Sub-sequently, the overall approach with all necessary algo-rithms is presented in Section 3. Section 4 describes the results we obtained, including an analysis of the method’s behavior with different models. Conclusions are drawn in Section 5. 2. Basic definitions In this section, we introduce our notation. We assume that the shape 6 of each object dealt with is represented as a consistent, closed triangle mesh 0�6�� The first step of our method consists of the transformation of the mesh 0�6� and its interior into a volume representa-

Page 2: Mesh Segmentation using the Object Skeleton Graph 2 colo–...1( N) deno ts hf k wicar . Th esk n ota rc l d i g b. um f neighboring knots #1(N) indicates the type of knots: - one

tion. For this purpose, 3D grids of equally-sized volume elements (cubes) are often used. If Y (U, F, E) is used to denote a voxel at position U, F, E (rows, columns and bands) in the grid, the voxel set 9�6� can be described as

9�6� = {Y (U, F, E) | 0 ≤ U < 5, 0 ≤ F < &, � ���0 ≤ E < %},

where 5, & and % denote the maximum number of rows, columns and bands. Each voxel of 9�6� is assigned the value 1 if it belongs to the object (foreground) or 0 if not (background). We de-note the foreground set and the background set 9�6�� � and 9�6� � . The complementary set is denoted with a super-script c, e.g.:

(9�6�� )� = 9�6� � .

Thinning algorithms exploit the concept of neighborhood. In the following, we make use of two different definitions of neighboring voxels. We say that two voxels Y and Z are 26-adjacent if

max({|Y � – Z � |, |Y � – Z � |, |Y � – Z � |}) = 1, 18-adjacent if

max({|Y � – Z � |, |Y � – Z � |, |Y � – Z � |}) = 1 and |Y � – Z � | + |Y � – Z � | + |Y � – Z � | ≤ 2,

and 6-adjacent if

|Y � – Z � | + |Y � – Z � | + |Y � – Z � | = 1, where the subscripts U, F, E refer to row, columns and bands. The sets of all voxels which are -adjacent to Y are denoted 1 �Y� ( ∈ {6, 18, 26}). ������)LJXUH��� From left to right the neighborhood 1 � �Y�, 1 � � �Y��DQG�1 ��� �Y� is shown for a single voxel Y. The voxel set 9�6� is considered -connected if, for any two voxels Y, Z of 9�6�� a series of voxels Y , ..., Y of 9�6� exists such that Y � �Y, Y � �Z and Y � � �∈ 1 �Y � ��for��1�≤�L���P�and� ∈ {6, 26}. In order to avoid connectivity paradoxes (see [7]) we set � �26 for foreground and� � �6�for background connectivity. For a more detailed analysis of the neighborhood, Tsao and Fu introduced the concept of “checking planes” [9]. A checking plane, &3 � , &3 � , &3 � is defined in a similar manner to neighborhood sets, with the difference that one coordinate U, F, or E is constant. E.g.:

&3 � (Y): {Z ∈ 9�6�� �| |Y � – Z � | = 0 and max({|Y � – Z � |, |Y � – Z � |}) = 1}.

In order to classify border voxels, we say that Y ∈ 9�6�� is a directed border voxel of direction U+, U-, F+, F-, E+, E- if the voxel adjacent to Y in the indicated direction belongs to 9�6� � . In other words, Y�U�� F�� E�� is a border voxel of direction F�, if Y�U��F��E� ∈ 9�6�� �and Y�U��F����E� ∈ 9�6� � �

With the definitions given above, the resolution of the 3D grid is now:

5HV � = 5 ⋅ & ⋅ %�≤ PD[�5 ⋅ & ⋅ %� 3.� The main drawback of the grid structure is this cubic memory requirement. Nevertheless, the grid data structure is often used because it allows fast element access.

In our approach, we intend to minimize the voxel size for a fixed memory capacity in order to obtain a highly detailed curve skeleton. This can be achieved by using the UXQ OHQJWK�HQFRGLQJ for the volume representation of the shape 6:

5�6� = {UXQ�F� E� L� | 0 ≤ F < &, 0 ≤ E < %� 0 ≤ i <4�F��E�}, �UXQ�F��E��L� = (Q(L), P(L))

where 4�F�� E�� indicates the number of runs at column F�and band E, Q(L) denotes the start position, and P(L) de-notes the end position of the L-th run within the row(F, E) (0 ≤ Q(L) < P(L) < 5). Since a UXQ(F, E, L) has two intersections with the closed mesh, it is sufficient for each volume element in the col-umn F�and the band E to store only two coordinates Q(L), P(L) that correspond to these intersections. Figure 2 illus-trates the data structure.

��� � ���������A graphical view of the data structure holding the runs.

Each run contains two coordinates to specify the rows where the consecutive voxels start and end.

Worst cases can be constructed such that the data structure also has cubical memory requirements, but for practical consideration, the memory requirement remains quadratic:

5HV � = max(5, &)2

There are only two essential grid operations necessary to realize the thinning of the run length-encoded data struc-ture:

- GHOHWH�(F, E,�U) to delete a voxel within a run

Lists of runs

Ban

ds

C o l um n s

n0 m0 n1 m1

n0 m0

n0 m0 n1 m1

n2 m2

Page 3: Mesh Segmentation using the Object Skeleton Graph 2 colo–...1( N) deno ts hf k wicar . Th esk n ota rc l d i g b. um f neighboring knots #1(N) indicates the type of knots: - one

- LVILOOHG�(F, E,�U) to check if the element at this posi-tion belongs to the object or not

From the following pseudocode, it is obvious that the GHOHWH operation may cause disconnections of runs: ��� � �! "!#$�! delete(c, b, r); % &�'!( determine i so that n(i) ≤ r ≤ m(i) ' ) run(c, b, i).n = r *,+ ( - -/.,0�1 2/3 run(c, b, i).n = run(c, b, i).n + 1; �4$5, 6' ) run(c, b, i).m = r *,+ ( - -/.,0�1 287 run(c, b, i).m = run(c, b, i).m - 1; �4$5, % &�'!( - -/.,0�1 2:9

newrun.n = r + 1; newrun.m = run(c, b, i).m; run(c, b, i).m = r - 1; run(c, b).add(newrun); ( "<; ( "<; The LVILOOHG function checks whether, for the two coordi-nates F�E��a�UXQ(F, E, L) exists for Q(L) ≤ U ≤ P(L). Since just a few runs are enough for typical objects, a linear search suffices. In the case of more complex objects, a binary search is more suitable. )=#�(�� * ' �!( isfilled(c, b, r): boolean; % &�'!(

) � � all run(c, b, i) "�� % &�'!( ' ) r >= run(c, b, i).n > ( " r <= run(c, b, i).m *,+ (�! * #$�!( * �=#� <; ( " ; �! * #$�!(6) > 4$5, <; ( " ;

These two functions suffice to apply the thinning algo-rithm to the data structure 5�6�. The result of thinning is a continuous voxel set, which we denote voxel skeleton and which consists of “voxel curves.” A voxel curve is defined as follows: & ⊂G9�6�� is considered a voxel curve if, for the elements Y1, ..., Y ? (Q > 1) of &, the following applies: �

1 @BA (Y1) {Y2}, 1 @BA (Yn) {Y ?�C 1}, 1 @BA (Y � ) {Y � C 1, Y � � 1} for L = 2, …, Q-1.

This means that a voxel Y � of a curve has a maximum of two adjacent voxels: the preceding voxel Y � C and the suc-ceeding voxel Y � � . The voxel skeleton now results from the joining of voxel curves, i.e. / ⊂G9�6�� denotes a voxel skeleton if a segmentation of / into voxel curves exists such that the following hold true:

1.) / = &1 ∪�&2 ∪�������∪ & , where & � (L = 1, ..., P) are voxel curves

2.) For any two voxel curves & � , &D , at most one neighboring voxel pair (Y, Z) exists with Y�∈ & � , Z�∈ &D �and Y�∈ 1 @BA �Z��

3.) / is connected

��� � �����FE��

At left a single curve consisting of voxels is displayed, at right on the other hand several joined curves, which form a curve skeleton. Finally, we give the definitions for the skeleton graph, which is the basic structure of the object skeleton:

* = {., (}, where . is a set of knots:

. = {N � | 0 ≤ L < .��N � ∈ 3} and ( a set of edges:

( = {(N � , ND ) | i ≠ j, N � , ND ∈ .} 1(N) denotes the set of knots which are connected with N. These knots are called neighboring knots. The number of neighboring knots #1(N) indicates the type of knots:

- one neighbor: end knot - two neighbors: regular knot - more then two neighbors: junction knot

The end knots and junction knots determine the segments of the skeleton graph. �3. The segmentation algorithm In this section we give a brief overview of the overall algorithm:

1. Calculate the run length encoding 5�6� from the mesh representation 0�6�

2. Extract the voxel skeleton through thinning 3. Transform the voxel-based skeleton into a graph

representation * 4. Associate the graph knots N � ∈ . with the mesh tri-

angles WD ∈ 0�6� 5. Find segments within the graph *

���� 9ROXPH�JHQHUDWLRQ�RI�WKH�PHVK�PRGHO� For our purpose, it is useful to work with a scanline algo-rithm, because the results of the scans can be stored as runs. The idea is to find for each triangle W the intersecting scanlines. Therefore each triangle is projected onto a

Page 4: Mesh Segmentation using the Object Skeleton Graph 2 colo–...1( N) deno ts hf k wicar . Th esk n ota rc l d i g b. um f neighboring knots #1(N) indicates the type of knots: - one

plane, which is a side of the 3D grid. Then a bounding box of the projected triangle is calculated to define a region where intersections between scanlines and the triangle are possible. The scheme of the algorithm appears as follows: ��� � �! "!#$�! ConvertMeshToVolume; % &�'!( ) � � all triangles t "�� % &�'!( project t onto a plane determine all cells which t overlaps ) � � all these cells "�� % &�'!(

calculate the position of the scanline (x, y) ' ) cell scanline intersect t *,+ (

store the intersection (z) ( "<; ( " ; ( " ; ( " ;

The intersections are stored in an array, where each entry contains three types of information:

- the position of the intersection (z-value only, since the x- and y-values are indirectly available from the array indices)

- a Boolean flag that indicates the orientation of the intersected triangle (true, if the normal vector of the intersected triangle is aligned in the scanline direc-tion) to aid in deciding whether the intersection marks a starting voxel or an end voxel of the run (makes the algorithm more robust)

- a Boolean flag that indicates whether the scanline intersects a triangle edge (true, if the scanline inter-sects one or two edges of the triangle); since each edge belongs to two triangles, we use this flag to identify the common intersection points of adjacent triangles.

To obtain all this information, we use the vector product method. Since the scanline is orthogonal to the x, y – plane, the triangles become projected into this plane. Thus, let D, E, F ∈ 2 be the projected vertices of the trian-gle and V ∈ 2 be the point resulting from the projection of the scanline. Let YS , YS @ and YS G denote the following vector products:

YS = (D�V) × (E�V) YS @ = (E�V) × (F�V) YS G = (F�V) × (D�V)

The scanline intersects the triangle if

YS ≥ 0 and YS @ ≥ 0 and YS G ≥ 0 or YS ≤ 0 and YS @ ≤ 0 and YS G ≤ 0.

These vector products also indicate the orientation of the triangle. If one or more vector products are equal to zero, the scanline intersects the triangle edge. The z-value of the intersection is calculated by inserting the coordinate of V�into the plane of the triangle.

After processing the triangles, all intersections of each cell are ordered by z-value. Multiple equal intersec-tions (e.g. which lay on one edge) are removed. With respect to the stored orientation, pairs of intersections are used to define a run.

���� 7KLQQLQJ�RI�WKH�YROXPH� In order to extract the voxel skeleton, we employ a thin-ning approach. Thinning algorithms iteratively delete voxels in a 3D grid that additionally fulfill certain geomet-ric constraints, so that geometric features and topology are retained. In order to ensure even deletion, six thinning directions are defined and iteratively traversed, in the course of which for the current direction U+, U–, F+, F–, E+, E– only the corresponding directed border voxels are considered for deletion.

In the literature, different criteria for voxel removal have been suggested (see [3], [8], [9], [11]). To obtain a thinning process that produces an ideal skeleton for our application, we found it necessary to combine different criteria. Bertrand and Malandain suggest in [8] a voxel characterization based on topological numbers within the 1 @BA neighborhood (number of components (#&RPSRQHQWV), where components represent the maximum number of -connected voxels). We use this classification in pre-selecting the voxels to be deleted. An additional condition also controls the thinning process, known as the “checking plane condition,” introduced by Y.F. Tsao and K. S. Fu [9], which ensures that the resulting skeleton is smooth.

We use the following conditions (in this sequence) to characterize a voxel Y for removal:

1. #1 @BA �Y� > 1 (end-voxel exclusion condition) 2. #&RPSRQHQWV�9�6�� �∩�1 @BA �Y�� = 1 ∧

#&RPSRQHQWV�9�6� � �∩��1 IH �Y��c��= 1 (border condi-tion)

3. at least two of the three checking planes fulfill the following two conditions, depending on the current thinning direction: �&RPSRQHQWV�9�6�� �∩�&3β �Y�� = 1 �&RPSRQHQWV�9�6� � �∩��&3β��Y��

�� = 1;

β� �{F��E��U} (checking plane condition) The intention of the first condition is to preserve curve end voxels. Without this condition, the current end voxels of the curve would be removed at each iteration until a single voxel remained. The second condition ensures that the deletion of voxel Y does not disconnect the remaining voxels belonging to the neighborhood.

According to the criterion formulated in the third condition, a voxel can only be removed if the 2D analogy of the border condition applies. The two checking planes orthogonal to the current direction of thinning and con-taining the voxel to be removed are always used for this criterion. For instance, for the directions r+ or r–, the checking planes &3 � � and &3 � would be used. Practical

Page 5: Mesh Segmentation using the Object Skeleton Graph 2 colo–...1( N) deno ts hf k wicar . Th esk n ota rc l d i g b. um f neighboring knots #1(N) indicates the type of knots: - one

experience indicates that this condition shortens the length of the voxel curves and reduces the number of branches. In Figure 4, two checking planes are shown (the candidate for removal, Y� is located in the center of these planes). The removal of Y in the illustration on the right would disconnect the foreground voxels, so the number of com-ponents increases to two.

��� � �����KJL�The removal of the center voxel in the checking plane

on the right would separate the component into two. In contrast, the left plane still consists of one component after the removal.

In addition to meeting topological and geometrical de-mands, these three conditions ensure that the resulting skeleton consists of thin voxel curves (shown and dis-cussed in [3], [8], [9], [11]).

With all these conditions, the resulting algorithm ap-pears as follows: ��� � �! "!#$�! ExtractSkeleton; % &�'!( "�� % &�'!( ) � � all directions d "�� % &�'!( ) � � all bands b "�� % &�'!( ) � � all columns c "�� % &�'!( ) � � all runs r "�� % &�'!() � � e M r.n to r.m "�� % &�'!(

- -/.BN�2$.PO/Q!RS.!T,U U$2,V�WYX Z,[L2!\6Q 180- -^]_Z=U�`�2=U/X Z,[L2!\6a QLWbNcWbN�2/.!T,U U$2,V�W- -8`�Q=U$2$.�W,Q Z,V/`/T!1 Q,V�d/WbN�28R$TPV_.�W,Q Z,V- -feBQ 1 g Q!\ \�2!`�h' ) isFilled(c, b, e) > ( ":(�� *

isFilled(c+d.c, b+d.b, e+d.r) ;*,+ ( add to Candidates;

- -SWbN�2/.,0=V$`�Q!` 0�W,2 18\�Q 1LW8.=Z,V�WP0�Q,VL1- -80 \ \S.!T,U U$2,V�Wi]_Z=U�`�2=U/X Z,[L2!\�1 ( "<; ( "<;

( "<; ( "<;

( " ; ) � � all Candidates cand "�� % &�'!(

- -80=V$0 \=j�k!2YVL2 Q�d�N!]_Z=U=N�Z Z!`ml$7�n^Z!RS.,0=V$`- -80 R�W,2=UoWbN�2,VqpY.BN�2$.POoWbN�2/.=Z,V$`�QLW,Q Z,VL1

' )r(�� * curve end voxel condition *,+ ( 5,s�'P� ; ' )8(�� * border condition *,+ ( 5,s�'P� ; ' )8(�� * checking plane condition *,+ ( 5,s�'P� ;

- -80 \ \S.=Z,V$`�QLW,Q Z,VL18R$T=\ R�Q!\ \�2!`_tu1 Z8`�2!\�2LW,2- -/.,0=V$`/T!1 Q,V�d/WbN�2wvxU$Z$.=2!`$T,U$2feb`�2!\�2LW,2_h

delete(cand.c, cand.b, cand.r); ( "<; y + ' 4! S5=�PzL :" �4! * ' �!(L5 > �! Yz > " ; ( " ;

Different direction sequences lead to different skeletons, but the quality of the skeleton depends primarily on the resolution. Figure 5 shows two different results of thin-ning with different resolutions.

��� � �����K{L�

For the left skeleton, the raster resolution is 14 x 25 x 30, for the right 136 x 248 x 298, making it possible to resolve the ears.

���� 7UDQVIRUPDWLRQ�LQWR�VNHOHWRQ�JUDSK� The main reason to transform the voxel skeleton into a spatial graph representation is the high number of voxels with more than two neighbors. The neighborhood defini-tion causes significant redundancy and complicates the definition of segments. The well-known and easy-to-implement algorithms are another reason to choose a spa-tial graph to operate on this data structure.

Building the set of knots . is very easy: every voxel that is part of the skeleton defines a knot. In this way, the spatial position of the knot correlates with the position of the corresponding voxel in the 3D grid. Next, all pairs of 26-adjacent voxels define the set of edges. The data struc-ture for the spatial graph representation is a list consisting of the knots. For each knot, we store its position and a list of its neighbors.

Up to now, no differences from the voxel-based skeleton are apparent. Figure 6 shows on the left a part of a skeleton graph where five curves meet each other. The next step is the removal of redundant edges. We merge knots wherever the edge is unnecessary. To decide which edge can be removed, we determine the edge with mini-mal cost according to the following cost function:

Let M��N�∈ . be junction knots and N ∈ 1�M� one of the neighbors of M. Let P � ∈ 1�N� for L�= 1, …, Q further be all Q neighbor knots of N. By merging M and N, all neighbors of N pass over to M. This is why all distances between P � and M�or between P � and N are reflected in the cost function:

∑=

+=n

1i

,,) ,cost( || }~}�~� ��

Note that cost(M��N) may be unequal to cost(N��M). This function measures how many edges are concerned and how long they are in sum. It can be used to achieve small distances between knots.

It is always the edge with minimal costs that is merged. This operation is repeated until no neighboring junction knot pair exists.

Page 6: Mesh Segmentation using the Object Skeleton Graph 2 colo–...1( N) deno ts hf k wicar . Th esk n ota rc l d i g b. um f neighboring knots #1(N) indicates the type of knots: - one

��� � �������L�

The left graph contains all junctions between the voxel skeleton as edges. In the right graph, some knots are merged in order to delete undesirable edges.� As can be seen in Figure 6 in the image on the right, the merging results in only one junction knot, instead of eight as on the left. The algorithm for this cost function is not complicated: ��� � �! "!#$�! RemoveRedundandJunctions; % &�'!( "��

- -mO!VLZLW,1:a QLWbNm��Z=U$2SWbNL0=VfW,a ZYVL2 Q�d�N!]_Z=U$1 ) � � all junction knots j "�� % &�'!( ) � � all neighbors k of f "�� % &�'!( ' ) k is no junction knot *,+ (S5,s�'P� ; calculate the cost(j, k) save j and k if the costs are minimal up to now ( "<; ( " ; merge k with j y + ' 4! some junction knot pairs are found; ( " ;

Note that after each merging, the loop starts again. This is necessary because the merging affects many other edges. But this is not a disadvantage, because in practice there are only a few junction knots to check.

���� 0HVK�DQG�JUDSK�DVVRFLDWLRQ� After the skeleton graph has been freed of superfluous knots, the remaining knots must be associated with trian-gles, in order to be able to draw conclusions for the mesh triangles. This is especially important if knots are com-bined into segments. The calculation is again very simple, since the related cost function includes only the distance between the triangle center and the knot. If P � is the center of a triangle W�∈ 0�6�, and N�∈ . is a knot in the graph, then the cost function is given by:

cost(P � , N) = ||�P � , N�||, with P � = 13 (W � ���W � ���W � ) Thus, the association routine consists of nothing more than two nested loops. ��� � �! "!#$�! AssociateTrisWithKnots; % &�'!( ) � � all triangles t "�� % &�'!() � � all knots k "�� % &�'!( calculate mt - -/.=2,V�W,2=U/Z!R�W calculate the cost(mt, k) save k if the costs are minimal up to now ( "<;

set k as associated knot for t ( "<; ( " ;

For models consisting of many triangles and in the case of low raster resolution, the association is the most time-intensive step in the entire method. Moreover, models exist for which this association approach fails. For more exact results, it would be necessary to determine the dis-tance within the raster representation (length of the “digi-tal path”). But this step is extremely process-intensive and not feasible at the resolution necessary for the quality of the medial axis approximation.

���� $XWRPDWLF�VHJPHQW�PDUNLQJ� A segment of the triangulation is defined by a graph chain. A graph chain is a series of neighboring knots that begin or end with a junction or end knot. With the exception of beginning and end knots, all knots in the chain are regular knots.

It should now be clear how important the removal of the superfluous knots was; this reduced the number of junction knots, yielding fewer shorter segments.

Graph bow marking takes place recursively, similar to the well-known Depth-First-Search algorithm from graph theory. Every knot is assigned a number that indi-cates what segment it belongs to. ��� � �! "!#$�! MarkAllSegments; % &�'!( ) � � all knots k "�� % &�'!(

- -mO!VLZLWu0 \!U$2!0 `=jY�_0!U O$2!`<� ' ) k.SegmentNum > 0 *,+ (S5,s�'P��;

- -mU$2�d T=\ 0!U:O!VLZLW_�' ) #(N(k)) <> 2 *,+ (S5,s�'P��;- -mU$2$.!T,U$1 Q X 2/.,0 \ \MarkThisChain � Oxp SegmentNumber);

SegmentNumber++; ( "<; ( " ; ��� � �! "!#$�! MarkThisChain(CurrentKnot, SegmentNum); % &�'!( CurrentKnot.SegmentNum = SegmentNum; ' ) #(N(CurrentKnot)) <> 2 �! * #$�!( ; n1 = 1st neighbor of CurrentKnot; n2 = 2nd neighbor of CurrentKnot;

- -80!U$2SWbN�2YVL2 Q�d�N!]_Z=U$180 \!U$2!0 `=jY�_0!U O$2!`<� ' ) n1.SegmentNum <= 0 *,+ ( MarkThisChain(n1, SegmentNum); ' ) n2.SegmentNum <= 0 *,+ ( MarkThisChain(n2, SegmentNum); ( "<;

As indicated above, the segment affiliation of the graph knots in conjunction with the association of the triangles with the knots yields the implicit association of triangles with the segments.

Page 7: Mesh Segmentation using the Object Skeleton Graph 2 colo–...1( N) deno ts hf k wicar . Th esk n ota rc l d i g b. um f neighboring knots #1(N) indicates the type of knots: - one

��� � �������L�

For the object “knot”, only one segment is found, be-cause the graph contains no junction or end knots. But each knot defines a ring-like region which allows manual segment defini-tion.�

���� 0DQXDO�VHJPHQW�PDUNLQJ� Automatic segmentation uses the end knots or junction knots to mark the end of a graph chain. Because these markings are not always sufficient, it makes sense to im-plement a function allowing the user to interactively mark regular knots as end knots. This allows relatively uncom-plicated definition of additional segments.

Figure 8 shows the object “knot”, which contains no branches and hence no junction knots. This means that the surface cannot be automatically divided into several seg-ments. The image on the right highlights the individual triangle associations. Each knot of the graph generates a ring-shaped region. Partial segments are defined through these knots, which the user can use as “building blocks” to define segments as desired by hand.

The accuracy of the segments depends primarily on two factors: the number of mesh triangles and the selected raster resolution, which directly influences the number of graph knots. The object “knot” contains 20004 mesh tri-angles and was rastered at a resolution of 49 x 50 x 24.

Another method of manual intervention is interactive marking and removal of graph chains, in order to merge detailed segments with one another. In this operation, the triangles belonging to the removed graph chains must of course be re-associated with the remaining knots.

4. Results Figure 8 indicates typical results that can be achieved with the presented method. The three objects displayed feature the following characteristics:

- “Holes”: 5308 triangles, 6 segments, resolution: 50 x 24 x 17,

- “Arm”: 10846 triangles, 7 segments, resolution: 149 x 53 x 32,

- “Horse”: 3928 triangles, 7 segments, resolution: 57 x 104 x 124.

In order to provide an overview of the memory require-ments and runtimes in practical use, we list several values for the three models shown on next page.

First, the number of UXQV required for the raster repre-sentation is followed by the number of raster elements normally needed at various resolutions (Tables 1 & 2). The table heading contains the largest value of a side (max(5, &, %)). � �!{ � {=� {!�=� � �=�=����=� ���

5,699 22,841 91,394 365,663 � ���3,049 12,146 48,643 194,496 ���!�����3,461 13,814 55,251 221,055

7DEOH����Number of runs at various resolutions.

� �!{ � {=� {!�=� � �=�=����=� ���

192,900 1,5 mill 12,1 mill 96,2 mill � ���34,981 267,372 2,1 mill 16,5 mill ���!�����82,146 643,895 5,1 mill 40,6 mill

7DEOH����Number of voxels (cubes) at various resolutions.�

It is clear from the table that the raster method is subject to a rapid increase in memory requirements, while the capacity of the run length encoding approach is not ex-hausted so quickly.

Furthermore, Table 2 shows trends in computational time, since the thinning algorithm accesses the individual raster positions with “LV)LOOHG�´ Because the thinning algorithm iterates for a maximum of ½ ⋅ min(5, &, %) (since thinning takes place from all six sides), the run time is bounded by

O(min(5, &, %) ⋅ 5 ⋅ & ⋅ %) or

O(max(5, &, %)4)

Table 3 includes sample run time values that we achieved for the three models on an AMD Athlon 1.4 GHz, 512 MB RAM. � �!{ � {=� {!�=� � �=�=����=� ���

5.1 44.9 456.3 5929.5 � ���0.9 6.3 56.3 521.7 ���!�����1.8 14.5 136.5 1450.1

7DEOH����Time in seconds for the complete segmentation.

The computational times are of course significantly long. But keep in mind that low resolutions are often already adequate for good segmentation, and can be calculated within a few seconds. The segmentation shown in Figure 9, for example, required 0.37 sec for “Holes,” 1.4 sec for “Arm,” and 1.74 sec for “Horse.”

Experience shows that implementations in which the thinning algorithm can use a conventional raster data structure require on average only one-third the computa-tional time cited here.

Page 8: Mesh Segmentation using the Object Skeleton Graph 2 colo–...1( N) deno ts hf k wicar . Th esk n ota rc l d i g b. um f neighboring knots #1(N) indicates the type of knots: - one

5. Conclusions In this article, we presented a method that uses known techniques to calculate the object skeleton and extract the corresponding segmentation. It was shown how the user can quickly define segments using the skeleton graph. The foundation of our method is the efficient organization of data, which makes it possible to rapidly calculate highly detailed approximations of the medial axis. In order to extract the segments, we convert the voxel skeleton into a graph. The proposed optimization of the graph ensures that many small individual segments can be merged into larger segments, which are much more oriented toward the shape of the object. The presented method is able to seg-ment models that do not feature significant edges within the surface and which cannot be segmented using curvature-based methods.

Additionally, both memory requirements and computation times were analyzed in order to confirm suitability for practical use. 5HIHUHQFHV��

[1] T. Sebastian, P. N. Klein and B. B. Kimia, Recog-

nition of shapes by editing shock graphs, 3URF��,&&9, 2001

[2] M. Vanco, $�'LUHFW�$SSURDFK�IRU�WKH�6HJPHQWDWLRQ�RI� 8QRUJDQL]HG� 3RLQWV� DQG�5HFRJQLWLRQ� RI� 6LPSOH�$OJHEUDLF� 6XUIDFHV, Ph.D. thesis, University of Technology Chemnitz, 2003

[3] F. N. Bezerra and N. J. Leite, Some Comments on Thinning Algorithms for 3-d Images, University of Campinas, 1998

[4] M. Hilaga, Y. Shinagawa, T. Kohmura and T. Ku-nii, Topology Matching for Fully Automatic Simi-larity Estimation of 3D Shapes, Proc. 28th Conf. Computer graphics and interactive techniques, 2001, 203 - 212

[5] J. A. Sethian, /HYHO�6HW�0HWKRGV�DQG�)DVW�0DUFK�LQJ�0HWKRGV, Cambridge University, 1999

[6] T. K. Dey, J. Giesen and S. Goswani, Shape Seg-mentation and Matching with Flow Discretization, 3URF��:RUNVKRS�RQ�$OJRULWKPV�DQG�'DWD�6WUXFWXUHV 2003, 25-36

[7] T. Y. Kong, A. W. Roscoe, A. Rosenfeld, Concepts of digital topology: Introduction and survey, &RP�SXWHU� 9LVLRQ� *UDSKLFV� DQG� ,PDJH� 3URFHVVLQJ, 48:357-393, 1989

[8] G. Bertrand and G. Malandain, A new topological classification of points in 3d images, �QG�(XURSHDQ�&RQIHUHQFH�LQ�&RPSXWHU�9LVLRQ, 710-714, 1992

[9] Y. F. Tsao, K. S. Fu, A parallel thinning algorithm for 3D pictures, &RPSXWHU� *UDSKLFV� ,PDJH� 3URF�HVVLQJ, 17:315-331, 1981

[10] J. Rodríguez, F. Thomas, D. Ayala and L. Ros, Efficient Computation of 3D Skeletons by Extreme Vertex Encoding, '*&, ����, 338-347

[11] G. Bertrand and Z. Aktouf, A three-dimensional thinning algorithm using subfields, 3URFHHGLQJV�RI�WKH� 63,(� &RQIHUHQFH� RQ� 9LVLRQ� *HRPHWU\, 1994, 113-124

�)LJXUH��� Segmentation results for different models. From left to right the initial mesh, the skeleton graph and the segmented mesh are shown.


Recommended