Summary of the invention
In order to overcome shortcoming and deficiency of the existing technology, the present invention provides a kind of three-dimension curved surface approximate expansion into plane
Adaptive approach.
The present invention is joined so that the minimum principle of the distance between front and back mesh point and its neighborhood mesh point difference is unfolded using curved surface
Number equation carries out gridding to curved surface, and abstract curved surface transforms into the mathematical expression formula of plane, certainly with curved surface second fundamental form
The length corresponding relationship for adapting to determine weight factor and expansion front and back, the calculation method of iteration initial value is solved by triangulation method,
To be maximally maintained the topological structure of curved surface.The present invention is also suitable for carrying out the three dimensional surface data of target object flat
Smoothization processing, obtains its two-dimentional physical size information on the image.
The present invention adopts the following technical scheme:
A kind of three-dimension curved surface approximate expansion includes the following steps: at the adaptive approach of plane
S1 curved surface meshing:
The parametric equation r (u, v) of curved surface=(x (u, v), y (u, v), z (u, v)), enables u=u0, obtain one on curved surface
Curve r (u0, v), enable v=v0, obtain curve r (u, a v on curved surface0), the u0、v0For constant, wherein two curves
Intersecting point coordinate is r (u0, v0), change u, the value of v obtains the curved surface being spliced by quadrilateral mesh, further obtains grid
The coordinate of intersection point, with setIt indicates;
S2 presets curved surface and transforms into plane, and the grid intersection point coordinate set that curved surface is corresponded in plane is
The topological structure for keeping Doubly curved surfaces plane, then enable the grid intersection point P of curved surfaceiWith consecutive points PjThe vector of composition isAndTransform into corresponding grid intersection point Q after planeiWith consecutive points QjThe vector of composition isAndThe process that then surface mesh intersection point transforms into corresponding grid intersection point after plane is to make nonlinear equationThere is minimum value;
S3 determines weight factor g according to the curvature of curved surfaceij;
S4 seeks the iteration initial value of nonlinear equation using triangulation method, then substitutes into nonlinear equation, determines plane net
The coordinate of lattice intersection point.
By the value sequence of u in the S1, grid intersection point is ranked up, the value of u is then fixed, then traverses taking for v
Value, is ranked up grid intersection point coordinate, the grid intersection point coordinate after sequence is stored in set
I indicates the serial number of intersection point, and n is natural number.
In the S2, make nonlinear equationThere is minimum value, it is specifically right respectively
xi、yiDerivation obtains:
It finds out it and each mesh point coordinate Q in plane is unfoldedi(xi, yi) nonlinear equation is made to reach minimum value, wherein gijFor
Weight factor, ∑NIt indicates and point PiThe foot mark summation of consecutive points.
The curvature P of the S3 mean camberiWith consecutive points PjThe vector of compositionProjection in surface normal vector
δijSize indicate.
The projection δijIt is as follows:
And
Wherein,For normal vector, rv、ruSurface parameter equation r (u, v) is respectively indicated to v, u derivation.
The curvature meets following condition:
∑N gij=1,∑NIt indicates and point PiThe foot mark summation of consecutive points.
In the S4, the iteration initial value of nonlinear equation is sought using triangulation method, determines the coordinate of plane grid intersection point,
It is specific as follows:
The length that expansion each quadrilateral mesh of plane is determined according to the curvature of curved surface, determines its geometric properties;
Quadrangular mesh partition is found out another at triangle by known Atria edge lengths and two apex coordinates
A apex coordinate finds out the initial value Q of Nonlinear System of Equationsi(xi, yi)。
The length that expansion each quadrilateral mesh of plane is determined according to the curvature of curved surface, determines its geometric properties, has
Body are as follows:
Since any of center of surface, reselection and its adjacent two o'clock constitute a triangle Δ P1P2P3, according to
Curved surface corresponds to a triangle Δ Q of plane in the curvature situation of the point1Q2Q3, wherein it is knownIt is corresponded in plane, then The geometric properties of triangle in plane are determined.
The parametric equation of curved surface is first to be fitted again interpolation by the discrete point to curved surface to obtain.
The curved surface that quadrilateral mesh is spliced, quadrilateral mesh setting are uniform.
Beneficial effects of the present invention:
(1) present invention, will be bent to keep the minimum principle of distance change in the neighborhood of Doubly curved surfaces front and back between points
The problem of the problem of face is unfolded is converted to a solution Nonlinear System of Equations, is apparent from the process of certainly problem.
(2) present invention adaptively determines weight factor and expansion using the curved surface the second form in differential geometric theory
The corresponding relationship of front and back side length of element.
(3) present invention is also asked suitable for three-dimension curved surface object in Image Acquisition and the figure planarization preprocessing process
Topic.
Embodiment
As shown in Figure 1, a kind of three-dimension curved surface approximate expansion includes the following steps: at the adaptive approach of plane
S1 curved surface meshing:
The parametric equation r (u, v) of curved surface=(x (u, v), y (u, v), z (u, v)), enables u=constant u0, obtain on curved surface
One curve r (u0, v), enable v=constant v0, obtain curve r (u, a v on curved surface0), wherein the intersection point of two curves is sat
Mark is r (u0, v0), it is smaller and uniformly for principle with grid, change u, the value of v obtains the song being spliced by quadrilateral mesh
Face obtains the coordinate of grid intersection point, with set It indicates.
The parametric equation of curved surface is to obtain the parameter of curved surface by being first fitted, then interpolation to some discrete points on curved surface
Method.
As shown in Fig. 2, when u is constant, available longitudinal curve, when v is constant, an available transverse direction
Curve, two curves must have an intersection point, and coordinate is r (u0, v0).If enabling u=u1, u2, u3 ... according to certain rule, v is enabled
=v1, v2, v3 ... must then have intersection point r (u1, v1)、r(u1, v2)、r(u1, v3)、r(u2, v1)、r(u2, v2)、r(u2, v3)、r
(u3, v1)、r(u3, v2)、r(u3, v3)…….By the value of the fixed u of value sequence of u, then the value of v is traversed, when having traversed u
Value the grid intersection point on curved surface then can be obtained.Such as fixed u=u1, value v1, v2, v3, v4 ... of v are then traversed,
R (u then can be obtained1, v1)、r(u1, v2)、r(u1, v3)、r(u1, v4) ..., then fixed u=u2, then traverse v value v1,
R (u then can be obtained in v2, v3, v4 ...2, v1)、r(u2, v2)、r(u2, v3)、r(u2, v4) ..., the coordinate of these intersection points is had
Sequence it is stored in setIn.
S2 mathematicization curved surface transforms into the process of plane: default curved surface is transformed into plane, corresponding quadrilateral mesh in plane
Putting coordinate isTo keep the topological structure before and after Doubly curved surfaces as far as possible, P is enablediWith consecutive points Pj
The vector of composition isAndEnable QiWith consecutive points QjThe vector of composition isAndThen
The process, which can be attributed to, makes Nonlinear System of EquationsThere is minimum value.
As shown in figure 3, plane is divided into several quadrilateral mesh, and mesh point coordinate is it is known that ∑NIndicate to point
PiThe foot mark summation of adjacent point.For example, the value of N is 2,7,6 as i=1, as i=8, the value of N is 2,7,11,
12、13、9、4、3。
It is assumed that curved surface is transformed into plane, the coordinate for corresponding to mesh point is Qi(xi, yi)。
Keep Nonlinear System of Equations value minimum, then respectively to xi、yiDerivation obtains:
P can be usedij 2Instead of Qij 2Simplify and calculate, above formula becomes
The solution of Nonlinear System of Equations is converted into solve the plane coordinates Q for setting up above formulai(xi, yi)。
S3 determines weight factor g according to the curvature of curved surfaceij, second fundamental form of a surface shows the curvature of curved surface.
Weight factor g is determined according to the curvature of curved surfaceij, curvature is bigger, weight factor gijSmaller, curvature is smaller, weight factor gijMore
Greatly;I and j indicates the serial number of intersection point.
As shown in figure 5, the curvature of curved surface can use PiWith consecutive points PjThe vector of compositionThrowing in surface normal vector
Shadow δijSize indicate.ΔijIt is bigger, show that curved surface is bigger in the bending of this point, δijIt is smaller, show curved surface in the bending of this point
It is smaller.
Andrv、ruSurface parameter equation r (u, v) is respectively indicated to v, u derivation.It will
Point PiCoordinate substitutes intoCurved surface then can be obtained in point PiNormal vector
Wherein, weight factor meets two conditions:
S4 seeks the iteration initial value of nonlinear equation using triangulation method, determines the coordinate of plane grid intersection point.
As shown in fig. 6, reselection and its adjacent two o'clock constitute a triangle Δ since any of center of surface
P1P2P3, a triangle Δ Q of plane is corresponded in the curvature situation of the point according to curved surface1Q2Q3.It is known thatIt is corresponded in plane, thenIn this way, the geometric properties of the triangle in plane are determined.
It according to above-mentioned steps, is started to spread out from the center of curved surface, for other some coordinate Q of plane trianglei(xi,
yi) solution, can be according to the following steps:
As shown in Figure 7, it is known that two o'clock T1(x1, y1)、T2(x2, y2) coordinate and they arrive another point T (x, y) distance d1、
d2, for the coordinate of point T, can solve using the following method.
Its unit vector is
Wherein
IfIt isObtained vector after rotating counterclockwise 90 degree, then
VectorAboutWithIt is decomposed:
Wherein, α is indicatedIt arrivesCorner,
Simultaneously
So
According to the cosine law it is found that
Then
There are two values by the sin α acquired herein, cast out negative value, retain positive value.
The present invention during three-dimension curved surface is unfolded, be unfolded front and back mesh point and its neighborhood mesh point between away from
The minimum principle of deviation carries out gridding to curved surface using surface parameter equation, and the mathematical expression that abstract curved surface transforms into plane is public
Formula adaptively determines the grid before and after weight factor and Doubly curved surfaces with the curved surface second fundamental form in differential geometric theory
The corresponding relationship of distance between point, the calculation method for solving iteration initial value is determined by triangulation method, to protect to the greatest extent
Hold the topological structure of curved surface.The present invention solves figure of the three-dimension curved surface object in Image Acquisition and preprocessing process and planarizes
Problem, the processes such as appearance detection and analysis especially suitable for three-dimension curved surface object.
The above embodiment is a preferred embodiment of the present invention, but embodiments of the present invention are not by the embodiment
Limitation, other any changes, modifications, substitutions, combinations, simplifications made without departing from the spirit and principles of the present invention,
It should be equivalent substitute mode, be included within the scope of the present invention.