Summary of the invention
The present invention proposes a kind ofly based on the space line identification multi-view angle three-dimensional data joining method with coupling, the three dimensional point cloud that is applicable to have obvious seamed edge feature splices from various visual angles.It splices by the line characteristic matching relation of utilizing the different visual angles point cloud model, compares with existing Point-clouds Registration method, and minimizing operand that can be a large amount of also can effectively prevent faulty convergence.
Technical scheme: for the multi-view angle three-dimensional point cloud of realizing obvious border splices fast, the present invention proposes a kind of based on the multi-view angle three-dimensional data joining method of space line identification with coupling., the three dimensional point cloud that is applicable to have obvious seamed edge feature splices from various visual angles.It is at first according to the straight line parameter in the extraction of straight line method extraction three dimensional point cloud, then can realize the coupling identification of common linear under the different visual angles according to the restriction relation of the position each other of extracting straight line and angle etc., then find the corresponding point of invariable rotary under the different visual angles on the basis of matching line, ask for the splicing that realizes three-dimensional data thereby carry out overall attitude optimum attitude based on corresponding point at last.
The present invention is a kind of based on the multi-view angle three-dimensional data joining method of space line identification with coupling, and the method concrete steps are:
Step 1: extract the linear feature parameter from original point cloud data: at first the amount of curvature according to cloud data finds the some cloud that belongs to the line feature, and postulated point converges and closes available P{ (x
1, y
1, z
1) ... (x
n, y
n, z
n) expression,
Be the average of coordinate, can make up matrix by average
The covariance matrix of P then:
X=[P-N]
T·[P-N]
According to the characteristic of eigenwert and proper vector as can be known:
X α=λ α establishes λ
1, λ
2, λ
3Be the eigenwert of X, and magnitude relationship there is λ
1<λ
2<λ
3, then the estimated value of curvature is:
Set up threshold value threth according to the size distribution of curvature, then the curvature valuation is considered to the line feature point cloud greater than threth.
On the basis of the line feature point cloud that extracts, the straight line parameter that the line feature point cloud comprises is asked for.To eigenwert and the proper vector analysis of line feature point cloud, α
1, α
2, α
3Be λ
1, λ
2, λ
3Characteristic of correspondence vector, then α
3Putting exactly the rectilinear direction of cloud estimates.The rectilinear direction of all some clouds is estimated that carrying out normalization obtains
Vector after the normalization is carried out the three-dimensional mapping in the Gaussian vectors ball, the direction of straight line can be thought in the center of the some cloud cluster in the Gaussian vectors ball that obtains, obtain the center of each cluster by cluster analysis, the institute that has also just obtained comprising in the some cloud linear feature might direction.
After obtaining the direction of 3 d-line, find again the locus of 3 d-line just can realize determining 3 d-line.To the plane, can obtain to converge at the line feature point cloud cluster of any along the direction projection of straight line, owing to may there be parallel space three-dimensional straight line, therefore converge to have on the plane and surpass one convergent point.Use clustering method can obtain the center of each cluster, thereby realize obtaining of straight line parameter.
Use the Household matrix to realize the line feature point cloud is carried out projection along self direction on the plane.If the direction availability vector of straight line is expressed as
Order
Then transition matrix is R=I-2bb
T, converge P for line feature point, through the some cloud P'=RP after the projection, if the artificial z axial coordinate with P' is made as zero, then can obtain in the plane projection result.Carry out cluster analysis and obtain cluster centre in planar range, then the projected position of straight line can obtain, thereby has realized determining the straight line parameter.
Step 2: the coupling that realizes the different visual angles associated straight lines: supposing has straight line l under certain visual angle
1: (x
1, y
1, z
1) cross a bit (a
1, b
1, c
1), straight line l
2: (x
2, y
2, z
2) cross a bit (a
2, b
2, c
2),
If: k
1=a
1(x
2-x
1)+b
1(y
2-y
1)+c
1(z
2-z
1)
k
2=a
2(x
2-x
1)+b
2(y
2-y
1)+c
2(z
2-z
1)
M=a
1a
2+b
1b
2+c
1c
2
N=a
1 2+b
1 2+c
1 2
P=a
2 2+bb
2 2+c
2 2
t=(k
2·N-k
1·M)/(M
2-P·N)
s=(k
2·M-k
1·P)/(M
2-P·N)
K1, k2, M, N, P, t, s are by straight line l in the formula
1: (x
1, y
1, z
1), straight line l
2: (x
2, y
2, z
2), point (a
1, b
1, c
1), point (a
2, b
2, c
2) the equivalent representation form of the algebraic expression that forms of data.
The distance of two space lines then
dist=|x
2-x
1+s·(a
2-a
1),y
2-y
1+s·(b
2-b
1),z
2-z
1+s·(c
2-c
1)|
Article two, the angle of space line:
Article two, the distance of space line and angle remain unchanged in the spatial alternation process, make up the description vectors of each bar straight line according to the formula of vector sum angle:
v
line=[dist
1…dist
n;angle
l…angle
n]
Every straight line is to there being different description vectors, have no relations owing to angle with apart from the isospace rotation, the description vectors of the associated straight lines under the different visual angles is consistent or is approximate, mates according to the similarity of vector, can realize the coupling of different visual angles line correspondence.
Step 3: find the spatial alternation corresponding point according to the straight line matching relationship: have 2 points on two of different surface beeline straight lines each other, their line is all vertical with two different surface beelines, distance between them is the different surface beeline distance, can know that by vertical relation have uniqueness at 2, point such under different visual angles is corresponding point.
Supposing has straight line l under certain visual angle
1: (x
1, y
1, z
1) cross a bit (a
1, b
1, c
1), straight line l
2: (x
2, y
2, z
2) cross a bit (a
2, b
2, c
2),
The same with step 3, if having: k
1=a
1(x
2-x
1)+b
1(y
2-y
1)+c
1(z
2-z
1)
k
2=a
2(x
2-x
1)+b
2(y
2-y
1)+c
2(z
2-z
1)
M=a
1a
2+b
1b
2+c
1c
2
N=a
1 2+b
1 2+c
1 2
P=a
2 2+b
2 2+c
2 2
t=(k
2·N-k
1·M)/(M
2-P·N)
s=(k
2·M-k
1·P)/(M
2-P·N)
Corresponding point then:
p
1=[x
1+s·a
1,y
1+s·b
1,z
1+s·c
1]
p
2=[x
2+s·a
2,y
2+s·b
2,z
2+s·c
2]
p
1, p
2Be expressed as two intersection points between the different surface beeline.
Can find reference point p on the straight line according to the matching relationship of straight line
1p
2, and the corresponding point q under their different visual angles
1, q
2In like manner obtain whole straight line corresponding point pair:
P:{p
1,p
2,…p
n},Q:{q
1,q
2,…q
n}。So just the matching line splicing is transformed into the right splicing of corresponding point.
Step 4: calculate transition matrix between the different visual angles based on corresponding point.Suppose:
P:{p
1, p
2... p
n, Q:{q
1, q
2... q
nBe corresponding point to collection, obtain optimum spatial alternation matrix R, T, satisfy:
The method of using SVD to decompose is calculated the equation optimum solution:
Order
Matrix H=P ' then
TQ' carries out svd [U, D, V]=SVD (H), and then final spatial alternation matrix is:
R=V·U
T,T=q-R·p
Symbol description is as follows in the following formula: R is rotation matrix, and T is translation matrix, and p is the arbitrfary point among the point set P, and q is the arbitrfary point among the point set Q, and H is the matrix that point set P, Q computing form, and U, D, V are the corresponding matrixes that the H svd is obtained.
Use R, T aims at original three dimensional point cloud as transformation relation, then can access the splicing result of cloud data under the different visual angles.
Beneficial effect: in the splicing of the three dimensional point cloud with obvious border, utilize based on the method for linear feature coupling and carry out the splicing of many visual fields cloud data, can improve splicing efficient.The present invention has provided a kind of based on the multi-view angle three-dimensional data joining method of space line identification with coupling, and its advantage is:
1, carries out the splicing of many visual field point clouds by extracting the linear feature structural parameters, can reduce in a large number operand, shorten computing time.
2, by splicing based on linear feature coupling, effectively avoided the local convergence problem that runs into based in the cloud process, ensured the true(-)running of algorithm.
3, the linear feature identification that relates to of splicing, the research of different surface beeline relative space position relation can be used for other related fields of Point Cloud Processing.
Embodiment: following according to the concrete embodiment of method step introduction shown in Figure 1.
The present invention is a kind of based on the multi-view angle three-dimensional data joining method of space line identification with coupling, and the method concrete steps are:
Step 1: extract the linear feature parameter from original point cloud data: at first the amount of curvature according to cloud data finds the some cloud that belongs to the line feature, and postulated point converges and closes available P{ (x
1, y
1, z
1) ... (x
n, y
n, z
n) expression,
Be the average of coordinate, can make up matrix by average
The covariance matrix of P then:
X=[P-N]
T·[P-N]
Characteristic according to eigenwert and proper vector has as can be known:
X α=λ α establishes λ
1, λ
2, λ
3Be the eigenwert of X, and magnitude relationship there is λ
1<λ
2<λ
3, then the estimated value of curvature is:
Set up threshold value threth according to the size distribution of curvature, then the curvature valuation is considered to the line feature point cloud greater than threth.
On the basis of the line feature point cloud that extracts, the straight line parameter that the line feature point cloud comprises is asked for.To eigenwert and the proper vector analysis of line feature point cloud, α
1, α
2, α
3Be λ
1, λ
2, λ
3Characteristic of correspondence vector, then α
3Putting exactly the rectilinear direction of cloud estimates.The rectilinear direction of all some clouds is estimated that carrying out normalization obtains
Vector after the normalization is carried out the three-dimensional mapping in Gaussian sphere, the direction of straight line is thought at the center of the some cloud cluster in the Gaussian vectors ball that obtains, obtain the center of each cluster by cluster analysis, the institute that has also just obtained comprising in the some cloud linear feature might direction.
After obtaining the direction of 3 d-line, find the locus of 3 d-line just can realize determining 3 d-line.To the plane, can obtain to converge at the line feature point cloud cluster of any along the direction projection of straight line, owing to may there be parallel space three-dimensional straight line, therefore converge to have on the plane and surpass one convergent point.Use clustering method can obtain the center of each cluster, thereby realize obtaining of straight line parameter.
Use the Household matrix to realize the line feature point cloud is carried out projection along self direction on the plane.If the direction availability vector of straight line is expressed as
Order
Then transition matrix is R=I-2bb
T, converge P for line feature point, through the some cloud P'=RP after the projection, if the artificial z axial coordinate with P' is made as zero, then can obtain in the plane projection result.Carry out cluster analysis and obtain cluster centre in planar range, then the projected position of straight line can obtain, thereby has realized determining the straight line parameter.
Step 2: the coupling that realizes the different visual angles associated straight lines: supposing has straight line l under certain visual angle
1: (x
1, y
1, z
1) cross a bit (a
1, b
1, c
1), straight line l
2: (x
2, y
2, z
2) cross a bit (a
2, b
2, c
2),
If: k
1=a
1(x
2-x
1)+b
1(y
2-y
1)+c
1(z
2-z
1)
k
2=a
2(x
2-x
1)+b
2(y
2-y
1)+c
2(z
2-z
1)
M=a
1a
2+b
1b
2+c
1c
2
N=a
1 2+b
1 2+c
1 2
P=a
2 2+b
2 2+c
2 2
t=(k
2·N-k
1·M)/(M
2-P·N)
s=(k
2·M-k
1·P)/(M
2-P·N)
K1, k2, M, N, P, t, s are by straight line l in the formula
1: (x
1, y
1, z
1), straight line l
2: (x
2, y
2, z
2), point (a
1, b
1, c
1), point (a
2, b
2, c
2) the equivalent representation form of the algebraic expression that forms of data.
The distance of two space lines then
dist=|x
2-x
1+s·(a
2-a
1),y
2-y
1+s·(b
2-b
1),z
2-z
1+s·(c
2-c
1)|
Article two, the angle of space line:
Utilize distance and the angle of two space lines in the spatial alternation process, to remain unchanged, make up the description vectors of each bar straight line according to the formula of vector sum angle:
v
line=[dist
1…dist
n;angle
l…angle
n]
Every straight line is to there being different description vectors, have no relations owing to angle with apart from the isospace rotation, the description vectors of the associated straight lines under the different visual angles is consistent or is approximate, mates according to the similarity of vector, coupling that can straight line different visual angles line correspondence.
Step 3: find the spatial alternation corresponding point according to the straight line matching relationship: have 2 points on two of different surface beeline straight lines each other, their line is all vertical with two different surface beelines, distance between them is the different surface beeline distance, can know that by vertical relation have uniqueness at 2, therefore such point is corresponding point under different visual angles.
Supposing has straight line l under certain visual angle
1: (x
1, y
1, z
1) cross a bit (a
1, b
1, c
1), straight line l
2: (x
2, y
2, z
2) cross a bit (a
2, b
2, c
2),
The same with step 3, if having: k
1=a
1(x
2-x
1)+b
1(y
2-y
1)+c
1(z
2-z
1)
k
2=a
2(x
2-x
1)+b
2(y
2-y
1)+c
2(z
2-z
1)
M=a
1a
2+b
1b
2+c
1c
2
N=a
1 2+b
1 2+c
1 2
P=a
2 2+b
2 2+c
2 2
t=(k
2·N-k
1·M)/(M
2-P·N)
s=(k
2·M-k
1·P)/(M
2-P·N)
Corresponding point then:
p
1=[x
1+s·a
1,y
1+s·b
1,z
1+s·c
1]
p
2=[x
2+s·a
2,y
2+s·b
2,z
2+s·c
2]
p
1, p
2Be expressed as two intersection points between the different surface beeline.
Find reference point p on the straight line according to the matching relationship of straight line
1p
2, and the corresponding point q under their different visual angles
1, q
2In like manner obtain whole straight line corresponding point pair:
P:{p
1,p
2,…p
n},Q:{q
1,q
2,…q
n}。So just the matching line splicing is transformed into the right splicing of corresponding point.
Step 4: calculate transition matrix between the different visual angles based on corresponding point.Suppose:
P:{p
1, p
2... p
n, Q:{q
1, q
2... q
nBe corresponding point to collection, obtain optimum spatial alternation matrix R, T, satisfy:
The method of using SVD to decompose is calculated the equation optimum solution:
Order
Matrix H=P ' then
TQ' carries out svd [U, D, V]=SVD (H), and then final spatial alternation matrix is:
R=V·U
T,T=q-R·p
Symbol description is as follows in the following formula: R is rotation matrix, and T is translation matrix, and p is the arbitrfary point among the point set P, and q is the arbitrfary point among the point set Q, and H is the matrix that point set P, Q computing form, and U, D, V are the corresponding matrixes that the H svd is obtained.
Use R, T carries out original three dimensional point cloud can obtain criterion the splicing result of cloud data under the different visual angles as transformation relation.