Abnormal driving early warning method for vehicles at intersection

By completing the position information of the vehicle interrupt frame image in the intersection monitoring image and clustering its trajectory paths, the problem of inaccurate abnormal driving evaluation caused by interrupted vehicle position coordinates is solved, and the reliability of detection is improved.

CN119889051AInactive Publication Date: 2025-04-25WUHAN LU AN ELECTRONIC TECH CO LTD
View PDF 12 Cites 0 Cited by

Patent Information

Application Number
CN202510386846.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2025-04-25
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Due to traffic jams and large vehicle occlusion, it is impossible for the vehicle to have location information in every frame of the image, resulting in inaccurate evaluation of subsequent abnormal vehicles.

Method used

By obtaining the position coordinates of each vehicle in its interrupted frame image, calculating its speed and direction angle, and then completing the position information. The trajectory path of each vehicle is then curved and clustered using a hierarchical clustering algorithm to identify anomalies.

Benefits of technology

It effectively solves the problem of interruption of position coordinates, reduces the deviation of trajectory fitting, improves the consistency and accuracy of position coordinates, makes the clustering results more in line with the actual vehicle driving trajectory, and improves the reliability of abnormal driving detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119889051A_ABST
    Figure CN119889051A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, in particular to an early warning method for abnormal driving of vehicles at an intersection, which comprises the following steps of: acquiring a position coordinate of each vehicle in each frame of intersection monitoring image so as to obtain an intermittent frame image of each vehicle; the method comprises the following steps: acquiring a direction angle and a speed of each vehicle at a first discontinuous frame image, estimating a position coordinate of each vehicle at the first discontinuous frame image to obtain a position coordinate of each vehicle in each frame of intersection monitoring image, and performing curve fitting on the position coordinate of each vehicle in each frame of intersection monitoring image to obtain a position coordinate of each vehicle in each frame of intersection monitoring image; obtaining a track path of each vehicle; clustering all the vehicles according to the similarity of the trajectory paths between the vehicles to obtain a plurality of clusters; according to the abnormal vehicle detection method and device, the accuracy of abnormal vehicle detection is improved.
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 technology. More specifically, the present invention relates to an abnormal driving warning method for vehicles at intersections. Background Art

[0002] The increasing traffic pressure at intersections will lead to abnormal driving behaviors, such as driving against traffic and changing lanes illegally, which not only seriously threatens road traffic safety, but may also lead to serious traffic accidents. Traditional traffic management methods mainly rely on on-site command by traffic police and automatic control of traffic signals, but these methods often have limited response speed and accuracy when facing abnormal driving behaviors. Therefore, it is necessary to design a method that can monitor and warn abnormal driving behaviors of vehicles at intersections in real time. Timely detection and warning of abnormal driving behaviors are of great significance to improving the level of traffic safety at intersections and reducing traffic accidents.

[0003] The patent application document currently published with the publication number CN111009136A is a method, device and system for detecting vehicles with abnormal speeds on highways. The method obtains a real-time video stream in a highway video surveillance device; processes the real-time video stream to obtain multiple frames of images; performs target detection on each frame of the image to obtain a target detection result; tracks each target vehicle in the target detection result to obtain a target tracking result; performs an abnormality analysis on the target tracking result; and outputs a warning message if the target tracking result determines that the target vehicle is abnormal.

[0004] Due to traffic jams, large vehicle obstructions and other reasons, it is impossible for the vehicle to have position information in every frame of the image. If the vehicle's position information is not captured when the vehicle is traveling at key positions such as turning points at intersections, the above method will lead to inaccurate assessments of subsequent abnormally traveling vehicles. Summary of the invention

[0005] In order to solve the problem that the vehicle cannot have position information in each frame of the image due to traffic jams, large vehicle occlusion, etc., which will lead to inaccurate evaluation of subsequent abnormal driving vehicles, the present invention proposes an abnormal driving warning method for vehicles at intersections, the method comprising the following steps: Get the position coordinates of each vehicle in each frame of the intersection monitoring image, and then get the intermittent frame image of each vehicle; get the position coordinates of each vehicle in each intermittent frame image: ; In the formula, as well as Represents the abscissa value and ordinate value of the position coordinates of the i-th vehicle in its first intermittent frame image; as well as Represents the abscissa value and ordinate value of the position coordinates of the i-th vehicle in the nearest neighbor image in front of its first intermittent frame image; Represents the speed of the i-th vehicle at its first intermittent frame image; Represents the difference in acquisition time corresponding to the nearest neighbor image in front of the first intermittent frame image of the i-th vehicle; Represents the direction angle of the i-th vehicle at its first intermittent frame image; according to the position coordinates of each vehicle in each intermittent frame image, the position coordinates of each vehicle in each frame of the intersection monitoring image are obtained; The position coordinates of each vehicle in each frame of the intersection monitoring image are curve fitted to obtain the trajectory path of each vehicle; the similarity of the trajectory paths between vehicles is obtained; a hierarchical clustering algorithm is used to cluster all vehicles according to the similarity of the trajectory paths between vehicles to obtain several clusters; the abnormality degree of each cluster is obtained to obtain the abnormal vehicle.

[0006] The creativity of the present invention lies in obtaining the speed and direction angle of each vehicle at each intermittent frame image according to the position coordinates in the front and rear images of the vehicle's intermittent frame image, and then calculating the position coordinates of each vehicle at each intermittent frame image according to the speed and direction angle, thereby completing the position information at the vehicle's intermittent frame images, and finally performing curve fitting on the position coordinates of each vehicle in each frame of the intersection monitoring image to obtain the trajectory path of each vehicle, and clustering the trajectory path of each vehicle to obtain abnormal vehicles, effectively solving the problem of position coordinate discontinuity caused by traffic jams, large vehicle obstruction, etc., reducing the deviation of trajectory fitting, improving the consistency and accuracy of position coordinates, making the clustering results more consistent with the actual vehicle driving trajectory, and improving the accuracy of clustering, thereby making the abnormal driving detection results more reliable.

[0007] Preferably, the acquiring the position coordinates of each vehicle in each frame of the intersection monitoring image, and then obtaining the intermittent frame image of each vehicle, includes: The intersection surveillance video is decomposed using OpenCV technology to obtain several frames of intersection surveillance images and the acquisition time corresponding to each frame of intersection surveillance image; for any frame of intersection surveillance image, each vehicle in the frame of intersection surveillance image is identified and located using a pre-trained target detection algorithm to obtain the position coordinates of each vehicle in the frame of intersection surveillance image; for any vehicle in the intersection surveillance video and any frame of intersection surveillance image, if the vehicle has no position coordinates in the frame of intersection surveillance image, the frame of intersection surveillance image is recorded as an intermittent frame image of the vehicle.

[0008] This facilitates the subsequent completion of the position information of each vehicle in each of its intermittent frame images.

[0009] Preferably, obtaining the speed of the vehicle at its first intermittent frame image includes: Obtain the front nearest neighbor image and the front second nearest neighbor image of the first intermittent frame image of the vehicle; record the Euclidean distance between the position coordinates of the front nearest neighbor image of the ith vehicle in the first intermittent frame image and the position coordinates of the front second nearest neighbor image of the ith vehicle in the first intermittent frame image as the first distance; record the frame difference between the position coordinates of the front nearest neighbor image of the ith vehicle in the first intermittent frame image and the position coordinates of the front second nearest neighbor image of the ith vehicle in the first intermittent frame image as the first interval time; record the ratio of the first distance to the first interval time as the speed of the ith vehicle at its first intermittent frame image.

[0010] The speed of the vehicle at its first intermittent frame image is predicted based on the position coordinates of the image before the first intermittent frame image of the vehicle, so as to facilitate the subsequent acquisition of the position coordinates of the vehicle at its first intermittent frame image based on the speed of the vehicle at its first intermittent frame image.

[0011] Preferably, the step of acquiring the front nearest neighbor image and the front next nearest neighbor image of the first intermittent frame image of the vehicle includes: In all the frame intersection monitoring images before the first intermittent frame image of the ith vehicle, obtain the image in which the ith vehicle appeared most recently, and record it as the front nearest neighbor image of the first intermittent frame image of the ith vehicle; in all the frame intersection monitoring images before the said front nearest neighbor image, obtain the image in which the ith vehicle appeared most recently, and record it as the front second nearest neighbor image of the first intermittent frame image of the ith vehicle.

[0012] Preferably, the acquisition of the direction angle of the vehicle at its first intermittent frame image includes: Obtain the driving direction angle of each vehicle after the first intermittent frame image; obtain the driving direction angle of each vehicle before the first intermittent frame image; take the average of the driving direction angles of the ith vehicle before and after the first intermittent frame image as the direction angle of the ith vehicle at its first intermittent frame image.

[0013] According to the position coordinates of the image before the first intermittent frame image of the vehicle, the direction angle of the vehicle at its first intermittent frame image is obtained, so as to facilitate the subsequent acquisition of the position coordinates of the vehicle at its first intermittent frame image according to the direction angle of the vehicle at its first intermittent frame image.

[0014] Preferably, the step of obtaining the driving direction angle of each vehicle before the first intermittent frame image includes: The straight line connecting the position coordinates of the nearest neighbor image in front of the i-th vehicle in its first intermittent frame image and the position coordinates of the second nearest neighbor image in front of it is recorded as the first straight line; the obtuse angle formed by the first straight line and the horizontal direction is taken as the driving direction angle of the i-th vehicle before the first intermittent frame image.

[0015] Preferably, the step of obtaining the driving direction angle of each vehicle after the first intermittent frame image includes: The nearest neighbor image and the second nearest neighbor image behind the first intermittent frame image of the ith vehicle are obtained; the connecting straight line between the position coordinates of the nearest neighbor image behind the ith vehicle in its first intermittent frame image and the second nearest neighbor image behind the ith vehicle is recorded as the second straight line; the obtuse angle formed by the second straight line and the horizontal direction is taken as the driving direction angle of the ith vehicle after the first intermittent frame image.

[0016] Preferably, the obtaining of similarity of trajectory paths between vehicles includes: ; In the formula, Represents the similarity between the trajectory path of the i-th vehicle and the b-th vehicle except the i-th vehicle; as well as Respectively represent the abscissa value and ordinate value of the kth position in the trajectory path of the i-th vehicle; as well as Respectively represent the abscissa value and ordinate value of the kth position in the trajectory path of the bth vehicle other than the ith vehicle; Represents the number of positions in the trajectory path of the vehicle.

[0017] It is convenient to cluster vehicles according to the similarity of their trajectory paths, and vehicles with abnormal trajectories can be clustered into one category, which is convenient for subsequent identification of abnormal vehicles.

[0018] Preferably, the step of obtaining the abnormality degree of each cluster and then obtaining abnormal vehicles includes: For any cluster, the inverse tangent function is used to obtain the direction angle of the trajectory path of each vehicle in the cluster according to the initial position and final position of the trajectory path of each vehicle in the cluster; the standard deviation of the direction angles of the trajectory paths of all vehicles in the cluster is used as the initial abnormality degree of the cluster; the maximum and minimum normalization method is used to normalize the initial abnormality degrees of all clusters to obtain the abnormality degrees of all clusters; a pre-set warning threshold T is set, and if the abnormality degree of any cluster is greater than the warning threshold T, the vehicles in the cluster are abnormal vehicles.

[0019] The abnormality of the trajectory path of the vehicle in each cluster is analyzed to obtain abnormal vehicles, thereby making the abnormal driving detection result more reliable.

[0020] The present invention has the following beneficial effects: the purpose of the present invention is to obtain the speed and direction angle of each vehicle at each intermittent frame image according to the position coordinates in the front and rear images of the vehicle's intermittent frame image, and then obtain the position coordinates of each vehicle at each intermittent frame image according to the speed and direction angle, thereby completing the position information at the intermittent frame images of the vehicle, and finally performing curve fitting on the position coordinates of each vehicle in each frame of the intersection monitoring image to obtain the trajectory path of each vehicle, and obtaining abnormal vehicles after clustering, effectively solving the problem of position coordinate discontinuity caused by traffic jams, large vehicle occlusion and the like, reducing the deviation of trajectory fitting, improving the consistency and accuracy of position coordinates, making the clustering results more consistent with the actual vehicle driving trajectory, and improving the accuracy of clustering, thereby making the abnormal driving detection results more reliable. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein: Figure 1 The present invention is a flowchart of a method for warning abnormal driving of vehicles at intersections according to an embodiment of the present invention. DETAILED DESCRIPTION

[0022] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0023] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0024] See also Figure 1 , which shows a flowchart of a method for abnormal driving warning of vehicles at intersections provided by an embodiment of the present invention, the method comprising the following steps: S001. Collect the position coordinates of each vehicle in each frame of the intersection monitoring image, and obtain the intermittent frame image of each vehicle according to the position coordinates of each vehicle in each frame of the intersection monitoring image.

[0025] In the embodiment of the present invention, the specific method for obtaining the position coordinates of each vehicle in each frame of the intersection monitoring image in the intersection monitoring video and then obtaining the intermittent frame image of each vehicle is: Obtain intersection monitoring video through the monitoring system, decompose the intersection monitoring video using OpenCV technology, and obtain several frames of intersection monitoring images and the acquisition time corresponding to each frame of intersection monitoring image; for any frame of intersection monitoring image, use the pre-trained target detection algorithm to identify and locate each vehicle in the frame of intersection monitoring image, and obtain the position coordinates of each vehicle in the frame of intersection monitoring image; For any vehicle and any frame of intersection monitoring image in the intersection monitoring video, if the vehicle has no position coordinates in the frame of intersection monitoring image, the frame of intersection monitoring image is recorded as an intermittent frame image of the vehicle.

[0026] Among them, OpenCV technology and pre-trained target detection algorithm are existing technologies, and this embodiment will not be described in detail here.

[0027] S002. According to the intermittent frame images of each vehicle, obtain the direction angle of each vehicle at its first intermittent frame image and the speed of each vehicle at its first intermittent frame image.

[0028] It should be noted that in the daily traffic management system, the video of the passing vehicles is captured by the camera installed at the intersection, and the video is framed to obtain each frame of the intersection monitoring image. According to all the frames of the intersection monitoring image, the position coordinates of each vehicle in each frame are obtained. By fitting the position coordinates of each vehicle in all the frames, the trajectory path of each vehicle is obtained. Then, the hierarchical clustering algorithm is used to cluster the vehicles according to the trajectory paths of all the vehicles. According to the abnormality of the trajectory paths corresponding to the vehicles in the clustering results, the abnormal driving vehicles are evaluated. In actual road conditions, due to traffic jams, large vehicles blocking and other reasons, it is impossible for the vehicle to have position coordinates in each frame. If the vehicle's position coordinates are not captured when the vehicle is driving at key positions such as the turning point of the intersection, then the trajectory path obtained by fitting the incomplete position coordinates of each vehicle will produce a large deviation. Therefore, when clustering is performed according to the trajectory paths between vehicles, the clustering results are unreliable, which in turn affects the accuracy of the evaluation of abnormal driving vehicles. Therefore, first of all, for each intermittent frame image of the acquired vehicle, that is, each vehicle has no position information in the intermittent frame image, and then the position coordinates of each intermittent frame image of each vehicle are supplemented to obtain the position information of each vehicle in all frame images and then perform trajectory path fitting. It is known that the important parameters describing the motion state of the vehicle are speed and direction. Therefore, if the speed and direction angle of each vehicle in each of its intermittent frame images can be accurately estimated, the position information of each vehicle in each of its intermittent frame images can be well predicted.

[0029] It should be further explained that since vehicles often slow down near intersections, the speed difference between vehicles in all frames of intersection monitoring images obtained is very small, which means that the speed of the vehicle at each intermittent frame image can be obtained by using the vehicle speed in the partial frame intersection monitoring images before each intermittent frame image.

[0030] When obtaining the direction angle of the vehicle at each of its intermittent frame images, it is necessary to refer to the direction angle of the vehicle in the partial frame intersection monitoring image before each intermittent frame image and the average of the direction angle of the vehicle in the partial frame intersection monitoring image after each intermittent frame image, in order to reduce the error of single direction estimation. In addition, since vehicles at intersections often slow down when passing, this means that the change in the direction angle of the vehicle between adjacent frame images is also small, indicating that the direction angle of the vehicle at each of its interval frame images is based on the direction angle of the vehicle in the partial frame intersection monitoring image before and after each interval frame image. Therefore, when obtaining the direction angle of the vehicle at each of its intermittent frame images, it is necessary to refer to the direction angle of the vehicle in the partial frame intersection monitoring image before each intermittent frame image and the average of the direction angle of the vehicle in the partial frame intersection monitoring image after each intermittent frame image, in order to reduce the error of single direction estimation.

[0031] In the embodiment of the present invention, in all the frame intersection monitoring images before the first intermittent frame image of the i-th vehicle, the image in which the i-th vehicle appears most recently is obtained, which is recorded as the front nearest neighbor image of the first intermittent frame image of the i-th vehicle; in all the frame intersection monitoring images before the said front nearest neighbor image, the image in which the i-th vehicle appears most recently is obtained, which is recorded as the front second nearest neighbor image of the first intermittent frame image of the i-th vehicle; The Euclidean distance between the position coordinates of the nearest neighbor image in front of the i-th vehicle in the first intermittent frame image and the position coordinates of the second nearest neighbor image in front of the i-th vehicle in the first intermittent frame image is recorded as the first distance; the frame difference between the position coordinates of the nearest neighbor image in front of the i-th vehicle in the first intermittent frame image and the position coordinates of the second nearest neighbor image in front of the i-th vehicle in the first intermittent frame image is recorded as the first interval time; the ratio of the first distance to the first interval time is recorded as the speed of the i-th vehicle at its first intermittent frame image.

[0032] In all the frame intersection monitoring images after the first intermittent frame image of the ith vehicle, the image in which the ith vehicle appears most recently is obtained, which is recorded as the rear nearest neighbor image of the first intermittent frame image of the ith vehicle; in all the frame intersection monitoring images after the rear nearest neighbor image, the image in which the ith vehicle appears most recently is obtained, which is recorded as the rear second nearest neighbor image of the first intermittent frame image of the ith vehicle; The connecting straight line between the position coordinates of the nearest neighbor image in front of the first intermittent frame image of the i-th vehicle and the position coordinates of the second nearest neighbor image in front of the first intermittent frame image of the i-th vehicle is recorded as the first straight line; the obtuse angle formed by the first straight line and the horizontal direction is taken as the driving direction angle of the i-th vehicle before the first intermittent frame image; The connecting straight line between the position coordinates of the nearest neighbor image of the i-th vehicle behind its first intermittent frame image and the position coordinates of the second nearest neighbor image of the i-th vehicle behind its first intermittent frame image is recorded as the second straight line; the obtuse angle formed by the second straight line and the horizontal direction is taken as the driving direction angle of the i-th vehicle after the first intermittent frame image; The average of the driving direction angle of the ith vehicle before and after the first intermittent frame image is taken as the direction angle of the ith vehicle at its first intermittent frame image.

[0033] S003. According to the direction angle of each vehicle at its first intermittent frame image and the speed of each vehicle at its first intermittent frame image, the position coordinates of each vehicle in its first intermittent frame image are obtained, and the position coordinates of each vehicle in each frame of the intersection monitoring image are obtained. Curve fitting is performed on the position coordinates of each vehicle in each frame of the intersection monitoring image to obtain the trajectory path of each vehicle.

[0034] It should be noted that in actual road conditions, vehicles at intersections often travel slowly, which means that the vehicle's driving position coordinates during this period are smooth and predictable. Therefore, the speed and direction angle of the vehicle at its first intermittent frame image can be used to calculate the distance the vehicle should move according to the speed and direction angle at its first intermittent frame image, thereby obtaining the estimated position of the vehicle in the first intermittent frame.

[0035] In the embodiment of the present invention, the position coordinates of the i-th vehicle in the first intermittent frame image are: ; In the formula, Represents the horizontal coordinate value of the position coordinate of the i-th vehicle in its first intermittent frame image; Represents the horizontal coordinate value of the position coordinate of the i-th vehicle in the image closest to the front of its first intermittent frame image; Represents the speed of the i-th vehicle at its first intermittent frame image; Represents the difference in acquisition time corresponding to the nearest neighbor image in front of the first intermittent frame image of the i-th vehicle; Represents the direction angle of the i-th vehicle at its first intermittent frame image; Represents the speed of the i-th vehicle along the horizontal axis in its first intermittent frame image; Represents the displacement of the i-th vehicle along the horizontal axis in its first intermittent frame image; Represents the ordinate value of the position coordinate of the i-th vehicle in its first intermittent frame image; Represents the ordinate value of the position coordinate of the i-th vehicle in the nearest neighbor image in front of its first intermittent frame image; Represents the speed of the i-th vehicle along the longitudinal axis in its first intermittent frame image; represents the displacement of the ith vehicle along the longitudinal axis in its first intermittent frame image; the displacement of the ith vehicle along the longitudinal axis in its first intermittent frame image is added to the longitudinal coordinate of the position coordinate of the ith vehicle in the nearest neighbor image in front of its first intermittent frame image, so as to obtain the longitudinal coordinate of the position coordinate of the ith vehicle in its first intermittent frame image; the displacement of the ith vehicle along the transverse axis in its first intermittent frame image is added to the transverse coordinate of the position coordinate of the ith vehicle in the nearest neighbor image in front of its first intermittent frame image, so as to obtain the transverse coordinate of the position coordinate of the ith vehicle in its first intermittent frame image.

[0036] The position coordinates of the ith vehicle in its first intermittent frame image are obtained according to the horizontal and vertical coordinates of the position coordinates of the ith vehicle in its first intermittent frame image. Similarly, the position coordinates of the ith vehicle in each intermittent frame image are obtained in sequence to obtain the position coordinates of the ith vehicle in each frame of the intersection monitoring image. Curve fitting is performed on the position coordinates of the ith vehicle in each frame of the intersection monitoring image to obtain the trajectory path of the ith vehicle.

[0037] Similarly, obtain the trajectory path of each vehicle.

[0038] S004. Obtain the similarity of the trajectory paths between the vehicles; cluster all the vehicles according to the similarity of the trajectory paths between the vehicles to obtain a number of clusters; obtain the abnormality degree of each cluster, and then obtain the abnormal vehicles.

[0039] It should be noted that after obtaining the position coordinates of each vehicle at its intermittent frame image, the trajectory path of each vehicle is obtained. Therefore, it is necessary to cluster all vehicles according to the trajectory path of each vehicle and use the traditional hierarchical clustering algorithm. The abnormal driving vehicles are evaluated according to the abnormal conditions of the trajectory paths corresponding to the vehicles in the clustering results. Therefore, it is necessary to calculate the similarity of the trajectory paths between any two vehicles first, and then cluster all vehicles according to the similarity of the trajectory paths between any two vehicles, so as to identify abnormal driving vehicles later.

[0040] In the embodiment of the present invention, the similarity between the trajectory path of the i-th vehicle and the b-th vehicle other than the i-th vehicle is obtained: ; In the formula, Represents the similarity between the trajectory path of the i-th vehicle and the b-th vehicle except the i-th vehicle; Represents the horizontal coordinate value of the kth position in the trajectory path of the i-th vehicle; represents the horizontal coordinate value of the kth position in the trajectory path of the bth vehicle other than the i-th vehicle; Represents the ordinate value of the kth position in the trajectory path of the i-th vehicle; represents the ordinate value of the kth position in the trajectory path of the bth vehicle other than the i-th vehicle; Represents the number of positions in the trajectory path of the vehicle; It represents the sum of the distances between the corresponding positions in the trajectory path of the i-th vehicle and the b-th vehicle excluding the i-th vehicle. The smaller the value, the closer the trajectory path of the i-th vehicle is to the corresponding position of the trajectory path of the b-th vehicle excluding the i-th vehicle, which means that the driving trajectory paths of the two vehicles are more similar, that is, they are considered to be driving through the intersection in the same lane.

[0041] According to the method for obtaining the similarity between the trajectory paths of the ith vehicle and the bth vehicle except the ith vehicle, the similarity of the trajectory paths between any two vehicles is obtained; according to the similarity of the trajectory paths between any two vehicles, a hierarchical clustering algorithm is used to cluster all vehicles to obtain different cluster clusters.

[0042] It should be noted that there are generally three types of lane lines at intersections (straight, left turn, and right turn). Abnormal driving behaviors include vehicles driving in the wrong direction, changing lanes illegally, etc. Since vehicles with similar trajectories are clustered in a cluster through clustering, it means that clusters with higher similarity are likely to be vehicles traveling on the same lane line, and the general direction of the trajectory path of vehicles on the same lane line is relatively stable; therefore, if the distribution of the direction angles of the trajectory paths corresponding to all vehicles in any cluster is relatively discrete, then the vehicles in the cluster have abnormal driving behaviors.

[0043] In an embodiment of the present invention, for any clustering cluster, the initial position and the final position in the trajectory path of each vehicle in the clustering cluster are obtained, and the direction angle of the trajectory path of each vehicle in the clustering cluster is obtained using the inverse tangent function according to the initial position and the final position in the trajectory path of each vehicle in the clustering cluster; the standard deviation of the direction angles of the trajectory paths of all vehicles in the clustering cluster is used as the initial abnormality degree of the clustering cluster to obtain the initial abnormality degrees of all clustering clusters; the initial abnormality degrees of all clustering clusters are normalized using the maximum and minimum normalization method to obtain the abnormality degrees of all clustering clusters.

[0044] A warning threshold T is preset. If the abnormality of any cluster is greater than the warning threshold T, it means that the vehicles corresponding to the trajectory path in the cluster may have abnormal driving behavior. These vehicles are marked and a warning is sent to prompt traffic control personnel to check these vehicles.

[0045] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for warning abnormal driving of vehicles at intersections, characterized in that: include: Obtain the position coordinates of each vehicle in each frame of the intersection monitoring image, and then obtain the intermittent frame image of each vehicle; Get the position coordinates of each vehicle in each intermittent frame image: ; In the formula, as well as Represents the abscissa value and ordinate value of the position coordinates of the i-th vehicle in its first intermittent frame image; as well as Represents the abscissa value and ordinate value of the position coordinates of the i-th vehicle in the nearest neighbor image in front of its first intermittent frame image; Represents the speed of the i-th vehicle at its first intermittent frame image; Represents the difference in acquisition time corresponding to the nearest neighbor image in front of the first intermittent frame image of the i-th vehicle; Represents the direction angle of the i-th vehicle at its first intermittent frame image; according to the position coordinates of each vehicle in each intermittent frame image, the position coordinates of each vehicle in each frame of the intersection monitoring image are obtained; Perform curve fitting on the position coordinates of each vehicle in each frame of the intersection monitoring image to obtain the trajectory path of each vehicle; obtain the similarity of the trajectory paths between vehicles; A hierarchical clustering algorithm is used to cluster all vehicles according to the similarity of their trajectory paths to obtain several clusters; the abnormality degree of each cluster is obtained to obtain abnormal vehicles.

2. The abnormal driving warning method for vehicles at intersections according to claim 1, characterized in that: The step of obtaining the position coordinates of each vehicle in each frame of the intersection monitoring image, and then obtaining the intermittent frame image of each vehicle, includes: The intersection surveillance video is decomposed using OpenCV technology to obtain several frames of intersection surveillance images and the acquisition time corresponding to each frame of intersection surveillance image; for any frame of intersection surveillance image, each vehicle in the frame of intersection surveillance image is identified and located using a pre-trained target detection algorithm to obtain the position coordinates of each vehicle in the frame of intersection surveillance image; for any vehicle in the intersection surveillance video and any frame of intersection surveillance image, if the vehicle has no position coordinates in the frame of intersection surveillance image, the frame of intersection surveillance image is recorded as an intermittent frame image of the vehicle.

3. The abnormal driving warning method for vehicles at intersections according to claim 1, characterized in that: The acquisition of the speed of the vehicle at its first intermittent frame image includes: Obtain the front nearest neighbor image and the front second nearest neighbor image of the first intermittent frame image of the vehicle; record the Euclidean distance between the position coordinates of the front nearest neighbor image of the ith vehicle in the first intermittent frame image and the position coordinates of the front second nearest neighbor image of the ith vehicle in the first intermittent frame image as the first distance; record the frame difference between the position coordinates of the front nearest neighbor image of the ith vehicle in the first intermittent frame image and the position coordinates of the front second nearest neighbor image of the ith vehicle in the first intermittent frame image as the first interval time; record the ratio of the first distance to the first interval time as the speed of the ith vehicle at its first intermittent frame image.

4. The abnormal driving warning method for vehicles at intersections according to claim 3 is characterized in that: The step of acquiring the front nearest neighbor image and the front next nearest neighbor image of the first discontinuous frame image of the vehicle includes: In all the frame intersection monitoring images before the first intermittent frame image of the ith vehicle, obtain the image in which the ith vehicle appeared most recently, and record it as the front nearest neighbor image of the first intermittent frame image of the ith vehicle; in all the frame intersection monitoring images before the said front nearest neighbor image, obtain the image in which the ith vehicle appeared most recently, and record it as the front second nearest neighbor image of the first intermittent frame image of the ith vehicle.

5. The abnormal driving warning method for vehicles at intersections according to claim 1, characterized in that: The acquisition of the direction angle of the vehicle at its first intermittent frame image includes: Obtain the driving direction angle of each vehicle after the first intermittent frame image; obtain the driving direction angle of each vehicle before the first intermittent frame image; take the average of the driving direction angles of the ith vehicle before and after the first intermittent frame image as the direction angle of the ith vehicle at its first intermittent frame image.

6. The abnormal driving warning method for vehicles at intersections according to claim 5, characterized in that: The step of obtaining the driving direction angle of each vehicle before the first discontinuous frame image comprises: The straight line connecting the position coordinates of the nearest neighbor image in front of the i-th vehicle in its first intermittent frame image and the position coordinates of the second nearest neighbor image in front of it is recorded as the first straight line; the obtuse angle formed by the first straight line and the horizontal direction is taken as the driving direction angle of the i-th vehicle before the first intermittent frame image.

7. The abnormal driving warning method for vehicles at intersections according to claim 5, characterized in that: The step of obtaining the driving direction angle of each vehicle after the first intermittent frame image comprises: The nearest neighbor image and the second nearest neighbor image behind the first intermittent frame image of the ith vehicle are obtained; the connecting straight line between the position coordinates of the nearest neighbor image behind the ith vehicle in its first intermittent frame image and the second nearest neighbor image behind the ith vehicle is recorded as the second straight line; the obtuse angle formed by the second straight line and the horizontal direction is taken as the driving direction angle of the ith vehicle after the first intermittent frame image.

8. The abnormal driving warning method for vehicles at intersections according to claim 1, characterized in that: The obtaining of similarity of trajectory paths between vehicles includes: ; In the formula, Represents the similarity between the trajectory path of the i-th vehicle and the b-th vehicle except the i-th vehicle; as well as Respectively represent the abscissa value and ordinate value of the kth position in the trajectory path of the i-th vehicle; as well as Respectively represent the abscissa value and ordinate value of the kth position in the trajectory path of the bth vehicle other than the ith vehicle; Represents the number of positions in the trajectory path of the vehicle.

9. The abnormal driving warning method for vehicles at intersections according to claim 1, characterized in that: The step of obtaining the abnormality degree of each cluster and then obtaining abnormal vehicles includes: For any cluster, the inverse tangent function is used to obtain the direction angle of the trajectory path of each vehicle in the cluster according to the initial position and final position of the trajectory path of each vehicle in the cluster; the standard deviation of the direction angles of the trajectory paths of all vehicles in the cluster is used as the initial abnormality degree of the cluster; the maximum and minimum normalization method is used to normalize the initial abnormality degrees of all clusters to obtain the abnormality degrees of all clusters; a pre-set warning threshold T is set, and if the abnormality degree of any cluster is greater than the warning threshold T, the vehicles in the cluster are abnormal vehicles.

Citation Information

Patent Citations

  • Highway running speed abnormal vehicle detection method, device and system

    CN111009136A

  • Road geometric feature extraction method based on taxi track data

    CN108776727A

  • A moving object detection method oriented to radar signal data

    CN109447163A

  • Intersection abnormal vehicle track recognition and analysis method based on hierarchical clustering

    CN110570658A

  • Method for searching difficult case images, model training method, equipment and storage medium

    CN112733666A