Road traffic behavior anomaly detection method and system based on computer vision

Through the computer vision-based road traffic behavior abnormality detection method, the marking distance, abnormal driving probability, driving trend and fluctuation parameters of lane images are used to comprehensively determine whether the vehicle has dangerous driving behavior, solving the problem of single judgment basis in the traditional system, and improving the accuracy of judgment and early warning effect.

CN119636790AActive Publication Date: 2025-03-18SHAANXI YONGJIA TAILE ENG TECH CO LTD
View PDF 21 Cites 0 Cited by

Patent Information

Application Number
CN202510186042.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-20
Publication Date
2025-03-18
Estimated Expiration
2045-02-20

AI Technical Summary

Technical Problem

The traditional lane departure warning system has a single basis for judgment, which is susceptible to complex road conditions and individual driver differences, making it difficult to accurately capture and early warning of dangerous driving behaviors of vehicles in the lane.

Method used

The road traffic behavior abnormality detection method based on computer vision is adopted. By continuously collecting and preprocessing lane images, the marking distance, abnormal driving probability parameters, driving trend parameters and fluctuation parameters of the vehicle are obtained, and the threshold is set in combination with these parameters and the vehicle has dangerous driving behavior.

Benefits of technology

It improves the accuracy of judging vehicles' road traffic behavior, can more effectively capture and early warning of vehicles' dangerous driving behavior in the lane, and reduces driving safety hazards.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119636790A_ABST
    Figure CN119636790A_ABST
Patent Text Reader

Abstract

The invention relates to the field of image processing, in particular to a road traffic behavior anomaly detection method and system based on computer vision, and the method comprises the steps: continuously collecting and processing lane images, and obtaining preprocessed images; acquiring a marking distance according to an intersection distance between the preprocessed image lane line and the image lower edge; obtaining one-time driving probability parameters of the vehicle according to the pre-processed image marking distance; marking a distance change trend according to the preprocessed picture to obtain a vehicle driving trend parameter; calculating the mark distance fluctuation amplitude of the preprocessed picture, and obtaining vehicle fluctuation parameters according to the fluctuation amplitude; vehicle dangerous driving behavior parameters are obtained by combining the parameters, and whether the vehicle has dangerous driving behaviors or not is judged. According to the invention, dangerous driving behavior judgment is more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing, and in particular to a method and system for detecting abnormal road traffic behavior based on computer vision. Background Art

[0002] With the increasing busyness of road traffic and the rapid growth in the number of vehicles, dangerous driving behaviors have become one of the main causes of traffic accidents, which seriously threaten the safety of road traffic.

[0003] Traditional technology mainly relies on on-board cameras to judge dangerous driving behaviors during driving. Its basic principle is to capture the image data of lane lines in real time through on-board cameras. Subsequently, using advanced image processing technology, the system can detect and analyze whether the vehicle has deviated from the normal driving lane. Once the vehicle is detected to have deviated from the lane, the system will immediately trigger the early warning mechanism to remind the driver to pay attention to the direction control in the form of sound or visual signals, thereby preventing potential road traffic accidents. However, this judgment method based only on the vehicle's lane deviation has certain limitations in practice, and its accuracy needs to be improved. Because in a complex road environment, it is completely reasonable and common for vehicles to temporarily deviate from the lane due to normal lane changes, avoiding obstacles or following traffic instructions. Therefore, it is obviously not comprehensive and accurate to define dangerous driving based solely on whether the vehicle deviates from the lane. In addition, there is a more hidden and dangerous situation that deserves attention: even if the vehicle stays in the lane, it may be in a highly dangerous state due to some improper behavior of the driver. For example, when the driver is driving under the influence of alcohol or operating improperly, he may make irregular, frequent and small direction adjustments in the lane, or drive at high speed when the road conditions are bad. These driving behaviors also constitute dangerous driving. However, since these minor changes may not cause the vehicle to deviate significantly from the lane, traditional lane departure warning systems may find it difficult to capture and issue effective alerts in a timely manner, thereby increasing driving safety risks. In summary, although traditional technologies can assist in judging dangerous driving behaviors during driving to a certain extent, their judgment basis is relatively single and easily affected by complex road conditions and individual differences of drivers. Summary of the invention

[0004] The present invention provides a method and system for detecting abnormal road traffic behavior based on computer vision to solve the existing problem: traditional technology can assist in judging dangerous driving behavior during driving to a certain extent, but its judgment basis is relatively single and easily affected by complex road conditions and individual differences of drivers.

[0005] A method and system for detecting abnormal road traffic behavior based on computer vision of the present invention adopts the following technical scheme: In a first aspect of the present invention, a method for detecting abnormal road traffic behavior based on computer vision is provided, and the method comprises the following steps: continuously collecting lane images and performing preprocessing to obtain a preprocessed image of each lane image; obtaining a marking distance of each preprocessed image according to the distance between the intersection of the lane line and the lower edge of the image in each preprocessed image; obtaining a vehicle abnormal driving probability parameter of each preprocessed image according to the marking distance of each preprocessed image; obtaining a vehicle driving trend parameter of each preprocessed image according to the changing trend of the marking distance of each preprocessed image; calculating the fluctuation amplitude of the marking distance of each preprocessed image, and obtaining the vehicle fluctuation parameter of any preprocessed image according to the fluctuation amplitude of the marking distance of each preprocessed image; setting a threshold value according to the vehicle abnormal driving probability parameter, vehicle driving trend parameter, and vehicle fluctuation parameter of each preprocessed image, and comprehensively judging whether the vehicle has dangerous driving behavior and issuing a reminder.

[0006] Furthermore, the marking distance of each pre-processed image is obtained according to the distance between the intersection of the lane line in each pre-processed image and the lower edge of the image, and the specific method includes: using the on-board camera to collect road images taken during the vehicle's driving process at a preset time interval t, the time length for collecting the road images is T, using the edge detection algorithm to extract the lane lines of each road image, and traversing the images processed by the edge detection algorithm in the order of image acquisition to obtain a series of pre-processed images with clearly visible lane lines.

[0007] Furthermore, the method of obtaining the vehicle abnormal driving probability parameter of each preprocessed image according to the marker distance of each preprocessed image includes: calculating the number of pixel points between the two intersection connecting line segments where the lane line intersects with the lower edge of the image in each preprocessed image, and the number of pixel points on the two intersection connecting line segments where the lane line intersects with the lower edge of the image in each preprocessed image is recorded as the marker distance of the preprocessed image.

[0008] Furthermore, the specific method of obtaining the vehicle abnormal driving probability parameter of each pre-processed image according to the marking distance of each pre-processed image includes: In the formula, represents the vehicle abnormal driving probability parameter of the xth pre-processed image, represents the label distance of the x-th preprocessed image, represents the marking distance of the i-th pre-processed image, x represents the image acquisition sequence number, and the vehicle abnormal driving probability parameter of each pre-processed image during the vehicle driving process is obtained according to the above method.

[0009] Furthermore, the vehicle driving trend parameter of each pre-processed image is obtained according to the change trend of the mark distance of each pre-processed image, and the specific method includes: setting a data set of the mark distance data of the pre-processed image required for judging the vehicle driving trend, the length of the data set is n, and the data set contains the mark distance data of n continuous sequence pre-processed images, and the mark distance data is cleared in the data set after each calculation of the vehicle driving trend parameter, and the mark distance data is re-filled after the next calculation of the vehicle driving trend parameter; In the formula, Represents the vehicle driving trend parameter of the xth preprocessed image, represents the label distance of the x-th preprocessed image, Represents the marking distance of the jth preprocessed image, and the vehicle driving trend parameters of each preprocessed image are obtained according to the above method.

[0010] Furthermore, the method of obtaining the fluctuation amplitude of the marker distance of each pre-processed image and obtaining the vehicle fluctuation parameter of any pre-processed image according to the fluctuation amplitude of the marker distance of each pre-processed image includes the following specific methods: In the formula, represents the vehicle fluctuation parameter of the xth preprocessed image, represents the label distance of the x-th preprocessed image, represents the marker distance of the x-1th preprocessed image, represents the label distance of the I-th preprocessed image, Represents the marking distance of the I-1th preprocessed image. The vehicle fluctuation parameter of any preprocessed image is obtained according to this method.

[0011] Furthermore, the method of setting a threshold and comprehensively judging whether the vehicle has dangerous driving behavior and issuing a reminder based on the vehicle abnormal driving probability parameter, vehicle driving trend parameter, and vehicle fluctuation parameter of each pre-processed image includes the following specific methods: In the formula, represents the dangerous driving behavior parameters of the vehicle in the xth preprocessed image, represents the vehicle abnormal driving probability parameter of the xth pre-processed image, Represents the vehicle driving trend parameter of the xth preprocessed image, Represents the vehicle fluctuation parameter of the xth preprocessed image, and obtains the vehicle dangerous driving behavior parameter of each preprocessed image according to the above method; sets a threshold G, and during the vehicle driving process, calculates the vehicle dangerous driving behavior parameter of the last preprocessed image each time, and compares the vehicle dangerous driving behavior parameter with the threshold G. When the vehicle dangerous driving behavior parameter is greater than or equal to the threshold G, the driver is reminded to pay attention to standard driving through the vehicle audio.

[0012] According to a second aspect of the present invention, a road traffic behavior anomaly detection system based on computer vision is provided, the system comprising an image acquisition module, an image data calculation module and a data judgment module, wherein: the image acquisition module is used to continuously acquire lane images and perform preprocessing to obtain a preprocessed image of each lane image; the image data calculation module is used to obtain the marking distance of each preprocessed image according to the distance between the intersection of the lane line and the lower edge of the image in each preprocessed image; the abnormal vehicle driving probability parameter of each preprocessed image is obtained according to the marking distance of each preprocessed image; the vehicle driving trend parameter of each preprocessed image is obtained according to the changing trend of the marking distance of each preprocessed image; the fluctuation amplitude of the marking distance of each preprocessed image is calculated, and the vehicle fluctuation parameter of any preprocessed image is obtained according to the fluctuation amplitude of the marking distance of each preprocessed image; the data judgment module is used to set a threshold value and comprehensively judge whether the vehicle has dangerous driving behavior and issue a reminder according to the abnormal vehicle driving probability parameter, vehicle driving trend parameter, and vehicle fluctuation parameter of each preprocessed image.

[0013] A third aspect of the present invention is a computer-readable storage medium, which stores a computer program, characterized in that when the computer program is executed by a processor, the steps of the above-mentioned road traffic behavior anomaly detection method based on computer vision are implemented.

[0014] In a fourth aspect of the present invention, a computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned method for detecting abnormal road traffic behavior based on computer vision when executing the computer program.

[0015] The beneficial effects of the technical solution of the present invention are as follows: lane images are continuously collected and preprocessed, and a preprocessed image of each lane image is obtained in order to judge the continuous driving state of the vehicle and exclude the influence of other factors in the image; the marking distance of each preprocessed image is obtained according to the distance between the intersection of the lane line and the lower edge of the image in each preprocessed image; the method for obtaining the marking distance is relatively simple, and the amount of calculation is less than that of the traditional lane line detection method, and it is applicable to various complex road sections, and it does not affect the judgment of the abnormal state of the vehicle even in the vehicle congestion state; the vehicle abnormal driving probability parameter of each preprocessed image is obtained according to the marking distance of each preprocessed image; by judging whether the vehicle is close to the center of the lane or whether the vehicle driving direction is close to the lane line through the change in the size of the marking distance, it can be preliminarily judged whether the position of the vehicle relative to the lane line during the current driving process is dangerous; according to the changing trend of the marking distance of each preprocessed image, the vehicle driving trend parameter of each preprocessed image is obtained; it is considered that in some cases, the vehicle may temporarily deviate from the lane due to normal lane change, obstacle avoidance or following traffic instructions, resulting in the preprocessed image obtained at this time. The abnormal driving probability parameter of the image is large, but the vehicle is in a normal driving state at that moment; judging whether the vehicle deviates from the lane due to normal lane change and other reasons based on the vehicle driving trend can avoid the false warning of whether the vehicle has dangerous driving behavior based on the relative position of the vehicle and the lane line to a certain extent; obtaining the fluctuation amplitude of the marking distance of each pre-processed image, and obtaining the vehicle fluctuation parameter of any pre-processed image based on the fluctuation amplitude of the marking distance of each pre-processed image; judging whether the vehicle has irregular operation behavior through the vehicle running stability, to a certain extent, it can be judged that the driver makes irregular, frequent and small direction adjustments in the lane, or drives at high speed when the road conditions are bad and other dangerous driving behaviors; according to the vehicle abnormal driving probability parameter, vehicle driving trend parameter, and vehicle fluctuation parameter of each pre-processed image, set the threshold and comprehensively judge whether the vehicle has dangerous driving behavior and issue a reminder; comprehensively judging whether the vehicle has dangerous driving behavior based on the relative position of the vehicle and the lane line, the vehicle driving trend and the vehicle driving stability is more accurate than the existing dangerous driving behavior judgment method, and can better avoid the occurrence of dangerous driving behavior. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0017] Figure 1A flowchart of a method for detecting abnormal road traffic behavior based on computer vision according to the present invention; Figure 2 The present invention is a structural block diagram of a road traffic behavior anomaly detection system based on computer vision. DETAILED DESCRIPTION

[0018] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the specific implementation method, structure, features and effects of a road traffic behavior abnormality detection method and system based on computer vision proposed by the present invention in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0019] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0020] The following is a detailed description of a specific solution of a method and system for detecting abnormal road traffic behavior based on computer vision provided by the present invention in conjunction with the accompanying drawings.

[0021] See also Figure 1 , which shows the first object of the present invention, a step flow chart of a method for detecting abnormal road traffic behavior based on computer vision, the method comprising the following steps: Step S001: continuously collect lane images and preprocess them to obtain a preprocessed image of each lane image.

[0022] Because the position and angle of the vehicle-mounted camera are fixed relative to the vehicle, the lane shooting angle of the vehicle-mounted camera changes with the angle of the front of the vehicle relative to the lane; the present invention needs to use the vehicle-mounted camera to continuously collect lane images during driving and extract lane lines, so as to subsequently analyze and identify the vehicle's driving status.

[0023] Specifically, lane images are continuously collected and preprocessed to obtain a preprocessed image of each lane image. The specific method is as follows: road images taken during vehicle driving are collected using a vehicle-mounted camera at a preset time interval t, and the time length for collecting road images is T. The lane lines of each road image are extracted using an edge detection algorithm, and the images processed by the edge detection algorithm are traversed in the order of image acquisition to obtain a series of preprocessed images with clearly visible lane lines.

[0024] It should be noted that this embodiment does not limit the time interval t, the duration T for collecting road images, and the edge detection algorithm. The specific situation depends on the implementation situation. In this embodiment, the time interval is 0.2 seconds, the duration for collecting road images is 3600 seconds, and the edge detection algorithm used is the Canny algorithm.

[0025] Step S002: Obtain the marking distance of each preprocessed image according to the distance between the intersection of the lane line and the lower edge of the image in each preprocessed image; obtain the vehicle abnormal driving probability parameter of each preprocessed image according to the marking distance of each preprocessed image; obtain the vehicle driving trend parameter of each preprocessed image according to the changing trend of the marking distance of each preprocessed image; calculate the fluctuation amplitude of the marking distance of each preprocessed image, and obtain the vehicle fluctuation parameter of any preprocessed image according to the fluctuation amplitude of the marking distance of each preprocessed image.

[0026] It should be noted that traditional technology uses on-board cameras to determine whether a vehicle has deviated from its lane, thereby analyzing whether the vehicle has dangerous driving behavior; however, this judgment method based only on the vehicle's lane deviation has certain limitations in practice, and its accuracy needs to be improved. Because in a complex road environment, it is completely reasonable and common for a vehicle to temporarily deviate from its lane due to normal lane changes, avoiding obstacles, or following traffic instructions. Therefore, it is not comprehensive and accurate to define dangerous driving based solely on whether the vehicle deviates from its lane; when a vehicle stays in its lane, it may also be in a highly dangerous state due to some improper behavior of the driver. For example, when a driver is driving under the influence of alcohol or operating improperly, he may make irregular, frequent, and minor directional adjustments in the lane, or drive at high speed in poor road conditions. These driving behaviors also constitute dangerous driving. However, since these minor changes may not cause the vehicle to deviate significantly from the lane, traditional lane departure warning systems may find it difficult to capture and issue effective alarms in a timely manner, thereby increasing driving safety risks.

[0027] It should be further explained that when the vehicle is traveling exactly in the center of the lane and its direction of travel is almost completely parallel to the lane lines, the visual distance between the lane lines at the bottom of the image captured by the on-board camera will appear shorter or narrower; when the vehicle deviates from the edge of the lane and the angle between its direction of travel and the lane lines becomes larger, the visual distance between the lane lines captured by the on-board camera at the bottom of the image will appear wider or longer; therefore, the present invention needs to obtain the two intersection points of the lower edge and the lane lines in the preprocessed image of each lane image, and judge the dangerous driving situation of the vehicle based on the change in the distance between the two intersection points in different preprocessed images.

[0028] Specifically, the marking distance of each preprocessed image is obtained according to the distance between the intersection of the lane line and the lower edge of the image in each preprocessed image. The specific method is as follows: calculate the number of pixels between the two intersection connecting line segments where the lane line intersects with the lower edge of the image in each preprocessed image, and the number of pixels on the two intersection connecting line segments where the lane line intersects with the lower edge of the image in each preprocessed image is recorded as the marking distance of the preprocessed image.

[0029] It should be noted that the marking distance of each pre-processed image will change with the change of the relative position and relative angle between the vehicle and the lane line during driving. When the marking distance is smaller, it means that the driving position of the vehicle is closer to the middle position of the two lane lines, and the driving position is relatively safe, that is, the probability that the vehicle may have an abnormal driving situation is lower; therefore, the present invention needs to obtain the vehicle abnormal driving probability parameter of each pre-processed image according to the marking distance of each pre-processed image, and the specific method is as follows: In the formula, represents the vehicle abnormal driving probability parameter of the xth pre-processed image, represents the label distance of the x-th preprocessed image, represents the marking distance of the i-th pre-processed image, x represents the image acquisition sequence number, and the vehicle abnormal driving probability parameter of each pre-processed image during the vehicle driving process is obtained according to the above method.

[0030] It should be noted that, when the vehicle abnormal driving probability parameter of the x-th pre-processed image is larger, it means that the vehicle driving position at this moment is more deviated from the middle position of the two lane lines than the vehicle driving position at all previous moments, or the angle between the vehicle driving direction and the lane line at this moment is larger than the angle between the vehicle driving direction and the lane line at all previous moments, which makes the probability that the vehicle may be in danger greater, and the possibility of dangerous driving behavior of the vehicle is higher; when the vehicle abnormal driving probability parameter of the x-th pre-processed image is smaller, it means that the vehicle driving position at this moment is closer to the middle position of the two lane lines than the vehicle driving position at all previous moments, or the angle between the vehicle driving direction and the lane line at this moment is smaller than the angle between the vehicle driving direction and the lane line at all previous moments, that is, the vehicle driving direction is more parallel to the lane line, which makes the probability that the vehicle may be in danger smaller, and the probability of dangerous driving behavior of the vehicle is lower.

[0031] It should be further explained that in some cases, the vehicle may temporarily deviate from the lane due to normal lane changes, obstacle avoidance or following traffic instructions, resulting in a large abnormal driving probability parameter of the pre-processed image obtained at this time. However, the vehicle is in a normal driving state at this moment, so it is accurate enough to judge the possibility of dangerous driving behavior of the vehicle only based on the angle between the vehicle's driving direction and the lane line and the relative position of the vehicle and the lane line; therefore, this step needs to obtain the vehicle driving trend parameter of each pre-processed image according to the changing trend of the marked distance of each pre-processed image. If the marked distance of each pre-processed image changes regularly or has a trend during the vehicle's driving, the vehicle may be driving on a complex road section or the vehicle may be changing lanes. At this time, the probability of abnormal driving of the vehicle may be judged to be too high based only on the vehicle's abnormal driving probability parameter.

[0032] Specifically, according to the changing trend of the mark distance of each pre-processed image, the vehicle driving trend parameter of each pre-processed image is obtained. The specific method is as follows: a data set of the mark distance data of the pre-processed image required for judging the vehicle driving trend is set, the length of the data set is n, and the data set contains the mark distance data of n consecutive sequence pre-processed images. After each calculation of the vehicle driving trend parameter, the mark distance data is cleared from the data set, and the mark distance data is refilled after the next calculation of the vehicle driving trend parameter; In the formula, Represents the vehicle driving trend parameter of the xth preprocessed image, represents the label distance of the x-th preprocessed image, Represents the marking distance of the jth preprocessed image, and the vehicle driving trend parameters of each preprocessed image are obtained according to the above method.

[0033] It should be noted that when the vehicle is driving, The smaller the value is, the closer the marking distance of the x-th pre-processed image is to the general level of the marking distance changes of the n pre-processed images that are consecutively adjacent to the x-th pre-processed image in the data set, that is, the more the vehicle driving state corresponding to the acquisition moment of the x-th pre-processed image conforms to the vehicle driving law, the lower the probability that the vehicle may have dangerous driving behavior, that is, the smaller the abnormal driving probability parameter of the vehicle at a certain moment, the lower the probability that the vehicle may have dangerous driving behavior at that moment; in this embodiment, the length n of the data set is not limited, but it is necessary to ensure that the length n of the data set remains unchanged during the data calculation process during a start-stop period of the vehicle. In this embodiment, the length n of the data set is 20, and the length of the data set in other embodiments depends on the specific implementation situation.

[0034] It should be further explained that the vehicle driving trend parameters can, to a certain extent, judge the probability of dangerous driving behavior from the changing trend of the marked distance in the pre-processed image, but the core logic of this step is to refer to the deviation between the predicted value and the actual value of the marked distance change value during driving, without taking into account the stability of the vehicle driving. The vehicle may swing left and right, but the swing amplitude is relatively regular or close, resulting in the predicted value and the actual value being closer and being judged as a normal driving situation. The left and right swing of the vehicle may be caused by excessive speed when the road surface is uneven. At this time, the driver should be reminded to slow down. Since the types of vehicles may be different and the stability of the vehicles themselves is also different, whether the driver is engaging in dangerous driving behavior based on the vehicle swing analysis needs to be judged based on the fluctuation amplitude of the marked distance of the pre-processed image corresponding to the vehicle at the current moment and the fluctuation amplitude of the marked distance of the pre-processed image corresponding to the vehicle at all previous moments.

[0035] Specifically, the fluctuation amplitude of the marker distance of each preprocessed image is calculated, and the vehicle fluctuation parameter of any preprocessed image is obtained according to the fluctuation amplitude of the marker distance of each preprocessed image. The specific method is as follows: In the formula, represents the vehicle fluctuation parameter of the xth preprocessed image, represents the label distance of the x-th preprocessed image, represents the marker distance of the x-1th preprocessed image, represents the label distance of the I-th preprocessed image, Represents the marking distance of the I-1th preprocessed image. The vehicle fluctuation parameter of any preprocessed image is obtained according to this method.

[0036] It should be noted that It indicates the difference between the marking distance of the x-th preprocessed image and the marking distance of the previous preprocessed image. When the vehicle fluctuation parameter of the x-th preprocessed image is smaller, it means that the fluctuation of the marking distance in the preprocessed image is smoother than the general fluctuation of the marking distance of all preprocessed images before the preprocessed image, which means that the driving state is safer at this time and the probability of dangerous driving behavior of the vehicle is lower; when the vehicle fluctuation parameter of the x-th preprocessed image is smaller, it means that the fluctuation amplitude of the marking distance in the preprocessed image is larger than the general fluctuation amplitude of the marking distance of all preprocessed images before the preprocessed image, which means that the driving state is relatively dangerous at this time and the probability of dangerous driving behavior of the vehicle is higher.

[0037] Step S003: According to the vehicle abnormal driving probability parameters, vehicle driving trend parameters, and vehicle fluctuation parameters of each pre-processed image, a threshold is set and a comprehensive judgment is made as to whether the vehicle has dangerous driving behavior and a reminder is issued.

[0038] The above method obtains the vehicle abnormal driving probability parameters, vehicle driving trend parameters, and vehicle fluctuation parameters for each pre-processed image. Now it is necessary to combine the vehicle abnormal driving probability parameters, vehicle driving trend parameters and vehicle fluctuation parameters, set thresholds to comprehensively judge whether the vehicle has dangerous driving behavior, and issue reminders to the driver based on the judgment.

[0039] Specifically, according to the vehicle abnormal driving probability parameter, vehicle driving trend parameter, and vehicle fluctuation parameter of each pre-processed image, a threshold is set and a comprehensive judgment is made as to whether the vehicle has dangerous driving behavior and a reminder is issued. The specific method is as follows: In the formula, represents the dangerous driving behavior parameters of the vehicle in the xth preprocessed image, represents the vehicle abnormal driving probability parameter of the xth pre-processed image, Represents the vehicle driving trend parameter of the xth preprocessed image, Represents the vehicle fluctuation parameter of the xth preprocessed image, and obtains the vehicle dangerous driving behavior parameter of each preprocessed image according to the above method; sets a threshold G, and during the vehicle driving process, calculates the vehicle dangerous driving behavior parameter of the last preprocessed image each time, and compares the vehicle dangerous driving behavior parameter with the threshold G. When the vehicle dangerous driving behavior parameter is greater than or equal to the threshold G, the driver is reminded to pay attention to standard driving through the vehicle audio.

[0040] It should be noted that when the vehicle abnormal driving probability parameter is larger, the vehicle driving trend parameter is larger, and the vehicle fluctuation parameter is larger, the vehicle dangerous driving behavior parameter is larger, and the probability that the vehicle has dangerous driving behavior is higher. In this embodiment, the value of the threshold G is 0.472. The value of the threshold in other embodiments depends on the specific implementation situation. At this point, the road traffic behavior anomaly detection method and system based on computer vision are completed.

[0041] See also Figure 2, which shows the second object of the present invention, a structural block diagram of a road traffic behavior anomaly detection system based on computer vision, the system includes the following modules: an image acquisition module, used to continuously acquire lane images and perform preprocessing to obtain a preprocessed image of each lane image; an image data calculation module, used to obtain the marking distance of each preprocessed image according to the distance between the intersection of the lane line and the lower edge of the image in each preprocessed image; obtain the vehicle abnormal driving probability parameter of each preprocessed image according to the marking distance of each preprocessed image; obtain the vehicle driving trend parameter of each preprocessed image according to the changing trend of the marking distance of each preprocessed image; obtain the vehicle driving trend parameter of each preprocessed image according to the changing trend of the marking distance of each preprocessed image; obtain the fluctuation amplitude of the marking distance of each preprocessed image, and obtain the vehicle fluctuation parameter of any preprocessed image according to the fluctuation amplitude of the marking distance of each preprocessed image; a data judgment module, used to set a threshold value and comprehensively judge whether the vehicle has dangerous driving behavior and issue a reminder according to the vehicle abnormal driving probability parameter, vehicle driving trend parameter, and vehicle fluctuation parameter of each preprocessed image.

[0042] The third purpose of an embodiment of the present invention is to provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned method for detecting abnormal road traffic behavior based on computer vision when executing the computer program.

[0043] The fourth objective of an embodiment of the present invention is to provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned method for detecting abnormal road traffic behavior based on computer vision are implemented.

[0044] In this embodiment, lane images are continuously collected and preprocessed to obtain a preprocessed image of each lane image in order to judge the continuous driving state of the vehicle and eliminate the influence of other factors in the image; the marking distance of each preprocessed image is obtained according to the distance between the intersection of the lane line and the lower edge of the image in each preprocessed image; the method for obtaining the marking distance is relatively simple, with less calculation amount compared with the traditional lane line detection method, and is applicable to various complex road sections, and does not affect the judgment of the abnormal state of the vehicle even in the vehicle congestion state; the abnormal driving probability parameter of the vehicle of each preprocessed image is obtained according to the marking distance of each preprocessed image; by judging whether the vehicle is close to the center of the lane or whether the driving direction of the vehicle is close to the lane line through the change in the size of the marking distance, it can be preliminarily judged whether the position of the vehicle relative to the lane line during the current driving process is dangerous; according to the changing trend of the marking distance of each preprocessed image, the vehicle driving trend parameter of each preprocessed image is obtained; considering that there may be some cases where the vehicle temporarily deviates from the lane due to normal lane change, obstacle avoidance or following traffic instructions, resulting in abnormal behavior of the preprocessed image obtained at this time The driving probability parameter is large, but the vehicle is in a normal driving state at that moment; judging whether the vehicle deviates from the lane due to normal lane change and other reasons according to the vehicle driving trend can avoid the false warning of whether the vehicle has dangerous driving behavior based on the relative position of the vehicle and the lane line to a certain extent; obtaining the fluctuation amplitude of the marking distance of each pre-processed image, and obtaining the vehicle fluctuation parameter of any pre-processed image according to the fluctuation amplitude of the marking distance of each pre-processed image; judging whether the vehicle has irregular operation behavior through the vehicle running stability, to a certain extent, it can be judged that the driver makes irregular, frequent and small direction adjustments in the lane, or drives at high speed when the road conditions are bad, and other dangerous driving behaviors; according to the vehicle abnormal driving probability parameter, vehicle driving trend parameter, and vehicle fluctuation parameter of each pre-processed image, the threshold is set and the vehicle is comprehensively judged whether it has dangerous driving behavior and a reminder is issued; comprehensively judging whether the vehicle has dangerous driving behavior by combining the relative position of the vehicle and the lane line, the vehicle driving trend and the vehicle driving stability is more accurate than the existing dangerous driving behavior judgment method, and can better avoid the occurrence of dangerous driving behavior.

[0045] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0046] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0047] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0048] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0049] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A method for detecting abnormal road traffic behavior based on computer vision, characterized in that: The method comprises the following steps: continuously collecting lane images and performing preprocessing to obtain a preprocessed image of each lane image; obtaining a marking distance of each preprocessed image according to the distance between the intersection of the lane line and the lower edge of the image in each preprocessed image; obtaining a vehicle abnormal driving probability parameter of each preprocessed image according to the marking distance of each preprocessed image; obtaining a vehicle driving trend parameter of each preprocessed image according to a change trend of the marking distance of each preprocessed image; calculating the fluctuation amplitude of the marking distance of each preprocessed image, and obtaining a vehicle fluctuation parameter of any preprocessed image according to the fluctuation amplitude of the marking distance of each preprocessed image; setting a threshold value according to the vehicle abnormal driving probability parameter, the vehicle driving trend parameter, and the vehicle fluctuation parameter of each preprocessed image, and comprehensively judging whether the vehicle has dangerous driving behavior and issuing a reminder.

2. According to claim 1, a method for detecting abnormal road traffic behavior based on computer vision is characterized in that: The marking distance of each pre-processed image is obtained according to the distance between the intersection of the lane line in each pre-processed image and the lower edge of the image, and the specific method includes: using the on-board camera to collect road images taken during the vehicle driving process at a preset time interval t, the time length of collecting the road images is T, using the edge detection algorithm to extract the lane lines of each road image, and traversing the images processed by the edge detection algorithm in the order of image acquisition to obtain a series of pre-processed images with clearly visible lane lines.

3. According to claim 1, a method for detecting abnormal road traffic behavior based on computer vision is characterized in that: The method of obtaining the vehicle abnormal driving probability parameter of each preprocessed image according to the marking distance of each preprocessed image includes: calculating the number of pixel points between the connecting line segments of the two intersection points where the lane line intersects with the lower edge of the image in each preprocessed image, and recording the number of pixel points on the connecting line segments of the two intersection points where the lane line intersects with the lower edge of the image in each preprocessed image as the marking distance of the preprocessed image.

4. According to claim 1, a method for detecting abnormal road traffic behavior based on computer vision is characterized in that: The specific method of obtaining the vehicle abnormal driving probability parameter of each pre-processed image according to the marking distance of each pre-processed image includes: In the formula, represents the vehicle abnormal driving probability parameter of the xth pre-processed image, represents the label distance of the x-th preprocessed image, represents the marking distance of the i-th preprocessed image, and x represents the image acquisition sequence number.

5. According to claim 1, a method for detecting abnormal road traffic behavior based on computer vision is characterized in that: The method of obtaining the vehicle driving trend parameter of each pre-processed image according to the change trend of the mark distance of each pre-processed image includes: setting a data set of the mark distance data of the pre-processed image required for judging the vehicle driving trend, the length of the data set is n, and the data set contains the mark distance data of n consecutive sequences of pre-processed images, clearing the mark distance data of the data set after each calculation of the vehicle driving trend parameter, and re-filling the mark distance data after the next calculation of the vehicle driving trend parameter; In the formula, Represents the vehicle driving trend parameter of the xth preprocessed image, represents the label distance of the x-th preprocessed image, Represents the label distance of the jth preprocessed image.

6. According to claim 1, a method for detecting abnormal road traffic behavior based on computer vision is characterized in that: The specific method of calculating the fluctuation amplitude of the marking distance of each pre-processed image and obtaining the vehicle fluctuation parameter of any pre-processed image according to the fluctuation amplitude of the marking distance of each pre-processed image includes: In the formula, represents the vehicle fluctuation parameter of the xth preprocessed image, represents the label distance of the x-th preprocessed image, represents the label distance of the x-1th preprocessed image, represents the label distance of the I-th preprocessed image, Indicates the label distance of the I-1th preprocessed image.

7. According to claim 1, a method for detecting abnormal road traffic behavior based on computer vision is characterized in that: The method of setting a threshold and comprehensively judging whether the vehicle has dangerous driving behavior and issuing a reminder based on the vehicle abnormal driving probability parameter, vehicle driving trend parameter, and vehicle fluctuation parameter of each pre-processed image includes the following specific methods: In the formula, represents the dangerous driving behavior parameters of the vehicle in the xth preprocessed image, represents the vehicle abnormal driving probability parameter of the xth pre-processed image, Represents the vehicle driving trend parameter of the xth preprocessed image, represents the vehicle fluctuation parameter of the xth preprocessed image; A threshold G is set. During vehicle driving, the vehicle dangerous driving behavior parameters of the last preprocessed image are calculated each time, and the vehicle dangerous driving behavior parameters are compared with the threshold G. When the vehicle dangerous driving behavior parameters are greater than or equal to the threshold G, the driver is reminded to drive in a standardized manner through the vehicle audio.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of a method for detecting abnormal road traffic behavior based on computer vision as described in any one of claims 1 to 7 are implemented.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of a method for detecting abnormal road traffic behavior based on computer vision as described in any one of claims 1 to 7 are implemented.

10. A road traffic behavior anomaly detection system based on computer vision, characterized in that: The system includes the following modules: an image acquisition module for continuously acquiring lane images and preprocessing them to obtain a preprocessed image of each lane image; An image data calculation module, used to obtain the marking distance of each pre-processed image according to the distance between the intersection point of the lane line in each pre-processed image and the lower edge of the image; Obtaining the vehicle abnormal driving probability parameter of each pre-processed image according to the marking distance of each pre-processed image; According to the change trend of the marking distance of each pre-processed image, the vehicle driving trend parameter of each pre-processed image is obtained; Calculate the fluctuation amplitude of the marking distance of each pre-processed image, and obtain the vehicle fluctuation parameter of any pre-processed image according to the fluctuation amplitude of the marking distance of each pre-processed image; The data judgment module is used to set thresholds and comprehensively judge whether the vehicle has dangerous driving behavior and issue a reminder based on the vehicle abnormal driving probability parameters, vehicle driving trend parameters, and vehicle fluctuation parameters of each pre-processed image.

Citation Information

Patent Citations

  • Driving behavior detection method, storage medium, device and vehicle

    CN108275156A

  • Vehicle active safety control method and device

    CN112258813A

  • Method and device for detecting driver state, electronic equipment and medium

    CN112590798A

  • Lane departure early warning method based on driving habits

    CN113449635A

  • Lane departure degree detection method and readable storage medium

    CN114495063A