Feb 27, 2003 - structing a graph that approximates a wire frame of an unknown ..... html. [2] F. Bernardini, J. Mittleman, H. Rushmeier,. C. Silva, and G. Taubin.
Extended version
Israel-Korea 2003
February 27, 2003
Surface Reconstruction of Freeform Objects Based on Hierarchical Space Decomposition Sergei Azernikov
Anath Fischer
Laboratory for Computer Graphics and CAD, Faculty of Mechanical Engineering, Technion, Haifa, Israel 32000 phone: 972-4-8293260, fax: 972-4-8324533 email: {mesergei,meranath}@techunix.technion.ac.il
Abstract
process of reconstructing a CAD model from an existing physical object is known as Reverse EngineerThis paper describes a new and fast method for re- ing(RE). This problem has been discussed in detail constructing a 3D computerized model from a cloud by Varady et al. [20]. Examples of situations where of points sampled from the object’s surface. The pro- the RE problem arises are as follows: posed method aggregates very large scale 3D scan• The physical part resides at a single site of the ning data into a Hierarchical Space Decomposition distributed design system and it should be deModel (HSDM), realized by the Octree data struclivered and reproduced at other sites. ture. This model can represent both the boundary surface and the interior volume of an object. Based • The part was designed and manufactured before on the proposed volumetric model, the boundary rethe computerization era. construction process becomes more robust and stable with respect to sampling noise. The hierarchical • The 3D model of a part exists but is not accesstructure of the proposed volumetric model enables sible because of commercial restrictions. data reduction, while preserving critical geometrical features and object topology. As a result of data • The part is a sculptured clay mock-up. reduction, the execution time of the reconstruction process is significantly reduced. Moreover, the pro- In all these cases, a fast and reliable reconstruction posed model naturally allows multiresolution bound- approach is required. Currently, the digitizing proary extraction, represented by a mesh with regular cess in industry is usually performed with a manproperties. ual mechanical touch probe (CMM) or a laser scanThe proposed surface reconstruction approach is ner. The next step is interpreting the data sampled based on Connectivity Graph extraction from HSDM, by the scanner in real-time. Contemporary commerand facet reconstruction. This method’s feasibility cial CAGD systems (i.e. CATIA [6]) supply surface will be presented on a number of complex objects. reconstruction packages. Nevertheless, these packages require massive designer intervention in order CR Descriptors: I.3.5 [Computer Graph- to achieve an accurate resulting surface. ics]: Computational Geometry and Object Modeling J.6 [Computer-Aided Engineering]: Computer1.2 Problem statement Aided Design (CAD) . This work addresses the problem of reconstructing a Keywords: Surface reconstruction ,reverse engicomputerized model from a sampled physical object. neering, Octree, multiresolution. In the literature this problem is known as the surface reconstruction problem and can be stated as follows:
1 1.1
Introduction Motivation
In traditional industries, a part often has to be reproduced when its 3D computer model is missing. The
Problem 1.1 Given a cloud of points P sampled from an unknown object O, reconstruct a surface S that approximates O, while preserving its topology and features.
The sampling process usually involves noise, so the sampled points are an approximation under some tolerance. Thus, we choose not to constrain the surface S to interpolate the sampled points. Instead we are interested in an approximation, while preserving topology and critical features such as sharp edges and corners common in mechanical parts. The properties required from the reconstructed surface model S are as follows: • It should have the same topology as O. • It must be a geometrical approximation of O. • It has to preserve critical features such as sharp edges and corners. • It has to be represented as a mesh in a commercial format suitable for CAD applications, such as Stereo Lithography manufacturing, Finite Element simulation, etc.
2
Overview
During the last decade, researchers from the fields of image processing, computational geometry, and computer graphics have proposed different approaches for the surface reconstruction problem, utilizing methods common in those fields. Following is an overview of these approaches with respect to RE. In the image processing field, the surface reconstruction problem can be basically considered a special case of the segmentation problem in R3 . In the last two decades, the focus has been on developing fast and robust algorithms for 2D segmentation. The mainstream of those algorithms is based on the active contours or ”snakes” notion introduced by Terzopoulos et al.[13]. The idea behind this method is as follows: starting from an initial bounding contour, change its position according to a predefined energy functional. That is, an elastic boundary is deformed under the exterior forces, elastic forces and constraints inherent in the input data. The same approach can be applied to segmentation of 3D images (i.e. MRI). Starting from an initial bounding surface, deform it towards the boundary of the desired object. Recently, Doi et al. [9] used the 3D Active Grid model for volumetric medical data. This approach extends the idea of a deformable surface to a nonrigid volume. The main drawback of these imageprocessing algorithms is the relatively high number of user-specified parameters. In order for the active contour to be attracted to the object’s boundary, the forces applied on the contour must be tuned. This depends on the curvature of the object’s boundary, sampling noise and other factors. Another difficulty with these algorithms is their computational complexity.
Their iterative nature and heavy dependence on the initial condition make them unusable in real-time automatic systems. Computational geometry studies have focused on piecewise-linear interpolation of unorganized points. Most of the algorithms in this field define the reconstructed surface as a carefully chosen sub-set of Delaunay triangulation in 3D space. These algorithms start from the convex hull of the points set and then subtract the redundant entities in order to accommodate the space portion surrounded by the points set. Boissonat [4] applied the Delaunay triangulation to the points convex hull. Then, redundant tetrahedra were eliminated, preserving manifoldness of the exterior surface. To define the order of the tetrahedra to be removed, some geometrical measures were predefined. Recently, Amenta and Bern [1] proposed a method that eliminates triangles from the Delaunay triangulation using Voronoi filtering. Edelsbrunner and M¨ ucke in [10] introduced the alpha shape structure. Alpha shape associated with a set of points is a subcomplex of the Delaunay triangulation, which consists of simplices whose circumsphere of radius is at most α. Bernardini et al. [3] improved the alpha shape structure as follows: (1) automatic selection of an optimal α value, (2) sharp edge detection and (3) piecewise algebraic implicit surface fitting. Alpha shapes have been proven to be a precise and elegant representation of reconstructed smooth surfaces. However, if the sampling process is noisy or the original surface is rough, the alpha shape of the points set will not be a 2-manifold. It might suffer from residuals, depending on the α value. Mencl and M¨ uller [16] proposed a graph-based surface reconstruction method. This method is based on constructing a graph that approximates a wire frame of an unknown surface. This wire frame is later filled with triangles applying several restricting rules. Our approach utilizes this graph-based surface description in Section 3.2.1. As was mentioned above, computational geometry surface reconstruction approaches interpolate the data points. These approaches provide high performance for noiseless data. However, if the noise is significant, approximating the surface is preferable to interpolating it through the data points. In the fields of computer graphics and computer aided geometric design, researchers have focused on the visual quality of the resulting model. For this reason, methods in those fields do not constrain the surface to interpolate the sampled points. Instead, the surface is traversed between the points, while the maximal error is bounded by the user. A well-known reconstruction algorithm in the computer graphics community is that of Hoppe [11]. This method consists of three phases: (1) initial mesh reconstruction, (2) mesh optimization and (3) piecewise-smooth sub-
division surface optimization. We are mainly interested in the first phase [12], because our approach addresses the initial mesh reconstruction problem. As a first step of this algorithm, a tangent plane is associated with every sub-set of sampled points by Least Squares Fitting. Then, normal directions are propagated through smooth, low curvature regions. Finally, a triangular iso-surface is extracted using the Marching Cubes algorithm. This method worked effectively on real test cases and objects with arbitrary topology. However, meshes produced by the Marching Cubes algorithm suffer from nearly singular triangles and bad approximation of sharp features. Moreover, there are certain situations where this approach fails. Curless and Levoy [7] present the drill bit as an example of such a case. Instead, they propose a volumetric approach which exploits the fact that the cloud of points is a collection of laser range images. This assumption makes the reconstruction process much more robust, because in this case the scanner projection plane can be found and utilized. Unfortunately, this assumption restricts the applicability of the system to objects which are scanned by laser range devices. This method is based on defining a volumetric distance function from a set of range images and approximating a surface which is a zero set of this function.
requires optimization because of bad aspect ratio triangles. Ohtake and Belyayev [17] observed the duality(to the original surface) of meshes produced by the Marching Cubes algorithm and proposed dual/primal optimization in order to improve these meshes, especially in high curvature regions. This method is based on projecting the reconstructed mesh vertices on surface tangent planes using the normal direction. It cannot be directly utilized for a surface reconstruction, but rather for optimizing low quality meshes reconstructed by other algorithms (i.e. Marching Cubes). Our approach is based on the duality observation mentioned above.
3
The Approach
This research proposes a fast and robust approach to initial mesh reconstruction. The goal is to improve the geometry approximation, especially at high curvature regions, and to improve the quality of the mesh during this early phase of the reconstruction process. The advantages of the proposed method with respect to previous works can be summarized as follows: • Reconstructs the meshes in real time. • Produces high quality meshes for real data.
As noted by Hoppe et al. [12], the major obstacle in the surface reconstruction process is consistent normal orientation. Contemporary scanning devices (i.e. 3D cameras) are capable of associating a normal direction with each sample point. Surface approximation can be significantly improved by utilizing this additional information. A number of works make use of normal direction information and are related to our approach, some of which are mentioned bellow. Bernardini et al. [2] proposed a Delaunay triangulation based method called the ball-pivoting algorithm. In this method, triangles are created incrementally by pivoting a ball with user-specified radius around sampled points. In order to correctly recover the topology of an object, this method utilizes a normal consistency criterion. The same criterion is used by our approach in Section 3.4. As with most reconstruction methods in the field of computational geometry, this method interpolates the data points. This becomes a drawback when the data contains a significant amount of noise. Recently, Kobbelt et al. [14] proposed an improved surface extraction technique based on feature sensitive sampling. Feature location is estimated using the normal direction. In this work, the authors extended the distance function notation from the scalar to the vector field and proposed an improved version of the Marching Cubes algorithm. The resulting triangular mesh very closely approximates the sharp features of an object, though it still
• Preserves critical geometric features. • Reconstructs multi-resolution meshes. • Reconstructs meshes with complex topology. • Bounds the reconstructed surface error. • Is simple to implement. While previous works partially fulfilled these requirements, our approach meets all of them simultaneously. Another contribution of this work is that the proposed method can be applied in real time on a common hardware configuration. This is extremely important for bringing RE technology to the designer’s desktop or even for home users. Our approach is based on connectivity graph approximation from a hierarchical space decomposition model and facet reconstruction. For geometry approximation we utilize vertex clustering method introduced by Rossignac and Borrel [19] for a complex scene simplification. Unlike other methods (i.e. [12, 3]), we do not define a distance function from sampled points and extract its zero contour, but rather directly reconstruct the approximating surface of the sampled points. Moreover, our approach enables integration of additional normals information, with the exception of the point geometric position.
The proposed approach is based on number of The proposed approach consists of three main simple observations. We start a description of our phases presented in Figure 3: (1) HSDM construcmethod from presenting these observations. tion from a cloud of points, (2) surface extraction, and (3) feature classification. In the following secObservation 3.1 Approximation produced by tions we will describe the role of each phase in the Marching Cubes algorithm is usually dual to sharp reconstruction process. features of an original manifold. Figure 1 illustrates this observation by 2-dimensional example.
(a)
(b)
Figure 1: Curve reconstruction: original curve is in red dots (a) approximation with Marching Cubes in green, (b) approximation with Connectivity Graph in blue. It can be observed that a behavior of the original curve better preserved in Figure 1(b). Observation 3.2 Explicit normal direction propagation is very sensitive to high curvature. Contrary facet orientation propagation implicitly dictates consistency of the normal direction and is indifferent to sharp edges. Figure 2 illustrates this observation.
3.1
Phase 1 - Hierarchical space decomposition
Contemporary digitizing scanning devices are capable of generating huge clouds of points, sampled from the surface of a 3D object. In the case of unordered sampled points, processing will lead to O(n2 ) time complexity operations, which are unsuitable for real-time applications. In the proposed approach, a cloud of points is inserted into the Hierarchical Space Decomposition Model (HSDM) in order to overcome this obstacle. As a result, the cloud is aggregated into voxels. This procedure can be considered a sorting of the point set into a 3D grid. The 3D grid is divided recursively, and every voxel is stored as a node in the Maximal Division Classical Octree (MDCO) structure introduced by Meagher [15]. The terminal voxel size is a user-specified parameter. It is bounded from above by a feature size to be recovered, and from bellow by a point cloud density. Every octree voxel ν is referred to as a Voronoi region of an unknown site. Thus we associate a single vertex with each voxel, contrary to the Marching Cubes family algorithms, which associate a set of faces with each voxel. Optimally, the geometric entity associated with the voxel should be dictated by the surface behavior inside the voxel. This idea motivated Brunet [5] to introduce an Extended Octree notation. In this approach, every voxel of the Extended Octree is classified into one of three categories: face, edge and vertex node, depending on the
Cloud of Points ? Hierarchical Space Decomposition ? Surface Extraction Connectivity Graph Extraction (a)
(b)
? Facet Reconstruction Figure 2: Orientation propagation: (a) obtuse angle, (b) acute angle.
? Feature Classification In both configurations orientation of the facets stays consistent, while normal direction in Figure 2(b) is opposite.
Figure 3: Reconstruction process based on HSDM.
(a)
(b)
(c)
(d)
(e)
Figure 4: Reconstruction process phases: (a) point cloud, (b) HSDM, (c) connectivity graph, (d) facets reconstruction and (e) anisotropic smoothing. features that persist in the voxel. However, in our case the surface is unknown; consequently, this type of classification cannot be used because the location of the features is unknown a priori. Instead we chose the most conservative but universal alternative - classifying all the voxels as vertex nodes. As a result, in the surface extraction phase, voxels will be replaced by vertices.
must be applied on each voxel: (1) calculating the associated vertex position, (2) finding neighboring voxels and (3) connecting vertices associated with neighboring voxels. The position of the vertices defines the geometry of a surface. In the previous phase, all the Octree voxels were mapped to vertices. The position of a vertex associated with a voxel was defined as a centroid of the sampled points lying inside the voxel. This operation can be considered as a low pass filtering of the input data, which leads to high 3.2 Phase 2 - Surface extraction frequency noise suppression. Locality of the filter is In the surface extraction phase, a piecewise linear dictated by voxel size. This parameter also restricts approximation of the object’s boundary surface is ex- the minimal feature size that can be recovered. In tracted from the HSDM constructed in Phase 1. The general, a geometric feature can be reliably recovered proposed surface extraction method consists of two if and only if its clarity is higher than the sampling steps: (1) connectivity graph extraction and (2) facet noise level. reconstruction. For each voxel, the algorithm searches for four neighbors, starting from face neighbors (6-adjacent). 3.2.1 Connectivity graph extraction If four of them are present, no more neighbors are Definition 3.1 A connectivity graph G approxi- to be found; otherwise edge neighbors (18-adjacent) mates the Riemmanian graph [11] of the surface to are considered. The Octree data structure allows efbe reconstructed. ficient neighbor-finding. Due to this feature, the current step can proceed in real time. Using this definition we can formulate the basic assumption of this work. After the neighbor-finding procedure is performed, each vertex is connected with vertices associated Assumption 3.1 Edges of G lies on or near surface with its neighboring voxels. Then, the resulting to be reconstructed. edges are added to the connectivity graph. In this Connectivity graph can be extracted from the HSDM way, a Doubly-Connected Edge List (DCEL) is conby calculating its dual graph, namely, by connecting structed, because every edge in the graph is bivertices associated with neighboring Octree voxels. directional. Figure 4(c) shows the structure of the In order to implement the above, the following steps resulting graph.
3.2.2
Facet reconstruction
For facet reconstruction, each edge of G is associated with a facet, which is a piecewise-linear approximation of the unknown surface. This reconstruction is accomplished using the minimal loops strategy, namely, by starting from an arbitrary edge and trying to enclose the facet with a minimal number of edges. The proposed facet reconstruction algorithm can be summarized as follows (see Figure 5): (a) Choose an arbitrary edge and assign the current edge to it. (b) Proceed to a neighbor edge next edge that fits the following conditions: • next edge is not Twin(current edge). • The Euclidean distance between the EndVertex(next edge) and StartVertex(init edge) is minimal.
As can be seen from the described algorithm, facets are reconstructed continuously, through the neighboring edges only. By definition, a DCEL cannot include adjacent facets with a non-consistent orientation. Consequently, normal consistent orientation is imposed naturally. Moreover, this method is insensitive to sharp edges, because the normal direction is not propagated explicitly by checking the sign of the scalar product of adjacent facets, as proposed by Hoppe et al.[12]. Rather, it is propagated implicitly by preserving adjacent facet orientation consistency. The surface extraction procedure described in this section can be applied to any desired level of detail utilizing the HSDM. Figure 6 presents meshes extracted from different levels of Octree.
3.3
Phase 3 - Feature extraction and classification
In order to complete the boundary representation created in the previous phases, a normal is asso(c) Add the current edge to the current facet and prociated with every mesh vertex. A naive approach ceed to the next edge. would be to assign to every vertex the average normal (d) If the current facet is not closed, go to step (b). of the neighboring facets. However, this approach leads to smoothing of sharp features. Consequently, (e) If current facet is not false facet, add the cur- sharp features must be detected and preserved. This rent facet to the list of facets. idea is motivated by the anisotropic diffusion approach, which is commonly used in image processing (f) Recursively apply the reconstruction process for [18]. The standard sharp edges detection procedure Twins() of the current facet edges. is based on the dihedral angle test. Once sharp edges have been detected, they are classified according to In general, the Euclidean distance criterion is insufa scheme proposed by Bernardini et al.[3]. In this ficient to determine an appropriate next edge; howscheme, a vertex can have one, two or three normals, ever, due to the very regular structure of the connecdepending on its type. Four types of vertices are protivity graph, this heuristic has been proven effective. posed in [3]: (1) smooth vertex with single associated normal, (2) vertex on sharp edge with two associated normals, (3) sharp corner with three associated nor7:,1LQLWBHGJH mals and (4) singular vertex with undefined normal LQLWBHGJH direction. Figure 4(e) presents the smoothed reconstructed mesh preserving the sharp features above.
3.4 FXUUHQWBIDFHW
Figure 5: Facet reconstruction scheme.
Extension for point clouds with normals
This paper focuses on mesh reconstruction from an unorganized point cloud. However, there are many objects which cannot be recovered from scattered data only. These objects are very close to self intersection; consequently, additional information is required in order to reconstruct their boundary surface properly. An aircraft wing which is relatively thin is a good illustrative example of such an object. Contemporary 3D scanning devices are capable of providing a normal direction with every point sampled from a surface. This additional information can be easily incorporated in the proposed reconstruction
(a)
(b)
(c)
Figure 6: Multiresolution surface reconstruction: (a) low resolution (Octree depth 2), (b) middle resolution (Octree depth 3) and (c) high resolution (Octree depth 4). algorithm. In such a case, the aggregation of points into HSDM is based not on the Euclidean distance only, but also on a consistent normal orientation. Namely, we check whether all the points associated with a voxel have a consistent normal. If so, this voxel remains as is; otherwise the set of points associated with the voxel must be subdivided into smaller subsets, until the condition of consistent normals is fulfilled. In our cases, the number of these subsets was at most four. Figure 9 demonstrates reconstruction of the sampled airplane toy.
Theorem 4.2 Let T be an Octree of depth d. The neighbor of a given node ν in T in a given direction can be found in O(d) time. The proof is given in [8]. Theorem 4.3 Let T be an Octree of depth d. Graph G connecting leaf nodes of T can be constructed in O(n) time and will consists of O(n) edges.
Proof: Assuming that the Octree depth d is bounded, we can say that the neighbor-finding procedure is performed in O(1) time. This procedure is applied for each Octree leaf node. From Theorem 4.1 we know that the number of Octree nodes is O(n). 4 Complexity Analysis Thus, the resulting time complexity of connectivity One of the advantages of the proposed surface recon- graph construction is O(n). The connectivity graph consists of vertices and struction approach is its low computational complexedges. The number of vertices is equal to the numity. In this section the phases of the algorithm are analyzed, and the time and space complexities are ber of Octree leaf nodes O(n). Due to the fact that this graph is a Riemmanian graph of an unknown 2computed. The first phase of the proposed method is hierar- manifold surface, the Euler theorem is valid in this chical space decomposition. In this phase, data points case. Although the graph is not triangular, the linear relation between vertices, edges and faces still holds. are inserted into an Octree. Consequently, the space complexity of the connecTheorem 4.1 An Octree of depth d storing a set of tivity graph is O(n). This concludes the proof of n points has O(dn) nodes and can be constructed in Theorem 4.3. O(dn) time. The next phase of the algorithm is facet reconstrucProof: The proof is given in [8]. In our implemen- tion from the connectivity graph. This procedure tation, the depth of the Octree is limited (usually is carried out by recursively scanning the connectivd < 10), while n > 104 ; this implies d