Multi-stage clustering segmentation algorithm for roadside objects based on vehicle-mounted LiDAR point cloud

By employing a multi-stage clustering segmentation algorithm and utilizing 3D gridding and Euclidean clustering to adaptively adjust the threshold, the algorithm addresses the issues of excessive manual intervention and unstable segmentation results in roadside object clustering algorithms for vehicle-mounted LiDAR point clouds, achieving efficient roadside object clustering and segmentation.

CN116051841BActive Publication Date: 2026-01-02HENAN POLYTECHNIC UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310060386.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-20
Publication Date
2026-01-02
Estimated Expiration
2043-01-20

AI Technical Summary

Technical Problem

Existing vehicle-mounted LiDAR point cloud roadside object clustering algorithms require a lot of manual intervention and have unstable segmentation results. They also have poor parameter reusability, and the clustering and segmentation results of a single algorithm for connected objects are unstable.

Method used

A multi-stage clustering and segmentation algorithm based on vehicle-mounted LiDAR point clouds is adopted, including data preprocessing, 3D gridding, breadth-first search, Euclidean clustering and multi-segment nearest neighbor search, adaptively adjusting the clustering threshold, and generating clustering results with complete boundaries through 3D grid indexing and Euclidean clustering.

Benefits of technology

It effectively reduces human intervention, improves segmentation accuracy, reduces over-segmentation and under-segmentation, and achieves stable clustering and segmentation of roadside objects with an extraction rate of over 87.0%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116051841B_ABST
    Figure CN116051841B_ABST
Patent Text Reader

Abstract

The application discloses a roadside ground object multi-stage clustering segmentation algorithm based on vehicle-mounted LiDAR point cloud, which comprises the following steps: (1) vehicle-mounted LiDAR point cloud data preprocessing, to obtain roadside ground object point cloud data; (2) three-dimensional gridding and breadth-first search are sequentially performed on the roadside ground object point cloud data, to realize coarse clustering segmentation of the roadside ground object point cloud data; the coarse clustering segmentation obtains separate ground object point cloud and connected ground object point cloud, and the separate ground object point cloud is output as a clustering result of the roadside ground object; (3) the connected ground object point cloud is subjected to Euclidean clustering, to be segmented into coarse clustering point cloud sets with complete boundaries; (4) all clustering objects of the coarse clustering point cloud set are aggregated by using multi-section nearest neighbor search; and the clustering threshold value is adaptively adjusted until the point cloud aggregation speeds of all the clustering objects are similar, and the connected ground object clustering result is output. The application solves the problems of the vehicle-mounted LiDAR point cloud segmentation, such as too much manual intervention and unstable segmentation effect.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of ground object clustering segmentation. Specifically, it is a multi-stage clustering segmentation algorithm for roadside ground objects based on vehicle-mounted LiDAR point clouds. BACKGROUND

[0002] Vehicle-mounted LiDAR technology, as a cutting-edge spatial information acquisition technology today, can quickly acquire detailed three-dimensional spatial information of roadside objects on both sides of the road during vehicle driving. Roadside trees, street lamps, signs, and other roadside objects are common elements in this data source, providing data support for the construction of smart cities, digital roads, and autonomous driving technologies. Since vehicle-mounted LiDAR records spatial information such as buildings, cars, pedestrians, roads, and roadside objects without distinction, when acquiring ground objects from massive point clouds, point cloud clustering segmentation is an important step, and the segmentation result has a direct impact on subsequent processing such as three-dimensional reconstruction, target recognition, and feature extraction.

[0003] Current clustering algorithms for roadside object point clouds are mainly divided into the following four categories:

[0004] 1) Based on geometric distance, such as K-Means clustering, Euclidean clustering, etc. The clustering results of this type of algorithm are related to the initial cluster center position and distance threshold. Since there are often multiple roadside objects in road scenes, these values need to be frequently adjusted to achieve ideal results, and the parameter reusability of the algorithm is poor and is prone to over-segmentation / under-segmentation.

[0005] 2) Based on point cloud density, such as DBSCAN clustering, OPTICS clustering. This type of method takes the tightness of point cloud distribution as the basis for clustering. A core object is randomly selected as a seed during clustering, and all sample sets that can reach the density of this core object are output. Repeat this operation until all core objects are clustered. Similar objects have good extraction results due to similar point cloud densities, but nearby objects are easily extracted as a single cluster, and the problem of decreasing point cloud density with increasing scanning distance exists in vehicle-mounted LiDAR data, which needs to consider the impact of local density changes on clustering results.

[0006] 3) Region growing clustering, such as adaptive region growing criterion algorithm. This type of algorithm first sorts the point cloud according to the curvature value and selects an initial seed point. The algorithm compares the normal vector angle between the seed point and the neighborhood points, and attributes similar points to a class and continues to grow outward until there are no points that meet the conditions. The algorithm is suitable for clustering with a determined number and position of seed points, but a single growth criterion and stopping condition can easily produce over-segmentation / under-segmentation when processing connected point clouds.

[0007] 4) Based on model fitting, there are Hough transform, RANSAC segmentation, etc. According to the preset model parameters of the morphological skeleton characteristics of the ground object, the distance from the global point to the model is calculated, and the points meeting the confidence and distance threshold are output as the clustering result. It has high robustness to noise and outliers, but it is difficult to extract non-preset model ground objects, and when processing large scene point clouds, accurate block processing of data is also required.

[0008] In summary, the current roadside ground object clustering algorithm based on vehicle-mounted LiDAR has the following problems: 1) multiple parameters need to be preset to improve clustering accuracy, and manual intervention is required, and the parameter reusability is poor; 2) the clustering and segmentation effect of single algorithm on connected ground objects is unstable. SUMMARY

[0009] Therefore, the technical problem to be solved by the present application is to provide a roadside ground object multi-stage clustering and segmentation algorithm based on vehicle-mounted LiDAR point cloud, to solve the problems of multiple manual intervention and unstable segmentation effect in vehicle-mounted LiDAR point cloud segmentation.

[0010] To solve the above technical problems, the present application provides the following technical solutions:

[0011] The roadside ground object multi-stage clustering and segmentation algorithm based on vehicle-mounted LiDAR point cloud comprises the following steps:

[0012] Step (1), data preprocessing is performed on the vehicle-mounted LiDAR point cloud data to obtain roadside ground object point cloud data;

[0013] Step (2), the roadside ground object point cloud data is sequentially subjected to three-dimensional gridding and breadth-first search to realize coarse clustering and segmentation of the roadside ground object point cloud data; the coarse clustering and segmentation obtains separate ground object point cloud and connected ground object point cloud, and the separate ground object point cloud is directly output as the roadside ground object clustering result;

[0014] Step (3), the connected ground object point cloud is subjected to Euclidean clustering to be segmented into coarse clustering point cloud sets with complete boundaries;

[0015] Step (4), presetting the ground object type and performing ground object classification, giving an initial value of the clustering threshold according to the ground object classification, and using multi-section nearest neighbor search to gradually aggregate all clustering objects of the coarse clustering point cloud set; the aggregation speed of each point cloud is evaluated, and the clustering threshold is adaptively adjusted until the point cloud aggregation speeds of all clustering objects are similar, and the connected ground object clustering result is output, thereby completing the clustering and segmentation of the roadside ground object.

[0016] In step (2) of the multi-stage clustering segmentation algorithm for roadside objects based on vehicle-mounted LiDAR point clouds, the point cloud data of the roadside objects is spatially divided by voxels to obtain block point clouds during three-dimensional gridding.

[0017] The multi-stage clustering segmentation algorithm for roadside objects based on vehicle-mounted LiDAR point clouds calculates the three-dimensional grid index I(r, c, l) of any three-dimensional point (x i ,y i ,z i ) as follows:

[0018]

[0019]

[0020]

[0021] In formulas (1) to (3), math.floor is a floor function, L is the edge length of the voxel, r, c, and l are the row, column, and layer numbers of the grid where the point is located, and x min , y min , and z min are the minimum values of the point cloud in the X, Y, and Z directions.

[0022] In step (2) of the multi-stage clustering segmentation algorithm for roadside objects based on vehicle-mounted LiDAR point clouds, breadth-first search is performed on the three-dimensional grid index based on the starting grid after three-dimensional gridding. The algorithm for breadth-first search includes the following steps:

[0023] In step (2-1), a four-neighborhood search is performed on each starting grid in the XOY plane, and other starting grids found in the search are removed to make each starting grid mutually disconnected.

[0024] In step (2-2), an open queue and a closed queue are created, and a starting grid is pushed into the open queue.

[0025] In step (2-3), a six-neighborhood search is performed on the first element in the open queue to obtain the neighboring grids in the six directions above, below, left, right, front, and back. For each neighboring grid, if the three-dimensional grid index exists, the grid is not in the closed queue, and the grid is not in the open queue, the grid is pushed into the open queue. After all the neighboring grids are processed, the first element in the open queue is moved to the closed queue.

[0026] In step (2-4), step (2-3) is repeated until the open queue is empty. At this time, the closed queue represents a connected space composed of three-dimensional grid indexes, and the point cloud in the space is considered as a clustering object.

[0027] Steps (2-5) and (2-2) to (2-4) are repeated to coarsely divide the point cloud data into two or more cluster objects. The 3D grid index of each object is traversed. For objects with only a single starting grid, the point cloud corresponding to the grid is output as a separate ground feature clustering result. If the number of starting grids is greater than or equal to 2, they are considered as connected ground feature point clouds.

[0028] The above-mentioned multi-stage clustering and segmentation algorithm for roadside objects based on vehicle-mounted LiDAR point clouds, in step (3), the Euclidean clustering algorithm process is as follows:

[0029] Step (3-1): Mark a point P in the connected ground feature point cloud; use the KD-Tree structure to perform a nearest neighbor query to find the n points closest to P, and select the points whose distance is less than the search threshold T. E The points are marked and stored in class Q;

[0030] Step (3-2): Select a point from class Q that was not used for the search as a new point P. Use the KD-Tree structure to perform a nearest neighbor query on the n points closest to P, and select the points whose distance is less than the search threshold T. E The points are marked and stored in class Q;

[0031] Step (3-3), repeat step (3-2) until no new points are added to class Q, then a clustering is completed;

[0032] Steps (3-4) and (3-1) to (3-3) are repeated until all points in the connected feature point cloud are marked, thus completing Euclidean clustering.

[0033] The above-mentioned multi-stage clustering and segmentation algorithm for roadside objects based on vehicle-mounted LiDAR point clouds uses the average distance between midpoints of connected object point clouds as the basis for classification. Twice as the Euclidean clustering search threshold T E Average distance between points The calculation formula is:

[0034]

[0035] In equation (4), the function `math.dis` calculates the Euclidean distance between two points, and the function `math.min` returns the minimum value in the sequence. Using the same laser scanner to collect point cloud data containing various land features, the minimum distance d between most points... i In Nearby, set T E Twice Can guarantee T E d is greater than the number of points within the cloud of various ground features i, so that no scattered points are generated in the process of Euclidean clustering; the data point cloud collected by the vehicle-mounted scanner has high density, and the distance between different objects in the connected objects is often greater than the value, so the reference The generated coarse clustering point cloud is not prone to under-segmentation.

[0036] The above-mentioned multi-stage clustering and segmentation algorithm for roadside above-ground objects based on vehicle-mounted LiDAR point cloud has the following specific algorithm for step (4):

[0037] Step (4-1), the approximate bottom center of each object is obtained from the starting grid, and the nearest coarse clustering point cloud is selected as the starting clustering point cloud;

[0038] Step (4-2), object classification is performed according to the starting clustering point number and the object height;

[0039] Step (4-3), connected object point cloud neighborhood search is performed;

[0040] Step (4-4), the aggregation speed of each connected object point cloud is evaluated; if the aggregation speeds of each connected object point cloud are similar, the connected object clustering result is output, otherwise the adaptive adjustment of the main threshold T main and the farthest aggregation threshold T max is performed, and neighborhood search is performed again until the aggregation speeds of each connected object point cloud are similar, and the connected object clustering result is output.

[0041] In step (4-1) of the above-mentioned multi-stage clustering and segmentation algorithm for roadside above-ground objects based on vehicle-mounted LiDAR point cloud, the calculation method of the starting clustering point cloud is as follows: n starting grid corresponding point clouds are selected from the connected object point cloud, and the center of each is calculated; the center of mass is taken as the approximate bottom center O i (x i ,y i ,z i )(i=1,2,…,n) of each independent object after clustering and segmentation; the Euclidean distance D from O i to each point in the connected object point cloud is calculated, and the coarse clustering point cloud corresponding to the point with the smallest D value is taken as the starting clustering point cloud.

[0042] In step (4-2) of the above-mentioned multi-stage clustering and segmentation algorithm for roadside above-ground objects based on vehicle-mounted LiDAR point cloud, the object classification method is as follows: the starting clustering with a large number of starting clustering points and low object height is classified as shrub object; the starting clustering with a small number of starting clustering points and high object height is classified as tree object; and the starting clustering with a large number of starting clustering points and high object height is classified as street lamp or sign.

[0043] In step (4-3) of the above-mentioned multi-stage clustering and segmentation algorithm for roadside above-ground objects based on vehicle-mounted LiDAR point cloud, the algorithm flow of the neighborhood search of the connected object point cloud is as follows:

[0044] Step (4-31), select a coarse clustering point cloud, calculate its centroid to the Euclidean distance D of n points in a starting cluster i (i = 1, 2, …, n); if the distance of the centroid of the coarse clustering point cloud to the centroid of the starting cluster is greater than the main threshold T main , discard the Euclidean distance D i ;

[0045] Step (4-32), repeat step (4-31) until all starting clusters are traversed, and the minimum value of the Euclidean distance D i that meets the requirements is recorded as D min , and the corresponding starting cluster is recorded, when D min is less than the near neighbor threshold T near , the point cloud is pressed into class Q;

[0046] Step (4-33), repeat step (4-32) until all coarse clustering point clouds are traversed, when there is no point cloud in class Q, increase the near neighbor threshold T near ; when there is a point cloud in class Q, store it in the corresponding starting cluster, and set the near neighbor threshold T near to the initial value;

[0047] Step (4-34), repeat step (4-33) until all coarse clustering point clouds are stored in the starting cluster, if the near neighbor threshold T near is greater than 20 times the initial value, end the run.

[0048] Step (4-35), modify the content of step (4-31) as follows: select a coarse clustering point cloud, calculate its centroid to the Euclidean distance D of n points in a starting cluster i (i = 1, 2, …, n); if D i is greater than the farthest aggregation threshold T max , discard the Euclidean distance D i ;

[0049] Step (4-36), repeat step (4-34), that is, complete the near neighbor search of the connected ground object point cloud.

[0050] The above multi-stage clustering segmentation algorithm for roadside ground objects based on vehicle-mounted LiDAR point cloud determines the main threshold T main and the farthest aggregation threshold T max of each type of ground object, selects the point cloud with the smallest volume of the outer envelope cube of the same type of ground object from the clustering results of the individual ground object, calculates the farthest distance D max between the points in the XOY plane, and takes D max as the T main and T maxValue; the specific calculation formula is as follows:

[0051]

[0052] In equation (5), the function math.max returns the maximum value in the sequence; the function math.disXY projects two points onto the XOY plane and calculates the Euclidean distance between the two projected points; for the point cloud projection on the horizontal plane, D max The smallest covering circle is used to represent the size of the feature type. The smallest covering circle, representing the projection of roadside feature point clouds onto a horizontal plane, reflects the size of that feature type. Smaller concentric circle coverage areas can be considered the main clustering range of similar features; therefore, the diameter of the smallest covering circle is used as the T-value for each feature type. main With T max The basis for setting.

[0053] In the above multi-stage clustering and segmentation algorithm for roadside objects based on vehicle-mounted LiDAR point clouds, step (4-4) involves adaptively adjusting the threshold T. main T max The algorithm flow is as follows:

[0054] Step (4-41): Perform multi-stage nearest neighbor search; for n clustered objects of the same connected land feature, calculate the outer envelope cube volume V of its cluster body. m The outer envelope cube volume V of the clustering results r And record V m With V r The ratio R;

[0055] Step (4-42): Take the maximum value of R as R max If there is:

[0056] R i ∈[R max - σ,R max ] ,i=1,…,n (6);

[0057] Output the clustering results and end the program, where σ is any positive number; otherwise, execute step (4-43).

[0058] Step (4-43): Record the V in the previous round m With V r The ratio is R', and if this is the first round, then R' is zero;

[0059] ① Select objects that do not satisfy equation (6). If R ≥ R', then the number of clustering subjects still needs to be increased to improve the aggregation speed. Increase the subject threshold T of the object. main ;

[0060] ii. Selecting an object that does not satisfy formula (6), if R < R', the clustering result of the object appears a large increase, indicating that the object has aggregated the point cloud of other objects first, and the main threshold T of the object is reduced main and the farthest aggregation threshold T max ;

[0061] iii. If there is unaggregated coarse clustering point cloud, the farthest aggregation threshold T of all clustering objects is increased max ;

[0062] Step (4-44), empty the clustering result of this round, and repeat steps (4-41) and (4-42).

[0063] The technical scheme of the present application has the following beneficial technical effects:

[0064] 1. The roadside ground object multi-stage clustering segmentation algorithm based on vehicle-mounted LiDAR point cloud in the present application uses three-dimensional coordinates of point cloud as the basis, uses three-dimensional grid and breadth-first search algorithm for coarse segmentation of point cloud, performs Euclidean clustering on connected objects to generate several coarse clustering point clouds with complete boundaries, uses multi-section nearest neighbor search to gradually obtain clustering results, and finally evaluates the aggregation speed according to the volume ratio of clustering main body and result, so as to adaptively adjust the clustering threshold or output the result, and realize clustering and segmentation of various roadside ground objects in a road scene.

[0065] 2. The roadside ground object multi-stage clustering segmentation algorithm based on vehicle-mounted LiDAR point cloud in the present application designs an algorithm for adaptively adjusting the threshold, introduces the main threshold T main and the farthest aggregation threshold T max performs nearest neighbor search twice, first generates a clustering main body, and then obtains a clustering segmentation object from the clustering main body; this method can avoid that the edge point cloud of sparse point cloud is wrongly divided into a neighboring object, thereby effectively avoiding over-segmentation. Through adaptive adjustment of the thresholds T main and T max , the present application can effectively reduce manual intervention and improve segmentation accuracy.

[0066] 3. The correct extraction rate of the present application for street trees is 87.0%, and the correct extraction rate for street lamps and signs is 91.9%, both of which achieve effective extraction, and over-segmentation / under-segmentation phenomenon is less; the clustering result of connected objects retains complete edge contour. BRIEF DESCRIPTION OF DRAWINGS

[0067] Figure 1 The multi-stage clustering segmentation technical route of vehicle-mounted LiDAR point cloud in the embodiment of the present application;

[0068] Figure 2 The three-dimensional grid effect diagram of vehicle-mounted LiDAR point cloud in the embodiment of the present application;

[0069] Figure 3 The schematic diagram of judging hexagon in the embodiment of the application;

[0070] Figure 4a The schematic diagram of increasing T in the embodiment of the application near The schematic diagram of the case when there is no new point in the range;

[0071] Figure 4b The schematic diagram of increasing T in the embodiment of the application near The schematic diagram of the case when a new point is found;

[0072] Figure 4c The schematic diagram of the case when a new point is pressed into the corresponding cluster and T is reset in the embodiment of the application near

[0073] Figure 5 The schematic diagram of point cloud in the experimental area in the embodiment of the application;

[0074] Figure 6 The schematic diagram of experimental data in the embodiment of the application;

[0075] Figure 7a The schematic diagram of rough segmentation of point cloud into single ground objects and connected ground objects in the embodiment of the application;

[0076] Figure 7b The schematic diagram of the initial cluster of connected ground objects in the embodiment of the application;

[0077] Figure 7c The schematic diagram of the cluster main body in the embodiment of the application;

[0078] Figure 7d The schematic diagram of the cluster result in the embodiment of the application;

[0079] Figure 8a The schematic diagram of the K-Means clustering result in the embodiment of the application;

[0080] Figure 8b The schematic diagram of the DBSCAN clustering result in the embodiment of the application;

[0081] Figure 8c The schematic diagram of the MCSA clustering result in the embodiment of the application;

[0082] Figure 9a The schematic diagram of the over-segmentation phenomenon of the K-Means algorithm in the embodiment of the application (the left figure is the clustering result of the algorithm, and the right figure is the segmentation true value);

[0083] Figure 9b The schematic diagram of the over-segmentation phenomenon of the DBSCAN algorithm in the embodiment of the application (the left figure is the clustering result of the algorithm, and the right figure is the segmentation true value);

[0084] Figure 9c ​The over-segmentation diagram of the MCSA algorithm in the embodiment of the application (the left diagram is the clustering result of the algorithm, and the right diagram is the segmentation true value). DETAILED DESCRIPTION

[0085] The multi-stage clustering segmentation algorithm based on the roadside ground objects of the vehicle-mounted LiDAR point cloud in the embodiment is a multi-stage clustering segmentation algorithm (MCSA) fusing Euclidean clustering and neighbor searching. The algorithm has the following characteristics:

[0086] 1) The three-dimensional grid and the breadth-first search algorithm are used to realize data blocking, and separate individual objects and connected objects.

[0087] 2) Based on the region growing idea, the iterative neighbor searching is used to gradually aggregate the point cloud, the edge contour of the clustering result is complete, and the over-segmentation / under-segmentation phenomenon is less.

[0088] 3) The volume ratio of the clustering subject to the clustering result is used to evaluate the point cloud aggregation speed, and the clustering threshold is adaptively adjusted to reduce manual intervention.

[0089] 1. Algorithm principle

[0090] The MCSA algorithm of the embodiment first uses the three-dimensional grid and the breadth-first search algorithm to coarsely segment the point cloud, separates individual objects and connected objects, then performs Euclidean clustering on the connected objects, and divides them into several coarse clustering point clouds with complete boundaries, then presets the object type to give the initial value of the clustering threshold, uses multi-section neighbor searching to gradually aggregate all objects, finally evaluates the point cloud aggregation speed by the volume ratio of the clustering subject to the clustering result, and adaptively adjusts the clustering threshold until the point cloud aggregation speeds of the several clustering objects are basically consistent, and the result is output, so that the clustering and segmentation of the roadside ground objects are realized. The algorithm includes three stages of coarse segmentation, Euclidean clustering and iterative neighbor searching, and the technical route is as shown in Figure 1 .

[0091] 1.1. Coarse clustering segmentation

[0092] 1.1.1. Three-dimensional gridding

[0093] The point cloud data is spatially divided by voxels, and a three-dimensional grid index I(r, c, l) is established for the blocked point cloud to determine the spatial topological relationship. For any three-dimensional point (x i ,y i ,z i ), the calculation formula of the three-dimensional grid index is:

[0094]

[0095]

[0096]

[0097] In formula (1) to (3), math.floor is a down-rounding function, L is a voxel side length, r, c, and l are row, column, and layer numbers of a grid where a point is located, x min , y min , and z min are minimum values of the point cloud in X, Y, and Z directions; and the three-dimensional gridding effect in this embodiment is shown in Figure 2 .

[0098] 1.1.2 Breadth-first search

[0099] The three-dimensional grid records the elevation range of the point cloud, wherein the grid with the minimum elevation value contains the point cloud at the bottom of the object, and the grid is referred to as a starting grid. In this embodiment, the starting grid is used as a basis to perform a breadth-first search on the six-neighborhood of the three-dimensional grid index to separate single objects and connected objects, and the algorithm flow is as follows:

[0100] 1) Perform a four-neighborhood search on the XOY plane for each starting grid, remove the other starting grids found in the search, and make each starting grid not connected to each other;

[0101] 2) Create an open queue and a closed queue, and press a starting grid into the open queue;

[0102] 3) Perform a six-neighborhood search on the first element in the open queue, obtain the neighboring grids in the six directions of up, down, left, right, front, and back, for each neighboring grid, if there is a three-dimensional grid index, it is not in the closed queue and not in the open queue, press the grid into the open queue, and after all the neighboring grids are processed, move the first element in the open queue into the closed queue;

[0103] 4) Repeat step 3 until the open queue is empty, at this time, the closed queue represents a connected space composed of a plurality of three-dimensional grid indexes, and the point cloud in the space is regarded as a clustering object;

[0104] 5) Repeat steps 2-4 to coarsely segment the point cloud data into a plurality of clustering objects. Traverse the three-dimensional grid index of each object, and for an object with only a single starting grid, output the point cloud corresponding to the grid as a clustering result; if the number of starting grids is not less than 2, it is regarded as a connected object, and the corresponding point cloud is retained for subsequent processing.

[0105] 1.2 Euclidean clustering

[0106] Euclidean clustering is a clustering algorithm based on Euclidean distance, which is suitable for irregular region segmentation. Euclidean clustering is an algorithm for generating clusters according to distance values. If the distance from a neighbor point to P is less than the search threshold, the neighbor point and P belong to the same cluster. The algorithm process is shown in Table 1. Specifically, a point P in the point cloud is marked, the KD-Tree structure is used to query the nearest n points from P, the points with a distance less than the search threshold (i.e. the cluster radius threshold) T E are marked and stored in class Q. Then, a point in Q that is not used for searching is selected as a new point P, and the process is repeated until no new point is added to class Q, and a cluster is completed. Repeat the above process until all points in the point cloud are marked, and the point cloud completes Euclidean clustering.

[0107] Table 1 Euclidean clustering pseudo code

[0108]

[0109] The point cloud data containing various ground objects is collected using the same laser scanner. The minimum distance between most points is near the average distance between points . To ensure that the Euclidean clustering result does not contain scattered points, twice the value of is taken as the search threshold T E of Euclidean clustering. The calculation formula is:

[0110]

[0111] In equation (4), the function math.dis calculates the Euclidean distance between two points, and the function math.min returns the minimum value in the sequence. Euclidean clustering is performed on the point cloud of connected ground objects to obtain several complete shape coarse clustering point clouds.

[0112] 1.3 Multi-segment neighbor search

[0113] 1.3.1 Initial clustering and ground object classification

[0114] The point cloud centroid is a hypothetical point where all points tend to concentrate, and its coordinate value is the average of all point coordinates. From the point cloud of connected ground objects, select n starting grid points, calculate the centroid of each, and take it as the approximate bottom center O i (x i ,y i ,z i )(i=1,2,…,n) of each independent ground object after clustering. Calculate the Euclidean distance D from O i to each point in the point cloud of connected ground objects. The coarse clustering point cloud corresponding to the point with the smallest D value is the starting clustering point cloud.

[0115] The experiment shows that the roadside ground objects on both sides of the road often have a connected phenomenon, which are street trees, street lamps, and signs. According to the two parameters of the initial clustering point number and the height of the ground object, the initial clustering ground object type is preset. Among them, the initial clustering point number of shrub ground objects is relatively large; the height of tree ground objects is relatively high, but due to the shelter of branches and leaves, the initial clustering point number is relatively small; the initial clustering point number of street lamps and signs is relatively large and the height is relatively high. In addition, due to the limitation of the vehicle-mounted LiDAR collection environment, the data of the top of the ground object may be missing. In this embodiment, the original point cloud is projected onto the XOY plane, and all points within the range near the initial centroid are marked along the data collection direction, and the point with the maximum height is taken as the approximate height of the ground object.

[0116] 1.3.2 Nearest neighbor search

[0117] To determine the nearest neighbor of two point clouds, one method is to calculate the Euclidean distance D Ai (i = 1, 2, …, n) of a point P Bj (j = 1, 2, …, m) in point cloud A to point P ij (j = 1, 2, …, m) in point cloud B, and if D ij value is less than the nearest neighbor threshold T near , it can be determined that point cloud A is the nearest neighbor of point cloud B, and the two can be merged into the same point cloud. Based on this idea, the nearest neighbor search algorithm is designed as follows:

[0118] 1) Select a certain coarse clustering point cloud, calculate the Euclidean distance D i (i = 1, 2, …, n) of its centroid to n points in a certain initial clustering;

[0119] 2) Repeat step 1 until all initial clusterings are traversed, and the minimum Euclidean distance D i value is D min , and the corresponding initial clustering is recorded, when D min is less than the threshold T near , the point cloud is pressed into class Q;

[0120] 3) Repeat step 2 until all coarse clustering point clouds are traversed, when there is no point cloud in class Q, increase the threshold T near ( Figure 4a , Figure 4b ); when there is a point cloud in class Q, store it in the corresponding initial clustering, and set T near as the initial value ( Figure 4b , Figure 4c );

[0121] 4) Repeat step 3 until all coarse clustering point clouds are stored in the initial clustering, if T near is too large (more than 20 times the initial value), end the run.

[0122] 1.3.3 Adaptive threshold setting ​

[0123] The neighbor search algorithm can ensure that the initial clustering point cloud is gradually aggregated with the coarse clustering point cloud, but if the initial clustering neighbor of a certain feature does not exist, directly using the neighbor search algorithm will make the clustering result of the feature only include the initial clustering, and other features will have the phenomenon of over-segmentation. To avoid this phenomenon, the main threshold T main and the farthest aggregation threshold T max are introduced to perform two neighbor searches, first to generate a clustering main body from the initial clustering, and then to obtain a clustering segmentation object from the clustering main body. main The initial clustering is only aggregated within a certain range of coarse clustering point clouds, so that the ratio of the outer envelope cube volume of each clustering main body to the ideal clustering result is roughly the same. max The farthest distance of the clustering main body from the aggregated neighbor point cloud is represented, and in the aggregation process, the edge point cloud of a sparse feature may be aggregated by a neighbor dense feature first. Different T max can affect the size of the clustering result, effectively avoiding such over-segmentation phenomenon. To determine the T main and T max values of each type of feature, the point cloud with the smallest outer envelope cube volume of the same type of feature is selected from the clustering result of a single feature, the farthest distance D max between the points in the XOY plane is calculated, and D max is taken as the T main and T max values of the same type of feature in proportion.

[0124]

[0125] In formula (5), the function math.max returns the maximum value in the sequence; the function math.disXY projects two points onto the XOY plane and calculates the Euclidean distance between the two projected points; for the projection of the point cloud on the horizontal plane, D max is represented as the diameter of its minimum covering circle.

[0126] The above two thresholds are added as judgment conditions, and the coarse clustering point cloud is executed twice with different conditions in the neighbor search. In the first neighbor search, after step 1 of 1.3.2 is executed, if the distance from the centroid of the coarse clustering point cloud to the initial centroid is greater than T main , D i is discarded to limit the size of the clustering main body. In the second neighbor search, after step 1 of 1.3.2 is executed, if D i is greater than T max , D i is discarded. This condition can avoid the edge point cloud of a sparse point cloud being mistakenly assigned to a neighbor feature. Executing the above multi-section neighbor search can cluster and segment connected features into multiple independent features.

[0127] The ideal threshold values of different connected objects are different. To reduce the manual intervention in setting the threshold values, the following algorithm is designed to set the threshold value T main , T max After setting the initial value, the algorithm is adaptive to different types of objects:

[0128] (1) Perform multi-section neighbor search. For the n cluster objects of the same connected object, calculate the volume V m of the outer envelope cube of the cluster object r , and record the ratio R of V m and V r .

[0129] (2) Take the maximum value of R as R max . If there is

[0130] R i ∈[R max - σ,R max ],i=1,…,n (6)

[0131] Output the clustering result and end the program, where σ is any positive number. Otherwise, perform step 3.

[0132] (3) Record the ratio R' of V m and V r in the last round. If it is the first round, the value is zero. Perform the following three cases: ① Select the object that does not satisfy formula (6). If R ≥ R', the cluster object still needs to be increased to improve the aggregation speed, and increase the object T main ; ② Select the object that does not satisfy formula (6). If R < R', the cluster result has a large increase, indicating that the object has aggregated other object point clouds, and decrease the object T main and T max ; ③ If there are unaggregated coarse cluster point clouds, increase T max of all cluster objects.

[0133] (4) Clear the clustering result of this round and repeat steps 1 and 2.

[0134] 2 Experimental analysis

[0135] 2.1 Experimental data and environment

[0136] To verify the effectiveness of the algorithm, the algorithm is implemented using VC++ language, and the point cloud data collected by the SSW-3 vehicle-mounted laser scanning system is used for experimental verification. The collection setting point frequency is 500 kHz, the rotation speed is 100 r / s, the scanning interval is 0.02 m, the scanning distance is 150 m, and the scanning is along the two sides of the road. The experimental area is as follows Figure 5As shown, the point cloud data for this area was collected on December 30, 2019. The experimental area is located on a section of Kaixuan Road near the south gate of Henan Polytechnic University in Jiaozuo City, Henan Province, with a total length of 562m. The scene mainly includes buildings, streetlights, roadside trees, low shrubs, vehicles, utility poles, road traffic signs and other features.

[0137] 2.2 Data Preprocessing

[0138] The clustering segmentation targets roadside objects such as streetlights, roadside trees, and signs within a certain width on both sides of the road, excluding the segmentation of ground point clouds and buildings. CloudCompare software was used to preserve the main experimental region, and then a cloth-based simulated filtering algorithm was used to filter out ground points. The generated experimental data has an elevation span of 11.88m, contains 2,094,941 points, and has an average distance of 0.059m between points. The results are as follows: Figure 6 As shown, the dataset is projected onto the XOY plane and divided into unit grids. By counting the number of outer envelope grids at the projected points, the scanned area of ​​the data is approximately obtained as 3786m². 2 The point cloud density is 553 points / m². 2 .

[0139] 2.3 Experimental Results

[0140] After the original point cloud preprocessing is completed, the point cloud is 3D gridded. The voxel side length L is set to 1m according to equations (1) to (3), and a 3D grid index with 546*125*24 rows, columns and layers is constructed. Based on the starting grid, the input point cloud is coarsely divided into single ground features and connected ground features by breadth-first search algorithm. Figure 7a Then, Euclidean clustering is performed on the point clouds of connected features, searching for a threshold T. E Set to 0.12m, the grid is segmented to obtain several coarsely clustered point clouds with complete outlines. The approximate bottom centers of each feature are obtained from the initial grid, and the nearest coarsely clustered point cloud is selected as the initial cluster. Figure 7b ); Classify land features based on the initial number of cluster points and the height of land features, and give the initial value of the clustering threshold (Table 2) according to the point cloud nearest neighbor reference value and formula (5), and set the value of σ to 0.2; Perform the first nearest neighbor search to generate the cluster body ( Figure 7c Perform a second nearest neighbor search to progressively aggregate the remaining coarse clustered point clouds. If the generated clustering results do not satisfy equation (6), adaptively adjust the threshold T. main and T max And re-execute the multi-stage nearest neighbor search until the final clustering result is obtained. Figure 7d ).

[0141] Table 2 Initial values ​​of clustering thresholds in various regions

[0142]

[0143] 2.4 Precision analysis

[0144] To verify the effectiveness of the MCSA algorithm, the current representative K-Means clustering algorithm, DBSCAN algorithm and the algorithm of the embodiment are selected for comparative analysis, and the clustering results of the three algorithms are quantitatively evaluated by right draw ratio (RDP). The definition of RDP is shown in formula (7). The clustering results of the three algorithms are shown in FIG. 6. Figure 8a to Figure 8c

[0145]

[0146] In formula (7), u is the correct segmentation number, and v is the incorrect segmentation number.

[0147] The clustering data of each algorithm is summarized in Table 3. The RDP of the MCSA algorithm for street trees is 87.0%, and the RDP for street lamps and signposts is 91.9%. The overall segmentation accuracy is better than that of the K-Means algorithm and the DBSCAN algorithm. Over-segmentation phenomenon exists in the clustering results of the three algorithms. Figure 9a to Figure 9c The willow tree has a scattered crown and overlapping branches and leaves, and the point cloud of the trunk part is relatively complete, but the crown data is concentrated on the outer edge of the object and on the side far from the collection path, and the internal data is often missing. When using the K-Means algorithm to process this type of object, because the willow crown is large, there may be multiple initial clustering centers for the same object, resulting in multiple segmentation objects being output; the DBSCAN algorithm randomly selects a seed point, and outputs all points with density reachable to the seed point as a cluster, resulting in many under-segmented connected trees in the clustering result, and some suspended dense discrete points are also output as segmentation objects. Compared with the above, the MCSA algorithm uses the centroid of the object bottom point cloud as the clustering seed point in the coarse segmentation stage, avoiding multiple segmentation of the same object, and ensuring that the discrete points on the edge of the object can be aggregated into the nearby point cloud by the near neighbor search.

[0148] Table 3 Segmentation accuracy evaluation

[0149]

[0150] The clustering results of the MCSA algorithm still have a small amount of over-segmentation and under-segmentation phenomenon, and the reasons are as follows:

[0151] 1) For the partially overlapping area of shrub objects and tree objects, the low plant has strong overall connectivity, and the aggregation process from the clustering main body to the segmentation object is faster, which often aggregates the edge point cloud of the tree object first. By increasing the initial value of the main body threshold T main of the tree object, the aggregation speed of the two types of objects is consistent, and this type of over-segmentation phenomenon is reduced;

[0152] ​2) When performing breadth-first search, the bottom of two ground objects is merged due to near neighbors, resulting in only one seed point being used for clustering in the clustering process Figure 7d In the lower right corner, two adjacent streetlights are clustered into the same ground object, and the use of smaller edge length L voxels for three-dimensional gridding can reduce this type of under-segmentation phenomenon;

[0153] 3) In the near neighbor search, due to the lack of point cloud in the middle of the tree crown of the tree class ground object, the edge and suspended point cloud originally belonging to the ground object is aggregated by the shrub class ground object, which can reduce this type of over-segmentation phenomenon by adjusting the farthest aggregation threshold T max of the shrub class ground object.

[0154] In order to test the clustering quality of the MCSA algorithm, the compactness (CP) and separation (SP) indicators are used to evaluate the clustering results of the MCSA algorithm.

[0155]

[0156]

[0157] In equations (8) and (9), Ω is the total number of points in the cluster, w is the cluster center of the cluster, x is a point in the cluster, and K is the total number of clusters. The CP value of the clustering result obtained by the MCSA algorithm is 1.798m, and the SP value is 191.696m. From the 20 clusters, as shown in Table 4.

[0158] Table 4 Partial clustering quality evaluation

[0159]

[0160]

[0161] 3 Conclusion

[0162] The Euclidean clustering algorithm can segment point clouds into several contour-complete clusters, and the near neighbor search algorithm can gradually aggregate near neighbor point clouds. This embodiment combines the features of the two algorithms and proposes a multi-stage algorithm that only requires three-dimensional coordinates of point clouds to complete the clustering and segmentation of road scene point clouds. The experimental results show that the correct extraction rate of the algorithm for street trees is 87.0%, and the correct extraction rate for streetlights and signs is 91.9%, both achieving effective extraction with less over-segmentation / under-segmentation phenomenon; the clustering results of connected ground objects still have complete edge contours.

Claims

1. A multi-stage clustering and segmentation algorithm for roadside objects based on vehicle-mounted LiDAR point clouds, characterized in that, Includes the following steps: Step (1): Perform data preprocessing on the vehicle-mounted LiDAR point cloud data to obtain point cloud data of roadside objects; Step (2): Perform three-dimensional gridding and breadth-first search on the roadside ground object point cloud data in sequence to achieve coarse clustering and segmentation of the roadside ground object point cloud data; the coarse clustering segmentation yields individual ground object point clouds and connected ground object point clouds, and the individual ground object point clouds are directly output as the roadside ground object clustering results. Step (3): Perform Euclidean clustering on the connected ground feature point clouds to divide them into coarse cluster point cloud sets with complete boundaries; Step (4): Preset the land cover type and classify the land cover. Based on the land cover classification, give an initial value for the clustering threshold. Use multi-segment nearest neighbor search to gradually aggregate all clustered objects of the coarse cluster point cloud. Evaluate the aggregation speed of each point cloud and adaptively adjust the clustering threshold until the aggregation speed of the point cloud of all clustered objects is similar. Output the clustering results of connected land cover to complete the clustering and segmentation of roadside land cover. The specific algorithm for step (4) is as follows: Step (4-1): Obtain the approximate bottom center of each feature from the initial grid, and select the nearest coarse cluster point cloud as the initial cluster point cloud; Step (4-2): Classify land features based on the initial number of cluster points and feature height; Step (4-3): Perform a nearest neighbor search of connected ground feature point clouds; Step (4-4): Evaluate the aggregation speed of each connected feature point cloud; if the aggregation speeds of each connected feature point cloud are similar, output the connected feature clustering results; otherwise, adaptively adjust the main threshold. T main and farthest aggregation threshold T max Then perform a nearest neighbor search again until the aggregation speed of the point clouds of each connected feature is similar, and output the clustering results of the connected features; To determine the main threshold of various land features T main and farthest aggregation threshold T max From the clustering results of individual land features, select the point cloud with the smallest outer envelope cube volume for each type of land feature, and calculate its value in... XOY farthest distance between points on a plane D max and take proportionally D max Value as this type of land feature T main and T max Value; the specific calculation formula is as follows: (5); In equation (5), the function Returns the maximum value in a sequence; function Project the two points onto XOY For a plane, calculate the Euclidean distance between two projected points; for a point cloud projected onto a horizontal plane, D max It is represented by the diameter of its smallest covering circle.

2. The multi-stage clustering and segmentation algorithm for roadside objects based on vehicle-mounted LiDAR point clouds according to claim 1, characterized in that, In step (2), during the 3D gridding, the point cloud data of roadside objects is spatially divided using voxels to obtain block point clouds; 3D grid index for segmented point clouds I ( r,c,l To determine its spatial topological relationships; For any three-dimensional point ( x i ,y i ,z i Its three-dimensional grid index I ( r,c,l The formula for calculating ) is: (1); (2); (3); In equations (1) to (3), This is the floor function. L Let the voxel side length be , r、c、l These represent the row, column, and layer number of the grid where the point is located. , , For point clouds X, Y, Z Minimum value in the direction.

3. The multi-stage clustering and segmentation algorithm for roadside objects based on vehicle-mounted LiDAR point clouds according to claim 1, characterized in that, In step (2), a breadth-first search is performed on the 3D grid index using the initial grid after 3D gridding. The breadth-first search algorithm includes the following steps: Step (2-1): Perform the following steps on each starting grid. XOY A four-neighbor search on the plane removes other starting grids found in the search, making each starting grid disconnected from the others; Step (2-2): Create an open queue and a close queue, and push a starting grid into the open queue; Steps (2-3): Perform a six-neighbor search on the first element in the open queue to obtain its nearest neighbor grids in the six directions of up, down, left, right, front, and back; for each nearest neighbor grid, if a three-dimensional grid index exists and it is not in the closed queue or the open queue, push the grid into the open queue; after all the nearest neighbor grids have been processed, move the first element in the open queue into the closed queue. Steps (2-4) and (2-3) are repeated until the open queue is empty. At this point, the closed queue is represented as a connected space composed of three-dimensional grid indexes, and the point cloud in this space is regarded as a cluster object. Steps (2-5) and (2-2) to (2-4) are repeated to coarsely divide the point cloud data into two or more cluster objects. The 3D grid index of each object is traversed. For objects with only a single starting grid, the point cloud corresponding to the grid is output as a separate feature clustering result. If the number of starting grids is greater than or equal to 2, they are considered as connected feature point clouds.

4. The multi-stage clustering and segmentation algorithm for roadside objects based on vehicle-mounted LiDAR point clouds according to claim 1, characterized in that, In step (3), the Euclidean clustering algorithm process is as follows: Step (3-1): Mark a point in the connected ground feature point cloud. P ; Utilizing the KD-Tree structure for nearest neighbor lookup P Recent n For each point, the distance is less than the search threshold. T E Mark the points and store them in the class Q middle; Step (3-2), from class Q Select a point that was not used in the search as a new point. P Using KD-Tree structure for nearest neighbor lookup P Recent n For each point, the distance is less than the search threshold. T E Mark the points and store them in the class Q middle; Step (3-3), repeat step (3-2) until class Q If no new points are added, then a clustering is complete; Step (3-4) and repeat steps (3-1) to (3-3) until all points in the connected feature point cloud are marked, thus completing Euclidean clustering.

5. The multi-stage clustering and segmentation algorithm for roadside objects based on vehicle-mounted LiDAR point clouds according to claim 4, characterized in that, Average distance between midpoints of connected ground feature point clouds Twice as the Euclidean clustering search threshold T E Average distance between points The calculation formula is: (4); In equation (4), the function Calculate the Euclidean distance between two points using the function Return the minimum value in the sequence. d i This represents the minimum distance between points.

6. The multi-stage clustering and segmentation algorithm for roadside objects based on vehicle-mounted LiDAR point clouds according to claim 1, characterized in that, In step (4-1), the initial clustered point cloud is calculated as follows: select from the connected feature point cloud. n For each starting grid, the centroid of the point cloud is calculated. The centroid is used as the approximate bottom center of each independent land cover after clustering. O i ( x i , y i , z i ), i =1,2,…, n ; calculate O i Euclidean distance to each point in the connected feature point cloud D , D The coarse cluster point cloud corresponding to the point with the smallest value is used as the starting cluster point cloud; Step (4-2), the method for land feature classification is as follows: the initial cluster with a large number of initial cluster points and low land feature height is shrubland; the initial cluster with a small number of initial cluster points and high land feature height is treeland; the initial cluster with a large number of initial cluster points and high land feature height is street light or sign.

7. The multi-stage clustering and segmentation algorithm for roadside objects based on vehicle-mounted LiDAR point clouds according to claim 1, characterized in that, The algorithm flow for nearest neighbor search of connected ground feature point clouds in step (4-3) is as follows: Step (4-31): Select a coarse cluster point cloud and calculate its centroid to a certain initial cluster. n Euclidean distance of points D i , i =1,2,…, n If the distance from the centroid of the coarse cluster point cloud to the centroid of the initial cluster is greater than the main threshold. T main Then discard the Euclidean distance. D i ; Step (4-32) is repeated, followed by step (4-31), until all initial clusters are traversed and the required Euclidean distance is achieved. D i The smallest of the values ​​is denoted as D min And record the corresponding initial clustering, when D min Less than the nearest neighbor threshold T near At that time, the point cloud was pressed into a class Q ; Step (4-33), repeat step (4-32) until all coarse clustered point clouds have been traversed, when the class Q There are no point clouds in the middle, so increase the nearest neighbor threshold. T near When class Q If there is a point cloud, store it in the corresponding initial cluster and set a nearest neighbor threshold. T near Set as the initial value; Step (4-34), repeat step (4-33) until all coarse clustered point clouds are stored in the initial cluster, if the nearest neighbor threshold is reached. T near If the value is greater than 20 times the initial value, the process will terminate. Steps (4-35) and (4-31) are modified as follows: Select a coarse cluster point cloud and calculate its centroid to a certain initial cluster. n Euclidean distance of points D i , i =1,2,…, n ;like D i Greater than the furthest aggregation threshold T max Then discard the Euclidean distance. D i ; Step (4-36) is repeated with step (4-34) to complete the nearest neighbor search of connected ground feature point clouds.

8. The multi-stage clustering and segmentation algorithm for roadside objects based on vehicle-mounted LiDAR point clouds according to claim 1, characterized in that, In step (4-4), the subject threshold is adaptively adjusted. T main and farthest aggregation threshold T max The algorithm flow is as follows: Step (4-41): Perform multi-segment nearest neighbor search; for the same connected features... n For each cluster object, calculate the volume of the outer envelope cube of its cluster body. V m The outer envelope cube volume of the clustering results V r and record V m and V r ratio R ; Step (4-42), take R The maximum value is R max If there is: (6); Output the clustering results and end the program, where If it is any positive number; otherwise, proceed to step (4-43). Step (4-43), record the previous round V m and V r The ratio is R' If this is the first round, then R' The value is zero; Select objects that do not satisfy equation (6), if R ≥ R' Therefore, the number of clustering entities still needs to be increased to improve the aggregation speed, and the threshold of the entity needs to be increased. T main ; Select objects that do not satisfy equation (6), if R < R' If the clustering results show a significant increase, it indicates that the feature has aggregated the point clouds of other features beforehand, thus reducing the subject threshold of the object. T main and farthest aggregation threshold T max ; ③ If there are coarsely clustered point clouds that have not been aggregated, increase the furthest aggregation threshold for all clustered objects. T max ; Step (4-44): Clear the clustering results of this round and repeat steps (4-41) and (4-42).