Lane line tracking method based on graph optimization
By adopting the graph optimization method in lane line tracking, associating lane line points and using the gradient descent method to optimize the objective function, the shortcomings of the lane line tracking method in positioning error and road surface gradient are solved, and more accurate and robust lane lines are achieved. Model parameter estimation.
Patent Information
- Application Number
- CN202410258802.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-07
- Publication Date
- 2024-09-17
AI Technical Summary
Existing lane line tracking methods affect the results when positioning or motion information errors, and the initial value of the homography matrix is difficult to adapt to road surfaces with different slopes, resulting in inaccurate lane line tracking results.
A lane line tracking method based on graph optimization is adopted, by associating lane line points in the vehicle body coordinate system, creating nodes and edges, using the gradient descent method to optimize the objective function to obtain lane line parameters, taking into account the vehicle attitude and road slope, and constructing a reprojection Constraints to reduce the impact of road surface changes.
It improves the robustness and accuracy of lane line tracking, can output lane line model parameters for multiple consecutive moments, and reduces the impact of road slope and vehicle body bumps on the results.
Smart Images

Figure CN118658134A
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of autonomous driving, and in particular relates to a lane line tracking method based on graph optimization. Background Art
[0002] Lane detection and tracking are essential functions in autonomous driving. Functional modules such as LDW (lane departure warning) and LKA (lane keeping assist) all rely on continuous and stable lane detection and tracking.
[0003] The prerequisite for lane line tracking is to obtain lane line detection results. Generally, lane line points are detected through traditional image processing or deep learning methods.
[0004] The purpose of lane line tracking is mainly to output lane line model parameters that are relatively stable in space and continuous in time through modeling and tracking algorithms.
[0005] According to the applicant, the patent named Lane Tracking Method and Device, with publication number CN109145860B, uses a similar algorithm to the SORT algorithm to associate the detection results of consecutive frames for tracking and filtering. However, this method uses relatively simple information and only smoothes and filters the observed lane points.
[0006] The patent is titled "Lane Tracking Method and Device", with publication number CN113168708B. This method has limitations, specifically:
[0007] 1) When calculating the first prediction value, if there is an error in the positioning or motion information, it will affect the subsequent results. The solution lacks optimization of the motion information or positioning information;
[0008] 2) In the calculation of the first mapping relationship, the author's goal is to use the predicted value and detection information to obtain the real-time mapping relationship between the two coordinate systems, eliminate the impact of road surface changes, and improve the accuracy of lane line tracking. However, the initial value of the homography matrix is difficult to adapt to roads with different slopes. After the initial homography matrix is mapped, it may be difficult to match the first detection information due to road surface changes, or the matching may be wrong, resulting in the inability to calculate the correct homography matrix, affecting the correctness of the final lane line result.
[0009] Common tracking methods all have common shortcomings:
[0010] Only each lane line is tracked separately, or parallel assumptions are added between lane lines in the same frame. The various constraints are not optimized together, but are calculated independently. The closed loop of the entire system is not completed, and only a single variable is tracked. Summary of the invention
[0011] The technical problem to be solved by the present invention is to overcome the shortcomings of the prior art and provide a lane line tracking method based on graph optimization, which systematically designs a lane line tracking method by integrating various variables such as image domain information, information in the vehicle coordinate system, and vehicle posture.
[0012] The present invention provides a lane line tracking method based on graph optimization, comprising the following steps:
[0013] Step S1. The positioning module provides vehicle positioning information, projects the lane line points detected on the image to the BEV in the vehicle coordinate system, and uses the SORT tracking algorithm to associate and match the current detect_lanes and history_lanes to generate track_lanes, which contains the current observation points and historical observation points; creates nodes according to the observed states or variables, creates edges according to the constraint relationships between the observed states or variables, and generates a graph through the created nodes and edges.
[0014] Step S2. Use the gradient descent method to optimize the graph so that the objective function of each edge in the graph is minimized, and then the final lane line parameters are obtained.
[0015] As a further technical solution of the present invention, in step S1, the positioning information includes the position (x, y, z) and posture (roll, pitch, yaw) of the vehicle. The specific process of association matching is as follows: each lane line in history_lanes contains the observed lane line point and the positioning information (x, y, z, roll, pitch, yaw) of the vehicle at the time of observation. According to the positioning information of the historical lane line and the current moment positioning information, a coordinate transformation matrix is calculated to convert the historical lane line observation point to the vehicle body coordinate system at the current moment, and then the distance between the historical lane line observation point and the current lane line observation point after the coordinate conversion is calculated. If the distance between the historical lane line A and a current lane line B is less than the threshold, the observation point and positioning information of B are added to the attribute list of A, and the historical lane line A is updated; finally, several historical lane lines that meet the conditions are selected as track_lanes, and the next step of generating the graph is entered.
[0016] Furthermore, in step S1, the slope information of the road surface is provided by a laser ranging module or a map. The laser radar can measure the coordinates of each point on the slope. Through point A (ax, ay, az) and point B (bx, by, bz), the slope angle θ between the AB segments can be calculated as tanθ = (bz-az) / (bx-ax).
[0017] Furthermore, in step S2, each edge of the graph is equivalent to an equation, and one equation is an objective function. The variables of the equation are lane curve parameters, camera_pose, ground_slope and location. The gradient descent method is used to minimize the objective function to obtain the solution of the equation and obtain the final lane parameters.
[0018] The advantages of the present invention are:
[0019] 1. Designed a graph optimization framework for lane lines, and used graph optimization methods to estimate the optimal lane line model parameters and vehicle posture and positioning information;
[0020] 2. By associating lane line observation points of several adjacent frames, lane line model constraints are constructed, making the solved lane line model more robust and able to output lane line model parameters that meet observations at multiple consecutive moments, making the results more accurate and reliable.
[0021] 3. The uneven ground is taken into account in the BEV projection. The pitch angle of the vehicle is used as the variable to be optimized, the homography matrix is calculated, and the reprojection constraints are constructed, which reduces the impact of the road slope or the up and down bumps of the vehicle body on the accuracy of the lane line model parameter estimation. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a scheme framework diagram of the present invention.
[0023] Figure 2 Schematic diagram of lane lines at time t in an embodiment of the present invention;
[0024] Figure 3 This is a schematic diagram of a lane line diagram constructed at time t in an embodiment of the present invention. DETAILED DESCRIPTION
[0025] See also Figure 1 This embodiment provides a lane line tracking method based on graph optimization of the present invention, comprising the following steps:
[0026] Step S1. The positioning module provides vehicle positioning information, projects the lane line points detected on the image to the BEV in the vehicle coordinate system, and uses the SORT tracking algorithm to associate and match the current detect_lanes and history_lanes to generate track_lanes, which contains the current observation points and historical observation points; creates nodes according to the observed states or variables, creates edges according to the constraint relationships between the observed states or variables, and generates a graph through the created nodes and edges.
[0027] Step S2. Use the gradient descent method to optimize the graph so that the objective function of each edge in the graph is minimized, and then the final lane line parameters are obtained.
[0028] In step S1, the positioning information includes the position (x, y, z) and posture (roll, pitch, yaw) of the vehicle. The specific process of association matching is as follows: each lane line in history_lanes contains the observed lane line point and the positioning information of the vehicle at the time of observation (x, y, z, roll, pitch, yaw). According to the positioning information of the historical lane line and the current moment positioning information, a coordinate transformation matrix is calculated to convert the historical lane line observation point to the vehicle body coordinate system at the current moment, and then the distance between the historical lane line observation point and the current lane line observation point after the coordinate conversion is calculated. If the distance between the historical lane line A and the current lane line B is less than the threshold, the observation point and positioning information of B are added to the attribute list of A, and the historical lane line A is updated; finally, several historical lane lines that meet the conditions are selected as track_lanes, and the next step of generating the graph is entered.
[0029] In step S1, the slope information of the road surface is provided by a laser ranging module or a map.
[0030] In step S2, each edge of the graph is equivalent to an equation, and an equation is an objective function. The variables of the equation are lane curve parameters, camera_pose, ground_slope and location. The objective function is minimized using the gradient descent method to obtain the solution of the equation and obtain the final lane parameters.
[0031] In this embodiment, Figure 2 As shown, in the vehicle coordinate system, assuming that the lane lines detected at the current time t are l1, l2, l3, l4, l5, l6, l7, and l8, among which l1 to l4 are a group, they are parallel to each other, and m1 is their center line; l5 to l8 are a group, they are parallel to each other, and m2 is their center.
[0032] The constructed lane map is as follows: Figure 3 shown.
[0033] In the figure, for a fixed point:
[0034] (1) Model parameters (e.g., cubic polynomials) for each lane line f1-f8, and model parameters for each set of lane line center lines m1 and m2;
[0035] (2) The current posture of the vehicle camera relative to the horizontal plane. The key is the pitch angle, because the pitch angle is easily affected by the slope of the road or the bumps of the vehicle body;
[0036] (3) The current vehicle positioning information vehicle_pose, such as (x, y, yaw);
[0037] (4) The point on each lane line l1-l8 in the vehicle coordinate system at the current time t;
[0038] (5) Points on lane lines l1 to l8 observed at the previous time t-1;
[0039] By matching the lane line at time t and the lane line at time t-1, the observation points of lane lines l1~l8 at the previous time can be obtained.
[0040] This can also be expanded to points on lane lines l1~l8 observed at time t-2, t-3, ...tn;
[0041] The matching method can adopt different methods such as nearest neighbor matching, Hungarian algorithm, KM algorithm, etc.
[0042] For edges:
[0043] Edges are the relationships between vertices, including:
[0044] (1) The points on the currently observed lane line must satisfy the lane line model, such as a cubic polynomial, the blue edge in the figure above.
[0045] (2) The same set of lane lines must satisfy a parallel relationship, such as the yellow edges in the figure above.
[0046] Taking a cubic polynomial as an example, C1 / C2 / C3 of f1 to f4 must be equal to C1 / C2 / C3 of m1, and C1 / C2 / C3 of f5 to f8 must be equal to C1 / C2 / C3 of m2;
[0047] (3) The points on the lane line must satisfy the reprojection constraints, as shown in the red edge in the figure above.
[0048] The homography matrix can be calculated through the vehicle posture and the internal and external parameters of the camera. The lane line points on the image can be projected to the bev of the vehicle coordinate system through the homography matrix, corresponding to the points l1~l8.
[0049] Since the internal and external parameters of the camera are generally fixed, but when the image domain is projected to the BEV, the road surface may not meet the assumption that the ground is horizontal, so the pitch angle is added here as a variable to be optimized.
[0050] (4) Points on the same lane line at adjacent moments must satisfy the same model parameters, as shown by the purple edge in the figure above.
[0051] The mapping relationship between the observation point at time t-1 and the vehicle coordinate system at time t is obtained through the vehicle positioning information (t, vehicle_pose) and (t-1, vehicle_pose). The lane line observation point at time t-1 is projected to the current vehicle coordinate system. The matching algorithm in tracking is used to calculate which lane line model f1~f8 each point belongs to. Each point must satisfy the lane line model parameters (cubic polynomial).
[0052] It can also be expanded to: the observation points at time t-2, t-3, ..., tn are mapped to the current lane line model through positioning information + matching algorithm to construct more purple edges.
[0053] After defining the n variable vertices and m error term edges to be optimized, the next step is to optimize and solve the m constraint equations composed of n variables. Usually, there are many equations and the analytical form cannot be determined directly, so an iterative method is used to solve them.
[0054] First, construct the objective function for each constraint equation, and then continuously iterate and update the value of the variable so that the difference of the objective function is continuously reduced and the solution of the equation is approached. The key to the iteration method is how to choose the descent method and how to choose the step size. There are mainly two methods: GN and LM.
[0055] The method of this embodiment integrates various variables such as image domain information, information in the vehicle coordinate system, and vehicle posture to systematically design a lane line tracking algorithm.
[0056] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above specific embodiments. The above specific embodiments and the description in the specification are only for further illustrating the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention to be protected. The scope of the present invention to be protected is defined by the claims and their equivalents.
Claims
1. A lane tracking method based on graph optimization, characterized in that: The following steps are included: Step S1. The positioning module provides vehicle positioning information, projects the lane line points detected on the image to the BEV in the vehicle coordinate system, and uses the SORT tracking algorithm to associate and match the current detect_lanes and history_lanes to generate track_lanes, which contains the current observation points and historical observation points; creates nodes according to the observed states or variables, creates edges according to the constraint relationships between the observed states or variables, and generates a graph through the created nodes and edges. Step S2. Use the gradient descent method to optimize the graph so that the objective function of each edge in the graph is minimized, and then the final lane line parameters are obtained.
2. The lane tracking method based on graph optimization according to claim 1, characterized in that: In step S1, the positioning information includes the position (x, y, z) and posture (roll, pitch, yaw) of the vehicle. The specific process of association matching is as follows: each lane line in history_lanes contains the observed lane line point and the positioning information (x, y, z, roll, pitch, yaw) of the vehicle at the time of observation. According to the positioning information of the historical lane line and the current moment positioning information, a coordinate transformation matrix is calculated to convert the historical lane line observation point to the vehicle body coordinate system at the current moment, and then the distance between the historical lane line observation point and the current lane line observation point after the coordinate transformation is calculated. If the distance between the historical lane line A and the current lane line B is less than the threshold, the observation point and positioning information of B are added to the attribute list of A, and the historical lane line A is updated; finally, several historical lane lines that meet the conditions are selected as track_lanes, and the next step of generating the graph is entered.
3. The lane tracking method based on graph optimization according to claim 1, characterized in that: In step S1, the slope information of the road surface is provided by a laser ranging module or a map. The laser radar can measure the coordinates of each point on the slope. Through point A (ax, ay, az) and point B (bx, by, bz), the slope angle θ between the AB segments can be calculated as tan θ = (bz-az) / (bx-ax).
4. The lane tracking method based on graph optimization according to claim 1, characterized in that: In step S2, each edge of the graph is equivalent to an equation, and one equation is an objective function. The variables of the equation are lane curve parameters, camera_pose, ground_slope and location. The objective function is minimized by using the gradient descent method to obtain the solution of the equation and obtain the final lane parameters.
Citation Information
Patent Citations
Three-dimensional lane line generation method and device, electronic equipment and computer readable medium
CN114842436A
Lane line multi-sensor fusion method and system based on graph optimization, and electronic equipment
CN115984654A
Lane line tracking method based on graph optimization
CN118247752A
