Ground segmentation method and device based on point cloud data, equipment and medium
By employing a dual-granularity mesh generation and plane fitting method, the problems of terrain undulation and noise interference in traditional ground point cloud segmentation methods are solved, achieving more efficient and accurate ground point cloud segmentation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN CONSYS SCI&TECH CO LTD
- Filing Date
- 2026-06-10
- Publication Date
- 2026-07-14
AI Technical Summary
Traditional ground point cloud segmentation methods are easily affected by factors such as terrain undulations and noise points, resulting in poor accuracy in ground point cloud segmentation.
A dual-granularity grid partitioning method is adopted to divide point cloud data into coarse grid cells and fine grid cells. By performing preliminary screening of data points in fine grid cells and plane fitting of data points in coarse grid cells, the method dynamically adapts to the ground characteristics of different regions and improves the segmentation accuracy.
It significantly improves the accuracy of ground point cloud segmentation and data processing efficiency, better reflects the real ground morphology, and effectively distinguishes between ground points and non-ground points.
Smart Images

Figure CN122391270A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a ground segmentation method, apparatus, device and medium based on point cloud data. Background Technology
[0002] In the field of 3D environmental perception, such as autonomous driving, robot navigation, terrain modeling, and drone obstacle avoidance, point cloud data collected by sensors such as LiDAR and depth cameras typically includes various types of data, including ground points, obstacle points, and vegetation points. Accurate segmentation of ground point clouds is fundamental to subsequent tasks such as environmental modeling, path planning, and target detection.
[0003] Traditional ground point cloud segmentation methods mainly include those based on height thresholds or those based on slope thresholds. Height threshold-based methods directly filter the point cloud by setting a fixed height threshold, classifying points below the threshold as ground points. Slope threshold-based methods calculate the slope of local areas of the point cloud (such as the height difference between adjacent points) and combine this with the slope threshold to determine the ground and obstacles.
[0004] However, traditional ground point cloud segmentation methods are easily affected by factors such as terrain undulations and noise points, resulting in poor accuracy in ground point cloud segmentation. Summary of the Invention
[0005] This application provides a ground segmentation method, apparatus, device, and medium based on point cloud data to improve the accuracy of ground point cloud segmentation.
[0006] In a first aspect, embodiments of this application provide a ground segmentation method based on point cloud data, including:
[0007] Acquire point cloud data to be processed, wherein the point cloud data to be processed includes: multiple first data points;
[0008] The plurality of first data points are divided into grids according to a preset grid granularity size to obtain at least one coarse grid unit. Each coarse grid unit includes at least one fine grid unit, and each fine grid unit includes at least one first data point.
[0009] For each fine grid cell, at least one second data point is determined based on the spatial location information of at least one first data point in the fine grid cell;
[0010] For each coarse grid cell, plane fitting processing is performed on all second data points in at least one fine grid cell below the coarse grid cell to obtain the fitted ground plane corresponding to the coarse grid cell;
[0011] Based on the fitted ground plane corresponding to all coarse grid cells, at least one ground point and at least one non-ground point are determined in the point cloud data to be processed.
[0012] In one or more embodiments, the preset mesh granularity includes a fine mesh granularity size and a coarse mesh granularity size;
[0013] Accordingly, the step of dividing the plurality of first data points into a grid according to a preset grid granularity size to obtain at least one coarse grid cell includes:
[0014] The plurality of first data points are divided into grids according to the fine grid granularity to obtain at least one fine grid cell;
[0015] The at least one fine grid cell is divided into at least one coarse grid cell based on the coarse grid granularity size.
[0016] In one or more embodiments, determining at least one ground point and at least one non-ground point in the point cloud data to be processed based on the fitted ground plane corresponding to all coarse grid cells includes:
[0017] The effectiveness of the fitted ground plane corresponding to all coarse grid cells is verified according to the preset effective constraints, so as to obtain at least one effective coarse grid cell and the effective surface plane corresponding to the at least one effective coarse grid cell.
[0018] Neighborhood smoothing is performed on the effective surface plane corresponding to the at least one effective coarse grid cell to obtain at least one continuous ground plane;
[0019] For each first data point, the target continuous ground plane corresponding to the target coarse grid cell to which the first data point belongs is determined in the at least one continuous ground plane;
[0020] Determine the first vertical distance from the first data point to the target continuous ground plane;
[0021] Based on the first vertical distance of all first data points and the first preset distance threshold, at least one ground point and at least one non-ground point are determined in the point cloud data to be processed.
[0022] In one or more embodiments, the step of validating the fitted ground planes corresponding to all coarse mesh elements according to the preset valid constraints, to obtain at least one valid coarse mesh element and the valid surface plane corresponding to the at least one valid coarse mesh element, includes:
[0023] For each coarse grid cell, determine at least one second vertical distance between all second data points in at least one fine grid cell below the coarse grid cell and the target fitted ground plane corresponding to the coarse grid cell;
[0024] Based on the at least one second vertical distance and the second preset distance threshold in the preset effective constraints, the value of the interior points contained in the target fitted ground plane corresponding to the coarse grid cell is determined. The preset effective constraints include the second preset distance threshold, the preset interior point threshold, and the preset angle threshold.
[0025] If the value of the interior point is greater than or equal to the preset interior point threshold, then the angle between the normal vector of the target fitted ground plane corresponding to the coarse grid cell and the preset reference gravity direction is determined.
[0026] If the angle value is less than or equal to the preset angle threshold, then the coarse grid cell is determined to be a valid coarse grid cell, and the target fitted ground plane corresponding to the coarse grid cell is determined to be a valid surface plane;
[0027] Based on all the coarse mesh elements, at least one effective coarse mesh element and the effective surface plane corresponding to the at least one effective coarse mesh element are obtained.
[0028] In one or more embodiments, performing neighborhood smoothing on the effective surface plane corresponding to the at least one effective coarse grid cell to obtain at least one continuous ground plane includes:
[0029] For each effective coarse mesh cell, the first plane parameter value of the effective coarse mesh cell and the second plane parameter value of the adjacent effective coarse mesh cells of the effective coarse mesh cell are determined. The plane parameters include the center point height parameter and the plane normal vector parameter.
[0030] The first plane parameter value and the second plane parameter value are weighted and averaged according to preset weights to determine the optimized plane parameter value.
[0031] Based on the optimized planar parameter values, the target effective ground plane corresponding to the effective coarse grid cell is subjected to neighborhood smoothing to obtain the target continuous ground plane;
[0032] Based on all the target continuous ground planes, at least one continuous ground plane is obtained.
[0033] In one or more embodiments, determining at least one second data point based on the spatial location information of at least one first data point in the fine mesh cell includes:
[0034] Based on the spatial location information of at least one first data point in the fine grid cell, determine the height value corresponding to at least one first data point in the fine grid cell;
[0035] Based on a preset height threshold and the height value corresponding to at least one first data point in the fine grid cell, at least one candidate point is obtained in the fine grid cell;
[0036] For each candidate point in the fine mesh cell, determine the height difference between the candidate point and other candidate points among the at least one candidate point;
[0037] The target candidate point corresponding to the maximum value among all height differences is deleted to obtain at least one second data point in the fine grid cell.
[0038] In one or more embodiments, after determining at least one ground point and at least one non-ground point in the point cloud data to be processed based on the fitted ground plane corresponding to all coarse grid cells, the method further includes:
[0039] At least one vegetation data point is obtained based on at least one candidate point in the fine grid cell and at least one ground point, wherein the vegetation data point belongs to the candidate point but does not belong to the ground point;
[0040] The at least one vegetation data point is smoothed to obtain at least one standard vegetation data point, which is used to determine scalable ground point information.
[0041] Secondly, embodiments of this application provide a ground segmentation device based on point cloud data, comprising:
[0042] The acquisition module is used to acquire point cloud data to be processed, wherein the point cloud data to be processed includes: multiple first data points;
[0043] The first processing module is used to divide the plurality of first data points into a grid according to a preset grid granularity size to obtain at least one coarse grid unit, each coarse grid unit including at least one fine grid unit, and each fine grid unit including at least one first data point;
[0044] The first determining module is used to determine at least one second data point for each fine grid cell based on the spatial location information of at least one first data point in the fine grid cell;
[0045] The second processing module is used to perform plane fitting processing on all the second data points in at least one fine grid cell under each coarse grid cell to obtain the fitted ground plane corresponding to the coarse grid cell.
[0046] The second determining module is used to determine at least one ground point and at least one non-ground point in the point cloud data to be processed based on the fitted ground plane corresponding to all coarse grid cells.
[0047] In one or more embodiments, the preset mesh granularity includes a fine mesh granularity size and a coarse mesh granularity size;
[0048] Accordingly, the first processing module is specifically used for:
[0049] The plurality of first data points are divided into grids according to the fine grid granularity to obtain at least one fine grid cell;
[0050] The at least one fine grid cell is divided into at least one coarse grid cell based on the coarse grid granularity size.
[0051] In one or more embodiments, the second determining module is specifically used for:
[0052] The effectiveness of the fitted ground plane corresponding to all coarse grid cells is verified according to the preset effective constraints, so as to obtain at least one effective coarse grid cell and the effective surface plane corresponding to the at least one effective coarse grid cell.
[0053] Neighborhood smoothing is performed on the effective surface plane corresponding to the at least one effective coarse grid cell to obtain at least one continuous ground plane;
[0054] For each first data point, the target continuous ground plane corresponding to the target coarse grid cell to which the first data point belongs is determined in the at least one continuous ground plane;
[0055] Determine the first vertical distance from the first data point to the target continuous ground plane;
[0056] Based on the first vertical distance of all first data points and the first preset distance threshold, at least one ground point and at least one non-ground point are determined in the point cloud data to be processed.
[0057] In one or more embodiments, the second determining module verifies the validity of the fitted ground planes corresponding to all coarse mesh elements according to the preset valid constraints, and obtains at least one valid coarse mesh element and an effective surface plane corresponding to the at least one valid coarse mesh element, specifically used for:
[0058] For each coarse grid cell, determine at least one second vertical distance between all second data points in at least one fine grid cell below the coarse grid cell and the target fitted ground plane corresponding to the coarse grid cell;
[0059] Based on the at least one second vertical distance and the second preset distance threshold in the preset effective constraints, the value of the interior points contained in the target fitted ground plane corresponding to the coarse grid cell is determined. The preset effective constraints include the second preset distance threshold, the preset interior point threshold, and the preset angle threshold.
[0060] If the value of the interior point is greater than or equal to the preset interior point threshold, then the angle between the normal vector of the target fitted ground plane corresponding to the coarse grid cell and the preset reference gravity direction is determined.
[0061] If the angle value is less than or equal to the preset angle threshold, then the coarse grid cell is determined to be a valid coarse grid cell, and the target fitted ground plane corresponding to the coarse grid cell is determined to be a valid surface plane;
[0062] Based on all the coarse mesh elements, at least one effective coarse mesh element and the effective surface plane corresponding to the at least one effective coarse mesh element are obtained.
[0063] In one or more embodiments, the second determining module performs neighborhood smoothing on the effective surface plane corresponding to the at least one effective coarse grid cell to obtain at least one continuous ground plane, specifically for:
[0064] For each effective coarse mesh cell, the first plane parameter value of the effective coarse mesh cell and the second plane parameter value of the adjacent effective coarse mesh cells of the effective coarse mesh cell are determined. The plane parameters include the center point height parameter and the plane normal vector parameter.
[0065] The first plane parameter value and the second plane parameter value are weighted and averaged according to preset weights to determine the optimized plane parameter value.
[0066] Based on the optimized planar parameter values, the target effective ground plane corresponding to the effective coarse grid cell is subjected to neighborhood smoothing to obtain the target continuous ground plane;
[0067] Based on all the target continuous ground planes, at least one continuous ground plane is obtained.
[0068] In one or more embodiments, the first determining module determines at least one second data point based on the spatial location information of at least one first data point in the fine grid cell, specifically for:
[0069] Based on the spatial location information of at least one first data point in the fine grid cell, determine the height value corresponding to at least one first data point in the fine grid cell;
[0070] Based on a preset height threshold and the height value corresponding to at least one first data point in the fine grid cell, at least one candidate point is obtained in the fine grid cell;
[0071] For each candidate point in the fine mesh cell, determine the height difference between the candidate point and other candidate points among the at least one candidate point;
[0072] The target candidate point corresponding to the maximum value among all height differences is deleted to obtain at least one second data point in the fine grid cell.
[0073] In one or more embodiments, after determining at least one ground point and at least one non-ground point in the point cloud data to be processed based on the fitted ground plane corresponding to all coarse grid cells, the second determining module is further configured to:
[0074] At least one vegetation data point is obtained based on at least one candidate point in the fine grid cell and at least one ground point, wherein the vegetation data point belongs to the candidate point but does not belong to the ground point;
[0075] The at least one vegetation data point is smoothed to obtain at least one standard vegetation data point, which is used to determine scalable ground point information.
[0076] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor;
[0077] The memory stores computer-executed instructions;
[0078] The processor executes computer execution instructions stored in the memory, such that the processor, when executed, is used to implement the method described in the first aspect and any of the embodiments above.
[0079] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the methods described in the first aspect and any of the embodiments above.
[0080] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, is used to implement the ground segmentation method based on point cloud data as described in the first aspect and various possible implementations of the first aspect.
[0081] This application provides a ground segmentation method, apparatus, device, and medium based on point cloud data. The method first acquires point cloud data to be processed, which includes multiple first data points. Then, the multiple first data points are divided into grids according to a preset grid granularity size to obtain at least one coarse grid unit. Each coarse grid unit includes at least one fine grid unit, and each fine grid unit includes at least one first data point. Next, for each fine grid unit, at least one second data point is determined based on the spatial location information of the at least one first data point within the fine grid unit. Then, for each coarse grid unit, all second data points in the at least one fine grid unit under the coarse grid unit are subjected to plane fitting processing to obtain a fitted ground plane corresponding to the coarse grid unit. Finally, based on the fitted ground planes corresponding to all coarse grid units, at least one ground point and at least one non-ground point in the point cloud data to be processed are determined. In the above method, by dividing the point cloud data to be processed into multiple coarse and fine grid units, the disordered point cloud data is transformed into structured spatial data, which can effectively reduce the amount of data processed each time and significantly improve the data processing efficiency. The fine grid ensures the accuracy of local analysis, while the coarse grid provides a framework for macroscopic fitting and optimization. In the fine grid unit, the second data point is determined based on the spatial location information of the first data point, which enables efficient data point screening and improves the reliability of subsequent data processing. By performing plane fitting processing on all the second data points in each coarse grid unit, a more accurate fitted ground plane can be obtained, reflecting the real ground morphology. By classifying ground points and non-ground points based on the fitted ground planes corresponding to all coarse grid units, the accuracy of ground segmentation is improved. Attached Figure Description
[0082] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0083] Figure 1 A flowchart illustrating the ground segmentation method based on point cloud data provided in this application embodiment. Figure 1 ;
[0084] Figure 2 A flowchart illustrating the ground segmentation method based on point cloud data provided in this application embodiment. Figure 2 ;
[0085] Figure 3 A flowchart illustrating the ground segmentation method based on point cloud data provided in this application embodiment. Figure 3 ;
[0086] Figure 4 A schematic diagram of the structure of the ground segmentation device based on point cloud data provided in the embodiments of this application;
[0087] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0088] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0089] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0090] Before introducing the embodiments of this application, the application background of the embodiments of this application will be explained first:
[0091] In the fields of 3D environmental perception, such as autonomous driving, robot navigation, terrain modeling, and drone obstacle avoidance, point cloud data collected by sensors such as LiDAR and depth cameras typically includes various types of data, including ground points, obstacle points, and vegetation points. Accurate segmentation of the ground point cloud is fundamental for subsequent tasks such as environmental modeling, path planning, and target detection. For example, in autonomous driving scenarios, vehicles need to identify road surfaces and non-ground obstacles such as curbs, potholes, and vegetation in real time to plan safe driving paths; in robot navigation, robots need to segment the ground to avoid falls or jamming; and in terrain modeling, the extraction of ground points is the core of building digital elevation models.
[0092] Traditional ground point cloud segmentation methods mainly include those based on height thresholds or those based on slope thresholds. Height threshold-based methods directly filter the point cloud by setting a fixed height threshold, classifying points below the threshold as ground points. Slope threshold-based methods calculate the slope of local areas of the point cloud (such as the height difference between adjacent points) and combine this with the slope threshold to determine the ground and obstacles.
[0093] However, traditional ground point cloud segmentation methods are easily affected by factors such as terrain undulations and noise points, resulting in poor accuracy in ground point cloud segmentation.
[0094] This application provides a ground segmentation method based on point cloud data, aiming to solve the aforementioned technical problems of existing technologies. The technical concept of this application is as follows: Traditional ground point segmentation directly segments ground point clouds using simple thresholds, resulting in a high misclassification rate. Ground point cloud segmentation mainly involves separating ground points and non-ground points based on the three-dimensional spatial information carried by the point cloud data. To address the problems of traditional methods, if the point cloud data can be preliminarily screened, and then the screened point cloud data can be fitted to the real ground, it is possible to dynamically adapt to the ground characteristics of different regions, thereby improving the accuracy of ground point cloud segmentation. Therefore, this embodiment considers dividing the acquired point cloud data into multiple first data points according to a preset grid granularity size to obtain at least one coarse grid unit, and each coarse grid unit includes at least one fine grid unit, so as to use the fine grid to achieve local fine processing and the coarse grid to reduce the number of computing units; for each fine grid unit, preliminary screening is performed based on the spatial location information of at least one first data point in the fine grid unit to determine at least one second data point, thereby improving the data quality of subsequent analysis; for each coarse grid unit, plane fitting processing is performed on all the second data points in at least one fine grid unit under the coarse grid unit to obtain the fitted ground plane corresponding to the coarse grid unit. The fitted ground plane can adapt to the ground characteristics of the real area corresponding to each coarse grid unit, thereby accurately separating the ground points and non-ground points in the point cloud data to be processed.
[0095] The execution subject of this application embodiment is an electronic device, which can be a terminal device, such as a laptop, desktop computer, or tablet computer, or a server. In practical applications, whether the electronic device is a terminal device or a server can be determined according to the actual situation, and no specific limitation is imposed on it.
[0096] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0097] Figure 1 A flowchart illustrating the ground segmentation method based on point cloud data provided in this application embodiment. Figure 1 .like Figure 1 As shown, the ground segmentation method based on point cloud data includes the following steps:
[0098] S110. Obtain the point cloud data to be processed;
[0099] The point cloud data to be processed includes: multiple first data points;
[0100] In this step, in order to perform point cloud ground segmentation, we can first acquire the point cloud data to be processed, providing a data foundation for subsequent analysis.
[0101] In one possible implementation, the point cloud data to be processed is acquired by sensors such as LiDAR in scenarios such as autonomous driving and robot navigation. It includes first data points of various types, such as ground, obstacles, and vegetation, and the data is distributed in an unordered manner. Each first data point includes at least three-dimensional spatial coordinate information (x, y, z), and some first data points include auxiliary attribute information such as reflection intensity and timestamp, which can directly reflect the spatial position and surface features of objects (ground, obstacles, vegetation, etc.) in the environment.
[0102] In addition, preliminary format standardization processing can be performed on the point cloud data to be processed to ensure that each first data point contains complete three-dimensional spatial coordinate information, laying the foundation for subsequent mesh division.
[0103] S120. Divide multiple first data points into a grid according to a preset grid granularity size to obtain at least one coarse grid cell;
[0104] Each coarse grid cell includes at least one fine grid cell, and each fine grid cell includes at least one first data point.
[0105] In this step, multiple first data points are divided into dual-granularity grids using a preset grid granularity size to balance processing efficiency and local accuracy. The disordered first data points are mapped into a structured coarse grid cell space. Each coarse grid cell serves as the basic unit for subsequent data processing and contains multiple fine grid cells. The fine grid cells are used for fine-grained management of the local point cloud.
[0106] In one possible implementation, the preset mesh granularity includes a fine mesh granularity size and a coarse mesh granularity size;
[0107] Accordingly, one possible implementation of step S120 above includes the following steps:
[0108] Step 1: Divide multiple first data points into a grid according to the fine grid granularity to obtain at least one fine grid cell;
[0109] For example, by using a preset fine mesh granularity size, multiple first data points are finely spatially discretized, and the three-dimensional space is decomposed into dense small cubic units to obtain at least one fine mesh unit, which facilitates the rapid calculation of local properties in the future.
[0110] In one possible implementation, the preset fine grid granularity size is 0.1m×0.1m×0.1m. With the preset fine grid granularity size, the three-dimensional space is divided into dense fine grid units. Each fine grid unit contains at least one first data point, providing a refined spatial basis for subsequent ground candidate point screening.
[0111] Step 2: Divide at least one fine grid cell into at least one coarse grid cell based on the coarse grid granularity.
[0112] For example, macro-region aggregation is performed based on fine grid cells. By using a preset coarse grid granularity size, multiple adjacent fine grid cells are classified into the same coarse grid cell to form a basic region framework for local plane fitting.
[0113] In one possible implementation, the preset coarse mesh size is 1.0m×1.0m×1.0m, keeping the coarse and fine mesh regions aligned in three-dimensional space, ensuring that the spatial range of each coarse mesh unit is clear and contains a fixed number of fine mesh units. Since the preset fine mesh size is 0.1m×0.1m×0.1m, each coarse mesh unit contains 10 fine mesh units in each of the x, y, and z directions.
[0114] All fine mesh cells are assigned to corresponding coarse mesh cells, ultimately forming a structured set of coarse mesh cells. Each coarse mesh cell is associated with multiple fine mesh cells and their first data points, providing a regional carrier for subsequent local plane fitting.
[0115] S130. For each fine grid cell, determine at least one second data point based on the spatial location information of at least one first data point in the fine grid cell.
[0116] In this step, for each fine grid cell, valid candidate points are screened based on the spatial location information of at least one first data point in the fine grid cell. First data points with abnormal spatial locations are quickly eliminated, and at least one valid candidate point that conforms to the ground features is retained as a second data point.
[0117] In one possible implementation, step S130 described above may include the following steps:
[0118] Step 1: Based on the spatial location information of at least one first data point in the fine grid cell, determine the height value corresponding to at least one first data point in the fine grid cell;
[0119] For example, the altitude value directly reflects the vertical spatial location of the first data point and is a fundamental physical attribute that distinguishes ground-based and non-ground-based points. Key altitude features are extracted from the spatial location information of at least one first data point to provide a quantitative basis for subsequent screening.
[0120] In one possible implementation, the z-axis coordinate of the lidar sensor's installation location is used as a reference, and the z-value in the three-dimensional spatial coordinates (x, y, z) of each first data point is extracted as the height value. If the sensor has an installation tilt angle, the z-value can be corrected by coordinate transformation to ensure that the height value accurately reflects the vertical distance of each first data point relative to the ground. For example, if the coordinates of a first data point are (2.5m, 3.8m, 1.2m), its corresponding height value is 1.2m.
[0121] Step 2: Based on the preset height threshold and the height value corresponding to at least one first data point in the fine grid cell, obtain at least one candidate point in the fine grid cell;
[0122] For example, the height value corresponding to at least one first data point in the fine grid cell is compared with the height threshold to perform preliminary coarse filtering on at least one first data point, quickly eliminating first data points that are too high or too low, thereby reducing the amount of subsequent calculations.
[0123] In one possible implementation, the preset height threshold needs to be determined by combining prior knowledge such as sensor installation height, scene characteristics, and expected ground range, taking into account both universality and specificity. Furthermore, the preset height threshold can include a lower limit and an upper limit to clearly define the height range.
[0124] For example, if the sensor is installed at a height of 1.8m, the preset height threshold range is 0.3m to 1.5m, meaning that the first data point with a height value within this range is retained as a candidate point. For urban road scenarios, the threshold range can be appropriately reduced (e.g., 0.5m to 1.2m) to accurately filter high-altitude obstacle points (e.g., rooftops, tops of streetlights) and low-altitude anomalies (e.g., noise points in ground depressions).
[0125] Step 3: For each candidate point in the fine mesh cell, determine the height difference between the candidate point and at least one other candidate point;
[0126] For example, for each candidate point in a fine grid cell, all other candidate points within the same fine grid cell are traversed, the absolute difference in height values between each pair is calculated, the consistency of the height distribution of candidate points is analyzed, and possible outliers or small obstacle points are identified.
[0127] Step 4: Delete the target candidate point corresponding to the maximum value among all height differences to obtain at least one second data point in the fine grid cell.
[0128] For example, the target candidate point corresponding to the maximum height difference is likely to be an outlier or a small obstacle. Removing it can make the remaining candidate points more consistent with the continuous distribution characteristics of the ground, providing reliable data points for subsequent plane fitting.
[0129] In one possible implementation, all height differences are counted and the maximum value is selected. The two candidate points corresponding to the maximum value are located, and the point whose height value deviates further from the group mean is selected as the target candidate point and deleted.
[0130] S140. For each coarse grid cell, perform plane fitting processing on all the second data points in at least one fine grid cell below the coarse grid cell to obtain the fitted ground plane corresponding to the coarse grid cell.
[0131] In this step, the second data point in all the fine grid cells under each coarse grid cell is fitted to obtain a local ground plane model, i.e., a fitted ground plane, which is used to adapt to the terrain changes in different regions.
[0132] In one possible implementation, the Random Sample Consensus (RANSAC) algorithm is used for fitting, which effectively overcomes the interference of noise and outliers. The fitting process of the RANSAC algorithm is as follows: First, a small number of second data points are randomly sampled to generate a plane hypothesis. Then, the distance from all candidate points to the plane is calculated, and the number of interior points within the threshold range is counted. After repeated iterations, the plane with the most interior points is selected as the fitting result of the coarse grid cell, that is, the fitted ground plane.
[0133] Furthermore, the fitted planes are not all real ground. The validity of the planes can be verified by using an in-point threshold (e.g., the number of in-points should not be less than 30% of the total candidate points) and a normal vector direction constraint (the angle between the normal vector and the Z-axis should be less than 10 degrees). If the planes are valid, they are retained as the fitted ground planes corresponding to the coarse grid.
[0134] S150. Based on the fitted ground plane corresponding to all coarse grid cells, determine at least one ground point and at least one non-ground point in the point cloud data to be processed.
[0135] In this step, based on the fitted ground plane corresponding to all coarse grid cells, the distance from each first data point in the point cloud data to be processed to the corresponding coarse grid fitted plane is used to distinguish ground points from non-ground points.
[0136] In one possible implementation, a coarse grid cell is matched to each first data point, and the signed vertical distance from the first data point to the corresponding fitted ground plane is calculated (the positive or negative sign of the distance indicates that the point is above (positive) or below (negative) the plane, respectively). If the absolute value of the distance is less than a first preset distance threshold (such as 0.1 meters or 0.15 meters), it is determined to be a ground point; if it is greater than or equal to the first preset distance threshold, it is determined to be a non-ground point (such as an obstacle or vegetation).
[0137] In one possible implementation, after step S150 described above, the method further includes the following steps:
[0138] Step 1: Obtain at least one vegetation data point based on at least one candidate point and at least one ground point in the fine grid cell;
[0139] Among them, vegetation data points are candidate points but not ground points;
[0140] For example, at least one candidate point includes a real ground point and a vegetation point, where the vegetation point is a candidate point but not a ground point, and meets its physical property of being "below the high-altitude obstacle and above the real ground".
[0141] In one possible implementation, candidate points of all fine grid cells are integrated to form a set N, and all ground points determined in step S150 above are extracted to form a set G. Vegetation data points are obtained by the set difference operation NG.
[0142] For example, if a set N contains 500 points and set G contains 380 points, the 120 points of the difference set are the vegetation data points corresponding to grass, low shrubs, etc., which effectively solves the problem that traditional methods have difficulty distinguishing between ground and vegetation.
[0143] Step 2: Smooth at least one vegetation data point to obtain at least one standard vegetation data point;
[0144] Standard vegetation data points are used to determine scalable ground point information.
[0145] For example, a smoothing algorithm is used to optimize the spatial distribution of vegetation data points, eliminate discrete noise and isolated points, and obtain regular standard vegetation data points, providing a reliable basis for the subsequent determination of expandable ground point information.
[0146] In one possible implementation, a neighborhood weighted average smoothing strategy is adopted. For each vegetation data point, a 3×3 range of neighboring vegetation points is selected, and each vegetation data point is assigned a weight of 0.5. The neighboring vegetation data points are also assigned a weight of 0.5. The weighted average of the three-dimensional coordinates is then calculated as the standard vegetation data point coordinates.
[0147] The ground segmentation method based on point cloud data provided in this application first acquires point cloud data to be processed, which includes multiple first data points. Then, the multiple first data points are divided into grids according to a preset grid granularity size to obtain at least one coarse grid unit. Each coarse grid unit includes at least one fine grid unit, and each fine grid unit includes at least one first data point. Then, for each fine grid unit, at least one second data point is determined based on the spatial location information of at least one first data point in the fine grid unit. Next, for each coarse grid unit, all second data points in at least one fine grid unit under the coarse grid unit are subjected to plane fitting processing to obtain the fitted ground plane corresponding to the coarse grid unit. Finally, based on the fitted ground planes corresponding to all coarse grid units, at least one ground point and at least one non-ground point in the point cloud data to be processed are determined. In this embodiment, by dividing the point cloud data to be processed into multiple coarse and fine grid units, the disordered point cloud data is transformed into structured spatial data, which can effectively reduce the amount of data processed each time and significantly improve data processing efficiency. The fine grid ensures the accuracy of local analysis, while the coarse grid provides a framework for macroscopic fitting and optimization. In the fine grid unit, the second data point is determined based on the spatial location information of the first data point, which enables efficient data point filtering and improves the reliability of subsequent data processing. By performing planar fitting processing on all the second data points in each coarse grid unit, a more accurate fitted ground plane can be obtained, reflecting the real ground morphology. By classifying ground points and non-ground points based on the fitted ground planes corresponding to all coarse grid units, the accuracy of ground segmentation is improved.
[0148] Based on the above embodiments, Figure 2 A flowchart illustrating the ground segmentation method based on point cloud data provided in this application embodiment. Figure 2 .like Figure 2 As shown, one possible implementation of step S150 above includes the following steps:
[0149] S210. Verify the effectiveness of the fitted ground plane corresponding to all coarse grid elements according to the preset effective constraints, and obtain at least one effective coarse grid element and at least one effective surface plane corresponding to the effective coarse grid element.
[0150] In this step, the effectiveness of the fitted ground planes corresponding to all coarse grid cells is verified according to the preset effective constraints. Reliable fitted ground planes are selected, and invalid fitting results are eliminated. This yields at least one effective coarse grid cell and at least one effective surface plane corresponding to the effective coarse grid cell, providing an accurate basis for subsequent data analysis and processing.
[0151] In one possible implementation, the preset effective constraints include interior point constraints and normal vector constraints. The interior point constraints require that the number of interior points of the fitted ground plane is not less than 30% of the total number of the second data points in the coarse grid cell. Too few interior points indicate that the fitting result is unreliable, suggesting that there may be no ground in the area or that the fitting has failed. The normal vector constraints include calculating the angle between the normal vector of the fitted ground plane and the gravity direction (Z-axis), and only retaining planes with an angle less than 10 degrees.
[0152] In one possible implementation, step S210 described above may include the following steps:
[0153] Step 1: For each coarse grid cell, determine at least one second vertical distance between all second data points in at least one fine grid cell below the coarse grid cell and the target fitted ground plane corresponding to that coarse grid cell;
[0154] For example, the spatial fit between the second data point and the target fitted ground plane is quantified to provide data support for subsequent interior point statistics.
[0155] In one possible implementation, for the second data point The target fits the ground plane equation as follows: Then calculate the signed perpendicular distance from the second data point P to the plane. for:
[0156]
[0157] in, The sign indicates whether the second data point is above (positive) or below (negative) the target fitted ground plane, and this value is stored in the "height above ground" attribute for each second data point.
[0158] Step 2: Determine the interior point values contained in the target fitted ground plane corresponding to the coarse grid cell based on at least one second vertical distance and the second preset distance threshold in the preset effective constraints.
[0159] The preset effective constraints include a second preset distance threshold, a preset interior point threshold, and a preset angle threshold.
[0160] For example, an interior point refers to a second data point whose distance from the target fitted ground plane is within a reasonable range, reflecting the coverage effect of the plane on the ground point. The interior points that fit the target fitted ground plane are selected by comparing a second preset distance threshold with at least one second vertical distance. The interior point value is a key indicator for measuring the reliability of the fitted plane.
[0161] In one possible implementation, a second preset distance threshold is set to 0.2m. The second vertical distance of all second data points within the coarse grid cell is traversed, and the total number of second data points with a distance less than or equal to 0.2m is taken as the interior point value.
[0162] Step 3: If the value of the in-point is greater than or equal to the preset in-point threshold, then determine the angle between the normal vector of the target fitted ground plane corresponding to the coarse grid cell and the preset reference gravity direction.
[0163] For example, after the fitted plane passes the interior point number verification, it is further verified whether its spatial attitude conforms to the physical characteristics of the ground. The normal vector of the ground plane should be close to the direction of gravity, and the angle value is the core attitude indicator for judging whether the plane is the ground.
[0164] In one possible implementation, the preset inlier threshold is 30% of the total number of second data points in the coarse grid cell. If the inlier values meet the requirements, the normal vector of the target fitted ground plane is extracted. The angle between the two is calculated using the vector dot product formula with the Z-axis as the preset reference gravity direction.
[0165] Step 4: If the angle value is less than or equal to the preset angle threshold, then the coarse grid cell is determined to be a valid coarse grid cell, and the target fitted ground plane corresponding to the coarse grid cell is determined to be a valid surface plane.
[0166] For example, the preset angle threshold is 10 degrees. If the angle value is less than or equal to 10 degrees, the coarse grid cell is determined to be a valid coarse grid cell, and the corresponding target fitted ground plane is a valid surface plane.
[0167] Step 5: Based on all coarse mesh elements, obtain at least one effective coarse mesh element and the effective surface plane corresponding to at least one effective coarse mesh element.
[0168] For example, the verification results of all coarse mesh elements are summarized, and at least one valid coarse mesh element that has passed the validity verification, as well as the valid surface plane corresponding to at least one valid coarse mesh element, are integrated to provide a basis for subsequent ground model construction.
[0169] In one possible implementation, all coarse mesh cells are traversed, and coarse mesh cells that have been verified by both interior point values and angle values are collected to form a list of valid coarse mesh cells, which are then associated with their corresponding valid face planes.
[0170] S220. Perform neighborhood smoothing on the effective surface plane corresponding to at least one effective coarse grid cell to obtain at least one continuous ground plane.
[0171] In this step, a weighted average is used to optimize the spatial continuity of the effective surface plane corresponding to at least one effective coarse grid cell, eliminating parameter abrupt changes caused by independent fitting of adjacent coarse grid cells, and generating a continuous ground model that conforms to physical reality.
[0172] In one possible implementation, step S220 described above may include the following steps:
[0173] Step 1: For each effective coarse grid cell, determine the first plane parameter value of the effective coarse grid cell and the second plane parameter value of the adjacent effective coarse grid cells;
[0174] Among them, the plane parameters include the center point height parameter and the plane normal vector parameter;
[0175] For example, the plane parameters include the center point height and the plane normal vector. The two together determine the spatial position and orientation of the ground plane and are the core indicators to ensure the continuity of the ground after smoothing. For each effective coarse grid cell, the first plane parameter value and the second plane parameter value of the effective coarse grid cell and the adjacent effective coarse grid cells are extracted to provide basic data for weighted averaging.
[0176] In one possible implementation, for each effective coarse grid cell, the Z-coordinate of its center point (the geometric center of the coarse grid) is calculated using its fitted ground plane equation as the center point height parameter. The plane equation coefficients are then extracted and normalized to obtain the plane normal vector parameter. Simultaneously, adjacent effective coarse grid cells are selected within an 8-neighborhood, and their corresponding second plane parameter values are extracted.
[0177] Step 2: Calculate the weighted average of the first plane parameter values and the second plane parameter values according to the preset weights to determine the optimized plane parameter values;
[0178] For example, based on preset weights, the values of the first and second plane parameters are weighted and balanced to avoid excessive smoothing that could lead to the loss of terrain features. After weighting, the values are averaged to obtain optimized plane parameter values.
[0179] The preset weights should ensure that the parameters themselves are dominant, and that the parameters of the neighboring regions are used for auxiliary correction, so as to ensure that the smoothed plane fits the original terrain trend.
[0180] Step 3: Perform neighborhood smoothing on the effective surface plane of the target corresponding to the effective coarse grid cell based on the optimized plane parameter values to obtain the continuous ground plane of the target.
[0181] For example, the plane equation is reconstructed based on the optimized plane parameters, and the neighborhood smoothing of a single effective coarse grid cell is completed. This eliminates parameter abrupt changes with the neighboring effective coarse grid cells, ensuring that the plane position and orientation are consistent with the neighborhood, thus obtaining the target continuous ground plane.
[0182] Step 4: Based on all the target continuous ground planes, obtain at least one continuous ground plane.
[0183] For example, by integrating the smoothing results of all effective coarse grid cells, i.e. all target continuous ground planes, at least one continuous ground plane is obtained, providing a unified reference for subsequent point cloud classification.
[0184] S230. For each first data point, determine the target continuous ground plane corresponding to the target coarse grid cell to which the first data point belongs in at least one continuous ground plane.
[0185] In this step, for each first data point, the fine grid cell to which the first data point belongs is determined, and then the target coarse grid cell to which the fine grid cell belongs is identified. Based on the target coarse grid cell, the target continuous ground plane corresponding to the target coarse grid cell is matched in at least one continuous ground plane.
[0186] S240. Determine the first vertical distance from the first data point to the target continuous ground plane.
[0187] In this step, the spatial relationship between the first data point and the target continuous ground plane is quantified, and the first vertical distance from the first data point to the target continuous ground plane is determined, providing a core basis for subsequent classification.
[0188] In one possible implementation, the first data point is determined by calculating the signed distance formula from a point to a plane. The first vertical distance to the target continuous ground plane.
[0189] S250. Based on the first vertical distance of all first data points and the first preset distance threshold, determine at least one ground point and at least one non-ground point in the point cloud data to be processed.
[0190] In this step, the magnitudes of the first vertical distances of all first data points and the first preset distance thresholds are compared. Based on the results of the size comparison, ground segmentation is performed to determine at least one ground point and at least one non-ground point in the point cloud data to be processed.
[0191] In one possible implementation, the first preset distance threshold can be adjusted according to the actual application scenario. The first preset distance threshold is preset to 0.15m. All first data points are traversed. If the absolute value of the first vertical distance is less than 0.15m, it is determined to be a ground point (such as a point with a distance of 0.08m or -0.03m). If the absolute value of the first vertical distance is greater than or equal to 0.15m, it is determined to be a non-ground point (such as an obstacle point with a distance of 0.2m or a noise point in a depression with a distance of -0.3m).
[0192] The ground segmentation method based on point cloud data provided in this application first verifies the validity of the fitted ground planes corresponding to all coarse grid cells according to preset valid constraints, obtaining at least one valid coarse grid cell and at least one valid surface plane corresponding to the at least one valid coarse grid cell. Then, neighborhood smoothing is performed on the effective surface planes corresponding to the at least one valid coarse grid cell to obtain at least one continuous ground plane. Next, for each first data point, the target continuous ground plane corresponding to the target coarse grid cell to which the first data point belongs is determined in the at least one continuous ground plane. Then, the first vertical distance from the first data point to the target continuous ground plane is determined. Finally, based on the first vertical distance of all first data points and a first preset distance threshold, at least one ground point and at least one non-ground point in the point cloud data to be processed are determined. In this embodiment, by validating the fitted ground planes corresponding to all coarse grid cells, planes that do not meet the preset constraints can be filtered out, improving the reliability and accuracy of subsequent processing results. Neighborhood smoothing of the valid ground planes can eliminate local fluctuations caused by noise or data inhomogeneity, resulting in smoother and more natural continuous ground planes. By determining the target continuous ground plane corresponding to the target coarse grid cell for each first data point and calculating the first vertical distance from the first data point to the target continuous ground plane, a precise measurement of the relationship between the data point and the ground is provided. By comparing the vertical distance of each point with a preset threshold, ground points and non-ground points can be effectively distinguished, ensuring high accuracy in data point classification.
[0193] Based on the above embodiments, Figure 3 A flowchart illustrating the ground segmentation method based on point cloud data provided in this application embodiment. Figure 3 Combining Figure 3 The specific process of the ground segmentation method based on point cloud data provided in the embodiments of this application is described below:
[0194] S310, Obtain the point cloud data to be processed;
[0195] The point cloud data to be processed includes: multiple first data points;
[0196] S320. Divide multiple first data points into a grid according to the fine grid granularity to obtain at least one fine grid cell, and divide the at least one fine grid cell into a grid according to the coarse grid granularity to obtain at least one coarse grid cell.
[0197] Among them, fine grid cells belong to fine spatial partitioning and are used for data point selection; coarse grid cells belong to region-level partitioning and are used for plane fitting and smoothing.
[0198] S330. For each fine grid cell, determine at least one second data point based on the spatial location information of at least one first data point in the fine grid cell;
[0199] For example, the selection is based on the height value in the spatial location information and the consistency of the neighborhood (i.e., the height difference between the current data point and the neighboring data points is within a preset reasonable range);
[0200] S340. For each coarse grid cell, perform plane fitting processing on all the second data points in at least one fine grid cell below the coarse grid cell to obtain the fitted ground plane corresponding to the coarse grid cell.
[0201] S350. Verify the validity of the fitted ground plane corresponding to all coarse grid elements according to the preset valid constraints. If the verification is successful, at least one valid coarse grid element and at least one valid surface plane corresponding to the valid coarse grid element are obtained. If the verification fails, the fitted ground plane is marked as invalid and deleted.
[0202] For example, the preset effective constraints include interior point constraints and normal vector constraints. The interior point constraints require that the number of interior points of the fitted ground plane is not less than 30% of the total number of the second data points in the coarse grid cell. The normal vector constraints include calculating the angle between the normal vector of the fitted plane and the gravity direction (Z-axis), and only retaining planes with an angle less than 10 degrees.
[0203] Based on the above embodiments, the following are embodiments of the apparatus involved in this application:
[0204] Figure 4 This is a schematic diagram of the structure of a ground segmentation device based on point cloud data provided in an embodiment of this application. Figure 4 As shown, the ground segmentation device 400 based on point cloud data includes:
[0205] The acquisition module 410 is used to acquire point cloud data to be processed, wherein the point cloud data to be processed includes: multiple first data points;
[0206] The first processing module 420 is used to divide multiple first data points into grids according to a preset grid granularity size to obtain at least one coarse grid unit. Each coarse grid unit includes at least one fine grid unit, and each fine grid unit includes at least one first data point.
[0207] The first determining module 430 is used to determine at least one second data point for each fine grid cell based on the spatial location information of at least one first data point in the fine grid cell;
[0208] The second processing module 440 is used to perform plane fitting processing on all the second data points in at least one fine grid cell under each coarse grid cell to obtain the fitted ground plane corresponding to the coarse grid cell.
[0209] The second determining module 450 is used to determine at least one ground point and at least one non-ground point in the point cloud data to be processed based on the fitted ground plane corresponding to all coarse grid cells.
[0210] In one or more embodiments, the preset mesh granularity includes a fine mesh granularity size and a coarse mesh granularity size;
[0211] Accordingly, the first processing module 420 is specifically used for:
[0212] The multiple first data points are divided into grids according to the fine grid granularity to obtain at least one fine grid cell;
[0213] At least one coarse grid cell is obtained by meshing at least one fine grid cell according to the coarse grid granularity size.
[0214] In one or more embodiments, the second determining module 450 is specifically used for:
[0215] The effectiveness of the fitted ground plane corresponding to all coarse grid elements is verified according to the preset effective constraints, and at least one effective coarse grid element and at least one effective surface plane corresponding to the effective coarse grid element are obtained.
[0216] Neighborhood smoothing is performed on the effective surface plane corresponding to at least one effective coarse grid cell to obtain at least one continuous ground plane;
[0217] For each first data point, the target continuous ground plane corresponding to the target coarse grid cell to which the first data point belongs is determined in at least one continuous ground plane;
[0218] Determine the first vertical distance from the first data point to the target continuous ground plane;
[0219] Based on the first vertical distance of all first data points and the first preset distance threshold, at least one ground point and at least one non-ground point are determined in the point cloud data to be processed.
[0220] In one or more embodiments, the second determining module 450 verifies the validity of the fitted ground planes corresponding to all coarse mesh elements according to preset valid constraints, and obtains at least one valid coarse mesh element and at least one valid surface plane corresponding to the valid coarse mesh element, specifically for:
[0221] For each coarse grid cell, determine at least one second vertical distance between all second data points in at least one fine grid cell below the coarse grid cell and the target fitted ground plane corresponding to the coarse grid cell;
[0222] Based on at least one second vertical distance and a second preset distance threshold in the preset effective constraints, the interior point values contained in the target fitted ground plane corresponding to the coarse grid cell are determined, wherein the preset effective constraints include a second preset distance threshold, a preset interior point threshold, and a preset angle threshold.
[0223] If the value of the in-point is greater than or equal to the preset in-point threshold, then the angle between the normal vector of the target fitted ground plane corresponding to the coarse grid cell and the preset reference gravity direction is determined.
[0224] If the angle value is less than or equal to the preset angle threshold, then the coarse grid cell is determined to be a valid coarse grid cell, and the target fitted ground plane corresponding to the coarse grid cell is determined to be a valid surface plane;
[0225] Based on all the coarse mesh elements, at least one effective coarse mesh element and at least one effective surface plane corresponding to the effective coarse mesh element are obtained.
[0226] In one or more embodiments, the second determining module 450 performs neighborhood smoothing processing on the effective surface plane corresponding to at least one effective coarse grid cell to obtain at least one continuous ground plane, specifically for:
[0227] For each effective coarse mesh cell, the first plane parameter value of the effective coarse mesh cell and the second plane parameter value of the adjacent effective coarse mesh cells of the effective coarse mesh cell are determined. The plane parameters include the center point height parameter and the plane normal vector parameter.
[0228] The optimal plane parameter values are determined by weighting the values of the first and second plane parameters according to preset weights.
[0229] Based on the optimized plane parameter values, the effective surface plane of the target corresponding to the effective coarse grid cell is smoothed in the neighborhood to obtain the continuous ground plane of the target.
[0230] Based on all the target continuous ground planes, at least one continuous ground plane is obtained.
[0231] In one or more embodiments, the first determining module 430 determines at least one second data point based on the spatial location information of at least one first data point in the fine grid cell, specifically for:
[0232] Based on the spatial location information of at least one first data point in the fine grid cell, determine the height value corresponding to at least one first data point in the fine grid cell;
[0233] Based on a preset height threshold and the height value corresponding to at least one first data point in the fine grid cell, at least one candidate point is obtained in the fine grid cell;
[0234] For each candidate point in a fine mesh cell, determine the height difference between the candidate point and at least one other candidate point;
[0235] Delete the target candidate point corresponding to the maximum value among all height differences to obtain at least one second data point in the fine grid cell.
[0236] In one or more embodiments, after determining at least one ground point and at least one non-ground point in the point cloud data to be processed based on the fitted ground plane corresponding to all coarse grid cells, the second determining module 450 is further configured to:
[0237] At least one vegetation data point is obtained based on at least one candidate point and at least one ground point in the fine grid cell, wherein the vegetation data point belongs to the candidate point but does not belong to the ground point;
[0238] At least one vegetation data point is smoothed to obtain at least one standard vegetation data point, wherein the standard vegetation data point is used to determine scalable ground point information.
[0239] The ground segmentation device based on point cloud data provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.
[0240] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 5 As shown, the electronic device 500 includes: a processor 510, a memory 520, and a bus 530;
[0241] The memory 520 is used to store the computer-executed instructions of the processor 510;
[0242] The processor 510 is configured to execute the technical solutions of any of the foregoing method embodiments by executing computer execution instructions.
[0243] The specific implementation process of processor 510 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0244] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0245] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0246] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0247] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0248] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.
[0249] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random-Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0250] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an application-specific integrated circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.
[0251] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0252] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0253] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0254] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory, random access memory (RAM), magnetic disks, or optical disks.
[0255] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0256] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. A ground segmentation method based on point cloud data, characterized in that, include: Acquire point cloud data to be processed, wherein the point cloud data to be processed includes: multiple first data points; The plurality of first data points are divided into grids according to a preset grid granularity size to obtain at least one coarse grid unit. Each coarse grid unit includes at least one fine grid unit, and each fine grid unit includes at least one first data point. For each fine grid cell, at least one second data point is determined based on the spatial location information of at least one first data point in the fine grid cell; For each coarse grid cell, plane fitting processing is performed on all second data points in at least one fine grid cell below the coarse grid cell to obtain the fitted ground plane corresponding to the coarse grid cell; Based on the fitted ground plane corresponding to all coarse grid cells, at least one ground point and at least one non-ground point are determined in the point cloud data to be processed.
2. The method according to claim 1, characterized in that, The preset mesh size includes fine mesh size and coarse mesh size; Accordingly, the step of dividing the plurality of first data points into a grid according to a preset grid granularity size to obtain at least one coarse grid cell includes: The plurality of first data points are divided into grids according to the fine grid granularity to obtain at least one fine grid cell; The at least one fine grid cell is divided into at least one coarse grid cell based on the coarse grid granularity size.
3. The method according to claim 2, characterized in that, The step of determining at least one ground point and at least one non-ground point in the point cloud data to be processed, based on the fitted ground plane corresponding to all coarse grid cells, includes: The effectiveness of the fitted ground plane corresponding to all coarse grid cells is verified according to the preset effective constraints, so as to obtain at least one effective coarse grid cell and the effective surface plane corresponding to the at least one effective coarse grid cell. Neighborhood smoothing is performed on the effective surface plane corresponding to the at least one effective coarse grid cell to obtain at least one continuous ground plane; For each first data point, the target continuous ground plane corresponding to the target coarse grid cell to which the first data point belongs is determined in the at least one continuous ground plane; Determine the first vertical distance from the first data point to the target continuous ground plane; Based on the first vertical distance of all first data points and the first preset distance threshold, at least one ground point and at least one non-ground point are determined in the point cloud data to be processed.
4. The method according to claim 3, characterized in that, The step of validating the fitted ground plane corresponding to all coarse grid cells according to the preset valid constraints, and obtaining at least one valid coarse grid cell and the valid surface plane corresponding to the at least one valid coarse grid cell, includes: For each coarse grid cell, determine at least one second vertical distance between all second data points in at least one fine grid cell below the coarse grid cell and the target fitted ground plane corresponding to the coarse grid cell; Based on the at least one second vertical distance and the second preset distance threshold in the preset effective constraints, the value of the inlier points contained in the target fitted ground plane corresponding to the coarse grid cell is determined. The preset effective constraints include the second preset distance threshold, the preset inlier point threshold, and the preset angle threshold. If the value of the interior point is greater than or equal to the preset interior point threshold, then the angle between the normal vector of the target fitted ground plane corresponding to the coarse grid cell and the preset reference gravity direction is determined. If the angle value is less than or equal to the preset angle threshold, then the coarse grid cell is determined to be a valid coarse grid cell, and the target fitted ground plane corresponding to the coarse grid cell is determined to be a valid surface plane; Based on all the coarse mesh elements, at least one effective coarse mesh element and the effective surface plane corresponding to the at least one effective coarse mesh element are obtained.
5. The method according to claim 3, characterized in that, The step of performing neighborhood smoothing on the effective surface plane corresponding to the at least one effective coarse grid cell to obtain at least one continuous ground plane includes: For each effective coarse mesh cell, the first plane parameter value of the effective coarse mesh cell and the second plane parameter value of the adjacent effective coarse mesh cells of the effective coarse mesh cell are determined. The plane parameters include the center point height parameter and the plane normal vector parameter. The first plane parameter value and the second plane parameter value are weighted and averaged according to preset weights to determine the optimized plane parameter value. Based on the optimized planar parameter values, the target effective ground plane corresponding to the effective coarse grid cell is subjected to neighborhood smoothing to obtain the target continuous ground plane; Based on all the target continuous ground planes, at least one continuous ground plane is obtained.
6. The method according to any one of claims 1-4, characterized in that, Determining at least one second data point based on the spatial location information of at least one first data point in the fine grid cell includes: Based on the spatial location information of at least one first data point in the fine grid cell, determine the height value corresponding to at least one first data point in the fine grid cell; Based on a preset height threshold and the height value corresponding to at least one first data point in the fine grid cell, at least one candidate point is obtained in the fine grid cell; For each candidate point in the fine mesh cell, determine the height difference between the candidate point and other candidate points among the at least one candidate point; The target candidate point corresponding to the maximum value among all height differences is deleted to obtain at least one second data point in the fine grid cell.
7. The method according to claim 6, characterized in that, After determining at least one ground point and at least one non-ground point in the point cloud data to be processed based on the fitted ground plane corresponding to all coarse grid cells, the method further includes: At least one vegetation data point is obtained based on at least one candidate point in the fine grid cell and at least one ground point, wherein the vegetation data point belongs to the candidate point but does not belong to the ground point; The at least one vegetation data point is smoothed to obtain at least one standard vegetation data point, which is used to determine scalable ground point information.
8. A ground segmentation device based on point cloud data, characterized in that, include: The acquisition module is used to acquire point cloud data to be processed, wherein the point cloud data to be processed includes: multiple first data points; The first processing module is used to divide the plurality of first data points into a grid according to a preset grid granularity size to obtain at least one coarse grid unit, each coarse grid unit including at least one fine grid unit, and each fine grid unit including at least one first data point; The first determining module is used to determine at least one second data point for each fine grid cell based on the spatial location information of at least one first data point in the fine grid cell; The second processing module is used to perform plane fitting processing on all the second data points in at least one fine grid cell under each coarse grid cell to obtain the fitted ground plane corresponding to the coarse grid cell. The second determining module is used to determine at least one ground point and at least one non-ground point in the point cloud data to be processed based on the fitted ground plane corresponding to all coarse grid cells.
9. An electronic device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-7.