This application is a 371 of international application of PCT application serial no. PCT/CN2020/095987, filed on Jun. 13, 2020, which claims the priority benefit of China application no. 201910581642.8, filed on Jun. 30, 2019. The entirety of each of the above mentioned patent applications is hereby incorporated by reference herein and made a part of this specification.
The disclosure relates to the field of robot vision measurement, and more specifically relates to a method for extracting a boundary of a thin-walled part with small curvature based on three-dimensional point cloud.
The thin-walled part with low curvature is used as a basic part in special fields, such as the aircraft wing and fuselage skin in the aviation field, and the rocket skin in the aerospace field. Automatic, high-efficiency, and high-precision extraction of the boundary of the thin-walled part with low curvature is the prerequisite for automatic processing, detection, and error evaluation of the thin-walled parts. Although there are several mature general-purpose point cloud processing software for extracting the boundary of the point cloud, the following issues arise during actual application to production.
1) When processing noise data, manual intervention is required for manual deletion. 2) Software operators are required to have relatively high computer knowledge, software operation knowledge, and relevant knowledge for computer graphics, so the qualification for operators is high. 3) For the same point cloud piece, different people may obtain different boundary curves when performing software operations. 4) The extraction from the original point cloud data to the target boundary curve is all performed on the point cloud of the original density, which requires high processor hardware performance and long processing time.
In view of the defects or improvement requirements of the prior art, the disclosure provides a method for extracting a boundary of a thin-walled part with small curvature based on three-dimensional point cloud. Through extracting the boundary by adopting triangular patch, and then selecting the contour of a part to be processed in the boundary by adopting triangular patch, the noise in the original point cloud data is removed. Then, through orderly extracting boundary points within a plane, and finally mapping ordered boundary points within the plane into a three-dimensional boundary point cloud band, the ordered boundary points in the three-dimensional boundary point cloud band are obtained. The boundary contour of the part to be processed obtained by such method has high accuracy and small error, which improves the collection efficiency of the boundary of the thin-walled part with small curvature.
To achieve the above objective, according to the disclosure, a method for extracting a boundary of a thin-walled part with small curvature based on three-dimensional point cloud is provided. The method includes the following steps.
(a) Point cloud data of a part to be processed is obtained.
(a1) The point cloud data of the part to be processed is collected. Initial point cloud data, including noise, of the part to be processed is obtained. The initial point cloud data is preprocessed to reduce density of the point cloud data, so as to obtain low-density point cloud data. Euclidean cluster is performed on points in the low-density point cloud data, so that the low-density point cloud data is divided into multiple point cloud pieces. Points in each of the point cloud pieces are connected to form a triangle to implement triangulation of each point cloud piece, so as to obtain multiple triangular mesh surfaces.
(a2) A boundary vertex of each of the triangular mesh surfaces is extracted to obtain contours of multiple triangular mesh surfaces, so as to obtain contours of all triangular mesh surfaces. A selection criteria for the contour of the part to be processed is set. The contour of the part to be processed is selected among the contours of all the triangular mesh surfaces. Points included in the contour are the point cloud data corresponding to the part to be processed.
(b) An ordered boundary is extracted.
(b1) Each point on the contour of the part to be processed is used as a seed point. Search is performed according to a preset radius with each seed point as the center to obtain a point cloud block of each seed point. The point cloud blocks of all seed points form a three-dimensional boundary point cloud band.
(b2) All points in the three-dimensional boundary point cloud band are fitted to form a plane. Then, all the points on the three-dimensional boundary point cloud band are projected into the plane to obtain a plane boundary point cloud band. Points in the plane boundary point cloud band are extracted according to set rules to obtain ordered boundary points within the plane. Corresponding points in the three-dimensional boundary point cloud band are arranged according to an order of the ordered boundary points within the plane to obtain ordered boundary points in the three-dimensional boundary point cloud band. After the ordered boundary points in the three-dimensional boundary point cloud band are sequentially connected, the boundary contour of the part to be processed is obtained, that is, the orderly extraction of the boundary of the part to be processed of the three-dimensional point cloud is implemented.
Further preferably, in step (a1), the preprocessing adopts equidistant down-sampling or curvature adaptive sampling.
Further preferably, in step (a2), the extraction of the boundary vertex of each of the triangular mesh surfaces is preferably performed according to the following manner. For each triangular mesh surface, a number of appearances of each edge in each triangular mesh among all triangular meshes is calculated. Two vertices corresponding to the edge that only appears in one triangular mesh are boundary vertices. The two vertices are extracted to implement the extraction of the boundary vertex of the triangular mesh surface.
Further preferably, in step (a2), the setting of the selection criteria for the contour of the part to be processed is preferably performed according to the following manner. The contours of all the triangular mesh surfaces are compared with the theoretical contour of the part to be processed. A contour of a triangular mesh surface closest to the theoretical contour of the part to be processed is used as the contour of the part to be processed. Alternatively, a number of points included in the contours of all the triangular mesh surfaces are compared. A contour of a triangular mesh surface with the most number of points is used as the contour of the part to be processed.
Further preferably, in step (b2), the extraction of the points in the plane boundary point cloud band according to the set rules to obtain the ordered boundary points within the plane is preferably performed according to the following steps.
(b21) A coordinate system is established in the plane boundary point cloud band. An initial point p0 is selected. k adjacent points adjacent to the initial point are obtained. An included angle between a vector formed by connecting the initial point with each of the adjacent points and a positive X-axis direction is calculated to obtain k included angles. The adjacent point on the vector with the largest included angle is a second ordered point p1. The vector with the largest included angle {right arrow over (n)}1. A vector set with the largest included angle is set. The {right arrow over (n)}1 is added to the vector set.
(b22) For any ordered point pi, the manner of obtaining a next ordered point is as follows.
In step S1, for an i-th ordered point pi and a corresponding vector {right arrow over (n)}i in the vector set, k adjacent points adjacent to the ordered point pi are obtained.
In step S2, an included angle between a vector formed by connecting the ordered point pi with each of the adjacent points and the vector {right arrow over (n)}1 is calculated to obtain k included angles. The adjacent point on the vector with the largest included angle is an i+1-th ordered point pi+1. The vector with the largest included angle is {right arrow over (n)}i+1. The vector {right arrow over (n)}i+1 is added to the vector set.
In step S3, whether the vector {right arrow over (n)}i+1 intersects any vector in the vector set is judged.
When there is an intersection, the ordered point pi+1 is deleted from the k adjacent points, and step S2 is returned for remaining k−1 points.
When there is no intersection, whether the ordered point pi+1 and the initial point p0 are the same point is judged.
When the ordered point pi+1 and the initial point p0 are not the same point, i=i+1 and step S1 is returned.
When the ordered point pi+1 and the initial point p0 are the same point, the process ends, and required ordered boundary points are obtained so far, where k is a positive integer not less than 3, and i is a positive integer greater than 1.
Further preferably, in steps (b21) and S1, a manner of k nearest neighbor search is adopted preferably to obtain the k adjacent points adjacent to the initial point and obtain the k adjacent points adjacent to the ordered point pi.
Further preferably, a point with the smallest average X-axis and Y-axis coordinate values in the plane boundary point cloud band is adopted as the initial point p0 preferably.
Further preferably, in step (a1), the connection of the points in each of the point cloud pieces to form the triangle is preferably performed by adopting a greedy projection triangulation algorithm.
Further preferably, in step (b2), the fitting of all the points in the three-dimensional boundary point cloud band to form the plane is preferably performed by adopting the least squares method.
In general, compared with the prior art, the above technical solutions conceived by the disclosure can achieve the following beneficial effects.
1. The disclosure obtains the point cloud piece through performing Euclidean cluster on the point cloud data. After triangulating the point cloud piece, the contour of the point cloud piece is extracted and the contour of the part to be processed is selected. On the one hand, the denoising processing of the original point cloud data is implemented. On the other hand, the initial extraction of the contour of the part to be processed is implemented.
2. The method provided by the disclosure performs the crude extraction of the contour of the point cloud piece, then performs the orderly extraction of the point cloud boundary within the plane, and finally maps the same into the three-dimensional boundary point cloud band, so as to obtain the ordered boundary in the three-dimensional boundary point cloud band. The method first crudely extracts and then finely extracts, which adapts to the high-efficiency and high-precision extraction of boundaries of large-scale scattered point clouds.
3. The disclosure implements the orderly extraction of the boundary points on the plane boundary point cloud band through adopting the boundary point search based k neighboring features, which overcomes the inability of conventional point cloud boundary extraction algorithms to achieve the ordering of the boundary point set, and solves the defect of the inability of conventional boundary point set ordering algorithms to adapt to the non-convex polygon point set.
4. The disclosure projects the curved surface point cloud in three-dimensional space onto the main plane of the point cloud, which targets the characteristics of the thin-walled part with low curvature. For parts with large curvature, when three-dimensional curved surface point clouds thereof are projected to a plane, the overlap of point clouds may occur. Such issue is not present for parts with small curvature. Therefore, the method provided by the disclosure is more suitable for the parts with small curvature. In addition, the method uses the cursor association of the point cloud through dimensionality reduction processing to efficiently and stably implement the extraction of the boundary of a spatial curved surface with low curvature.
For the objectives, technical solutions, and advantages of the disclosure to be clearer, the disclosure is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the disclosure, but not to limit the disclosure. In addition, the technical features involved in the various embodiments of the disclosure described below may be combined with each other as long as there is no conflict therebetween.
As shown in
(a) Point cloud data of a part to be processed is obtained.
(a1) The point cloud data of the part to be processed is collected. Initial point cloud data, including noise, of the part to be processed is obtained. The initial point cloud data is preprocessed to reduce density of the point cloud data, so as to obtain low-density point cloud data. Euclidean cluster is performed on points in the low-density point cloud data, so that the low-density point cloud data is divided into multiple point cloud pieces. Points in each of the point cloud pieces are connected to form a triangle to implement triangulation of each point cloud piece, so as to obtain multiple triangular mesh surfaces.
In the embodiment, as shown in
(a2) A boundary vertex of each of the triangular mesh surfaces is extracted to obtain contours of multiple triangular mesh surfaces, so as to obtain contours of all triangular mesh surfaces. A selection criteria for the contour of the part to be processed is set. The contour of the part to be processed is selected among the contours of all the triangular mesh surfaces. Points included in the contour are the point cloud data corresponding to the part to be processed.
In the embodiment, as shown in
(b) An ordered boundary is extracted.
(b1) Each point on the contour of the part to be processed is used as a seed point. Search is performed according to a preset radius with each seed point as the center to obtain a point cloud block of each seed point. The point cloud blocks of all seed points form a three-dimensional boundary point cloud band.
(b2) All points in the three-dimensional boundary point cloud band are fitted to form a plane. Then, all the points on the three-dimensional boundary point cloud band are projected into the plane to obtain a plane boundary point cloud band. Points in the plane boundary point cloud band are extracted according to set rules to obtain ordered boundary points within the plane. Corresponding points in the three-dimensional boundary point cloud band are arranged according to an order of the ordered boundary points within the plane to obtain ordered boundary points in the three-dimensional boundary point cloud band. After the ordered boundary points in the three-dimensional boundary point cloud band are sequentially connected, the boundary contour of the part to be processed is obtained, that is, the orderly extraction of the boundary of the part to be processed of the three-dimensional point cloud is implemented.
Further, in step (a1), the preprocessing adopts equidistant down-sampling or curvature adaptive sampling.
Further, in step (a2), the extraction of the boundary vertex of each of the triangular mesh surfaces is preferably performed according to the following manner. For each triangular mesh surface, a number of appearances of each edge in each triangular mesh among all triangular meshes is calculated. Two vertices corresponding to the edge that only appears in one triangular mesh are boundary vertices. The two vertices are extracted to implement the extraction of the boundary vertex of the triangular mesh surface.
(1) Each edge in each triangular patch is defined as a directed edge, which is constituted by a small vertex as a starting point pti(xi, yi, zi) and a large vertex as an ending point ptj(xj, yj, zj), of global cursors (where i and j are the global cursors of the point, and i<j).
(2) All directed edges in the point cloud object based on triangular patch are traversed, and the directed edges with the same starting point are clustered.
(3) A set is constituted by the directed edges with the same starting point. All edges in the set are traversed. A number of appearances of each edge is counted. Vertices ptconsti and ptti corresponding to the directed edge that appears only once are added to the end of an disordered boundary point queue QueueEdgePt. Global cursors consti and ti corresponding to the vertices ptconsti and ptti are added to the end of a boundary point cursor queue QueueEdgeIndex.
(4) Step (2) and step (3) are performed for all directed edge sets with the same starting point. The disordered boundary point queue QueueEdgePt the triangulated point cloud object and the boundary point cursor queue QueueEdgelndex corresponding to the disordered boundary point are obtained. Through deleting repeated points in the disordered boundary point queue QueueEdgePt, a boundary vertex set of the triangulated point cloud object is obtained.
Further, in step (a2), the setting of the selection criteria for the contour of the part to be processed is preferably performed according to the following manner. The contours of all the triangular mesh surfaces are compared with the theoretical contour of the part to be processed. A contour of a triangular mesh surface closest to the theoretical contour of the part to be processed is used as the contour of the part to be processed. Alternatively, a number of points included in the contours of all the triangular mesh surfaces are compared. A contour of a triangular mesh surface with the most number of points is used as the contour of the part to be processed.
Further, in step (b2), the extraction of the points in the plane boundary point cloud band according to the set rules to obtain the ordered boundary points within the plane is preferably performed according to the following steps.
(b21) A coordinate system is established in the plane boundary point cloud band. An initial point p0 is selected. k adjacent points adjacent to the initial point are obtained. An included angle between a vector formed by connecting the initial point with each of the adjacent points and a positive X-axis direction is calculated to obtain k included angles. The adjacent point on the vector with the largest included angle is a second ordered point p1. The vector with the largest included angle is {right arrow over (n)}1. A vector set with the largest included angle is set. The {right arrow over (n)}1 is added to the vector set.
(b22) As shown in
In step S1, for an i-th ordered point pi and a corresponding vector {right arrow over (n)}i in the vector set, k adjacent points adjacent to the ordered point pi are obtained. As shown in
In step S2, an included angle between a vector formed by connecting the ordered point pi with each of the adjacent points and the vector {right arrow over (n)}1 is calculated to obtain k included angles. The adjacent point on the vector with the largest included angle is an i+1-th ordered point pi+1. The vector with the largest included angle is {right arrow over (n)}i+1. The vector {right arrow over (n)}i+1 is added to the vector set.
In step S3, whether the vector {right arrow over (n)}i+1 intersects any vector in the vector set is judged.
When there is an intersection, the ordered point pi+1 is deleted from the k adjacent points, and r step S2 is returned for remaining k−1 points.
When there is no intersection, whether the ordered point pi+1 and the initial point p0 are the same point is judged.
When the ordered point pi+1 and the initial point p0 are not the same point, i=i+1 and step S1 is returned.
When the ordered point pi+1 and the initial point p0 are the same point, the process ends, and required ordered boundary points are obtained so far, where k is a positive integer not less than 3, and i is a positive integer greater than 1. As shown in
Further, in steps (b21) and S1, a manner of k nearest neighbor search is adopted preferably to obtain the k adjacent points adjacent to the initial point and obtain the k adjacent points adjacent to the ordered point pi.
Further, a point corresponding to the smallest X-axis and Y-axis coordinate values in the plane boundary point cloud band is adopted as the initial point p0 preferably. As shown in
Further, in step (b2), the fitting of all points in the three-dimensional boundary point cloud band to form a plane is preferably performed by adopting the least squares method. Specifically, the general expression of the plane equation is:
Let
then, z=a0x+a1y+a2.
The plane equation fitting for a series of n points (n>=3), (xi, yi, zi), i=0, 1, . . . , n−1, there is
which is the smallest, and
That is:
There is
Solving the above linear equations gives: a0, a1, a2.
Therefore, A,B,C are normalized into a unit direction vector to obtain a normal vector [normalA, normalB, normalC] (normalC>0) of the plane.
In the implementation of the disclosure, an area-array scanner is adopted to obtain high-density scattered point cloud data. The point cloud data amount collected at a time may be up to 5 million. In order to ensure the quality of the point cloud collection by the area-array scanner, the reflective surface needs to be pretreated with a contrast agent that meets the requirements of industrial field applications.
The general data amount of spliced point cloud data may be up to 20-30 million levels. In order to speed up the point cloud processing, the equidistant down-sampling is first performed on the point cloud to reduce the point cloud data to below million levels.
Persons skilled in the art may easily understand that the above descriptions are only preferred embodiments of the disclosure and are not intended to limit the disclosure. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the disclosure should be included in the protection scope of the disclosure.
Number | Date | Country | Kind |
---|---|---|---|
201910581642.8 | Jun 2019 | CN | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/CN2020/095987 | 6/13/2020 | WO | 00 |
Publishing Document | Publishing Date | Country | Kind |
---|---|---|---|
WO2021/000719 | 1/7/2021 | WO | A |
Number | Name | Date | Kind |
---|---|---|---|
9858640 | Earl | Jan 2018 | B1 |
10099372 | Vu | Oct 2018 | B2 |
10198872 | Lurie | Feb 2019 | B2 |
10319146 | Steinbach | Jun 2019 | B2 |
10579875 | Dal Mutto | Mar 2020 | B2 |
10607373 | Mammou | Mar 2020 | B2 |
10691979 | Dal Mutto | Jun 2020 | B2 |
10776639 | Steinberg | Sep 2020 | B2 |
10776651 | Yuvaraj | Sep 2020 | B2 |
10867430 | Lucas | Dec 2020 | B2 |
10916035 | Kroeger | Feb 2021 | B1 |
10932890 | Sant | Mar 2021 | B1 |
11030801 | Huber | Jun 2021 | B2 |
Number | Date | Country |
---|---|---|
109191484 | Jan 2019 | CN |
109872397 | Jun 2019 | CN |
110322464 | Oct 2019 | CN |
Entry |
---|
“International Search Report (Form PCT/ISA/210) of PCT/CN2020/095987,” dated Sep. 16, 2020, pp. 1-5. |
Zeng Qihong, et al., “Building Roof Boundary Extraction from LiDAR Point Cloud,” Geomatics and Information Science of Wuhan University, vol. 34, Apr. 2009, pp. 383-386. |
Number | Date | Country | |
---|---|---|---|
20210174121 A1 | Jun 2021 | US |