CN108804391A - A kind of building method and system of interpolation curve or curved surface based on B-spline - Google Patents
A kind of building method and system of interpolation curve or curved surface based on B-spline Download PDFInfo
- Publication number
- CN108804391A CN108804391A CN201810390030.6A CN201810390030A CN108804391A CN 108804391 A CN108804391 A CN 108804391A CN 201810390030 A CN201810390030 A CN 201810390030A CN 108804391 A CN108804391 A CN 108804391A
- Authority
- CN
- China
- Prior art keywords
- curve
- interpolation
- path
- spline
- module
- Prior art date
- Legal status (The legal status 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 status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F17/00—Digital computing or data processing equipment or methods, specially adapted for specific functions
- G06F17/10—Complex mathematical operations
- G06F17/16—Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
Abstract
The invention belongs to geometric modeling technical field, the building method and system of a kind of interpolation curve based on B-spline or curved surface are disclosed, including:Function scheduling module, flexible translation module, curve generation module, central processing module, curve smoothing module, curve fitting module, data memory module, display module.The present invention carries out smooth operation by curve smoothing module to the curve in image, unsmoothed curve section in image effectively can be become smooth by it, and the curve after smooth operation there is no defect relative to primitive curve, deviateing with actual curve will not be very big, and can regulate and control the degree size of curve smoothing by oneself adjustment gap size;The present invention can realize mapping reconstruction of the slewing parts along its axis of rotation direction by curve fitting module simultaneously, help to simplify data handling procedure, reduce the consumption of computer resource.
Description
Technical field
The invention belongs to geometric modeling technical field more particularly to a kind of structures of interpolation curve or curved surface based on B-spline
Make method and system.
Background technology
Currently, the prior art commonly used in the trade is such:
Spline curve (SplineCurves) refers to giving one group of control point and obtaining a curve, the general shape of curve
It is controlled by these points, generally can be divided into interpolating spline and approaches two kinds of batten, interpolating spline is drawn commonly used in digitlization
Or the design of animation, approach the surface that batten is generally used to construction object.Spline curve is by a series of the smooth of set points
Curve.Initially, spline curve is all obtained by means of physics batten, and mold loftsman is flexible pin chips (or organic glass
Glass item), with weight be fixed on curve should by given data point at, batten does curve that natural torsion is drawn out just
It is spline curve.Spline curve is not only by each orderly data point, and single order at each data point and second dervative are continuous,
Namely the curve has the characteristics that continuous, Curvature varying is uniform.However, the interpolation curve glossy effect of existing batten is poor, with
Actual curve deviates big;It only uses the method for free form surface to be fitted simultaneously for characteristic surface, consumes a large amount of computer resource.
Interpolant spline curve/curved surface has many building methods, occupies an important position in geometric modeling.Current existing skill
Art has carried out research and to the interpolation sample of trigonometric polynomial to rational cubic spline and their applications in shape control
Item is studied, some useful results are achieved.
Based on counter-example path abstract refinement (Counterexample-Guided Abstraction Refinement,
CEGAR) process of technology is as follows:A model and property are given, an abstract model is generated by abstract method first.It takes out
The behavior for including as model may be more than archetype, and still, the structure of abstract model and description are all simpler than archetype,
So can be with relieved state Space Explosion problem.Whether then calling model detector, detection formula are effective in abstract model.
If it is valid, program determination;Otherwise, counter-example path can be provided, (reconstruction) process is then reconstructed, that is, exists
In archetype, if being successfully found a paths corresponds to counter-example path, EP (end of program);Otherwise, counter-example path is falseness
Counter-example path, next iterative process start, and regenerate abstract model, are verified.This process is repeated, it is effective until returning
Either invalid or State space explosion causes program stopped.It is a kind of semiology analysis and specifically hold that dynamic symbol, which executes technology,
The means of testing that row is combined.Semiology analysis refer under the premise of not executing program, with the value of value of symbol representation program variable,
Then simulation program executes to carry out correlation analysis.First, to code construction controlling stream graph (Control Flow to be analyzed
Graph, CFG), it is the abstract data structure for indicating a program process inside compiler with digraph.From entrance on CFG
Node starts simulation and executes, and when encountering branch node, judges which branch is feasible using constraint solver, and according to setting in advance
The path scheduling strategy of meter, which is realized, analyzes the traversal in all paths of the process, finally exports the analysis knot in every executable path
Fruit.Dynamic symbol execution is while to start code simulation actuator as inputting using concrete numerical value, and from the branch of current path
All symbol constraints are collected in the predicate of sentence.Then according to a branch in strategy reversion constraint, construct one it is new can
Capable path constraint is used in combination constraint solver to solve a feasible new specific input, and then semiology analysis engine is to new
Input value carries out the analysis of a new round.The method newly inputted is generated by using this input iteration, it is theoretically all feasible
Path can be calculated and be analyzed one time.The main bottleneck that dynamic symbol executes technology is path explosion problem, i.e., with journey
Xu Zhong branches number increases, and path exponentially increases.Interpolation is to alleviate the effective ways of path explosion problem, mainly a kind of
The thought for searching for beta pruning gives row vertex ticks interpolation by using infeasible path, interpolation refer to will not centainly reach it is labeled
For the constraint of error row.For branch node, if each branch of the node was explored, then in the vertex ticks
Interpolation be full interpolation, be otherwise half interpolation.In dynamic symbol execution, if the path constraint from start node to present node
Meet the full interpolation of present node, then the path can be merged, i.e., be not explored, to which path explosion problem be effectively relieved.
In conclusion problem of the existing technology is:
The interpolation curve glossy effect of existing batten is poor, deviates with actual curve big;It is only used certainly simultaneously for characteristic surface
It is fitted by the method for curved surface, consumes a large amount of computer resource.
Current spline curve/curved surface not interpolation control vertex does not have interpolation function in other words, and generation is free song
Line/curved surface.
For large scale system, it is excessive that abstract model refines number when being verified, and the bottleneck of model inspection is shape
State is exploded.
Invention content
In view of the problems of the existing technology, the present invention provides a kind of interpolation curve based on B-spline or the structures of curved surface
Make method and system.
The invention is realized in this way a kind of construction system of interpolation curve or curved surface based on B-spline, including:
Function scheduling module is connect with flexible translation module, for choosing blending functions, makees to link each batten minizone
The straight line and the straight line of connection and corresponding two adjacent deBoor control vertexs of two endpoints, make on each batten minizone
The difference of point and the point on the straight line for two endpoints for linking each batten minizone in spline curve obtains incremental vector;
Flexible translation module, and function scheduling module, the connection of curve generation module, after by incremental vector by stretching
It moves on the straight line of two adjacent deBoor control vertexs of connection and has just obtained each batten minizone interpolation in deBoor controls top
The interpolation curve of point;
Curve generation module is connect with flexible translation module, central processing module, for for B-spline Curve, obtaining
To the blending functions expression of B é zier forms, the interpolation of construction is cubic Bézier curves curve in the curve of control vertex;
It stretches shift method for four B-spline curves of quadravalence also available delta, corresponding interpolation curve is generated, in blending functions
It is four B-spline multinomials of a quadravalence containing there are one free parameters;
The building method of interpolation curve includes:
In each section batten subinterval [ti,ti+1] on (i=0,1,2 ..., m-1), connection B-spline curves section d's (t)
Two endpoint d (ti) and d (ti+1) straightway be denoted as li(t), equation is:
li(t)=(1- Φi(t))d(ti)+Φi(t)d(ti+1),ti≤t≤ti+1;
And connect two adjacent de Boor points diAnd di+1Straightway be denoted as Li(t), equation is:
li(t)=(1- Φi(t))d(ti)+Φi(t)d(ti+1),ti≤t≤ti+1;
Li(t)=(1- Φi(t))di+Φi(t)di+1,ti≤t≤ti+1;
Make curved section d (t) and straightway li(t) in section [ti,ti+1] on difference vector:
δi(t)=d (t)-li(t),ti≤t≤ti+1;
Difference vector is flexible to get α δi(t), α > 0, are translated, its starting point is made to fall in straightwayOn corresponding points
Place to get:
dI(t)=Li(t)+αδi(t),ti≤t≤ti+1, i=0,1,2 ..., m-1;
Or it is written as:
dI(t)=[(1- Φi(t))di+Φi(t)di+1]+α[d(t)-(1-Φi(t))d(ti)-Φi(t)d(ti+1)];
ti≤t≤ti+1, i=0,1,2 ..., m-1;
Function phii(t) meet following condition:
Φi(t) in section [ti,ti+1] on have until n-2 ranks continuous derivative;
?:
Φi(t) in section [ti,ti+1] it is monotonic increasing function, to avoid straightway li(t) and Li(t) there is weight node;
The building method of four B-spline interpolation curves of quadravalence includes:
One expansion graduation of given section [a, b]:
t-6≤t-4≤t-2≤ a=t0< t1< ... < t2i< t2i+1< ... < t2m-1< t2m=b≤t2(m+1)≤t2(m+2)≤
t2(m+3);
And de Boor control vertex sequences:
d-1,d0,d1,d2,…,dm,dm+1;
On section [a, b] with:
{t-6,t-4,t-2,t0,t2,…,t2i,…,t2(m-1),t2m,t2(m+1),t2(m+2),t2(m+3)};
It is denoted as four B-spline curves of quadravalence of batten node:
Wherein B-spline basic function Ωj(t) the batten node in support is:
t2(j-2),t2(j-1),t2j,t2(j+1),t2(j+2), j=-1,0,1 ..., m+1;
On the basis of r (t), four B-spline interpolation curve r of a quadravalence are constructedI(t) so that it passes through all data points
Arrange { dk, that is, meet interpolation condition:
rI(t2k)=dk, k=0,1,2 ..., m;
Junction curve section r (t) two-end-point r (t2i) and r (t2i+2) straightway be denoted as:
Connect two adjacent de Boor points diAnd di+1Straightway be denoted as:
Blending functions ψi(t) expression formula is:
Wherein ei0It is free parameter,K=0,1,2:
Central processing module, with curve generation module, curve smoothing module, curve fitting module, data memory module, aobvious
Show that module connects, for dispatching modules normal work;The control method of central processing module includes:
Step 1 generates controlling stream graph CFG according to program to be verified, and 3 attributes are added to the node in CFG:R is inserted
Value, S interpolation and E interpolation, R interpolation are the reachable constraints of node, judge the accessibility of a state;S interpolation and E interpolation pair
Path carries out stipulations, the verification of faster procedure;To the side addition attribute W of CFG;The W values of a line indicate the knot being directed toward with the side
Point is in the subgraph of root node, and there are no the numbers for the branch being traversed;
Step 2 generates according to the CFG of generation and is abstracted reachability graph ARG, if generating a new state along a paths
S illustrates that state s is reachable, the state s of continuing on traverses the path if the corresponding R interpolation of s is satisfied;Otherwise, state s can not
It reaches, then the path terminates, and traverses other paths;For a reachable state s, if the corresponding E interpolation of state s is by the path
Corresponding path formula contains, and illustrates that along the state, there are the path of an arrival dbjective state, program is dangerous;If shape
The corresponding S interpolation of state s is contained, and illustrates that by all paths of starting point of state be all safe, is needed not be along state s and is explored
Program;If state s is reachable, and E interpolation and S interpolation are not contained, then continue on state s and traverse the path;
Step 3 finds a counter-example path during generating ARG, reaches dbjective state, then needs further to sentence
Whether disconnected counter-example path is false;It is not false counter-example, then read-me is unsafe;Otherwise, according to false counter-example, mould is refined
Type calculates separately and updates the R interpolation of corresponding states, S interpolation and E interpolation, and execution regenerates ARG, true until finding one
Counter-example path is not present in counter-example path;
Curve smoothing module, connect with central processing module, the smoothed curve for obtaining B-spline curves;
Curve fitting module is connect with central processing module, for utilizing RANSAC algorithm combination Plucker coordinate optimizings
Be fitted rotating shaft space equation, rely on axis of rotation direction and three-D profile point cloud is mapped into two dimensional surface, and according to square away from
From minimization method as measurement fitting B-spline generating curve;
Data memory module is connect with central processing module, for storing B-spline curves data;
Display module is connect with central processing module, for showing B-spline curves.
Further, interpolation is calculated in the step 3 and the specific steps of W attributes include:
1) during generating ARG, a counter-example path path is found:<s0,e0,s1,…,en-1,sn>;Utilize SMT
Solver judges that path is falseness;If path is true counter-example, program is dangerous, and verification terminates;If path is empty
False, then it executes 2);
2) R interpolation is calculated, for state si, 0<i<Path is divided into two parts by n:Pre and post;Pre subsequences are
<s0,…,si>, post subsequences are<si,…,sn>, calculate new R interpolation using Craig interpolation formulas, Craig (pre,
Post), s is updatedi[0] R interpolation, is formally expressed as:
R-Intp(si[0])=R-Intp (si[0])∪Craig(Pf(s0,..,si),Pf(si,…,sn));
Wherein, Pf (s0,…,si) indicate from s0To siThe corresponding path formula in path;
3) calculate S interpolation, find first the reachable ordered sequence Π of path=<s0,...,sm>, 0<m<N, and siState
It is reachable, si+1State is unreachable;For each state s of Πi, 0<I≤m judges that first element of S interpolation is full
Or half;The S interpolation of all successor nodes of si [0] is all full, then the S interpolation of si [0] is full, otherwise, si's [0]
S interpolation is half;Specific form is as follows:
For second element of S interpolation, it is denoted as Is(si[0]), in two kinds of situation, if i=m, Is(si[0]) it is
Side ei+1Path formula negate;If 0<i<M, Is(si[0]) Craig interpolation calculations are utilized, Craig (A, B) is denoted as;Wherein, A
It indicates from s0To siPath formula, B is side eiCorresponding formula and state si+1The conjunction expression that corresponding S interpolation negates;Specifically
Form it is as follows:
Wherein, A=Pf(s0,…,si), B=Pf(si,ei,si+1)∧!(Is(si+1[0]);From smState is counted with starting inverted order
The interpolation for calculating each state, until the S interpolation of original state or a certain state is half;
4) calculate E interpolation, find the maximum effectively suffix array Π of path=<si,…,sn>, 0 < i≤n;From siState
Start, using Craig interpolation, calculates to inverted order corresponding E interpolation, be denoted as Craig (A, B);For si, A is from siTo snRoad
Diameter formula and snE interpolation conjunction expression, B is from s0To siPath formula;For state sj, 0 < j < i, A is from sjTo sj+1
Path formula and sj+1E interpolation conjunction expression, B is from s0To sjPath formula, specific form is as follows:
5) the W values for calculating side, according to counter-example path and updated S interpolation, to calculate the W values of corresponding sides, for one
Side e:(s, op, s'), if the S interpolation of s' is full, the W values of e are 0;If the S interpolation of s' is half, and s' is last
One reachable state, the W values of e are s'[0] the number -1 for going out side;If the S interpolation of s' is half, and s' is not the last one
Reachable state, the W values of e be it is two-part and:1) s'[0] go out in W values and be ⊥ while W values sum, 2) s'[0] go out
In W values be ⊥ while number;For side e:(s, op, s'), s':(l', c', p') specific form is as follows:
6) step 2 is jumped to, ARG is regenerated;
It is described 4) in calculate the specific steps of maximum effectively suffix array and include:
(1) for counter-example path path:< s0, e0, s1 ..., en-1, sn >, while being divided into two classes:Branch line set EbWith it is non-
Branch side Ea;
(2) the corresponding path formula of path are generated, wherein for e ∈ Eb, corresponding formula replaces with true;For e ∈
Ea, its corresponding formula is generated, new path formula P is generatedf;
(3) from side en-1Start reverse search, if0<i1<N is usedCorresponding formula replaces corresponding in Pf
The true of position obtains new path formula Pf, judge P with SMT solversfWhether can meet;If can meet, continue to search
A line under rope0<i2<i1, willCorresponding formula replaces PfThe true of middle corresponding position obtains path formula Pf, use
SMT solvers judge PfWhether can meet, so recycle, until with sideFormula replace true after, solved with SMT
Device judges PfIt can not meet, then maximum effectively suffix array is
It includes following that another object of the present invention, which is to provide a kind of interpolation curve based on B-spline or the building method of curved surface,
Step:
Step 1 chooses blending functions by function scheduling module, makees the straight of two endpoints for linking each batten minizone
The straight line of line and connection and corresponding two adjacent deBoor control vertexs, makees in the spline curve on each batten minizone
The difference of point and the point on the straight line for two endpoints for linking each batten minizone obtains incremental vector;
Step 2 is controlled incremental vector by moving to two adjacent deBoor of connection after stretching by flexible translation module
Each batten minizone interpolation has just been obtained on the straight line on vertex in the interpolation curve of deBoor control vertexs;Mould is generated by curve
Block obtains the interpolation curve of B-spline;
Step 3, central processing module dispatch curve Leveling Block obtain the smoothed curve of B-spline curves;
Step 4 is fitted rotating shaft sky by curve fitting module using RANSAC algorithm combination Plucker coordinate optimizings
Between equation, rely on axis of rotation direction and three-D profile point cloud mapped into two dimensional surface, and make according to square distance minimization method
It is fitted B-spline generating curve for measurement;
Step 5 stores B-spline curves data by data memory module;B-spline curves are shown by display module.
Further, the curve smoothing module smoothing method is as follows:
First, binaryzation is carried out to image, and by refinement, every curve present in image is become into single pixel song
Line obtains collection of curves C={ Vi| i=1,2 ..., n }, Vi={ ptij| j=1,2 ..., mi }, wherein n indicates single pixel curve
Quantity, ViIndicate i-th curve, ptijIndicate j-th point of i-th curve, miIndicate the quantity of i-th curve pixel;
Then, for every curve V in imageiIt is sampled from origin-to-destination into between-line spacing, gap size by setting in advance
It is fixed, by the point not on sample point from curve ViMiddle rejecting obtains new curve Vi;
Finally, the every new curve V upper step obtainedi, taken a little by cycle, choose adjacent three points every time as control
The point of the shape of one section of quadratic b-spline curve is made, three control points are denoted as p respectively1、p2And p3, obtain the smooth song of simple curve
Line.
Further, the curve fitting module approximating method is as follows:
First, estimated using RANSAC algorithm combination Plucker coordinate pair rotating shafts;
Then, it relies on axis of rotation direction and three-D profile point cloud is mapped into two dimensional surface, and according to squared-distance minimum
Change method is as measurement fitting B-spline generating curve to determine the generating curve of surface of revolution.
Further, it is described using RANSAC algorithm combination Plucker coordinate pairs rotating shafts carry out estimation include:
Establish the standard Plucker coordinates of straight line, wherein the direction vector of the straight line is vectorial for unit, and institute
Direction vector and the square vector for stating straight line are mutually orthogonal;
The constraints of Plucker coordinates is added, the constraints is the square of the direction vector and rotating shaft of rotating shaft
Vector is mutually orthogonal, is solved using method of Lagrange multipliers, introduces Lagrange multiplier, obtains object function;
Rotating shaft is estimated with obtained object function using RANSAC algorithm for estimating.
Another object of the present invention is to provide the construction sides of interpolation curve or curved surface based on B-spline described in a kind of realize
The computer program of method.
Another object of the present invention is to provide the construction sides of interpolation curve or curved surface based on B-spline described in a kind of realize
The information data processing terminal of method.
Another object of the present invention is to provide a kind of computer readable storage mediums, including instruction, when it is in computer
When upper operation so that computer executes the building method of the interpolation curve or curved surface based on B-spline.
Advantages of the present invention and good effect are:
The present invention carries out smooth operation by curve smoothing module to the curve in image, it can be effectively in image
Unsmoothed curve section become smooth, and the curve after smooth operation there is no defect relative to primitive curve, with
Actual curve deviates will not be very big, and can regulate and control the degree size of curve smoothing by oneself adjustment gap size;Together
When the present invention by curve fitting module using RANSAC algorithm combination Plucker coordinate optimizings fitting rotating shaft space equation,
It relies on axis of rotation direction and three-D profile point cloud is mapped into two dimensional surface, and is quasi- as measurement according to square distance minimization method
B-spline generating curve is closed, so as to realize mapping reconstruction of the slewing parts along its axis of rotation direction, helps to simplify data
Processing procedure reduces the consumption of computer resource.
Using the method for increment flexible translation and tensor product, the interpolation in rectangular domain is constructed in the double of control vertex grid
Cubic Bézier curves curved surface B and Spline Interpolating Surfaces and four B-spline interpolation curved surfaces of double quadravalences, the construction of interpolation curve/curved surface
Method is succinct, and geometric meaning is apparent, compatible with BURBS methods, meaningful to geometric modeling.The present invention proposes one newly
Geometric modeling method, this method solves the problems, such as interpolation control vertex, is of great significance for reverse-engineering.
The information that false counter-example path provides in model inspection is more fully utilized in the present invention, by calculating S interpolation
With E interpolation, the efficiency of detection is improved so that Model Detection Algorithm can be preferably applied for large-scale program;S interpolation can
With judge the subsequently all possible path sequence of a state whether be all it is safe, to avoid unnecessary exploration, greatly
The earth reduces the status number of ARG;E interpolation can apply to whether there is true counter-example path in rapidly determining program, accelerate
The verification of program, improves efficiency.
The present invention has cut node useless in CFG and side, the state space of traversal has been further reduced, on the side of CFG
Upper addition W attributes so that the efficiency of program verification is further promoted.It is searched by path when reducing abstract model verification
Accelerate verification efficiency to relieved state explosion issues in rope space.Two kinds of optimization operations are provided simultaneously so that verification process is more
Increase effect;It is mainly used in industry, military, agricultural, the Formal Verification of the software and hardware system correctness of the domain designs such as scientific research,
And various types of communication protocol safety, the Formal Verification of reliability.
Description of the drawings
Fig. 1 is the construction system structure diagram that the present invention implements the interpolation curve or curved surface based on B-spline provided.
Fig. 2 is the building method flow chart that the present invention implements the interpolation curve or curved surface based on B-spline provided.
In Fig. 1:1, function scheduling module;2, flexible translation module;3, curve generation module;4, central processing module;5,
Curve smoothing module;6, curve fitting module;7, data memory module;8, display module.
Specific implementation mode
In order to make the purpose , technical scheme and advantage of the present invention be clearer, with reference to embodiments, to the present invention
It is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not used to
Limit the present invention.
As shown in Figure 1, the construction system of interpolation curve or curved surface provided by the invention based on B-spline includes:Function tune
With module 1, flexible translation module 2, curve generation module 3, central processing module 4, curve smoothing module 5, curve fitting module
6, data memory module 7, display module 8.
Function scheduling module 1 is connect with flexible translation module 2, for choosing blending functions, makees to link each batten minizone
Two endpoints straight line and the straight line of connection and corresponding two adjacent deBoor control vertexs, make on each batten minizone
Spline curve on the difference of point and the point on the straight line for two endpoints for linking each batten minizone obtain incremental vector;
Flexible translation module 2, and function scheduling module 1, curve generation module 3 connect, for by incremental vector by stretching
It is moved to after contracting on the straight line of two adjacent deBoor control vertexs of connection and has just obtained each batten minizone interpolation in deBoor controls
The interpolation curve on vertex processed;
Curve generation module 3 is connect with flexible translation module 2, central processing module 4, for for cubic B-spline song
Line, obtains the expression of blending functions B é zier forms, and the interpolation of construction is cubic Bézier curves in the curve of control vertex
Curve;For the flexible shift method of four B-spline curves of quadravalence also available delta, corresponding interpolation curve is generated, is allocated
Free parameter there are one containing in function, is four B-spline multinomials of a quadravalence;
Central processing module 4 stores mould with curve generation module 3, curve smoothing module 5, curve fitting module 6, data
Block 7, display module 8 connect, for dispatching modules normal work;
Curve smoothing module 5 is connect with central processing module 4, the smoothed curve for obtaining B-spline curves;
Curve fitting module 6 is connect with central processing module 4, for excellent using RANSAC algorithm combination Plucker coordinates
Change fitting rotating shaft space equation, relies on axis of rotation direction and three-D profile point cloud is mapped into two dimensional surface, and foundation square
Distance minimization method is as measurement fitting B-spline generating curve;
Data memory module 7 is connect with central processing module 4, for storing B-spline curves data;
Display module 8 is connect with central processing module 4, for showing B-spline curves.
5 smoothing method of curve smoothing module provided by the invention is as follows:
First, binaryzation is carried out to image, and by refinement, every curve present in image is become into single pixel song
Line obtains collection of curves C={ Vi| i=1,2 ..., n }, Vi={ ptij| j=1,2 ..., mi }, wherein n indicates single pixel curve
Quantity, ViIndicate i-th curve, ptijIndicate j-th point of i-th curve, miIndicate the quantity of i-th curve pixel;
Then, for every curve V in imageiIt is sampled from origin-to-destination into between-line spacing, gap size by setting in advance
It is fixed, by the point not on sample point from curve ViMiddle rejecting obtains new curve Vi;
Finally, the every new curve V upper step obtainedi, taken a little by cycle, choose adjacent three points every time as control
The point of the shape of one section of quadratic b-spline curve is made, three control points are denoted as p respectively1、p2And p3, obtain the smooth song of simple curve
Line.
6 approximating method of curve fitting module provided by the invention is as follows:
First, estimated using RANSAC algorithm combination Plucker coordinate pair rotating shafts;
Then, it relies on axis of rotation direction and three-D profile point cloud is mapped into two dimensional surface, and according to squared-distance minimum
Change method is as measurement fitting B-spline generating curve to determine the generating curve of surface of revolution.
It is provided by the invention using RANSAC algorithm combination Plucker coordinate pairs rotating shafts carry out estimation include:
Establish the standard Plucker coordinates of straight line, wherein the direction vector of the straight line is vectorial for unit, and institute
Direction vector and the square vector for stating straight line are mutually orthogonal;
The constraints of Plucker coordinates is added, the constraints is the square of the direction vector and rotating shaft of rotating shaft
Vector is mutually orthogonal, is solved using method of Lagrange multipliers, introduces Lagrange multiplier, obtains object function;
Rotating shaft is estimated with obtained object function using RANSAC algorithm for estimating.
As shown in Fig. 2, the building method of a kind of interpolation curve or curved surface based on B-spline provided by the invention includes following
Step:
S101 chooses blending functions by function scheduling module, makees the straight line for linking two endpoints of each batten minizone
And the straight line of connection and corresponding two adjacent deBoor control vertexs, make the point in the spline curve on each batten minizone
Incremental vector is obtained with the difference of the point on the straight line for two endpoints for linking each batten minizone;
S102, by flexible translation module by incremental vector by moving to two adjacent deBoor controls top of connection after stretching
Each batten minizone interpolation has just been obtained in the interpolation curve of deBoor control vertexs on the straight line of point;Pass through curve generation module
Obtain the interpolation curve of B-spline;
S103, central processing module dispatch curve Leveling Block obtain the smoothed curve of B-spline curves;
S104 utilizes RANSAC algorithm combination Plucker coordinate optimizings fitting revolution shaft space by curve fitting module
Equation relies on axis of rotation direction and three-D profile point cloud is mapped to two dimensional surface, and according to square distance minimization method conduct
Measurement fitting B-spline generating curve;
S105 stores B-spline curves data by data memory module;B-spline curves are shown by display module.
With reference to concrete analysis, the invention will be further described.
The building method of interpolation curve includes:
In each section batten subinterval [ti,ti+1] on (i=0,1,2 ..., m-1), connection B-spline curves section d's (t)
Two endpoint d (ti) and d (ti+1) straightway be denoted as li(t), equation is:
li(t)=(1- Φi(t))d(ti)+Φi(t)d(ti+1),ti≤t≤ti+1;
And connect two adjacent de Boor points diAnd di+1Straightway be denoted as Li(t), equation is:
li(t)=(1- Φi(t))d(ti)+Φi(t)d(ti+1),ti≤t≤ti+1;
Li(t)=(1- Φi(t))di+Φi(t)di+1,ti≤t≤ti+1;
Make curved section d (t) and straightway li(t) in section [ti,ti+1] on difference vector:
δi(t)=d (t)-li(t),ti≤t≤ti+1;
Difference vector is flexible to get α δi(t), α > 0, are translated, its starting point is made to fall in straightwayOn corresponding points
Place to get:
dI(t)=Li(t)+αδi(t),ti≤t≤ti+1, i=0,1,2 ..., m-1;
Or it is written as:
dI(t)=[(1- Φi(t))di+Φi(t)di+1]+α[d(t)-(1-Φi(t))d(ti)-Φi(t)d(ti+1)];
ti≤t≤ti+1, i=0,1,2 ..., m-1;
Function phii(t) meet following condition:
Φi(t) in section [ti,ti+1] on have until n-2 ranks continuous derivative;
?:
Φi(t) in section [ti,ti+1] it is monotonic increasing function, to avoid straightway li(t) and Li(t) there is weight node;
The building method of four B-spline interpolation curves of quadravalence includes:
One expansion graduation of given section [a, b]:
t-6≤t-4≤t-2≤ a=t0< t1< ... < t2i< t2i+1< ... < t2m-1< t2m=b≤t2(m+1)≤t2(m+2)≤
t2(m+3);
And de Boor control vertex sequences:
d-1,d0,d1,d2,…,dm,dm+1;
On section [a, b] with:
{t-6,t-4,t-2,t0,t2,…,t2i,…,t2(m-1),t2m,t2(m+1),t2(m+2),t2(m+3)};
It is denoted as four B-spline curves of quadravalence of batten node:
Wherein B-spline basic function Ωj(t) the batten node in support is:
t2(j-2),t2(j-1),t2j,t2(j+1),t2(j+2), j=-1,0,1 ..., m+1;
On the basis of r (t), four B-spline interpolation curve r of a quadravalence are constructedI(t) so that it passes through all data points
Arrange { dk, that is, meet interpolation condition:
rI(t2k)=dk, k=0,1,2 ..., m;
Junction curve section r (t) two-end-point r (t2i) and r (t2i+2) straightway be denoted as:
Connect two adjacent de Boor points diAnd di+1Straightway be denoted as:
Blending functions ψi(t) expression formula is:
Wherein ei0It is free parameter,K=0,1,2:
Central processing module, with curve generation module, curve smoothing module, curve fitting module, data memory module, aobvious
Show that module connects, for dispatching modules normal work;The control method of central processing module includes:
Step 1 generates controlling stream graph CFG according to program to be verified, and 3 attributes are added to the node in CFG:R is inserted
Value, S interpolation and E interpolation, R interpolation are the reachable constraints of node, judge the accessibility of a state;S interpolation and E interpolation pair
Path carries out stipulations, the verification of faster procedure;To the side addition attribute W of CFG;The W values of a line indicate the knot being directed toward with the side
Point is in the subgraph of root node, and there are no the numbers for the branch being traversed;
Step 2 generates according to the CFG of generation and is abstracted reachability graph ARG, if generating a new state along a paths
S illustrates that state s is reachable, the state s of continuing on traverses the path if the corresponding R interpolation of s is satisfied;Otherwise, state s can not
It reaches, then the path terminates, and traverses other paths;For a reachable state s, if the corresponding E interpolation of state s is by the path
Corresponding path formula contains, and illustrates that along the state, there are the path of an arrival dbjective state, program is dangerous;If shape
The corresponding S interpolation of state s is contained, and illustrates that by all paths of starting point of state be all safe, is needed not be along state s and is explored
Program;If state s is reachable, and E interpolation and S interpolation are not contained, then continue on state s and traverse the path;
Step 3 finds a counter-example path during generating ARG, reaches dbjective state, then needs further to sentence
Whether disconnected counter-example path is false;It is not false counter-example, then read-me is unsafe;Otherwise, according to false counter-example, mould is refined
Type calculates separately and updates the R interpolation of corresponding states, S interpolation and E interpolation, and execution regenerates ARG, true until finding one
Counter-example path is not present in counter-example path;
Curve smoothing module, connect with central processing module, the smoothed curve for obtaining B-spline curves;
Curve fitting module is connect with central processing module, for utilizing RANSAC algorithm combination Plucker coordinate optimizings
Be fitted rotating shaft space equation, rely on axis of rotation direction and three-D profile point cloud is mapped into two dimensional surface, and according to square away from
From minimization method as measurement fitting B-spline generating curve;
Data memory module is connect with central processing module, for storing B-spline curves data;
Display module is connect with central processing module, for showing B-spline curves.
Interpolation is calculated in the step 3 and the specific steps of W attributes include:
1) during generating ARG, a counter-example path path is found:<s0,e0,s1,…,en-1,sn>;Utilize SMT
Solver judges that path is falseness;If path is true counter-example, program is dangerous, and verification terminates;If path is empty
False, then it executes 2);
2) R interpolation is calculated, for state si, 0<i<Path is divided into two parts by n:Pre and post;Pre subsequences are
<s0,…,si>, post subsequences are<si,…,sn>, calculate new R interpolation using Craig interpolation formulas, Craig (pre,
Post), s is updatedi[0] R interpolation, is formally expressed as:
R-Intp(si[0])=R-Intp (si[0])∪Craig(Pf(s0,..,si),Pf(si,…,sn));
Wherein, Pf (s0,…,si) indicate from s0To siThe corresponding path formula in path;
3) calculate S interpolation, find first the reachable ordered sequence Π of path=<s0,...,sm>, 0<m<N, and siState
It is reachable, si+1State is unreachable;For each state s of Πi, 0<I≤m judges that first element of S interpolation is full
Or half;The S interpolation of all successor nodes of si [0] is all full, then the S interpolation of si [0] is full, otherwise, si's [0]
S interpolation is half;Specific form is as follows:
For second element of S interpolation, it is denoted as Is(si[0]), in two kinds of situation, if i=m, Is(si[0]) it is
Side ei+1Path formula negate;If 0<i<M, Is(si[0]) Craig interpolation calculations are utilized, Craig (A, B) is denoted as;Wherein, A
It indicates from s0To siPath formula, B is side eiCorresponding formula and state si+1The conjunction expression that corresponding S interpolation negates;Specifically
Form it is as follows:
Wherein, A=Pf(s0,…,si), B=Pf(si,ei,si+1)∧!(Is(si+1[0]);From smState is counted with starting inverted order
The interpolation for calculating each state, until the S interpolation of original state or a certain state is half;
4) calculate E interpolation, find the maximum effectively suffix array Π of path=<si,…,sn>, 0 < i≤n;From siState
Start, using Craig interpolation, calculates to inverted order corresponding E interpolation, be denoted as Craig (A, B);For si, A is from siTo snRoad
Diameter formula and snE interpolation conjunction expression, B is from s0To siPath formula;For state sj, 0 < j < i, A is from sjTo sj+1
Path formula and sj+1E interpolation conjunction expression, B is from s0To sjPath formula, specific form is as follows:
5) the W values for calculating side, according to counter-example path and updated S interpolation, to calculate the W values of corresponding sides, for one
Side e:(s, op, s'), if the S interpolation of s' is full, the W values of e are 0;If the S interpolation of s' is half, and s' is last
One reachable state, the W values of e are s'[0] the number -1 for going out side;If the S interpolation of s' is half, and s' is not the last one
Reachable state, the W values of e be it is two-part and:1) s'[0] go out in W values and be ⊥ while W values sum, 2) s'[0] go out
In W values be ⊥ while number;For side e:(s, op, s'), s':(l', c', p') specific form is as follows:
6) step 2 is jumped to, ARG is regenerated;
It is described 4) in calculate the specific steps of maximum effectively suffix array and include:
(1) for counter-example path path:< s0, e0, s1 ..., en-1, sn >, while being divided into two classes:Branch line set EbWith it is non-
Branch side Ea;
(2) the corresponding path formula of path are generated, wherein for e ∈ Eb, corresponding formula replaces with true;For e ∈
Ea, its corresponding formula is generated, new path formula P is generatedf;
(3) from side en-1Start reverse search, if0<i1<N is usedCorresponding formula replaces corresponding in Pf
The true of position obtains new path formula Pf, judge P with SMT solversfWhether can meet;If can meet, continue to search
A line under rope0<i2<i1, willCorresponding formula replaces PfThe true of middle corresponding position obtains path formula Pf, use
SMT solvers judge PfWhether can meet, so recycle, until with sideFormula replace true after, solved with SMT
Device judges PfIt can not meet, then maximum effectively suffix array is
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or its arbitrary combination real
It is existing.When using entirely or partly realizing in the form of a computer program product, the computer program product include one or
Multiple computer instructions.When loading on computers or executing the computer program instructions, entirely or partly generate according to
Flow described in the embodiment of the present invention or function.The computer can be all-purpose computer, special purpose computer, computer network
Network or other programmable devices.The computer instruction can store in a computer-readable storage medium, or from one
Computer readable storage medium is transmitted to another computer readable storage medium, for example, the computer instruction can be from one
A web-site, computer, server or data center pass through wired (such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)
Or wireless (such as infrared, wireless, microwave etc.) mode is carried out to another web-site, computer, server or data center
Transmission).The computer read/write memory medium can be that any usable medium that computer can access either includes one
The data storage devices such as a or multiple usable mediums integrated server, data center.The usable medium can be magnetic Jie
Matter, (for example, floppy disk, hard disk, tape), optical medium (for example, DVD) or semiconductor medium (such as solid state disk Solid
State Disk (SSD)) etc..
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all essences in the present invention
All any modification, equivalent and improvement etc., should all be included in the protection scope of the present invention made by within refreshing and principle.
Claims (9)
1. a kind of construction system of interpolation curve or curved surface based on B-spline, which is characterized in that the interpolation based on B-spline
The construction system of curve or curved surface includes:
Function scheduling module is connect with flexible translation module, for choosing blending functions, makees two that link each batten minizone
The straight line of the straight line of endpoint and connection and corresponding two adjacent deBoor control vertexs, makees the batten on each batten minizone
The difference of point and the point on the straight line for two endpoints for linking each batten minizone on curve obtains incremental vector;
Flexible translation module, and function scheduling module, the connection of curve generation module, for by incremental vector by translating after flexible
Each batten minizone interpolation has just been obtained in deBoor control vertexs on to the straight line of two adjacent deBoor control vertexs of connection
Interpolation curve;
Curve generation module is connect with flexible translation module, central processing module, for for B-spline Curve, being adjusted
With the function expression of B é zier forms, the interpolation of construction is cubic Bézier curves curve in the curve of control vertex;For
Four B-spline curves of quadravalence also available delta stretch shift method, generate corresponding interpolation curve, contain in blending functions
One free parameter is four B-spline multinomials of a quadravalence;
The building method of interpolation curve includes:
In each section batten subinterval [ti,ti+1] on (i=0,1,2 ..., m-1), two of connection B-spline curves section d (t)
Endpoint d (ti) and d (ti+1) straightway be denoted as li(t), equation is:
li(t)=(1- Φi(t))d(ti)+Φi(t)d(ti+1),ti≤t≤ti+1;
And connect two adjacent de Boor points diAnd di+1Straightway be denoted as Li(t), equation is:
li(t)=(1- Φi(t))d(ti)+Φi(t)d(ti+1),ti≤t≤ti+1;
Li(t)=(1- Φi(t))di+Φi(t)di+1,ti≤t≤ti+1;
Make curved section d (t) and straightway li(t) in section [ti,ti+1] on difference vector:
δi(t)=d (t)-li(t),ti≤t≤ti+1;
Difference vector is flexible to get α δi(t), α > 0, are translated, its starting point is made to fall in straightwayOn corresponding point position,
To obtain the final product:
dI(t)=Li(t)+αδi(t),ti≤t≤ti+1, i=0,1,2 ..., m-1;
Or it is written as:
dI(t)=[(1- Φi(t))di+Φi(t)di+1]+α[d(t)-(1-Φi(t))d(ti)-Φi(t)d(ti+1)];
ti≤t≤ti+1, i=0,1,2 ..., m-1;
Function phii(t) meet following condition:
Φi(t) in section [ti,ti+1] on have until n-2 ranks continuous derivative;
Φi(ti)=0, Φi(ti+1)=1,
?:
Φi(t) in section [ti,ti+1] it is monotonic increasing function, to avoid straightway li(t) and Li(t) there is weight node;
The building method of four B-spline interpolation curves of quadravalence includes:
One expansion graduation of given section [a, b]:
t-6≤t-4≤t-2≤ a=t0< t1< ... < t2i< t2i+1< ... < t2m-1< t2m=b≤t2(m+1)≤t2(m+2)≤
t2(m+3);
And de Boor control vertex sequences:
d-1,d0,d1,d2,…,dm,dm+1;
On section [a, b] with:
{t-6,t-4,t-2,t0,t2,…,t2i,…,t2(m-1),t2m,t2(m+1),t2(m+2),t2(m+3)};
It is denoted as four B-spline curves of quadravalence of batten node:
Wherein B-spline basic function Ωj(t) the batten node in support is:
t2(j-2),t2(j-1),t2j,t2(j+1),t2(j+2), j=-1,0,1 ..., m+1;
On the basis of r (t), four B-spline interpolation curve r of a quadravalence are constructedI(t) so that it passes through all offset point ranges
{dk, that is, meet interpolation condition:
rI(t2k)=dk, k=0,1,2 ..., m;
Junction curve section r (t) two-end-point r (t2i) and r (t2i+2) straightway be denoted as:
Connect two adjacent de Boor points diAnd di+1Straightway be denoted as:
Blending functions ψi(t) expression formula is:
Wherein ei0It is free parameter,
Central processing module, with curve generation module, curve smoothing module, curve fitting module, data memory module, display mould
Block connects, for dispatching modules normal work;The control method of central processing module includes:
Step 1 generates controlling stream graph CFG according to program to be verified, and 3 attributes are added to the node in CFG:R interpolation, S
Interpolation and E interpolation, R interpolation are the reachable constraints of node, judge the accessibility of a state;S interpolation and E interpolation are to path
Carry out stipulations, the verification of faster procedure;To the side addition attribute W of CFG;The W values of a line indicate that the node being directed toward with the side is
In the subgraph of root node, there are no the numbers for the branch being traversed;
Step 2 generates according to the CFG of generation and is abstracted reachability graph ARG, if generating a new state s along a paths, such as
The corresponding R interpolation of fruit s is satisfied, and illustrates that state s is reachable, the state s of continuing on traverses the path;Otherwise, state s is unreachable,
Then the path terminates, and traverses other paths;For a reachable state s, if the corresponding E interpolation of state s is by the path pair
The path formula answered contains, and illustrates that along the state, there are the path of an arrival dbjective state, program is dangerous;If state
The corresponding S interpolation of s is contained, and illustrates that by all paths of starting point of state be all safe, is needed not be along state s and is explored journey
Sequence;If state s is reachable, and E interpolation and S interpolation are not contained, then continue on state s and traverse the path;
Step 3 finds a counter-example path during generating ARG, reaches dbjective state, then needs further to judge anti-
Whether example path is false;It is not false counter-example, then read-me is unsafe;Otherwise, according to false counter-example, refined model,
The R interpolation of corresponding states, S interpolation and E interpolation are calculated separately and update, execution regenerates ARG, until finding a true counter-example
Counter-example path is not present in path;
Curve smoothing module, connect with central processing module, the smoothed curve for obtaining B-spline curves;
Curve fitting module is connect with central processing module, for being fitted using RANSAC algorithm combination Plucker coordinate optimizings
Rotating shaft space equation relies on axis of rotation direction and three-D profile point cloud is mapped to two dimensional surface, and most according to squared-distance
Smallization method is as measurement fitting B-spline generating curve;
Data memory module is connect with central processing module, for storing B-spline curves data;
Display module is connect with central processing module, for showing B-spline curves.
2. the construction system of the interpolation curve based on B-spline or curved surface as described in claim 1, which is characterized in that the step
Interpolation is calculated in three and the specific steps of W attributes include:
1) during generating ARG, a counter-example path path is found:<s0,e0,s1,…,en-1,sn>;Utilize SMT solvers
Judge that path is falseness;If path is true counter-example, program is dangerous, and verification terminates;If path is false,
It executes 2);
2) R interpolation is calculated, for state si, 0<i<Path is divided into two parts by n:Pre and post;Pre subsequences are<
s0,…,si>, post subsequences are<si,…,sn>, calculate new R interpolation using Craig interpolation formulas, Craig (pre,
Post), s is updatedi[0] R interpolation, is formally expressed as:
R-Intp(si[0])=R-Intp (si[0])∪Craig(Pf(s0,..,si),Pf(si,…,sn));
Wherein, Pf (s0,…,si) indicate from s0To siThe corresponding path formula in path;
3) calculate S interpolation, find first the reachable ordered sequence Π of path=<s0,...,sm>, 0<m<N, and siState can
It reaches, si+1State is unreachable;For each state s of Πi, 0<I≤m, judge first element of S interpolation be full also
It is half;The S interpolation of all successor nodes of si [0] is all full, then the S interpolation of si [0] is full, otherwise, the S of si [0]
Interpolation is half;Specific form is as follows:
For second element of S interpolation, it is denoted as Is(si[0]), in two kinds of situation, if i=m, Is(si[0]) it is side ei+1
Path formula negate;If 0<i<M, Is(si[0]) Craig interpolation calculations are utilized, Craig (A, B) is denoted as;Wherein, A is indicated
From s0To siPath formula, B is side eiCorresponding formula and state si+1The conjunction expression that corresponding S interpolation negates;Specific shape
Formula is as follows:
Wherein, A=Pf(s0,…,si), B=Pf(si,ei,si+1)∧!(Is(si+1[0]);From smState calculates often with starting inverted order
The interpolation of a state, until the S interpolation of original state or a certain state is half;
4) calculate E interpolation, find the maximum effectively suffix array Π of path=<si,…,sn>, 0 < i≤n;From siState starts,
Using Craig interpolation, corresponding E interpolation is calculated to inverted order, is denoted as Craig (A, B);For si, A is from siTo snPath it is public
Formula and snE interpolation conjunction expression, B is from s0To siPath formula;For state sj, 0 < j < i, A is from sjTo sj+1Road
Diameter formula and sj+1E interpolation conjunction expression, B is from s0To sjPath formula, specific form is as follows:
5) the W values for calculating side, according to counter-example path and updated S interpolation, to calculate the W values of corresponding sides, for a line e:
(s, op, s'), if the S interpolation of s' is full, the W values of e are 0;If the S interpolation of s' is half, and s' is the last one
Reachable state, the W values of e are s'[0] the number -1 for going out side;If the S interpolation of s' is half, and s' is not that the last one is reachable
State, the W values of e be it is two-part and:1) s'[0] go out in W values and be ⊥ while W values sum, 2) s'[0] go out in side
W values are the number on the side of ⊥;For side e:(s, op, s'), s':(l', c', p') specific form is as follows:
6) step 2 is jumped to, ARG is regenerated;
It is described 4) in calculate the specific steps of maximum effectively suffix array and include:
(1) for counter-example path path:< s0, e0, s1 ..., en-1, sn >, while being divided into two classes:Branch line set EbAnd non-branch
Side Ea;
(2) the corresponding path formula of path are generated, wherein for e ∈ Eb, corresponding formula replaces with true;For e ∈ Ea, raw
At its corresponding formula, new path formula P is generatedf;
(3) from side en-1Start reverse search, if0<i1<N is usedCorresponding formula replaces corresponding position in Pf
True obtains new path formula Pf, judge P with SMT solversfWhether can meet;If can meet, continue search for next
Side0<i2<i1, willCorresponding formula replaces PfThe true of middle corresponding position obtains path formula Pf, solved with SMT
Device judges PfWhether can meet, so recycle, until with sideFormula replace true after, judged with SMT solvers
PfIt can not meet, then maximum effectively suffix array is
3. a kind of interpolation based on B-spline of the construction system of interpolation curve based on B-spline as described in claim 1 or curved surface
The building method of curve or curved surface, which is characterized in that the building method of the interpolation curve or curved surface based on B-spline include with
Lower step:
Step 1 chooses blending functions by function scheduling module, make to link the straight line of two endpoints of each batten minizone with
And the straight line of connection and corresponding two adjacent deBoor control vertexs, make point in the spline curve on each batten minizone with
The difference for linking the point on the straight line of two endpoints of each batten minizone obtains incremental vector;
Step 2, by flexible translation module by incremental vector by moving to two adjacent deBoor control vertexs of connection after stretching
Straight line on just obtained each batten minizone interpolation in the interpolation curve of deBoor control vertexs;It is obtained by curve generation module
Take the interpolation curve of B-spline;
Step 3, central processing module dispatch curve Leveling Block obtain the smoothed curve of B-spline curves;
Step 4 utilizes RANSAC algorithm combination Plucker coordinate optimizings fitting revolution shaft space side by curve fitting module
Journey relies on axis of rotation direction and three-D profile point cloud is mapped to two dimensional surface, and according to square distance minimization method as degree
Amount fitting B-spline generating curve;
Step 5 stores B-spline curves data by data memory module;B-spline curves are shown by display module.
4. the building method of the interpolation curve based on B-spline or curved surface as claimed in claim 3, which is characterized in that the song
Line Leveling Block smoothing method is as follows:
First, binaryzation is carried out to image, and by refinement, every curve present in image is become into single pixel curve, is obtained
To collection of curves C={ Vi| i=1,2 ..., n }, Vi={ ptij| j=1,2 ..., mi }, wherein n indicates single pixel curve quantity,
ViIndicate i-th curve, ptijIndicate j-th point of i-th curve, miIndicate the quantity of i-th curve pixel;
Then, for every curve V in imageiIt is sampled from origin-to-destination into between-line spacing, gap size, will by presetting
Point not on sample point is from curve ViMiddle rejecting obtains new curve Vi;
Finally, the every new curve V upper step obtainedi, taken a little by cycle, choose adjacent three points every time as control one
The point of the shape of section quadratic b-spline curve, three control points are denoted as p respectively1、p2And p3, obtain the smoothed curve of simple curve.
5. the building method of the interpolation curve based on B-spline or curved surface as claimed in claim 3, which is characterized in that the song
Line fitting module approximating method is as follows:
First, estimated using RANSAC algorithm combination Plucker coordinate pair rotating shafts;
Then, it relies on axis of rotation direction and three-D profile point cloud is mapped into two dimensional surface, and according to square distance minimization method
As measurement fitting B-spline generating curve to determine the generating curve of surface of revolution.
6. the building method of the interpolation curve based on B-spline or curved surface as claimed in claim 5, which is characterized in that the profit
Carrying out estimation with RANSAC algorithm combination Plucker coordinate pairs rotating shafts includes:
Establish the standard Plucker coordinates of straight line, wherein the direction vector of the straight line is unit vector, and described straight
The direction vector and square vector of line are mutually orthogonal;
The constraints of Plucker coordinates is added, the constraints is the direction vector of rotating shaft and the square vector of rotating shaft
It is mutually orthogonal, it is solved using method of Lagrange multipliers, introduces Lagrange multiplier, obtain object function;
Rotating shaft is estimated with obtained object function using RANSAC algorithm for estimating.
7. a kind of meter for realizing the building method of interpolation curve or curved surface based on B-spline described in claim 3-6 any one
Calculation machine program.
8. a kind of letter for realizing the building method of interpolation curve or curved surface based on B-spline described in claim 3-6 any one
Cease data processing terminal.
9. a kind of computer readable storage medium, including instruction, when run on a computer so that computer is executed as weighed
Profit requires the building method of interpolation curve or curved surface described in 3-6 any one based on B-spline.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810390030.6A CN108804391A (en) | 2018-04-27 | 2018-04-27 | A kind of building method and system of interpolation curve or curved surface based on B-spline |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810390030.6A CN108804391A (en) | 2018-04-27 | 2018-04-27 | A kind of building method and system of interpolation curve or curved surface based on B-spline |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108804391A true CN108804391A (en) | 2018-11-13 |
Family
ID=64093952
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810390030.6A Pending CN108804391A (en) | 2018-04-27 | 2018-04-27 | A kind of building method and system of interpolation curve or curved surface based on B-spline |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108804391A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111157986A (en) * | 2020-01-03 | 2020-05-15 | 中南大学 | Doppler through-wall radar positioning method based on extended Bessel model |
CN112269965A (en) * | 2020-08-10 | 2021-01-26 | 中国北方车辆研究所 | Continuous curvature path optimization method under incomplete constraint condition |
CN112666949A (en) * | 2020-12-24 | 2021-04-16 | 武汉理工大学 | Ship path planning method, system and storage medium |
CN113103239A (en) * | 2021-04-29 | 2021-07-13 | 哈尔滨工业大学 | Robot attitude trajectory generation method and device and storage medium |
CN113103240A (en) * | 2021-04-29 | 2021-07-13 | 哈尔滨工业大学 | Method, device and system for realizing C2 continuous robot trajectory planning |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106023314A (en) * | 2016-05-05 | 2016-10-12 | 南通职业大学 | B spline master curve fitting method based on rotary axis direction mapping |
CN106504297A (en) * | 2016-09-14 | 2017-03-15 | 陕西理工学院 | The flexible wrench tectonics method of the increment of interpolation curve or curved surface based on B-spline |
CN106600663A (en) * | 2016-12-30 | 2017-04-26 | 浙江工业大学 | Simple curve smoothening method based on secondary B-spline curve |
CN107844415A (en) * | 2017-09-28 | 2018-03-27 | 西安电子科技大学 | A kind of model inspection path reduction method, computer based on interpolation |
-
2018
- 2018-04-27 CN CN201810390030.6A patent/CN108804391A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106023314A (en) * | 2016-05-05 | 2016-10-12 | 南通职业大学 | B spline master curve fitting method based on rotary axis direction mapping |
CN106504297A (en) * | 2016-09-14 | 2017-03-15 | 陕西理工学院 | The flexible wrench tectonics method of the increment of interpolation curve or curved surface based on B-spline |
CN106600663A (en) * | 2016-12-30 | 2017-04-26 | 浙江工业大学 | Simple curve smoothening method based on secondary B-spline curve |
CN107844415A (en) * | 2017-09-28 | 2018-03-27 | 西安电子科技大学 | A kind of model inspection path reduction method, computer based on interpolation |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111157986A (en) * | 2020-01-03 | 2020-05-15 | 中南大学 | Doppler through-wall radar positioning method based on extended Bessel model |
CN111157986B (en) * | 2020-01-03 | 2021-10-12 | 中南大学 | Doppler through-wall radar positioning method based on extended Bessel model |
CN112269965A (en) * | 2020-08-10 | 2021-01-26 | 中国北方车辆研究所 | Continuous curvature path optimization method under incomplete constraint condition |
CN112269965B (en) * | 2020-08-10 | 2024-04-05 | 中国北方车辆研究所 | Continuous curvature path optimization method under incomplete constraint condition |
CN112666949A (en) * | 2020-12-24 | 2021-04-16 | 武汉理工大学 | Ship path planning method, system and storage medium |
CN112666949B (en) * | 2020-12-24 | 2023-03-17 | 武汉理工大学 | Ship path planning method, system and storage medium |
CN113103239A (en) * | 2021-04-29 | 2021-07-13 | 哈尔滨工业大学 | Robot attitude trajectory generation method and device and storage medium |
CN113103240A (en) * | 2021-04-29 | 2021-07-13 | 哈尔滨工业大学 | Method, device and system for realizing C2 continuous robot trajectory planning |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108804391A (en) | A kind of building method and system of interpolation curve or curved surface based on B-spline | |
KR102308002B1 (en) | Method and apparatus for generating information | |
Kadri et al. | Nonlinear functional regression: a functional RKHS approach | |
CN106651188A (en) | Electric transmission and transformation device multi-source state assessment data processing method and application thereof | |
US20200311589A1 (en) | Calculating excited state properties of a molecular system using a hybrid classical-quantum computing system | |
CN104699883A (en) | Circuit design evaluation with compact multi-waveform representations | |
CN107844415B (en) | Model detection path reduction method based on interpolation and computer | |
Lee et al. | A framework for environmental monitoring with Arduino-based sensors using Restful web service | |
CN109842563A (en) | Content delivery network flow dispatching method, device and computer readable storage medium | |
Moxey et al. | Optimising the performance of the spectral/hp element method with collective linear algebra operations | |
CN114638658A (en) | Engineering cost method and system based on BIM technical data sharing | |
Zhou et al. | Variational analysis of circular cone programs | |
CN103346556A (en) | Rapid positioning method of distribution network loop | |
Chen et al. | Revisit to the THINC/QQ scheme: Recent progress to improve accuracy and robustness | |
Soni et al. | Development of an overset grid computational fluid dynamics solver on graphical processing units | |
US8300060B1 (en) | Object transformation for object trees utilized with multiprocessor systems | |
AU2023203387A1 (en) | Method and apparatus for determining degree of quantum entanglement, device and storage medium | |
Aminof et al. | Formal analysis of online algorithms | |
KR102471553B1 (en) | Method, apparatus, device and computer-readable storage medium executed by computing devices | |
JP2009129279A (en) | Machine learning apparatus and machine learning method | |
Liu et al. | Integrating alternating direction method of multipliers and bush for solving the traffic assignment problem | |
CN108846248B (en) | Application modeling and performance prediction method | |
Xu et al. | A distributed inverse distance weighted interpolation algorithm based on the cloud computing platform of Hadoop and its implementation | |
CN104484368A (en) | Algorithm for searching keywords of large-scale graph data on basis of MapReduce | |
Li et al. | Towards sparse matrix operations: graph database approach for power grid computation |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181113 |