Highway accident warning method and system based on image recognition
Through image recognition and deep learning evaluation, traffic image data is processed in real time, abnormal fluctuations are captured, and low-level early warning and verification stages are adopted to solve the misjudgment problem caused by on-site factors, and the system's response accuracy and efficiency are improved.
Patent Information
- Application Number
- CN202510191119.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-20
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2045-02-20
AI Technical Summary
The existing traffic monitoring and accident warning systems are prone to misjudgment under the interference of on-site factors, resulting in false warnings and alarm fatigue, affecting the system's response efficiency and accuracy.
Through image recognition technology, dynamic feature extraction and deep learning evaluation, image data is processed in real time, abnormal fluctuations are captured, and the accuracy of feature extraction is ensured, and excessive alarms are avoided using low-level early warning and verification stages.
Effectively reduce false warnings and excessive alarms, improve the accuracy and efficiency of system responses, and avoid system ignoring real emergencies caused by alarm fatigue.
Smart Images

Figure CN120126308B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of highway accident warning, and in particular to a highway accident warning method and system based on image recognition. Background Art
[0002] Image recognition-based highway accident warnings utilize computer vision and image processing technology to identify accidents or abnormal situations on the road by analyzing images captured by road cameras or drones. Specifically, this system can monitor the dynamic changes of vehicles, pedestrians, and other traffic elements on the road in real time. By comparing them with preset traffic rules or abnormal patterns, it can identify the occurrence of traffic accidents, such as vehicle collisions, lane obstacles, and damage at the accident scene. Once an anomaly is detected, the system automatically issues a warning signal to notify nearby drivers, traffic management centers, or autonomous driving systems to take preventive measures, thereby avoiding further accidents or reducing the losses caused by accidents. This image recognition-based warning system has a high response speed and accuracy, which helps to improve the safety and response efficiency of highway traffic.
[0003] Existing technologies have the following shortcomings: Image recognition technology plays a vital role in traffic monitoring and accident warning systems, but it also faces challenges. Interference from on-site factors can lead to misjudgments, causing traffic monitoring and accident warning systems to mistakenly identify non-accident events as true emergencies. If these false alarms are not effectively addressed, they can cause traffic management personnel to develop "alarm fatigue," losing sensitivity to frequent alarms and ignoring true emergencies. This situation can not only delay timely incident handling and increase the risk of accidents spreading, but also waste significant dispatch resources, reduce system efficiency, and ultimately lead to more serious consequences for unresponsive emergencies.
[0004] The above information disclosed in this Background section is only for enhancement of understanding of the background of the present disclosure and therefore it may contain information that does not form the prior art that is already known to a person of ordinary skill in the art. Summary of the Invention
[0005] The purpose of the present invention is to provide a highway accident warning method and system based on image recognition. Through image recognition technology, dynamic feature extraction and deep learning evaluation, it solves the problem of misjudgment caused by interference from on-site factors in the traffic monitoring system. Real-time processing of image data adapts to different traffic scenarios and ensures the accuracy of feature extraction. By analyzing the trend of feature changes and capturing abnormal fluctuations, the system can accurately identify potential accidents and avoid false warnings. The low-level early warning and verification stage ensures that no formal alarm is issued without high-level confirmation, effectively reducing false alarms and excessive alarms, reducing alarm fatigue, and improving the accuracy and efficiency of system response to solve the problems in the above-mentioned background technology.
[0006] To achieve the above objectives, the present invention provides the following technical solution: a highway accident warning method based on image recognition, comprising the following steps:
[0007] First, the road traffic images are analyzed using image recognition technology to detect various traffic elements in the images and identify abnormal situations in the images.
[0008] During the image analysis process, image data is acquired in real time and corresponding data information is generated, ensuring that traffic monitoring and accident warning systems can adapt to changing traffic scenarios in different time periods and providing the latest input data for subsequent preprocessing and feature extraction;
[0009] Preprocess the acquired raw image data and extract key features reflecting abnormal conditions from the preprocessed image data. The extracted key features are analyzed within the detection window. By analyzing the changing trends of the features in time and space, abnormal fluctuations in a short period of time are captured.
[0010] The analyzed key features are input into the pre-learned deep learning model for intelligent evaluation to determine the current state of the image data;
[0011] When the deep learning model assesses that there are anomalies in the image data, it first issues a low-level warning signal to preliminarily alert traffic management personnel. At the same time, it enters the verification phase, through further analysis of the image and inspection of relevant area information, to confirm whether an emergency has indeed occurred. Before high-level confirmation, the traffic monitoring and accident warning system will not send a formal alert to the traffic management center, thereby effectively avoiding excessive alarms.
[0012] Preferably, key features reflecting abnormal conditions are extracted from the preprocessed image data, and the extracted features include the contrast difference between the background light and the foreground object in the image and the overall consistency and coherence of the image texture. Under the detection window, the contrast difference between the background light and the foreground object in the image and the overall consistency and coherence of the image texture are analyzed to generate a dynamic backlight impact reference value and a texture fragmentation reference value, respectively. The dynamic backlight impact reference value and the texture fragmentation reference value are used. The dynamic backlight impact reference value reflects the backlight effect generated by the light source in the image by quantifying the contrast difference between the background light and the foreground object in the image, and the texture fragmentation reference value reflects whether there is texture fragmentation or discontinuity in the image region by quantifying the consistency and coherence of the texture in the image.
[0013] Preferably, the specific steps of analyzing the contrast difference between the background light and the foreground object in the image under the detection window to generate the dynamic backlight impact reference value are as follows:
[0014] First, for each pixel in the image, the local contrast difference between the background light and the foreground object is calculated. The contrast difference calculation expression is as follows:
[0015]
[0016] , where C(x, y) is the contrast difference value, which represents the contrast between the background light and the foreground object at point (x, y), and I background (x, y) is the brightness of the background area at the midpoint (x, y) of the image, I foreground (x, y) is the brightness of the foreground object at the point (x, y) in the image;
[0017] Next, the local contrast differences are weighted and integrated to form a dynamic contrast difference model. The dynamic backlight impact value is calculated by introducing the time and space variation weighting function. The dynamic backlight impact value calculation expression is as follows:
[0018]
[0019] , where R dynamic (x, y, t) is the intensity of the backlight effect on the foreground object in the image at time t and spatial position (x, y), is the Gaussian weighting factor, σ 2 is the variance of the Gaussian distribution, which controls the weighting range, x0 is the center coordinate of the reference point in the horizontal direction of the image, y0 is the center coordinate of the reference point in the vertical direction of the image, and W(x, y, t) is the time dynamic weighting factor;
[0020] Based on the dynamic backlight impact value R dynamic (x, y, t), perform weighted averaging in the entire image window to generate a global dynamic backlight impact reference value. The calculation expression is as follows:
[0021]
[0022] , where DBII is the dynamic backlight impact reference value.
[0023] Preferably, the specific steps of analyzing the overall consistency and coherence of the image texture in the detection window to generate the texture fragmentation reference value are as follows:
[0024] First, the image is divided into several small blocks. The local texture complexity of each small block is calculated. The local binary pattern (LBP) algorithm is used to extract texture features. The texture information is captured by calculating the grayscale difference between a pixel and its neighboring pixels. Then, based on the extracted texture features, the texture complexity of each block is calculated. The calculation expression is as follows:
[0025]
[0026] , where T c is the local texture complexity value, f(i, j) is the pixel value at the i-th row and j-th column position in the image, f(i-1, j) is the grayscale value of the adjacent pixel to the left (i-1, j) of the pixel value f(i, j), f(i, j-1) is the grayscale value of the pixel value f(i, j) above (i, j-1) and the adjacent pixel, α and β are hyperparameters that control the sensitivity of grayscale difference, which determines the weighting degree of grayscale difference of neighboring pixels in the formula, α controls the sensitivity of difference with the left neighboring pixel (i-1, j), and β controls the sensitivity of difference with the upper neighboring pixel (i, j-1);
[0027] After the texture complexity of all small blocks is calculated, the local texture complexity is comprehensively analyzed to obtain the reference value of texture fragmentation of the whole image. The weighted fusion method based on local feature distribution is used to calculate the texture complexity T of each small block. c , introduce weight coefficient to enhance complex areas, and the calculation expression is as follows:
[0028]
[0029] , where TBI is the texture fragmentation reference value, N is the total number of image blocks, and W c It is a local weight function used to adjust the contribution of each local block to the overall texture fragmentation, T c (i, j) is the local texture complexity value at position (i, j) in the image, Median(T c ) is the median of the texture complexity value of the local area, which is used to measure the standard state of the overall texture of the image. γ is an exponential factor used to control the degree of magnification or reduction of the difference.
[0030] Preferably, the dynamic backlight impact reference value and texture fragmentation reference value generated after analysis are input into a pre-learned deep learning model, and an image quality fluctuation coefficient is generated by the deep learning model, and the current image data status is judged by the image quality fluctuation coefficient.
[0031] Preferably, the image quality fluctuation coefficient generated when the current image data state is judged by the pre-learned deep learning model is compared with a pre-set image quality fluctuation coefficient reference threshold to judge the image quality. The judgment steps are as follows:
[0032] If the image quality fluctuation coefficient is greater than the pre-set image quality fluctuation coefficient reference threshold, the current image data quality is judged to be in a low-quality abnormal state; if the image quality fluctuation coefficient is less than or equal to the pre-set image quality fluctuation coefficient reference threshold, the current image data quality is judged to be in a high-quality normal state.
[0033] Preferably, when the deep learning model assesses that the image data is abnormal, a low-level warning signal is first issued to initially alert traffic management personnel, who then check the relevant area information to confirm whether an emergency has indeed occurred. Before a high-level confirmation, the traffic monitoring and accident warning system will not send a formal alert to the traffic management center, thereby effectively avoiding excessive alarms. The specific steps are as follows:
[0034] When the image quality fluctuation coefficient IQF is greater than the preset image quality fluctuation coefficient reference threshold IQF ref When image quality fluctuates, a low-level warning signal is first issued. At this point, traffic management personnel are informed of image quality issues, but it is not yet determined whether it is an accident. Therefore, the role of this stage is to guide traffic monitoring and accident warning systems to issue timely warnings, but no formal alert is issued to the public.
[0035] After the low-level warning is issued, the verification phase begins. The image is further analyzed to confirm abnormalities. A quality analysis algorithm is used to conduct a detailed inspection of abnormal fluctuation areas in the image, focusing on whether there are significant traffic accident characteristics in the area. The information in this area is then compared with the previously preset accident characteristic pattern. The comparison formula is as follows:
[0036]
[0037] , where V q is the regional image quality fluctuation factor, which represents the image quality fluctuation factor of region R in the image, s∈R is the pixel point in region R, which means that the summation is performed on each pixel s in region R, I s is the quality evaluation value of the s-th pixel in region R, I avg,R is the average quality of all pixels in region R, σ I,R is the standard deviation of pixel quality in region R, |R| is the total number of pixels in region R;
[0038] After the verification phase, the image data of key areas is fully analyzed and a high-level confirmation is performed based on the accident detection rules trained by the deep learning model. If the image quality fluctuation coefficient and regional analysis results meet the standards of a real accident, the alarm is upgraded to the formal level and the traffic management center is notified. The calculation formula is as follows:
[0039]
[0040] , where C q Represents the high-level confirmation value, ω is the weight coefficient of the accident feature, when C q When the value is ≥1, the current event is considered an emergency and a formal alert is issued to the traffic management center.
[0041] The highway accident warning system based on image recognition includes an image recognition and abnormal situation detection module, a real-time data acquisition and dynamic adaptation module, an image preprocessing and feature extraction module, a deep learning evaluation and intelligent judgment module, and a warning signal issuance and verification and confirmation module;
[0042] Image recognition and abnormality detection module, first, analyzes road traffic images through image recognition technology, detects various traffic elements in the image, and identifies abnormal situations in the image (such as traffic accidents, obstacles, vehicle stagnation, etc.);
[0043] Real-time data acquisition and dynamic adaptation module: During the image analysis process, it acquires image data in real time and generates corresponding data information, ensuring that the traffic monitoring and accident warning systems adapt to changing traffic scenarios in different time periods and providing the latest input data for subsequent preprocessing and feature extraction;
[0044] The image preprocessing and feature extraction module preprocesses the acquired raw image data and extracts key features reflecting abnormal conditions from the preprocessed image data. The extracted key features are analyzed within the detection window, and by analyzing the changing trends of the features in time and space, abnormal fluctuations in a short period of time are captured.
[0045] The deep learning evaluation and intelligent judgment module inputs the analyzed key features into the pre-learned deep learning model for intelligent evaluation to determine the current image data status;
[0046] Warning signal issuance and verification confirmation module: When the deep learning model evaluates that there is anomaly in the image data, it first issues a low-level warning signal to preliminarily alert traffic management personnel, and at the same time enters the verification stage. By further analyzing the image and checking the relevant area information, it is confirmed whether an emergency has indeed occurred. Before high-level confirmation, the traffic monitoring and accident warning system will not send a formal alarm to the traffic management center, thereby effectively avoiding excessive alarms.
[0047] In the above technical solution, the technical effects and advantages provided by the present invention are:
[0048] The present invention effectively solves the problem of misjudgment caused by interference from on-site factors in traffic monitoring and accident warning systems through multi-level analysis methods such as image recognition technology, dynamic feature extraction, and deep learning model evaluation. Real-time acquisition and processing of image data enables the system to adapt to different traffic scenarios and environmental changes, ensuring high-quality feature extraction. By analyzing feature change trends in time and space and capturing abnormal fluctuations in a short period of time, the system can accurately identify potential traffic accidents and obstacles, and intelligently evaluate image status through deep learning models to avoid false warnings caused by factors such as light changes and color differences. Low-level early warning signals and verification stages ensure that no formal alarms are sent without high-level confirmation, thereby effectively reducing false warnings and excessive alarms, avoiding the system ignoring real emergencies due to alarm fatigue, and improving the response efficiency and accuracy of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction to the drawings required for use in the embodiments will be given below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0050] Figure 1 This is a flow chart of the highway accident warning method based on image recognition according to the present invention.
[0051] Figure 2 Schematic diagram of the modules of the highway accident warning system based on image recognition according to the present invention. DETAILED DESCRIPTION
[0052] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these example embodiments are provided so that the description of this disclosure will be thorough and complete and will fully convey the concepts of the example embodiments to those skilled in the art.
[0053] The present invention provides Figure 1 The highway accident warning method based on image recognition shown includes the following steps:
[0054] First, the road traffic images are analyzed using image recognition technology to detect various traffic elements in the images and identify abnormal situations in the images (such as traffic accidents, obstacles, and vehicle stagnation).
[0055] The core function of this step is to extract key information related to traffic conditions from large amounts of traffic image data. Image recognition technology can detect various traffic elements in images, such as roads, vehicles, pedestrians, and traffic signs, and also perform preliminary identification of anomalies in the images (such as traffic accidents, obstacles, and stalled vehicles). During this process, the system classifies and labels the image data according to preset rules or models, identifying elements that may be related to accidents and providing basic data for subsequent feature extraction and analysis.
[0056] During the image analysis process, image data is acquired in real time and corresponding data information is generated, ensuring that traffic monitoring and accident warning systems can adapt to changing traffic scenarios in different time periods and providing the latest input data for subsequent preprocessing and feature extraction;
[0057] This step ensures the system can acquire and process image data in a timely manner within a dynamic traffic environment. This real-time data stream not only enables the system to capture detailed information about current traffic conditions but also enables rapid responses based on the latest image data. This data may include traffic flow, vehicle location, speed, and pedestrian status, ensuring the system can adapt to changing traffic scenarios over time and providing up-to-date input data for subsequent preprocessing and feature extraction.
[0058] Preprocess the acquired raw image data and extract key features reflecting abnormal conditions from the preprocessed image data. The extracted key features are analyzed within the detection window. By analyzing the changing trends of the features in time and space, abnormal fluctuations in a short period of time are captured.
[0059] Image data is often subject to interference from various factors, such as noise, lighting variations, and weather conditions. Therefore, preprocessing is necessary for the acquired raw image data. This step removes irrelevant interference and noise from the image, improving image quality and preparing it for subsequent analysis. Common preprocessing methods include denoising, image enhancement, contrast adjustment, and grayscaling. These preprocessing steps enhance the prominence of key features in the image and make anomalies more clearly apparent, thereby improving the accuracy of subsequent feature extraction and anomaly detection.
[0060] Key features reflecting abnormal conditions are extracted from the preprocessed image data. The extracted features include the contrast difference between the background light and foreground objects in the image and the overall consistency and coherence of the image texture. Within the detection window, these contrast differences and the overall consistency and coherence of the image texture are analyzed to generate a dynamic backlight impact reference value and a texture fragmentation reference value, respectively. The dynamic backlight impact reference value quantifies the contrast difference between the background light and foreground objects in the image, reflecting the backlight effect produced by the light source in the image. It is designed to detect visual interference caused by strong reflected light or changes in the background light source. This helps determine whether backlight interference causes misjudgment, resulting in the misidentification of normal scenes as emergency situations. The texture fragmentation reference value quantifies the consistency and coherence of the image texture, reflecting whether there is texture fragmentation or discontinuity within the image. It is mainly used to detect texture information loss caused by weather, object occlusion, or image quality problems. This helps identify misjudgments caused by image quality issues (such as low resolution and lighting changes), ensuring that the system does not mistakenly identify non-accident scenes.
[0061] Significant changes in the contrast between background lighting and foreground objects in an image can cause traffic monitoring and accident warning systems to mistakenly identify non-accident events as true emergencies. Scene factors such as strong direct sunlight, reflections from slippery roads, or reflections from vehicle lights can increase background brightness, reducing the clarity and contrast of foreground objects. This makes it difficult for the system to accurately distinguish traffic elements in the image, such as vehicles, pedestrians, or obstacles. Especially when background lighting is excessively strong or uneven, the outlines of foreground objects may become blurred or even disappear entirely. For example, the outline of a vehicle may blend into the road or other background objects, causing the system to mistakenly identify a normally parked vehicle as involved in an accident. Furthermore, excessive background lighting can cause image brightness saturation, obscuring key details at the accident scene, such as impact marks or damage, and misleading the system into triggering an alarm. Because such misjudgments often occur in complex lighting environments, the system may fail to detect these disturbances, triggering unnecessary alerts, wasting time and resources, and potentially overlooking true emergencies. Therefore, changes in the contrast between background lighting and foreground lighting are a key factor that can cause traffic monitoring systems to misjudge events due to interference from scene factors.
[0062] The specific steps for analyzing the contrast difference between the background light and the foreground object in the image under the detection window to generate the dynamic backlight impact reference value are as follows:
[0063] First, for each pixel in the image, the local contrast difference between the background light and the foreground object is calculated. The background light refers to the brightness of the light source or reflection in the image, while the foreground object refers to the main traffic elements in the image (such as roads, vehicles, pedestrians, etc.). The contrast difference calculation expression is as follows:
[0064]
[0065] , where C(x, y) is the contrast difference value, which represents the contrast between the background light and the foreground object at point (x, y), and I background (x, y) is the brightness of the background area at the midpoint (x, y) of the image, I foreground (x, y) is the brightness of the foreground object at the point (x, y) in the image;
[0066] This step helps the system identify whether the contrast between the foreground and background has changed significantly under conditions such as strong light reflection and backlighting.
[0067] Next, the local contrast differences are weighted and integrated to form a dynamic contrast difference model, and the dynamic backlight impact value is calculated. In order to more accurately reflect the impact of backlight on the image, a time and space variation weighting function is introduced. The dynamic backlight impact value calculation expression is as follows:
[0068]
[0069] , where R dynamic (x, y, t) is the intensity of the backlight effect on the foreground object in the image at time t and spatial position (x, y), is the Gaussian weighting factor, σ 2 is the variance of the Gaussian distribution, which controls the weighting range. x0 is the coordinate of the center of the reference point in the horizontal direction (column direction) of the image. y0 is the coordinate of the center of the reference point in the vertical direction (row direction) of the image. W(x, y, t) is the time dynamic weighting factor, which is used to describe the change of a certain area in the image at time t.
[0070] This step combines local contrast differences with their spatial and temporal effects to construct a dynamic backlight influence metric.
[0071] Based on the dynamic backlight impact value R dynamic (x, y, t), perform weighted averaging in the entire image window to generate a global dynamic backlight reference value. This reference value is obtained by quantizing the backlight effect in the detection window and correcting it using spatial and temporal weights. The calculation expression is as follows:
[0072]
[0073] , where DBII is the dynamic backlight impact reference value.
[0074] The generated DBII reflects the combined effect of background light on foreground objects across the entire monitored area, serving as a reference for dynamic backlighting. A higher value indicates a stronger backlighting effect, and the system may misjudge a non-accident event as an emergency. Conversely, a lower value indicates less interference from backlighting, reducing the likelihood of misjudgment.
[0075] The dynamic backlight effect reference value, generated by analyzing the contrast difference between the background light and foreground objects in an image within the detection window, indicates a more significant contrast difference between the background light and foreground objects in the image. This is often caused by strong reflected light or uneven lighting conditions. In such cases, foreground objects (such as vehicles or pedestrians) in the image may become blurred or even blend into the background due to the excessive light, making it difficult for the system to accurately distinguish the objects' true state or position. When the backlight effect is exacerbated, traffic monitoring and accident warning systems are more likely to misidentify normal traffic conditions as accident scenes, and further misclassify non-accident events as emergencies. Therefore, a higher dynamic backlight effect reference value increases the probability of system misjudgment. Conversely, a lower reference value provides a clearer contrast between the background and foreground in the image, allowing the system to more accurately identify accident situations and reducing the risk of misjudgment. Therefore, a higher dynamic backlight effect reference value increases the probability of false alarms, and vice versa.
[0076] When the overall consistency and coherence of image textures are fragmented or discontinuous, it can indeed cause traffic monitoring and accident warning systems to misjudge non-accident events as true emergencies. On-site factors such as strong lighting changes, weather conditions (rain, snow, haze), unstable camera position, or changes in viewing angle can affect the texture structure of images. For example, in rainy or snowy weather, accumulated water or water droplets on the road surface can cause image reflections and texture blurring. Alternatively, the low contrast visual effects of hazy weather can cause surface texture details to disappear, resulting in discontinuous or fragmented texture patterns. This texture fragmentation and discontinuity can make it difficult for systems to accurately identify important information such as obstacles, accident signs, or stopped vehicles on the road, leading to the misinterpretation of normal traffic conditions as accident scenes. Furthermore, strong light spots or backlight effects can cause texture information to be lost in certain areas, making it difficult for systems to discern the actual road conditions and leading to erroneous judgments. Therefore, texture discontinuities and fragmentation can mislead systems in noisy environments, causing them to misidentify non-accident scenes as emergencies, triggering unnecessary alerts and impacting the accuracy and timeliness of traffic management.
[0077] The specific steps for analyzing the overall consistency and coherence of the image texture in the detection window to generate the texture fragmentation reference value are as follows:
[0078] First, the image is divided into several small blocks (usually rectangular or square areas). The size of each block depends on the target accuracy requirement. The local texture complexity of each block is calculated. The local binary pattern (LBP) algorithm is used to extract texture features. The texture information is captured by calculating the grayscale difference between a pixel and its neighboring pixels. Then, based on the extracted texture features, the texture complexity of each block is calculated. The calculation expression is as follows:
[0079]
[0080] , where T c It is the local texture complexity value, which reflects the degree of texture change in a local area of the image, especially focusing on the grayscale change between pixels and its coherence in the image. The larger the value, the more complex the texture and the richer the details in the area, which usually corresponds to a higher texture fragmentation. f(i, j) is the pixel value at the i-th row and j-th column position in the image. f(i-1, j) is the grayscale value of the adjacent pixel to the left (i-1, j) of the pixel value f(i, j). f(i, j-1) is the grayscale value of the pixel value f(i, j) above (i, j-1) and the adjacent pixel. α and β are hyperparameters that control the sensitivity of grayscale difference, which determines the weighting degree of the grayscale difference of neighboring pixels in the formula. α controls the sensitivity of the difference with the left neighboring pixel (i-1, j), and β controls the sensitivity of the difference with the upper neighboring pixel (i, j-1).
[0081] This step quantifies the degree of pixel value variation within a local area of the image, thereby reflecting the complexity of the texture. Higher texture complexity indicates richer image information within the local area, while lower texture consistency and coherence may indicate that the area is disturbed or fragmented.
[0082] After the texture complexity of all small blocks is calculated, the local texture complexity is comprehensively analyzed to obtain the reference value of texture fragmentation of the whole image. The weighted fusion method based on local feature distribution is used to calculate the texture complexity T of each small block. c , introduce weight coefficients to enhance complex areas (for example, areas with strong visual interference), and the calculation expression is as follows:
[0083]
[0084] , where TBI is the texture fragmentation reference value, N is the total number of image blocks, and W c It is a local weight function used to adjust the contribution of each local block to the overall texture fragmentation, T c(i, j) is the local texture complexity value at position (i, j) in the image, Median(T c ) is the median of the texture complexity value of the local area, which is used to measure the standard state of the overall texture of the image. γ is an exponential factor used to control the degree of magnification or reduction of the difference.
[0085] This step captures the degree of texture fragmentation or inconsistency in the image by emphasizing the difference between texture complexity and the median. The larger the comprehensive fragmentation index, the higher the degree of texture fragmentation and the greater the risk of system misjudgment.
[0086] The larger the texture fragmentation reference value, which is generated after analyzing the overall consistency and coherence of the image texture under the detection window, the more discontinuities and fragmentation appear in the texture information in the image. This is usually caused by on-site factors such as bad weather (such as rain, snow, and haze), strong lighting changes, spot reflections, or changes in camera viewing angles. These interferences can cause important features in the image (such as roads, vehicles, obstacles, etc.) to become blurred or unclear, increasing the risk of system misjudgment and, in turn, the probability of misidentifying non-accident events as true emergencies. On the contrary, a lower texture fragmentation reference value means that the image texture remains consistent and coherent as a whole, with less interference. The system can more accurately identify traffic conditions, thereby reducing the occurrence of false warnings. Therefore, the change in the texture fragmentation reference value is directly related to the probability of system misjudgment. The larger the value, the higher the risk of misjudgment.
[0087] The analyzed key features are input into the pre-learned deep learning model for intelligent evaluation to determine the current state of the image data;
[0088] The dynamic backlight impact reference value and texture fragmentation reference value generated after analysis are input into the pre-learned deep learning model, and the image quality fluctuation coefficient is generated by the deep learning model. The current image data status is judged by the image quality fluctuation coefficient.
[0089] A pre-learned deep learning model is a neural network model that has been trained and optimized using a large amount of labeled data. By learning from historical data, the network has mastered the ability to identify and evaluate various features and their variations in image data. During training, the deep learning model continuously adjusts the weights and biases in the network using a backpropagation algorithm to minimize the error between the predicted results and the actual annotations. The training data typically contains a large amount of annotated image data. This image data may include normal scenes, accident scenes, and images under various on-site factors (such as weather and lighting changes). In this way, the model can gradually learn the patterns of changes in image quality and scene changes, forming an understanding of image characteristics (such as background lighting, foreground objects, and texture consistency).
[0090] Pre-trained deep learning models can not only extract static features from single image data but also capture trends in image quality changes across multiple frames or continuous dynamic video data. For example, when processing image quality fluctuations such as backlighting or texture fragmentation, the model can determine whether these changes represent normal fluctuations or abnormal fluctuations caused by external factors (such as lighting changes or weather disturbances). Through this process, the model generates an image quality fluctuation coefficient, which reflects whether the image is abnormal during real-time monitoring and determines whether further processing or verification is required. Because the model is trained on a large amount of historical data, it possesses strong generalization capabilities and can quickly adapt to diverse scenarios and interference factors in real-world applications. This pre-trained deep learning model, through sensitivity analysis of image quality fluctuations, can effectively assess the quality of current image data and make more accurate early warning decisions, thereby avoiding system misjudgments and false alarms.
[0091] The deep learning model is not limited here, and any machine learning model that can perform a comprehensive analysis of the dynamic backlight impact reference value DBII and the texture fragmentation reference value TBI to generate the image quality fluctuation coefficient IQF can be used. To implement the technical solution of the present invention, the present invention provides a specific implementation method;
[0092] The image quality fluctuation coefficient IQF is generated by the following formula:
[0093]
[0094] , where w1 and w2 are the preset proportional coefficients of the dynamic backlight impact reference value DBII and the texture fragmentation reference value TBI, respectively, and both w1 and w2 are greater than.
[0095] The preset scaling coefficient refers to the weight coefficient set for different parameters (such as the dynamic backlight influence reference value DBII and the texture fragmentation reference value TBI) in the deep learning model, which is usually determined before the model is trained. These coefficients w1 and w2 are used to measure the influence of different parameters on the calculation of the image quality fluctuation coefficient IQF. Simply put, the preset scaling coefficient indicates how the model balances and weights the importance of these two factors (backlight influence and texture fragmentation) during the comprehensive analysis process. The size of the preset scaling coefficient reflects the relative importance of each factor in the model, which is usually adjusted through experiments or data analysis. By selecting appropriate w1 and w2 values, the performance of the model can be optimized so that it can more accurately reflect the interference of on-site factors when dealing with image quality fluctuations.
[0096] It can be seen from the image quality fluctuation coefficient that the larger the dynamic backlight impact reference value generated after analyzing the contrast difference between the background light and foreground objects in the image under the detection window, and the larger the texture fragmentation reference value generated after analyzing the overall consistency and coherence of the image texture under the detection window, the larger the image quality fluctuation coefficient performance value generated when judging the current image data state by the pre-learned deep learning model, indicating that the risk of system misjudgment is higher, and vice versa.
[0097] Intelligently evaluate the current image data status based on the image quality fluctuation coefficient generated by the deep learning model;
[0098] The image quality fluctuation coefficient generated when the pre-learned deep learning model is used to judge the current image data status is compared with the pre-set image quality fluctuation coefficient reference threshold to judge the image quality. The judgment steps are as follows:
[0099] If the image quality fluctuation coefficient is greater than a preset image quality fluctuation coefficient reference threshold, the current image data quality is judged to be in a low quality abnormal state; if the image quality fluctuation coefficient is less than or equal to the preset image quality fluctuation coefficient reference threshold, the current image data quality is judged to be in a high quality normal state;
[0100] When the deep learning model identifies an anomaly in image data, it first issues a low-level warning signal to initially alert traffic management personnel. Simultaneously, the system enters a verification phase, further analyzing the image and examining relevant area information to confirm whether an emergency has occurred. Prior to high-level confirmation, the traffic monitoring and accident warning system will not send a formal alert to the traffic management center, effectively avoiding excessive alerts.
[0101] When the deep learning model identifies an anomaly in the image data, it first issues a low-level warning signal to initially alert traffic management personnel, who then check the relevant area information to confirm whether an emergency has indeed occurred. Before a high-level confirmation, the traffic monitoring and accident warning system will not send a formal alert to the traffic management center, effectively avoiding excessive alarms. The specific steps are as follows:
[0102] When the image quality fluctuation coefficient IQF is greater than the preset image quality fluctuation coefficient reference threshold IQF ref When image quality fluctuates, a low-level warning signal is first issued. At this point, traffic management personnel are informed of image quality issues, but it is not yet determined whether it is an accident. Therefore, the role of this stage is to guide traffic monitoring and accident warning systems to issue timely warnings, but no formal alert is issued to the public.
[0103] After the low-level warning is issued, the verification phase begins. The image is further analyzed to confirm abnormalities. Using a quality analysis algorithm, a detailed inspection is performed on the abnormal fluctuation area in the image, focusing on whether there are significant traffic accident features (such as vehicle collisions, road obstacles, etc.) in the area. The information in this area is then compared with the previously preset accident feature pattern. The comparison formula is as follows:
[0104]
[0105] , where V q is the regional image quality fluctuation factor, which represents the image quality fluctuation factor of region R in the image, quantifies the degree of change of image quality in the region, and reflects the quality fluctuation of the region. s∈R is the pixel point in region R, which means that the summation is performed on each pixel s in region R. I s is the quality evaluation value of the s-th pixel in region R, I avg,R is the average quality of all pixels in region R, which is used to calculate the quality fluctuation of the region, σ I,R is the standard deviation of pixel quality in region R, indicating the degree of dispersion of image quality in the region, and |R| is the total number of pixels in region R, which serves as a normalization factor to ensure that the calculated quality fluctuation coefficient is independent of the region size;
[0106] By calculating and analyzing the volatility of key areas, the system can assess whether there are obvious abnormalities or accident characteristics in the area.
[0107] After the verification phase, the image data of key areas is fully analyzed and a high-level confirmation is performed based on the accident detection rules trained by the deep learning model. If the image quality fluctuation coefficient and regional analysis results meet the standards of a real accident, the alarm is upgraded to the formal level and the traffic management center is notified. The calculation formula is as follows:
[0108]
[0109] , where C q Represents the high-level confirmation value, ω is the weight coefficient of the accident feature, when C q When ≥1, the current event is considered an emergency and a formal alert is issued to the traffic management center.
[0110] The purpose of this step is to ensure that the system will make a final judgment and take action only based on comprehensive multiple verifications, so as to avoid unnecessary interference with traffic management caused by excessive alarms.
[0111] This step serves as a preliminary alert to traffic management personnel, warning them of the potential for an abnormal situation, but does not immediately trigger a full-scale response. Low-level warnings help avoid false alarms and overreactions, ensuring that managers remain vigilant until an incident is confirmed. The system then enters the verification phase, further analyzing the imagery and examining relevant area information to confirm whether an emergency has indeed occurred. Only before high-level confirmation will the traffic monitoring and accident warning system refrain from sending a formal alert to the traffic management center, effectively avoiding excessive alarms. This hierarchical warning and verification mechanism allows the system to accurately determine the necessity of alerts, thereby reducing the waste of resources and management pressure caused by false alarms.
[0112] The present invention effectively solves the problem of misjudgment caused by interference from on-site factors in traffic monitoring and accident warning systems through multi-level analysis methods such as image recognition technology, dynamic feature extraction, and deep learning model evaluation. Real-time acquisition and processing of image data enables the system to adapt to different traffic scenarios and environmental changes, ensuring high-quality feature extraction. By analyzing feature change trends in time and space and capturing abnormal fluctuations in a short period of time, the system can accurately identify potential traffic accidents and obstacles, and intelligently evaluate image status through deep learning models to avoid false warnings caused by factors such as light changes and color differences. Low-level early warning signals and verification stages ensure that no formal alarms are sent without high-level confirmation, thereby effectively reducing false warnings and excessive alarms, avoiding the system ignoring real emergencies due to alarm fatigue, and improving the response efficiency and accuracy of the system.
[0113] The present invention provides Figure 2 The highway accident warning system based on image recognition shown in the figure includes an image recognition and abnormal situation detection module, a real-time data acquisition and dynamic adaptation module, an image preprocessing and feature extraction module, a deep learning evaluation and intelligent judgment module, and a warning signal issuance and verification and confirmation module;
[0114] Image recognition and abnormality detection module, first, analyzes road traffic images through image recognition technology, detects various traffic elements in the image, and identifies abnormal situations in the image (such as traffic accidents, obstacles, vehicle stagnation, etc.);
[0115] Real-time data acquisition and dynamic adaptation module: During the image analysis process, it acquires image data in real time and generates corresponding data information, ensuring that the traffic monitoring and accident warning systems adapt to changing traffic scenarios in different time periods and providing the latest input data for subsequent preprocessing and feature extraction;
[0116] The image preprocessing and feature extraction module preprocesses the acquired raw image data and extracts key features reflecting abnormal conditions from the preprocessed image data. The extracted key features are analyzed within the detection window, and by analyzing the changing trends of the features in time and space, abnormal fluctuations in a short period of time are captured.
[0117] The deep learning evaluation and intelligent judgment module inputs the analyzed key features into the pre-learned deep learning model for intelligent evaluation to determine the current image data status;
[0118] Warning signal issuance and verification confirmation module: When the deep learning model evaluates that there is anomaly in the image data, it first issues a low-level warning signal to preliminarily alert traffic management personnel, and at the same time enters the verification stage. By further analyzing the image and checking the relevant area information, it is confirmed whether an emergency has indeed occurred. Before high-level confirmation, the traffic monitoring and accident warning system will not send a formal alarm to the traffic management center, thereby effectively avoiding excessive alarms.
[0119] The highway accident warning method based on image recognition provided in an embodiment of the present invention is implemented by the above-mentioned highway accident warning system based on image recognition. The specific methods and processes of the highway accident warning system based on image recognition are detailed in the embodiment of the highway accident warning method based on image recognition, and will not be repeated here.
[0120] The above formulas are all dimensionless and numerical calculations. The formulas are obtained by collecting a large amount of data and performing software simulation to obtain the most recent real situation. The preset parameters in the formulas are set by technicians in this field according to actual conditions.
[0121] The above description is merely illustrative of certain exemplary embodiments of the present invention. It goes without saying that those skilled in the art will be able to modify the described embodiments in various ways without departing from the spirit and scope of the present invention. Therefore, the above drawings and description are illustrative in nature and should not be construed as limiting the scope of protection of the claims.
[0122] It should be noted that, in this document, if there are relational terms such as first and second, etc., they are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device that includes the element.
[0123] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0124] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0125] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0126] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0127] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0128] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
[0129] The above description is merely illustrative of certain exemplary embodiments of the present invention. It goes without saying that those skilled in the art will be able to modify the described embodiments in various ways without departing from the spirit and scope of the present invention. Therefore, the above drawings and description are illustrative in nature and should not be construed as limiting the scope of protection of the claims.
Claims
1. A highway accident warning method based on image recognition, characterized in that: The following steps are involved: First, the road traffic images are analyzed using image recognition technology to detect various traffic elements in the images and identify abnormal situations in the images. During the image analysis process, image data is acquired in real time and corresponding data information is generated, ensuring that traffic monitoring and accident warning systems can adapt to changing traffic scenarios in different time periods and providing the latest input data for subsequent preprocessing and feature extraction; Preprocess the acquired raw image data and extract key features reflecting abnormal conditions from the preprocessed image data. The extracted key features are analyzed within the detection window. By analyzing the changing trends of the features in time and space, abnormal fluctuations in a short period of time are captured. The analyzed key features are input into the pre-learned deep learning model for intelligent evaluation to determine the current state of the image data; When the deep learning model identifies an anomaly in image data, it first issues a low-level warning signal to initially alert traffic management personnel. Simultaneously, the system enters a verification phase, further analyzing the image and examining relevant area information to confirm whether an emergency has occurred. Prior to high-level confirmation, the traffic monitoring and accident warning system will not send a formal alert to the traffic management center, effectively avoiding excessive alerts. Extract key features reflecting abnormal conditions from the preprocessed image data. The extracted features include the contrast difference between the background light and the foreground object in the image and the overall consistency and coherence of the image texture. Under the detection window, analyze the contrast difference between the background light and the foreground object in the image and the overall consistency and coherence of the image texture to generate a dynamic backlight impact reference value and a texture fragmentation reference value, respectively. The dynamic backlight impact reference value reflects the backlight effect produced by the light source in the image by quantifying the contrast difference between the background light and the foreground object in the image. The texture fragmentation reference value reflects whether there is texture fragmentation or discontinuity in the image region by quantifying the consistency and coherence of the texture in the image. The specific steps for analyzing the contrast difference between the background light and the foreground object in the image under the detection window to generate the dynamic backlight impact reference value are as follows: First, for each pixel in the image, the local contrast difference between the background light and the foreground object is calculated. The contrast difference calculation expression is as follows: , where is the contrast difference value, indicating that at point The contrast between the background light and the foreground object, is the midpoint of the image The background area brightness at is the midpoint of the image The brightness of the foreground object at Next, the local contrast differences are weighted and integrated to form a dynamic contrast difference model. The dynamic backlight impact value is calculated by introducing the time and space variation weighting function. The dynamic backlight impact value calculation expression is as follows: , where It's in time and spatial location Above, the intensity of the backlight’s influence on the foreground object in the image. is the Gaussian weighting factor, is the variance of the Gaussian distribution, controlling the weighted range, It represents the center coordinate of the reference point in the horizontal direction of the image. It represents the center coordinate of the reference point in the vertical direction of the image. is the time dynamic weighting factor; Based on dynamic backlight impact value , perform weighted averaging in the entire image window to generate a global dynamic backlight impact reference value. The calculation expression is as follows: , where It is the reference value of dynamic backlight impact.
2. The highway accident warning method based on image recognition according to claim 1, characterized in that: The specific steps for analyzing the overall consistency and coherence of the image texture in the detection window to generate the texture fragmentation reference value are as follows: First, the image is divided into several small blocks. The local texture complexity of each small block is calculated. The local binary pattern algorithm is used to extract texture features. The texture information is captured by calculating the grayscale difference between the pixel and its neighboring pixels. Then, based on the extracted texture features, the texture complexity of each block is calculated. The calculation expression is as follows: , where is the local texture complexity value, The first Row, No. The pixel value at the column position, Is the pixel value On its left Gray values of adjacent pixels, Is the pixel value above it and the grayscale values of adjacent pixels, and It is a hyperparameter that controls the sensitivity of grayscale difference and determines the weighting degree of grayscale difference of neighboring pixels in the formula. Control and left neighbor Sensitivity to pixel differences, Control and upper neighbors Sensitivity to pixel differences; After the texture complexity of all small blocks is calculated, the local texture complexity is comprehensively analyzed to obtain the reference value of texture fragmentation of the whole image. The weighted fusion method based on local feature distribution is used to calculate the texture complexity of each small block. , weight coefficients are introduced to enhance complex areas, and the calculation expression is as follows: , where is the reference value of texture fragmentation, is the total number of image blocks, It is a local weight function used to adjust the contribution of each local block to the overall texture fragmentation. is the position in the image The local texture complexity value at It is the median of the texture complexity value of the local area, which is used to measure the standard state of the overall texture of the image. It is an exponential factor that controls the degree to which the difference is amplified or reduced.
3. The highway accident warning method based on image recognition according to claim 1, characterized in that: The dynamic backlight impact reference value and texture fragmentation reference value generated after analysis are input into the pre-learned deep learning model, and the image quality fluctuation coefficient is generated by the deep learning model. The current image data status is judged by the image quality fluctuation coefficient.
4. The highway accident warning method based on image recognition according to claim 3, characterized in that: The image quality fluctuation coefficient generated when the pre-learned deep learning model is used to judge the current image data status is compared with the pre-set image quality fluctuation coefficient reference threshold to judge the image quality. The judgment steps are as follows: If the image quality fluctuation coefficient is greater than the pre-set image quality fluctuation coefficient reference threshold, the current image data quality is judged to be in a low-quality abnormal state; if the image quality fluctuation coefficient is less than or equal to the pre-set image quality fluctuation coefficient reference threshold, the current image data quality is judged to be in a high-quality normal state.
5. The highway accident warning method based on image recognition according to claim 4, characterized in that: When the deep learning model identifies an anomaly in the image data, it first issues a low-level warning signal to initially alert traffic management personnel, who then check the relevant area information to confirm whether an emergency has indeed occurred. Before a high-level confirmation, the traffic monitoring and accident warning system will not send a formal alert to the traffic management center, effectively avoiding excessive alarms. The specific steps are as follows: When the image quality fluctuation coefficient Greater than the preset image quality fluctuation coefficient reference threshold When image quality fluctuates, a low-level warning signal is first issued. At this point, traffic management personnel are informed of image quality issues, but it is not yet determined whether it is an accident. Therefore, the role of this stage is to guide traffic monitoring and accident warning systems to issue timely warnings, but no formal alert is issued to the public. After the low-level warning is issued, the verification phase begins. The image is further analyzed to confirm abnormalities. A quality analysis algorithm is used to conduct a detailed inspection of abnormal fluctuation areas in the image, focusing on whether there are significant traffic accident characteristics in the area. The information in this area is then compared with the previously preset accident characteristic pattern. The comparison formula is as follows: , where is the regional image quality fluctuation factor, which indicates the area in the image Image quality fluctuation factor, It is a region The pixels in the area indicate that the sum is Each pixel in Conducted, It is a region Middle The quality evaluation value of pixels, It is a region The average quality of all pixels in It is a region The standard deviation of pixel quality in It is a region The total number of pixels in ; After the verification phase, the image data of key areas is fully analyzed and a high-level confirmation is performed based on the accident detection rules trained by the deep learning model. If the image quality fluctuation coefficient and regional analysis results meet the standards of a real accident, the alarm is upgraded to the formal level and the traffic management center is notified. The calculation formula is as follows: , where Indicates a high-level confirmation value, is the weight coefficient of the accident characteristics, when When the current incident is considered an emergency, a formal alert is issued to the traffic management center.
6. A highway accident warning system based on image recognition, used to implement the highway accident warning method based on image recognition as described in any one of claims 1 to 5, characterized in that: It includes image recognition and abnormal situation detection module, real-time data acquisition and dynamic adaptation module, image preprocessing and feature extraction module, deep learning evaluation and intelligent judgment module, and early warning signal issuance and verification confirmation module; The image recognition and anomaly detection module uses image recognition technology to analyze road traffic images, detect various traffic elements in the images, and identify anomalies in the images; Real-time data acquisition and dynamic adaptation module: During the image analysis process, it acquires image data in real time and generates corresponding data information, ensuring that the traffic monitoring and accident warning systems can adapt to changing traffic scenarios in different time periods and providing the latest input data for subsequent preprocessing and feature extraction; The image preprocessing and feature extraction module preprocesses the acquired raw image data and extracts key features reflecting abnormal conditions from the preprocessed image data. The extracted key features are analyzed within the detection window, and by analyzing the changing trends of the features in time and space, abnormal fluctuations in a short period of time are captured. The deep learning evaluation and intelligent judgment module inputs the analyzed key features into the pre-learned deep learning model for intelligent evaluation and determines the current image data status; In the warning signal issuance and verification confirmation module, when the deep learning model assesses that there are abnormalities in the image data, it first issues a low-level warning signal to preliminarily alert traffic management personnel, and at the same time enters the verification stage. By further analyzing the image and checking the relevant area information, it is confirmed whether an emergency has indeed occurred. Before high-level confirmation, the traffic monitoring and accident warning system will not send a formal alarm to the traffic management center, thereby effectively avoiding excessive alarms.
Citation Information
Patent Citations
Construction site unsupervised extraction method based on remote-sensing image
CN103106655A
Backlight image enhancement method based on foreground extraction
CN112801896A