Laser point cloud ground segmentation method, device and system and vehicle
By rasterizing and linear fitting of laser point cloud data, the problem of insufficient ground point cloud segmentation in ramp scenes is solved, and a fast and efficient segmentation effect is achieved.
Patent Information
- Application Number
- CN202311852875.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-28
- Publication Date
- 2025-07-01
AI Technical Summary
The prior art is difficult to effectively segment ground point clouds in ramp scenarios, resulting in insufficient segmentation and low algorithm efficiency.
By rasterizing the laser point cloud data, selecting fitted points and fitting them in a straight line, and generating a fitted line to segment the ground point cloud.
Simple and fast ground point cloud segmentation in slope scenes is realized, avoiding the dependence of segmented area size on accuracy, and improving algorithm efficiency.
Smart Images

Figure CN120235940A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of laser point cloud ground segmentation, and in particular to a method, device, system and vehicle for laser point cloud ground segmentation. Background Art
[0002] In recent years, with the rapid development of artificial intelligence and intelligent transportation, autonomous driving has become a popular technology. Through continuous iteration of technology, it is expected to become an effective solution to improve traffic efficiency and driving safety. An autonomous driving system is a comprehensive intelligent system integrating five modules: perception, positioning, decision-making, planning, and control. Among them, the perception module accurately senses the external environment through vehicle-mounted sensors, transmits the perception information to the vehicle brain, and issues signals to each execution unit through brain decision-making and planning, so as to complete various behaviors of the vehicle. Ground points can be regarded as redundant information in the perception task. The existence of ground points will have a greater impact on the clustering effect of obstacle targets and the real-time performance of the algorithm. Ground segmentation is a key link in the traditional clustering target detection scheme.
[0003] In the prior art, a plane fitting method is commonly used to segment the ground point cloud. The ground is fitted into a plane, and then the ground points and non-ground points are distinguished according to the distance from the points to the plane. However, the ground is often not a flat plane. Due to the existence of slopes, directly using the plane fitting method for ground segmentation of point clouds will result in insufficient segmentation.
[0004] Among them, the ground segmentation effect in the slope scene depends on the accuracy of the divided sub-regions. If the sub-regions are too large, over-segmentation is likely to occur. If the sub-regions are too small, theoretically, it can better adapt to the slope scene, but the time-consuming of plane fitting is large. If the sub-regions are small, it means that fitting and iterative optimization of the plane need to be carried out in more sub-regions, resulting in low algorithm efficiency. Summary of the Invention
[0005] The purpose of the present invention is to provide a method, device, system and vehicle for laser point cloud ground segmentation, which is applicable to various lidars, has strong scene adaptability, and can perform simple and rapid ground segmentation of point clouds, so as to solve the problems that the existing ground segmentation methods are difficult to be applicable to slopes and time-consuming.
[0006] In a first aspect, the present invention provides a method for laser point cloud ground segmentation, the method comprising: obtaining laser point cloud data; the laser point cloud data being data collected by a preset vehicle-mounted lidar during vehicle driving; performing rasterization processing on the laser point cloud data to allocate the laser point cloud data to preset grids, obtaining grid data corresponding to each grid; selecting fitting points from each grid data according to preset fitting point selection requirements, and performing linear fitting on the fitting points of each grid to generate a fitting line; based on the fitting line, performing data segmentation on the laser point cloud data to segment the laser point cloud data into ground point data and non-ground point data.
[0007] In an optional embodiment, the step of selecting fitting points from each grid data according to preset fitting point selection requirements includes: performing dimensionality reduction processing on the grid data based on the point cloud coordinates corresponding to the laser point cloud data to determine the dimensionality-reduced coordinates corresponding to the grid data; wherein the dimensionality-reduced coordinates include a horizontal coordinate and a height coordinate, the horizontal coordinate and the height coordinate are respectively used to indicate the horizontal distance and the height distance between the laser point cloud data and the vehicle-mounted lidar; calculating the theoretical height of the grid data according to the dimensionality-reduced coordinates; and determining the lowest point of the grid data whose theoretical height satisfies a preset height threshold as the fitting point in the current grid.
[0008] In an optional embodiment, the step of performing rasterization processing on the laser point cloud data to allocate the laser point cloud data to preset grids, obtaining grid data corresponding to each grid includes: equally dividing the scanning area of the vehicle-mounted lidar into a plurality of fan-shaped areas according to a preset angle, and equally dividing the fan-shaped areas along the radial outward extension direction to divide the scanning area of the vehicle-mounted lidar into a plurality of grids; projecting the laser point cloud data into each grid to obtain grid data respectively corresponding to each grid.
[0009] In an optional embodiment, the step of performing linear fitting on the fitting points of each grid to generate a fitting line includes: traversing the fitting points of each grid in a preset traversal order; performing linear fitting on the traversed fitting points to generate a fitting line.
[0010] In an alternative embodiment, the step of performing a straight line fitting on the traversed fitting points to generate a fitting straight line includes: adding the traversed fitting points to a fitting point set, and when the fitting point set contains multiple fitting points, performing a straight line fitting on the fitting point set to generate a first fitting straight line corresponding to the fitting point set; solving the item to be solved of the first fitting straight line, and determining whether the item to be solved meets a preset solving requirement; if so, traversing the next fitting point and executing the step of adding the traversed fitting point to the fitting point set; if not, saving the first fitting straight line, and only retaining the last fitting point in the fitting point set, and executing the step of adding the traversed fitting point to the fitting point set to generate a second fitting straight line corresponding to the current fitting point set; until each fitting point is traversed to obtain at least one fitting straight line.
[0011] In an alternative embodiment, the step of performing data segmentation on the lidar point cloud data based on the fitting straight line to segment the lidar point cloud data into ground point data and non-ground point data includes: calculating the minimum distance of the lidar point cloud data corresponding to the fitting straight line according to the reduced-dimensional coordinates corresponding to the lidar point cloud data, and the vertical distance between the lidar point cloud data and the fitting point of the grid to which it belongs; when the minimum distance meets a preset first distance threshold and the vertical distance meets a preset second distance threshold, determining the lidar point cloud data as ground point data; otherwise, determining the lidar point cloud data as non-ground point data.
[0012] In an alternative embodiment, there is at least one fitting straight line, and the fitting straight line includes an item to be solved; the step of calculating the minimum distance of the lidar point cloud data corresponding to the fitting straight line according to the reduced-dimensional coordinates corresponding to the lidar point cloud data includes: obtaining the reduced-dimensional coordinates of the lidar point cloud data and the item to be solved of each fitting straight line; calculating the minimum distance of the lidar point cloud data corresponding to the fitting straight line according to the reduced-dimensional coordinates and the item to be solved.
[0013] In a second aspect, the present invention provides a lidar point cloud ground segmentation device, which includes: a data acquisition module for acquiring lidar point cloud data; the lidar point cloud data is data collected by a preset vehicle-mounted lidar during vehicle driving; a data processing module for rasterizing the lidar point cloud data to allocate the lidar point cloud data into preset grids to obtain grid data corresponding to each grid; an execution module for selecting fitting points from each grid data according to a preset fitting point selection requirement and performing a straight line fitting on the fitting points of each grid to generate a fitting straight line; an output module for performing data segmentation on the lidar point cloud data based on the fitting straight line to segment the lidar point cloud data into ground point data and non-ground point data.
[0014] In a third aspect, the present invention provides a laser point cloud ground segmentation system, wherein the system is configured with the above-mentioned laser point cloud ground segmentation device for performing the above-mentioned laser point cloud ground segmentation method.
[0015] In a fourth aspect, the present invention provides a vehicle provided with the above-mentioned laser point cloud ground segmentation system.
[0016] The embodiments of the present invention bring the following beneficial effects: The embodiments of the present invention provide a laser point cloud ground segmentation method, device, system and vehicle. After rasterizing the collected laser point cloud data, the fitting points in the raster are extracted, and then line fitting is performed, and laser point cloud ground segmentation is carried out according to the fitted line. Among them, the fitting points in the embodiments of the present invention are characterized as the points that best fit the ground. When line fitting is performed on the fitting points, the obtained fitted line can represent the ground points. According to the fitted line, the ground points and non-ground points can be quickly distinguished, realizing simple and fast point cloud ground segmentation. Moreover, this method is applicable to slopes, and the segmentation accuracy does not depend on the size of the segmentation area, which can effectively avoid the problem of long time-consuming for point cloud ground segmentation.
[0017] Other features and advantages of the present invention will be described in the following specification, or, some features and advantages can be inferred from the specification or determined without doubt, or can be known by implementing the above technologies of the present invention.
[0018] To make the above-mentioned objects, features and advantages of the present invention more obvious and understandable, the following specific preferred embodiments are given, and in conjunction with the accompanying drawings, the detailed description is as follows. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for the description of the specific embodiments or the prior art. Obviously, the following drawings are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0020] Figure 1 It is a schematic structural diagram of a plane fitting;
[0021] Figure 2 It is a flowchart of a laser point cloud ground segmentation method provided by an embodiment of the present invention;
[0022] Figure 3 It is a flowchart of another laser point cloud ground segmentation method provided by an embodiment of the present invention;
[0023] Figure 4 It is a schematic diagram of a raster structure provided by an embodiment of the present invention;
[0024] Figure 5 A flowchart of linear fitting provided by an embodiment of the present invention;
[0025] Figure 6 A schematic diagram of solving a linear equation by the least squares method provided by an embodiment of the present invention;
[0026] Figure 7 A schematic structural diagram of a laser point cloud ground segmentation device provided by an embodiment of the present invention;
[0027] Figure 8 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. Detailed implementation manners
[0028] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. The components of the embodiments of the present invention described and illustrated herein can be arranged and designed in various different configurations.
[0029] Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts fall within the scope of protection of the present invention.
[0030] Among them, in the prior art, a plane fitting method is commonly used to segment ground point clouds. The ground is fitted into a plane, and then ground points and non-ground points are distinguished according to the distance from the points to the plane. Plane fitting means establishing a mathematical model, using a series of parametric equations to describe the ground, and then judging the positional relationship between the original point cloud and the fitted plane to distinguish ground points and non-ground points. Since the actual road surface is not a complete plane and it is difficult to represent it with a single plane model, the lidar scanning area is usually divided into multiple sub-regions, such as Figure 1 as shown. Then, a plane model is solved for each sub-region. The establishment and solution of the plane model are shown in Formula 1:
[0031]
[0032] In the formula, the normal vector n of the fitted plane = [a, b, c] T can be obtained by eigenvalue decomposition of the covariance matrix of the fitted point set s n in the current sub-region, and the covariance matrix of s n is as follows:
[0033]
[0034] In the formula, s i represents the i-th point in the ground fitting point set, represents the mean value of the ground fitting point set, and Σ describes the distribution of the ground fitting points from a mathematical perspective. Then, using SVD, the eigenvector corresponding to the minimum eigenvalue obtained by eigenvalue decomposition of the covariance matrix Σ of the fitting point set s n represents the normal vector of the vertical fitting plane. Then, according to the plane normal vector n and formula 1, the parameter d can be obtained, and thus one iteration of the ground fitting plane of the current sub-region is completed. Then, by continuously optimizing the ground fitting point set through a threshold, the fitting plane can be continuously iteratively updated.
[0035] However, due to the existence of slopes, the ground is often not a flat plane, resulting in the problem of insufficient segmentation when directly using the plane fitting method for ground segmentation of point clouds. Among them, the ground segmentation effect in the slope scene depends on the accuracy of the divided sub-regions. If the sub-regions are too large, over-segmentation is likely to occur. If the sub-regions are too small, theoretically, it can better adapt to the slope scene, but the time consumption of plane fitting is large. If the sub-regions are small, it means that fitting and iteratively optimizing the plane need to be performed in more sub-regions, resulting in low algorithm efficiency.
[0036] Based on the above problems, the embodiments of the present invention provide a method, device, system, and vehicle for laser point cloud ground segmentation, which can be applicable to various lidars, have strong scene adaptability, and can perform simple and fast point cloud ground segmentation, solving the problems that the existing ground segmentation methods are difficult to be applicable to slopes and have long time consumption.
[0037] For the convenience of understanding this embodiment, first, a method for laser point cloud ground segmentation disclosed in the embodiments of the present invention will be introduced in detail. Figure 2 The flowchart of a method for laser point cloud ground segmentation provided by the embodiments of the present invention is shown. As Figure 2 shown, the method includes the following specific steps:
[0038] Step S102, obtaining laser point cloud data.
[0039] Step S104, performing rasterization processing on the laser point cloud data to allocate the laser point cloud data to preset grids, and obtaining grid data corresponding to each grid.
[0040] Step S106, selecting fitting points from each grid data according to the preset fitting point selection requirements, and performing linear fitting on the fitting points of each grid to generate fitting lines.
[0041] Step S108, based on the fitting lines, performing data segmentation on the laser point cloud data to segment the laser point cloud data into ground point data and non-ground point data.
[0042] In the embodiment of the present invention, after rasterizing the collected lidar point cloud data, the fitting point closest to the ground in the raster is extracted, and the fitting points are fitted into a straight line. Finally, lidar point cloud ground segmentation is performed according to the fitted straight line. Among them, the lidar point cloud data is the data collected by a preset vehicle-mounted lidar during the vehicle driving process. The autonomous vehicle drives on the target road surface, and its vehicle-mounted lidar collects data during the vehicle driving process to obtain lidar point cloud data. Since the fitting points are characterized as the points closest to the ground, after fitting the straight line to the fitting points, the obtained fitted straight line can be represented as the ground points. According to the fitted straight line, the ground points and non-ground points can be quickly distinguished, realizing simple and fast point cloud ground segmentation. Moreover, this method is applicable to slopes, and the segmentation accuracy does not depend on the size of the segmentation area, which can effectively avoid the problem of long time-consuming for point cloud ground segmentation.
[0043] For the above embodiment, the present invention also provides another lidar point cloud ground segmentation method, which is implemented on the basis of the above method. Figure 3 FIG. shows the flowchart of another lidar point cloud ground segmentation method provided by the embodiment of the present invention, as Figure 3 shown, the method includes the following steps:
[0044] Step S202, obtain lidar point cloud data.
[0045] Step S204, equally divide the scanning area of the vehicle-mounted lidar into multiple fan-shaped areas according to a preset angle, and equally divide the fan-shaped areas along the radial outward extension direction, so as to divide the scanning area of the vehicle-mounted lidar into multiple rasters.
[0046] Step S206, project the lidar point cloud data into each raster to obtain raster data corresponding to each raster respectively.
[0047] In a specific implementation, the embodiment of the present invention divides the lidar scanning area into fan-shaped areas according to a preset angle, and divides the fan-shaped areas into raster areas, so as to divide the lidar scanning area into multiple areas and then perform data processing. Among them, the preset angle and the division of the raster area can be set according to requirements. Preferably, the embodiment of the present invention equally divides the lidar scanning area into m fan-shaped areas S m , and equally divides each fan-shaped area into n raster areas B n , as Figure 4 shown in the raster structure diagram. Then, project the original point cloud into each raster according to the following formulas (3) and (4) to determine the raster data corresponding to each raster respectively:
[0048]
[0049] In the formula, S iIndex representing the sector, (x p , y p ) represents the coordinates of point p, m represents the number of sectors to be divided, represents rounding down.
[0050]
[0051] In the formula, B j represents the grid index, r p represents the horizontal distance from the laser point to the vehicle-mounted lidar, D represents the detection distance of the algorithm, and n represents the number of grids in each sector.
[0052] After the above grid processing, each laser point can be assigned to the grid with index S i B, and then the next processing is carried out in units of grids.
[0053] Step S208: Based on the point cloud coordinates corresponding to the laser point cloud data, perform dimensionality reduction processing on the grid data to determine the dimensionality reduction coordinates corresponding to the grid data.
[0054] Step S210: Calculate the theoretical height of the grid data according to the dimensionality reduction coordinates.
[0055] Step S212: Determine the lowest point of the grid data whose theoretical height meets the preset height threshold as the fitting point in the current grid.
[0056] Specifically, after the point cloud grid processing, in the grid S i B j contains multiple point clouds, and each grid contains several grid data, that is, several laser point cloud data. Since the laser point cloud data is three-dimensional data, in the embodiment of the present invention, the laser point cloud data is first subjected to dimensionality reduction processing to determine the two-dimensional coordinates of the laser point cloud data, and then the fitting points in each grid are extracted according to the two-dimensional coordinates.
[0057] First, perform dimensionality reduction processing on the point cloud in the grid, and reduce p(x, y, z) to Specifically, the dimensionality reduction coordinates include the horizontal coordinate d and the height coordinate z, and the horizontal coordinate and the height coordinate are respectively used to indicate the horizontal distance and the height distance between the laser point cloud data and the vehicle-mounted lidar.
[0058]
[0059] After that, the fitting points in the grid data are extracted according to the dimension-reduced coordinates. Among them, for linear model fitting, one ground fitting point needs to be extracted from each grid containing laser points. The ground linear fitting is performed through the fitting points in different grids within the same sector, and then the ground and non-ground points are judged. Since the line fitted by the ground points as fitting points is the most fitting to the ground, the extraction of the fitting points should follow the principle of being close to the ground. To prevent the outlier points in the grid from being misjudged as the lowest points, resulting in errors in subsequent linear fitting, the fitting points extracted in the embodiments of the present invention should meet the following requirements: when the vehicle is driving on flat ground, the theoretical height of the grid ground points should satisfy: z = -H; when the vehicle is going downhill, the theoretical height of the grid ground points should satisfy: z = -H - d * tanθ; when the vehicle is going uphill, the theoretical height of the grid ground points should satisfy: z = -H + d * tanθ. Wherein, H is the installation height of the lidar, d is the horizontal distance from the ground point to the lidar, and θ is the ramp slope.
[0060] To eliminate the outlier points in the grid, the height of the lowest point should at least satisfy z > -H - d × tanθ, and H and θ can be determined according to the actual scenario. In summary, the fitting points that meet the preset fitting point selection requirements can be determined.
[0061] Step S214, traverse the fitting points of each grid in the preset traversal order.
[0062] Step S216, perform linear fitting on the traversed fitting points to generate a fitting line.
[0063] In the above fitting point extraction step, the fitting points that can represent the ground in each grid are obtained. These points are very likely to be on the ground where the current grid is located. By performing linear fitting on these fitting points, the line representing the ground can be fitted, and then it can be judged whether the current point is a ground point by the distance from each laser point to the fitting line.
[0064] Specifically, in the embodiments of the present invention, the fitting points of each grid are traversed according to a preset traversal order, and the traversed fitting points are linearly fitted to generate a fitting line, so as to perform segmentation of ground points. In specific implementation, the embodiments of the present invention take each sector as a unit and traverse the fitting points in its grid area. Then, the traversed fitting points are added to the fitting point set, and when there are multiple fitting points in the fitting point set, the fitting point set is linearly fitted to generate a first fitting line corresponding to the fitting point set. Further, the terms to be solved of the first fitting line are solved, and it is determined whether the terms to be solved meet the preset solution requirements; if so, the next fitting point is traversed, and the step of adding the traversed fitting point to the fitting point set is executed; if not, the first fitting line is saved, and only the last fitting point in the fitting point set is retained, and the step of adding the traversed fitting point to the fitting point set is executed to generate a second fitting line corresponding to the current fitting point set; until all fitting points are traversed, at least one fitting line is obtained.
[0065] Specifically, for each S i area, traverse its B j area. If the current B j contains fitting points, add them to the set of points to be fitted. When the number of fitting points in the set of points to be fitted is greater than 2, the embodiments of the present invention start to fit a line using the least squares method, solve the k and b of the current line (i.e., the above-mentioned terms to be solved). If the obtained line meets the threshold requirements, continue to traverse the next grid area. Otherwise, it indicates that the fitting points in the current grid deviate far from the already fitted line. At this time, the existing fitted line needs to be interrupted, the points in the fitting point set are cleared, and only the last fitting point of the already fitted line is retained as the starting point of the next fitting line, and the equation f i (x) of the already fitted line is saved. The flowchart of line fitting is as Figure 5 shown. The validity of the terms to be solved [k, b] can be jointly determined according to the deviation degree of each fitting point from the line and whether k is greater than the ramp threshold.
[0066] Among them, the least squares method mainly finds the best function match for the data by minimizing the cost function. When the points to be fitted are approximately distributed on a straight line, as Figure 6 shown, the straight line f(x) = kx + b can be set as its fitting function, and the coefficients [k, b] are the terms to be solved. The sum of the squares of the differences between the predicted values and the true values is used as the cost function for optimization, as shown in Equation 6:
[0067]
[0068] By minimizing the solution of ε, the optimal [k, b] can be obtained. Specific solution methods include theoretical derivation, gradient descent, etc. The present invention will not elaborate in detail on the relevant solution methods. During actual use, the Eigen library can be called to complete the solution of [k, b].
[0069] Step S218: Calculate the minimum distance between the laser point cloud data corresponding to the reduced-dimensional coordinates and the fitted line, and the vertical distance between the laser point cloud data and the fitted point of the grid to which it belongs.
[0070] Step S220: When the minimum distance meets the preset first distance threshold and the vertical distance meets the preset second distance threshold, determine the laser point cloud data as ground point data.
[0071] Step S222: Otherwise, determine the laser point cloud data as non-ground point data.
[0072] After the above straight-line fitting steps, one or more fitted lines are retained in each S area. These fitted lines theoretically conform to the ground. Considering the global continuity of the ground, in the embodiment of the present invention, the ground points of the laser point cloud data are judged according to the reduced-dimensional coordinates of the laser point cloud data. Among them, when the minimum distance between the laser point cloud data and the fitted line and the vertical distance between the laser point cloud data and the fitted point of the grid to which it belongs both meet the corresponding conditions, it indicates that the laser point cloud data is ground point data, otherwise it is non-ground point data.
[0073] In specific implementation, when judging the ground points in area S i area, the ground fitting lines in adjacent S i-j to S i+j areas need to be considered. Specifically, in the embodiment of the present invention, the reduced-dimensional coordinates of the laser point cloud data and the terms to be solved for each fitted line are obtained; according to the reduced-dimensional coordinates and the terms to be solved, the minimum distance between the laser point cloud data and the fitted line is calculated. That is, according to Formula 7, the minimum distance between each point in area S i and the fitted lines in areas S i-j to S i+j is used to judge whether the current point is a ground point.
[0074]
[0075] At the same time, to prevent some obstacle points from being misjudged as ground points due to errors in the fitted line, on the premise that the laser point satisfies D less than the threshold d max , it is judged whether the vertical distance from the point to the fitted point in the current grid is less than the threshold H thr . When the laser point p(x, y, z) satisfies D < d max and |z - z fitted point| < H thr , the laser point p is judged as a ground point.
[0076] Another method for laser point cloud ground segmentation provided by an embodiment of the present invention divides the scanning area of a vehicle-mounted lidar into multiple fan-shaped areas at equal angles according to a preset angle, and divides the fan-shaped areas in the direction of extension along the diameter, so as to divide the scanning area of the vehicle-mounted lidar into multiple grids, and then extracts the fitting points of each grid. Among them, after reducing the dimension of the laser point cloud data, its theoretical height is calculated to determine the fitting point that best fits the ground. Then, a fitting line corresponding to the fitting point is generated, and based on the fitting line, ground points and non-ground points are distinguished. Among them, considering the global continuity of the ground, when judging the ground points in area S i area, the embodiment of the present invention considers the ground fitting lines in adjacent S i-j to S i+j areas, and calculates the minimum distance between each point in area S i and the fitting lines in areas S i-j to S i+j to judge whether the current point is a ground point. At the same time, it also judges whether the vertical distance from this point to the fitting point in the current grid is less than the threshold H thr , to prevent some obstacle points from being misjudged as ground points due to errors in the fitting line. Based on this, the embodiment of the present invention can quickly and accurately segment ground points and non-ground points, is applicable to various lidar point cloud data, can obtain good segmentation effects in slopes and their transition areas with planes, and the ground segmentation speed can reach 2 ms / frame in the case of no downsampling of a single-frame point cloud (60,000 points).
[0077] Based on the above system embodiment, the embodiment of the present invention also provides a laser point cloud ground segmentation device, Figure 7 shows a schematic structural diagram of a laser point cloud ground segmentation device provided by an embodiment of the present invention. As Figure 7 shown, the device includes: a data acquisition module 100 for acquiring laser point cloud data; the laser point cloud data is data collected by a preset vehicle-mounted lidar during vehicle driving; a data processing module 200 for rasterizing the laser point cloud data to allocate the laser point cloud data to preset grids to obtain grid data corresponding to each grid; an execution module 300 for selecting fitting points from each grid data according to preset fitting point selection requirements, and performing linear fitting on the fitting points of each grid to generate a fitting line; an output module 400 for performing data segmentation on the laser point cloud data based on the fitting line to segment the laser point cloud data into ground point data and non-ground point data.
[0078] The laser point cloud ground segmentation device provided by the embodiments of the present invention has the same implementation principle and technical effects as those of the foregoing embodiments of the laser point cloud ground segmentation method. For the sake of brief description, for the parts not mentioned in the device embodiments, reference may be made to the corresponding content in the foregoing embodiments of the laser point cloud ground segmentation method.
[0079] Further, on the basis of the above embodiments, the embodiments of the present invention further provide another laser point cloud ground segmentation device. Among them, the above execution module 300 is used to perform dimensionality reduction processing on the grid data based on the point cloud coordinates corresponding to the laser point cloud data to determine the dimensionality reduction coordinates corresponding to the grid data; wherein the dimensionality reduction coordinates include horizontal coordinates and height coordinates, and the horizontal coordinates and height coordinates are respectively used to indicate the horizontal distance and height distance between the laser point cloud data and the vehicle-mounted lidar; according to the dimensionality reduction coordinates, calculate the theoretical height of the grid data; and determine the lowest point of the grid data whose theoretical height meets the preset height threshold as the fitting point in the current grid.
[0080] The above data processing module 200 is further used to equally divide the scanning area of the vehicle-mounted lidar into multiple fan-shaped areas according to a preset angle, and equally divide the fan-shaped areas along the radial extension direction, so as to divide the scanning area of the vehicle-mounted lidar into multiple grids; project the laser point cloud data into each grid to obtain grid data corresponding to each grid.
[0081] The above execution module 300 is further used to traverse the fitting points of each grid in a preset traversal order; perform linear fitting on the traversed fitting points to generate a fitting line.
[0082] The above execution module 300 is further used to add the traversed fitting points to the fitting point set, and when the fitting point set contains multiple fitting points, perform linear fitting on the fitting point set to generate a first fitting line corresponding to the fitting point set; solve the item to be solved of the first fitting line, and determine whether the item to be solved meets the preset solution requirements; if so, traverse the next fitting point and execute the step of adding the traversed fitting point to the fitting point set; if not, save the first fitting line, and only retain the last fitting point in the fitting point set, and execute the step of adding the traversed fitting point to the fitting point set to generate a second fitting line corresponding to the current fitting point set; until each fitting point is traversed to obtain at least one fitting line.
[0083] The above output module 400 is further used to calculate the minimum distance between the laser point cloud data and the fitting line, and the vertical distance between the laser point cloud data and the fitting point of the grid to which it belongs according to the dimensionality reduction coordinates corresponding to the laser point cloud data; when the minimum distance meets the preset first distance threshold and the vertical distance meets the preset second distance threshold, determine the laser point cloud data as ground point data; otherwise, determine the laser point cloud data as non-ground point data.
[0084] Among them, the fitting line includes at least one, and the fitting line includes the item to be solved; the above output module 400 is further configured to obtain the reduced-dimensional coordinates of the laser point cloud data and the item to be solved for each fitting line; and calculate the minimum distance of the laser point cloud data corresponding to the fitting line according to the reduced-dimensional coordinates and the item to be solved.
[0085] Furthermore, on the basis of the above embodiments, an embodiment of the present invention further provides a laser point cloud ground segmentation system, which is configured with the above laser point cloud ground segmentation device and is used to execute the above laser point cloud ground segmentation method.
[0086] The implementation principle and the technical effects generated by the laser point cloud ground segmentation system provided by the embodiment of the present invention are the same as those of the foregoing embodiment of the laser point cloud ground segmentation method. For the sake of brief description, for the parts not mentioned in the system embodiment, reference may be made to the corresponding content in the foregoing embodiment of the laser point cloud ground segmentation method.
[0087] Furthermore, an embodiment of the present invention further provides a vehicle, which is provided with the above laser point cloud ground segmentation system.
[0088] For a vehicle provided by an embodiment of the present invention, its implementation principle and the technical effects generated are the same as those of the foregoing embodiment of the laser point cloud ground segmentation method. For the sake of brief description, for the parts not mentioned in the vehicle embodiment, reference may be made to the corresponding content in the foregoing embodiment of the laser point cloud ground segmentation method.
[0089] An embodiment of the present invention further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, it implements the above Figures 1 to 3 steps of any of the methods shown. An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is run by a processor, it executes the above Figures 1 to 3 steps of any of the methods shown. An embodiment of the present invention further provides a schematic structural diagram of an electronic device, as Figure 8 shown, which is a schematic structural diagram of the electronic device. Among them, the electronic device includes a processor 81 and a memory 80. The memory 80 stores computer-executable instructions that can be executed by the processor 81. The processor 81 executes the computer-executable instructions to implement the above Figures 1 to 3 steps of any of the methods shown. In Figure 8 the shown embodiment, the electronic device further includes a bus 82 and a communication interface 83. Among them, the processor 81, the communication interface 83, and the memory 80 are connected through the bus 82.
[0090] Among them, the memory 80 may include high-speed random access memory (RAM), and may also include non-volatile memory, such as at least one disk memory. The communication connection between this system network element and at least one other network element is achieved through at least one communication interface 83 (which can be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. can be used. The bus 82 can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, etc., and can also be an AMBA (Advanced Microcontroller Bus Architecture) bus. Among them, AMBA defines three types of buses, including the APB (Advanced Peripheral Bus) bus, the AHB (Advanced High-performance Bus) bus, and the AXI (Advanced eXtensible Interface) bus. The bus 82 can be divided into an address bus, a data bus, a control bus, etc. For the sake of easy representation, Figure 8 only a two-way arrow is used in Figure 8 for representation, but it does not mean that there is only one bus or one type of bus.
[0091] The processor 81 may be an integrated circuit chip with the ability to process signals. In the implementation process, the steps of the above method can be completed by the integrated logic circuit of the hardware in the processor 81 or the instructions in the form of software. The above-mentioned processor 81 may be a general-purpose processor, including a central processing unit (CPU for short), a network processor (NP for short), etc.; it may also be a digital signal processor (DSP for short), an application specific integrated circuit (ASIC for short), a field-programmable gate array (FPGA for short), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as being executed and completed by a hardware decoding processor, or executed and completed by a combination of hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. This storage medium is located in the memory, and the processor 81 reads the information in the memory and combines its hardware to complete the foregoing Figures 1 to 3 Any of the methods shown. A computer program product of a laser point cloud ground segmentation method, device, system, and vehicle provided by an embodiment of the present invention includes a computer-readable storage medium storing program code, and the instructions included in the program code can be used to execute the method described in the foregoing method embodiments. For specific implementation, reference can be made to the method embodiments, which will not be elaborated herein.
[0092] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working process of the system described above can refer to the corresponding process in the foregoing method embodiments, and will not be elaborated herein. Additionally, in the description of the embodiments of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "coupled" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium, and it can be the communication inside two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances. If the described function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this 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 for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs that can store program codes.
[0093] In the description of the present invention, it should be noted that the orientation or positional relationship indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. is based on the orientation or positional relationship shown in the drawings. It is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it should not be construed as a limitation of the present invention. In addition, the terms "first", "second", "third" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance. Finally, it should be noted that the above embodiments are only specific embodiments of the present invention, which are used to illustrate the technical solutions of the present invention rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art within the technical scope disclosed by the present invention can still modify the technical solutions recorded in the foregoing embodiments or can easily think of changes, or make equivalent replacements for some of the technical features; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A method for laser point cloud ground segmentation, characterized in that The method includes: Obtaining lidar point cloud data; the lidar point cloud data is data collected by a preset vehicle-mounted lidar during vehicle driving; Performing rasterization processing on the lidar point cloud data to allocate the lidar point cloud data to preset grids, and obtaining grid data corresponding to each grid; Selecting fitting points from each grid data according to preset fitting point selection requirements, and performing linear fitting on the fitting points of each grid to generate a fitting line; Based on the fitting line, performing data segmentation on the lidar point cloud data to segment the lidar point cloud data into ground point data and non-ground point data.
2. The method according to claim 1, wherein The step of selecting fitting points from each grid data according to preset fitting point selection requirements includes: Performing dimensionality reduction processing on the grid data based on the point cloud coordinates corresponding to the lidar point cloud data to determine the dimensionality-reduced coordinates corresponding to the grid data; wherein, the dimensionality-reduced coordinates include a horizontal coordinate and a height coordinate, and the horizontal coordinate and the height coordinate are respectively used to indicate the horizontal distance and the height distance between the lidar point cloud data and the vehicle-mounted lidar; Calculating the theoretical height of the grid data according to the dimensionality-reduced coordinates; Determining the lowest point of the grid data whose theoretical height satisfies a preset height threshold as the fitting point in the current grid.
3. The method according to claim 1, characterized in that, The step of performing rasterization processing on the lidar point cloud data to allocate the lidar point cloud data to preset grids, and obtaining grid data corresponding to each grid includes: Dividing the scanning area of the vehicle-mounted lidar into multiple fan-shaped areas at equal angles according to a preset, and equally dividing the fan-shaped areas along the radial extension direction to divide the scanning area of the vehicle-mounted lidar into multiple grids; Projecting the lidar point cloud data into each grid to obtain grid data respectively corresponding to each grid.
4. The method according to claim 1, characterized in that, The step of performing linear fitting on the fitting points of each grid to generate a fitting line includes: Traversing the fitting points of each grid in a preset traversal order; Performing linear fitting on the traversed fitting points to generate a fitting line.
5. The method according to claim 4, characterized in that The step of performing linear fitting on the traversed fitting points to generate a fitting line includes: Adding the traversed fitting points to a fitting point set, and when the fitting point set contains multiple fitting points, performing linear fitting on the fitting point set to generate a first fitting line corresponding to the fitting point set; Solving the item to be solved of the first fitting line, and judging whether the item to be solved meets a preset solving requirement; If so, traversing the next fitting point, and performing the step of adding the traversed fitting point to the fitting point set; If not, saving the first fitting line, and only retaining the last fitting point in the fitting point set, and performing the step of adding the traversed fitting point to the fitting point set to generate a second fitting line corresponding to the current fitting point set; Until each fitting point is traversed, obtaining at least one fitting line.
6. The method according to claim 2, wherein The step of performing data segmentation on the lidar point cloud data based on the fitting line to segment the lidar point cloud data into ground point data and non-ground point data includes: Calculate the minimum distance of the laser point cloud data corresponding to the fitting line and the vertical distance between the laser point cloud data and the fitting point of the grid to which it belongs according to the reduced-dimensional coordinates corresponding to the laser point cloud data; When the minimum distance satisfies a preset first distance threshold and the vertical distance satisfies a preset second distance threshold, determine the laser point cloud data as ground point data; Otherwise, determine the laser point cloud data as non-ground point data.
7. The method according to claim 6, wherein There is at least one fitting line, and the fitting line includes items to be solved; the step of calculating the minimum distance of the laser point cloud data corresponding to the fitting line according to the reduced-dimensional coordinates corresponding to the laser point cloud data includes: Obtain the reduced-dimensional coordinates of the laser point cloud data and the items to be solved for each fitting line; Calculate the minimum distance of the laser point cloud data corresponding to the fitting line according to the reduced-dimensional coordinates and the items to be solved.
8. A laser point cloud ground segmentation device, characterized in that, The device includes: A data acquisition module for acquiring laser point cloud data; the laser point cloud data is data collected by a preset vehicle-mounted lidar during vehicle driving; A data processing module for rasterizing the laser point cloud data to allocate the laser point cloud data into preset grids to obtain grid data corresponding to each grid; An execution module for selecting fitting points from each grid data according to preset fitting point selection requirements and performing linear fitting on the fitting points of each grid to generate fitting lines; An output module for performing data segmentation on the laser point cloud data based on the fitting lines to segment the laser point cloud data into ground point data and non-ground point data.
9. A laser point cloud ground segmentation system, characterized in that, Configured with the laser point cloud ground segmentation device according to claim 8, for performing the laser point cloud ground segmentation method according to any one of claims 1 to 7.
10. A vehicle, characterized in that, The vehicle is provided with the laser point cloud ground segmentation system according to claim 9.