Point cloud processing method and device, computer equipment and readable storage medium
By dividing and ground segmentation of the environmental point clouds in the target area, and combining the selection of adjacent partitions, the target ground point clouds are determined, which solves the problem of poor point cloud fitting results in complex terrain and improves the accuracy of ground information.
Patent Information
- Application Number
- CN202510586583.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-08
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2045-05-08
AI Technical Summary
When the prior art deals with complex terrain, the fitting results of point cloud data are poor, resulting in a decrease in the accuracy of ground information acquisition.
By dividing the environmental point clouds in the target area, at least two point cloud partitions are obtained, and the environmental point clouds in each point cloud partition are ground segmented respectively, and the adjacent partition corresponding to each point cloud partition is determined, and the target ground point cloud is determined based on the distance between the initial non-ground point cloud and the initial ground point cloud of the adjacent partition.
Improve the accuracy of ground point cloud determination, thereby improving the accuracy of ground information, especially under complex terrain conditions.
Smart Images

Figure CN120147331A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of autonomous driving technology, and particularly to a point cloud processing method, apparatus, computer device, and readable storage medium. Background Art
[0002] With the continuous development of autonomous driving technology, in order to ensure the safety of vehicle driving, during the vehicle driving process, it is necessary to perform ground segmentation processing on unstructured roads such as those without clear signs, uneven road surfaces, or complex terrains, so as to determine the ground information required by the vehicle.
[0003] In the related art, after obtaining the point cloud data around the vehicle by using a lidar, the point cloud below the height threshold in the point cloud data can be used as the initial ground point cloud first, and the ground point cloud is fitted to obtain a fitted plane; subsequently, based on the residual between the point cloud data and the fitted plane, the target ground point cloud is determined from the point cloud data, thereby constructing the ground information required by the vehicle.
[0004] However, the above method is only applicable to the point cloud data corresponding to relatively gentle slopes or slight ground undulations. In the face of complex terrains, the fitting results obtained by the above method are poor, reducing the accuracy of ground information acquisition. Summary of the Invention
[0005] Based on this, it is necessary to provide a point cloud processing method, apparatus, computer device, and readable storage medium that can improve the accuracy of ground information in view of the above technical problems.
[0006] In a first aspect, this application provides a point cloud processing method, including:
[0007] Dividing the environmental point cloud of the target area to obtain at least two point cloud partitions;
[0008] Respectively performing ground segmentation processing on the environmental point cloud in each point cloud partition to obtain the initial ground point cloud and the initial non-ground point cloud of each point cloud partition;
[0009] According to the initial non-ground point cloud and the initial ground point cloud of each point cloud partition, determining the adjacent partition corresponding to each point cloud partition from each point cloud partition;
[0010] Determining the target ground point cloud from the initial non-ground point cloud of each point cloud partition according to the distance between the initial non-ground point cloud of each point cloud partition and the initial ground point cloud of the corresponding adjacent partition;
[0011] Determining the ground information of the target area according to the target ground point cloud and the initial ground point cloud of each point cloud partition.
[0012] In one embodiment, according to the initial non-ground point cloud and the initial ground point cloud of each point cloud partition, determining the adjacent partition corresponding to each point cloud partition from each point cloud partition includes:
[0013] For each point cloud partition, determining the centroid of the point cloud of the point cloud partition according to the initial non-ground point cloud of the point cloud partition;
[0014] Selecting adjacent ground point clouds from the initial ground point clouds of the remaining point cloud partitions according to the distances between the initial ground point clouds of the remaining point cloud partitions and the centroid of the point cloud; wherein, the remaining point cloud partitions are the point cloud partitions other than the point cloud partition among all point cloud partitions;
[0015] Taking the point cloud partition to which the adjacent ground point clouds belong as the adjacent partition corresponding to the point cloud partition.
[0016] In one embodiment, determining the target ground point cloud from the initial non-ground point clouds of each point cloud partition according to the distances between the initial non-ground point clouds of each point cloud partition and the initial ground point clouds within the corresponding adjacent partitions includes:
[0017] For each point cloud partition, selecting reference ground point clouds from the initial ground point clouds of the adjacent partition corresponding to the point cloud partition, the distances between which and the centroid of the point cloud partition are less than a first distance threshold;
[0018] Performing plane fitting processing on the reference ground point clouds to obtain a reference fitting plane;
[0019] According to the distances between the initial non-ground point clouds of the point cloud partition and the reference fitting plane, taking the initial non-ground point clouds in the point cloud partition, the distances between which and the reference fitting plane are less than a second distance threshold, as the target ground point clouds.
[0020] In one embodiment, respectively performing ground segmentation processing on the environmental point clouds within each point cloud partition to obtain the initial ground point clouds and the initial non-ground point clouds within each point cloud partition includes:
[0021] For each point cloud partition, performing plane fitting processing on the environmental point clouds within the point cloud partition to obtain the target fitting plane corresponding to the point cloud partition and the plane attribute information of the target fitting plane;
[0022] Taking the environmental point clouds located on the target fitting plane as the original ground point clouds, and taking the point clouds other than the original ground point clouds among the environmental point clouds within the point cloud partition as the original non-ground point clouds;
[0023] Optimizing the original ground point clouds and the original non-ground point clouds in the point cloud partition according to the plane attribute information of the target fitting plane to obtain the initial ground point clouds and the initial non-ground point clouds of the point cloud partition.
[0024] In one embodiment, the environmental point cloud of the target area is partitioned to obtain at least two point cloud partitions, including:
[0025] Based on a preset distance interval, a preset angle interval, and a preset number of layers of circles, the environmental point cloud of the target area is partitioned to obtain at least two point cloud partitions;
[0026] According to the plane attribute information of the target fitting plane, the original ground point cloud and the original non-ground point cloud in the point cloud partition are optimized to obtain the initial ground point cloud and the initial non-ground point cloud of the point cloud partition, including:
[0027] In the case where the plane attribute information of the target fitting plane does not meet the standard plane information, according to the plane attribute information of the target fitting plane corresponding to each point cloud partition in the target layer to which the point cloud partition belongs, the flatness probability of the point cloud partition is determined; wherein, the plane attribute information at least includes flatness;
[0028] In the case where the flatness probability is less than or equal to the probability threshold, both the original ground point cloud and the original non-ground point cloud in the point cloud partition are used as the initial non-ground point cloud;
[0029] In the case where the flatness probability is greater than the probability threshold, the original ground point cloud in the point cloud partition is used as the initial ground point cloud, and the original non-ground point cloud is used as the initial non-ground point cloud.
[0030] In one embodiment, according to the plane attribute information of the target fitting plane corresponding to each point cloud partition in the target layer to which the point cloud partition belongs, the flatness probability of the point cloud partition is determined, including:
[0031] According to the flatness of the target fitting plane corresponding to each point cloud partition in the target layer to which the point cloud partition belongs, the average flatness and the flatness standard deviation of the target layer are determined;
[0032] According to the average flatness and the flatness standard deviation of the target layer, the flatness threshold of the target layer is determined;
[0033] According to the flatness threshold and the flatness of the target fitting plane corresponding to the point cloud partition, the flatness probability of the point cloud partition is determined.
[0034] In one embodiment, plane fitting processing is performed on the environmental point cloud in the point cloud partition to obtain the target fitting plane corresponding to the point cloud partition and the plane attribute information of the target fitting plane, including:
[0035] According to the height values of the environmental point clouds in the point cloud partition, the environmental point clouds are sorted in ascending order, and the first target number of environmental point clouds in the sorting are used as the initial fitting point clouds;
[0036] Perform plane fitting on the initial fitting point cloud to obtain an initial fitting plane;
[0037] Optimize the initial fitting plane according to the environmental point cloud within the point cloud partition whose distance from the initial fitting plane is less than the third distance threshold, so as to obtain the target fitting plane corresponding to the point cloud partition and the plane attribute information of the target fitting plane.
[0038] In a second aspect, the present application also provides a point cloud processing device, including:
[0039] A point cloud division module, configured to divide the environmental point cloud of the target area to obtain at least two point cloud partitions;
[0040] A ground segmentation module, configured to perform ground segmentation processing on the environmental point cloud in each point cloud partition respectively to obtain the initial ground point cloud and the initial non-ground point cloud of each point cloud partition;
[0041] A partition determination module, configured to determine the adjacent partition corresponding to each point cloud partition from each point cloud partition according to the initial non-ground point cloud and the initial ground point cloud of each point cloud partition;
[0042] A point cloud determination module, configured to determine the target ground point cloud from the initial non-ground point clouds of each point cloud partition according to the distance between the initial non-ground point cloud of each point cloud partition and the initial ground point cloud of the corresponding adjacent partition;
[0043] An information determination module, configured to determine the ground information of the target area according to the target ground point cloud and the initial ground point cloud of each point cloud partition.
[0044] In a third aspect, the present application also provides a computer device, including a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0045] Divide the environmental point cloud of the target area to obtain at least two point cloud partitions;
[0046] Perform ground segmentation processing on the environmental point cloud in each point cloud partition respectively to obtain the initial ground point cloud and the initial non-ground point cloud of each point cloud partition;
[0047] Determine the adjacent partition corresponding to each point cloud partition from each point cloud partition according to the initial non-ground point cloud and the initial ground point cloud of each point cloud partition;
[0048] Determine the target ground point cloud from the initial non-ground point clouds of each point cloud partition according to the distance between the initial non-ground point cloud of each point cloud partition and the initial ground point cloud of the corresponding adjacent partition;
[0049] Determine the ground information of the target area according to the target ground point cloud and the initial ground point cloud of each point cloud partition.
[0050] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0051] Partition the environmental point cloud of the target area to obtain at least two point cloud partitions;
[0052] Perform ground segmentation processing on the environmental point cloud in each point cloud partition respectively to obtain the initial ground point cloud and the initial non-ground point cloud of each point cloud partition;
[0053] According to the initial non-ground point cloud and the initial ground point cloud of each point cloud partition, determine the adjacent partition corresponding to each point cloud partition from each point cloud partition;
[0054] Determine the target ground point cloud from the initial non-ground point clouds of each point cloud partition according to the distance between the initial non-ground point cloud of each point cloud partition and the initial ground point cloud of the corresponding adjacent partition;
[0055] Determine the ground information of the target area according to the target ground point cloud and the initial ground point cloud of each point cloud partition.
[0056] In a fifth aspect, the present application further provides a computer program product, including a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0057] Partition the environmental point cloud of the target area to obtain at least two point cloud partitions;
[0058] Perform ground segmentation processing on the environmental point cloud in each point cloud partition respectively to obtain the initial ground point cloud and the initial non-ground point cloud of each point cloud partition;
[0059] According to the initial non-ground point cloud and the initial ground point cloud of each point cloud partition, determine the adjacent partition corresponding to each point cloud partition from each point cloud partition;
[0060] Determine the target ground point cloud from the initial non-ground point clouds of each point cloud partition according to the distance between the initial non-ground point cloud of each point cloud partition and the initial ground point cloud of the corresponding adjacent partition;
[0061] Determine the ground information of the target area according to the target ground point cloud and the initial ground point cloud of each point cloud partition.
[0062] The above point cloud processing method, device, computer device, and readable storage medium divide the environmental point cloud of the target area to obtain at least two point cloud partitions, and respectively perform ground segmentation processing on the environmental point clouds in each point cloud partition to obtain the initial ground point cloud and the initial non-ground point cloud of each point cloud partition; subsequently, according to the initial non-ground point cloud and the initial ground point cloud of each point cloud partition, the adjacent partition corresponding to each point cloud partition is determined from each point cloud partition, and according to the distance between the initial non-ground point cloud of each point cloud partition and the initial ground point cloud of the corresponding adjacent partition, the target ground point cloud is determined from the initial non-ground point clouds of each point cloud partition; finally, according to the target ground point cloud and the initial ground point cloud of each point cloud partition, the ground information of the target area is determined. By adopting the above method, after initially segmenting the initial ground point cloud and the initial non-ground point cloud, by screening the target ground point cloud again from the initial non-ground point cloud of the point cloud partition based on the initial ground point cloud in the corresponding adjacent partition, and then generating the ground information according to the initial ground point cloud and the target ground point cloud, the problem of dividing the ground point cloud into non-ground point clouds in complex terrains can be avoided, the accuracy of determining the ground point cloud is improved, and thus the accuracy of the ground information is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required for use in the description of the embodiments of the present application or related technologies. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.
[0064] Figure 1 It is a schematic flowchart of the point cloud processing method in an embodiment;
[0065] Figure 2 It is a schematic flowchart of determining the adjacent partition in an embodiment;
[0066] Figure 3 It is a schematic flowchart of determining the target ground point cloud in an embodiment;
[0067] Figure 4 It is a schematic flowchart of the ground segmentation processing in an embodiment;
[0068] Figure 5 It is a schematic diagram of the target area division in an embodiment;
[0069] Figure 6 It is a schematic diagram of the neighborhood partition in an embodiment;
[0070] Figure 7 It is a schematic diagram of the partition identification in an embodiment;
[0071] Figure 8 Schematic diagram of the process for point cloud optimization in an embodiment;
[0072] Figure 9 Schematic diagram of the process for determining flatness probability in an embodiment;
[0073] Figure 10 Schematic diagram of the process for determining the target fitting plane in an embodiment;
[0074] Figure 11 Schematic diagram of the process for the point cloud processing method in another embodiment;
[0075] Figure 12 Structural block diagram of the point cloud processing device in an embodiment;
[0076] Figure 13 Internal structure diagram of a computer device in an embodiment. Detailed implementation manners
[0077] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0078] With the continuous development of autonomous driving technology, in order to ensure the safety of vehicle driving, during the vehicle driving process, it is necessary to perform ground segmentation processing on unstructured roads such as those without clear signs, uneven road surfaces or complex terrains, so as to determine the ground information required by the vehicle.
[0079] In the related art, after obtaining the point cloud data around the vehicle by using a lidar, the point cloud below the height threshold in the point cloud data can be first used as the initial ground point cloud, and the ground point cloud is fitted to obtain a fitting plane; subsequently, based on the residual between the point cloud data and the fitting plane, the target ground point cloud is determined from the point cloud data, thereby constructing the ground information required by the vehicle.
[0080] However, the above method is only applicable to the point cloud data corresponding to relatively gentle slopes or slight ground undulations. In the face of complex terrains, the fitting results obtained by the above method are poor, reducing the accuracy of ground information acquisition.
[0081] Based on this, in an exemplary embodiment, a point cloud processing method is provided. Taking this method applied to a point cloud processing device as an example for illustration, as Figure 1 shown, it specifically includes the following steps:
[0082] S101, divide the environmental point cloud of the target area to obtain at least two point cloud partitions.
[0083] Among them, the so-called target area is the area where the vehicle with point cloud processing requirements is located. For example, the target area can be an area generated based on a fixed radius with the vehicle as the center; the so-called environmental point cloud is the point cloud data obtained based on the environment where the vehicle is located. For example, it can include ground point clouds and non-ground point clouds; the so-called point cloud partitioning is the set of point clouds obtained after dividing the environmental point cloud.
[0084] In an alternative embodiment, sensors (such as lidar) deployed on the vehicle can be used to obtain the environmental point cloud within the target area where the vehicle is located. Subsequently, the target area can be divided into multiple partitions according to a preset segmentation method, and the environmental point cloud can be filled into the corresponding partitions according to the position where the environmental point cloud is located, obtaining each point cloud partition.
[0085] In another alternative embodiment, the obtained environmental point cloud can be input into a trained partitioning model, and the partitioning model outputs each point cloud partition according to the environmental point cloud and model parameters.
[0086] S102, perform ground segmentation processing on the environmental point cloud within each point cloud partition respectively, obtaining the initial ground point cloud and the initial non-ground point cloud of each point cloud partition.
[0087] Among them, the so-called ground segmentation processing is to segment the ground point cloud from the environmental point cloud; the so-called initial ground point cloud is the environmental point cloud judged as the ground point cloud in the ground segmentation processing; the so-called initial non-ground point cloud is the environmental point cloud judged as the non-ground point cloud in the ground segmentation processing.
[0088] In an alternative manner, the singular value decomposition (SVD) plane fitting method can be used for ground segmentation processing to obtain the initial ground point cloud and the initial non-ground point cloud of each point cloud partition. Exemplarily, for each point cloud partition, the environmental point cloud below the height threshold can be subjected to fitting processing to obtain the fitting plane corresponding to the point cloud partition; subsequently, the environmental point cloud in the point cloud partition whose distance from the fitting plane is less than or equal to the distance threshold is used as the initial ground point cloud, and the environmental point cloud whose distance from the fitting plane is greater than the distance threshold is used as the initial non-ground point cloud.
[0089] In another alternative manner, for each point cloud partition, the environmental point cloud in the point cloud partition can be input into a trained ground segmentation model, and the ground segmentation model outputs the initial ground point cloud and the initial non-ground point cloud according to the positional relationship between the environmental point clouds and the model parameters.
[0090] S103, determine the adjacent partition corresponding to each point cloud partition from each point cloud partition according to the initial non-ground point cloud and the initial ground point cloud of each point cloud partition.
[0091] Among them, for each point cloud partition, the adjacent partition corresponding to the point cloud partition is the other point cloud partitions among the other point cloud partitions where the environmental point clouds adjacent to the environmental point clouds in the point cloud partition are located. Further, the distance between two environmental point clouds under the adjacent relationship is less than a preset adjacent threshold.
[0092] It can be understood that in practical applications, there may be two ground planes with different heights in a point cloud partition. In this case, the high ground plane will be classified as non-ground. Therefore, to avoid the above problems, it is possible to determine whether there are ground point clouds in the non-ground point clouds according to the positional relationship between the environmental point clouds in the adjacent partition corresponding to the point cloud partition and the point clouds in the point cloud partition.
[0093] For example, in point cloud partition A and point cloud partition B with an adjacent relationship, the distance between the non-ground point cloud A1 in point cloud partition A and the ground point cloud B1 in point cloud partition B is relatively close. At this time, it can be determined that the non-ground point cloud A1 is also a ground point cloud.
[0094] In an alternative embodiment, to ensure the reliability of the determination of the adjacent partition, for each point cloud partition, according to the positional relationship between the initial non-ground point cloud in the point cloud partition and the initial ground point cloud in other point cloud partitions, the point cloud partition where the initial ground point cloud adjacent to the initial non-ground point cloud in the point cloud partition is located is used as the adjacent partition corresponding to the point cloud partition.
[0095] Exemplarily, for each point cloud partition, first, according to the positional relationship between the point cloud partitions, the point cloud partitions adjacent to the position of the point cloud partition can be used as candidate adjacent partitions; subsequently, from the initial ground point clouds in the candidate adjacent partitions, one or more initial ground point clouds with a relatively close distance to the initial non-ground point cloud in the point cloud partition are selected, and the candidate adjacent partition where the selected initial ground point cloud is located is used as the adjacent partition corresponding to the point cloud partition.
[0096] For example, the point cloud partition where the initial ground point cloud with the closest distance to the initial non-ground point cloud in the current point cloud partition among the initial ground point clouds in the candidate adjacent partitions can be directly used as the adjacent partition corresponding to the current point cloud partition; or, based on the distances between the initial ground point clouds in the candidate adjacent partitions and the initial non-ground point cloud in the current point cloud partition, the candidate adjacent partitions can be sorted in ascending order of distance, and the preset number of candidate adjacent partitions ranked at the front can be used as the adjacent partition corresponding to the current point cloud partition.
[0097] S104. Determine the target ground point cloud from the initial non-ground point clouds of each point cloud partition according to the distances between the initial non-ground point clouds of each point cloud partition and the initial ground point clouds of the corresponding adjacent partitions.
[0098] Among them, the so-called target ground point cloud is the ground point cloud determined from the initial non-ground point cloud.
[0099] In an alternative implementation, for each point cloud partition, the adjacent partition corresponding to the point cloud partition can be determined according to the identification information of the point cloud partition, and the initial ground point cloud closer to the point cloud partition can be selected from the adjacent partition corresponding to the point cloud partition; then, plane fitting processing is performed on the selected initial ground point cloud to obtain a fitting plane, and the initial non-ground point cloud within the point cloud partition whose distance from the above fitting plane is less than a preset threshold is used as the target ground point cloud in the point cloud partition.
[0100] In another alternative implementation, for each point cloud partition, the initial non-ground point cloud within the point cloud partition and the initial ground point cloud of the corresponding adjacent partition can be simultaneously input into a trained point cloud selection model, and the point cloud selection model determines the target ground point cloud from the initial non-ground point cloud in the point cloud partition according to the distance between the initial non-ground point cloud and the initial ground point cloud.
[0101] S105. Determine the ground information of the target area according to the target ground point cloud and the initial ground point cloud of each point cloud partition.
[0102] Among them, the so-called ground information is the information related to the ground within the target area. For example, it may include, but is not limited to, the prompt information of complex terrain, and the information related to the driving direction of the vehicle, etc.
[0103] In an alternative implementation, the road ground within each point cloud partition can be constructed according to the target ground point cloud and the initial ground point cloud within each point cloud partition, so as to splice the target road ground of the target area. Then, based on the difference between the standard road ground and the target road ground, ground prompt information can be generated, and the target road ground and the ground prompt information are simultaneously sent as ground information to the display device in the vehicle.
[0104] After receiving the ground information, the display device can display the target road ground and mark it based on the ground prompt information. In addition, if the vehicle is in a navigation state, it can also give an alarm for the ground prompt information located on the vehicle driving route based on the vehicle driving route to prompt the user to drive safely.
[0105] In the above point cloud processing method, by dividing the environmental point cloud of the target area, at least two point cloud partitions are obtained, and the environmental point clouds in each point cloud partition are respectively subjected to ground segmentation processing to obtain the initial ground point cloud and the initial non-ground point cloud of each point cloud partition; subsequently, according to the initial non-ground point cloud and the initial ground point cloud of each point cloud partition, the adjacent partition corresponding to each point cloud partition is determined from each point cloud partition, and according to the distance between the initial non-ground point cloud of each point cloud partition and the initial ground point cloud of the corresponding adjacent partition, the target ground point cloud is determined from the initial non-ground point clouds of each point cloud partition; finally, according to the target ground point cloud and the initial ground point cloud of each point cloud partition, the ground information of the target area is determined. By adopting the above method, after initially segmenting the initial ground point cloud and the initial non-ground point cloud, by further screening the target ground point cloud from the initial non-ground point cloud of the point cloud partition based on the initial ground point cloud in the corresponding adjacent partition, and then generating the ground information according to the initial ground point cloud and the target ground point cloud, the problem of dividing the ground point cloud into non-ground point clouds in complex terrains can be avoided, the accuracy of determining the ground point cloud is improved, and thus the accuracy of the ground information is improved.
[0106] To ensure the rationality of determining the adjacent partition, based on the above embodiments, in the embodiments of the present application, an optional way to determine the adjacent partition is provided, as Figure 2 shown, which specifically includes the following steps:
[0107] S201. For each point cloud partition, according to the initial non-ground point cloud of the point cloud partition, determine the point cloud centroid of the point cloud partition.
[0108] Among them, the so-called point cloud centroid is the average position coordinate corresponding to the coordinates of each initial non-ground point cloud.
[0109] In an optional implementation manner, for each point cloud partition, the average polar coordinate can be calculated according to the polar coordinates of each initial non-ground point cloud in the point cloud partition, and the average polar coordinate is used as the point cloud centroid of the point cloud partition.
[0110] In another optional implementation manner, for each point cloud partition, each initial non-ground point cloud in the point cloud partition can be directly input into a trained centroid determination model, and the centroid determination model outputs the point cloud centroid of the point cloud partition according to the polar coordinates of each initial non-ground point cloud and the model parameters.
[0111] S202. According to the distance between the initial ground point cloud of the remaining point cloud partitions and the point cloud centroid, select the adjacent ground point cloud from the initial ground point clouds of the remaining point cloud partitions.
[0112] Among them, the remaining point cloud partitions are the point cloud partitions other than the point cloud partition in each point cloud partition; the so-called adjacent ground point cloud is the initial ground point cloud in the remaining point cloud partitions that is closer to the center of gravity of the point cloud. Further, at most one adjacent ground point cloud can be selected from one remaining point cloud partition, and the number of adjacent ground point clouds is the same as the number of adjacent partitions.
[0113] In an alternative embodiment, for each initial ground point cloud in the remaining point cloud partitions, the distance between the initial ground point cloud and the center of gravity of the point cloud can be calculated according to the polar coordinates of the initial ground point cloud and the polar coordinates of the center of gravity of the point cloud; then, according to the distances between the initial ground point clouds and the center of gravity of the point cloud, the adjacent ground point cloud is selected from the initial ground point clouds.
[0114] Exemplarily, in the case of only selecting one adjacent partition, the initial ground point cloud closest to the center of gravity of the point cloud can be selected from the initial ground point clouds in the remaining point cloud partitions as the adjacent ground point cloud. In the case of selecting multiple adjacent partitions, for each remaining point cloud partition, the first ground point cloud closest to the center of gravity of the point cloud can be selected from the initial ground point clouds in the remaining point cloud partition; then, according to the distances between the first ground point clouds and the center of gravity of the point cloud, the first ground point clouds are sorted in ascending order of distance, and the first preset number of first ground point clouds in the sorting are used as the adjacent ground point clouds.
[0115] In another alternative embodiment, in order to reduce the amount of calculation of the point cloud distance, the remaining point cloud partitions adjacent to the point cloud partition can be first used as candidate point cloud partitions from the remaining point cloud partitions; for each candidate point cloud partition, according to the polar coordinates of the initial ground point clouds in the candidate point cloud partition, the second ground point cloud closest to the center of gravity of the point cloud is selected from the initial ground point clouds.
[0116] Further, according to the distances between the second ground point clouds in the candidate point cloud partitions and the center of gravity of the point cloud, the second ground point clouds are sorted in ascending order of distance, and the first preset number of second ground point clouds in the sorting are used as the adjacent ground point clouds.
[0117] S203, use the point cloud partition to which the adjacent ground point cloud belongs as the adjacent partition corresponding to the point cloud partition.
[0118] In an alternative embodiment, after determining the adjacent ground point cloud, the point cloud partition to which the adjacent ground point cloud belongs can be directly used as the adjacent partition corresponding to the point cloud partition.
[0119] It can be understood that when only one adjacent partition is selected, during the subsequent reference plane fitting process, the amount of data processing can be greatly reduced, thereby improving the determination efficiency of the subsequent target ground point cloud; while when multiple adjacent partitions are selected, the target ground point cloud with an adjacency relationship with the ground point cloud in the adjacent partitions in multiple directions can be selected from the initial non-ground point cloud, thereby ensuring the comprehensiveness and accuracy of the subsequent determination of the target ground point cloud.
[0120] In the embodiment of the present application, by taking the point cloud partition to which the adjacent ground point cloud closer to the center of gravity of the point cloud belongs as the adjacent partition corresponding to the point cloud partition, the rationality of the determination of the adjacent partition can be effectively ensured.
[0121] To ensure the accuracy of the determination of the target ground point cloud, based on the above embodiment, in the embodiment of the present application, an optional method for determining the target ground point cloud is provided, as Figure 3 shown, specifically including the following steps:
[0122] S301, for each point cloud partition, select a reference ground point cloud with a distance less than the first distance threshold from the initial ground point cloud of the adjacent partition corresponding to the point cloud partition to the center of gravity of the point cloud partition.
[0123] Among them, the so-called first distance threshold is a value used to measure the distance between the initial ground point cloud and the center of gravity of the point cloud. It should be noted that the first distance threshold can be determined based on multiple experiments or set by technicians based on historical experience, and there is no limitation in this regard. The so-called reference ground point cloud is the initial ground point cloud closer to the center of gravity of the point cloud in the adjacent partition.
[0124] In an optional implementation manner, for each point cloud partition, the point cloud distance between the initial ground point cloud of the adjacent partition corresponding to the point cloud partition and the center of gravity of the point cloud can be calculated respectively; then the initial ground point cloud with a point cloud distance less than the first distance threshold is used as the reference ground point cloud.
[0125] Exemplarily, when only one adjacent partition is selected, the initial ground point cloud with a distance less than the first distance threshold from the center of gravity of the point cloud within the adjacent partition can be directly used as the reference ground point cloud; when multiple adjacent partitions are selected, for each adjacent partition, the initial ground point cloud with a distance less than the first distance threshold from the center of gravity of the point cloud within the adjacent partition can be determined separately, and then the initial ground point clouds determined from each adjacent partition are used as the reference ground point cloud simultaneously.
[0126] S302, perform a plane fitting process on the reference ground point cloud to obtain a reference fitting plane.
[0127] Among them, the so-called reference fitting plane is the fitting plane obtained by performing a plane fitting process on the reference ground point cloud.
[0128] In an alternative embodiment, the reference ground point clouds may be subjected to plane fitting processing according to the polar coordinates of each reference ground point cloud to obtain a reference fitting plane.
[0129] Exemplarily, according to the polar coordinates of each reference ground point cloud, the average coordinates corresponding to the reference ground point cloud may be calculated; then the polar coordinates of each reference ground point cloud are subtracted from the average coordinates, so as to obtain a de-centered point cloud coordinate matrix. Further, the singular value decomposition may be performed on the point cloud coordinate matrix to obtain the normal vector of the reference fitting plane, and the reference fitting plane may be determined based on the average coordinates and the normal vector.
[0130] S303. According to the distance between the initial non-ground point cloud in the point cloud partition and the reference fitting plane, the initial non-ground point cloud in the point cloud partition whose distance to the reference fitting plane is less than the second distance threshold is used as the target ground point cloud.
[0131] Wherein, the so-called second distance threshold is a value used to measure the distance between the initial non-ground point cloud and the reference fitting plane. It should be noted that the second distance threshold may be determined based on multiple experiments or set by those skilled in the art based on historical experience, and there is no limitation thereto.
[0132] It can be understood that since the reference fitting plane is obtained by fitting the reference ground point clouds in the adjacent point cloud that are closer to the center of gravity of the point cloud, the reference fitting plane can be regarded as the ground at a higher position in the point cloud partition.
[0133] Based on this, the initial non-ground point cloud with a reference distance less than the second distance threshold may be selected from the initial non-ground point clouds in the point cloud partition according to the reference distance between each initial non-ground point cloud in the point cloud partition and the reference fitting plane as the target ground point cloud. At this time, the remaining initial non-ground point clouds are still non-ground point clouds.
[0134] In the embodiments of the present application, by introducing a reference fitting plane that can be regarded as a higher ground and using the initial non-ground point cloud whose distance to the reference fitting plane is less than the second distance threshold as the target ground point cloud, the accuracy of determining the target ground point cloud can be ensured. Further, by re-screening the target ground point cloud from the initial non-ground point clouds, the accuracy of determining the ground information can be ensured.
[0135] To ensure the reliability of the initial ground segmentation process, on the basis of the above embodiments, in the embodiments of the present application, an alternative method for ground segmentation processing is provided, as Figure 4 shown, which specifically includes the following steps:
[0136] S401. For each point cloud partition, perform plane fitting processing on the environmental point cloud within the point cloud partition to obtain the target fitting plane corresponding to the point cloud partition and the plane attribute information of the target fitting plane.
[0137] Among them, the so-called target fitting plane is the fitting plane obtained after performing plane fitting processing on the environmental point cloud; the so-called plane attribute information is the relevant attributes of the fitting plane, which may include but are not limited to information such as the flatness, plane inclination, and plane height of the plane.
[0138] In an alternative embodiment, for each point cloud partition, plane fitting processing can be performed on the environmental point cloud in the point cloud partition to obtain the target fitting plane corresponding to the point cloud partition; then, based on the plane parameters of the target fitting plane, determine the plane attribute information of the target fitting plane.
[0139] Exemplarily, for each point cloud partition, SVD plane fitting processing can be performed on the environmental point cloud in the point cloud partition that is lower than the height threshold to obtain the target fitting plane corresponding to the point cloud partition; then, based on the normal vector of the target fitting plane, the minimum matrix singular value in the plane fitting process, and the average height of the target fitting plane, determine the plane attribute information of the target fitting plane.
[0140] For example, the normal vector (n 0 ,n 1 ,n 2 ) of the target fitting plane, where n 2 can represent the inclination degree of the target fitting plane in space. Therefore, n 2 can be used as the plane inclination; the minimum matrix singular value S can represent the distribution degree of the target fitting plane on the normal vector. Therefore, S can be used as the flatness of the fitting plane.
[0141] In another alternative embodiment, for each point cloud partition, the environmental point cloud in the point cloud partition can be directly input into a trained plane fitting model, and the plane fitting model outputs the target fitting plane and the plane attribute information of the target fitting plane according to the polar coordinates and model parameters of each environmental point cloud.
[0142] S402. Use the environmental point cloud located on the target fitting plane as the original ground point cloud, and use the point cloud in the environmental point cloud within the point cloud partition except the original ground point cloud as the original non-ground point cloud.
[0143] Among them, the so-called original ground point cloud is the environmental point cloud located on the target fitting plane; the so-called original non-ground point cloud is the environmental point cloud located outside the target fitting plane.
[0144] In an alternative embodiment, to verify the accuracy of the ground point cloud division, the environmental point cloud located on the target fitting plane can be used as the original ground point cloud, and the point cloud in the point cloud partition except the original ground point cloud in the environmental point cloud can be used as the original non-ground point cloud.
[0145] S403. According to the plane attribute information of the target fitting plane, optimize the original ground point cloud and the original non-ground point cloud in the point cloud partition to obtain the initial ground point cloud and the initial non-ground point cloud of the point cloud partition.
[0146] In an alternative embodiment, based on the plane attribute information of the target fitting plane, verify the initially divided original ground point cloud and original non-ground point cloud, and determine the initial ground point cloud and the initial non-ground point cloud of the point cloud partition according to the verification result.
[0147] Exemplarily, when it is determined according to the plane attribute information of the target fitting plane that the target fitting plane meets the requirements of the standard plane, it proves that the fitted plane is relatively standard. At this time, the original ground point cloud in the point cloud partition can be directly used as the initial ground point cloud, and the original non-ground point cloud can be used as the initial non-ground point cloud.
[0148] When it is determined according to the plane attribute information of the target fitting plane that the target fitting plane does not meet the requirements of the standard plane, it proves that the fitted plane contains non-ground point clouds. Therefore, based on the plane attribute information, non-ground point clouds need to be screened out from the original ground point cloud to determine the initial ground point cloud and the initial non-ground point cloud.
[0149] In another alternative embodiment, the plane attribute information, the original ground point cloud, and the original non-ground point cloud can be directly input into the trained point cloud optimization model at the same time. The point cloud optimization model outputs the initial ground point cloud and the initial non-ground point cloud of the point cloud partition according to the plane attribute information, the original ground point cloud, the original non-ground point cloud, and the model parameters.
[0150] In the embodiments of the present application, by introducing the plane attribute information to optimize the initially divided original ground point cloud and original non-ground point cloud, and obtaining the initial ground point cloud and the initial non-ground point cloud, the rationality of the ground segmentation can be guaranteed, and further the accuracy of the determination of the initial ground point cloud and the initial non-ground point cloud can be guaranteed, laying a foundation for the subsequent determination of the ground information.
[0151] To ensure the reliability of the region division, based on the above embodiments, in the embodiments of the present application, an alternative method for dividing the point cloud partition is provided. Specifically, based on a preset distance interval, a preset angle interval, and a preset number of laps, the environmental point cloud of the target region is divided to obtain at least two point cloud partitions.
[0152] Among them, the so-called preset distance interval is the distance interval between adjacent point cloud partitions set in advance; the so-called preset angle interval is the angle interval between adjacent point cloud partitions set in advance; the so-called preset number of layers is the number of hierarchical divisions of the target area.
[0153] In an alternative implementation, the vehicle can be used as the origin of the ego-vehicle coordinate system, and the standard detection distance of the sensor as the radius to construct the target area and obtain the environmental point cloud in the target area; then, based on the preset distance interval, preset angle interval, and preset number of layers, the target area is divided with the origin as the reference to obtain at least two partitions.
[0154] For example, referring to Figure 5 the schematic diagram of the target area division shown, the preset number of layers is three, and there are corresponding preset distance intervals and preset angle intervals for each layer. After determining the target area ( Figure 5 the left dashed circular area), the first-layer partition can be divided with the origin as the reference based on the preset distance interval and preset angle interval corresponding to the first layer; then, based on the preset distance intervals and preset angle intervals corresponding to each layer, the second-layer partition and the third-layer partition are sequentially divided.
[0155] It can be understood that since the acquisition accuracy of sensors such as lidar decreases with the increase of distance, in order to ensure that the number of point clouds in each point cloud partition is similar, when dividing each layer, the area of the partitions in each layer can gradually increase, that is, the size information (e.g., Figure 5 the angle interval and distance interval of the partitions) of the partitions in each layer is different. Therefore, when determining the adjacent point cloud partitions of the current partition, the number of adjacent partitions of the current partition needs to be determined according to the position of the current partition.
[0156] Exemplarily, for each partition not located at the layer boundary, the number of adjacent partitions of this partition is 8; for each partition located at the layer boundary, the number of adjacent partitions of this partition needs to be determined according to the size relationship between the size of the partition in another layer adjacent to this partition and the size of this partition. For example, referring to Figure 6 the schematic diagram of the neighborhood partition shown, the neighborhood partitions of partition M are 7; the neighborhood partitions of partition N are 8.
[0157] After determining each partition, for each partition, the unique identification information of this partition can be determined according to the division level where this partition is located, the division circle level within the level, and the angular position relative to the ego-vehicle coordinate system. For example, referring to Figure 7 the schematic diagram of the partition identification shown, for partition P, since partition P is in the 4th circle of the 2nd layer and is the 1st partition in the angular division (counterclockwise), the identification information of partition P is (2, 4, 1).
[0158] In an alternative embodiment, the environmental point cloud can be filled into each partition according to the position of the environmental point cloud relative to the vehicle coordinate system, and it is determined whether there is an environmental point cloud in each partition; then only the partition containing the environmental point cloud is used as the point cloud partition.
[0159] Furthermore, in order to ensure the reliability of point cloud optimization, based on the above embodiments, in the embodiments of the present application, an alternative method for point cloud optimization is provided, as Figure 8 shown, which specifically includes the following steps:
[0160] S801, when the plane attribute information of the target fitting plane does not meet the standard plane information, determine the flatness probability of the point cloud partition according to the plane attribute information of the target fitting plane corresponding to each point cloud partition in the target layer to which the point cloud partition belongs.
[0161] Among them, the plane attribute information at least includes flatness. The so-called standard plane information is the parameter range of the attribute information in each dimension corresponding to the standard fitting plane. The so-called target layer of the point cloud partition is the layer where the point cloud partition is located; the flatness probability is the flat probability of the fitting plane within the point cloud partition.
[0162] In an alternative embodiment, for the plane attribute information in each dimension, the plane attribute information in this dimension can be compared with the standard plane information in this dimension to obtain the comparison result in this dimension; then when the comparison results in all dimensions meet the standard plane information, it is determined that the plane attribute information of the target fitting plane meets the standard plane information, and when the comparison result in any dimension does not meet the standard plane information, it is determined that the plane attribute information of the target fitting plane does not meet the standard plane information.
[0163] Exemplarily, the plane attribute information includes flatness, plane inclination, and plane height, and the standard plane information includes a flat threshold for flatness, an inclination threshold for the plane, and a height threshold for the plane. When the flatness of the target fitting plane is greater than the flat threshold, the plane inclination is less than the inclination threshold, and the plane height is less than the height threshold, it is determined that the plane attribute information of the target fitting plane meets the standard plane information.
[0164] Furthermore, when any dimension information in flatness, plane inclination, and plane height does not meet the above conditions, it is determined that the plane attribute information of the target fitting plane does not meet the standard plane information. For example, when the flatness of the target fitting plane is less than the flat threshold, the plane inclination is less than the inclination threshold, and the plane height is less than the height threshold, it is determined that the plane attribute information of the target fitting plane does not meet the standard plane information.
[0165] In an alternative embodiment, when the plane attribute information of the target fitting plane does not meet the standard plane information, the plane attribute information of the target fitting plane corresponding to each point cloud partition in the target layer to which the point cloud partition belongs can be obtained; subsequently, according to each plane attribute information, the flatness probability of the point cloud partition is determined.
[0166] Exemplarily, the flatness probability of the point cloud partition can be calculated according to the flatness in each plane attribute information; or, each plane attribute information can be directly input into a trained probability calculation model, and the probability calculation model determines the flatness probability of the point cloud partition according to each plane attribute information and the model parameters.
[0167] S802, when the flatness probability is less than or equal to the probability threshold, both the original ground point cloud and the original non-ground point cloud in the point cloud partition are used as the initial non-ground point cloud.
[0168] Wherein, the so-called probability threshold is a value used to measure the magnitude of the flatness probability. For example, the probability threshold can be 0.5.
[0169] In an alternative embodiment, the flatness probability can be compared with the probability threshold. If the flatness probability is less than or equal to the probability threshold, it proves that the flatness possibility of the fitting plane in the point cloud partition is relatively low, that is, there may be no ground in the point cloud partition. At this time, both the original ground point cloud and the original non-ground point cloud in the point cloud partition can be used as the initial non-ground point cloud.
[0170] S803, when the flatness probability is greater than the probability threshold, the original ground point cloud in the point cloud partition is used as the initial ground point cloud, and the original non-ground point cloud is used as the initial non-ground point cloud.
[0171] In an alternative embodiment, the flatness probability can be compared with the probability threshold. If the flatness probability is greater than the probability threshold, it proves that the flatness possibility of the fitting plane in the point cloud partition is relatively high, that is, there is ground in the point cloud partition. At this time, the original ground point cloud in the point cloud partition can be used as the initial ground point cloud, and the original non-ground point cloud is used as the initial non-ground point cloud.
[0172] In the embodiments of the present application, by comparing the flatness probability of the point cloud partition with a preset probability threshold, it is determined whether there is a ground point cloud in the point cloud partition, and then based on the result of the existence of the ground point cloud, the original ground point cloud and the original non-ground point cloud initially divided are optimized, which can effectively ensure the rationality of point cloud optimization.
[0173] To ensure the accuracy of the flatness probability, on the basis of the above embodiments, in the embodiments of the present application, an alternative way to determine the flatness probability is provided, as Figure 9 shown, which specifically includes the following steps:
[0174] S901. Determine the average flatness and the flatness standard deviation of the target layer based on the flatness of the target fitting planes corresponding to each point cloud partition in the target layer to which the point cloud partition belongs.
[0175] Among them, the so-called average flatness is the mean value of the flatness of each target fitting plane; the so-called flatness standard deviation is the standard deviation corresponding to the flatness of each target fitting plane.
[0176] In an alternative implementation, after obtaining the flatness of the target fitting planes corresponding to each point cloud partition in the target layer, the mean value of each flatness can be directly used as the average flatness; then, based on the difference between the flatness of each target fitting plane and the average flatness, the flatness standard deviation is calculated.
[0177] S902. Determine the flatness threshold of the target layer based on the average flatness and the flatness standard deviation of the target layer.
[0178] Among them, the so-called flatness threshold is a value used to measure the size of the flatness.
[0179] In an alternative implementation, referring to the following formula (1), the flatness standard deviation can be weighted based on a preset weighting parameter, and then the sum of the weighted flatness standard deviation and the average flatness is used as the flatness threshold of the target layer. Among them, F_th is the flatness threshold; S_m is the average flatness; S_std is the flatness standard deviation; X1 is the preset weighting parameter, which can be 1.5.
[0180] (1)
[0181] In another alternative implementation, the average flatness and the flatness standard deviation of the target layer can be simultaneously input into a trained flatness threshold determination model, and the flatness threshold determination model outputs the flatness threshold of the target layer according to the average flatness, the flatness standard deviation, and the model parameters.
[0182] S903. Determine the flatness probability of the point cloud partition based on the flatness threshold and the flatness of the target fitting plane corresponding to the point cloud partition.
[0183] In an alternative implementation, referring to the following formula (2), an exponential function can be used to calculate the flatness of the target fitting plane corresponding to the point cloud partition and the flatness threshold based on a preset divisor parameter, so as to obtain the flatness probability of the point cloud partition. Among them, F_prob is the flatness probability; X2 is the preset divisor parameter, which can be 10.
[0184] (2)
[0185] In the embodiment of the present application, by determining the flatness probability of the point cloud partition according to the average flatness and the standard deviation of flatness of the target layer to which the point cloud partition belongs, as well as the flatness of the target fitting plane corresponding to the point cloud partition, the accuracy of determining the flatness probability can be ensured.
[0186] To ensure the accuracy of the target fitting plane, on the basis of the above embodiment, in the embodiment of the present application, an optional method for determining the target fitting plane is provided, as Figure 10 shown, which specifically includes the following steps:
[0187] S1001, according to the height values of the environmental point clouds in the point cloud partition, sort the environmental point clouds in ascending order, and use the first target number of environmental point clouds in the sorting as the initial fitting point clouds.
[0188] Wherein, the so-called target number is the preset number of point clouds, which can be 20; the so-called initial fitting point clouds are the environmental point clouds for the first plane fitting process.
[0189] In an optional embodiment, for each point cloud partition, the environmental point clouds in the point cloud partition can be sorted in ascending order, and the first target number of environmental point clouds in the sorting can be used as the initial fitting point clouds. For example, the 20 environmental point clouds with the lowest height values can be used as the initial fitting point clouds.
[0190] S1002, perform a plane fitting process on the initial fitting point clouds to obtain an initial fitting plane.
[0191] Wherein, the so-called initial fitting plane is the fitting plane obtained after performing a plane fitting process on the initial fitting point clouds.
[0192] In an optional embodiment, the initial fitting point clouds can be subjected to a plane fitting process according to the polar coordinates of the initial fitting point clouds to obtain an initial fitting plane.
[0193] S1003, according to the environmental point clouds in the point cloud partition whose distance from the initial fitting plane is less than the third distance threshold, optimize the initial fitting plane to obtain the target fitting plane corresponding to the point cloud partition and the plane attribute information of the target fitting plane.
[0194] Wherein, the so-called third distance threshold is a value used to measure the distance between the environmental point cloud and the initial fitting plane.
[0195] In an alternative embodiment, environmental point clouds whose distance from the initial fitting plane is less than a third distance threshold can be filtered out from the environmental point clouds; then, based on a preset number of plane fitting times, the filtered environmental point clouds, and the initial fitting plane, plane fitting processing is continued to obtain a target fitting plane and plane attribute information of the target fitting plane.
[0196] Exemplarily, when the number of plane fitting times is 3, after filtering out environmental point clouds whose distance from the initial fitting plane is less than the third distance threshold from the environmental point clouds, the filtered environmental point clouds can be used to perform fitting processing on the initial fitting plane to obtain an alternative fitting plane; then, environmental point clouds whose distance from the alternative fitting plane is less than the third distance threshold can be continuously filtered out from the environmental point clouds, and the filtered environmental point clouds can be used to perform fitting processing on the alternative fitting plane to obtain a target fitting plane and plane attribute information of the target fitting plane.
[0197] In the embodiments of the present application, by performing optimization processing on the fitting plane multiple times to obtain a target fitting plane and plane attribute information of the target fitting plane, the accuracy of the target fitting plane and the plane attribute information can be ensured.
[0198] Figure 11 For the flowchart of the point cloud processing method in another embodiment, based on the above embodiments, an alternative example of the point cloud processing method is provided in this embodiment. Combining Figure 11 , the specific implementation process is as follows:
[0199] S1101, divide the environmental point clouds in the target area based on a preset distance interval, a preset angle interval, and a preset number of laps to obtain at least two point cloud partitions.
[0200] S1102, according to the height values of the environmental point clouds in each point cloud partition, sort the environmental point clouds in each point cloud partition in ascending order, and use the target number of environmental point clouds ranked at the front as the initial fitting point clouds in each point cloud partition.
[0201] S1103, perform plane fitting processing on the initial fitting point clouds in each point cloud partition respectively to obtain the initial fitting planes of each point cloud partition.
[0202] S1104, for each point cloud partition, optimize the initial fitting plane according to the environmental point clouds in the point cloud partition whose distance from the initial fitting plane is less than the third distance threshold, so as to obtain the target fitting plane corresponding to the point cloud partition and the plane attribute information of the target fitting plane.
[0203] S1105, use the environmental point clouds located on the target fitting plane in each point cloud partition as the original ground point clouds, and use the point clouds other than the original ground point clouds in the environmental point clouds in each point cloud partition as the original non-ground point clouds.
[0204] S1106. When the plane attribute information of the target fitting plane in the point cloud partition does not meet the standard plane information, determine the average flatness and flatness standard deviation of the target layer according to the flatness in the plane attribute information of the target fitting planes corresponding to each point cloud partition in the target layer to which the point cloud partition belongs.
[0205] Among them, the plane attribute information includes at least flatness.
[0206] S1107. Determine the flatness threshold of the target layer according to the average flatness and flatness standard deviation of the target layer to which the point cloud partition belongs.
[0207] S1108. Determine the flatness probability of the point cloud partition according to the flatness threshold of the target layer and the flatness of the target fitting plane corresponding to the point cloud partition.
[0208] S1109. When the flatness probability is less than or equal to the probability threshold, regard both the original ground point cloud and the original non-ground point cloud in the point cloud partition as the initial non-ground point cloud; and when the flatness probability is greater than the probability threshold, regard the original ground point cloud in the point cloud partition as the initial ground point cloud, and regard the original non-ground point cloud as the initial non-ground point cloud.
[0209] S1110. Determine the point cloud centroid of the point cloud partition according to the initial non-ground point cloud of the point cloud partition.
[0210] S1111. For each point cloud partition, select the adjacent ground point cloud with the shortest distance to the point cloud centroid from the initial ground point clouds of the other point cloud partitions except this point cloud partition among all point cloud partitions, and regard the point cloud partition to which the adjacent ground point cloud belongs as the adjacent partition corresponding to this point cloud partition.
[0211] S1112. Select the reference ground point cloud with a distance less than the first distance threshold from the point cloud centroid of the point cloud partition from the initial ground point clouds of the adjacent partition corresponding to the point cloud partition, and perform plane fitting processing on the reference ground point cloud to obtain the reference fitting plane.
[0212] S1113. According to the distance between the initial non-ground point cloud of the point cloud partition and the reference fitting plane, regard the initial non-ground point cloud with a distance less than the second distance threshold from the reference fitting plane in the point cloud partition as the target ground point cloud.
[0213] S1114. Determine the ground information of the target area according to the target ground point clouds and initial ground point clouds of each point cloud partition.
[0214] For the specific processes of the above S1101 - S1114, reference can be made to the description of the above method embodiments, and their implementation principles and technical effects are similar, so they will not be elaborated here.
[0215] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are sequentially shown according to the indications of the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless there is a clear indication in this document, there is no strict order limit for the execution of these steps, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same moment, but can be executed at different moments, and the execution order of these steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.
[0216] Based on the same inventive concept, an embodiment of the present application further provides a point cloud processing device for implementing the above-mentioned point cloud processing method. The implementation solution provided by this device to solve the problem is similar to the implementation solution described in the above method. Therefore, the specific limitations in one or more embodiments of the following point cloud processing device can refer to the limitations on the point cloud processing method in the above text, and will not be repeated here.
[0217] In an exemplary embodiment, as Figure 12 shown, a point cloud processing device 1 is provided, including: a point cloud partitioning module 10, a ground segmentation module 20, a partition determination module 30, a point cloud determination module 40, and an information determination module 50, where:
[0218] The point cloud partitioning module 10 is configured to partition the environmental point cloud of the target area to obtain at least two point cloud partitions;
[0219] The ground segmentation module 20 is configured to perform ground segmentation processing on the environmental point cloud in each point cloud partition respectively to obtain the initial ground point cloud and the initial non-ground point cloud of each point cloud partition;
[0220] The partition determination module 30 is configured to determine the adjacent partition corresponding to each point cloud partition from each point cloud partition according to the initial non-ground point cloud and the initial ground point cloud of each point cloud partition;
[0221] The point cloud determination module 40 is configured to determine the target ground point cloud from the initial non-ground point cloud of each point cloud partition according to the distance between the initial non-ground point cloud of each point cloud partition and the initial ground point cloud of the corresponding adjacent partition;
[0222] The information determination module 50 is configured to determine the ground information of the target area according to the target ground point cloud and the initial ground point cloud of each point cloud partition.
[0223] In an exemplary embodiment, the partition determination module 30 is specifically configured to:
[0224] For each point cloud partition, determine the centroid of the point cloud of the point cloud partition according to the initial non-ground point cloud of the point cloud partition; select the adjacent ground point cloud from the initial ground point clouds of the remaining point cloud partitions according to the distances between the initial ground point clouds of the remaining point cloud partitions and the centroid of the point cloud, where the remaining point cloud partitions are the point cloud partitions other than the point cloud partition among all point cloud partitions; and use the point cloud partition to which the adjacent ground point cloud belongs as the adjacent partition corresponding to the point cloud partition.
[0225] In an exemplary embodiment, the point cloud determination module 40 is specifically configured to:
[0226] For each point cloud partition, select the reference ground point cloud with a distance less than the first distance threshold from the initial ground point clouds of the adjacent partition corresponding to the point cloud partition to the centroid of the point cloud of the point cloud partition; perform plane fitting processing on the reference ground point cloud to obtain a reference fitting plane; and use the initial non-ground point cloud in the point cloud partition with a distance less than the second distance threshold from the reference fitting plane as the target ground point cloud according to the distance between the initial non-ground point cloud of the point cloud partition and the reference fitting plane.
[0227] In an exemplary embodiment, the ground segmentation module 20 includes:
[0228] An initial fitting unit, configured to perform plane fitting processing on the environmental point cloud in each point cloud partition to obtain the target fitting plane corresponding to the point cloud partition and the plane attribute information of the target fitting plane;
[0229] A point cloud division unit, configured to use the environmental point cloud located on the target fitting plane as the original ground point cloud, and use the point cloud other than the original ground point cloud in the environmental point cloud in the point cloud partition as the original non-ground point cloud;
[0230] A point cloud optimization unit, configured to optimize the original ground point cloud and the original non-ground point cloud in the point cloud partition according to the plane attribute information of the target fitting plane to obtain the initial ground point cloud and the initial non-ground point cloud of the point cloud partition.
[0231] In an exemplary embodiment, the point cloud division module 10 is specifically configured to:
[0232] Divide the environmental point cloud of the target area based on a preset distance interval, a preset angle interval, and a preset number of laps to obtain at least two point cloud partitions;
[0233] Correspondingly, the point cloud optimization unit is specifically configured to:
[0234] In the case where the plane attribute information of the target fitting plane does not meet the standard plane information, determine the flatness probability of the point cloud partition according to the plane attribute information of the target fitting plane corresponding to each point cloud partition in the target layer to which the point cloud partition belongs; wherein, the plane attribute information at least includes flatness; in the case where the flatness probability is less than or equal to the probability threshold, both the original ground point cloud and the original non-ground point cloud in the point cloud partition are used as the initial non-ground point cloud; in the case where the flatness probability is greater than the probability threshold, the original ground point cloud in the point cloud partition is used as the initial ground point cloud, and the original non-ground point cloud is used as the initial non-ground point cloud.
[0235] In an exemplary embodiment, the point cloud optimization unit is further configured to:
[0236] Determine the average flatness and flatness standard deviation of the target layer according to the flatness of the target fitting plane corresponding to each point cloud partition in the target layer to which the point cloud partition belongs; determine the flatness threshold of the target layer according to the average flatness and flatness standard deviation of the target layer; determine the flatness probability of the point cloud partition according to the flatness threshold and the flatness of the target fitting plane corresponding to the point cloud partition.
[0237] In an exemplary embodiment, the initial fitting unit is specifically configured to:
[0238] Sort the environmental point clouds in the point cloud partition in ascending order according to the height values of the environmental point clouds, and use the first target number of environmental point clouds sorted in the front as the initial fitting point clouds; perform plane fitting processing on the initial fitting point clouds to obtain an initial fitting plane; optimize the initial fitting plane according to the environmental point clouds in the point cloud partition whose distance from the initial fitting plane is less than the third distance threshold, so as to obtain the target fitting plane corresponding to the point cloud partition and the plane attribute information of the target fitting plane.
[0239] Each module in the above point cloud processing device can be implemented in whole or in part by software, hardware and their combination. The above modules can be embedded in the processor in the computer device in the form of hardware or be independent of the processor, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0240] In an exemplary embodiment, a computer device is provided. The computer device can be a terminal, and its internal structure diagram can be as Figure 13As shown in the figure. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface, the display unit, and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a point cloud processing method. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the housing of the computer device, or an external keyboard, touchpad, or mouse, etc.
[0241] Those skilled in the art can understand that Figure 13 the structure shown in the figure is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0242] In one embodiment, a computer device is further provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps in the above method embodiments are implemented.
[0243] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by the processor, the steps in the above method embodiments are implemented.
[0244] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by the processor, the steps in the above method embodiments are implemented.
[0245] It should be noted that the data involved in this application (including but not limited to environmental point cloud data, etc.) are all data authorized by users or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant regulations.
[0246] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in this application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., and are not limited thereto. The processors involved in the embodiments provided in this application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logic devices, data processing logics based on quantum computing, artificial intelligence (AI) processors, etc., and are not limited thereto.
[0247] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered to be within the scope recorded in this application.
[0248] The embodiments described above merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation to the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all fall within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.
Claims
1. A point cloud processing method, characterized in that: The method comprises: Dividing the environmental point cloud of the target area to obtain at least two point cloud partitions; Perform ground segmentation processing on the environmental point clouds in each point cloud partition respectively to obtain the initial ground point cloud and initial non-ground point cloud of each point cloud partition; Determine, from each point cloud partition, an adjacent partition corresponding to each point cloud partition according to the initial non-ground point cloud and the initial ground point cloud of each point cloud partition; Determine the target ground point cloud from the initial non-ground point cloud of each point cloud partition according to the distance between the initial non-ground point cloud of each point cloud partition and the initial ground point cloud of the corresponding adjacent partition; The ground information of the target area is determined according to the target ground point cloud and the initial ground point cloud of each point cloud partition.
2. The method according to claim 1, characterized in that According to the initial non-ground point cloud and the initial ground point cloud of each point cloud partition, the adjacent partition corresponding to each point cloud partition is determined from each point cloud partition, including: For each point cloud partition, determining the point cloud centroid of the point cloud partition according to the initial non-ground point cloud of the point cloud partition; Selecting adjacent ground point clouds from the initial ground point clouds of the remaining point cloud partitions according to the distance between the initial ground point clouds of the remaining point cloud partitions and the point cloud centroid; wherein the remaining point cloud partitions are point cloud partitions other than the point cloud partition in each point cloud partition; The point cloud partition to which the adjacent ground point cloud belongs is used as the adjacent partition corresponding to the point cloud partition.
3. The method according to claim 1, characterized in that According to the distance between the initial non-ground point cloud of each point cloud partition and the initial ground point cloud in the corresponding adjacent partition, the target ground point cloud is determined from the initial non-ground point cloud of each point cloud partition, including: For each point cloud partition, selecting, from the initial ground point clouds of the adjacent partitions corresponding to the point cloud partition, a reference ground point cloud whose distance to the point cloud centroid of the point cloud partition is less than a first distance threshold; Performing plane fitting processing on the reference ground point cloud to obtain a reference fitting plane; According to the distance between the initial non-ground point cloud of the point cloud partition and the reference fitting plane, the initial non-ground point cloud in the point cloud partition whose distance to the reference fitting plane is less than a second distance threshold is used as the target ground point cloud.
4. The method according to any one of claims 1 to 3, characterized in that: The environmental point clouds in each point cloud partition are respectively subjected to ground segmentation processing to obtain the initial ground point cloud and initial non-ground point cloud in each point cloud partition, including: For each point cloud partition, performing plane fitting processing on the environment point cloud in the point cloud partition to obtain a target fitting plane corresponding to the point cloud partition and plane attribute information of the target fitting plane; The environmental point cloud located on the target fitting plane is used as the original ground point cloud, and the point cloud other than the original ground point cloud in the environmental point cloud within the point cloud partition is used as the original non-ground point cloud; According to the plane attribute information of the target fitting plane, the original ground point cloud and the original non-ground point cloud in the point cloud partition are optimized to obtain the initial ground point cloud and the initial non-ground point cloud of the point cloud partition.
5. The method according to claim 4, characterized in that The environmental point cloud of the target area is divided into at least two point cloud partitions, including: Based on a preset distance interval, a preset angle interval, and a preset number of circles, the environmental point cloud of the target area is divided to obtain at least two point cloud partitions; The step of optimizing the original ground point cloud and the original non-ground point cloud in the point cloud partition according to the plane attribute information of the target fitting plane to obtain the initial ground point cloud and the initial non-ground point cloud of the point cloud partition includes: In the case where the plane attribute information of the target fitting plane does not satisfy the standard plane information, the flatness probability of the point cloud partition is determined according to the plane attribute information of the target fitting plane corresponding to each point cloud partition in the target circle layer to which the point cloud partition belongs; wherein the plane attribute information at least includes flatness; When the flatness probability is less than or equal to the probability threshold, both the original ground point cloud and the original non-ground point cloud in the point cloud partition are used as the initial non-ground point cloud; When the flatness probability is greater than the probability threshold, the original ground point cloud in the point cloud partition is used as the initial ground point cloud, and the original non-ground point cloud is used as the initial non-ground point cloud.
6. The method according to claim 5, characterized in that Determining the flatness probability of the point cloud partition according to the plane attribute information of the target fitting plane corresponding to each point cloud partition in the target circle layer to which the point cloud partition belongs, includes: Determine the average flatness and the flatness standard deviation of the target circle layer according to the flatness of the target fitting plane corresponding to each point cloud partition in the target circle layer to which the point cloud partition belongs; Determining a flatness threshold of the target circle layer according to the average flatness and flatness standard deviation of the target circle layer; The flatness probability of the point cloud partition is determined according to the flatness threshold and the flatness of the target fitting plane corresponding to the point cloud partition.
7. The method according to claim 4, characterized in that Performing plane fitting processing on the environment point cloud in the point cloud partition to obtain a target fitting plane corresponding to the point cloud partition and plane attribute information of the target fitting plane, including: According to the height values of each environmental point cloud in the point cloud partition, the environmental point clouds are sorted in order from low to high, and a target number of environmental point clouds in the front order are used as initial fitting point clouds; Performing plane fitting processing on the initial fitting point cloud to obtain an initial fitting plane; According to the environment point cloud within the point cloud partition whose distance from the initial fitting plane is less than a third distance threshold, the initial fitting plane is optimized to obtain a target fitting plane corresponding to the point cloud partition and plane attribute information of the target fitting plane.
8. A point cloud processing device, characterized in that: The device comprises: A point cloud partitioning module is used to partition the environment point cloud of the target area to obtain at least two point cloud partitions; The ground segmentation module is used to perform ground segmentation processing on the environment point cloud in each point cloud partition to obtain the initial ground point cloud and initial non-ground point cloud of each point cloud partition; A partition determination module, used for determining an adjacent partition corresponding to each point cloud partition from each point cloud partition according to the initial non-ground point cloud and the initial ground point cloud of each point cloud partition; A point cloud determination module, for determining a target ground point cloud from the initial non-ground point cloud of each point cloud partition according to a distance between the initial non-ground point cloud of each point cloud partition and the initial ground point cloud of the corresponding adjacent partition; The information determination module is used to determine the ground information of the target area according to the target ground point cloud and the initial ground point cloud of each point cloud partition.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Point cloud ground segmentation method based on region division and adaptive threshold
CN114782467A
Ground point cloud segmentation method and device and computer readable storage medium
CN115375713A
Ground separation method and device and feeding operation system
CN117470219A
Travelable area segmentation method and device, electronic equipment and storage medium
CN118840560A
Ground point cloud segmentation method, storage medium and electronic equipment
CN119048532A