Lane center line determination method and device, equipment and medium

By using a camera in the intelligent driving system to obtain lane line data, calculate the sampling distance and lateral distance variance, and selecting lane lines with better linearity as reference, the problem of low calculation accuracy of lane center line is solved, and the stability and safety of the system in complex road scenarios are improved.

CN119821409AActive Publication Date: 2025-04-15IMOTION AUTOMOTIVE TECH (SUZHOU) CO LTD

Patent Information

Application Number
CN202510096784.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-21
Publication Date
2025-04-15
Estimated Expiration
2045-01-21

AI Technical Summary

Technical Problem

In complex road scenarios, in the intelligent driving control scheme based on a single camera, the calculation accuracy of the lane center line is low, which can easily lead to vehicle deviation or steering wheel angle being too large, and even traffic accidents.

Method used

By obtaining the left lane line and right lane line output by the current camera, determining the longest length as the sampling distance, calculating the lateral distance of each sampling point on the target lane line, evaluating the degree of linearity of the lane line, combining the variance threshold of the left and right lane lines, selecting a lane line with better linearity as the reference lane line to more accurately determine the lane center line.

Benefits of technology

It improves the accuracy of the lane center line determination, reduces the risk of vehicle deviation and excessive steering wheel angle, and enhances the stability and safety of the intelligent driving system in complex road scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119821409A_ABST
    Figure CN119821409A_ABST
Patent Text Reader

Abstract

The invention relates to the field of intelligent driving, in particular to a lane center line determination method and device, equipment and a medium, and the method comprises the steps: obtaining a left lane line and a right lane line outputted by a current camera; determining the longest length of the first length of the left lane line and the second length of the right lane line as a sampling distance; determining a first transverse distance of each first sampling point on a target lane line according to the sampling distance and a preset number of sampling points, the target lane line being any one of a left lane line and a right lane line; determining the lateral distance variance of the target lane line according to the first lateral distance of each first sampling point on the target lane line; according to the transverse distance variance of the left lane line, the transverse distance variance of the right lane line and a first preset variance threshold value, a reference lane line is determined from the left lane line and the right lane line, and the reference lane line is used for determining a lane center line. According to the invention, the lane center line can be accurately determined.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of intelligent driving, and in particular to a lane centerline determination method, device, equipment and medium. Background Art

[0002] In the current intelligent driving control solution based on a single camera, the camera generally outputs two lane lines on the left and right. It is necessary to calculate the center line of the lane based on the given left and right lane lines for the back-end regulation and control. If the calculated center line is wrong in complex road scenes, such as ramp ingress, merging, divergence, etc., it will cause the vehicle to deviate, or cause the vehicle to have a large steering wheel angle, or even cause a traffic accident.

[0003] The related technical solution determines the lane line with excellent effect based on the confidence, effective length, curvature and other characteristics of the lane line, and then calculates the center line based on the lane line with excellent effect. However, the accuracy of determining the lane line with excellent effect is insufficient, resulting in low accuracy of the lane center.

[0004] Therefore, how to accurately determine the center line of the lane has become a technical problem that needs to be urgently solved in this field. Summary of the invention

[0005] The purpose of this application is to provide a lane centerline determination method, device, equipment and medium, which can accurately determine the effective lane line, thereby improving the accuracy of lane centerline determination.

[0006] In a first aspect, a method for determining a lane centerline is provided, comprising:

[0007] Get the left lane line and right lane line output by the current camera;

[0008] Determine the longest length of the first length of the left lane line and the second length of the right lane line as the sampling distance; the first length is the longitudinal coordinate of the farthest point of the left lane line, and the second length is the longitudinal coordinate of the farthest point of the right lane line;

[0009] Determine, according to the sampling distance and the preset number of sampling points, a first lateral distance of each first sampling point on the target lane line, wherein the target lane line is any one of the left lane line and the right lane line; the first lateral distance is the distance from the first sampling point to the longitudinal axis; determine, according to the first lateral distance of each first sampling point on the target lane line, a lateral distance variance of the target lane line;

[0010] A reference lane line is determined from the left lane line and the right lane line according to the lateral distance variance of the left lane line and the lateral distance variance of the right lane line and a first preset variance threshold, and the reference lane line is used to determine a lane center line.

[0011] In a preferred example, the present application may be further configured as follows: determining a reference lane line from the left lane line and the right lane line according to the lateral distance variance of the left lane line and the lateral distance variance of the right lane line and a first preset variance threshold, including:

[0012] If the lateral distance variances corresponding to the left lane line and the right lane line are both less than the first preset variance threshold, determining the lateral deviation variance of the target straight line of the target lane line, and determining a reference lane line from the left lane line and the right lane line according to the lateral deviation variance of the left lane line, the lateral deviation variance of the right lane line, and the second preset variance threshold;

[0013] If only one of the lateral distance variances of the left lane line and the right lane line is smaller than a first preset variance threshold, determining that the reference lane line is a lane line smaller than the first preset variance threshold;

[0014] If the lateral distance variance of the left lane line and the lateral distance variance of the right lane line are both not less than a first preset variance threshold, the left lane line weight and the right lane line weight are determined according to the lateral distance variance of the left lane line and the lateral distance variance of the right lane line; and the reference lane line is determined from the left lane line and the right lane line according to the left lane line weight and the right lane line weight.

[0015] In a preferred example, the present application may be further configured as follows: determining the lateral deviation variance of the target straight line of the target lane line includes:

[0016] Determine, according to the sampling distance and the preset number of sampling points, a second lateral distance corresponding to each second sampling point on a target straight line of the target lane line, wherein the target straight line is a straight line formed by connecting the farthest point determined based on the sampling distance and the current initial point, and the second lateral distance is a distance from the second sampling point to the longitudinal axis;

[0017] Determine a lateral deviation between a second lateral distance of a second sampling point of the target lane line and a first lateral distance of a first sampling point corresponding to the second sampling point;

[0018] According to each lateral deviation of the target lane line, a lateral deviation variance of the target lane line is determined.

[0019] In a preferred example, the present application may be further configured as follows: determining a reference lane line from the left lane line and the right lane line according to the lateral deviation variance of the left lane line, the lateral deviation variance of the right lane line, and a second preset variance threshold, including:

[0020] When the lateral deviation variance of the left lane line and the lateral deviation variance of the right lane line are both less than a second preset variance threshold, determining that the reference lane line includes the left lane line and the right lane line;

[0021] Otherwise, the reference lane line is determined to be the lane line corresponding to the target lateral deviation variance, and the target lateral deviation variance is the smallest variance between the lateral deviation variance of the left lane line and the lateral deviation variance of the right lane line.

[0022] In a preferred example, the present application may be further configured as follows: determining a reference lane line from the left lane line and the right lane line according to the left lane line weight and the right lane line weight, including:

[0023] Determine a weight difference between the left lane line weight and the right lane line weight;

[0024] If the weight difference is less than a preset weight difference threshold, determining that the reference lane line is the left lane line and the right lane line;

[0025] If the weight difference is not less than a preset weight difference threshold, the reference lane line is determined to be the lane line with a smaller weight between the left lane line and the right lane line.

[0026] In a preferred example, the present application can be further configured as follows:

[0027] If the reference lane line includes one lane line, determining a lane center line according to the one lane line and a lane width, wherein the lane width is determined according to the left lane line and the right lane line;

[0028] If the reference lane line includes the left lane line and the right lane line, the lane center line is determined according to the left lane line and the right lane line.

[0029] In a preferred example, the present application can be further configured as follows:

[0030] Determining whether the lane width is greater than a preset lane width threshold;

[0031] Accordingly, determining the lane centerline according to the lane line and the lane width includes:

[0032] If the lane width is greater than a preset lane width threshold, determining a lane centerline based on the one lane line and the set lane width;

[0033] Accordingly, determining the lane centerline according to the left lane line and the right lane line includes:

[0034] If the lane width is greater than a preset lane width threshold, the lane centerline is determined based on any one of the left lane line and the right lane line and the set lane width.

[0035] In a second aspect, a lane centerline determination device is provided, comprising:

[0036] The acquisition module is used to obtain the left lane line and the right lane line output by the current camera;

[0037] A sampling distance determination module, used to determine the longest length of the first length of the left lane line and the second length of the right lane line as the sampling distance; the first length is the longitudinal coordinate of the farthest point of the left lane line, and the second length is the longitudinal coordinate of the farthest point of the right lane line;

[0038] A lateral distance determination module, used to determine a first lateral distance of each first sampling point on a target lane line according to the sampling distance and a preset number of sampling points, wherein the target lane line is any one of the left lane line and the right lane line; the first lateral distance is the distance from the first sampling point to the longitudinal axis;

[0039] A lateral distance variance determination module, configured to determine the lateral distance variance of the target lane line according to the first lateral distance of each first sampling point on the target lane line;

[0040] A reference lane line determination module is used to determine a reference lane line from the left lane line and the right lane line based on the lateral distance variance of the left lane line and the lateral distance variance of the right lane line and a first preset variance threshold, wherein the reference lane line is used to determine the lane center line.

[0041] In a third aspect, an electronic device is provided, comprising a memory and a processor, wherein a computer program is stored in the memory, and the processor executes the lane centerline determination method described in any one of the first aspects when running the computer program.

[0042] In a fourth aspect, a computer-readable storage medium is provided, wherein at least one program code is stored in the computer-readable storage medium, and the program code is loaded and executed by a processor to implement the lane centerline determination method as described in any one of the first aspects.

[0043] In a fifth aspect, a computer program product is provided, comprising a computer program or instructions, which, when executed by a processor, implements a lane centerline determination method as described in any one of the first aspects.

[0044] In summary, the lane centerline determination method provided by the present application includes the following beneficial technical effects:

[0045] The left lane line and the right lane line output by the current camera are obtained, and the longest one of the left lane line and the right lane line is determined as the sampling distance, so that the sampling can cover the farthest identifiable lane line; according to the sampling distance and the preset number of sampling points, the first lateral distance of each first sampling point on the target lane line is accurately calculated; by calculating the lateral distance variance of the target lane line, the linearity of the lane line is evaluated, and the smaller the variance, the closer the lane line is to a straight line; combined with the lateral distance variance of the left and right lane lines and the first preset variance threshold, the lane line with better linearity can be selected from the left lane line and the right lane line as the reference lane line, thereby more accurately determining the lane center line.

[0046] In addition, the present application also provides a lane centerline determination device, equipment and medium, all of which have the above-mentioned beneficial technical effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the embodiments of the present application or the technical solutions of the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0048] Figure 1 It is a flowchart of a lane centerline determination method provided in an embodiment of the present application;

[0049] Figure 2 This is a schematic diagram of a lane line on both sides provided by an embodiment of the present application, which is a straight line;

[0050] Figure 3 This is a schematic diagram of a lane line provided in an embodiment of the present application, in which one side of the lane line is a curved line with an arc and the other side is a straight line;

[0051] Figure 4 is a schematic diagram of a lateral deviation provided in an embodiment of the present application;

[0052] Figure 5 This is a schematic diagram of a scenario provided by an embodiment of the present application;

[0053] Figure 6 This is another scenario schematic diagram provided by an embodiment of the present application;

[0054] Figure 7 is a schematic diagram of lane width calculation provided by an embodiment of the present application;

[0055] Figure 8 It is a flowchart of another lane centerline determination method provided in an embodiment of the present application;

[0056] Fig. 9 is a structural schematic diagram of a lane centerline determination device provided in an embodiment of the present application;

[0057] Fig.10 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0058] This specific embodiment is merely an explanation of the present application and is not a limitation of the present application. After reading this specification, a person skilled in the art may make non-creative modifications to the present embodiment as needed, but such modifications are protected by the patent law as long as they are within the scope of the present application.

[0059] It should be noted that in the optional embodiments of the present application, the object information and other related data involved, when the embodiments in the present application are applied to specific products or technologies, need to obtain the permission or consent of the object, and the collection, use and processing of the relevant data need to comply with the relevant laws, regulations and standards of the relevant countries and regions. In other words, if the embodiments of the present application involve data related to the object, it needs to be obtained with the authorization and consent of the object, the authorization and consent of the relevant departments, and in compliance with the relevant laws, regulations and standards of the country and region. If personal information is involved in the embodiments, the acquisition of all personal information needs to obtain the consent of the individual. If sensitive information is involved, the separate consent of the information subject needs to be obtained. The embodiments also need to be implemented with the authorization and consent of the object.

[0060] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0061] In addition, the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article, unless otherwise specified, generally means that the associated objects before and after are in an "or" relationship.

[0062] In the current intelligent driving solutions based on a single camera, the center line is calculated based on the lane lines on the left and right sides. If the calculated center line is incorrect in complex road scenarios, such as ramp entry, exit, and merger, it will cause the vehicle to deviate or cause a large steering wheel angle, or even cause a traffic accident.

[0063] The embodiment of the present application calculates the variance of the lateral distance between the vehicle and the left and right lane lines respectively by evenly sampling points on the left and right lane lines, and can accurately determine which of the current left and right lane lines is more consistent with the trajectory of the vehicle, thereby guiding the vehicle to travel along the correct trajectory.

[0064] Specifically, the embodiment of the present application provides a method for determining the lane centerline, such as Figure 1 As shown, the method provided in the embodiment of the present application can be executed by an electronic device, and the electronic device is a server. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services. The terminal device can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a vehicle-mounted device, etc., but is not limited thereto. The terminal device and the electronic device can be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiment of the present application. The method includes:

[0065] S101, obtaining the left lane line and the right lane line output by the current camera;

[0066] In the embodiment of the present application, the current camera can obtain the expression of the left lane line and the expression of the right lane line by collecting images and performing image analysis, and the output left lane line and right lane line have a certain length and are not infinitely extended. The expression of the lane line can be a cubic polynomial or a quintic polynomial, which is not limited in the embodiment of the present application and can be set according to actual needs.

[0067] With a cubic polynomial For example, in the form of:

[0068] : Indicates the lateral distance from the center axis of the vehicle to the lane line;

[0069] : represents the heading angle between the vehicle and the lane line;

[0070] : represents the curvature of the lane line;

[0071] : Indicates the curvature change rate of the lane line;

[0072] Therefore, the left lane line is expressed as: ; The right lane line is represented as: .

[0073] S102, determining the longest length of a first length of a left lane line and a second length of a right lane line as a sampling distance;

[0074] The first length is the longitudinal coordinate of the farthest point of the left lane line, and the second length is the longitudinal coordinate of the farthest point of the right lane line;

[0075] S103, determining a first lateral distance of each first sampling point on the target lane line according to the sampling distance and the preset number of sampling points;

[0076] The target lane line is any one of the left lane line and the right lane line, and the first lateral distance is the distance from the first sampling point to the longitudinal axis;

[0077] In the embodiment of the present application, the longest effective length of the lane lines on the left and right sides is selected as the longest sampling distance LongPreDist of the lane lines. The effective length refers to the maximum longitudinal coordinate of the farthest point of the longitudinal axis of the left lane line and the farthest point of the longitudinal axis of the right lane line output by the camera. Determining the longest length as the sampling distance can ensure that no matter how curved the road is, the sampling can cover the farthest end of the lane line, avoiding the centerline determination error caused by insufficient sampling range. The embodiment of the present application does not limit the number of preset sampling points, and the user can set it according to actual needs, such as 8, 9, 10, 15, etc.

[0078] Assuming that the preset number of sampling points is 10, the spacing step between adjacent points is step = LongPreDist / 10. Substitute the distance at each first sampling point into the left lane line and the right lane line, and calculate the lateral distance from the vehicle to each sampling point on the left and right lane lines, that is, the first lateral distance from the first sampling point to the longitudinal axis; where, ; .

[0079] In one possible scenario, = step*i, i = 0,1,…,9, ensuring that the distribution of sampling points is uniform and reasonable, as shown in Table 1:

[0080] Table 1

[0081]

[0082] At this time, the first lateral distance of each first sampling point on the left lane line is , … ; The first lateral distance of each first sampling point on the right lane line is , … .

[0083] S104, determining a lateral distance variance of the target lane line according to the first lateral distance of each first sampling point on the target lane line;

[0084] In the embodiment of the present application, the average values ​​of the lateral distances of the first sampling points of the left and right lane lines, LeftAverageY0 and RightAverageY0, are calculated respectively, thereby respectively calculating the lateral distance variance LeftLineVariance of the left lane line and the lateral distance variance RightLineVariance of the right lane line. The lateral distance variance is calculated to quantitatively evaluate the straightness of the lane line, providing a basis for the selection of the lane line and the determination of the center line.

[0085] Take the preset number of sampling points as 10 as an example:

[0086] ;

[0087] .

[0088] S105. Determine a reference lane line from the left lane line and the right lane line according to the lateral distance variance of the left lane line and the lateral distance variance of the right lane line and a first preset variance threshold, where the reference lane line is used to determine the lane center line.

[0089] A first preset variance threshold is pre-set, which is set by technicians based on experience and can be adjusted in practice. The first preset variance threshold can be 0.05, 0.08, 0.1, etc.

[0090] In the embodiment of the present application, the reference lane line is determined by combining the lateral distance variance and the preset variance threshold, and the lane line with better linearity can be intelligently screened out as the basis for determining the lane center line, thereby effectively improving the accuracy of the lane center line determination and making the lane center line determination more in line with actual road conditions.

[0091] It can be seen that in the embodiment of the present application, the left lane line and the right lane line output by the current camera are obtained, and the longest one of the left lane line and the right lane line is determined as the sampling distance, so that the sampling can cover the farthest recognizable lane line; according to the sampling distance and the preset number of sampling points, the first lateral distance of each first sampling point on the target lane line is accurately calculated; by calculating the lateral distance variance of the target lane line, the linearity of the lane line is evaluated, and the smaller the variance, the closer the lane line is to a straight line; combined with the lateral distance variance of the left and right lane lines and the first preset variance threshold, the lane line with better linearity can be selected from the left lane line and the right lane line as the reference lane line, thereby more accurately determining the lane center line.

[0092] A possible implementation of the embodiment of the present application is to determine a reference lane line from the left lane line and the right lane line according to the lateral distance variance of the left lane line and the lateral distance variance of the right lane line and a first preset variance threshold, including:

[0093] S1051. If the lateral distance variances corresponding to the left lane line and the right lane line are both less than the first preset variance threshold, determine the lateral deviation variance of the target straight line of the target lane line, and determine the reference lane line from the left lane line and the right lane line according to the lateral deviation variance of the left lane line, the lateral deviation variance of the right lane line, and the second preset variance threshold;

[0094] In one achievable manner, if the lateral distance variances corresponding to the left lane line and the right lane line are both smaller than a first preset variance threshold, the reference lane line is determined to be the left lane line and the right lane line.

[0095] In another feasible method, in order to accurately determine the reference lane line, the lateral distance variance can represent the changing trend of a curve. Assuming that the lateral distance variance is less than the first preset variance threshold, it is considered that the curve is consistent with the driving trajectory of the vehicle. However, there may be two working conditions where the lateral distance variance is less than the first preset variance threshold, such as Figure 2 and Figure 3 , Figure 2 This is a schematic diagram of a lane line on both sides provided by an embodiment of the present application, which is a straight line; Figure 3 This is a schematic diagram provided in an embodiment of the present application in which a lane line on one side is a curved line with an arc and a lane line on the other side is a straight line.

[0096] At this time, based on Figure 3 ,as well as Figure 4 , the lateral distance deviations calculated by the left lane line and the right lane line based on the current vehicle posture may be relatively small. If the left lane line and the right lane line are used to calculate the center line at this time, the calculated center line may not be ideal. The actual desired effect is to fit the lane line based on the straight line on the right. The method used at this time is to take a starting point and an end point on the current left and right lane lines respectively, and then connect the two points into a straight line, and calculate the second lateral distance LatDistToLeftInterpolateLine and LatDistToRightInterpolateLine from the vehicle to the target straight lines on both sides, and the first lateral distance LatDistToLeftLine and LatDistToRightLine from the vehicle to the lane lines on both sides, and then calculate the difference between the two distances to obtain the distance from each point on the straight line to the lane, that is, the lateral deviation; then determine the lateral deviation variance; according to the lateral deviation variance of the left lane line, the lateral deviation variance of the right lane line, and the second preset variance threshold, determine the reference lane line from the left lane line and the right lane line.

[0097] S1052: If only one of the lateral distance variances of the left lane line and the right lane line is smaller than a first preset variance threshold, determine that the reference lane line is a lane line smaller than the first preset variance threshold;

[0098] Among them, if the lateral distance variance of the left lane line , the lateral distance variance of the right lane line , one side is smaller than the first preset variance threshold, and the other side is larger than the first preset variance threshold, then the reference lane line is determined to be the lane line smaller than the first preset variance threshold, so that the lane line with a variance smaller than the first preset variance threshold can be directly used to calculate the lane center line. The corresponding scenario example is as follows Figure 5 As shown: At this time, the variance calculated by the left lane line is less than the first preset variance threshold, and the variance calculated by the right lane line is greater than the first preset variance threshold. The lane centerline calculated based on the left lane line can well guide the vehicle to move straight forward without being affected by the right curved line.

[0099] S1053. If the lateral distance variance of the left lane line and the lateral distance variance of the right lane line are both not less than the first preset variance threshold, determine the left lane line weight and the right lane line weight according to the lateral distance variance of the left lane line and the lateral distance variance of the right lane line; and determine the reference lane line from the left lane line and the right lane line according to the left lane line weight and the right lane line weight.

[0100] If the calculated lateral distance variance of the left lane line , the lateral distance variance of the right lane line When both are greater than the first preset variance threshold, the lane line on the left and right sides is determined by calculating the weight of the variance of the lane lines on the left and right sides to determine which lane line to use as the reference lane line. The left lane line weight can be represented by LeftLineVarianceWeight, and the right lane line weight can be represented by RightLineVarianceWeight, then:

[0101] ;

[0102] ;

[0103] Furthermore, after determining the left lane line weight and the right lane line weight, the reference lane line is determined from the left lane line and the right lane line according to the left lane line weight and the right lane line weight.

[0104] A possible implementation of the embodiment of the present application is to determine the lateral deviation variance of the target straight line of the target lane line, including:

[0105] Determine, according to the sampling distance and the preset number of sampling points, a second lateral distance corresponding to each second sampling point on a target straight line of the target lane line, the target straight line being a straight line formed by connecting the farthest point determined based on the sampling distance and the current initial point; wherein the second lateral distance is the distance from the second sampling point to the longitudinal axis;

[0106] Determine a lateral deviation between a second lateral distance of a second sampling point of the target lane line and a first lateral distance of a first sampling point corresponding to the second sampling point;

[0107] According to each lateral deviation of the target lane line, a lateral deviation variance of the target lane line is determined.

[0108] Among them, Figure 4 For example, the circle represents the second sampling point, the box represents the first sampling point, and each sampling pair corresponds to the same vertical axis coordinate. Taking the left lane line as an example, the cubic polynomial equation of the left lane line can be expressed as: , then the lateral distance from the vehicle to the starting point of the left lane line is for: ; Given that the longest sampling distance of the lane line is LongPreDist, the lateral distance from the vehicle to the end of the left lane line is : .

[0109] With this starting point (0, ), end point (LongPreDist, ) are connected into a straight line to form the target straight line, then the second lateral distance from the vehicle to any sampling point on the target straight line is for:

[0110] ;

[0111] Calculate the lateral deviation between the second lateral distance from the vehicle to the interpolation line (target line) and the first lateral distance to the lane line at each pair of sampling points for:

[0112] ;

[0113] Calculate the average value of the lateral deviation at all sampling points for:

[0114] ;

[0115] Calculate the lateral deviation variance of the lateral deviation for:

[0116] ;

[0117] The variance of the lateral distance between the left lane line and the straight line connecting its starting point and end point can be calculated as , the variance of the second lateral distance between the right lane line and the straight line connecting its starting point and end point is .

[0118] A possible implementation of the embodiment of the present application is to determine a reference lane line from the left lane line and the right lane line according to the lateral deviation variance of the left lane line, the lateral deviation variance of the right lane line, and a second preset variance threshold, including:

[0119] When the lateral deviation variance of the left lane line and the lateral deviation variance of the right lane line are both less than a second preset variance threshold, it is determined that the reference lane line includes the left lane line and the right lane line;

[0120] Otherwise, the reference lane line is determined to be the lane line corresponding to the target lateral deviation variance, and the target lateral deviation variance is the smallest variance between the lateral deviation variance of the left lane line and the lateral deviation variance of the right lane line.

[0121] In the embodiment of the present application, a second preset variance threshold is pre-set, and the value is set by the technician based on experience and can be actually adjusted. The second preset variance threshold can be equal to the first preset variance threshold, or it can be different, and the embodiment of the present application is not limited. The second preset variance threshold can be 0.05, 0.08, 0.1, etc.

[0122] If the calculated left lane line lateral deviation variance Variance of lateral deviation from the right lane line If both are less than the second preset variance threshold, it is considered that the lane lines on both sides are straight lines. At this time, the reference lane line is determined to include the left lane line and the right lane line. The lane lines on both sides can be used to calculate the center line. If one side is less than the second preset variance threshold and the other side is greater than the second preset variance threshold, the lane line on the side greater than the second preset variance threshold may be a twisted curve. At this time, the reference lane line is considered to be the lane line less than the second preset variance threshold; then, the lane center line is calculated based on the lane line less than 0.1 based on the lane width. If both sides are greater than 0.1, the lane center line can only be calculated based on one lane line with a relatively smaller variance. At this time, the reference lane line is the lane line with a small lateral deviation variance.

[0123] A possible implementation of the embodiment of the present application is to determine a reference lane line from a left lane line and a right lane line according to a left lane line weight and a right lane line weight, including:

[0124] Determine the weight difference between the left lane line weight and the right lane line weight;

[0125] According to the weight difference, the reference lane line is determined from the left lane line and the right lane line.

[0126] It can be understood that the larger the weight, the faster the lane line on the corresponding side changes. Usually, the lane line with a smaller weight is selected. The reference lane line is determined by calculating the weight difference WeightError between the lane line and the right lane line. The weight difference is calculated as follows: WeightError = abs( ). Specifically, according to the weight difference, determining the reference lane line from the left lane line and the right lane line includes:

[0127] If the weight difference is less than the preset weight difference threshold, the reference lane line is determined to be the left lane line and the right lane line;

[0128] If the weight difference is not less than the preset weight difference threshold, the reference lane line is determined to be the lane line with a smaller weight between the left lane line and the right lane line.

[0129] Among them, the preset weight difference threshold is a preset value, which can be set according to the experience of technical personnel and is not limited in this embodiment. For example, it can be set to 0.15.

[0130] The weight difference can be used to determine the reference lane line under large variance conditions, which can be divided into the following conditions:

[0131] If the weight difference WeightError is less than the preset weight difference threshold, it means that the weights of the lane lines on both sides are not much different, and the lane lines on both sides have the same change trend. In this case, the lane lines on both sides are considered valid, and the reference lane lines are determined to be the left lane line and the right lane line, and then the center line is calculated based on the lane lines on both sides. For example, Figure 6 As shown in a, b, and c, when the curve is normal, the center line is calculated based on the lane lines on both sides. When the lane lines are eight inches inside, the center line is calculated based on the lane lines on both sides. When the lane lines are eight inches outside, the center line can also be calculated based on the lane lines on both sides.

[0132] If the weight difference WeightError is not less than the preset weight difference threshold, the lane line on the side with the smaller current weight is selected as the reference lane line to calculate the center line.

[0133] A possible implementation of the embodiment of the present application also includes:

[0134] If the reference lane line includes one lane line, the lane center line is determined according to the one lane line and the lane width, wherein the lane width is determined according to the left lane line and the right lane line;

[0135] If the reference lane line includes a left lane line and a right lane line, the lane center line is determined based on the left lane line and the right lane line.

[0136] If the reference lane has only one lane line, specifically the right lane line, the center line of the lane is:

[0137] ;

[0138] If the reference lane has only one lane line, specifically the right lane line, the center line of the lane is:

[0139] ;

[0140] If the reference lane line includes the left lane line and the right lane line, the lane center line is:

[0141] .

[0142] For lane width calculation, see Figure 7 The positional relationship between the vehicle’s body posture and the road lane line can be represented by the following figure: C0_Left represents the distance from the center of the vehicle’s rear axle to the left lane line, C0_Right represents the distance from the center of the vehicle’s rear axle to the right lane line, and the heading angle with the lane line is , usually the distance from the vehicle to the left lane line is positive, and the distance to the right lane line is negative, so the lane width of the current lane can be expressed as: .

[0143] In one achievable manner, the method further includes: determining whether the lane width is greater than a preset lane width threshold; accordingly, determining the lane centerline based on a lane line and the lane width, including: if the lane width is greater than the preset lane width threshold, determining the lane centerline based on a lane line and the set lane width; accordingly, determining the lane centerline based on the left lane line and the right lane line, including: if the lane width is greater than the preset lane width threshold, determining the lane centerline based on any one of the left lane line and the right lane line, and the set lane width.

[0144] The preset lane width threshold can be customized by the user, such as 4m, and the set lane width can be customized by the user, such as 3.5m. Usually, the width of a normal lane is about 3.5m. A lane that exceeds four meters is considered an extra-wide lane. Usually, the center line is calculated based on the lane line on one side with a lane width of 3.5m. This is done to be able to follow the lane line on one side to drive in a wider lane.

[0145] Based on any of the above embodiments, the present application embodiment provides a specific lane centerline determination method, see Figure 8 ,include:

[0146] Sense input lane lines; calculate the current lane width based on the left and right lane lines; calculate the variance of the lateral distance between the left and right lane lines based on the current posture of the vehicle;

[0147] If the variances of the lane lines of both vehicles are less than 0.1, the lateral deviation variances of the left and right lane lines and the straight line formed by the starting and ending points of the lane lines are calculated; if the variances of both sides are less than 0.1, the lane lines of both vehicles are considered valid; if the variance is greater than 0.1 on one side and less than 0.1 on the other side, the lane line on the side less than 0.1 is considered valid; if the variances are both greater than 0.1, the lane line on the side with the smaller variance is considered valid;

[0148] If the lane line variance on one side is less than 0.1 and the lane line variance on the other side is greater than 0.1, the lane line on the side with variance less than 0.1 is considered valid;

[0149] If the variances of the lane lines on both sides are greater than 0.1, the weights of the variances of the lane lines on the left and right sides are calculated; if the absolute value of the difference in weights between the variances of the lane lines on the left and right sides is less than 0.15, the lane lines on both sides are considered valid; if the absolute value of the difference in weights between the variances of the lane lines on the left and right sides is greater than 0.15, the lane line on the side with the smaller weight is considered valid.

[0150] The embodiment of the present application can accurately indicate which lane line matches the motion trajectory of the vehicle by calculating the variance of the lateral distance from the vehicle to the left and right lane line sampling points under the current vehicle body posture. If the variances of the lane lines on both sides are less than 0.1, the variance of the lateral distance between the current lane line and the straight line connecting its starting point and end point is calculated, and then it can be clearly judged whether the current lane line is a straight line. If the variances of the lane lines on both sides are greater than 0.1, the variance weights of the lane lines are used to judge the change trends of the two lane lines. If the weights are close, it is considered that the current lane lines on both sides are available. Otherwise, we choose the lane line with a smaller weight. The algorithm can clearly indicate the change trend of the current lane line and can correctly guide the driving direction of the vehicle.

[0151] The following is an introduction to a device provided in an embodiment of the present application. The device described below and the method described above can be referred to each other. The device of this embodiment is set in an electronic device. Fig. 9 , Fig. 9 It is a structural block diagram of a device of one embodiment of the present application, comprising:

[0152] An acquisition module 210 is used to acquire the left lane line and the right lane line output by the current camera;

[0153] A sampling distance determination module 220 is used to determine the longest length of a first length of a left lane line and a second length of a right lane line as the sampling distance; the first length is the longitudinal coordinate of the farthest point of the left lane line, and the second length is the longitudinal coordinate of the farthest point of the right lane line;

[0154] A lateral distance determination module 230 is used to determine a first lateral distance of each first sampling point on a target lane line according to the sampling distance and the preset number of sampling points, where the target lane line is any one of a left lane line and a right lane line, and the first lateral distance is the distance from the first sampling point to the longitudinal axis;

[0155] A lateral distance variance determination module 240, configured to determine a lateral distance variance of a target lane line according to a first lateral distance of each first sampling point on the target lane line;

[0156] The reference lane line determination module 250 is used to determine the reference lane line from the left lane line and the right lane line according to the lateral distance variance of the left lane line and the lateral distance variance of the right lane line and a first preset variance threshold, and the reference lane line is used to determine the lane center line.

[0157] In a preferred example, the present application may be further configured as: a reference lane line determination module 250 for:

[0158] If the lateral distance variances corresponding to the left lane line and the right lane line are both less than the first preset variance threshold, the lateral deviation variance of the target straight line of the target lane line is determined, and the reference lane line is determined from the left lane line and the right lane line according to the lateral deviation variance of the left lane line, the lateral deviation variance of the right lane line, and the second preset variance threshold;

[0159] If only one of the lateral distance variances of the left lane line and the right lane line is smaller than a first preset variance threshold, determining the reference lane line to be a lane line smaller than the first preset variance threshold;

[0160] If the lateral distance variance of the left lane line and the lateral distance variance of the right lane line are both not less than the first preset variance threshold, the left lane line weight and the right lane line weight are determined according to the lateral distance variance of the left lane line and the lateral distance variance of the right lane line; and the reference lane line is determined from the left lane line and the right lane line according to the left lane line weight and the right lane line weight.

[0161] In a preferred example, the present application may be further configured as: a reference lane line determination module 250 for:

[0162] Determine, according to the sampling distance and the preset number of sampling points, a second lateral distance corresponding to each second sampling point on a target straight line of the target lane line, the target straight line being a straight line formed by connecting the farthest point determined based on the sampling distance and the current initial point, and the second lateral distance being a distance from the second sampling point to the longitudinal axis;

[0163] Determine a lateral deviation between a second lateral distance of a second sampling point of the target lane line and a first lateral distance of a first sampling point corresponding to the second sampling point;

[0164] According to each lateral deviation of the target lane line, a lateral deviation variance of the target lane line is determined.

[0165] In a preferred example, the present application may be further configured as: a reference lane line determination module 250 for:

[0166] When the lateral deviation variance of the left lane line and the lateral deviation variance of the right lane line are both less than a second preset variance threshold, it is determined that the reference lane line includes the left lane line and the right lane line;

[0167] Otherwise, the reference lane line is determined to be the lane line corresponding to the target lateral deviation variance, and the target lateral deviation variance is the smallest variance between the lateral deviation variance of the left lane line and the lateral deviation variance of the right lane line.

[0168] In a preferred example, the present application may be further configured as: a reference lane line determination module 250 for:

[0169] Determine the weight difference between the left lane line weight and the right lane line weight;

[0170] If the weight difference is less than the preset weight difference threshold, the reference lane line is determined to be the left lane line and the right lane line;

[0171] If the weight difference is not less than the preset weight difference threshold, the reference lane line is determined to be the lane line with a smaller weight between the left lane line and the right lane line.

[0172] In a preferred example, the present application can be further configured as follows:

[0173] A first lane centerline determination module, configured to determine the lane centerline according to the lane line and the lane width if the reference lane line includes a lane line, wherein the lane width is determined according to the left lane line and the right lane line;

[0174] The second lane center line determination module is used to determine the lane center line according to the left lane line and the right lane line if the reference lane line includes a left lane line and a right lane line.

[0175] In a preferred example, the present application can be further configured as follows:

[0176] A lane width determination module, used to determine whether the lane width is greater than a preset lane width threshold;

[0177] Accordingly, the first lane centerline determination module is used to:

[0178] If the lane width is greater than a preset lane width threshold, the lane centerline is determined based on a lane line and the set lane width;

[0179] Accordingly, the second lane centerline determination module is used to:

[0180] If the lane width is greater than a preset lane width threshold, the lane centerline is determined based on either the left lane line or the right lane line and the set lane width.

[0181] An electronic device is provided in an embodiment of the present application, such as Fig.10 As shown, Fig.10 The electronic device 300 shown includes: at least one processor 301 ( Fig.10 301 and memory 303. The processor 301 and memory 303 are connected, such as through a bus 302. Optionally, the electronic device 300 may further include a transceiver 304. It should be noted that in actual applications, the transceiver 304 is not limited to one, and the structure of the electronic device 300 does not constitute a limitation on the embodiments of the present application.

[0182] The processor 301 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. The processor 301 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0183] The bus 302 may include a path to transmit information between the above components. The bus 302 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 302 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.10 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0184] The memory 303 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.

[0185] The memory 303 is used to store the application code for executing the solution of the present application, and the execution is controlled by the processor 301. The processor 301 is used to execute the application code stored in the memory 303 to implement the contents shown in the above method embodiment.

[0186] Fig.10 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0187] An embodiment of the present application provides a computer-readable storage medium, in which at least one program code is stored. When the computer-readable storage medium is run on a computer, the computer can execute the corresponding content of the aforementioned method embodiment.

[0188] An embodiment of the present application provides a computer program product, including a computer program or instructions, which implement the corresponding contents of the aforementioned method embodiment when the computer program or instructions are executed by a processor.

[0189] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0190] The above are only some implementation methods of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for determining a lane centerline, characterized in that: include: Get the left lane line and right lane line output by the current camera; Determine the longest length of the first length of the left lane line and the second length of the right lane line as a sampling distance; The first length is the longitudinal coordinate of the farthest point of the left lane line, and the second length is the longitudinal coordinate of the farthest point of the right lane line; Determine, according to the sampling distance and the preset number of sampling points, a first lateral distance of each first sampling point on a target lane line, wherein the target lane line is any one of the left lane line and the right lane line; the first lateral distance is the distance from the first sampling point to the longitudinal axis; Determine a lateral distance variance of the target lane line according to a first lateral distance of each first sampling point on the target lane line; A reference lane line is determined from the left lane line and the right lane line according to the lateral distance variance of the left lane line and the lateral distance variance of the right lane line and a first preset variance threshold, and the reference lane line is used to determine a lane center line.

2. The lane centerline determination method according to claim 1, characterized in that: Determining a reference lane line from the left lane line and the right lane line according to the lateral distance variance of the left lane line and the lateral distance variance of the right lane line and a first preset variance threshold, comprising: If the lateral distance variances corresponding to the left lane line and the right lane line are both less than the first preset variance threshold, determining the lateral deviation variance of the target straight line of the target lane line, and determining a reference lane line from the left lane line and the right lane line according to the lateral deviation variance of the left lane line, the lateral deviation variance of the right lane line, and the second preset variance threshold; If only one of the lateral distance variances of the left lane line and the right lane line is smaller than a first preset variance threshold, determining that the reference lane line is a lane line smaller than the first preset variance threshold; If the lateral distance variance of the left lane line and the lateral distance variance of the right lane line are both not less than a first preset variance threshold, the left lane line weight and the right lane line weight are determined according to the lateral distance variance of the left lane line and the lateral distance variance of the right lane line; and the reference lane line is determined from the left lane line and the right lane line according to the left lane line weight and the right lane line weight.

3. The lane centerline determination method according to claim 2, characterized in that: The step of determining the lateral deviation variance of the target straight line of the target lane line comprises: Determine, according to the sampling distance and the preset number of sampling points, a second lateral distance corresponding to each second sampling point on a target straight line of the target lane line, wherein the target straight line is a straight line formed by connecting the farthest point determined based on the sampling distance and the current initial point, and the second lateral distance is a distance from the second sampling point to the longitudinal axis; Determine a lateral deviation between a second lateral distance of a second sampling point of the target lane line and a first lateral distance of a first sampling point corresponding to the second sampling point; According to each lateral deviation of the target lane line, a lateral deviation variance of the target lane line is determined.

4. The lane centerline determination method according to claim 3, characterized in that: Determining a reference lane line from the left lane line and the right lane line according to the lateral deviation variance of the left lane line, the lateral deviation variance of the right lane line, and a second preset variance threshold, comprising: When the lateral deviation variance of the left lane line and the lateral deviation variance of the right lane line are both less than a second preset variance threshold, determining that the reference lane line includes the left lane line and the right lane line; Otherwise, the reference lane line is determined to be the lane line corresponding to the target lateral deviation variance, and the target lateral deviation variance is the smallest variance between the lateral deviation variance of the left lane line and the lateral deviation variance of the right lane line.

5. The lane centerline determination method according to claim 2, characterized in that: Determining a reference lane line from the left lane line and the right lane line according to the left lane line weight and the right lane line weight, comprising: Determine a weight difference between the left lane line weight and the right lane line weight; If the weight difference is less than a preset weight difference threshold, determining that the reference lane line is the left lane line and the right lane line; If the weight difference is not less than a preset weight difference threshold, the reference lane line is determined to be the lane line with a smaller weight between the left lane line and the right lane line.

6. The lane centerline determination method according to any one of claims 1 to 5, characterized in that: Also includes: If the reference lane line includes one lane line, determining a lane center line according to the one lane line and a lane width, wherein the lane width is determined according to the left lane line and the right lane line; If the reference lane line includes the left lane line and the right lane line, the lane center line is determined according to the left lane line and the right lane line.

7. The lane centerline determination method according to claim 6, characterized in that: Also includes: Determining whether the lane width is greater than a preset lane width threshold; Accordingly, determining the lane centerline according to the lane line and the lane width includes: If the lane width is greater than a preset lane width threshold, determining a lane centerline based on the one lane line and the set lane width; Accordingly, determining the lane centerline according to the left lane line and the right lane line includes: If the lane width is greater than a preset lane width threshold, the lane centerline is determined based on any one of the left lane line and the right lane line and the set lane width.

8. A lane centerline determination device, characterized in that: include: The acquisition module is used to obtain the left lane line and the right lane line output by the current camera; A sampling distance determination module, used to determine the longest length of the first length of the left lane line and the second length of the right lane line as the sampling distance; the first length is the longitudinal coordinate of the farthest point of the left lane line, and the second length is the longitudinal coordinate of the farthest point of the right lane line; A lateral distance determination module, used to determine a first lateral distance of each first sampling point on a target lane line according to the sampling distance and a preset number of sampling points, wherein the target lane line is any one of the left lane line and the right lane line, and the first lateral distance is a distance from the first sampling point to the longitudinal axis; A lateral distance variance determination module, configured to determine the lateral distance variance of the target lane line according to the first lateral distance of each first sampling point on the target lane line; A reference lane line determination module is used to determine a reference lane line from the left lane line and the right lane line based on the lateral distance variance of the left lane line and the lateral distance variance of the right lane line and a first preset variance threshold, wherein the reference lane line is used to determine the lane center line.

9. An electronic device, characterized in that: The electronic device includes a memory and a processor, wherein a computer program is stored in the memory, and the processor executes the lane centerline determination method according to any one of claims 1 to 7 when running the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one program code, and the program code is loaded and executed by the processor to implement the lane centerline determination method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Lane line reservation and detection algorithm based on binary image

    CN104573627A

  • Line following driving mode switching method and device, equipment and medium

    CN116853244A

  • Method, device and equipment for determining lane line and computer storage medium

    CN117351441A

  • Lane curvature calculation implementation method and system, vehicle and storage medium

    CN117842052A

  • Vehicle control method, device and equipment and vehicle

    CN119261904A

Cited By

  • Model training method, medium, program product and electronic equipment

    CN122090212A

  • Model training method, medium, program product, and electronic device

    CN122090212B