This application is based upon and claims the benefit of priority from the prior Japanese Patent Application No. 2006-035719 which was filed on Feb. 13, 2006.
1. Field of the Invention
The present invention relates to an apparatus, a method and a program for segmentation of mesh model data into analytic surfaces based on robust curvature estimation and region growing.
2. Description of Related Art
3D laser scanning systems are widely used in the field of reverse engineering to acquire geometric point cloud data from real-world products. More recently, high energy X-ray scanning systems have been rapidly developed, and they are used to acquire 3D image data of complex engineering parts with inner structures quickly and non-destructively. To use the acquired scanned data in today's digital engineering, it is easily converted into a 3D mesh model by a well known surface reconstruction algorithm such as marching cubes [1]. When 3D scanned mesh model is utilized for repairing, replication, analysis, or inspection of engineering parts, it is necessary to efficiently segment the mesh model into desirable regions depending on its applications.
The surfaces of engineering parts mainly consist of a set of analytic surfaces, such as planes, cylinders, spheres, cones and tori. Therefore, it is necessary to extract regions where each can be closely approximated by a simple analytic surface from a mesh model. This segmentation or extraction enables the feature recognition from mesh models, and it plays an important pre-process for parametric mesh deformation, mesh smoothing, FEM mesh generation and solid model creation.
Many methods have been proposed to extract regions which are separated by sharp edges, or each of which can be approximated by a single free form surface patch. However, few methods have been proposed to extract regions each of which can be approximated by an analytic surface from a mesh model. Moreover, in these methods, the accuracies of extracting regions from noisy mesh models and the range of extracted analytic surface classes were not necessarily sufficient from the aspect of practical engineering use.
Related works are as follows. Mesh curvature estimation is one of the essential techniques used in many mesh applications, such as mesh segmentation, mesh feature extraction and re-meshing. Therefore a variety of approaches have been proposed [5], [6] and [7]. As Razdan mentioned in his work [5], mesh curvature estimations are roughly divided into two groups. One is to estimate curvatures by formulating a closed form for differential geometry operators on the discrete representation (discrete), and the other is to first locally fit a relatively high ordered surface around each mesh vertex and to estimate curvatures by analyzing this surface (continuous). As reported in the past works [3], [4] and [5], the latter estimation provides better results for noisy mesh models.
Mesh segmentation is a technique that partitions a mesh model into desirable regions depending on applications, and many approaches have been proposed for this segmentation. The mesh segmentation is roughly divided into three groups:
The first group is to extract regions separated by sharp edges on a mesh model. In this group, a watershed-based approach has been well studied [8], [9] and [10]. This watershed algorithm was first proposed for 2D image segmentation, and Mangan et al. [8] extended it into mesh segmentation. In this watershed algorithm, a feature value such as mesh curvature for each vertex is allocated and local minima of curvatures are found. Then neighboring vertices around each local minima are clustered using a steepest descent algorithm, and sharp edges appear at the boundary between two clusters. Sun et al. [9] improved the algorithm using a more robust vertex feature value calculation for noisy scanned meshes. Razdan et al. [10] improved the algorithm for a mesh tessellated from a solid model. These methods can segment a mesh model into regions separated by sharp edges. However they cannot extract regions separated by smooth edges (i.e., a region consisting of a plane smoothly connected to a cylinder), and therefore cannot correctly identify the surface geometry of each segmented region.
The second group is to extract regions each of which can be approximated by a simple free form surface. In this group, a region growing approach [3], [11] and [12] has been studied. The region growing method was first proposed by Besl et al. [11] for height field data. Recently Vieira et al. [3] extend this method into 3D noisy mesh models by a laser scanner. This algorithm first estimates mesh curvatures and creates seed regions using the sign of mesh curvatures. Then it iteratively fits free form surfaces and adds neighboring vertices to the regions for extracting final regions. This method can extract free form surface regions from noisy mesh models, and can separately extract smoothly blended surfaces. However the method did not focus on extracting regions approximated by analytic surfaces and their geometric parameters.
The last group is to extract regions each of which can be approximated by a simple analytic surface. Gelfand et al. [13] proposed a method based on eigenvalue analysis of mesh vertices and their normal vector. However this method only extracts regions which can be approximated by planes, cylinders and spheres. Wu et al. [14] proposed a method based on Lloyd's clustering algorithm. In their method, in addition to the three surfaces, the fillet regions approximated by a rolling ball along free form curves can be extracted. However they did not discuss how well the method works for a noisy mesh model, and how they specify initial regions of segmentation. Moreover the processing time is relatively slow due to the iteration of surface fitting and clustering. Benko et al. [4] proposed the direct segmentation method for reverse engineering of the engineering part. Their algorithm first discards triangles in the vicinity of sharp edges by locally fitting a plane, and divides the input mesh into regions. Next, geometric compatibility between triangles and underlying surfaces are tested for each regions based on a variety of indicators, such as normal vectors or principal curvatures. Thus regions are extracted which can be approximated by simple analytic surfaces (planes, cylinders, spheres, cones, tori), linear sweep surfaces and the surface of revolutions. However this algorithm can result in poor segmentation near boundaries of surfaces where the indicators in mesh models may not be properly estimated. They applied their segmentation only for a simple mesh model with very simple geometry.
[1] Lorensen, W. E., Harvey, E. C.: Marching cubes: A high resolution 3D surface construction algorithm. ACM SIGGRAPH Computer Graphics, Vol. 21, No. 4. (1987) 163-169
[2] Benko, P., Martin, R., Várady, T.: Algorithms for reverse engineering boundary representation models. Computer Aided Design, Vol. 33, No. 11. (2001) 839-851
[3] Vieira, M., Shimada, K.: Surface mesh segmentation and smooth surface extraction through. Computer-Aided Geometric Design, Vol. 22, No. 8. (2005) 771-792
[4] Benko, P., Várady, T.: Segmentation methods for smooth point regions of conventional engineering objects. Computer-Aided Design, Vol. 36, No. 6. (2004) 511-523
[5] Razdan, A., Bae, M. S.: Curvature estimation scheme for triangle meshes using biquadratic Béezier patches. Computer-Aided Design, Vol. 37, No. 14. (2005) 1481-1491
[6] Meyer, M., Desbrun, M., Schröder, P., Barr, A. H.: Discrete Differential-Geometry Operators for Triangulated 2-Manifolds. Proc. of Visualization and Mathematics, Vol. 3. (2002) 34-57
[7] Steiner, C. D., Morvan, J. M.: Restricted Delaunay triangulations and normal cycle. Proc. of the nineteenth annual symposium on computational geometry. (2003) 312-321
[8] Mangan, A. P., Whitaker, R. T.: Partitioning 3D Surface Meshes Using Watershed Segmentation. IEEE Transaction on visualization and computer graphics, Vol. 5, No. 4. (1999) 308-321
[9] Sun, Y. D., Page, L., Paik, J. K., Koschan, A., Abidi, M. A.: Triangle mesh-based edge detection and its application to surface segmentation and adaptive surface smoothing. Proc. of the International Conference on Image Processing. Vol. 3. (2002) 825-828
[10] Razdan, A.: Hybrid approach to feature segmentation of triangle meshes. Computer-Aided Design, Vol. 35, No. 9. (2003) 783-789
[11] Besl, P. J., Jain, R. C.: Segmentation through Variable-Order Surface Fitting. IEEE Transactions on Pattern Analysis and Machine Intelligence. Vol. 10, No. 2. (1988) 167-192
[12] Djebali, M. Melkemi, M., Sapidis, N.: Range-Image segmentation and model reconstruction based on a fit-and-merge strategy. Proc. of ACM symposium on Solid modeling and applications. (2002) 127-138
[13] Gelfand, N., Guibas, L. J.: Shape segmentation using local slippage analysis. Proc. of Eurographics/ACM SIGGRAPH symposium on Geometry processing. (2004) 214-223 Wu, J., Kobbelt, L.: Structure Recovery via Hybrid Variational Surface Approximation. Proc. of Eurographics. Vol. 24, No. 3. (2005) 277-284
[14] Lloyd, S.: Least square quantization in PCM. IEEE Transactions on Information Theory. Vol. 28. (1982) 129-137
[15] Kós, G., Martin, R., Várady, T.: Methods to recover constant radius rolling blends in reverse engineering. Computer-Aided Geometric Design. Vol. 17, No. 2. (2000) 127-160
[16] Benko, P., Kós, G., Várady, T., Andor, L., Martin, R.: Constrained fitting in reverse engineering. Computer-Aided Geometric Design. Vol. 19, No. 3. (2002) 173-205
[17] Marshall, D., Lukacs, G., Martin, R.: Robust Segmentation of Primitives from Range Data in the Presence of Geometric Degeneracy. IEEE Transactions on Pattern Analysis and Machine Intelligence. Vol. 23, No. 3. (2001) 304-314
[18] Zhu, H., Menq, C. H.: B-Rep model simplification by automatic fillet/round suppressing for efficient automatic feature recognition. Computer-Aided Design. Vol. 34, No. 2. (2002) 109-123
[19] Japanese Unexamined Patent Application Publication No. Hei-9-311951
[20] Japanese Unexamined Patent Application Publication No. 2001-325304
[21] Japanese Unexamined Patent Application Publication No. 2004-272820
[22] Japanese Unexamined Patent Application Publication No. 2005-327041
An object of the present invention is to provide an apparatus, a method and a program for segmentation of mesh model data into analytic surfaces based on robust curvature estimation and region growing that segments mesh model data into regions where each can be approximated by a simple analytic surface. The present invention employs an accurate mesh curvature estimation based on recognition of sharp edges on a noisy mesh model. Combining this accurate curvature estimation with the non-iterative region growing enables to find more accurate boundaries between underlying analytic surfaces. Moreover, the present invention can extract higher-level classes of surfaces (fillet surfaces, linear extrusion surfaces and surfaces of revolution) from the analytic surfaces by categorizing neighboring relations of surfaces and by grouping them.
In order to accomplish the objects, a first aspect of the present invention provides an apparatus for segmentation of mesh model data into analytic surfaces, including an input unit configured to input mesh model data; a principal curvature calculator configured to find, in the mesh model data, sharp vertices each having a principal curvature (maximum principal curvature) greater than a threshold, exclude the sharp vertices, and calculate principal curvatures at each non-sharp vertex in the mesh model data; a seed region creator configured to create, from the calculated principal curvatures, seed regions each being considered to belong to an analytic surface region and including a set of linked vertices; a surface fitting unit configured to determine, for each of the created seed regions, geometric parameters that define an analytic surface region according to the vertices of the seed region and fit the analytic surface region to the seed region; a analytic surface region extractor configured to determine, for each of the created seed regions, whether or not each vertex that is in the vicinity of the seed region has allowable errors relative to the position and normal of the surface fitted to the seed region, add the vertex to the seed region if the vertex has allowable errors to thereby grow the seed region, and extract an analytic surface region representative of the grown seed region; a surface region recognizer configured to recognize fillet surface regions, linear-extrusion surface regions and surface regions of revolution in the extracted analytic surface regions; and a data output unit configured to output information of the extracted analytic surface regions and the recognized regions.
According to the first aspect of the present invention, the principal curvature calculator sets a parameter for determining a curvature evaluating range of each vertex twice as large as an average length of edges connected to the vertex, calculates principal curvatures at the vertex, classifies the vertex as a sharp vertex if a maximum principal curvature thereof is greater than the threshold, sets a parameter for determining a curvature evaluating range of each non-sharp vertex five times as large as an average length of edges connected to the non-sharp vertex, and calculates principal curvatures at the non-sharp vertex.
According to the first aspect of the present invention, the seed region creator includes a vertex labeling unit configured to examine the principal curvatures of each vertex calculated by the principal curvature calculator and assign to the vertex a label indicative of one selected from the group consisting of a plane surface, a cylindrical surface, a conical surface, a spherical surface and an optional surface to which the vertex belongs; and a seed region extractor configured to extract, as a seed region, a set of linked vertices having the same label assigned by the vertex labeling unit.
According to the first aspect of the present invention, the vertex labeling unit prepares, for vertices to which the optional surface label is assigned, a histogram with an abscissa representing principal curvatures and an ordinate representing the numbers of vertices and assigns a toric surface label to a group of vertices which have a predetermined principal curvature and whose number is greater than a threshold on the histogram.
According to the first aspect of the present invention, when fitting any one of a cylindrical surface and a conical surface to a seed region, the surface fitting unit fits a plane to intersections between normals at vertices contained in the seed region and a Gaussian sphere and determines a normal of the plane as a direction of an axis. For the cylindrical surface, the surface fitting unit projects the vertices contained in the seed region to a plane that has a normal in the axis direction and crosses an origin, fits a circular arc to the projected vertices, and finds a center of the circular arc and an arbitrary point on the axis. For the conical surface which satisfies a condition that a vector connecting the apex of the conical surface to each mesh vertex is orthogonal to a normal at the mesh vertex, the surface fitting unit calculates the apex of the conical surface according to the least square method and finds an apex angle according to an average of angles between the axis direction and the normals at the mesh vertices.
According to the first aspect of the present invention, when fitting a toric surface to a seed region, the surface fitting unit finds a direction of an axis and an arbitrary point on the axis, and according to the axis direction and arbitrary point, uses the least square method to calculate a center c, major radius R and minor radius r of the toric surface on condition that a minor-radius center c′ is found by inwardly extending normals at mesh vertices for the minor radius r and the major radius R is found as a distance between the center c and the minor-radius center c′.
A second aspect of the present invention provides a method for segmentation of mesh model data into analytic surfaces, including inputting mesh model data; finding, in the mesh model data, sharp vertices each having a principal curvature (maximum principal curvature) greater than a threshold, excluding the sharp vertices, and calculating principal curvatures at each non-sharp vertex in the mesh model data; creating, from the calculated principal curvatures, seed regions each being considered to belong to an analytic surface region and including a set of linked vertices; determining, for each of the created seed regions, geometric parameters that define an analytic surface region according to the vertices of the seed region and fitting the analytic surface region to the seed region; determining, for each of the created seed regions, whether or not each vertex that is in the vicinity of the seed region has allowable errors relative to the position and normal of the surface fitted to the seed region, adding the vertex to the seed region if the vertex has allowable errors to thereby grow the seed region, and extracting an analytic surface region representative of the grown seed region; recognizing fillet surface regions, linear-extrusion surface regions and surface regions of revolution in the extracted analytic surface regions; and outputting information concerning the extracted analytic surface regions and the recognized regions.
According to the second aspect of the present invention, finding sharp vertices and calculating principal curvatures include setting a parameter for determining a curvature evaluating range of each vertex twice as large as an average length of edges connected to the vertex, calculating principal curvatures at the vertex, classifying the vertex as a sharp vertex if a maximum principal curvature thereof is greater than the threshold, setting a parameter for determining a curvature evaluating range of each non-sharp vertex five times as large as an average length of edges connected to the non-sharp vertex, and calculating principal curvatures at the non-sharp vertex.
According to the second aspect of the present invention, creating seed regions includes examining the calculated principal curvatures of each vertex, assigning to the vertex a label indicative of one selected from the group consisting of a plane surface, a cylindrical surface, a conical surface, a spherical surface and an optional surface to which the vertex belongs, and extracting, as a seed region, a set of linked vertices having the same assigned label.
The method according to the second aspect of the present invention may further include preparing, for vertices to which the optional surface label is assigned, a histogram with an abscissa representing principal curvatures and an ordinate representing the numbers of vertices and assigning a toric surface label to a group of vertices which have a predetermined principal curvature and whose number is greater than a threshold on the histogram.
According to the second aspect of the present invention, determining geometric parameters that define an analytic surface region and fitting the analytic surface region include, when fitting any one of a cylindrical surface and a conical surface to a seed region, fitting a plane to intersections between normals at vertices contained in the seed region and a Gaussian sphere and determining a normal of the plane as a direction of an axis; for the cylindrical surface, projecting the vertices contained in the seed region to a plane that has a normal in the axis direction and crosses an origin, fitting a circular arc to the projected vertices, and finding a center of the circular arc and an arbitrary point on the axis; and for the conical surface which satisfies a condition that a vector connecting the apex of the conical surface to each mesh vertex is orthogonal to a normal at the mesh vertex, calculating the apex of the conical surface according to the least square method and finding an apex angle according to an average of angles between the axis direction and the normals at the mesh vertices.
According to the second aspect of the present invention, determining geometric parameters that define an analytic surface region and fitting the analytic surface region include, when fitting a toric surface to a seed region, finding a direction of an axis and an arbitrary point on the axis, and according to the axis direction and arbitrary point, using the least square method to calculate a center c, major radius R and minor radius r of the toric surface on condition that a minor-radius center c′ is found by inwardly extending normals at mesh vertices for the minor radius r and the major radius R is found as a distance between the center c and the minor-radius center c′.
A third aspect of the present invention provides a computer executable program for segmentation of mesh model data into analytic surfaces, including inputting mesh model data; finding, in the mesh model data, sharp vertices each having a principal curvature (maximum principal curvature) greater than a threshold, excluding the sharp vertices, and calculating principal curvatures at each non-sharp vertex in the mesh model data; creating, from the calculated principal curvatures, seed regions each being considered to belong to an analytic surface region and including a set of linked vertices; determining, for each of the created seed regions, geometric parameters that define an analytic surface region according to the vertices of the seed region and fitting the analytic surface region to the seed region; determining, for each of the created seed regions, whether or not each vertex that is in the vicinity of the seed region has allowable errors relative to the position and normal of the surface fitted to the seed region, adding the vertex to the seed region if the vertex has allowable errors to thereby grow the seed region, and extracting an analytic surface region representative of the grown seed region; recognizing fillet surface regions, linear-extrusion surface regions and surface regions of revolution in the extracted analytic surface regions; and outputting information concerning the extracted analytic surface regions and the recognized regions.
According to the third aspect of the present invention, finding sharp vertices and calculating principal curvatures include setting a parameter for determining a curvature evaluating range of each vertex twice as large as an average length of edges connected to the vertex, calculating principal curvatures at the vertex, classifying the vertex as a sharp vertex if a maximum principal curvature thereof is greater than the threshold, setting a parameter for determining a curvature evaluating range of each non-sharp vertex five times as large as an average length of edges connected to the non-sharp vertex, and calculating principal curvatures at the non-sharp vertex.
According to the third aspect of the present invention, creating seed regions includes examining the calculated principal curvatures of each vertex, assigning to the vertex a label indicative of one selected from the group consisting of a plane surface, a cylindrical surface, a conical surface, a spherical surface and an optional surface to which the vertex belongs, and extracting, as a seed region, a set of linked vertices having the same assigned label.
The computer executable program according to the third aspect of the present invention may include preparing, for vertices to which the optional surface label is assigned, a histogram with an abscissa representing principal curvatures and an ordinate representing the numbers of vertices and assigning a toric surface label to a group of vertices which have a predetermined principal curvature and whose number is greater than a threshold on the histogram.
According to the third aspect of the present invention, determining geometric parameters that define an analytic surface region and fitting the analytic surface region include, when fitting any one of a cylindrical surface and a conical surface to a seed region, fitting a plane to intersections between normals at vertices contained in the seed region and a Gaussian sphere and determining a normal of the plane as a direction of an axis; for the cylindrical surface, projecting the vertices contained in the seed region to a plane that has a normal in the axis direction and crosses an origin, fitting a circular arc to the projected vertices, and finding a center of the circular arc and an arbitrary point on the axis; and for the conical surface which satisfies a condition that a vector connecting the apex of the conical surface to each mesh vertex is orthogonal to a normal at the mesh vertex, calculating the apex of the conical surface according to the least square method and finding an apex angle according to an average of angles between the axis direction and the normals at the mesh vertices.
According to the third aspect of the present invention, determining geometric parameters that define an analytic surface region and fitting the analytic surface region include, when fitting a toric surface to a seed region, finding a direction of an axis and an arbitrary point on the axis, and according to the axis direction and arbitrary point, using the least square method to calculate a center c, major radius R and minor radius r of the toric surface on condition that a minor-radius center c′ is found by inwardly extending normals at mesh vertices for the minor radius r and the major radius R is found as a distance between the center c and the minor-radius center c′.
As mentioned above, each of the apparatus, method and program according to the present invention for segmentation of mesh model data into analytic surfaces inputs mesh model data, finds, in the mesh model data, sharp vertices each having a principal curvature (maximum principal curvature) greater than a threshold, excludes the sharp vertices, calculates principal curvatures at each non-sharp vertex in the mesh model data, creates, from the calculated principal curvatures, seed regions each being considered to belong to an analytic surface region and including a set of linked vertices, determines, for each of the created seed regions, geometric parameters that define an analytic surface region according to the vertices of the seed region, fits the analytic surface region to the seed region, determines, for each of the created seed regions, whether or not each vertex that is in the vicinity of the seed region has allowable errors relative to the position and normal of the surface fitted to the seed region, adds the vertex to the seed region if the vertex has allowable errors to thereby grow the seed region, extracts an analytic surface region representative of the grown seed region, recognizes fillet surface regions, linear-extrusion surface regions and surface regions of revolution in the extracted analytic surface regions and outputs information concerning the extracted analytic surface regions and the recognized regions.
In this way, the apparatus, method and program according to the present invention are capable of inputting a mesh model prepared from a machine part, extracting, from the mesh model, analytic surface regions (planar, cylindrical, conical, spherical and toric surface regions), and automatically recognizing fillet surface regions, linear-extrusion surface regions and surface regions of revolution from the extracted analytic surface regions.
An embodiment of the present invention will be explained in detail with reference to the drawings.
In
The apparatus 100 further includes a principal curvature calculator 3 for calculating principal curvatures on a mesh model in consideration of sharp vertices, a seed region creator 4 for creating seed regions according to the calculated principal curvatures, an analytic surface region extractor 5 for fitting an analytic surface to vertices of each of the created seed regions and expanding the analytic region according to a region growing method and a boundary edge extractor 6 for extracting boundaries of the analytic regions and establishing neighboring relationships among the analytic regions.
The apparatus 100 also includes a region recognizer 7 for recognizing fillet surface regions, linear-extrusion surface regions and surface regions of revolution according to the neighboring relationships and combinations of the analytic regions and an operation controller 9 for controlling operations of the components 1 to 7 of the apparatus 100.
A method for segmentation of scanned mesh model data into analytic surfaces according to an embodiment of the present invention carried out in the apparatus 100 will be explained hereinafter. The scanned mesh model data consists of triangle mesh model data obtained by, for example, a 3-D X-ray CT scanner. The present segmentation method extracts analytic surfaces (planar, cylindrical, conical, spherical and toric surfaces) from the mesh model data, automatically recognizes fillet surface regions, linear-extrusion surface regions and surface regions of revolution according to the analytic surfaces and provides outputs information concerning the extracted analytic surface regions and the recognized regions.
The algorithm of the present method is composed of three steps as shown in
Step 1: Accurate curvature estimation based on recognition of sharp edges is carried out by the principal curvature calculator 3 (described precisely in section A)).
The present algorithm accurately estimates principal mesh curvatures based on an improved method of Razdan's [5]. The present method locally fits a biquadratic Bézier surface to a set of neighboring vertices around each vertex, and estimates two principal curvatures from the fitted surface. It allows robust estimation for a noisy scanned mesh. The algorithm has two pass curvature estimations. In the first pass, the present method finds sharp edges on the mesh based on curvature, and in the second pass, it estimates mesh curvatures that are re-calculated for the regions that do not include sharp edges. This algorithm ensures accurate mesh curvature estimation even around sharp edges where the previous methods generated large estimation error.
Step 2: Analytic surfaces extraction based on non-iterative Region Growing is carried out by the seed region creator 4 and the analytic surface region extractor 5. Furthermore, boundary edges extraction is carried out by the boundary extractor 7 (described precisely in sections B and C).
The present analytic surfaces extraction algorithm is the modified version of Vieira's region growing algorithm [3]. It first creates large seed regions for analytic surfaces extraction using mesh principal curvatures given from step 1. Next, an analytic surface is fitted to each seed region, and vertices topologically connected to seed regions with similar geometric properties are added to the seed regions. In this fit-and-add process, re-calculation of the fitting surface is not required. As a result, regions approximated by analytic surfaces can be extracted. This modified region growing enables to find accurate boundaries of underlying analytic surfaces.
Step 3: Extraction of higher-level classes of surfaces is carried out by the region recognizer 7 (described precisely in section D).
The present method classifies a greater extent of extracted analytic surfaces into higher-level classes of surfaces than those in the existing methods [4], [13] and [14]: fillet surface, linear extrusion surface and surface of revolution. This is achieved by categorizing neighboring relations of surfaces and by grouping them.
Triangular mesh models whose surfaces are completely composed of planes, cylinders, spheres, cones and tori are dealt here for simplification as an example of a mesh model (80,000 triangles) shown in
A) Robust Estimation of Mesh Principal Curvatures by Recognizing Sharp Edges.
A robust mesh principal curvatures estimation method recognizing sharp edges on a mesh based on an improved version of Razdan's method [5], and two-pass estimation to ensure the accuracy of curvatures are employed.
A1) Razdan's Mesh Curvature Estimation [5].
To estimate mesh curvatures on a noisy mesh model, Razdan proposed first locally fit a biquadratic Bézier surface of Eq. (1) for a mesh vertex (u,v) and a set of vertices included in its 2-ring, and to estimate mesh curvatures at the vertex from the fitted surface.
where bij is a control point of the biquadratic Bézier surface, x(u,v) is a point on the surface, and Bi2(u), Bj2(v) are quadratic Bernstein functions.
To avoid unwanted distortion of the fitted surface due to the scanning noise in a data, a smoothing constraint is imposed that makes each of the four quadrilaterals bounded by nine control points as close to being parallelogram as possible. Razdan added this constraint to the original least square fitting problem, and controlled the smoothing effect by specifying the smoothing parameter a between 0 and 1.
A2) A Proposed Mesh Curvature Estimation and Vertex Normal Vector Calculation Method.
Razdan's method [5] as shown above is improved. The improved method fits a biquadratic Bézier for each vertex vi and a set of neighboring vertices which satisfy the condition of Eq. (2), and calculates principal curvatures Ki,max, Ki,min for vj from this fitted surface.
∥vj−vi∥<W·li,avg (2)
where li,avg is an average edge length containing the vertex vi, and W is a parameter to specify the size of surface-fit.
Razdan mentioned in their paper [5] that smoothing parameter a=0.7 provides good results for noisy meshes, but in experimental results, it has been found that a=0.9 provides better results especially around sharp edges that are recognized using the proposed method. Because more number of neighboring vertices is used in the proposed method for fitting a Bézier surface than the one of Razdan's, the local least square fitting of Bézier surface itself has an smoothing effect. Therefore a=0.9 is used for all meshes in this embodiment.
The vertex normal vector of vi is estimated by Eq. (3).
where F*(t) is a set of triangles containing the vertex vi, and af is an area of a triangle f. This normal vector is also used in the region growing step mentioned in section C2.
To robustly estimate principal curvatures on noisy scanned meshes, a parameter W should be larger. However, a larger parameter setting results in poor curvature estimation around sharp edges. To solve the problem, the following two-pass curvature estimations are preferable. In the first pass, principal curvature is estimated by fitting the surface relatively large on the surface of the mesh. For this purpose, parameters W=2 is set. If the maximum curvature Ki,max of the vertex vi satisfies Eq. (4), the vertex is classified as a sharp vertex.
As Vieira et al. [3] mentioned, thse=10.0 provides good results for most scanned mesh models.
In the second pass, principal curvatures are re-calculated for non-sharp vertices with parameters W=5. In this step, sharp vertices are not included for the Bézier surface fitting as shown in
Moreover in the present method, the normal vector n′i for the vertex vi is also re-calculated as the normal of the fitted Bézier surface. This normal vector is better in accuracy than the one calculated from Eq. (3) for noisy mesh models. The re-calculated normal vectors are used for the analytic surface fitting step described in section C1.
A3) Comparison of Curvature Estimation Methods.
Comparison of the accuracy of the maximum principal curvature estimation among three estimation methods has been carried out as in the following: one of Razdan's and two of the proposed methods consisting of the method with and without sharp edge recognition.
Artificial noises are added by moving the position of each vertex to its normal direction using a Gaussian distributed random value with a standard deviation of 5% of the average mesh edge length for the cylindrical mesh model shown in
A4) Curvature Filtering.
The proposed method can accurately estimate mesh principal curvatures. However estimation errors are unavoidable due to scanning noises. Therefore the estimated curvatures are smoothed by the filtering method proposed by Vieira [3].
First, median filtering in Eq. (5) is applied to the non-sharp vertices for eliminating the vertices with outlier irregular principal curvatures. It is applied to the 1-ring neighborhood N*(i) of a vertex Vi not including sharp vertices as follows:
(κi,max)new=median[κj,max]j∈N*(i) and (κi,min)new=median[κj,min]j∈N*(i) (5)
Next, mean filtering in Eq. (6) is applied three times to the non-sharp vertices to smooth principal curvatures. This is also applied to the 1-ring neighborhood N*(i) not including sharp vertices.
B) Seed Region Creation.
Next, seed regions are created on the surface of a mesh by classifying estimated principal curvatures. In this method, a seed region means a set of topologically connected vertices that are supposed to be on a certain analytic surface.
B1) Allocating Initial Labels to Vertices.
The process of seed region creation is divided into three steps as shown in
Step STA1: Allocation of Initial Labels for Planes, Cylinders/Cones and Spheres to the Vertex.
An initial label for plane, cylinder/cone and sphere that discriminates on which surface a vertex lies are allocated to each vertex vi. The present method allocates the labels for non-sharp vertices classified in section A2 according to Eq. (7) by evaluating two principal curvatures. Three parameters e1, e2 and e3 are used in Eq. (7). For most mesh models, e1=0.01, e2=0.01 and e3=0.01 provide good results, but they must be set properly depending on mesh geometries and mesh resolutions in case of complex geometry.
Step STA2: Classification of Cylinders/Cones and Smoothly Connected Cylinders.
At the step STA1 the label 2 was allocated for both cylinders and cones. In this step, these cylinders and cones are discriminated. The smoothly connected cylinders are also separated into different single cylinders. To achieve this discrimination, a similarity value of the principal maximum curvature f(vi) is calculated for each vertex vi according to Eq. (8).
where N**(i) is a set of vertices in 2-ring of the vertex Vi. If f(vi) is larger than the threshold thcyl
Step STA3: Allocation of Initial Labels for Tori.
Previous two steps allocate labels for plane, cylinder, sphere and cone, therefore most of vertices with label 0 are assumed to lie on tori. To allocate torus labels to such vertices, principal curvatures of vertices that have label 0 are evaluated.
A torus is the excursion surface where a sphere is rotated along an axis. Therefore one of the principal curvatures corresponds to the constant curvature of the radius r of the sphere. This property is used to create a histogram of discretized principal curvatures for a set of vertices that have the label 0 as shown in
Step STA4: Creation of Seed Regions.
Finally, a seed region is created as a set of topologically connected vertices with the same label that has the number of vertices larger than the threshold thseed shown in table 1. In an implementation, thseed corresponds to the minimum number of vertices which enables the least square analytic surface fitting that is proposed by this method, and is described in section C1.
C) Analytic Surface Extraction.
The analytic surface extraction process consists of three steps as shown in
Step STB1: Analytic Surfaces Fitting to Seed Regions.
After creating seed regions for different kinds of analytic surfaces based on the analysis of principal curvatures of a mesh surface, an appropriate surface is fitted to the seed region and its geometric parameters that define the surface are calculated.
Much research has been done to fit analytic surfaces to scanned data in the field of reverse engineering [16], [17] and [18]. Marshall et al. [18] proposed a non-linear method to accurately fit analytic surfaces including spheres, cylinders, cones and tori [18]. In this method, the accuracy of fitting was better than the linear methods. However it needed large calculation time to solve non linear problems iteratively.
In this embodiment, an efficient analytic surface fitting by utilizing pre-computed normal vectors n′i by solving linear least squares problems to find fitted planes, cylinders, spheres and cones is employed. This method is less accurate than Marshall's method, but faster than it, and provides a practically enough results for analytic surface extraction.
[Plane Fitting]
As illustrated in
[Cylinder Fitting]
As illustrated in
[Sphere Fitting]
As illustrated in
x2+y2+z2+Ax+By+Cz+D=0 (10)
[Cone Fitting]
As illustrated in
n′ix(ax−vix)+n′iy(ay−viy)+n′iz(az−viz)=0 (11)
A vertical angle θ is calculated as the average of angles between d and a vertex normal n′i in Eq. (12).
[Torus Fitting]
As shown in
In above mentioned fittings, calculation of axis direction and an arbitrary point on the axis is carried out by utilizing Kós's method [16].
Let p an arbitrary point on the axis and p0=P*d. And the angle between d and n′i is denoted by fi, and the distance between the normal line vi+tn′i and the axis by di.
In Kós's method,
Σ(δi sin φi)2
was minimized to calculate d and p, where
δi sin φi=|(d×n′i)·(p−vi)|=|n′i·p0+(vi×n′i)·d| (13)
is a linear function of p0 and d.
Σ(δi sin φi)2
can be written as a simple quadratic form on p0 and d under the constraints |d|=1 and p0*d=0. Discarding the constraint p0*d=0 changes the problem to a simple eigenvalue problem, d and p are calculated as a result.
In above mentioned torus fitting, calculation of the center C, the radius r of the torus body, and the radius R of the centerline of the torus body is carried out as below.
All vertices in a seed region are rotated around the calculated axis so as to be placed onto a plane which include the calculated axis, then a circle is fitted to the points on the plane in the least squares sense. The radius r is calculated as the one of that circle. The center C is calculated according to the condition that the vector toward the center of the torus C from the center of the circle is orthogonal to the torus axis. The radius R is also calculated as the length between the center of the torus and the center of the circle.
Step STB2: Extraction of Analytic Surfaces Based on Region Growing.
From the process described in the previous processes, the analytical surface fitted to the seed region has been estimated. The proposed region growing method makes a set of vertices adjacent to the seed region added to the original seed region if the vertex lies on the fitted surface within a specified tolerance. Therefore a positional error ei,pos and a directional error of the normal ei,norm of the vertex vi are calculated, and the vertex which is adjacent to the seed region and satisfies Eq. (14) and Eq. (15) are added to the seed regions.
ei,pos<thpos·lavg (14)
ei,norm<thnorm (15)
where lavg is an average length of all mesh edges. Thresholds thpos=0.5 and thnorm=8.0 provide good results for scanned data.
This region growing is done for the seed region in the descending order of the number of vertices in the region. This enables to generate a small number of larger regions. If all the vertices adjacent to the region do not satisfy Eq. (14) or Eq. (15), the region growing stops. The region can be extracted as a set of topologically connected vertices that are approximated by a particular analytic surface.
As shown in
Step STB3: Extraction of Boundary Edges of the Regions.
The segmentation method next extracts boundary edges of a region to construct neighboring relations among the regions. In the previous steps, some vertices around sharp edges are sometimes left which are not added to any regions. To add such vertices to one of the existing regions, region growing continues with gradually larger thresholds (thpos, thnorm) which vary at each step (for example, (1.0, 16.0), (1.5, 24.0), (2.0, 32.0) . . . ) until all vertices are completely added to any region. As a result, a region label is completely allocated to all vertices.
To extract boundary edges of the regions, region labels are also allocated to each triangle based on the region labels already allocated to vertices. If three vertices of a triangle have the same region label, the same label is allocated to the triangle. If three vertices have different region labels, the triangle normal vector is compared with the normals of the regions specified by the labels of the three vertices. The label of the region that produces the minimal error of normal vectors is allocated to the triangle. Finally, a mesh edge with two connecting triangles having different region labels is extracted as a boundary edge.
D) Recognition of Fillet Surfaces, Linear Extrusion Surfaces and Surfaces of Revolution.
For the effective use of a mesh model in various mesh applications, the present method recognizes fillet surfaces, linear extrusion surfaces and surfaces of revolutions which are often included in most engineering parts from a mesh model. The present method derives such regions based on neighboring relations or combinations of extracted analytic surface regions.
D1) Recognition of Fillet Surfaces.
Fillet surface is a surface created by rounding sharp edges and corners of a solid model according to the specified radii. It is assumed that all surfaces in a mesh model are covered with analytical surfaces, and fillet surfaces are also represented by them. This assumption enables to classify fillet surfaces into three types: cylinders, spheres and tori [19]. These surfaces can be defined based on their geometric parameters and combinations of neighboring surfaces as shown in
Among the extracted toric, spherical and cylindrical surface regions, regions that are between neighbor surfaces and satisfy geometric conditions are recognized as a torus-type fillet surface region FLT1 (
The fillet surface FLT1 of
The fillet surface FLT2 of
np//dt//dc
The cylinder-type fillet surface FLT3 of
(1) np2⊥dc and np1//dc, and
(2) 0°<θ<180°
The sphere-/torus-type fillet surfaces FLT4 (convex) and FLT4′ (concave) of
There are many other kinds of combinations other than the definition, but the present method only deals with the three types since they often appear in engineering parts more than anywhere else. Of course, other types of fillet surfaces with different combinations are also easily defined in the same way.
D2) Recognition of Linear Extrusion Surfaces.
A linear extrusion surface is created by extruding a 2D curve defined on a plane along its normal direction. In an assumption, the surface is composed of a combination of some planes and cylinders.
These constituents must satisfy the following three conditions:
1) A plane normal and a cylinder axis must be orthogonal,
2) Normal vectors of three or more planes must be coplanar, and
3) Axes of two or more cylinders must be parallel.
The present method recognizes a set of topologically connected analytic surfaces satisfying the above three conditions as a linear extrusion surface.
D3) Recognition of Surfaces of Revolution.
A surface of revolution is a one created by rotating a 2D curve around a rotation axis. In an assumption, the surface is composed a combination of planes, cylinders, spheres, cone and tori.
These constituents must satisfy the following two conditions:
1) Normal vectors of planes and axis directions must be parallel, and
2) Center points of spheres and tori, apexes of cones and arbitrary points of axes of cylinders must lie in a same line with a direction parallel to their normals or axis directions.
This segmentation method can systematically extract analytic surface regions from a mesh model. This method is based on the accurate mesh curvature estimation with sharp edge recognition and the non-iterative region growing to extract regions of which each can be approximated by plane, cylinder, sphere, cone and tori. This segmentation method can also recognize higher-level classes of surfaces: fillet surface, linear extrusion surface and surface of revolution based on the classification of neighboring relations or combinations of extracted analytic surfaces.
From the simulation and the experiment for the various mesh models, it has been found that the present method could produce an accurate and practical geometric model consisting of a set of analytic surfaces, fillet surfaces, linear extrusion surfaces and surfaces of revolution from mesh models.
Typical applications of the present segmentation method are the mesh generation, the mesh deformation for FEM meshes in the CAE pre-processor, and automatic solid models generation for reverse engineering.
Number | Date | Country | Kind |
---|---|---|---|
2006-035719 | Feb 2006 | JP | national |