This application is based upon and claims the benefit of priority from the prior Japanese Patent Application No. 2005-056188, filed on Mar. 1, 2005. The entire contents of which are incorporated herein by reference.
1. Field of the Invention
The present invention relates to a method of and an apparatus for extracting feature edges from a triangular or three-dimensional mesh model and automatically generating a solid model.
2. Background Art
Three-dimensional (3D) measuring devices used in reverse engineering have improved their performance in recent years and now are capable of preparing high-density mesh models from physical models. The mesh models are stored in a 3D database and are retrieved therefrom to reuse them when developing and designing new products.
When developing an industrial product, the product must be precisely designed and a solid model of the product must be prepared. Preparing a solid model from a 3D or triangular mesh model takes a long time according to the present technology. To shorten a product developing time, what is needed is a technique of automatically generating a solid model from a mesh model. In the field of reverse engineering, studies for generating solid models from 3D mesh models are energetically carried out. It is presently difficult, however, to automatically generate a solid model from a mesh model having a complicated shape.
One approach for automatically generating a solid model from a mesh model is to properly extract feature edges from the mesh model and conduct surface fitting according to the feature edges (P. Benko, R. R. Martin, and T. Varady, “Algorithms for reverse engineering boundary representation models,” Computer-Aided Design 33 (11), 839-851, 2001). The feature edges mentioned here are the boundaries of a region that is composed of connected polygons (triangles when using triangular meshes) and is to be recognized as a single functional segment. When extracting such feature edges, there are four requirements.
The first requirement is to extract feature edges with a minimum influence of noise or mesh forming methods. The second requirement is to correctly extract, as feature edges, the boundaries of each fillet surface (a rounded surface that connects two surfaces to each other) frequently contained in industrial products. The third requirement is to extract feature edges that form a loop so that a region surrounded with the loop is recognized as a single segment. The fourth requirement is to allow a user to selectively extract feature edges depending on a purpose of use. There is presently no feature edge extraction technique that completely satisfies these four requirements.
There are two major methods for extracting feature edges from a mesh model. One is to directly extract feature edges from a mesh model, and the other is to divide a mesh model into segments and extract the boundaries of the segments as feature edges.
The former method of directly extracting feature edges from a mesh model is disclosed in Daichl Watanabe and Hiroaki Chiyokura, “Feature edge extraction from arbitrary triangular meshes,” The Institute of Electronics, Information and Communication Engineers Transactions, D-IIJ83-D-II (5), 1344-1352, 2000; A. Meyer and P. Marin, “Segmentation of 3D triangulated data points using edges constructed with a C1 discontinuous surface fitting,” Computer-Aided Design 36, 1327-1336, 2004; and Yutaka Ohtake, Alexander Belyaev, and Hans-Peter Seidel, “Ridge-Valley Lines on Meshes via Implicit Surface Fitting,” ACM Transactions on Graphics 23 (3), 652-663, 2004. The method disclosed in the document of Watanabe, et al. simplifies a triangular mesh model by storing shape feature edges as many as possible. To achieve this, the method calculates edge feature values according to the edge connectivity and dihedral angle of each edge and the curvature of a partial region defined by a phase distance related to the edge, groups edges having feature values exceeding a threshold value specified by a user, and extracts the grouped edges as feature edges. This method defines a region with a phase distance, evaluates a group of edges in the region, and calculates edge feature values. Due to this, the method has a problem that feature edges to be extracted are dependent on a method used to form the mesh model. The method has another problem that extracted feature edges do not loop because the feature edges are extracted with the use of a threshold value.
The method disclosed in the document of Meyer, et al. evaluates dihedral angles of meshes to find a start point, fits to the start point an “absoid” surface that can properly express a local discontinuous shape, finds an original edge start point, and generates feature edges. The generated feature edges are connected to each other at their end points. This method has a problem that, if an objective mesh model is composed of a small number of triangles, feature edges to be extracted sometimes do not loop.
The method disclosed in the document of Ohtake, et al. calculates curvatures on approximate implicit function surfaces generated from an input mesh model, detects feature edges according to the curvatures, and projects the detected feature edges on the original mesh model to thereby extract feature edges. This method approximates and generates implicit function surfaces from an input mesh model, and on the implicit function surfaces, calculates higher-order differential values that are not obtainable directly from the mesh model. According to the higher-order differential values, the method extracts ridges and valleys of the mesh model. This method has a problem that the extracted feature edges do not loop. A loop is formed only through intricate postprocesses. The method has another problem that feature edges to be extracted are dependent on the orientation of a mesh model and a long time is needed to calculate higher-order differential values on implicit function surfaces.
The latter method of extracting feature edges from divided regions is disclosed in A. P. Mangan and R. T. Whitaker, “Partitioning 3D Surface Meshes Using Watershed Segmentation,” IEEE Transactions on visualization and computer graphics 5 (4). 308-321, 1999; Y. Sun, D. L. Page, J. K. Paik, A. Koschan, and M. A. Abidi, “Triangle mesh-based edge detection and its application to surface segmentation and adaptive surface smoothing,” Proc. IEEE ICIP 2002, 825-828, 2002; and Y. Sun, “Surface Modeling and Analysis Using Range Images, Smoothing, Registration, Integration and Segmentation,” A Dissertation Presented for the Doctor of Philosophy Degree, The University of Tennessee, Knoxville, 2002. These documents relate to a technique of separating a triangular mesh model that is obtained by reverse engineering and contains much noise. The technique calculates a feature value for each vertex, carries out segmentation based on the calculated feature values with the use of the watershed method, and extracts the boundaries of each segment as feature edges. The feature edges extracted with the use of the watershed method are greatly dependent on the vertex feature values. To extract feature edges with a minimum influence of measurement noise contained in a mesh model or a method used to form the mesh model, it is necessary to globally, instead of locally, evaluate the mesh model when calculating vertex feature values. The watershed method, however, separates a mesh model into segments each containing vertexes, and at this time, creates a gap between adjacent segments. The gap contains triangles belonging to no segments, thereby forming a feature edge that must be shared as a boundary between adjacent segments but is actually shared by no segments.
There is another document by S. Pulla, A. Razdan, and Gerald Farin, “Improved Curvature Estimation for Watershed Segmentation of 3-Dimensional Meshes,” Arizona State University, Technical Report, 2001. To calculate feature values, this method generates an approximate Bezier surface around each vertex of an input mesh model, calculates an approximate curvature of the Bezier surface, and provides the calculated approximate curvature as a vertex feature value. By expanding a range for which an approximate Bezier surface is generated, the method may reduce the influence of noise contained in the input mesh model. This method, however, has a problem that the feature value involves a large error if the vertex is on sharp edges. The method has another problem that calculated feature values are dependent on approximation accuracy and increasing the approximation accuracy extends a calculation time.
A. Razdan and M. S. Bae disclose another technique in “A hybrid approach to feature segmentation of triangle meshes,” Computer-Aided Design 35, 783-789, 2003. This technique is based on the watershed method and is capable of properly dividing a mesh model into segments even if the mesh model includes a surface region that must be recognized as a single segment but contains no vertex, such as a rectangular region composed of two triangles. Surface regions containing no vertex are unable to properly separate with the watershed method and are frequently observed in triangular mesh models formed by tessellation of solid models or parametric surface models. The technique of Razdan, et al. calculates vertex feature values according to a method described in the document of Pulla, et al. According to Razdan, et al., every triangle belongs to a segment, and therefore, no gap is created between adjacent segments. As a result, each extracted feature edge is shared between adjacent segments.
M. Vieira and K. Shimada disclose another technique in “Segmentation of Noisy Laser-Scanner Generated Meshes with Piecewise Polynomial Approximations,” Proceedings of DETC '04, 2004. This technique generates an approximate biquadratic surface, approximates the curvature of each vertex according to the approximate surface, carries out smoothing on the curvature, and provides a feature value that is little affected by noise. This technique forms a seed region with the use of the curvature and expands the seed region to create a segment containing vertexes. This technique, however, produces a gap between adjacent segments. The gap contains triangles that belong to no segments. The gap results in creating a feature edge that must be shared as a boundary between adjacent segments but is actually shared by no segments. This technique also creates a segment containing a small number of vertexes. The boundaries of such a segment are extracted as minute feature edges that are useless.
Another feature edge extracting method is disclosed in S. Katz and A. Tal, “Hierarchical mesh decomposition using fuzzy clustering and outs,” ACM Transactions on Graphics 22 (3), 954-961, 2003. This method is a hierarchical method that avoids excessive segmentation and extracts smooth boundaries. The method employs a maximum flow rate algorithm to solve cuts of a dual graph of meshes and carries out segmentation. The method is unable to conduct region-by-region segmentation that is needed for industrial products and takes a long segmentation processing time.
A common problem of the above-mentioned techniques and methods is that none of them is capable of properly extracting the boundaries of a fillet surface as feature edges. Another common problem is that a single set of extraction parameters used to define, for example, a mesh evaluation range is insufficient to correctly calculate feature values and extract required feature edges.
An object of the present invention is to provide a technique of extracting feature edges from a 3D or triangular mesh model based on a global normal-line evaluation and an improved watershed method, supporting automatic generation of a solid model from the mesh model, and satisfying the above-mentioned four requirements.
In order to accomplish the object, a first aspect of the present invention provides an apparatus for extracting feature edges from a triangular mesh model. The apparatus includes a storage unit configured to store data, a vertex feature value calculator configured to retrieve data related to the mesh model from the storage unit, globally evaluate normals of triangles in each region that is defined on the mesh model by a Euclidean distance, calculate edge and vertex feature values based on a result of the evaluation, carry out discretization and differentiation on the calculated vertex feature values, and extract feature edges; a segmentation unit configured to separate the mesh model into segments each composed of a set of connected triangles according to the calculated feature values and an improved watershed method capable of grouping vertexes and extract boundaries of the segments as feature edges; and a feature edge selective extractor configured to allow a user to interactively select required feature edges from among the extracted feature edges and output data related to the selected feature edges.
A second aspect of the present invention provides a program for extracting feature edges from a triangular mesh model. The program instructs a computer to execute the steps of retrieving data related to the mesh model from an input unit or a storage unit; globally evaluating normals of triangles in each region that is defined on the mesh model by a Euclidean distance, calculating edge and vertex feature values, carrying out discretization and differentiation on the calculated vertex feature values, and extracting feature edges; separating the mesh model into segments each composed of a set of connected triangles according to the calculated vertex feature values and an improved watershed method capable of grouping vertexes, and extracting boundaries of the segments as feature edges; and allowing a user to interactively select required feature edges from among the extracted feature edges and outputting data related to the selected feature edges.
The program for extracting feature edges from a triangular mesh model may further include the steps of setting extraction parameters and the number of times of repetition; and repeating the steps with the use of the set extraction parameters for the set number of times of repetition.
A third aspect of the present invention provides a method of extracting feature edges from a triangular mesh model. The method includes the steps of retrieving data related to the mesh model from an input unit or a storage unit; globally evaluating normals of triangles in each region that is defined on the mesh model by a Euclidean distance, calculating edge and vertex feature values, carrying out disoretization and differentiation on the calculated vertex feature values, and extracting feature edges; separating the mesh model into segments each composed of a set of connected triangles according to the calculated vertex feature values and an improved watershed method capable of grouping vertexes, and extracting boundaries of the segments as feature edges; and allowing a user to interactively select required feature edges from among the extracted feature edges and outputting data related to the selected feature edges.
The method of extracting feature edges from a triangular mesh model may further include the steps of setting extraction parameters and the number of times of repetition; and repeating the steps with the use of the set extraction parameters for the set number of times of repetition.
The technique according to the present invention of extracting feature edges from a 3D or triangular mesh model is capable of extracting feature edges with a minimum influence of measurement noise contained in the mesh model or a method used to form the mesh model. The technique is capable of recognizing an area surrounded with feature edges as a single segment and extracting the boundaries of a fillet surface as feature edges that are hardly extractable with the related arts. The technique of the present invention may set different extraction parameters to extract feature edges from which a user may select required feature edges. The selected feature edges are aggregated and may be read into a 3D CAD system.
Embodiments of the present invention will be explained in detail with reference to the drawings.
The vertex feature value calculation SQ1 defines an area based on a Euclidean distance on a 3D or triangular mesh model, globally evaluates normals of a set of triangles in the area, and calculates edge and vertex feature values. The calculated values are used to extract feature edges through discretization and differentiation. The segmentation SQ2 uses the calculated feature values and conducts segmentation. The segmentation SQ2 employs the improved watershed method developed from the watershed method (T. Funkhouser, M. Kazhdan, P. Shilane, P. Min, W. Kiefer, A. Tal, S. Rusinkiewicz, and D. Dobkin, “Modeling by Example,” ACM Transactions on Graphics 23 (3), 609-612, 2004). The improved watershed method is capable of grouping vertexes to define segments each consisting of a set of connected triangles. The boundaries of the segments are extracted as feature edges that satisfy the above-mentioned third requirement. The feature edge selective extraction SQ3 allows a user to interactively select required feature edges from among the feature edges extracted by the segmentation SQ2. The apparatus of
The vertex feature value calculation SQ1 will be explained. This process first calculates edge feature values, and according to the edge feature values, calculates vertex feature values. A simplest way of calculating an edge feature value is calculating a dihedral angle between two planes that share the edge. This technique is effective for sharp dihedral angles but is vulnerable to noise. The technique calculates feature values based on local shapes of a mesh model. The mesh model frequently contains much noise produced when it was prepared by reverse engineering. Accordingly, the feature values calculated with this technique involve the influence of the noise. Due to this, the technique is unable to correctly extract feature edges from edges having small dihedral angles. To solve the problem, the embodiment of the present invention globally evaluates an area defined with a Euclidean distance around an edge and calculates a feature value.
where nf is a unit surface normal vector of a triangular surface f, FBR and FBL are sets of triangles contained in the hemispheres BR and BL, respectively, and |f n BR| and |f n BL| are the areas of portions of the triangular surfaces contained in the hemispheres BR and BL, respectively. There will be a triangle that intersects the sphere or the plane used to divide the sphere into the hemispheres. The area of an in-sphere portion of such a triangle is obtained by replacing the intersecting part with a line segment and by approximating the portion with a polygon. An angle between the surface normal vector sums nBR and nBL is calculated as a feature value ?e(r) of the edge e as follows:
An edge whose edge feature value ?e(r) is greater than a basic feature edge identifying threshold t? is classified as a basic feature edge, and vertexes at each end of the basic feature edge are classified as basic feature vertexes. An edge whose ends are basic feature vertexes is not always a basic feature edge.
Based on the calculated edge feature value, a vertex feature value is calculated.
gcon(v)=maxeεc*(v)θc(r) (4)
Continuous feature values provided by the expression (4) vary from one to another when calculated on a fillet surface that must be recognized as a single segment, as shown in
where v* is a set of adjacent vertexes of the vertex v. An embodiment of the present invention employs differential feature values only when extracting the boundaries of a fillet surface, and continuous feature values when extracting any other feature edges.
Next, the segmentation SQ2 will be explained. This process employs the improved watershed method. The watershed method has been proposed as an invention related to image segmentation, and at present, is energetically studied in the field of image processing. For example, there is a related document of Andre Bleau and L. Joshua Leon, “Watershed-Based Segmentation and Region Merging,” Computer Vision and Image Understanding 77 (3), 317-370, 2000. Developed from the watershed method is a segmentation technique for a 3D mesh model. The watershed method disclosed in the document of Mangan, et al. mentioned before traces vertexes from one having a higher feature value to another having a smaller feature value like water flowing from a higher place to a lower place. The traced vertexes are provided with segment labels, and vertexes having the same label are grouped into one segment.
The watershed method involves three steps shown in
In
Step SQ12 is a descending process. As shown in
Step SQ13 is a segment integration process. Step SQ12 mentioned above frequently creates small segments each involving a small number of vertexes. The boundaries of such small segments will be extracted as feature edges that are not useful, and therefore, the small-segments must be removed. To achieve this, a difference is calculated, for each segment, between a vertex having a lowest continuous feature value in the segment in question and a vertex “vbou” having a lowest continuous feature value among vertexes that are on the boundaries of the segment in question and adjacent segments. The difference is called a “watershed depth.” Any segment whose number of vertexes is smaller than a minimum vertex number threshold tn and whose watershed depth is smaller than a segment integration threshold td is integrated with the segment that is adjacent to the vertex vbou. This process is repeated until every segment that satisfies the above conditions is removed as shown in
The watershed method assigns a segment label only to a vertex and forms segments each composed of vertexes. Due to this, the watershed method frequently creates a gap composed of triangles each having three different vertex labels so that the gap belongs to no segment. This results in extracting a feature edge that must be shared as a boundary between adjacent segments but is actually shared by no segments. If there is a region containing no vertex, such as a rectangular region composed of two right triangles, the watershed method is unable to recognize the region as a segment, as shown in
To solve the problems, the improved watershed method was proposed in the document of Razdan et al. mentioned above. To improve a feature edge extraction accuracy, the improved watershed method is based on the watershed method and the technique of assigning segment labels to triangles when dividing a 3D mesh model into segments each composed of triangles. The improved watershed method includes five steps shown in
Step SQ21 of
In
In
In
In
With steps SQ21 to SQ25, the mesh model is divided into segments each composed of connected triangles, and the boundaries of each segment are extracted as feature edges.
Next, the effect on feature edge extraction of five extraction parameters used by a feature edge extracting method according to an embodiment of the present invention will be explained. The extraction parameters are set by the extraction parameter setter 5. The radius r of a sphere is used to determine an evaluation range when calculating edge feature values. If the radius r is small, the evaluation range will be limited to easily extract sharp feature edges. If the radius r is large, the evaluation range will be expanded to easily extract feature edges at a part whose shape gently changes.
The vertex feature value discretization threshold tv is used when adjusting positions to extract the boundaries of a fillet surface. The threshold tv must be properly set to match with the feature value of a vertex that is on a boundary of a fillet surface. If the threshold tv is smaller than a proper value, boundaries to be extracted will define a fillet surface that is larger than an actual fillet surface. If the threshold tv is larger than a proper value, boundaries to be extracted will define a fillet surface that is smaller than an actual fillet surface.
The basic feature edge identifying threshold t? is mainly used to extract a crease edge. If the threshold t? is large, only the boundaries of a surface having a large dihedral angle will be extracted. If the threshold t? is small, not only the boundaries of a surface having a large dihedral angle but also the boundaries of a surface having a small dihedral angle will be extracted.
If the minimum vertex number threshold tn is small, each segment to be separated contains a small number of vertexes, and the boundaries of such a segment are extracted. If the threshold tn is large, each segment to be separated contains a large number of vertexes, and the boundaries of such a segment are extracted.
If the segment integration threshold td is small, each segment to be formed involves a small vertex feature value difference, and the boundaries of such a segment are extracted. If the threshold td is large, each segment to be formed involves a large vertex feature value difference, and the boundaries of such a segment are extracted.
The process SQ1 of determining basic feature edges and basic feature vertexes is insufficient to completely extract required feature edges if it is carried out only once with a single set of parameters. Namely, the technique of the present invention must repeatedly be carried out with different sets of extraction parameters, to allow a user to interactively select, on a display, required edges from among feature edges extracted with the different extraction parameter sets. The edges selected by the user are then aggregated.
The apparatus according to the embodiment of the present invention is provided with two feature edge selecting methods that allow a user to efficiently select feature edges.
The embodiment mentioned above is capable of automatically creating a solid model from a mesh model by extracting feature edges from the mesh model according to the global normal-line evaluation technique and improved watershed method.
Tests were carried out and test results confirmed that the present invention is capable of extracting feature edges from a mesh model without the influence of noise contained in the mesh model or a method used to form the mesh model, extracting the boundaries of a fillet surface as feature edges, recognizing, as a segment, an area surrounded with feature edges that form a loop, and selectively extracting feature edges depending on an object of use. The extracted feature edges are readable into a 3D CAD system.
The sphere radius r, which is one of the extraction parameters, may not be strictly set. For a mesh model created by measuring a physical model and containing much noise, the sphere radius r may be one fiftieth to one hundredth of the diagonal of a bounding box of the input mesh model, to provide a good result. For a mesh model involving many crease edges each with a large dihedral angle, the sphere radius r may be smaller to provide a good result. As shown in the examples of
It is apparent from FIGS. 14 to 16 that the present invention can extract feature edges that loop, as well as the boundaries of a fillet surface as feature edges.
Number | Date | Country | Kind |
---|---|---|---|
2005-056188 | Mar 2005 | JP | national |