• Aucun résultat trouvé

Decomposition of a 3D Discrete Object Surface.

N/A
N/A
Protected

Academic year: 2021

Partager "Decomposition of a 3D Discrete Object Surface."

Copied!
25
0
0

Texte intégral

(1)

HAL Id: hal-00185097

https://hal.archives-ouvertes.fr/hal-00185097

Submitted on 6 Nov 2007

HAL is a multi-disciplinary open access

archive for the deposit and dissemination of

sci-entific research documents, whether they are

pub-lished or not. The documents may come from

teaching and research institutions in France or

L’archive ouverte pluridisciplinaire HAL, est

destinée au dépôt et à la diffusion de documents

scientifiques de niveau recherche, publiés ou non,

émanant des établissements d’enseignement et de

recherche français ou étrangers, des laboratoires

Decomposition of a 3D Discrete Object Surface.

Isabelle Sivignon, Florent Dupont, Jean-Marc Chassery

To cite this version:

(2)

dis rete plane pie es

IsabelleSivignon 

, FlorentDupont y

and Jean-Mar Chassery 



LaboratoireLIS yLaboratoireLIRIS 961,ruedelaHouilleBlan he 8,BoulevardNielsBohr DomaineUniversitaire-BP46 69622VilleurbanneCedex,Fran e 38402SaintMartinD'HeresCedex,Fran e

Abstra t

Thispaperdealswiththepolyhedrizationofdis retevolumes. The aimisdoareversibletransformationfrom adis retevolumeto a Eu- lideanpolyhedron,i.e. su h that thedis retization ofthe Eu lidean volumeisexa tlytheinitialdis retevolume. Weproposeanew poly-nomialalgorithmtosplitthesurfa eofanydis retevolumeintopie es ofnaivedis reteplanewhi hhaveknownshapeproperties,andpresent astudyofthe omplexityaswellasastudyofthein uen eofthevoxel tra kingorderduringtheexe utionofthisalgorithm.

Keywords

1 Introdu tion

3Ddis retevolumes aremore and more usedespe ially inthemedi alarea sin e they result from MRI and s anners. As 2D images are omposed of squares alledpixels, these 3Dimages are omposed of ubes alledvoxels. This stru ture indu es many diÆ ulties in the exploitation and study of theseobje ts: asea h ubeisstored,thevolumeofdatais veryhugewhi h is a problem to get a uent intera tive visualization; the fa et stru ture (voxels's fa es) of the dis rete obje t indu es many problems to get a ni e visualization that is ne essary for medi ines, as no rendering nor texture algorithm an be applied.

The general idea to solve those problems is to transform dis rete vol-umesintoEu lideanpolyhedra. Manyresear ha tivities havealreadybeen



sivignon, hasserylis.inpg.fr y

(3)

retegeometry. Togetagoodvisualizationofdis retevolumes,themethod that is most used is the Mar hing ubesmethod [1 ℄, whi h onsiderslo al voxel on gurationstorepla ethembysmalltriangles. Evenifthismethod o ers a good visualization, it does not provide a good data ompression (huge numberof fa ets)and is notreversible.

Many other resear h a tivities have been done inthis eld, using om-pletely di erent ideas. The rst algorithms dealt with the onstru tion of the onvexhullofthe onsideredsetof voxels. Thisstudywasmainlydone byKimand Rosenfeldwhopublishedin[2 ℄a rst algorithmto hara terize a pie e of dis rete plane by the onvex hull of the dis rete surfa e. This algorithm wasthen improved by Kimand Stojmenovi [3℄. This algorithm was not reversible, that is to say that the dis retization of the Eu lidean hullobtainedis notthedis reteobje t.

The rst reversible algorithm was proposed by Borianne and Fran on [4 ℄. In this paper, they expose two methods: one to do a polyhedrization, and anotherto do the reverse operation,i.e. dis retization. For that, they use an approximation by the least-square method that make it marginal omparedwith entirely dis retemethods.

Another idea was then proposed by Debled [5 ℄ [6 ℄. She developed an algorithm to re ognize re tangular pie es of naive planes. Then, she uses thisalgorithminordertode omposethedigitalsurfa eofsymmetri obje ts (withknownsymmetries)intopie esofdis reteplanes. Thepolyhedrization was not omplete here but it was the rst approa h using dis rete plane re ognition.

In 1999, Papier [7 ℄ [8 ℄ presents an algorithm usingthe Fourier-Motskin algorithm to re ognize standard dis reteplanes on an obje t surfa e, ea h pointoftheplanebeingapointel(vertexofavoxel). The omplexityofthis algorithm is high be ause of the Fourier-Motskin algorithm and moreover, thepolyhedrizationdoneis notreversible.

Finally, in 2000, Burguet and Malgouyres published[9 ℄ an approxima-tion algorithm using a urvature omputation to hoose some germ points and then al ulatethe skeleton of thedis retesurfa e withoutthose germs (Voronoi diagram). The result is a Delaunay triangulation that approxi-matesand simpli atestheoriginalobje t.

(4)

dis retevolumeobtained afterthese operations.

In a rstpart,we givethe basi de nitionsof dis retegeometry. Then, we present in detail the naive plane re ognition algorithm that we use in thefollowing, giving some improvements and new properties. In se tion 4, after a short state of theart, we expose our splittingalgorithm. Se tion5 deals withthe algorithm omplexity omputation. In thenext se tion, we propose astudy of thevoxelpro essingorder and its in uen eon the nal surfa ede omposition. Beforea fewwordsof on lusion, we nallypresent some performan eand image resultsongenerated and real volumes.

2 Basi De nitions and properties

In this rst part, we fo us in a few words on the basi obje ts de nitions ofdis retegeometry. Allthefollowingde nitionslieinadis rete3Dspa e. Thisspa e isde nedasaunit ubi mesh enteredonpointshavinginteger oordinates. The verti es of ea h ell ( ube) of the mesh orrespond to pointswithhalf-integer oordinates.

AvoxelorZ 3

pointordis retepointisassimilatedwiththeunit losed ubesof the mesh. Then, voxel oordinatesare the oordinates of the or-responding ube enter. Fa es, edgesandverti esofavoxelarerespe tively alledsurfels, linelsand pointels.

In Z 3

, three voxel neighborhoods ( gure 1) are lassi ally used. They are de ned with the two distan es alled Manhattan distan e, denoted d

6 and Chessboarddistan e,denoted d

26 : d 6 (M;P)=jx m x p j+jy m y p j+jz m z p j d 26 (M;P)=max(jx m x p j;jy m y p j;jz m z p j) TwovoxelsM andP are6-neighbors(6-N)ifandonlyifd

6

(M;P)1. M and P are 26-neighbors (26-N) ifand onlyif d

26

(M;P) 1. Inother words, two points are 6-N if they have a ommon fa e, 26-N if they have a ommon fa e, a ommon edge or a ommon vertex. This point of view suggestsanotherneighborhoodforthe aseof twovoxelssharinga ommon fa eora ommonedge, alled18-N.

A lassi alwaytode nea dis retelineoradis reteplane isto onsider the digitization of a Eu lidean line or plane on a unit grid with a given digitization s heme. But, as in Eu lidean spa e, there exists arithmeti al de nitions of dis rete planes and lines. Those de nitions where given by Reveilles[10℄and thengeneralized to hyperplanesbyAndres[11 ℄.

(5)

M(x;y;z) 2Z satisfyingthe doubleinequality: 0ax+by+ z+r<!

wherea;b; arenot nullall togetherand verify g d(a;b; ) =1. A dis rete planesu hthat !=jaj+jbj+j j is alled standard.

A dis rete plane su h that ! =max(jaj;jbj;j j) is alled naive. ( f. gure 2foran example)

The thi kness parameter determines the onne tivity of the plane. In fa t,naiveplanesarethethinnest onne tedplaneswithoutholesand there-fore they are very well adapted for obje t surfa estudy. In therest of the paper,wewilldeal withnaive planesdenoted P(a;b; ;r).

Finally,naivedis reteplane an bede omposedintoprimitiveelements alledtri ubes: the tri ubeat point (i;j) ofthe naiveplane P is de ned astheset f(x;y;z)2P j ixi+3; jxj+3g.

3 Re ognition of a pie e of dis rete naive plane We present in this part an algorithm proposed by Vittone and Chassery [12 ℄ tore ognize digitalplane segments. Somenew propertiesare moreover proved.

3.1 Des ription of the algorithm

Given a Eu lideanplaneP de ned by ax+by+ z+r=0,where 0a b  and 6= 0, the OBQ dis retization(Obje t Boundary Quantization) of P is the set of all points M(x;y;z) of the mesh on or \under" P. For x;y2Z,thismethod onsistsinroundingzto thelowerintegervalue. The resultof su h adis retizationis thenaive planewithparameters (a;b; ;r). In[13 ,12 ℄,Vittonepresentsanalgorithmthatsolvesinpolynomialtime thefollowingproblem(so alled re ognitionproblem):

Let S be a set of voxels ontaining the origin (0;0;0) and n other voxels (i q ;j q ;k q

), q = 1;:::n. What is theset 

(6)

the point (x;y;z). In this spa e, a plane (a;b; ;r) is the point ( ; ; ) if =max (a;b; ).

Sin e ea h voxel generates a double inequation, in the dual spa e ea h voxel of S is represented by an half-opened strip delimitedbytwo parallel planes. For agiven voxel(x;y;z), thisarea representsthe set of Eu lidean planesparameterswhoseOBQdis retization ontainsthevoxel(x;y;z). Fi-nally,



S istheinterse tioninthedualspa eofnhalf-openedstripsdelimited bytwoEu lideanplanesP(i

q ;j q ;k q ) and P(i q ;j q ;k q 1), q=1;:::n. This is the main point of the re ognition algorithm: ea h voxel on-straints the solutionarea inthe dualspa e with an half-opened strip. The interse tionof thosehalf-spa es an befoundstep bystepadding onevoxel aftertheother. Attheend,



S anbeapolyhedron,apolygon,alinesegment orempty. Inthelast ase, thevoxels arenot oplanar.

We present here a sket h of the nal algorithm. Let M(x;y;z) a voxel andS theset ontainingM andpother voxels with oordinates(x+i

q ;y+ j q ;z+k q

), q = 1;:::p. The aim is to nd out the set of the naive planes ontainingallthep+1voxelsofS,M beingtheorigin. The omputationof thehalf-spa esinterse tionreturnsthesolutionarea



Sandthe nalsolutions are,aftertranslation,theplanesP(a;b; ;r (ax+by+ z))su hthat(

a ; b ; r ) isin  S.

Sin e0  <1and0 1,theinitialsolutionareaisdelimited bythe proje tions ofthe sixverti esof

B 0

=f(0;0;0;1);(0;1 ;0 ;1) ;( 1;1 ;0 ;1 );( 0;0;1 ;1 );( 0;1;1;1 );(1;1;1;1)g ( gure3)ontothedualspa e. Intherestofthispaper,B

q

willstandforthe set of the points in N

4

su h that their proje tions in the parameter spa e are the verti es of the solution area for the rst q voxels. Hen e,

 S is the proje tion oftranslated B

p+1

intheparameterspa e. Let us denote L q (a;b; ;r) = ai q +bj q + k q +r and L + q (a;b; ;r) = L q

(a;b; ;r) . Let (a;b; ;r) be the normal ve tor of a plane P solution after step q. Then, at step q+1, thisplane isstill asolution ifand onlyif L

q+1

(a;b; ;r) andL + q+1

(a;b; ;r) haveoppositesigns,i.e. inthedualspa e, the point orresponding to the plane P is between the two planes de ned bythe voxel(i q+1 ;j q+1 ;k q+1 ).

The following algorithm takes as inputa voxelV(i q

;j q

;k q

) and the set B

q 1

solutionforthe rstq 1voxelsand omputesthesetB q

ofthesolution polyhedronverti esafter theaddition of V.

(7)

(1)For allV 1 belongingto B q 1 do (2) IfL q (V 1 )=0 orL + q (V 1 )=0 thenputV 1 inB q (3) ElseifL q (V 1 )>0 and L + q (V 1 )<0 thenputV 1 inB q (4) Else (5) For all V 2 inB q 1 ,V 2 6=V 1 su hthat L q (V 1 )and L q (V 2 ) orL + q (V 1 ) andL + q (V 2

) have oppositesigns (6) Computethe interse tionI of theline(V

1 V

2 ) and theplaneL

q (X) =0(or L + q (X)=0) (7) PutI inB q (8) end for (9)end for Result. Return B q .

The result ofthisfun tionis theset ofthe solutionpolyhedronverti es afterthepro essingof theq rst voxels. Hen e,to he kifaset ofvoxelsS are oplanar,itisenoughto allthefun tionAdd voxelforone voxelafter theother usingea h time the lastB

q

omputed. In the rest of this paper, we allre ognitionalgorithm thealgorithmthat re ognizesapie e ofplane.

3.2 Properties and improvements Thispolyhedron



S istheinterse tionofhalf-openedstrips. Hen e,although thepoints thatare linearlydependent withpositive weightsto theverti es of



S arene essarilysolutions,thisalgorithmdoesnotpre iseiftheverti es, edges andfa es of



S aresolutions ornot. Proposition 1 Let S=f(i

q ;j

q ;k

q

);q =1;:::;pg a set of p voxels, andlet 

S bethe solutionpolyhedron obtained withthe re ognition algorithm. If  S is not empty, let N =fN

i

;i=1:::mg the set of the verti es of 

S. Then, N i isa solution if and only if 8q;1qp;L

+ q

(N i

)6=0. LetE bea point of the edge (N

i ;N j ). If N i or N j is a solution, then E isalso a solution. Proof: Let N i (a;b; ;r) be a vertex of 

S. Suppose that there exists a voxel (i q ;j q ;k q ) su h that L + q (N i

) =0. This meansthat N i belongs to the plane (i q ;j q ;k q

1) in the dual spa e. Sin e this plane is the open limit of the solution area, N

i

is not a solution. In the other way, suppose that N

i

is not a solution, and show that there exists a voxel (i q ;j q ;k q ) su h that L + q (N i

) = 0. By onstru tion, two kinds of non-solutionpoints exist: those that arenot inthe solutionpolyhedron,and those thatbelong to an opensideof the polyhedron. AsN

i

(8)

q q q q q q su h thatai q +bj q + (k q 1)+r =0,and thenL + q (N i )=0. LetE bea pointof theedge(N

i ;N

j

) withN i

solution. SupposethatE isnotsolution. Then,thereexistsahalf-openedstripthatdoesnot ontain E. As E is on an edge of the polyhedron, E belongsto the open plane of a strip. Either this plane ontains the edge (N

i ;N

j

) and then this leads to a ontradi tion, or this plane ut this edge in E, and then, one of the two verti esN

i or N

j

is outsidethe strip. If N i

isoutside, thenwe getthe ontradi tion. Otherwise, ifN i is solution, thenN j is not. As E is on the edge(N i ;N j ),N j

doesnotbelong totheopenplane,whi himpliesthatN j isnota vertexof



S. Contradi tion. 2

Corollary 1 Let E be a point of a fa eF of 

S. Let N i

;i=1;:::n;n>=2 the set of verti es of F. If at least one N

i

is a solution and if E is not on an edge of the fa e,then E is also a solution.

Proof: For n = 2, see proposition 1. For n > 2, the demonstration is nearly the same. Suppose that E is not a solution. As E is on a fa e of the polyhedron, E belongs to one of the open planes of the strips. If this plane ontains the fa e F, then we get the ontradi tion as N

i

belongs to thisfa e. Otherwise, there existsan open plane ontaining E. As E is not on an edge and as



S is onvex, this plane uts the fa e F in at least two edgepoints. Thisplane splitthe spa einto twohalf-spa es, one ontaining pointsthat donotbelong



S . Therefore, at leastone vertex ofF willbe in thishalf-spa e, ontradi tion. 2

Nowletusfo usontheline(6)ofthefun tionAdd voxelpresentedin se tion 3.1. Many eÆ ient algorithms exist to ompute the interse tion of a polyhedronand a plane (see forinstan e [14 ℄, hap.7). Thosealgorithms return the set of verti es of the polyhedron as rational numbers. But to getthe plane normal ve tors orresponding to theverti es oordinates, we must have those oordinates under fra tional form. Instead of omputing the polyhedron rst and then transforming ea h vertex oordinates, it is better to ompute them dire tlyasfra tions.

In [13 ℄, that was done using a modi ed version of Grabiner algorithm [15 ℄. This algorithm uses Farey series and their properties to ompute the newverti esv witha di hotomymethod. The omplexityisthenO(log(n)) ifvisbetweentwoverti esv

1 andv 2 su hthatd(v 1 ;v 2 )=nwhereddenote theEu lideandistan e. We proposehere to omputedire tly those oordi-nates keepingat ea h stepof the omputation thevalue ofnumeratorsand denominators. Thisstep an bedoneinO(1) withthefollowingalgorithm.

V 1

andV 2

aretwoverti esofthe urrentsolutionpolyhedronandP isa planeinthedualspa e. Thisalgorithmwill omputetheparameters ofthe Eu lideanplane whi h representation in the dual spa e is the interse tion pointbetween theline(V

1 ;V

2

(9)

1 2 Initialization. V 1 (a 1 ;b 1 ; 1 ;r 1 ), V 2 (a 2 ;b 2 ; 2 ;r 2 ), P : i+ j+k+ =0, inthedualspa e (0; ; ; ).

Letp be theinterse tion point ofthe line(V 1

;V 2

) and theplane P. Computation. ComputeN = ia 1 2 jb 1 2 r 1 2 k 1 2 . ComputeD=i(a 2 1 a 1 2 )+j(b 2 1 b 1 2 )+(r 2 1 r 1 2 ). Result. Thethree oordinateshavea ommondenominator: p

d =N 1 2 . Thethree numeratorsare p

n =(N(a 2 1 a 1 2 )+a 1 2 D; N(b 2 1 b 1 2 )+ b 1 2 D; N(r 2 1 r 1 2 )+r 1 2 D).

Itiseasyto retrievethe oordinatesofthe orrespondingplanewiththe de nitionof thedualspa e: for instan e,ifj j=max(jaj;jbj;j j),the plane oordinatesare(N(a 2 1 a 1 2 ) + a 1 2 D; N(b 2 1 b 1 2 ) + b 1 2 D; p d ; N(r 2 1 r 1 2 )+r 1 2 D).

To on lude on this part, this re ognition algorithm o ers some prop-erties that are useful for the next step, i.e. applying this algorithm on a dis retesurfa e:

 itre ognizesnaivedis reteplane: theminimalthi knessoftheseplanes impliesthat the obje t surfa e is enough to do a re ognition, we do notneedinterior voxels;

 itisin remental: thevoxels an beaddedone byone;

 fora given set of voxels,the adding order doesnot have an in uen e onthe nalresult;

 it returns the set of verti es of the solutionpolyhedron: so, we have the ompletesetof thesolutionplanesnormal ve tors.

4 General algorithm

Re ognizing dis rete planes is the rst step of a most general goal: the polyhedrizationofadis reteobje t. Thisse tiondes ribesa newalgorithm that split the dis rete surfa e of an obje t into naive plane pie es. We willalso see that this algorithm has features whi h make it espe ially well adaptedto get atotally dis reteand reversiblepolyhedrization.

(10)

will be the set of visible surfels. As ea h voxel has six fa es, those six fa es de ne six dire tions that we will onsider symmetri ally during the algorithmdes ription.

Algorithm De ompose-dis rete-surfa e

Initialization. Forea h obje tvoxel,lo atethesurfa esurfels,S. Initializethe numberof planes pt to 1.

Initializethe listTo-pro esswith theemptylist.

Let B be a set of verti es of a solution polyhedron: B 0

, the initial set, dependson the urrent dire tion.

Main loop.

(1)For ea h obje tdire tion d (2) For ea h obje tvoxelV (3) Lets

0

be thesurfelof V inthe dire tiond; (4) Ifs

0

2S and s 0

has neverbeentreatedthen (5) origin =s 0 ; (6) pt= pt+1; (7) puts 0 inTo-pro ess; (8) B =B 0 ;

(9) While To-pro essisnot empty (10) hooseone surfel sinTo-pro ess;

(11) B

save =B;

(12) Forea h of the8 neighborss n

ofs (13) B =Add voxel(B,s

n ) (14) if B is notemptythen

(15) ptis a solutionfor sandits 8 neighbors;

(16) amongthe 8neighbors,putthosewhi hhave notbeen treatedyetforthisplane into thelist To-pro ess;

(17) else (18) Ifs=s 0 then pt= pt 1; (19) B = B save ; end while end for end for

Result. Forea h surfel: a listof all theplanenumbersit belongsto. Forea h pie e ofplane: the setof allthe solutionpolyhedronverti es.

(11)

neighborsof agiven surfels. So,ifsisnota tri ube enter, we an re over thesolutionpolyhedronasit wasbeforethe pro essingof s'sneighbors.

During the exe ution, for ea h surfel we reate a list ontaining all the plane numbers to whi h this surfel belongs. Moreover, at the end of ea h pie e of plane re ognition,we keep in an appropriate stru turethe oordi-nates ofthesolutionpolyhedronverti es.

Letus analyzethepropertiesof thisalgorithm:

 duringthepro essingofasurfel,either8fa esareaddedtothe urrent planeorzero: indeed,ifasurfelisa tri ube enter, thenwe addallof them to the urrent plane, otherwise, none of them are added (even thosewhi h ouldbelongto theplane). Thisimpliesthatevery surfel of a re ognized naive plane has a least 3 neighbors belonging to this plane. Indeed, a fa e that belongs to a pie e of plane must have a neighbor that is a tri ube enter. Hen e, onlytwo ases are possible (see gure 4). As a onsequen e, re ognized regions have a \regular form";

 asurfel anbelongtomanypie esofplanes: indeed,norestri tionsnor hoi esaredoneduringtheexpansionoftheplanes. Then,naiveplanes areextendedto their maximumunderthe onstraint given before. The se ond property an be seen as an advantage oras a problem. In-deed,ifwedonotallowdis reteplane overing,thelimitbetweentwoplanes is easy to handle. But we an get many very smallpie es of plane at the endof the algorithm and hen e, allowing plane overingredu es the in u-en e of the pie es of planes origin hoi e. Moreover, to get a reversible polyhedrization, the border of a pie e of plane should be a dis rete line. Without overing, we have no mean to ontrol the border of the pie es of plane.

5 Complexity

In this se tion, we give a polynomial bound on the algorithm omplexity. This study is split into two parts: rst, the omplexity of the fun tion Add voxel presented in se tion 3; then, the omplexity of the algorithm De ompose-dis rete-surfa e des ribedinse tion 4.

5.1 Add voxel omplexity

The rstloopof thisalgorithm overstheelementsofthesetB q

(12)

most 2n 4 verti es. Inthealgorithm,B

0

isapolyhedronwith5fa es. Astheadditionofone voxel is equivalent to the addition of two parallel planesin thedual spa e, after step q, the solution polyhedron has at more 2(2q+5) 4 = 4q+6 verti es. As a matter of fa t, The rst loop of the fun tion Add voxel is doneinO(q)time whereq is thenumberofvoxels ofthepie e of plane.

Intheloop,the rsttwotests anbedonein onstanttime. These ond loop does a new over of the set B

q

and is arried out in O(q). For the omputationoftheplane/lineinterse tion,wesawthatweneedheretokeep someparti ularknowledgeonthevaluesfoundfortheinterse tionpoint,and weproposedinse tion3.2analgorithmthatsolvesthisproblemin onstant time. To re over the parameters of the solution planes, we willneed after thisalgorithmasteptonormalizetheparameters(usingEu lide'salgorithm forinstan eto omputetheg d ofthe3denominators). Thisnormalization an bedoneeitherforea h B

q

,oronlyat theend,fortheverti esof  S. For thefun tionAdd voxel, we nally ndaO(q

2

) omplexity,where q isthe numberof voxelsof thepie e of plane.

5.2 De ompose-dis rete-surfa e omplexity

Let us analyze lineby line how this algorithm runs. Let n be the number ofvoxelsa surfelofwhi hisontheobje tsurfa e. Asavoxelhassixfa es, the rstloop(line(1))isdoneexa tly6times. The se ondloop(line(2))is runntimesaswe have nsurfa evoxels. Allthetestsandinstru tionsdone betweenline(3)and line(8)runin onstant time.

The omplexityoftheloopline(9)dependsonthemaximumnumberof elements inTo-Pro ess.

Proposition 2 At step number q (after the q rst voxels) the maximum number of elements in To-Pro essis 4q+4.

Proof: After the pro essing of the rst surfel,we put its 8 neighbors in To-Pro ess. Moreover, we have seeninse tion 4that anysurfelbelonging to a pie e of plane has at least 3 neighbors in thisplane. This means that at any time during the algorithm, ea h surfel of To-Pro ess has at least two neighborsinthislist. Duringthetreatment of onesurfel ofthelist,we deletethis element from the list and we add its 8 neighbors. But, sin eat least 3 of them are already in the list, we add at most 5 forits neighbors. Finally,weaddatmost5 1=4surfelsatea hstep. Hen e,atstepnumber q,thislisthasat most8+4(q 1)=4q+4 elements. 

(13)

isdone inO(q) fora planewith q voxels. Moreover, fora naive plane with q voxels, the fun tion Add voxel runs in O(q

2

), and the loop line (12) in O(8q

2

)=O(q 2

). Allthe testsand instru tionsdone betweenline(14) and (18)runin onstant time. Therestitutionof B line(19)isdone inO(q) as it needs a over of B

save

. Then, we have all the elements to ompute the global omplexityof thisalgorithm asa fun tionof n,thenumberofvoxels whi h have a surfa e surfel,and p, the sizeof thebiggest re ognized pie e ofplane. We get:

6np(2p+8p 2

) whi h leadsto a nal omplexityO(np

3 ).

6 Study on the voxel pro essing order

Duringtheexe utionofthealgorithmDe ompose-dis rete-surfa e,many hoi es have to be done on erningthe order to pro ess thevoxels. Those hoi es have an in uen eon the nal de ompositionwe get: a given setof hoi es indu es a di erent de omposition. Therefore, a study is useful to know ifsome hoi eslead to a \better"de omposition. In thisse tion, we studythisin uen e, omparingtheresultsobtainedwithdi erentstrategies. In the algorithm, three main hoi es are done for the tra king order. Indeed, in line (1), (2), (10) and (12), no details are given on erning the pro essing order for these di erent steps. But we an easily see that the hoi e done in line (10) does not in uen e the result: as our approa h is surfelbased, there ognition doneforone dire tionhas no in uen eon the re ognitionsdonefortheothers. Then,three hoi esremain:

 theoriginof ea h pie e ofplane (line(2));

 thefollowingvoxeltopro essduringthere ognitionofapie eofplane (line(10));

 thetra kingorderofthe8neighborsofagivenvoxelwhi hdetermines thestru tureof thelistTo-Pro ess(line (16)).

In thisstudy,we give aninsightin thein uen eofthe lasttwo hoi es. First,we annoti ethattheorderwe pro essthe8neighborsofa given voxel determines the order in whi h those neighbors are inserted into the list To-Pro ess. Hen e, the planes growing shape depends on two inter-dependant hoi es.

(14)

The rst strategy is also the simplest one to implement. In gure 5, we present rst the8 neighbors tra king and thenthe propagation s heme de-pending on whi h surfel we hoose in the list of surfelsTo-Pro ess. The numbers on the surfels refer to the order in whi h they are added in the listTo-Pro ess. Withthis rstorder, takingthelastelementof thelistat ea h step leads to a very linear propagation s heme. This indu es a main dire tionfortheplanespropagation. Infa t,foranyneighborhoodtra king, hoosing thelast element of thelist leadsto a maindire tion given bythe position of thelast element pro essed duringthe 8 neighborhood tra king. Ifwetakethe rstelementofthelistasafollowingsurfel,wegetthe propa-gation drawnin gure5. Withthistra king,theleft-down ornerisalways treatedbeforetheothersides,andtheexpansionisnotregularnorisotropi . Figure 6 illustratesa se ond strategy. The 8-neighbors tra king is now a lo kwisetra kingaroundthepro essedvoxel(anyothertra kingaround the voxel gives symmetri al results). The propagation obtained with the hoi e of the rst surfelof the list is more isotropi thanthe previous one, even ifthe left-down orner isstillpro essed rstin an irregularway when we getfurtherfrom theplane origin.

The mainproblem with those two strategies is that it is diÆ ult to to handleexa tly thepropagationeven loseto the origin.

A third method is illustrated in gure 7. This 8 neighbors tra king pro esses thevoxels that are loser to theorigin of the pie e of plane rst: thefour4-neighborsare rstpro essed,andthenthefour8-neighbors. Aswe saw that hoosing the last element of the list indu es linear propagations, we just show here the propagation obtained with the hoi e of the rst element. We see that even after a big number of steps, the propagation s heme is always the same: thefour dire tions (\sides") are pro essed one aftertheotherinthe lo kwisedire tion. Duringthepro essingofoneside, thesurfelsarepro esseda ordingto theirdistan e totheorigin. Afterthe pro essing of the 4 sides, the 4 orners are treated. So, the propagation is perfe tlyde ned inthis ase, and isisotropi asea h dire tionis pro essed inthesame wayasanother, even ifone dire tionis pro essed rst.

6.2 Comparison results

In thefollowing, we give some resultsfor the omparison of the3 tra king orders given above. To do this omparison we use the following riterion and obje ts: sin e a sphere is a symmetri obje t in all the dire tions, it wouldbeni eto getpie esofplanesthathavenearly thesame size. Hen e, for a sphere, the standard deviation/average for the size of the re ognized pie esof pla esshouldbeassmallaspossible.

(15)

to the rst strategy on theprevious se tion,order 2 the one orresponding to the se ond one, and order 3 the one orresponding to the third one, independentlyofthe hoi e of thenext voxel to pro ess.

The urvespresentedin gures8and 9 arespline approximationof the dis reteresults.

Inthe rst omparison( gure8),ea hdiagramrepresentsthe urvesfor onegiventra kingorder,andea h urveistheresult hoosingthe rstorthe lastvoxelof the list. For all thestrategies, the generalshape of the urves is haoti . This is due to the dis rete nature of the datas. Nevertheless, the urveshave similarbehaviours: forinstan e,all the urveshave alo al maximum when the radius is 5 or 8. It is quite easy to see that on those three rstgraphs,the urve orrespondingto the hoi eof thelastvoxelof thelistisgloballyworse thantheone orrespondingto the rst voxelofthe list. This suggests that themore isotropi the growingshape is,the better theresult is.

These ond omparisonisdonein gure9. Ifwelookatthese urves,we see that they are really lose one to anotherand that noneis really better than another. In fa t, it seems that for the sphere, those three pro essing order have nearly thesame behavior ifwe onsiderthehomogeneity of the re ognizedpie esof plane.

But, it would be interesting to see if when the radius of the sphere in reases, the global behavior be omes stable, i.e. if one tra king order be omes better than the others, orif the urves always ross whatever the radius is. This leads to some problems of implementation be ause as we workwithinteger fra tionsinthedualspa e,wequi klygetsomevery long integers. The solution is to use a library to handle integers with in nite pre isionand thiswork isnowin progress.

7 Results

Inthis se tion,we willpresent some results about speedperforman esand imagesthat aretheresult of theexposed algorithm.

7.1 Performan e results

(16)

thesolutionnorthevisualization.

As the tra king order does not in uen e in the result for a ube (we always re ognize the 6 fa es), we hoose thetra kingorder that minimizes theliststra kinginthealgorithm,i.e. the rstorder withthe hoi e ofthe last element of the list To-Pro ess. We an moreover noti e that even if hoosing the rst element of the list To-Pro ess indu es a supplementary listtra king inthe omplexity omputation, in pra ti e, this hoi e hasno in iden eonperforman eresults.

We see in gure 10 that the graph is really lose to a straight line. In fa t, ifwe onsiderthe un ertaintiesdueto su h measurements, this result approa hesverywellastraight linewithslope3=4. Thismeansthatforthe ube, thealgorithm runs in O(n

3=4

) if nis the sideof the square,whi h is quitebetter thanthetheoreti al boundfoundin se tion5.

7.2 Results with images

To nish, we give here some image results of this algorithm. Ea h olor orresponds to one pie e of plane. To have a better visualization, if one surfelbelongsto manypie es of planes, we give vi the olorof thepie e of planethat was rst re ognized.

Figure 11presents some reatedand simpleobje ts: two pyramidswith di erent edges and two ubes. On the smallest pyramid, we an see that 4 planes have been re ognized, for the 4 fa es of the pyramid. All those planesare thesame by symmetry: indeed, thenine uppervoxels belong to thefourplanes,andsowe saidthe rstre ognizedplanehasavisualization priority. For the biggest pyramid, we see that we also get the four sides. Our algorithm re ognize the six fa es of a ube, and for a hamfer ube, it re ognizes the plane that uts a vertex of this ube. As for the small pyramid, the visualization priority hides the fa t that the plane that uts the ube is bigger that what is shown: it overlaps all the steps of the ut part.

Figure12givestheresultsforrealobje ts: oneimageofonehandbones; one imageof apie e of vertebrawith highresolution.

8 Con lusion and future work

(17)

numberofsurfa evoxels. Asharperanalysisofthisalgorithmledustostudy the in uen e of the di erent hosen voxels tra king orders and we showed thatforthisalgorithm,thedi erentordersproposeddidnotin uen emu h theresultingde omposition. Inalastpart,wemadesomeperforman etests on ubes of in reasing side, in order to see the pra ti al behavior of this algorithm and to ompare it withthe theoreti al omplexity found. These testsshowedthatforthe ube,pra ti alperforman esareverymu h better thanthe theoreti al omplexity. The lastimages illustrated thepositionof there ognizedpie esof plane forgeneratedand real obje ts.

Thiswork opensmanyfuture prospe ts. First,some pra ti alwork an be doneto improveperforman es: theuseofa librarythathandlesintegers witharbitrarypre isionwillenableto runthisalgorithmonbiggervolumes; itwould alsobe interestingto make thisalgorithmparallel. Asit onsiders su essivelythe6 dire tions of a volume and asthose 6 pro essingsdo not interfere, itwouldbequite easy to pro ess those 6stepsinparallel.

On thetheoreti al side,itwouldbeinterestingto studymore indetails the stru ture of the dual spa e for a pie e of plane as it has been done in 2Dfordis rete linesegments [17 ℄. Thismaygive some pre ision aboutthe theoreti al omplexitybound.

Finally, this paper presented the rst step of a more global goal that onsists in ndinga reversible polyhedrization of any dis rete volume. To get su h a polyhedrization, we need to transform ea h re ognized pie e of planeintoadis retepolygon,ade nitionofwhi hhasbeenproposedin[18 ℄. This supposes that we an de ne and pla e all the edges and the verti es betweenthefoundpie esof plane.

Referen es

[1℄ W.E. Lorensen and H.E. Cline. Mar hing ubes : A high resolution 3d surfa e onstru tionalgorithm. Computer Graphi s,21(4):163{169, 1987.

[2℄ C.E. Kim and A. Rosenfeld. Convex digital solids. IEEE Trans. on Pattern Anal. Ma hineIntell.,PAMI-4(6):612{618, 1982.

[3℄ C.E. Kim and I. Stojmenovi . On the re ognition of digital planes in three dimensionnalspa e. Pattern Re ognition Letters, 32:612{618, 1991.

(18)

dis rets. PhD thesis, Universite Louis Pasteur, Strasbourg, Fran e, 1995.

[6℄ I. Debled-Rennesson andJ.-P.Reveilles. An in remental algorithmfor digitalplanere ognition.InDis reteGeometry for ComputerImagery, pages 207{222, Grenoble, Fran e,September1994.

[7℄ Laurent Papier. Polyedrisation et visualisation d'objets dis rets tridi-mensionnels. PhDthesis,UniversiteLouisPasteur,Strasbourg,Fran e, 1999.

[8℄ L. Papierand J.Fran on. Polyhedrizationof the boundaryof a voxel obje t. In CouprieBertrand and Perroton, editors, Dis rete Geometry forComputerImagery,number1568inLNCS,pages425{434.Springer, 1999.

[9℄ J. Burguet and R. Malgouyres. Strong thinning and polyhedrization of the surfa e of a voxel obje t. In G. Borgefors, I. Nystrom, and G. Sanniti diBaja, editors,Dis reteGeometry for Computer Imagery, volume1953ofLNCS,pages222{234,Uppsala,Sweden,2000.Springer. [10℄ J.-P.Reveilles. Geometrie dis rete, al ul en nombres entiers et

algo-rithmique. PhDthesis, UniversiteLouisPasteur, 1991.

[11℄ E.Andres,R.A harya,andC.Sibata. Dis reteanalyti alhyperplanes. Graphi al Models and Image Pro essing, 59(5):302{309, 1997.

[12℄ J. VittoneandJ.-M. Chassery. Re ognitionofdigitalnaiveplanesand polyhedization. In Dis reteGeometry for Computer Imagery, number 1953 inLNCS,pages 296{307. Springer,2000.

[13℄ JoelleVittone. Cara terisation etre onnaissan ede droiteset deplans engeometrie dis rete.PhDthesis,UniversiteJosephFourier,Grenoble, Fran e,1999.

[14℄ F. P. Preparata and M. I. Shamos. Computational Geometry : An Introdu tion. Springer-Verlag,1985.

[15℄ D.J. Grabiner. Farey nets and multidimensionnal ontinued fra tions. Monath. Math.,114(1):35{61, 1992.

[16℄ P. J. Federi o. Des artes on Polyhedra, volume 4 of Sour es in the history of Mathemati s and Physi al S ien es. Springer, New-York, 1982.

(19)
(20)

linel

pointel

surfel

(a) (b) ( ) (d)

Figure 1: Avoxeland thethree lassi alneighborhoods

(a) (b) ( )

(21)

α

β

γ

Figure 3: Theinitial setof solutions

1

2

3

1

2

3

4

5

Figure 4: A surfelofa pie e of planehasat least 3neighborsinthisplane

V

14

15

16

18

23

22

7

4

2

13

10

1

6

21

20

5

3

0

9

8

11

12

17

19

V0

2

1

0

3

4

8

9

7

6

5

10

11

12

14

13

18

19

17

16

15

22

21

20

V0

(a) (b) ( )

Figure5: Strategy1: (a)the8neighborstra king;(b)propagation withthe rst element of thelistTo-Pro ess;( ) propagationwith thelastelement

V

34

33

30

29

26

25

24

28

8

9

10

13

14

35

36

15

2

1

0

12

27

32

11

7

3

16

37

38

17

4

5

6

23

31

22

21

20

19

18

39

40

41

V0

2

3

4

5

1

0

7

6

9

10

8

11

13

12

V0

(a) (b) ( )

(22)

V

32

30

29

31

33

37

22

13

11

12

21

28

26

10

5

1

6

15

35

34

14

2

0

8

24

25

9

4

3

7

16

36

38

23

19

17

18

20

27

42

40

39

41

43

V0

(a) (b)

Figure7: Strategy3: (a)the8neighborstra king;(b)propagation withthe rst element of thelistTo-Pro ess

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0

2

4

6

8

10

12

14

16

18

stand. dev. / average

radius

"ressens1_first.txt"

"ressens1_last.txt"

(a)

-0.05

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0

2

4

6

8

10

12

14

16

18

stand. dev. / average

radius

"ressens2_first.txt"

"ressens2_last.txt"

(b)

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0

2

4

6

8

10

12

14

16

18

stand. dev. / average

radius

"ressens3_first.txt"

"ressens3_last.txt"

( )

(23)

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0

2

4

6

8

10

12

14

16

18

stand. dev. / average

radius

"ressens1_first.txt"

"ressens2_first.txt"

"ressens3_first.txt"

Figure9: Comparisonforthe 8-neighborstra king order

0.00390625

0.015625

0.0625

0.25

1

4

16

64

256

1024

2

4

8

16

32

64

128

processing time (s)

side

"cubes.dat"

(24)

( )

(25)

( )

Références

Documents relatifs

There are many approaches of either adding event processing to production rule systems or integrating scalable condition pat- tern matching algorithms into event processing engines..

La riflessione sul network museale si è fatta in questi mesi più approfondita, tanto da permettermi di darle un taglio più specifico e puntuale. Il presente paper vuole essere

Following the spatial arrangement of variable and clause elements (see Figure 5), and the rules defined for the connections of negative and positive instances of variables

Definition 1 We call v-gadgets, c-gadgets and l-gadgets the digital objects encoding respectively variables, clauses and literals of a 3-SAT expression.. a b

There seems to be a synchrony between the suspension of speech indicated by the unfilled pause and the suspension of the hand gesture epitomized in the hold gesture; but

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

Questo protocollo viene usato in Windows 2000 per Questo protocollo viene usato in Windows 2000 per condividere file e stampanti tra computer che eseguono condividere file

Sono Sono non dedicati non dedicati i server che, oltre ad offrire i server che, oltre ad offrire risorse alla rete, sono utilizzati correntemente risorse alla rete, sono