Road traffic perception and abnormality identification method and system based on unmanned aerial vehicle vision
Patent Information
- Application Number
- CN202611274110.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-21
- Publication Date
- 2026-09-25
AI Technical Summary
(1)无人机成像畸变、机体悬停漂移、云台姿态波动、斜视投影导致图像像素距离无法换算为道路平面真实度量值,车辆速度、排队长度、占道范围等交通指标无法精准量化;
(1)本发明依托道路几何要素完成无人工标定点自标定,同时基于无人机位姿、帧间背景特征动态修正单应矩阵,解决无人机漂移、云台抖动带来的投影偏差,实现斜视无人机视频精准道路平面度量;
Smart Images

Figure CN122821771A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent analysis technology for traffic videos from unmanned aerial vehicles (UAVs), and in particular to a method and system for road traffic perception and anomaly recognition based on UAV vision. Background Technology
[0002] The existing traffic monitoring methods for urban roads and highways mainly consist of fixed pole cameras and geomagnetic detectors. These devices rely on fixed poles, power supply, and communication lines, resulting in long deployment cycles and fixed monitoring views. They also have drawbacks such as untimely coverage of blind spots and inflexible camera positions in temporary construction areas, accident scenes, roads damaged by disasters, temporary control sections for large-scale events, and mountainous roads without supporting facilities.
[0003] Drones can quickly reach the airspace above target roads and collect traffic video over a wide area from a top-down / oblique-view perspective, offering advantages such as mobility, flexibility, and rapid deployment. However, existing drone traffic video analysis solutions suffer from several technical shortcomings: (1) The image pixel distance of the UAV cannot be converted into the true measurement value of the road plane due to the distortion of the UAV image, hovering and drifting, gimbal attitude fluctuation and oblique projection. Traffic indicators such as vehicle speed, queue length and road occupation range cannot be accurately quantified. (2) Vehicle positioning often directly uses the center point of the detection frame without considering vehicle height and ground contact projection deviation. The trajectory has systematic offset, and the trajectory breaks severely in occlusion and jump scenarios. (3) Abnormal event determination relies solely on a single threshold constraint of vehicle speed, without linking multi-dimensional rules such as road area attributes, driving direction, duration, and spatial impact range. The output results lack structured handling information such as standardized road location, affected lane, and event confidence, and cannot directly support on-site traffic management command. Summary of the Invention
[0004] The purpose of this invention is to provide a road traffic perception and anomaly recognition method and system based on UAV vision, which realizes dynamic self-calibration correction of road plane in UAV oblique video, high-precision trajectory reconstruction of vehicle ground contact point, and multi-constraint rule fusion for traffic anomaly recognition, and outputs standardized traffic event data including location, impact range, duration, and confidence level.
[0005] To achieve the above objectives, this invention provides a road traffic perception and anomaly identification method based on UAV vision, comprising the following steps: Step S1: Synchronously collect UAV traffic video, video frame timestamps, and UAV pose data of the target road scene; perform lens distortion removal, static feature stabilization, and target road area cropping on the UAV traffic video to obtain the video frames to be analyzed. Step S2: Extract road geometric elements from the video frames to be analyzed, and remove falsely detected geometric features based on geometric continuity and parallel constraints; Step S3: Construct an initial homography mapping matrix from the image coordinate system to the road plane coordinate system based on the extracted road geometric feature points; dynamically update the homography mapping matrix according to the UAV pose change and the static background feature matching residual between frames to obtain the real-time mapping relationship for each frame; Step S4: Detect vehicle targets within the video frame to be analyzed frame by frame and distinguish vehicle categories. Construct cross-frame association cost by fusing vehicle appearance similarity, motion prediction position, lane area constraints, and vehicle category consistency. Use minimum cost matching to complete cross-frame vehicle tracking and generate a time sequence of vehicle targets with unique identifiers. Step S5: Determine the vehicle road grounding point based on the detection box or segmentation contour of the vehicle target, and use the real-time mapping matrix to project the pixel coordinates of the grounding point onto the road plane coordinate system. Perform filtering and smoothing, short-term occlusion interpolation completion, and abrupt coordinate removal on the projected coordinate sequence to generate a continuous vehicle spatiotemporal trajectory. Step S6: Calculate and quantify traffic operation status indicators based on vehicle spatiotemporal trajectories and road area division boundaries; Step S7: Integrate the quantitative traffic operation status indicators with road area rules, duration rules, trajectory direction rules, and spatial influence range rules to identify multiple types of abnormal road traffic events; Step S8: Output standardized structured traffic anomaly identification results. The standardized structured traffic anomaly identification results include event type, precise road location, spatial impact range, event duration, event identification confidence level, and unique identifier of associated vehicles.
[0006] Preferably, in step S1, static feature stabilization specifically involves: extracting static background feature points from adjacent video frames, removing feature points within the dynamic target areas of vehicles and pedestrians, solving the inter-frame background transformation matrix based on the remaining static feature points, and using the transformation matrix to complete video frame registration, thereby eliminating image shift caused by slight drone drift.
[0007] Preferably, in step S3, the initial homography mapping matrix satisfies the mapping formula: ; in, Image pixel coordinates, For road plane measurement coordinates, The initial homography matrix is 3×3. This is the scaling factor; The homography mapping matrix is updated dynamically using a recursive formula: ; in, This is the mapping matrix of the previous frame. This is the mapping correction matrix for this frame. This is the real-time effective mapping matrix for this frame; when the inter-frame background feature matching residual exceeds the calibrated residual threshold, or when the changes in the UAV's pitch angle, roll angle, and gimbal angle exceed the attitude threshold, a correction matrix is calculated. Complete the update of the homography mapping matrix.
[0008] Preferably, in step S5, the vehicle contact point is the center point of the bottom edge of the vehicle detection frame, the midpoint of the lower edge of the vehicle instance segmentation contour, or the tire contact key point; the calculation formula for projecting the contact point onto the road plane is: ; In the formula, For the first Vehicles in Homogeneous pixel coordinates of the frame ground point. This is the real-time mapping matrix for this frame. For vehicles The road plane coordinates corresponding to the frame This is the computational function for converting homogeneous coordinates to Cartesian plane coordinates; trajectory smoothing uses Kalman filtering or spline curve smoothing, and short-term occlusion is compensated for by linear interpolation based on historical speed and lane direction.
[0009] Preferably, in step S6, the quantitative traffic operation status indicators include vehicle instantaneous speed, vehicle continuous parking time, lane queue length, lane occupancy rate, low-speed vehicle ratio, and the angle between vehicle trajectory and lane reference direction. Vehicle instantaneous speed The calculation formula is as follows: ; In the formula, The time interval between adjacent video frames. The distance is the Euclidean distance in the road's planar coordinates. Continuous parking time of vehicles The calculation formula is as follows: ; In the formula, To preset the parking speed threshold, This is an indicator function; it takes the value 1 when the vehicle's instantaneous speed is below the parking threshold, and 0 otherwise. Lane queue length The calculation formula is as follows: ; In the formula, This represents the longitudinal plane coordinates of a low-speed or stationary vehicle along the centerline of the lane.
[0010] Preferably, the abnormal road traffic events identified in step S7 include abnormal parking, vehicles driving in the wrong direction, normal congestion and queuing, accidents blocking the road, the tail end of the queue in the construction zone, and overflow queues at intersections. Abnormal parking criteria: The vehicle is located in a no-parking lane or a controlled area at an intersection, and the continuous parking time of the vehicle exceeds the preset parking time threshold. Conditions for determining if a vehicle is traveling in the wrong direction: The angle between the vehicle's trajectory and the lane's reference direction is greater than a preset angle threshold, and the cumulative distance the vehicle travels in the opposite direction along the lane exceeds the reverse driving distance threshold. The criteria for determining overflow queuing at intersections are: the longitudinal coordinate of the low-speed vehicle queue crosses the road stop line and the boundary of the diversion zone, and the queue length exceeds the basic threshold of the road segment. Accident lane occupancy determination criteria: There are stationary vehicles in a single lane whose parking time exceeds the accident determination threshold, a continuous low-speed vehicle queue is formed upstream of the vehicles, and there are vehicle detouring trajectories in adjacent lanes.
[0011] Preferably, in step S8, the weighted calculation formula for event recognition confidence is as follows: ; In the formula, Preset weighting coefficients; The spatiotemporal trajectory continuity of the vehicle is scored; The credibility score of the road homography mapping matrix; Achieve satisfaction scores for multi-dimensional rule matching; Achieve a stable score for abnormal events across multiple frames; The precise location of a road is represented by its planar coordinates, GPS coordinates, road markers, lane numbers, or electronic map road segment markings; the spatial impact range is represented by the start and end planar coordinates of the abnormal road segment and the affected lane numbers.
[0012] Preferably, in step S2, the road geometric elements include lane lines, stop lines, curb lines, pedestrian crossings, guide lines, construction traffic cone sequences, and guardrail edges; the extraction process is as follows: semantic segmentation is performed on video frames to distinguish between road surfaces and geometric elements, endpoints, intersections, and direction vectors are extracted from linear elements, contour corner points are extracted from surface elements, and falsely detected geometric features are eliminated based on lane parallelism and standard lane width constraints.
[0013] The road traffic perception and anomaly recognition system based on UAV vision includes nine functional modules connected by sequential signals: UAV video acquisition module, video preprocessing module, road geometry extraction module, road plane mapping module, vehicle detection and tracking module, vehicle trajectory reconstruction module, traffic state index calculation module, abnormal event recognition module, and event output module. The drone video acquisition module is used to simultaneously acquire drone traffic videos, video frame timestamps, and raw drone pose data; The video preprocessing module is used to perform video lens distortion correction, static feature stabilization, target road area cropping, and output video frames to be analyzed. The road geometry extraction module is used to extract road geometric features and filter out false detection features; The road plane mapping module is used to construct an initial homography mapping matrix and dynamically correct the mapping matrix frame by frame to obtain the real-time mapping relationship; The vehicle detection and tracking module is used for vehicle detection and classification, cross-frame target matching, and generating a time sequence of vehicle targets with unique identifiers. The vehicle trajectory reconstruction module is used to determine the vehicle's grounding point, project it onto the road plane coordinate system, and smoothly complete and generate a continuous vehicle spatiotemporal trajectory. The traffic status index calculation module is used to calculate and quantify traffic operation status indicators in batches based on vehicle spatiotemporal trajectories. The abnormal event identification module is used to integrate four types of rules: road area, duration, trajectory direction, and spatial impact range to identify various abnormal road traffic events. The event output module is used to calculate the event recognition confidence level, encapsulate and output standardized structured traffic anomaly recognition results.
[0014] Therefore, the present invention employs the above-described road traffic perception and anomaly recognition method and system based on UAV vision, which has the following advantages: (1) This invention relies on road geometric elements to complete the self-calibration of calibration points without human intervention. At the same time, it dynamically corrects the homography matrix based on the UAV pose and inter-frame background features to solve the projection deviation caused by UAV drift and gimbal jitter, and realizes accurate road plane measurement of oblique UAV video. (2) Instead of the traditional detection frame center positioning method, the vehicle ground contact point projection is used to match the actual road contact position. Combined with Kalman filtering and road constraint smoothing, the trajectory breakage and jump problem is repaired, and the accuracy of vehicle spatiotemporal trajectory is greatly improved. (3) It integrates four rules of road area, duration, driving direction and spatial range to jointly determine anomalies and avoids misidentification of single speed threshold; it outputs structured data including coordinates, lane, station number, confidence level and affected section, which can be directly connected to the traffic command and dispatch platform.
[0015] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0016] Figure 1 This is an overall flowchart of the road traffic perception and anomaly identification method based on UAV vision in an embodiment of the present invention; Figure 2 This is a schematic diagram of the road geometry self-calibration and dynamic correction process of the mapping matrix in an embodiment of the present invention; Figure 3 This is a schematic diagram of the vehicle grounding point projection and spatiotemporal trajectory reconstruction process in an embodiment of the present invention; Figure 4 This is a flowchart of multi-rule fusion abnormal event identification and result output in an embodiment of the present invention. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0018] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0019] Example like Figures 1-4 As shown in the figure, this embodiment proposes a road traffic perception and anomaly recognition method based on UAV vision. The specific implementation steps are as follows: Step S1: Synchronous acquisition of multi-source data and video preprocessing: The drone hovers / cruises at low speed to collect visible light video of the target road, and the onboard flight controller simultaneously outputs the timestamp and aircraft + gimbal pose data for each frame; preprocessing includes three steps: (1) Lens distortion correction: Substitute camera intrinsic parameters to eliminate radial and tangential distortion of wide-angle lenses; (2) Static feature stabilization: Extract SIFT static feature points between frames and remove feature points in dynamic target areas such as vehicles and pedestrians; solve the inter-frame transformation matrix based on the remaining static feature points to complete video frame registration and eliminate the image shift caused by the small drift of the UAV; (3) Road area cropping: Based on the preset coordinate range, the video frames are cropped, and irrelevant sky and building areas are removed, leaving only the effective road images to obtain the video frames to be analyzed.
[0020] Step S2: Automatic extraction of road geometry features: Perform semantic segmentation on the video frames to be analyzed to distinguish road surface, lane lines, stop lines, guardrails, and cones; (1) Linear elements (lane lines, curbs, guardrails): extract the endpoints, intersections, and direction vectors of line segments, and filter out false short lines based on the constraints of parallel lane lines and fixed lane width; (2) Area / block features (stop line, pedestrian crossing, guide zone): extract contour corner points and boundary coordinates; (3) Construction cone sequence: Fit the cone distribution line as an auxiliary road boundary geometric feature; Output the set of road geometric feature points with pixel coordinates.
[0021] Step S3: Establishing and dynamically correcting the image-road plane mapping relationship: (1) Construction of the initial homography matrix: Matching image coordinates using road geometric feature points Road plane coordinates Construct the initial homography matrix Mapping formula: ; In the formula: These are the pixel coordinates of the image; Use the coordinates of the road plane. The initial homography matrix is 3×3; This is the scaling factor.
[0022] (2) Dynamic update of the mapping matrix: Real-time calculation of inter-frame background feature matching residuals, specifically the process is as follows: in the first frame... Frame and the After removing dynamic target areas such as vehicles and pedestrians from the frame, retain Group of static background feature matching point pairs, using the random sampling consensus algorithm to remove erroneous matching points, and solving for the result from the first group. Frame points to the first Inter-frame background transformation matrix of a frame .
[0023] make and They represent the first Group of static background feature points in the first Frame and the Two-dimensional pixel coordinates in a frame This represents the homogeneous coordinate normalization operation. Let denot be the robust cost function used to suppress the effects of outlier matching. Then, the inter-frame background transformation matrix is solved by the following formula: ; The set of interior points determined by the random sample consensus algorithm Calculate the root mean square reprojection residual of inter-frame background feature matching. : ; In the formula, The number of valid interior points; If the residual exceeds the preset calibration threshold, or the change in the UAV's pitch / roll / gimbal angle exceeds the attitude threshold, calculate the correction matrix. The effective mapping matrix of the current frame is updated using a recursive formula. : ; In the formula: This is the mapping matrix of the previous frame; This is the correction matrix for this frame; This is the real-time mapping matrix for this frame.
[0024] Step S4: Vehicle target detection, classification, and cross-frame tracking: (1) Frame-by-frame detection: The instance segmentation model is used to identify all vehicles in the frame, and to distinguish between passenger cars, trucks, buses and non-motorized vehicles; the vehicle target box, segmentation contour and vehicle category are output. (2) Construction of cross-frame association cost: The matching cost is calculated by combining four dimensions: cosine similarity of vehicle appearance features, distance of Kalman filter motion prediction position, lane constraint of vehicle location, and consistency of category between preceding and following frames; (3) Minimum cost matching: The Hungarian algorithm is used to match vehicles in the previous and next frames. A globally unique identifier is assigned to the same vehicle, and a vehicle target time sequence containing the identifier, category, outline and timestamp is generated.
[0025] Step S5: Vehicle grounding point projection and spatiotemporal trajectory reconstruction: (1) Determine the vehicle grounding point Take the midpoint of the lower edge of the vehicle segmentation contour as the first... vehicle Frame ground point pixel coordinates; (2) Road plane projection: Substitute into the mapping matrix of this frame Complete the coordinate transformation, projection formula: ; In the formula: for Homogeneous pixel coordinates of the vehicle grounding point in the frame; This is the mapping matrix for this frame; for Frame vehicle road plane coordinates; This is a calculation to convert homogeneous coordinates to Cartesian coordinates.
[0026] (3) Trajectory optimization processing: for continuous The sequence is smoothed using Kalman filtering; for coordinate missingness caused by short-term occlusion, linear interpolation based on historical speed and lane driving direction is used to complete the coordinates; abnormal jump coordinates with sudden distance changes are removed; finally, a continuous and unbroken vehicle spatiotemporal trajectory is generated.
[0027] Step S6: Calculation of traffic operation quantitative indicators: (1) Instantaneous speed of the vehicle : ; In the formula: The time interval between adjacent frames; The distance is the Euclidean distance in planar coordinates.
[0028] (2) Total parking time of the vehicle : ; In the formula: The parking speed threshold; This is an indicator function; it takes the value 1 when the speed is below the threshold and 0 otherwise. The total duration of continuous parking of the vehicle is obtained by summing these values.
[0029] (3) Lane queue length Extract the longitudinal coordinates of all low-speed / stationary vehicles along the lane centerline. The queue length is the difference between the maximum and minimum longitudinal coordinate values. .
[0030] In the formula, Longitudinal plane coordinates of low-speed or stationary vehicles along the centerline of the lane (4) Angle between the trajectory and the lane : ; In the formula: This is the vector representing the vehicle's trajectory and direction of movement. The lane's legal driving reference vector; included angle It indicates the degree of deviation of the vehicle from its driving direction.
[0031] (5) Simultaneously calculate lane occupancy rate and low-speed vehicle ratio. The specific calculation process is as follows: For the Each lane is defined as a polygon enclosed by its boundaries within the road's planar coordinate system, representing the statistical area. The lower edge of the vehicle instance segmentation contour, combined with the prior vehicle size, is projected onto the road plane to form a polygon representing the vehicle's ground occupancy. And the road grounding point will fall into the statistical area. The vehicles inside form a vehicle collection Current frame lane space occupancy rate Calculate using the following formula: ; In the formula, This function represents the area of the road surface region; the area occupied is calculated using the union of the polygons occupied by vehicles to avoid double counting when vehicle polygons overlap. The range of values is .
[0032] make Indicates the first Frame Lane The total number of vehicles inside, This indicates the preset low-speed threshold, which represents the percentage of low-speed vehicles. Calculate using the following formula: ; In the formula, For indicator functions; when When the molecule takes the value of 0, Take 0.
[0033] To suppress single-frame fluctuations in vehicle detection or speed estimation, in the context of... Calculate the average lane occupancy rate and the average proportion of slow-moving vehicles within a sliding window of each valid video frame: ; ; When the number of valid frames is insufficient at the beginning of the window When, the actual number of valid frames is used instead. Normalization is performed; when the area of the lane statistics region is 0 or the current frame mapping matrix is invalid, the lane's current frame index is marked as invalid and will not participate in the calculation of abnormal event rules.
[0034] Step S7: Multi-dimensional rule fusion for traffic anomaly event determination: (1) Determination of abnormal parking: The vehicle is located in a no-parking lane / intersection control area, and Parking exceeding the parking time threshold is identified as abnormal parking; (2) Determination of reverse movement: If the angle is greater than the threshold and the cumulative distance traveled along the opposite lane exceeds the reverse driving distance threshold, it is identified as driving in the wrong direction. (3) Congestion queuing / intersection overflow determination: lane queue length Exceeding the road segment threshold, or a low-speed vehicle queue crossing the stop line or the boundary of the diversion zone, are respectively identified as congestion queues or intersection overflow queues. (4) Accident lane occupation determination: If there are stationary vehicles in a single lane whose parking time exceeds the accident time threshold, and a continuous low-speed queue is formed upstream of the vehicles and a detour trajectory appears in the adjacent lane, it is identified as an accident lane occupation. (5) Determining the tail of the queue in the construction area: The construction boundary is defined by the sequence of traffic cones, and the tail position is calculated based on the longitudinal range of the vehicle queue upstream of the construction area to identify queuing events in the construction area.
[0035] Step S8: Structured event result output: (1) Event location: Represented by a combination of road plane coordinates, GPS coordinates, road station number, lane number, and electronic map road segment ID; (2) Scope of impact: Output the starting and ending plane coordinates of the abnormal road section and the number of the affected lanes; (3) Event recognition confidence Weighted calculation: ; In the formula: These are weighting coefficients; Scoring is given for the continuity of vehicle trajectory; The credibility of the road mapping matrix; To ensure that each rule meets the matching degree; To achieve stable and continuous scoring across multiple frames; For events to be evaluated ,make This is the set of vehicles associated with this event. To evaluate the set of frames, To evaluate the total number of frames, the four sub-scores are calculated separately according to the following process: ① Vehicle trajectory continuity score : make Indicates vehicle In the Whether the frame is within the theoretically visible range; if it is, set to 1, otherwise set to 0. Indicates vehicle Whether the current frame is successfully associated with the previous frame is determined by setting 1 if successful and 0 otherwise. To normalize the cross-frame correlation cost, If we consider the correlation cost attenuation scale, then: ; This formula simultaneously reflects the effective observation ratio of the trajectory and the stability of cross-frame matching; the more continuous the trajectory and the smaller the correlation cost, the better. The closer it is to 1.
[0036] ② Road mapping matrix credibility score : The inter-frame background feature matching residuals and the number of effective static feature points are jointly normalized for calculation: ; In the formula, The allowable scaling parameter for background matching residuals. The number of reference interior points required to ensure mapping stability; the smaller the residual and the more sufficient the effective interior points, The closer it is to 1.
[0037] ③ Each rule satisfies the matching score : Regarding the event The Item Continuity Judgment Quantity ,make For the corresponding rule threshold, For threshold transition scale, To determine the direction coefficient; when Not less than Indicates when the rule is satisfied ,when Not greater than Indicates when the rule is satisfied Then the single rule satisfaction degree for: ; For discrete topological rules such as whether a vehicle is within a controlled area and whether a queue has crossed the stop line, when satisfied... Take 1 if the condition is not met, and 0 if the condition is not met. Let For the first The non-negative importance weight of the rule, the total number of events included According to the item determination rule: ; In the formula, To prevent the use of a preset minimum positive number with a denominator of 0.
[0038] ④Stable and continuous score across multiple frames : make Indicates the first Does the frame satisfy the event? The value is 1 if all necessary conditions for determining the value are met, and 0 otherwise. The duration for which the event has continuously met the conditions. Given the reference duration for this event type, then: ; This formula simultaneously characterizes the stability ratio of rule decisions within the evaluation window and the duration of events.
[0039] (4) Unified output data packets: event type, road location, scope of impact, duration, confidence level, and unique identifier of the vehicle involved.
[0040] The road traffic perception and anomaly recognition system based on UAV vision provided in this embodiment is equipped with a UAV gimbal camera and an onboard edge computing unit on the hardware side; the software side is divided into nine logical modules, with unidirectional data flow between modules: UAV video acquisition module: The camera acquires video streams, the flight control unit synchronously transmits the pose and timestamp back, and the data is packaged and transmitted to the preprocessing module; Video preprocessing module: performs distortion correction, static feature stabilization, road cropping, and outputs standardized frame images; Road geometry extraction module: Semantic segmentation extracts geometric features such as lane lines, stop lines, and cones, and filters out false detection points; Road plane mapping module: The initial homography matrix is solved based on geometric features, and the mapping matrix is corrected in real time according to the pose and background residual; Vehicle detection and tracking module: Detects vehicles by instance segmentation, assigns unique IDs through multi-cost cross-frame matching, and outputs vehicle time sequence; Vehicle trajectory reconstruction module: calculates the grounding point, projects it onto the road plane, and filters and completes it to generate a continuous spatiotemporal trajectory; Traffic condition index calculation module: Based on the trajectory, batch calculation of quantitative indicators such as speed, parking time, queue length, and direction angle; Anomaly detection module: Loads four types of judgment rules: road area, duration, direction, and space, and matches indicators to identify various traffic anomalies; Event output module: Calculates event recognition confidence, encapsulates structured event data, and pushes it to the traffic dispatch platform and local storage unit.
[0041] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.
Claims
1. A road traffic perception and anomaly identification method based on UAV vision, characterized in that, Includes the following steps: Step S1: Synchronously collect UAV traffic video, video frame timestamps, and UAV pose data of the target road scene; perform lens distortion removal, static feature stabilization, and target road area cropping on the UAV traffic video to obtain the video frames to be analyzed. Step S2: Extract road geometric elements from the video frames to be analyzed, and remove falsely detected geometric features based on geometric continuity and parallel constraints; Step S3: Construct an initial homography mapping matrix from the image coordinate system to the road plane coordinate system based on the extracted road geometric feature points; dynamically update the homography mapping matrix according to the UAV pose change and the static background feature matching residual between frames to obtain the real-time mapping relationship for each frame; Step S4: Detect vehicle targets within the video frame to be analyzed frame by frame and distinguish vehicle categories. Construct cross-frame association cost by fusing vehicle appearance similarity, motion prediction position, lane area constraints, and vehicle category consistency. Use minimum cost matching to complete cross-frame vehicle tracking and generate a time sequence of vehicle targets with unique identifiers. Step S5: Determine the vehicle road grounding point based on the detection box or segmentation contour of the vehicle target, and use the real-time mapping matrix to project the pixel coordinates of the grounding point onto the road plane coordinate system. Perform filtering and smoothing, short-term occlusion interpolation completion, and abrupt coordinate removal on the projected coordinate sequence to generate a continuous vehicle spatiotemporal trajectory. Step S6: Calculate and quantify traffic operation status indicators based on vehicle spatiotemporal trajectories and road area division boundaries; Step S7: Integrate the quantitative traffic operation status indicators with road area rules, duration rules, trajectory direction rules, and spatial influence range rules to identify multiple types of abnormal road traffic events; Step S8: Output standardized structured traffic anomaly identification results. The standardized structured traffic anomaly identification results include event type, precise road location, spatial impact range, event duration, event identification confidence level, and unique identifier of associated vehicles.
2. The road traffic perception and anomaly identification method based on UAV vision according to claim 1, characterized in that: In step S1, static feature stabilization specifically involves: extracting static background feature points from adjacent video frames, removing feature points within the dynamic target areas of vehicles and pedestrians, solving the inter-frame background transformation matrix based on the remaining static feature points, and using the transformation matrix to complete video frame registration, thereby eliminating image shift caused by slight drone drift.
3. The road traffic perception and anomaly identification method based on UAV vision according to claim 2, characterized in that: In step S3, the initial homography mapping matrix satisfies the mapping formula: ; in, Image pixel coordinates, For road plane measurement coordinates, The initial homography matrix is 3×3. This is the scaling factor; The homography mapping matrix is updated dynamically using a recursive formula: ; in, This is the mapping matrix of the previous frame. This is the mapping correction matrix for this frame. This is the real-time effective mapping matrix for this frame; when the inter-frame background feature matching residual exceeds the calibrated residual threshold, or when the changes in the UAV's pitch angle, roll angle, and gimbal angle exceed the attitude threshold, a correction matrix is calculated. Complete the update of the homography mapping matrix.
4. The road traffic perception and anomaly identification method based on UAV vision according to claim 3, characterized in that: In step S5, the vehicle contact point is the center point of the bottom edge of the vehicle detection frame, the midpoint of the lower edge of the vehicle instance segmentation contour, or the tire contact key point; the calculation formula for projecting the contact point onto the road plane is: ; In the formula, For the first Vehicles in Homogeneous pixel coordinates of the frame ground point. This is the real-time mapping matrix for this frame. For vehicles The road plane coordinates corresponding to the frame This is the computational function for converting homogeneous coordinates to Cartesian plane coordinates; trajectory smoothing uses Kalman filtering or spline curve smoothing, and short-term occlusion is compensated for by linear interpolation based on historical speed and lane direction.
5. The road traffic perception and anomaly identification method based on UAV vision according to claim 4, characterized in that: In step S6, the quantitative traffic operation status indicators include vehicle instantaneous speed, vehicle continuous parking time, lane queue length, lane occupancy rate, low-speed vehicle ratio, and the angle between vehicle trajectory and lane reference direction. Vehicle instantaneous speed The calculation formula is as follows: ; In the formula, The time interval between adjacent video frames. The distance is the Euclidean distance in the road's planar coordinates. Continuous parking time of vehicles The calculation formula is as follows: ; In the formula, To preset the parking speed threshold, This is an indicator function; it takes the value 1 when the vehicle's instantaneous speed is below the parking threshold, and 0 otherwise. Lane queue length The calculation formula is as follows: ; In the formula, This represents the longitudinal plane coordinates of a low-speed or stationary vehicle along the centerline of the lane.
6. The road traffic perception and anomaly identification method based on UAV vision according to claim 5, characterized in that: The abnormal road traffic events identified in step S7 include abnormal parking, vehicles driving in the wrong direction, regular congestion and queuing, accidents blocking lanes, construction zone queues, and overflow queues at intersections. Abnormal parking criteria: The vehicle is located in a no-parking lane or a controlled area at an intersection, and the continuous parking time of the vehicle exceeds the preset parking time threshold. Conditions for determining if a vehicle is traveling in the wrong direction: The angle between the vehicle's trajectory and the lane's reference direction is greater than a preset angle threshold, and the cumulative distance the vehicle travels in the opposite direction along the lane exceeds the reverse driving distance threshold. The criteria for determining overflow queuing at intersections are: the longitudinal coordinate of the low-speed vehicle queue crosses the road stop line and the boundary of the diversion zone, and the queue length exceeds the basic threshold of the road segment. Accident lane occupancy determination criteria: There are stationary vehicles in a single lane whose parking time exceeds the accident determination threshold, a continuous low-speed vehicle queue is formed upstream of the vehicles, and there are vehicle detouring trajectories in adjacent lanes.
7. The road traffic perception and anomaly identification method based on UAV vision according to claim 6, characterized in that: In step S8, the weighted calculation formula for event recognition confidence is as follows: ; In the formula, Preset weighting coefficients; The spatiotemporal trajectory continuity of the vehicle is scored; The credibility score of the road homography mapping matrix; Achieve satisfaction scores for multi-dimensional rule matching; Achieve a stable score for abnormal events across multiple frames; The precise location of a road is represented by its planar coordinates, GPS coordinates, road markers, lane numbers, or electronic map road segment markings; the spatial impact range is represented by the start and end planar coordinates of the abnormal road segment and the affected lane numbers.
8. The road traffic perception and anomaly identification method based on UAV vision according to claim 1, characterized in that: In step S2, the road geometric elements include lane lines, stop lines, curb lines, pedestrian crossings, guide lines, construction traffic cone sequences, and guardrail edges. The extraction process is as follows: semantic segmentation is performed on video frames to distinguish between road surfaces and geometric elements; endpoints, intersections, and direction vectors are extracted from linear elements; contour corner points are extracted from planar elements; and falsely detected geometric features are eliminated based on lane parallelism and standard lane width constraints.
9. A road traffic perception and anomaly recognition system based on UAV vision, used to implement the road traffic perception and anomaly recognition method based on UAV vision as described in any one of claims 1-8, characterized in that, It includes nine functional modules that are connected by sequential signals: UAV video acquisition module, video preprocessing module, road geometry extraction module, road plane mapping module, vehicle detection and tracking module, vehicle trajectory reconstruction module, traffic state index calculation module, abnormal event recognition module, and event output module; The drone video acquisition module is used to simultaneously acquire drone traffic videos, video frame timestamps, and raw drone pose data; The video preprocessing module is used to perform video lens distortion correction, static feature stabilization, target road area cropping, and output video frames to be analyzed. The road geometry extraction module is used to extract road geometric features and filter out false detection features; The road plane mapping module is used to construct an initial homography mapping matrix and dynamically correct the mapping matrix frame by frame to obtain the real-time mapping relationship; The vehicle detection and tracking module is used for vehicle detection and classification, cross-frame target matching, and generating a time sequence of vehicle targets with unique identifiers. The vehicle trajectory reconstruction module is used to determine the vehicle's grounding point, project it onto the road plane coordinate system, and smoothly complete and generate a continuous vehicle spatiotemporal trajectory. The traffic status index calculation module is used to calculate and quantify traffic operation status indicators in batches based on vehicle spatiotemporal trajectories. The abnormal event identification module is used to integrate four types of rules: road area, duration, trajectory direction, and spatial impact range to identify various abnormal road traffic events. The event output module is used to calculate the event recognition confidence level, encapsulate and output standardized structured traffic anomaly recognition results.