WO2016173260A1 - Method and apparatus for decomposing three-dimensional model based on generalized cylinders - Google Patents

Method and apparatus for decomposing three-dimensional model based on generalized cylinders Download PDF

Info

Publication number
WO2016173260A1
WO2016173260A1 PCT/CN2015/097103 CN2015097103W WO2016173260A1 WO 2016173260 A1 WO2016173260 A1 WO 2016173260A1 CN 2015097103 W CN2015097103 W CN 2015097103W WO 2016173260 A1 WO2016173260 A1 WO 2016173260A1
Authority
WO
WIPO (PCT)
Prior art keywords
generalized
dimensional model
profile
point
central axis
Prior art date
Application number
PCT/CN2015/097103
Other languages
French (fr)
Chinese (zh)
Inventor
周漾
黄惠
尹康学
曹旭
龚明伦
张皓
科恩•丹尼尔
Original Assignee
中国科学院深圳先进技术研究院
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中国科学院深圳先进技术研究院 filed Critical 中国科学院深圳先进技术研究院
Publication of WO2016173260A1 publication Critical patent/WO2016173260A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects

Definitions

  • the invention relates to the technical field of three-dimensional models, in particular to a three-dimensional model segmentation method and device based on a generalized cylinder.
  • a typical model segmentation algorithm refers to segmenting a mesh model into a finite number of sub-grids that are connected and have a certain simple shape meaning, such as convex decomposition, according to certain geometric or topological features. Each sub-block constitutes an (approximate) convex polyhedron.
  • Generalized cylinders are a very common geometric primitive.
  • human, animal torso and limbs are all generalized cylinders.
  • a generalized cylinder can be defined by a three-dimensional curve central axis, a curve skeleton, and a cross-section perpendicular to the skeleton.
  • the generalized cylindrical three-dimensional entity has many functions, is easy to process, and can express a lot of shapes.
  • Artificial crafts usually consist of many generalized cylinders. Compared with other simple primitives such as convex, the segmentation based on generalized cylinder can obtain more compact and more compact model segmentation.
  • Embodiments of the present invention provide a three-dimensional model segmentation method and apparatus based on a generalized cylinder to solve the problem that it is difficult to optimize segmentation of a three-dimensional model based on a generalized cylinder in the field of current three-dimensional model segmentation.
  • a three-dimensional model segmentation method based on generalized cylinders including:
  • the plurality of local generalized cylinders are subjected to fusion processing to form a plurality of non-local generalized cylinders; the plurality of non-local generalized cylinders constitute a candidate generalized cylindrical set; and the candidate generalized cylindrical set overcompletely covers the three-dimensional
  • the surface of the model forms an overcomplete set of covers;
  • the precision coverage set comprises a plurality of generalized cylindrical components that do not overlap each other, and surface composition of the plurality of non-overlapping generalized cylindrical components The surface of the three-dimensional model;
  • the three-dimensional model is segmented according to the three-dimensional model segmentation method.
  • the constructing a plurality of local generalized cylinders by each of the plurality of sampling points comprises:
  • Skeleton points corresponding to each two adjacent sampling points are connected along the rotational symmetry axis to form a central axis;
  • a profile curve on the surface of the three-dimensional model is uniformly sampled according to the central axis to form a partial generalized cylinder.
  • the plurality of local generalized cylinders are subjected to fusion processing to form a plurality of non-local generalized cylinders, including:
  • the fusion generalized cylinder is determined to be a non-local generalized cylinder
  • the combination of the generally non-overlapping generalized cylindrical members is exhausted to form an updated generalized cylindrical member, and the updated generalized cylindrical member is used as a non-local generalized cylindrical body.
  • the calculating a sum of generalized cylines of each of the generalized cylindrical components in each of the precise coverage sets includes:
  • E s is the flatness
  • E v is the degree of change of the profile
  • is a weight parameter
  • the method for segmenting a three-dimensional model based on a generalized cylinder further includes:
  • C is a constant
  • n is the number of control points on the central axis fold line on the generalized cylindrical component
  • d i is the approximation error corresponding to the i-th control point.
  • the method for segmenting a three-dimensional model based on a generalized cylinder further includes:
  • Step 1 Determine a straight line p s p e according to the two end points p s and p e of the central axis curve of the generalized cylindrical component, and use the straight line p s p e as the central axis fold line;
  • Step 2 determining a target point having the largest distance from the central axis line on the central axis curve, and if the distance between the target point and the central axis line is greater than a first distance threshold, the target point is Set as the control point;
  • Step 3 Redetermining a central axis line according to the control point, and returning to step 2 until the distance between the point on the central axis curve and the central axis line is less than or equal to the first distance threshold; The distance between the point on the central axis curve and the central axis line is the approximation error.
  • the method for segmenting a three-dimensional model based on a generalized cylinder further includes:
  • D(c s , c e ) is the Hausdorff distance of the profile curves c s and c e selected at both ends of the generalized cylindrical component
  • m is the number of profile curves on the three-dimensional approximation model according to the generalized cylindrical component
  • (f i , f i ') is the Hausdorff distance of the profile curve f i on the generalized cylindrical component and a profile curve f i ' on the three-dimensional approximation model of the generalized cylindrical component.
  • the method for segmenting a three-dimensional model based on a generalized cylinder further includes:
  • the method for segmenting a three-dimensional model based on a generalized cylinder further includes:
  • Step 1 Perform linear interpolation on the profile curves c s and c e selected at both ends of the generalized cylindrical component to generate a three-dimensional approximate model; the profile curves c s and c e respectively form two control profile surfaces;
  • Step 2 determining, on the generalized cylindrical component, a target profile curve having a maximum Hausdorff distance from a profile curve on the three-dimensional approximate model;
  • Step 3 If the Hausdorff distance of the target profile curve and the profile curve on the three-dimensional approximate model is greater than a second distance threshold, insert a face formed by the target profile curve into the control profile surface to reconstruct a three-dimensional shape. Approximating the model, returning to step 2 until the Hausdorff distance of the profile curve on the generalized cylindrical component and the profile curve on the three-dimensional approximation model is less than or equal to the second distance threshold.
  • a three-dimensional model segmentation device based on a generalized cylinder comprising:
  • a sampling unit configured to acquire a three-dimensional model, and uniformly sample the surface of the three-dimensional model by a standard Poisson disk sampling method to obtain a plurality of sampling points;
  • a local generalized cylinder generating unit configured to construct a plurality of local generalized cylinders by each of the plurality of sampling points
  • a fusion unit for performing fusion processing on the plurality of local generalized cylinders to form a plurality of non-local generalized cylinders; the plurality of non-local generalized cylinders forming a candidate generalized cylindrical set; the candidate generalized cylindrical set Completely covering the surface of the three-dimensional model to form an over-complete coverage set;
  • An accurate coverage set obtaining unit configured to obtain a plurality of precise coverage sets from the overcomplete coverage set; wherein the precision coverage set includes a plurality of generalized cylindrical components that do not overlap each other, and the plurality of mutually overlapping ones do not overlap each other
  • the surface of the generalized cylindrical component constitutes the surface of the three-dimensional model
  • a three-dimensional model segmentation mode determining unit configured to calculate a sum of generalized cylines of each of the generalized cylindrical components in each of the precise coverage sets; and to sort the sums of the generalized cylines to determine a minimum of sums of the generalized cylines a method for determining a three-dimensional model segmentation manner according to an exact cover set corresponding to a minimum value of the sum of the generalized cylines; the generalized cylindricity consisting of the flatness and the profile change degree of the generalized cylindrical component;
  • the three-dimensional model segmentation unit is configured to segment the three-dimensional model according to the three-dimensional model segmentation manner.
  • the local generalized cylinder generating unit is specifically configured to:
  • Skeleton points corresponding to each two adjacent sampling points are connected along the rotational symmetry axis to form a central axis;
  • a profile curve on the surface of the three-dimensional model is uniformly sampled according to the central axis to form a partial generalized cylinder.
  • the fusion unit is specifically configured to:
  • the fusion generalized cylinder is determined to be a non-local generalized cylinder
  • the combination of the generally non-overlapping generalized cylindrical members is exhausted to form an updated generalized cylindrical member, and the updated generalized cylindrical member is used as a non-local generalized cylindrical body.
  • the three-dimensional model segmentation mode determining unit is specifically configured to:
  • E s is the flatness
  • E v is the degree of change of the profile
  • is a weight parameter
  • the three-dimensional model segmentation device based on the generalized cylinder further includes:
  • C is a constant
  • n is the number of control points on the central axis fold line on the generalized cylindrical component
  • d i is the approximation error corresponding to the i-th control point.
  • the three-dimensional model segmentation device based on the generalized cylinder further includes:
  • Step 1 Determine a straight line p s p e according to the two end points p s and p e of the central axis curve of the generalized cylindrical component, and use the straight line p s p e as the central axis fold line;
  • Step 2 determining a target point having the largest distance from the central axis line on the central axis curve, and if the distance between the target point and the central axis line is greater than a first distance threshold, the target point is Set as the control point;
  • Step 3 Redetermining a central axis line according to the control point, and returning to step 2 until the distance between the point on the central axis curve and the central axis line is less than or equal to the first distance threshold; The distance between the point on the central axis curve and the central axis line is the approximation error.
  • the three-dimensional model segmentation device based on the generalized cylinder further includes:
  • the profile change degree calculation unit is configured to calculate the profile change degree E v (m) of the generalized cylindrical component by the Douglas-Peucker algorithm:
  • D(c s , c e ) is the Hausdorff distance of the profile curves c s and c e selected at both ends of the generalized cylindrical component
  • m is the number of profile curves on the three-dimensional approximation model according to the generalized cylindrical component
  • (f i , f i ') is the Hausdorff distance of the profile curve f i on the generalized cylindrical component and a profile curve f i ' on the three-dimensional approximation model of the generalized cylindrical component.
  • the three-dimensional model segmentation device based on the generalized cylinder further includes:
  • the Hausdorff distance calculation unit is used to calculate the Hausdorff distance D(c s , c e ):
  • the Hausdorff distance calculation unit is also used to calculate the Hausdorff distance D(f i ,f i '):
  • the three-dimensional model segmentation device based on the generalized cylinder further includes:
  • Step 1 Perform linear interpolation on the profile curves c s and c e selected at both ends of the generalized cylindrical component to generate a three-dimensional approximate model; the profile curves c s and c e respectively form two control profile surfaces;
  • Step 2 determining, on the generalized cylindrical component, a target profile curve having a maximum Hausdorff distance from a profile curve on the three-dimensional approximate model;
  • Step 3 If the Hausdorff distance of the target profile curve and the profile curve on the three-dimensional approximate model is greater than a second distance threshold, insert a face formed by the target profile curve into the control profile surface to reconstruct a three-dimensional shape. Approximating the model, returning to step 2 until the Hausdorff distance of the profile curve on the generalized cylindrical component and the profile curve on the three-dimensional approximation model is less than or equal to the second distance threshold.
  • the method and device for segmenting a three-dimensional model based on a generalized cylinder constructs a local generalized cylinder through sampling points on the surface of the three-dimensional model, and then fuses the local generalized cylinder to form a non-local generalized cylinder.
  • the overcomplete coverage set and then obtains multiple precise coverage sets from the overcomplete coverage set, and determines a three-dimensional model segmentation method according to the precise coverage set corresponding to the minimum of the generalized cylindricity, thereby performing three-dimensional model segmentation.
  • the present invention can determine a globally optimal three-dimensional model segmentation method by the above manner, and solves the problem that it is difficult to optimize segmentation of the three-dimensional model based on the generalized cylinder in the current three-dimensional model segmentation field.
  • FIG. 1 is a flow chart 1 of a method for segmenting a three-dimensional model based on a generalized cylinder according to an embodiment of the present invention
  • FIG. 2 is a flow chart 2 of a method for segmenting a three-dimensional model based on a generalized cylinder according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of generating a central axis fold line and a control point according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram of generating a three-dimensional approximate model and a cross-sectional curve on a three-dimensional approximate model in an embodiment of the present invention
  • FIG. 5 is a schematic structural diagram 1 of a three-dimensional model segmentation apparatus based on a generalized cylinder according to an embodiment of the present invention
  • FIG. 6 is a schematic structural diagram 2 of a three-dimensional model segmentation apparatus based on a generalized cylinder according to an embodiment of the present invention.
  • an embodiment of the present invention provides a three-dimensional model segmentation method based on a generalized cylinder, including:
  • Step 101 Acquire a three-dimensional model, and uniformly sample the surface of the three-dimensional model by a standard Poisson disk sampling method to obtain a plurality of sampling points.
  • Step 102 Construct a plurality of local generalized cylinders by each of the plurality of sampling points.
  • Step 103 Perform fusion processing on the plurality of local generalized cylinders to form a plurality of non-local generalized cylinders.
  • the plurality of non-local generalized cylinders constitute a candidate generalized cylinder set; the candidate generalized cylindrical set overcompletely covers the surface of the three-dimensional model to form an over-complete coverage set.
  • Step 104 Acquire a plurality of precise coverage sets from the overcomplete coverage set.
  • an accurate cover set includes a plurality of generalized cylindrical members that do not overlap each other, and surfaces of the plurality of non-overlapping generalized cylindrical members constitute a surface of the three-dimensional model.
  • Step 105 Calculate the sum of the generalized cylines of each generalized cylindrical component in each precise coverage set.
  • the generalized cylindricity consists of the flatness and the degree of profile change of the generalized cylindrical component.
  • Step 106 Sort the sum of the generalized cylines to determine the minimum of the sum of the generalized cylines.
  • Step 107 Determine a three-dimensional model segmentation manner according to an accurate coverage set corresponding to a minimum value of sums of the generalized cylines.
  • Step 108 Segment the three-dimensional model according to the three-dimensional model segmentation manner.
  • the three-dimensional model segmentation method based on generalized cylinder constructs a local generalized cylinder by sampling points on the surface of the three-dimensional model, and then fuses the local generalized cylinder to form a non-local generalized cylinder.
  • a complete coverage set is obtained, and a plurality of precise coverage sets are obtained from the overcomplete coverage set, and a three-dimensional model segmentation mode is determined according to an accurate coverage set corresponding to the minimum value of the sum of the generalized cylindrimen, thereby performing three-dimensional model segmentation.
  • the present invention can determine a globally optimal three-dimensional model segmentation method by the above manner, and solves the problem that it is difficult to optimize segmentation of the three-dimensional model based on the generalized cylinder in the current three-dimensional model segmentation field.
  • the embodiment of the present invention provides a three-dimensional model segmentation method based on a generalized cylinder, including:
  • Step 201 Acquire a three-dimensional model, and uniformly sample the surface of the three-dimensional model by a standard Poisson disk sampling method to obtain a plurality of sampling points.
  • Step 202 Determine, according to a sampling point, a plurality of initial planes passing through the sampling point.
  • Steps 202 to 206 are performed using a Rotational Symmetry Axis (ROSA) technique.
  • the plurality of initial planes may be N, and N is generally 24.
  • Step 203 Determine one or more aspects of the sampling point according to the plurality of initial planes.
  • a new plane can be calculated, and then iterated until the plane no longer changes, this plane is called the cutting plane of the point (Cutting Plane);
  • Cutting Plane For cylindrical regions, generally all initial planes eventually converge to the same slice, while for non-columnar regions, there may be multiple slices.
  • Step 204 Determine a center point of a line of intersection between the cut surface and a surface of the three-dimensional model, where the center point is used as a skeleton point corresponding to the sampling point, and a normal vector of the cut surface is corresponding to the sampling point. Rotational symmetry axis.
  • Step 205 Connect the skeleton points corresponding to each two adjacent sampling points along the rotational symmetry axis to form a central axis.
  • Step 206 Evenly sampling a profile curve on a surface of the three-dimensional model according to the central axis to form a partial generalized cylinder.
  • Step 207 gradually merging the adjacent local generalized cylinders to form a plurality of fused generalized cylinders.
  • the local generalized cylinder Since the local generalized cylinder is constructed in the neighborhood of the sampling point, there is a large amount of overlap. Although it constitutes an over-complete coverage of the surface of the three-dimensional model, this does not guarantee the existence of an accurate coverage set. In order to reduce the scale of the segmentation and obtain the least number of generalized cylindrical segments, the local generalized cylinders need to be fused here.
  • Step 208 If the generalized cylindricity of the fused generalized cylinder is smaller than the sum of the generalized cylines of the two local generalized cylinders before the fusion, the fused generalized cylinder is determined to be a non-local generalized cylinder.
  • GCity(A) is the generalized cylindricity of A generalized cylinder
  • GCity(B) is the generalized cylindricity of B generalized cylinder
  • GCity(A ⁇ B) is the generalized cylinder of generalized cylinder with A and B fusion degree.
  • Step 209 Separating overlapping regions of each non-local generalized cylinder to form a generalized cylindrical component that does not overlap each other.
  • Step 210 Extending the combination of the non-overlapping generalized cylindrical members to form an updated generalized cylindrical member, and using the updated generalized cylindrical member as a non-local generalized cylindrical body.
  • non-overlapping generalized cylindrical components can be used as building blocks, and all possible generalized cylindrical components can be constructed by exhausting brick combinations. In this way, it can be guaranteed There must be an exact set of coverage in the over-complete coverage set, and it is also possible to construct new generalized cylindrical parts that cannot be constructed by merging local generalized cylinders.
  • the plurality of non-local generalized cylinders constitute a candidate generalized cylinder set; the candidate generalized cylindrical set overcompletely covers the surface of the three-dimensional model to form an over-complete coverage set.
  • Step 211 Acquire a plurality of precise coverage sets from the overcomplete coverage set.
  • an accurate cover set includes a plurality of generalized cylindrical members that do not overlap each other, and surfaces of the plurality of non-overlapping generalized cylindrical members constitute a surface of the three-dimensional model.
  • step 211 the Algorithm X algorithm can be used to quickly enumerate all valid precision coverage sets from a set of overcomplete coverage sets.
  • Step 212 Calculate the sum of the generalized cylines of each of the generalized cylindrical components in each precise coverage set.
  • E s is the flatness
  • E v is the degree of change of the profile
  • is a weight parameter
  • is generally 1.
  • the flatness E s (n) of the generalized cylindrical part can be calculated by the Douglas-Peucker algorithm:
  • C is a constant
  • the C value when the C value becomes larger, it will stimulate the long axis of the long polyline; on the contrary, when the C value becomes smaller, the excitation will divide the middle axis into many shorter polylines; n is the middle of the generalized cylindrical part.
  • the central axis fold line and control point it can be generated by the following three steps, for example, a three-dimensional model of a gecko shape as shown in FIG. 3, the head-to-tail curve can be used as a central axis curve for the central axis curve , you can generate the axis polyline and the control point:
  • Step 1 Determine a straight line p s p e according to the two end points p s and p e of the central axis curve of the generalized cylindrical component, and use the straight line p s p e as the central axis fold line.
  • Step 2 determining a target point having the largest distance from the central axis line on the central axis curve, and if the distance between the target point and the central axis line is greater than a first distance threshold, the target point is Set to the control point.
  • P 1 , P 2 , P 3 , ... P 11 are the above-mentioned target points
  • d 1 , d 2 , and d 3 are the distances of P 1 , P 2 , and P 3 from the central axis line, respectively.
  • the central axis fold line does not remain unchanged all the time, but is continuously updated by the following step 3. The resulting central axis fold line is close to the central axis curve.
  • the first distance threshold can generally be 0.005.
  • Step 3 Redetermining a central axis line according to the control point, and returning to step 2 until the distance between the point on the central axis curve and the central axis line is less than or equal to the first distance threshold; The distance between the point on the central axis curve and the central axis line is the approximation error.
  • the central axis line is re-determined as p s p 1 p e , and then step 2 is performed to obtain the control point P. 2 , re-determining the central axis line as p s p 2 p 1 p e , in this way, the distance from the point on the central axis curve to the central axis line is less than or equal to the first distance threshold.
  • the profile change degree E v (m) of the generalized cylindrical component can be calculated by the Douglas-Peucker algorithm:
  • D(c s , c e ) is the Hausdorff distance of the profile curves c s and c e selected at both ends of the generalized cylindrical component
  • m is the number of profile curves on the three-dimensional approximate model of the generalized cylindrical component
  • D( f i , f i ') is the Hausdorff distance of the profile curve f i on the generalized cylindrical component and a profile curve f i ' on the three-dimensional approximation model of the generalized cylindrical component.
  • Another example is to calculate the Hausdorff distance D(f i ,f i '):
  • the above three-dimensional approximation model and the profile curve on the three-dimensional approximation model (the profile curve corresponding to the formation of the control profile surface) can be generated by the following three steps, for example, a three-dimensional model as shown in FIG. 4, and a three-dimensional approximate model thereof
  • the generation and control of the profile surface is generated as follows:
  • Step 1 Linearly interpolating the profile curves c s and c e selected at both ends of the generalized cylindrical component to generate a three-dimensional approximate model; the profile curves c s and c e respectively form two control profile surfaces.
  • Step 2 Determine a target profile curve having the largest Hausdorff distance from the profile curve on the three-dimensional approximation model on the generalized cylindrical component.
  • f 1 to f 8 are respectively eight target section curves, and the eight target section curves constitute eight control section curved surfaces. It is worth noting that the three-dimensional approximation model is not always the same, but is continuously updated by the following step 3. The resulting three-dimensional approximation model is close to the generalized cylindrical component.
  • Step 3 If the Hausdorff distance of the target profile curve and the profile curve on the three-dimensional approximate model is greater than a second distance threshold, insert a face formed by the target profile curve into the control profile surface to reconstruct a three-dimensional shape. Approximating the model, returning to step 2 until the Hausdorff distance of the profile curve on the generalized cylindrical component and the profile curve on the three-dimensional approximation model is less than or equal to the second distance threshold.
  • a target profile curve having the largest Hausdorff distance from the profile curve f 1 ' on the three-dimensional approximation model is determined on the generalized cylindrical component.
  • Step 213 Sort the sum of the generalized cylines to determine the minimum of the sum of the generalized cylines.
  • Step 214 Determine a three-dimensional model segmentation manner according to an accurate coverage set corresponding to a minimum value of sums of the generalized cylines.
  • Step 215 Segment the three-dimensional model according to the three-dimensional model segmentation manner.
  • the three-dimensional model segmentation method based on generalized cylinder constructs a local generalized cylinder by sampling points on the surface of the three-dimensional model, and then fuses the local generalized cylinder to form a non-local generalized cylinder.
  • a complete coverage set is obtained, and a plurality of precise coverage sets are obtained from the overcomplete coverage set, and a three-dimensional model segmentation mode is determined according to an accurate coverage set corresponding to the minimum value of the sum of the generalized cylindrimen, thereby performing three-dimensional model segmentation.
  • the present invention can determine a globally optimal three-dimensional model segmentation method by the above manner, and solves the problem that it is difficult to optimize segmentation of the three-dimensional model based on the generalized cylinder in the current three-dimensional model segmentation field.
  • an embodiment of the present invention provides a three-dimensional model segmentation device based on a generalized cylinder, including:
  • the sampling unit 31 can acquire a three-dimensional model and uniformly sample the surface of the three-dimensional model by a standard Poisson disk sampling method to acquire a plurality of sampling points.
  • the local generalized cylinder generating unit 32 can construct a plurality of local generalized cylinders through each of the plurality of sampling points.
  • the fusion unit 33 may perform fusion processing on a plurality of local generalized cylinders to form a plurality of non-local generalized cylinders; the plurality of non-local generalized cylinders constitute a candidate generalized cylinder set; the candidate generalized cylindrical set overcompletely covers the The surface of the 3D model forms an overcomplete set of covers.
  • the precise coverage set obtaining unit 34 may obtain a plurality of precise coverage sets from the overcomplete coverage set; wherein the precision coverage set includes a plurality of generalized cylindrical components that do not overlap each other, and the plurality of non-overlapping generalized The surface of the cylindrical component constitutes the surface of the three-dimensional model.
  • the three-dimensional model segmentation mode determining unit 35 may calculate the sum of the generalized cylines of each of the generalized cylindrical components in each of the precise coverage sets; sort the sum of the generalized cylines to determine the minimum of the sum of the generalized cylines a value; a three-dimensional model segmentation manner is determined according to the precise coverage set corresponding to the minimum of the sum of the generalized cylines; the generalized cylindricity is composed of the flatness and the profile change degree of the generalized cylindrical component.
  • the three-dimensional model segmentation unit 36 can segment the three-dimensional model according to the three-dimensional model segmentation method.
  • the local generalized cylinder generating unit 32 may specifically:
  • the rotational symmetry axes are connected to form a central axis; the profile curve on the surface of the three-dimensional model is uniformly sampled according to the central axis to form a partial generalized cylinder.
  • the fusion unit 33 can specifically fuse adjacent local generalized cylinders to form a plurality of fused generalized cylinders; if the generalized cylindricity of the fused generalized cylinder is smaller than two local generalized before fusion
  • the sum of the generalized cylines of the cylinder determines that the fused generalized cylinder is a non-local generalized cylinder; the overlapping regions of the non-local generalized cylinders are separated to form a generalized cylindrical component that does not overlap each other;
  • the combination of the generalized cylindrical members that do not overlap each other forms an updated generalized cylindrical member, and the updated generalized cylindrical member is regarded as a non-local generalized cylindrical body.
  • the three-dimensional model segmentation manner determining unit 35 may specifically:
  • E s is the flatness
  • E v is the degree of change of the profile
  • is a weight parameter
  • the three-dimensional model segmentation device based on the generalized cylinder may further include:
  • the flatness calculation unit 37 can calculate the flatness E s (n) of the generalized cylindrical member by the Douglas-Peucker algorithm:
  • C is a constant
  • n is the number of control points on the central axis fold line on the generalized cylindrical component
  • d i is the approximation error corresponding to the i-th control point.
  • the three-dimensional model segmentation device based on the generalized cylinder may further include:
  • a central axis polyline modeling unit 38 which can execute:
  • Step 1 Determine a straight line p s p e according to the two end points p s and p e of the central axis curve of the generalized cylindrical component, and use the straight line p s p e as the central axis fold line.
  • Step 2 determining a target point having the largest distance from the central axis line on the central axis curve, and if the distance between the target point and the central axis line is greater than a first distance threshold, the target point is Set to the control point.
  • Step 3 Redetermining a central axis line according to the control point, and returning to step 2 until the distance between the point on the central axis curve and the central axis line is less than or equal to the first distance threshold; The distance between the point on the central axis curve and the central axis line is the approximation error.
  • the three-dimensional model segmentation device based on the generalized cylinder further includes:
  • the profile change degree calculation unit 39 can calculate the profile change degree E v (m) of the generalized cylindrical component by the Douglas-Peucker algorithm:
  • D(c s , c e ) is the Hausdorff distance of the profile curves c s and c e selected at both ends of the generalized cylindrical component
  • m is the number of profile curves on the three-dimensional approximation model according to the generalized cylindrical component
  • (f i , f i ') is the Hausdorff distance of the profile curve f i on the generalized cylindrical component and a profile curve f i ' on the three-dimensional approximation model of the generalized cylindrical component.
  • the three-dimensional model segmentation apparatus based on the generalized cylinder may further include:
  • the Hausdorff distance calculation unit 40 can calculate the Hausdorff distance D(c s , c e ):
  • the Hausdorff distance calculation unit 40 can also calculate the Hausdorff distance D(f i ,f i ):
  • the three-dimensional model segmentation device based on the generalized cylinder may further include:
  • the three-dimensional approximate model modeling unit 41 can execute:
  • Step 1 Linearly interpolating the profile curves c s and c e selected at both ends of the generalized cylindrical component to generate a three-dimensional approximate model; the profile curves c s and c e respectively form two control profile surfaces.
  • Step 2 Determine a target profile curve having the largest Hausdorff distance from the profile curve on the three-dimensional approximation model on the generalized cylindrical component.
  • Step 3 If the Hausdorff distance of the target profile curve and the profile curve on the three-dimensional approximate model is greater than a second distance threshold, insert a face formed by the target profile curve into the control profile surface to reconstruct a three-dimensional shape. Approximating the model, returning to step 2 until the Hausdorff distance of the profile curve on the generalized cylindrical component and the profile curve on the three-dimensional approximation model is less than or equal to the second distance threshold.
  • the three-dimensional model segmentation device based on the generalized cylinder constructs a local generalized cylinder through the sampling points on the surface of the three-dimensional model, and then fuses the local generalized cylinder to form a non-local generalized cylinder.
  • a complete coverage set is obtained, and a plurality of precise coverage sets are obtained from the overcomplete coverage set, and a three-dimensional model segmentation mode is determined according to an accurate coverage set corresponding to the minimum value of the sum of the generalized cylindrimen, thereby performing three-dimensional model segmentation.
  • the present invention can determine a global optimal three-dimensional model segmentation method by the above manner, and convert the model segmentation problem into a surface accurate cover problem, which can ensure that the final segmentation converges to a minimum number, and each component is sufficiently simple to segment. . It solves the problem that it is difficult to optimize segmentation of 3D models based on generalized cylinders in the current 3D model segmentation field.
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

Abstract

A method and apparatus for decomposing a three-dimensional model based on generalized cylinders, which relate to the technical field of three-dimensional models. The method comprises: constructing local generalized cylinders by means of sampling points on the surface of a three-dimensional model; integrating the local generalized cylinders to form an over-complete coverage set from non-local generalized cylinders, and further acquiring a plurality of accurate coverage sets from the over-complete coverage set; and determining, according to an accurate coverage set corresponding to a minimum value in the sums of generalized cylindricities, a three-dimensional model decomposition way, so as to decompose the three-dimensional model. The problem of difficulty in optimal decomposition of a three-dimensional model based on generalized cylinders in the current field of three-dimensional model decompositions can be solved.

Description

基于广义圆柱体的三维模型分割方法及装置Three-dimensional model segmentation method and device based on generalized cylinder 技术领域Technical field
本发明涉及三维模型技术领域,尤其涉及一种基于广义圆柱体的三维模型分割方法及装置。The invention relates to the technical field of three-dimensional models, in particular to a three-dimensional model segmentation method and device based on a generalized cylinder.
背景技术Background technique
当前,三维模型的分割是图形学、计算几何的基础问题之一,其被广泛应用于三维几何处理的各个方面,如网格简化、参数化与纹理映射、交互编辑、几何变形、样条曲面重建、模型近似与压缩、骨架提取与动画对应、模型匹配与检索等等。典型的模型分割算法是指根据一定的几何或拓扑特征,将网格模型分割为一组有限数量的,各自连通且具有一定的简单形状意义的子网格,例如凸分割(convex decomposition),其每个子块都构成一个(近似)凸多面体。Currently, the segmentation of 3D models is one of the fundamental problems of graphics and computational geometry. It is widely used in various aspects of 3D geometry processing, such as mesh simplification, parameterization and texture mapping, interactive editing, geometric deformation, spline surfaces. Reconstruction, model approximation and compression, skeleton extraction and animation correspondence, model matching and retrieval, and more. A typical model segmentation algorithm refers to segmenting a mesh model into a finite number of sub-grids that are connected and have a certain simple shape meaning, such as convex decomposition, according to certain geometric or topological features. Each sub-block constitutes an (approximate) convex polyhedron.
广义圆柱体(generalized cylinders)是一种非常常见的几何基元,例如人、动物的躯干和四肢等器官都是广义圆柱体。广义圆柱体可由一根三维曲线中轴(central axis),即曲线骨架(curve skeleton)以及垂直于该骨架的剖面(cross-section)定义。广义圆柱体三维实体功能多、易加工,且能表达非常多的形状,人造工艺品通常由许多的广义圆柱体构成。相比于凸形(convex)等其他简单基元,基于广义圆柱体的分割可获得块数更少的、表达更紧致的模型分割。Generalized cylinders are a very common geometric primitive. For example, human, animal torso and limbs are all generalized cylinders. A generalized cylinder can be defined by a three-dimensional curve central axis, a curve skeleton, and a cross-section perpendicular to the skeleton. The generalized cylindrical three-dimensional entity has many functions, is easy to process, and can express a lot of shapes. Artificial crafts usually consist of many generalized cylinders. Compared with other simple primitives such as convex, the segmentation based on generalized cylinder can obtain more compact and more compact model segmentation.
然而,虽然广义圆柱体形状广泛存在、且在骨架提取和建模中已有成功的应用,但是在三维模型分割领域中还难以通过基于广义圆柱体对三维模型进行优化分割。However, although the generalized cylindrical shape is widely existed and has been successfully applied in skeleton extraction and modeling, it is difficult to optimize the segmentation of the 3D model based on the generalized cylinder in the field of 3D model segmentation.
发明内容Summary of the invention
本发明的实施例提供一种基于广义圆柱体的三维模型分割方法及装置,以解决当前三维模型分割领域中还难以通过基于广义圆柱体对三维模型进行优化分割的问题。Embodiments of the present invention provide a three-dimensional model segmentation method and apparatus based on a generalized cylinder to solve the problem that it is difficult to optimize segmentation of a three-dimensional model based on a generalized cylinder in the field of current three-dimensional model segmentation.
为达到上述目的,本发明采用如下技术方案:In order to achieve the above object, the present invention adopts the following technical solutions:
一种基于广义圆柱体的三维模型分割方法,包括:A three-dimensional model segmentation method based on generalized cylinders, including:
获取一三维模型,通过标准泊松圆盘采样法在所述三维模型的表面均匀采样,获取多个采样点; Obtaining a three-dimensional model, uniformly sampling the surface of the three-dimensional model by a standard Poisson disk sampling method, and acquiring a plurality of sampling points;
通过所述多个采样点中的每个采样点构建多个局部广义圆柱体;Constructing a plurality of local generalized cylinders by each of the plurality of sampling points;
将所述多个局部广义圆柱体进行融合处理,形成多个非局部广义圆柱体;所述多个非局部广义圆柱体构成一候选广义圆柱集;所述候选广义圆柱集过完备覆盖所述三维模型的表面,形成过完备覆盖集;The plurality of local generalized cylinders are subjected to fusion processing to form a plurality of non-local generalized cylinders; the plurality of non-local generalized cylinders constitute a candidate generalized cylindrical set; and the candidate generalized cylindrical set overcompletely covers the three-dimensional The surface of the model forms an overcomplete set of covers;
从所述过完备覆盖集中获取多个精确覆盖集;其中,一所述精确覆盖集包括多个互不重叠的广义圆柱体部件,且所述多个互不重叠的广义圆柱体部件的表面构成所述三维模型的表面;Acquiring a plurality of precise coverage sets from the overcomplete coverage set; wherein the precision coverage set comprises a plurality of generalized cylindrical components that do not overlap each other, and surface composition of the plurality of non-overlapping generalized cylindrical components The surface of the three-dimensional model;
计算每个所述精确覆盖集中的各广义圆柱体部件的广义圆柱度的和;所述广义圆柱度由该广义圆柱体部件的平直度和剖面变化度组成;Calculating a sum of generalized cylines of each of the generalized cylindrical components in each of the precise coverage sets; the generalized cylindricity consisting of the flatness and the degree of profile change of the generalized cylindrical component;
将各广义圆柱度的和进行排序,确定各广义圆柱度的和中的最小值;Sorting the sum of the generalized cylines to determine the minimum of the sum of the generalized cylines;
根据所述各广义圆柱度的和中的最小值对应的精确覆盖集确定一三维模型分割方式;Determining a three-dimensional model segmentation manner according to an exact coverage set corresponding to the minimum of the sum of the generalized cylines;
根据所述三维模型分割方式对所述三维模型进行分割。The three-dimensional model is segmented according to the three-dimensional model segmentation method.
具体的,所述通过所述多个采样点中的每个采样点构建多个局部广义圆柱体,包括:Specifically, the constructing a plurality of local generalized cylinders by each of the plurality of sampling points comprises:
根据一采样点,确定通过该采样点的多个初始平面;Determining a plurality of initial planes passing through the sampling point according to a sampling point;
根据所述多个初始平面,确定所述采样点的一个或多个切面;Determining one or more aspects of the sampling point according to the plurality of initial planes;
确定所述切面与所述三维模型的表面的交线的中心点,以所述中心点作为所述采样点对应的骨架点,以所述切面的法向量为所述采样点对应的旋转对称轴;Determining a center point of the intersection of the cut surface and the surface of the three-dimensional model, wherein the center point is used as a skeleton point corresponding to the sampling point, and a normal vector of the cut surface is a rotation symmetry axis corresponding to the sampling point ;
将每两个相邻采样点对应的骨架点沿所述旋转对称轴连接,形成一中轴;Skeleton points corresponding to each two adjacent sampling points are connected along the rotational symmetry axis to form a central axis;
根据所述中轴均匀采样所述三维模型的表面上的剖面曲线,形成一局部广义圆柱体。A profile curve on the surface of the three-dimensional model is uniformly sampled according to the central axis to form a partial generalized cylinder.
具体的,所述将所述多个局部广义圆柱体进行融合处理,形成多个非局部广义圆柱体,包括:Specifically, the plurality of local generalized cylinders are subjected to fusion processing to form a plurality of non-local generalized cylinders, including:
逐渐将相邻接的局部广义圆柱体进行融合,形成多个融合广义圆柱体;Gradually merging adjacent local generalized cylinders to form a plurality of fused generalized cylinders;
若所述融合广义圆柱体的广义圆柱度小于进行融合前的两个局部广义圆柱体的广义圆柱度的和,则确定所述融合广义圆柱体为非局部广义圆柱体;If the generalized cylindricity of the fused generalized cylinder is smaller than the sum of the generalized cylines of the two local generalized cylinders before the fusion, the fusion generalized cylinder is determined to be a non-local generalized cylinder;
将各非局部广义圆柱体的重叠区域分离,形成互不重叠的广义圆柱体部件;Separating overlapping regions of each non-local generalized cylinder to form a generalized cylindrical component that does not overlap each other;
穷举所述互不重叠的广义圆柱体部件所构成的组合,形成更新后的广义圆柱体部件,将所述更新后的广义圆柱体部件作为非局部广义圆柱体。 The combination of the generally non-overlapping generalized cylindrical members is exhausted to form an updated generalized cylindrical member, and the updated generalized cylindrical member is used as a non-local generalized cylindrical body.
具体的,所述计算每个所述精确覆盖集中的各广义圆柱体部件的广义圆柱度的和,包括:Specifically, the calculating a sum of generalized cylines of each of the generalized cylindrical components in each of the precise coverage sets includes:
计算各广义圆柱体部件的广义圆柱度GCity:Calculate the generalized cylindricity GCity of each generalized cylindrical component:
GCity=Es+αEv GCity=E s +αE v
其中,Es为所述平直度;Ev为所述剖面变化度;α为一权重参数。Where E s is the flatness; E v is the degree of change of the profile; α is a weight parameter.
另外,该基于广义圆柱体的三维模型分割方法,还包括:In addition, the method for segmenting a three-dimensional model based on a generalized cylinder further includes:
通过Douglas-Peucker算法计算广义圆柱体部件的平直度Es(n):Calculate the flatness E s (n) of a generalized cylindrical part by the Douglas-Peucker algorithm:
Figure PCTCN2015097103-appb-000001
Figure PCTCN2015097103-appb-000001
其中,C为常数;n为广义圆柱体部件上的中轴折线上的控制点个数;di第i个控制点对应的逼近误差。Where C is a constant; n is the number of control points on the central axis fold line on the generalized cylindrical component; d i is the approximation error corresponding to the i-th control point.
另外,该基于广义圆柱体的三维模型分割方法,还包括:In addition, the method for segmenting a three-dimensional model based on a generalized cylinder further includes:
步骤1、根据广义圆柱体部件的中轴曲线的两端点ps和pe确定一直线pspe,以该直线pspe作为中轴折线;Step 1. Determine a straight line p s p e according to the two end points p s and p e of the central axis curve of the generalized cylindrical component, and use the straight line p s p e as the central axis fold line;
步骤2、在所述中轴曲线上确定一距离所述中轴折线的距离最大的目标点,若所述目标点与所述中轴折线的距离大于一第一距离阈值,将所述目标点设置为所述控制点;Step 2: determining a target point having the largest distance from the central axis line on the central axis curve, and if the distance between the target point and the central axis line is greater than a first distance threshold, the target point is Set as the control point;
步骤3、根据所述控制点重新确定一中轴折线,返回执行步骤2,直至所述中轴曲线上的点与所述中轴折线的距离均小于等于所述第一距离阈值;其中,所述中轴曲线上的点与所述中轴折线的距离为所述逼近误差。Step 3: Redetermining a central axis line according to the control point, and returning to step 2 until the distance between the point on the central axis curve and the central axis line is less than or equal to the first distance threshold; The distance between the point on the central axis curve and the central axis line is the approximation error.
此外,该基于广义圆柱体的三维模型分割方法,还包括:In addition, the method for segmenting a three-dimensional model based on a generalized cylinder further includes:
通过Douglas-Peucker算法计算广义圆柱体部件的剖面变化度Ev(m):Calculate the profile change E v (m) of a generalized cylindrical component by the Douglas-Peucker algorithm:
Figure PCTCN2015097103-appb-000002
Figure PCTCN2015097103-appb-000002
其中,D(cs,ce)为广义圆柱体部件两端选取的剖面曲线cs与ce的Hausdorff距离;m为一根据广义圆柱体部件的三维近似模型上的剖面曲线的数目;D(fi,fi')为广义圆柱体部件上的剖面曲线fi与一根据广义圆柱体部件的三维近似模型上的剖面曲线fi'的Hausdorff距离。Where D(c s , c e ) is the Hausdorff distance of the profile curves c s and c e selected at both ends of the generalized cylindrical component; m is the number of profile curves on the three-dimensional approximation model according to the generalized cylindrical component; (f i , f i ') is the Hausdorff distance of the profile curve f i on the generalized cylindrical component and a profile curve f i ' on the three-dimensional approximation model of the generalized cylindrical component.
另外,该基于广义圆柱体的三维模型分割方法,还包括:In addition, the method for segmenting a three-dimensional model based on a generalized cylinder further includes:
计算Hausdorff距离D(cs,ce):Calculate the Hausdorff distance D(c s , c e ):
Figure PCTCN2015097103-appb-000003
Figure PCTCN2015097103-appb-000003
其中,
Figure PCTCN2015097103-appb-000004
为剖面曲线cs上的各点k到剖面曲线ce上的各点h的各第一最小距离;所述
Figure PCTCN2015097103-appb-000005
表示所述各第一最小距离中的最大值;
among them,
Figure PCTCN2015097103-appb-000004
a first minimum distance from each point k on the profile curve c s to each point h on the profile curve c e ;
Figure PCTCN2015097103-appb-000005
Determining a maximum value among the first minimum distances;
计算Hausdorff距离D(fi,fi'):Calculate the Hausdorff distance D(f i ,f i '):
Figure PCTCN2015097103-appb-000006
Figure PCTCN2015097103-appb-000006
其中,
Figure PCTCN2015097103-appb-000007
为剖面曲线fi上的各点k到剖面曲线fi'上的各点h的各第二最小距离;所述
Figure PCTCN2015097103-appb-000008
表示所述各第二最小距离中的最大值。
among them,
Figure PCTCN2015097103-appb-000007
To each point on the sectional curve k f i f i to the cross-sectional profile of each second minimum distance of each point on h '; the
Figure PCTCN2015097103-appb-000008
Representing a maximum of the respective second minimum distances.
另外,该基于广义圆柱体的三维模型分割方法,还包括:In addition, the method for segmenting a three-dimensional model based on a generalized cylinder further includes:
步骤1、根据广义圆柱体部件两端选取的剖面曲线cs与ce进行线性插值,生成一三维近似模型;所述剖面曲线cs与ce分别构成两个控制剖面曲面;Step 1. Perform linear interpolation on the profile curves c s and c e selected at both ends of the generalized cylindrical component to generate a three-dimensional approximate model; the profile curves c s and c e respectively form two control profile surfaces;
步骤2、在所述广义圆柱体部件上确定一与所述三维近似模型上的剖面曲线的Hausdorff距离最大的目标剖面曲线;Step 2: determining, on the generalized cylindrical component, a target profile curve having a maximum Hausdorff distance from a profile curve on the three-dimensional approximate model;
步骤3、若所述目标剖面曲线与所述三维近似模型上的剖面曲线的Hausdorff距离大于一第二距离阈值,将所述目标剖面曲线所构成的面插入所述控制剖面曲面,重新构成一三维近似模型,返回执行步骤2,直至所述广义圆柱体部件上的剖面曲线与所述三维近似模型上的剖面曲线的Hausdorff距离均小于等于所述第二距离阈值。Step 3: If the Hausdorff distance of the target profile curve and the profile curve on the three-dimensional approximate model is greater than a second distance threshold, insert a face formed by the target profile curve into the control profile surface to reconstruct a three-dimensional shape. Approximating the model, returning to step 2 until the Hausdorff distance of the profile curve on the generalized cylindrical component and the profile curve on the three-dimensional approximation model is less than or equal to the second distance threshold.
一种基于广义圆柱体的三维模型分割装置,包括:A three-dimensional model segmentation device based on a generalized cylinder, comprising:
采样单元,用于获取一三维模型,通过标准泊松圆盘采样法在所述三维模型的表面均匀采样,获取多个采样点;a sampling unit, configured to acquire a three-dimensional model, and uniformly sample the surface of the three-dimensional model by a standard Poisson disk sampling method to obtain a plurality of sampling points;
局部广义圆柱体生成单元,用于通过所述多个采样点中的每个采样点构建多个局部广义圆柱体;a local generalized cylinder generating unit, configured to construct a plurality of local generalized cylinders by each of the plurality of sampling points;
融合单元,用于将所述多个局部广义圆柱体进行融合处理,形成多个非局部广义圆柱体;所述多个非局部广义圆柱体构成一候选广义圆柱集;所述候选广义圆柱集过完备覆盖所述三维模型的表面,形成过完备覆盖集;a fusion unit for performing fusion processing on the plurality of local generalized cylinders to form a plurality of non-local generalized cylinders; the plurality of non-local generalized cylinders forming a candidate generalized cylindrical set; the candidate generalized cylindrical set Completely covering the surface of the three-dimensional model to form an over-complete coverage set;
精确覆盖集获取单元,用于从所述过完备覆盖集中获取多个精确覆盖集;其中,一所述精确覆盖集包括多个互不重叠的广义圆柱体部件,且所述多个互不重叠的广义圆柱体部件的表面构成所述三维模型的表面;An accurate coverage set obtaining unit, configured to obtain a plurality of precise coverage sets from the overcomplete coverage set; wherein the precision coverage set includes a plurality of generalized cylindrical components that do not overlap each other, and the plurality of mutually overlapping ones do not overlap each other The surface of the generalized cylindrical component constitutes the surface of the three-dimensional model;
三维模型分割方式确定单元,用于计算每个所述精确覆盖集中的各广义圆柱体部件的广义圆柱度的和;将各广义圆柱度的和进行排序,确定各广义圆柱度的和中的最小值;根据所述各广义圆柱度的和中的最小值对应的精确覆盖集确定一三维模型分割方式;所述广义圆柱度由该广义圆柱体部件的平直度和剖面变化度组成; a three-dimensional model segmentation mode determining unit, configured to calculate a sum of generalized cylines of each of the generalized cylindrical components in each of the precise coverage sets; and to sort the sums of the generalized cylines to determine a minimum of sums of the generalized cylines a method for determining a three-dimensional model segmentation manner according to an exact cover set corresponding to a minimum value of the sum of the generalized cylines; the generalized cylindricity consisting of the flatness and the profile change degree of the generalized cylindrical component;
三维模型分割单元,用于根据所述三维模型分割方式对所述三维模型进行分割。The three-dimensional model segmentation unit is configured to segment the three-dimensional model according to the three-dimensional model segmentation manner.
此外,所述局部广义圆柱体生成单元,具体用于:In addition, the local generalized cylinder generating unit is specifically configured to:
根据一采样点,确定通过该采样点的多个初始平面;Determining a plurality of initial planes passing through the sampling point according to a sampling point;
根据所述多个初始平面,确定所述采样点的一个或多个切面;Determining one or more aspects of the sampling point according to the plurality of initial planes;
确定所述切面与所述三维模型的表面的交线的中心点,以所述中心点作为所述采样点对应的骨架点,以所述切面的法向量为所述采样点对应的旋转对称轴;Determining a center point of the intersection of the cut surface and the surface of the three-dimensional model, wherein the center point is used as a skeleton point corresponding to the sampling point, and a normal vector of the cut surface is a rotation symmetry axis corresponding to the sampling point ;
将每两个相邻采样点对应的骨架点沿所述旋转对称轴连接,形成一中轴;Skeleton points corresponding to each two adjacent sampling points are connected along the rotational symmetry axis to form a central axis;
根据所述中轴均匀采样所述三维模型的表面上的剖面曲线,形成一局部广义圆柱体。A profile curve on the surface of the three-dimensional model is uniformly sampled according to the central axis to form a partial generalized cylinder.
此外,所述融合单元,具体用于:In addition, the fusion unit is specifically configured to:
逐渐将相邻接的局部广义圆柱体进行融合,形成多个融合广义圆柱体;Gradually merging adjacent local generalized cylinders to form a plurality of fused generalized cylinders;
若所述融合广义圆柱体的广义圆柱度小于进行融合前的两个局部广义圆柱体的广义圆柱度的和,则确定所述融合广义圆柱体为非局部广义圆柱体;If the generalized cylindricity of the fused generalized cylinder is smaller than the sum of the generalized cylines of the two local generalized cylinders before the fusion, the fusion generalized cylinder is determined to be a non-local generalized cylinder;
将各非局部广义圆柱体的重叠区域分离,形成互不重叠的广义圆柱体部件;Separating overlapping regions of each non-local generalized cylinder to form a generalized cylindrical component that does not overlap each other;
穷举所述互不重叠的广义圆柱体部件所构成的组合,形成更新后的广义圆柱体部件,将所述更新后的广义圆柱体部件作为非局部广义圆柱体。The combination of the generally non-overlapping generalized cylindrical members is exhausted to form an updated generalized cylindrical member, and the updated generalized cylindrical member is used as a non-local generalized cylindrical body.
另外,所述三维模型分割方式确定单元,具体用于:In addition, the three-dimensional model segmentation mode determining unit is specifically configured to:
计算各广义圆柱体部件的广义圆柱度GCity:Calculate the generalized cylindricity GCity of each generalized cylindrical component:
GCity=Es+αEv GCity=E s +αE v
其中,Es为所述平直度;Ev为所述剖面变化度;α为一权重参数。Where E s is the flatness; E v is the degree of change of the profile; α is a weight parameter.
进一步的,该基于广义圆柱体的三维模型分割装置,还包括:Further, the three-dimensional model segmentation device based on the generalized cylinder further includes:
平直度计算单元,用于通过Douglas-Peucker算法计算广义圆柱体部件的平直度Es(n):A straightness calculation unit for calculating the flatness E s (n) of a generalized cylindrical component by the Douglas-Peucker algorithm:
Figure PCTCN2015097103-appb-000009
Figure PCTCN2015097103-appb-000009
其中,C为常数;n为广义圆柱体部件上的中轴折线上的控制点个数;di第i个控制点对应的逼近误差。Where C is a constant; n is the number of control points on the central axis fold line on the generalized cylindrical component; d i is the approximation error corresponding to the i-th control point.
进一步的,该基于广义圆柱体的三维模型分割装置,还包括:Further, the three-dimensional model segmentation device based on the generalized cylinder further includes:
中轴折线建模单元,用于执行:A central axis line modeling unit for performing:
步骤1、根据广义圆柱体部件的中轴曲线的两端点ps和pe确定一直线pspe,以该直线pspe作为中轴折线; Step 1. Determine a straight line p s p e according to the two end points p s and p e of the central axis curve of the generalized cylindrical component, and use the straight line p s p e as the central axis fold line;
步骤2、在所述中轴曲线上确定一距离所述中轴折线的距离最大的目标点,若所述目标点与所述中轴折线的距离大于一第一距离阈值,将所述目标点设置为所述控制点;Step 2: determining a target point having the largest distance from the central axis line on the central axis curve, and if the distance between the target point and the central axis line is greater than a first distance threshold, the target point is Set as the control point;
步骤3、根据所述控制点重新确定一中轴折线,返回执行步骤2,直至所述中轴曲线上的点与所述中轴折线的距离均小于等于所述第一距离阈值;其中,所述中轴曲线上的点与所述中轴折线的距离为所述逼近误差。Step 3: Redetermining a central axis line according to the control point, and returning to step 2 until the distance between the point on the central axis curve and the central axis line is less than or equal to the first distance threshold; The distance between the point on the central axis curve and the central axis line is the approximation error.
进一步的,该基于广义圆柱体的三维模型分割装置,还包括:Further, the three-dimensional model segmentation device based on the generalized cylinder further includes:
剖面变化度计算单元,用于通过Douglas-Peucker算法计算广义圆柱体部件的剖面变化度Ev(m):The profile change degree calculation unit is configured to calculate the profile change degree E v (m) of the generalized cylindrical component by the Douglas-Peucker algorithm:
Figure PCTCN2015097103-appb-000010
Figure PCTCN2015097103-appb-000010
其中,D(cs,ce)为广义圆柱体部件两端选取的剖面曲线cs与ce的Hausdorff距离;m为一根据广义圆柱体部件的三维近似模型上的剖面曲线的数目;D(fi,fi')为广义圆柱体部件上的剖面曲线fi与一根据广义圆柱体部件的三维近似模型上的剖面曲线fi'的Hausdorff距离。Where D(c s , c e ) is the Hausdorff distance of the profile curves c s and c e selected at both ends of the generalized cylindrical component; m is the number of profile curves on the three-dimensional approximation model according to the generalized cylindrical component; (f i , f i ') is the Hausdorff distance of the profile curve f i on the generalized cylindrical component and a profile curve f i ' on the three-dimensional approximation model of the generalized cylindrical component.
此外,该基于广义圆柱体的三维模型分割装置,还包括:In addition, the three-dimensional model segmentation device based on the generalized cylinder further includes:
Hausdorff距离计算单元,用于计算Hausdorff距离D(cs,ce):The Hausdorff distance calculation unit is used to calculate the Hausdorff distance D(c s , c e ):
Figure PCTCN2015097103-appb-000011
Figure PCTCN2015097103-appb-000011
其中,
Figure PCTCN2015097103-appb-000012
为剖面曲线cs上的各点k到剖面曲线ce上的各点h的各第一最小距离;所述
Figure PCTCN2015097103-appb-000013
表示所述各第一最小距离中的最大值;
among them,
Figure PCTCN2015097103-appb-000012
a first minimum distance from each point k on the profile curve c s to each point h on the profile curve c e ;
Figure PCTCN2015097103-appb-000013
Determining a maximum value among the first minimum distances;
所述Hausdorff距离计算单元,还用于计算Hausdorff距离D(fi,fi'):The Hausdorff distance calculation unit is also used to calculate the Hausdorff distance D(f i ,f i '):
Figure PCTCN2015097103-appb-000014
Figure PCTCN2015097103-appb-000014
其中,
Figure PCTCN2015097103-appb-000015
为剖面曲线fi上的各点k到剖面曲线fi'上的各点h的各第二最小距离;所述
Figure PCTCN2015097103-appb-000016
表示所述各第二最小距离中的最大值。
among them,
Figure PCTCN2015097103-appb-000015
To each point on the sectional curve k f i f i to the cross-sectional profile of each second minimum distance of each point on h '; the
Figure PCTCN2015097103-appb-000016
Representing a maximum of the respective second minimum distances.
进一步的,该基于广义圆柱体的三维模型分割装置,还包括:Further, the three-dimensional model segmentation device based on the generalized cylinder further includes:
三维近似模型建模单元,用于执行:A three-dimensional approximate model modeling unit for performing:
步骤1、根据广义圆柱体部件两端选取的剖面曲线cs与ce进行线性插值,生成一三维近似模型;所述剖面曲线cs与ce分别构成两个控制剖面曲面;Step 1. Perform linear interpolation on the profile curves c s and c e selected at both ends of the generalized cylindrical component to generate a three-dimensional approximate model; the profile curves c s and c e respectively form two control profile surfaces;
步骤2、在所述广义圆柱体部件上确定一与所述三维近似模型上的剖面曲线的Hausdorff距离最大的目标剖面曲线; Step 2: determining, on the generalized cylindrical component, a target profile curve having a maximum Hausdorff distance from a profile curve on the three-dimensional approximate model;
步骤3、若所述目标剖面曲线与所述三维近似模型上的剖面曲线的Hausdorff距离大于一第二距离阈值,将所述目标剖面曲线所构成的面插入所述控制剖面曲面,重新构成一三维近似模型,返回执行步骤2,直至所述广义圆柱体部件上的剖面曲线与所述三维近似模型上的剖面曲线的Hausdorff距离均小于等于所述第二距离阈值。Step 3: If the Hausdorff distance of the target profile curve and the profile curve on the three-dimensional approximate model is greater than a second distance threshold, insert a face formed by the target profile curve into the control profile surface to reconstruct a three-dimensional shape. Approximating the model, returning to step 2 until the Hausdorff distance of the profile curve on the generalized cylindrical component and the profile curve on the three-dimensional approximation model is less than or equal to the second distance threshold.
本发明实施例提供的基于广义圆柱体的三维模型分割方法及装置,通过三维模型表面的采样点构建了局部广义圆柱体,之后对局部广义圆柱体进行融合处理,形成由非局部广义圆柱体构成的过完备覆盖集,进而从该过完备覆盖集中获取多个精确覆盖集,并根据广义圆柱度的和中的最小值对应的精确覆盖集确定一三维模型分割方式,从而进行三维模型分割。可见,本发明能够通过上述方式确定一全局最优的三维模型分割方式,解决了当前三维模型分割领域中还难以通过基于广义圆柱体对三维模型进行优化分割的问题。The method and device for segmenting a three-dimensional model based on a generalized cylinder provided by an embodiment of the present invention constructs a local generalized cylinder through sampling points on the surface of the three-dimensional model, and then fuses the local generalized cylinder to form a non-local generalized cylinder. The overcomplete coverage set, and then obtains multiple precise coverage sets from the overcomplete coverage set, and determines a three-dimensional model segmentation method according to the precise coverage set corresponding to the minimum of the generalized cylindricity, thereby performing three-dimensional model segmentation. It can be seen that the present invention can determine a globally optimal three-dimensional model segmentation method by the above manner, and solves the problem that it is difficult to optimize segmentation of the three-dimensional model based on the generalized cylinder in the current three-dimensional model segmentation field.
附图说明DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description are only It is a certain embodiment of the present invention, and other drawings can be obtained from those skilled in the art without any inventive labor.
图1为本发明实施例提供的基于广义圆柱体的三维模型分割方法的流程图一;1 is a flow chart 1 of a method for segmenting a three-dimensional model based on a generalized cylinder according to an embodiment of the present invention;
图2为本发明实施例提供的基于广义圆柱体的三维模型分割方法的流程图二;2 is a flow chart 2 of a method for segmenting a three-dimensional model based on a generalized cylinder according to an embodiment of the present invention;
图3为本发明实施例中的中轴折线以及控制点的生成示意图;3 is a schematic diagram of generating a central axis fold line and a control point according to an embodiment of the present invention;
图4为本发明实施例中的三维近似模型以及三维近似模型上的剖面曲线的生成示意图;4 is a schematic diagram of generating a three-dimensional approximate model and a cross-sectional curve on a three-dimensional approximate model in an embodiment of the present invention;
图5为本发明实施例提供的基于广义圆柱体的三维模型分割装置的结构示意图一;FIG. 5 is a schematic structural diagram 1 of a three-dimensional model segmentation apparatus based on a generalized cylinder according to an embodiment of the present invention; FIG.
图6为本发明实施例提供的基于广义圆柱体的三维模型分割装置的结构示意图二。FIG. 6 is a schematic structural diagram 2 of a three-dimensional model segmentation apparatus based on a generalized cylinder according to an embodiment of the present invention.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。 The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, but not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
如图1所示,本发明实施例提供一种基于广义圆柱体的三维模型分割方法,包括:As shown in FIG. 1 , an embodiment of the present invention provides a three-dimensional model segmentation method based on a generalized cylinder, including:
步骤101、获取一三维模型,通过标准泊松圆盘采样法在所述三维模型的表面均匀采样,获取多个采样点。Step 101: Acquire a three-dimensional model, and uniformly sample the surface of the three-dimensional model by a standard Poisson disk sampling method to obtain a plurality of sampling points.
步骤102、通过所述多个采样点中的每个采样点构建多个局部广义圆柱体。Step 102: Construct a plurality of local generalized cylinders by each of the plurality of sampling points.
步骤103、将所述多个局部广义圆柱体进行融合处理,形成多个非局部广义圆柱体。Step 103: Perform fusion processing on the plurality of local generalized cylinders to form a plurality of non-local generalized cylinders.
其中,所述多个非局部广义圆柱体构成一候选广义圆柱集;所述候选广义圆柱集过完备覆盖所述三维模型的表面,形成过完备覆盖集。The plurality of non-local generalized cylinders constitute a candidate generalized cylinder set; the candidate generalized cylindrical set overcompletely covers the surface of the three-dimensional model to form an over-complete coverage set.
步骤104、从该过完备覆盖集中获取多个精确覆盖集。Step 104: Acquire a plurality of precise coverage sets from the overcomplete coverage set.
其中,一个精确覆盖集包括多个互不重叠的广义圆柱体部件,且多个互不重叠的广义圆柱体部件的表面构成所述三维模型的表面。Wherein, an accurate cover set includes a plurality of generalized cylindrical members that do not overlap each other, and surfaces of the plurality of non-overlapping generalized cylindrical members constitute a surface of the three-dimensional model.
步骤105、计算每个精确覆盖集中的各广义圆柱体部件的广义圆柱度的和。Step 105: Calculate the sum of the generalized cylines of each generalized cylindrical component in each precise coverage set.
其中,该广义圆柱度由该广义圆柱体部件的平直度和剖面变化度组成。Wherein, the generalized cylindricity consists of the flatness and the degree of profile change of the generalized cylindrical component.
步骤106、将各广义圆柱度的和进行排序,确定各广义圆柱度的和中的最小值。Step 106: Sort the sum of the generalized cylines to determine the minimum of the sum of the generalized cylines.
步骤107、根据各广义圆柱度的和中的最小值对应的精确覆盖集确定一三维模型分割方式。Step 107: Determine a three-dimensional model segmentation manner according to an accurate coverage set corresponding to a minimum value of sums of the generalized cylines.
步骤108、根据该三维模型分割方式对三维模型进行分割。Step 108: Segment the three-dimensional model according to the three-dimensional model segmentation manner.
本发明实施例提供的基于广义圆柱体的三维模型分割方法,通过三维模型表面的采样点构建了局部广义圆柱体,之后对局部广义圆柱体进行融合处理,形成由非局部广义圆柱体构成的过完备覆盖集,进而从该过完备覆盖集中获取多个精确覆盖集,并根据广义圆柱度的和中的最小值对应的精确覆盖集确定一三维模型分割方式,从而进行三维模型分割。可见,本发明能够通过上述方式确定一全局最优的三维模型分割方式,解决了当前三维模型分割领域中还难以通过基于广义圆柱体对三维模型进行优化分割的问题。The three-dimensional model segmentation method based on generalized cylinder provided by the embodiment of the present invention constructs a local generalized cylinder by sampling points on the surface of the three-dimensional model, and then fuses the local generalized cylinder to form a non-local generalized cylinder. A complete coverage set is obtained, and a plurality of precise coverage sets are obtained from the overcomplete coverage set, and a three-dimensional model segmentation mode is determined according to an accurate coverage set corresponding to the minimum value of the sum of the generalized cylindrimen, thereby performing three-dimensional model segmentation. It can be seen that the present invention can determine a globally optimal three-dimensional model segmentation method by the above manner, and solves the problem that it is difficult to optimize segmentation of the three-dimensional model based on the generalized cylinder in the current three-dimensional model segmentation field.
为了使本领域的技术人员更好的了解本发明,下面列举一个更为详细的实施例,如图2所示,本发明实施例提供基于广义圆柱体的三维模型分割方法,包括:In order to make the present invention better understood by those skilled in the art, a more detailed embodiment is shown below. As shown in FIG. 2, the embodiment of the present invention provides a three-dimensional model segmentation method based on a generalized cylinder, including:
步骤201、获取一三维模型,通过标准泊松圆盘采样法在所述三维模型的表面均匀采样,获取多个采样点。Step 201: Acquire a three-dimensional model, and uniformly sample the surface of the three-dimensional model by a standard Poisson disk sampling method to obtain a plurality of sampling points.
步骤202、根据一采样点,确定通过该采样点的多个初始平面。Step 202: Determine, according to a sampling point, a plurality of initial planes passing through the sampling point.
此处采用的是旋转对称轴(Rotational Symmetry Axis,简称ROSA)技术来执行步骤202至步骤206。该多个初始平面可以是N个,N一般为24。 Steps 202 to 206 are performed using a Rotational Symmetry Axis (ROSA) technique. The plurality of initial planes may be N, and N is generally 24.
步骤203、根据所述多个初始平面,确定所述采样点的一个或多个切面。Step 203: Determine one or more aspects of the sampling point according to the plurality of initial planes.
对于每一个初始平面,根据其与三维模型表面的交线上的法向量分布,可以计算新的平面,然后迭代直至平面不再变化,则这个平面称之为该点的切面(Cutting Plane);对于柱形区域,一般所有初始平面最终都收敛到同一个切面,而对于非柱形区域,则可能存在多个切面。For each initial plane, according to the normal vector distribution on the intersection with the surface of the three-dimensional model, a new plane can be calculated, and then iterated until the plane no longer changes, this plane is called the cutting plane of the point (Cutting Plane); For cylindrical regions, generally all initial planes eventually converge to the same slice, while for non-columnar regions, there may be multiple slices.
步骤204、确定所述切面与所述三维模型的表面的交线的中心点,以所述中心点作为所述采样点对应的骨架点,以所述切面的法向量为所述采样点对应的旋转对称轴。Step 204: Determine a center point of a line of intersection between the cut surface and a surface of the three-dimensional model, where the center point is used as a skeleton point corresponding to the sampling point, and a normal vector of the cut surface is corresponding to the sampling point. Rotational symmetry axis.
步骤205、将每两个相邻采样点对应的骨架点沿所述旋转对称轴连接,形成一中轴。Step 205: Connect the skeleton points corresponding to each two adjacent sampling points along the rotational symmetry axis to form a central axis.
步骤206、根据所述中轴均匀采样所述三维模型的表面上的剖面曲线,形成一局部广义圆柱体。Step 206: Evenly sampling a profile curve on a surface of the three-dimensional model according to the central axis to form a partial generalized cylinder.
步骤207、逐渐将相邻接的局部广义圆柱体进行融合,形成多个融合广义圆柱体。 Step 207, gradually merging the adjacent local generalized cylinders to form a plurality of fused generalized cylinders.
由于局部广义圆柱体在采样点的邻域内构建,因此存在大量的重叠,虽然其构成了三维模型的表面的过完备覆盖(Over-complete Cover),但这还不能保证精确覆盖集的存在,同时为了减小分割规模,获得数量最少的广义圆柱分割,此处需要将局部广义圆柱体进行融合。Since the local generalized cylinder is constructed in the neighborhood of the sampling point, there is a large amount of overlap. Although it constitutes an over-complete coverage of the surface of the three-dimensional model, this does not guarantee the existence of an accurate coverage set. In order to reduce the scale of the segmentation and obtain the least number of generalized cylindrical segments, the local generalized cylinders need to be fused here.
步骤208、若融合广义圆柱体的广义圆柱度小于进行融合前的两个局部广义圆柱体的广义圆柱度的和,则确定所述融合广义圆柱体为非局部广义圆柱体。Step 208: If the generalized cylindricity of the fused generalized cylinder is smaller than the sum of the generalized cylines of the two local generalized cylinders before the fusion, the fused generalized cylinder is determined to be a non-local generalized cylinder.
其公式表达为:Its formula is expressed as:
GCity(A⊕B)<GCity(A)+GCity(B)GCity(A⊕B)<GCity(A)+GCity(B)
其中,GCity(A)为A局部广义圆柱体的广义圆柱度,GCity(B)为B局部广义圆柱体的广义圆柱度,GCity(A⊕B)为A和B融合的广义圆柱体的广义圆柱度。对于广义圆柱度的计算方法,可以参见后续步骤212所示,此处不再赘述。Among them, GCity(A) is the generalized cylindricity of A generalized cylinder, GCity(B) is the generalized cylindricity of B generalized cylinder, and GCity(A⊕B) is the generalized cylinder of generalized cylinder with A and B fusion degree. For the calculation method of the generalized cylindricity, refer to the subsequent step 212, which will not be repeated here.
步骤209、将各非局部广义圆柱体的重叠区域分离,形成互不重叠的广义圆柱体部件。Step 209: Separating overlapping regions of each non-local generalized cylinder to form a generalized cylindrical component that does not overlap each other.
步骤210、穷举所述互不重叠的广义圆柱体部件所构成的组合,形成更新后的广义圆柱体部件,将所述更新后的广义圆柱体部件作为非局部广义圆柱体。Step 210: Extending the combination of the non-overlapping generalized cylindrical members to form an updated generalized cylindrical member, and using the updated generalized cylindrical member as a non-local generalized cylindrical body.
值得说明的是,这些互不重叠的广义圆柱体部件可以成为砖块(Building Blocks),通过穷举砖块组合,能够构建出所有可能的广义圆柱体部件。这样,能保证 该过完备覆盖集中一定存在精确覆盖集,同时还能构建一些仅通过融合局部广义圆柱体所不能构建的新的广义圆柱形部件。It is worth noting that these non-overlapping generalized cylindrical components can be used as building blocks, and all possible generalized cylindrical components can be constructed by exhausting brick combinations. In this way, it can be guaranteed There must be an exact set of coverage in the over-complete coverage set, and it is also possible to construct new generalized cylindrical parts that cannot be constructed by merging local generalized cylinders.
其中,所述多个非局部广义圆柱体构成一候选广义圆柱集;所述候选广义圆柱集过完备覆盖所述三维模型的表面,形成过完备覆盖集。The plurality of non-local generalized cylinders constitute a candidate generalized cylinder set; the candidate generalized cylindrical set overcompletely covers the surface of the three-dimensional model to form an over-complete coverage set.
步骤211、从该过完备覆盖集中获取多个精确覆盖集。Step 211: Acquire a plurality of precise coverage sets from the overcomplete coverage set.
其中,一个精确覆盖集包括多个互不重叠的广义圆柱体部件,且多个互不重叠的广义圆柱体部件的表面构成所述三维模型的表面。Wherein, an accurate cover set includes a plurality of generalized cylindrical members that do not overlap each other, and surfaces of the plurality of non-overlapping generalized cylindrical members constitute a surface of the three-dimensional model.
在步骤211中,可以采用Algorithm X算法,从一组过完备覆盖集中快速枚举出所有有效的精确覆盖集。In step 211, the Algorithm X algorithm can be used to quickly enumerate all valid precision coverage sets from a set of overcomplete coverage sets.
步骤212、计算每个精确覆盖集中的各广义圆柱体部件的广义圆柱度的和。Step 212: Calculate the sum of the generalized cylines of each of the generalized cylindrical components in each precise coverage set.
其中,计算各广义圆柱体部件的广义圆柱度GCity可以采用如下公式来实现:Among them, the calculation of the generalized cylindricity GCity of each generalized cylindrical component can be realized by the following formula:
GCity=Es+αEv GCity=E s +αE v
其中,Es为所述平直度;Ev为所述剖面变化度;α为一权重参数,α一般为1。Where E s is the flatness; E v is the degree of change of the profile; α is a weight parameter, and α is generally 1.
对于上述的平直度,此处可以通过Douglas-Peucker算法计算广义圆柱体部件的平直度Es(n):For the flatness described above, the flatness E s (n) of the generalized cylindrical part can be calculated by the Douglas-Peucker algorithm:
Figure PCTCN2015097103-appb-000017
Figure PCTCN2015097103-appb-000017
其中,C为常数,当C值变大,会激励产生长的多折线中轴;相反当C值变小,会激励将中轴分成很多较短的折线;n为广义圆柱体部件上的中轴折线上的控制点个数;di第i个控制点对应的逼近误差。Where C is a constant, when the C value becomes larger, it will stimulate the long axis of the long polyline; on the contrary, when the C value becomes smaller, the excitation will divide the middle axis into many shorter polylines; n is the middle of the generalized cylindrical part. The number of control points on the axis fold line; the approximation error corresponding to the i-th control point of d i .
对于上述的中轴折线以及控制点,可以通过如下3个步骤产生,例如图3所示的一个壁虎形状的三维模型,其头部到尾部的曲线可以作为一中轴曲线,对于该中轴曲线,可以生成其中轴折线以及控制点:For the above-mentioned central axis fold line and control point, it can be generated by the following three steps, for example, a three-dimensional model of a gecko shape as shown in FIG. 3, the head-to-tail curve can be used as a central axis curve for the central axis curve , you can generate the axis polyline and the control point:
步骤1、根据广义圆柱体部件的中轴曲线的两端点ps和pe确定一直线pspe,以该直线pspe作为中轴折线。Step 1. Determine a straight line p s p e according to the two end points p s and p e of the central axis curve of the generalized cylindrical component, and use the straight line p s p e as the central axis fold line.
步骤2、在所述中轴曲线上确定一距离所述中轴折线的距离最大的目标点,若所述目标点与所述中轴折线的距离大于一第一距离阈值,将所述目标点设置为所述控制点。Step 2: determining a target point having the largest distance from the central axis line on the central axis curve, and if the distance between the target point and the central axis line is greater than a first distance threshold, the target point is Set to the control point.
例如,图3中P1、P2、P3……P11均为上述的目标点,d1、d2、d3分别为P1、P2、P3与中轴折线的距离。此处,需要说明的是,该中轴折线并非一直保持不变,而是通过下面步骤3不断更新确定。最终形成的中轴折线接近所述中轴曲线。For example, in Fig. 3, P 1 , P 2 , P 3 , ... P 11 are the above-mentioned target points, and d 1 , d 2 , and d 3 are the distances of P 1 , P 2 , and P 3 from the central axis line, respectively. Here, it should be noted that the central axis fold line does not remain unchanged all the time, but is continuously updated by the following step 3. The resulting central axis fold line is close to the central axis curve.
另外,该第一距离阈值一般可以为0.005。 Additionally, the first distance threshold can generally be 0.005.
步骤3、根据所述控制点重新确定一中轴折线,返回执行步骤2,直至所述中轴曲线上的点与所述中轴折线的距离均小于等于所述第一距离阈值;其中,所述中轴曲线上的点与所述中轴折线的距离为所述逼近误差。Step 3: Redetermining a central axis line according to the control point, and returning to step 2 until the distance between the point on the central axis curve and the central axis line is less than or equal to the first distance threshold; The distance between the point on the central axis curve and the central axis line is the approximation error.
例如,P1为距离直线pspe最远的目标点,且该距离大于第一距离阈值,则重新确定中轴折线为psp1pe,之后继续执行步骤2,得到控制点P2,重新确定中轴折线为psp2p1pe,按照这种方式,直至中轴曲线上的点与所述中轴折线的距离均小于等于所述第一距离阈值。For example, if P 1 is the target point farthest from the straight line p s p e , and the distance is greater than the first distance threshold, then the central axis line is re-determined as p s p 1 p e , and then step 2 is performed to obtain the control point P. 2 , re-determining the central axis line as p s p 2 p 1 p e , in this way, the distance from the point on the central axis curve to the central axis line is less than or equal to the first distance threshold.
另外,对于上述的剖面变化度,可以通过Douglas-Peucker算法计算广义圆柱体部件的剖面变化度Ev(m):In addition, for the above-mentioned profile change degree, the profile change degree E v (m) of the generalized cylindrical component can be calculated by the Douglas-Peucker algorithm:
Figure PCTCN2015097103-appb-000018
Figure PCTCN2015097103-appb-000018
其中,D(cs,ce)为广义圆柱体部件两端选取的剖面曲线cs与ce的Hausdorff距离;m为一根据广义圆柱体部件的三维近似模型上的剖面曲线数目;D(fi,fi')为广义圆柱体部件上的剖面曲线fi与一根据广义圆柱体部件的三维近似模型上的剖面曲线fi'的Hausdorff距离。Where D(c s , c e ) is the Hausdorff distance of the profile curves c s and c e selected at both ends of the generalized cylindrical component; m is the number of profile curves on the three-dimensional approximate model of the generalized cylindrical component; D( f i , f i ') is the Hausdorff distance of the profile curve f i on the generalized cylindrical component and a profile curve f i ' on the three-dimensional approximation model of the generalized cylindrical component.
对于上述的Hausdorff距离,可以通过如下方式进行计算:For the above Hausdorff distance, it can be calculated as follows:
如计算Hausdorff距离D(cs,ce):For example, calculate the Hausdorff distance D(c s , c e ):
Figure PCTCN2015097103-appb-000019
Figure PCTCN2015097103-appb-000019
其中,
Figure PCTCN2015097103-appb-000020
为剖面曲线cs上的各点k到剖面曲线ce上的各点h的各第一最小距离;所述
Figure PCTCN2015097103-appb-000021
表示所述各第一最小距离中的最大值。
among them,
Figure PCTCN2015097103-appb-000020
a first minimum distance from each point k on the profile curve c s to each point h on the profile curve c e ;
Figure PCTCN2015097103-appb-000021
Representing a maximum value among the first minimum distances.
又如计算Hausdorff距离D(fi,fi'):Another example is to calculate the Hausdorff distance D(f i ,f i '):
Figure PCTCN2015097103-appb-000022
Figure PCTCN2015097103-appb-000022
其中,
Figure PCTCN2015097103-appb-000023
为剖面曲线fi上的各点k到剖面曲线fi'上的各点h的各第二最小距离;所述
Figure PCTCN2015097103-appb-000024
表示所述各第二最小距离中的最大值。
among them,
Figure PCTCN2015097103-appb-000023
To each point on the sectional curve k f i f i to the cross-sectional profile of each second minimum distance of each point on h '; the
Figure PCTCN2015097103-appb-000024
Representing a maximum of the respective second minimum distances.
另外,对于上述的三维近似模型以及三维近似模型上的剖面曲线(该剖面曲线对应形成控制剖面曲面),可以通过如下3个步骤产生,例如如图4所示的一个三维模型,其三维近似模型的生成和控制剖面曲面的生成方式如下:In addition, for the above three-dimensional approximation model and the profile curve on the three-dimensional approximation model (the profile curve corresponding to the formation of the control profile surface), it can be generated by the following three steps, for example, a three-dimensional model as shown in FIG. 4, and a three-dimensional approximate model thereof The generation and control of the profile surface is generated as follows:
步骤1、根据广义圆柱体部件两端选取的剖面曲线cs与ce进行线性插值,生成一三维近似模型;所述剖面曲线cs与ce分别构成两个控制剖面曲面。 Step 1. Linearly interpolating the profile curves c s and c e selected at both ends of the generalized cylindrical component to generate a three-dimensional approximate model; the profile curves c s and c e respectively form two control profile surfaces.
步骤2、在所述广义圆柱体部件上确定一与所述三维近似模型上的剖面曲线的Hausdorff距离最大的目标剖面曲线。Step 2. Determine a target profile curve having the largest Hausdorff distance from the profile curve on the three-dimensional approximation model on the generalized cylindrical component.
例如,图4中,f1至f8分别为8个目标剖面曲线,该8个目标剖面曲线构成了8各控制剖面曲面。值得说明的是,该三维近似模型并非一直保持不变,而是通过下面步骤3不断更新确定。最终形成的三维近似模型接近该广义圆柱体部件。For example, in FIG. 4, f 1 to f 8 are respectively eight target section curves, and the eight target section curves constitute eight control section curved surfaces. It is worth noting that the three-dimensional approximation model is not always the same, but is continuously updated by the following step 3. The resulting three-dimensional approximation model is close to the generalized cylindrical component.
步骤3、若所述目标剖面曲线与所述三维近似模型上的剖面曲线的Hausdorff距离大于一第二距离阈值,将所述目标剖面曲线所构成的面插入所述控制剖面曲面,重新构成一三维近似模型,返回执行步骤2,直至所述广义圆柱体部件上的剖面曲线与所述三维近似模型上的剖面曲线的Hausdorff距离均小于等于所述第二距离阈值。Step 3: If the Hausdorff distance of the target profile curve and the profile curve on the three-dimensional approximate model is greater than a second distance threshold, insert a face formed by the target profile curve into the control profile surface to reconstruct a three-dimensional shape. Approximating the model, returning to step 2 until the Hausdorff distance of the profile curve on the generalized cylindrical component and the profile curve on the three-dimensional approximation model is less than or equal to the second distance threshold.
例如,当剖面曲线cs与ce进行线性插值,生成一三维近似模型后,在广义圆柱体部件上确定一与所述三维近似模型上的剖面曲线f1'的Hausdorff距离最大的目标剖面曲线f1,且该Hausdorff距离大于一第二距离阈值,则根据剖面曲线cs、ce和f1重新确定一三维近似模型,之后继续执行上述步骤2,按照这种方式,得到后续的目标剖面曲线,直至广义圆柱体部件上的剖面曲线与所述三维近似模型上的剖面曲线的Hausdorff距离均小于等于第二距离阈值。For example, when the cross-sectional curves c s and c e are linearly interpolated to generate a three-dimensional approximation model, a target profile curve having the largest Hausdorff distance from the profile curve f 1 ' on the three-dimensional approximation model is determined on the generalized cylindrical component. f 1 , and the Hausdorff distance is greater than a second distance threshold, then re-determining a three-dimensional approximation model according to the profile curves c s , c e and f 1 , and then continuing to perform the above step 2, in this way, obtaining a subsequent target profile The curve until the Hausdorff distance of the profile curve on the generalized cylindrical component and the profile curve on the three-dimensional approximation model is less than or equal to the second distance threshold.
步骤213、将各广义圆柱度的和进行排序,确定各广义圆柱度的和中的最小值。Step 213: Sort the sum of the generalized cylines to determine the minimum of the sum of the generalized cylines.
步骤214、根据各广义圆柱度的和中的最小值对应的精确覆盖集确定一三维模型分割方式。Step 214: Determine a three-dimensional model segmentation manner according to an accurate coverage set corresponding to a minimum value of sums of the generalized cylines.
步骤215、根据该三维模型分割方式对三维模型进行分割。Step 215: Segment the three-dimensional model according to the three-dimensional model segmentation manner.
本发明实施例提供的基于广义圆柱体的三维模型分割方法,通过三维模型表面的采样点构建了局部广义圆柱体,之后对局部广义圆柱体进行融合处理,形成由非局部广义圆柱体构成的过完备覆盖集,进而从该过完备覆盖集中获取多个精确覆盖集,并根据广义圆柱度的和中的最小值对应的精确覆盖集确定一三维模型分割方式,从而进行三维模型分割。可见,本发明能够通过上述方式确定一全局最优的三维模型分割方式,解决了当前三维模型分割领域中还难以通过基于广义圆柱体对三维模型进行优化分割的问题。The three-dimensional model segmentation method based on generalized cylinder provided by the embodiment of the present invention constructs a local generalized cylinder by sampling points on the surface of the three-dimensional model, and then fuses the local generalized cylinder to form a non-local generalized cylinder. A complete coverage set is obtained, and a plurality of precise coverage sets are obtained from the overcomplete coverage set, and a three-dimensional model segmentation mode is determined according to an accurate coverage set corresponding to the minimum value of the sum of the generalized cylindrimen, thereby performing three-dimensional model segmentation. It can be seen that the present invention can determine a globally optimal three-dimensional model segmentation method by the above manner, and solves the problem that it is difficult to optimize segmentation of the three-dimensional model based on the generalized cylinder in the current three-dimensional model segmentation field.
对应于上述的方法实施例,如图5所示,本发明实施例提供一种基于广义圆柱体的三维模型分割装置,包括:Corresponding to the foregoing method embodiment, as shown in FIG. 5, an embodiment of the present invention provides a three-dimensional model segmentation device based on a generalized cylinder, including:
采样单元31,可以获取一三维模型,通过标准泊松圆盘采样法在所述三维模型的表面均匀采样,获取多个采样点。 The sampling unit 31 can acquire a three-dimensional model and uniformly sample the surface of the three-dimensional model by a standard Poisson disk sampling method to acquire a plurality of sampling points.
局部广义圆柱体生成单元32,可以通过多个采样点中的每个采样点构建多个局部广义圆柱体。The local generalized cylinder generating unit 32 can construct a plurality of local generalized cylinders through each of the plurality of sampling points.
融合单元33,可以将多个局部广义圆柱体进行融合处理,形成多个非局部广义圆柱体;该多个非局部广义圆柱体构成一候选广义圆柱集;该候选广义圆柱集过完备覆盖所述三维模型的表面,形成过完备覆盖集。The fusion unit 33 may perform fusion processing on a plurality of local generalized cylinders to form a plurality of non-local generalized cylinders; the plurality of non-local generalized cylinders constitute a candidate generalized cylinder set; the candidate generalized cylindrical set overcompletely covers the The surface of the 3D model forms an overcomplete set of covers.
精确覆盖集获取单元34,可以从过完备覆盖集中获取多个精确覆盖集;其中,一所述精确覆盖集包括多个互不重叠的广义圆柱体部件,且所述多个互不重叠的广义圆柱体部件的表面构成所述三维模型的表面。The precise coverage set obtaining unit 34 may obtain a plurality of precise coverage sets from the overcomplete coverage set; wherein the precision coverage set includes a plurality of generalized cylindrical components that do not overlap each other, and the plurality of non-overlapping generalized The surface of the cylindrical component constitutes the surface of the three-dimensional model.
三维模型分割方式确定单元35,可以计算每个所述精确覆盖集中的各广义圆柱体部件的广义圆柱度的和;将各广义圆柱度的和进行排序,确定各广义圆柱度的和中的最小值;根据所述各广义圆柱度的和中的最小值对应的精确覆盖集确定一三维模型分割方式;所述广义圆柱度由该广义圆柱体部件的平直度和剖面变化度组成。The three-dimensional model segmentation mode determining unit 35 may calculate the sum of the generalized cylines of each of the generalized cylindrical components in each of the precise coverage sets; sort the sum of the generalized cylines to determine the minimum of the sum of the generalized cylines a value; a three-dimensional model segmentation manner is determined according to the precise coverage set corresponding to the minimum of the sum of the generalized cylines; the generalized cylindricity is composed of the flatness and the profile change degree of the generalized cylindrical component.
三维模型分割单元36,可以根据三维模型分割方式对所述三维模型进行分割。The three-dimensional model segmentation unit 36 can segment the three-dimensional model according to the three-dimensional model segmentation method.
此外,该局部广义圆柱体生成单元32,具体可以:In addition, the local generalized cylinder generating unit 32 may specifically:
根据一采样点,确定通过该采样点的多个初始平面,并根据多个初始平面,确定所述采样点的一个或多个切面;确定所述切面与所述三维模型的表面的交线的中心点,以所述中心点作为所述采样点对应的骨架点,以所述切面的法向量为所述采样点对应的旋转对称轴;将每两个相邻采样点对应的骨架点沿所述旋转对称轴连接,形成一中轴;根据该中轴均匀采样所述三维模型的表面上的剖面曲线,形成一局部广义圆柱体。Determining, according to a sampling point, a plurality of initial planes passing through the sampling point, and determining one or more aspects of the sampling point according to the plurality of initial planes; determining a line of intersection of the section with the surface of the three-dimensional model a center point, wherein the center point is used as a skeleton point corresponding to the sampling point, and a normal vector of the cutting plane is a rotation symmetry axis corresponding to the sampling point; and a skeleton point corresponding to each two adjacent sampling points is along The rotational symmetry axes are connected to form a central axis; the profile curve on the surface of the three-dimensional model is uniformly sampled according to the central axis to form a partial generalized cylinder.
此外,该融合单元33,具体可以逐渐将相邻接的局部广义圆柱体进行融合,形成多个融合广义圆柱体;若所述融合广义圆柱体的广义圆柱度小于进行融合前的两个局部广义圆柱体的广义圆柱度的和,则确定所述融合广义圆柱体为非局部广义圆柱体;将各非局部广义圆柱体的重叠区域分离,形成互不重叠的广义圆柱体部件;穷举所述互不重叠的广义圆柱体部件所构成的组合,形成更新后的广义圆柱体部件,将所述更新后的广义圆柱体部件作为非局部广义圆柱体。In addition, the fusion unit 33 can specifically fuse adjacent local generalized cylinders to form a plurality of fused generalized cylinders; if the generalized cylindricity of the fused generalized cylinder is smaller than two local generalized before fusion The sum of the generalized cylines of the cylinder determines that the fused generalized cylinder is a non-local generalized cylinder; the overlapping regions of the non-local generalized cylinders are separated to form a generalized cylindrical component that does not overlap each other; The combination of the generalized cylindrical members that do not overlap each other forms an updated generalized cylindrical member, and the updated generalized cylindrical member is regarded as a non-local generalized cylindrical body.
另外,所述三维模型分割方式确定单元35,具体可以:In addition, the three-dimensional model segmentation manner determining unit 35 may specifically:
计算各广义圆柱体部件的广义圆柱度GCity:Calculate the generalized cylindricity GCity of each generalized cylindrical component:
GCity=Es+αEv GCity=E s +αE v
其中,Es为所述平直度;Ev为所述剖面变化度;α为一权重参数。Where E s is the flatness; E v is the degree of change of the profile; α is a weight parameter.
进一步的,如图6所示,该基于广义圆柱体的三维模型分割装置,还可以包括: Further, as shown in FIG. 6, the three-dimensional model segmentation device based on the generalized cylinder may further include:
平直度计算单元37,可以通过Douglas-Peucker算法计算广义圆柱体部件的平直度Es(n):The flatness calculation unit 37 can calculate the flatness E s (n) of the generalized cylindrical member by the Douglas-Peucker algorithm:
Figure PCTCN2015097103-appb-000025
Figure PCTCN2015097103-appb-000025
其中,C为常数;n为广义圆柱体部件上的中轴折线上的控制点个数;di第i个控制点对应的逼近误差。Where C is a constant; n is the number of control points on the central axis fold line on the generalized cylindrical component; d i is the approximation error corresponding to the i-th control point.
进一步的,如图6所示,该基于广义圆柱体的三维模型分割装置,还可以包括:Further, as shown in FIG. 6, the three-dimensional model segmentation device based on the generalized cylinder may further include:
中轴折线建模单元38,其可以执行:A central axis polyline modeling unit 38, which can execute:
步骤1、根据广义圆柱体部件的中轴曲线的两端点ps和pe确定一直线pspe,以该直线pspe作为中轴折线。Step 1. Determine a straight line p s p e according to the two end points p s and p e of the central axis curve of the generalized cylindrical component, and use the straight line p s p e as the central axis fold line.
步骤2、在所述中轴曲线上确定一距离所述中轴折线的距离最大的目标点,若所述目标点与所述中轴折线的距离大于一第一距离阈值,将所述目标点设置为所述控制点。Step 2: determining a target point having the largest distance from the central axis line on the central axis curve, and if the distance between the target point and the central axis line is greater than a first distance threshold, the target point is Set to the control point.
步骤3、根据所述控制点重新确定一中轴折线,返回执行步骤2,直至所述中轴曲线上的点与所述中轴折线的距离均小于等于所述第一距离阈值;其中,所述中轴曲线上的点与所述中轴折线的距离为所述逼近误差。Step 3: Redetermining a central axis line according to the control point, and returning to step 2 until the distance between the point on the central axis curve and the central axis line is less than or equal to the first distance threshold; The distance between the point on the central axis curve and the central axis line is the approximation error.
进一步的,如图6所示,该基于广义圆柱体的三维模型分割装置,还包括:Further, as shown in FIG. 6, the three-dimensional model segmentation device based on the generalized cylinder further includes:
剖面变化度计算单元39,可以通过Douglas-Peucker算法计算广义圆柱体部件的剖面变化度Ev(m):The profile change degree calculation unit 39 can calculate the profile change degree E v (m) of the generalized cylindrical component by the Douglas-Peucker algorithm:
Figure PCTCN2015097103-appb-000026
Figure PCTCN2015097103-appb-000026
其中,D(cs,ce)为广义圆柱体部件两端选取的剖面曲线cs与ce的Hausdorff距离;m为一根据广义圆柱体部件的三维近似模型上的剖面曲线的数目;D(fi,fi')为广义圆柱体部件上的剖面曲线fi与一根据广义圆柱体部件的三维近似模型上的剖面曲线fi'的Hausdorff距离。Where D(c s , c e ) is the Hausdorff distance of the profile curves c s and c e selected at both ends of the generalized cylindrical component; m is the number of profile curves on the three-dimensional approximation model according to the generalized cylindrical component; (f i , f i ') is the Hausdorff distance of the profile curve f i on the generalized cylindrical component and a profile curve f i ' on the three-dimensional approximation model of the generalized cylindrical component.
此外,如图6所示,该基于广义圆柱体的三维模型分割装置,还可以包括:In addition, as shown in FIG. 6, the three-dimensional model segmentation apparatus based on the generalized cylinder may further include:
Hausdorff距离计算单元40,可以计算Hausdorff距离D(cs,ce):The Hausdorff distance calculation unit 40 can calculate the Hausdorff distance D(c s , c e ):
Figure PCTCN2015097103-appb-000027
Figure PCTCN2015097103-appb-000027
其中,
Figure PCTCN2015097103-appb-000028
为剖面曲线cs上的各点k到剖面曲线ce上的各点h的各第一最小距离;该
Figure PCTCN2015097103-appb-000029
表示所述各第一最小距离中的最大值。
among them,
Figure PCTCN2015097103-appb-000028
a first minimum distance from each point k on the profile curve c s to each point h on the profile curve c e ;
Figure PCTCN2015097103-appb-000029
Representing a maximum value among the first minimum distances.
该Hausdorff距离计算单元40,还可以计算Hausdorff距离D(fi,fi):The Hausdorff distance calculation unit 40 can also calculate the Hausdorff distance D(f i ,f i ):
Figure PCTCN2015097103-appb-000030
Figure PCTCN2015097103-appb-000030
其中,
Figure PCTCN2015097103-appb-000031
为剖面曲线fi上的各点k到剖面曲线fi'上的各点h的各第二最小距离;所述
Figure PCTCN2015097103-appb-000032
表示所述各第二最小距离中的最大值。
among them,
Figure PCTCN2015097103-appb-000031
To each point on the sectional curve k f i f i to the cross-sectional profile of each second minimum distance of each point on h '; the
Figure PCTCN2015097103-appb-000032
Representing a maximum of the respective second minimum distances.
进一步的,如图6所示,该基于广义圆柱体的三维模型分割装置,还可以包括:Further, as shown in FIG. 6, the three-dimensional model segmentation device based on the generalized cylinder may further include:
三维近似模型建模单元41,可以执行:The three-dimensional approximate model modeling unit 41 can execute:
步骤1、根据广义圆柱体部件两端选取的剖面曲线cs与ce进行线性插值,生成一三维近似模型;所述剖面曲线cs与ce分别构成两个控制剖面曲面。Step 1. Linearly interpolating the profile curves c s and c e selected at both ends of the generalized cylindrical component to generate a three-dimensional approximate model; the profile curves c s and c e respectively form two control profile surfaces.
步骤2、在所述广义圆柱体部件上确定一与所述三维近似模型上的剖面曲线的Hausdorff距离最大的目标剖面曲线。Step 2. Determine a target profile curve having the largest Hausdorff distance from the profile curve on the three-dimensional approximation model on the generalized cylindrical component.
步骤3、若所述目标剖面曲线与所述三维近似模型上的剖面曲线的Hausdorff距离大于一第二距离阈值,将所述目标剖面曲线所构成的面插入所述控制剖面曲面,重新构成一三维近似模型,返回执行步骤2,直至所述广义圆柱体部件上的剖面曲线与所述三维近似模型上的剖面曲线的Hausdorff距离均小于等于所述第二距离阈值。Step 3: If the Hausdorff distance of the target profile curve and the profile curve on the three-dimensional approximate model is greater than a second distance threshold, insert a face formed by the target profile curve into the control profile surface to reconstruct a three-dimensional shape. Approximating the model, returning to step 2 until the Hausdorff distance of the profile curve on the generalized cylindrical component and the profile curve on the three-dimensional approximation model is less than or equal to the second distance threshold.
值得说明的是,本发明实施例提供的基于广义圆柱体的三维模型分割装置的具体实现方式可以参见上述图1和图2所示的方法实施例,此处不再赘述。It should be noted that the specific implementation manner of the three-dimensional model segmentation device based on the generalized cylinder provided by the embodiment of the present invention can be referred to the method embodiment shown in FIG. 1 and FIG. 2, and details are not described herein again.
本发明实施例提供的基于广义圆柱体的三维模型分割装置,通过三维模型表面的采样点构建了局部广义圆柱体,之后对局部广义圆柱体进行融合处理,形成由非局部广义圆柱体构成的过完备覆盖集,进而从该过完备覆盖集中获取多个精确覆盖集,并根据广义圆柱度的和中的最小值对应的精确覆盖集确定一三维模型分割方式,从而进行三维模型分割。可见,本发明能够通过上述方式确定一全局最优的三维模型分割方式,将模型分割问题转化为表面精确覆盖问题,能够保证最终的分割收敛于一个数量最少,同时每个部件又足够简单的分割。解决了当前三维模型分割领域中还难以通过基于广义圆柱体对三维模型进行优化分割的问题。The three-dimensional model segmentation device based on the generalized cylinder provided by the embodiment of the present invention constructs a local generalized cylinder through the sampling points on the surface of the three-dimensional model, and then fuses the local generalized cylinder to form a non-local generalized cylinder. A complete coverage set is obtained, and a plurality of precise coverage sets are obtained from the overcomplete coverage set, and a three-dimensional model segmentation mode is determined according to an accurate coverage set corresponding to the minimum value of the sum of the generalized cylindrimen, thereby performing three-dimensional model segmentation. It can be seen that the present invention can determine a global optimal three-dimensional model segmentation method by the above manner, and convert the model segmentation problem into a surface accurate cover problem, which can ensure that the final segmentation converges to a minimum number, and each component is sufficiently simple to segment. . It solves the problem that it is difficult to optimize segmentation of 3D models based on generalized cylinders in the current 3D model segmentation field.
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机 程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (system), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG. These computers are available Program instructions to a processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing device to produce a machine such that instructions executed by a processor of a computer or other programmable data processing device are generated for implementation in a process A device or a plurality of processes and/or block diagrams of a device in a block or a plurality of blocks.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。The computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device. The apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device. The instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
本发明中应用了具体实施例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。 The principles and embodiments of the present invention have been described in connection with the specific embodiments of the present invention. The description of the above embodiments is only for the understanding of the method of the present invention and the core idea thereof. At the same time, for those skilled in the art, according to the present invention The present invention is not limited by the scope of the present invention.

Claims (18)

  1. 一种基于广义圆柱体的三维模型分割方法,其特征在于,包括:A three-dimensional model segmentation method based on generalized cylinders, comprising:
    获取一三维模型,通过标准泊松圆盘采样法在所述三维模型的表面均匀采样,获取多个采样点;Obtaining a three-dimensional model, uniformly sampling the surface of the three-dimensional model by a standard Poisson disk sampling method, and acquiring a plurality of sampling points;
    通过所述多个采样点中的每个采样点构建多个局部广义圆柱体;Constructing a plurality of local generalized cylinders by each of the plurality of sampling points;
    将所述多个局部广义圆柱体进行融合处理,形成多个非局部广义圆柱体;所述多个非局部广义圆柱体构成一候选广义圆柱集;所述候选广义圆柱集过完备覆盖所述三维模型的表面,形成过完备覆盖集;The plurality of local generalized cylinders are subjected to fusion processing to form a plurality of non-local generalized cylinders; the plurality of non-local generalized cylinders constitute a candidate generalized cylindrical set; and the candidate generalized cylindrical set overcompletely covers the three-dimensional The surface of the model forms an overcomplete set of covers;
    从所述过完备覆盖集中获取多个精确覆盖集;其中,一所述精确覆盖集包括多个互不重叠的广义圆柱体部件,且所述多个互不重叠的广义圆柱体部件的表面构成所述三维模型的表面;Acquiring a plurality of precise coverage sets from the overcomplete coverage set; wherein the precision coverage set comprises a plurality of generalized cylindrical components that do not overlap each other, and surface composition of the plurality of non-overlapping generalized cylindrical components The surface of the three-dimensional model;
    计算每个所述精确覆盖集中的各广义圆柱体部件的广义圆柱度的和;所述广义圆柱度由该广义圆柱体部件的平直度和剖面变化度组成;Calculating a sum of generalized cylines of each of the generalized cylindrical components in each of the precise coverage sets; the generalized cylindricity consisting of the flatness and the degree of profile change of the generalized cylindrical component;
    将各广义圆柱度的和进行排序,确定各广义圆柱度的和中的最小值;Sorting the sum of the generalized cylines to determine the minimum of the sum of the generalized cylines;
    根据所述各广义圆柱度的和中的最小值对应的精确覆盖集确定一三维模型分割方式;Determining a three-dimensional model segmentation manner according to an exact coverage set corresponding to the minimum of the sum of the generalized cylines;
    根据所述三维模型分割方式对所述三维模型进行分割。The three-dimensional model is segmented according to the three-dimensional model segmentation method.
  2. 根据权利要求1所述的基于广义圆柱体的三维模型分割方法,其特征在于,所述通过所述多个采样点中的每个采样点构建多个局部广义圆柱体,包括:The method for segmenting a three-dimensional model based on a generalized cylinder according to claim 1, wherein the constructing a plurality of local generalized cylinders by each of the plurality of sampling points comprises:
    根据一采样点,确定通过该采样点的多个初始平面;Determining a plurality of initial planes passing through the sampling point according to a sampling point;
    根据所述多个初始平面,确定所述采样点的一个或多个切面;Determining one or more aspects of the sampling point according to the plurality of initial planes;
    确定所述切面与所述三维模型的表面的交线的中心点,以所述中心点作为所述采样点对应的骨架点,以所述切面的法向量为所述采样点对应的旋转对称轴;Determining a center point of the intersection of the cut surface and the surface of the three-dimensional model, wherein the center point is used as a skeleton point corresponding to the sampling point, and a normal vector of the cut surface is a rotation symmetry axis corresponding to the sampling point ;
    将每两个相邻采样点对应的骨架点沿所述旋转对称轴连接,形成一中轴;Skeleton points corresponding to each two adjacent sampling points are connected along the rotational symmetry axis to form a central axis;
    根据所述中轴均匀采样所述三维模型的表面上的剖面曲线,形成一局部广义圆柱体。A profile curve on the surface of the three-dimensional model is uniformly sampled according to the central axis to form a partial generalized cylinder.
  3. 根据权利要求1所述的基于广义圆柱体的三维模型分割方法,其特征在于,所述将所述多个局部广义圆柱体进行融合处理,形成多个非局部广义圆柱体,包括:The method for segmenting a three-dimensional model based on a generalized cylinder according to claim 1, wherein the plurality of local generalized cylinders are fused to form a plurality of non-local generalized cylinders, including:
    逐渐将相邻接的局部广义圆柱体进行融合,形成多个融合广义圆柱体; Gradually merging adjacent local generalized cylinders to form a plurality of fused generalized cylinders;
    若所述融合广义圆柱体的广义圆柱度小于进行融合前的两个局部广义圆柱体的广义圆柱度的和,则确定所述融合广义圆柱体为非局部广义圆柱体;If the generalized cylindricity of the fused generalized cylinder is smaller than the sum of the generalized cylines of the two local generalized cylinders before the fusion, the fusion generalized cylinder is determined to be a non-local generalized cylinder;
    将各非局部广义圆柱体的重叠区域分离,形成互不重叠的广义圆柱体部件;Separating overlapping regions of each non-local generalized cylinder to form a generalized cylindrical component that does not overlap each other;
    穷举所述互不重叠的广义圆柱体部件所构成的组合,形成更新后的广义圆柱体部件,将所述更新后的广义圆柱体部件作为非局部广义圆柱体。The combination of the generally non-overlapping generalized cylindrical members is exhausted to form an updated generalized cylindrical member, and the updated generalized cylindrical member is used as a non-local generalized cylindrical body.
  4. 根据权利要求3所述的基于广义圆柱体的三维模型分割方法,其特征在于,所述计算每个所述精确覆盖集中的各广义圆柱体部件的广义圆柱度的和,包括:The generalized cylinder-based three-dimensional model segmentation method according to claim 3, wherein said calculating a sum of generalized cylines of each of the generalized cylindrical members in each of said precise coverage sets comprises:
    计算各广义圆柱体部件的广义圆柱度GCity:Calculate the generalized cylindricity GCity of each generalized cylindrical component:
    GCity=Es+αEv GCity=E s +αE v
    其中,Es为所述平直度;Ev为所述剖面变化度;α为一权重参数。Where E s is the flatness; E v is the degree of change of the profile; α is a weight parameter.
  5. 根据权利要求4所述的基于广义圆柱体的三维模型分割方法,其特征在于,还包括:The method of claim 3, wherein the method further comprises:
    通过Douglas-Peucker算法计算广义圆柱体部件的平直度Es(n):Calculate the flatness E s (n) of a generalized cylindrical part by the Douglas-Peucker algorithm:
    Figure PCTCN2015097103-appb-100001
    Figure PCTCN2015097103-appb-100001
    其中,C为常数;n为广义圆柱体部件上的中轴折线上的控制点个数;di第i个控制点对应的逼近误差。Where C is a constant; n is the number of control points on the central axis fold line on the generalized cylindrical component; d i is the approximation error corresponding to the i-th control point.
  6. 根据权利要求5所述的基于广义圆柱体的三维模型分割方法,其特征在于,还包括:The method of claim 3, wherein the method further comprises:
    步骤1、根据广义圆柱体部件的中轴曲线的两端点ps和pe确定一直线pspe,以该直线pspe作为中轴折线;Step 1. Determine a straight line p s p e according to the two end points p s and p e of the central axis curve of the generalized cylindrical component, and use the straight line p s p e as the central axis fold line;
    步骤2、在所述中轴曲线上确定一距离所述中轴折线的距离最大的目标点,若所述目标点与所述中轴折线的距离大于一第一距离阈值,将所述目标点设置为所述控制点;Step 2: determining a target point having the largest distance from the central axis line on the central axis curve, and if the distance between the target point and the central axis line is greater than a first distance threshold, the target point is Set as the control point;
    步骤3、根据所述控制点重新确定一中轴折线,返回执行步骤2,直至所述中轴曲线上的点与所述中轴折线的距离均小于等于所述第一距离阈值;其中,所述中轴曲线上的点与所述中轴折线的距离为所述逼近误差。Step 3: Redetermining a central axis line according to the control point, and returning to step 2 until the distance between the point on the central axis curve and the central axis line is less than or equal to the first distance threshold; The distance between the point on the central axis curve and the central axis line is the approximation error.
  7. 根据权利要求4所述的基于广义圆柱体的三维模型分割方法,其特征在于,还包括:The method of claim 3, wherein the method further comprises:
    通过Douglas-Peucker算法计算广义圆柱体部件的剖面变化度Ev(m):Calculate the profile change E v (m) of a generalized cylindrical component by the Douglas-Peucker algorithm:
    Figure PCTCN2015097103-appb-100002
    Figure PCTCN2015097103-appb-100002
    其中,D(cs,ce)为广义圆柱体部件两端选取的剖面曲线cs与ce的Hausdorff距离;m为一根据广义圆柱体部件的三维近似模型上的剖面曲线的数目;D(fi,fi')为广义圆柱体部件上的剖面曲线fi与一根据广义圆柱体部件的三维近似模型上的剖面曲线fi'的Hausdorff距离。Where D(c s , c e ) is the Hausdorff distance of the profile curves c s and c e selected at both ends of the generalized cylindrical component; m is the number of profile curves on the three-dimensional approximation model according to the generalized cylindrical component; (f i , f i ') is the Hausdorff distance of the profile curve f i on the generalized cylindrical component and a profile curve f i ' on the three-dimensional approximation model of the generalized cylindrical component.
  8. 根据权利要求7所述的基于广义圆柱体的三维模型分割方法,其特征在于,还包括:The method of claim 3, wherein the method further comprises:
    计算Hausdorff距离D(cs,ce):Calculate the Hausdorff distance D(c s , c e ):
    Figure PCTCN2015097103-appb-100003
    Figure PCTCN2015097103-appb-100003
    其中,
    Figure PCTCN2015097103-appb-100004
    为剖面曲线cs上的各点k到剖面曲线ce上的各点h的各第一最小距离;所述
    Figure PCTCN2015097103-appb-100005
    表示所述各第一最小距离中的最大值;
    among them,
    Figure PCTCN2015097103-appb-100004
    a first minimum distance from each point k on the profile curve c s to each point h on the profile curve c e ;
    Figure PCTCN2015097103-appb-100005
    Determining a maximum value among the first minimum distances;
    计算Hausdorff距离D(fi,fi'):Calculate the Hausdorff distance D(f i ,f i '):
    Figure PCTCN2015097103-appb-100006
    Figure PCTCN2015097103-appb-100006
    其中,
    Figure PCTCN2015097103-appb-100007
    为剖面曲线fi上的各点k到剖面曲线fi'上的各点h的各第二最小距离;所述
    Figure PCTCN2015097103-appb-100008
    表示所述各第二最小距离中的最大值。
    among them,
    Figure PCTCN2015097103-appb-100007
    To each point on the sectional curve k f i f i to the cross-sectional profile of each second minimum distance of each point on h '; the
    Figure PCTCN2015097103-appb-100008
    Representing a maximum of the respective second minimum distances.
  9. 根据权利要求8所述的基于广义圆柱体的三维模型分割方法,其特征在于,还包括:The method for segmenting a three-dimensional model based on a generalized cylinder according to claim 8, further comprising:
    步骤1、根据广义圆柱体部件两端选取的剖面曲线cs与ce进行线性插值,生成一三维近似模型;所述剖面曲线cs与ce分别构成两个控制剖面曲面;Step 1. Perform linear interpolation on the profile curves c s and c e selected at both ends of the generalized cylindrical component to generate a three-dimensional approximate model; the profile curves c s and c e respectively form two control profile surfaces;
    步骤2、在所述广义圆柱体部件上确定一与所述三维近似模型上的剖面曲线的Hausdorff距离最大的目标剖面曲线;Step 2: determining, on the generalized cylindrical component, a target profile curve having a maximum Hausdorff distance from a profile curve on the three-dimensional approximate model;
    步骤3、若所述目标剖面曲线与所述三维近似模型上的剖面曲线的Hausdorff距离大于一第二距离阈值,将所述目标剖面曲线所构成的面插入所述控制剖面曲面,重新构成一三维近似模型,返回执行步骤2,直至所述广义圆柱体部件上的剖面曲线与所述三维近似模型上的剖面曲线的Hausdorff距离均小于等于所述第二距离阈值。Step 3: If the Hausdorff distance of the target profile curve and the profile curve on the three-dimensional approximate model is greater than a second distance threshold, insert a face formed by the target profile curve into the control profile surface to reconstruct a three-dimensional shape. Approximating the model, returning to step 2 until the Hausdorff distance of the profile curve on the generalized cylindrical component and the profile curve on the three-dimensional approximation model is less than or equal to the second distance threshold.
  10. 一种基于广义圆柱体的三维模型分割装置,其特征在于,包括:A three-dimensional model segmentation device based on a generalized cylinder, comprising:
    采样单元,用于获取一三维模型,通过标准泊松圆盘采样法在所述三维模型的表面均匀采样,获取多个采样点;a sampling unit, configured to acquire a three-dimensional model, and uniformly sample the surface of the three-dimensional model by a standard Poisson disk sampling method to obtain a plurality of sampling points;
    局部广义圆柱体生成单元,用于通过所述多个采样点中的每个采样点构建多个局部广义圆柱体; a local generalized cylinder generating unit, configured to construct a plurality of local generalized cylinders by each of the plurality of sampling points;
    融合单元,用于将所述多个局部广义圆柱体进行融合处理,形成多个非局部广义圆柱体;所述多个非局部广义圆柱体构成一候选广义圆柱集;所述候选广义圆柱集过完备覆盖所述三维模型的表面,形成过完备覆盖集;a fusion unit for performing fusion processing on the plurality of local generalized cylinders to form a plurality of non-local generalized cylinders; the plurality of non-local generalized cylinders forming a candidate generalized cylindrical set; the candidate generalized cylindrical set Completely covering the surface of the three-dimensional model to form an over-complete coverage set;
    精确覆盖集获取单元,用于从所述过完备覆盖集中获取多个精确覆盖集;其中,一所述精确覆盖集包括多个互不重叠的广义圆柱体部件,且所述多个互不重叠的广义圆柱体部件的表面构成所述三维模型的表面;An accurate coverage set obtaining unit, configured to obtain a plurality of precise coverage sets from the overcomplete coverage set; wherein the precision coverage set includes a plurality of generalized cylindrical components that do not overlap each other, and the plurality of mutually overlapping ones do not overlap each other The surface of the generalized cylindrical component constitutes the surface of the three-dimensional model;
    三维模型分割方式确定单元,用于计算每个所述精确覆盖集中的各广义圆柱体部件的广义圆柱度的和;将各广义圆柱度的和进行排序,确定各广义圆柱度的和中的最小值;根据所述各广义圆柱度的和中的最小值对应的精确覆盖集确定一三维模型分割方式;所述广义圆柱度由该广义圆柱体部件的平直度和剖面变化度组成;a three-dimensional model segmentation mode determining unit, configured to calculate a sum of generalized cylines of each of the generalized cylindrical components in each of the precise coverage sets; and to sort the sums of the generalized cylines to determine a minimum of sums of the generalized cylines a method for determining a three-dimensional model segmentation manner according to an exact cover set corresponding to a minimum value of the sum of the generalized cylines; the generalized cylindricity consisting of the flatness and the profile change degree of the generalized cylindrical component;
    三维模型分割单元,用于根据所述三维模型分割方式对所述三维模型进行分割。The three-dimensional model segmentation unit is configured to segment the three-dimensional model according to the three-dimensional model segmentation manner.
  11. 根据权利要求10所述的基于广义圆柱体的三维模型分割装置,其特征在于,所述局部广义圆柱体生成单元,具体用于:The apparatus for dividing a three-dimensional model based on a generalized cylinder according to claim 10, wherein the local generalized cylinder generating unit is specifically configured to:
    根据一采样点,确定通过该采样点的多个初始平面;Determining a plurality of initial planes passing through the sampling point according to a sampling point;
    根据所述多个初始平面,确定所述采样点的一个或多个切面;Determining one or more aspects of the sampling point according to the plurality of initial planes;
    确定所述切面与所述三维模型的表面的交线的中心点,以所述中心点作为所述采样点对应的骨架点,以所述切面的法向量为所述采样点对应的旋转对称轴;Determining a center point of the intersection of the cut surface and the surface of the three-dimensional model, wherein the center point is used as a skeleton point corresponding to the sampling point, and a normal vector of the cut surface is a rotation symmetry axis corresponding to the sampling point ;
    将每两个相邻采样点对应的骨架点沿所述旋转对称轴连接,形成一中轴;Skeleton points corresponding to each two adjacent sampling points are connected along the rotational symmetry axis to form a central axis;
    根据所述中轴均匀采样所述三维模型的表面上的剖面曲线,形成一局部广义圆柱体。A profile curve on the surface of the three-dimensional model is uniformly sampled according to the central axis to form a partial generalized cylinder.
  12. 根据权利要求10所述的基于广义圆柱体的三维模型分割装置,其特征在于,所述融合单元,具体用于:The apparatus for dividing a three-dimensional model based on a generalized cylinder according to claim 10, wherein the fusion unit is specifically configured to:
    逐渐将相邻接的局部广义圆柱体进行融合,形成多个融合广义圆柱体;Gradually merging adjacent local generalized cylinders to form a plurality of fused generalized cylinders;
    若所述融合广义圆柱体的广义圆柱度小于进行融合前的两个局部广义圆柱体的广义圆柱度的和,则确定所述融合广义圆柱体为非局部广义圆柱体;If the generalized cylindricity of the fused generalized cylinder is smaller than the sum of the generalized cylines of the two local generalized cylinders before the fusion, the fusion generalized cylinder is determined to be a non-local generalized cylinder;
    将各非局部广义圆柱体的重叠区域分离,形成互不重叠的广义圆柱体部件;Separating overlapping regions of each non-local generalized cylinder to form a generalized cylindrical component that does not overlap each other;
    穷举所述互不重叠的广义圆柱体部件所构成的组合,形成更新后的广义圆柱体部件,将所述更新后的广义圆柱体部件作为非局部广义圆柱体。The combination of the generally non-overlapping generalized cylindrical members is exhausted to form an updated generalized cylindrical member, and the updated generalized cylindrical member is used as a non-local generalized cylindrical body.
  13. 根据权利要求12所述的基于广义圆柱体的三维模型分割装置,其特征在于,所述三维模型分割方式确定单元,具体用于: The apparatus for determining a three-dimensional model based on a generalized cylinder according to claim 12, wherein the three-dimensional model segmentation mode determining unit is specifically configured to:
    计算各广义圆柱体部件的广义圆柱度GCity:Calculate the generalized cylindricity GCity of each generalized cylindrical component:
    GCity=Es+αEv GCity=E s +αE v
    其中,Es为所述平直度;Ev为所述剖面变化度;α为一权重参数。Where E s is the flatness; E v is the degree of change of the profile; α is a weight parameter.
  14. 根据权利要求13所述的基于广义圆柱体的三维模型分割装置,其特征在于,还包括:The apparatus for dividing a three-dimensional model based on a generalized cylinder according to claim 13, further comprising:
    平直度计算单元,用于通过Douglas-Peucker算法计算广义圆柱体部件的平直度Es(n):A straightness calculation unit for calculating the flatness E s (n) of a generalized cylindrical component by the Douglas-Peucker algorithm:
    Figure PCTCN2015097103-appb-100009
    Figure PCTCN2015097103-appb-100009
    其中,C为常数;n为广义圆柱体部件上的中轴折线上的控制点个数;di第i个控制点对应的逼近误差。Where C is a constant; n is the number of control points on the central axis fold line on the generalized cylindrical component; d i is the approximation error corresponding to the i-th control point.
  15. 根据权利要求14所述的基于广义圆柱体的三维模型分割装置,其特征在于,还包括:The apparatus for dividing a three-dimensional model based on a generalized cylinder according to claim 14, further comprising:
    中轴折线建模单元,用于执行:A central axis line modeling unit for performing:
    步骤1、根据广义圆柱体部件的中轴曲线的两端点ps和pe确定一直线pspe,以该直线pspe作为中轴折线;Step 1. Determine a straight line p s p e according to the two end points p s and p e of the central axis curve of the generalized cylindrical component, and use the straight line p s p e as the central axis fold line;
    步骤2、在所述中轴曲线上确定一距离所述中轴折线的距离最大的目标点,若所述目标点与所述中轴折线的距离大于一第一距离阈值,将所述目标点设置为所述控制点;Step 2: determining a target point having the largest distance from the central axis line on the central axis curve, and if the distance between the target point and the central axis line is greater than a first distance threshold, the target point is Set as the control point;
    步骤3、根据所述控制点重新确定一中轴折线,返回执行步骤2,直至所述中轴曲线上的点与所述中轴折线的距离均小于等于所述第一距离阈值;其中,所述中轴曲线上的点与所述中轴折线的距离为所述逼近误差。Step 3: Redetermining a central axis line according to the control point, and returning to step 2 until the distance between the point on the central axis curve and the central axis line is less than or equal to the first distance threshold; The distance between the point on the central axis curve and the central axis line is the approximation error.
  16. 根据权利要求13所述的基于广义圆柱体的三维模型分割装置,其特征在于,还包括:The apparatus for dividing a three-dimensional model based on a generalized cylinder according to claim 13, further comprising:
    剖面变化度计算单元,用于通过Douglas-Peucker算法计算广义圆柱体部件的剖面变化度Ev(m):The profile change degree calculation unit is configured to calculate the profile change degree E v (m) of the generalized cylindrical component by the Douglas-Peucker algorithm:
    Figure PCTCN2015097103-appb-100010
    Figure PCTCN2015097103-appb-100010
    其中,D(cs,ce)为广义圆柱体部件两端选取的剖面曲线cs与ce的Hausdorff距离;m为一根据广义圆柱体部件的三维近似模型上的剖面曲线的数目;D(fi,fi')为广义圆柱体部件上的剖面曲线fi与一根据广义圆柱体部件的三维近似模型上的剖面曲线fi'的Hausdorff距离。 Where D(c s , c e ) is the Hausdorff distance of the profile curves c s and c e selected at both ends of the generalized cylindrical component; m is the number of profile curves on the three-dimensional approximation model according to the generalized cylindrical component; (f i , f i ') is the Hausdorff distance of the profile curve f i on the generalized cylindrical component and a profile curve f i ' on the three-dimensional approximation model of the generalized cylindrical component.
  17. 根据权利要求16所述的基于广义圆柱体的三维模型分割装置,其特征在于,还包括:The apparatus for dividing a three-dimensional model based on a generalized cylinder according to claim 16, further comprising:
    Hausdorff距离计算单元,用于计算Hausdorff距离D(cs,ce):The Hausdorff distance calculation unit is used to calculate the Hausdorff distance D(c s , c e ):
    Figure PCTCN2015097103-appb-100011
    Figure PCTCN2015097103-appb-100011
    其中,
    Figure PCTCN2015097103-appb-100012
    为剖面曲线cs上的各点k到剖面曲线ce上的各点h的各第一最小距离;所述
    Figure PCTCN2015097103-appb-100013
    表示所述各第一最小距离中的最大值;
    among them,
    Figure PCTCN2015097103-appb-100012
    a first minimum distance from each point k on the profile curve c s to each point h on the profile curve c e ;
    Figure PCTCN2015097103-appb-100013
    Determining a maximum value among the first minimum distances;
    所述Hausdorff距离计算单元,还用于计算Hausdorff距离D(fi,fi'):The Hausdorff distance calculation unit is also used to calculate the Hausdorff distance D(f i ,f i '):
    Figure PCTCN2015097103-appb-100014
    Figure PCTCN2015097103-appb-100014
    其中,
    Figure PCTCN2015097103-appb-100015
    为剖面曲线fi上的各点k到剖面曲线fi'上的各点h的各第二最小距离;所述
    Figure PCTCN2015097103-appb-100016
    表示所述各第二最小距离中的最大值。
    among them,
    Figure PCTCN2015097103-appb-100015
    To each point on the sectional curve k f i f i to the cross-sectional profile of each second minimum distance of each point on h '; the
    Figure PCTCN2015097103-appb-100016
    Representing a maximum of the respective second minimum distances.
  18. 根据权利要求17所述的基于广义圆柱体的三维模型分割装置,其特征在于,还包括:The apparatus for dividing a three-dimensional model based on a generalized cylinder according to claim 17, further comprising:
    三维近似模型建模单元,用于执行:A three-dimensional approximate model modeling unit for performing:
    步骤1、根据广义圆柱体部件两端选取的剖面曲线cs与ce进行线性插值,生成一三维近似模型;所述剖面曲线cs与ce分别构成两个控制剖面曲面;Step 1. Perform linear interpolation on the profile curves c s and c e selected at both ends of the generalized cylindrical component to generate a three-dimensional approximate model; the profile curves c s and c e respectively form two control profile surfaces;
    步骤2、在所述广义圆柱体部件上确定一与所述三维近似模型上的剖面曲线的Hausdorff距离最大的目标剖面曲线;Step 2: determining, on the generalized cylindrical component, a target profile curve having a maximum Hausdorff distance from a profile curve on the three-dimensional approximate model;
    步骤3、若所述目标剖面曲线与所述三维近似模型上的剖面曲线的Hausdorff距离大于一第二距离阈值,将所述目标剖面曲线所构成的面插入所述控制剖面曲面,重新构成一三维近似模型,返回执行步骤2,直至所述广义圆柱体部件上的剖面曲线与所述三维Step 3: If the Hausdorff distance of the target profile curve and the profile curve on the three-dimensional approximate model is greater than a second distance threshold, insert a face formed by the target profile curve into the control profile surface to reconstruct a three-dimensional shape. Approximating the model, returning to step 2 until the profile curve on the generalized cylindrical component and the three-dimensional
    近似模型上的剖面曲线的Hausdorff距离均小于等于所述第二距离阈值。 The Hausdorff distance of the profile curve on the approximate model is less than or equal to the second distance threshold.
PCT/CN2015/097103 2015-04-30 2015-12-11 Method and apparatus for decomposing three-dimensional model based on generalized cylinders WO2016173260A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510216755.XA CN104851126B (en) 2015-04-30 2015-04-30 Threedimensional model dividing method and device based on generalized cylinder
CN201510216755.X 2015-04-30

Publications (1)

Publication Number Publication Date
WO2016173260A1 true WO2016173260A1 (en) 2016-11-03

Family

ID=53850753

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/097103 WO2016173260A1 (en) 2015-04-30 2015-12-11 Method and apparatus for decomposing three-dimensional model based on generalized cylinders

Country Status (2)

Country Link
CN (1) CN104851126B (en)
WO (1) WO2016173260A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106683186A (en) * 2016-11-16 2017-05-17 浙江工业大学 Curve surface detail preserving type three-dimensional model repair method
CN112987647A (en) * 2021-01-04 2021-06-18 苏州科技大学 Equal-error tool path generation method for five-axis machining of parametric curved surface flat-bottom tool
CN114677481A (en) * 2022-05-31 2022-06-28 中国飞机强度研究所 Method for constructing ideal heating curved surface equivalent approximation model for aerospace plane ground test
US11776175B2 (en) 2018-04-26 2023-10-03 Hewlett-Packard Development Company, L.P. Adaptive point generation

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104851126B (en) * 2015-04-30 2017-10-20 中国科学院深圳先进技术研究院 Threedimensional model dividing method and device based on generalized cylinder
GB2546815B (en) * 2016-02-01 2019-07-03 Naturalmotion Ltd Animating a virtual object in a virtual world
GB2546814B (en) * 2016-02-01 2018-10-24 Naturalmotion Ltd Animating a virtual object in a virtual world
GB2546817B (en) 2016-02-01 2018-10-24 Naturalmotion Ltd Animating a virtual object in a virtual world
CN109543535B (en) * 2018-10-23 2021-12-21 华南理工大学 Three-dimensional finger vein feature extraction method and matching method thereof

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004063988A1 (en) * 2003-01-15 2004-07-29 Koninklijke Philips Electronics N.V. Image processing method for automatic adaptation of 3-d deformable model onto a subtantially tubular surface of a 3-d object
CN101301207A (en) * 2008-05-28 2008-11-12 华中科技大学 Vascular angiography three-dimensional rebuilding method under dynamic model direction
CN101488226A (en) * 2008-01-16 2009-07-22 中国科学院自动化研究所 Tree measurement and reconstruction method based on single three-dimensional laser scanning
US8004517B1 (en) * 2005-06-24 2011-08-23 Geomagic, Inc. Methods, apparatus and computer program products that model three-dimensional surface structures
CN104851126A (en) * 2015-04-30 2015-08-19 中国科学院深圳先进技术研究院 Three-dimensional model decomposition method and three-dimensional model decomposition device based on generalized cylinder

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02309461A (en) * 1989-05-24 1990-12-25 Fujitsu Ltd Modeling processing method for generalized cylinder
JPH04238583A (en) * 1991-01-22 1992-08-26 Nippon Telegr & Teleph Corp <Ntt> Reference coordinate system extractor for three-dimensional shape
WO2005055496A2 (en) * 2003-11-26 2005-06-16 Viatronix Incorporated System and method for optimization of vessel centerlines
CN101901498B (en) * 2009-12-31 2011-11-30 华中科技大学 Recursion modelling method of human coronary artery
CN101866495B (en) * 2010-06-01 2012-03-28 中国科学院自动化研究所 Tree modeling method based on skeleton point cloud

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004063988A1 (en) * 2003-01-15 2004-07-29 Koninklijke Philips Electronics N.V. Image processing method for automatic adaptation of 3-d deformable model onto a subtantially tubular surface of a 3-d object
US8004517B1 (en) * 2005-06-24 2011-08-23 Geomagic, Inc. Methods, apparatus and computer program products that model three-dimensional surface structures
CN101488226A (en) * 2008-01-16 2009-07-22 中国科学院自动化研究所 Tree measurement and reconstruction method based on single three-dimensional laser scanning
CN101301207A (en) * 2008-05-28 2008-11-12 华中科技大学 Vascular angiography three-dimensional rebuilding method under dynamic model direction
CN104851126A (en) * 2015-04-30 2015-08-19 中国科学院深圳先进技术研究院 Three-dimensional model decomposition method and three-dimensional model decomposition device based on generalized cylinder

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106683186A (en) * 2016-11-16 2017-05-17 浙江工业大学 Curve surface detail preserving type three-dimensional model repair method
US11776175B2 (en) 2018-04-26 2023-10-03 Hewlett-Packard Development Company, L.P. Adaptive point generation
CN112987647A (en) * 2021-01-04 2021-06-18 苏州科技大学 Equal-error tool path generation method for five-axis machining of parametric curved surface flat-bottom tool
CN112987647B (en) * 2021-01-04 2022-03-29 苏州科技大学 Equal-error tool path generation method for five-axis machining of parametric curved surface flat-bottom tool
CN114677481A (en) * 2022-05-31 2022-06-28 中国飞机强度研究所 Method for constructing ideal heating curved surface equivalent approximation model for aerospace plane ground test

Also Published As

Publication number Publication date
CN104851126B (en) 2017-10-20
CN104851126A (en) 2015-08-19

Similar Documents

Publication Publication Date Title
WO2016173260A1 (en) Method and apparatus for decomposing three-dimensional model based on generalized cylinders
US11361503B2 (en) Systems and methods for generating volumetric models
CN110033519B (en) Three-dimensional modeling method, device and system based on implicit function and storage medium
CN111581776B (en) Iso-geometric analysis method based on geometric reconstruction model
Liang et al. 3D reconstruction using silhouettes from unordered viewpoints
CN110084894B (en) Local amplification display method and device of three-dimensional model and electronic equipment
Wang et al. Feature-sensitive tetrahedral mesh generation with guaranteed quality
Liu et al. Quality improvement of surface triangular mesh using a modified Laplacian smoothing approach avoiding intersection
Ramanathan et al. Interior Medial Axis Transform computation of 3D objects bound by free-form surfaces
Li et al. On surface reconstruction: A priority driven approach
Nieser et al. Patch layout from feature graphs
Lee et al. The DSO feature based point cloud simplification
WO2012174357A2 (en) Generating a mesh of geometric elements
Zhang et al. Model reconstruction from cloud data
Varnuška et al. Simple holes triangulation in surface reconstruction
Zhang et al. Fast Mesh Reconstruction from Single View Based on GCN and Topology Modification.
Flöry Constrained matching of point clouds and surfaces
Sharma et al. 3D Surface Reconstruction from Unorganized Sparse Cross Sections.
Alqudah Survey of Surface Reconstruction Algorithms
Adhikary et al. Direct global editing of STL mesh model for product design and rapid prototyping
WO2019152027A1 (en) Determine sample points on slices from nurbs models
Yao et al. A survey on geometric shape representation of objects based on medial axis transform
Edessa et al. A contribution to curves network based ship hull form reverse engineering
Han et al. INTEGRAL PARAMETRIC SURFACE RECONSTRUCTION METHOD BASED ON DIFFERENTIAL MANIFOLD AND NON-UNIFORM RATIONAL B-SPLINE
JP6727932B2 (en) Curved surface generator by point cloud surface fitting and curved surface generation program

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15890635

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 16.04.2018)

122 Ep: pct application non-entry in european phase

Ref document number: 15890635

Country of ref document: EP

Kind code of ref document: A1