Disclosure of Invention
In order to solve the defects of the prior art, the present disclosure provides a method and a system for identifying obstacles based on 3D laser point cloud, which effectively improve the real-time performance of ground segmentation and point cloud clustering, and improve the accuracy of identifying obstacles at a far distance.
In order to achieve the above purpose, the present disclosure adopts the following technical scheme:
the first aspect of the present disclosure provides a method for identifying an obstacle based on a 3D laser point cloud.
An obstacle identification method based on 3D laser point cloud comprises the following steps:
acquiring laser point cloud data of a three-dimensional environment;
performing ground segmentation processing on the three-dimensional environment laser point cloud data to obtain non-ground laser point cloud data;
partitioning non-ground laser point cloud data, and marking obstacles of each partition by utilizing two-dimensional European clustering;
and (5) packaging the clustering result by using a cuboid model to obtain the position and the size of the obstacle.
A second aspect of the present disclosure provides an obstacle recognition system based on a 3D laser point cloud.
An obstacle recognition system based on a 3D laser point cloud, comprising:
a data acquisition module configured to: acquiring laser point cloud data of a three-dimensional environment;
a point cloud processing module configured to: performing ground segmentation processing on the three-dimensional environment laser point cloud data to obtain non-ground laser point cloud data;
a point cloud clustering module configured to: partitioning non-ground laser point cloud data, and marking obstacles of each partition by utilizing two-dimensional European clustering;
an obstacle recognition module configured to: and (5) packaging the clustering result by using a cuboid model to obtain the position and the size of the obstacle.
A third aspect of the present disclosure provides a computer-readable storage medium having stored thereon a program which, when executed by a processor, implements the steps in the 3D laser point cloud based obstacle identification method according to the first aspect of the present disclosure.
A fourth aspect of the present disclosure provides an electronic device comprising a memory, a processor and a program stored on the memory and executable on the processor, the processor implementing the steps in the 3D laser point cloud based obstacle identification method according to the first aspect of the present disclosure when the program is executed.
Compared with the prior art, the beneficial effects of the present disclosure are:
1. according to the method, the system, the medium or the electronic equipment, the point cloud is subjected to downsampling pretreatment through the voxel filter based on the radar initial position, so that the point cloud processing efficiency is effectively improved.
2. According to the method, the system, the medium or the electronic equipment, through the circumferential and radial double partition of the point cloud, the searching range of the point cloud in ground segmentation is reduced, and the point cloud segmentation efficiency is effectively improved.
3. According to the method, the system, the medium or the electronic equipment, real-time ground segmentation is realized by utilizing the relative height threshold value obtained by calculating the horizontal distance between two adjacent points in the circumferential area and the global height threshold value of the current point relative to the radar, and complete non-ground laser point cloud information is obtained.
4. According to the method, the system, the medium or the electronic equipment, the clustering point clouds are segmented into radial different distance segments, different clustering parameter thresholds are set in each region, the searching range of the point clouds during clustering is reduced, and the clustering efficiency is effectively improved.
5. According to the method, the system, the medium or the electronic equipment, the Z value of the clustering point cloud is set to be 0, then the three-dimensional point cloud information is converted into the two-dimensional point cloud information on the horizontal plane, the two-dimensional KDTree is created, the distance calculation amount between two points is reduced, and the point cloud calculation rate is effectively improved.
6. According to the method, the system, the medium or the electronic equipment, the clustered point cloud information is utilized to obtain the maximum and minimum X, Y and Z values corresponding to the clustered point cloud information, the pose of the obstacle relative to the radar is obtained through the average value of each type of point cloud X, Y and Z, and the obstacle is subjected to visual packaging processing by adopting a cuboid model, so that the accurate detection and identification of the obstacle are realized.
Detailed Description
The disclosure is further described below with reference to the drawings and examples.
It should be noted that the following detailed description is illustrative and is intended to provide further explanation of the present disclosure. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs.
It is noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of exemplary embodiments in accordance with the present disclosure. As used herein, the singular is also intended to include the plural unless the context clearly indicates otherwise, and furthermore, it is to be understood that the terms "comprises" and/or "comprising" when used in this specification are taken to specify the presence of stated features, steps, operations, devices, components, and/or combinations thereof.
Embodiments of the present disclosure and features of embodiments may be combined with each other without conflict.
Example 1:
as shown in fig. 1, embodiment 1 of the present disclosure provides an obstacle identifying method based on a 3D laser point cloud, including the following processes:
s1: acquiring three-dimensional environment laser point cloud data, and performing preprocessing, circumferential and radial rasterization processing based on the three-dimensional environment laser point cloud data to realize efficient real-time ground segmentation;
s2: the segmented non-ground laser point cloud is processed, and obstacle marking of each region is realized by utilizing two-dimensional European clustering;
s3: the clusters are subjected to visual encapsulation processing through the cuboid model, so that the positions and the sizes of the barriers are obtained, and the accurate recognition of the barriers is realized.
S1, specifically comprises:
s1.1: acquiring original point cloud data of a three-dimensional environment by utilizing a multi-line laser radar, wherein the number of the point clouds is very large, so that under the condition of not losing environment information, voxel downsampling with proper parameters is adopted to preprocess the original point clouds, and the subsequent processing efficiency of the point cloud data is improved; based on different environments, setting maximum and minimum point cloud height thresholds which are adaptive to the environments, and removing point clouds which are higher than the radar or lower than the bottom surface of the initial radar by a certain distance; setting maximum and minimum point cloud radius thresholds which are suitable for the environment, removing point clouds with a certain distance and a longer distance around the radar, reducing the calculated amount of the subsequent steps, and reserving the point cloud information of a useful area.
Lei Dadian cloud data processing schematic diagram, as shown in FIG. 2, wherein R 0 -R 3 Representing distance (increasing trend) from radar, R is horizontal radius, θ is horizontal angle, θ i For the circumferential zone number, γ is the elevation of the point, and P (X, Y, Z) is any point (belonging to N i Region).
S1.2: the radar circumferential resolution and the radar radial resolution are utilized to grid the point cloud, the point cloud is divided into N areas, all the point clouds are traversed, and the horizontal radius, the included angle, the radial area and the circumferential area of each point cloud are calculated according to the following formula:
where r_num is a radial region eigenvalue, θ_num is a circumferential region eigenvalue (the result is rounded down), m_pi is 57.3 °, θ_precision is a circumferential resolution (radar built-in), and r_precision is a radial resolution.
Packaging and storing the processed point clouds, and sorting the radial distance of the point clouds of each circumferential area;
traversing all point clouds of each circumferential area, calculating distance values of a current point and an upper point in a horizontal plane, calculating a relative height threshold value of the current point by using gradient threshold values between adjacent points, setting the height threshold value as a given minimum height threshold value if the height threshold value is small due to the fact that the distance between the two points is relatively short, and calculating a global height threshold value by using the radius of the current point and the gradient threshold value of the ground at a position of a distance radar;
judging whether the vertical measured value of the current point is in the neighborhood range of the relative height threshold value of the previous point, if so, judging whether the previous point is a ground point, if not, and if so, judging that the vertical measured value of the current point is in the neighborhood range of the global height threshold value relative to the ground where the radar is located, and if not, judging that the current point is a ground point, otherwise, judging that the current point is a non-ground point;
if the previous point is a ground point, the current point is a ground point; if the measured value of the vertical direction of the current point is not in the neighborhood range of the threshold value of the relative height of the previous point, judging whether the distance value of the current point relative to the previous point is larger than the set maximum distance threshold value and whether the vertical height of the current point is in the neighborhood range of the threshold value of the height of the current point relative to the initial ground, if the measured value of the vertical direction of the current point is larger than the preset maximum distance threshold value, judging that the current point is a ground point if the measured value of the vertical direction of the current point is in the neighborhood range of the threshold value, otherwise, judging that the current point is a non-ground point.
S1.3: and respectively packaging and storing the ground points and the non-ground points, and storing the point cloud indexes of the ground points and the non-ground points for subsequent point cloud clustering.
As shown in fig. 3, the ground segmentation flow chart is shown, in which h_max and h_min are maximum and minimum height thresholds, r_max and r_min are maximum and minimum radius thresholds, r_num is a radial region feature value, θ_num is a circumferential region feature value, distance is a difference in horizontal Distance between a current point and a previous point, h_t is a relative height threshold of the current point and the previous point, h_min_t is a minimum height threshold, pre_z is a vertical measurement value (Z coordinate) of the previous point, distance_max is a maximum Distance threshold of two adjacent points, and hg_t is a global height threshold of the current point and the initial ground.
S2, specifically comprises the following steps:
partitioning the non-ground laser point cloud, and improving the calculation efficiency in the clustering process;
removing point clouds larger than the set maximum distance threshold, partitioning the rest point clouds by utilizing different distances of the range radars, setting region segments which are suitable for the range clouds according to the environment and the point cloud clustering effect and the horizontal distance, setting the suitable clustering distance, the maximum and minimum clustering point number threshold in each region segment, and storing the point clouds of each region into corresponding queues.
The Z values of the point clouds are set to be 0, namely, the dimension of the point clouds of each area is reduced, so that the point clouds only have horizontal direction information, and the calculated amount of the distance during clustering is greatly reduced; then, creating a two-dimensional KDTree of the point cloud to realize nearest neighbor search of a two-dimensional space; and finally, inputting the segmented non-ground laser point cloud, performing nearest neighbor search on the point cloud by utilizing European clustering to realize classification marking of the object point cloud, and finally, storing indexes before dimension reduction of each type of point cloud of the clustering result into corresponding queues.
The flow chart of non-ground point clustering is shown in fig. 4, wherein R is the horizontal radius of the point, cluster_R_MAX is the maximum radius of the Cluster, N is the number of divided areas, and R i Is the lower limit value of the ith region, R i+1 An upper limit value of the ith region, R j For the horizontal radius value of the j-th point, indeX [ i ]]indeX X is the point cloud indeX queue of the ith area, points_Num is the point cloud quantity, and C_threshold [ i ]]For the i-th region cluster distance threshold, min_Num [ i ]]For the i-th region cluster minimum number, maX _Num [ i ]]The maximum number is clustered for the i-th region.
S3, specifically comprising:
acquiring clustered point cloud information, respectively comparing X, Y with Z values in each class, and screening out the maximum and minimum values of X, Y and Z in each class; then, constructing a cuboid model by using the six values, carrying out visual packaging processing on the clusters to obtain a space cuboid containing the point clouds in real time, obtaining the maximum length, the width and the height of the obstacle through the difference value of the maximum and minimum values of X, Y and Z, respectively solving the average value of X, Y and Z of the point clouds as the position of the obstacle, and finally obtaining the pose of the obstacle by using the position information to realize the accurate identification of the obstacle.
As shown in FIG. 4, the Cluster visualization packaging process flow is shown, wherein Cluster_Num is the number of categories of the clustering result, X_Max [ i ] are the maximum and minimum values of the ith clustering point in the X direction, Y_Max [ i ] are the maximum and minimum values of the ith clustering point in the Y direction, Z_Max [ i ] are the maximum and minimum values of the ith clustering point in the Z direction, and L, W and H are the length, width and height of a cuboid respectively.
Example 2:
embodiment 2 of the present disclosure provides an obstacle recognition system based on a 3D laser point cloud, including:
a data acquisition module configured to: acquiring laser point cloud data of a three-dimensional environment;
a point cloud processing module configured to: performing ground segmentation processing on the three-dimensional environment laser point cloud data to obtain non-ground laser point cloud data;
a point cloud clustering module configured to: partitioning non-ground laser point cloud data, and marking obstacles of each partition by utilizing two-dimensional European clustering;
an obstacle recognition module configured to: and (5) packaging the clustering result by using a cuboid model to obtain the position and the size of the obstacle.
The working method of the system is the same as the obstacle identifying method based on the 3D laser point cloud provided in embodiment 1, and will not be described here again.
Example 3:
embodiment 3 of the present disclosure provides a computer-readable storage medium having stored thereon a program which, when executed by a processor, implements the steps in the 3D laser point cloud-based obstacle recognition method according to embodiment 1 of the present disclosure.
Example 4:
embodiment 4 of the present disclosure provides an electronic device, including a memory, a processor, and a program stored on the memory and executable on the processor, where the processor implements steps in the obstacle identifying method based on 3D laser point clouds according to embodiment 1 of the present disclosure when executing the program.
It will be apparent to those skilled in the art that embodiments of the present disclosure may be provided as a method, system, or computer program product. Accordingly, the present disclosure may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present disclosure may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, magnetic disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present disclosure is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the disclosure. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored on a computer readable storage medium, which when executed may comprise the steps of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random access Memory (Random AccessMemory, RAM), or the like.
The foregoing description of the preferred embodiments of the present disclosure is provided only and not intended to limit the disclosure so that various modifications and changes may be made to the present disclosure by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present disclosure should be included in the protection scope of the present disclosure.