Ground segmentation method and device, electronic equipment and storage medium
By employing a ring-shaped mesh segmentation method and parallel computing, the problem of low ground segmentation efficiency under the rectangular mesh diffusion method is solved, thereby improving the safety and efficiency of autonomous driving.
Patent Information
- Application Number
- CN202311329242.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-13
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2043-10-13
AI Technical Summary
Existing technologies that use rectangular grids to spread outwards for ground segmentation are inefficient and reduce the safety of autonomous driving.
A ring grid segmentation method is adopted. Point cloud data is acquired and distributed into each ring grid. The plane equation of each ring grid is determined. Based on the ground equation of the preset ground grid, it is determined whether each ring grid is expanded into a ground grid. Parallel computing is used to improve the efficiency of ground segmentation.
This improves the efficiency and real-time performance of ground segmentation, thereby enhancing the safety of autonomous driving.
Smart Images

Figure CN117197163B_ABST
Abstract
Description
Technical Field
[0001] This application relates to data processing technology, and more particularly to a ground segmentation method, apparatus, electronic device, and storage medium. Background Technology
[0002] Autonomous vehicles use various sensors to perceive their surroundings and objects, and then adopt different strategies such as moving forward, waiting, or detouring to avoid obstacles. LiDAR, as an active detection and perception system, can acquire point cloud data, making it an indispensable sensor for the realization of autonomous driving.
[0003] Ground segmentation algorithms are a key technology in autonomous driving. By segmenting the point cloud data acquired by LiDAR into ground point cloud data and non-ground point data, obstacle avoidance can be achieved during autonomous driving.
[0004] In existing technologies, point cloud data is typically divided into multiple rectangular grids, and then a strategy of gradually expanding outward from the central grid is used to achieve ground segmentation. However, ground segmentation through outward expansion of rectangular grids is inefficient and reduces the safety of autonomous driving. Summary of the Invention
[0005] This application provides a ground segmentation method, apparatus, electronic device, and storage medium to improve ground segmentation efficiency and enhance the safety of autonomous driving.
[0006] In a first aspect, embodiments of this application provide a ground segmentation method, which includes:
[0007] Acquire point cloud data from the region to be segmented and distribute the point cloud data to each annular grid;
[0008] Based on the point cloud data in each annular grid, determine the plane equation of each annular grid;
[0009] Based on the ground equation of the preset ground grid and the plane equation of each ring grid, determine whether each ring grid should be expanded into a ground grid.
[0010] Secondly, embodiments of this application also provide a ground segmentation device, which includes:
[0011] The point cloud data allocation module is used to acquire point cloud data in the area to be segmented and allocate the point cloud data to each annular grid.
[0012] The plane equation determination module is used to determine the plane equation of each ring grid based on the point cloud data in each ring grid.
[0013] The ground grid expansion module is used to determine whether each ring grid should be expanded into a ground grid based on the ground equation of the preset ground grid and the plane equation of each ring grid.
[0014] Thirdly, embodiments of this application also provide an electronic device, which includes:
[0015] One or more processors;
[0016] Storage device for storing one or more programs;
[0017] When one or more programs are executed by one or more processors, the one or more processors implement any of the ground segmentation methods provided in the embodiments of this application.
[0018] Fourthly, embodiments of this application also provide a storage medium including computer-executable instructions, which, when executed by a computer processor, are used to perform any of the ground segmentation methods provided in embodiments of this application.
[0019] This application acquires point cloud data from the region to be segmented and distributes the point cloud data into each annular grid. Based on the point cloud data in each annular grid, it determines the planar equation of each annular grid. Based on the ground equation of the preset ground grid and the planar equation of each annular grid, it determines whether each annular grid should be expanded into a ground grid. Since the number of annular grids in each layer is the same, each time the expansion moves outward, a sub-thread can be assigned to an annular grid in the same sector for calculation. Different sub-threads determine whether each annular grid in a different layer within its sector can be expanded into a ground grid. This parallel computation improves the efficiency and real-time performance of ground segmentation, thereby enhancing the safety of autonomous driving. Therefore, the technical solution of this application solves the problem of low efficiency and reduced safety of autonomous driving caused by the outward diffusion of rectangular grids, achieving the effect of improving both ground segmentation efficiency and the safety of autonomous driving. Attached Figure Description
[0020] Figure 1a This is a flowchart of a ground segmentation method according to Embodiment 1 of this application;
[0021] Figure 1b This is a schematic diagram of a ring-shaped mesh according to Embodiment 1 of this application;
[0022] Figure 1c This is a schematic diagram of a rectangular grid according to Embodiment 1 of this application;
[0023] Figure 2 This is a flowchart of a ground segmentation method according to Embodiment 2 of this application;
[0024] Figure 3 This is a flowchart of a ground segmentation method according to Embodiment 3 of this application;
[0025] Figure 4 This is a schematic diagram of the structure of a ground segmentation device according to Embodiment 4 of this application;
[0026] Figure 5 This is a schematic diagram of the structure of an electronic device according to Embodiment 5 of this application. Detailed Implementation
[0027] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0028] It should be noted that the terms "first" and "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0029] Example 1
[0030] Figure 1a This is a flowchart of a ground segmentation method provided in Embodiment 1 of this application. This embodiment can be applied to the ground segmentation of point cloud data acquired in an autonomous driving scenario. The method can be executed by a ground segmentation device, which can be implemented in software and / or hardware and specifically configured in an autonomous vehicle.
[0031] See Figure 1a The ground segmentation method shown includes the following steps:
[0032] S100: Obtain point cloud data in the region to be segmented, and distribute the point cloud data to each annular grid.
[0033] The region to be segmented can be the area where ground segmentation is required; that is, only the point cloud data within the region to be segmented will be used for ground segmentation. For example, the region to be segmented can be a circular area with radius R centered on the vehicle. The size of the region to be segmented can be pre-set by relevant technical personnel based on experience or experimentation; this application does not impose specific limitations on this. Optionally, the size of the region to be segmented can be adaptively adjusted according to the vehicle's real-time driving speed to ensure effective obstacle avoidance when obstacles are identified through ground segmentation. For example, the region to be segmented can be a circular area with radius 50 meters centered on the vehicle. The point cloud data can be data acquired through LiDAR and used for ground segmentation. Specifically, the point cloud data can be a set of vectors in a three-dimensional coordinate system. The annular mesh can be a mesh obtained by dividing a cluster of concentric circles with an arithmetic progression of equal radii at equal angles. The number of annular meshes in each layer of the ring is equal. Figure 1b This is a schematic diagram of a ring-shaped grid. Figure 1b The numbers in each grid can be the ordinate of that grid.
[0034] Point cloud data is acquired using a LiDAR system installed in the vehicle. Based on the size and shape of the region to be segmented, the point cloud data within that region is determined. The point cloud data is then distributed to various annular grids based on its coordinates. For example, the coordinates of the acquired point cloud data can be converted to polar coordinates, and the data can be distributed to each annular grid according to its radius and angle range.
[0035] In one alternative embodiment, the annular grid is determined according to a preset angular interval and a preset radial interval, and the number of annular grids in each layer of the ring is equal.
[0036] The preset angle interval can be a pre-defined angle interval used to determine the number of annular grids in each layer of the ring. The number of annular grids in each layer of the ring is equal. Specifically, the preset angle interval can be determined based on experiments or experience; this application does not impose specific limitations on it. For example, in... Figure 1b The preset angle interval is 45 degrees. When the driving environment is more complex and changeable, the preset angle interval can be reduced to improve the accuracy of ground segmentation.
[0037] The preset radial interval can be a pre-defined interval in the radial direction, used to determine the number of layers in the area to be segmented. Specifically, the preset radial interval can be determined based on experiments or experience, and this application does not impose any specific limitations on it. For example, when the driving environment of the vehicle is complex and changeable, the value of the preset radial interval can be reduced in order to improve the accuracy of ground segmentation.
[0038] The ring grid is determined according to the preset angular interval and preset radial interval. The number of ring grids in each ring is equal, which makes the ground segmentation calculation process suitable for parallel computing, thereby improving the efficiency and real-time performance of ground segmentation.
[0039] S101. Determine the plane equation of each ring grid based on the point cloud data in each ring grid.
[0040] After distributing point cloud data into each ring grid, when a ring grid contains at least three point cloud data points, the equation of the plane formed by all the point clouds in that ring grid can be determined. For example, the plane equation for each ring grid can be calculated using the Random Sample Consensus (RANSAC) algorithm.
[0041] S102. Based on the ground equation of the preset ground grid and the plane equation of each ring grid, determine whether each ring grid should be expanded into a ground grid.
[0042] The preset ground grid can be a grid pre-defined for a ground area. The ground equation can be a planar equation of the preset ground grid. For example, the circular grid corresponding to the area where the vehicle is located can be pre-defined as the preset ground grid. Figure 1b The ring grid marked with a number of 0 can be a preset ground grid. The ground equation of the preset ground grid is compared with the plane equation of each ring grid. When the plane equation and the ground equation satisfy a preset similarity condition, the ring grid corresponding to that plane equation is determined to be expanded into a ground grid; otherwise, the ring grid corresponding to that plane equation is not expanded into a ground grid, which can be understood as being expanded into a non-ground grid. The preset similarity condition can be a pre-defined criterion for determining whether a ring grid is a ground grid. For example, the preset similarity condition can be set from the angle difference and height difference between the plane equation and the ground equation. The ground grid is essentially a ring grid that can be divided into ground regions.
[0043] It should be noted that in step S120, if the number of point cloud data in the ring grid is less than 3, it can be directly divided into a ground grid to improve the efficiency of ground segmentation. Since the lidar obtains point cloud data by reflecting after encountering a reflecting object, when the acquired point cloud data is small, it can be directly assumed that there are no obstacles in the area, that is, the ring grid is divided into a ground grid.
[0044] In existing technologies, a common approach is to divide the point cloud data into multiple rectangular grids based on a top-down view, assuming that the central grid where the vehicle is currently located is a ground grid. Starting from the central grid, the similarity between the current grid and adjacent grids is determined sequentially outwards, thereby determining whether the grid is a ground grid or a non-ground grid.
[0045] Figure 1c This is a schematic diagram of a rectangular grid. Figure 1c The code outlines the grid access order. Grids marked with the number 0 represent the current location of the autonomous vehicle and are considered to belong to the ground grid. Grids marked with the number 1 are adjacent to at least one grid marked with the number 0, and so on. For each ground grid marked with the number i, all adjacent grids marked with the number i+1 are checked. If an adjacent grid satisfies a similarity condition with the ground grid, it is considered to belong to the ground grid as well. This step is repeated until all grids have been checked. Expanding outward from the central grid, ground grids (dark grids) and non-ground grids (light grids) are eventually obtained, allowing for ground segmentation of the point cloud data.
[0046] Point cloud data is divided into multiple rectangular grids, and a strategy of gradually expanding outward from the central grid is used. In specific algorithm implementations, a breadth-first search strategy is generally used to achieve this expansion. However, the breadth-first search strategy cannot be parallelized, resulting in low algorithm efficiency. Autonomous vehicles have high requirements for real-time performance and are generally equipped with parallel computing units similar to GPUs (Graphics Processing Units). Therefore, ground segmentation algorithms capable of parallel computing are more suitable for autonomous driving scenarios.
[0047] Optionally, after determining whether each ring grid is expanded into a ground grid based on the ground equation of the preset ground grid and the plane equation of each ring grid, the method further includes: determining whether each point cloud data is a ground point cloud based on the ground grid.
[0048] After determining the ground grid, the ground point cloud can be further determined to further segment the ground and improve the accuracy of ground segmentation. For example, for each ring grid, the nearest ground grid is determined, and the distance from each point cloud in that ring grid to the nearest ground equation is calculated sequentially. If the distance is less than a preset distance threshold, then that point cloud is determined to be a ground point cloud. The preset distance threshold can be determined in advance by a technician based on experiments or experience; this application does not specifically limit it. For example, the preset distance threshold can be 0.08 meters.
[0049] The technical solution of this embodiment acquires point cloud data in the area to be segmented and distributes the point cloud data into each annular grid. Based on the point cloud data in each annular grid, the planar equation of each annular grid is determined. Based on the ground equation of the preset ground grid and the planar equation of each annular grid, it is determined whether each annular grid can be expanded into a ground grid. Since the number of annular grids in each layer is the same, each time the expansion is made outward, a sub-thread can be assigned to the annular grids in the same sector for calculation. Different sub-threads determine whether each annular grid in a different layer of its sector can be expanded into a ground grid. By parallel computing, the efficiency and real-time performance of ground segmentation are improved, thereby improving the safety of autonomous driving. Therefore, the technical solution of this application solves the problem of low efficiency and reduced safety of autonomous driving caused by the outward diffusion of rectangular grids, achieving the effect of improving the efficiency of ground segmentation and improving the safety of autonomous driving.
[0050] Example 2
[0051] Figure 2 This is a flowchart of a ground segmentation method provided in Embodiment 2 of this application. The technical solution of this embodiment is further refined based on the above technical solution.
[0052] Furthermore, the process of "acquiring point cloud data in the region to be segmented and allocating the point cloud data to each annular grid" is further refined into: "acquiring point cloud data in the region to be segmented and determining the polar coordinates of each point cloud data; determining the annular grid coordinates of each point cloud data based on the polar coordinates, preset angular interval, and preset radial interval; and allocating each point cloud data to the corresponding annular grid based on the annular grid coordinates of each point cloud data," thereby allocating the point cloud data to the annular grid.
[0053] See Figure 2 The ground segmentation method shown includes:
[0054] S200. Obtain point cloud data in the region to be segmented and determine the polar coordinates of each point cloud data.
[0055] The coordinates of the point cloud data are in a rectangular coordinate system. In order to facilitate the distribution of the point cloud data into the circular grid, the coordinates of the point cloud data are converted to polar coordinates in the polar coordinate system.
[0056] For a point cloud with coordinates (x, y, z) in a Cartesian coordinate system, its polar coordinates (r, ρ) can be calculated using x and y. Specifically, the relationship between coordinates in a Cartesian coordinate system and coordinates in a polar coordinate system is as follows:
[0057] r = sqrt(x 2 +y 2 );
[0058] ρ = atan2(y,x);
[0059] Where r represents the radius, ρ represents radians, sqrt represents the square root function, atan2 represents the function in the C programming language that returns the azimuth angle, x represents the x-coordinate in the rectangular coordinate system, and y represents the y-coordinate in the rectangular coordinate system.
[0060] S201. Determine the annular grid coordinates of each point cloud data based on the polar coordinates, preset angular intervals, and preset radial intervals of each point cloud data.
[0061] The coordinates of each annular grid are determined based on preset angular and radial intervals. These annular grids form a ring network, which contains M*N annular grids. The coordinates of each annular grid are (i, j), where i represents the grid's ordinate and j represents its abscissa. The formula for determining the annular grid coordinates of each point cloud data point based on its polar coordinates is as follows:
[0062] i = floor(r / R*M);
[0063] j = floor((ρ+π) / 2π*N);
[0064] Where floor represents the floor function, M represents the range of the vertical axis, and N represents the range of the horizontal axis.
[0065] S202. Based on the annular grid coordinates of each point cloud data, assign each point cloud data to the corresponding annular grid.
[0066] Based on the circular grid coordinates of each point cloud data, the point cloud data are assigned to circular grids with the same coordinates.
[0067] The coordinates of each ring grid in the ring network can be determined according to a preset rule. For example, the ordinate of each ring grid starts from the center and increases by 1 layer by layer, while the abscissa starts from the horizontal position and rotates clockwise, increasing by 1 every preset angle interval.
[0068] S203. Determine the plane equation of each ring grid based on the point cloud data in each ring grid.
[0069] S204. Based on the ground equation of the preset ground grid and the plane equation of each ring grid, determine whether each ring grid should be expanded into a ground grid.
[0070] The technical solution of this embodiment acquires point cloud data in the area to be segmented and determines the polar coordinates of each point cloud data; determines the annular grid coordinates of each point cloud data based on the polar coordinates, preset angular interval, and preset radial interval; and assigns each point cloud data to the corresponding annular grid based on the annular grid coordinates of each point cloud data. Through coordinate system transformation and coordinate mapping, the annular grid corresponding to each point cloud data is accurately placed, ensuring the accuracy of ground segmentation.
[0071] Example 3
[0072] Figure 3 This is a flowchart of a ground segmentation method provided in Embodiment 3 of this application. The technical solution of this embodiment is further refined based on the above technical solution.
[0073] Furthermore, the step of "determining whether each ring grid is expanded into a ground grid based on the ground equation of the preset ground grid and the plane equation of each ring grid" is refined as follows: "Determine the ground equation of each preset ground grid; select the ring grid whose grid ordinate is increased by 1 compared to each preset ground grid as the first candidate grid; determine whether the ground equation is similar to the plane equation of each first candidate grid; if so, expand the corresponding first candidate grid into a ground grid; obtain the second candidate grid by increasing the grid ordinate of the first candidate grid by 1; select each second candidate grid with adjacent ground grids as the second candidate ground grid; determine whether the plane equation of each second candidate ground grid is similar to the corresponding adjacent ground grid; if so, expand the corresponding second candidate ground grid into a ground grid; increase the grid ordinate of the second candidate grid by 1, and repeat the expansion judgment operation for the increased second candidate grid until the expansion judgment operation is completed for all ring grids," in order to expand each ring grid into a ground grid.
[0074] See Figure 3 The ground segmentation method shown includes:
[0075] S300: Obtain point cloud data in the region to be segmented, and distribute the point cloud data to each annular grid.
[0076] S301. Determine the plane equation of each ring grid based on the point cloud data in each ring grid.
[0077] S302. Determine the ground equation for each preset ground grid.
[0078] The ground equation can be derived from the theoretical plane equation determined by the lidar installed in the vehicle. For example, the plane equation can be expressed as ax + by + cz + w = 0, where (x, y, z) represent the Cartesian coordinates in the point cloud data, (a, b, c) are the normal vectors of the plane equation, and w is the offset of the plane equation. The ground equation can then be expressed as follows:
[0079] z+w'=0;
[0080] Where w' is the theoretical distance from the center of the lidar to the ground.
[0081] S303. The ring grid whose grid ordinate is increased by 1 compared to each preset ground grid is selected as the first candidate grid.
[0082] The first candidate grid is obtained by incrementing the ordinate of each grid in the circular grid coordinate system. The first candidate grid can be the next layer of circular grid adjacent to the preset ground grid. For example, the ordinate of the preset ground grid is 0, and the ordinate of the first candidate grid is 1. The number of preset ground grids is equal to the number of first candidate grids.
[0083] S304. Determine whether the ground equation is similar to the plane equation of each first candidate grid.
[0084] Because the accuracy of LiDAR may lead to errors in the acquired point cloud data, and because different vehicle models may exclude objects that are low in height or small in size from being considered obstacles, preset similarity conditions can be set as needed. These preset similarity conditions are used to determine whether a ring-shaped mesh can be expanded into a ground mesh. For example, preset similarity conditions can be two plane equations or the angle between the normal vectors of the plane equation and the ground equation being less than a preset angle, and the difference in offset being less than a preset height. Specifically, the preset angle and preset height can be set by a technician or automatically determined based on the model; this application does not impose specific limitations on these. For example, the preset angle can be 5 degrees, and the preset height can be 0.1 meters. Based on the normal vector angle and offset in the plane equations of the ground equation and each first candidate mesh, it is determined whether the plane equations of the ground equation and each first candidate mesh satisfy the preset similarity conditions. If so, the ground equation and the plane equations of each first candidate mesh are considered similar; otherwise, the ground equation and the plane equations of each first candidate mesh are considered dissimilar.
[0085] S305. If so, expand the corresponding first candidate grid into a ground grid.
[0086] If so, it means that the ground equation is similar to the planar equations of each first candidate grid. The similarity between the corresponding first candidate grid and the preset ground grid is determined by the similarity of the equations of the ring grid plane. If the ground equation is similar to the planar equation of the first candidate grid, the corresponding first candidate grid is expanded into a ground grid for use in similarity determination of the second candidate grid.
[0087] S306. The second candidate grid is obtained by incrementing the ordinate of the first candidate grid by 1.
[0088] The ordinate of the first candidate grid is incremented by 1, and the ring grid corresponding to the incremented ordinate is determined as the second candidate grid.
[0089] S307. Each second candidate grid that has adjacent ground grids shall be used as a second candidate ground grid.
[0090] The second candidate ground grid can be a second candidate grid that has a ground grid in its adjacent grid.
[0091] In one optional embodiment, the difference between the ordinate coordinates of adjacent ground grids and the second candidate grid is 1, and the difference between the abscissa coordinates is less than or equal to 1.
[0092] The ordinate of an adjacent ground grid is 1 less than the ordinate of the second candidate grid, and the abscissa of an adjacent ground grid is 1 less than or equal to the abscissa of the second candidate grid. Furthermore, the adjacent ground grids are ground grids. For example, for a second candidate grid with grid coordinates (i,j), the grid coordinates of its adjacent ground grids are (i-1,j-1), (i-1,j), or (i-1,j+1).
[0093] S308. Determine whether the plane equations of each second candidate ground grid are similar to those of its corresponding adjacent ground grid.
[0094] Based on preset similarity conditions, it is determined whether the planar equations of each second candidate ground grid are similar to those of its corresponding adjacent ground grid. Specifically, the preset angle and preset height in the preset similarity conditions can be the same as or different from those in S304, and this application does not impose specific limitations on them. For example, to further improve the computational efficiency of the ground segmentation algorithm, the same preset similarity conditions can be set in S304 and S308. For each second candidate ground grid, based on the angle and offset of the normal vector in the planar equations of the second candidate ground grid and its corresponding adjacent ground grid, it is determined whether the planar equations of the second candidate ground grid and its corresponding adjacent ground grid satisfy the preset similarity conditions. If so, the planar equations of the second candidate ground grid and its corresponding adjacent ground grid are determined to be similar; otherwise, the planar equations of the second candidate ground grid and its corresponding adjacent ground grid are determined to be dissimilar.
[0095] In an optional embodiment, determining whether the plane equations of each second candidate ground grid are similar to those of the corresponding adjacent ground grid includes determining whether the angle and offset of the normal vectors of the plane equations of each second candidate ground grid and the corresponding adjacent ground grid satisfy the corresponding preset numerical range.
[0096] Determine whether the angle and offset of the normal vector of the plane equation of each second candidate ground grid and the corresponding adjacent ground grid satisfy the corresponding preset value range. If they satisfy both, then the plane equation of the second candidate ground grid and the corresponding adjacent ground grid are determined to be similar.
[0097] The accuracy of similarity judgment is improved by determining whether the angle and offset of the normal vector of the plane equation of each second candidate ground grid and the corresponding adjacent ground grid meet the preset values.
[0098] S309. If so, expand the corresponding second candidate ground grid into a ground grid.
[0099] If so, meaning the plane equations of the second candidate ground grid are similar to those of its corresponding adjacent ground grids, the similarity of the equations determines that the corresponding second candidate ground grid is similar to the ground grid, and therefore the second candidate ground grid is expanded into a ground grid. It should be noted that when a second candidate ground grid has multiple adjacent ground grids, if any adjacent ground grid is similar to the second candidate ground grid, then the corresponding second candidate ground grid is expanded into a ground grid.
[0100] S310. Increment the ordinate of the second candidate grid by 1, and repeat the expansion judgment operation on the incremented second candidate grid until the expansion judgment operation is completed for all ring grids.
[0101] The grid ordinate of the second candidate grid is incremented by 1, the second candidate grid is updated, and the S308 and S309 operations are performed on the incremented second candidate grid until the expansion judgment operation is completed for all ring grids to determine whether all ring grids are expanded into ground grids.
[0102] In one alternative embodiment, the ground segmentation method is executed via at least two parallel threads.
[0103] Parallel threads can be any threads capable of running in parallel. Since the number of circular grids with the same vertical coordinate is the same in each layer, preferably, one thread can be configured for each circular grid with the same horizontal coordinate. This can be understood as thread j only processing the circular grid with horizontal coordinate j.
[0104] The ground segmentation method is executed by at least two parallel threads, which can improve the efficiency of ground segmentation through parallel computation.
[0105] The technical solution of this embodiment determines the ground equation of each preset ground grid; identifies the annular grid whose grid ordinate is increased by 1 compared to each preset ground grid as the first candidate grid; determines whether the ground equation is similar to the planar equation of each first candidate grid; if so, expands the corresponding first candidate grid into a ground grid; obtains the second candidate grid by increasing the grid ordinate of the first candidate grid by 1; takes each second candidate grid with adjacent ground grids as the second candidate ground grid; determines whether the planar equation of each second candidate ground grid is similar to the corresponding adjacent ground grid; if so, expands the corresponding second candidate ground grid into a ground grid; increases the grid ordinate of the second candidate grid by 1, and repeats the expansion judgment operation for the increased second candidate grids until the expansion judgment operation is completed for all annular grids. By determining whether the annular grid is expanded into a ground grid through the similarity of the equations, ground segmentation is achieved, obstacle recognition is realized, and the safety of autonomous driving is improved.
[0106] Example 4
[0107] Figure 4 The diagram shown is a schematic representation of a ground segmentation device according to Embodiment 4 of this application. This embodiment is applicable to ground segmentation of point cloud data acquired in autonomous driving scenarios and is configured in an autonomous vehicle. The specific structure of the ground segmentation device is as follows:
[0108] The point cloud data allocation module 410 is used to acquire point cloud data in the area to be segmented and allocate the point cloud data to each annular grid.
[0109] The plane equation determination module 420 is used to determine the plane equation of each annular grid based on the point cloud data in each annular grid.
[0110] The ground grid expansion module 430 is used to determine whether each ring grid is expanded into a ground grid based on the ground equation of the preset ground grid and the plane equation of each ring grid.
[0111] The technical solution of this embodiment acquires point cloud data in the area to be segmented and distributes the point cloud data into each annular grid. Based on the point cloud data in each annular grid, the planar equation of each annular grid is determined. Based on the ground equation of the preset ground grid and the planar equation of each annular grid, it is determined whether each annular grid can be expanded into a ground grid. Since the number of annular grids in each layer is the same, each time the expansion is made outward, a sub-thread can be assigned to the annular grids in the same sector for calculation. Different sub-threads determine whether each annular grid in a different layer of its sector can be expanded into a ground grid. By parallel computing, the efficiency and real-time performance of ground segmentation are improved, thereby improving the safety of autonomous driving. Therefore, the technical solution of this application solves the problem of low efficiency and reduced safety of autonomous driving caused by the outward diffusion of rectangular grids, achieving the effect of improving the efficiency of ground segmentation and improving the safety of autonomous driving.
[0112] Optionally, each annular grid is determined by dividing the area to be segmented according to a preset angular interval and a preset radial interval, and the number of annular grids in each layer of the ring is equal.
[0113] Optionally, the point cloud data allocation module 410 includes:
[0114] The polar coordinate determination unit is used to acquire point cloud data in the region to be segmented and determine the polar coordinates of each point cloud data.
[0115] The circular grid coordinate determination unit is used to determine the grid coordinates of each point cloud data according to the polar coordinates, preset angular intervals, and preset radial intervals of each point cloud data.
[0116] The point cloud data allocation unit is used to allocate each point cloud data to the corresponding ring grid according to the ring grid coordinates of each point cloud data.
[0117] Optional, the ground grid extension module 430 includes:
[0118] Ground equation determination unit, used to determine the ground equation of each preset ground grid;
[0119] The first candidate grid determination unit is used to select the annular grid whose grid ordinate is increased by 1 compared with each preset ground grid as the first candidate grid.
[0120] The first similarity judgment unit is used to determine whether the ground equation is similar to the plane equation of each first candidate grid;
[0121] The first candidate grid expansion unit is used to expand the corresponding first candidate grid into a ground grid if the condition is met.
[0122] The second candidate grid determination unit is used to obtain the second candidate grid by incrementing the grid ordinate of the first candidate grid by 1;
[0123] The second candidate ground grid determination unit is used to determine each second candidate grid that has adjacent ground grids as the second candidate ground grid;
[0124] The second similarity judgment unit is used to determine whether the plane equations of each second candidate ground grid are similar to those of the corresponding adjacent ground grids;
[0125] The second candidate grid extension unit is used to extend the corresponding second candidate ground grid into a ground grid if the condition is met.
[0126] The cyclic expansion unit is used to increment the grid ordinate of the second candidate grid by 1 and repeat the expansion judgment operation on the incremented second candidate grid until the expansion judgment operation is completed for all ring grids.
[0127] Optionally, the difference between the ordinate of the adjacent ground grid and the second candidate grid is 1, and the difference between the abscissas is less than or equal to 1.
[0128] Optionally, the second similarity determination unit is specifically used for:
[0129] Determine whether the angle between the normal vectors and the offset of the plane equations of each second candidate ground grid and the plane equations of the corresponding adjacent ground grids meet the corresponding preset numerical range.
[0130] Optionally, the ground segmentation method is executed by at least two parallel threads.
[0131] The ground segmentation device provided in this application embodiment can execute the ground segmentation method provided in any embodiment of this application, and has the corresponding functional modules and beneficial effects for executing the ground segmentation method.
[0132] Example 5
[0133] Figure 5 This is a schematic diagram of the structure of an electronic device provided in Embodiment 5 of this application, as shown below. Figure 5 As shown, the electronic device includes a processor 510, a memory 520, an input device 530, and an output device 540; the number of processors 510 in the electronic device can be one or more. Figure 5 Taking a processor 510 as an example; the processor 510, memory 520, input device 530, and output device 540 in the electronic device can be connected via a bus or other means. Figure 5 Taking the example of a connection between China and Israel via a bus.
[0134] The memory 520, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the ground segmentation method in the embodiments of this application (e.g., point cloud data allocation module 410, plane equation determination module 420, and ground grid expansion module 430). The processor 510 executes various functional applications and data processing of the electronic device by running the software programs, instructions, and modules stored in the memory 520, thereby implementing the aforementioned ground segmentation method.
[0135] The memory 520 may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a given function; the data storage area may store data created based on terminal usage. Furthermore, the memory 520 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 520 may further include memory remotely located relative to the processor 510, which can be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0136] Input device 530 can be used to receive input character information and generate key signal inputs related to user settings and function control of the electronic device. Output device 540 may include display devices such as a display screen.
[0137] Example 6
[0138] Embodiment Six of this application also provides a storage medium containing computer-executable instructions. When executed by a computer processor, the computer-executable instructions are used to perform a ground segmentation method. The method includes: acquiring point cloud data in the region to be segmented and allocating the point cloud data to each annular grid; determining the planar equation of each annular grid based on the point cloud data in each annular grid; and determining whether each annular grid is expanded into a ground grid based on the ground equation of a preset ground grid and the planar equation of each annular grid.
[0139] Of course, the computer-executable instructions provided in the embodiments of this application are not limited to the method operations described above, but can also perform related operations in the ground segmentation method provided in any embodiment of this application.
[0140] Based on the above description of the implementation methods, those skilled in the art can clearly understand that this application can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause an electronic device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0141] It is worth noting that in the embodiments of the search device described above, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the scope of protection of this application.
[0142] Note that the above are merely preferred embodiments and the technical principles employed in this application. Those skilled in the art will understand that this application is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of this application. Therefore, although this application has been described in detail through the above embodiments, this application is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of this application, the scope of which is determined by the scope of the appended claims.
Claims
1. A ground segmentation method characterized by, The method comprises the following steps: obtaining point cloud data in a region to be segmented and distributing the point cloud data to annular grids; wherein the annular grids are determined by dividing the region to be segmented according to a preset angle interval and a preset radial interval, and the number of annular grids in each circular ring is equal; determining a plane equation of each annular grid according to the point cloud data in each annular grid; determining whether each annular grid is expanded to a ground grid according to a ground equation of a preset ground grid and the plane equation of each annular grid, wherein the preset ground grid is an annular grid corresponding to a region where a vehicle is located; wherein the obtaining of the point cloud data in the region to be segmented and the distribution of the point cloud data to the annular grids comprise: obtaining each point cloud data in the region to be segmented and determining the polar coordinates of each point cloud data; determining the annular grid coordinates of each point cloud data according to the polar coordinates of each point cloud data, the preset angle interval and the preset radial interval; distributing each point cloud data to the corresponding annular grid according to the annular grid coordinates of each point cloud data; wherein the determination of whether each annular grid is expanded to a ground grid according to the ground equation of a preset ground grid and the plane equation of each annular grid comprises: determining the ground equation of each preset ground grid; taking the annular grid whose grid longitudinal coordinate is 1 more than each preset ground grid as a first candidate grid in the annular grid coordinates; determining whether the ground equation is similar to the plane equation of each first candidate grid; if yes, expanding the corresponding first candidate grid to a ground grid; obtaining a second candidate grid by increasing the grid longitudinal coordinate of the first candidate grid by 1; taking each second candidate grid with an adjacent ground grid as a second candidate ground grid; determining whether the plane equation of each second candidate ground grid is similar to that of the corresponding adjacent ground grid; if yes, expanding the corresponding second candidate ground grid to a ground grid; increasing the grid longitudinal coordinate of the second candidate grid by 1 and repeating the expansion judgment operation on the increased second candidate grid until the expansion judgment operation on all annular grids is completed.
2. The ground segmentation method according to claim 1, characterized in that, The difference between the grid longitudinal coordinates of the adjacent ground grid and the second candidate grid is 1, and the difference between the grid transverse coordinates is less than or equal to 1.
3. The ground segmentation method as claimed in claim 1, wherein, The determination of whether the plane equation of each second candidate ground grid is similar to that of the corresponding adjacent ground grid comprises: determining whether the normal vector included angle and the offset of the plane equation of each second candidate ground grid and the plane equation of the corresponding adjacent ground grid satisfy the corresponding preset numerical interval.
4. The ground segmentation method according to any one of claims 1 to 3, characterized in that, The ground segmentation method is executed by at least two parallel threads.
5. A ground segmentation apparatus characterized by comprising: The method comprises the following steps: a point cloud data distribution module for obtaining point cloud data in a region to be segmented and distributing the point cloud data to annular grids; wherein the annular grids are determined by dividing the region to be segmented according to a preset angle interval and a preset radial interval, and the number of annular grids in each circular ring is equal; a plane equation determination module, configured to determine a plane equation of each of the annular grids according to the point cloud data in each of the annular grids; a ground grid extension module, configured to determine whether each of the annular grids is extended to a ground grid according to a ground equation of a preset ground grid and the plane equation of each of the annular grids, wherein the preset ground grid is an annular grid corresponding to a region where the vehicle is located; wherein the point cloud data distribution module comprises: a polar coordinate determination unit, configured to obtain each of the point cloud data in the region to be segmented, and determine polar coordinates of each of the point cloud data; an annular grid coordinate determination unit, configured to determine annular grid coordinates of each of the point cloud data according to the polar coordinates of each of the point cloud data, the preset angular interval and the preset radial interval; a point cloud data distribution unit, configured to distribute each of the point cloud data into a corresponding annular grid according to the annular grid coordinates of each of the point cloud data; wherein the ground grid extension module comprises: a ground equation determination unit, configured to determine the ground equation of each of the preset ground grids; a first candidate grid determination unit, configured to take the annular grid whose grid longitudinal coordinate is 1 greater than each of the preset ground grids in the annular grid coordinates as a first candidate grid; a first similarity judgment unit, configured to determine whether the ground equation is similar to a plane equation of each of the first candidate grids; a first candidate grid extension unit, configured to extend the corresponding first candidate grid to a ground grid if the ground equation is similar to the plane equation of each of the first candidate grids; a second candidate grid determination unit, configured to obtain a second candidate grid by increasing the grid longitudinal coordinate of the first candidate grid by 1; a second candidate ground grid determination unit, configured to take each of the second candidate grids having an adjacent ground grid as a second candidate ground grid; a second similarity judgment unit, configured to determine whether a plane equation of each of the second candidate ground grids is similar to a corresponding adjacent ground grid; a second candidate grid extension unit, configured to extend the corresponding second candidate ground grid to a ground grid if the plane equation of each of the second candidate ground grids is similar to the corresponding adjacent ground grid; a loop extension unit, configured to increase the grid longitudinal coordinate of the second candidate grid by 1, and repeat the extension judgment operation on the increased second candidate grid until the extension judgment operation on all the annular grids is completed.
6. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the program to implement the ground segmentation method of any one of claims 1-4.
7. A computer readable storage medium having stored thereon a computer program, characterized in that The program is executed by the processor to implement the ground segmentation method of any one of claims 1-4.
Citation Information
Patent Citations
Ground point cloud segmentation method and device and automatic driving vehicle
CN113436336A
Ground detection method and device based on laser point cloud, storage medium and equipment
CN116520353A