Partial quality optimal transmission theory-based incomplete point cloud registration method
Technical Field
The invention belongs to the field of image processing, and relates to an incomplete point cloud registration method based on a partial quality optimal transmission theory.
Background
Due to the limitations of scanning techniques, all information of a three-dimensional scene cannot be obtained. The process of reconstructing the data from different angle scans into a three-dimensional object is called three-dimensional reconstruction. However, the local information obtained from each scan is how to match them together, and this process is called point cloud registration. A point cloud, also called a set of points, refers to a set of points contained in a particular coordinate system. Typically, a point cloud is generated by a three-dimensional scanner to represent the outer surface of an object in three-dimensional space. Point cloud registration is widely applied in the fields of computer vision and pattern recognition, three-dimensional model sampling, geometric processing and the like, and is a process for aligning two point clouds. In addition, the point cloud matching is also carried out by cultural relic reconstruction, medical image analysis, building reconstruction and estimation of the pose of a camera.
The point cloud is unstructured three-dimensional data, no connection relation exists between points, and no corresponding relation exists between the point clouds. In the point cloud registration process, the corresponding relation between the target point cloud E and the source point cloud S is searched, and the mapping transformation of the target point cloud E and the source point cloud S is found according to the corresponding relation; and then, according to the transformation parameters, transforming the source point cloud S, and comparing the transformed source point cloud S with the transformed target point cloud E through a proper similarity index. The similarity difference between the point clouds S and E is minimized, resulting in the best alignment of the point cloud E and the transformed S.
Rigid registration is a very challenging problem because point cloud data itself can present problems, including: noise, outliers, missing. Noise is a point near the surface of a three-dimensional object that makes registration difficult; outliers refer to points away from the surface of the three-dimensional object that would affect the results of the registration if not discarded; due to the problems of the scanning technique, partial point sets are missing. In general, algorithms for point cloud registration are mainly classified into the following categories: the Iterative Closest Point (ICP) algorithm is the most common point cloud registration algorithm due to its simplicity and ease of computation. The ICP algorithm iteratively calculates corresponding points according to the idea of the closest point, and then calculates the transformation parameters for aligning the two point clouds until the local minimization is achieved; establishing a many-to-many corresponding relation of points and points through a probability method, which is different from the one-to-one relation of corresponding points in an ICP algorithm, wherein the probability algorithms have better performance than the traditional ICP algorithm, especially when processing noise, outliers and deletions; another method for rigid registration of point clouds is a feature descriptor, and some useful corresponding relations are established according to the feature descriptor, so that coarse registration is completed, and fine registration is completed by using algorithms such as ICP (inductively coupled plasma) and the like.
Disclosure of Invention
In view of the above, the present invention provides an incomplete point cloud registration method based on a partial quality optimal transmission theory.
In order to achieve the purpose, the invention provides the following technical scheme:
an incomplete point cloud registration method based on a partial quality optimal transmission theory comprises the following steps:
s1: inputting two point clouds P and Q, aligning mass centers of the two point clouds after mass distribution to obtain new point clouds X and Y;
s2: establishing a point cloud registration energy function, and solving an optimal transmission matrix sigma between the point clouds X and Y by using a partial quality optimal transmission theory;
s3: solving a relative transformation matrix T (R, T) between the two point clouds by using SVD according to the obtained optimal transmission plan sigma;
s4: repeating S2 to S3 until the F norm of the rotation matrix obtained twice converges;
s5: and applying the finally obtained transformation matrix T (R, T) to the point cloud Q, and registering the point clouds P and Q.
Optionally, in step S1: inputting two point clouds P ═ P1,p2,…,pmQ ═ Q1,q2,…,qnPerforming quality distribution, wherein the detailed method adopts a uniform distribution idea and does not consider other complex information such as introduced characteristics and the like; the number of the middle points of the point clouds P and Q is m and n, and the quality of each point in the point clouds P and Q is respectively as follows:
optionally, in step S1, the mass center of gravity B of the two-point cloudpAnd BqRespectively as follows:
and obtaining a new point cloud X and a new point cloud Y after aligning the mass barycenter, wherein coordinates of the points are as follows:
optionally, in step S2, using a partial quality optimal transmission theory, and when calculating a transmission plan, using a range constraint divergence function, slackening the quality transmission of the point cloud, and breaking the quality conservation criterion; the total quality of the transmission point cloud Y is constrained by using the RG function, and the robustness of the algorithm under the conditions of a large number of abnormal points and deletion is improved;
optionally, in step S2, the optimal transmission theory is relaxed by using an RG divergence function to relax the law of conservation of mass, and a concept of transmission cost is used to model the registration of two point clouds, where the transmission cost is obtained by multiplying the distance between two points by a corresponding transmission plan, the distance function is the square of the euclidean distance between two points, and the energy function of point cloud registration is as follows:
s201: using an alternating iterative algorithm, firstly fixing a transformation matrix T (R, T), solving an optimal transmission plan sigma, approximately solving through an entropy regular term, wherein the transformation matrix is an entropy regular term coefficient, and controlling the degree of regularization; the point cloud registration energy function is rewritten as:
h (σ) is the entropy of the transmission plan, which is of the form:
s202: solving the point cloud registration problem is a convex optimization problem, and the optimal transmission plan is expressed as follows:
σ=diag(exp(u/))Kdiag(exp(v/))
wherein
u and v are two solving vectors of a dual problem of the point cloud registration energy function, the optimal transmission plan is solved by the two vectors, and the variables are replaced as follows:
a=exp(u/),b=exp(v/).
according to a dual criterion, the variables a and b are alternately iterated to solve the convex optimization problem, and the variables are iterated as follows:
the total quality of the point cloud transmission is constrained using the RG function, and the transmission plan is rewritten as:
π=g·diag(exp(u/))Kdiag(exp(v/))
g is a proportionality coefficient for controlling overall transmission, and a solving expression is as follows:
representing the corresponding point division of the vector, when the F function is used as the RG function presented herein, the corresponding operators are as follows:
the transmission plan is calculated by the above expression, and the conversion parameter T (R, T) is solved.
Optionally, in step S3, after the transmission plan is obtained, the transformation matrix T (R, T) remains in the energy function to be solved, and the energy function has the following form:
s301: and (3) solving the partial derivative of the energy function of the formula to obtain a translation vector:
s302: replacing the translation matrix t in the objective function, the objective function is rewritten as:
the above formula is replaced by
And the constant term is omitted, the new energy function is:
obtaining a minimum value of the energy function when the trace is maximized; using trace features tr (ab) tr (ba), we obtain:
to pair
Singular value SVD decomposition is carried out to obtain UAV
TAnd again using the features of the trace to obtain:
let W be V
TRU,V
tR and U are orthogonal matrixes, and W is also an orthogonal matrix; w _ j is each column of W, with the property:
all elements W in the matrix
ijNot greater than 1; when W is
iiWhen 1, tr (AV)
TRU) reaches a maximum value, the following equation is obtained:
I=W=VTRU
the display solution for the rotation matrix is derived as follows:
R=VCUT,C=diag(1,...,det(VUT))。
optionally, in the step S4, the steps S2 and S3 are iterated mutually until the F norm of the rotation matrices R and R0 obtained by two times of solution is smaller than a certain threshold, and it is determined that the solution has converged at this time, so as to obtain an accurate translational rotation matrix.
Optionally, in step S5, the obtained transformation matrix T (R, T) is applied to the original point cloud Q, so as to complete registration of the point clouds P and Q.
The invention has the beneficial effects that: the invention finds the limitation of the traditional optimal transmission theory under the conditions of abnormity and deficiency while completing the energy function modeling of point cloud registration by using the transmission cost of the optimal transmission theory, firstly proposes to use a part of quality optimal transmission theory, and completes the accurate and robust registration between two point clouds.
Additional advantages, objects, and features of the invention will be set forth in part in the description which follows and in part will become apparent to those having ordinary skill in the art upon examination of the following or may be learned from practice of the invention. The objectives and other advantages of the invention may be realized and attained by the means of the instrumentalities and combinations particularly pointed out hereinafter.
Drawings
For the purposes of promoting a better understanding of the objects, aspects and advantages of the invention, reference will now be made to the following detailed description taken in conjunction with the accompanying drawings in which:
FIG. 1 is a flow chart of the method of the present invention;
FIG. 2(a) is an initialization point cloud; FIG. 2(b) is an initialized quality distribution of point clouds P and Q; FIG. 2(c) is a depth map of the transmission matrix calculated; FIG. 2(d) is a point cloud registration result;
fig. 3 is the initialized point cloud input in this embodiment: FIG. 3(a) is for the noise case; FIG. 3(b) shows the case of an abnormal point; FIG. 3(c) is in the absence case;
fig. 4 shows the result of the point cloud registration: fig. 4(a) is fig. 3 (a): registering results in case of noise; fig. 4(b) is fig. 3 (b): registering results under abnormal point conditions; fig. 4(c) is fig. 3 (c): registering results in the absence case;
FIG. 5(a) is a point cloud under the condition of noise, abnormal points and missing points in the present embodiment; FIG. 5(b) is a graph of the results after 5(a) registration;
FIG. 6 shows the registration result of the present embodiment under more point cloud models; fig. 6(a) is the registration result of fish; FIG. 6(b) is the registration result for fu; FIG. 6(c) is the registration result of the face;
FIG. 7(a) is the Stanford L output Data of the real scan in the present embodiment, and FIG. 7(b) is the result after 7(a) registration;
FIG. 8(a) is Apoll southby data of the present embodiment, which is a real scan; FIG. 8(b) is a graph of the results after 8(a) registration;
FIG. 9(a) is the exemplary Buddha Head data for real scan; fig. 9(b) is a graph of the results after 9(a) registration.
Detailed Description
The embodiments of the present invention are described below with reference to specific embodiments, and other advantages and effects of the present invention will be easily understood by those skilled in the art from the disclosure of the present specification. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention. It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present invention in a schematic way, and the features in the following embodiments and examples may be combined with each other without conflict.
Wherein the showings are for the purpose of illustrating the invention only and not for the purpose of limiting the same, and in which there is shown by way of illustration only and not in the drawings in which there is no intention to limit the invention thereto; to better illustrate the embodiments of the present invention, some parts of the drawings may be omitted, enlarged or reduced, and do not represent the size of an actual product; it will be understood by those skilled in the art that certain well-known structures in the drawings and descriptions thereof may be omitted.
The same or similar reference numerals in the drawings of the embodiments of the present invention correspond to the same or similar components; in the description of the present invention, it should be understood that if there is an orientation or positional relationship indicated by terms such as "upper", "lower", "left", "right", "front", "rear", etc., based on the orientation or positional relationship shown in the drawings, it is only for convenience of description and simplification of description, but it is not an indication or suggestion that the referred device or element must have a specific orientation, be constructed in a specific orientation, and be operated, and therefore, the terms describing the positional relationship in the drawings are only used for illustrative purposes, and are not to be construed as limiting the present invention, and the specific meaning of the terms may be understood by those skilled in the art according to specific situations.
The invention discloses an incomplete point cloud registration method based on a partial quality optimal transmission theory, and belongs to the fields of computational geometry, computer vision, medical image analysis and the like. The method comprises the following steps: s1: inputting two point clouds P and Q, aligning mass centers of the two point clouds after mass distribution to obtain new point clouds X and Y; s2: establishing a point cloud registration energy function, and solving an optimal transmission matrix sigma between the point clouds X and Y by using a partial quality optimal transmission theory; s3: solving a relative transformation matrix T (R, T) between the two point clouds by using SVD according to the obtained optimal transmission plan sigma; s4: repeating S2 to S3 until the F norm of the rotation matrix obtained twice converges; s5: and applying the finally obtained transformation matrix T (R, T) to the point cloud Q, and registering the point clouds P and Q. As shown in fig. 1, the point cloud registration method specifically includes the following steps:
step 1, inputting two point clouds P ═ { P ═1,p2,…,pmQ ═ Q1,q2,…,qnAnd performing quality allocation, as shown in fig. 2(a), as shown in fig. 2(b), wherein the detailed method adopts the concept of uniform allocation, and does not consider other complex information such as the introduction characteristics. The number of the middle points of the point clouds P and Q is m and n, and the quality of each point in the point clouds P and Q is respectively as follows:
mass center of gravity B of two-point cloudpAnd BqRespectively as follows:
and obtaining a new point cloud X and a new point cloud Y after aligning the mass barycenter, wherein coordinates of the points are as follows:
and 2, when the point cloud registration problem under the condition of abnormal points and missing is solved by the traditional optimal transmission theory, the inaccuracy of solving a transmission plan is caused in order to meet the initial edge probability distribution. The method proposes to use part of the quality optimal transmission theory for the first time, and uses a range constraint divergence function when calculating a transmission plan, so that the quality transmission of the point cloud is relaxed, the quality conservation criterion is broken, and the transmission quality of the point cloud is as shown in figure 2 (c). And the total quality of the transmission point cloud Y is constrained by using the RG function, so that the robustness of the algorithm under the conditions of a large number of abnormal points and deletion is improved.
In the traditional optimal transmission theory, the RG divergence function is used for relaxing the mass conservation rule, the registration of two point clouds is modeled by using the concept of transmission cost, the transmission cost is obtained by multiplying the distance between the two points by a corresponding transmission plan, the distance function adopted here is the square of the Euclidean distance between the two points, and the energy function of point cloud registration is as follows:
using an alternating iterative algorithm, firstly fixing a transformation matrix T (R, T), solving the optimal transmission plan σ, and approximating the solution by an entropy regularization term, which is an entropy regularization term coefficient, controlling the degree of regularization. The point cloud registration energy function may be rewritten as:
h (σ) is the entropy of the transmission plan, which is of the form:
solving the point cloud registration problem is a convex optimization problem, and the optimal transmission plan can be expressed as follows:
σ=diag(exp(u/))Kdiag(exp(v/))
wherein
u and v are two solving vectors of a dual problem of the point cloud registration energy function, the optimal transmission plan can be solved by the two vectors, and the variables are replaced as follows:
a=exp(u/),b=exp(v/).
according to a dual criterion, the variables a and b are alternately iterated to solve the convex optimization problem, and the variables are iterated as follows:
using the RG function to constrain the total quality of the point cloud transmission, the transmission plan can be rewritten as:
π=g·diag(exp(u/))Kdiag(exp(v/))
g is a proportionality coefficient for controlling overall transmission, and a solving expression is as follows:
representing the corresponding point division of the vector, when the F function is used as the RG function presented herein, the corresponding operators are as follows:
the transmission plan, e.g., 2(d), can be calculated by the above expression, so that the solution of the transformation parameters T (R, T) is performed.
Step 3, after the transmission plan is obtained, the transmission plan is removed from the registration energy function, and then the point cloud registration function is changed into:
and (3) solving the partial derivative of the energy function of the formula to obtain a translation vector:
replacing the translation matrix t in the objective function, the objective function can be rewritten as:
the above formula is replaced by
And the constant term is omitted, the new energy function is:
the minimum of the energy function is obtained when the trace is maximized. Using trace features tr (ab) tr (ba), we obtain:
to pair
Singular value SVD decomposition is carried out to obtain UAV
TAnd again using the features of the trace, one can obtain:
let W be V
TRU,V
tR and U are both orthogonal matrices, so W is also an orthogonal matrix. W _ j is each column of W, with the property:
all elements W in the matrix
ijNot greater than 1. When W is
iiWhen 1, tr (AV)
TRU) reaches a maximum value, so the following equation is obtained:
I=W=VTRU
the display solution for the rotation matrix is derived as follows:
R=VCUT,C=diag(1,...,det(VUT))
and 4, mutually iterating the steps S2 and S3 until the F norm of the rotation matrixes R and R0 obtained by twice solving is smaller than a certain threshold value, and determining that the solving is converged at the moment to obtain an accurate translation rotation matrix.
And 5, applying the obtained transformation matrix T (R, T) to the original point cloud Q, thereby finishing the registration of the point clouds P and Q. The results are shown in FIG. 2 (d).
In order to verify the robustness of the method in abnormal point cloud registration, a Stanford Bunny data set is adopted in particular, and the registration result of the point cloud under different conditions is demonstrated: different initialization point clouds are respectively input, and the angle difference between the two point clouds is 50 degrees: FIG. 3(a) is an initialization point cloud under noise; FIG. 3(b) is an initialization point cloud under abnormal point conditions; fig. 3(c) is the initialization point cloud in the absence case. Fig. 4(a) is the registration result of fig. 3 (a); FIG. 4(b) is the registration result of FIG. 3 (b); FIG. 4(c) is the registration result of FIG. 3 (c);
in order to verify the robustness of the method under various coexisting conditions, noise, abnormal points and StanfordBunny under the absence condition are input, and the Stanfordbunny is shown in a figure 5(a), and a figure 5(b) is a result graph after registration.
More well known point cloud models are used such as: fish, fu and face. The registration results of the various models in different anomaly situations are shown in fig. 6. Fig. 6(a) is the registration result of fish; FIG. 6(b) is the registration result for fu; FIG. 6(c) is the registration result of the face;
in order to prove that the method is not only applicable to point cloud Data of artificial outliers, missing points and noises, three kinds of actually scanned point cloud Data are adopted, for example, 7(a) is Stanford L outge Data which is actually scanned in the embodiment, 7(b) is a result graph after 7(a) is registered, 8(a) is ApollhBay Data which is actually scanned in the embodiment, 8(b) is a result graph after 8(a) is registered, 9(a) is Buddha Head Data which is actually scanned in the embodiment, and 9(b) is a result graph after 9(a) is registered;
through the above, in the traditional point cloud data, different abnormal conditions are manually added, so that the simulation of various abnormal points, missing points and noise points and the data scanned in the real kinect or lidar are achieved, and the best effect of the method in coping with point clouds deteriorated in different degrees is fully proved.
Finally, the above embodiments are only intended to illustrate the technical solutions of the present invention and not to limit the present invention, and although the present invention has been described in detail with reference to the preferred embodiments, it will be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions, and all of them should be covered by the claims of the present invention.