A method for identifying ground obstacles based on lidar
Through point cloud processing technology based on lidar, the height and reflection intensity characteristics of the ground speed bump are extracted, and the shortcomings of relying on cameras to identify speed bumps in the prior art are solved, and accurate identification and information acquisition under various light conditions are achieved.
Patent Information
- Application Number
- CN202211452186.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-21
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2042-11-21
AI Technical Summary
In the prior art, when identifying and obtaining distance and height information of ground speed bumps, it relies on cameras to have problems such as difficulty in identifying at night or when the light is strong, and the detection rate of speed bumps with irregular or non-obvious features is low.
Using a lidar-based method, the probability of the speed bump is calculated and its distance and height information is returned by acquiring point cloud data, registering and rastering point clouds, and extracting raster occupation features based on height constraints and color block proportion features based on reflection intensity.
It realizes that the speed bumps are accurately identified and their distance and altitude information are obtained without using the camera, especially in dark or strong light environments, with strong robustness and anti-interference ability.
Smart Images

Figure CN115856936B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method for identifying ground obstacles in an autonomous driving system, and in particular to a method for identifying ground obstacles, especially ground speed bumps, based on a laser radar. Background Art
[0002] With the widespread popularity of automobiles, consumers have higher and higher requirements for driving experience. In urban road traffic, speed bumps are common road traffic facilities that play a role in reducing vehicle speed. However, when a vehicle passes through a speed bump, it will inevitably bring impact to the vehicle, affecting the driving experience and even causing safety accidents. Therefore, speed bumps are also a type of ground obstacle that smart cars need to identify. It is particularly important to identify speed bumps in advance and control vehicle deceleration.
[0003] The mainstream solution currently used in the market is to use cameras to sense and identify speed bumps, such as a speed bump identification method proposed in the patent document with publication number CN110889342A, a speed bump identification method based on a visual algorithm proposed in the patent document with publication number CN111401341A, and a speed bump algorithm based on the YOLO V2 algorithm proposed in the patent document with publication number CN111738040A, etc. All of them use cameras to obtain road images, learn and identify the images through algorithms, and then extract speed bump information to identify and judge the speed bumps. However, the photos collected by the cameras used in the above methods are difficult to meet the requirements at night or when the light is strong, which affects the speed bump detection rate; in addition, the speed bump identification solution based on the camera is highly dependent on the standard features of the speed bump, especially the training set in the deep learning method. If an irregular speed bump or a speed bump with unclear color features is encountered, the detection rate will be greatly reduced; at the same time, these solutions focus more on how to improve the detection rate of speed bumps, while ignoring the acquisition of speed bump distance and height information.
[0004] Therefore, how to accurately identify speed bumps and obtain information such as the distance of speed bumps without using or without using a camera alone is a problem that needs to be solved at present. Summary of the invention
[0005] In order to solve the above technical problems, the present invention provides a method for identifying ground obstacles, especially ground speed bumps, based on laser radar, comprising the following steps:
[0006] Step 1: Obtain point cloud data, remove invalid points, perform direct filtering, and roughly extract the road surface;
[0007] Step 2: Perform point cloud registration, create a laser odometer, obtain vehicle body posture transformation information, and overlay point clouds, including:
[0008] (1) Point cloud registration.
[0009] (2) Overlay the point clouds and fuse two adjacent frames of point clouds;
[0010] Step 3: Use the RANSAC algorithm to fit the ground, update the point cloud coordinates, and calculate the distance from the point cloud to the ground;
[0011] Step 4: Perform point cloud rasterization, divide the ground two-dimensional raster, and project the point cloud into the raster, including:
[0012] (1) Divide the two-dimensional raster;
[0013] (2) Establish a point cloud index;
[0014] (3) Divide the target area;
[0015] (4) Establish the constraint conditions for the target area;
[0016] After determining the target area, scan it row by row;
[0017] Step 5: Determine and extract the grid occupancy feature based on height constraint and the color block ratio feature based on reflection intensity, including:
[0018] (I) Determination and extraction of the grid occupancy feature based on height constraint:
[0019] (1) Remove the valid columns;
[0020] (2) Calculate the height difference;
[0021] (3) Mark the grid occupancy;
[0022] (4) Extract the first eigenvalue:
[0023] Take the grid occupancy ratio as the first feature output value of the i-th row At the same time, calculate and output the average coordinates of the point cloud that meets the height constraint row by row for the point cloud in the target area As the distance and height information of the speed bump;
[0024] (II) Determination and extraction of the color block ratio feature based on reflection intensity:
[0025] (1) Perform weighted processing on the reflection intensity;
[0026] (2) Perform binarization processing;
[0027] (3) Perform connected region analysis;
[0028] (4) Extract the second eigenvalue:
[0029] Take the yellow color block ratio as the second feature output value of the i-th row
[0030] Step 6. Calculate the probability of the existence of a speed bump based on the extracted feature information;
[0031] For the i-th row, the probability that it is a speed bump is:
[0032]
[0033] where α and β represent the adaptive weights of the first and second features, and α + β = 1. When the distance is far, the point cloud is sparse, so the values of α and β change with the distance;
[0034] Finally, take the maximum probability value in the scanned rows of the target area as the recognition probability of the speed bump, that is:
[0035] P = max{P i , P i+1 , ……, P i+j};
[0036] Step 7. If there is a speed bump, return the distance and height information of the speed bump:
[0037] When P > 80%, it is determined that there is a speed bump on the road ahead, and the distance and height information of the speed bump are output.
[0038] Furthermore, in Step 1, when the vehicle is moving, the lidar installed in front of the vehicle scans the road surface information ahead in real time to obtain the point cloud of the road surface ahead;
[0039] Perform the operation of removing invalid points on the obtained point cloud;
[0040] After that, perform a pass-through filtering operation, that is, select the area in front of the vehicle: [x1, x2] × [y1, y2] × [z1, z2] according to the radar performance parameters and the preview distance, where the meanings of x1, x2, y1, y2, z1, z2 are: the minimum coordinate in the x direction of the target area, the maximum coordinate in the x direction, the minimum coordinate in the y direction, the maximum coordinate in the y direction, the minimum coordinate in the z direction, and the maximum coordinate in the z direction. Retain the points within the area and filter out the points outside the area.
[0041] Furthermore, in Step 2, perform point cloud registration, make a laser odometer, and obtain the vehicle body pose transformation information. The steps for superimposing the point cloud include:
[0042] (1) Point cloud registration:
[0043] Adopt the point cloud registration algorithm ICP to obtain the vehicle body pose transformation matrix R is the rotation matrix (3×3), and T is the translation matrix (1×3); The ICP registration method is very dependent on the initial value, so the registration result M from the (n - 1)-th frame to the n-th frame n-1 is used as the transformation initial value from the n-th frame to the (n + 1)-th frame; Perform registration every two frames;
[0044] (2) Overlay point clouds and fuse adjacent two frames of point clouds:
[0045] According to the transformation matrix obtained by registering from the nth frame to the (n + 1)th frame Transform the nth frame of point cloud p i (i = 0, 1, 2, ……, representing the point cloud index) to obtain the fused point cloud q of the (n + 1)th frame i , then: q i = R n p i + T n , and jointly form the fused (n + 1)th frame of point cloud with the original point cloud of the (n + 1)th frame.
[0046] Furthermore, in step three, use the Ransac algorithm to fit the ground point cloud to obtain the equation of the plane where the ground is located Ax + By + Cz = 0, and calculate the relative distance d of each point (x i , y i , z i ) in the point cloud to the ground i :
[0047]
[0048] Take d i as the actual height of the point cloud, that is, update the point (x i , y i , z i ) to (x i , y i , d i ).
[0049] Furthermore, in step four, perform point cloud rasterization and divide the ground two-dimensional grid. Projecting the point cloud into the grid includes the following steps:
[0050] (1) Divide the two-dimensional grid:
[0051] Process the extracted road surface area [x1, x2] × [y1, y2] × [z1, z2], and calculate the number of rows and columns of the grid:
[0052]
[0053]
[0054] Among them, grid represents the side length of the two-dimensional grid, represents rounding up, x max , x min , y max , y minThe maximum value of the x - coordinate, the minimum value of the x - coordinate, the maximum value of the y - coordinate, and the minimum value of the y - coordinate of the point cloud within the representation area;
[0055] (2) Establish a point - cloud index:
[0056] Calculate the row and column numbers of the grid where the point (x i , y i , d i ) is located:
[0057]
[0058] Among them, represents rounding up;
[0059] Then the grid number where the point (x i , y i , d i ) is located is:
[0060] (row - 1)·Col+col
[0061] After rasterization, the point cloud within the area is divided into grids according to the two - dimensional coordinates. However, due to the discontinuity and density difference of the point - cloud distribution, there must be cases where there are multiple points in some grids and no points in some grids;
[0062] (3) Divide the target area:
[0063] Select the i - th to i + j - th rows and the p - th to p + k - th columns of the two - dimensional grid as the target area. Assume the top - view size of the speed bump is l b ×h b ;
[0064] (4) Establish the constraint conditions for the target area:
[0065] To improve the detection efficiency and reduce the interference of road - edge markings, road curbs, etc., the length of the target area should meet the condition:
[0066] l c <k·grid<l b
[0067] In the formula, l c is the vehicle body length and can be taken as
[0068] At the same time, to avoid the situation where the target area does not cover the speed bump under high - speed driving conditions, the width of the target area should meet the condition:
[0069]
[0070] In the formula, [σ] is the adjustment factor, v mThe maximum speed limit for the road with speed bumps is [σ], and f is the scanning area of the lidar. By calculation, [σ] can be taken as 2.5, then there is
[0071] After determining the target area, scan according to the number of rows.
[0072] Furthermore, in step five, (1) the determination and extraction of the grid occupancy feature based on height constraints include the following steps:
[0073] (1) Remove valid columns:
[0074] Judge whether there are points distributed in each column grid of the i-th row. If there are, mark it as a valid column; if it is empty, it is an invalid column and is directly filtered out. The total number of valid ones is K;
[0075] (2) Calculate the height difference:
[0076] For valid columns, calculate the average height of the grid points in the j-th column of the previous i - 1 rows, that is, the average distance from all points to the ground Then there is:
[0077]
[0078] Among them, represents the average distance from all points in the grid of the k-th row and j-th column to the ground;
[0079] Calculate the average height h of the grid points in the i-th row and j-th column ij The difference Δh from the average height of the grid points in the j-th column of the previous i - 1 rows ij , then there is:
[0080]
[0081] (3) Mark grid occupancy:
[0082] According to the shape and size of the speed bump, select appropriate height thresholds δ1, δ2, set height constraint conditions. If the constraints are met, mark the grid occupancy, and flag is recorded as 1; otherwise, it is recorded as 0, that is:
[0083]
[0084] (4) Extract the first eigenvalue:
[0085] Take the grid occupancy ratio as the first feature output value of the i-th row Then:
[0086]
[0087] At the same time, calculate and output the average coordinates of the point cloud that meets the height constraints row by row for the point cloud in the target area Distance and height information of the speed bump.
[0088] (2) Determination and extraction of the proportion feature of color blocks based on reflection intensity include the following steps:
[0089] The point cloud scanned by the lidar includes not only three-dimensional coordinate information but also information such as reflection intensity. Traffic guiding signs such as road markings and traffic signs generally use white, yellow, and blue paints, and the reflectivity of such paints is relatively high, while the ground has little reflectivity. Standard speed bumps are generally decorated with yellow and black paints, and the reflectivity of the yellow color blocks will be significantly different from that of the black color blocks. Therefore, in the superimposed dense point cloud, the color blocks can be used as one of the recognition features of the speed bump.
[0090] (1) Reflection intensity weighting processing:
[0091] To further distinguish the speed bump from the ground point cloud, considering that the point cloud of the speed bump is more concentrated and dense, the Gaussian weighting method can be used to enhance the difference in reflection intensity between the color blocks and the ground points;
[0092] For the point n(x, y, d, I) projected onto the ground and its neighboring point m i (x i , y i , d i , I i ), where I represents the reflection intensity, and the reflection intensity of point n after Gaussian weighting is:
[0093]
[0094] where h represents the Gaussian kernel radius, only the neighboring points within 3h are taken, N represents the number of neighboring points that meet the requirements, and E(n, m i ) represents the Euclidean distance after projection onto the ground of point n and point m i , and there is:
[0095]
[0096] After Gaussian weighting, the color blocks of the speed bump and the ground point cloud can be normalized to grayscale values from 0 to 255, so as to be transformed from the point cloud into pixel points, and the target area is transformed into an image with a resolution of j×k according to the established grid index;
[0097] (2) Binarization processing:
[0098] The Otsu binarization method (OTSU) is used to binarize the image. Set a threshold t, set the yellow color blocks as the target class, and classify the pixel points with grayscale values in the range (t, 255] into the target class. Count the number of pixel points in the target class as N o , and the average grayscale is u o; Set the remaining ones as the background class, with the number being N b , and the average gray value is u b ; Then the average gray value u of the entire image is:
[0099]
[0100] Between-class variance:
[0101]
[0102] will make σ 2 Take the t value when it is the smallest as the optimal value T, and perform binaryzation processing on the image;
[0103] (3) Connected component analysis:
[0104] Perform connected component analysis on the image to remove noise and interference regions. Since the selected grid size is large and the point cloud has been superimposed, the Two-Pass method can be used to achieve this. The traversal path is from top to bottom and from left to right. In the first traversal, set labels for all points with pixel value 1, record the connected components to which each label belongs, and in the second traversal, mark the pixels as the connected components to which they belong; after two traversals, each color block with pixel value 1 in the binaryzation image is assigned a label and connected into a region; then count the number of labels instead of the number of alternating color blocks. If the number of labels is too small, it is considered a continuous obstacle and excluded, that is, the selected region should satisfy:
[0105] label≥N
[0106] At the same time, some noise points with relatively large reflection intensity in the road may also be retained. For the deceleration strip feature, two conditions of the circumscribed rectangle area and the rectangularity are used for constraint;
[0107] The top view of the deceleration strip is approximately a rectangle with size l b ×h b The selected target area is the i~i + j rows and p~p + k columns of the two-dimensional grid. Assume that the area ratios of the yellow and black color blocks are a and b respectively, and a + b = 1. The circumscribed rectangle size of the yellow color block is l×h;
[0108] 1) Circumscribed rectangle area: The area of the circumscribed rectangle of each yellow color block is approximately:
[0109] S = l·b ≈ akl b ·grid
[0110] Therefore, the area of each yellow color block should satisfy the condition:
[0111] S∈(akl b ·(grid - 1), akl b·(grid + 1));
[0112] 2) Rectangularity: The speed bump color patches are usually rectangular. The rectangularity, which is the ratio of the minimum circumscribed rectangle to the area of the connected region, ratio ∈ (70%, 100%);
[0113] By the above two condition constraints, the influence of road surface noise points, markings, etc. can be removed;
[0114] (4) Extract the second eigenvalue:
[0115] Count the number of yellow color patches in each row, that is, the number of points cnt with pixel value 1, and use the proportion of the yellow color patches as the second feature output value of the i-th row Then there is:
[0116]
[0117] Advantages of the present invention:
[0118] A method for identifying ground obstacles based on lidar provided by the present invention realizes speed bump detection without relying on a camera, including: obtaining point cloud data, removing invalid points and performing through filtering to roughly extract the road surface; performing point cloud registration, making a lidar odometer, obtaining vehicle body pose transformation information, and overlaying point clouds; using the RANSAC algorithm to fit the ground and calculate the distance from the point cloud to the ground; performing point cloud rasterization, dividing the ground into two-dimensional grids, projecting the point cloud into the grids, and dividing the target area; determining and extracting the grid occupancy feature based on height constraint and the color patch proportion feature based on reflection intensity; calculating the probability of the existence of a speed bump according to the extracted feature information; if a speed bump exists, returning the speed bump distance and height information. The present invention only uses lidar without using a camera, and at the same time can convert the point cloud into an image and process it in combination with an image processing algorithm. At the same time, relying on the unique advantages of lidar to obtain the height information of the target point cloud, it is equivalent to fusing lidar and a camera, and only using lidar achieves the effect of fusing lidar and a camera. The present invention can accurately identify speed bumps in a dark or strong light environment, and can accurately return relatively accurate speed bump distance and height information, with better robustness and stronger anti-interference ability, and can provide a perception basis for automotive chassis preview control. Description of the Drawings
[0119] Figure 1 It is a schematic diagram of the overall process of the present invention;
[0120] Figure 2 It is a schematic diagram of the specific process of the present invention;
[0121] Figure 3 It is a schematic diagram of the lidar installation position and speed bump recognition process of the embodiment of the present invention;
[0122] To improve the detection efficiency and reduce the interference of obstacles such as curbs, the length of the selected target area can be less than the length of the speed bump. At the same time, the purpose of the present invention is to identify the speed bumps on the vehicle driving trajectory. Therefore, the distance and height information of the speed bumps are concerned, and the length information of the speed bumps is of secondary importance.
[0123] Figure 4 Schematic diagram of the structural characteristics of the speed bump according to an embodiment of the present invention;
[0124] Figure 5 Effect diagram of the first feature extraction of the speed bump according to an embodiment of the present invention;
[0125] Figure 6 Effect diagram of the point cloud conversion image in the second feature extraction process according to an embodiment of the present invention. Detailed implementation manners
[0126] Refer to Figure 1-6 as shown in
[0127] A method for identifying ground obstacles, especially ground speed bumps, based on lidar provided by the present invention includes the following steps:
[0128] Step 1: Obtain point cloud data, eliminate invalid points, perform direct filtering, and roughly extract the road surface:
[0129] Specifically, when the vehicle is driving, the lidar installed in front of the vehicle scans the road surface information in front in real time to obtain the point cloud of the road surface in front; the installation position of the lidar is in the middle of the front bumper of the vehicle.
[0130] Perform an operation to eliminate invalid points on the obtained point cloud;
[0131] Then perform direct filtering operation, that is, select the area in front of the vehicle according to the radar performance parameters and preview distance: [x1, x2] × [y1, y2] × [z1, z2], where the meanings of x1, x2, y1, y2, z1, z2 are: the minimum coordinate in the x direction of the target area, the maximum coordinate in the x direction, the minimum coordinate in the y direction, the maximum coordinate in the y direction, the minimum coordinate in the z direction, and the maximum coordinate in the z direction. Retain the points in the area and filter out the points outside the area;
[0132] Step 2: Perform point cloud registration, make a laser odometer, obtain the vehicle body pose transformation information, and superimpose the point cloud:
[0133] (1) Point cloud registration:
[0134] Adopt the point cloud registration algorithm ICP to obtain the vehicle body pose transformation matrix R is a rotation matrix (3×3), and T is a translation matrix (1×3); the ICP registration method is very dependent on the initial value. Therefore, the registration result M from the (n - 1)-th frame to the n-th framen-1 As the initial value of the transformation from the nth frame to the (n + 1)th frame; registration is performed every two frames.
[0135] (2) Overlay point clouds and fuse adjacent two-frame point clouds:
[0136] According to the transformation matrix obtained by registering from the nth frame to the (n + 1)th frame Transform the point cloud p of the nth frame i (i = 0, 1, 2, ……, representing the point cloud index) to obtain the fused point cloud q of the (n + 1)th frame i , then: q i = R n p i + T n , and jointly form the fused point cloud of the (n + 1)th frame with the original point cloud of the (n + 1)th frame.
[0137] Step 3: Use the RANSAC algorithm to fit the ground, update the point cloud coordinates, and calculate the distance from the point cloud to the ground:
[0138] Use the Ransac algorithm to fit the ground point cloud to obtain the equation of the plane where the ground is located Ax + By + Cz = 0, and calculate the relative distance d of each point (x i , y i , z i ) in the point cloud to the ground i :
[0139]
[0140] Take d i as the actual height of the point cloud, that is, update the point (x i , y i , z i ) to (x i , y i , d i ).
[0141] Step 4: Perform point cloud rasterization, divide the ground two-dimensional grid, and project the point cloud into the grid:
[0142] (1) Divide the two-dimensional grid:
[0143] Process the extracted road surface area [x1, x2] × [y1, y2] × [z1, z2] to calculate the number of rows and columns of the grid:
[0144]
[0145]
[0146] Among them, grid represents the side length of the two-dimensional grid, which can be taken as half of the width dimension of the speed bump, Denote the ceiling function, x max , x min , y max , y min represent the maximum value of the x - coordinate, the minimum value of the x - coordinate, the maximum value of the y - coordinate, and the minimum value of the y - coordinate of the point cloud within the region;
[0147] (2) Establish a point cloud index:
[0148] Calculate the row and column numbers of the grid where the point (x i , y i , d i ) is located:
[0149]
[0150] Among them, denotes the ceiling function;
[0151] Then the grid number where the point (x i , y i , d i ) is located is:
[0152] (row - 1)·Col+col
[0153] After rasterization, the point cloud within the region is divided into grids according to the two - dimensional coordinates;
[0154] (3) Divide the target region:
[0155] Select the i - th to (i + j)-th rows and the p - th to (p + k)-th columns of the two - dimensional grid as the target region. Suppose the top - view size of the speed bump is l b ×h b ;
[0156] (4) Establish the constraint conditions for the target region:
[0157] To improve the detection efficiency and reduce the interference of road edge markings, road curbs, etc., the length of the target region should satisfy the condition:
[0158] l c <k·grid<l b
[0159] In the formula, l c is the vehicle body length and can be taken as
[0160] At the same time, to avoid the situation that the target region does not cover the speed bump under high - speed driving conditions, the width of the target region should satisfy the condition:
[0161]
[0162] In the formula, [σ] is the adjustment factor, v mThe maximum speed limit for the road with speed bumps is [σ], and f is the scanning area of the lidar. By calculation, [σ] can be taken as 2.5, then there is
[0163] After determining the target area, scan by row.
[0164] Step 5: Determine and extract the grid occupancy feature based on height constraint and the color block ratio feature based on reflection intensity:
[0165] Taking the i-th row as an example, extract two features, and extract the remaining part of the target area in the same way.
[0166] (1) Remove valid columns:
[0167] (1) Remove valid columns:
[0168] Judge whether there are points distributed in each column grid of the i-th row. If there are, mark it as a valid column. If it is empty, it is an invalid column and is directly filtered out. The total number of valid ones is K;
[0169] (2) Calculate the height difference:
[0170] For valid columns, calculate the average height of the grid points in the j-th column of the first i - 1 rows, that is, the average distance from all points to the ground Then there is:
[0171]
[0172] Among them, represents the average distance from all points in the grid of the k-th row and j-th column to the ground;
[0173] Calculate the average height h of the grid points in the j-th column of the i-th row ij The difference Δh from the average height of the grid points in the j-th column of the first i - 1 rows ij , then there is:
[0174]
[0175] (3) Mark grid occupancy:
[0176] According to the shape and size of the speed bump, select appropriate height thresholds δ1, δ2, set height constraint conditions. If the constraints are met, mark the grid occupancy, and flag is recorded as 1, otherwise it is recorded as 0, that is:
[0177]
[0178] (4) Extract the first eigenvalue:
[0179] Take the grid occupancy ratio as the first feature output value of the i-th row Then:
[0180]
[0181] Meanwhile, calculate the point cloud of the target area row by row and output the average coordinates of the point cloud that meets the height constraint. As the distance and height information of the speed bump.
[0182] (2) Determination and extraction of the proportion feature of color blocks based on reflection intensity:
[0183] (1) Reflection intensity weighting process:
[0184] Use Gaussian weighting to enhance the difference in reflection intensity between the color block and the ground points;
[0185] For the point n(x, y, d, I) projected onto the ground and its neighboring point m i (x i , y i , d i , I i ), where I represents the reflection intensity, and the reflection intensity of point n after Gaussian weighting is:
[0186]
[0187] where h represents the Gaussian kernel radius, only the neighboring points within 3h are taken, N represents the number of neighboring points that meet the requirements, and E(n, m i ) represents the Euclidean distance of the projections of point n and point m i onto the ground, and there is:
[0188]
[0189] After Gaussian weighting, the color blocks of the speed bump and the ground point cloud can be normalized to grayscale values from 0 to 255, so as to be converted from the point cloud to pixel points, and the target area is converted into an image with a resolution of j×k according to the established grid index;
[0190] (2) Binarization process:
[0191] Use the Otsu binarization method (OTSU) to binarize the image, set the threshold t, set the yellow color block as the target class, and classify the pixel points with grayscale values in the range (t, 255] as the target class. Count the number of pixel points in the target class as N o , and the average grayscale is u o ; set the remaining as the background class, with the number N b , and the average grayscale is u b ; then the average grayscale u of the entire image is:
[0192]
[0193] Between-class variance:
[0194]
[0195] will make σ 2 When the t value is the smallest, it is used as the optimal value T, and the image is binarized;
[0196] (3) Connected component analysis:
[0197] Perform connected component analysis on the image to remove noise and interference regions. The traversal path is from top to bottom and from left to right. In the first traversal, set labels for all points with pixel value 1, record the connected component to which each label belongs, and in the second traversal, mark the pixel as the connected component to which it belongs; after two traversals, each color block with pixel value 1 in the binarized image is assigned a label and connected into a region; then count the number of labels instead of the number of alternating color blocks. If the number of labels is too small, it is considered a continuous obstacle and excluded. That is, the selected region should satisfy:
[0198] label≥N
[0199] At the same time, some noise points with relatively high reflection intensity in the road may also be retained. For the characteristics of speed bumps, two conditions, the area of the circumscribed rectangle and the rectangularity, are used for constraint;
[0200] The top view of the speed bump is approximately a rectangle with dimensions of l b ×h b The selected target area is the i~i + j rows and p~p + k columns of the two-dimensional grid. Assume that the area ratios of the yellow and black color blocks are a and b respectively, and a + b = 1. The dimensions of the circumscribed rectangle of the yellow color block are l×h;
[0201] 1) Area of the circumscribed rectangle: The area of the circumscribed rectangle of each yellow color block is approximately:
[0202] S = l·b ≈ akl b ·grid
[0203] Therefore, the area of each yellow color block should satisfy the condition:
[0204] S∈(akl b ·(grid - 1), akl b ·(grid + 1));
[0205] 2) Rectangularity: The speed bump color block is usually rectangular, and the rectangularity, that is, the ratio of the minimum circumscribed rectangle to the area of the connected domain, ratio∈(70%, 100%);
[0206] After being constrained by the above two conditions, the influence of road noise points, markings, etc. can be removed;
[0207] (4) Extract the second eigenvalue:
[0208] Count the number of yellow color blocks in each row, that is, the number of points cnt with a pixel value of 1, and output the proportion of the yellow color blocks as the second feature value of the i-th row. Then there is:
[0209]
[0210] Step 6: Calculate the probability of the existence of a speed bump based on the extracted feature information:
[0211] For the i-th row, the probability that it is a speed bump is:
[0212]
[0213] Among them, α and β represent the adaptive weights of the first and second features, and α + β = 1. When the distance is far, the point cloud is sparse, so the values of α and β change with the distance. The values are shown in the following table:
[0214] Distance / m α β 5 0.20 0.80 10 0.35 0.65 15 0.50 0.50 20 0.65 0.35 25 0.80 0.20
[0215] Finally, take the maximum probability value in the scanned rows of the target area as the recognition probability of the speed bump, that is:
[0216] P = max{P i , P i+1 , ……, P i+j};
[0217] Step 7: If there is a speed bump, return the distance and height information of the speed bump:
[0218] If P > 80%, it is determined that there is a speed bump on the road ahead, and the distance and height information of the speed bump are output.
Claims
1. A method for identifying ground obstacles based on lidar, characterized in that: The following steps are involved: Step 1: Obtain point cloud data, remove invalid points, perform direct filtering, and roughly extract the road surface; Step 2: Perform point cloud registration, create a laser odometer, obtain vehicle body posture transformation information, and overlay point clouds, including: (1) Point cloud registration; (2) Superimpose point clouds and fuse two adjacent point clouds; Step 3: Use the RANSAC algorithm to fit the ground, update the point cloud coordinates, and calculate the distance from the point cloud to the ground; Step 4: rasterize the point cloud, divide the ground into two-dimensional grids, and project the point cloud into the grid, including: (1) Divide the two-dimensional grid; (2) Establishing point cloud index; (3) Divide the target area; (4) Establish target area constraints; After determining the target area, scan it according to the number of rows; Step 5: Determine and extract the grid occupancy features based on height constraints and the color block proportion features based on reflection intensity, including:
1. Determination and extraction of grid occupancy features based on height constraints: (1) Remove valid columns; (2) Calculate the height difference; (3) Mark grid occupancy; (4) Extract the first eigenvalue: Output the raster occupancy ratio as the first feature output value of the i-th row ; At the same time, calculate the average coordinates of the point cloud that meets the height constraint row by row for the point cloud in the target area , as the distance and height information of the speed bump; (II) Determination and extraction of color block proportion features based on reflection intensity: (1) Reflection intensity weighted processing; (2) Binarization processing; (3) Connected area analysis; (4) Extract the second eigenvalue: Output the proportion of the yellow color block as the second feature output value of the i-th row ; Step 6: Calculate the probability of the existence of a speed bump based on the extracted feature information; For the i-th row, the probability that it is a speed bump is: , Among them, represents the adaptive weights of the first and second features, and when the distance is far, the point cloud is relatively sparse, so the value changes with the distance; Finally, the maximum probability value in the target area scan line is taken as the recognition probability of the speed bump, that is: ; Step 7: If there is a speed bump, return the speed bump distance and height information: When , it is determined that there is a speed bump on the road ahead, and the distance and height information of the speed bump are output.
2. The method for identifying ground obstacles based on lidar according to claim 1, wherein: In step 1, when the vehicle is driving, the laser radar installed in front of the vehicle scans the road surface information in front in real time to obtain the point cloud of the road surface in front; Eliminate invalid points from the acquired point cloud; Then, a straight-through filtering operation is performed, that is, the area in front of the vehicle is selected according to the radar performance parameters and the preview distance: , where means: the minimum coordinate in the x - direction, the maximum coordinate in the x - direction, the minimum coordinate in the y - direction, the maximum coordinate in the y - direction, the minimum coordinate in the z - direction, the maximum coordinate in the z - direction of the target area, keeping the points within the area and filtering out the points outside the area.
3. The method for identifying ground obstacles based on lidar according to claim 1, wherein: In step 2, (1) point cloud registration: Using the point cloud registration algorithm ICP, obtain the vehicle body pose transformation matrix , is the rotation matrix , is the translation matrix ; Take the registration result from the th frame to the th frame as the transformation initial value from the nth frame to the n+1th frame; Perform registration every two frames; (2) Superimpose point clouds and fuse two adjacent point clouds: The transformation matrix obtained by registering the n-th frame to the (n + 1)-th frame , the point cloud of the n-th frame Perform a transformation to obtain the fused point cloud of the (n + 1)-th frame , then: , which together with the original point cloud of the (n + 1)-th frame forms the fused point cloud of the (n + 1)-th frame.
4. The method for identifying ground obstacles based on lidar according to claim 1, characterized in that: In step three, the Ransac algorithm is used to fit the ground point cloud to obtain the equation of the plane where the ground is located , and calculate the relative distance from the point in each frame of point cloud to the ground : , Take as the actual height of the point cloud, that is, update the point to .
5. The method for identifying ground obstacles based on lidar according to claim 1, characterized in that: In step 4, (1) divide the two-dimensional grid: For the extracted road surface area Process it and calculate the number of rows and columns of the grid: ; where grid represents the side length of the two-dimensional grid, represents rounding up, represents the maximum value of the x coordinate, the minimum value of the x coordinate, the maximum value of the y coordinate, and the minimum value of the y coordinate of the point cloud within the region; (2) Establishing point cloud index: Calculation point Grid row and column numbers where it is located: ; Among them, represents rounding up; The point is located in the grid numbered as: ; After rasterization, the point cloud in the area is divided into grids according to the two-dimensional coordinates; (3) Divide the target area: Select the th row and the th column of the two-dimensional grid as the target area, and set the top view size of the speed bump to be ; (4) Establish target area constraints: The length of the target area should meet the following conditions: ; In the formula, is the vehicle body length, which can take ; The width of the target area should meet the following conditions: ; In the formula, is the adjustment factor, is the maximum speed limit of the road with speed bumps arranged, is the scanning area of the lidar, and by calculation, taking , then there is ; After determining the target area, scan it by number of rows.
6. The method for identifying ground obstacles based on lidar according to claim 1, wherein: In step 5, (i) determining and extracting grid occupancy features based on height constraints includes the following steps: (1) Remove valid columns: Determine whether there are points distributed in each grid of the row. If there are, mark it as a valid column; if it is empty, it is an invalid column and can be directly filtered out. The total number of valid columns is K. (2) Calculate the height difference: For the valid columns, calculate the average height of the grid points in the first i - 1 rows at the column, that is, the average distance from all points to the ground , then we have: ; Among them, represents the average distance from all points in the grid of the k-th row and the -th column to the ground; Calculate the average height of the grid points in the column of the i-th row and the difference from the average height of the grid points in the column of the previous i - 1 rows , then we have: ; (3) Mark grid occupancy: Select a suitable height threshold according to the shape and size of the speed bump , set the height constraint condition. If the constraint is satisfied, mark the grid as occupied, record it as 1, otherwise record it as 0, that is: ; (4) Extract the first eigenvalue: Take the raster occupancy ratio as the first characteristic output value of the row , then: ; Meanwhile, calculate the average coordinates of the point cloud that meets the height constraint row by row for the point cloud in the target area and output them , as the distance and height information of the speed bump.
7. The method for identifying ground obstacles based on lidar according to claim 6, characterized in that: In step 5, (ii) determining and extracting the color block proportion feature based on reflection intensity includes the following steps: (1) Reflection intensity weighted processing: Use Gaussian weighting to enhance the difference in reflection intensity between color blocks and ground points; For the points projected onto the ground and their neighboring points , denote the reflection intensity. The reflection intensity of point n after Gaussian weighting is as follows: ; Among them, represents the Gaussian kernel radius, and only takes the neighborhood points within, represents the number of neighborhood points that meet the requirements, represents the point and the point the Euclidean distance after the projection of to the ground is: ; After Gaussian weighting, the color blocks of the speed bump and the ground point cloud can be normalized to gray values from 0 to 255, thus converting from point cloud to pixel points. According to the established grid index, the target area is converted into an image with a resolution of ; (2) Binarization processing: The Otsu binarization method (OTSU) is used to binarize the image, and a threshold is set , the yellow color block is set as the target class, and the pixel points with gray values within are classified into the target class. The number of pixel points in the target class is counted as , and the average gray value is ; the remaining ones are set as the background class, and the number is , and the average gray value is ; then the average gray value of the entire image is ; Between-class variance: ; will make when it is the smallest value as the optimal value , perform binarization processing on the image; (3) Connected region analysis: Perform connected component analysis on the image to remove noise and interference regions. The traversal path is from top to bottom and from left to right. In the first traversal, set labels for all points with pixel value 1, and record the connected regions to which each label belongs. In the second traversal, mark the pixels as belonging to the connected regions. After two traversals, each color block with pixel value 1 in the binary image is assigned a label and connected into a region. Then, count the number of labels instead of the number of alternating color blocks. If the number of labels is too small, it is considered a continuous obstacle and excluded. That is, the selected region should satisfy: ; At the same time, for the speed bump feature, two conditions, namely the area of the circumscribed rectangle and the rectangularity, are used for constraint; The top view of the speed bump is approximately a rectangle with dimensions of The selected target area is the th row and the th column of the two-dimensional grid. Assuming that the area ratios of the yellow and black color blocks are respectively, and the dimensions of the circumscribed rectangle of the yellow color block are ; 1) Area of the circumscribed rectangle: The area of the circumscribed rectangle of each yellow color block is approximately: ; Therefore, the area of each yellow color block should satisfy the condition: ; Denote the side length of the two-dimensional grid; 2) Rectangularity: The deceleration strip color block is rectangular. Rectangularity is the ratio of the area of the minimum circumscribed rectangle to the area of the connected domain ; (4) Extract the second eigenvalue: Count the number of yellow color blocks in each row, that is, the number of points with a pixel value of 1 , and use the proportion of yellow color blocks as the second feature output value of the th row , then there is: 。
Citation Information
Patent Citations
Deceleration strip identification method
CN110889342A
Vision-based deceleration strip detection method and device and storage medium thereof
CN111401341A
Deceleration strip recognition method and system
CN111738040A
Method, device and equipment for detecting dynamic object in raster map
CN111680673A
Point cloud clustering and surrounding method based on binary occupancy grid
CN114187425A