A method for generating point cloud sections
By segmenting and classifying point cloud data, obtaining cross-sectional data using projection or intersection methods, and determining the polyline array through a nearest neighbor search algorithm, the problems of high complexity and low precision of point cloud data are solved, and efficient cross-sectional data acquisition is achieved.
Patent Information
- Application Number
- CN202210248373.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-14
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2042-03-14
AI Technical Summary
In the prior art, cross-sectional data obtained by measuring point cloud data with a caliper has high complexity and large precision errors, resulting in low efficiency in obtaining cross-sectional data.
The point cloud data is segmented using preset plane positions, cross-sectional data is obtained using projection or intersection methods, and the polyline array is determined through a nearest neighbor search algorithm, simplifying the point cloud data processing flow.
By segmenting and classifying point cloud data, the difficulty of applying point cloud data is reduced and the efficiency and accuracy of obtaining cross-sectional data are improved.
Smart Images

Figure CN114581466B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vision, and in particular to a method for generating point cloud sections. Background Art
[0002] In the field of 3D vision, the point cloud data of the object to be measured obtained through 3D scanning equipment can reflect the three-dimensional geometric shape of the visible surface of the object to be measured and its position information in physical space.
[0003] In related technologies, slicing technology is used to obtain, for example, Figure 1 Scattered cross-sectional data is shown, and plane contour feature points are obtained from the cross-sectional data; wherein, cross-sectional data of the object to be measured at a specific position can be obtained, and multiple calipers can be used to measure the point cloud data; however, the point cloud data of the object to be measured is a large amount of data, a complex shape, and a scattered and disordered point cloud, which makes the measurement by caliper highly complex and has a large precision error, resulting in low efficiency in obtaining cross-sectional data. Summary of the Invention
[0004] This application provides a method for generating a point cloud section to solve the technical problem.
[0005] In order to achieve the above objectives, the embodiments of the present application adopt the following technical solutions:
[0006] The present application provides a method for generating a point cloud section, the method comprising:
[0007] Obtain point cloud data of the object to be measured;
[0008] Segmenting the point cloud data of the object to be measured according to a preset plane position to obtain segmented point cloud data, wherein the preset plane position includes an unbounded plane or a bounded plane;
[0009] The segmentation points in the segmented point cloud data are obtained by projection method or intersection method;
[0010] The cross-sectional data points in the cross-sectional data are used to determine a polyline array according to a nearest neighbor search algorithm.
[0011] In one implementation, when the preset plane position is an unbounded plane, the segmented point cloud data is obtained through the following steps:
[0012] Obtaining a first distance from each point in the point cloud data of the object to be measured to the unbounded plane;
[0013] Segmentation point cloud data is determined, where the segmentation point cloud data is composed of segmentation points, and a first distance between the segmentation points is less than a preset distance threshold.
[0014] In one implementation, when the preset plane position is a bounded plane, the segmented point cloud data is obtained through the following steps:
[0015] Constructing a three-dimensional solid figure through the bounded plane and a preset distance threshold;
[0016] Determine segmentation point cloud data, where the segmentation point cloud data is composed of segmentation points, and the segmentation points are points of the point cloud data of the object to be measured within the three-dimensional solid figure.
[0017] In one possible implementation, when the cross-sectional data is obtained by a projection method of the segmented point cloud data, the projection method includes the following steps:
[0018] Determine a projection point as a cross-sectional data point, wherein the projection point is a point where the segmentation point is projected onto the first plane, and the distance between the segmentation point and the first plane is the smallest;
[0019] Cross-sectional data are determined according to the cross-sectional data points.
[0020] In one implementable manner, when the cross-sectional data is obtained by the segmented point cloud data through a cross method:
[0021] Connect the split points with the smallest distance on both sides of the second plane to obtain the intersection line;
[0022] An intersection point is determined as a cross-sectional data point, where the intersection point is an intersection point of the intersection line and the second plane.
[0023] Cross-sectional data are determined according to the cross-sectional data points.
[0024] In one implementation, the nearest neighbor search algorithm includes a K nearest neighbor search algorithm and an R nearest neighbor search algorithm.
[0025] In one possible implementation, determining a polyline array from cross-sectional data points in the cross-sectional data according to a nearest neighbor search algorithm includes:
[0026] Determine the cross-sectional data point with the smallest horizontal coordinate in the cross-sectional data as the starting point P1;
[0027] The starting point P1 determines the intermediate point P2 closest to the starting point P1 through the K nearest neighbor search algorithm, and the distance between the starting point P1 and the intermediate point P2 is less than the preset point distance threshold;
[0028] Determine the middle point Pi-1 according to the K nearest neighbor search algorithm;
[0029] When the K nearest neighbor points of the middle point Pi-1 are all determined, the R nearest neighbor search algorithm is performed on the middle point Pi-1. When all points within the radius R of the middle point Pi-1 are determined, a polyline is obtained, which is obtained by connecting the starting point P1 to the middle point Pi-1;
[0030] Multiple polylines constitute a polyline array;
[0031] The radius in the R nearest neighbor search algorithm is equal to the preset point distance threshold.
[0032] In one implementable method, the cross-sectional data points in the cross-sectional data determine the polyline array according to the nearest neighbor search algorithm, and also include: when the K nearest neighbor points of the middle point Pi-1 are all determined, the R nearest neighbor search algorithm is performed on the middle point Pi-1, and when there is an undetermined middle point Pi within the radius R of the middle point Pi-1, the middle point Pi is used as the starting point of the new polyline.
[0033] In one implementable method, the cross-sectional data points in the cross-sectional data determine the polyline array according to the nearest neighbor search algorithm, and also include: when there is an undetermined intermediate point Pi among the K nearest neighbor points of the intermediate point Pi-1, the intermediate point Pi is used as the starting point of the new polyline.
[0034] In one implementation, the starting point of the new polyline is determined by a K-nearest neighbor search algorithm.
[0035] As can be seen from the above technical solutions, the present application provides a method for generating a point cloud section, including obtaining point cloud data of an object to be measured; segmenting the point cloud data of the object to be measured according to a preset plane position to obtain segmented point cloud data, wherein the preset plane position includes an unbounded plane or a bounded plane; obtaining section data by the segmentation points in the segmented point cloud data through a projection method or a cross method; determining a polyline array of section data points in the section data according to a nearest neighbor search algorithm. The present application reduces the difficulty of application in large point cloud data by using section data at unbounded planes or bounded plane positions; segmenting point cloud data according to the density or sparseness of point cloud data or actual needs; connecting the section data into polylines, and performing measurement and detection operations after classifying the point cloud data, thereby simplifying the processing flow and improving efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0037] Figure 1 This is a schematic diagram of cross-sectional data of the prior art of this application;
[0038] Figure 2 This is a flow chart of a method for generating a point cloud section according to an embodiment of the present application;
[0039] Figure 3 This is a schematic diagram of constructing a three-dimensional cuboid when the bounded plane is a three-dimensional rectangle in an embodiment of the present application;
[0040] Figure 4 This is a schematic diagram of constructing a three-dimensional cylinder when the bounded plane is a three-dimensional circle in an embodiment of the present application;
[0041] Figure 5 Schematic diagram of the projection method in the embodiment of the present application;
[0042] Figure 6 This is a schematic diagram of the crossover method in the embodiment of the present application;
[0043] Figure 7 This is a flow chart of determining a polyline array in an embodiment of the present application;
[0044] Figure 8 for Figure 1 A schematic diagram of a polyline array is obtained by a point cloud section generation method of the present application;
[0045] Among them: 10-3D cuboid; 11-3D rectangle; 20-3D cylinder; 21-3D circle; 30-first plane; 31-division point; 32-projection point; 33-second plane; 34-intersection point. DETAILED DESCRIPTION
[0046] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.
[0047] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0048] In related technologies, slicing technology is used to obtain, for example, Figure 1 Scattered cross-sectional data is shown, and plane contour feature points are obtained from the cross-sectional data; wherein, cross-sectional data of the object to be measured at a specific position can be obtained, and multiple calipers can be used to measure the point cloud data; however, the point cloud data of the object to be measured is a large amount of data, a complex shape, and a scattered and disordered point cloud, which makes the measurement by caliper highly complex and has a large precision error, resulting in low efficiency in obtaining cross-sectional data.
[0049] The present application embodiment provides a method for generating a point cloud section, such as Figure 2 As shown, the method includes the following steps:
[0050] S101. Obtain point cloud data of the object to be measured.
[0051] The point cloud data of the object to be measured is obtained through 3D scanning equipment. Each point cloud data includes three-dimensional coordinates and may also contain color information (RGB) or reflection intensity information (Intensity). It can reflect the three-dimensional geometric shape of the visible surface of the object to be measured and its position information in physical space.
[0052] S102 : Segment the point cloud data according to a preset plane position to obtain segmented point cloud data.
[0053] The preset plane position includes two forms: unbounded plane and bounded plane. Among them, the unbounded plane is a plane without boundaries, which refers to a plane constructed by points and normal vectors; the bounded plane is a plane with boundaries, which can be a three-dimensional rectangle, a three-dimensional circle, a three-dimensional triangle, a three-dimensional parallelogram, etc.
[0054] When the preset plane position is an unbounded plane, the first distance from each point in the point cloud data of the object to be measured to the unbounded plane is obtained. If the first distance is less than the preset distance threshold, the corresponding point is the segmentation point; all segmentation points constitute the segmentation point cloud data.
[0055] When the preset plane position is a bounded plane, a three-dimensional figure is constructed using the bounded plane and the distance threshold. Points where the point cloud data of the object under test falls within the three-dimensional figure are segmentation points, which form the segmented point cloud data. Using different bounded planes allows for different cross-sectional data to be obtained, expanding the scope of application.
[0056] The three-dimensional solid figure is divided into two parts of the same size and shape by the bounded plane; wherein, Figure 3 As shown, when the bounded plane is a three-dimensional rectangle 11, the three-dimensional rectangle 11 constructs a three-dimensional cuboid 10 through a preset distance threshold X, and the points where the point cloud data of the object to be measured falls between the six faces of the three-dimensional cuboid 10 are segmentation points. Figure 4 As shown, when the bounded plane is a three-dimensional circle 21, the three-dimensional circle 21 constructs a three-dimensional cylinder 20 through a preset distance threshold Y; the point cloud data of the object to be measured falls between the two planes of the three-dimensional cylinder 20 and the point where the distance from the point to the central axis of the cylinder is less than the radius of the cylinder is the segmentation point.
[0057] S103 , obtaining cross-sectional data by segmenting the point cloud data through projection method and / or intersection method.
[0058] The segmentation point cloud data is projected to obtain cross-sectional data by a projection method, wherein the segmentation point is projected onto a first plane, and when the distance between the segmentation point and the first plane is the smallest, a projection point is determined on the first plane and used as a cross-sectional data point; the projection points corresponding to all segmentation points are obtained to form cross-sectional data; Figure 5 As shown, in the three-dimensional space, the projection point 32 of the segmentation point 31 to the first plane 30 is the point on the first plane 30 where the segmentation point 31 with the shortest distance to the first plane 30 is projected.
[0059] The segmented point cloud data is obtained by the intersection method, which is to obtain the cross-sectional data by intersecting the intersection line of the segmentation point on one side of the second plane and the nearest segmentation point on the other side of the second plane with the second plane, and then obtain the intersection point, and use the intersection point as the cross-sectional data point, and obtain all the intersection points to form the cross-sectional data. Figure 6 As shown, the intersection line of the segmentation points 31 on both sides of the second plane 33 is obtained, and the intersection point 34 of the intersection line and the second plane is used as the cross-sectional data point, wherein the intersection line is connected by the segmentation points with the smallest distance on both sides of the second plane. The segmentation point is determined by the segmentation point on one side of the second plane according to the nearest neighbor method to determine the nearest segmentation point on the other side of the second plane, and the above two segmentation points are connected to obtain the intersection line.
[0060] In one embodiment, the projection method and the intersection method are used in combination to obtain cross-sectional data. For example, projection is performed at a point that is 1 / 2 of a preset distance threshold, and the intersection method is used to obtain cross-sectional data when the distance is greater than 1 / 2 of the preset distance threshold.
[0061] The amount of cross-sectional data obtained is much smaller than the amount of point cloud data of the object to be measured.
[0062] S104. Determine a polyline array based on the cross-sectional data points in the cross-sectional data according to a nearest neighbor search algorithm.
[0063] In this application, a multi-line array is determined from cross-sectional data using the K-nearest neighbor search algorithm and the R-nearest neighbor search algorithm. The K-nearest neighbor search algorithm finds the K nearest points to a point. The R-nearest neighbor search algorithm (i.e., the radius neighbor search algorithm) finds all points within a radius R of a point.
[0064] The process of determining the polyline array, such as Figure 7 As shown, the specific steps include:
[0065] S201, determining the cross-sectional data point with the smallest horizontal coordinate in the cross-sectional data as the starting point P1;
[0066] Determine whether there are any cross-section data points in the cross-section data, that is, whether all cross-section data points have been traversed.
[0067] S202 , the starting point P1 determines the intermediate point P2 closest to the starting point through a K-nearest neighbor search algorithm, when the distance between the starting point P1 and the intermediate point P2 is less than a preset point distance threshold.
[0068] S203: Determine the intermediate point Pi-1 (i≥3). For example, when i=3, determine the intermediate point P3 closest to the intermediate point P2 according to the K-nearest neighbor search algorithm.
[0069] Determine whether all K neighboring points of the middle point Pi-1 have been determined.
[0070] When the K nearest neighbor points of the middle point Pi-1 are all determined, S204 , an R nearest neighbor search algorithm is performed on the middle point Pi-1.
[0071] Determine whether all points within the radius R of the middle point Pi-1 have been determined. The radius in the R nearest neighbor search algorithm is equal to the preset point distance threshold.
[0072] When all points within the radius R of the middle point Pi-1 are determined, S205 , the starting point P1 to the middle point Pi-1 are connected to form a polyline.
[0073] When no point within the radius R of the intermediate point Pi-1 is determined, in step S206, the intermediate point Pi-1 is determined by the R nearest neighbor search algorithm, and the intermediate point Pi is used as the starting point P1 to proceed to step S202.
[0074] When there are undetermined points among the K nearest neighbor points of the intermediate point Pi-1, S207, the intermediate point Pi-1 determines the intermediate point Pi through the K nearest neighbor search algorithm, takes the intermediate point Pi as the starting point P1, and performs step S202.
[0075] When all the cross-sectional data points in the cross-sectional data are determined, that is, when all the cross-sectional data points are traversed, the above-mentioned set of polylines constitutes a polyline array. The polyline array is used to distinguish different shapes in the cross-sectional data. Figure 1 For example, through the point cloud section generation method of this application, we can get Figure 8 The array of polylines shown.
[0076] As can be seen from the above technical solutions, the present application provides a method for generating a point cloud section, including obtaining point cloud data of an object to be measured; segmenting the point cloud data of the object to be measured according to a preset plane position to obtain segmented point cloud data, wherein the preset plane position includes an unbounded plane or a bounded plane; obtaining section data from the segmentation points in the segmented point cloud data by a projection method or an intersection method; determining a polyline array of section data points in the section data according to a nearest neighbor search algorithm. The present application reduces the difficulty of application in a large amount of point cloud data by using section data at the position of an unbounded plane or a bounded plane. Point cloud data can be segmented according to the density or sparseness of point cloud data or actual needs. For example, a smaller preset distance threshold can be set in dense point cloud data to obtain section data. If more section data is desired, the preset distance threshold can be set to a larger value; the section data is connected into polylines, and measurement and detection operations are performed after the point cloud data is classified, thereby simplifying the processing flow and improving efficiency.
[0077] The above content is only for explaining the technical idea of the present application and cannot be used to limit the protection scope of the present application. Any changes made on the basis of the technical solution in accordance with the technical idea proposed in the present application shall fall within the protection scope of the claims of the present application.
[0078] In addition, unless expressly stated in the claims, the order of the processing elements and sequences described in this application, the use of alphanumeric characters, or the use of other names are not intended to limit the order of the processes and methods of this application. Although the above disclosure discusses some embodiments currently considered useful through various examples, it should be understood that such details are only for illustrative purposes, and the attached claims are not limited to the disclosed embodiments. On the contrary, the claims are intended to cover all modifications and equivalent combinations that are consistent with the essence and scope of the embodiments of this application. For example, although the system components described above can be implemented by hardware devices, they can also be implemented only by software solutions, such as installing the described system on an existing server or mobile device.
[0079] Similarly, it should be noted that, in order to simplify the description of the present disclosure and thus facilitate understanding of one or more embodiments, the foregoing descriptions of the embodiments of the present disclosure sometimes combine multiple features into a single embodiment, figure, or description thereof. However, this disclosure method does not mean that the subject matter of the present disclosure requires more features than those recited in the claims. In fact, the features of an embodiment may be fewer than all the features of a single embodiment disclosed above.
[0080] Each patent, patent application, patent application disclosure, and other materials, such as articles, books, specifications, publications, documents, etc., cited in this application is hereby incorporated by reference in its entirety. This includes application history documents that are inconsistent with or conflict with the content of this application, as well as documents (currently or subsequently attached to this application) that limit the broadest scope of the claims of this application. It should be noted that if the descriptions, definitions, and / or use of terms in the accompanying materials of this application are inconsistent or conflicting with the content of this application, the descriptions, definitions, and / or use of terms in this application shall prevail.
Claims
1. A method for generating a point cloud section, characterized in that: The method comprises: Obtain point cloud data of the object to be measured; Segmenting the point cloud data of the object to be measured according to a preset plane position to obtain segmented point cloud data, wherein the preset plane position includes an unbounded plane or a bounded plane; The segmentation points in the segmented point cloud data are obtained by projection method and / or intersection method; The cross-sectional data points in the cross-sectional data are determined to form a polyline array according to a nearest neighbor search algorithm; When the preset plane position is an unbounded plane, the segmented point cloud data is obtained through the following steps: Obtaining a first distance from each point in the point cloud data of the object to be measured to the unbounded plane; Determining segmentation point cloud data, the segmentation point cloud data being composed of segmentation points, and a first distance between the segmentation points being less than a preset distance threshold; When the preset plane position is a bounded plane, the segmented point cloud data is obtained through the following steps: Constructing a three-dimensional solid figure through the bounded plane and a preset distance threshold; Determine segmentation point cloud data, wherein the segmentation point cloud data is composed of segmentation points, and the segmentation points are points of the point cloud data of the object to be measured within the three-dimensional solid figure; The cross-sectional data points in the cross-sectional data are used to determine a polyline array according to a nearest neighbor search algorithm, including: Determine the cross-sectional data point with the smallest horizontal coordinate in the cross-sectional data as the starting point P1; The starting point P1 determines the intermediate point P2 closest to the starting point P1 through the K nearest neighbor search algorithm, and the distance between the starting point P1 and the intermediate point P2 is less than the preset point distance threshold; Determine the middle point Pi-1 according to the K nearest neighbor search algorithm; i is greater than or equal to 3; When the K nearest neighbor points of the middle point Pi-1 are all determined, the R nearest neighbor search algorithm is performed on the middle point Pi-1. When all points within the radius R of the middle point Pi-1 are determined, a polyline is obtained, which is obtained by connecting the starting point P1 to the middle point Pi-1; Multiple polylines constitute a polyline array; The radius in the R nearest neighbor search algorithm is equal to the preset point distance threshold.
2. The method for generating a point cloud section according to claim 1, characterized in that: When the cross-sectional data is obtained by a projection method of the segmented point cloud data, the projection method includes the following steps: Determine a projection point as a cross-sectional data point, wherein the projection point is a point where the segmentation point is projected onto the first plane, and the distance between the segmentation point and the first plane is the smallest; Cross-sectional data are determined according to the cross-sectional data points.
3. The method for generating a point cloud section according to claim 1, characterized in that: When the cross-sectional data is the segmented point cloud data obtained by the intersection method: Connect the split points with the smallest distance on both sides of the second plane to obtain the intersection line; Determine an intersection point as a cross-sectional data point, the intersection point being an intersection point of the intersection line and the second plane; Cross-sectional data are determined according to the cross-sectional data points.
4. The method for generating a point cloud section according to claim 1, wherein: The cross-sectional data points in the cross-sectional data are determined to form a polyline array according to a nearest neighbor search algorithm, further comprising: When the K nearest neighbor points of the middle point Pi-1 are all determined, the R nearest neighbor search algorithm is performed on the middle point Pi-1. If there is an undetermined middle point Pi within the radius R of the middle point Pi-1, the middle point Pi is used as the starting point of the new polyline.
5. The method for generating a point cloud section according to claim 4, characterized in that: The starting point of the new polyline is determined by a K-nearest neighbor search algorithm, and the new polyline is added to the polyline array.
6. The method for generating a point cloud section according to claim 1, characterized in that: The cross-sectional data points in the cross-sectional data are determined to form a polyline array according to a nearest neighbor search algorithm, further comprising: When there is an undetermined middle point Pi among the K neighboring points of the middle point Pi-1, the middle point Pi is used as the starting point of the new polyline.
7. The method for generating a point cloud section according to claim 6, characterized in that: The starting point of the new polyline is determined by a K-nearest neighbor search algorithm, and the new polyline is added to the polyline array.
Citation Information
Patent Citations
General tunnel section extraction and denoising method
CN113808226A
Accurate point cloud segmentation method based on feature template
CN114119628A