An adaptive lane line fitting method for assisted driving scenarios
Through the adaptive lane line fitting method, combined with deep learning, clustering and sliding window strategies, the problem of lane line identification errors under complex road conditions is solved, and more accurate and stable lane line extraction is achieved.
Patent Information
- Application Number
- CN202311240855.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-25
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2043-09-25
AI Technical Summary
The prior art is difficult to accurately identify lane lines under complex road conditions, especially when lanes are unclear or radius of curvature are small, which can easily lead to lane line identification errors.
Adaptive lane line fitting method is used to convert the lane line pixel points output through deep learning to a two-dimensional coordinate system with the vehicle center as the origin, calculate the reference slope of the lane line, and integrate the clustering and sliding window lane line extraction. Strategy, design clustering rules, and use two fitting strategies to fit lane lines with left and right.
It effectively solves the problems of unstable lane line extraction fitting and wrong lane change recognition, and improves the accuracy and stability of lane line recognition.
Smart Images

Figure CN117372981B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to assisted driving technology, and in particular to an adaptive lane line fitting method for assisted driving scenarios. Background Art
[0002] Lane line recognition is an important function in autonomous driving scenarios. At present, lane line detection is mainly performed through deep learning. Lane line pixels in the image space are detected, and then the pixels detected by deep learning are classified into different lane lines through clustering or sliding window search to perform lane extraction. However, due to the complexity of road conditions, it is impossible to implement this function according to a specific rule. For example, when the lane lines on the road are not clear, the clustering method will identify a single lane line as multiple lane lines. In addition, the sliding window search method is more dependent on the sliding window search rules. The conventional solution performs better on straight roads; when the road has a small radius of curvature or the vehicle changes lanes, it is easy to identify errors. Summary of the invention
[0003] In order to solve the deficiencies in the prior art, the object of the present invention is to provide an adaptive lane line fitting method for assisted driving scenarios.
[0004] To achieve the purpose of the present invention, the technical solution adopted by the present invention is:
[0005] An adaptive lane line fitting method for assisted driving scenarios comprises the steps of:
[0006] (1) Convert the lane line pixels output by deep learning into a two-dimensional coordinate system with the vehicle center as the origin;
[0007] (2) Calculate the reference slope of the lane line based on the distribution of lane line pixels;
[0008] (3) Integrate the two lane extraction strategies of clustering and sliding window to extract the pixel set corresponding to the lane and design clustering rules according to the road conditions;
[0009] (4) Use two fitting strategies, left and right, to fit the lane in the pixel point set;
[0010] (5) Finally, multiple lane lines are formed, and the two lane lines closest to the dividing line are the current lane lines of the vehicle.
[0011] Furthermore, in step (1), the lane line pixel points output by deep learning are transformed into a two-dimensional coordinate system with the center of the vehicle as the origin by using the inverse perspective transformation method through the camera parameters, which is denoted as set SP.
[0012] Furthermore, in step (2), the set SP is divided into multiple parts according to the distance from the pixel point to the vehicle, and the feature vector of each set is calculated respectively as the reference slope of the lane line.
[0013] Furthermore, in step (2), all the pixels of the lane are divided into three parts according to the distance from the pixel to the vehicle, and are respectively recorded as sets SP1, SP2, and SP3 from near to far. The feature vectors of sets SP1, SP2, and SP3 are respectively obtained and recorded as V1, V2, and V3 as the reference slopes of the lane lines.
[0014] Furthermore, in step (3), the specific steps of extracting the corresponding pixel point sets belonging to the n lane lines are as follows:
[0015] (3.1) Set the dividing line with the center of the vehicle as the origin and the slope V1 as Lc; the line passing through the center of the vehicle and perpendicular to Lc is Lv;
[0016] (3.2) Cluster the set SP1 and divide the clustering rules according to the distance between the pixels. The close distance set SP1 is divided according to Clustering is performed based on the rules, Δy represents the longitudinal deviation, Δx represents the lateral deviation, and w represents the weight, and multiple clustering lines are obtained;
[0017] (3.3) Find the intersection points of multiple cluster lines and Lv. Assume there are n intersection points, denoted as P0, P1, ..., Pn, respectively. It can be considered that there are n lane lines at present.
[0018] (3.4) Taking P0, P1, ..., Pn as the starting points, parallel to the direction of Lc, in the set SP1, use the sliding window method to forward search for the pixel points belonging to the n lane lines respectively.
[0019] Furthermore, similar operations are performed on sets SP2 and SP3 to finally obtain corresponding pixel point sets belonging to n lane lines, which are recorded as SL1, SL2, ..., SLn.
[0020] Furthermore, in step (4), in the sets SL1, SL2, ..., SLn, a sampling scheme is used to fit two lane lines, one on the left and one on the right, in each set. If the curvatures of the left and right lane lines are consistent, it is considered that there is no lane change branch in the lane line of the pixel point in the set; if the curvatures are inconsistent, and the lane line pixels at the same vertical coordinate are greater than a certain threshold for 2m in a row, it is considered that there is a lane change branch in the lane line, and the current lane line should be expanded into two lanes.
[0021] The beneficial effect of the present invention is that, compared with the prior art, the present invention integrates two lane line extraction strategies, clustering and sliding window, and designs clustering rules according to road conditions, which can solve the unstable fitting problem of lane line extraction in traditional methods; the lane uses two fitting strategies, left and right, which can solve the error in lane change recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a flow chart of the adaptive lane line fitting method for assisted driving scenarios described in the present invention. DETAILED DESCRIPTION
[0023] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of this application.
[0024] like Figure 1 As shown, the adaptive lane line fitting method for assisted driving scenarios described in the present invention comprises the steps of:
[0025] (1) Perform lane line detection through deep learning to detect lane line pixel points in the image space; convert the lane line pixel points output by deep learning into a two-dimensional coordinate system with the vehicle center as the origin;
[0026] The inverse perspective transformation method is adopted through the camera parameters to transform the lane line pixels output by deep learning into a two-dimensional coordinate system with the vehicle center as the origin, which is denoted as the set SP.
[0027] Each pixel point of the lane line is represented by coordinates (x, y), and the lane line is the above coordinate set. By using the conversion relationship between various coordinate systems in the camera imaging process, the corresponding relationship between the world coordinate system and the image coordinate system is obtained. The inverse perspective transformation is simple in form and fast in calculation speed.
[0028] (2) Calculate the reference slope of the lane line based on the distribution of lane line pixels;
[0029] According to the distance from the pixel point to the vehicle, the set SP is divided into multiple parts, and the feature vector of each set is calculated respectively as the reference slope of the lane line.
[0030] For example, according to the distance from the pixel point to the vehicle, the pixels of all lanes are divided into three parts: short distance (0-30 meters), medium distance (30-60 meters), and long distance (60-120 meters). From near to far, they are respectively recorded as sets SP1, SP2, and SP3. The feature vectors of sets SP1, SP2, and SP3 are respectively obtained and recorded as V1, V2, and V3 as reference slopes of the lane lines.
[0031] (3) The two lane extraction strategies of clustering and sliding window are integrated to extract the corresponding pixel points belonging to n lanes, and the clustering rules are designed according to the road conditions;
[0032] Specific steps:
[0033] (3.1) Set the dividing line with the center of the vehicle as the origin and the slope V1 as Lc; the line passing through the center of the vehicle and perpendicular to Lc is Lv;
[0034] (3.2) Clustering the set SP1. The clustering goal is to divide the lane line pixels into different clusters. Each cluster is considered to be an independent lane line.
[0035] According to the distance between pixels, the clustering rules are divided. The close distance set SP1 is divided according to Clustering is performed based on the rules, Δy represents the longitudinal deviation, Δx represents the lateral deviation, and w represents the weight, and multiple clustering lines are obtained;
[0036] (3.3) Find the intersection points of multiple cluster lines and Lv. Assume there are n intersection points, denoted as P0, P1, ..., Pn, respectively. It can be considered that there are n lane lines at present.
[0037] (3.4) Taking P0, P1, ..., Pn as the starting points, parallel to the direction of Lc, in the set SP1, use the sliding window method to forward search for the pixel points belonging to the n lane lines respectively.
[0038] The specific steps of the sliding window method forward search are: find the starting position of the lane line pixel on the X-axis, and start searching for the target pixel from this starting position; the sliding window method forward search is to set a window and count all the pixels in the window; this pixel is the default lane line pixel. The window properties are:
[0039] The number of windows n_windows = 9, which can be set at will;
[0040] The window side length is set to margin = 100. This setting can define how much range is needed to search on both sides of the lane line center point. If the range is too small, the lane line pixels may be missed, and if it is too large, too many non-lane line pixels may be searched. The side length of the window is defined by the center point of the window + - margin.
[0041] The window height is a fixed value, which is obtained by dividing the image height by the number of windows and taking the integer.
[0042] The starting point of the next sliding window refers to the center coordinates of the previous sliding window and the slope of the pixels in the sliding window.
[0043] Through the above steps, the search for lane line pixels is completed.
[0044] At the same time, similar operations are performed on sets SP2 and SP3, and finally corresponding pixel point sets belonging to n lane lines are obtained, which are recorded as SL1, SL2, ..., SLn.
[0045] (4) Use two fitting strategies, left and right, to fit the lane in the pixel point set to solve the lane change problem;
[0046] In the set SL1, SL2, ..., SLn, the sampling scheme is used to fit the left and right lane lines in each set. If the curvature of the left and right lane lines is consistent, it is considered that there is no lane change branch in the lane line of the pixel point in the set. If the curvature is inconsistent, and the lane line pixels at the same ordinate are greater than a certain threshold (20cm) for 2m in a row, it is considered that there is a lane change branch in the lane line, and the current lane line should be expanded into two lanes.
[0047] Assume that the lane line equation is a quadratic fitting curve:
[0048] x=ayy+by+c
[0049] Then at a distance of y meters, the radius of curvature is:
[0050]
[0051] Convert pixel space to meters by defining appropriate ratios of pixel height to lane length and pixel width to lane width.
[0052] (5) Finally, multiple lane lines are formed, and the two lane lines closest to the dividing line Lc are the current lane lines of the vehicle.
[0053] The beneficial effect of the present invention is that, compared with the prior art, the present invention integrates two lane line extraction strategies, clustering and sliding window, and designs clustering rules according to road conditions, which can solve the unstable fitting problem of lane line extraction in traditional methods; the lane uses two fitting strategies, left and right, which can solve the error in lane change recognition.
[0054] The applicant of the present invention has made a detailed explanation and description of the implementation examples of the present invention in conjunction with the drawings in the specification. However, those skilled in the art should understand that the above implementation examples are only preferred implementation schemes of the present invention, and the detailed description is only to help readers better understand the spirit of the present invention, but not to limit the scope of protection of the present invention. On the contrary, any improvements or modifications based on the inventive spirit of the present invention should fall within the scope of protection of the present invention.
Claims
1. An adaptive lane line fitting method for assisted driving scenarios, characterized in that: Includes steps: (1) Convert the lane line pixels output by deep learning into a two-dimensional coordinate system with the vehicle center as the origin; (2) Calculate the reference slope of the lane line according to the distribution of lane line pixels; divide all lane pixels into three parts according to the distance from the pixel to the vehicle, and record them as sets SP1, SP2, and SP3 from near to far, and obtain the feature vectors of sets SP1, SP2, and SP3, respectively, and record them as V1, V2, and V3, which are used as the reference slope of the lane line; (3) The two lane extraction strategies of clustering and sliding window are integrated to extract the pixel points corresponding to the lanes, and clustering rules are designed according to the road conditions. The specific steps for extracting the pixel points corresponding to n lanes are as follows: (3.1) Let the dividing line with the center of the vehicle as the origin and V1 as the slope be denoted as Lc; let the line passing through the center of the vehicle and perpendicular to Lc be denoted as Lv; (3.2) Cluster the set SP1 and divide the clustering rules according to the distance between pixels. The close distance set SP1 is divided according to the rule Perform clustering, represents the longitudinal deviation, represents the lateral deviation, w represents the weight, and multiple clustering lines are obtained; (3.3) Find the intersection points of multiple cluster lines and Lv. Assume there are n intersection points, denoted as P0, P1, ..., Pn, respectively. It can be considered that there are n lane lines at present. (3.4) Starting from P0, P1, ..., Pn, respectively, and in the direction parallel to Lc, use the sliding window method to search forward for the pixel points belonging to the n lane lines in the set SP1; In sets SP2 and SP3, the above steps (3.1)-(3.4) are also followed to finally obtain corresponding pixel point sets belonging to n lane lines, denoted as SL1, SL2, ..., SLn; (4) Use two fitting strategies, left and right, to fit the lane in the pixel point set; (5) Finally, multiple lane lines are formed, and the two lane lines closest to the dividing line are the current lane lines of the vehicle.
2. The adaptive lane line fitting method for assisted driving scenarios according to claim 1, characterized in that: In step (1), the lane line pixel points output by deep learning are converted into a two-dimensional coordinate system with the center of the vehicle as the origin by using the inverse perspective transformation method through the camera parameters, which is denoted as set SP.
3. The adaptive lane line fitting method for assisted driving scenarios according to claim 1, characterized in that: In step (4), in the sets SL1, SL2, ..., SLn, a sampling scheme is used to fit two lane lines, one on the left and one on the right, in each set. If the curvatures of the lane lines on the left and the right are consistent, it is considered that there is no lane change branch in the lane line at the pixel point in the set. If the curvature is inconsistent and the lane line pixel points at the same vertical coordinate are greater than a certain threshold for 2m in a row, it is considered that the lane line has a lane change branch and the current lane line should be expanded into two lanes.
Citation Information
Patent Citations
Lane line rapid detection method
CN106203401A
Lane line detection method based on deep learning
CN113469133A
