[ieee 2010 international conference on artificial intelligence and computational intelligence (aici)...

5
An Integrated Approach To Filling Holes In Meshes Mingqiang Wei 1,2,3 , Jianhuang Wu 1,2,, Mingyong Pang 3 1 Shenzhen Institutes of Advanced Technology, Chinese Academy of Sciences 2 The Chinese University of Hong Kong 3 Department of Educational Technology, Nanjing Normal University The corresponding author: [email protected] Abstract—Data obtained by scanning 3D models typically contains missing pieces and holes. This paper describes an inte- grated approach for filling holes in triangular meshes obtained during the process of surface reconstruction, which consists of three steps: triangulation, refinement and smoothing. The approach first generates a minimal triangulation to the hole, and then iteratively subdivides the patching meshes making it assort with the density of surrounding meshes. Finally, geometric optimization is enforced to the patching meshes for improving regularity. The approach can deal with arbitrary holes in oriented connected manifold meshes. Experimental results on several triangular meshes are presented. Keywords-Hole filling; mesh refinement; mesh smoothing. I. I NTRODUCTION Developing effective methods to reconstruct surface from scanned digital data remains a subject of intensive research [1]. The reconstructed surface can be used in many applications in the fields of CAD modeling, entertainment, and so on. However, during scanning process, several factors such as occlusion, low reflectance or even missing pieces in the original geometry can lead to incomplete data. Surface with holes is not usually aesthetically appealing while rendering. Furthermore, incomplete surface often results in dissatisfied situation in computer graphics and modeling where only closed and watertight objects can be handled. The incomplete data can also cause some problems when some surface fitting and surface parameterization techniques are applied on it. In short, filling holes on model is the task of removing artifacts from a geometric model to produce an output model such as it is suitable for further processes with certain quality requirements on their input [2]. A. related work To the best of our known, most model filling algorithms can roughly be classified to two categories: surface oriented or volumetric. Surface oriented algorithms deal with the input data directly and try to explicitly recognize and remove the artifacts on the surface. Holes can be repaired by triangulation that minimizes a certain error measure. Surface oriented algo- rithms only minimally perturb the input model and are able to preserve the model structure in the areas that are away from artifacts. Furthermore, these algorithms introduce only a limited number of additional triangles. Barequet and Sharir [3] utilize a dynamic programming method to find a minimum area triangulation of a 3D polygon in order to fill mesh holes. Carr et al. [4] use RBFs to compute thin-plate interpolations of holes in scattered height data, the technique can be extended to variational implicit surfaces. Szeliski and Tonnesen [5] use oriented particles to extend and interpolate sparse 3D data. Liepa [6] proposes a surface oriented method to smoothly fill holes such that the vertex densities around the holes are interpolated. Borodin et al. [7] propose an algorithm to consistently orient the normals by taking visibility information into account. To ensure a valid output, surface oriented algorithms usu- ally require that the original data satisfying certain quality requirements (error tolerances). These requirements can not be guaranteed or even be checked automatically, thus the algorithms often can not automatically performed, and need some user interaction and manual post-processing [1]. Volumetric algorithms transform input model into an intermediate volumetric representation from which the output model is then extracted. A volumetric representation is a partition of space. The space is divided into a set of cells and each cell can be classified as either being inside or outside. The interface between inside and outside cells then defines the topology and the geometry of the reconstructed model. The most well-known volumetric method is presented by Curless and Levoy in [8]. Later, Davis et al. propose a volumet- ric method that diffuses a signed distance function into empty regions of the volume [9]. Nooruddin et al. [10] use ray-casting and filtering to convert the triangle soup into a volumetric representation from which they extract a consistent, watertight model. Shen et al. [11] create an implicit representation by generalizing the moving least squares approach from point sets to triangle soups. Podolak et al. [12] cast hole filling as a graph-cut problem and propose an algorithm that is guaranteed to produce non-intersecting patches. Pauly et al. [13] use a database of geometric priors from which their method selects appropriate shapes to fill in regions of missing data. Bischoff et al. [14] propose an improved volumetric technique to repair arbitrary triangle soups. With this technique, user can provide an error tolerance and a maximum diameter to control the filling operating. However, volumetric representations do not allow for arti- facts such as intersections, holes, gaps, overlaps or inconsistent normal orientations. The number of triangles in the output of a volumetric algorithm is usually much bigger than that of the input model, and the models thus have to be decimated in a post-processing step. On the other hand, the quality of 2010 International Conference on Artificial Intelligence and Computational Intelligence 978-0-7695-4225-6/10 $26.00 © 2010 IEEE DOI 10.1109/AICI.2010.302 306 2010 International Conference on Artificial Intelligence and Computational Intelligence 978-0-7695-4225-6/10 $26.00 © 2010 IEEE DOI 10.1109/AICI.2010.302 306

Upload: mingyong

Post on 16-Mar-2017

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: [IEEE 2010 International Conference on Artificial Intelligence and Computational Intelligence (AICI) - Sanya, China (2010.10.23-2010.10.24)] 2010 International Conference on Artificial

An Integrated Approach To Filling Holes In MeshesMingqiang Wei1,2,3, Jianhuang Wu1,2,∗, Mingyong Pang3

1Shenzhen Institutes of Advanced Technology, Chinese Academy of Sciences2The Chinese University of Hong Kong

3Department of Educational Technology, Nanjing Normal University∗The corresponding author: [email protected]

Abstract—Data obtained by scanning 3D models typicallycontains missing pieces and holes. This paper describes an inte-grated approach for filling holes in triangular meshes obtainedduring the process of surface reconstruction, which consistsof three steps: triangulation, refinement and smoothing. Theapproach first generates a minimal triangulation to the hole,and then iteratively subdivides the patching meshes making itassort with the density of surrounding meshes. Finally, geometricoptimization is enforced to the patching meshes for improvingregularity. The approach can deal with arbitrary holes in orientedconnected manifold meshes. Experimental results on severaltriangular meshes are presented.

Keywords-Hole filling; mesh refinement; mesh smoothing.

I. INTRODUCTION

Developing effective methods to reconstruct surface fromscanned digital data remains a subject of intensive research [1].The reconstructed surface can be used in many applicationsin the fields of CAD modeling, entertainment, and so on.However, during scanning process, several factors such asocclusion, low reflectance or even missing pieces in theoriginal geometry can lead to incomplete data. Surface withholes is not usually aesthetically appealing while rendering.Furthermore, incomplete surface often results in dissatisfiedsituation in computer graphics and modeling where onlyclosed and watertight objects can be handled. The incompletedata can also cause some problems when some surface fittingand surface parameterization techniques are applied on it. Inshort, filling holes on model is the task of removing artifactsfrom a geometric model to produce an output model suchas it is suitable for further processes with certain qualityrequirements on their input [2].

A. related work

To the best of our known, most model filling algorithmscan roughly be classified to two categories: surface orientedor volumetric.

Surface oriented algorithms deal with the input datadirectly and try to explicitly recognize and remove the artifactson the surface. Holes can be repaired by triangulation thatminimizes a certain error measure. Surface oriented algo-rithms only minimally perturb the input model and are ableto preserve the model structure in the areas that are awayfrom artifacts. Furthermore, these algorithms introduce only alimited number of additional triangles.

Barequet and Sharir [3] utilize a dynamic programmingmethod to find a minimum area triangulation of a 3D polygon

in order to fill mesh holes. Carr et al. [4] use RBFs to computethin-plate interpolations of holes in scattered height data, thetechnique can be extended to variational implicit surfaces.Szeliski and Tonnesen [5] use oriented particles to extendand interpolate sparse 3D data. Liepa [6] proposes a surfaceoriented method to smoothly fill holes such that the vertexdensities around the holes are interpolated. Borodin et al. [7]propose an algorithm to consistently orient the normals bytaking visibility information into account.

To ensure a valid output, surface oriented algorithms usu-ally require that the original data satisfying certain qualityrequirements (error tolerances). These requirements can notbe guaranteed or even be checked automatically, thus thealgorithms often can not automatically performed, and needsome user interaction and manual post-processing [1].

Volumetric algorithms transform input model into anintermediate volumetric representation from which the outputmodel is then extracted. A volumetric representation is apartition of space. The space is divided into a set of cells andeach cell can be classified as either being inside or outside.The interface between inside and outside cells then defines thetopology and the geometry of the reconstructed model.

The most well-known volumetric method is presented byCurless and Levoy in [8]. Later, Davis et al. propose a volumet-ric method that diffuses a signed distance function into emptyregions of the volume [9]. Nooruddin et al. [10] use ray-castingand filtering to convert the triangle soup into a volumetricrepresentation from which they extract a consistent, watertightmodel. Shen et al. [11] create an implicit representation bygeneralizing the moving least squares approach from pointsets to triangle soups. Podolak et al. [12] cast hole filling as agraph-cut problem and propose an algorithm that is guaranteedto produce non-intersecting patches. Pauly et al. [13] use adatabase of geometric priors from which their method selectsappropriate shapes to fill in regions of missing data. Bischoffet al. [14] propose an improved volumetric technique to repairarbitrary triangle soups. With this technique, user can providean error tolerance and a maximum diameter to control thefilling operating.

However, volumetric representations do not allow for arti-facts such as intersections, holes, gaps, overlaps or inconsistentnormal orientations. The number of triangles in the output ofa volumetric algorithm is usually much bigger than that ofthe input model, and the models thus have to be decimatedin a post-processing step. On the other hand, the quality of

2010 International Conference on Artificial Intelligence and Computational Intelligence

978-0-7695-4225-6/10 $26.00 © 2010 IEEE

DOI 10.1109/AICI.2010.302

306

2010 International Conference on Artificial Intelligence and Computational Intelligence

978-0-7695-4225-6/10 $26.00 © 2010 IEEE

DOI 10.1109/AICI.2010.302

306

Page 2: [IEEE 2010 International Conference on Artificial Intelligence and Computational Intelligence (AICI) - Sanya, China (2010.10.23-2010.10.24)] 2010 International Conference on Artificial

Fig. 1. The main pipeline of our algorithm: (a) Finding holes on the originalmodel; (b) Triangulating the hole; (c) Splitting the new generated trianglesand relaxing the corresponding edges of them; (d) Smoothing the patchingmeshes.

the output triangles often are poor and it has to be improvedafterwards. Finally, volumetric representations are quite mem-ory consuming ,and it is therefore hard to run them at highresolutions.

B. contributions

We have surveyed existing methods which influences thetechniques used in this paper, and improved them to producea much more desirable output. Our integrated approach, whichdeals with arbitrary holes in oriented and connected manifoldmeshes, includes some important parts of hole triangulation,mesh refining and mesh smoothing. Fig. 1 illustrates thepipeline of our method by a magnified local parts obtainedfrom Stanford Bunny.

II. HOLE TRIANGULATION

To fill a hole, we should first identify it. In fact, the holeis a closed loop of boundary edges in meshes (also can beseen as a 3D polygon). Since the constraint that the mesh isoriented connected 2-manifold surface, it becomes very easyto locate the hole. To our knowledge, Barequet and Sharir [3]first described a general 3D polygon triangulation which isa basic building block of many other hole filling algorithms.Later, Liepa [6] considered to minimize dihedral angles ofneighboring triangles rather than the area in the process oftriangulation that can operate on holes with crenellations (see[6] for more detail). The idea behind our approach in thispaper is based on an improving strategy, which also aims tocreate a triangulation of a polygon P0, ..., Pn−1 to minimizea set of given weight functions.

Let Φ(i, j, k) be a weight function defined on the setof all triangles PiPjPk that could possibly appear duringconstruction of the triangulation and let wij be the minimumtotal weight that can be achieved in triangulating the polygonPi, ..., Pj ,0 ≤ i < j < n. Then the triangulation algorithmcan be described as following steps:

1. For i = 0, 1, ..., n − 2, let wi,i+1 := 0 and for i =0, 1, ..., n− 3, let wi,i+2 := Φ(i, i + 1, i + 2). Put j:=2.

2. Put j := j + 1, For i = 0, 1, ..., n− j − 1 and k = i + jlet wi,k := mini<m<k[wi,m +wm,k +Φ(vi, vm, vk)]. Let Oi,k

be the index m such as the minimum is achieved.3. If j < n− 1, then go to step 2; Otherwise, the weight of

the minimal triangulation is w0,n−1.4. Let S := ∅ and call the recursive function Trace with the

parameters (0, n − 1).

Fig. 2. A triangulation for polygon (i, ..., j) where Oi,j = m that createsa triangle (i, m, j).

Function Trace (i, k):If (i + 2) = k thenS := S

⋃�vivi+1vk;else do:a. let o = Oi,k;b. if o �= i + 1 then Trace (i, o);c. S := S

⋃�vivovk;d. if o �= k − 1 then Trace (o, k)

At the termination of the algorithm, S contains the requiredtriangulation of polygon P . Fig. 2 simply illustrates theprocess of triangulation.

Barequet and Sharir [3] assign Φ(i, j, k) the area of the tri-angle (i, j, k) to yield a minimum area triangulation. Liepa [6]suggests that a weight function Φ(i, j, k) should be designedto take into account the dihedral angles between neighboringtriangles as well as areas of triangles. But if the holes areextremely irregular, the output meshes may be non-manifold,just as shown in the middle of Fig. 3. For polygon Pi, ..., Pj ,we make a strategy that the angles of the potential trianglePiPkPj , i < k < j, are first taken into account. The minimalangle of triangle (PiPkPj) is maximized. Then the dihedralangles and area are considered at the same time. Thus wedefine tripes asΦ(i, j, k) = (α, β, A),where α is the maximized minimal angle of triangle (PiPkPj),i < k < j, and β is the maximal dihedral angle betweentriangle (PiPkPj) and its neighborhoods and A is the areaof triangle (PiPkPj). The ordering in Φ is designed to giveprecedence to α over β, and β over A:(α1, β1, A1) < (α2, β2, A2) ⇔ (α1 > α2) ∨ (α1 = α2 ∧ β1 <β2) ∨ (αa = α2 ∧ β1 = β2 ∧ A1 < A2).

The addition operator sums area but retains the maximizedminimal angle and the “worst”(i.e., largest) dihedral angle:(α1, β1, A1) + (α2, β2, A2) :=(min(α1, α2), max(β1β2), A1 + A2).

The area and minimal angle of triangle (PiPkPj) canbe calculated easily, and how to compute the dihedral an-gle between triangle (PiPkPj) and its neighboring triangles,please see [6] for a reference. Using this weighting function,the triangulation algorithm can produce a triangulation thatmaximize the minimal angle of triangle (PiPkPj), i < k < j,see the image on the right hand size in Fig.3.

III. REFINEMENT

Pfeifle and Seidel [15] employ mesh refinement techniquesto fill holes in piecewise polynomial surfaces, after finding

307307

Page 3: [IEEE 2010 International Conference on Artificial Intelligence and Computational Intelligence (AICI) - Sanya, China (2010.10.23-2010.10.24)] 2010 International Conference on Artificial

Fig. 3. Left: the original mesh with holes created by geometric modeling method; Middle: the repaired mesh created by Liea’s method. Right: the repairedmesh created by our method.

a spanning triangulation in 2D (parametric) space. Liepa [6]modifies Pfeifle and Seidel’s method to refine the patchedmesh and make it interpolating the density of surroundingmesh. The main idea of our method is first to compute edgelength data for the vertices on the hole boundary and thendiffuse these values into the interior to patching mesh, finallysubdivide triangles to reduce edge lengths [6], and relax theinterior edges to maintain a Delaunay-like triangulation [16].The refinement algorithm is given as following:1. For each vertex vi on the hole boundary, denote by thescale attribute ϕ(vi) the average length of the edges, whichare adjacent to vi and the surrounding mesh. Initialize thepatching mesh as the given hole triangulation.2. For each triangle (vi, vj , vk) in the patching mesh, com-pute the centroid vc and the corresponding scale attributeϕ(vc) = (ϕ(vi)+ϕ(vj)+ϕ(vk)/3).For m = i, j, k, if τ‖vc −vm‖ > ϕ(vc) and τ‖vc − vm‖ > ϕ(vm), then replace triangle(vi, vj , vk) with triangle (vc, vj , vk),(vi, vc, vk),(vi, vj , vc) inthe patching mesh and relax the edges (vi, vj),(vi, vk) and(vj , vk).3. If no new triangles are created in Step 2, the patching meshis completed.4. Relax all interior edges of the patching mesh.5. If no edge is swapped in Step 4, go to Step 2. Otherwise,go to Step 4.

In the refinement algorithm, we denote by τ the densitycontrol factor which is a user-specified parameter. In thispaper, we found 1 ≤ τ ≤ √

2 produces a patching mesh thatvisually matches the density of the surrounding mesh.

IV. SMOOTHING

In this section, we show how our method smoothes the meshto improve its regularity by using Laplacian flow.

The two most popular approaches for smoothing polygonalsurfaces are minimizing energy functionals associated withdifferential-geometric surface characteristics and Laplaciansmoothing [17] method, respectively. How to minimize anenergy functional for smoothing is often a computationally ex-pensive work. As we know, the energy minimization smooth-

Fig. 4. The umbrella vector U(p) of Laplacian smoothing operator.

ing operator lacks local shape control. But the Laplaciansmoothing is a simple, fast, and so far the most commontechnique for mesh smoothing. In the simplest form, the lapla-cian smoothing flow repeatedly and simultaneously moveseach vertex of mesh by a displacement equal to a positivescale factor times the difference between the average of theneighboring vertices and the vertex itself.

Consider a mesh vertex P and its neighbors Q1, ..., Qn. TheLaplacian flow is determined by the umbrella vector U givenby

U(p) =1n

n∑

i=1

Qi − P.

See Fig. 4 for a reference.The Laplacian operation is iteratively performanced to the

patching mesh before our method switches it off. In fact, theLaplacian smoothing flow can be considered as the gradientdescent flow for a simple quadratic energy functional. How-ever, due to its simplicity the Laplacian flow offers manyopportunities for modifications and improvements of meshregularity (see [17] for more detail).

V. RESULTS

The proposed method was implemented by Visual C++ 6.0on 1.86 GHz PIII with 512 MBytes memory and OpenGLgraphics hardware. Fig.5 illustrates some examples of the holefilling results. Tab.I and II show some statistic data obtainedfrom our method. Fig. 6 demonstrates the valence of vertex inpatching mesh from the bunny model.

308308

Page 4: [IEEE 2010 International Conference on Artificial Intelligence and Computational Intelligence (AICI) - Sanya, China (2010.10.23-2010.10.24)] 2010 International Conference on Artificial

Fig. 5. Top: left, a sphere surface with a complex hole; middle, max-min angle triangulation; right, refined and smoothed mesh, τ = 1.0. Middle: left, aheart-like surface with a complex hole; middle, max-min angle triangulation; right, refined and smoothed mesh, τ =

√2. Bottom: left, a Stanford Bunny with

3 holes; middle, max-min angle triangulation; right, refined and smoothed mesh, τ = 1.0.

TABLE ITHE HOLE NUMBER, BOUNDARY VERTEX NUMBER (BV NUM.) AND EACH

STAGE’S TIME (INCLUDING TRIANGULATION (TRI), REFINEMENT(REF)AND SMOOTHING (SMO) TIME) ARE ILLUSTRATED.

Model Holes BV Tri Ref Smonum. num. time(sec.) time(sec.) time(sec.)

Sphere 1 406 60.86 0.016 0.172Heart 1 493 109.1 0.063 0.468

258 15.688 0.140Bunny 3 56 0.156 0.016 7.635

54 0.140 0.016

VI. CONCLUSIONS

In this paper, we present a robust and integrated approachfor filling arbitrary holes in oriented connected manifoldmeshes. The approach consists of three steps: hole trian-

TABLE IITHE NEW GENERATED VERTEX NUM. ON PATCH (DENOTED AS VNOP),FACE NUM. ON PATCH (DENOTED AS FNOP), THE ORIGINAL VERTICES

NUM (DENOTED AS OVN), AND THE ORIGINAL TRIANGLES NUM.(DENOTED AS OTN) ARE ILLUSTRATED.

Model VNOP TNOP. OVN OFN

Sphere 4 412 1733 3058Heart 331 1153 1205 1915Bunny 1319 3000 33144 65922

gulation, refinement and smoothing. Because of using themax-min angle strategy combined with min-max dihedralangles and minimal area, when processing the irregular holes,our algorithm can generate the more desirable output thanLiepa[6] and Barequet’s [3] methods. But due to the O(n3)

309309

Page 5: [IEEE 2010 International Conference on Artificial Intelligence and Computational Intelligence (AICI) - Sanya, China (2010.10.23-2010.10.24)] 2010 International Conference on Artificial

Fig. 6. The vertex valence of the patching mesh from Stanford Bunny isillustrated.

performance complexity of the triangulation algorithm, holeswith boundaries consisting of hundreds of edges can takesseveral minutes as opposed to seconds (see Tab. 1 for moredetail). This paper’s approach is much more suitable for fillingsmall holes in meshes reconstructed from clouds of points. Aninteresting extension of the techniques in this paper would beto fill gaps between surfaces, or holes with islands.

Acknowledgments

This work was supported by the National Natural ScienceFoundation of China (Grant No.60873175, No. 60803108),the Natural Science Foundation of the Jiangsu Higher Educa-tion Institutions of China (Grant No.07KJD460108), and theOutstanding High-end Talent Foundation of Nanjing NormalUniversity (Grant No.2007013XGQ0150). The bunny modelis from the Stanford 3D Scanning Repository.

REFERENCES

[1] Y Ohtake, A Belyaev, H.-P. Seidel, “An integrating approach to meshingscattered data,” In Proc. of the 2005 ACM symposium on Solid andphysical modeling, 2005, pp. 61–69.

[2] M Botsch, M Pauly, L Kobbelt, “Geometric modeling based on polygonalmeshes,” ACM SIGGRAPH 2007 Course Notes, 2007, pp. 1–181.

[3] G Barequet, M Sharir, “Filling gaps in the boundary of a polyhedron,”Computer-Aided Geometric Design, 1995, vol. 12, pp. 207–229.

[4] J.C Carr, W.R Fright, R.K Beatson, “Surface interpolation with radialbasis functions for medical imaging,” IEEE Transactions on MedicalImaging, 1997, vol. 16, pp. 96–107.

[5] R Szeliski, D Tonnesen, “Surface modeling with oriented particle sys-tems,” In Proc. of ACM SIGGRAPH 92, 1992, vol. 26, pp. 185–194

[6] P Liepa, “Filling holes in meshes,” In Symposium on Gemetry Processing,2003, pp. 200–205.

[7] P Borodin, G Zachmann, R Klein, “Consistent normal orientation forpolygonal meshes,” In Proc. of Computer Graphics International(CGI),2004, pp. 18–25.

[8] B Curless, M Levoy, “A volumetric method for building complex modelsfrom range images,” In Proc. of ACM SIGGRAPH 96, 1996, 303–312.

[9] J Davis, S Marschner, M Garr, “Filling holes in complex surfaces usingvolumetric diffusion,” In Proc. International Symposium on 3D DataProcessing, Visualization, Transmission, 2002, pp. 428–438.

[10] F.S Nooruddin, G Turk, “Simplification and repair of polygonal modelsusing volumetric techniques,” IEEE Transactions on Visualization andComputer Graphics, 2003, vol. 9, pp. 101–205.

[11] C Shen, J.F O’Brien, J.R Shewchuk, “Interpolating and approximatingimplicit surfaces from polygon soup,” In Proc. of ACM SIGGRAPH 04,2004, pp. 896–904.

[12] J Podolak, S Rusinkiewicz, “Atomic volumes for mesh completion,” InProc. of Symposium on Geometry Processing, 2005, pp. 33–41.

[13] M Pauly, N Mitra, M Giesen, “Example-based 3d scan completion,” InProc. of Symposium on Geometry Processing, 2005, pp. 23–32.

[14] S Bischoff, D Pavic, L Kobbelt, “Automatic restoration of polygonmodels,” Transactions on Graphics, 2005, vol. 24, 1332–1352.

[15] R Pfeifle, H.-P. Seidel, “Triangular B-splines for blending and filling ofpolygonal holes,” In Proc. of Graphics Interface 96, 1996, pp. 186–193.

[16] J.R Shewchuk, “Triangle: engineering a 2d quality mesh generatorand delaunay triangulor,” In Proc. of the First Workshop on AppliedComputational Geometry, 1996, pp. 123–133.

[17] Y Ohtake, A Belyaev, H.-P. Seidel, “Mesh regularity and adaptivesmoothing,” Computer-Aided Design, 2001, vol. 33, 789–800.

310310