A method for identifying S-type driving events on urban roads
By combining the overall S-type algorithm with the road boundary line method, the vehicle center area method and the trajectory offset method, S-type driving events on urban roads are identified, and the problem of low recognition accuracy in the prior art is solved, and more accurate and fast S-type driving behavior recognition is achieved.
Patent Information
- Application Number
- CN202411735134.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2044-11-29
AI Technical Summary
The prior art has made judgment errors in identifying S-type driving behaviors, making it difficult to achieve accurate identification under various road conditions, resulting in low recognition accuracy.
An S-type driving event recognition method based on urban roads is adopted, combined with the road boundary line method, vehicle center area method and trajectory offset method, an overall S-type algorithm is constructed, and the identification accuracy of S-type driving behavior is improved through various judgment factors.
By integrating multiple logical judgment algorithms, more accurate identification of complex S-type driving behaviors is achieved, the recognition speed and accuracy are improved, and it is suitable for vehicle video tracking, solving the problem of low recognition accuracy in the prior art.
Smart Images

Figure CN119206592B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent transportation technology, and in particular to an S-type driving event recognition method based on urban roads. Background Art
[0002] In intelligent transportation systems, monitoring of vehicle behavior on the road is indispensable, among which vehicle identification, vehicle tracking and abnormal driving detection in road monitoring scenarios are the focus of research. S-type driving is a very dangerous behavior that will lead to an increase in traffic accidents, bring safety hazards to other road users, make people feel uneasy, and have a great impact on traffic. Therefore, S-type driving is an important part of abnormal driving detection, and accurate detection of S-type driving is of great significance to traffic regulations.
[0003] At present, there are mainly Meanshift tracking algorithm, Camshift tracking algorithm and some other filtering algorithms for tracking urban traffic vehicles. However, S-type driving itself is a complex driving behavior. Existing technologies often make mistakes in judgment. Driving detection technology still has many difficulties and problems. There is still a certain gap between mixed road tests under various road conditions and reality. Therefore, in order to improve the accuracy of S-type driving recognition judgment, the present invention proposes an S-type driving event recognition method based on urban roads. Summary of the invention
[0004] In order to overcome the shortcomings of the prior art, the purpose of the present invention is to provide an S-type driving event recognition method based on urban roads, which makes the recognition of S-type driving events more accurate and rapid by combining multiple logic judgment algorithms.
[0005] To achieve the above object, the present invention provides the following solution: a method for identifying S-type driving events based on urban roads, comprising the following steps:
[0006] Obtaining a traffic video of an urban road at the current moment, calibrating a road area in the traffic video to determine a left lane, a right lane, a lane boundary line, a lane line, and a reference forward direction of a corresponding lane, and obtaining lane information; wherein the lane line includes two lane-inside reference lines and an inter-lane reference line;
[0007] Use yolov5 detector to detect vehicles in traffic videos, and then use deepsort to track the detected vehicles to obtain vehicle information of each vehicle;
[0008] Based on the lane information and the vehicle information, construct input information; the input information includes a vehicle time-space sequence table, a vehicle change direction mark and a vehicle change direction counter;
[0009] The overall S-type algorithm is used to determine whether the driving state of the target vehicle corresponding to the input information is S-type driving. If so, the vehicle number is recorded. If not, the traffic video at the next moment is obtained, and the step of "calibrating the road area in the traffic video to determine the left lane, the right lane, the lane line and the reference forward direction of the corresponding lane to obtain lane information" is returned; wherein the overall S-type algorithm includes a road boundary line method, a vehicle center area method and a trajectory offset method, and the overall S-type algorithm is run in a frame skipping manner, and the algorithm processing is performed every other frame.
[0010] Optionally, the lane information includes a lane number, a lane range, and a reference vector set in a reference forward direction; the vehicle information includes position information, a vehicle travel trajectory, a bounding box, coordinates, and a sequence number.
[0011] Optionally, the vehicle spatiotemporal sequence table includes a lane number sequence and a vehicle coordinate matrix; the lane number sequence is used to record the lanes passed by the vehicle based on the timestamp of the traffic video; the vehicle coordinate matrix is used to record the vehicle position change information based on the timestamp of the traffic video.
[0012] Optionally, the vehicle change direction sign includes three types: the vehicle is traveling in a straight line, the vehicle is deviating in a direction of increasing lane number, and the vehicle is deviating in a direction of decreasing lane number.
[0013] Optionally, the vehicle change counter is used to record the number of changes of the vehicle change sign, the initial value of the vehicle change counter is 0, and the number of times the vehicle enters the lane for the first time is not counted.
[0014] Optionally, the steps of the road boundary line method include:
[0015] Comparing the vehicle's moving trajectory with the in-lane baseline and the in-lane baseline respectively, to obtain the number of first intersections between the vehicle's moving trajectory and the in-lane baseline and the number of second intersections between the vehicle's moving trajectory and the in-lane baseline;
[0016] The traveling direction of the vehicle in each frame of the traffic video is compared with the reference vector and the angle between the two is calculated. The angle of every five frames is summed and averaged to obtain an angle average value. It is determined whether the angle average value is greater than a set judgment threshold. If so, a record is made, otherwise, no record is made;
[0017] When the number of the first intersection points or the number of the second intersection points is greater than or equal to 3 and the number of records of the average value of the angle is greater than or equal to 10, it is determined that the vehicle is driving in an S-type manner.
[0018] Optionally, the steps of the vehicle center area method include:
[0019] Selecting a fixed point on the boundary box of the vehicle as the center point of the vehicle and determining the lane where the center point of the vehicle is located;
[0020] When the center point of the vehicle enters the lane for the first time, the vehicle offset direction is recorded as 0; when the center point of the vehicle moves in the direction of increasing lane number, the vehicle offset direction is recorded as 1; when the center point of the vehicle moves in the direction of decreasing lane number, the vehicle offset direction is recorded as -1;
[0021] The first driving behavior judgment is performed. When the change in the vehicle offset direction starts from 0, changes from 1 to -1, and changes from -1 to 1, a change record is made to determine whether the number of change records is greater than 3. If so, it is preliminarily determined that the vehicle is S-type driving.
[0022] Optionally, the vehicle center area method further includes a second driving behavior judgment:
[0023] After initially judging that the vehicle is driving in an S-shaped pattern, determine the actual S-shaped trajectory and set the lane change safety threshold ,in , is a constant, is the vehicle width;
[0024] Using the detection and tracking model, the position of the vehicle is set to P{x1,y1}, and the distance from any point on the actual S-shaped trajectory of the vehicle to the lane boundary line passed by the lane change is calculated. ,in , All are parameters of vehicle coordinate position;
[0025] On the actual S-shaped trajectory, if the distance between the vehicle position and the lane boundary line passed by The maximum value is less than the lane change safety threshold , then the vehicle is judged not to be driving in an S-shape. If the distance between the vehicle position and the lane boundary line is The maximum value is greater than or equal to the lane change safety threshold , then the vehicle is judged to be driving in S type.
[0026] Optionally, the steps of the trajectory deviation method include:
[0027] Based on the traffic video, the total straight-line distance between the starting point and the end point of the vehicle is calculated, and the actual total distance of the vehicle's travel trajectory is calculated, and a plurality of trajectory points are set in the actual total distance;
[0028] Calculate the linear distance and the actual distance between the starting point and each of the trajectory points respectively, and set a corresponding ratio threshold value at each of the trajectory points;
[0029] Based on each of the trajectory points, the ratio between the straight-line distance and the actual distance is calculated and it is determined whether the ratio is greater than the corresponding ratio threshold. If the determination result of any of the trajectory points is yes, it is determined that the vehicle is driving in an S-type manner.
[0030] Optionally, the formula for the ratio threshold is: ;in, is the ratio threshold, S is the actual distance, x is the distance from the starting point to the end point, It is the angle between the connection vector from the start point to the end point and the lane direction.
[0031] The present invention discloses the following technical effects by providing an S-type driving event recognition method based on urban roads:
[0032] The present invention identifies S-type driving events by combining the road boundary line method, the vehicle center area method, and the trajectory offset into an overall S-type algorithm. Complex S-type driving behaviors can be more accurately identified through a variety of determination factors. Meanwhile, the algorithm of the present invention is simple, has a fast recognition speed in actual scenarios, is suitable for video tracking of vehicles, and solves the problem that there is a certain gap between mixed road testing and reality.
[0033] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] 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 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 labor.
[0035] Figure 1 A flow chart of a method provided by an embodiment of the present invention;
[0036] Figure 2 A logical flow chart of the method provided by the embodiment of the present invention;
[0037] Figure 3 An algorithm flow chart provided for an embodiment of the present invention;
[0038] Figure 4 A schematic diagram of boundary jitter provided by an embodiment of the present invention;
[0039] Figure 5 A schematic diagram of a safe lane change provided by an embodiment of the present invention;
[0040] Figure 6A schematic diagram of a trajectory of a trajectory deviation method provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0041] 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 only 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0042] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0043] like Figure 1-Figure 3 As shown, the present invention provides an S-type driving event recognition method based on urban roads, comprising the following steps:
[0044] 1. Obtain the current traffic video of the urban road, calibrate the road area in the traffic video to determine the left lane, right lane, lane boundary line, lane line and the reference forward direction of the corresponding lane to obtain lane information;
[0045] The lane lines include two lane baselines and lane-to-lane baselines. Two lane baselines are set to avoid driving along the line. If a single baseline is selected, if the vehicle sways slightly along the baseline, it will cause misjudgment. Therefore, two baselines are selected to ensure that the vehicle trajectory deviation is large enough to be identified as "S" driving.
[0046] The lane information includes a lane number, a lane range, and a reference vector set in a reference forward direction. For example, the lane number can be an odd number such as 1, 3, 5, etc., which is used to locate the number of the lane line between two lanes.
[0047] Lane boundaries are the boundaries between lanes.
[0048] 2. Use the yolov5 detector to detect vehicles in the traffic video, and then use deepsort to track the detected vehicles to obtain vehicle information of each vehicle; the vehicle information includes location information, vehicle trajectory, bounding box, coordinates and sequence number.
[0049] 3. Based on the lane information and the vehicle information, construct input information; the input information includes a vehicle time-space sequence table, a vehicle change direction mark and a vehicle change direction counter;
[0050] The vehicle spatiotemporal sequence table includes a lane number sequence C[n] and a vehicle coordinate matrix D[n], where n is the timestamp sequence number of the traffic video. The lane number sequence is used to record the lanes that the vehicle has passed through based on the timestamp of the traffic video; the vehicle coordinate matrix is used to record the vehicle position change information based on the timestamp of the traffic video.
[0051] The vehicle change direction mark [0, 1, -1] includes three types: 0 for the vehicle traveling in a straight line, 1 for the vehicle shifting in the direction of increasing lane number, and -1 for the vehicle shifting in the direction of decreasing lane number.
[0052] The vehicle change counter is used to record the number of changes of the vehicle change sign. The initial value of the vehicle change counter is 0, and the number of times the vehicle enters the lane for the first time is not counted.
[0053] Use the vehicle's location information and lane information to determine whether the vehicle is within the range of the lane; if so, record the lane number and record it in the vehicle time-space sequence table; according to the vehicle time-space sequence table, if the vehicle enters the lane area for the first time, record the vehicle change mark as 0; when the vehicle lane number changes, if the lane number change direction is different from the vehicle change mark, then add one to the vehicle variable count. If the change mark is 1 and the vehicle deviates in the direction of the lane reduction, the count number will increase by one. Determine whether the counter count is greater than three times. If so, it is determined that there is an abnormal driving behavior of "S" type driving. The specific judgment process is described as follows.
[0054] 4. Use the overall S-type algorithm to determine whether the driving state of the target vehicle corresponding to the input information is S-type driving. If so, record the vehicle number; if not, obtain the traffic video at the next moment, and return to the step of "calibrating the road area in the traffic video to determine the left lane, the right lane, the lane line and the reference forward direction of the corresponding lane to obtain lane information"; wherein the overall S-type algorithm includes a road boundary line method, a vehicle center area method and a trajectory offset method, and the overall S-type algorithm runs in a frame skipping manner, and performs algorithm processing every other frame.
[0055] 4.1. The road boundary method is a method for judging whether a vehicle changes lanes based on the vehicle lane line. The steps of the road boundary method include:
[0056] Comparing the vehicle's moving trajectory with the in-lane baseline and the in-lane baseline respectively, to obtain the number of first intersections between the vehicle's moving trajectory and the in-lane baseline and the number of second intersections between the vehicle's moving trajectory and the in-lane baseline;
[0057] The traveling direction of the vehicle in each frame of the traffic video is compared with the reference vector and the angle between the two is calculated. The angle of every five frames is summed and averaged to obtain an angle average value. It is determined whether the angle average value is greater than a set judgment threshold. If so, a record is made, otherwise, no record is made;
[0058] When the number of the first intersection points or the number of the second intersection points is greater than or equal to 3 and the number of records of the average value of the angle is greater than or equal to 10, it is determined that the vehicle is driving in an S-type manner.
[0059] 4.2. The vehicle center area method is based on the sequence change of the lane number where the vehicle is located. The steps of the vehicle center area method include:
[0060] 4.21. Initial judgment
[0061] Selecting a fixed point on the boundary box of the vehicle as the center point of the vehicle and determining the lane where the center point of the vehicle is located;
[0062] When the center point of the vehicle enters the lane for the first time, the vehicle offset direction is recorded as 0; when the center point of the vehicle moves in the direction of increasing lane number, the vehicle offset direction is recorded as 1; when the center point of the vehicle moves in the direction of decreasing lane number, the vehicle offset direction is recorded as -1;
[0063] Perform an initial S-type driving judgment: when the change in the vehicle offset direction starts from 0, changes from 1 to -1, and changes from -1 to 1, a change record is performed to determine whether the number of change records is greater than 3. If so, the vehicle is initially judged to be driving in an S-type manner.
[0064] 4.22 Final judgment
[0065] like Figure 4-Figure 5 As shown, the final S-shaped driving judgment is made, because in the actual scene, there may be a "shaking" situation, that is, the vehicle shakes slightly along the lane boundary line of the reference area. Although the driving trajectory meets the initial S-shaped driving judgment, the actual trajectory does not meet the true S-shaped driving judgment, which will affect the judgment result. For this special situation, it is necessary to add restrictions to the lane change to ensure that the amplitude of the vehicle fluctuation meets the conditions of S-shaped driving. Therefore, the final S-shaped driving judgment steps are as follows:
[0066] After initially judging that the vehicle is driving in an S-shaped pattern, determine the actual S-shaped trajectory of the vehicle and set the lane change safety threshold ,in , is a constant, is the vehicle width;
[0067] Using the detection and tracking model, the position of the vehicle is set to P{x1,y1}. Assuming that the vehicle is initially in lane 0, the distance from any point on the actual S-shaped trajectory of the vehicle to the lane boundary line through which the lane is changed is calculated. ,in , All are parameters of vehicle coordinate position;
[0068] On the actual S-shaped trajectory, if the distance between the vehicle position and the lane boundary line passed by The maximum value is less than the lane change safety threshold , then the vehicle is judged not to be driving in an S-shape. If the distance between the vehicle position and the lane boundary line is The maximum value is greater than or equal to the lane change safety threshold , then the vehicle is judged to be driving in S type.
[0069] In addition, it should be noted that in actual scenarios, due to the difference in viewing angles of cameras and the fact that lanes are often not straight, the boundary line is generally composed of polylines, so the boundary line is represented as a set L of n straight lines:
[0070]
[0071] The solution formula of is based on the actual solution formula of L (that is, to obtain The formula process):
[0072] .
[0073] 4.3, such as Figure 6 As shown, the trajectory deviation method is also based on the comparison between the vehicle's trajectory and the lane travel vector. Ideally, the vehicle travels along the direction of the road, and the trajectory is basically the same as the straight-line distance between the starting point and the end point. Because when the vehicle is driving in an "S" shape, it will travel a longer distance in the horizontal direction of the road (that is, when the vehicle is driving in an "S" shape, if the starting point and the end point of the two vehicles are the same, the distance of the "S" type driving is significantly greater than that of the straight-line driving), the ratio of the distance to the ideal straight-line driving is calculated after subtracting the deviation from the total distance, and when the ratio exceeds the threshold, it is determined to be "S" type driving. The steps of the trajectory deviation method include:
[0074] Based on the traffic video, the total straight-line distance between the starting point and the end point of the vehicle is calculated, and the actual total distance S of the vehicle's travel trajectory is calculated, and a plurality of trajectory points are set in the actual total distance S;
[0075] The trajectory length S can be obtained by linking the vehicle position recorded in each frame of the image. Suppose there are a total of p frames in the video, the vehicle number is k, and the point set A consisting of the position of each frame is recorded , then the calculation formula of length S is: ;
[0076] Calculate the straight-line distance and the actual distance between the starting point and each of the trajectory points respectively, and set a corresponding ratio threshold value at each of the trajectory points;
[0077] Based on each of the trajectory points, the ratio between the straight-line distance and the actual distance is calculated and it is determined whether the ratio is greater than the corresponding ratio threshold. If the determination result of any of the trajectory points is yes, it is determined that the vehicle is driving in an S-type. If there is no point exceeding the threshold after iteration until the starting point, it is considered to be normal driving.
[0078] The formula for the ratio threshold is: ;in, is the ratio threshold, S is the actual distance, x is the straight-line distance from the starting point to the end point, is the angle between the connection vector from the start point to the end point and the lane direction (i.e. the forward direction), is the horizontal component, is the vertical component.
[0079] In the actual algorithm execution of the trajectory offset method, after determining the lane travel direction, it is only necessary to determine the horizontal and vertical components from the current position of the vehicle to the initial position, without the need to calculate the actual value. In the actual threshold determination, the vehicle is traversed from the end position to the starting position, and the point that meets the threshold is stopped, which reduces the complexity of the algorithm. At the same time, it can make reasonable judgments for long-distance and short-distance S-shaped driving, increasing the robustness of the model.
[0080] 4.4. Solve the vehicle occlusion problem by using frame skipping method
[0081] In the process of implementing the above algorithm, the occlusion of the vehicle caused by the viewing angle will affect the tracking effect, and the tracking ID of the vehicle will be interrupted and discontinuous. In order to reduce the tracking ID error caused by occlusion, when recording vehicle information, the algorithm will synchronously record the time of the last frame in which the vehicle appeared. When the frame number of the next vehicle appears again is more than 20 frames away from the last frame, the algorithm will consider the vehicle to be different from the previous vehicle and overwrite the relevant information of the original vehicle.
[0082] Calculating the distance between the vehicle and the lane line requires a large amount of calculation. The algorithm uses a frame skipping method and processes every other frame to meet the real-time nature of the algorithm.
[0083] The mask of the entire image is first set to 0, and then the lane areas are numbered 1, 3, and 5. According to the respective number assignments, as the video stream progresses, when the mask value of the vehicle center is an odd number, the vehicle lane, position and other information are recorded to facilitate limiting the range of the lane and the area for event determination.
[0084] Therefore, the present invention provides an S-type driving event recognition method based on urban roads, and combines a variety of logic judgment algorithms to make the recognition of S-type driving events more accurate and rapid.
[0085] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0086] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of the present invention. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A method for identifying S-type driving events on urban roads, characterized in that: The following steps are involved: Obtaining a traffic video of an urban road at the current moment, calibrating a road area in the traffic video to determine a left lane, a right lane, a lane boundary line, a lane line, and a reference forward direction of a corresponding lane, and obtaining lane information; wherein the lane line includes two lane-inside reference lines and an inter-lane reference line; Use yolov5 detector to detect vehicles in traffic videos, and then use deepsort to track the detected vehicles to obtain vehicle information of each vehicle; Based on the lane information and the vehicle information, construct input information; the input information includes a vehicle time-space sequence table, a vehicle change direction mark and a vehicle change direction counter; Using the overall S-type algorithm to determine whether the driving state of the target vehicle corresponding to the input information is S-type driving, if so, record the vehicle number, if not, obtain the traffic video at the next moment, and return to the step of "calibrating the road area in the traffic video to determine the left lane, the right lane, the lane line and the reference forward direction of the corresponding lane to obtain lane information"; wherein the overall S-type algorithm includes a road boundary line method, a vehicle center area method and a trajectory offset method, and the overall S-type algorithm is run in a frame skipping manner, and the algorithm processing is performed every other frame; The steps of the vehicle center area method include: Selecting a fixed point on the bounding box of the vehicle as the center point of the vehicle and determining the lane where the center point of the vehicle is located; When the center point of the vehicle enters the lane for the first time, the vehicle offset direction is recorded as 0; when the center point of the vehicle moves in the direction of increasing lane number, the vehicle offset direction is recorded as 1; when the center point of the vehicle moves in the direction of decreasing lane number, the vehicle offset direction is recorded as -1; Perform the first driving behavior judgment. When the change of the vehicle offset direction starts from 0, changes from 1 to -1, and changes from -1 to 1, a change record is made to determine whether the number of change records is greater than 3. If so, it is preliminarily determined that the vehicle is S-type driving; The steps of the vehicle center area method also include a second driving behavior judgment: After initially judging that the vehicle is driving in an S-shaped pattern, determine the actual S-shaped trajectory and set the lane change safety threshold ,in , is a constant, is the vehicle width; Using the detection and tracking model, the position of the vehicle is set to P{x1,y1}, and the distance from any point on the actual S-shaped trajectory of the vehicle to the lane boundary line passed by the lane change is calculated. ,in , ; On the actual S-shaped trajectory, if the distance between the vehicle position and the lane boundary line passed by The maximum value is less than the lane change safety threshold , then the vehicle is judged not to be driving in an S-shape. If the distance between the vehicle position and the lane boundary line is The maximum value is greater than or equal to the lane change safety threshold , then the vehicle is judged to be driving in S type.
2. The method for identifying S-type driving events based on urban roads according to claim 1, characterized in that: The lane information includes a lane number, a lane range, and a reference vector set in a reference forward direction; the vehicle information includes position information, a vehicle travel trajectory, a bounding box, coordinates, and a sequence number.
3. The method for identifying S-type driving events based on urban roads according to claim 2, characterized in that: The vehicle spatiotemporal sequence table includes a lane number sequence and a vehicle coordinate matrix; the lane number sequence is used to record the lanes passed by the vehicle based on the timestamp of the traffic video; the vehicle coordinate matrix is used to record the vehicle position change information based on the timestamp of the traffic video.
4. The method for identifying S-type driving events based on urban roads according to claim 3, characterized in that: The vehicle change direction signs include three types: the vehicle is traveling in a straight line, the vehicle is deviating in the direction of increasing lane number, and the vehicle is deviating in the direction of decreasing lane number.
5. The method for identifying S-type driving events based on urban roads according to claim 4, characterized in that: The vehicle change counter is used to record the number of changes of the vehicle change sign. The initial value of the vehicle change counter is 0, and the number of times the vehicle enters the lane for the first time is not counted.
6. The method for identifying S-type driving events based on urban roads according to claim 5, characterized in that: The road boundary line method comprises the steps of: comparing the vehicle trajectory with the in-lane baseline and the inter-lane baseline respectively, obtaining the number of first intersections between the vehicle trajectory and the in-lane baseline and the number of second intersections between the vehicle trajectory and the inter-lane baseline; The traveling direction of the vehicle in each frame of the traffic video is compared with the reference vector and the angle between the two is calculated. The angle of every five frames is summed and averaged to obtain an angle average value. It is determined whether the angle average value is greater than a set judgment threshold. If so, a record is made, otherwise, no record is made; When the number of the first intersection points or the number of the second intersection points is greater than or equal to 3 and the number of records of the average value of the angle is greater than or equal to 10, it is determined that the vehicle is driving in an S-type manner.
7. The method for identifying S-type driving events based on urban roads according to claim 6, characterized in that: The steps of the trajectory deviation method include: Based on the traffic video, the total straight-line distance between the starting point and the end point of the vehicle is calculated, and the actual total distance of the vehicle's travel trajectory is calculated, and a plurality of trajectory points are set in the actual total distance; Calculate the straight-line distance and the actual distance between the starting point and each of the trajectory points respectively, and set a corresponding ratio threshold value at each of the trajectory points; Based on each of the trajectory points, the ratio between the straight-line distance and the actual distance is calculated and it is determined whether the ratio is greater than the corresponding ratio threshold. If the determination result of any of the trajectory points is yes, it is determined that the vehicle is driving in an S-type manner.
8. The method for identifying S-type driving events based on urban roads according to claim 7, characterized in that: The formula for the ratio threshold is: ;in, is the ratio threshold, S is the actual distance, x is the distance from the starting point to the end point, It is the angle between the connection vector from the start point to the end point and the lane direction.
Citation Information
Patent Citations
Self-driving car lane changing control method based on monocular vision
CN105329238A
Vehicle driving track recognition method and device and storage medium
CN112418213A