Lane line generation method and device, computer device and storage medium
By subdividing and smoothing the ground point cloud, a raster intensity map is generated to produce lane lines, which solves the problem of inaccurate lane lines in traditional techniques and improves the accuracy of lane line generation.
Patent Information
- Application Number
- CN202210977136.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-15
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2042-08-15
AI Technical Summary
In traditional technologies, lane lines generated from road information collected by vehicle-mounted sensors are inaccurate, especially when vehicles or obstacles are blocking the way.
By acquiring the ground point cloud of the target road segment, dividing it into multiple ground point cloud subsets and smoothing them, a raster intensity map is generated, and lane lines are generated using the target raster.
It improves the accuracy of lane line generation, reduces the impact of obstacles on ground points, and ensures the accuracy of lane lines.
Smart Images

Figure CN115239841B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of artificial intelligence, and in particular to a lane line generation method and device, computer equipment and a storage medium. BACKGROUND
[0002] With the development of artificial intelligence technology, automatic driving has attracted more and more attention, and automatic driving is highly dependent on semantic maps. The semantic map has traffic element information such as roads, traffic signs, lane lines, and obstacles, and is used to control the steering, speed, and path planning of a vehicle.
[0003] In the traditional technology, lane lines are obtained by processing road information collected by a vehicle-mounted sensor or the like. However, due to the obstruction of a vehicle or an obstacle, the generated lane lines are inaccurate. SUMMARY
[0004] Therefore, it is necessary to provide a lane line generation method, device, computer equipment, and computer readable storage medium capable of improving the accuracy of lane lines to solve the above technical problems.
[0005] In a first aspect, the present application provides a lane line generation method. The method comprises:
[0006] obtaining a ground point cloud corresponding to a target road section;
[0007] dividing the ground point cloud into a plurality of ground point cloud subsets, respectively smoothing each ground point cloud subset to obtain a target point cloud;
[0008] generating a grid intensity map based on the target point cloud;
[0009] obtaining a plurality of target grids in the grid intensity map, and generating a lane line of the target road section based on the target grids.
[0010] In one embodiment, dividing the ground point cloud into a plurality of ground point cloud subsets comprises:
[0011] obtaining a sequence of pose points corresponding to the target road section, and calculating the curvature of each pose point in the sequence of pose points;
[0012] statistically obtaining a curve curvature corresponding to a plurality of consecutive pose points, and determining a division pose point based on the curve curvature and a curvature threshold;
[0013] obtaining a division parameter of the ground point cloud based on the division pose point;
[0014] dividing the ground point cloud into a plurality of ground point cloud subsets based on the division parameter.
[0015] In an embodiment, the calculating the bending degree of each pose point in the sequence of pose points comprises:
[0016] obtaining a target pose point in the sequence of pose points, obtaining a next adjacent pose point of the target pose point as a first reference pose point, and obtaining a next adjacent pose point of the first reference pose point as a second reference pose point;
[0017] calculating a first slope between the target pose point and the first reference pose point, and a second slope between the first reference pose point and the second reference pose point;
[0018] calculating a difference between the second slope and the first slope to obtain the bending degree of the target pose point.
[0019] In an embodiment, the calculating the bending degree of each pose point in the sequence of pose points comprises:
[0020] obtaining an initial curve bending degree and a current pose point in the sequence of pose points;
[0021] obtaining a current curve bending degree according to the bending degree corresponding to the current pose point and the initial curve bending degree;
[0022] if the current curve bending degree is less than the bending degree threshold, obtaining a next pose point of the current pose point as a new current pose point, taking the current curve bending degree as a new initial curve bending degree, and repeating the step of obtaining the current curve bending degree according to the bending degree corresponding to the current pose point and the initial curve bending degree;
[0023] if the current curve bending degree is greater than the bending degree threshold, taking the current pose point as a division pose point, obtaining a next pose point of the current pose point as a new current pose point, and repeating the step of obtaining the initial curve bending degree and the current pose point in the sequence of pose points until the last pose point in the sequence of pose points;
[0024] obtaining a plurality of division parameters based on each of the division pose points.
[0025] In an embodiment, the calculating the bending degree of each pose point in the sequence of pose points comprises:
[0026] if the current curve bending degree is less than the bending degree threshold, calculating a distance between any two adjacent pose points between a division pose point closest to the current pose point and the current pose point;
[0027] determine, based on the distance and a distance threshold, a partition pose point closest to the current pose point from among the partition pose points between the closest partition pose point and the current pose point.
[0028] In an embodiment, the smoothing of each of the ground point cloud subsets comprises:
[0029] performing spatial plane fitting on the ground points in the ground point cloud subset to obtain a spatial plane equation corresponding to the ground point cloud subset;
[0030] solving a height value of the ground point in the spatial plane equation based on the spatial plane equation;
[0031] replacing a height coordinate in the ground point with the height value to obtain a target point corresponding to the ground point.
[0032] In an embodiment, the generation of the grid intensity map based on the target point cloud comprises:
[0033] generating a point cloud intensity map based on the reflection intensity corresponding to the target points in the target point cloud;
[0034] dividing the point cloud intensity map into a plurality of grids of a preset size;
[0035] counting the reflection intensity corresponding to the target points in the grid to obtain a grid intensity corresponding to the grid;
[0036] generating a grid intensity map based on the grid intensity corresponding to each of the grids.
[0037] In a second aspect, the present application further provides a lane line generation device. The device comprises:
[0038] an acquisition module configured to acquire a ground point cloud corresponding to a target road section;
[0039] a division module configured to divide the ground point cloud into a plurality of ground point cloud subsets, and to smooth each of the ground point cloud subsets to obtain a target point cloud;
[0040] a grid intensity map generation module configured to generate a grid intensity map based on the target point cloud;
[0041] a lane line generation module configured to acquire a plurality of target grids in the grid intensity map, and to generate a lane line of the target road section based on the target grids.
[0042] In a third aspect, the present application further provides a computer device. The computer device comprises a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0043] obtain ground point clouds corresponding to a target road section;
[0044] divide the ground point clouds into a plurality of ground point cloud subsets, and respectively perform smoothing processing on each of the ground point cloud subsets to obtain target point clouds;
[0045] generate a grid intensity map based on the target point clouds;
[0046] obtain a plurality of target grids in the grid intensity map, and generate lane lines of the target road section based on the target grids.
[0047] In a fourth aspect, the present application further provides a computer readable storage medium. The computer readable storage medium has a computer program stored thereon, and the computer program is executed by a processor to implement the following steps:
[0048] obtain ground point clouds corresponding to a target road section;
[0049] divide the ground point clouds into a plurality of ground point cloud subsets, and respectively perform smoothing processing on each of the ground point cloud subsets to obtain target point clouds;
[0050] generate a grid intensity map based on the target point clouds;
[0051] obtain a plurality of target grids in the grid intensity map, and generate lane lines of the target road section based on the target grids.
[0052] The lane line generation method, device, computer device, storage medium and computer program product improve the accuracy of ground point cloud processing by obtaining ground point clouds corresponding to a target road section, dividing the ground point clouds into a plurality of ground point cloud subsets, respectively performing smoothing processing on the ground point cloud subsets to obtain target point clouds, and performing smoothing processing on the ground point cloud subsets according to the characteristics of each ground point cloud subset. The lane line generation method, device, computer device, storage medium and computer program product improve the accuracy of generating lane lines by generating a grid intensity map based on the target point clouds, obtaining a plurality of target grids from the grid intensity map, and generating lane lines of the target road section according to the target grids. The size of the target grids is large and the characteristics are obvious, so that the accuracy of obtaining the target grids can be improved, the influence of obstacle ground points can be reduced, and the accuracy of generating lane lines can be improved. BRIEF DESCRIPTION OF DRAWINGS
[0053] Figure 1 An application environment diagram of the lane line generation method in one embodiment;
[0054] Figure 2 A flowchart of the lane line generation method in one embodiment;
[0055] Figure 3 A flowchart of the ground point cloud division step in one embodiment;
[0056] Figure 4 A flowchart for dividing parameters in an embodiment;
[0057] Figure 5 A flowchart for generating a grid intensity map in an embodiment;
[0058] Figure 6 A flowchart for a lane line generation method in another embodiment;
[0059] Figure 7 A schematic diagram of a grid intensity map in an embodiment;
[0060] Figure 8 A schematic diagram of a lane line in an embodiment;
[0061] Figure 9 A block diagram of a lane line generation apparatus in an embodiment;
[0062] Figure 10 An internal structure diagram of a computer device in an embodiment. DETAILED DESCRIPTION
[0063] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not intended to limit the present application.
[0064] The lane line generation method provided by the embodiments of the present application can be applied in an application environment as shown in Figure 1 The terminal 102 communicates with the server 104 through a network. The data storage system can store data required to be processed by the server 104. The data storage system can be integrated on the server 104, or placed on a cloud or other network server. The terminal 102 sends a lane line generation request to the server 104, and the server 104 receives the lane line generation request, obtains ground point clouds and pose point sequences corresponding to a target road section, divides the ground point clouds into a plurality of ground point cloud subsets according to the bending degrees of the pose points in the pose point sequences, respectively processes the ground point cloud subsets to obtain target point clouds, generates a grid intensity map based on the target point clouds, obtains a plurality of target grids in the grid intensity map, and generates lane lines of the target road section based on the target grids. The terminal 102 can be, but is not limited to, at least one of various personal computers, notebook computers, smart phones, tablet computers, and computing devices deployed on a vehicle end, etc. The server 104 can be implemented by an independent server or a server cluster composed of multiple servers.
[0065] In an embodiment, as shown in Figure 2As shown, a lane line generation method is provided, which can be applied to a computer device, which can be a terminal or a server, and can be executed by the terminal or the server itself alone or through interaction between the terminal and the server. The embodiment takes the method applied to a computer device as an example for illustration, including the following steps:
[0066] In step 202, ground point clouds corresponding to a target road section are obtained.
[0067] The point cloud refers to a collection of massive points representing the surface characteristics of a target object obtained by a measuring instrument collecting data on the target object in a 3D (Three-Dimensional) engineering. Each point in the point cloud contains X, Y, Z geometric coordinates, intensity values, classification values, etc. It can be understood that the point cloud is a collection of multiple points, each point having corresponding coordinates, intensity values, and classification values, etc. The point cloud can be obtained by a vehicle-mounted radar or from a cloud server. In an embodiment, the vehicle-mounted radar can be a laser radar; in another embodiment, the vehicle-mounted radar can be an ultrasonic radar, a millimeter wave radar, or a radar responsible for the accuracy requirements of autonomous driving to provide point cloud information. The ground point cloud refers to a collection of multiple points representing the ground.
[0068] Specifically, the computer device obtains ground point clouds representing road surface information of a target road section.
[0069] In an embodiment, the computer device obtains point clouds representing a target road section from a vehicle-mounted radar, performs point cloud segmentation on the point clouds to obtain initial ground point clouds, the initial ground point clouds contain multiple initial ground points having position information and reflection intensity information, the initial ground point clouds are located in a vehicle-mounted radar coordinate system, and the initial ground point clouds located in the vehicle-mounted radar coordinate system are converted into ground point clouds located in a world coordinate system by establishing a conversion relationship between the vehicle-mounted radar coordinate system and the world coordinate system; a set of pose points of the vehicle are determined using vehicle-mounted sensors and cameras, etc., and the pose points are located in the world coordinate system.
[0070] In step 204, the ground point clouds are divided into multiple ground point cloud subsets, each ground point cloud subset is subjected to smoothing processing, and a target point cloud is obtained.
[0071] The ground point cloud sub-set refers to a set composed of multiple ground points in the ground point cloud. It can be understood that the ground point cloud contains the ground point cloud sub-set. For example, the ground point cloud contains A, B, C, D, E, and F, and the ground point cloud sub-set contains A, C, D, and F. The smoothing process refers to a process of preprocessing the target data to achieve the desired effect. The object of the smoothing process can be one or more data in the X-axis, Y-axis, and Z-axis of the coordinate system. The smoothing process can be implemented using filters, least squares data smoothing algorithms, etc. For example, the coordinate values of the Z-axis representing the height in the coordinate are smoothed.
[0072] Specifically, the computer device divides the corresponding ground point cloud into multiple ground point cloud sub-sets according to the characteristics of the target section, smoothes each ground point cloud sub-set to obtain a corresponding target point cloud sub-set, and combines the target point cloud sub-sets to obtain the target point cloud.
[0073] In one embodiment, a filtering interval is established according to the height values of the ground points in the ground point cloud sub-set, the height value can be any one of the X-axis, Y-axis, and Z-axis coordinates, and the ground points with heights outside the filtering interval are filtered out, leaving the ground points with heights within the filtering interval, and the remaining ground points in each ground point cloud sub-set form the target point cloud. For example, the Z coordinates of the ground points in the ground point cloud sub-set represent the ground height, the average height of the ground points in one of the ground point cloud sub-sets is H, and H-L and H+L are set as the filtering interval, and L can be set according to the actual situation. The ground points with Z coordinates between H-L and H+L are left, and the ground points with sudden height changes are filtered out.
[0074] Step 206, generating a grid intensity map based on the target point cloud.
[0075] The grid intensity map refers to an image in which both the space and the reflection intensity are discretized. The grid intensity map can be represented as a grayscale image, a black-and-white image, or a color image. The grayscale image refers to a monochrome image with 256 levels of grayscale color steps or levels from black to white.
[0076] Specifically, the computer device generates a grid intensity map according to the position information and reflection intensity information of each target point in the target point cloud.
[0077] Step 208, obtaining multiple target grids in the grid intensity map, and generating a lane line of the target section based on the target grids.
[0078] The lane line refers to a line on the road that restricts and safeguards the driving of vehicles. The lane line is an important traffic sign in road traffic, and the lane line includes but is not limited to white dashed lines, white solid lines, yellow dashed lines, and yellow solid lines. For example, a pedestrian crossing line indicating that pedestrians are allowed to cross the vehicle lane, a lane boundary line separating the same direction traffic flow, and the like.
[0079] Specifically, the computer device obtains target grids representing lane lines in the grid intensity map, and generates lane lines of the target road section according to the target grids.
[0080] In one embodiment, the grid intensity map is presented on a terminal display, and an operator selects target grids representing lane lines by operating a mouse, a touch screen, or the like. A line segment between the target grids and adjacent target grids constitutes a lane line of the target road section.
[0081] In one embodiment, target grids representing lane lines are automatically obtained by identifying the reflection intensity of the grids, interpolation is performed between the target grids according to the physical distance between the target grids, and lane lines of the target road section are generated according to the target grids and the interpolation points between the target grids.
[0082] In the above lane line generation method, the ground point cloud corresponding to the target road section is obtained, the ground point cloud is divided into a plurality of ground point cloud subsets, the ground point cloud subsets are respectively smoothed to obtain target point clouds, the ground point cloud subsets are smoothed according to their characteristics, and the accuracy of ground point cloud processing is improved. The grid intensity map is generated based on the target point clouds, a plurality of target grids are obtained from the grid intensity map, and lane lines of the target road section are generated according to the target grids. The size of the target grid is large and the feature is obvious. The grid intensity map is generated based on the target point cloud, which can improve the accuracy of obtaining the target grid, reduce the influence of obstacle ground points, and improve the accuracy of generating the lane line.
[0083] In one embodiment, as shown in Figure 3 the ground point cloud is divided into a plurality of ground point cloud subsets, including:
[0084] In step 302, a sequence of pose points corresponding to the target road section is obtained, and the curvature of each pose point in the sequence of pose points is calculated.
[0085] The pose point refers to a point with position information and attitude information. It can be understood as a point representing the position information and orientation information of the vehicle. The position information can be represented by coordinates, and the attitude information can be represented by an angle. The curvature refers to the bending degree of the point on the curve. The curvature can be represented by the curvature of the point on the curve.
[0086] Specifically, the computer device obtains a sequence of pose points corresponding to the target road section, and calculates the curvature of the pose points according to the order of the pose points in the sequence of pose points and the coordinate information of the pose points.
[0087] In one embodiment, the pose points in the sequence of pose points are fitted to obtain a fitting curve corresponding to the sequence of pose points, the curvature of the pose points on the fitting curve is calculated, and the curvature of the pose points is taken as the curvature of the pose points.
[0088] In step 304, the curvatures of the plurality of continuous pose points are counted to obtain a curve curvature, and the curve curvature is compared with a curvature threshold to determine the division pose point.
[0089] The curve curvature refers to the degree of curvature of a curve composed of a plurality of pose points. The threshold, also known as the critical value, refers to the minimum or maximum value of an effect. The curvature threshold refers to the critical value for determining the division pose point. It can be understood that the minimum curve curvature for determining the division pose point is determined.
[0090] In an embodiment, the computer device subtracts the curvature corresponding to the pose point from the curvature corresponding to the previous adjacent pose point to obtain a curvature difference value, compares the curvature difference value with the curvature threshold, and determines the pose point with a curvature difference value greater than the curvature threshold as the division pose point. It can be understood that the point with a sudden change in curvature is determined as the division pose point.
[0091] Specifically, the computer device adds the curvatures corresponding to the plurality of continuous pose points in the pose point sequence to obtain a curve curvature, compares the curve curvature with the curvature threshold, and determines the division pose point according to the comparison result.
[0092] In step 306, the division parameters of the ground point cloud are obtained based on the division pose point.
[0093] The division parameter refers to a parameter for dividing the ground point cloud. The division parameter can be the X-axis value, Y-axis value, and Z-axis value of each division pose point, or a combination of the X-axis value, Y-axis value, and Z-axis value in each division pose point. The number of division parameters is consistent with the number of division pose points. For example, the coordinates of three division pose points are (x1, y1, z1), (x2, y2, z2), and (x3, y3, z3), and the three division parameters are x1, x2, and x3.
[0094] Specifically, the computer device determines the division parameters of the ground point cloud according to the coordinate information corresponding to the division pose point.
[0095] In step 308, the ground point cloud is divided into a plurality of ground point cloud subsets based on the division parameters.
[0096] Specifically, the ground points in the ground point cloud are divided into a plurality of ground point cloud subsets according to the division parameters.
[0097] In this embodiment, the curve curvature is calculated according to the curvature corresponding to the pose point, the division pose point is determined based on the comparison result of the curve curvature and the curvature threshold, the greater the curvature, the shorter the road section corresponding to the ground point cloud subset, which is beneficial to maintaining the height characteristics of the ground points in the road section, providing a reasonable basis for the division of the ground point cloud, and improving the accuracy of the division.
[0098] In one embodiment, the bending degree of each pose point in the sequence of pose points is calculated as follows:
[0099] A target pose point in the sequence of pose points is obtained, a next adjacent pose point of the target pose point is obtained as a first reference pose point, and a next adjacent pose point of the first reference pose point is obtained as a second reference pose point. A first slope between the target pose point and the first reference pose point and a second slope between the first reference pose point and the second reference pose point are calculated. A difference between the second slope and the first slope is calculated to obtain the bending degree of the target pose point.
[0100] The slope refers to the degree of inclination of a straight line with respect to a coordinate axis. It is usually represented by the tangent of the angle between the straight line and the coordinate axis, or the ratio of the difference between the vertical coordinates and the difference between the horizontal coordinates of two points. For example, the sequence of pose points includes four pose points A(x1, y1), B(x2, y2), C(x3, y3), and D(x4, y4). A point A is obtained as a target pose point, a point B is obtained as a first reference pose point, and a point C is obtained as a second reference pose point. The slope between the target pose point A and the first reference pose point B is (y2-y1) / (x2-x1), and the slope between the first reference pose point B and the second reference pose point C is (y3-y2) / (x3-x2). The bending degree of the target pose point A is (y3-y2) / (x3-x2)-(y2-y1) / (x2-x1).
[0101] Specifically, a target pose point for which the bending degree is to be calculated is obtained, a next pose point of the target pose point is obtained as a first reference pose point, and a first slope between the target pose point and the first reference pose point is calculated. A next pose point of the first reference pose point is obtained as a second reference pose point, a second slope between the second reference pose point and the first reference pose point is calculated, and a difference between the first slope and the second slope is the bending degree of the target pose point.
[0102] In one embodiment, a previous adjacent pose point of the target pose point is obtained as a first reference point, a next adjacent pose point of the target pose point is obtained as a second reference point, a first slope between the first reference point and the target pose point and a second slope between the second reference point and the target pose point are calculated, and a difference between the first slope and the second slope is taken as the bending degree of the target pose point.
[0103] In this embodiment, the difference between the first slope and the second slope is taken as the bending degree of the target pose point, which reflects the bending degree of the target pose point on the curve composed of the target pose point, the first reference sampling point, and the second reference sampling point, thereby improving the calculation accuracy of the bending degree.
[0104] In one embodiment, as Figure 4The curve bending degree is obtained by counting the bending degrees corresponding to a plurality of continuous pose points, and the pose points are divided based on the curve bending degree and a bending degree threshold value, including:
[0105] In step 402, an initial curve bending degree and a current pose point in the sequence of pose points are obtained.
[0106] The initial curve bending degree refers to an initial value of the curve bending degree. It can be understood that the value of the initial curve bending degree is zero.
[0107] Specifically, the current pose point is obtained from the sequence of pose points, and the initial curve bending degree is obtained.
[0108] In step 404, a current curve bending degree is obtained according to the bending degree corresponding to the current pose point and the initial curve bending degree.
[0109] Specifically, the current curve bending degree is obtained by adding the bending degree corresponding to the current pose point to the initial curve bending degree.
[0110] In step 406, if the current curve bending degree is less than the bending degree threshold value, a next pose point of the current pose point is obtained as a new current pose point, the current curve bending degree is taken as a new initial curve bending degree, and the step of obtaining the current curve bending degree according to the bending degree corresponding to the current pose point and the initial curve bending degree is repeatedly executed.
[0111] Specifically, after each execution of step 404, the current curve bending degree is compared with the bending degree threshold value. If the current curve bending degree is less than the bending degree threshold value, a next pose point of the current pose point is obtained as a new current pose point, and step 404 is repeated.
[0112] In step 408, if the current curve bending degree is greater than the bending degree threshold value, the current pose point is taken as a divided pose point, a next pose point of the current pose point is obtained as a new current pose point, and the step of obtaining the initial curve bending degree and the current pose point in the sequence of pose points is repeatedly executed until the last pose point in the sequence of pose points.
[0113] Specifically, after each execution of step 404, the current curve bending degree is compared with the bending degree threshold value. If the current curve bending degree is greater than the bending degree threshold value, the current pose point is taken as a divided pose point, a next pose point of the current pose point is obtained as a new current pose point, the initial curve bending degree is set to zero, and steps 402, 404 and 406 are repeatedly executed until the obtained current pose point is the last pose point in the sequence of pose points.
[0114] In step 410, a plurality of divided parameters are obtained based on the divided pose points.
[0115] Specifically, the division parameter is determined according to the position information of the division pose point.
[0116] In one embodiment, the division parameter is determined according to the orientation of the target road section on the coordinate axis and the position information of the division pose point. For example, if the orientation of the target road section is to extend along the X-axis direction, the X-coordinate value in the position information of the division pose point is taken as the division parameter.
[0117] In this embodiment, the division pose point is determined according to the comparison result of the curve bending degree and the bending degree threshold. It can be understood that the greater the bending degree of the target road section, the more the determined division pose points, the higher the road bending degree, and the greater the probability of height value change. Therefore, the road section with high bending degree is divided into more ground point cloud sub-sets, which is more conducive to maintaining the height characteristics of the ground points in each road section and improving the accuracy of the target road section lane line.
[0118] In one embodiment, the curve bending degree is obtained by counting the bending degrees corresponding to a plurality of continuous pose points, and the division pose point is determined based on the curve bending degree and the bending degree threshold, which further includes:
[0119] If the current curve bending degree of the continuous preset number of times is less than the bending degree threshold, the distance between any two adjacent pose points between the closest division pose point to the current pose point and the current pose point is calculated, and the division pose point between the closest division pose point to the current pose point and the current pose point is determined based on the distance and the distance threshold.
[0120] Wherein, the preset number of times refers to a preset number of times. It can be understood that the preset number of times is a specific numerical value. For example, the preset number of times is 50 times. The distance refers to the straight line distance between two points. The distance can be solved according to the coordinates of the two points. For example, the distance between point A(x1, y1, z1) and point B(x2, y2, z2) is ((x2-x1) 2 +(y2-y1) 2 +(z2-z1) 2 ) 1 / 2 .
[0121] Specifically, steps 404 and 406 are continuously executed, if the current curve bending degree is less than the bending degree threshold, the number of times that the current curve bending degree is less than the bending degree threshold is added by 1, if the number of times that the current curve bending degree is less than the bending degree threshold is equal to the preset number of times, the distance between the two adjacent pose points between the closest division pose point determined last time and the current pose point is calculated, the distances are summed in turn, and the sum result is compared with the distance threshold, if the sum result is less than the distance threshold, the distances are summed in turn, if the sum result is greater than the distance threshold, the corresponding next pose point in the last added distance is taken as the division pose point, and the above step of summing the distances in turn is repeated until the current pose point.
[0122] In the embodiment, when the number of times that the curvature of the continuous curve is less than the curvature threshold is equal to the preset number of times, the road segment between the last divided pose point and the current pose point is equally divided, which can be understood as that the ground point cloud is divided by using the equal division method for the straight line segment. The equal division of the straight line segment can reduce the influence of the non-ground points caused by the obstacles on the ground points, and improve the accuracy of calculating the target points.
[0123] In one embodiment, the smoothing processing of each ground point cloud sub-set respectively includes:
[0124] The spatial plane fitting is performed on the ground points in the ground point cloud sub-set to obtain a spatial plane equation corresponding to the ground point cloud sub-set; the height value of the ground point in the spatial plane equation is solved based on the spatial plane equation; the height value is used to replace the height coordinate in the ground point coordinate to obtain the target point corresponding to the ground point.
[0125] The spatial plane fitting refers to a process of fitting discrete points in space to a plane by optimization. There are various methods for spatial plane fitting, which can be selected according to actual conditions. The spatial plane equation refers to an expression of a plane in space. It can be understood as an expression of the plane in which the discrete points after spatial plane fitting are located. For example, the expression of a three-dimensional spatial plane is Ax+By+Cz+D=0, where A, B, C, and D are parameters of the spatial plane expression. The height value refers to the numerical value of the height coordinate of the point corresponding to the ground point in the spatial plane equation. It can be understood as the height coordinate value of the point corresponding to the ground point in the spatial plane equation. The height coordinate refers to the height coordinate value in the ground point coordinate. The height value can be the same as the height coordinate of the ground point, or it can be different from the height coordinate of the ground point. For example, z1 in the ground point A(x1, y1, z1) represents the height of the ground point relative to the ground, and z1 is the height coordinate of the ground point A. The x1 and y1 of the ground point A are substituted into x and y in the spatial plane equation Ax+By+Cz+D=0 respectively, and the calculated z value is the height value of the ground point A.
[0126] In one embodiment, the number of ground points corresponding to each height coordinate in the ground point cloud sub-set is counted, and the number of ground points corresponding to each height coordinate is compared. The height coordinate with the largest number is taken as the height coordinate of the plane in which the ground point cloud sub-set is located.
[0127] Specifically, the spatial plane fitting is performed on the ground points in the ground point cloud sub-set to obtain the spatial plane equation of the plane in which the ground points after spatial plane fitting are located. The height value corresponding to the ground point is obtained by substituting the coordinate value representing the position in the ground point into the spatial plane equation. The height value is used to replace the height coordinate in the ground point coordinate to obtain the target point corresponding to the ground point.
[0128] In the embodiment, the ground points in the ground point cloud sub-set are adjusted to a spatial plane by a spatial plane fitting program, a spatial plane expression corresponding to the spatial plane is solved, the ground points are converted into target points in the same spatial plane, and the ground point cloud of a target road section in real life is kept consistent on a plane, so that the accuracy of the target point cloud is improved.
[0129] In one embodiment, as Figure 5 Generating a grid intensity map based on the target point cloud set includes:
[0130] Step 502, generating a point cloud intensity map based on the reflection intensity corresponding to the target points in the target point cloud.
[0131] The reflection intensity refers to laser reflection intensity, and the intensity information is related to the surface material, roughness, incident angle direction of the target, and the emission energy and laser wavelength of the instrument. The reflection intensities of the lane line part in the lane and the ground non-lane line part are different, so that the reflection intensities of the ground points representing the lane line and the ground points representing the non-lane line are different.
[0132] Specifically, the position of the target point in the point cloud intensity map is determined according to the position information of the target point, and the color of the target point in the point cloud intensity map is determined according to the reflection intensity of the target point.
[0133] In one embodiment, a corresponding relationship between the reflection intensity and the color is set, or a corresponding relationship between the reflection intensity interval and the color is set.
[0134] Step 504, dividing the point cloud intensity map into a plurality of grids of a preset size.
[0135] The grid refers to dividing space into regular grids, and each grid is called a grid. Each grid can be assigned a corresponding attribute value to represent the corresponding entity. The preset size refers to the size set in advance. It can be understood that the preset size refers to the length, width and height of the grid. The preset size can be set with reference to the size of the point cloud intensity map, or can be set according to experience.
[0136] Specifically, the point cloud intensity map is divided into a plurality of grids according to the preset size.
[0137] Step 506, counting the reflection intensity corresponding to the target points in the grid to obtain the grid intensity corresponding to the grid.
[0138] The grid intensity refers to the reflection intensity of the grid.
[0139] Specifically, the target points contained in the grid are obtained according to the vertex coordinate table of the grid, the reflection intensities corresponding to the target points are summed, and the result of the summation is divided by the number of the target points to obtain the reflection intensity corresponding to the grid. That is, the intensity of the grid is represented by the average intensity value of the point cloud in the grid.
[0140] In step 508, a grid intensity map is generated based on the grid intensities corresponding to the grids.
[0141] Specifically, the color of the grid in the grid intensity map is determined according to the grid intensity corresponding to the grid.
[0142] In this embodiment, the point cloud intensity map is converted into a grid intensity map, the number of grids is less than the number of target points, the calculation amount is reduced, the speed of generating the target road section lane line is improved, and in addition, the grid is highly visible, the speed and accuracy of determining the target grid are improved.
[0143] In one specific embodiment, the flow of generating the target road section lane line is as shown in Figure 6
[0144] The first point cloud and the pose point sequence of the target road section collected by the laser radar sensor, the camera, the positioning system and the like are obtained, the first point cloud is located in the laser radar sensor coordinate system, the pose point sequence is located in the world coordinate system, the conversion relationship between the laser radar sensor coordinate system and the world coordinate system is calculated based on the pose point sequence, and the first point cloud is converted into the second point cloud located in the world coordinate system through the conversion relationship.
[0145] The Sample_consensus algorithm (random sample consensus segmentation algorithm, an algorithm for segmenting geometric elements such as lines and surfaces from point clouds) in the PCL library (Point Cloud Library, a large cross-platform open source C++ programming library based on point cloud related research, which implements a large number of point cloud related general algorithms and efficient data structures, involving point cloud acquisition, filtering, segmentation, registration, retrieval, feature extraction, identification, tracking, surface reconstruction, visualization, etc. Supports multiple operating system platforms and can run on Windows, Linux, Android, Mac OS X, and some embedded real-time systems) is used to segment the second point cloud to obtain the ground point cloud representing the ground of the target road section.
[0146] A first slope between the first pose point and the second pose point in the sequence of pose points and a second slope between the second pose point and the third pose point are calculated, and the bending degree of the first pose point is obtained by subtracting the first slope from the second slope. In the same way, the bending degree corresponding to each pose point in the sequence of pose points is calculated. An initial curve bending degree is obtained, the first pose point in the sequence of pose points is taken as a current pose point, the bending degree corresponding to the current pose point is added to the initial curve bending degree to obtain a curve bending degree, and the curve bending degree is compared with a bending degree threshold. If the curve bending degree is less than the bending degree threshold, the next pose point of the current pose point is taken as a new current pose point, the bending degree corresponding to the new current pose point is added to the curve bending degree to obtain a new curve bending degree. If the curve bending degree is greater than the bending degree threshold, the current pose point is determined as a division pose point, the initial curve bending degree is set to zero, the next pose point of the division pose point is taken as a current position point, and the above process is repeated until the last pose point in the sequence of pose points. A plurality of division pose points are determined according to the above process.
[0147] The ground point cloud corresponding to the target section extends in the X-axis direction in the world coordinate system, and the Z-axis of the ground point represents the height from the ground. The X-axis coordinate of each division pose point is determined as a division parameter, the ground point cloud is divided into a plurality of ground point cloud subsets according to the division parameter, and a spatial plane equation corresponding to each ground point cloud subset is obtained by performing spatial plane fitting on each ground point cloud subset. The X-axis coordinate and the Y-axis coordinate of the ground point are substituted into the spatial plane equation to obtain the numerical value of the Z-axis coordinate, the numerical value of the Z-axis coordinate obtained by solving is used to replace the Z-axis coordinate of the ground point, and the target point corresponding to the ground point is obtained. Based on the above method, the target point cloud corresponding to the ground point cloud is obtained.
[0148] The position of the target point in the point cloud intensity map is determined according to the position information of the target point in the target point cloud, and the color of the target point in the point cloud intensity map is determined according to the reflection intensity of the target point, thereby forming the point cloud intensity map. The point cloud intensity map is divided into a plurality of grids of a preset size, the reflection intensities of the ground points contained in the grids are summed, the sum is divided by the number of ground points contained in the grid to obtain the reflection intensity corresponding to the grid, the color of the grid in the grid intensity map is determined according to the reflection intensity of the grid, and the grid intensity map is formed, as shown in Figure 7 .
[0149] The grid intensity map is presented on the target display screen, the operator selects the target grid representing the lane line through the mouse, linearizes the adjacent grids and automatically differentiates them to generate target points with equal intervals, and the target lane corresponding to the target section is formed according to the target points and the line segments between adjacent target points, as shown in Figure 8 .
[0150] In the embodiment, the ground point cloud is divided into a plurality of ground point cloud subsets according to the curvatures corresponding to the pose points in the sequence of pose points, the target point cloud is obtained by respectively performing smoothing processing on the ground point cloud subsets, the ground point cloud is divided into ground point cloud subsets according to the curvatures of the road segments, the greater the curvature, the shorter the road segment corresponding to the ground point cloud subset, which is beneficial to maintaining the height characteristics of the ground points in the road segment, the ground point cloud subsets are smoothed according to the characteristics of the ground point cloud subsets, and the accuracy of ground point cloud processing is improved; the target point cloud is generated into a grid intensity map, a plurality of target grids in the grid intensity map are acquired, and the lane line of the target road segment is generated based on the target grids, so that the accuracy of acquiring the target grids is improved, the influence of the obstacle ground points is reduced, and the accuracy of generating the lane line is improved.
[0151] It should be understood that, although each step in the flowchart involved in each embodiment as described above is displayed in sequence according to the arrow, these steps are not necessarily executed in sequence according to the order of the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other orders. Moreover, at least part of the steps in the flowchart involved in each embodiment as described above can include multiple steps or stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or steps or stages in other steps.
[0152] Based on the same inventive concept, the embodiment of the present application also provides a lane line generation device for implementing the lane line generation method as described above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more lane line generation device embodiments provided below can refer to the limitations of the lane line generation method described above, which will not be described here.
[0153] In one embodiment, as shown in Figure 9 a lane line generation device is provided, comprising an acquisition module 902, a division module 904, a grid intensity map generation module 906, and a lane line generation module 908, wherein:
[0154] The acquisition module 902 is configured to acquire a ground point cloud corresponding to a target road segment.
[0155] The division module 904 is configured to divide the ground point cloud into a plurality of ground point cloud subsets, and perform smoothing processing on each ground point cloud subset to obtain a target point cloud.
[0156] The grid intensity map generation module 906 is configured to generate a grid intensity map based on the target point cloud.
[0157] The lane line generation module 908 is configured to acquire a plurality of target grids in the grid intensity map, and generate lane lines of the target road section based on the target grids.
[0158] In an embodiment, the acquisition module 902 is further configured to acquire a sequence of pose points corresponding to the target road section, and calculate a curvature of each pose point in the sequence of pose points; count curvatures corresponding to a plurality of continuous pose points to obtain a curve curvature, and determine a division pose point based on the curve curvature and a curvature threshold; obtain a division parameter of the ground point cloud based on the division pose point; and divide the ground point cloud into a plurality of ground point cloud subsets based on the division parameter.
[0159] In an embodiment, the division module 904 is further configured to acquire a target pose point in the sequence of pose points, acquire a next adjacent pose point of the target pose point as a first reference pose point, and acquire a next adjacent pose point of the first reference pose point as a second reference pose point; calculate a first slope between the target pose point and the first reference pose point, and a second slope between the first reference pose point and the second reference pose point; and calculate a difference between the second slope and the first slope to obtain the curvature of the target pose point.
[0160] In an embodiment, the division module 904 is further configured to acquire an initial curve curvature and a current pose point in the sequence of pose points; obtain a current curve curvature according to a curvature corresponding to the current pose point and the initial curve curvature; if the current curve curvature is less than the curvature threshold, acquire a next pose point of the current pose point as a new current pose point, acquire the current curve curvature as a new initial curve curvature, and repeat the step of obtaining the current curve curvature according to the curvature corresponding to the current pose point and the initial curve curvature; if the current curve curvature is greater than the curvature threshold, acquire the current pose point as a division pose point, acquire a next pose point of the current pose point as a new current pose point, repeat the steps of acquiring the initial curve curvature and the current pose point in the sequence of pose points until a last pose point in the sequence of pose points, and obtain a plurality of division parameters based on each division pose point.
[0161] In an embodiment, the division module 904 is further configured to, if the current curve curvature is less than the curvature threshold for a continuous preset number of times, calculate a distance between any two adjacent pose points between a division pose point closest to the current pose point and the current pose point; and determine a division pose point between the division pose point closest to the current pose point and the current pose point based on the distance and a distance threshold.
[0162] In one embodiment, the partitioning module 904 is further configured to: perform spatial plane fitting on the ground points in the ground point cloud subset to obtain the spatial plane equation corresponding to the ground point cloud subset; solve for the height value of the ground point in the spatial plane equation based on the spatial plane equation; and replace the height coordinates in the ground point with the height value to obtain the target point corresponding to the ground point.
[0163] In one embodiment, the grid intensity map generation module 906 is further configured to: generate a point cloud intensity map based on the reflection intensity corresponding to the target point in the target point cloud; divide the point cloud intensity map into multiple grids of a preset size; count the reflection intensity corresponding to the target point in the grid to obtain the grid intensity corresponding to the grid; and generate a grid intensity map based on the grid intensity corresponding to each grid.
[0164] Each module in the aforementioned lane line generation device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
[0165] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 10 As shown, the computer device includes a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements a lane line adjustment method. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.
[0166] Those skilled in the art will understand that Figure 10The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0167] In an embodiment, a computer device is also provided, including a memory and a processor, the memory storing a computer program, and the processor implementing the steps in the above method embodiments when executing the computer program.
[0168] In an embodiment, a computer readable storage medium is provided, storing a computer program, and the computer program implementing the steps in the above method embodiments when executed by a processor.
[0169] In an embodiment, a computer program product is provided, including a computer program, and the computer program implementing the steps in the above method embodiments when executed by a processor.
[0170] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties.
[0171] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of the methods can be included. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric memory (Ferroelectric Random Access Memory, FRAM), phase change memory (Phase Change Memory, PCM), graphene memory, etc. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.
[0172] Any combination of the technical features of the above embodiments can be made. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combination of the technical features does not exist contradictory, it should be considered as the scope of the present application.
[0173] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent of the present application. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are within the scope of protection of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A method for generating lane lines, characterized in that, The method includes: Obtain the ground point cloud corresponding to the target road segment; Obtain the pose point sequence corresponding to the target road segment, and calculate the curvature of each pose point in the pose point sequence; The curvature of the curve is obtained by statistically analyzing the curvature corresponding to multiple consecutive pose points, and the pose points are divided based on the curvature of the curve and the curvature threshold. The division parameters of the ground point cloud are obtained based on the divided pose points; the division parameters are the X-axis value, Y-axis value, and Z-axis value of each divided pose point, or a combination of the X-axis value, Y-axis value, and Z-axis value of each divided pose point. The ground point cloud is divided into multiple ground point cloud subsets based on the partitioning parameters. Each of the aforementioned ground point cloud subsets is smoothed to obtain the target point cloud; A raster intensity map is generated based on the target point cloud; Multiple target grids are obtained from the grid intensity map, and lane lines of the target road segment are generated based on the target grids.
2. The method according to claim 1, characterized in that, The number of division parameters is the same as the number of division pose points.
3. The method according to claim 1, characterized in that, The calculation of the curvature of each pose point in the pose point sequence includes: Obtain the target pose point in the pose point sequence, obtain the next adjacent pose point of the target pose point as the first reference pose point, and obtain the next adjacent pose point of the first reference pose point as the second reference pose point. Calculate the first slope between the target pose point and the first reference pose point, and the second slope between the first reference pose point and the second reference pose point; The difference between the second slope and the first slope is calculated to obtain the curvature of the target pose point.
4. The method according to claim 1, characterized in that, The process of calculating the curvature corresponding to multiple consecutive pose points to obtain curve curvature, and determining the segmentation of pose points based on the curve curvature and curvature threshold, includes: Obtain the initial curve curvature and the current pose point in the pose point sequence; The curvature of the current curve is obtained by comparing the curvature of the current pose point with the curvature of the initial curve. If the current curve curvature is less than the curvature threshold, then the next pose point of the current pose point is obtained as the new current pose point, and the current curve curvature is used as the new initial curve curvature. The step of obtaining the current curve curvature based on the curvature corresponding to the current pose point and the initial curve curvature is repeated. If the current curve curvature is greater than the curvature threshold, then the current pose point is used as the division pose point, the next pose point of the current pose point is obtained as the new current pose point, and the steps of obtaining the initial curve curvature and the current pose point in the pose point sequence are repeated until the last pose point in the pose point sequence. Multiple partitioning parameters are obtained based on each of the partitioned pose points.
5. The method according to claim 4, characterized in that, The method further includes: If the curvature of the current curve is less than the curvature threshold after a predetermined number of consecutive counts, then the distance between any two adjacent pose points between the nearest division pose point and the current pose point is calculated. Based on the distance and distance threshold, determine the division pose points between the nearest division pose point to the current pose point and the current pose point.
6. The method according to claim 1, characterized in that, The smoothing process performed on each of the ground point cloud subsets includes: Spatial plane fitting is performed on the ground points in the ground point cloud subset to obtain the spatial plane equation corresponding to the ground point cloud subset; Based on the spatial plane equation, solve for the height value of the ground point in the spatial plane equation; The target point corresponding to the ground point is obtained by replacing the height coordinates in the ground point with the height value.
7. The method according to claim 1, characterized in that, The generation of the raster intensity map based on the target point cloud includes: A point cloud intensity map is generated based on the reflection intensity corresponding to the target point in the target point cloud. The point cloud intensity map is divided into multiple grids of a preset size; The grid intensity is obtained by statistically analyzing the reflection intensity corresponding to the target point in the grid. A grid intensity map is generated based on the grid intensity corresponding to each of the grids.
8. A lane line generation device, characterized in that, The device includes: The acquisition module is used to acquire the ground point cloud corresponding to the target road segment; A segmentation module is used to acquire the pose point sequence corresponding to the target road segment, calculate the curvature of each pose point in the pose point sequence, statistically analyze the curvature corresponding to multiple consecutive pose points to obtain the curve curvature, and determine the segmentation pose points based on the curve curvature and a curvature threshold; obtain the segmentation parameters of the ground point cloud based on the segmentation pose points; the segmentation parameters are the X-axis value, Y-axis value, and Z-axis value of each segmentation pose point, or a combination of the X-axis value, Y-axis value, and Z-axis value of each segmentation pose point; divide the ground point cloud into multiple ground point cloud subsets based on the segmentation parameters; and perform smoothing processing on each of the ground point cloud subsets to obtain the target point cloud. A raster intensity map generation module is used to generate a raster intensity map based on the target point cloud; The lane line generation module is used to acquire multiple target grids in the grid intensity map and generate lane lines for the target road segment based on the target grids.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Height measurement method, terminal equipment and computer storage medium
CN113077476A
Lane line marking auxiliary map generation method and device and computer equipment
CN113593026A
Road section and route generation method and device, equipment and computer readable storage medium
CN114298404A