Clustering method for object space closure based on single line data analysis of laser radar
Technical Field
The invention relates to the technical field of vehicle auxiliary driving, in particular to a clustering method for object space closure based on single line data analysis of a laser radar.
Background
Environmental perception is one of the core components of unmanned driving, where the localization and tracking of objects in space is again the most important component. The laser radar widely used at present has quite high precision for detecting characteristic quantities such as target position, speed and the like, and compared with other environment perception modes, the laser radar has quite great advantages.
The laser radar is a radar system that detects a characteristic amount such as a position and a velocity of a target by emitting a laser beam. The working principle is that a detection signal (laser beam) is transmitted to a target, then a received signal (target echo) reflected from the target is compared with the transmitted signal, and after appropriate processing, relevant information of the target, such as target distance, direction, height, speed, posture, even shape and other parameters, can be obtained; the laser radar has the advantages of high resolution, good concealment, strong active interference resistance, good low-altitude detection performance, small volume, light weight and the like.
The process of dividing a set of lidar point clouds in physical space into classes consisting of similar objects is called point cloud clustering. A cluster generated by clustering is a collection of data objects that are similar to objects in the same cluster and different from objects in other clusters, and this collection is considered to be a single individual.
Common clustering algorithms, such as K-Means, mean shift, DBSCAN clustering algorithms, cluster points in a three-dimensional space in one dimension, and calculate the center point of a spatial object; most algorithms track the position of a space object by focusing on the change of point cloud density, and when two objects are too close to each other, the algorithms are easy to classify the two different objects into the same object by mistake; and because the penetrating effect of the laser radar is poor, points on one surface back to the laser radar cannot be captured, the clustering effect is usually only half of that of an actual object, and even clustering contour deviation can occur. The clustering effect is easily influenced by the factors, and the effect is very unstable.
Disclosure of Invention
The invention aims to solve the problems that when two objects are close to each other, point clouds are too dense and a clustering algorithm can mistake the two objects as the same object when the point clouds are clustered based on a laser radar at present, and therefore the invention provides a clustering method with better robustness.
In order to solve the defects of the existing algorithm clustering, the invention provides a method for clustering closed object space based on single line data analysis of a laser radar, which comprises the following steps:
step S1: extracting a single-line point cloud set from the laser radar Velodyne to generate a plurality of groups of data, and then mapping the single-line data of each group onto a two-dimensional plane;
step S2: extracting edge point sets of all objects by using a tangent method for each group of data by using the two-dimensional plane data in the step S1;
step S3: connecting the first and last points of the edge point set of each object, taking the middle point of the connecting line as the center, and performing central symmetry on the point set to complement the edge points on the back of the object to form a closed point cluster; the middle point of the connecting line is the center of the object on the tangent plane, and the area occupied by the closed point ring is the area of the object on the tangent plane;
step S4: and combining the two-dimensional data of all the single line planes, and determining the final accurate positions and the occupied area in the horizontal direction of all the objects in the three-dimensional space.
The key point of the step S1 is to analyze the multiline laser radar message protocol, process the collected multiline laser radar point cloud data into a single line point cloud set, and then map each group of single line point cloud data to a two-dimensional plane.
The step S2 of extracting the edge point sets of all objects by using the tangent method includes the following steps:
S2A, firstly, selecting two similar random scattered point pairs in the laser radar single line point set data;
step S2B, generating a straight line by the connecting point pair, and taking two opposite fan-shaped areas with certain angles and widths in two opposite directions of the straight line;
step S2C: searching points in the two fan-shaped areas in the step S2B, marking the obtained new laser radar point, and considering that the obtained new laser radar point and the two points in the step S2A belong to an edge point set of the same object;
step S2D: repeating steps S2B, S2C until no unmarked points can be found in the sector area described in step S2B;
step S2E: and finally, judging whether the plane two-dimensional point set has unmarked points or not, and if so, repeating the steps S2A, S2B, S2C and S2D.
The step S3 of obtaining the center point and the horizontal area of the object through the set of edge points of the object includes the following steps:
step S3A: a point set approximate to circular arcs can be obtained through the step S2, the horizontal plane of each circular arc represents a tangent plane of an object, two points at the head and the tail of the point set are connected, a connecting line is used as a symmetry axis to be centrosymmetric, points of the plane of the object opposite to the radar direction are complemented, and at this time, a closed point set of the tangent plane of the object can be obtained, the center is marked as O, and the height of the tangent plane is H;
step S3B: using a rotating caliper (rotating cassette) algorithm, the shape W, V of the circumscribed rectangle of the object tangent point set is obtained.
Step S4 is to perform combination iteration on the data between different groups, and when the edge point sets of two objects in different groups overlap by more than 50% in the vertical space, the two pairs of information can be considered to come from different heights of the same object in space, then the center position and the minimum circumscribed square of the object are updated, and the data of different groups are continuously combined in an iteration manner, so as to finally obtain the accurate position and the floor area information in the horizontal direction of the object.
The method is different from a general density-based clustering algorithm, comprehensively considers the appearance factors of the object, and identifies and segments the object through the change of the object contour curve; meanwhile, all the single-line data are combined in the three-dimensional direction, and the influence of uneven density distribution of the object in the vertical direction can be effectively eliminated. Therefore, the method has better robustness for clustering objects with uneven density distribution in the close range and the vertical direction.
Drawings
FIG. 1 is a flow chart of a clustering method for object space closure based on single line data analysis of a laser radar according to the present invention;
FIG. 2 is a schematic diagram of the present invention for obtaining a set of edge points of an object;
FIG. 3 is a clustering diagram according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail below with reference to the following detailed description of the preferred embodiments, such as fig. 1, and with reference to the accompanying drawings.
The invention provides a clustering method for object space closure based on single line data analysis of a laser radar, wherein the number of lines of laser emitted by the laser radar is from 1 to 128, and correspondingly, point cloud data of 1 to 128 lines are obtained through feedback; when the three-dimensional point distribution of the laser radar is directly observed, the single line data of the multi-line laser radar can present an obvious object contour on the outer surface of the object, so that the method is mainly characterized in that the clustering is realized by fitting the external contour of the object through point cloud.
Firstly, all single-line point clouds are extracted from the laser radar Velodyne to generate a plurality of groups of data.
Each set of single line data is mapped onto a two-dimensional plane using only x and y, i.e., (x, y), in three-dimensional point coordinates (x, y, z).
The method for extracting the edge point set of all objects on the two-dimensional plane by using the tangent method comprises the following steps:
S2A, firstly, selecting two most similar random scattered point pairs A and B which are not merged into a point set from single-line point set data on a two-dimensional plane, and classifying the two most similar random scattered point pairs A and B into the point set S as shown in the figure 2;
step S2B, connecting A and B to generate a straight line, taking two opposite fan-shaped areas in two directions of the straight line, taking A and B as vertexes and taking the straight line as a bisector, wherein the angle threshold value and the width of the fan-shaped area are α and L;
step S2C: searching points in the sector area of the step S2B to obtain a point A1 in the A direction and a point B1 in the B direction, classifying the A1 and the B1 into a point set S, and marking the two points;
step S2D: steps S2B, S2C are repeated with A, A1 and B, B1 as two new sets of point pairs until no unlabeled points can be found in the sector area described in step S2B.
Step S2E: and finally, judging whether the two-dimensional plane has unmarked points or not, and if so, repeating the steps S2A, S2B, S2C and S2D.
The obtaining of the center point and the horizontal direction area of the object through the object edge point set, as shown in fig. 3, includes the following steps:
step S3A: a point set approximate to circular arcs can be obtained through the step S2, the horizontal plane of each circular arc represents a tangent plane of an object, the head and the tail points of the circular arc point set are connected, a connecting line is used as a symmetry axis to carry out central symmetry, points of the plane of the object opposite to the radar direction are complemented, and at this time, a closed point set of the tangent plane of the object can be obtained, the center is marked as O, and the height of the tangent plane is H;
H=(H1+H2+...+Hn)/n
step S3B: using a rotating caliper (rotating cassette) algorithm, the shape W, V of the circumscribed rectangle of the object tangent point set is obtained.
The merged single-line planar two-dimensional data determines the final precise position and horizontal occupied area of all objects in three-dimensional space, e.g. O1、W1、V1、H1And O2、W2、V2、H2(the two pairs of information are from different sets) and when more than 50% overlap is present in the vertical space, it is reasonable to believe that the two pairs of information come from different heights of the same object in space, and then update the center position and the smallest circumscribed square of the object, with the updates superimposed.
O=(O1+O2)/2
H=(H1+H2)/2。