Traffic accident intelligent detection and response method and system based on video images
By constructing a 3D depth map of the road scene and using moving target separation technology, combined with a traffic signal control system, intelligent detection and emergency response to traffic accidents have been achieved. This solves the problems of low recognition accuracy and weak linkage in existing technologies, and improves the accuracy of detection and the timeliness of response.
Patent Information
- Application Number
- CN202511469042.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-15
- Publication Date
- 2025-11-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing traffic accident detection technologies based on video images have low accuracy in complex road conditions and severe weather, high false alarm and false negative rates, lack a deep understanding of the scene after an accident, make it difficult to assess the severity of the accident and provide targeted emergency responses, and are not closely linked with traffic management systems.
By constructing a 3D depth map of the road scene, separating moving targets, calculating motion characteristic parameters to determine the degree of anomaly, generating emergency response plans, and linking with the traffic signal control system, intelligent processing of the entire process from accident detection to emergency response is achieved.
It has improved the accuracy and timeliness of traffic accident detection, reduced the workload of manual monitoring, significantly shortened accident response time, reduced road congestion and the risk of secondary accidents, and improved the level of urban traffic safety management.
Smart Images

Figure CN120932187A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of traffic safety monitoring technology, and in particular to a method and system for intelligent detection and response to traffic accidents based on video images. Background Technology
[0002] With the acceleration of urbanization and the rapid increase in the number of motor vehicles, traffic accidents have become a significant challenge in modern traffic management. Traffic accidents not only cause injuries and property damage but also trigger traffic congestion, impacting urban operational efficiency. Traditional traffic accident detection relies primarily on manual alarms and monitoring, methods plagued by slow response times and inaccurate information. In recent years, with the development of computer vision and artificial intelligence technologies, automatic traffic accident detection technology based on video images has gradually emerged. By analyzing video footage captured by surveillance cameras in real time, abnormal traffic situations can be quickly identified, allowing for timely responses.
[0003] Existing video image-based traffic accident detection technologies suffer from the following shortcomings: Most existing systems have low accuracy in identifying accidents under complex road conditions and adverse weather conditions, and are easily affected by factors such as changes in lighting, shadows, rain, and snow, leading to high false alarm and false negative rates. Current technologies generally lack a deep understanding of the post-accident scene, making it difficult to accurately assess the severity of the accident and provide corresponding handling suggestions, resulting in a lack of targeted and effective emergency response. Existing accident detection systems are not closely integrated with traffic management systems; they cannot automatically adjust traffic signal control strategies after an accident is detected, hindering rapid traffic flow and priority passage for emergency vehicles in the accident area, thus delaying rescue time. Summary of the Invention
[0004] The embodiments of the present invention provide a method and system for intelligent detection and response to traffic accidents based on video images, which can at least solve some of the problems existing in the prior art.
[0005] A first aspect of this invention provides a method for intelligent detection and response to traffic accidents based on video images, comprising: Acquire real-time video image data collected by traffic monitoring cameras, and segment the real-time video image data into a continuous sequence of image frames; The continuous image frame sequence is enhanced to construct a three-dimensional depth map of the road scene, and the moving target as the foreground is separated based on the three-dimensional depth map; The motion feature parameters of the moving target are calculated based on adjacent image frames. The degree of abnormality of the motion state of the moving target is determined based on the motion feature parameters. When the degree of abnormality of the motion state meets the accident determination conditions, it is determined that a traffic accident has occurred. In the event of a traffic accident, the dynamic scene features of the accident area are calculated based on the motion characteristic parameters of the moving target and the degree of abnormality of the motion state. The accident level is determined based on the dynamic scene features, and a corresponding emergency response plan is generated. Based on the accident level and the emergency response plan, accident notification data is sent to the traffic management system, and a signal switching command is sent to the traffic signal controller in the accident area. The execution of the signal switching command yields the traffic control implementation result.
[0006] The continuous image frame sequence is enhanced to construct a 3D depth map of the road scene, and moving targets as foreground objects are separated based on the 3D depth map, including: The adjacent image frames in the continuous image frame sequence are registered in the time dimension to generate a registered image sequence. Histogram equalization is performed on the registered image sequence to extract image texture features and image edge features from the registered image sequence; Based on the image texture features and the image edge features, a depth estimation mapping relationship is determined, texture depth weights and edge depth weights are generated, and a depth fusion matrix is generated according to the nonlinear combination of the texture depth weights and the edge depth weights; Based on the deep fusion matrix, the registered image sequence is converted into a three-dimensional depth map of the road scene. The three-dimensional depth map of the road scene is then processed in layers, and the three-dimensional depth map of the road scene is divided into multiple depth layers according to the depth values in the three-dimensional depth map of the road scene. The depth gradient of the image patch is calculated within each depth layer. Based on the depth gradient, a continuity analysis is performed to determine the depth layer position of the foreground target. The image region corresponding to the depth layer position of the foreground target is extracted as the moving target.
[0007] Motion feature parameters of the moving target are calculated based on adjacent image frames. The degree of abnormality of the moving target's motion state is determined based on the motion feature parameters. When the degree of abnormality of the motion state meets the accident determination criteria, a traffic accident is determined to have occurred, including: Obtain the position coordinates of a moving target in adjacent image frames, calculate the motion feature parameters of the moving target based on the position coordinates, and project the motion feature parameters onto the road coordinate system to obtain the motion feature parameters in the road coordinate system. Obtain the normal driving reference value of the moving target in the road coordinate system, calculate the deviation value between the motion characteristic parameters in the road coordinate system and the normal driving reference value, and construct an abnormal motion state measurement index based on the deviation value; Spatial cluster analysis is performed on the motion state anomaly measurement index to obtain the cluster center of the anomaly measurement index of the surrounding vehicles based on the distribution of the anomaly measurement index of the surrounding vehicles. Calculate multiple spatial correlation features between the anomaly measurement index of the moving target and the cluster center of the anomaly measurement index, and determine the accident risk level of the moving target based on the combination relationship of the multiple spatial correlation features; A traffic accident determination result is generated based on the degree of accident risk, and the traffic accident determination result indicates whether a traffic accident has occurred.
[0008] Calculate multiple spatial correlation features between the anomaly metrics of the moving target and the cluster centers of the anomaly metrics, and determine the accident risk level of the moving target based on the combination relationship of the multiple spatial correlation features, including: Calculate the spatial distance correlation, motion direction correlation, and temporal change correlation between the moving target and the cluster center of the anomaly metric index; The spatial distance correlation, the motion direction correlation, and the temporal change correlation are grouped according to the spatiotemporal dimension to obtain the time dimension correlation group and the spatial dimension correlation group. Calculate the gradient rate of change between adjacent correlation features in the time dimension correlation group, and calculate the distance rate of change between adjacent correlation features in the spatial dimension correlation group. Determine the combined weight of the correlation features within each group based on the gradient rate of change and the distance rate of change. Based on the combined weights, the correlation features within each group are progressively combined to obtain weighted spatiotemporal dimension combined features, and a multi-layer spatiotemporal feature sequence is generated based on the weighted spatiotemporal dimension combined features. The correlation coefficients between adjacent spatiotemporal dimensions in the multi-layer spatiotemporal feature sequence are extracted, and the accident risk level of the moving target is determined based on the transmission relationship of the correlation coefficients.
[0009] In the event of a traffic accident, the dynamic scene features of the accident area are calculated based on the motion characteristic parameters of the moving target and the degree of abnormality in its motion state. Based on these dynamic scene features, the accident level is determined, and a corresponding emergency response plan is generated, including: In the event that a traffic accident has been determined, traffic flow parameters of the accident area are calculated based on the motion characteristic parameters of the moving target. The connectivity and propagation impedance between various road segments within the accident area are calculated based on the degree of abnormality in the motion state, and the congestion diffusion parameters of the accident area are calculated based on the connectivity and propagation impedance. The traffic flow parameters are used to calculate the capacity loss ratio of each road segment within the accident area, and the congestion diffusion probability of each road segment within the accident area is calculated based on the congestion diffusion parameters. The dynamic scene characteristics of the accident area are determined based on the capacity loss ratio and the congestion diffusion probability. Based on the dynamic scene characteristics, the accident area is divided into multiple sub-areas, the traffic flow loss degree characteristics and congestion spread trend characteristics in each sub-area are determined, and the accident level is determined based on the traffic flow loss degree characteristics and congestion spread trend characteristics among the multiple sub-areas. An emergency response plan is generated based on the accident level.
[0010] Based on the dynamic scene characteristics, the accident area is divided into multiple sub-regions. The traffic flow loss degree characteristics and congestion spread trend characteristics within each sub-region are determined. The accident level is then determined based on the traffic flow loss degree characteristics and congestion spread trend characteristics among the multiple sub-regions, including: Based on the dynamic scene features, a road network topology map of the accident area is constructed, and the dynamic scene features are mapped to each road segment node of the road network topology map; A multidimensional connection matrix is determined based on the road segment nodes. The multidimensional connection matrix is then decomposed to obtain the connectivity strength between road segments. Based on the connectivity strength, the accident area is divided into multiple sub-regions. The characteristics of traffic flow loss and congestion spread trend in each sub-region are extracted to obtain a feature vector sequence, and the autocorrelation coefficient and cross-correlation coefficient of the feature vector sequence are determined. Determine the differences in traffic flow loss characteristics and congestion spread trend characteristics between adjacent sub-regions, and generate a characteristic difference transmission chain based on the transmission relationship between the autocorrelation coefficient and the cross-correlation coefficient, in ascending order of spatial distance; The attenuation coefficient and evolution period of the feature difference transmission chain at different distance scales are extracted, and the accident level is determined based on the attenuation coefficient and the evolution period.
[0011] Based on the accident level and the emergency response plan, accident notification data is sent to the traffic management system, and a signal switching command is sent to the traffic signal controller in the accident area. The execution of the signal switching command yields the traffic control implementation results, including: Based on the accident level, the transmission priority of the accident notification data is determined, and the accident notification data with the specified transmission priority is sent to the traffic management system. Based on the signal timing adjustment parameters in the emergency response plan and the transmission priority, a multi-level signal timing adjustment strategy is determined. The multi-level signal timing adjustment strategy is optimized based on the accident location coordinates in the accident notification data, and a signal switching instruction is generated. Based on the traffic control area division in the emergency response plan and the control area range in the accident notification data, multiple signal control sub-regions are determined, and the strength of the coordination relationship between signal controllers in each signal control sub-region is calculated. The signal switching instructions are grouped according to the strength of the cooperation relationship, and the corresponding signal switching instructions are sent to each signal control sub-region according to the strength of the cooperation relationship. Collect traffic operation status data after executing the signal switching command, and determine the traffic control implementation result based on the traffic operation status data.
[0012] A second aspect of the present invention provides a traffic accident intelligent detection and response system based on video images, comprising: The first unit is used to acquire real-time video image data collected by traffic monitoring cameras and to segment the real-time video image data into a continuous sequence of image frames. The second unit is used to enhance the continuous image frame sequence, construct a three-dimensional depth map of the road scene, and separate the moving target as the foreground based on the three-dimensional depth map; The third unit is used to calculate the motion feature parameters of the moving target based on adjacent image frames, determine the degree of abnormality of the motion state of the moving target based on the motion feature parameters, and determine that a traffic accident has occurred when the degree of abnormality of the motion state meets the accident determination conditions. The fourth unit is used to calculate the dynamic scene features of the accident area based on the motion characteristic parameters of the moving target and the degree of abnormality of the motion state when a traffic accident is determined to have occurred, determine the accident level based on the dynamic scene features, and generate a corresponding emergency response plan. The fifth unit is used to send accident notification data to the traffic management system according to the accident level and the emergency response plan, and to send a signal switching command to the traffic signal controller in the accident area, and execute the signal switching command to obtain the traffic control implementation result.
[0013] A third aspect of the present invention provides an electronic device, comprising: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.
[0014] A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.
[0015] This invention provides a video image-based intelligent detection and response method for traffic accidents, which enables real-time and accurate detection and judgment of traffic accidents, effectively reducing the workload of manual monitoring and improving the accuracy and timeliness of traffic accident detection.
[0016] This invention combines deep learning and computer vision technologies to construct a 3D depth map of a road scene and separate moving targets. By analyzing the abnormal state of moving targets, it automatically identifies traffic accidents, avoiding the problem of being easily affected by environmental factors such as weather and lighting in traditional methods, and improving the stability and reliability of the system in complex scenarios.
[0017] This invention automatically generates emergency response plans based on accident levels and links them with traffic signal control systems, realizing intelligent processing of the entire process from accident detection to emergency response. This significantly shortens accident response time, reduces road congestion and the risk of secondary accidents caused by traffic accidents, and has important value for improving the level of urban traffic safety management. Attached Figure Description
[0018] Figure 1 This is a flowchart illustrating the intelligent detection and response method for traffic accidents based on video images, according to an embodiment of the present invention.
[0019] Figure 2 This is a schematic diagram of the process for determining a moving target according to an embodiment of the present invention. Detailed Implementation
[0020] 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 embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] The technical solution of the present invention will be described in detail below with reference to specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0022] Figure 1 This is a flowchart illustrating the intelligent traffic accident detection and response method based on video images, according to an embodiment of the present invention. Figure 1 As shown, the method includes: Acquire real-time video image data collected by traffic monitoring cameras, and segment the real-time video image data into a continuous sequence of image frames; The continuous image frame sequence is enhanced to construct a three-dimensional depth map of the road scene, and the moving target as the foreground is separated based on the three-dimensional depth map; The motion feature parameters of the moving target are calculated based on adjacent image frames. The degree of abnormality of the motion state of the moving target is determined based on the motion feature parameters. When the degree of abnormality of the motion state meets the accident determination conditions, it is determined that a traffic accident has occurred. In the event of a traffic accident, the dynamic scene features of the accident area are calculated based on the motion characteristic parameters of the moving target and the degree of abnormality of the motion state. The accident level is determined based on the dynamic scene features, and a corresponding emergency response plan is generated. Based on the accident level and the emergency response plan, accident notification data is sent to the traffic management system, and a signal switching command is sent to the traffic signal controller in the accident area. The execution of the signal switching command yields the traffic control implementation result.
[0023] First, real-time video image data from traffic monitoring cameras is acquired. This can be achieved through standard video streaming protocols such as RTSP or HTTP, supporting various video input resolutions, including 720p, 1080p, and 4K. Taking 1080p resolution as an example, a 30fps video stream can be received, with each frame measuring 1920×1080 pixels and having a color depth of 24 bits. The acquired video data is temporarily stored in system memory for subsequent processing.
[0024] The acquired real-time video image data is segmented into a continuous sequence of image frames. A buffering technique is used to extract each frame from the video stream and sort them by timestamp. In a specific instance, 30 frames are processed per second, with each frame assigned a unique timestamp and sequence number. The segmented image frames are temporarily stored in a lossless compression format to maintain the original image quality. A sliding window mechanism is used to retain the image frame data from the most recent 10 seconds for analysis and processing.
[0025] Enhancement processing is performed on a continuous sequence of image frames, including image denoising, illumination equalization, and contrast adjustment. Denoising employs a bilateral filtering algorithm to effectively remove noise while preserving edge information. Illumination equalization utilizes adaptive histogram equalization to enhance image details in low-light environments. Contrast adjustment is based on image histogram analysis, adjusting pixel distribution to make key areas clearer. The enhanced image has higher clarity and richer details, facilitating subsequent processing.
[0026] After enhancement processing, a 3D depth map of the road scene is constructed. Multi-view geometry techniques are employed to estimate scene depth by analyzing disparity information between consecutive frames. A feature point matching algorithm is used to identify feature points in the image, tracking their positional changes across consecutive frames. The depth values of each point in the scene are then calculated in conjunction with camera parameters. In practical applications, the depth estimation accuracy for static structures such as road surfaces, guardrails, and traffic signs can reach ±0.5 meters, providing accurate spatial references for subsequent target separation.
[0027] Based on the constructed 3D depth map, moving targets as foreground objects are separated using a combination of background subtraction and depth thresholding. First, a background model is built, and static parts of the scene are identified through long-term observation. When a new image frame arrives, moving regions are initially identified by comparing the current frame with the background model. Depth information is then used to further filter out false positives caused by factors such as changes in lighting and shadows. The final moving targets include traffic participants such as vehicles and pedestrians. A unique identifier is assigned to each detected moving target to facilitate cross-frame tracking and analysis.
[0028] Motion feature parameters of moving targets are calculated based on adjacent image frames. A target tracking algorithm is used to calculate the positional change of each target between consecutive frames, extracting motion features such as velocity, acceleration, and direction. Velocity is calculated based on the ratio of the target's positional change to the inter-frame time interval, and acceleration is calculated using the rate of change of velocity. Direction features are represented by the angle of the displacement vector. The rate of change of the target's rotation angle is also calculated to detect abnormal vehicle steering behavior. In a specific example, a normally traveling vehicle travels at approximately 40-60 km / h, with an acceleration range of ±2 m / s², and a rate of change of direction of less than 5 degrees / s.
[0029] Based on the extracted motion feature parameters, the degree of abnormality in the motion state of the moving target is determined, and a normal behavior model is established, including the standard motion patterns of various vehicles under different road conditions. An anomaly score is calculated by comparing the actual motion characteristics of the target with the model's prediction. Four key anomaly features are considered: rapid deceleration (deceleration greater than 8 m / s²), sudden deviation from the driving path (rate of change of direction greater than 30 degrees / s), abnormal stillness (the vehicle suddenly stops within the lane for more than 5 seconds), and collision features (two targets overlapping spatially with a sudden change in speed). When the anomaly score exceeds a preset threshold (e.g., 0.75), the accident determination criteria are met, and a traffic accident is confirmed.
[0030] In the event of a confirmed traffic accident, dynamic scene features of the accident area are calculated based on the motion characteristic parameters of moving targets and the degree of abnormality in their motion state. These features include the accident location, the number of vehicles involved, vehicle types, collision direction, and collision intensity. The location is determined using the geographic coordinates of the vehicles involved, accurate to the lane level. The number and type of vehicles involved are obtained through target recognition results. The collision direction is calculated by analyzing the trajectories of the vehicles before the collision. The collision intensity is estimated based on speed changes and vehicle deformation. The post-accident vehicle distribution is also analyzed to assess the extent of the impact on traffic flow.
[0031] Based on the dynamic scene characteristics calculated by the system, the accident level is determined and a corresponding emergency response plan is generated. The accident levels are divided into four categories: minor, moderate, severe, and extremely severe. Minor accidents are characterized by low-speed collisions (speed change less than 20 km / h), no obvious vehicle deformation, and the vehicles involved do not occupy the main lanes. Moderate accidents are characterized by medium-speed collisions (speed change 20-40 km / h), partial vehicle deformation, and obstruction of 1-2 lanes. Severe accidents are characterized by high-speed collisions (speed change 40-70 km / h), severe vehicle deformation, obstruction of multiple lanes, or traffic congestion. Extremely severe accidents are characterized by extremely high-speed collisions (speed change greater than 70 km / h), complete vehicle deformation, multi-vehicle pile-up collisions, or the involvement of hazardous materials vehicles.
[0032] For each accident level, a targeted emergency response plan is generated, including traffic control strategies, suggestions for allocating rescue resources, and information dissemination content. Taking a general accident as an example, the emergency response plan includes: implementing partial lane control, adjusting traffic lights at nearby intersections to flashing yellow mode, dispatching one rescue vehicle and one police car from the nearest location, estimating a cleanup time of 30 minutes, and suggesting detour routes for vehicles. The plan generation takes into account various factors such as the accident situation, road conditions, and traffic flow to ensure that the control measures are precise and effective.
[0033] Based on the determined accident level and the generated emergency response plan, accident notification data is sent to the traffic management system. This notification data uses standardized XML or JSON format and includes core information such as the accident time, location, level, vehicle information, scene images, and estimated cleanup time. Data transmission is conducted through an encrypted channel to ensure information security. Upon receiving the notification, the traffic management system automatically generates an accident record and notifies relevant departments according to preset rules.
[0034] Simultaneously, a signal switching command is sent to the traffic signal controllers in the accident area. This command is generated based on the traffic control strategy in the emergency response plan and transmitted via a dedicated control network. The command includes the switching mode (e.g., emergency mode, traffic diversion mode), signal timing adjustment parameters for each direction, and implementation duration. In one specific example, the command instructs traffic lights within 500 meters upstream of the accident site to extend their green light time, reducing traffic converging on the accident area; simultaneously, it instructs surrounding intersections to increase the green light time for detour routes, diverting traffic flow.
[0035] Traffic signal controllers execute received signal switching commands to implement traffic control. The controllers adjust signal timing schemes according to the commands and provide feedback on the execution status. The traffic management system continuously monitors traffic flow changes and evaluates the effectiveness of the control measures. By calculating indicators such as changes in the number of vehicles, average speed, and queue length within the controlled area, it generates a traffic control implementation result report. These results are used to optimize control strategies and are adjusted multiple times during accident handling until traffic returns to normal.
[0036] The above technical solutions utilize intelligent video analytics to achieve automatic detection, assessment, and emergency response to traffic accidents, thereby improving traffic management efficiency, reducing the traffic impact of accidents, and providing strong support for intelligent transportation systems.
[0037] In one optional implementation, the continuous image frame sequence is enhanced to construct a three-dimensional depth map of the road scene, and moving targets as foreground objects are separated based on the three-dimensional depth map, including: The adjacent image frames in the continuous image frame sequence are registered in the time dimension to generate a registered image sequence. Histogram equalization is performed on the registered image sequence to extract image texture features and image edge features from the registered image sequence; Based on the image texture features and the image edge features, a depth estimation mapping relationship is determined, texture depth weights and edge depth weights are generated, and a depth fusion matrix is generated according to the nonlinear combination of the texture depth weights and the edge depth weights; Based on the deep fusion matrix, the registered image sequence is converted into a three-dimensional depth map of the road scene. The three-dimensional depth map of the road scene is then processed in layers, and the three-dimensional depth map of the road scene is divided into multiple depth layers according to the depth values in the three-dimensional depth map of the road scene. The depth gradient of the image patch is calculated within each depth layer. Based on the depth gradient, a continuity analysis is performed to determine the depth layer position of the foreground target. The image region corresponding to the depth layer position of the foreground target is extracted as the moving target.
[0038] Figure 2This is a schematic diagram illustrating the process of determining a moving target according to an embodiment of the present invention. Figure 2 As shown, temporal registration is first performed on the continuous image frame sequence. In this process, two adjacent image frames can be selected, and feature points in the images are extracted using a feature point matching algorithm, such as SIFT or SURF. For each pair of adjacent image frames, approximately 500-1000 feature points are extracted, and the matching relationship between the feature points is calculated. Based on the matched feature point pairs, the homography matrix between the two frames is estimated. This matrix contains the translation, rotation, and other transformation relationships between the images. The obtained homography matrix is used to transform the subsequent frame image to a position aligned with the previous frame image, generating the registered image sequence. To ensure registration accuracy, the RANSAC algorithm can be used to remove erroneous matching points, ensuring that the reprojection error of the remaining matching points is less than 2 pixels.
[0039] Histogram equalization is performed on the registered image sequence to enhance image contrast. For each frame, its gray-level histogram is calculated to obtain the distribution of pixel gray values in the image. Based on the cumulative distribution function, the original gray values are mapped to a new gray-level range (0-255), making the overall gray-level distribution of the image more uniform. In the processed image, dark areas become brighter, and bright areas have clearer details, which is beneficial for subsequent feature extraction.
[0040] Texture and edge features are extracted from the equalized image. Texture feature extraction uses the Local Binary Pattern (LBP) algorithm, which divides the image into 16×16 pixel blocks. LBP features are calculated for each block to generate a texture feature map. Edge features are extracted using the Canny edge detector with parameters set to a low threshold of 30, a high threshold of 90, and a Gaussian filter kernel size of 3×3, resulting in an edge feature map.
[0041] The depth estimation mapping relationship is determined based on the extracted features. A mapping model is established by analyzing the relationship between image features and actual depth values in the training dataset. The texture depth weight calculation method involves querying and matching the texture feature map with a pre-trained texture-depth mapping table. Regions with high texture complexity are assigned higher weights (0.7-0.9), while regions with simple textures are assigned lower weights (0.3-0.5). Edge depth weight calculation is based on the continuity and intensity of edge features. Regions with clear and continuous edges have a weight value of 0.8-0.95, while regions with blurred or discontinuous edges have a weight value of 0.2-0.4.
[0042] A depth fusion matrix is generated by non-linearly combining texture depth weights and edge depth weights. Specifically, for each pixel position (x, y), a weighted sum is calculated, with texture weights accounting for approximately 60% and edge weights accounting for approximately 40%. A sigmoid function is applied for non-linear mapping to ensure that the final weight values are within the range of 0 to 1. Each element in the depth fusion matrix represents the depth confidence at the corresponding pixel position.
[0043] The registered image sequence is converted into a 3D depth map of the road scene based on a deep fusion matrix. Pixel disparity is calculated using a stereo matching algorithm, and then converted into actual depth values by combining camera parameters (focal length 100mm, baseline length 120mm). For road scenes, the depth resolution is approximately 0.1 meters in the near-distance area (0-20 meters), approximately 0.5 meters in the mid-distance area (20-50 meters), and approximately 2 meters in the far-distance area (above 50 meters).
[0044] The generated 3D depth map of the road scene is processed into layers. Based on the characteristics of the scene, the depth range is divided into multiple depth layers, such as 0-10 meters, 10-20 meters, 20-30 meters, 30-50 meters, and above 50 meters, for a total of 5 layers. Considering that closer targets require more refined depth resolution and that the depth changes of distant targets are relatively slow, a non-uniform division method is adopted during the division.
[0045] The depth gradient of an image patch is calculated within each depth layer. Each depth layer is divided into 8×8 pixel image patches, and the horizontal and vertical gradients of the depth values within each patch are calculated. The depth gradient is calculated using the center difference method, where the depth difference between adjacent pixels is divided by the pixel spacing. For each image patch, the magnitude and direction of the depth gradient are recorded. Regions with gradient magnitudes exceeding a threshold (0.5 m / pixel for near-field regions and 2 m / pixel for far-field regions) are considered to contain foreground objects.
[0046] Continuity analysis based on depth gradients determines the depth layer location of foreground targets. It analyzes the continuity of depth gradients between adjacent image patches, identifying regions with strong continuity belonging to the same target. A region growing algorithm is applied, starting from seed points with significant depth gradients and gradually expanding connected regions. Significant depth discontinuities typically exist at the boundaries of connected regions; these regions are marked as candidate regions for foreground targets.
[0047] The image region corresponding to the depth layer position of the foreground target is extracted as the moving target. Morphological processing (closing operation, structuring element size 5×5) is performed on each candidate region to fill small holes and smooth the boundaries. Combined with temporal consistency constraints, the depth change of the same region in adjacent frames is compared; regions with a depth change exceeding a threshold (1 meter) are identified as moving targets. Finally, the position, contour, and depth information of the moving target are output, achieving accurate detection and separation of moving objects in road scenes.
[0048] In one optional implementation, motion feature parameters of the moving target are calculated based on adjacent image frames, and the degree of abnormality of the moving target's motion state is determined according to the motion feature parameters. When the degree of abnormality of the motion state meets the accident determination criteria, a traffic accident is determined to have occurred, including: Obtain the position coordinates of a moving target in adjacent image frames, calculate the motion feature parameters of the moving target based on the position coordinates, and project the motion feature parameters onto the road coordinate system to obtain the motion feature parameters in the road coordinate system. Obtain the normal driving reference value of the moving target in the road coordinate system, calculate the deviation value between the motion characteristic parameters in the road coordinate system and the normal driving reference value, and construct an abnormal motion state measurement index based on the deviation value; Spatial cluster analysis is performed on the motion state anomaly measurement index to obtain the cluster center of the anomaly measurement index of the surrounding vehicles based on the distribution of the anomaly measurement index of the surrounding vehicles. Calculate multiple spatial correlation features between the anomaly measurement index of the moving target and the cluster center of the anomaly measurement index, and determine the accident risk level of the moving target based on the combination relationship of the multiple spatial correlation features; A traffic accident determination result is generated based on the degree of accident risk, and the traffic accident determination result indicates whether a traffic accident has occurred.
[0049] This invention analyzes the motion feature parameters of a moving target in adjacent image frames to determine the degree of abnormality in its motion state, thereby achieving automatic detection of traffic accidents.
[0050] In the specific implementation process, adjacent image frames are first extracted from the surveillance video, and target detection technology is used to identify moving targets in the images, such as vehicles. For each identified moving target, its position coordinates in adjacent image frames are obtained through a target tracking algorithm. For example, for a vehicle A, its position coordinates in the image frame at time t are... Its position coordinates in the image frame at time t+1 are Based on these position coordinates, the vehicle's motion characteristic parameters, including velocity, acceleration, and rate of change of direction, can be calculated. Specifically, velocity can be calculated by dividing the position difference between adjacent frames by the time interval; for example, the velocity of vehicle A from time t to t+1 is... Δt is the time interval between adjacent frames, typically 30 to 40 milliseconds; acceleration can be calculated by dividing the velocity difference between adjacent frames by the time interval; the rate of change of direction can be obtained by calculating the angular change of the velocity direction between adjacent frames.
[0051] To more accurately analyze the vehicle's motion state, the aforementioned motion characteristic parameters need to be transformed from the image coordinate system to the road coordinate system. This transformation can be achieved using a perspective transformation matrix, which can be pre-calibrated based on feature points such as road signs and lane lines. In the road coordinate system, the vehicle's motion is decomposed into components along the road direction and perpendicular to the road direction, facilitating the determination of the vehicle's lateral offset and longitudinal velocity changes. For example, the velocity of vehicle A in the road coordinate system can be represented as (vx_road, vy_road), where vx_road represents the velocity component along the road direction, and vy_road represents the velocity component perpendicular to the road direction.
[0052] Next, the normal driving reference values of the moving target in the road coordinate system are obtained. These reference values can be obtained by analyzing historical traffic flow data, including the average speed, normal acceleration / deceleration range, and lane keeping deviation for a specific road segment. For example, the normal driving speed range for a certain highway segment is 80 km / h to 120 km / h, the normal acceleration range is -3 m / s² to 2 m / s², and the normal lateral offset range is ±0.3 m. The deviation values between the actual motion characteristic parameters of the moving target and the normal driving reference values are calculated, such as speed deviation, acceleration deviation, and lateral offset deviation. Based on these deviation values, an anomaly measurement index for motion state is constructed. This index can be a weighted combination of the deviation values, with the weights determined according to the importance of each parameter in judging the abnormal state. For example, the anomaly measurement index can be expressed as: speed deviation × 0.3 + acceleration deviation × 0.5 + lateral offset deviation × 0.2, where the sum of the weights is 1.
[0053] To distinguish between general traffic condition changes (such as collective deceleration due to congestion) and abnormal behavior of specific vehicles, spatial clustering analysis is performed on anomaly metrics of motion state. A density-based clustering algorithm is used to examine the distribution of anomaly metrics for all vehicles within a certain spatial range (e.g., a radius of 50 meters), identifying multiple cluster centers and their corresponding anomaly metric values. For example, in a certain road segment, there are two clusters: one cluster center has an anomaly metric value of 0.2 (representing a group of vehicles moving normally), and the other cluster center has an anomaly metric value of 0.8 (representing a group of vehicles decelerating due to road construction).
[0054] The system calculates multiple spatial correlation features between the anomaly metric of a target vehicle and its nearest cluster centers, including distance difference, directional consistency, and temporal duration. Distance difference refers to the difference between the anomaly metric value of the target vehicle and the nearest cluster center; directional consistency indicates the degree of consistency between the target vehicle's direction of movement and that of surrounding vehicles; and temporal duration indicates the duration of the abnormal state. Based on the combination of these spatial correlation features, the accident risk level of the moving target is determined. For example, if a vehicle has an anomaly metric value of 0.9, while the nearest cluster center's metric value is 0.2, and the vehicle's direction of movement differs from that of surrounding vehicles by more than 45 degrees, and the abnormal state lasts for more than 2 seconds, its accident risk level is determined to be "high."
[0055] Finally, a traffic accident determination result is generated based on the degree of accident risk. A risk threshold is set, and a traffic accident is determined to have occurred when the accident risk level exceeds the threshold (e.g., 0.85). To reduce false alarms, a time window verification mechanism can be introduced, requiring a high-risk state to persist for a certain time window (e.g., 3 seconds) before triggering an accident alarm. Detailed information such as accident type, involved vehicles, and accident location can also be output to facilitate rapid response and handling by traffic management departments.
[0056] Through the above, the present invention can accurately identify traffic accidents in complex traffic environments, realize real-time monitoring of traffic conditions and rapid response to abnormal events, and effectively improve the level of road safety management.
[0057] In one optional implementation, multiple spatial correlation features between the anomaly metrics of the moving target and the cluster centers of the anomaly metrics are calculated, and the accident risk level of the moving target is determined based on the combination relationship of the multiple spatial correlation features, including: Calculate the spatial distance correlation, motion direction correlation, and temporal change correlation between the moving target and the cluster center of the anomaly metric index; The spatial distance correlation, the motion direction correlation, and the temporal change correlation are grouped according to the spatiotemporal dimension to obtain the time dimension correlation group and the spatial dimension correlation group. Calculate the gradient rate of change between adjacent correlation features in the time dimension correlation group, and calculate the distance rate of change between adjacent correlation features in the spatial dimension correlation group. Determine the combined weight of the correlation features within each group based on the gradient rate of change and the distance rate of change. Based on the combined weights, the correlation features within each group are progressively combined to obtain weighted spatiotemporal dimension combined features, and a multi-layer spatiotemporal feature sequence is generated based on the weighted spatiotemporal dimension combined features. The correlation coefficients between adjacent spatiotemporal dimensions in the multi-layer spatiotemporal feature sequence are extracted, and the accident risk level of the moving target is determined based on the transmission relationship of the correlation coefficients.
[0058] In this embodiment, multiple spatial correlation features between the anomaly metric of the moving target and the cluster center of the anomaly metric are calculated, and the accident risk level of the moving target is determined based on the combination relationship of the multiple spatial correlation features.
[0059] First, we calculate the spatial distance correlation, motion direction correlation, and temporal variation correlation between the moving target and the anomaly metric cluster center. Spatial distance correlation represents the Euclidean distance from the moving target to the cluster center. For example, when the moving target is located at (10, 15) and the anomaly metric cluster center is located at (12, 18), the spatial distance between them is 5 units. Motion direction correlation represents the angle between the moving target's motion direction and the direction pointing towards the cluster center. For example, if the moving target's motion direction is 45 degrees and the direction pointing towards the cluster center is 30 degrees, the angle is 15 degrees. Temporal variation correlation represents the rate of change of the spatial distance between the moving target and the cluster center over a continuous time period. For example, if the distance is 10 units at time t1 and 8 units at time t2, the rate of change is -20%, indicating that the distance is decreasing.
[0060] The calculated spatial distance correlation, motion direction correlation, and temporal change correlation are grouped according to spatiotemporal dimensions. The temporal dimension correlation group includes temporal change correlation and time-related derived features, such as the rate of change of speed and acceleration. The spatial dimension correlation group includes spatial distance correlation, motion direction correlation, and spatial position-related derived features, such as relative position angle. For example, for a moving vehicle, the temporal dimension correlation group includes its acceleration from 40 km / h to 60 km / h and its approach rate from 50 m to 30 m; the spatial dimension correlation group includes information such as its distance from the road boundary being 2 m and its deviation angle from the centerline being 5 degrees.
[0061] Calculate the gradient rate of change between adjacent correlated features in the time-dimensional correlation group. For example, if the speed of a moving target at three consecutive time points t1, t2, and t3 is 40 km / h, 45 km / h, and 55 km / h respectively, then the gradient rate of change from t1 to t2 is (45-40) / 40 = 12.5%, and the gradient rate of change from t2 to t3 is (55-45) / 45 = 22.2%. An increase in the gradient rate of change indicates an increase in acceleration, which means an increase in risk. Simultaneously, calculate the distance rate of change between adjacent correlated features in the spatial-dimensional correlation group. For example, if the distances of a moving target from the road boundary at three consecutive locations p1, p2, and p3 are 3m, 2.5m, and 1.8m, respectively, then the rate of change of distance from p1 to p2 is (2.5-3) / 3 = -16.7%, and the rate of change of distance from p2 to p3 is (1.8-2.5) / 2.5 = -28%. The increase in the absolute value of the rate of change of distance indicates that the speed at which the vehicle deviates from the road is increasing, and the level of risk is rising.
[0062] Based on the gradient rate of change and the distance rate of change, the combined weights of relevance features within each group are determined. When the rate of change of a certain relevance feature exceeds a preset threshold, the weight of that feature is increased. For example, if the threshold for the distance rate of change is set to 20%, then the distance rate of change from p2 to p3 (-28%) exceeds the threshold, and the weight of that feature will be increased from the default 1.0 to 1.5. Similarly, the weight of time-dimensional features whose gradient rate of change exceeds the threshold will also be increased.
[0063] Based on the combined weights, the relevance features within each group are progressively combined to obtain weighted spatiotemporal dimension combined features. For example, in the time dimension relevance group, if the weight of the velocity change feature is 1.2, the weight of the acceleration feature is 1.5, and the weight of the distance change rate feature is 1.0, then the combined feature can be expressed as the weighted average of these three features. Similarly, in the spatial dimension relevance group, if the weight of the distance to the road boundary feature is 1.5 and the weight of the deviation angle feature is 1.2, then the combined feature can also be expressed as a weighted average.
[0064] Based on weighted spatiotemporal dimension combination features, multi-layer spatiotemporal feature sequences are generated, which include features at different time and spatial scales. For example, features at short time scales (e.g., 1 second) focus on the rapid acceleration or sharp turn of the moving target, features at medium time scales (e.g., 5 seconds) focus on whether the target continues to approach the risk area, and features at long time scales (e.g., 30 seconds) focus on the overall movement trend of the target.
[0065] The correlation coefficients between adjacent spatiotemporal dimensions in the multi-layer spatiotemporal feature sequence are extracted. For example, the correlation coefficient between the rapid acceleration feature at a short timescale and the near-risk area feature at a medium timescale is 0.8, indicating that these two features are highly correlated and both point to potential risk. Based on the transitivity of the correlation coefficients, the accident risk level of the moving target is finally determined. For example, if the correlation coefficient between the short-term and medium-term features is 0.8, and the correlation coefficient between the medium-term and long-term features is 0.7, then the correlation strength between the short-term and long-term features can be calculated to be 0.56 through the transitivity. If the overall correlation strength exceeds a preset threshold of 0.5, the moving target is determined to have a high accident risk level; otherwise, it is determined to have a medium or low risk level.
[0066] Taking a specific traffic scenario as an example, a vehicle is traveling at 50 km / h and detects an abnormal cluster center (which could be an accident-prone location) 200m ahead. The spatial distance correlation between the vehicle and the cluster center is calculated to be 200m, the direction of movement correlation is 5 degrees (i.e., the angle between the vehicle's direction of travel and the direction pointing towards the cluster center is 5 degrees), and the temporal change correlation is -10m / s (i.e., the vehicle is approaching the cluster center at a speed of 10m / s). As the vehicle continues to travel, its speed increases to 60 km / h, and it is only 150m from the abnormal cluster center, with the angle decreasing to 3 degrees. At this point, the rate of change in spatial distance is (150-200) / 200 = -25%, the rate of change in direction angle is (3-5) / 5 = -40%, and the rate of change in speed is (60-50) / 50 = 20%. These rates of change all exceed a preset threshold of 15%, increasing the weight of the corresponding features. Through progressive combination and correlation analysis, the accident risk level of this vehicle is determined to be high, triggering an early warning mechanism.
[0067] In one optional implementation, upon determining that a traffic accident has occurred, dynamic scene features of the accident area are calculated based on the motion characteristic parameters of the moving target and the degree of abnormality in its motion state. Based on these dynamic scene features, the accident level is determined, and a corresponding emergency response plan is generated, including: In the event that a traffic accident has been determined, traffic flow parameters of the accident area are calculated based on the motion characteristic parameters of the moving target. The connectivity and propagation impedance between various road segments within the accident area are calculated based on the degree of abnormality in the motion state, and the congestion diffusion parameters of the accident area are calculated based on the connectivity and propagation impedance. The traffic flow parameters are used to calculate the capacity loss ratio of each road segment within the accident area, and the congestion diffusion probability of each road segment within the accident area is calculated based on the congestion diffusion parameters. The dynamic scene characteristics of the accident area are determined based on the capacity loss ratio and the congestion diffusion probability. Based on the dynamic scene characteristics, the accident area is divided into multiple sub-areas, the traffic flow loss degree characteristics and congestion spread trend characteristics in each sub-area are determined, and the accident level is determined based on the traffic flow loss degree characteristics and congestion spread trend characteristics among the multiple sub-areas. An emergency response plan is generated based on the accident level.
[0068] In the event of a confirmed traffic accident, the dynamic scene characteristics of the accident area are calculated based on the motion characteristic parameters of the moving targets and the degree of abnormality in their motion state. Based on this, the accident level is determined, and an emergency response plan is generated. The specific implementation process is as follows: The system acquires vehicle motion characteristics parameters within the accident area, including speed, acceleration, direction, and vehicle spacing, through traffic monitoring cameras, radar sensors, or vehicle-to-everything (V2X) data. When a traffic accident is detected in a certain area, vehicle motion data within a 300-meter radius of the accident site is collected. For example, after an accident is detected on section A, the average vehicle speed 100 meters upstream of the accident site drops sharply from 60 km / h to 15 km / h, and the vehicle density increases from 20 vehicles / km to 85 vehicles / km. Based on this data, traffic flow parameters for the accident area are calculated, including flow rate, density, and average speed. The accident area is divided into 10m × 10m grid cells, and the number of vehicles and average speed within each grid are statistically analyzed to obtain a real-time traffic flow parameter matrix.
[0069] The connectivity and propagation impedance of road segments within an accident area are assessed based on abnormal vehicle movement states. Abnormal movement states are quantified by deviations from historical normal driving patterns, such as increased frequency of sudden braking and lane changes. Connectivity is defined as the probability of passage between road segments, ranging from 0 to 1, with 0 for complete blockage and 1 for complete unobstructed passage. Propagation impedance represents the difficulty of congestion spreading from one road segment to adjacent segments, influenced by factors such as the number of lanes, road grade, and traffic control measures. A road network topology is constructed centered on the accident point, and the connectivity and propagation impedance matrices between nodes are calculated. In practical applications, after an accident on a main road, the connectivity of connected secondary roads decreased from 0.95 to 0.35, and the propagation impedance increased from 25 to 78.
[0070] Based on the above parameters, congestion diffusion parameters in the accident area were calculated. A road network seepage model was used, employing connectivity and propagation impedance matrices to simulate the propagation process of congestion within the road network. The calculation results show the rate, direction, and extent of congestion diffusion from the accident point outwards. In a case study of an accident at an intersection, the calculated diffusion rates of congestion to the north and east were 50 meters and 35 meters per minute, respectively, while those to the south and west were only 15 meters and 10 meters per minute, respectively.
[0071] Further calculations were performed on the capacity loss ratio of each road segment within the accident area. The capacity loss ratio was defined as the difference between the actual capacity of a road segment after the accident and its normal capacity. Each road segment was assessed based on factors such as changes in vehicle speed and the degree of increase in vehicle density within the accident area. For example, the capacity loss ratio of the road segment where the accident occurred reached 85%, the loss ratio of adjacent road segments was between 40% and 60%, and the loss ratio of road segments more than 200 meters away from the accident point decreased to 20%-30%.
[0072] The congestion diffusion probability of each road segment within the accident area was calculated based on congestion diffusion parameters, representing the likelihood of congestion spreading from one road segment to adjacent road segments within a specific timeframe. Using Monte Carlo simulation, multiple congestion diffusion simulations were performed on the road network topology to statistically determine the probability of each road segment being affected by congestion. In one case, the congestion diffusion probability of road segments adjacent to the accident point reached 95%, the probability of road segments 100 meters away was 70%, and the probability of road segments 200 meters away dropped to 35%.
[0073] By combining the proportion of traffic capacity loss with the probability of congestion spread, the dynamic scene characteristics of the accident area are determined. These characteristics include dimensions such as the scope of impact, duration, and severity. A weighted fusion method is used, with a weight of 0.6 for traffic capacity loss and a weight of 0.4 for the probability of congestion spread, to obtain a comprehensive score of the accident's impact.
[0074] Based on dynamic scene characteristics, the accident area is divided into multiple sub-regions. The division method is based on a clustering algorithm, which combines adjacent grids with similar capacity loss and congestion characteristics into sub-regions. Typically, the accident area is divided into three categories: core impact area, secondary impact area, and peripheral impact area. The traffic flow loss characteristics of each sub-region are determined, including the percentage reduction in flow and the proportion of speed reduction, as well as the congestion spread trend characteristics, including the direction, rate, and duration of congestion spread.
[0075] Accident levels are determined based on the characteristics of traffic flow loss between sub-regions and the trend of congestion spread. Accident levels are typically divided into four categories: minor (Level I), moderate (Level II), severe (Level III), and major (Level IV). When the core area's capacity loss exceeds 80% and the probability of congestion spreading to secondary areas is greater than 90%, it is classified as a Level III accident; when the core area's loss reaches 95% or more and the impact extends to the peripheral areas, it is classified as a Level IV accident.
[0076] Finally, based on the determined accident level, an emergency response plan is generated, including traffic control measures, dispatch of rescue forces, and recommended detour routes. For Level III accidents, an emergency plan will be generated that includes implementing traffic control within a 200-meter radius of the accident site, deploying 3-5 rescue vehicles, and setting up 4-6 detour warning points. It will also recommend optimal detour routes based on real-time traffic conditions and push information to drivers in the affected area through a traffic information dissemination platform to guide the rational distribution of traffic flow and reduce traffic delays caused by the accident.
[0077] In one optional implementation, the accident area is divided into multiple sub-regions based on the dynamic scene characteristics, the traffic flow loss degree characteristics and congestion spread trend characteristics within each sub-region are determined, and the accident level is determined based on the traffic flow loss degree characteristics and congestion spread trend characteristics among the multiple sub-regions, including: Based on the dynamic scene features, a road network topology map of the accident area is constructed, and the dynamic scene features are mapped to each road segment node of the road network topology map; A multidimensional connection matrix is determined based on the road segment nodes. The multidimensional connection matrix is then decomposed to obtain the connectivity strength between road segments. Based on the connectivity strength, the accident area is divided into multiple sub-regions. The characteristics of traffic flow loss and congestion spread trend in each sub-region are extracted to obtain a feature vector sequence, and the autocorrelation coefficient and cross-correlation coefficient of the feature vector sequence are determined. Determine the differences in traffic flow loss characteristics and congestion spread trend characteristics between adjacent sub-regions, and generate a characteristic difference transmission chain based on the transmission relationship between the autocorrelation coefficient and the cross-correlation coefficient, in ascending order of spatial distance; The attenuation coefficient and evolution period of the feature difference transmission chain at different distance scales are extracted, and the accident level is determined based on the attenuation coefficient and the evolution period.
[0078] In one embodiment, the accident area is divided into multiple sub-areas based on dynamic scene characteristics, the traffic flow loss degree characteristics and congestion spread trend characteristics in each sub-area are determined, and the accident level is determined based on the traffic flow loss degree characteristics and congestion spread trend characteristics among multiple sub-areas as follows.
[0079] Dynamic scene characteristics include parameters such as traffic flow, vehicle speed, vehicle density, and road saturation. These data are collected through roadside sensing devices or vehicle-mounted sensing devices. For example, the dynamic scene characteristics of a highway accident section are recorded as follows: the average vehicle speed within 500 meters in front of the accident point decreases from 100 km / h to 15 km / h, the traffic flow decreases from 2,000 vehicles per hour to 300 vehicles per hour, the vehicle density increases from 20 vehicles per kilometer to 85 vehicles per kilometer, and the road saturation increases from 40% to 95%.
[0080] Based on the acquired dynamic scene features, a road network topology map of the accident area is constructed. The dynamic scene features are mapped to the various road segment nodes in the road network topology map. The road network topology map consists of nodes and edges connecting the nodes. Nodes represent road segments or intersections, and edges represent the connection relationships between road segments. For example, at an accident scene, a road network containing 20 nodes is identified, and each node stores feature information such as vehicle speed and traffic flow at that location.
[0081] A multidimensional connectivity matrix is determined based on the road segment nodes. Each element of this matrix represents the degree of association between two nodes, constructed using dimensions such as distance between nodes, traffic flow similarity, and speed change trend similarity. Feature decomposition is performed on this multidimensional connectivity matrix to extract key feature vectors and eigenvalues, and the connectivity strength between road segments is calculated. The connectivity strength value ranges from 0 to 1, with higher values indicating stronger connectivity. For example, after decomposing the connectivity matrix of the aforementioned 20 nodes, the connectivity strength values between the nodes are distributed between 0.2 and 0.9.
[0082] The accident area is divided into multiple sub-regions based on connectivity strength. By setting a threshold, such as 0.6, nodes with connectivity strength greater than the threshold are grouped into the same sub-region. In the example, the 20 nodes are ultimately divided into 4 sub-regions: the accident core area, the near-end impact area, the far-end impact area, and the edge area.
[0083] For each sub-region, traffic flow loss characteristics and congestion spread trend characteristics were extracted. Traffic flow loss characteristics included indicators such as flow reduction rate, speed decrease rate, and delay time growth rate. Congestion spread trend characteristics included indicators such as congestion length growth rate, congestion area expansion rate, and recovery time estimation. For example, in the core accident area, the recorded flow reduction rate was 85%, speed decrease rate was 86%, delay time growth rate was 450%, congestion length increased at a rate of 120 meters per minute, congestion area expanded at a rate of 5000 square meters per minute, and the estimated recovery time was 3 hours. These characteristics were compiled into a feature vector sequence, recorded every 10 minutes, for a total of 12 time points.
[0084] The autocorrelation coefficient and cross-correlation coefficient are calculated for the feature vector sequence. The autocorrelation coefficient reflects the correlation of features at different time points within the same sub-region, while the cross-correlation coefficient reflects the correlation of features between different sub-regions. For example, the autocorrelation coefficient of the flow reduction rate feature in the core accident area is 0.92 within 1 hour, indicating that this feature is highly stable in a short period of time; while the cross-correlation coefficient between the core area and the near-end impact area is 0.75, indicating that the feature changes in the two areas are strongly correlated.
[0085] The differences in traffic flow loss characteristics and congestion spread trends between adjacent sub-regions are identified. For example, the difference in flow reduction rate between the core accident area and the near-end impact area is 40%, the difference in speed reduction rate is 35%, and the difference in congestion length growth rate is 60 meters per minute. Based on the transmission relationship between autocorrelation coefficients and cross-correlation coefficients, feature difference transmission chains are generated in ascending order of spatial distance. In the example, a feature difference transmission chain is generated from the core area to the edge area, recording how the congestion impact decays with distance.
[0086] The decay coefficient and evolution period of the feature difference transmission chain at different distance scales are extracted. The decay coefficient represents the rate at which the influence weakens with distance, and the evolution period represents the time characteristics of congestion formation, stabilization, and dissipation. For example, in the example accident, the decay coefficient of the flow reduction rate is calculated to be 0.15 / km, which means that for every 1 km away from the accident point, the flow reduction rate decreases by 15 percentage points; the congestion evolution period is 25 minutes for the formation period, 95 minutes for the stabilization period, and 50 minutes for the dissipation period.
[0087] Accident levels are determined based on attenuation coefficients and evolution cycles. The accident level classification criteria are as follows: major accidents (attenuation coefficient 180 minutes), serious accidents (attenuation coefficient 0.10-0.20 / km, evolution cycle 120-180 minutes), moderate accidents (attenuation coefficient 0.20-0.35 / km, evolution cycle 60-120 minutes), and minor accidents (attenuation coefficient > 0.35 / km, evolution cycle > 180 minutes).
[0088] In one optional implementation, based on the accident level and the emergency response plan, accident notification data is sent to the traffic management system, and a signal switching command is sent to the traffic signal controller in the accident area. Executing the signal switching command yields the traffic control implementation result, including: Based on the accident level, the transmission priority of the accident notification data is determined, and the accident notification data with the specified transmission priority is sent to the traffic management system. Based on the signal timing adjustment parameters in the emergency response plan and the transmission priority, a multi-level signal timing adjustment strategy is determined. The multi-level signal timing adjustment strategy is optimized based on the accident location coordinates in the accident notification data, and a signal switching instruction is generated. Based on the traffic control area division in the emergency response plan and the control area range in the accident notification data, multiple signal control sub-regions are determined, and the strength of the coordination relationship between signal controllers in each signal control sub-region is calculated. The signal switching instructions are grouped according to the strength of the cooperation relationship, and the corresponding signal switching instructions are sent to each signal control sub-region according to the strength of the cooperation relationship. Collect traffic operation status data after executing the signal switching command, and determine the traffic control implementation result based on the traffic operation status data.
[0089] In this embodiment, the transmission priority of accident notification data is first determined based on the accident level. Accident levels are categorized into four types: minor accidents, general accidents, serious accidents, and major accidents, with corresponding transmission priorities of low, medium, high, and highest priority, respectively. For example, a minor collision involving two small vehicles is classified as a minor accident and assigned a low transmission priority; while a large vehicle accident causing multiple injuries or fatalities is classified as a major accident and assigned the highest transmission priority. The accident notification data, containing information such as accident location coordinates, accident level, accident type, and number of vehicles involved, is then sent to the traffic management system according to the determined transmission priority.
[0090] After determining the transmission priority of accident notification data, a multi-level signal timing adjustment strategy is determined based on the signal timing adjustment parameters and transmission priority in the emergency response plan. Signal timing adjustment parameters include cycle length adjustment, green ratio adjustment, and phase difference adjustment. The multi-level signal timing adjustment strategy includes signal timing adjustments for directly affected areas, indirectly affected areas, and peripheral areas. For example, for a high-priority serious traffic accident, the green ratio of the main road needs to be increased by 40% and the cycle length extended to 150 seconds in the directly affected area; the green ratio of the main road needs to be increased by 25% and the cycle length extended to 130 seconds in the indirectly affected area; and the green ratio of the main road needs to be increased by 10% in the peripheral area, while the cycle length remains unchanged. Furthermore, based on the accident location coordinates in the accident notification data and combined with real-time road network traffic distribution, the multi-level signal timing adjustment strategy is optimized to generate specific signal switching instructions. For example, based on the vehicle congestion situation 200 meters downstream of the accident point, the green ratio of the downstream intersection will be dynamically adjusted from the originally planned increase of 25% to an increase of 30%.
[0091] After generating the signal switching command, multiple signal control sub-regions are determined based on the traffic control area division in the emergency response plan and the control area range in the accident notification data. The traffic control areas can be divided into core areas (0-500 meters), buffer areas (500-1500 meters), and transition areas (1500-3000 meters) according to their distance from the accident point. The coordination strength between signal controllers within each signal control sub-region is calculated. The coordination strength is based on the following factors: the physical distance between controllers, the traffic flow correlation of the controlled road segments, and the functional similarity of the controlled road segments in the road network. For example, two signal controllers located on the same main road and 500 meters apart have a coordination strength value of 0.85 (out of 1); while two signal controllers located on parallel roads can have a coordination strength of 0.42.
[0092] Based on the calculated coordination strength, signal switching commands are grouped. Specifically, controllers with a coordination strength greater than 0.7 are classified into a high coordination group, those with a coordination strength between 0.4 and 0.7 into a medium coordination group, and those with a coordination strength less than 0.4 into a low coordination group. According to the grouping results, corresponding signal switching commands are sent to each signal control sub-region. For the high coordination group, synchronous signal switching is used; for the medium coordination group, sequential signal switching is used; and for the low coordination group, independent signal switching is used. For example, for a high coordination group containing 5 signal controllers, signal switching commands will be sent to all 5 controllers simultaneously (e.g., 30 seconds after an accident); while for a medium coordination group containing 4 signal controllers, signal switching commands will be sent to each controller sequentially at 5-second intervals.
[0093] After sending the signal switching command, traffic operation data is collected, including parameters such as average vehicle speed, traffic flow, occupancy rate, and queue length for each road segment. The results of traffic control implementation are determined based on this data. For example, if it is observed that after the signal switching, the average vehicle speed within a 500-meter radius of the accident site increased from 15 km / h to 25 km / h, and the queue length decreased from 150 meters to 80 meters, these data are compared with preset control effect thresholds (e.g., an average speed increase of no less than 30% and a queue length reduction of no less than 40%) to evaluate the effectiveness of traffic control. If the implementation effect does not meet expectations, the signal timing parameters will be further adjusted until a satisfactory control effect is achieved.
[0094] Through the above technical means, this invention achieves precise traffic control based on accident level and emergency response plan, effectively improving the efficiency of traffic accident handling and road capacity, and reducing traffic delays caused by accidents.
[0095] The intelligent traffic accident detection and response system based on video images according to embodiments of the present invention includes: The first unit is used to acquire real-time video image data collected by traffic monitoring cameras and to segment the real-time video image data into a continuous sequence of image frames. The second unit is used to enhance the continuous image frame sequence, construct a three-dimensional depth map of the road scene, and separate the moving target as the foreground based on the three-dimensional depth map; The third unit is used to calculate the motion feature parameters of the moving target based on adjacent image frames, determine the degree of abnormality of the motion state of the moving target based on the motion feature parameters, and determine that a traffic accident has occurred when the degree of abnormality of the motion state meets the accident determination conditions. The fourth unit is used to calculate the dynamic scene features of the accident area based on the motion characteristic parameters of the moving target and the degree of abnormality of the motion state when a traffic accident is determined to have occurred, determine the accident level based on the dynamic scene features, and generate a corresponding emergency response plan. The fifth unit is used to send accident notification data to the traffic management system according to the accident level and the emergency response plan, and to send a signal switching command to the traffic signal controller in the accident area, and execute the signal switching command to obtain the traffic control implementation result.
[0096] A third aspect of the present invention provides an electronic device, comprising: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.
[0097] A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.
[0098] This invention can be a method, apparatus, system, and / or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of the invention.
[0099] 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 the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for intelligent detection and response to traffic accidents based on video images, characterized in that, include: Acquire real-time video image data collected by traffic monitoring cameras, and segment the real-time video image data into a continuous sequence of image frames; The continuous image frame sequence is enhanced to construct a three-dimensional depth map of the road scene, and the moving target as the foreground is separated based on the three-dimensional depth map; The motion feature parameters of the moving target are calculated based on adjacent image frames. The degree of abnormality of the motion state of the moving target is determined based on the motion feature parameters. When the degree of abnormality of the motion state meets the accident determination conditions, it is determined that a traffic accident has occurred. In the event of a traffic accident, the dynamic scene features of the accident area are calculated based on the motion characteristic parameters of the moving target and the degree of abnormality of the motion state. The accident level is determined based on the dynamic scene features, and a corresponding emergency response plan is generated. Based on the accident level and the emergency response plan, accident notification data is sent to the traffic management system, and a signal switching command is sent to the traffic signal controller in the accident area. The execution of the signal switching command yields the traffic control implementation result.
2. The method according to claim 1, characterized in that, The continuous image frame sequence is enhanced to construct a 3D depth map of the road scene, and moving targets as foreground objects are separated based on the 3D depth map, including: The adjacent image frames in the continuous image frame sequence are registered in the time dimension to generate a registered image sequence. Histogram equalization is performed on the registered image sequence to extract image texture features and image edge features from the registered image sequence; Based on the image texture features and the image edge features, a depth estimation mapping relationship is determined, texture depth weights and edge depth weights are generated, and a depth fusion matrix is generated according to the nonlinear combination of the texture depth weights and the edge depth weights; Based on the deep fusion matrix, the registered image sequence is converted into a three-dimensional depth map of the road scene. The three-dimensional depth map of the road scene is then processed in layers, and the three-dimensional depth map of the road scene is divided into multiple depth layers according to the depth values in the three-dimensional depth map of the road scene. The depth gradient of the image patch is calculated within each depth layer. Based on the depth gradient, a continuity analysis is performed to determine the depth layer position of the foreground target. The image region corresponding to the depth layer position of the foreground target is extracted as the moving target.
3. The method according to claim 1, characterized in that, Motion feature parameters of the moving target are calculated based on adjacent image frames. The degree of abnormality of the moving target's motion state is determined based on the motion feature parameters. When the degree of abnormality of the motion state meets the accident determination criteria, a traffic accident is determined to have occurred, including: Obtain the position coordinates of a moving target in adjacent image frames, calculate the motion feature parameters of the moving target based on the position coordinates, and project the motion feature parameters onto the road coordinate system to obtain the motion feature parameters in the road coordinate system. Obtain the normal driving reference value of the moving target in the road coordinate system, calculate the deviation value between the motion characteristic parameters in the road coordinate system and the normal driving reference value, and construct an abnormal motion state measurement index based on the deviation value; Spatial cluster analysis is performed on the motion state anomaly measurement index to obtain the cluster center of the anomaly measurement index of the surrounding vehicles based on the distribution of the anomaly measurement index of the surrounding vehicles. Calculate multiple spatial correlation features between the anomaly measurement index of the moving target and the cluster center of the anomaly measurement index, and determine the accident risk level of the moving target based on the combination relationship of the multiple spatial correlation features; A traffic accident determination result is generated based on the degree of accident risk, and the traffic accident determination result indicates whether a traffic accident has occurred.
4. The method according to claim 3, characterized in that, Calculate multiple spatial correlation features between the anomaly metrics of the moving target and the cluster centers of the anomaly metrics, and determine the accident risk level of the moving target based on the combination relationship of the multiple spatial correlation features, including: Calculate the spatial distance correlation, motion direction correlation, and temporal change correlation between the moving target and the cluster center of the anomaly metric index; The spatial distance correlation, the motion direction correlation, and the temporal change correlation are grouped according to the spatiotemporal dimension to obtain the time dimension correlation group and the spatial dimension correlation group. Calculate the gradient rate of change between adjacent correlation features in the time dimension correlation group, and calculate the distance rate of change between adjacent correlation features in the spatial dimension correlation group. Determine the combined weight of the correlation features within each group based on the gradient rate of change and the distance rate of change. Based on the combined weights, the correlation features within each group are progressively combined to obtain weighted spatiotemporal dimension combined features, and a multi-layer spatiotemporal feature sequence is generated based on the weighted spatiotemporal dimension combined features. The correlation coefficients between adjacent spatiotemporal dimensions in the multi-layer spatiotemporal feature sequence are extracted, and the accident risk level of the moving target is determined based on the transmission relationship of the correlation coefficients.
5. The method according to claim 1, characterized in that, In the event of a traffic accident, the dynamic scene features of the accident area are calculated based on the motion characteristic parameters of the moving target and the degree of abnormality in its motion state. Based on these dynamic scene features, the accident level is determined, and a corresponding emergency response plan is generated, including: In the event that a traffic accident has been determined, traffic flow parameters of the accident area are calculated based on the motion characteristic parameters of the moving target. The connectivity and propagation impedance between various road segments within the accident area are calculated based on the degree of abnormality in the motion state, and the congestion diffusion parameters of the accident area are calculated based on the connectivity and propagation impedance. The traffic flow parameters are used to calculate the capacity loss ratio of each road segment within the accident area, and the congestion diffusion probability of each road segment within the accident area is calculated based on the congestion diffusion parameters. The dynamic scene characteristics of the accident area are determined based on the capacity loss ratio and the congestion diffusion probability. Based on the dynamic scene characteristics, the accident area is divided into multiple sub-areas, the traffic flow loss degree characteristics and congestion spread trend characteristics in each sub-area are determined, and the accident level is determined based on the traffic flow loss degree characteristics and congestion spread trend characteristics among the multiple sub-areas. An emergency response plan is generated based on the accident level.
6. The method according to claim 5, characterized in that, Based on the dynamic scene characteristics, the accident area is divided into multiple sub-regions. The traffic flow loss severity and congestion spread trend characteristics within each sub-region are determined. The accident level is then determined based on the traffic flow loss severity and congestion spread trend characteristics among the multiple sub-regions, including: Based on the dynamic scene features, a road network topology map of the accident area is constructed, and the dynamic scene features are mapped to each road segment node of the road network topology map; A multidimensional connection matrix is determined based on the road segment nodes. The multidimensional connection matrix is then decomposed to obtain the connectivity strength between road segments. Based on the connectivity strength, the accident area is divided into multiple sub-regions. The characteristics of traffic flow loss and congestion spread trend in each sub-region are extracted to obtain a feature vector sequence, and the autocorrelation coefficient and cross-correlation coefficient of the feature vector sequence are determined. Determine the differences in traffic flow loss characteristics and congestion spread trend characteristics between adjacent sub-regions, and generate a characteristic difference transmission chain based on the transmission relationship between the autocorrelation coefficient and the cross-correlation coefficient, in ascending order of spatial distance; The attenuation coefficient and evolution period of the feature difference transmission chain at different distance scales are extracted, and the accident level is determined based on the attenuation coefficient and the evolution period.
7. The method according to claim 1, characterized in that, Based on the accident level and the emergency response plan, accident notification data is sent to the traffic management system, and a signal switching command is sent to the traffic signal controller in the accident area. The execution of the signal switching command yields the traffic control implementation results, including: Based on the accident level, the transmission priority of the accident notification data is determined, and the accident notification data with the specified transmission priority is sent to the traffic management system. Based on the signal timing adjustment parameters in the emergency response plan and the transmission priority, a multi-level signal timing adjustment strategy is determined. The multi-level signal timing adjustment strategy is optimized based on the accident location coordinates in the accident notification data, and a signal switching instruction is generated. Based on the traffic control area division in the emergency response plan and the control area range in the accident notification data, multiple signal control sub-regions are determined, and the strength of the coordination relationship between signal controllers in each signal control sub-region is calculated. The signal switching instructions are grouped according to the strength of the cooperation relationship, and the corresponding signal switching instructions are sent to each signal control sub-region according to the strength of the cooperation relationship. Collect traffic operation status data after executing the signal switching command, and determine the traffic control implementation result based on the traffic operation status data.
8. A traffic accident intelligent detection and response system based on video images, used to implement the method as described in any one of claims 1-7, characterized in that, include: The first unit is used to acquire real-time video image data collected by traffic monitoring cameras and to segment the real-time video image data into a continuous sequence of image frames. The second unit is used to enhance the continuous image frame sequence, construct a three-dimensional depth map of the road scene, and separate the moving target as the foreground based on the three-dimensional depth map; The third unit is used to calculate the motion feature parameters of the moving target based on adjacent image frames, determine the degree of abnormality of the motion state of the moving target based on the motion feature parameters, and determine that a traffic accident has occurred when the degree of abnormality of the motion state meets the accident determination conditions. The fourth unit is used to calculate the dynamic scene features of the accident area based on the motion characteristic parameters of the moving target and the degree of abnormality of the motion state when a traffic accident is determined to have occurred, determine the accident level based on the dynamic scene features, and generate a corresponding emergency response plan. The fifth unit is used to send accident notification data to the traffic management system according to the accident level and the emergency response plan, and to send a signal switching command to the traffic signal controller in the accident area, and execute the signal switching command to obtain the traffic control implementation result.
9. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the method described in any one of claims 1 to 7.
Citation Information
Cited By
Vehicle control function dynamic management method and system based on driving scene safety level
CN121768210A