Lane departure detection method, electronic device and computer readable storage medium

By using a single sensor and vanishing point of multiple frame images in lane departure detection, the problems of high computational volume, high cost and low accuracy in the prior art are solved, and more efficient and accurate lane departure detection is achieved.

CN111104824BActive Publication Date: 2024-12-13ZTE CORP
View PDF 14 Cites 0 Cited by

Patent Information

Application Number
CN201811255768.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-10-26
Publication Date
2024-12-13
Estimated Expiration
2038-10-26

AI Technical Summary

Technical Problem

The existing lane departure detection methods are computationally expensive, costly and low accuracy, and require multiple sensors to cooperate with each other.

Method used

By pre-acquisitioning multi-frame images during vehicle driving, the vanishing point is obtained, the vehicle's deviation threshold is calculated, and a single sensor is used to judge lane deviation in real-time detection, reducing the calculation amount and cost and improving accuracy.

Benefits of technology

It achieves lower computing volume and cost, improves the accuracy of lane departure detection, avoids the dependence of multiple sensors, and enhances the reliability of detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111104824B_ABST
    Figure CN111104824B_ABST
Patent Text Reader

Abstract

The embodiments of the present invention relate to the technical field of vehicle networking, and disclose a lane departure detection method, an electronic device, and a computer-readable storage medium. In the present invention, a lane departure detection method includes: obtaining a vanishing point in each frame according to a plurality of frames of images collected in advance during vehicle driving, and calculating a vehicle deviation threshold according to the vanishing points of the plurality of frames; wherein the vanishing point is the intersection of the lane lines of the lane where the vehicle is located; when performing lane deviation detection, image frames of the vehicle driving process are collected in real time; according to the difference between the vanishing point in the real-time collected image frame and the vanishing point in the starting frame of the deviation detection, and the comparison result with the deviation threshold, it is determined whether there is lane deviation. The embodiments of the present invention also provide an electronic device and a computer-readable storage medium. The embodiments of the present invention can realize lane departure detection with less calculation amount and lower cost, and the accuracy of the detection result is higher.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the technical field of vehicle networking, and in particular to a lane departure detection method, electronic equipment, and computer-readable storage medium. Background Art

[0002] There are many cases where vehicles cause personal injury or property damage due to fault or accident on the road. In particular, the number of car accidents and the number of deaths on highways are higher than those on ordinary roads. This is because the highway environment is monotonous and lacks visual stimulation. Driver fatigue is common. At this time, the driver's attention is scattered and it is easy to drive unconsciously away from the lane, causing accidents. According to relevant statistics, if the driver can be warned in advance before the highway accident, even if it is warned 1 second in advance, more than 90% of traffic accidents can be avoided.

[0003] In response to the problem of vehicles deviating from their lanes, vehicle departure warning systems have emerged. Among them, the lane departure warning system is a system that assists drivers in reducing traffic accidents caused by lane deviations by means of alarms. The lane departure warning system uses information processing, computers and other related technologies to sense the road environment through various sensors, such as lane markings, traffic signs and other specific markers, to obtain the current situation of the vehicle; then it analyzes and judges the current driving situation based on the sensed information, and uses alarms to alert drivers to avoid potential threats; or in dangerous situations, it forces the driver to correct the driving state to keep the car in a safe driving state. Some lane departure warning systems in the prior art are created based on mathematical modeling, some are created based on deep learning, and some are created in combination with road facilities.

[0004] However, the inventors have found that there are at least the following problems in the prior art: the amount of calculation in the lane departure detection process is large, and multiple sensors are required to cooperate with each other, which makes the cost high, and the accuracy of the detection result is low. Summary of the invention

[0005] The purpose of the embodiments of the present invention is to provide a lane departure detection method, an electronic device and a computer-readable storage medium, which can realize lane departure detection with less calculation amount and lower cost, and the accuracy of the detection result is higher.

[0006] To solve the above technical problems, an embodiment of the present invention provides a lane departure detection method, comprising: obtaining a vanishing point in each frame according to a plurality of frames of images collected in advance during vehicle driving, and calculating a vehicle deviation threshold according to the vanishing points of the plurality of frames; wherein the vanishing point is an intersection of lane lines of a lane where the vehicle is located; when performing lane deviation detection, image frames of the vehicle driving process are collected in real time; judging whether there is lane deviation according to a difference between the vanishing point in the image frame collected in real time and the vanishing point in the starting frame of the deviation detection and a comparison result with the deviation threshold.

[0007] An embodiment of the present invention also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the lane departure detection method as described above.

[0008] An embodiment of the present invention further provides a computer-readable storage medium storing a computer program, which implements the above-mentioned lane departure detection method when executed by a processor.

[0009] Compared with the prior art, the embodiments of the present invention provide a lane departure detection method, which obtains the intersection of the lane lines of the lane where the vehicle is located in each frame according to the multiple frames of images collected in advance during the vehicle's driving process, takes the intersection of the lane lines of the lane where the vehicle is located as the vanishing point, and calculates the vehicle's deviation threshold according to the vanishing points of the multiple frames of images; when performing lane deviation detection, the image frames of the vehicle's driving process are collected in real time, and then the difference between the vanishing point in the real-time collected image frame and the vanishing point in the starting frame of the deviation detection is compared with the deviation threshold to determine whether there is lane deviation. In this embodiment, since the deviation threshold is calculated based on multiple vanishing points, it does not need to be set based on manual experience, so that the accuracy of the detection result is higher; the entire solution does not require multiple sensors to cooperate with each other, only one sensor that can realize image acquisition is needed, so that the cost is lower; by detecting the relative position between the vehicle and the vanishing point and comparing it with the deviation threshold, it is possible to determine whether the vehicle has deviated, reducing the amount of calculation. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0011] Figure 1 is a flow chart of a lane departure detection method according to a first embodiment of the present invention;

[0012] Figure 2 is a schematic diagram of a vanishing point in a lane departure detection method according to a first embodiment of the present invention;

[0013] Figure 3 is a schematic diagram of the distance between a center point and a boundary of a region in an example of a lane departure detection method according to the first embodiment of the present invention;

[0014] Figure 4 is a schematic diagram of obtaining a deviation threshold in a lane departure detection method according to a first embodiment of the present invention;

[0015] Figure 5 It is a schematic diagram of the relationship between the deviation threshold and the deviation angle in the prior art;

[0016] Figure 6 is a flow chart of a lane departure detection method according to a second embodiment of the present invention;

[0017] Figure 7 is a flow chart of a lane departure detection method according to a third embodiment of the present invention;

[0018] Figure 8 It is a schematic diagram of the structural connection of an electronic device according to the fourth embodiment of the present invention. DETAILED DESCRIPTION

[0019] In order to make the purpose, technical scheme and advantages of the embodiments of the present invention clearer, the following will be described in detail with reference to the accompanying drawings. However, it will be appreciated by those skilled in the art that in the various embodiments of the present invention, many technical details are provided in order to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can be implemented.

[0020] A first embodiment of the present invention relates to a lane departure detection method, which obtains the intersection of lane lines of a lane where a vehicle is located in each frame based on multiple frames of images collected in advance during the vehicle's driving process, takes the intersection of lane lines of the lane where the vehicle is located as a vanishing point, and calculates the vehicle's deviation threshold based on the vanishing points of the multiple frames of images; when performing lane deviation detection, image frames of the vehicle's driving process are collected in real time, and then based on the difference between the vanishing point in the real-time collected image frame and the vanishing point in the starting frame of the deviation detection, and the comparison result with the deviation threshold, it is determined whether there is lane deviation.

[0021] In this implementation, since the deviation threshold is calculated based on multiple vanishing points, it does not need to be set based on manual experience, so that the accuracy of the detection result is higher; the entire solution does not require multiple sensors to cooperate with each other, only one sensor that can realize image acquisition is required, which makes the cost lower; by detecting the relative position between the vehicle and the vanishing point and comparing it with the deviation threshold, it is possible to determine whether the vehicle has deviated, reducing the amount of calculation.

[0022] The implementation details of the lane departure detection method of this embodiment are specifically described below. The following content is only provided for the convenience of understanding the implementation details and is not necessary for implementing this solution.

[0023] First of all, it should be noted that the lane departure detection method in this embodiment can be applied to both servers and electronic devices such as vehicle-mounted devices. That is, the execution subject of the lane departure detection method in this embodiment can be either a server or an electronic device. Since the general process of the lane departure detection method is the same regardless of which execution subject is used, for ease of understanding, unless the execution subject is specifically described as a server, the execution subject is assumed to be an electronic device.

[0024] A flow chart of a lane departure detection method in this embodiment is as follows: Figure 1 As shown, including:

[0025] Step 101, obtaining a vanishing point in each frame according to a plurality of frames of images collected in advance during the vehicle driving process.

[0026] The vanishing point is the intersection of the lane lines of the vehicle's lane, such as Figure 2 The intersection point of the two lane lines shown is the intersection point in the circle, which is the vanishing point.

[0027] Specifically, it is necessary to process the multiple frames of images collected in advance during the vehicle driving process separately in order to obtain the vanishing points in each frame. The process of processing the multiple frames of images can generally include the following stages: image preprocessing stage, edge detection stage, and lane line detection stage.

[0028] In the image preprocessing stage, image preprocessing can be mainly performed by combining image denoising (such as median denoising), Otsu binarization method, and morphological processing to highlight the effective information in each frame of the image and filter out invalid information, thereby reducing the subsequent amount of calculation. In the edge detection stage, the Canny (Canny Edge Detector) edge detection algorithm can be used. Since the Canny edge detection algorithm has higher accuracy than other edge detection algorithms, it can accurately identify points with obvious brightness changes in the image. In the lane line detection stage, the Hough transform can be used for lane line detection. Since the Hough transform is a method for detecting the boundary shape of discontinuity points, it realizes the fitting of straight lines and curves by transforming the image coordinate space into the parameter space. In this embodiment, the lane line of the lane where the vehicle is located can be detected, and then the intersection of the lane line of the lane where the vehicle is located, that is, the vanishing point, is obtained. Since the implementation details in the above three stages belong to the prior art, they are not repeated here.

[0029] It should be noted that the multiple frames of images pre-captured during the driving process of the vehicle in this embodiment may be images captured by the same vehicle, or images captured by different vehicles, and this embodiment does not make any specific limitation. When the execution subject is an electronic device, the electronic device can obtain the multiple frames of images captured by the vehicle where the electronic device is located based on the data stored in the electronic device itself, or it can obtain the multiple frames of images captured by the vehicle where the electronic device is located from the server. However, if you want to obtain images captured by different vehicles, you should send a request to the server to obtain images captured by other vehicles from the server. When the execution subject is a server, you can directly obtain multiple frames of images captured by the same vehicle or different vehicles during the driving process of the vehicle.

[0030] Step 102: Calculate the deviation threshold of the vehicle according to the vanishing points of the multiple frames of images.

[0031] Specifically, the area with the smallest area covering a preset proportion of vanishing points can be obtained based on the vanishing points of multiple frames of images, and then the deviation threshold can be obtained based on the distance between the center of the area and the boundary of the area. The preset proportion can be 95%, 90%, etc., and the area with the smallest area covering the preset proportion of vanishing points can be an area with regular shapes such as an ellipse, rectangle, triangle, etc., or an area with other irregular shapes, which is not specifically limited in this embodiment.

[0032] When the area with the smallest area covering the preset proportion of vanishing points is a regular-shaped area, the deviation threshold can be obtained according to the distance between the center point of the regular-shaped area and the boundary of the area. Figure 3As shown, if the area with the smallest area covering the preset proportion of vanishing points is the ellipse, the distance between the center point and the boundary of the area can be r1 or r2. When the area with the smallest area covering the preset proportion of vanishing points is an irregularly shaped area, the distance between the center point and the boundary of the area can be the longest distance or the shortest distance.

[0033] Preferably, the area with the smallest area covering the preset proportion of vanishing points can be a circular area. In this case, the radius of the circular area with the smallest area is used as the distance between the center of the area and the border of the area, and then the deviation threshold is obtained. Since the distance between the center point of the circular area and the border of the area is equal, which is the radius of the circular area, the distance between the center point and the border of the area is unique, which is conducive to simplifying the calculation amount.

[0034] The calculation deviation threshold in this implementation is specifically described below with reference to an example. Figure 4 , including the vanishing points of three frames of images, (1)-(3) represent the vanishing points of the first to third frames of images respectively. Considering that in practice, the vanishing points will be at different positions in the vehicle's front view image, but if the vehicle is driving normally, the position of the vanishing points will be in a relatively stable area. Based on this, by collecting and summarizing the vanishing points of each frame, the smallest circular area covering 95% of all the summarized points (excluding the minimum probability event 0.05) is taken as the area with the smallest area covering the preset proportion of vanishing points. See Figure 4 In (4), the radius of the circular area is the calculated deviation threshold. It should be noted that the above is only an example, and the vanishing points of the multiple frames of images in this embodiment are not limited to the three frames of images. In actual applications, the more vanishing points there are, the higher the accuracy of the calculated deviation threshold of the vehicle.

[0035] See also Figure 5 , r represents the deviation threshold of the vehicle, C represents the vanishing point, car represents the vehicle, and b represents the vertical distance from the vanishing point C to the vehicle; if r and b are known, the deviation angle θ can be obtained according to the formula: r = btanθ, and then it can be judged whether the vehicle deviates from the lane. It can be seen that the size of the deviation threshold is crucial to judging whether the vehicle deviates from the lane. Since in the prior art, the deviation threshold needs to be set based on manual experience, the accuracy of the lane deviation detection result is low. It can be understood that if the deviation threshold is set too small, many unnecessary false alarms will be generated, thereby affecting the normal driving of the vehicle; if the deviation threshold is set too large, the later alarm delay will be too long or even no alarm will be issued, which will not play a normal role in prompting the driver to deviate from the lane and avoid risks. In this embodiment, the deviation threshold of the vehicle is calculated based on the vanishing points of multiple frames of images, which is more accurate than setting it based on manual experience.

[0036] In addition, in this embodiment, the multi-frame images collected during the vehicle's driving process can be updated regularly, and the deviation threshold can be updated based on the updated multi-frame images. That is to say, in addition to obtaining the deviation threshold by analyzing the multi-frame images collected in advance during the vehicle's driving process in step 101, a large number of vanishing points can be determined by using big data (not only the images collected by the vehicle itself, but also the images collected by other vehicles on the lane), and the deviation threshold is obtained based on the large number of vanishing points, and the deviation threshold is updated. In this way, the deviation threshold result can be made more accurate.

[0037] Step 103, when performing lane deviation detection, image frames of the vehicle during driving are collected in real time.

[0038] Among them, the real-time acquisition of image frames during vehicle driving is roughly the same as the process of pre-acquisition of multiple frames of images during vehicle driving in step 101. The only difference is that this step is real-time acquisition; step 101 is pre-acquisition, which will not be repeated here.

[0039] Step 104 , determining whether the difference between the vanishing point in the real-time captured image frame and the vanishing point in the starting frame of the deviation detection is greater than a deviation threshold.

[0040] The first frame at the beginning of the deviation detection is the start frame, which serves as a reference for the image frames collected in real time.

[0041] Specifically, the lane deviation is determined based on the difference between the vanishing point in the real-time captured image frame and the vanishing point in the starting frame of the deviation detection and the deviation threshold. If the difference between the vanishing point in the real-time captured image frame and the vanishing point in the starting frame of the deviation detection is greater than the deviation threshold, step 105 is performed; otherwise, step 106 is performed.

[0042] Step 105: Determine whether lane departure exists.

[0043] Step 106 , determine that there is no lane departure.

[0044] It is not difficult to find that the lane departure detection method provided by this embodiment has a higher accuracy of the detection result because the deviation threshold is calculated based on multiple vanishing points and does not need to be set based on manual experience. The entire solution does not require multiple sensors to cooperate with each other, but only requires one sensor that can realize image acquisition, which makes the cost lower. By detecting the relative position between the vehicle and the vanishing point and comparing it with the deviation threshold, it is possible to determine whether the vehicle has deviated, thereby reducing the amount of calculation.

[0045] The second embodiment of the present invention relates to a lane departure detection method. The second embodiment is further improved on the basis of the first embodiment, and the specific improvement is that: in this embodiment, before judging whether there is lane departure, it is further judged whether the probability that the difference between the vanishing point in the image frame collected in real time within the preset time length and the vanishing point in the starting frame is greater than the deviation threshold is greater than the preset threshold; if the judgment result is greater than the preset threshold, it means that the current driving state of the vehicle is not stable, the starting frame is updated to the image frame collected most recently, and it is judged whether the difference between the vanishing point in the image frame collected in real time within the next preset time length and the vanishing point in the updated starting frame is greater than the deviation threshold is greater than the preset threshold, until the judgment result is less than or equal to the preset threshold, that is, after the driving state of the vehicle is stable, it is judged whether there is lane departure, which can avoid misjudgment caused by the vehicle not entering a stable state, and can further improve the accuracy of the detection result.

[0046] The flowchart of the lane departure detection method in this embodiment is as follows: Figure 6 As shown, including:

[0047] Step 201 : acquiring a vanishing point in each frame based on a plurality of frames of images collected in advance during the vehicle driving process.

[0048] The vanishing point is the intersection of the lane lines of the vehicle's lane.

[0049] Step 202: Calculate the deviation threshold of the vehicle according to the vanishing points of the multiple frames of images.

[0050] Step 203, when performing lane deviation detection, image frames of the vehicle during driving are collected in real time.

[0051] Step 204 , determining whether the probability that the difference between the vanishing point in the image frame collected in real time within the preset time period and the vanishing point in the starting frame is greater than the deviation threshold is greater than the preset threshold.

[0052] Specifically, if the judgment result is greater than the preset threshold, then go to step 205 ; otherwise, go to step 207 .

[0053] In one example, the preset threshold can be set to 75%. If the difference between the vanishing point in the image frame collected in real time within the preset time and the vanishing point in the starting frame is r1, and the deviation threshold is r; then, if the probability of r1>r is 30%, 30% is less than the preset threshold (75%), the vehicle is in a stable driving state and enters step 207; if the probability of r1≤r is 80%, which is greater than the preset threshold, then enter step 205.

[0054] Step 205: Update the start frame to the most recently acquired image frame.

[0055] That is, the most recently acquired image frame is used as the starting frame.

[0056] In addition, when the start frame is updated to the most recently acquired image frame, the deviation threshold may be updated according to the vanishing points in the pre-acquired multiple frames of images during the vehicle's driving process and the vanishing points in the image frames acquired in real time.

[0057] Step 206 , determining whether the probability that the difference between the vanishing point in the image frame collected in real time within the next preset time period and the vanishing point in the updated start frame is greater than the deviation threshold is greater than the preset threshold.

[0058] Specifically, if the judgment result is greater than the preset threshold, the process returns to step 205 , and when the judgment result is less than or equal to the preset threshold, the process proceeds to step 207 .

[0059] Step 207, determine whether the difference between the vanishing point in the real-time acquired image frame and the vanishing point in the starting frame of the deviation detection is greater than the deviation threshold. If the difference between the vanishing point in the real-time acquired image frame and the vanishing point in the starting frame of the deviation detection is greater than the deviation threshold, proceed to step 208; otherwise, proceed to step 209.

[0060] Step 208 , determining whether lane departure exists.

[0061] Step 209 , determining that there is no lane departure.

[0062] Since steps 201 to 203 and steps 207 to 209 in this embodiment are substantially the same as steps 101 to 106 in the first embodiment, the purpose is to obtain the vanishing point in each frame based on the multiple frames of images collected in advance during the vehicle's driving process, and calculate the vehicle's deviation threshold based on the vanishing points of the multiple frames of images; when performing lane deviation detection, image frames of the vehicle's driving process are collected in real time; based on the difference between the vanishing point in the real-time collected image frame and the vanishing point in the starting frame of the deviation detection, and the comparison result with the deviation threshold, it is determined whether there is lane deviation, which will not be described in detail here.

[0063] It is not difficult to find that the lane departure detection method provided by the present embodiment further determines whether the probability that the difference between the vanishing point in the image frame collected in real time within a preset time length and the vanishing point in the starting frame is greater than the deviation threshold is greater than the preset threshold before determining whether there is lane departure; if the determination result is greater than the preset threshold, it means that the current driving state of the vehicle is not stable, the starting frame is updated to the image frame collected most recently, and the vanishing point in the image frame collected in real time within the next preset time length and the vanishing point in the updated starting frame is greater than the deviation threshold is greater than the preset threshold, until the determination result is less than or equal to the preset threshold, that is, after the driving state of the vehicle is stable, it is determined whether there is lane departure, which can avoid misjudgment caused by the vehicle not entering a stable state, and can further improve the accuracy of the detection result.

[0064] A third embodiment of the present invention relates to a lane departure detection method. This embodiment is substantially the same as the first embodiment, except that: in the first embodiment, once the difference between the vanishing point in the real-time acquired image frame and the vanishing point in the starting frame of the deviation detection is greater than a deviation threshold, it is determined that there is a lane departure; whereas in this embodiment, when the difference between the vanishing point in N consecutively acquired image frames and the vanishing point in the starting frame of the deviation detection is greater than the deviation threshold, it is determined that there is a lane departure, wherein N is a natural number greater than 1, which is conducive to avoiding misjudgment and can further improve the accuracy of the detection result.

[0065] The flowchart of the lane departure detection method in this embodiment is as follows: Figure 7 As shown, including:

[0066] Step 301 : acquiring a vanishing point in each frame based on a plurality of frames of images collected in advance during the vehicle driving process.

[0067] The vanishing point is the intersection of the lane lines of the vehicle's lane.

[0068] Step 302: Calculate the deviation threshold of the vehicle according to the vanishing points of the multiple frames of images.

[0069] Step 303: When performing lane deviation detection, image frames of the vehicle during driving are collected in real time.

[0070] Since steps 301 to 303 in this embodiment are substantially the same as steps 101 to 103 in the first embodiment, they are not described in detail here.

[0071] Step 304: Check whether the real-time collected image meets the preset conditions. If the preset conditions are met, proceed to step 305; otherwise, proceed to step 306.

[0072] The preset condition is that the difference between the vanishing point in the N consecutively collected frames and the vanishing point in the starting frame of the deviation detection is greater than the deviation threshold, and N is a natural number greater than 1.

[0073] In one example, N can be 8, that is, the preset condition is that the difference between the vanishing point in the 8 frames of images collected continuously and the vanishing point in the starting frame of the deviation detection is greater than the deviation threshold, then step 305 is entered; otherwise, step 306 is entered. The reason why N is set to 8 is that the upper speed limit of my country's expressways is 120km / h. When the vehicle deviation angle is 5°, the side speed of the vehicle is about 2.9m / s. According to the expressway construction standard, the prescribed width of a single lane is 3.75m. Assuming that the vehicle is driving in the center of the lane, the distance between the side of the vehicle and the lane line is approximately 1.88 meters. If the vehicle speed remains unchanged, in the above case, the vehicle will contact the lane line within 0.65 seconds. The reaction time of the general driver is about 0.3 seconds. In order to prevent false alarms, a decision can be made at 0.35s. Since the calculation speed is generally 25 frames per second, that is, one frame can be calculated in 0.04 seconds, and 8 frames can be calculated in 0.35 seconds, so in practical applications, the above N can be set to 8. In addition, there are 3.75m wide speed bumps on both sides of the highway. 120km / h is the legal maximum speed limit. Normally driven vehicles will be slower than this speed, and the side speed will also be slower than 2.9m / s. Therefore, after detecting lane deviation, the driver has sufficient time to avoid risks.

[0074] In addition, if the preset conditions are met, an alarm can be triggered to warn the vehicle behind. For example, if the vehicle is outside the deviation threshold for more than 8 consecutive frames, it means that the vehicle has been deviating from the lane for a long time, and an alarm can be triggered to warn the vehicle behind, such as sending an alarm to all vehicles 200 meters away from the vehicle to avoid rear-end collision.

[0075] If the execution subject in this embodiment is a server, the server sends an alarm to the located rear vehicle. Since the server can obtain the vanishing points of multiple vehicles, if the vanishing points of multiple vehicles deviate from the deviation threshold, it can be basically determined that the road condition at that location is not good and the relevant department needs to rectify the road condition; if only the vanishing point of the vehicle deviates from the deviation threshold and lasts for a period of time, an alarm can be issued.

[0076] If the execution subject in this embodiment is an electronic device, the electronic device notifies the server, and the server sends an alarm to the vehicle behind. Alternatively, after the electronic device detects lane deviation, the electronic device itself sends an alarm, such as a flashing light or a sound alarm, to achieve the purpose of reminding the vehicle behind and avoiding rear-end collision.

[0077] Step 305: determine whether lane departure exists.

[0078] Step 306 , determine that there is no lane departure.

[0079] It should be noted that this embodiment may also be an improvement made on the basis of the second embodiment.

[0080] It is not difficult to find that the lane departure detection method provided by the present embodiment can determine that there is lane departure only when the difference between the vanishing point in N consecutively collected image frames and the vanishing point in the starting frame of the deviation detection is greater than the deviation threshold, where N is a natural number greater than 1, which is conducive to avoiding misjudgment and can further improve the accuracy of the detection result.

[0081] The step division of the above methods is only for the purpose of clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this patent; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the scope of protection of this patent.

[0082] A fourth embodiment of the present invention relates to an electronic device, such as Figure 8 As shown, it includes: at least one processor 401; and a memory 402 that is communicatively connected to the at least one processor 401; wherein the memory 402 stores instructions that can be executed by the at least one processor 401, and the instructions are executed by the at least one processor 401 so that the at least one processor 401 can execute the lane departure detection method as described in any one of the first to third embodiments.

[0083] The memory 402 and the processor 401 are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors 401 and the memory 402 together. The bus can also connect various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor 401 is transmitted on a wireless medium via an antenna, and further, the antenna also receives data and transmits the data to the processor 401.

[0084] The processor 401 is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management and other control functions. The memory 402 can be used to store data used by the processor 401 when performing operations.

[0085] A fifth embodiment of the present invention relates to a computer-readable storage medium storing a computer program, which implements the above method embodiment when executed by a processor.

[0086] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0087] Those skilled in the art will appreciate that the above-mentioned embodiments are specific examples for implementing the present application, and in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present application.

Claims

1. A lane departure detection method, characterized in that: include: According to the multiple frames of images collected in advance during the vehicle's driving process, a vanishing point in each frame is obtained, and according to the vanishing point of the multiple frames of images, a deviation threshold of the vehicle is calculated; wherein the vanishing point is an intersection point of the lane lines of the lane where the vehicle is located; When performing lane deviation detection, image frames of the vehicle are collected in real time during driving; Whether there is lane deviation is determined based on a comparison result between a vanishing point in the real-time captured image frame and a vanishing point in the starting frame of the deviation detection and the deviation threshold.

2. The lane departure detection method according to claim 1, characterized in that: The calculating the deviation threshold of the vehicle according to the vanishing points of the multiple frames of images specifically includes: According to the vanishing points of the multiple frames of images, obtaining a region with the smallest area covering a preset proportion of the vanishing points; The deviation threshold is obtained according to the distance between the center of the area and the boundary of the area.

3. The lane departure detection method according to claim 2, characterized in that: The obtaining of the region with the smallest area covering a preset proportion of vanishing points comprises: obtaining a circle with the smallest area covering a preset proportion of vanishing points; The deviation threshold is obtained according to the distance between the center of the area and the boundary of the area, specifically: The radius of the circle with the smallest area is obtained as the deviation threshold.

4. The lane departure detection method according to any one of claims 1 to 3, characterized in that: Before determining whether there is lane departure, the method further includes: Determine whether the probability that the difference between the vanishing point in the image frame acquired in real time within a preset time period and the vanishing point in the starting frame is greater than the deviation threshold is greater than a preset threshold; If the judgment result is greater than the preset threshold, the start frame is updated to the most recently acquired image frame, and it is determined whether the probability that the difference between the vanishing point in the image frame acquired in real time within the next preset time period and the vanishing point in the updated start frame is greater than the deviation threshold is greater than the preset threshold, until the judgment result is less than or equal to the preset threshold.

5. The lane departure detection method according to claim 4, characterized in that: When the starting frame is updated to the most recently acquired image frame, the method further includes: The deviation threshold is updated according to the vanishing points in the pre-collected multiple frames of images during the vehicle's driving process and the vanishing points in the image frames collected in real time.

6. The lane departure detection method according to any one of claims 1 to 3, characterized in that: Also includes: The multiple frames of images collected during the vehicle driving process are regularly updated, and the deviation threshold is updated according to the updated multiple frames of images.

7. The lane departure detection method according to claim 1, characterized in that: The multiple frames of images are images collected from the same vehicle, or are images collected from different vehicles.

8. The lane departure detection method according to any one of claims 1 to 3, characterized in that: The determining whether there is lane deviation according to a comparison result between a vanishing point in the real-time acquired image frame and a vanishing point in the starting frame of the deviation detection and the deviation threshold specifically includes: Detecting whether the image collected in real time meets a preset condition, wherein the preset condition is that the difference between the vanishing point in N consecutive frames of images collected and the vanishing point in the starting frame of the deviation detection is greater than the deviation threshold, and N is a natural number greater than 1; If the preset conditions are met, it is determined that lane departure exists.

9. The lane departure detection method according to claim 8, characterized in that: The N is 8.

10. The lane departure detection method according to claim 8, characterized in that: Also includes: If the preset condition is met, an alarm is triggered to warn the vehicle behind.

11. An electronic device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the lane departure detection method as described in any one of claims 1 to 10.

12. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the lane departure detection method according to any one of claims 1 to 10 is implemented.

Citation Information

Patent Citations

  • Lane departure warning device based on single chip

    CN102320298A

  • Method for effectively judging and recognizing vehicle travelling conditions and device thereof

    CN104129389A

  • Road deviation monitoring method and system

    CN104835324A

  • Method and device for early warning lane departure of vehicle

    CN105966398A

  • Detection area correction method and device

    CN106846299A