Automobile workpiece non-rigid three-dimensional point cloud method for registering based on linear hybrid deformation
Technical field
The present invention relates to the automobile workpiece non-rigid three-dimensional point cloud method for registering based on linear hybrid deformation.
Background technique
With the development of RGB-D video camera, make it possible that low cost obtains the three-dimensional point cloud of object high quality, while
Promote the development and application of stereoscopic vision.Three-dimensional point cloud registration is a particularly significant problem in stereoscopic vision, this skill
Art has application abundant in fields such as reverse-engineering, Robot visual location, three-dimensional measurements.The iteration proposed by Besl et al.
Closest approach (ICP, Iterative Closest Point) algorithm is comparative maturity and widely used calculation in point cloud registering
Method.But ICP can only solve the problems, such as rigid body translation, the reference for reference point clouds P of the non-rigid after down-sampled, when down-sampled after
Point cloud P due to self gravity or by external force deformation occurs when, original ICP method no longer be applicable in.
Summary of the invention
The purpose of the present invention is to solve existing ICP can only solve the problems, such as rigid body translation, after down-sampled for non-rigid
Reference point clouds P, reference point clouds P after down-sampled due to self gravity or by external force deformation occurs when, the original side ICP
The no longer applicable disadvantage of method, and propose a kind of automobile workpiece non-rigid three-dimensional point cloud method for registering based on linear hybrid deformation.
A kind of automobile workpiece non-rigid three-dimensional point cloud method for registering detailed process based on linear hybrid deformation are as follows:
Step 1: input reference point clouds Q' and source point cloud P', it is down-sampled using the progress of mesh filtering method, it obtains down-sampled
Reference point clouds Q and source point cloud P afterwards;
Step 2: the point i.e. control point of deformation is planned on the source point cloud P after down-sampled, and constructs dominant vector S;
Step 3: bounded reconciliation weight sets W is calculated, linear hybrid deformation model is constructed;
Step 4: by iterative closest point approach find it is down-sampled after reference point clouds Q and the corresponding point of source point cloud P just
Beginning corresponding relationship, and initial rigid body translation matrix is calculated by singular value decomposition;
Step 5: according to the initial corresponding relationship of reference point clouds Q and the corresponding point of source point cloud P after down-sampled and initial
Rigid body translation matrix constructs minimum mean-square error function;
Step 6: the optimal solution of minimum mean-square error function is solved using LM algorithm, obtains the increment Delta of dominant vector SS;
Step 7: according to obtained ΔSDominant vector S is updated, S ', S '=Δ are obtainedS+ S, by linear in step 3
Mixing deformation model make it is down-sampled after source point cloud P deformation occurs, obtain the source point cloud P " after deformation occurs;
Step 8: pair of the source point cloud P " after determining reference point clouds Q again through iterative closest point approach and deformation occurs
Relationship should be put, and rigid body translation matrix is obtained by singular value decomposition, makes the source point cloud P " rotation and translation after deformation occurs;
Step 9: the value phase for the initial rigid body translation matrix that rigid body translation matrix and step 4 that step 8 obtains are obtained
Multiply, obtains the transformation relation between input reference point clouds Q' and source point cloud P';
Step 10: whether the transformation relation between the obtained input reference point clouds Q' of judgment step nine and source point cloud P' meets receipts
Condition is held back, if meeting otherwise output is as a result, go to step 4.
The invention has the benefit that
The invention proposes a kind of automobile workpiece non-rigid three-dimensional point cloud method for registering based on linear hybrid deformation, passes through
Bounded reconcile weight come establish it is down-sampled after reference point clouds p-shaped varying model, controlled by planning control point it is down-sampled after
The deformation of reference point clouds P.It is optimal that non-linear least square error function is solved using Levenberg-Marquardt (LM) algorithm
Solve and update it is down-sampled after reference point clouds P deformation quantity, rigid body translation matrix is finally obtained using singular value decomposition.
Made by linear hybrid deformation model it is down-sampled after reference point clouds P deformation occurs, by after down-sampled
Reference point clouds P planning control point and dominant vector and calculate bounded reconcile weight, can preferably describe it is down-sampled after ginseng
The deformation of examination point cloud P solves optimized results by LM method, can reach faster and restrain and can prevent to a certain extent
Local convergence problem.This method principle is simple, it is easy to accomplish, it is combined by that will deform with matching, is solved to a certain extent
The problem of reference point clouds P point cloud registering after non-rigid is down-sampled, and registration accuracy is improved, accelerate the convergence speed of registration
Degree.
Parameter in three conditions of convergence is respectively as follows: ε1=10-4, ε2=10-6, kmax=100.It is from Fig. 3 a, 3b, 3c, 3d
Iterative closest point approach effect picture, Fig. 3 e, 3f, 3g, 3h be the method for the present invention effect picture, four figure be respectively the number of iterations be 0,
5,10,50 when result.Fig. 4 is the comparison diagram of this method and iterative closest point approach error result and the number of iterations relationship;
As described in Figure 4, when the number of iterations is 5 times, iterative closest point approach error result is 0.0038, and the method for the present invention is
0.001;When the number of iterations is 10 times, iterative closest point approach error result is 0.0018, the method for the present invention 0.001;Iteration
When number is 15 times, iterative closest point approach error result is 0.0014, the method for the present invention 0.0008;The number of iterations is 50 times
When, iterative closest point approach error result is 0.0008, the method for the present invention 0.0004;The method of the present invention can be seen that by the figure
Faster, precision is higher for convergence.
Detailed description of the invention
Fig. 1 is the method for the present invention flow chart;
Fig. 2 a is that bumper model deforms front and back side view,
Fig. 2 b is that bumper model deforms front and back top view
Fig. 2 c is that bumper model deforms front and back main view;Due to being influenced by self gravity, bumper is from ground
Deformation occurs for meeting after face is picked up, and shows as both sides and shrinks inwards;
Fig. 3 a is with 0 effect being registrated to deformation front and back bumper point cloud of iterative closest point approach iteration
Figure;
Fig. 3 b is with 5 effects being registrated to deformation front and back bumper point cloud of iterative closest point approach iteration
Figure;
Fig. 3 c is with 10 effects being registrated to deformation front and back bumper point cloud of iterative closest point approach iteration
Figure;
Fig. 3 d is with 50 effects being registrated to deformation front and back bumper point cloud of iterative closest point approach iteration
Figure;
Fig. 3 e is using 0 effect picture being registrated to deformation front and back bumper point cloud of the method for the present invention iteration;
Fig. 3 f is using 5 effect pictures being registrated to deformation front and back bumper point cloud of the method for the present invention iteration;
Fig. 3 g is using 10 effect pictures being registrated to deformation front and back bumper point cloud of the method for the present invention iteration;
Fig. 3 h is using 50 effect pictures being registrated to deformation front and back bumper point cloud of the method for the present invention iteration;
Fig. 4 is the comparison diagram of this method and iterative closest point approach error result and the number of iterations relationship.
Specific embodiment
Specific embodiment 1: embodiment is described with reference to Fig. 1, one kind of present embodiment is based on linear hybrid deformation
Automobile workpiece non-rigid three-dimensional point cloud method for registering detailed process are as follows:
Step 1: inputting reference point clouds Q' and source point cloud P' into program, down-sampled using the progress of mesh filtering method, obtains
To the reference point clouds Q and source point cloud P after down-sampled;
Step 2: the point i.e. control point of deformation is planned on the source point cloud P after down-sampled, and constructs dominant vector S;Artificially
Planning is chosen the meeting point that deformation occurs, as control point on the source point cloud P after down-sampled, may be sent out according to these control points
The freedom degree (each point has x, y, z three degree of freedom) of raw movement, planning control vector (are the variable-definition required
There are three variables of x, y, z at one vector, such as each control point);
Step 3: bounded reconciliation weight sets W is calculated, linear hybrid deformation model is constructed;
Step 4: by iterative closest point approach find it is down-sampled after reference point clouds Q and the corresponding point of source point cloud P just
Beginning corresponding relationship, and initial rigid body translation matrix is calculated by singular value decomposition;
Step 5: according to the initial corresponding relationship of reference point clouds Q and the corresponding point of source point cloud P after down-sampled and initial
Rigid body translation matrix constructs minimum mean-square error function;
Step 6: the optimal solution of minimum mean-square error function is solved using LM algorithm, obtains the increment Delta of dominant vector SS;
Step 7: according to obtained ΔSDominant vector S is updated, S ', S '=Δ are obtainedS+ S, by linear in step 3
Mixing deformation model make it is down-sampled after source point cloud P deformation occurs, obtain the source point cloud P " after deformation occurs;
Step 8: pair of the source point cloud P " after determining reference point clouds Q again through iterative closest point approach and deformation occurs
Relationship should be put, and rigid body translation matrix is obtained by singular value decomposition, makes the source point cloud P " rotation and translation after deformation occurs;
Step 9: the value phase for the initial rigid body translation matrix that rigid body translation matrix and step 4 that step 8 obtains are obtained
Multiply, obtains the transformation relation between input reference point clouds Q' and source point cloud P';
Step 10: whether the transformation relation between the obtained input reference point clouds Q' of judgment step nine and source point cloud P' meets receipts
Condition is held back, if meeting otherwise output is as a result, go to step 4.
Specific embodiment 2: the present embodiment is different from the first embodiment in that: calculating in the step 3 has
Boundary's reconciliation weight sets W, detailed process are as follows:
Minimize equation:
And meet following constraint:
Wherein δjkFor Kronecker function, the δ as j=kjkValue is 1, otherwise δjkValue is 0;ΔωjFor ωjIncrement;ωj
For control pointCorresponding bounded reconciliation weight;For j-th of control point, j=1,2 ..., m, m is the number at control point, and m takes
Value is positive integer,For k-th of control point, k value is positive integer,For deformation before source point cloud on point,It is
J control point existsThe weight at place, j are control point, and i is the point on source point cloud P, and i value is positive integer.Control point is exactly source point
The point artificially planned in step 2 on cloud P.
Other steps and parameter are same as the specific embodiment one.
Specific embodiment 3: the present embodiment is different from the first and the second embodiment in that: structure in the step 3
Build linear mixing deformation model, specific formula are as follows:
WhereinFor the point on deformed source point cloud, ψjFor control pointRigid body translation matrix.
Other steps and parameter are the same as one or two specific embodiments.
Specific embodiment 4: unlike one of present embodiment and specific embodiment one to three: the step 5
The initial corresponding relationship and initial rigid body translation matrix of middle reference point clouds Q and the corresponding point of source point cloud P according to after down-sampled
Construct minimum mean-square error function;Detailed process are as follows:
Wherein T is initial rigid body translation matrix;For k-th point of position after deformation in source point cloud P;
For in source point cloud P withThe point of corresponding points pair each other;It is k-th point in reference point clouds Q.
Other steps and parameter are identical as one of specific embodiment one to three.
Specific embodiment 5: unlike one of present embodiment and specific embodiment one to four: the step 6
The middle optimal solution that minimum mean-square error function is solved using LM algorithm, obtains the increment Delta of dominant vector SS;Detailed process are as follows:
The iterative formula of LM algorithm:
Wherein J is Jacobian matrix, and I is unit battle array,For the increment of S, μ is the shake item in LM algorithm;
Rule of iteration are as follows: if the vector updatedLead to errorReduce, then receive update, μ in next iteration
Reduce;Otherwise, μ increases, and does not receive update.
With centered Finite Difference Methods approximate solution Jacobian matrix or
Wherein uiFor i-th output;xiFor i-th input;ui+1For i+1 time output;ui-1It is exported for (i-1)-th time;Δxi
For the difference inputted twice.
With forward difference method approximate solution Jacobian matrix or
With backward difference method approximate solution Jacobian matrix.
Other steps and parameter are identical as one of specific embodiment one to four.
Specific embodiment 6: unlike one of present embodiment and specific embodiment one to five: the step 8
In the corresponding points relationship of reference point clouds Q and the source point cloud P " after deformation occurs are determined again through iterative closest point approach, and lead to
It crosses singular value decomposition and obtains rigid body translation matrix, make the source point cloud P " rotation and translation after deformation occurs;Detailed process are as follows:
(1) mass center of two amplitude point clouds is determined first:
Wherein N is corresponding points to quantity, and value is positive integer;For the mass center of source point cloud p;For the matter of reference point clouds Q
The heart;
(2) covariance matrix are as follows:
(3) enabling and carrying out the result of singular value decomposition to covariance matrix H is U Λ V, then rigid body transformation relation is by following formula meter
It calculates:
WhereinFor spin matrix;For translation vector;U Λ V is two matrixes of singular value decomposition.
Other steps and parameter are identical as one of specific embodiment one to five.
Specific embodiment 7: unlike one of present embodiment and specific embodiment one to six: the step 10
In the condition of convergence are as follows:
1)error(P′,Q)Terror(P′,Q)≤ε1
2)||ΔS||≤ε2(||S||+ε2)
3) k > kmax
Wherein error (P ', Q)TError (P ', Q) is error function as a result, ΔSFor the increment of dominant vector S, ε1、ε2
For the threshold value of artificial settings;| | S | | it is the mould of dominant vector S, | | ΔS| | it is the mould of dominant vector increment, k is the number of iterations,
That is the step 10 number that is relayed to step 4, value is positive integer;kmaxFor the maximum times of iteration, value is positive integer;
Three above condition at least meets one and is considered as convergence.
Other steps and parameter are identical as one of specific embodiment one to six.
Specific embodiment 8: unlike one of present embodiment and specific embodiment one to seven: the ε1It is 10-4, ε2It is 10-6。
Other steps and parameter are identical as one of specific embodiment one to seven.
Beneficial effects of the present invention are verified using following embodiment:
Embodiment one:
A kind of automobile workpiece non-rigid three-dimensional point cloud method for registering based on linear hybrid deformation of the present embodiment is specifically to press
According to following steps preparation:
The purpose of the present invention is disclose a kind of non-rigid based on linear hybrid deformation it is three-dimensional it is down-sampled after reference point clouds P
Method for registering, it is therefore intended that solve to have the three-dimensional point cloud registration problems of deformation.First according to linear hybrid deformation and bounded
The weight that reconciles construct it is down-sampled after reference point clouds P deformation method, in conjunction with to the reference point clouds P planning control after down-sampled
Part can be described the deformation quantity of the reference point clouds P after down-sampled.By solving non-linear least square with LM algorithm
Error function updates deformation quantity, obtains rigid body translation matrix by singular value decomposition algorithm.
Specific implementation step of the invention is as shown in Figure 1:
(1) two groups of point clouds are inputted, and are carried out down-sampled;
(2) control section of deformation is planned on source point cloud (template point cloud), and establish dominant vector;
(3) bounded reconciliation weight is calculated, linear hybrid deformation model is established according to weight;
(4) just registration is carried out to cloud, obtains the initial corresponding relationship and initial rigid body translation matrix of a cloud;
(5) non-linear least square error function is constructed by the corresponding relationship of point, solves to obtain deformation by LM algorithm
Dominant vector increment, make it is down-sampled after reference point clouds P deformation occurs;
(6) rigid body translation matrix is obtained by singular value decomposition;
(7) judge whether to meet the condition of convergence, be unsatisfactory for returning to (5), satisfaction exits.
Interchangeable part in the present invention:
In step (5), need using the method for diff to error function approximate solution Jacobian matrix, this method
There are three types of forms altogether:
1) forward difference:
2) backward difference
3) centered difference
The present invention provides one group of example to be illustrated, and three-dimensional data is obtained by RGB-D video camera in the example.Fig. 2 a,
Grey is primary insurance thick stick model in Fig. 2 b, Fig. 2 c, and black is that the bumper receives the model after external force deformation.Fig. 3 a, Fig. 3 b,
Fig. 3 c, Fig. 3 d, Fig. 3 e, Fig. 3 f, Fig. 3 g, Fig. 3 h and Fig. 4 give the process of point cloud registering and the method for the present invention changes with existing
For the Contrast on effect of nearest point methods.
In this example, the parameter in three conditions of convergence is respectively as follows: ε1=10-4, ε2=10-6, kmax=100.
Fig. 3 a is with 0 effect being registrated to deformation front and back bumper point cloud of iterative closest point approach iteration
Figure;
Fig. 3 b is with 5 effects being registrated to deformation front and back bumper point cloud of iterative closest point approach iteration
Figure;
Fig. 3 c is with 10 effects being registrated to deformation front and back bumper point cloud of iterative closest point approach iteration
Figure;
Fig. 3 d is with 50 effects being registrated to deformation front and back bumper point cloud of iterative closest point approach iteration
Figure;
Fig. 3 e is using 0 effect picture being registrated to deformation front and back bumper point cloud of the method for the present invention iteration;
Fig. 3 f is using 5 effect pictures being registrated to deformation front and back bumper point cloud of the method for the present invention iteration;
Fig. 3 g is using 10 effect pictures being registrated to deformation front and back bumper point cloud of the method for the present invention iteration;
Fig. 3 h is using 50 effect pictures being registrated to deformation front and back bumper point cloud of the method for the present invention iteration;
It can be seen that this method is more in non-rigid point cloud registering from Fig. 3 a, 3b, 3c, 3d and Fig. 3 e, 3f, 3g, 3h comparison
Good realizes with alignment request, and improves precision;
Fig. 4 be the number of iterations and error function result relationship, wherein solid line be iterative closest point approach, that is, Fig. 3 a, 3b,
3c, 3d as a result, dotted line be the method for the present invention, that is, Fig. 3 e, 3f, 3g, 3h as a result, by the figure can be seen that the method for the present invention receive
It holds back faster, precision is higher.
In order to solve the problems, such as that non-rigid three-dimensional point cloud is registrated, the present invention devises a kind of based on the non-of linear hybrid deformation
Rigid body three-dimensional point cloud method for registering.Deformation is established by planning the control section of template model and calculating bounded reconciliation weight
Model, by LM algorithm calculate deformation quantity optimal solution, by singular value decomposition calculate rigid body translation matrix, finally make two width have
There is the point Yun Chonghe of rigid body translation and deformation.The experimental results showed that this method precision is higher, it is non-just to can solve automobile workpiece
The three-dimensional point cloud registration problems of body.
The present invention can also have other various embodiments, without deviating from the spirit and substance of the present invention, this field
Technical staff makes various corresponding changes and modifications in accordance with the present invention, but these corresponding changes and modifications all should belong to
The protection scope of the appended claims of the present invention.