Lane Departure Warning Method, Device, Electronic Device and Storage Medium
By obtaining the position information of the camera equipment on the vehicle, establishing an image coordinate system, and directly calculating the lateral distance between the front wheel of the vehicle and the target lane line, the problem of low calculation accuracy caused by the restricted camera installation position is solved, and the accuracy of lane departure warning is improved.
Patent Information
- Application Number
- CN202211085711.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-06
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2042-09-06
AI Technical Summary
In the prior art, the lane departure warning function has a limited camera installation position, resulting in low lateral distance calculation accuracy between the front wheel of the vehicle and the target lane line, which in turn affects the accuracy of the warning.
By acquiring the position information of the camera device relative to the vehicle on the vehicle, establishing an image coordinate system with the installation position of the camera device as the origin, directly obtaining parameter information of the target lane line, and calculating the lateral distance between the front wheel of the vehicle and the target lane line to avoid errors introduced by coordinate system conversion.
The calculation accuracy of the lateral distance between the front wheel of the vehicle and the target lane line is improved, and the accuracy of lane departure warning is enhanced.
Smart Images

Figure CN115303295B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of driving safety assistance, and particularly to a lane departure warning method, device, electronic device and storage medium. Background Art
[0002] As the proportion of traffic accidents caused by fatigue driving is getting higher and higher, the importance of equipping vehicles with lane departure warning functions cannot be ignored, which can greatly reduce the loss of life and property caused by lane departure.
[0003] In the prior art, the lane departure warning function obtains the information of the marking lines of the driving lane through a front-view camera, and obtains the position of the vehicle in the current lane through image processing. When it is detected that the driver deviates from the lane due to non-subjective factors such as distraction and fatigue, the control system sends an alarm signal to the driver to remind the driver to keep the vehicle driving within the current lane.
[0004] However, the prior art has low accuracy in calculating the lateral distance between the outer edge position of the front wheel of the vehicle at the current moment and the target lane line, which ultimately results in poor accuracy of lane departure warning. Summary of the Invention
[0005] The present application provides a lane departure warning method, device, electronic device and storage medium, which are used to improve the accuracy of the lateral distance between the outer edge position of the front wheel of the vehicle at the current moment and the target lane line, and further improve the accuracy of lane departure warning.
[0006] According to the first aspect of the present application, a lane departure warning method is provided, including:
[0007] Obtain the position information of the camera device installed on the vehicle relative to the vehicle;
[0008] Establish an image coordinate system with the installation position of the camera device on the vehicle as the origin;
[0009] In the image coordinate system, take the driving lane of the vehicle at the current moment as the current lane, and obtain the parameter information of the target lane line of the current lane collected by the camera device; wherein, the target lane line is the left lane line and / or the right lane line of the current lane;
[0010] Based on the parameter information of the target lane line of the current lane and the position information of the camera device relative to the vehicle, calculate the lateral distance between the outer edge position of the front wheel of the vehicle at the current moment and the target lane line; wherein, the front wheel is the left front wheel and / or the right front wheel;
[0011] When the lateral distance between the outer edge position of the front wheel of the vehicle at the current moment and the target lane line meets the preset distance condition, warning processing is performed on the vehicle.
[0012] Optionally, the position information of the camera device relative to the vehicle includes: the longitudinal distance between the camera device and the center of the front axle of the vehicle, and the lateral distance between the camera device and the outer edge position of the front wheel of the vehicle; calculating the lateral distance between the outer edge position of the front wheel of the vehicle at the current moment and the target lane line based on the parameter information of the target lane line of the current lane and the position information of the camera device relative to the vehicle includes:
[0013] Calculating based on the preset equation of the target lane line of the current lane, the longitudinal distance between the camera device and the center of the front axle of the vehicle, and the parameter information of the target lane line of the current lane to obtain a calculation result;
[0014] Taking the absolute value of the calculation result, and calculating the lateral distance between the outer edge position of the front wheel of the vehicle at the current moment and the target lane line according to the calculation result after taking the absolute value and the lateral distance between the camera device and the outer edge position of the front wheel of the vehicle.
[0015] Optionally, calculating the lateral distance between the outer edge position of the front wheel of the vehicle at the current moment and the target lane line according to the calculation result after taking the absolute value and the lateral distance between the camera device and the outer edge position of the front wheel of the vehicle includes:
[0016] Determining the difference between the calculation result after taking the absolute value and the lateral distance between the camera device and the outer edge position of the front wheel of the vehicle as the lateral distance between the outer edge position of the front wheel of the vehicle at the current moment and the target lane line.
[0017] Optionally, when the lateral distance between the outer edge position of the front wheel of the vehicle at the current moment and the target lane line meets the preset distance condition, warning processing is performed on the vehicle, including:
[0018] Obtaining the historical lateral distance between the outer edge position of the front wheel of the vehicle at the historical moment and the target lane line;
[0019] Determining the deviation direction of the vehicle according to the historical lateral distance and the lateral distance between the outer edge position of the front wheel of the vehicle at the current moment and the target lane line;
[0020] When the deviation direction of the vehicle is to the left, if the lateral distance between the outer edge position of the left front wheel of the vehicle at a historical moment and the left lane line is greater than a first preset threshold, then when the lateral distance between the outer edge position of the left front wheel of the vehicle at the current moment and the left lane line is less than or equal to the first preset threshold, perform left - hand warning processing on the vehicle;
[0021] Or,
[0022] When the deviation direction of the vehicle is to the right, if the lateral distance between the outer edge position of the right front wheel of the vehicle at a historical moment and the right lane line is greater than a first preset threshold, then when the lateral distance between the outer edge position of the right front wheel of the vehicle at the current moment and the right lane line is less than or equal to the first preset threshold, perform right - hand warning processing on the vehicle.
[0023] Optionally, the determining of the deviation direction of the vehicle according to the historical lateral distance and the lateral distance between the outer edge position of the front wheel of the vehicle at the current moment and the target lane line includes:
[0024] Perform numerical analysis on the historical lateral distance and the lateral distance between the outer edge position of the front wheel of the vehicle at the current moment and the target lane line in chronological order to obtain the change trend of the lateral distance between the outer edge position of the front wheel of the vehicle and the target lane line;
[0025] Determine the deviation direction of the vehicle according to the change trend of the lateral distance between the outer edge position of the front wheel of the vehicle and the target lane line.
[0026] Optionally, after performing left - hand warning processing on the vehicle, the method further includes:
[0027] Generate a first virtual lane line parallel to the left lane line and located within the current lane according to the first preset threshold;
[0028] Generate a second virtual lane line parallel to the left lane line and located within the left - hand adjacent lane according to a second preset threshold;
[0029] Determine the area between the first virtual lane line and the second virtual lane line as the left - hand warning area;
[0030] When the deviation direction of the vehicle is to the left, if the vehicle exits the left - hand warning area and travels in a direction away from the current lane, control the vehicle to stop performing left - hand warning processing.
[0031] Optionally, the establishing of an image coordinate system with the installation position of the camera device on the vehicle as the origin includes:
[0032] Determine the midpoint of the installation position of the camera device on the vehicle;
[0033] Take the midpoint of the installation position of the camera device on the vehicle, the direction of the current lane line, and the direction perpendicular to the current lane line as the origin, the X-axis, and the Y-axis respectively to establish an image coordinate system.
[0034] According to a second aspect of the present application, there is provided a lane departure warning device, including:
[0035] An acquisition module for acquiring the position information of a camera device installed on a vehicle relative to the vehicle;
[0036] A building module for establishing an image coordinate system with the installation position of the camera device on the vehicle as the origin;
[0037] The acquisition module is further configured to use the driving lane of the vehicle at the current moment as the own lane in the image coordinate system and acquire the parameter information of the target lane line of the own lane collected by the camera device; wherein, the target lane line is the left lane line and / or the right lane line of the own lane;
[0038] A calculation module for calculating the lateral distance between the outer edge position of the front wheel of the vehicle at the current moment and the target lane line based on the parameter information of the target lane line of the own lane and the position information of the camera device relative to the vehicle; wherein, the front wheel is the left front wheel and / or the right front wheel;
[0039] A warning module for performing a warning process on the vehicle when the lateral distance between the outer edge position of the front wheel of the vehicle at the current moment and the target lane line meets a preset distance condition.
[0040] According to a third aspect of the present application, there is provided an electronic device, including: at least one processor and a memory;
[0041] The memory stores computer execution instructions;
[0042] The at least one processor executes the computer execution instructions stored in the memory, so that the at least one processor executes the lane departure warning method as described in the first aspect above.
[0043] According to a fourth aspect of the present application, there is provided a computer-readable storage medium, in which computer execution instructions are stored, and when the computer execution instructions are executed by a processor, they are used to implement the lane departure warning method as described in the first aspect above.
[0044] According to a fifth aspect of the present application, there is provided a computer program product including a computer program which, when executed by a processor, implements the lane departure warning method described in the first aspect.
[0045] A lane departure warning method provided by the present application first obtains the position information of a camera device installed on a vehicle relative to the vehicle; then, with the installation position of the camera device on the vehicle as the origin, an image coordinate system is established; in the image coordinate system, the driving lane of the vehicle at the current moment is used as the own lane, and the parameter information of the target lane line of the own lane collected by the camera device is obtained; wherein, the target lane line is the left lane line and / or the right lane line of the own lane; then, based on the parameter information of the target lane line of the own lane and the position information of the camera device relative to the vehicle, the lateral distance between the outer edge position of the front wheel of the vehicle at the current moment and the target lane line is calculated; wherein, the front wheel is the left front wheel and / or the right front wheel; when the lateral distance between the outer edge position of the front wheel of the vehicle at the current moment and the target lane line meets a preset distance condition, a warning process is performed on the vehicle.
[0046] In the embodiment of the present application, an image coordinate system is established with the installation position of the camera device on the vehicle as the origin. In this image coordinate system, the parameter information of the most intuitive target lane line recognized by the camera device is obtained, without the need for coordinate transformation, and at the same time, the error caused by coordinate transformation due to the camera device not being installed exactly in the center of the windshield is avoided, improving the accuracy of calculating the cross-line distance DLC and making the lane departure warning result more accurate.
[0047] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present application, nor is it used to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The accompanying drawings herein are incorporated into the specification and form a part of the specification, showing embodiments consistent with the present application and used together with the specification to explain the principles of the present application.
[0049] Figure 1 It is a schematic diagram of an application scenario related to an embodiment of the present application;
[0050] Figure 2 It is a schematic flowchart of a lane departure warning method provided by an embodiment of the present application;
[0051] Figure 3 provided by an embodiment of the present application Figure 2 It is a schematic flowchart of step S204 in
[0052] Figure 4 provided by an embodiment of the present application Figure 2Flow diagram of step S205 in
[0053] Figure 5 Schematic diagram of the left warning area provided by the embodiment of the present application;
[0054] Figure 6 Schematic diagram of the structure of a lane departure warning device provided by the embodiment of the present application;
[0055] Figure 7 Schematic diagram of the structure of an electronic device provided by the embodiment of the present application.
[0056] Through the above-mentioned drawings, specific embodiments of the present application have been shown, and more detailed descriptions will be given later. These drawings and textual descriptions are not intended to limit the scope of the concept of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. Detailed implementation manners
[0057] Here, the exemplary embodiments will be described in detail, and the examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the present application.
[0058] In the prior art, there are problems that the installation position of the camera is limited, otherwise it is necessary to perform coordinate system conversion on the parameter information of the target lane line of the current lane, resulting in errors, leading to low calculation accuracy of the lateral distance between the outer edge position of the front wheel of the vehicle at the current moment and the target lane line, and ultimately resulting in poor accuracy of lane departure warning.
[0059] To solve the above technical problems, the overall inventive concept of the present application is how to provide a lane departure warning method. The scenario to which the method provided by the present application is applied is as Figure 1 shown. When the vehicle is driving in the current lane, if the vehicle deviates from the current lane, the present application can improve the accuracy of the lane departure warning function.
[0060] Next, the technical solution of the present application and how the technical solution of the present application solves the above technical problems will be described in detail with specific embodiments. The following several specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. Next, the embodiments of the present application will be described with reference to the drawings.
[0061] Embodiment 1:
[0062] Figure 2 Flow diagram of a lane departure warning method provided by the embodiment of the present application. As Figure 2 shown, the method of this embodiment includes:
[0063] S201: Obtain the position information of the camera device installed on the vehicle relative to the vehicle.
[0064] In the embodiments of the present application, when the vehicle is powered on, the position information of the camera device relative to the vehicle is obtained through the calibration parameter module of the vehicle. The camera device may refer to any type of camera or other device with a camera function, and the embodiments of the present application do not make specific limitations on this. That is to say, in the embodiments of the present application, the installation position of the camera based on the vehicle is obtained through calibration parameters. The method of calibration parameters is to write the vehicle parameters into the controller of the camera through a parameter file and then transfer them to the calculation program through the corresponding interface. Further, the embodiments of the present application do not make specific limitations on the installation position of the camera device on the vehicle. Further, the position information of the camera device relative to the vehicle includes: the longitudinal distance d between the camera device and the center of the front axle of the vehicle, and the lateral distance between the camera device and the outer edge position of the front wheel of the vehicle. Among them, the lateral distance between the camera device and the outer edge position of the front wheel of the vehicle includes: the lateral distance d1 between the camera device and the outer edge position of the left front wheel of the vehicle and the lateral distance d2 between the camera device and the outer edge position of the right front wheel of the vehicle.
[0065] S202: Establish an image coordinate system with the installation position of the camera device on the vehicle as the origin. The image coordinate system is also called the vehicle image coordinate system, and this image coordinate system is a rectangular coordinate system.
[0066] It should be understood that regardless of whether the camera device is installed in the exact center of the windshield, the embodiments of the present application can ensure that the established image coordinate system changes with the change of the installation position of the camera device on the vehicle, with strong adaptability.
[0067] S203: In the image coordinate system, take the driving lane of the vehicle at the current moment as the current lane, and obtain the parameter information of the target lane line of the current lane collected by the camera device. Among them, the target lane line is the left lane line and / or the right lane line of the current lane.
[0068] It should be understood that the current lane is also called the current driving lane. Since the target lane line is the left lane line and / or the right lane line of the current lane, the parameter information of the target lane line of the current lane includes but is not limited to: the lateral distance A between the camera device and the inner side of the left lane line of the current lane 0left 、the lateral distance A between the camera device and the inner side of the right lane line of the current lane 0right 、the heading angle A of the vehicle on the left side of the current lane 1left 、the heading angle A of the vehicle on the right side of the current lane 1right 、the road curvature parameter A on the left side of the current lane 2left 、the road curvature parameter A on the right side of the current lane 2right, the curvature change rate A on the left side of this lane 3left and the curvature change rate A on the right side of this lane 3right and so on. The parameter information of the target lane line of this lane can be the information detected by the camera.
[0069] The parameter information of the target lane line of this lane in the image coordinate system, and its data can be intuitively represented without coordinate system conversion.
[0070] S204: Based on the parameter information of the target lane line of this lane and the position information of the camera device relative to the vehicle, calculate the lateral distance between the outer edge position of the front wheel of the vehicle at the current moment and the target lane line. Among them, the front wheel is the left front wheel and / or the right front wheel.
[0071] When the front wheel is the left front wheel, the embodiment of the present application calculates the lateral distance between the outer edge position of the left front wheel of the vehicle at the current moment and the left lane line of this lane; when the front wheel is the right front wheel, the embodiment of the present application calculates the lateral distance between the outer edge position of the right front wheel of the vehicle at the current moment and the right lane line of this lane. For the sake of description, the embodiment of the present application simply refers to the lateral distance between the outer edge position of the front wheel of the vehicle at the current moment and the target lane line as the cross-line distance DLC, and the lateral distance between the outer edge position of the left front wheel of the vehicle at the current moment and the left lane line of this lane is simply referred to as the cross-left-line distance DLC left , and the lateral distance between the outer edge position of the right front wheel of the vehicle at the current moment and the right lane line of this lane is simply referred to as the cross-right-line distance DLC right .
[0072] Combined with step S203, it can be known that the embodiment of the present application sets the origin of the image coordinate system as the midpoint of the camera installation position, the X direction is the vehicle forward direction, the Y-axis direction is the left or right side direction of the vehicle, and extends the lane line to intersect with the Y-axis to calculate the distance DLC between the inner sides of the two lane lines and the outer edges of the corresponding side front wheels of the vehicle. Further, the embodiment of the present application provides an improved calculation method when executing S204, and its implementation process is shown in the following S31 - S32, which will not be elaborated here.
[0073] S205: When the lateral distance between the outer edge position of the front wheel of the vehicle at the current moment and the target lane line meets the preset distance condition, perform a warning process on the vehicle.
[0074] The above preset distance condition can refer to that the lateral distance between the outer edge position of the front wheel of the vehicle at the current moment and the target lane line is less than the first preset threshold. Optionally, the way of the warning process can be: emitting an alarm signal, voice prompt, etc.
[0075] In addition, embodiments of the present application may further add other warning conditions to perform warning processing when all conditions are met. For specific descriptions, see S41 to S44 below, which will not be elaborated here.
[0076] By performing the operations of S201 to S205 above, the present application can establish an image coordinate system with the installation position of the camera device on the vehicle as the origin, and obtain the parameter information of the most intuitive target lane line recognized by the camera device in this image coordinate system without coordinate system conversion. At the same time, it avoids the error caused by coordinate system conversion due to the camera device not being installed exactly in the center of the windshield, improves the accuracy of calculating the cross-line distance DLC, and makes the lane departure warning result more accurate.
[0077] In a possible implementation, S202: Establish an image coordinate system with the installation position of the camera device on the vehicle as the origin, including:
[0078] S2021: Determine the midpoint of the installation position of the camera device on the vehicle;
[0079] S2022: Use the midpoint of the installation position of the camera device on the vehicle, the direction of the current lane line, and the direction perpendicular to the current lane line as the origin, the X-axis, and the Y-axis respectively to establish an image coordinate system.
[0080] The above S2021 to S2022 are the processes for establishing the image coordinate system. Through the established image coordinate system, this embodiment can provide intuitive parameter information of the target lane line.
[0081] The present application has the following advantages: It can establish a coordinate system according to the relative position of the actual camera device and the vehicle, use the camera device as the origin, obtain the most intuitive lane line parameters recognized by the camera device, without coordinate system conversion, and at the same time avoid the error caused by coordinate system conversion due to the camera device not being installed exactly in the center of the windshield, improve the accuracy of calculating the cross-line distance DLC, and make the lane departure warning result more accurate.
[0082] Based on the above embodiments, the technical solution of the present application will be described in more detail below in combination with several specific embodiments.
[0083] Embodiment 2:
[0084] In the embodiment of the present application, the position information of the camera device relative to the vehicle includes: the longitudinal distance d between the camera device and the center of the front axle of the vehicle, and the lateral distance between the camera device and the outer edge position of the front wheels of the vehicle. Among them, the lateral distance between the camera device and the outer edge position of the front wheels of the vehicle includes: the lateral distance d1 between the camera device and the outer edge position of the left front wheel of the vehicle and the lateral distance d2 between the camera device and the outer edge position of the right front wheel of the vehicle. Figure 3Provided by the embodiments of the present application Figure 2 is a schematic flowchart of step S204 in Figure 2 Based on the embodiments shown, this embodiment focuses on Figure 2 refining S204 in Figure 3 As shown, S204 includes the following steps:
[0085] S31: Calculate based on the preset target lane line equation of the current lane, the longitudinal distance between the camera device and the front axle center of the vehicle, and the parameter information of the target lane line of the current lane to obtain a calculation result.
[0086] In the embodiments of the present application, the calculation result is y, and the preset target lane line equation of the current lane is: y = f(A0, A1, A2, A3; x = -d). When the target lane line is the left lane line, the preset target lane equation of the current lane is the left lane line equation, that is, y1 = f(A 0left , A 1left , A 2left , A 3left ; x = -d); when the target lane line is the right - left lane line, the preset target lane equation of the current lane is the right lane line equation, that is, y2 = f(A 0right , A 1right , A 2right , A 3right ; x = -d). Optionally, the fitting functions y1, y2 can be output by the camera perception module.
[0087] S32: Take the absolute value of the calculation result, and calculate the lateral distance between the outer edge position of the front wheel of the vehicle at the current moment and the target lane line according to the absolute - valued calculation result and the lateral distance between the camera device and the outer edge position of the front wheel of the vehicle.
[0088] In a possible implementation, S32: Calculate the lateral distance between the outer edge position of the front wheel of the vehicle at the current moment and the target lane line according to the absolute - valued calculation result and the lateral distance between the camera device and the outer edge position of the front wheel of the vehicle, including:
[0089] Determine the difference between the absolute - valued calculation result and the lateral distance between the camera device and the outer edge position of the front wheel of the vehicle as the lateral distance between the outer edge position of the front wheel of the vehicle at the current moment and the target lane line.
[0090] When the front wheel is the left front wheel and the target lane line is the left lane line, the calculation formula for the lateral distance between the outer edge position of the left front wheel of the vehicle at the current moment and the left lane line is DLC left= |y1(-d)| - d1; When the current wheel is the right front wheel and the target lane line is the right lane line, the formula for the lateral distance between the outer edge position of the right front wheel of the vehicle at the current moment and the right lane line is DLC right = |y2(-d)| - d2.
[0091] By performing the operations of S31 to S32 above, the present application can provide an improved calculation method for the lateral distance between the outer edge position of the front wheel of the vehicle at the current moment and the target lane line. The calculated distance is the cross-left line distance / cross-right line distance, which can reduce the errors caused by related calculation methods and improve the accuracy of the lateral distance between the outer edge position of the front wheel of the vehicle at the current moment and the target lane line.
[0092] Embodiment 3:
[0093] Figure 4 Provided by an embodiment of the present application Figure 2 is the flow schematic diagram of step S205. Based on the Figure 2 embodiment shown, this embodiment focuses on Figure 2 refining S205 in it. Based on the Figure 2 embodiment shown above, this embodiment provides a more detailed description of the specific implementation manner of S205. As Figure 4 shown, S205 includes:
[0094] S41: Obtain the historical lateral distance between the outer edge position of the front wheel of the vehicle at the historical moment and the target lane line. The historical moment can refer to the previous minute, previous several minutes, previous second, or the moment where the previous millisecond is located. The number of historical moments can be one or multiple. Therefore, the present application embodiment does not make specific limitations on the specific meaning and quantity of the historical moment.
[0095] S42: Determine the deviation direction of the vehicle according to the historical lateral distance and the lateral distance between the outer edge position of the front wheel of the vehicle at the current moment and the target lane line.
[0096] The above deviation direction is to deviate to the left or to the right. For example: There are multiple historical moments, which are 12:00, 12:05, and 12:10 respectively, and the current moment is 12:15. The left historical lateral distances corresponding to the historical moments are: DLC left ^ = 0.5m, 0.42m, 0.3m, and the cross-left line distance DLC corresponding to the current moment left = 0.16m, then it is determined that the deviation direction of the vehicle is to deviate to the left. Similarly, there are multiple historical moments, which are 12:00, 12:05, and 12:10 respectively, and the current moment is 12:15. The right historical lateral distances corresponding to the historical moments are: DLC right^ = 0.5m, 0.42m, 0.3m, the cross - right - lane distance DLC corresponding to the current moment right = 0.16m, then it is determined that the deviation direction of the vehicle is to deviate to the right.
[0097] S43: When the deviation direction of the vehicle is to deviate to the left, if the lateral distance between the outer edge position of the left front wheel of the vehicle and the left lane line at the historical moment is greater than the first preset threshold, then when the lateral distance between the outer edge position of the left front wheel of the vehicle and the left lane line at the current moment is less than or equal to the first preset threshold, perform left - side warning processing on the vehicle.
[0098] Or, S44: When the deviation direction of the vehicle is to deviate to the right, if the lateral distance between the outer edge position of the right front wheel of the vehicle and the right lane line at the historical moment is greater than the first preset threshold, then when the lateral distance between the outer edge position of the right front wheel of the vehicle and the right lane line at the current moment is less than or equal to the first preset threshold, perform right - side warning processing on the vehicle.
[0099] For example: The first preset threshold is 0.2m. The lateral distance between the outer edge position of the left front wheel of the vehicle and the left lane line at the historical moment is 0.3m which is greater than 0.2m, and the cross - left - lane distance corresponding to the current moment is 0.16m which is less than 0.2m. In this case, left - side warning processing can be performed on the vehicle, for example: sending a left - side warning signal. The right - side warning processing is similar and will not be elaborated here.
[0100] Through the description of steps S41 - S44, the embodiments of the present application can achieve the method of sending warning signals on the corresponding side according to different vehicle deviation directions, making the lane departure warning result more accurate.
[0101] In a possible implementation manner, S42: Determine the deviation direction of the vehicle according to the historical lateral distance and the lateral distance between the outer edge position of the front wheel of the vehicle and the target lane line at the current moment, including:
[0102] S51: Perform numerical analysis on the historical lateral distance and the lateral distance between the outer edge position of the front wheel of the vehicle and the target lane line at the current moment in chronological order to obtain the change trend of the lateral distance between the outer edge position of the front wheel of the vehicle and the target lane line.
[0103] S52: Determine the deviation direction of the vehicle according to the change trend of the lateral distance between the outer edge position of the front wheel of the vehicle and the target lane line.
[0104] For example: There are multiple historical moments which are 12:00, 12:05, and 12:10 respectively, and the current moment is 12:15. The corresponding left - side historical lateral distances at the historical moments are: DLC left^ = 0.5m, 0.8m, 0.9m, the cross-left lane distance DLC corresponding to the current moment left = 0.16m. It can be seen that its value is getting larger and then suddenly becomes smaller, indicating that its change trend is to increase first and then decrease. Under this trend, it is determined that the deviation direction of the vehicle is to deviate to the right. It should be noted that the reason why the cross-left lane distance corresponding to the current moment becomes smaller is that at this time, the vehicle has crossed the right lane line of this lane, so the original right lane line of this lane has become the left lane line of this lane.
[0105] By executing steps S51 - S52, the embodiments of the present application can correctly identify the deviation direction of the vehicle, thereby providing a basis for improving the accuracy of lane departure warning.
[0106] In a possible implementation manner, after performing left - side warning processing on the vehicle, the method further includes:
[0107] S45: Generate a first virtual lane line parallel to the left lane line and located within this lane according to a first preset threshold. As Figure 5 shown, the first virtual lane line D1, or also called the lane departure warning threshold, is a dotted line on the right side of the left lane line of this lane, and the lateral distance between this dotted line and the left lane line of this lane is the first preset threshold.
[0108] S46: Generate a second virtual lane line parallel to the left lane line and located within the left - side lane of this lane according to a second preset threshold. As Figure 5 shown, the second virtual lane line D2, or also called the latest warning line, is a dotted line on the left side of the left lane line of this lane, and the lateral distance between this dotted line and the left lane line of this lane is the second preset threshold. The embodiments of the present application do not specifically limit the specific values of the first preset threshold and the second preset threshold.
[0109] S47: Determine the area between the first virtual lane line and the second virtual lane line as the left - side warning area. That is to say, the area between D2 and D1 is the left - side warning area (or also called the left - side alarm area) of this lane, and D2 is the outermost boundary of the change range of the left - side warning area.
[0110] S48: When the deviation direction of the vehicle is to deviate to the left, if the vehicle exits the left - side warning area and travels away from this lane, control the vehicle to stop the left - side warning processing. That is, if the left front wheel of the vehicle exits to the left of D2, no warning is required.
[0111] Optionally, the embodiment of the present application can also determine the motion state of the vehicle relative to the target lane line according to the change trend of the lateral distance between the outer edge position of the front wheel of the vehicle and the target lane line. Taking the target lane line as the left lane line as an example, the motion state includes the following three: the vehicle is located in the non-warning area of the lane, the vehicle is located in the left warning area of the lane, and the vehicle is located on the left side of the left warning area of the lane.
[0112] First, the vehicle is taken as the current vehicle. Taking the target lane line as the left lane line as an example, the following analysis is performed: Figure 5 As shown in the figure, the thresholds D1 and D2 of the lane crossing distance are set, where D1 is the lane departure warning threshold and D2 is the latest warning line. left In the process, DLC left There are three states: DLC left >D1、D2≤DLC left ≤D1, DLC left <D2, through DLC left In the switching between these three states, it can be determined whether the vehicle has a tendency to deviate from the lane. There are mainly six situations: (1) When the vehicle is in the DLC left >D1 changes to D2≤DLC left ≤D1, it means that the vehicle is deviating from the non-alarm area to the left and is heading towards the left alarm area. At this time, the control unit should issue a left alarm signal (i.e. the left warning signal mentioned above); (2) When the vehicle is from D2≤DLC left ≤D1 converted to DLC left When the vehicle continues to deviate from the left warning area to the left and has deviated from the latest warning line, the left warning signal should not be issued; (3) When the vehicle leaves the DLC left <D2 changes to DLC left >D1, indicating that the vehicle’s camera perception module has already Figure 5 (4) When the vehicle leaves the DLC, the left lane is identified as the current lane, that is, the vehicle has deviated from the original lane but has not reached the conditions for the new lane departure alarm, and the left alarm signal should not be issued; left >D1 to DLC left <D2, indicating that the vehicle is deviating from the lane to the opposite side, i.e., the right side, and has deviated from the current lane, and has identified the right lane as the current lane, so the left side warning signal should not be issued; (5) When the vehicle leaves DLC left <D2 changes to D2≤DLC left ≤D1 means that the vehicle continues to move to the right, that is, it deviates from the last warning line to the lane. At this time, the left warning signal should not be issued; (6) When the vehicle moves from D2≤DLC left ≤D1 converted to DLC left> D1 indicates that the vehicle continues to move rightward, deviating from the warning area to the non-warning area, and the left warning signal should not be emitted. The right-side judgment logic is the same and will not be elaborated here.
[0113] Taking the left DLC as an example, the above situation (4) is explained as follows: DLC left can directly change from DLC left > D1 to DLC left < D2. This state is equivalent to the vehicle originally driving in the center of the lane (at this time DLC left > D1), then the vehicle moves rightward. When the vehicle crosses the line until the moment the camera senses the lane change, DLC left directly changes from DLC left > D1 to DLC left < D2; when the vehicle continues to deviate rightward and completely enters the adjacent lane, DLC left changes from DLC left < D2 to D2 ≤ DLC left ≤ D1. When deviating further rightward to the center of the lane, D2 ≤ DLC left ≤ D1 changes to DLC left > D1. This process is a rightward movement for the left warning and the left warning signal should not be emitted.
[0114] On the basis of determining that the motion state of the vehicle has changed, comprehensively considering the cross-line distance and its change trend, when the warning threshold of DLC is met and there is a tendency to deviate from the current lane to the corresponding side, a lane departure warning signal for the corresponding side is emitted. Taking the left side as an example, that is, when DLC left changes from DLC left > D1 to D2 ≤ DLC left ≤ D1, the system should emit a left warning signal to remind the driver to drive within the lane in a timely manner.
[0115] This application can make full use of the position information of the acquired camera device relative to the vehicle, including the longitudinal distance d between the camera device and the center of the front axle of the vehicle, the lateral distance d1 between the camera device and the outer edge position of the left front wheel of the vehicle, and the lateral distance d2 between the camera device and the outer edge position of the right front wheel of the vehicle, establish a rectangular coordinate system, and determine the position and motion trend of the vehicle front wheel relative to the inner edge of the lane line in real time through the parameter information of the target lane line of the current lane. Whether to emit a warning signal is determined according to the motion state of the vehicle and its position relative to the lane line, improving the accuracy of the lane departure warning function.
[0116] Figure 6 This is a schematic structural diagram of a lane departure warning device provided by an embodiment of this application. The device in this embodiment can be in the form of software and / or hardware. As Figure 6As shown in the figure, the lane departure warning device provided in this embodiment includes: an acquisition module 61, a construction module 62, a calculation module 63, and a warning module 64. Among them,
[0117] The acquisition module 61 is configured to acquire the position information of the camera device installed on the vehicle relative to the vehicle.
[0118] The construction module 62 is configured to establish an image coordinate system with the installation position of the camera device on the vehicle as the origin.
[0119] The acquisition module 61 is further configured to, in the image coordinate system, use the driving lane of the vehicle at the current moment as the own lane, and acquire the parameter information of the target lane line of the own lane collected by the camera device; wherein, the target lane line is the left lane line and / or the right lane line of the own lane.
[0120] The calculation module 63 is configured to calculate the lateral distance between the outer edge position of the front wheel of the vehicle at the current moment and the target lane line based on the parameter information of the target lane line of the own lane and the position information of the camera device relative to the vehicle; wherein, the front wheel is the left front wheel and / or the right front wheel.
[0121] The warning module 64 is configured to perform a warning process on the vehicle when the lateral distance between the outer edge position of the front wheel of the vehicle at the current moment and the target lane line meets a preset distance condition.
[0122] In a possible implementation manner, the position information of the camera device relative to the vehicle includes: the longitudinal distance between the camera device and the center of the front axle of the vehicle, and the lateral distance between the camera device and the outer edge position of the front wheel of the vehicle; the calculation module 63 is further configured to:
[0123] Perform calculations based on the preset target lane line equation of the own lane, the longitudinal distance between the camera device and the center of the front axle of the vehicle, and the parameter information of the target lane line of the own lane to obtain a calculation result.
[0124] Take the absolute value of the calculation result, and calculate the lateral distance between the outer edge position of the front wheel of the vehicle at the current moment and the target lane line according to the calculation result after taking the absolute value and the lateral distance between the camera device and the outer edge position of the front wheel of the vehicle.
[0125] In a possible implementation manner, the calculation module 63 is further configured to:
[0126] Determine the difference between the calculation result after taking the absolute value and the lateral distance between the camera device and the outer edge position of the front wheel of the vehicle as the lateral distance between the outer edge position of the front wheel of the vehicle at the current moment and the target lane line.
[0127] In a possible implementation manner, the warning module 64 is further configured to:
[0128] Obtain the historical lateral distance between the outer edge position of the front wheels of the vehicle at a historical moment and the target lane line.
[0129] Determine the deviation direction of the vehicle according to the historical lateral distance and the lateral distance between the outer edge position of the front wheels of the vehicle at the current moment and the target lane line.
[0130] In the case where the deviation direction of the vehicle is a left deviation, if the lateral distance between the outer edge position of the left front wheel of the vehicle and the left lane line at the historical moment is greater than a first preset threshold, then when the lateral distance between the outer edge position of the left front wheel of the vehicle and the left lane line at the current moment is less than or equal to the first preset threshold, perform left-side warning processing on the vehicle.
[0131] Or, in the case where the deviation direction of the vehicle is a right deviation, if the lateral distance between the outer edge position of the right front wheel of the vehicle and the right lane line at the historical moment is greater than a first preset threshold, then when the lateral distance between the outer edge position of the right front wheel of the vehicle and the right lane line at the current moment is less than or equal to the first preset threshold, perform right-side warning processing on the vehicle.
[0132] In a possible implementation manner, the warning module 64 is further configured to:
[0133] Perform numerical analysis on the historical lateral distance and the lateral distance between the outer edge position of the front wheels of the vehicle at the current moment and the target lane line in chronological order to obtain the change trend of the lateral distance between the outer edge position of the front wheels of the vehicle and the target lane line.
[0134] Determine the deviation direction of the vehicle according to the change trend of the lateral distance between the outer edge position of the front wheels of the vehicle and the target lane line.
[0135] In a possible implementation manner, the warning module 64 is further configured to:
[0136] Generate a first virtual lane line parallel to the left lane line and located within the current lane according to the first preset threshold;
[0137] Generate a second virtual lane line parallel to the left lane line and located within the left adjacent lane of the current lane according to the second preset threshold;
[0138] Determine the area between the first virtual lane line and the second virtual lane line as the left-side warning area;
[0139] In the case where the deviation direction of the vehicle is a left deviation, if the vehicle exits the left-side warning area and travels in a direction away from the current lane, control the vehicle to stop and perform left-side warning processing.
[0140] In a possible implementation manner, the establishment module 62 is further configured to:
[0141] Determine the midpoint of the installation position of the camera device on the vehicle.
[0142] Take the midpoint of the installation position of the camera device on the vehicle, the direction of the current lane line, and the direction perpendicular to the current lane line as the origin, the X-axis, and the Y-axis respectively to establish an image coordinate system.
[0143] The lane departure warning device provided in this embodiment can be used to execute the lane departure warning method provided in any of the above method embodiments. The implementation principle and technical effects are similar and will not be elaborated here.
[0144] The embodiment of the present application also provides a lane departure warning system, which consists of a camera sensing module, a lateral position detection module, and an execution calculation module. Among them, the camera sensing module is connected to the lateral position detection module, and the lateral position detection module is connected to the execution calculation module. Among them, the execution calculation module is used to calculate the DLC, judge the motion state of the vehicle relative to the lane line, and issue an accurate warning signal.
[0145] In the technical solution of the present application, the processing of the collection, storage, use, processing, transmission, provision, and disclosure of the user's personal information involved all comply with the provisions of relevant laws and regulations and do not violate public order and good customs.
[0146] According to the embodiments of the present application, the present application also provides an electronic device and a readable storage medium.
[0147] Figure 7 It is a schematic structural diagram of an electronic device provided in an embodiment of the present application. The electronic device includes a receiver 70, a transmitter 71, at least one processor 72, and a memory 73. The electronic device composed of the above components can be used to implement several specific embodiments of the present application above, which will not be elaborated here.
[0148] The embodiment of the present application also provides a computer-readable storage medium. Computer-executable instructions are stored in the computer-readable storage medium. When the processor executes the computer-executable instructions, each step in the method in the above embodiment is implemented.
[0149] The embodiment of the present application also provides a computer program product, including computer-executable instructions. When the computer-executable instructions are executed by the processor, each step in the method in the above embodiment is implemented.
[0150] The various embodiments of the systems and techniques described above in this application can be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special-purpose or general-purpose programmable processor that receives data and instructions from a storage system, at least one input device, and at least one output device, and transmits the data and instructions to the storage system, the at least one input device, and the at least one output device.
[0151] The program code for implementing the methods of this application can be written in any combination of one or more programming languages. These program codes can be provided to the processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when the program codes are executed by the processor or controller, the functions / operations specified in the flowchart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or electronic device.
[0152] In the context of this application, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a computer-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0153] To provide for interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can also be used to provide for interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, speech input, or tactile input).
[0154] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data electronic device), or a computing system that includes middleware components (e.g., an application electronic device), or a computing system that includes frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), and the Internet.
[0155] It should be understood that the various forms of the processes shown above can be reordered, added to, or deleted. For example, the steps recited in the disclosure of this application can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution disclosed in this application can be achieved, and this is not limited herein.
[0156] The above specific embodiments do not constitute a limitation on the scope of protection of this application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the principles of this application shall be included within the scope of protection of this application.
Claims
1. A lane departure warning method, characterized in that Including: Obtaining the position information of a camera device installed on a vehicle relative to the vehicle, where the position information of the camera device relative to the vehicle includes: the longitudinal distance between the camera device and the center of the front axle of the vehicle, and the lateral distance between the camera device and the outer edge position of the front wheel of the vehicle; Establishing an image coordinate system with the installation position of the camera device on the vehicle as the origin; Under the image coordinate system, taking the driving lane of the vehicle at the current moment as the own lane, and obtaining the parameter information of the target lane line of the own lane collected by the camera device under the image coordinate system; where the target lane line is the left lane line and / or the right lane line of the own lane; Calculating based on a preset target lane line equation of the own lane, the longitudinal distance between the camera device and the center of the front axle of the vehicle, and the parameter information of the target lane line of the own lane to obtain a calculation result; Taking the absolute value of the calculation result, and determining the difference between the calculation result after taking the absolute value and the lateral distance between the camera device and the outer edge position of the front wheel of the vehicle as the lateral distance between the outer edge position of the front wheel of the vehicle at the current moment and the target lane line; where the front wheel is the left front wheel and / or the right front wheel; Obtaining the historical lateral distance between the outer edge position of the front wheel of the vehicle at a historical moment and the target lane line; Determining the deviation direction of the vehicle according to the historical lateral distance and the lateral distance between the outer edge position of the front wheel of the vehicle at the current moment and the target lane line; When the deviation direction of the vehicle is a left deviation, if the lateral distance between the outer edge position of the left front wheel of the vehicle at the historical moment and the left lane line is greater than a first preset threshold, then when the lateral distance between the outer edge position of the left front wheel of the vehicle at the current moment and the left lane line is less than or equal to the first preset threshold, performing a left-side warning process on the vehicle; Or, When the deviation direction of the vehicle is a right deviation, if the lateral distance between the outer edge position of the right front wheel of the vehicle at the historical moment and the right lane line is greater than a first preset threshold, then when the lateral distance between the outer edge position of the right front wheel of the vehicle at the current moment and the right lane line is less than or equal to the first preset threshold, performing a right-side warning process on the vehicle.
2. The method according to claim 1, wherein The determining the deviation direction of the vehicle according to the historical lateral distance and the lateral distance between the outer edge position of the front wheel of the vehicle at the current moment and the target lane line includes: Performing numerical analysis on the historical lateral distance and the lateral distance between the outer edge position of the front wheel of the vehicle at the current moment and the target lane line in chronological order to obtain the change trend of the lateral distance between the outer edge position of the front wheel of the vehicle and the target lane line; Determining the deviation direction of the vehicle according to the change trend of the lateral distance between the outer edge position of the front wheel of the vehicle and the target lane line.
3. The method according to claim 1, characterized in that, After performing the left-side warning process on the vehicle, the method further includes: Generate a first virtual lane line parallel to the left lane line and located within the current lane according to the first preset threshold; Generate a second virtual lane line parallel to the left lane line and located within the left adjacent lane of the current lane according to the second preset threshold; Determine the area between the first virtual lane line and the second virtual lane line as the left warning area; When the deviation direction of the vehicle is to the left, if the vehicle exits the left warning area and travels away from the current lane, control the vehicle to stop the left warning process.
4. The method according to claim 1, wherein Taking the installation position of the camera device on the vehicle as the origin, establish an image coordinate system, including: Determine the midpoint of the installation position of the camera device on the vehicle; Taking the midpoint of the installation position of the camera device on the vehicle, the direction of the current lane line, and the direction perpendicular to the current lane line as the origin, the X-axis, and the Y-axis respectively, establish an image coordinate system.
5. A lane departure warning device, characterized in that, Including: An acquisition module, configured to acquire the position information of a camera device installed on the vehicle relative to the vehicle, where the position information of the camera device relative to the vehicle includes: the longitudinal distance between the camera device and the center of the front axle of the vehicle, and the lateral distance between the camera device and the outer edge position of the front wheel of the vehicle; A building module, configured to establish an image coordinate system with the installation position of the camera device on the vehicle as the origin; The acquisition module is further configured to use the driving lane of the vehicle at the current moment as the current lane in the image coordinate system, and acquire the parameter information of the target lane line of the current lane collected by the camera device in the image coordinate system; where the target lane line is the left lane line and / or the right lane line of the current lane; A calculation module, configured to perform calculations based on the preset target lane line equation of the current lane, the longitudinal distance between the camera device and the center of the front axle of the vehicle, and the parameter information of the target lane line of the current lane, to obtain a calculation result; Take the absolute value of the calculation result, and determine the difference between the calculation result after taking the absolute value and the lateral distance between the camera device and the outer edge position of the front wheel of the vehicle as the lateral distance between the outer edge position of the front wheel of the vehicle and the target lane line at the current moment; where the front wheel is the left front wheel and / or the right front wheel; An early warning module is configured to obtain a historical lateral distance between an outer edge position of a front wheel of the vehicle at a historical moment and the target lane line; determine a deviation direction of the vehicle based on the historical lateral distance and a lateral distance between an outer edge position of the front wheel of the vehicle at the current moment and the target lane line; in a case where the deviation direction of the vehicle is a left deviation, if a lateral distance between an outer edge position of the left front wheel of the vehicle at the historical moment and the left lane line is greater than a first preset threshold, then when the lateral distance between an outer edge position of the left front wheel of the vehicle at the current moment and the left lane line is less than or equal to the first preset threshold, perform a left-side early warning process on the vehicle; or, in a case where the deviation direction of the vehicle is a right deviation, if a lateral distance between an outer edge position of the right front wheel of the vehicle at the historical moment and the right lane line is greater than a first preset threshold, then when the lateral distance between an outer edge position of the right front wheel of the vehicle at the current moment and the right lane line is less than or equal to the first preset threshold, perform a right-side early warning process on the vehicle.
6. An electronic device, characterized in that, Comprising: At least one processor and a memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the lane departure warning method according to any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that, Computer-executable instructions are stored in the computer-readable storage medium, and when the computer-executable instructions are executed by a processor, they are used to implement the lane departure warning method according to any one of claims 1 to 4.
8. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the lane departure warning method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Lane departure early warning method and lane departure early warning system
CN104859563A
Unmanned vehicle lane line identification method and device
CN106203341A
Lane departure warning method and system for preventing repeated warning of one-side lane departure
CN107310553A
Lane departure early warning method and device, control device and storage medium
CN114475641A