An adaptive point cloud multi-curve contour point linear growth smoothing regularization method
Through the adaptive point cloud multi-curve contour point linear growth smoothing regularization method, the problem of discontinuity and breakage of contour point regularization in the existing technology is solved, and better smoothness and continuity are achieved, which is suitable for target objects. Modeling and recognition applications.
Patent Information
- Application Number
- CN202410805727.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-21
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2044-06-21
AI Technical Summary
The existing iterative CD spline method and the improved B-spline method are sensitive to redundancy or deviation of building outline points in the point cloud contour regularization process, resulting in discontinuous regularization results, break points and wavy forms. , affecting the modeling, identification and classification applications of target objects.
The adaptive point cloud multi-curve contour point linear growth smoothing regularization method is used to construct the spatial straight line fitting parametric equation of the overall LSM, the quadratic curve fitting parametric equation based on geometric feature analysis and the spatial circular curve fitting parametric equation. Establish the shortest distance constraint from contour points to multi-curves, perform linear growth of contour points and correction of feature point mapping, and improve the smoothness and accuracy of contour points.
The smoothness and continuity of the building's contours are improved, the appearance of breaking points is avoided, and the regularity and connectivity are significantly improved, making the contours more regular and continuous.
Smart Images

Figure CN118379392B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of point cloud data processing, and in particular to an adaptive point cloud multi-curve contour point linear growth smoothing regularization method. Background Art
[0002] Regular point cloud contours are beneficial to applications such as modeling, recognition and classification of targets. Although the extraction of point cloud contour feature points can express the basic contour information of the target, the errors in the contour point extraction process make the contour points of some targets irregular.
[0003] The existing technologies used in the point cloud regularization process include: LSM-based spatial straight line fitting parameter equation, quadratic curve parameter equation based on geometric feature analysis, and spatial circular curve fitting parameter equation. The existing technologies also used in the comparison process include iterative CD spline curve method and improved B-spline curve method.
[0004] After the existing iterative CD spline curve method and the improved B-spline curve method regularize the contour points of straight-line, curved and circular-curve buildings, although the main contour of the building is relatively complete, both methods are based on the B-spline curve method, and the B-spline curve method is more sensitive to the redundancy or deviation of contour points, so the regularization result is not continuous, and many breakpoints are prone to appear in the main contour, making the regularized contour line not smooth, and even wavy, and the effect is not particularly good.
[0005] At the same time, the existing point cloud contour feature point extraction method contains errors in the contour point extraction process, which makes the contour points of some targets irregular, which is not conducive to the modeling, recognition and classification of targets. Summary of the invention
[0006] In order to solve the technical problems raised in the background technology, the present invention provides an adaptive point cloud multi-curve contour point linear growth smoothing regularization method.
[0007] The present invention is implemented by the following technical solution: an adaptive point cloud multi-curve contour point linear growth smoothing regularization method, comprising the following steps:
[0008] Step 1: construct the spatial straight line fitting parameter equation of the overall LSM, the quadratic curve fitting parameter equation based on geometric feature analysis, and the spatial circular curve fitting parameter equation, so as to establish the shortest distance constraint condition from the contour point to the multi-curve, i.e., the multi-curve parameter equation;
[0009] Step 2: Based on the above constraints, a contour point linear growth algorithm is constructed to obtain a linear growth set of contour points;
[0010] Step 3: Use the multi-curve parameter equation to perform multi-curve fitting on the linear growth set point cloud of each contour point, and then determine the type of each linear point cloud in the linear growth set, so as to perform regularization on the linear growth set of contour feature points accordingly.
[0011] Specifically, by mapping and correcting the characteristic points of the obtained contour points, the smoothness and accuracy of the contour points are further improved.
[0012] Specifically, in step 1, the step of constructing the spatial straight line fitting parameter equation of the overall LSM includes:
[0013] Assume that the contour feature points of the fitted space straight line are (x i ,y i ,z i ),i=1,2,n, then the coordinates of its center point (x g ,y g ,z g )for
[0014]
[0015] According to formula (1), the spatial straight line equation is constructed as:
[0016]
[0017] Multiply equation (2) by At the same time, normalization is performed,
[0018]
[0019] The equation of the straight line in contour point space evolves into:
[0020]
[0021] Where [j, k, l] is a straight line vector;
[0022] According to formula (3), the distance from a point to a straight line in space can be obtained as:
[0023]
[0024] The sum of squares of their distances is
[0025]
[0026] For formula (5), f g The parameters obtained when taking the minimum value, [j, k, l] are the optimal parameters, and then the following optimization problem can be obtained.
[0027] min f g s.t.j 2+k 2 +l 2 =1(6)
[0028] f g Taking partial derivatives of j, k, and l and setting them to 0, we get
[0029]
[0030] Write equation (7) in matrix form, as shown in equation (8):
[0031]
[0032] Write equation (8) in the form of coefficient matrix
[0033] MX=0s·t·X T X=1
[0034] Perform eigenvalue decomposition on M and obtain M=U∑V T (9)
[0035] In formula (9), U = [U1U2U3] is the left eigenvector matrix; V = [V1V2V3] is the right eigenvector matrix; ∑ = diag (σ1, σ2, σ3), σ1, σ2, σ3 are the eigenvalues of M;
[0036] According to formula (9), the eigenvector V3 corresponding to the minimum eigenvalue σ3 is obtained, and the eigenvector V3 is the optimal vector V3 = [j, k, l] of the space line;
[0037] Since the space straight line must pass through the center point (x g ,y g ,z g ),point With the center point (x g ,y g ,z g ) is:
[0038]
[0039] According to formula (10), the modulus of the cross product of V3 and V1 is obtained as shown in formula (11):
[0040] S=|V3×V1| (11)
[0041] Formula (11) represents the area of the parallelogram formed by vectors V3 and V1. At the same time, the area of the parallelogram can also be expressed as:
[0042] S=|V3|*d (12)
[0043] In the formula, d is the distance from the point to the fitting line.
[0044] According to equations (11) and (12), the distance from the point to the fitting line is:
[0045]
[0046] Specifically, in step 1, the step of constructing a quadratic curve fitting parameter equation based on geometric feature analysis includes:
[0047] The spatial curve is expressed using a quadratic curve fitting parameter equation, as shown in formula (14):
[0048]
[0049] Assume that the point cloud used for contour feature point space curve fitting is P i =(x i ,y i ,z i ),i=1,2…,n, then t=1,2,…n. Thus, equation (14) can be written in LSM form, as shown in equation (16):
[0050] V=BX-L (16)
[0051] In formula (16):
[0052] or or or or
[0053] According to the LSM solution principle, the parameter X can be obtained, as shown in formula (17):
[0054] X=(B T B) -1 B T L (17)
[0055] If a point outside the space curve is Q0(x0,y0,z0), then the distance from this point to a point on the space curve is:
[0056]
[0057] The shortest distance is:
[0058] d c =min{|QP|}=min{d} (19)
[0059] According to formula (19), a method for determining the shortest distance based on geometric feature analysis is proposed, as shown in the following steps:
[0060] Step a: Determine m nodes on the curve at equal intervals, and calculate the distance d from a point Q0 outside the curve to each node on the space curve. m ;
[0061] Step b: Determine the shortest node distance d i and the node Q on the curve i , get the point Q0 and the node Q on the curve i Vector And calculate the vector The angles α and β between the tangent line of the space curve node Qi; if α<β, the minimum distance point Q1 is on the α side;
[0062] Step c: Determine the two nodes Q of the arc segment on one side of α i With Q i+1 , take the midpoint Q in the arc segment C , calculate the point Q0 and the two endpoints Q on the arc segment i With Q i+1 The distance d i and i+1 ; if d i <d i+1 , then the shortest distance must be at the endpoint Q i The half interval where it is located;
[0063] Step d: discard the half interval without the minimum distance, take the midpoint of the other half interval, and repeat the above step c until the difference between the two sides is less than the given threshold ξ. Then the midpoint Q corresponding to the interval is C is the shortest distance point corresponding to point Q0. Based on this shortest distance point, the shortest distance d can be determined. c .
[0064] Specifically, in step 1, the step of constructing the spatial circular curve fitting parameter equation includes:
[0065] According to the space point P = (x i ,y i ,z i ),i=(1,2…,m), we use the overall LSM method to solve the geometric parameters of the projection plane, and the plane Π is:
[0066] ax+by+cz+d=0 (20)
[0067] In the formula, e1=[a,b,c] is the normal vector of plane Π.
[0068] Project the spatial point onto the plane and construct the spatial point projection rotation matrix according to formula (20):
[0069]
[0070] The spatial point projection translation matrix is:
[0071]
[0072] According to equations (21) and (22), the spatial point P = (x i ,y i ,z i ),i=(1,2…,m) is projected onto plane Π, as shown in formula (23):
[0073] P'=R1P+T (23)
[0074] In order to realize the spatial circular curve fitting of the spatial points on the plane, it is necessary to convert the spatial points on the plane into two-dimensional points. The projection plane Π normal vector e1 = [a, b, c] and the unit vector e in the z-axis direction z =(0,0,1) to perform cross multiplication, as shown in formula (24):
[0075] u=e z ×e1 (24)
[0076] The unit processing of formula (24) is as shown in formula (25):
[0077]
[0078] According to the four-element conversion method, the rotation angle is obtained as shown in formula (26):
[0079]
[0080] According to equations (25) and (26), the four elements are:
[0081] q=[cos(Φ)sin(Φ)*e u ] (27)
[0082] According to the four elements, the rotation matrix is:
[0083]
[0084] According to formula (28), the coordinates of the space point in two dimensions are obtained, as shown in formula (29):
[0085] P' R =P'*R(29)
[0086] After transformation, the spatial point P' on the projection surface R The z-axis coordinate z0 is the same as that of , and the x-axis and y-axis coordinates are on the same plane; the two-dimensional space circle equation is constructed, as shown in formula (30):
[0087] (x-x0)2 +(y-y0) 2 =r 2 (30)
[0088] In formula (30), (x0, y0) is the center of the circle and r is the radius of the circle.
[0089] Decompose formula (30) to construct the LSM indirect adjustment function:
[0090] V=MX-L(31)
[0091] In formula (31),
[0092]
[0093] Using the LSM principle, under the constraint condition V T When PV is minimum, we get parameter X:
[0094] X=(M T PM) -1 M T PL(32)
[0095] In formula (32), the weight matrix P is the unit matrix.
[0096] According to the parameter X, we can get the center (x0, y0) and radius r of the plane circle, and the coordinates of the center O R '=(x0,y0,z0) can be restored to the original coordinate system through inverse transformation:
[0097] O'=O' R *R- 1 (33)
[0098] We define U and V as unit vectors on plane π, and together with the plane normal vector e1, they form a right-handed coordinate system, namely:
[0099]
[0100] According to formula (35) and the center coordinates O' and radius r, the parametric equation of the space circle is constructed:
[0101]
[0102] In the formula,
[0103] According to formula (35), the coordinates of the point on the space circular curve can be obtained, and the shortest distance d from the point to the space circular curve can be determined using the Nelder-Mead algorithm. C .
[0104] Specifically, step 2 is performed as follows:
[0105] Step X, linearly grow the contour feature point cloud using the linear region growing algorithm to obtain a linear growth set of contour feature points. For the contour feature point cloud, all point clouds are marked as 0, and the nearest neighbor search algorithm is used to determine the k neighboring points of each contour feature point. The first neighboring point is used as the seed point to determine whether other neighboring points belong to the growing points;
[0106] Step Y, calculate the point P to be added according to the distance solution method from point to multiple curves R =(x R ,y R ,z R ) to the distance d from the multi-curve before growth R , the distance d R As the first constraint condition for the growth of linear feature points of the contour;
[0107] Step Z, add the point P to be grown R =(x R ,y R ,z R ) is combined with the clustered point cloud before growth to form the linear point cloud after growth According to the multi-curve parameters of the grown linear point cloud, calculate the distance from the grown point cloud to the multi-curve of the linear point cloud The average distance is:
[0108]
[0109] The average distance is used as the second constraint condition for the growth of contour feature points;
[0110] Step W: Based on the constraint conditions 1 and 2 obtained in step Y and step Z, a constraint condition model for linear region growth of contour feature points is constructed, as shown in formula (37):
[0111]
[0112] The contour feature points that satisfy equation (37) are grown, and the grown contour feature points are marked as 1. Otherwise, the growth is stopped and the process returns to step X. Steps X to Z are repeated until all points are marked as 1, thus completing the linear growth of the contour feature points. Finally, the contour feature point linear growth set Φ = {P0, P1, P2, ..., P m}.
[0113] Specifically, the regularization process of the linear set of contour feature points in step 3 is as follows:
[0114] For the linear growth set of contour feature points Φ={P0,P1,P2,…,P m}, for each linear point cloud P in the linear setm =(x m ,y m ,z m ), using the average distance from each linear point cloud to multiple curves represents the average straight line distance, represents the average distance of the quadratic curve, Represents the average distance of the circular curve; according to the relationship between the three, the linear point cloud p is determined m Which type of curve point cloud it belongs to, please refer to formula (39):
[0115]
[0116] Therefore, according to different types of curve point cloud data, corresponding methods are used to regularize them;
[0117] The point cloud distance resolution after setting the rules is
[0118] For linear point cloud data:
[0119] Use the nearest neighbor search algorithm to determine the two farthest points as and It is known that the straight line fitting in space must pass through the center point For any of the farthest points P1 L (x L ,y L ,z L ), calculate the distance between this point and the center point The vector composed of V1;
[0120]
[0121] Known point cloud P m The overall LSM space straight line vector V3 = [j, k, l]. Calculate the vector V1 in the space straight line vector V C The projection vector V on 1C ;
[0122]
[0123] According to the projection vector V 1C =[j 1C k 1C l 1C ], we can get any farthest point P L (x L ,y L ,z L ) on the straight line of the overall LSM space is:
[0124]
[0125] Determine the distance d of the farthest point f , then the number of points of the linear point cloud is:
[0126]
[0127] According to formula (44), the projection coordinates of the farthest point on the straight line are P1 p and Determine the coordinates of the regularized points on the line.
[0128]
[0129] In formula (44), P1 p and The distribution represents the projection coordinates of the two farthest points on the line.
[0130] According to the above steps, the linear set regularization is performed on the linear building contour points;
[0131] For quadratic point cloud data:
[0132] According to the point cloud distance resolution before regularization and the number of points m c , the number of points after regularization is:
[0133]
[0134] According to formula (45), the parameters of the quadratic curve are:
[0135]
[0136] Substitute equation (46) into equation (14) to determine the coordinates of the regularized points on the quadratic curve.
[0137] According to the above steps, the contour points of curved buildings are regularized into linear sets.
[0138] According to formula (35), the coordinates of the points on the space circular curve are determined by the angle Φ. Figure 7 (a) The angle Φ can be determined The relationship between and r is:
[0139]
[0140] Substitute equation (47) into equation (35) to determine the coordinates of the regularized points on the circular curve.
[0141] Compared with the prior art, the present invention has the following beneficial effects:
[0142] The present invention uses a variety of technical means such as multi-curve fusion, contour point smoothing, feature point mapping correction, linear growth and parameter ASFF. By applying these technical means, the regularization method proposed in the present invention performs better in the smoothness and continuity of the entire structure contour line, and the contour line has no broken defects.
[0143] The present invention adopts an optimized overall LSM straight line fitting method, which has a more regular regularization of the building contour points, can make the partial contour lines continuous and the entire straight line segment without breaks, and the overall smoothness and connectivity are improved.
[0144] The present invention analyzes linear contour points according to the constraint condition of the shortest distance from contour points to multiple curves, constructs a linear growth algorithm for contour points, realizes the linear growth set of contour points, performs multi-curve fitting on each linear growth set point cloud to obtain the regularization of contour feature points, and finally improves the regularity. BRIEF DESCRIPTION OF THE DRAWINGS
[0145] Figure 1 It is a linear growth comparison chart of the contour feature points of straight lines, curves and circular curves;
[0146] Figure 2 It is the regularized effect diagram of the linear set of straight-line building contour points;
[0147] Figure 3 It is the regularized effect diagram of the linear set of contour points of curved buildings;
[0148] Figure 4 It is the regularized effect diagram of the linear set of contour points of circular curved buildings;
[0149] Figure 5 It is a contour point schematic diagram including a straight-line contour point building, a curved-line contour point building, and a circular-curve contour point building;
[0150] Figure 6 This is the effect of different methods on the regularization of buildings containing straight contour points;
[0151] Figure 7 This is the effect of different methods on the regularization of buildings containing curved contour points;
[0152] Figure 8 These are the effects of different methods on regularizing buildings containing circular curve contour points. DETAILED DESCRIPTION
[0153] The present invention is further described below in conjunction with the accompanying drawings and specific implementation methods. It should be noted that, under the premise of no conflict, the various embodiments or technical features described below can be arbitrarily combined to form a new embodiment.
[0154] Embodiment 1:
[0155] An adaptive point cloud multi-curve contour point linear growth smoothing regularization method includes the following steps:
[0156] Step 1: construct the spatial straight line fitting parameter equation of the overall LSM, the quadratic curve fitting parameter equation based on geometric feature analysis, and the spatial circular curve fitting parameter equation, so as to establish the shortest distance constraint condition from the contour point to the multi-curve, i.e., the multi-curve parameter equation;
[0157] Step 2: Based on the above constraints, a contour point linear growth algorithm is constructed to obtain a linear growth set of contour points;
[0158] Step 3: Use the multi-curve parameter equation to perform multi-curve fitting on the linear growth set point cloud of each contour point, and then determine the type of each linear point cloud in the linear growth set, so as to perform regularization on the linear growth set of contour feature points accordingly.
[0159] Specifically, by mapping and correcting the characteristic points of the obtained contour points, the smoothness and accuracy of the contour points are further improved.
[0160] Specifically, in step 1, the step of constructing the spatial straight line fitting parameter equation of the overall LSM includes:
[0161] Assume that the contour feature points of the fitted space straight line are (x i ,y i ,z i ),i=1,2,n,, then its center point is (x g ,y g ,z g )for
[0162]
[0163] According to formula (1), the spatial straight line equation is constructed as:
[0164]
[0165] Multiply equation (2) by At the same time, normalization is performed,
[0166]
[0167] The equation of the straight line in contour point space evolves into:
[0168]
[0169] Where [j, k, l] is a straight line vector;
[0170] According to formula (3), the distance from a point to a straight line in space can be obtained as:
[0171]
[0172] The sum of squares of their distances is
[0173]
[0174] For formula (5), f g The parameters obtained when taking the minimum value, [j, k, l] are the optimal parameters, and then the following optimization problem can be obtained.
[0175] min f g s.t.j 2 +k 2 +l 2 =1 (6)
[0176] f g Taking partial derivatives of j, k, and l and setting them to 0, we get
[0177]
[0178] Write equation (7) in matrix form, as shown in equation (8):
[0179]
[0180] Write equation (8) in the form of coefficient matrix
[0181] MX=0s·t·X T X=1
[0182] Perform eigenvalue decomposition on M and obtain M=U∑V T (9)
[0183] In formula (9), U = [U1U2U3] is the left eigenvector matrix; V = [V1V2V3] is the right eigenvector matrix; ∑ = diag (σ1, σ2, σ3), σ1, σ2, σ3 are the eigenvalues of M;
[0184] According to formula (9), the eigenvector V3 corresponding to the minimum eigenvalue σ3 is obtained, and the eigenvector V3 is the optimal vector V3 = [j, k, l] of the space line;
[0185] Since the space straight line must pass through the center point (x g ,y g ,z g ),point With the center point (x g ,y g ,z g ) is:
[0186]
[0187] According to formula (10), the modulus of the cross product of V3 and V1 is obtained as shown in formula (11):
[0188] S=|V3×V1| (11)
[0189] Formula (11) represents the area of the parallelogram formed by vectors V3 and V1. At the same time, the area of the parallelogram can also be expressed as:
[0190] S=|V3|*d (12)
[0191] In the formula, d is the distance from the point to the fitting line.
[0192] According to equations (11) and (12), the distance from the point to the fitting line is:
[0193]
[0194] Specifically, in step 1, the step of constructing a quadratic curve fitting parameter equation based on geometric feature analysis includes:
[0195] The spatial curve is expressed using a quadratic curve fitting parameter equation, as shown in formula (14):
[0196]
[0197] Assume that the point cloud used for contour feature point space curve fitting is P i =(x i ,y i ,z i ),i=1,2…,n, then t=1,2,…n. Thus, equation (14) can be written in LSM form, as shown in equation (16):
[0198] V=BX-L (16)
[0199] In formula (16):
[0200] or or or or
[0201] According to the LSM solution principle, the parameter X can be obtained, as shown in formula (17):
[0202] X=(B T B) -1 B T L (17)
[0203] If a point outside the space curve is Q0(x0,y0,z0), then the distance from this point to a point on the space curve is:
[0204]
[0205] The shortest distance is:
[0206] d c =min{|QP|}=min{d} (19)
[0207] According to formula (19), a method for determining the shortest distance based on geometric feature analysis is proposed, as shown in the following steps:
[0208] Step a: Determine m nodes on the curve at equal intervals, and calculate the distance d from a point Q0 outside the curve to each node on the space curve. m ;
[0209] Step b: Determine the shortest node distance d i and the node Q on the curve i , get the point Q0 and the node Q on the curve i Vector And calculate the vector With space curve node Q i The angles α and β between the tangent lines; if α<β, the minimum distance point Q1 is on the α side;
[0210] Step c: Determine the two nodes Q of the arc segment on one side of α i With Q i+1 , take the midpoint Q in the arc segment C , calculate the point Q0 and the two endpoints Q on the arc segment i With Q i+1 The distance d i and i+1 ; if d i <d i+1 , then the shortest distance must be at the endpoint Q i The half interval where it is located;
[0211] Step d: discard the half interval without the minimum distance, take the midpoint of the other half interval, and repeat the above step c until the difference between the two sides is less than the given threshold ξ. Then the midpoint Q corresponding to the interval is C is the shortest distance point corresponding to point Q0. Based on this shortest distance point, the shortest distance d can be determined. c .
[0212] Specifically, in step 1, the step of constructing the spatial circular curve fitting parameter equation includes:
[0213] According to the space point P = (xi ,y i ,z i ),i=(1,2…,m), we use the overall LSM method to solve the geometric parameters of the projection plane, and the plane Π is:
[0214] ax+by+cz+d=0(20)
[0215] In the formula, e1=[a,b,c] is the normal vector of plane Π.
[0216] Project the spatial point onto the plane and construct the spatial point projection rotation matrix according to formula (20):
[0217]
[0218] The spatial point projection translation matrix is:
[0219]
[0220] According to equations (21) and (22), the spatial point P = (x i ,y i ,z i ),i=(1,2…,m) is projected onto plane Π, as shown in formula (23):
[0221] P'=R1P+T (23)
[0222] In order to realize the spatial circular curve fitting of the spatial points on the plane, it is necessary to convert the spatial points on the plane into two-dimensional points. The projection plane Π normal vector e1 = [a, b, c] and the unit vector e in the z-axis direction z =(0,0,1) to perform cross multiplication, as shown in formula (24):
[0223] u=e z ×e1 (24)
[0224] The unit processing of formula (24) is as shown in formula (25):
[0225]
[0226] According to the four-element conversion method, the rotation angle is obtained as shown in formula (26):
[0227]
[0228] According to equations (25) and (26), the four elements are:
[0229] q=[cos(Φ)sin(Φ)*e u ] (27)
[0230] According to the four elements, the rotation matrix is:
[0231]
[0232] According to formula (28), the coordinates of the space point in two dimensions are obtained, as shown in formula (29):
[0233] P' R =P'*R (29)
[0234] After transformation, the spatial point P' on the projection surface R The z-axis coordinate z0 is the same as that of , and the x-axis and y-axis coordinates are on the same plane; the two-dimensional space circle equation is constructed, as shown in formula (30):
[0235] (x-x0) 2 +(y-y0) 2 =r 2 (30)
[0236] In formula (30), (x0, y0) is the center of the circle and r is the radius of the circle.
[0237] Decompose formula (30) to construct the LSM indirect adjustment function:
[0238] V=MX-L (31)
[0239] In formula (31),
[0240]
[0241] Using the LSM principle, under the constraint condition V T When PV is minimum, we get parameter X:
[0242] X=(M T PM) -1 M T PL (32)
[0243] In formula (32), the weight matrix P is the unit matrix.
[0244] According to the parameter X, we can get the center (x0, y0) and radius r of the plane circle, and the coordinates of the center O R '=(x0,y0,z0) can be restored to the original coordinate system through inverse transformation:
[0245] O'=O' R *R -1 (33)
[0246] We define U and V as unit vectors on plane π, and together with the plane normal vector e1, they form a right-handed coordinate system, namely:
[0247]
[0248] According to formula (35) and the center coordinates O' and radius r, the parametric equation of the space circle is constructed:
[0249]
[0250] In the formula,
[0251] According to formula (35), the coordinates of the point on the space circular curve can be obtained, and the shortest distance d from the point to the space circular curve can be determined using the Nelder-Mead algorithm. C .
[0252] Specifically, step 2 is performed as follows:
[0253] Step X, linearly grow the contour feature point cloud using the linear region growing algorithm to obtain a linear growth set of contour feature points. For the contour feature point cloud, all point clouds are marked as 0, and the nearest neighbor search algorithm is used to determine the k neighboring points of each contour feature point. The first neighboring point is used as the seed point to determine whether other neighboring points belong to the growing points;
[0254] Step Y, calculate the point P to be added according to the distance solution method from point to multiple curves R =(x R ,y R ,z R ) to the distance d from the multi-curve before growth R , the distance d R As the first constraint condition for the growth of linear feature points of the contour;
[0255] Step Z, add the point P to be grown R =(x R ,y R ,z R ) is combined with the clustered point cloud before growth to form the linear point cloud after growth According to the multi-curve parameters of the grown linear point cloud, calculate the distance from the grown point cloud to the multi-curve of the linear point cloud The average distance is:
[0256]
[0257] The average distance is used as the second constraint condition for the growth of contour feature points;
[0258] Step W: Based on the constraint conditions 1 and 2 obtained in step Y and step Z, a constraint condition model for linear region growth of contour feature points is constructed, as shown in formula (37):
[0259]
[0260] The contour feature points that satisfy equation (37) are grown, and the grown contour feature points are marked as 1. Otherwise, the growth is stopped and the process returns to step X. Steps X to Z are repeated until all points are marked as 1, thus completing the linear growth of the contour feature points. Finally, the contour feature point linear growth set Φ = {P0, P1, P2, ..., P m}.
[0261] Specifically, the regularization process of the linear set of contour feature points in step 3 is as follows:
[0262] For the linear growth set of contour feature points Φ={P0,P1,P2,…,P m}, for each linear point cloud P in the linear set m =(x m ,y m ,z m ), using the average distance from each linear point cloud to multiple curves represents the average straight line distance, represents the average distance of the quadratic curve, Represents the average distance of the circular curve; according to the relationship between the three, the linear point cloud p is determined m Which type of curve point cloud it belongs to, please refer to formula (39):
[0263]
[0264] Therefore, according to different types of curve point cloud data, corresponding methods are used to regularize them;
[0265] The point cloud distance resolution after setting the rules is
[0266] For linear point cloud data:
[0267] Use the nearest neighbor search algorithm to determine the two farthest points as and It is known that the straight line fitting in space must pass through the center point For any of the farthest points P1 L (x L ,y L ,z L ), calculate the distance between this point and the center point The vector composed of V1;
[0268]
[0269] Known point cloud P mThe overall LSM space straight line vector V3 = [j, k, l]. Calculate the vector V1 in the space straight line vector V C The projection vector V on 1C ;
[0270]
[0271] According to the projection vector V 1C =[j 1C k 1C l 1C ], we can get any farthest point P L (x L ,y L ,z L ) on the straight line of the overall LSM space is:
[0272]
[0273] Determine the distance d of the farthest point f , then the number of points of the linear point cloud is:
[0274]
[0275] According to formula (44), the projection coordinates of the farthest point on the straight line are P1 p and Determine the coordinates of the regularized points on the line.
[0276]
[0277] In formula (44), P1 p and The distribution represents the projection coordinates of the two farthest points on the line.
[0278] According to the above steps, the linear set regularization is performed on the linear building contour points;
[0279] For quadratic point cloud data:
[0280] According to the point cloud distance resolution before regularization and the number of points m c , the number of points after regularization is:
[0281]
[0282] According to formula (45), the parameters of the quadratic curve are:
[0283]
[0284] Substitute equation (46) into equation (14) to determine the coordinates of the regularized points on the quadratic curve.
[0285] According to the above steps, the contour points of curved buildings are regularized into linear sets.
[0286] According to formula (35), the coordinates of the points on the space circular curve are determined by the angle Φ. Figure 7 The a part of the angle Φ can be determined The relationship between and r is:
[0287]
[0288] Substitute equation (47) into equation (35) to determine the coordinates of the regularized points on the circular curve.
[0289] Figure 4 The a part of the circular curve structure is shown as a point cloud. The circular curve linear growth algorithm is used to linearly grow the point cloud to obtain a linear growth set, such as Figure 4 These circular curve segments are regularized to obtain regularized circular curves, as shown in part b of Figure 4 As shown in part c of , a relatively complete and regular regularization effect is obtained, which solves the problem of broken contour lines.
[0290] The following is an example:
[0291] After obtaining point cloud data of buildings with straight contour points, point cloud data of buildings with curved contour points, and point cloud data of buildings with circular curves, the contour points of different structures are extracted using the global constraint method, and these contour points are regularized. Compared with the previous processing method, new processing steps such as multi-curve fusion, contour point smoothing, feature point mapping correction, linear growth, and parameter ASFF are added. The following is a specific comparison and analysis of the application effect of the previous processing method and the adaptive point cloud multi-curve contour point linear growth smoothing regularization method designed by us.
[0292] First, this method regularizes the contour points of buildings containing straight contour points, and compares the regularization results with the other two methods, such as Figure 6 shown.
[0293] Depend on Figure 6 It is obvious from part a that the iterative CD spline curve method is not continuous in regularizing the contour points of buildings containing straight contour points, and many breakpoints appear, but the main contour of the building is still relatively intact. Figure 6 Part A and Figure 6 From the comparison of part b, it can be seen that the regularization effect of the building contour points by the improved B-spline curve method is slightly better than that by the iterative CD-spline curve method. Figure 6The dotted rectangular box in part b shows that the main contour of this part is relatively continuous, but Figure 6 The dotted rectangular box in part a shows that the main contour line of this part has many breaks. At the same time, after the building contour points are regularized by these two methods, they are not continuous with the original contour points, and many main contour parts of the building are broken. Although the iterative CD spline method and the improved B-spline curve method can both regularize the contour points of linear buildings, the effect is not particularly good. The reason for this result is that these two methods are based on the B-spline curve method, and the B-spline curve method is more sensitive to the redundancy or deviation of contour points, and does not smooth the regularized building contour points. Therefore, many main contour parts still have breaks. Figure 6 As can be seen from the c part of , this method regularizes the building contour points and fuses multiple curves, and the regularization of the building contour points is relatively regular. Figure 6 As shown in the dotted box in part c of , the contour line of this part is continuous and there is no break in the entire straight line segment. The main reason is that the feature point mapping correction, linear growth parameter ASFF and parameter ASFF adopted by the method in this paper are the optimized overall LSM straight line fitting methods. Through these methods, the regularization method in this paper performs better in smoothing processing. Figure 6 Part A and Figure 6 In part b, the proposed method can better maintain the continuity of contour points.
[0294] Secondly, different methods are used to regularize the curved contour points of buildings containing curved contour points, and the regularization results of different methods are obtained, such as Figure 7 shown.
[0295] from Figure 7 It can be seen that all three methods can realize the regularization of contour points of buildings containing curved contour points, but the regularization results of different methods are different. For the regularization of curved contour points, the regularization results of the iterative CD spline curve method have breaks in many contour line positions, such as Figure 7 As shown in the box of part a of . This causes the contour regularization result to be discontinuous. The improved B-spline curve method and the method in this paper also have this situation, such as Figure 7 Part b of Figure 7 As shown in the rectangular box in part c of the figure. However, the number of locations where the contour is broken in the improved B-spline curve method is slightly less than that in the method of this paper, and is much less than that in the iterative CD-spline curve method. This shows that the regularization continuity of the improved B-spline curve method and the method of this paper is better than that of the iterative CD-spline curve method. However, from Figure 7It can be seen from the enlarged areas of each part that the contour lines regularized by the iterative CD spline curve method and the improved B-spline curve method are not smooth, and the enlarged display shows that they are in a wavy form. Figure 7 The enlarged display of part c shows that the contour line regularized by the proposed method is very smooth without any defects. The reason for this phenomenon is that the first two methods are based on the B-spline curve method, and the B-spline curve method needs to pass through each contour point, thus forming a tight curve shape. For the stepped contour of the lower part of the building containing curved contour points, although the contour line of the iterative CD spline curve method is clearer than that of the improved B-spline curve method, its contour breakage is more serious. Although the improved B-spline curve method is more continuous, its contour line is not very regular, such as Figure 7 As shown in the rectangular box in part b of . In the same area, the regularization result of the proposed method is more regular, and the overall contour line is very clear. From the above analysis, it can be seen that for the regularization of the contour points of the curved building, the regularization effect of the proposed method using feature point mapping correction, linear growth parameter ASFF and parameter adaptation is significantly better than the other two methods.
[0296] Finally, the above three methods are used to regularize the structures containing circular curve contour points, and the regularization results of three different methods are obtained, such as Figure 8 shown.
[0297] Depend on Figure 8 Part A and Figure 8 It can be clearly seen from part b that the iterative CD spline curve method and the improved B-spline curve method are not particularly ideal for the regularization effect of the structure. In particular, the circular contour of the structure, although these two methods present an overall circular contour style, the circular contour is wavy, such as Figure 8 Part a Figure 8 As shown in the dotted ellipse in part b of the figure, the regularization results of the two methods are similar for the four circular contours of the middle cube of the building containing the circular curve contour points. The circular contours are discontinuous and not smooth. At the same time, since the B-spline curve method needs to pass through each point, the regularization effects of the two methods will appear wavy. Figure 8It can be clearly seen from part c that although some of the regularized contours of this method are also broken, the number of broken locations is far less than that of the other two methods. Overall, this method shows better smoothness and continuity, and the obtained contours have no flaws. This is because this method uses multiple technical means such as multi-curve fusion, contour point smoothing, feature point mapping correction, linear growth and parameter ASFF. By applying these technical means, the regularization method of this paper performs better in the smoothness and continuity of the entire structure contour. Especially for the curved contour part of the structure, the effect of this method is significantly better than the other two methods.
[0298] The above-mentioned embodiments are only preferred embodiments of the present invention and cannot be used to limit the scope of protection of the present invention. Any non-substantial changes and substitutions made by technicians in this field on the basis of the present invention shall fall within the scope of protection required by the present invention.
Claims
1. An adaptive point cloud multi-curve contour point linear growth smoothing regularization method, characterized in that: The steps include: Step 1: construct the spatial straight line fitting parameter equation of the overall LSM, the quadratic curve fitting parameter equation based on geometric feature analysis, and the spatial circular curve fitting parameter equation, so as to establish the shortest distance constraint condition from the contour point to the multi-curve, i.e., the multi-curve parameter equation; Step 2: Based on the above constraints, a contour point linear growth algorithm is constructed to obtain a linear growth set of contour points; Step 3, using the multi-curve parameter equation to perform multi-curve fitting on the linear growth set point cloud of each contour point, and then determine the type of each linear point cloud in the linear growth set, so as to perform regularization processing on the linear growth set of contour feature points accordingly; The step 2 is performed as follows: Step X, linearly grow the contour feature point cloud using the linear region growing algorithm to obtain a linear growth set of contour feature points. For the contour feature point cloud, all point clouds are marked as 0, and the k neighboring points of each contour feature point are determined using the nearest neighbor search algorithm. The first neighboring point is used as the seed point to determine whether other neighboring points belong to the growing points; Step Y: Calculate the point P to be added based on the distance solution method from point to multiple curves R =(x R ,y R ,z R ) to the distance d from the multi-curve before growth R , the distance d R As the first constraint condition for the growth of linear feature points of the contour; Step Z: add the point P to be increased R =(x R ,y R ,z R ) is combined with the clustered point cloud before growth to form the linear point cloud after growth According to the multi-curve parameters of the grown linear point cloud, calculate the distance from the grown point cloud to the multi-curve of the linear point cloud The average distance is: The average distance As the second constraint condition for the growth of linear feature points of the contour; Step W, based on the constraint conditions 1 and 2 obtained in step Y and step Z, a constraint condition model for linear region growth of contour feature points is constructed, as shown in formula (37); The contour feature points that satisfy equation (37) are grown, and the grown contour feature points are marked as 1. Otherwise, the growth is stopped and the process returns to step X. Steps X to Z are repeated until all points are marked as 1, thereby completing the linear growth of the contour feature point cloud. Finally, the contour feature point linear growth set Φ = {P0, P1, P2, …, P m }; The regularization process of the linear set of contour feature points in step 3 is as follows: For the linear growth set of contour feature points Φ={P0,P1,P2,…,P m }, for each linear point cloud P in the linear set m =(x m ,y m ,z m ), using the average distance from each linear point cloud to multiple curves represents the average straight line distance, represents the average distance of the quadratic curve, Represents the average distance of the circular curve; according to the relationship between the three, the linear point cloud p is determined m Which type of linear point cloud is it? Please refer to formula (39) for details: Therefore, according to different types of linear point cloud data, corresponding methods are used to regularize them; And the distance resolution of the point cloud after regularization is set to For linear point cloud data: Use the nearest neighbor search algorithm to determine the two farthest points as and It is known that the straight line fitting in space must pass through the center point For any of the farthest points Calculate the distance between this point and the center point The vector composed of V1; Known point cloud P m The overall LSM space straight line vector V3 = [j, k, l], calculate the vector V1 in the space straight line vector V C The projection vector V on 1C ; According to the projection vector V 1C =[j 1C k 1C l 1C ], we can get any farthest point P L (x L ,y L ,z L ) on the straight line of the overall LSM space is: Determine the distance d of the farthest point f , then the number of points of the linear point cloud is: According to formula (44), the projection coordinates of the farthest point on the straight line are P1 p and P2 p , determine the coordinates of the regularized points on the straight line; In formula (44), P1 p and P2 p The distribution represents the projection coordinates of the two farthest points on the line; For quadratic point cloud data: According to the point cloud distance resolution before regularization and the number of points m c , the number of points after regularization is: According to formula (45), the parameters of the quadratic curve are: Substitute formula (46) into the quadratic curve fitting parameter equation to determine the coordinates of the regularized points on the quadratic curve; According to the spatial circular curve fitting parameter equation, the point coordinates of the spatial circular curve are determined by the angle Φ; and the angle Φ and The relationship between and r is: Substitute equation (47) into the spatial circular curve fitting parameter equation, and finally determine the regularized point coordinates on the circular curve.
2. The method for linear growth and smoothing regularization of multi-curve contour points of an adaptive point cloud as claimed in claim 1, characterized in that: In step 1, the steps of constructing the spatial straight line fitting parameter equation of the overall LSM include: Assume that the contour feature points of the fitted space straight line are (x i ,y i ,z i ),i=1,2,n, then the coordinates of its center point (x g ,y g ,z g )for According to formula (1), the spatial straight line equation is constructed as: Multiply equation (2) by At the same time, normalization is performed, Then the straight line equation of the contour point space evolves into: Where [j, k, l] is a straight line vector; According to formula (3), the distance from a point to a straight line in space can be obtained as: The sum of squares of their distances is For formula (5), f g The parameters obtained when taking the minimum value, [j, k, l] are the optimal parameters, and then the following optimization solution can be obtained; min f g s·t·j 2 +k 2 +l 2 =1 (6) f g Taking partial derivatives of j, k, and l and setting them to 0, we get Write equation (7) in matrix form, as shown in equation (8): Write equation (8) in the form of coefficient matrix MX=0s·t·X T X=1 Perform eigenvalue decomposition on M and obtain M=U∑V T (9) In formula (9), U = [U1U2U3] is the left eigenvector matrix; V = [V1V2V3] is the right eigenvector matrix; ∑ = diag (σ1, σ2, σ3), σ1, σ2, σ3 are the eigenvalues of M; According to formula (9), the eigenvector V3 corresponding to the minimum eigenvalue σ3 is obtained, and the eigenvector V3 is the optimal vector V3 = [j, k, l] of the space line; Since the space straight line must pass through the center point (x g ,y g ,z g ), then click With the center point (x g ,y g ,z g ) is: According to formula (10), the modulus of the cross product of V3 and V1 is obtained as shown in formula (11): S=|V3×V1| (11) Formula (11) represents the area of the parallelogram formed by vectors V3 and V1. At the same time, the area of the parallelogram can also be expressed as: S=|V3|*d(12) Where d is point P R The distance to the fitted straight line; According to equations (11) and (12), we finally get point P R The distance to the fitted line is:
3. The method for linear growth and smoothing regularization of multi-curve contour points of an adaptive point cloud as claimed in claim 2, characterized in that: In step 1, the steps of constructing the quadratic curve fitting parameter equation based on geometric feature analysis include: The spatial curve is expressed using a quadratic curve fitting parameter equation, as shown in formula (14): Assume that the point cloud used for contour feature point space curve fitting is P i =(x i ,y i ,z i ),i=1,2...,n, then t=1,2,...n, so equation (14) can be written in LSM form, as shown in equation (16): V=BX-L(16) In formula (16): According to the LSM solution principle, the parameter X can be obtained, as shown in formula (17): X=(B T B) -1 B T L(17) If a point outside the space curve is Q0(x0,y0,z0), then the distance from this point to a point on the space curve is: The shortest distance is: the c =min{QP|}=min{d}(19) According to formula (19), a method for determining the shortest distance based on geometric feature analysis is proposed, as shown in the following steps: Step a: Determine m nodes on the curve at equal intervals, and calculate the distance d from a point Q0 outside the curve to each node on the space curve. m ; Step b: Determine the shortest node distance d i and the node Q on the curve i , get the point Q0 and the node Q on the curve i Vector And calculate the vector With space curve node Q i The angles α and β between the tangent lines; if α<β, the minimum distance point Q1 is on the α side; Step c: Determine the two nodes Q of the arc segment on one side of α i With Q i+1 , take the midpoint Q in the arc segment C , calculate the point Q0 and the two endpoints Q on the arc segment i With Q i+1 The distance d i and i+1 ; if d i <d i+1 , then the shortest distance must be at the endpoint Q i The half interval where it is located; Step d: discard the half interval without the minimum distance, take the midpoint of the other half interval, and repeat the above step c until the difference between the two sides is less than the given threshold ξ. Then the midpoint Q corresponding to the interval is C is the shortest distance point corresponding to point Q0. Based on this shortest distance point, the shortest distance d can be determined. c .
4. The method for linear growth and smoothing regularization of multi-curve contour points of an adaptive point cloud as claimed in claim 3, characterized in that: In step 1, the construction step of establishing the spatial circular curve fitting parameter equation includes: According to the space point P = (x i ,y i ,z i ),i=(1,2…,m), the overall LSM method is used to solve the geometric parameters of the projection plane, and the obtained plane Π is: ax+by+cz+d=0 (20) In formula (20), e1 = [a, b, c] is the normal vector of plane Π; Project the spatial point onto the plane and construct the spatial point projection rotation matrix according to equation (20): Then the spatial point projection translation matrix is: According to equations (21) and (22), the spatial point P = (x i ,y i ,z i ),i=(1,2....,m) is projected onto plane Π, as shown in formula (23): P'=R1P+T(23) In order to realize the spatial circular curve fitting of the spatial points on the plane, it is necessary to convert the spatial points on the plane into two-dimensional points, and transform the projection plane Π normal vector e1 = [a, b, c] and the unit vector e in the z-axis direction z =(0,0,1) to perform cross multiplication, as shown in formula (24): u=e z ×e1 (24) The unit processing of formula (24) is as shown in formula (25): According to the four-element conversion method, the rotation angle is obtained as shown in formula (26): According to equations (25) and (26), the four elements are: q=[cos(Φ)sin(Φ)*e u ] (27) According to the four elements, the rotation matrix is: According to formula (28), the coordinates of the space point in two dimensions are obtained, as shown in formula (29): P' R =P'*R (29) After transformation, the spatial point P' on the projection surface R The z-axis coordinate z0 is the same as that of , and the x-axis and y-axis coordinates are on the same plane; the two-dimensional space circle equation is constructed, as shown in formula (30): (x-x0) 2 +(y-y0) 2 =r 2 (30) In formula (30): (x0, y0) is the center of the circle, r is the radius of the circle; Decompose formula (30) to construct the LSM indirect adjustment function: V=MX-L(31) In formula (31), Using the LSM principle, under the constraint condition V T When PV is minimum, we get parameter X: X=(M T PM) -1 M T PL(32) In formula (32), the weight matrix P is the unit matrix; According to the parameter X, we can get the center (x0, y0) and radius r of the plane circle, and the coordinates of the center O R '=(x0,y0,z0) can be restored to the original coordinate system through inverse transformation: O'=O' R *R -1 (33) Define U and V as unit vectors on plane π, and together with the plane normal vector e1, they form a right-handed coordinate system, namely: According to formula (35) and the coordinates of the center O' and the radius r, the spatial circular curve fitting parameter equation is constructed: In formula (35), According to formula (35), the coordinates of the point on the space circular curve can be obtained, and then the Nelder-Mead algorithm is used to determine the shortest distance d from the point to the space circular curve. C .
