Reconstruction of Virtual Parts from Unorganized ... - Semantic Scholar

Report 2 Downloads 79 Views
Chuan-Chu Kuo e-mail: [email protected]

Hong-Tzong Yau e-mail: [email protected] Corresponding author Department of Mechanical Engineering, National Chung Cheng University, Cha-Yi, Taiwan, ROC

Reconstruction of Virtual Parts from Unorganized Scanned Data for Automated Dimensional Inspection In the framework of Virtual CMM [1], virtual parts are proposed to be constructed as triangulated surface models. This paper presents a novel surface reconstruction method to the creation of virtual parts. It is based on the idea of identification and sculpting of concave regions of a Delaunay triangulation of the sample data. The proposed algorithm is capable of handling the reconstruction of surfaces with or without boundaries from unorganized points. Comparisons with other Delaunay-based algorithms show that it is more efficient in that it can optimally adapt to the geometric complexity of the sampled object. To validate the proposed algorithm, some detailed illustrations are given. 关DOI: 10.1115/1.1565354兴 Keywords: Virtual CMM, Virtual Part, Surface Reconstruction, Delaunay Triangulation, Voronoi Diagram, STL

1

Introduction

1.1 Background. An innovative framework of virtual CMM and virtual part has been presented for intelligent and highly automated dimensional inspection of manufactured objects in our previous research work 关1兴. In that framework, a new concept of virtual CMM 共V-CMM兲 with the definition and constructing procedure of a virtual part based on high-accuracy scanning data were proposed, but the construction algorithm of virtual parts was not fully addressed. Therefore, in this paper, for the completeness of the work, a new surface reconstruction algorithm for the construction of virtual parts is presented. In the framework of Virtual CMM, a virtual part is defined as an integral and organized set of 3D scanned data that virtually represents the inspected part in the 3D space. However, during the scanning process, the scanned data may be obtained from different view directions and thus need to be registered and integrated. The scanned data may also have different sampling density and unordered sequence. To create an integral and organized 3D data set that can represent the inspected part, it was proposed 关1兴 to reconstruct the inspected part or features using triangulated surface meshes from the scanned data set. There are several advantages to use triangulated surfaces to represent a virtual inspected part. First, it provides richer geometric information including surface facets and normals. Second, it helps efficient search and query of the data set compared with random inspection points. Third, it supports visualization of the inspected part of features. Forth, the resulting virtual part can be stored and accessed using the popular STL format. Fifth, it allows for interference and collision checking. Such construction of virtual parts can be regarded as a general surface reconstruction problem that the input data points contain no additional information other than the three-dimensional coordinates 关2兴 共from now on, the input data or the inspection data will be simply called as the sample data兲. However, one critical demand for the construction of virtual parts is that the constructed triangulated surface should pass through the original sample points because it is reasonably assumed that the inspection data Contributed by the Computer Aided Product Development 共CAPD兲 Committee for publication in the JOURNAL OF COMPUTING AND INFORMATION SCIENCE IN ENGINEERING. Manuscript received October 2002; Revised February 2003. Guest Editor: C. H. Menq.

76 Õ Vol. 3, MARCH 2003

points are accurate 共bounded by some permissible uncertainty兲. Such demand limits the use of several elegant yet approximationbased reconstruction algorithms. It is interesting to note that most of the developed algorithms in the past focus more on computer graphics applications where approximate models can be quickly built to represent and display 3D complex objects. In CAD/CAM and coordinate metrology applications, however, accuracy of model representation is sometimes more important. This paper presents a novel surface reconstruction method for the creation of virtual inspection parts. The created virtual part is guaranteed to pass through the original sample points. It is robust and more efficient compared with other Voronoi-based algorithms such as the crust 关3,4兴, the power crust 关5,6兴, and the co-cone 关7–9兴 methods. The algorithm can create enclosed solids and can also be extended to the generation of open or bordered surfaces. 1.2 Literature Review. Surface reconstruction from a finite set of unorganized data points has attracted much attention in the past decade and is becoming increasingly important in geometric modeling and related applications. Among all methods of surface reconstruction from random points, the Voronoi/Delaunay-based approach perhaps is the most popular one because the characteristics of its geometric structure nicely complement the absence of geometric information in a random data set. The typical procedure contains two steps: 1兲 first builds a geometric structure from a finite set of unorganized sample points via the Delaunay triangulation or Voronoi diagram; 2兲 and then extracts a collection of facets from such a geometric structure to approximate the actual surface. The sculpturing method of Boissonnate 关10兴, the wellknown alpha shapes of Edelsbrunner et al. 关11–13兴, the crust and power crust algorithms of Amenta et al. 关3– 6兴, and the co-cone algorithm of Dey et al. 关7–9兴 generally fall into this category. In a different approach, the region-growing method, such as the ballpivoting algorithm 共BPA兲 of Bernardini et al. 关14兴, the algorithm of Petitjean and Boyer 关15兴, and the algorithm of Hung and Menq 关16兴, enhances the surface reconstruction performance. In these algorithms, a triangulated surface is incrementally grown starting from a well-chosen seed triangle. Although these methods are comparatively fast, there exists a common drawback that the reconstruction quality heavily depends on the user-defined parameters, which vary with the sampling density and are difficult to assign. In another essentially different approach, a zero-set of a

Copyright © 2003 by ASME

Transactions of the ASME

Fig. 1 The illustration of the sculpting idea in 3D space.

signed distance function defined from sample points is used to construct an approximate surface with topology as the actual surface. Such approach has been applied to the surface reconstruction problem by Hoppe et al. 关2兴, Bajaj et al. 关17–20兴, Curless and Levoy 关21兴, and Boissonnate 关22兴. 1.3 Overview of Sculpting Algorithm. The idea of our proposed surface reconstruction algorithm originates from the sculpting concept of Boissonnate 关10兴. Basically, by using 3D Delaunay triangulation, the convex triangular mesh of a set of sample points can be easily created. For a convex object, this is the end result that is wanted. However, if there exist concave regions in the original object, the concave regions need to be identified and sculpted out. Figure 1 illustrates this idea. Figure 1共a兲 shows the convex object from straight Delaunay triangulation. Figure 1共b兲 shows the concave regions being sculpted out. Although this sculpting concept is simple and easy to understand, the process is not a straightforward one. By observation, Boissonnate 关10兴 provides a set of heuristic rules and sculpting operations which are not sufficient to handle all the special cases. In this paper, we develop a general sculpting algorithm which is robust and more efficient. The key step of the algorithm is to identify the outside tetrahedrons of the actual surface and remove them from the Delaunay triangulation of the sample points. The skin of the solid formed by the remaining tetrahedrons is then extracted as a collection of triangles that represent the resulting triangulated surface. To better illustrate the idea, a 2D example is shown in Fig. 2. In Fig. 2共a兲, the green points are the input sample set and the blue lines are from their Delaunay triangulation. In Fig. 2共b兲, the outside triangles of the actual shape are removed. Finally, the skin is extracted as a set of segments that represent the reconstructed boundaries shown in Fig. 2共c兲. As mentioned, such sculpting and extraction processes are not easy or trivial. The critical problem is to separate the external or outside tetrahedrons, especially in the concave regions, from the sampled object. The desired solution needs to be general, robust, and efficient. In this paper, a novel algorithm is proposed to solve this problem by separating the inner and outer poles introduced by Amenta 关3– 6兴. Unlike the original crust method 关3,4兴 which takes all the poles to participate in the computation of Delaunay triangulation, the proposed algorithm in this paper simply focuses on finding the outer poles in the concave regions and using them to

sculpt out the unwanted tetrahedrons. Given n sample points with two poles for each point, the crust method requires the Delaunay computation of 3n points. Since the Delaunay triangulation is computationally expensive, the crust method is time-consuming and inefficient. In comparison, ur proposed algorithm only uses the outer poles in concave regions for the final Delaunay triangulation. Therefore only n⫹m points are needed, where m is the number of all the outer concave poles and m⬍n. For sampled object with less concave regions, m is smaller and the triangulation becomes more efficient. It matches the idea of the sculpting concept, that is, if there are less concave regions, less ‘‘sculpting work’’ is required. To separate the inner and outer poles, the proposed poleseparation algorithm is also highly efficient. Rather than using the weighted Voronoi diagram 共which is also very time-consuming兲 suggested by Amenta et al. 关5兴, we use a highly efficient and robust range-searching data structure, k-D tree 关23兴, to search for neighboring poles and increase the pole separation speed. Outlined as follows is the proposed surface reconstruction algorithm using the sculpting concept. 1. Compute the Delaunay triangulation of all the sample points. 2. Identify the outer concave poles. 3. Use the outer concave poles to sculpt out the concave regions. 4. Extract the skin as a collection of triangles that represent the resulting triangulated surface. Other than other surface reconstruction methods, there is a byproduct of this proposed algorithm. From the result of step 3, a tetrahedral solid is obtained. This solid can be easily extended to the CAE application when a mesh refinement, such as the sinkinsertion technique proposed by Edelsbrunner et al. 关24兴, is processed adequately. In addition, the reconstructed surface resulted from our algorithm is guaranteed to pass through the original sample points. This property not only meets the requirement of virtual parts, but also opens up a door to various useful applications including rapid prototyping 共RP兲, mesh generation for finite element analysis, global stitching of complex B-rep surface model 关25兴, and NC machining of STL 共stereolithography兲 models 关26兴. For convenient illustrations in later sections, this paper adopts the terminologies of ‘‘closed’’ and ‘‘bordered’’ surfaces provided by Hoppe et al. 关2兴. A surface without boundary is called a ‘‘closed’’ surface. A surface with a non-empty boundary is called a ‘‘bordered’’ surface.

2

Preliminaries

Before the proposed algorithm is presented, a brief review of the basic computational geometric concepts used in our algorithm is given as follows. In addition, for a clear and complete presentation, the definition of poles from Amenta’s works 关3– 6兴 is also briefly described. 2.1 Voronoi Diagram and Delaunay Triangulation. The well-known Voronoi diagram and Delaunay triangulation are becoming increasingly important and have found extensive applications in various fields 关27兴. In our proposed algorithm, their use in

Fig. 2 The illustration of the sculpting idea in 2D plane.

Journal of Computing and Information Science in Engineering

MARCH 2003, Vol. 3 Õ 77

3

Fig. 3 The internal and external medial axis and the medial circles of a closed curve in two dimensions.

the three-dimensional space is rather essential. Let O be a real object and ⳵ O be its boundary surface. A finite set of distinct sample points acquired from ⳵ O is denoted as S. Let S ⫽ 兵 s 1 , s 2 , . . . , s n 其 in the Euclidean space E. A three-dimensional Voronoi diagram V(S) of the point set S is a division of the space into convex regions, called Voronoi cells Vc(s i ), in which every sample point s i is associated with a Vc(s i ). Each Voronoi cell Vc(s i ) consists of a set of points x i 苸E that are closer to s i than to any other points of S and its vertices are called the Voronoi vertices. A three-dimensional Delaunay triangulation, which is dual to the three-dimensional Voronoi diagram, is a tetrahedralization that divides the convex hull con v (S) of the points set S into a collection of tetrahedra. Each tetrahedron has a circumsphere called the Voronoi ball that centers at a Voronoi vertex with the vertices of this tetrahedron located on its sphere boundary. The Voronoi ball contains no point s i and no other Voronoi balls in its interior. One of most important properties is that a three-dimensional Delaunay triangulation is unique under the assumption that no 5 points of S can be found on a common sphere. 2.2 Medial Axis. The medial axis M (O) of an object O is the locus of the centers c i 苸E of the maximum empty balls, called medial balls, which contains no points s i and no other empty ball. For an enclosed object in R3 , the medial axis is obviously divided into the internal and the external medial axis. Figure 3 shows a two-dimensional example. The medial axis transformation 共MAT兲 is the set of medial balls. That is, the MAT does not only consist of the centers c i of the medial ball but also their radii r. 2.3 Poles. Amenta et al. 关3,4兴 is the first one that proposes the definition of poles, which are a subset of the Voronoi vertices of the point set S and represent the approximated medial axis when S is a sufficiently dense sample. Each sample point s i is associated with two poles, denoted by p i⫹ and p i⫺ respectively. These two poles are the farthest Voronoi vertices of Vc(s i ) from s i . If pole p i⫹ is one farthest Voronoi vertex of Vc(s i ) from s i , the other pole p i⫺ must have a negative dot-product of s i p i⫹ and s i p i⫺ . The Voronoi ball centered at a pole is called the polar ball. When S is a sufficiently dense sample, the Voronoi cell Vc(s i ) appears naturally long and slim, and is approximately perpendicular to the boundary ⳵ O of the object O. Therefore, two poles p i⫹ and p i⫺ are roughly in the opposite direction and the pole direction 共from sample point s i to its poles兲 approximates the surface normal at s i under that dense sampling condition. 78 Õ Vol. 3, MARCH 2003

The Proposed Sculpting Algorithm

As mentioned above, this paper is particularly focused on the sculpting problem in the concave region. Let S ⫽ 兵 s 1 , s 2 , . . . , s n 其 be a set of sample points and BB be the bounding box that is larger than the minimum bounding box of S. And let BBV⫽ 兵 bb v 1 , bb v 2 , . . . , bb v 8 其 be a set of eight vertices of BB. The augmented BB ties all the polar balls in the finite space. Hence, there exists a finite radius for each polar ball. Such result helps the separation of all the poles because the seed polar balls become finite and able to label other unlabeled polar balls 共will be described in section 3.1.1兲. In our implementation, BB is chosen five times larger than the minimum bounding box of S. The magnitude of BB is in fact insensitive to the separation result as long as it is larger than the minimum bounding box of S. With the Delaunay triangulation of S艛BBV (n⫹8 points兲, the proposed sculpting algorithm begins by determining the outer concave poles and then proceeds to sculpt out the unwanted tetrahedrons in concave regions. Finally, a triangulated surface that passes through the original sample points is obtained by extracting the skin triangles of the tetrahedral solid resulting from the sculpting process. 3.1 Determination of Outer Concave Poles. Before the determination of all the outer concave poles, all the poles P must be computed 关5兴 and separated into two groups: the inner and outer poles. Then, among all the outer poles, the outer concave poles are determined. To achieve such separation, an efficient pole-separation procedure is now given. 3.1.1 Separation of Poles. The principle of pole-separation is based on the propagation of the some selected seed poles. Therefore, the selection of the seed poles and their propagation are the two major steps. 3.1.1.1 Selection of seed poles. A convex pole vp is defined as a center of the circumscribed sphere of a tetrahedron incident to BBV. For the reconstruction of a closed surface, all convex poles V P⫽ 兵 v p 1 , v p 2 , . . . , v p i 其 are selected as the outer seed poles OSP. From the definition of poles, each sample point possesses two poles such that one is ‘‘inner’’ and the other is ‘‘outer,’’ i.e., the inner and outer poles associated with the same sample point are paired. Therefore, the poles which pair with OSP are the inner seed poles ISP. 3.1.1.2 Propagation of seed poles. With the two sets of the inner and outer seed poles, ISP and OSP, the propagation step begins by initiating ISP as ‘‘inner’’ and OSP as ‘‘outer,’’ and then propagates them. To propagate the seed poles more rapidly and robustly, a highly efficient and robust range-searching data structure, k-D tree, is introduced into the separation procedure. Its use in the propagation of the seed poles is described as follows. Figure 4共a兲 shows a Delaunay triangulation 共a group of blue triangles兲, Voronoi diagram 共a group of green lines兲 of a set of sample points 共green points兲, and the distribution of all the polar circles 共black circles兲 centered at the poles 共red points shown in Fig. 4共b兲兲 in a 2D plane. From the observation of the distribution, each inner polar circle contains no outer poles. On the contrary, each outer polar circle also contains no inner poles. At the moment, the poles paired with the pole newly identified as ‘‘outer’’ 共‘‘inner’’兲 are ‘‘inner’’ 共‘‘outer’’兲. Based on the above observation, it motivates us to use the k-D tree for the efficient range search of neighboring poles. k-D tree is a data structure that provides efficient range search in multi-dimensions 共using rectangles in 2D and cubes in 3D兲. Given a polar ball 共in the 3D case兲 centered at an inner 共outer兲 seed pole sp, the poles inside the inscribed cube of the polar ball must be named as ‘‘inner’’ 共‘‘outer’’兲 since the inscribed cube is fully inside the polar ball. To help a clear representation, Fig. 4共b兲 highlights a pair of polar circles 共in the 2D case兲 which are colored as red and pink respectively. A pair of corresponding inscribed squares is also shown in the figure. Let P⫽ 兵 p 1 , p 2 , . . . , p 2n 其 be the set of all the poles and H s p Transactions of the ASME

Fig. 4 „a… The distribution of all the polar circles „black circles… centered at the poles „red points shown in „b…… in 2D plane. „b… The illustration of a pair of polar circles and its pair of corresponding inscribed squares.

be an inscribed cube of a polar ball centered at the pole sp. Figure 5 shows the detailed pseudo-code for a complete description of the pole-separation procedure. 3.1.2 Outer Concave Poles. Let O P⫽ 兵 op 1 , op 2 , . . . , op j 其 be the set of all the outer poles and I P ⫽ 兵 ip 1 , ip 2 , . . . , ip k 其 be the set of all the inner poles. For the reconstruction of a closed surface, a outer concave pole oup is defined as a vertex that belongs to O P艛BBV but not to VP. Based on such definition, the number of all the outer concave poles OU P⫽ 关 兵 oup 1 , oup 2 , . . . , oup m 其 actually depends on the degree of concavity of the actual surface. In other words, the less is the concavity of the object, the lower is the value of m. For example, let n be the number of the sample points and m the number of OUP 共contains 8 bbv兲, which 8⭐m⭐n⫹8. An extreme case is that the value of m is equal to 8 共the number of BBV兲 when the sample points are captured from a convex object since OP is completely equal to VP. 3.2 Sculpting of Concave Regions. To sculpt the concave regions, a Delaunay triangulation of S艛OU P (n⫹m points兲 is first computed. Two important steps are then followed. The first is to extract a tetrahedral solid that contains the boundary triangles as the desired surface. The second is to directly extract these triangular surface facets to represent our final reconstructed surface. These two steps can be summarized by the following two rules. 1. The sculpting rule for the resulting tetrahedral solid Keep only those tetrahedrons for which all four vertices are sample points in S from the Delaunay tetrahedrons of S艛OU P. 2 The extraction rule for the resulting triangulated surface Extract only those triangles for which all three vertices are sample points in S from the Delaunay tetrahedrons of S艛OU P, having one vertex that is an outer pole op or a vertex bbv of the bounding box. Through the sculpting rule, the skin of the resulting tetrahedral solid is then extracted as a collection of triangles that represent the resulting triangulated surface. Alternatively, using the extraction rule, the resulting triangulated surface is directly obtained by omitting the explicit sculpting step if the resulting tetrahedral solid is not needed. From the above sculpting operation, the value of m 共the number of OUP兲 is actually a variable dependent on the degree of concavity of the sampled object. For sampled object with less degree of concavity, m is smaller and the triangulation becomes more

Fig. 5 The detailed pseudo-code for the pole-separation procedure.

Journal of Computing and Information Science in Engineering

MARCH 2003, Vol. 3 Õ 79

Fig. 6 An example of a two-dimensional closed curve reconstruction.

efficient. It matches the idea of the sculpting concept, that is, if there are less concave regions, less ‘‘sculpting work’’ is required. In this sense, the proposed algorithm can be regarded as an adaptive triangulation solution. This kind of adaptive Delaunay computation reflects the advantage of the proposed algorithm over the crust algorithms 关3,4兴 in which the Delaunay computation is of the order of (3n) * log(3n). Illustrations of the complete sculpting triangulation process are given in Figs. 6 and 7. Figure 6 illustrates a two-dimensional

example of reconstructing a ‘‘closed’’ curve. Figure 6共a兲 shows a set of input sample points S. Figure 6共b兲 is the Voronoi diagram of the sample points. Figure 6共c兲 demonstrates the separation of poles. The red points represent the set of the inner poles IP and the blue points represent a part of the set of the outer concave poles OUP 共Notice that for the convex points their outer poles are outside the drawing box兲. Figure 6共d兲 is the Delaunay triangulation of S艛OU P. Figure 6共e兲 shows the resulting line segments after the extraction process. Figure 7 demonstrates the three-dimensional reconstruction procedure of a ‘‘closed’’ torso model. Figure 7共a兲 shows the set of input sample points S. In Fig. 7共b兲, the red points represent the set of the inner poles IP and the orange represent a part of the set of the outer concave poles OUP. Figure 7共c兲 illustrates the resulting triangulated surface and its shading. Figure 7共d兲 is a zoom-in of Fig. 7共c兲.

4 Extension to Surface Reconstruction of Bordered Surfaces With some modification, the sculpting algorithm can be easily extended to the bordered surface reconstruction. For a set of sample points digitized from a bordered surface, all the poles should be divided into two groups that obviously lie on the two opposite sides of the bordered surface. However, it is meaningless to define either ‘‘inner’’ or ‘‘outer’’ at this moment. Therefore, for the case of a bordered surface, ‘‘inner’’ and ‘‘outer’’ are just used to indicate the two opposite sides. Different from the original sculpting algorithm, the extended algorithm selects only an arbitrary convex pole vp of VP as an outer seed pole osp. Propagation begins with this seed pole until all the poles on the ‘‘same’’ side are found. Instead of using only the outer concave poles OUP, all the concave poles UP are employed for the reconstruction of a bordered surface. A concave pole up is defined as a vertex that belongs to P艛BBV but not to VP. Let l be the number of U P⫽ 兵 up 1 , up 2 , . . . , up l 其 . The value of l is between 8 and 2n⫹8. Fig. 7 An example of a three-dimensional closed surface reconstruction „a torso model….

80 Õ Vol. 3, MARCH 2003

4.1 Extraction of Resulting Triangulated Surface. Since the resulting triangulated surface will not be a solid model, it is Transactions of the ASME

Fig. 8 An example of the effect of all the concave poles on the creation of the boundary „a foot….

meaningless to sculpt the concave regions. Instead, the extraction process described in section 3.2 is used to obtain the resulting bordered triangulated surface. However, in that extraction, S艛OU P (n⫹m points兲 needs to be replaced by S艛U P (n⫹l points兲. Figure 8 illustrates the effect of all the concave poles UP on the creation of the boundaries for a bordered surface. In Fig. 8共a兲, the blue points are the sample data and the red points represent all the inner poles IP. In this case, all the inner poles IP belong to UP and participate in the computation of Delaunay tetrahedrons of

S艛U P. Notice that some inner poles associated with the boundary sample points are located in the outer region. Using such characteristics with our proposed extraction rule, the boundary is created and a bordered surface is reconstructed as shown in the bottom of Fig. 8共b兲. A closed surface model resulted from the original sculpting algorithm, in comparison, is shown in the top of Fig. 8共b兲. Figure 9 demonstrates the three-dimensional reconstruction procedure of a ‘‘bordered’’ hyper sheet model. Figure 9共a兲 shows the set of input sample points S. In Fig. 9共b兲, the red points rep-

Fig. 9 An example of a three-dimensional bordered surface reconstruction „a hyper sheet….

Journal of Computing and Information Science in Engineering

MARCH 2003, Vol. 3 Õ 81

resent a part of the set of inner poles IP and the orange represent a part of the set of outer poles OP. Figure 9共c兲 illustrates the resulting triangulated surface and its shading. Fig. 9共d兲 is a zoom-in from Fig. 9共c兲.

5

General Discussion

Through the elaboration of the proposed algorithm procedure, the effect of poles is obvious on the determination of removing the unwanted tetrahedrons, even on the extraction of the resulting bordered triangulated surface. Besides, the use of poles also brings additional advantages in the handling of non-uniform sample points, as well as sharp edge reconstruction. 5.1 Sampling Requirement. It is understood that there should be a basic sampling requirement for all surface reconstruction algorithms. In the original crust algorithm 关3,4兴, Amenta et al. proved that with sufficient sampling density, the crust algorithm is guaranteed to approach the exact geometry. Since our proposed sculpting algorithm also uses the concept of ‘‘pole’’ as the foundation for surface reconstruction, the proof of model convergence under sufficient sampling density can be directly inherited. 5.2 Non-uniform Distribution. The ability of handling sample points with uneven distribution is also an important issue to the general surface reconstruction algorithm. Figure 10 demonstrates the surface reconstruction of a rocker arm having the sample points with uneven distribution. Figure 10共a兲 is the reconstruction of a uniform distribution case. In contrast, Fig. 10共b兲 shows the result of a non-uniform distribution case. It is obvious that our proposed algorithm is stable and is insensitive to the data non-uniformity. Figure 10共c兲 is a zoom-in from the right of Fig. 10共b兲. 5.3 Sharp Edges. Many existing surface reconstruction algorithms suffer from the fact that sharp edge features cannot be easily reconstructed. Figure 11 demonstrates the resulting triangu-

Fig. 11 An example of the effect of poles on the reconstruction of the geometric sharp features „a shoe model….

lated surface of a shoe model using the proposed sculpting algorithm, which highlights the clean and clear sharp edges and corners located in the convex regions.

6

Implementation and Experiments

Our proposed sculpting algorithm has been fully implemented in C⫹⫹. We use the computational geometry algorithms library CGAL 关28兴 to compute 3D DT 共Delauny triangulation兲. CGAL provides several choices of number types 关29兴. We use filtered arithmetic 关30兴, which is capable of speeding up the exact evaluation of geometric predicates. Filtered arithmetic is slower than floating point computation. But, in general, DT cannot be computed using naive floating point computation. In addition, Delaunay hierarchy method 关31兴 provided by CGAL 2.4 is adopted by us for more efficient computation of Delaunay triangulation. The DT computation provided by CGAL 2.4 is an incremental algorithm, which incrementally inserts a set of points into the Delaunay structure. In our proposed algorithm, the DT of two sets of points, S艛BBV and S艛OU P 共or S艛U P), are constructed sequentially. The second DT is incrementally constructed by inserting oup 共up兲 into the first DT. Using this property, our proposed sculpting algorithm can be very efficient. In other words, in our first DT of sample points, the poles are created. After finding the outer concave poles, the second DT is incrementally constructed from the first DT by inserting those outer concave poles. Figures 12 and 13 respectively demonstrate the reconstructed results of the closed and bordered surfaces using our proposed algorithm. Figure 12共a兲 shows a three-hole model. Figure 12共b兲 displays an oil pump model, which is complicated with many more features. Then, Fig. 12共c兲 shows that the output is a closed hand model although there obviously exists a boundary in the set of the input sample points, of which the corresponding result is shown in Fig. 13共a兲. Figure 12共d兲 is a more complicated dragon toy model, of which the sample points are obtained by merging six sets of data acquired from a laser range scanner. Figure 13共b兲 is a shampoo bottle model. Figure 13共c兲 displays a monkey bar. Figure 13共d兲 displays a golf club model. Figure 13共e兲 reveals a good surface reconstruction of an automobile exterior surface. Finally, in Table 1, we list the time required for a surface reconstruction from unorganized three-dimensional sample points for the readers’ reference.

7

Comparison

To highlight the advantages of our sculpting algorithm, comparisons with some algorithms of the same category, such as the original crust 关3兴, the power crust 关5兴, and the co-cone algorithms 关7–9兴 are described and illustrated. Let n be the number of input sample points, m the number of all the outer concave poles, l the number of all the concave poles, and DT(n) the Delaunay computation of n points.

Fig. 10 The reconstruction from the sample points with uneven distribution. „a rocker arm….

82 Õ Vol. 3, MARCH 2003

7.1 Comparisons with the Original Crust Algorithm. For the original crust, as lack of the separation of inner and outer poles in the beginning, the resulting surface by the first extraction is still a non-manifold model, particularly its triangles may overlap on top of each other. Therefore, a series of post-processing Transactions of the ASME

Fig. 12 Several examples of closed surface reconstruction. „a… A three-hole model. „b… An oil pump model. „c… A hand model. „d… A baby dragon model.

steps, such as the normal filtering and manifold extraction, are required. However, the robustness of the manifold extraction process is usually challenged. For a surface with boundaries 共bordered surfaces兲, or with sharp edges or corners, such manifold extraction process possibly triggers the cascaded deletion of the desired surface, which has been announced by Dey et al. 关7兴. This is the reason why the original crust cannot robustly handle the

reconstruction of a surface with boundaries and sharp features. On the contrary, in our sculpting algorithm, the final extraction step is effective and straightforward, and requires no heavy and complicated post-processing step like the original crust does. This is attributed to the adequate use of the outer concaves poles. Moreover, the original crust needs DT(3n) computation. However, our proposed algorithm only needs DT(n⫹m) computation for a

Fig. 13 Several examples of bordered surfaces reconstruction. „a… A hand model. „b… A shampoo bottle model. „c… A monkey bar. „d… A golf club model. „e… An automobile exterior surface.

Journal of Computing and Information Science in Engineering

MARCH 2003, Vol. 3 Õ 83

Table 1 Experimental data of several surface reconstructions

closed surface and DT(n⫹l) for a bordered surface, which 8 ⭐m⭐n⫹8 and 8⭐l⭐2n⫹8. Therefore, our sculpting algorithm is computationally more efficient. From the above comparisons and discussions, it is clear that our sculpting algorithm improves upon the original crust algorithm in

the following three aspects: 1兲 The proposed algorithm is more robust; 2兲 The proposed procedures require no post-processing steps; 3兲 The computation efficiency is higher. 7.2 Comparisons with the Power Crust Algorithm. The power crust is excellent in reconstructing closed surface with sharp edges or corners from a finite set of unorganized data with large noises. The critical technique is the separation of inner and outer poles in the beginning of the algorithm. With such separation, the unique characteristic of inner and outer poles can be applied in some later operations, such as extracting the power crust using the intersection between the inner and outer polar balls and adequately handling the generation of sharp edges or corners, even filtering noises. However, the power crust is incapable of handling the bordered surface reconstruction. Moreover, the final resulting surface cannot be guaranteed that the output polygons pass through the original sample points, which violates the requirement of the construction of a virtual part. In addition, the number of the vertices of the resulting polygons is usually an order of magnitude larger than the original sample size so that a decimation post-processing step is needed to reduce the number of polygons and vertices. Figure 14 demonstrates the different reconstructed results between our proposed algorithm and the power crust algorithm. The source code of the power crust is available on Amenta’s web site 关32兴. Notice that the output number of points of the power crust without a decimated post process is 8 times larger than the initial sample points. On the other hand, if an incremental algorithm for the Delaunay triangulation is adopted 共ex. CGAL library兲, the power crust requires totally DT(3n) since DT(n) and DT(2n) are needed respectively for n sample points and 2n poles. But, for our proposed algorithm, only needs DT(n⫹m) computation for a closed surface and DT(n⫹l) for a bordered surface, which 8 ⭐m⭐n⫹8 and 8⭐l⭐2n⫹8. From the above comparisons and discussions, it is clear that our sculpting algorithm improves upon the power crust in the following three aspects: 1兲 The proposed algorithm is capable of han-

Fig. 14 The comparison of our proposed algorithm with the power crust algorithm. „a… The reconstruction from the proposed algorithm. The number of output points is 1748. „b… The reconstruction from the power crust without a decimated post process. The number of output points is 14927.

84 Õ Vol. 3, MARCH 2003

Transactions of the ASME

Fig. 15 Top row is a knot and bottom row is a femur. „a… The reconstruction from the proposed algorithm. „b… The reconstruction from the modified co-cone. „c… The reconstruction from the tight co-cone.

dling the bordered surface reconstruction; 2兲 The proposed procedures require no post-processing steps; 3兲 The computation efficiency is higher. 7.3 Comparisons with the Co-Cone Algorithm. In the cocone algorithm, they also use the manifold extraction like the original crust for obtaining their triangulated surface. But, to avoid the risk of catastrophic failures, the co-cone devises a boundary detection method 关7兴. As a result, the manifold extraction is more feasible for a bordered surface reconstruction. However, there still exist the risks of deleting the entire surface in a cascaded manner for those surfaces with sharp edges or corners, or sample data with large noise. Therefore, Dey proposes a modified co-cone algorithm with an under-sampling detection method 关8,9兴 to improve upon such problems. But, the new improvement creates other problems—there are holes created that may be due to a true boundary, or may reflect under-sampling cases near nonsmooth or high-curvature regions. Therefore, a post-processing step, filling holes, is required. The modified co-cone algorithm with such post process is called tight co-cone. With the added

hole-filling process, tight co-cone cannot reconstruct a bordered surface due to the difficulty in identifying if a boundary is an actual border or a hole. Figure 15 demonstrates the comparison of our sculpting algorithm with the modified co-cone and the tight co-cone. From top to bottom row, a knot and a femur are reconstructed respectively. Figure 15共a兲 shows the reconstructed result from our sculpting algorithm. Figure 15共b兲 shows the reconstructed result from the modified co-cone without a hole-filling process. Notice that the resulting knot and femur respectively have 16 and 291 remaining holes. Figure 15共c兲 shows the reconstructed result from the tight co-cone. Notice that the resulting femur has some bad triangles. The binary code of the modified co-cone and the tight co-cone are available on Dey’s web site 关33兴. All the reconstructions use the default value. On the other hand, Table 2 shows the comparison of the experiment results from our sculpting algorithm and the binary code of the tight co-cone. The result shows that our sculpting algorithm is more efficient.

8 Table 2 The comparison of the experiment results from the proposed algorithm and the tight co-cone

Conclusion and Future Works

For the creation of virtual parts in the automated dimensional inspection environment of Virtual CMM 共V-CMM兲, this paper presents a novel surface reconstruction algorithm from unorganized data points. Due to the fact that the inspection data are assumed to be accurate, the required surface algorithm needs to guarantee that the reconstructed surface pass through the original sample points. Therefore, some elegant yet approximation-based algorithms cannot be used for the targeted application. Instead, a Delaunay-based triangulation approach is desired. The idea of the proposed surface reconstruction algorithm originated from the sculpting concept of Boissonnate. Basically, by using 3D Delaunay triangulation, the convex triangular mesh of a set of sample points can be easily created. For a convex object, this is the end result that is wanted. However, if there exist concave regions in the original object, the concave regions need to be identified and sculpted out. Although Boissonnate provided a set of heuristic rules and sculpting operations for the problem, they are not sufficient to handle all the special cases. In this paper, a

Journal of Computing and Information Science in Engineering

MARCH 2003, Vol. 3 Õ 85

general sculpting algorithm is developed, which is robust and more efficient. There are 4 major steps in the proposed algorithm. First, a Delaunay triangulation of all the sample points is computed. Second, all the outer concave poles are identified by an efficient pole-separation procedure using k-d trees. Third, the outer concave poles are used to sculpt out the concave regions. Fourth, the boundary triangles are extracted to obtain the final triangulated surface. Several important and advantageous features of the proposed algorithm are as follows. 1. It is more efficient compared with some other Delaunaybased methods such as the Power-Crust, the original crust, and the co-cone algorithm. Theoretically, we show that the proposed sculpting algorithm is a DT(n⫹m) triangulation compared with DT(3n) of the original crust and the DT(2n) of the Power Crust. Since m is the number of the outer concave poles and m⬍n, the sculpting algorithm is not only more efficient but it is also optimal in the sense that it will adapt to the degree of the concavity of the sampled object. That is, the less the sampled object contains concave regions, the faster the sculpting algorithm will become. 2. There is no post-process in the extraction of the boundary triangular surface. This is opposed to the Power-Crust and the original Crust that require complicated post-processes. 3. It can be applied to both closed and bordered surfaces. This is useful to the inspection of partial geometric features in some dimensional measurement cases. 4. It produces sharp features in convex regions. The use of poles has certain effect on the characteristics of the reconstructed geometry. One is that it allows better creation of sharp features in convex regions. 5. It produces a by-product of a tetrahedral solid that is useful to CAE applications. To separate the inner and outer poles, a very efficient poleseparation procedure is also developed. Rather than using the weighted Voronoi diagram suggested by Amenta, we use a highly efficient and robust range-searching data structure, k-D tree, to search for neighboring poles and increase the pole separation speed. The improvement of efficiency is quite significant since k-D tree is used for range data search. In fact, the proposed sculpting algorithm is not only useful to the application of digital inspection using Virtual CMM, it is also a general surface reconstruction algorithm that can be applied to many important applications such as layered manufacturing, computer graphics, and reverse engineering. Several examples are given to show that the proposed algorithm is robust and efficient in automatic surface reconstruction of a closed or bordered surface. Comparisons with some other Delaunay-based algorithms are also provided. Future research will be geared toward the detection and creation of sharp features in both concave and convex regions.

Acknowledgments The authors would like to thank the National Science Council in Taiwan for the support of this project. We thank the developed team of CGAL for publishing the source code, Nina Amenta for the source code of the power crust, and Tamal Krishna Dey for the binary code of the co-cone and tight co-cone. Thanks also go to Hughes Hoppe for the holes3, the hyper sheet, the monkey bar, the automobile exterior surface 共nascar兲, the knot, the fan disk, the mechanic part and the oil pump; Raindrop Geomagic, Inc. for the foot, the hand, and the torso model; the Stanford Data Repository for the bunny; and the Cyberware, Inc. for the rocker arm.

86 Õ Vol. 3, MARCH 2003

References 关1兴 Yau, H. T., and Kuo, C. C., 2002, ‘‘Virtual CMM and Virtual Part for Intelligent Dimensional Inspection,’’ 2002 Japan-USA Symposium on Flexible Automation, pp. 1289–1296. 关2兴 Hoppe, H., DeRose, T., Duchamp, McDonald, T., J., and Stuetzle, W., 1992, ‘‘Surface Reconstruction from Unorganized Points,’’ Proc. SIGGRAPH ’92, pp. 71–78. 关3兴 Amenta, N., Bern, M., and Kamvysselis, M., 1998, ‘‘A New Voronoi-based Surface Reconstruction Algorithm,’’ Proc. SIGGRAPH ’98, pp. 415– 421. 关4兴 Amenta, N., and Bern, M., 1999, ‘‘Surface Reconstruction by Voronoi Filtering,’’ Discrete Comput. Geom., 22, pp. 481–504. 关5兴 Amenta, N., Choi, S., and Kolluri, R. V., 2001, ‘‘The Power Crust,’’ Proc. 6th ACM Sympos. on Solid modeling and applications, pp. 249–266. 关6兴 Amenta, N., Choi, S., and Kolluri, R. K., 2001, ‘‘The Power Crust, Unions of Balls, and the Medial Axis Transform,’’ Computational Geometry: Theory and Applications, 19共2–3兲, pp. 127–153. 关7兴 Dey, T. K., Giesen, J., Leekha, N., and Wenger, R., 2001, ‘‘Detecting Boundaries for Surface Reconstruction Using Co-cones,’’ Intl. J. Comput. Graphics & CAD/CAM, 16, pp. 141–159. 关8兴 Dey, T. K., and Giesen, J., 2001, ‘‘Detecting Undersampling in Surface Reconstruction,’’ Proc. 17th ACM Sympos. on Comput. Geom, pp. 257– 63. 关9兴 Dey, T. K., Giesen, J., Goswami, S., Hudson, J., Wenger, R., and Zhao, W., 2001, ‘‘Undersampling and Oversampling in Sample Based Shape Modeling,’’ Proc. IEEE Visualization 2001, pp. 83–90. 关10兴 Boissonnat, J. D., 1984, ‘‘Geometric Structures for Three-dimensional Shape Representation,’’ ACM Trans. Graph., 3共4兲, pp. 266 –286. 关11兴 Edelsbrunner, H., Kirkpatrick, D. G., and Seidel, R., 1983, ‘‘On the Shape of a Set of Points in the Plane,’’ IEEE Trans. Inf. Theory, IT-29, pp. 551–559. 关12兴 Edelsbrunner, H., 1992, ‘‘Weighted Alpha Shapes,’’ Technical Report UIUCDCS-R-92-1760, Department of Computer Science, University of Illinois, Urbana-Champagne, IL. 关13兴 Edelsbrunner, H., and Mucke, E. P., 1994, ‘‘Three-dimensional Alpha Shapes,’’ ACM Trans. Graphics, 13共1兲, pp. 43–72. 关14兴 Bernardini, F., Mittleman, J., Rushmeier, H., Silva, C., and Taubin, G., 1999, ‘‘The Ball-Pivoting Algorithm for Surface Reconstruction,’’ IEEE Trans. Vis. Comput. Graph., 5共4兲, pp. 349–359. 关15兴 Petitjean, S., and Boyer, E., 2001, ‘‘Regular and Non-regular Point Sets: Properties and Reconstruction,’’ Comput. Geom. Theory Appl., 19, pp. 101–126. 关16兴 Huang, J., and Menq, C. H., 2002, ‘‘Combinatorial Manifold Mesh Reconstruction and Optimization from Unorganized Points with Arbitrary Topology,’’ Comput.-Aided Des., 34共2兲, pp. 149–165. 关17兴 Bajaj, C., Bernardini, F., and Xu, G., 1995, ‘‘Automatic Reconstruction of Surfaces and Scalar Fields from 3D Scans,’’ Proc. SIGGRAPH ’95, pp. 109– 118. 关18兴 Bajaj, C., Bernardini, F., Chen, J., and Schikore, D., 1997, ‘‘Triangulationbased 3D Reconstruction Methods,’’ Proc. 13th ACM Sympos. on Comput. Geom., pp. 484 – 484. 关19兴 Bajaj, C., Bernardini, F., and Xu, G., 1997, ‘‘Reconstruction of Surfaces and Surfaces-on-Surfaces from Unorganized Three-Dimensional Data,’’ Algorithmica, 19, pp. 243–261. 关20兴 Bernardini, F., Bajaj, C., Chen, J., and Schikore, D., 1999, ‘‘Automatic Reconstruction of 3D CAD Models from Digital Scans,’’ Int. J. on Comp. Geom. and Appl., 9共4 –5兲, pp. 327–370. 关21兴 Curless, B., and Levoy, M., 1996, ‘‘A Volumetric Method for Building Complex Models from Range Images,’’ Proc. SIGGRAPH ’96, pp. 303–312. 关22兴 Boissonnat, J-D., and Cazals, F., 2000, ‘‘Smooth Surface Reconstruction via Natural Neighbor Interpolation of Distance Functions,’’ Proc. 16th. ACM Sympos. on Comput. Geom, pp. 223–232. 关23兴 Bentley, L., 1975, ‘‘Multidimensional Binary Search Trees Used for Associative Searching,’’ Commun. ACM, 18共9兲, pp. 509–517. 关24兴 Edelsbrunner, H., and Guoy, D., 2002, ‘‘Sink-insertion for Mesh Improvement,’’ Int. J. Found. Comput. Sci., 13, pp. 223–242. 关25兴 Yau, H. T., Kuo, C. C., and Yeh, C. H., 2002, ‘‘Extension of Surface Reconstruction Algorithm to the Global Stitching and Repairing of STL Models,’’ Comput.-Aided Des., 35共5兲, pp. 477– 486. 关26兴 Jun, C. S., Kim, D. S., and Park, S., 2002, ‘‘A New Curve-based Approach to Polyhedral Machining,’’ Comput.-Aided Des., 34共5兲, pp. 379–389. 关27兴 Aurenhammer, F., 1991, ‘‘Voronoi Diagrams—A Survey of a Fundamental Geometric Data Structure,’’ ACM Comput. Surv., 23共3兲, pp. 345– 405. 关28兴 http://www.cgal.org/ 关29兴 Boissonnat, J. D., Devillers, O., Teillaud, M., and Yvinec, M., 2000, ‘‘Triangulations in CGAL,’’ Proc. 14th ACM Sympos. On Comput. Geom., pp. 11– 18. 关30兴 Bro¨nnimann, H., Burnikel, C., and Pion S., 1998, ‘‘Interval Arithmetic Yields Efficient Dynamic Filters for Computational Geometry,’’ Proc. 14th. ACM Sympos. on Comput. Geom., pp. 165–174. 关31兴 Devillers, O., 1998, ‘‘Improved Incremental Randomized Delaunay Triangulation,’’ Proc. 14th ACM Sympos. Comput. on Geom., pp. 106 –115. 关32兴 http://www.cs.utexas.edu/users/amenta/powercrust/welcome.html 关33兴 http://www.cis.ohio-state.edu/⬃tamaldey/cocone.html

Transactions of the ASME