CN111104824A - Method for detecting lane departure, electronic device, and computer-readable storage medium - Google Patents

Method for detecting lane departure, electronic device, and computer-readable storage medium Download PDF

Info

Publication number
CN111104824A
CN111104824A CN201811255768.8A CN201811255768A CN111104824A CN 111104824 A CN111104824 A CN 111104824A CN 201811255768 A CN201811255768 A CN 201811255768A CN 111104824 A CN111104824 A CN 111104824A
Authority
CN
China
Prior art keywords
vehicle
lane departure
frame
vanishing point
lane
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201811255768.8A
Other languages
Chinese (zh)
Inventor
张恒
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to CN201811255768.8A priority Critical patent/CN111104824A/en
Publication of CN111104824A publication Critical patent/CN111104824A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/56Context or environment of the image exterior to a vehicle by using sensors mounted on the vehicle
    • G06V20/588Recognition of the road, e.g. of lane markings; Recognition of the vehicle driving pattern in relation to the road

Abstract

The embodiment of the invention relates to the technical field of vehicle networking and discloses a lane departure detection method, electronic equipment and a computer-readable storage medium. In the present invention, a method for detecting a lane departure includes: acquiring vanishing points in each frame according to a plurality of frames of images acquired in advance in the running process of the vehicle, and calculating a deviation threshold of the vehicle according to the vanishing points of the plurality of frames of images; the vanishing point is the intersection point of the lane lines of the lane where the vehicle is located; when lane departure detection is carried out, image frames in the driving process of a vehicle are collected in real time; and judging whether the lane departure exists or not according to the comparison result of the difference value between the vanishing point in the image frame acquired in real time and the vanishing point in the initial frame of departure detection and the departure threshold. The embodiment of the invention also provides the electronic equipment and a computer readable storage medium. The embodiment of the invention can realize the detection of the lane departure with less calculation amount and lower cost, and the accuracy of the detection result is higher.

Description

Method for detecting lane departure, electronic device, and computer-readable storage medium
Technical Field
The embodiment of the invention relates to the technical field of vehicle networking, in particular to a lane departure detection method, electronic equipment and a computer-readable storage medium.
Background
The accidents of personal casualties or property loss caused by mistakes or accidents of vehicles on roads are frequent. Particularly, the number of car accidents and the number of dead people on the expressway are higher than those on the ordinary expressway, because the expressway is single in environment, lacks visual stimulation, and the fatigue driving condition of a driver is common, and at the moment, the driver is distracted and is easy to drive unconsciously by lane departure, so that accidents are caused. According to the related statistical data, if a driver can be prompted in advance before the highway accident happens, the driver can be prompted in advance even for 1 second, and the traffic accident more than nine times can be avoided.
Aiming at the problem that the vehicle deviates from the lane, the vehicle deviation early warning system is generated at the same time. The lane departure early warning system is a system for assisting a driver in reducing traffic accidents caused by lane departure in an alarming mode. The lane departure early warning system senses road environments such as lane marking lines, traffic signboards and other information of specific markers by using related technologies such as information processing, computers and the like through various sensors to obtain the current condition of the vehicle; then, the current driving situation is analyzed and judged by combining the sensed information, and a driver is made to pay attention to avoiding potential threats in an alarm prompting mode; or in dangerous situations, forcibly correcting the driving state to keep the automobile in a safe driving state. The lane departure warning systems in the prior art are created based on mathematical modeling, deep learning, and road facilities.
However, the inventors found that at least the following problems exist in the prior art: the calculation amount in the lane departure detection process is large, and various sensors are required to be matched with each other, so that the cost is high, and the accuracy of the detection result is low.
Disclosure of Invention
An object of embodiments of the present invention is to provide a lane departure detection method, an electronic device, and a computer-readable storage medium, which can detect lane departure with less calculation amount and lower cost, and which have higher accuracy of detection results.
In order to solve the above technical problem, an embodiment of the present invention provides a method for detecting a lane departure, including: acquiring vanishing points in each frame according to a plurality of frames of images acquired in advance in the running process of the vehicle, and calculating a deviation threshold of the vehicle according to the vanishing points of the plurality of frames of images; the vanishing point is the intersection point of the lane lines of the lane where the vehicle is located; when lane departure detection is carried out, image frames in the driving process of a vehicle are collected in real time; and judging whether the lane departure exists or not according to the comparison result of the difference value between the vanishing point in the image frame acquired in real time and the vanishing point in the initial frame of departure detection and the departure threshold.
An embodiment of the present invention also provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of lane departure detection as described above.
Embodiments of the present invention also provide a computer-readable storage medium storing a computer program which, when executed by a processor, implements the above-described lane departure detection method.
Compared with the prior art, the embodiment of the invention provides the lane departure detection method, which comprises the steps of acquiring the intersection point of the lane line of the lane where the vehicle is located in each frame according to the multi-frame image acquired in advance in the vehicle driving process, calculating the departure threshold value of the vehicle according to the vanishing point of the multi-frame image by taking the intersection point of the lane line of the lane where the vehicle is located as the vanishing point; when lane departure detection is carried out, image frames in the driving process of a vehicle are collected in real time, and then whether lane departure exists or not is judged according to the comparison result between the difference value between the vanishing point in the image frames collected in real time and the vanishing point in the initial frame of departure detection and the departure threshold. In the embodiment, the deviation threshold is calculated based on a plurality of vanishing points, and the setting by manual experience is not needed, so that the accuracy of the detection result is higher; in the whole scheme, a plurality of sensors are not required to be matched with each other, and only one sensor capable of acquiring images is required, so that the cost is lower; by detecting the relative position between the vehicle and the vanishing point and comparing the relative position with the deviation threshold value, whether the vehicle deviates or not can be judged, and the calculation amount is reduced.
Drawings
One or more embodiments are illustrated by way of example in the accompanying drawings, which correspond to the figures in which like reference numerals refer to similar elements and which are not to scale unless otherwise specified.
Fig. 1 is a flowchart of a lane departure detection method according to a first embodiment of the present invention;
fig. 2 is a schematic diagram of vanishing points in a lane departure detection method according to a first embodiment of the present invention;
fig. 3 is a schematic diagram of the distance of the center point from the boundary of the area according to one example in a lane departure detection method according to the first embodiment of the present invention;
fig. 4 is a schematic diagram of a deviation threshold obtained in a lane departure detection method according to a first embodiment of the present invention;
FIG. 5 is a diagram of a deviation threshold versus deviation angle in the prior art;
fig. 6 is a flowchart of a lane departure detection method according to a second embodiment of the present invention;
fig. 7 is a flowchart of a lane departure detection method according to a third embodiment of the present invention;
fig. 8 is a schematic structural connection diagram of an electronic device according to a fourth embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, it will be appreciated by those of ordinary skill in the art that numerous technical details are set forth in order to provide a better understanding of the present application in various embodiments of the present invention. However, the technical solution claimed in the present application can be implemented without these technical details and various changes and modifications based on the following embodiments.
The first embodiment of the invention relates to a lane departure detection method, which comprises the steps of acquiring intersection points of lane lines of a lane where a vehicle is located in each frame according to a plurality of frames of images acquired in advance in the driving process of the vehicle, and calculating a departure threshold value of the vehicle according to the intersection points of the lane lines of the lane where the vehicle is located as vanishing points by taking the intersection points of the lane lines as vanishing points; when lane departure detection is carried out, image frames in the driving process of a vehicle are collected in real time, and then whether lane departure exists or not is judged according to the comparison result between the difference value between the vanishing point in the image frames collected in real time and the vanishing point in the initial frame of departure detection and the departure threshold.
In the embodiment, the deviation threshold is calculated based on a plurality of vanishing points, and the setting by manual experience is not needed, so that the accuracy of the detection result is higher; in the whole scheme, a plurality of sensors are not required to be matched with each other, and only one sensor capable of acquiring images is required, so that the cost is lower; by detecting the relative position between the vehicle and the vanishing point and comparing the relative position with the deviation threshold value, whether the vehicle deviates or not can be judged, and the calculation amount is reduced.
The following describes in detail the implementation details of the lane departure detection method according to the present embodiment, and the following is only provided for easy understanding and is not essential to implementing the present embodiment.
First, the lane departure detection method according to the present embodiment may be applied to a server, or may be applied to an electronic device such as an in-vehicle device. That is, the main body of the lane departure detection method according to the present embodiment may be a server or an electronic device. Since the general flow of the lane departure detection method is the same regardless of the specific implementation subject, for the sake of convenience of understanding, the implementation subject is assumed to be an electronic device by default unless a case where the implementation subject is a server is specifically described.
As shown in fig. 1, a flowchart of a lane departure detection method according to the present embodiment includes:
step 101, acquiring vanishing points in each frame according to a plurality of frames of images acquired in advance in the vehicle running process.
The vanishing point is an intersection point of lane lines of a lane where the vehicle is located, and as shown in fig. 2, the intersection point of two lane lines is an intersection point in a circle, and the intersection point is the vanishing point.
Specifically, a plurality of frames of images acquired in advance in the vehicle driving process need to be processed respectively, and then the vanishing points in the frames can be acquired. The process of processing multiple frames of images may roughly include the following stages: the method comprises an image preprocessing stage, an edge detection stage and a lane line detection stage.
In the image preprocessing stage, image preprocessing can be performed mainly in a mode of combining image denoising (such as median denoising), an Otsu binarization method and morphological processing, so that effective information in each frame of image is highlighted, invalid information is filtered out, and subsequent calculation amount is reduced. In the Edge detection stage, a Canny (Canny Edge detector) Edge detection algorithm can be used, and points with obvious brightness change in the image can be accurately identified due to the higher accuracy of the Canny Edge detection algorithm compared with other Edge detection algorithms. In the lane line detection stage, the hough transform may be used for lane line detection. Since hough transform is a method for detecting the shape of the boundary of a discontinuity, it realizes the fitting of a straight line and a curve by transforming the image coordinate space to the parameter space. By applying the method and the device, the lane line of the lane where the vehicle is located can be detected, and then the intersection point of the lane line of the lane where the vehicle is located, namely the vanishing point, is obtained. Since the implementation details in the above three stages all belong to the prior art, they are not described herein.
It should be noted that, in this embodiment, the multi-frame image acquired in advance in the driving process of the vehicle may be an image acquired by the same vehicle, or an image acquired by a different vehicle, and this embodiment is not particularly limited. When the execution main body is the electronic device, the electronic device may acquire the multi-frame image acquired by the vehicle in which the electronic device is located according to data stored in the electronic device itself, or may acquire the multi-frame image acquired by the vehicle in which the electronic device is located from the server. However, in order to acquire an image captured by a different vehicle, a request should be sent to the server to acquire an image captured by another vehicle from the server. When the execution main body is a server, the multi-frame images acquired by the same vehicle or different vehicles in the driving process of the vehicle can be directly acquired
And 102, calculating a deviation threshold value of the vehicle according to the vanishing points of the multi-frame images.
Specifically, a region with the smallest area covering a vanishing point of a preset proportion can be obtained according to the vanishing point of the multi-frame image, and then the deviation threshold value is obtained according to the distance between the center of the region and the boundary of the region. The preset ratio may be 95% or 90%, and the obtained area covering the vanishing point with the preset ratio is the smallest area, which may be an area with a regular shape such as an ellipse, a rectangle, a triangle, or other areas with an irregular shape, and this embodiment is not limited specifically.
When the acquired region having the smallest area covering the vanishing point of the preset ratio is a region having a regular shape, the deviation threshold value may be obtained according to a distance between a center point of the region having the regular shape and a boundary of the region. As shown in fig. 3, if the area covering the vanishing point at the predetermined ratio is the minimum area is the ellipse, the distance between the center point and the boundary of the area may be r1 or r 2. When the acquired region with the smallest area covering the vanishing points in the preset proportion is the irregularly-shaped region, the distance between the central point and the boundary of the region may be the longest distance or the shortest distance.
Preferably, the area with the smallest area covering the vanishing points with the preset ratio may be a circular area. In this case, the radius of the acquired circular region having the smallest area is used as the distance between the center of the region and the boundary of the region, and the deviation threshold is obtained. Because the distances between the center point of the circular area and the boundary of the area are equal and are the radius of the circular area, the distance between the center point and the boundary of the area has uniqueness, and the calculation amount is simplified.
The calculation of the deviation threshold in the present embodiment will be specifically described below with reference to an example. Referring to fig. 4, the vanishing points of the three frame images are included, and (1) - (3) represent the vanishing points of the first to third frame images, respectively. It is considered that in practice, the vanishing point will be at a different position in the forward-looking image of the vehicle, but if the vehicle is travelling normally, the vanishing point will be at a relatively stable location. Accordingly, a circular region with the smallest area covering 95% of all the summarized points (minus the minimum probability event 0.05) can be taken as the region with the smallest area covering the vanishing points with the preset proportion, by collecting and summarizing the vanishing points of each frame. Referring to (4) in fig. 4, the radius of the circular area is the calculated deviation threshold. It should be noted that the above is only an example, the vanishing points of the multi-frame images in the present embodiment are not limited to the 3-frame images, and in practical applications, the greater the number of vanishing points, the higher the accuracy of the calculated deviation threshold of the vehicle.
Referring to fig. 5, r represents a deviation threshold of the vehicle, C represents a vanishing point, car represents the vehicle, and b represents a vertical distance of the vanishing point C to the vehicle; if r and b are known, then one can follow the formula: the deviation angle θ is obtained, and it is determined whether the vehicle deviates from the lane. It follows that the magnitude of the departure threshold is important for determining whether the vehicle departs from the lane. Since the deviation threshold needs to be set by means of manual experience in the prior art, the accuracy of the detection result of the lane deviation is low. It can be understood that if the deviation threshold is set too small, many unnecessary false positives are generated, thereby affecting normal driving of the vehicle; if the set deviation threshold value is too large, the later-period warning is too long in delay or even no warning is carried out, and the effect of normally prompting the driver of lane deviation to avoid risks cannot be achieved. In this embodiment, the deviation threshold of the vehicle is calculated based on the vanishing points of the multiple frames of images, and compared with the setting based on manual experience, the accuracy is higher.
In addition, in this embodiment, the collected multiple frame images during the vehicle running process may be periodically updated, and the deviation threshold may be updated according to the updated multiple frame images. That is, the deviation threshold value is obtained not only by analyzing the images of the plurality of frames acquired in advance during the vehicle traveling in step 101, but also by using the large data (not only the image acquired by the vehicle but also the image acquired by another vehicle on the lane) to determine a large number of vanishing points, and the deviation threshold value is obtained from the large number of vanishing points and updated. In so doing, the resulting deviation from the threshold may be made more accurate.
And 103, acquiring image frames in the driving process of the vehicle in real time when the lane departure detection is carried out.
The process of acquiring the image frames in the driving process of the vehicle in real time is approximately the same as the process of acquiring the multi-frame images in the driving process of the vehicle in advance in the step 101, and the difference is only that the image frames are acquired in real time in the step; the step 101 is a pre-acquisition, which is not described herein again.
And 104, judging whether the difference value between the vanishing point in the image frame collected in real time and the vanishing point in the initial frame deviated from the detection is larger than a deviation threshold value.
The first frame at the start of the deviation detection is a start frame, and plays a role of a reference of the image frame acquired in real time.
Specifically, whether lane departure exists is judged according to the comparison result of the difference value between the vanishing point in the image frame acquired in real time and the vanishing point in the initial frame of departure detection and the departure threshold. If the difference value between the vanishing point in the image frame collected in real time and the vanishing point in the initial frame deviated from the detection is larger than the deviation threshold, entering step 105; otherwise, step 106.
In step 105, it is determined that there is a lane departure.
And step 106, judging that no lane departure exists.
As can be easily found, the lane departure detection method provided by the embodiment has the advantages that the departure threshold is calculated based on the multiple vanishing points, and the setting by manual experience is not required, so that the accuracy of the detection result is higher; in the whole scheme, a plurality of sensors are not required to be matched with each other, and only one sensor capable of acquiring images is required, so that the cost is lower; by detecting the relative position between the vehicle and the vanishing point and comparing the relative position with the deviation threshold value, whether the vehicle deviates or not can be judged, and the calculation amount is reduced.
A second embodiment of the present invention relates to a lane departure detection method. The second embodiment is a further improvement on the first embodiment, and the specific improvement is that: in the embodiment, before judging whether the lane departure exists, whether the difference value between the vanishing point in the image frame acquired in real time within the preset time length and the vanishing point in the initial frame is greater than the probability of deviating from the threshold value is greater than a preset threshold value is further judged; if the judgment result is larger than the preset threshold, the current driving state of the vehicle is not stable, the initial frame is updated to the image frame acquired last time, the probability that the difference value between the vanishing point in the image frame acquired in real time in the next preset time and the vanishing point in the updated initial frame is larger than the deviation threshold is judged, whether the difference value is larger than the preset threshold is judged, and whether the difference value is larger than the deviation threshold is judged until the judgment result is smaller than or equal to the preset threshold, namely whether the driving state of the vehicle is stable is judged, whether lane deviation exists is judged, misjudgment caused by the fact that the vehicle does not enter the stable state can be avoided, and the accuracy of the detection result can be further improved.
As shown in fig. 6, a flowchart of a lane departure detection method according to the present embodiment includes:
step 201, acquiring vanishing points in each frame according to a plurality of frames of images acquired in advance in the vehicle running process.
The vanishing point is the intersection point of the lane lines of the lane where the vehicle is located.
In step 202, a deviation threshold of the vehicle is calculated from the vanishing points of the plurality of frame images.
And step 203, acquiring image frames in the driving process of the vehicle in real time when the lane departure detection is carried out.
Step 204, judging whether the difference value between the vanishing point in the image frame acquired in real time within the preset time length and the vanishing point in the initial frame is greater than the probability of deviating from the threshold value and is greater than a preset threshold value.
Specifically, if the determination result is greater than the preset threshold, step 205 is entered, otherwise, step 207 is entered.
In one example, the preset threshold may be set to 75%. If the difference value between the vanishing point in the image frame collected in real time within the preset time length and the vanishing point in the initial frame is r1, the deviation threshold value is r; if the probability that r1 is greater than r is 30%, and 30% is smaller than the preset threshold (75%), the vehicle is in a stable driving state, and the step 207 is entered; if the probability that r1 is greater than or equal to 80% and greater than the preset threshold, go to step 205.
Step 205, update the starting frame to the image frame acquired last time.
That is, the image frame acquired last time is taken as the start frame.
In addition, when the starting frame is updated to the image frame acquired last time, the deviation threshold value can be updated according to the vanishing point in the multi-frame image acquired in advance in the vehicle driving process and the vanishing point in the image frame acquired in real time.
Step 206, it is determined whether 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 initial frame is greater than the probability of deviating from the threshold, or greater than a preset threshold.
Specifically, if the determination result is greater than the preset threshold, the step 205 is executed again, and the process goes to step 207 until the determination result is less than or equal to the preset threshold.
Step 207, determining whether the difference between the vanishing point in the image frame collected in real time and the vanishing point in the initial frame deviated from the detection is greater than a deviation threshold. If the difference between the vanishing point in the image frame collected in real time and the vanishing point in the initial frame deviated from the detection is larger than the deviation threshold, the step 208 is entered; otherwise, step 209 is entered.
In step 208, it is determined that there is a lane departure.
In step 209, it is determined that there is no lane departure.
Since steps 201 to 203 and steps 207 to 209 in the present embodiment are substantially the same as steps 101 to 106 in the first embodiment, it is intended to acquire a vanishing point in each frame from a plurality of frame images acquired in advance during the running of the vehicle and calculate a deviation threshold of the vehicle from the vanishing points of the plurality of frame images; when lane departure detection is carried out, image frames in the driving process of a vehicle are collected in real time; and judging whether the lane departure exists according to the comparison result of the difference value between the vanishing point in the image frame acquired in real time and the vanishing point in the initial frame of the departure detection and the departure threshold, which is not repeated herein.
Before determining whether lane departure exists, the method for detecting lane departure further determines whether a difference between a vanishing point in an image frame acquired in real time within a preset time period and a vanishing point in an initial frame is greater than a probability of deviating from a threshold value and is greater than a preset threshold; if the judgment result is larger than the preset threshold, the current driving state of the vehicle is not stable, the initial frame is updated to the image frame acquired last time, the probability that the difference value between the vanishing point in the image frame acquired in real time in the next preset time and the vanishing point in the updated initial frame is larger than the deviation threshold is judged, whether the difference value is larger than the preset threshold is judged, and whether the difference value is larger than the deviation threshold is judged until the judgment result is smaller than or equal to the preset threshold, namely whether the driving state of the vehicle is stable is judged, whether lane deviation exists is judged, misjudgment caused by the fact that the vehicle does not enter the stable state can be avoided, and the accuracy of the detection result can be further improved.
A third embodiment of the present invention relates to a lane departure detection method, and is substantially the same as the first embodiment except that: in the first embodiment, based on the difference between the vanishing point in the image frame acquired in real time and the vanishing point in the initial frame of the deviation detection, once it is greater than the deviation threshold, it is determined that there is a lane deviation; in the embodiment, when the difference between the vanishing point in the N frames of images continuously acquired and the vanishing point in the initial frame of the deviation detection is greater than the deviation threshold, it can be determined that the lane deviation exists, where N is a natural number greater than 1, which is beneficial to avoiding misjudgment and can further improve the accuracy of the detection result.
As shown in fig. 7, the flowchart of the lane departure detection method according to the present embodiment includes:
step 301, acquiring vanishing points in each frame according to a plurality of frames of images acquired in advance in the vehicle running process.
The vanishing point is the intersection point of the lane lines of the lane where the vehicle is located.
Step 302, calculating a deviation threshold of the vehicle according to the vanishing points of the multi-frame images.
And 303, acquiring image frames in the driving process of the vehicle in real time when the lane departure detection is carried out.
Since steps 301 to 303 in this embodiment are substantially the same as steps 101 to 103 in the first embodiment, detailed description thereof is omitted.
And step 304, detecting whether the image acquired in real time meets a preset condition. If the preset condition is satisfied, go to step 305; otherwise, step 306 is entered.
The preset condition is that differences between vanishing points in the continuously acquired N frames of images and vanishing points in the initial frame deviated from the detection are all larger than a deviation threshold, and N is a natural number larger than 1.
In an example, N may be 8, that is, the preset condition is that the difference between the vanishing point in the continuously acquired 8 frames of images and the vanishing point in the initial frame of the deviation detection is greater than the deviation threshold, and then step 305 is performed; otherwise, step 306 is entered. The reason why N is set to 8 is that the upper limit of the speed limit of the expressway in China is 120km/h, and the side speed of the vehicle is about 2.9m/s when the deviation angle of the vehicle is 5 degrees. According to highway construction standards, the prescribed width of a single lane is 3.75 m. Assuming that the vehicle is running at the center of the lane, the distance from the side of the vehicle to the lane line is approximately 1.88 meters, if the vehicle speed is not changed, the vehicle will contact the lane line within 0.65 seconds under the above condition, the reaction time of the driver is about 0.3 seconds, and the decision can be made at 0.35 seconds in order to prevent false alarm. Since the calculation speed is generally 25 frames per second, that is, 0.04 second can calculate one frame, and 0.35 second can calculate 8 frames, in practical application, N may be set to 8. And 3.75m wide speed reducing belts are arranged on two sides of the expressway, 120km/h is the legal highest speed limit, vehicles running normally are all lower than the speed, and the side speed is also lower than 2.9m/s, so that a driver has enough time to avoid risks after lane departure is detected.
In addition, if a preset condition is satisfied, an alarm for warning a rearward vehicle may be triggered. For example, if the vehicle exceeds the 8 consecutive frames and is outside the deviation threshold, which indicates that the vehicle has a long lane deviation, an alarm for warning the vehicle in the rear direction may be triggered, for example, the alarm is issued to all vehicles 200 meters away from the vehicle, so as to avoid rear-end collision.
If the execution subject in the present embodiment is the server, the server sends an alarm to the located rear vehicle. Because the server can acquire the vanishing points of a plurality of vehicles, if the vanishing points of a plurality of vehicles deviate from the deviation threshold, the situation of the road at the position is basically judged to be bad, and related departments need to regulate the road situation; if only the vehicle vanishing point deviates outside the deviation threshold for a period of time, an alarm may be issued.
If the execution subject in the present embodiment is an electronic device, the electronic device notifies the server, and the server sends an alarm to the rear vehicle, or the electronic device itself sends an alarm such as a flashing light or a sound alarm after the electronic device detects the lane departure, so as to remind the rear vehicle and avoid rear-end collision.
In step 305, it is determined that there is a lane departure.
In step 306, it is determined that there is no lane departure.
It should be noted that the present embodiment may also be an improvement made on the basis of the second embodiment.
It is easy to find that, with the method for detecting lane departure provided in this embodiment, when differences between vanishing points in N continuously acquired images and vanishing points in an initial frame of departure detection are both greater than a departure threshold, it can be determined that there is lane departure, where N is a natural number greater than 1, which is beneficial to avoiding misjudgment and can further improve accuracy of a detection result.
The steps of the above methods are divided for clarity, and the implementation may be combined into one step or split some steps, and the steps are divided into multiple steps, so long as the same logical relationship is included, which are all within the protection scope of the present patent; it is within the scope of the patent to add insignificant modifications to the algorithms or processes or to introduce insignificant design changes to the core design without changing the algorithms or processes.
A fourth embodiment of the present invention relates to an electronic apparatus, as shown in fig. 8, including: at least one processor 401; and a memory 402 communicatively coupled to the at least one processor 401; wherein the memory 402 stores instructions executable by the at least one processor 401, the instructions being executable by the at least one processor 401 to enable the at least one processor 401 to perform the method of detecting a lane departure according to any one of the first to third embodiments.
Where the memory 402 and the processor 401 are coupled by a bus, which may include any number of interconnected buses and bridges that couple one or more of the various circuits of the processor 401 and the memory 402 together. The bus may also connect various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. A bus interface provides an interface between the bus and the transceiver. The transceiver may be one element or a plurality of elements, such as a plurality of receivers and transmitters, providing a means for communicating with various other apparatus over a transmission medium. The data processed by the processor 401 may be transmitted over a wireless medium via an antenna, which may receive the data and transmit the data to the processor 401.
The processor 401 is responsible for managing the bus and general processing and may provide various functions including timing, peripheral interfaces, voltage regulation, power management, and other control functions. And memory 402 may be used to store data used by processor 401 in performing operations.
A fifth embodiment of the present invention relates to a computer-readable storage medium storing a computer program. The computer program realizes the above-described method embodiments when executed by a processor.
That is, as can be understood by those skilled in the art, all or part of the steps in the method for implementing the embodiments described above may be implemented by a program instructing related hardware, where the program is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It will be understood by those of ordinary skill in the art that the foregoing embodiments are specific examples for carrying out the present application, and that various changes in form and details may be made therein without departing from the spirit and scope of the present application in practice.

Claims (12)

1. A lane departure detection method, characterized by comprising:
acquiring vanishing points in each frame according to a plurality of frames of images acquired in advance in the running process of the vehicle, and calculating a deviation threshold of the vehicle according to the vanishing points of the plurality of frames of images; the vanishing point is the intersection point of the lane lines of the lane where the vehicle is located;
when lane departure detection is carried out, image frames in the driving process of a vehicle are collected in real time;
and judging whether lane departure exists according to the comparison result of the difference value between the vanishing point in the image frame acquired in real time and the vanishing point in the initial frame of departure detection and the departure threshold.
2. The method for detecting a lane departure according to claim 1, wherein the calculating a departure threshold of the vehicle from the vanishing points of the plurality of frame images specifically comprises:
acquiring an area with the smallest area covering vanishing points with a preset proportion according to the vanishing points of the multi-frame images;
and obtaining the deviation threshold value according to the distance between the center of the region and the boundary of the region.
3. The method for detecting a lane departure according to claim 2, wherein the acquiring of the area having the smallest area covering the vanishing points at the preset ratio is specifically: acquiring a circle with the smallest area covering vanishing points with a preset proportion;
the obtaining the deviation threshold according to the distance between the center of the region and the boundary of the region specifically includes:
and taking the radius of the circle with the minimum area as the deviation threshold.
4. The lane departure detection method according to any one of claims 1 to 3, further comprising, before the determining whether there is a lane departure:
judging whether the difference value between the vanishing point in the image frame acquired in real time within the preset time length and the vanishing point in the initial frame is greater than the probability of deviating from the threshold value and is greater than a preset threshold value;
and if the judgment result is larger than the preset threshold, updating the initial frame to the image frame acquired last time, and judging whether the probability that the difference value between the vanishing point in the image frame acquired in real time in the next preset time and the vanishing point in the updated initial frame is larger than the deviation threshold is larger than the preset threshold or not until the judgment result is smaller than or equal to the preset threshold.
5. The lane departure detection method according to claim 4, further comprising, when said updating the start frame to the most recently acquired image frame:
and updating the deviation threshold according to the pre-collected vanishing point in the multi-frame image in the vehicle driving process and the vanishing point in the real-time collected image frame.
6. The lane departure detection method according to any one of claims 1 to 3, further comprising:
and regularly updating the collected multi-frame images in the running process of the vehicle, and updating the deviation threshold according to the updated multi-frame images.
7. The lane departure detection method according to claim 1, wherein the plurality of frame images are images captured for the same vehicle or images captured for different vehicles.
8. The method according to any one of claims 1 to 3, wherein the determining whether there is a lane departure according to a comparison result between a difference between a vanishing point in the image frame acquired in real time and a vanishing point in an initial frame of the departure detection and the departure threshold specifically includes:
detecting whether the image acquired in real time meets a preset condition, wherein the preset condition is that the difference value between a vanishing point in N frames of continuously acquired images and a vanishing point in a deviation detection initial frame is larger than the deviation threshold value, and N is a natural number larger than 1;
and if the preset condition is met, judging that the lane departure exists.
9. The lane departure detection method according to claim 8, wherein N is 8.
10. The lane departure detection method according to claim 8, further comprising:
and if the preset condition is met, triggering an alarm for warning the rear vehicle.
11. An electronic device, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of lane departure detection of any of claims 1-10.
12. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the lane departure detection method according to any one of claims 1 to 10.
CN201811255768.8A 2018-10-26 2018-10-26 Method for detecting lane departure, electronic device, and computer-readable storage medium Pending CN111104824A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811255768.8A CN111104824A (en) 2018-10-26 2018-10-26 Method for detecting lane departure, electronic device, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811255768.8A CN111104824A (en) 2018-10-26 2018-10-26 Method for detecting lane departure, electronic device, and computer-readable storage medium

Publications (1)

Publication Number Publication Date
CN111104824A true CN111104824A (en) 2020-05-05

Family

ID=70418962

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811255768.8A Pending CN111104824A (en) 2018-10-26 2018-10-26 Method for detecting lane departure, electronic device, and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN111104824A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112146620A (en) * 2020-11-25 2020-12-29 腾讯科技(深圳)有限公司 Target object ranging method and device
CN114092919A (en) * 2022-01-18 2022-02-25 深圳佑驾创新科技有限公司 Vehicle deviation warning method, equipment and medium
TWI798021B (en) * 2022-03-10 2023-04-01 台灣智慧駕駛股份有限公司 Method and system for measuring vehicle deviation

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112146620A (en) * 2020-11-25 2020-12-29 腾讯科技(深圳)有限公司 Target object ranging method and device
CN114092919A (en) * 2022-01-18 2022-02-25 深圳佑驾创新科技有限公司 Vehicle deviation warning method, equipment and medium
CN114092919B (en) * 2022-01-18 2022-05-03 深圳佑驾创新科技有限公司 Vehicle deviation warning method, equipment and medium
TWI798021B (en) * 2022-03-10 2023-04-01 台灣智慧駕駛股份有限公司 Method and system for measuring vehicle deviation

Similar Documents

Publication Publication Date Title
CN109254289B (en) Detection method and detection equipment for road guardrail
US11692848B2 (en) Map information system
CN112389448B (en) Abnormal driving behavior identification method based on vehicle state and driver state
EP2778007B1 (en) Method and system to assess abnormal driving behaviour of vehicles travelling on road
EP2214149B1 (en) Collision avoidance assisting system for vehicle
JP6654923B2 (en) Map information output device
EP3715204A1 (en) Vehicle control device
CN105620489A (en) Driving assistance system and real-time warning and prompting method for vehicle
US20170185850A1 (en) Method for quantifying classification confidence of obstructions
US20150149076A1 (en) Method for Determining a Course of a Traffic Lane for a Vehicle
CN113593301B (en) Method for pre-judging vehicle jam, vehicle and computer readable storage medium
US10163015B2 (en) Detecting foliage using range data
US10769420B2 (en) Detection device, detection method, computer program product, and information processing system
US20130184930A1 (en) Method and device for operating a driver assistance system of a vehicle
CN111104824A (en) Method for detecting lane departure, electronic device, and computer-readable storage medium
US10916134B2 (en) Systems and methods for responding to a vehicle parked on shoulder of the road
CN114023107A (en) Method and system for preventing conflict between right turning process of urban muck truck and non-motor vehicle and storage medium thereof
KR20160093464A (en) Apparatus for recognizing traffic sign and method thereof
JP2014026519A (en) On-vehicle lane marker recognition device
JP2007093347A (en) Stopped vehicle determination apparatus, automobile, and stopped vehicle determination method
US11807238B2 (en) Driving assistance system for a vehicle, vehicle having same and driving assistance method for a vehicle
KR102006314B1 (en) Method and system for warning lane departure using turn sign recognition
DE102022122648A1 (en) Adaptive rationalizer for vehicle perception systems to robust automated driving control
CN112990117B (en) Installation data processing method and device based on intelligent driving system
JP7391947B2 (en) Method for detecting false positives of camera image processing devices

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination