Disclosure of Invention
The technical problem is as follows: in order to solve the above problems, an object of the present invention is to provide an adaptive line extraction method based on a laser sensor, so as to improve the efficiency and robustness of line extraction.
The technical solution of the present invention is now described as follows:
the invention relates to a linear characteristic extraction method based on a laser sensor, which improves the efficiency of the method through self-adaptive adjacent point set detection on the basis of a segmentation and combination method, improves the sensitivity of the method to parameters by using a fuzzy segmentation and combination SMF (split-and-merge fuzzy) method to segment segmentation, and finally fits the parameters under each linear polar coordinate system in the environment by using a least square method, and comprises the following steps (see figure 2):
step 1: detecting a neighboring point set;
step 2: segment division;
and step 3: fitting a least square straight line;
and 4, step 4: and calculating the fitting error of the straight line.
The invention further provides a linear feature extraction method based on the laser sensor, which is characterized by comprising the following steps: setting the discrete points of the angle phi and the distance rho at intervals of the angle delta phi as the scanning result of the laser radar; the specific process of detecting the neighboring point set in the step 1 is as follows:
step 1.1: let the continuous laser sensor detect two continuous points as sk-1And skWherein s isk-1Laser beamDistance of sensor is rhok-1Δ l is the distance between two points;
step 1.2: the constant m ' is 5, and the constant Δ l ' is m ' ρk-1And delta phi, if delta l is less than or equal to delta l', the adjacent point set is obtained, otherwise, the adjacent point set is not obtained.
The invention further provides a linear feature extraction method based on the laser sensor, which is characterized by comprising the following steps: the specific process of segment segmentation described in step 2 is as follows (see fig. 3):
step 2.1: let each set of neighboring points contain only one straight line: including all points in the sensor observation data z, the initial straight line numberSetting the generated iteration algebra m to be 1;
step 2.2: updating the number of the mth generation straight line
Step 2.3: inspecting each straight line lk,Whether the variance σ of the straight line parameter is satisfied in the set of neighboring pointsk≤σmaxAnd if not, then:
step 2.3.1: dividing l by fuzzy straight linekPoint in (b) becomes two straight lines l'kAnd l ″)kSimultaneously, making C equal to 2;
step 2.3.2: from l'kAnd l ″)kReplacement of lkAdding to the mixture;
step 2.3.3:
step 2.3.4: go to step 2.2;
step 2.4: selecting straight lines
Step 2.4.1: for every two distinct straight lines laAnd lbAre all considered as candidates for merging;
step 2.4.2: judging whether the coordinate barycenters of the two straight lines are close to each other: step 2.4.3 is performed when approaching, and step is performed when not approaching
Step 2.4.3: the straight line combined by l 'and l' is represented by l ═ l '^ l', and the combined straight line l isfIs ak^laAnd lk^lbMinimum dispersion, while sigma must be satisfiedf≤σmaxUntil no more mergers are possible; wherein the only limiting parameter σmaxGiven by the statistical error of the laser sensor.
The invention further provides a linear feature extraction method based on the laser sensor, which is characterized by comprising the following steps: the specific procedure of least squares straight line fitting described in step 3 is as follows (see fig. 4):
step 3.1: for each set of line segment points { ρi,φiN, where (r, α) represents the polar parameters of a straight line, the formula being:
in the formula,
the invention further provides a linear feature extraction method based on the laser sensor, which is characterized by comprising the following steps: the specific process of calculating the straight line fitting error in the step 4 is as follows:
step 4.1: setting a linear parameter error covariance matrix as follows:
wherein,
in the formula:
the linear feature extraction method based on the laser sensor is completed.
Compared with the traditional straight line extraction method, the method has the advantages that: (1) the iteration times of the method are reduced, and the efficiency of the method is improved; (2) the robustness of the method is greatly improved; (3) the accuracy of line segment extraction is also obviously improved.
examples
This example uses SICK200 industrial 180 DEG range laser sensors from SICK corporation, Germany, in a laboratory environment of 6m x 6 m. The LMS laser radar measures the distance between the LMS laser radar and surrounding obstacles by calculating the round trip time of laser, namely, a laser radar transmitter transmits a beam of laser which is reflected when encountering the obstacles; the receiver of the lidar records the reflected light and calculates the distance between the obstacle and the lidar from the time the laser is transmitted to be reflected back to the lidar.
The laboratory raw laser data is shown in fig. 5, which takes one data every 0.5 ° from 0 ° to 180 °, the mean square error of the distance measurement is 5mm, the measurement error of the angle is ignored, and 361 data are obtained in each frame. Fig. 4-2 is a frame of laser data acquired in the laboratory herein, where blue dots represent laser data points, black dots represent the origin of the lidar coordinate system, black plus 0 ° on the right represents laser data points, and black plus on the left represents 180 ° laser data points.
Setting sigmamaxThe extraction results of fig. 5 using the conventional Split-and-Merge algorithm and the third part straight line extraction algorithm are shown in fig. 6 at 0.005 mm. The extraction result of the invention is shown in figure 7.
In fig. 6 and 7, the red straight line segment is the straight line segment detected by the algorithm, and + represents the starting point of the line segment, and as can be seen from fig. 6 and 7, 12 straight lines, L1 and L2.. L12, are detected by the improved algorithm, while only 8 straight lines, L4, L6, L9 and L10, are detected by the algorithm before improvement. From the viewpoint of the extraction accuracy of the straight line, the improved one is also higher than the one before the improvement, and particularly L8 is particularly remarkable. Meanwhile, the traditional Split-and-Merge algorithm directly segments and extracts all data, and a method of firstly detecting adjacent point clusters and then segmenting and extracting straight lines is adopted, so that the iteration times of the algorithm are reduced, and the algorithm efficiency is improved. In addition, as can be seen from fig. 6 and 7, the robustness of the improved algorithm is also greatly improved compared with the improved algorithm.
The improved extracted straight line L1, L2.. L12 fitting error is as in table 1 below:
table 1: fitting error table for straight line L1, L2.. L12
Table 1 shows that the results are very accurate when the straight line segment contains more points, such as L1, L3, L7 and L11, but the errors are relatively large when the line segment contains fewer points, such as L6 and L10. From table 1, it can be seen that the errors of the polar diameters of the straight lines are small and generally in the millimeter level, and only L4, L6 and L10 are in the centimeter level because of the small number of points. In contrast, the angle error is large, 10 max-1rad; but most of straight line errors are very small, and the diameter errors are less than 1mmAnd the angle error is less than 0.01rad, and the fitting effect is better.