Point cloud clustering methods, devices, storage media and electronic devices
By employing two-dimensional grid partitioning and neighborhood search methods in unmanned driving scenarios in mining areas, point clouds are rapidly clustered, solving the problems of high computational complexity and high hardware requirements in existing technologies, and achieving efficient obstacle recognition while reducing hardware costs.
Patent Information
- Application Number
- CN202210392006.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-14
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2042-04-14
AI Technical Summary
Existing point cloud clustering solutions for unmanned mining scenarios have high computational complexity, high hardware requirements, and poor target segmentation results, failing to effectively focus on scenario requirements.
The original point cloud is divided into two-dimensional grids, and the grids to be clustered are divided into the first point cloud clusters by the neighborhood search method. Then, the second point cloud cluster is obtained by fusion of two neighborhood searches. The obstacle grids are identified by using grid features such as height and number, which reduces the computational complexity.
It achieves rapid point cloud clustering, reduces computing resource consumption and hardware costs, and improves the accuracy and efficiency of clustering.
Smart Images

Figure CN114842229B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of point cloud fast clustering and segmentation technology, and in particular to a point cloud clustering method, apparatus, storage medium and electronic device. Background Technology
[0002] In autonomous driving scenarios in mining areas, point cloud clustering and segmentation can typically be used to identify obstacles, enabling automatic obstacle avoidance. However, current target clustering schemes used in mining scenarios mainly involve downsampling and Euclidean clustering, which have high computational complexity, correspondingly increasing hardware requirements, or fail to effectively address the scene's needs, resulting in poor control over target segmentation performance. Summary of the Invention
[0003] In view of this, this application provides a point cloud clustering method, apparatus, medium and device, which reduces resource consumption during the computation process while achieving fast clustering.
[0004] According to one aspect of this application, a point cloud clustering method is provided, comprising:
[0005] The original point cloud raster is determined based on the original point cloud, and the point cloud raster to be clustered is determined in the original point cloud raster, wherein the original point cloud raster is a two-dimensional raster;
[0006] In the original point cloud raster, the point cloud raster to be clustered is divided into at least one first point cloud cluster using a neighborhood search method;
[0007] The first point cloud cluster is fused using a neighborhood search method to obtain the second point cloud cluster.
[0008] Optionally, the step of dividing the original point cloud raster into at least one first point cloud cluster using a neighborhood search method specifically includes:
[0009] In the original point cloud raster, a point cloud raster to be clustered is extracted as the first point cloud cluster and the starting point cloud raster;
[0010] In the original point cloud raster, each raster around the starting point cloud raster is marked as a raster to be searched, and it is determined whether the raster to be searched is the point cloud raster to be clustered;
[0011] If so, the grid to be searched is added to the first point cloud cluster, and the grid to be searched is used as the starting point cloud grid. The process returns to the step of marking each grid around the starting point cloud grid as a grid to be searched, until all the grids to be searched are not the grids to be clustered, and the grid to be searched is determined to be a stop grid.
[0012] Optionally, the step of fusing the first point cloud cluster using a neighborhood search method to obtain the second point cloud cluster specifically includes:
[0013] One of the aforementioned stop grids is used as the second starting point cloud grid, and the first point cloud cluster where the starting point cloud grid corresponding to the stop grid is located is the first starting point cloud cluster;
[0014] Mark each grid cell around the second starting point cloud grid as the second grid cell to be searched, and determine whether the second grid cell to be searched is in the first starting point cloud cluster;
[0015] If the second grid cell to be searched is not in the first starting point cloud cluster, then determine whether the second grid cell to be searched is a point cloud grid cell to be clustered;
[0016] If so, the first starting point cloud cluster and the first point cloud cluster containing the second grid cell to be searched are merged to obtain a second point cloud cluster, and the process returns to the step of using one of the terminated grid cells as the second starting point cloud grid cell, until each of the second grid cells to be searched is in the current first point cloud cluster and / or is not a second grid cell to be clustered.
[0017] Optionally, the step of determining the original point cloud raster based on the original point cloud and determining the point cloud raster to be clustered in the original point cloud raster specifically includes:
[0018] The original point cloud is projected onto a two-dimensional plane, and the projection of the original point cloud onto the two-dimensional plane is meshed to obtain the original point cloud grid.
[0019] Determine the raster features of each of the original point cloud rasteres, and determine whether the original point cloud raster is the point cloud raster to be clustered based on the raster features.
[0020] Optionally, the grid features are point cloud height and point cloud quantity;
[0021] The step of determining whether the original point cloud raster is the point cloud raster to be clustered based on the raster features specifically includes:
[0022] The original point cloud raster with a point cloud height greater than a first preset threshold and a point cloud quantity greater than a second preset threshold is identified as the point cloud raster to be clustered.
[0023] Optionally, the step of extracting a point cloud raster to be clustered as the first point cloud cluster specifically includes: extracting one of the point cloud rasters to be clustered and adding a first point cloud cluster identifier to the point cloud raster to be clustered;
[0024] The step of adding the grid to be searched to the first point cloud cluster specifically includes: adding the first point cloud cluster identifier to the grid to be searched;
[0025] The step of merging the first starting point cloud cluster and the first point cloud cluster containing the second grid cell to be searched to obtain a second point cloud cluster specifically includes:
[0026] Add a second point cloud cluster identifier to each grid cell in the first point cloud cluster where the first starting point cloud cluster and the second grid cell to be searched are located.
[0027] Optionally, after fusing the point cloud clusters using a neighborhood search method to obtain a second point cloud cluster, the method further includes:
[0028] If there are multiple second point cloud clusters, then determine the number of point clouds in each second point cloud cluster;
[0029] The second point cloud cluster whose number of point clouds is greater than a third preset threshold is identified as the target point cloud cluster.
[0030] According to another aspect of this application, a point cloud clustering apparatus is provided, comprising:
[0031] An initialization module is used to determine an original point cloud grid based on the original point cloud, and to determine a point cloud grid to be clustered in the original point cloud grid, wherein the original point cloud grid is a two-dimensional grid;
[0032] The first clustering module is used to divide the point cloud raster to be clustered into at least one first point cloud cluster using a neighborhood search method in the original point cloud raster.
[0033] The second clustering module is used to fuse the first point cloud cluster using a neighborhood search method to obtain the second point cloud cluster.
[0034] Optionally, the first clustering module is specifically used for:
[0035] In the original point cloud raster, a point cloud raster to be clustered is extracted as the first point cloud cluster and the starting point cloud raster;
[0036] In the original point cloud raster, each raster around the starting point cloud raster is marked as a raster to be searched, and it is determined whether the raster to be searched is the point cloud raster to be clustered;
[0037] If so, the grid to be searched is added to the first point cloud cluster, and the grid to be searched is used as the starting point cloud grid. The process returns to the step of marking each grid around the starting point cloud grid as a grid to be searched, until all the grids to be searched are not the grids to be clustered, and the grid to be searched is determined to be a stop grid.
[0038] Optionally, the second clustering module is specifically used for:
[0039] One of the aforementioned stop grids is used as the second starting point cloud grid, and the first point cloud cluster where the starting point cloud grid corresponding to the stop grid is located is the first starting point cloud cluster;
[0040] Mark each grid cell around the second starting point cloud grid as the second grid cell to be searched, and determine whether the second grid cell to be searched is in the first starting point cloud cluster;
[0041] If the second grid cell to be searched is not in the first starting point cloud cluster, then determine whether the second grid cell to be searched is a point cloud grid cell to be clustered;
[0042] If so, the first starting point cloud cluster and the first point cloud cluster containing the second grid cell to be searched are merged to obtain a second point cloud cluster, and the process returns to the step of using one of the terminated grid cells as the second starting point cloud grid cell, until each of the second grid cells to be searched is in the current first point cloud cluster and / or is not a second grid cell to be clustered.
[0043] Optionally, the initialization module is specifically used for:
[0044] The original point cloud is projected onto a two-dimensional plane, and the projection of the original point cloud onto the two-dimensional plane is meshed to obtain the original point cloud grid.
[0045] Determine the raster features of each of the original point cloud rasteres, and determine whether the original point cloud raster is the point cloud raster to be clustered based on the raster features.
[0046] Optionally, the grid features are point cloud height and point cloud quantity;
[0047] The initialization module is also used for:
[0048] The original point cloud raster with a point cloud height greater than a first preset threshold and a point cloud quantity greater than a second preset threshold is identified as the point cloud raster to be clustered.
[0049] Optionally, the first clustering module is further configured to: extract a point cloud raster to be clustered, and add a first point cloud cluster identifier to the point cloud raster to be clustered;
[0050] The second clustering module is further configured to: add the first point cloud cluster identifier to the raster to be searched;
[0051] The step of merging the first starting point cloud cluster and the first point cloud cluster containing the second grid cell to be searched to obtain a second point cloud cluster specifically includes:
[0052] Add a second point cloud cluster identifier to each grid cell in the first point cloud cluster where the first starting point cloud cluster and the second grid cell to be searched are located.
[0053] Optionally, the device further includes a screening module, specifically used for:
[0054] If there are multiple second point cloud clusters, then determine the number of point clouds in each second point cloud cluster;
[0055] The second point cloud cluster whose number of point clouds is greater than a third preset threshold is identified as the target point cloud cluster.
[0056] According to another aspect of this application, a storage medium is provided on which a computer program is stored, which, when executed by a processor, implements the above-described point cloud clustering method.
[0057] According to another aspect of this application, an electronic device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor executes the computer program to implement the above-described point cloud clustering method.
[0058] By using the above technical solution, this application determines the point cloud grid to be clustered in the original point cloud, and realizes fast clustering of the point cloud through two neighborhood search operations, merging the point cloud grid to be clustered into a second point cloud cluster representing obstacles. The operation is simple and consumes less resources during the calculation process, thus reducing hardware costs.
[0059] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description
[0060] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0061] Figure 1 A flowchart illustrating a point cloud clustering method provided in an embodiment of this application is shown;
[0062] Figure 2 This illustration shows a schematic diagram of the neighborhood search process for another point cloud clustering method provided in an embodiment of this application;
[0063] Figure 3 A flowchart illustrating another point cloud clustering method provided in an embodiment of this application is shown;
[0064] Figure 4 A flowchart illustrating another point cloud clustering method provided in an embodiment of this application is shown;
[0065] Figure 5 A flowchart illustrating another point cloud clustering method provided in an embodiment of this application is shown;
[0066] Figure 6 This illustration shows a second neighborhood search diagram of another point cloud clustering method provided in an embodiment of this application;
[0067] Figure 7 This illustration shows a second neighborhood search result diagram of another point cloud clustering method provided in an embodiment of this application;
[0068] Figure 8 This illustration shows a schematic diagram of a point cloud raster to be clustered using another point cloud clustering method provided in an embodiment of this application.
[0069] Figure 9 This illustration shows a second point cloud cluster using another point cloud clustering method provided in an embodiment of this application;
[0070] Figure 10 A flowchart illustrating another point cloud clustering method provided in an embodiment of this application is shown;
[0071] Figure 11 A flowchart illustrating another point cloud clustering method provided in an embodiment of this application is shown;
[0072] Figure 12 A flowchart illustrating another point cloud clustering method provided in an embodiment of this application is shown;
[0073] Figure 13 A structural block diagram of a point cloud clustering device provided in an embodiment of this application is shown. Detailed Implementation
[0074] This embodiment provides a point cloud clustering method, such as Figure 1 As shown, the method includes:
[0075] Step 101: Determine the original point cloud raster based on the original point cloud, and determine the point cloud raster to be clustered in the original point cloud raster;
[0076] The point cloud clustering method provided in this application can be used for obstacle point cloud clustering in unmanned driving scenarios in mining areas. Based on this, the original point cloud of the driving environment is first obtained, and the original point cloud is projected onto a grid-like grid to obtain the original point cloud grid. Then, the obstacle grid, that is, the point cloud grid to be clustered, is determined in the original point cloud grid.
[0077] Step 102: In the original point cloud raster, the point cloud raster to be clustered is divided into at least one first point cloud cluster using the neighborhood search method, wherein the original point cloud raster is a two-dimensional raster.
[0078] In this embodiment, in the original point cloud raster, a neighborhood search method is used to search for the rasters surrounding the raster to be clustered, and it is determined whether to cluster these searched rasters and the raster to be clustered into one class, that is, to divide them into the first point cloud cluster. Here, the rasters surrounding the raster to be clustered are the rasters that share edges with the raster to be clustered, that is, the rasters that are connected to the raster to be clustered in the up, down, left, and right directions.
[0079] Among them, neighborhood search is a type of heuristic algorithm based on "neighborhood" and is a local search method.
[0080] Specifically, neighborhood search methods include... Figure 2 As shown, the starting point queue is first initialized by accessing v0 and setting its flag to enqueue v0. A starting point v is selected in the queue. Then, the neighboring point w of v is searched and accessed, and w is added to the starting point queue. That is, w becomes the new starting point, and the search for neighboring points of w can continue. The search is carried out in this iterative way until the starting point queue is empty. At this point, no new neighboring points can be found, so the neighborhood search ends.
[0081] The original point cloud grid is a two-dimensional grid. Specifically, during vehicle operation, any obstacle encountered must be avoided, regardless of its height. Therefore, it is not necessary to determine the obstacle height in three dimensions. Based on this, this application uses a two-dimensional grid to avoid interference from invalid three-dimensional information, thereby reducing computational load and improving efficiency while achieving point cloud clustering.
[0082] Step 103: Use the neighborhood search method to merge the first point cloud cluster to obtain the second point cloud cluster.
[0083] In this embodiment, after performing a neighborhood search, the following may be obtained: Figure 3 The two first point cloud clusters shown (in the figure, the grid cells in first point cloud cluster 1 are labeled with the number 1, and the grid cells in first point cloud cluster 2 are labeled with the number 2) are... Figure 3 It can be seen that there are no tangent edges between the grids of the two first point cloud clusters, but the two first point cloud clusters are connected by a common vertex. Based on this, a neighborhood search is performed again to determine whether there are grids that are diagonally related between the two first point cloud clusters. If so, the two first point cloud clusters can be merged into a second point cloud cluster.
[0084] By applying the technical solution of this embodiment, the point cloud grid to be clustered is determined in the original point cloud. Through two neighborhood search operations, the point cloud is quickly clustered and the point cloud grid to be clustered is merged into a second point cloud cluster representing the obstacle. The operation is simple and consumes little resources during the calculation process, thus reducing hardware costs.
[0085] Furthermore, as a refinement and extension of the specific implementation of the above embodiments, and to fully illustrate the specific implementation process of this embodiment, another point cloud clustering method is provided, such as... Figure 4 As shown, in the original point cloud raster, the point cloud raster to be clustered is divided into at least one first point cloud cluster using a neighborhood search method, specifically including:
[0086] Step 201: Extract a point cloud raster to be clustered from the original point cloud raster as the first point cloud cluster and the starting point cloud raster.
[0087] Step 202: In the original point cloud raster, mark each raster around the starting point cloud raster as the raster to be searched, and determine whether the raster to be searched is a point cloud raster to be clustered.
[0088] In this embodiment, a starting point cloud grid is first determined, and it is determined whether the grids around this starting point cloud grid are point cloud grids to be clustered.
[0089] Specifically, a point cloud raster to be clustered is selected as the starting point cloud raster, and this starting point cloud raster is added to the first point cloud cluster. Then, it is determined whether each raster around the starting point cloud raster is a point cloud raster to be clustered, and then, based on the determination result, it is determined whether to add this raster to the first point cloud cluster, that is, to classify this raster and the starting point cloud raster into the same category.
[0090] If a grid cell represents an obstacle, then the grid cell is determined to be a point cloud grid cell to be clustered.
[0091] Among them, the grids around the starting point cloud grid refer to the grids that share the same edge as the starting point cloud grid, specifically the grids located in the up, down, left, and right directions of the starting point cloud grid and connected to the starting point cloud grid.
[0092] Step 203: If yes, add the grid to be searched to the first point cloud cluster and use the grid to be searched as the starting point cloud grid. Return to the step of marking each grid around the starting point cloud grid as a grid to be searched, until all grids to be searched are not grids to be clustered, and determine the grid to be searched as the stop grid.
[0093] In this embodiment, if a grid cell in the neighborhood of the starting point cloud grid is a grid cell to be clustered, that is, a grid cell to be searched is a grid cell to be clustered, then both the starting point cloud grid and the grid cell to be searched are grid cells to be clustered and can be classified into the same class. Based on this, the grid cell to be searched is also added to the first point cloud cluster. At this time, both the starting point cloud grid and the grid cell to be searched are in the first point cloud cluster.
[0094] Next, the grid cell that was just added to the first point cloud cluster is taken as the new starting point cloud grid cell, and the grid cells around the new starting point cloud grid cell are analyzed. The above steps are repeated using the idea of loop iteration until none of the grid cells to be searched are the point cloud grid cells to be clustered. The iteration stops when the grid cells to be searched at this time are taken as the stopping grid cells, which represents the completion of the first neighborhood search.
[0095] Furthermore, such as Figure 5 As shown, in another point cloud clustering method, the first point cloud cluster is fused using a neighborhood search method to obtain the second point cloud cluster, specifically including:
[0096] Step 301: Use a stop grid as the second starting point cloud grid, and use the first point cloud cluster where the starting point cloud grid corresponding to the stop grid is located as the first starting point cloud cluster;
[0097] Step 302: Mark each cell diagonally opposite to the second starting point cloud grid as the second search cell, and determine whether the second search cell is in the first starting point cloud cluster;
[0098] Step 303: If the second grid cell to be searched is not in the first starting point cloud cluster, then determine whether the second grid cell to be searched is a point cloud grid cell to be clustered.
[0099] In this embodiment, after obtaining the first point cloud cluster using neighborhood search, it is possible that two first point cloud clusters have no common edges between their grids, but are connected, meaning that the two first point cloud clusters share the same grid vertices, exhibiting a diagonal distribution. In this case, although the grids of the two first point cloud clusters do not share edges, the two first point cloud clusters are actually connected through the vertices of the grids, and therefore should not be separated. Furthermore, it is also possible that two first point cloud clusters are only one grid cell apart. In this case, the grid cell can also be considered as noise, and the two first point cloud clusters should not be separated. Therefore, another neighborhood search operation can be performed to determine if the above situations exist. If so, the two first point cloud clusters are merged into a second point cloud cluster.
[0100] Specifically, the terminated grid is used as the second starting point cloud grid, and the grids surrounding the terminated grid, i.e., the second grid to be searched, are analyzed using the same analysis method as the first grid to be searched. Then, based on the judgment result, it is determined whether to merge the first point cloud cluster containing this second grid to be searched with the first starting point cloud cluster, that is, to classify the first point cloud cluster containing this grid and the first starting point cloud cluster into one category.
[0101] Step 304: If yes, merge the first starting point cloud cluster and the first point cloud cluster containing the second search grid to obtain a second point cloud cluster, and return to the step of taking a stop grid as the second starting point cloud grid, until each second search grid is in the current first point cloud cluster and / or is not a second clustering point cloud grid.
[0102] In this embodiment, if one of the surrounding grid cells of the second starting point cloud grid is not in the first starting point cloud cluster and is the second grid cell to be clustered (i.e., this second grid cell to be clustered is a grid cell to be clustered in another first point cloud cluster), then the first starting point cloud cluster containing the second starting point cloud grid and the first point cloud cluster containing this second grid cell to be clustered can be classified into one category. Based on this, the first starting point cloud cluster and the first point cloud cluster containing the second starting point cloud grid are merged to obtain the second point cloud cluster. At this time, both the starting point cloud grid and the second grid cell to be searched are in the second point cloud cluster. This operation is repeated until all first point cloud clusters have been analyzed.
[0103] Specifically, such as Figure 6 As shown, after obtaining two first point cloud clusters (in the figure, the grids in first point cloud cluster 1 are identified by the number 1, and the grids in first point cloud cluster 2 are identified by the number 2), the grid identified by the letter E can be determined as a termination grid of first point cloud cluster 2. This termination grid E is used as the second starting point cloud grid, and the current starting point cloud cluster is now first point cloud cluster 2, with the surrounding grids identified as the second point cloud grids to be searched. According to... Figure 6 It can be seen that the grid to the left of the stopped grid E is in the first point cloud cluster 1, and is the grid to be clustered in this point cloud cluster. Therefore, the first point cloud cluster 1 is merged with the current starting point cloud cluster, i.e., the first point cloud cluster 2, to obtain... Figure 7 The second point cloud cluster 3 is shown (in the figure, the grid of the second point cloud cluster 3 is identified by the number 3).
[0104] Then, a new stopping grid is selected as the second starting point cloud grid, and the grids at the diagonal positions of the new second starting point cloud grid are analyzed. The above steps are repeated using the idea of loop iteration until all first point cloud clusters have been analyzed. Figure 8 A schematic diagram of the point cloud raster to be clustered is shown. The squares in the diagram are the original point cloud raster, and the raster marked -1 is the point cloud raster to be clustered. Figure 9 The diagram shows the second point cloud cluster obtained after two neighborhood search operations, where the numbers in the grid represent the identifiers of the second point cloud cluster to which the grid belongs.
[0105] Furthermore, in another point cloud clustering method, such as Figure 10 As shown, the original point cloud raster is determined based on the original point cloud, and the point cloud raster to be clustered is determined within the original point cloud raster. Specifically, this includes:
[0106] Step 401: Project the original point cloud onto a two-dimensional plane, and perform mesh processing on the projection of the original point cloud onto the two-dimensional plane to obtain the original point cloud raster.
[0107] In this embodiment, a raw point cloud of the driving environment is acquired using a device such as radar or a camera, and then projected onto a two-dimensional plane. Each point in the projection of the raw point cloud is divided into a grid on the two-dimensional plane by dividing the two-dimensional plane into a grid, thus obtaining the raw point cloud grid.
[0108] Step 402: Determine the raster features of each original point cloud raster, and determine whether the original point cloud raster is a point cloud raster to be clustered based on the raster features.
[0109] In this embodiment, point cloud rasters to be clustered are selected from the original point cloud rasters. Specifically, the raster features of each original point cloud raster can be determined and compared with the features that the point cloud rasters to be clustered should have, so as to determine whether each original point cloud raster is a point cloud raster to be clustered based on the comparison results.
[0110] Furthermore, in another point cloud clustering method, the raster features are the point cloud height and the number of points. Determining whether the original point cloud raster is a point cloud raster to be clustered based on these raster features specifically includes:
[0111] The original point cloud raster with a point cloud height greater than a first preset threshold and a point cloud quantity greater than a second preset threshold is identified as the point cloud raster to be clustered.
[0112] In this embodiment, the grid features of the original point cloud grid can be the height and number of points in the grid, and the point cloud grid to be clustered is an obstacle grid representing obstacles. If the point cloud height is less than a first preset threshold, it can be considered that the point cloud corresponds to a road surface; otherwise, it can be considered that the point cloud corresponds to an obstacle, and the grid is an obstacle grid, i.e., the point cloud grid to be clustered. Further, if the number of points in the grid is not greater than a second preset threshold, it can be considered that the point cloud is noise rather than an obstacle, and the grid is not an obstacle grid, i.e., not the point cloud grid to be clustered.
[0113] This embodiment not only considers the difference in point cloud height between obstacles and road surfaces, but also takes into account the potential impact of noise, making the judgment of the point cloud grid to be clustered more accurate, thereby improving the accuracy of point cloud clustering.
[0114] Furthermore, in another point cloud clustering method, a point cloud raster to be clustered is extracted as the first point cloud cluster, specifically including: extracting a point cloud raster to be clustered and adding a first point cloud cluster identifier to the point cloud raster to be clustered;
[0115] Add the grid to be searched to the first point cloud cluster, specifically including: adding the first point cloud cluster identifier to the grid to be searched;
[0116] The first starting point cloud cluster and the first point cloud cluster containing the second grid cell to be searched are merged to obtain a second point cloud cluster, which specifically includes:
[0117] Add a second point cloud cluster identifier to each grid cell in the first point cloud cluster containing the first starting point cloud cluster and the second grid cell to be searched.
[0118] In this embodiment, the grid may carry an identifier to indicate which first or second point cloud cluster the grid is assigned to. Specifically, if a grid is added to a first point cloud cluster, a first point cloud cluster identifier is added to the grid; if a grid is added to a second point cloud cluster, a second point cloud cluster identifier is added to the grid.
[0119] Different first point cloud clusters have different first point cloud cluster identifiers, and different second point cloud clusters also have different second point cloud cluster identifiers. Therefore, the identifier carried by the grid can be used to determine which first point cloud cluster or second point cloud cluster the grid belongs to.
[0120] Furthermore, after determining the point cloud raster to be clustered, an identifier corresponding to the point cloud raster to be clustered can be added to it, so as to distinguish whether each raster is a point cloud raster to be clustered in the original point cloud raster.
[0121] Furthermore, in another point cloud clustering method, such as Figure 11 As shown, after fusing point cloud clusters using the neighborhood search method to obtain the second point cloud cluster, the process also includes:
[0122] Step 501: If there are multiple second point cloud clusters, determine the number of point clouds in each second point cloud cluster.
[0123] Step 502: Determine the second point cloud cluster whose number of point clouds is greater than the third preset threshold as the target point cloud cluster.
[0124] In this embodiment, after dividing the second point cloud clusters, if there are multiple second point cloud clusters, they can be filtered to ultimately obtain valid target point cloud clusters. Specifically, if the number of points in a certain second point cloud cluster is not greater than a third preset threshold, the points in that second point cloud cluster can be considered noise, and therefore that second point cloud cluster is discarded, retaining only the second point cloud clusters with the required number of points as target point cloud clusters. The number of target point cloud clusters can be one or more.
[0125] This embodiment takes into account the number of point clouds in the second point cloud cluster, eliminating the influence of noise and making the clustering results more accurate.
[0126] Furthermore, in another point cloud clustering method, such as Figure 12 As shown, the process begins by acquiring the original point cloud using a device with imaging capabilities. Then, a two-dimensional grid is used to divide the projection of the original point cloud onto a two-dimensional plane. Next, the grid features of each grid cell are calculated, and obstacle point cloud cells are extracted from the divided original point cloud grid based on these features; this is equivalent to extracting the point cloud cells to be clustered. The obstacle point cloud cells are then divided into clusters using the BFS neighborhood search method, resulting in the first point cloud cluster. Next, the neighborhood search method is used to merge improperly separated clusters, that is, to merge the first point cloud clusters that should not be separated into the second point cloud cluster. Finally, unreasonable second point cloud clusters are filtered out, such as those with too few point clouds, to obtain the target point cloud cluster.
[0127] This embodiment avoids extensive computation of point cloud data by performing two neighborhood search clustering operations on the point cloud raster, significantly reducing computational resource consumption. The algorithm involved in the solution has a short running time and can meet the requirements of real-time devices.
[0128] Furthermore, as a specific implementation of the above-mentioned point cloud clustering method, embodiments of this application provide a point cloud clustering apparatus, such as... Figure 13 As shown, the point cloud clustering device includes: an initialization module, a first clustering module, and a second clustering module.
[0129] The initialization module is used to determine the original point cloud raster based on the original point cloud, and to determine the point cloud raster to be clustered in the original point cloud raster.
[0130] The first clustering module is used to divide the point cloud raster to be clustered into at least one first point cloud cluster in the original point cloud raster using a neighborhood search method;
[0131] The second clustering module is used to fuse the first point cloud cluster using the neighborhood search method to obtain the second point cloud cluster.
[0132] Optionally, the first clustering module is specifically used for:
[0133] In the original point cloud raster, a point cloud raster to be clustered is extracted as the first point cloud cluster and the starting point cloud raster. The original point cloud raster is a two-dimensional raster.
[0134] In the original point cloud raster, each raster around the starting point cloud raster is marked as the raster to be searched, and it is determined whether the raster to be searched is the point cloud raster to be clustered.
[0135] If so, add the grid to be searched to the first point cloud cluster, and use the grid to be searched as the starting point cloud grid. Return to the step of marking each grid around the starting point cloud grid as a grid to be searched, until all grids to be searched are not grids to be clustered, and determine the grid to be searched as the stop grid.
[0136] Optionally, the second clustering module is specifically used for:
[0137] Use a stop grid as the second starting point cloud grid, and use the first point cloud cluster where the actual point cloud grid corresponding to the stop grid is located as the first starting point cloud cluster;
[0138] Mark each grid cell around the second starting point cloud grid as the second grid cell to be searched, and determine whether the second grid cell to be searched is in the first starting point cloud cluster;
[0139] If the second grid cell to be searched is not in the first starting point cloud cluster, then determine whether the second grid cell to be searched is a point cloud grid cell to be clustered;
[0140] If so, merge the first starting point cloud cluster and the first point cloud cluster containing the second grid cell to be searched to obtain a second point cloud cluster, and return to the step of using a stop grid cell as the second starting point cloud grid cell, until each second grid cell to be searched is in the current first point cloud cluster and / or is not a second grid cell to be clustered.
[0141] Optionally, the initialization module is used specifically for:
[0142] The original point cloud is projected onto a two-dimensional plane, and the projection of the original point cloud onto the two-dimensional plane is meshed to obtain the original point cloud raster.
[0143] Determine the raster features of each original point cloud raster, and determine whether the original point cloud raster is a point cloud raster to be clustered based on the raster features.
[0144] Optionally, the raster features are point cloud height and point cloud number;
[0145] The initialization module is also used for:
[0146] The original point cloud raster with a point cloud height greater than a first preset threshold and a point cloud quantity greater than a second preset threshold is identified as the point cloud raster to be clustered.
[0147] Optionally, the first clustering module is also used to: extract a point cloud raster to be clustered, and add a first point cloud cluster identifier to the point cloud raster to be clustered;
[0148] The second clustering module is also used to: add a first point cloud cluster identifier to the raster to be searched;
[0149] The first starting point cloud cluster and the first point cloud cluster containing the second grid cell to be searched are merged to obtain a second point cloud cluster, which specifically includes:
[0150] Add a second point cloud cluster identifier to each grid cell in the first point cloud cluster containing the first starting point cloud cluster and the second grid cell to be searched.
[0151] Optionally, the device also includes a screening module, specifically used for:
[0152] If there are multiple second point cloud clusters, then determine the number of point clouds in each second point cloud cluster separately;
[0153] The second point cloud cluster with a point cloud quantity greater than the third preset threshold is identified as the target point cloud cluster.
[0154] According to another aspect of this application, a storage medium is provided on which a computer program is stored, wherein the program or instructions, when executed by a processor, implement the above-described point cloud clustering method.
[0155] According to another aspect of this application, an electronic device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor executes the program to implement the above-described point cloud clustering method.
[0156] It should be noted that other corresponding descriptions of the functional modules involved in the point cloud clustering device provided in this application embodiment can be found by referring to... Figures 1 to 12 The corresponding descriptions in [the document] will not be repeated here.
[0157] Based on the above, Figures 1 to 12 Accordingly, this application embodiment also provides a storage medium storing a computer program thereon, which, when executed by a processor, implements the above-described method. Figures 1 to 12 The point cloud clustering method shown.
[0158] Based on this understanding, the technical solution of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, or portable hard drive) and includes several instructions to cause an electronic device (such as a personal computer, server, or network device) to execute the methods described in the various implementation scenarios of this application.
[0159] Based on the above, Figures 1 to 12 The method shown, and Figure 13 To achieve the above objectives, the point cloud clustering device embodiment shown in this application also provides an electronic device, specifically a personal computer, server, network device, etc. This electronic device includes a storage medium and a processor; the storage medium is used to store a computer program; the processor is used to execute the computer program to achieve the above-described objectives. Figures 1 to 12 The point cloud clustering method shown.
[0160] Optionally, the electronic device may also include a user interface, a network interface, a camera, radio frequency (RF) circuitry, sensors, audio circuitry, a Wi-Fi module, etc. The user interface may include a display screen, input units such as a keyboard, etc., and optional user interfaces may also include USB interfaces, card reader interfaces, etc. The network interface may optionally include standard wired interfaces, wireless interfaces (such as Bluetooth interfaces, Wi-Fi interfaces), etc.
[0161] Those skilled in the art will understand that the electronic device structure provided in this embodiment does not constitute a limitation on the electronic device, and may include more or fewer components, or combine certain components, or have different component arrangements.
[0162] The storage medium may also include an operating device and a network communication module. The operating device is a program that manages and stores the hardware and software resources of the electronic device, supporting the operation of information processing programs and other software and / or programs. The network communication module is used to enable communication between various controls within the storage medium, as well as communication with other hardware and software within the physical device.
[0163] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platform, or it can be implemented by hardware.
[0164] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of a preferred embodiment, and the units or processes shown in the drawings are not necessarily essential for implementing this application. Those skilled in the art will understand that the units in the apparatus of the embodiment can be distributed within the apparatus of the embodiment as described, or can be located in one or more apparatuses different from this embodiment, with corresponding changes. The units of the above-described embodiment can be combined into one unit, or further divided into multiple sub-units.
[0165] The serial numbers in this application are for descriptive purposes only and do not represent the superiority or inferiority of any particular implementation scenario. The above disclosures are merely a few specific implementation scenarios of this application; however, this application is not limited thereto, and any variations conceived by those skilled in the art should fall within the protection scope of this application.
Claims
1. A point cloud clustering method, characterized in that, The method includes: Obtain the original point cloud of the driving environment; An original point cloud grid is determined based on the original point cloud, and a point cloud grid to be clustered is determined in the original point cloud grid based on the grid features of each original point cloud grid. The original point cloud grid is a two-dimensional grid obtained by projecting the original point cloud onto a grid-like grid. The point cloud grid to be clustered is an obstacle grid. The grid features include point cloud height and point cloud quantity. The point cloud grid to be clustered is an original point cloud grid whose point cloud height is greater than a first preset threshold and whose point cloud quantity is greater than a second preset threshold. In the original point cloud raster, the point cloud raster to be clustered is divided into at least one first point cloud cluster using a neighborhood search method; The first point cloud cluster is obtained by fusing the first point cloud clusters based on whether there are grids that present a diagonal relationship between the two first point cloud clusters using a neighborhood search method. The second point cloud cluster represents obstacles in the driving environment and is used for autonomous driving.
2. The method according to claim 1, characterized in that, The step of dividing the point cloud raster to be clustered into at least one first point cloud cluster using a neighborhood search method in the original point cloud raster specifically includes: extracting a point cloud raster to be clustered as the first point cloud cluster and the starting point cloud raster in the original point cloud raster, wherein the original point cloud raster is a two-dimensional raster. In the original point cloud raster, each raster around the starting point cloud raster is marked as a raster to be searched, and it is determined whether the raster to be searched is the point cloud raster to be clustered; If so, the grid to be searched is added to the first point cloud cluster, and the grid to be searched is used as the starting point cloud grid. The process returns to the step of marking each grid around the starting point cloud grid as a grid to be searched, until all the grids to be searched are not the grids to be clustered, and the grid to be searched is determined to be a stop grid.
3. The method according to claim 2, characterized in that, The step of fusing the first point cloud cluster using the neighborhood search method to obtain the second point cloud cluster specifically includes: taking one of the terminating grids as the second starting point cloud grid, and taking the first point cloud cluster where the starting point cloud grid corresponding to the terminating grid is located as the first starting point cloud cluster; Mark each grid cell around the second starting point cloud grid as the second grid cell to be searched, and determine whether the second grid cell to be searched is in the first starting point cloud cluster; If the second grid cell to be searched is not in the first starting point cloud cluster, then determine whether the second grid cell to be searched is a point cloud grid cell to be clustered; If so, the first starting point cloud cluster and the first point cloud cluster containing the second grid cell to be searched are merged to obtain a second point cloud cluster, and the process returns to the step of using one of the terminated grid cells as the second starting point cloud grid cell, until each of the second grid cells to be searched is in the current first point cloud cluster and / or is not a second grid cell to be clustered.
4. The method according to claim 1, characterized in that, The step of determining the original point cloud grid based on the original point cloud and determining the point cloud grid to be clustered in the original point cloud grid specifically includes: projecting the original point cloud onto a two-dimensional plane and performing grid processing on the projection of the original point cloud onto the two-dimensional plane to obtain the original point cloud grid. Determine the raster features of each of the original point cloud rasteres, and determine whether the original point cloud raster is the point cloud raster to be clustered based on the raster features.
5. The method according to claim 4, characterized in that, The step of determining whether the original point cloud grid is the point cloud grid to be clustered based on the grid features specifically includes: determining that the original point cloud grid with a point cloud height greater than a first preset threshold and a point cloud quantity greater than a second preset threshold is the point cloud grid to be clustered.
6. The method according to claim 3, characterized in that, The step of extracting a point cloud raster to be clustered as the first point cloud cluster specifically includes: extracting a point cloud raster to be clustered and adding a first point cloud cluster identifier to the point cloud raster to be clustered; The step of adding the grid to be searched to the first point cloud cluster specifically includes: adding the first point cloud cluster identifier to the grid to be searched; The step of merging the first starting point cloud cluster and the first point cloud cluster containing the second grid cell to be searched to obtain a second point cloud cluster specifically includes: adding a second point cloud cluster identifier to each grid cell in the first starting point cloud cluster and the first point cloud cluster containing the second grid cell to be searched.
7. The method according to claim 1, characterized in that, After fusing the point cloud clusters using the neighborhood search method to obtain the second point cloud cluster, the method further includes: if there are multiple second point cloud clusters, then determining the number of point clouds in each second point cloud cluster. The second point cloud cluster whose number of point clouds is greater than a third preset threshold is identified as the target point cloud cluster.
8. A point cloud clustering device, characterized in that, The device includes: An initialization module is used to acquire the original point cloud of the driving environment; determine the original point cloud grid based on the original point cloud; and determine the point cloud grid to be clustered in the original point cloud grid based on the grid features of each original point cloud grid. The original point cloud grid is a two-dimensional grid obtained by projecting the original point cloud onto a grid-like grid. The point cloud grid to be clustered is an obstacle grid. The grid features include point cloud height and point cloud quantity. The point cloud grid to be clustered is an original point cloud grid whose point cloud height is greater than a first preset threshold and whose point cloud quantity is greater than a second preset threshold. The first clustering module is used to divide the point cloud raster to be clustered into at least one first point cloud cluster using a neighborhood search method in the original point cloud raster. The second clustering module is used to fuse the first point cloud clusters based on whether there are grids that present a diagonal relationship between two first point cloud clusters using a neighborhood search method, thereby obtaining a second point cloud cluster. The second point cloud cluster represents obstacles in the driving environment and is used for autonomous driving.
9. A storage medium having a program or instructions stored thereon, characterized in that, When the program or instructions are executed by the processor, they implement the steps of the method as described in any one of claims 1 to 7.
10. An electronic device, characterized in that, The invention includes a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, characterized in that the processor, when executing the program, implements the method of any one of claims 1 to 7.
Citation Information
Patent Citations
Obstacle clustering method and obstacle clustering device
CN107064955A
Obstacle recognition method and device
CN108345007A