Three-dimensional circle detection method for freeform surface
By employing the normal vector-guided rolling ball method and density-weighted iterative algorithm, the problem of efficient and accurate detection of circular holes on complex curved surfaces was solved, achieving high-precision positioning of circular holes on complex curved surfaces and improving the versatility and robustness of the detection.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- HUNAN UNIV
- Filing Date
- 2025-01-07
- Publication Date
- 2026-04-23
AI Technical Summary
Existing circular hole positioning technologies struggle to achieve efficient and accurate automated detection on complex curved surfaces, especially in the aerospace and automotive manufacturing industries. Traditional algorithms rely on manually designed features and lack real-time performance, while deep learning algorithms struggle to acquire large-scale labeled data in industrial scenarios.
The normal-vector-guided rolling sphere method is used to extract the boundary contour of the point cloud of the surface. Combined with Euclidean clustering and density-based weighted iterative algorithm, the circular hole is iteratively fitted by projecting the normal vector of the circular hole on the plane, which solves the problem of 3D circle detection on complex surfaces.
It achieves high-precision circular hole positioning on complex curved surfaces, improves the versatility and applicability of the inspection, can handle curved surfaces with different shapes and curvatures, reduces the influence of outliers, and improves the inspection accuracy and robustness.
Smart Images

Figure CN2025071017_23042026_PF_FP_ABST
Abstract
Description
A 3D Circle Detection Method for Freeform Surfaces
[0001] This application claims priority to Chinese Patent Application No. 2024114579386, filed on October 18, 2024, entitled “A Three-Dimensional Circle Detection Method for Freeform Surfaces”, the whole or part of which is incorporated herein by reference. Technical Field
[0002] This invention belongs to the field of three-dimensional vision inspection technology, and in particular relates to a three-dimensional circle detection method for free-form surfaces. Background Technology
[0003] In the manufacturing of high-end equipment such as aerospace and automotive, the identification and detection of circular holes on free-form surfaces is widely used in typical application scenarios such as automated hole making, drilling and riveting, and stringer positioning and assembly. These typical application scenarios involve a large number of circular holes; for example, an aircraft may have millions of rivet holes distributed across various curved surfaces and varying in size. However, manual inspection is inefficient, prone to omissions, and costly. In contrast, automated inspection offers advantages such as modularity, intelligence, and traceability, further meeting the demands of modern aerospace manufacturing for high quality, high efficiency, and low cost. Accurate positioning of circular holes on curved surfaces is crucial for automated production, providing key data for robots, robotic arms, and other equipment to accurately identify and manipulate workpieces to the appropriate positions, thereby improving production efficiency.
[0004] Circular hole localization methods are mainly divided into two categories: image-based circular hole localization and point cloud-based circular hole localization. Although image-based circular hole localization technology is mature, it is limited by two-dimensional image information and cannot directly obtain normal vectors and depth information in three-dimensional space. This limits the applicability of image processing technology in certain application scenarios that require normal vectors and depth information. In contrast, point cloud-based circular hole localization technology can provide richer spatial information, providing robotic arm operations with greater spatial perception and posture control capabilities.
[0005] Circular hole localization technology can be divided into traditional algorithms and deep learning methods. Traditional algorithms rely on manually designed features and rules, while deep learning algorithms are trained using large amounts of labeled data. However, obtaining large-scale labeled data in industrial scenarios is relatively difficult and suffers from insufficient real-time performance. Existing traditional point cloud circular hole localization methods are mainly for planar point clouds because planar point clouds are relatively simple and dominate in many industrial scenarios. However, in some industrial scenarios, such as automotive manufacturing and aerospace, complex non-planar surfaces are often encountered, and existing algorithms cannot be directly applied. These complex surfaces require more complex and flexible algorithms for processing and analysis.
[0006] Based on this, the present invention proposes a three-dimensional circle detection method for free-form surfaces. Summary of the Invention
[0007] To address the above technical problems, this invention provides a three-dimensional circle detection method for freeform surfaces.
[0008] The technical solution adopted by this invention to solve its technical problem is:
[0009] A three-dimensional circle detection method for freeform surfaces, the method comprising the following steps:
[0010] S100: Acquire surface point cloud data, and apply the normal vector-guided rolling ball method to the point cloud data to extract the boundary contour of the surface circular hole point cloud.
[0011] S200: Perform boundary segmentation based on Euclidean clustering on the point cloud boundary contours to obtain the clustering results of all boundary point clouds. The clustering results are multiple circular hole contours.
[0012] S300: Obtain the normal vector of the curved surface circular hole by performing a density-based weighted iterative algorithm on each circular hole profile;
[0013] S400: Project the curved circular hole along the normal vector of the curved circular hole onto the plane, and then perform iterative fitting of the projected circular hole point cloud based on the solution of overdetermined equations to obtain the final positioning information.
[0014] Preferably, S100 includes:
[0015] S110: For a finite point cloud P consisting of n points, from any point p in the point set P... i Start, search with p i Calculate the local plane Q in the least-squares sense for the K nearest neighbors. i The normal vector of plane Q is denoted as Bundle As p i The normal vector of a point;
[0016] S120: In p i Within a neighborhood set R centered at a point with a radius of 2r, take p... i A little bit outside p r Calculate p i (x i ,y i ,z i ) and p r (x r ,y r ,z r Two points, and the center of the circle passes through plane Q. iMeanwhile, for a sphere W with radius r, the calculated center coordinates are p0(x0,y0,z0);
[0017] S130: Calculate the other points p within the neighborhood point set R. j (x j ,y j ,z j The distance d from the center of the sphere p0(x0,y0,z0) to the center of the sphere p0(x0,y0,z0) j d j =||(p j -p0)||2, if all d j Since all values are greater than r, this indicates that there are no other points inside the sphere, therefore p i If a point is a boundary point, save it; otherwise, repeat steps S120 to S130 until all points within R have been evaluated.
[0018] S140: Repeat S120-S140 for all remaining points in point set P until all points in P have been judged.
[0019] Preferably, the radius r set in S120 should satisfy the following: the radius r is greater than the point cloud resolution δ and less than the radius η of the circular hole to be identified, that is: δ < r < η.
[0020] Preferably, the center of the sphere calculated in S120 has two values, one inward and one outward, specifically:
[0021] in, It is p i The normal vector of a point; vector P i P r =(d x ,d y ,d z ) = P i -P r =(x i -x r ,y i -y r ,z i -z r ); d is p i and p r The distance between them is d = ||P1P2||2, where ||P1P2||2 represents the 2-norm of the vector;
[0022] Preferably, S300 includes:
[0023] S310: Density weighting: For a point cloud set R = {q1, q2, ..., q...} t}, where t are three-dimensional coordinate data points (x1, y1, z1), (x2, y2, z2), ..., (xt ,y t ,z t ), calculate the average distance of the K neighboring points of each point, and use it as a weight vector W of row t. Then, standardize the resulting weight vector, i.e. Where |||1 represents the l1 norm of the vector, such that their sum is 1;
[0024] S320: Decentrifugation: The centrifuge R0 is obtained by multiplying the point cloud set R with the transpose of the weight vector W. R0 is subtracted from each data point in R to decentrifuge, resulting in a new R'.
[0025] S330: Calculate the covariance matrix S = R'R' T Singular value decomposition is performed on S to find the eigenvalues and eigenvectors of the covariance matrix. The eigenvector V = [a, b, c] corresponding to the smallest eigenvalue is extracted. Then the fitted normal vector is V. The plane equation is ax + by + cz + d = 0, where d = -V·R0. Then the distance between the data points and the plane is calculated to obtain the residual Re.
[0026] S340: Calculate the current total cost c, i.e., c = W·Re·Re, and calculate the difference c_d between the current cost and the previous cost;
[0027] S350: Parameter Update: Points in Re that are less than the scale parameter a are retained, the residual Re is updated, and the weights W are updated using the SA-Cauchy weight function. The calculation formula is as follows: Then update the scaling parameter a, a = a / m, where m is the algorithm scaling value, to prepare for the next iteration; where, if it is the first iteration, the maximum value of the residual Re is used as the scaling parameter a;
[0028] S360: Repeat S310-S350 until the cost difference c_d is less than the preset first threshold or a is less than the preset second threshold. The output V is the normal vector of the circular hole on the surface.
[0029] Preferably, S400 includes:
[0030] S410: Normal vector V = [a, b, c] for the curved surface circular hole T The equation of the plane is V·(X-X0)=0, where the coordinates of the point to be projected are X=[x,y,z]. T The centroid coordinates are X0 = [x0, y0, z0]. T Projecting all points onto this plane yields the coordinates X of the projected points. P =[x p ,y p ,z p ] T The projection formula is X P=V·G+X i Origin cloud coordinates X i =[x i ,y i ,z i ] T , Where |||2 represents the 2-norm of the vector;
[0031] S420: Since the perpendicular bisector of the line connecting any two points on an arc must pass through the center of the circle, the coordinates X of the center can be calculated by solving a system of linear equations. h =(x h ,y h ,z h ) T :
[0032] AX h =L
[0033] Where A refers to the vector distance between any two points. Δx ij It refers to the difference in x-axis coordinates between the j-th point and the i-th point, Δy. ij This refers to the difference in y-axis coordinates between the j-th point and the i-th point, Δz. ij It refers to the difference in z-axis coordinates between the j-th point and the i-th point, Δx ij =x j -x i Δy ij =y j -y i Δz ij =z j -z i ;
[0034] L = [l 12 ,l 13 ,...,l ij ,...,l (t-1)t ] T (1≤i<j≤t),
[0035] S430: After obtaining the coordinates of the center of the circle, iterate through the point cloud data and calculate the distance D from each point to the center of the circle. i =||X i -X h ‖2, the average distance obtained is taken as the radius of the circle, and the calculation formula is: Where the center coordinates X h =(x h ,y h ,z h ) T Get location information
[0036] S440: In order to reduce the fitting error, the fitting circle is iterated. When the preset termination condition is reached, the iteration is stopped, and the final positioning information is the final fitting result.
[0037] Preferably, S440 specifically comprises:
[0038] Calculate the distance from each point to the fitted circle. Determine when Dr i If the value is greater than the set threshold Dr0, delete the point until all points have been evaluated.
[0039] Refit the circle using the remaining points until the difference between the two fitted radii is d. r =r j -r j-1 Less than the set threshold d r0 Alternatively, if the number of iterations j is less than the set threshold j0, the iteration stops, and the final location information is obtained. This is the final fitting result, where r j Let represent the radius obtained by the j-th fitting.
[0040] The aforementioned 3D circle detection method for free-form surfaces is applicable not only to planar point cloud data but also to complex non-planar surfaces, exhibiting strong versatility and applicability. It can handle surfaces with different shapes, curvatures, and surface features, making it suitable for circular hole identification and detection tasks in various industrial scenarios. The normal-vector-guided rolling sphere method extracts the convex hull of the circular hole from the surface point cloud. Since it considers the surface normal vector, the point cloud boundary extracted by the normal-vector-guided rolling sphere method is closer to the actual boundary of the circular hole, providing a reliable foundation for subsequent circular hole localization and fitting. Furthermore, the density / distance-weighted surface circular hole iterative fitting algorithm can filter out outliers in details, further improving the circular hole localization accuracy. To further reduce the influence of outliers on 3D circle fitting, a density / distance-weighted surface circular hole iterative fitting algorithm is proposed. This invention improves the algorithm's noise resistance in two aspects: first, by using density weighting and distance iteration to filter out outliers when determining the circular hole normal vector; and second, by iterating during circular hole fitting to further reduce the influence of outliers on circle fitting, thereby improving localization accuracy. Attached Figure Description
[0041] Figure 1 is a flowchart of a three-dimensional circle detection method for free-form surfaces according to an embodiment of the present invention;
[0042] Figure 2 shows the point cloud data input in one embodiment of the present invention;
[0043] Figure 3 shows the result of extracting the outline of a circular hole in one embodiment of the present invention;
[0044] Figure 4 shows the clustering and segmentation results of circular holes in one embodiment of the present invention;
[0045] Figure 5 shows the positioning result of the circular hole in one embodiment of the present invention;
[0046] Figure 6 shows the error result of the circular hole positioning radius in one embodiment of the present invention;
[0047] Figure 7 shows the error result of the circular hole positioning normal vector in one embodiment of the present invention. Detailed Implementation
[0048] To enable those skilled in the art to better understand the technical solution of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings.
[0049] In one embodiment, as shown in Figure 1, a three-dimensional circle detection method for freeform surfaces includes the following steps:
[0050] S100: Acquire surface point cloud data, and apply the normal vector-guided rolling ball method to the point cloud data to extract the boundary contour of the surface circular hole point cloud.
[0051] S200: Perform boundary segmentation based on Euclidean clustering on the point cloud boundary contours to obtain the clustering results of all boundary point clouds. The clustering results are multiple circular hole contours.
[0052] S300: Obtain the normal vector of the curved surface circular hole by performing a density-based weighted iterative algorithm on each circular hole profile;
[0053] S400: Project the curved circular hole along the normal vector of the curved circular hole onto the plane, and then perform iterative fitting of the projected circular hole point cloud based on the solution of overdetermined equations to obtain the final positioning information.
[0054] In one embodiment, S100 includes:
[0055] S110: For a finite point cloud P consisting of n points, from any point p in the point set P... i Start, search with p i Calculate the local plane Q in the least-squares sense for the K nearest neighbors. i The normal vector of plane Q is denoted as Bundle As p i The normal vector of a point;
[0056] Furthermore, as shown in Figure 2, the input point cloud data in this embodiment consists of 199,909 points, and the radius η of the circular hole is 2.5 mm.
[0057] S120: In p i Within a neighborhood set R centered at a point with a radius of 2r, take p...i A little bit outside p r Calculate p i (x i ,y i ,z i ) and p r (x r ,y r ,z r Two points, and the center of the circle passes through plane Q. i Meanwhile, for a sphere W with radius r, the calculated center coordinates are p0(x0,y0,z0);
[0058] S130: Calculate the other points p within the neighborhood point set R. j (x j ,y j ,z j The distance d from the center of the sphere p0(x0,y0,z0) to the center of the sphere p0(x0,y0,z0) j d j =‖(p j -p0)‖2, if all d j Since all values are greater than r, this indicates that there are no other points inside the sphere, therefore p i If a point is a boundary point, save it; otherwise, repeat steps S120 to S130 until all points within R have been evaluated.
[0059] S140: Repeat S120-S140 for all remaining points in point set P until all points in P have been judged.
[0060] Specifically, in S130, since there are two solutions for the center of the sphere, and the points on the boundary only satisfy the condition that there are no other points inside the outer sphere, it is sufficient if one of the centers of the sphere satisfies the condition.
[0061] In one embodiment, the radius r set in S120 should satisfy the following: the radius r is greater than the point cloud resolution δ and less than the radius η of the circular hole to be identified, that is: δ < r < η.
[0062] Specifically, the radius of the rolling ball is set to r. The larger r is, the larger the rolling ball radius and the fewer boundary points are identified. The set r should satisfy the following: the radius r is greater than the point cloud resolution δ and less than the radius η of the circular hole to be identified, that is: δ < r < η. The larger the value of r, the more points need to be traversed, and the longer the boundary identification process will be. If the value of r is too small, the rolling ball radius will not be able to connect two adjacent points, resulting in failure to identify.
[0063] In this embodiment, the specific process of selecting the rolling sphere radius r is as follows: the point cloud resolution δ is calculated to be 0.257 in the example, r is selected as 1, and the boundary extraction result is shown in Figure 3. The boundary segmentation result in S200 is shown in Figure 4.
[0064] In one embodiment, due to the symmetry of this process, the center of the sphere calculated in S120 has two values, one inward and one outward, specifically:
[0065] in, It is p i The normal vector of a point; vector P i P r =(d x ,d y ,d z ) = P i -P r =(x i -x r ,y i -y r ,z i -z r ); d is p i and p r The distance between them is d = ||P1P2||2, where ||P1P2||2 represents the 2-norm of the vector;
[0066] In one embodiment, S300 includes:
[0067] S310: Density weighting: For a point cloud set R = {q1, q2, ..., q...} t}, where t are three-dimensional coordinate data points (x1, y1, z1), (x2, y2, z2), ..., (x t ,y t ,z t Calculate the average distance of the K neighboring points of each point, and use it as a weight vector W with t columns in row t. Standardize the resulting weight vector. Where |||1 represents the l1 norm of the vector, such that their sum is 1;
[0068] S320: Decentrifugation: The centrifuge R0 is obtained by multiplying the point cloud set R with the transpose of the weight vector W. R0 is subtracted from each data point in R to decentrifuge, resulting in a new R'.
[0069] S330: Calculate the covariance matrix S = R'R' T Singular value decomposition is performed on S to find the eigenvalues and eigenvectors of the covariance matrix. The eigenvector V = [a, b, c] corresponding to the smallest eigenvalue is extracted. Then the fitted normal vector is V. The plane equation is ax + by + cz + d = 0, where d = -V·R0. Then the distance between the data points and the plane is calculated to obtain the residual Re.
[0070] S340: Calculate the current total cost c, i.e., c = W·Re·Re, and calculate the difference c_d between the current cost and the previous cost;
[0071] S350: Parameter Update: Points in Re that are less than the scale parameter a are retained, the residual Re is updated, and the weights W are updated using the SA-Cauchy weight function. The calculation formula is as follows: Then update the scaling parameter a, a = a / m, where m is the algorithm scaling value, to prepare for the next iteration; where, if it is the first iteration, the maximum value of the residual Re is used as the scaling parameter a;
[0072] S360: Repeat S310-S350 until the cost difference c_d is less than the preset first threshold or a is less than the preset second threshold. The output V is the normal vector of the circular hole on the surface.
[0073] Specifically, S310 can reduce the normal vector offset caused by density non-uniformity; the purpose of S320 is to make the data mean zero, because the data mean will affect the subsequent covariance matrix. Centroid removal can eliminate the influence of the data origin and simplify the data; in S350, the algorithm scaling value is set to m = 1.3.
[0074] In one embodiment, S400 includes:
[0075] S410: Normal vector V = [a, b, c] for the curved surface circular hole T The equation of the plane is V·(X-X0)=0, where the coordinates of the point to be projected are X=[x,y,z]. T The centroid coordinates are X0 = [x0, y0, z0]. T Projecting all points onto this plane yields the X coordinates of the projected points. P =[x p ,y p ,z p ] T The projection formula is X P =V·G+X i Origin cloud coordinates X i =[x i ,y i ,z i ] T , Where |||2 represents the 2-norm of the vector;
[0076] S420: Since the perpendicular bisector of the line connecting any two points on an arc must pass through the center of the circle, the coordinates X of the center can be calculated by solving a system of linear equations. h =(x h ,y h ,z h ) T:
[0077] AX h =L
[0078] Where A refers to the vector distance between any two points. Δx ij It refers to the difference in x-axis coordinates between the j-th point and the i-th point, Δy. ij This refers to the difference in y-axis coordinates between the j-th point and the i-th point, Δz. ij It refers to the difference in z-axis coordinates between the j-th point and the i-th point, Δx ij =x j -x i Δy ij =y j -y i Δz ij =z j -z i ;
[0079] L = [l 12 ,l 13 ,...,l ij ,...,l (t-1)t ] T (1≤i<j≤t),
[0080] S430: After obtaining the coordinates of the center of the circle, iterate through the point cloud data and calculate the distance D from each point to the center of the circle. i =‖X i -X h ‖2, the average distance obtained is taken as the radius of the circle, and the calculation formula is: Where the center coordinates X h =(x h ,y h ,z h ) T Get location information
[0081] S440: In order to reduce the fitting error, the fitting circle is iterated. When the preset termination condition is reached, the iteration is stopped, and the final positioning information is the final fitting result.
[0082] In one embodiment, S440 specifically refers to:
[0083] Calculate the distance from each point to the fitted circle. Determine when Dr i If the value is greater than the set threshold Dr0, delete the point until all points have been evaluated.
[0084] Refit the circle using the remaining points until the difference between the two fitted radii is d. r =rj -r j-1 Less than the set threshold d r0 Alternatively, if the number of iterations j is less than the set threshold j0, the iteration stops, and the final location information is obtained. This is the final fitting result, where r j Let represent the radius obtained by the j-th fitting.
[0085] Specifically, the original point cloud data and the fitted spatial circle are finally plotted, as shown in Figure 5; and the center coordinates, radius and normal vector values are displayed. The radius error is shown in Figure 6 and the normal vector error is shown in Figure 7.
[0086] Compared with the prior art, the above-described technical solutions conceived in this invention have the following beneficial effects:
[0087] 1. Versatility and Applicability. This invention is not only applicable to planar point cloud data, but also capable of processing complex non-planar curved surfaces, exhibiting strong versatility and applicability. It can handle curved surfaces with different shapes, curvatures, and surface features, making it suitable for circular hole recognition and detection tasks in various industrial scenarios.
[0088] 2. High Precision. The normal-vector-guided rolling sphere method extracts the convex hull of the circular hole in the surface point cloud. Since it considers the surface normal vector, the point cloud boundary extracted by this method is closer to the actual boundary of the circular hole, providing a reliable foundation for subsequent hole localization and fitting. Furthermore, the density / distance-weighted iterative fitting algorithm for the circular hole can filter out outliers in details, further improving the hole localization accuracy.
[0089] 3. Strong robustness. To further reduce the impact of outliers on 3D circle fitting, a density / distance weighted surface circular hole iterative fitting algorithm is proposed. This invention improves the algorithm's noise resistance in two aspects: first, when determining the circular hole normal vector, density weighting and distance iteration are used to filter out outliers; second, to further reduce the impact of outliers on circle fitting, iteration is performed during circular hole fitting to improve positioning accuracy.
[0090] The above provides a detailed description of a three-dimensional circle detection method for free-form surfaces provided by this invention. Specific examples have been used to illustrate the principles and implementation methods of this invention. The descriptions of the embodiments above are merely for the purpose of helping to understand the core ideas of this invention. It should be noted that those skilled in the art can make various improvements and modifications to this invention without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this invention.
Claims
1. A three-dimensional circle detection method for freeform surfaces, characterized in that, The method includes the following steps: S100: Acquire surface point cloud data, and apply the normal vector-guided rolling ball method to the point cloud data to extract the boundary contour of the surface circular hole point cloud. S200: Perform boundary segmentation based on Euclidean clustering on the point cloud boundary contours to obtain the clustering results of all boundary point clouds. The clustering results are multiple circular hole contours. S300: Obtain the normal vector of the curved surface circular hole by performing a density-based weighted iterative algorithm on each circular hole profile; S400: Project the curved circular hole along the normal vector of the curved circular hole onto the plane, and then perform iterative fitting of the projected circular hole point cloud based on the solution of overdetermined equations to obtain the final positioning information.
2. The method according to claim 1, characterized in that, S100 includes: S110: For a finite point cloud P consisting of n points, from any point p in the point set P... i Start, search with p i Calculate the local plane Q in the least-squares sense for the K nearest neighbors. i The normal vector of plane Q is denoted as Bundle As p i The normal vector of a point; S120: In p i Within a neighborhood set R centered at a point with a radius of 2r, take p... i A little bit outside p r Calculate p i (x i ,y i ,z i ) and p r (x r ,y r ,z r Two points, and the center of the circle passes through plane Q. i Meanwhile, for a sphere W with radius r, the calculated center coordinates are p0(x0,y0,z0); S130: Calculate the other points p within the neighborhood point set R. j (x j ,y j ,z j The distance d from the center of the sphere p0(x0,y0,z0) to the center of the sphere p0(x0,y0,z0) j d j =||(p j -p0)||2, if all d j Since all values are greater than r, this indicates that there are no other points inside the sphere, therefore p i If a point is a boundary point, save it; otherwise, repeat steps S120 to S130 until all points within R have been evaluated. S140: Repeat S120-S140 for all remaining points in point set P until all points in P have been judged.
3. The method according to claim 2, characterized in that, The radius r set in S120 should satisfy the following: the size of the radius r is greater than the point cloud resolution δ and less than the radius η of the circular hole to be identified, that is: δ < r < η.
4. The method according to claim 3, characterized in that, The center of the sphere obtained in S120 has two values, one inward and one outward, specifically: in, It is p i The normal vector of a point; vector P i P r =(d x ,d y ,d z ) = P i -P r =(x i -x r ,y i -y r ,z i -z r ); d is p i and p r The distance between them is d = ||P1P2||2, where ||P1P2||2 represents the 2-norm of the vector; 5. The method according to claim 4, characterized in that, The S300 includes: S310: Density weighting: For a point cloud set R = {q1, q2, ..., q...} t }, where t are three-dimensional coordinate data points (x1, y1, z1), (x2, y2, z2), ..., (x t ,y t ,z t ), calculate the average distance of the K neighboring points of each point, and use it as a weight vector W of row t. Then, standardize the resulting weight vector, i.e. Where |||1 represents the l1 norm of the vector, such that their sum is 1; S320: Decentrifugation: The centrifuge R0 is obtained by multiplying the point cloud set R with the transpose of the weight vector W. R0 is subtracted from each data point in R to decentrifuge, resulting in a new R'. S330: Calculate the covariance matrix S = R'R' T Singular value decomposition is performed on S to find the eigenvalues and eigenvectors of the covariance matrix. The eigenvector V = [a, b, c] corresponding to the smallest eigenvalue is extracted. Then the fitted normal vector is V. The plane equation is ax + by + cz + d = 0, where d = -V·R0. Then the distance between the data points and the plane is calculated to obtain the residual Re. S340: Calculate the current total cost c, i.e., c = W·Re·Re, and calculate the difference c_d between the current cost and the previous cost; S350: Parameter Update: Points in Re that are less than the scale parameter a are retained, the residual Re is updated, and the weights W are updated using the SA-Cauchy weight function. The calculation formula is as follows: Then update the scaling parameter a, a = a / m, where m is the algorithm scaling value, to prepare for the next iteration; where, if it is the first iteration, the maximum value of the residual Re is used as the scaling parameter a; S360: Repeat S310-S350 until the cost difference c_d is less than the preset first threshold or a is less than the preset second threshold. The output V is the normal vector of the circular hole on the surface.
6. The method according to claim 5, characterized in that, The S400 includes: S410: Normal vector V = [a, b, c] for the curved surface circular hole T The equation of the plane is V·(X-X0)=0, where the coordinates of the point to be projected are X=[x,y,z]. T The centroid coordinates are X0 = [x0, y0, z0]. T Projecting all points onto this plane yields the coordinates X of the projected points. P =[x p ,y p ,z p ] T The projection formula is X P =V·G+X i Origin cloud coordinates X i =[x i ,y i ,z i ] T , Where |||2 represents the 2-norm of the vector; S420: Since the perpendicular bisector of the line connecting any two points on an arc must pass through the center of the circle, the coordinates X of the center can be calculated by solving a system of linear equations. h =(x h ,y h ,z h ) T : AX h =L Where A refers to the vector distance between any two points. Δx ij It refers to the difference in x-axis coordinates between the j-th point and the i-th point, Δy. ij This refers to the difference in y-axis coordinates between the j-th point and the i-th point, Δz. ij It refers to the difference in z-axis coordinates between the j-th point and the i-th point, Δx ij =x j -x i Δy ij =y j -y i Δz ij =z j -z i ; S430: After obtaining the coordinates of the center of the circle, iterate through the point cloud data and calculate the distance D from each point to the center of the circle. i =||X i -X h ||2, the average distance obtained is used as the radius of the circle, and the calculation formula is: Where the center coordinates X h =(x h ,y h ,z h ) T Get location information S440: In order to reduce the fitting error, the fitting circle is iterated. When the preset termination condition is reached, the iteration is stopped, and the final positioning information is the final fitting result.
7. The method according to claim 6, characterized in that, The S440 specifically refers to: Calculate the distance from each point to the fitted circle. Determine when Dr i If the value is greater than the set threshold Dr0, delete the point until all points have been evaluated. Refit the circle using the remaining points until the difference between the two fitted radii is d. r =r j -r j-1 Less than the set threshold d r0 Alternatively, if the number of iterations j is less than the set threshold j0, the iteration stops, and the final location information is obtained. This is the final fitting result, where r j Let represent the radius obtained by the j-th fitting.
Citation Information
Cited By
Aircraft part round hole and end face cooperative detection method, device, equipment and medium
CN122170764A