Expressway traffic image enhancement method in complex weather
By calculating the attenuation coefficient and separation of the detail layer of the degraded image, combined with adaptive Gaussian filtering and Sigmoid transformation, the color and detail recovery problems of highway traffic images in complex weather are solved, and the accurate perception of traffic situations in all weather and the accuracy of traffic accident prediction is achieved.
Patent Information
- Application Number
- CN202511011197.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-22
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2045-07-22
AI Technical Summary
The prior art is difficult to effectively restore the colors and details of highway traffic images in complex weather, resulting in a reduction in target recognition accuracy and cannot meet the accuracy requirements of intelligent traffic systems for accurate perception of all-weather and road network status and traffic accident prediction.
By calculating the attenuation coefficient of the degraded image, the detail layer is separated and using adaptive Gaussian filtering and Sigmoid transformation, the detail layer and natural color of the traffic image are enhanced, and combined with the human eye visual perception mechanism, the color and contrast of the image are dynamically corrected.
Significantly improve the appearance color and contrast of the image, improve image clarity, provide more reliable visual information, improve the accuracy of traffic target detection and traffic status judgment, and enhance the accuracy of traffic accident prediction.
Smart Images

Figure CN120510077A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of traffic image processing, and in particular to a method for enhancing highway traffic images under complex weather conditions. Background Art
[0002] In areas such as intelligent driving and traffic situation awareness, highway accidents are becoming increasingly common and impactful as traffic volume increases. Images, as important information carriers, often suffer from degradation such as color degradation, reduced contrast, and blurred details due to weather conditions such as haze and sandstorms, leading to reduced object recognition accuracy. Proposing a simple and effective image enhancement method is crucial to providing high-quality input features for traffic status monitoring systems and traffic accident prediction models.
[0003] Generally speaking, methods for enhancing degraded images can be divided into three categories: image enhancement methods based on physical models, image enhancement methods based on non-physical models, and image enhancement methods based on deep learning. Physical model-based image enhancement methods first establish a mathematical model based on the imaging mechanism of degraded images in complex weather conditions. They then analyze the unknown parameters in the model using manual prior knowledge or assumptions, and infer the enhanced, clear image. While these methods can achieve a certain degree of enhancement in specific degraded scenarios, the harshness and variability of complex weather conditions can easily lead to instability in prior knowledge, resulting in varying degrees of robustness and stability in the enhancement effect.
[0004] Image enhancement methods based on non-physical models often enhance the image by modifying the pixel values or histogram distribution to enhance overall or local contrast and improve color. While computationally low, these methods lack detail in the enhanced results due to a lack of consideration of the degradation mechanisms of degraded images.
[0005] Image enhancement methods based on deep learning leverage the powerful feature learning and computing capabilities of deep learning networks to obtain the final enhanced image. Such methods can improve the visual quality of degraded images to a certain extent, but they usually rely on datasets containing a large number of paired "degraded images-clear images" to train deep learning networks. These datasets are difficult to obtain under complex and harsh weather conditions, resulting in significant limitations for such methods.
[0006] In particular, existing image enhancement technologies, such as atmospheric scattering correction based on physical models, histogram equalization based on non-physical models, or end-to-end restoration based on deep learning, are effective in general scenarios but are difficult to adapt to the unique degradation characteristics of highway traffic images.
[0007] Key targets such as license plates and road signs occupy a very small proportion in the image. Traditional global enhancement methods (such as histogram stretching) will over-amplify background noise, causing the target to be submerged; vehicle details and thick fog coexist in the same picture, and the fog concentration and rain and snow intensity vary dramatically with spatial position. Physical models with fixed parameters cannot accurately model local attenuation. Color information such as traffic lights and warning signs is directly related to machine decision-making. Existing enhancement methods are prone to introduce color cast or saturation distortion when improving contrast, such as red traffic lights appearing white, causing machine misjudgment.
[0008] These issues lead to existing restoration methods often suffering from low illumination, unclear lane markings, and unnatural colors in highway scenes. This makes it impossible to accurately perceive traffic conditions, anomalies, and road construction conditions in all weather conditions and across the entire road network, making it difficult to meet the stringent image reliability requirements of intelligent transportation systems. Therefore, designing a method to robustly restore the color and details of traffic images under complex weather conditions has become an urgent technical challenge. Summary of the Invention
[0009] The purpose of the present invention is to solve the defects of poor image restoration quality and unstable performance in the prior art and to provide a method for enhancing highway traffic images under complex weather conditions to solve the above problems.
[0010] In order to achieve the above object, the technical solution of the present invention is as follows:
[0011] A method for enhancing highway traffic images under complex weather conditions comprises the following steps: 11) Obtain degraded images of highways under severe weather conditions; 12) Calculate the attenuation coefficient of the degraded image; 13) Calculate the detail layer of the degraded image based on the attenuation coefficient; 14) Enhance the detail layer of degraded images; 15) Obtaining traffic image enhancement: Restoring the natural color of the detail layer of the enhanced degraded image.
[0012] The step of calculating the attenuation coefficient of the degraded image comprises the following steps: 21) Degrade the image The L channel is divided into local pixel blocks, and the mean of each local pixel block is calculated and variance , the specific formula is: , , in, Represents the local pixel block of the L channel of the degraded image at the position coordinate The pixel value at Represents the coordinates of the upper left corner of the image block, M and N represent the width and height of the local pixel block respectively; 22) Smoothing the local mean over the entire image through guided filtering and global variance : , , in, express and The position coordinates on the entire image, represents guided filtering, Represents the brightness component of the traffic image in the LAB color space; 23) Use The mean at and variance Calculating attenuation distribution : , Among them, max() and min() are the maximum and minimum value functions respectively; 24) Calculate auxiliary matrix based on attenuation distribution and : , , in is the attenuation distribution The maximum value of Calculate the matrix : , Calculate the attenuation coefficient: , in, is the attenuation coefficient, is a matrix H and W are the width and height of the entire image respectively.
[0013] The step of calculating the detail layer of the degraded image based on the attenuation coefficient comprises the following steps: 31) Through Gaussian filter and Convolution obtains the base layer of the degraded image: , in, express and The position coordinates on the entire image, represents the base layer of the degraded image, The attenuation coefficient is Gaussian filter, is the local mean, is the global variance, is a degraded image represented by position coordinates; 32) Use the difference between the degraded image and the base layer to obtain the detail layer: , in, is the detail layer of the degraded image, is the weight coefficient: , in, is the attenuation distribution.
[0014] The method of enhancing the detail layer of the degraded image comprises the following steps: 41) Calculate the local contrast and Laplace variance of the degraded image: , , in, is the local contrast of the degraded image, is the Laplace variance of the degraded image, is the result of convolution of the degraded image with the Laplace filter, for The mean of is a degraded image with position coordinate representation, is the local mean of the entire image, H and W are the width and height of the entire image respectively, express and Position coordinates on the entire image; 42) Calculate the enhancement coefficient of the detail layer of the degraded image : ; 43) Based on the enhancement factor Enhance the detail layer of a degraded image: , in, is the enhanced detail layer of the degraded image with position coordinate representation, is the detail layer of the degraded image.
[0015] The acquisition of the traffic image enhanced image comprises the following steps: 51) Design local sensitivity coefficients for human visual perception : , in, is the attenuation distribution, express and Position coordinates on the entire image; 52) Designing the global sensitivity coefficient of human visual perception : , in, is the threshold, is the detail layer of the enhanced degraded image; 53) Comprehensive local sensitivity coefficient and the global sensitivity coefficient Get the comprehensive sensitivity coefficient of human vision to color and contrast perception : ; 54) Apply Sigmoid transform to get the final enhanced image : , in, Refers to a As the base, is the exponent of the variable.
[0016] A computer-readable storage medium stores a computer program. When the computer program is executed by a processor, a method for enhancing highway traffic images under complex weather conditions can be implemented.
[0017] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When executed by the processor, a method for enhancing highway traffic images under complex weather conditions can be implemented.
[0018] Beneficial effects
[0019] Compared with existing technologies, the present invention's method for enhancing highway traffic images in complex weather conditions is based on adaptive Gaussian filtering and Sigmoid transformation, which can effectively improve the image's appearance color and enhance its contrast, brightness, and clarity. This provides more reliable visual information for accurate perception of traffic conditions, traffic anomalies, road construction, and other conditions in all weather and across the entire road network. The enhanced high-quality images improve the accuracy of traffic target detection and traffic flow status discrimination, thereby increasing the accuracy of traffic accident prediction in severe weather.
[0020] The present invention uses the local mean and local variance to design an approximate characterization factor of the image attenuation degree, and thus establishes an adaptive Gaussian filter to eliminate redundant color cast information and extract more interesting structural and texture images; then the detail layer of the image is transferred to the gradient domain for expression, and the global mean of the attenuation factor is used to stretch the gradient information of different color channels to capture significant details and contour information in the image; finally, based on the information perception mechanism of the human retina, a Sigmoid mapping function is designed to dynamically simulate the nonlinear mapping relationship of human color perception to achieve correction of the dynamic range and color of the enhanced image. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 is a method sequence diagram of the present invention;
[0022] Figure 2 It is the algorithm flow chart of the present invention;
[0023] Figure 3 This is a comparison diagram of the effects involved in the present invention. DETAILED DESCRIPTION
[0024] In order to provide a further understanding and appreciation of the structural features and effects achieved by the present invention, a detailed description is provided with reference to preferred embodiments and accompanying drawings as follows:
[0025] like Figure 1 and Figure 2 As shown, the method for enhancing highway traffic images under complex weather conditions according to the present invention comprises the following steps:
[0026] The first step is to obtain degraded images of the highway under severe weather conditions.
[0027] The second step is to calculate the attenuation coefficient of the degraded image.
[0028] Due to the complexity and high scene dependency of traffic scene image degradation patterns (for example, light attenuation, scattering, and noise characteristics vary significantly due to environmental factors such as haze, dust, and low light), a single, fixed attenuation coefficient model is difficult to effectively adapt to all degradation scenarios. The core purpose of designing specific attenuation coefficients for different scenarios is to estimate the degree of degradation in different scenarios. This targeted design enables more accurate estimation of scene-dependent degradation, enabling more refined compensation in the subsequent restoration process, effectively avoiding over-compensation or under-compensation issues caused by a single model. Ultimately, it significantly improves the quality and realism of the restored images, as well as their usability in subsequent intelligent transportation system applications (such as license plate recognition and behavior analysis).
[0029] (1) Degrade the image The L channel is divided into local pixel blocks, and the mean of each local pixel block is calculated and variance , the specific formula is: , , in, Represents the local pixel block of the L channel of the degraded image at the position coordinate The pixel value at Represents the coordinates of the upper left corner of the image block, M and N represent the width and height of the local pixel block respectively.
[0030] (2) Smoothing the local mean of the entire image through guided filtering and global variance : , , in, express and The position coordinates on the entire image, represents guided filtering, Represents the brightness component of the traffic image in the LAB color space.
[0031] (3) Use The mean at and variance Calculating attenuation distribution : , Among them, max() and min() are the maximum and minimum value functions respectively.
[0032] (4) Calculate the auxiliary matrix based on the attenuation distribution and : , , in is the attenuation distribution The maximum value of Calculate the matrix : , Calculate the attenuation coefficient: , in, is the attenuation coefficient, is a matrix H and W are the width and height of the entire image respectively.
[0033] The third step is to calculate the detail layer of the degraded image based on the attenuation coefficient.
[0034] In traffic images under complex weather conditions, critical details (such as license plate characters, traffic sign edges, pedestrian outlines, and vehicle textures) are often intermingled with noise, artifacts, and overall illumination / color degradation within the same or similar frequency range. A specifically designed step separates the detail layer, with the core goal of physically isolating and highlighting the image's high-frequency components. This separation enables subsequent restoration algorithms to accurately and specifically enhance and restore details that represent real-world scene structure (edges and textures), while minimizing the risk of misinterpreting intervening noise or low-frequency degradation components (such as large-scale color casts and uniform blur).
[0035] (1) Through Gaussian filter and Convolution obtains the base layer of the degraded image: , in, express and The position coordinates on the entire image, represents the base layer of the degraded image, The attenuation coefficient is Gaussian filter, is the local mean, is the global variance, is a degraded image with position coordinate representation.
[0036] (2) Obtain the detail layer using the difference between the degraded image and the base layer: , in, is the detail layer of the degraded image, is the weight coefficient: , in, is the attenuation distribution.
[0037] The fourth step is to enhance the detail layer of the degraded image.
[0038] By enhancing the detail layer of the degraded image, the controllability and effectiveness of the restoration process are significantly improved. The final restored image is qualitatively improved in terms of clarity, detail richness and visual usability, which is particularly beneficial for improving the accuracy of subsequent intelligent transportation systems (such as license plate recognition, violation detection, and behavior analysis).
[0039] (1) Calculate the local contrast and Laplace variance of the degraded image: , , in, is the local contrast of the degraded image, is the Laplace variance of the degraded image, is the result of convolution of the degraded image with the Laplace filter, for The mean of is a degraded image with position coordinate representation, is the local mean of the entire image, H and W are the width and height of the entire image respectively, express and The position coordinates on the entire image.
[0040] (2) Calculate the enhancement coefficient of the detail layer of the degraded image : .
[0041] (3) Based on the enhancement coefficient Enhance the detail layer of a degraded image: , in, is the enhanced detail layer of the degraded image with position coordinate representation, is the detail layer of the degraded image.
[0042] The fifth step is obtaining an enhanced traffic image: restoring the natural colors of the detail layer of the enhanced degraded image. While enhancing the detail layer significantly improves clarity during the restoration of degraded traffic images, it can easily introduce nonlinear chromatic aberrations, manifesting as color casts, unnatural color spots, or saturation anomalies in the enhanced areas. This distortion is particularly detrimental in traffic scenes containing critical color information (such as traffic light status, warning sign colors, vehicle taillights, and special paint jobs), potentially leading to misjudgments in subsequent intelligent analysis systems (such as violation identification and event detection). Therefore, a dedicated step is crucial to restoring the natural colors of the enhanced detail layer. Its core purpose is to correct for localized chromatic aberrations caused by high-frequency detail enhancement algorithms. By constraining color variations within a reasonable range consistent with physical lighting and inherent object properties, the restored image is not only sharp but also exhibits high color fidelity and visual naturalness, thus ensuring the reliability of the restored results and accurate decision-making in traffic monitoring and analysis.
[0043] (1) Designing the local sensitivity coefficient of human visual perception : , in, is the attenuation distribution, express and The position coordinates on the entire image.
[0044] (2) Designing the global sensitivity coefficient of human visual perception : , in, is the threshold, is the detail layer of the enhanced degraded image.
[0045] (3) Comprehensive local sensitivity coefficient and the global sensitivity coefficient Get the comprehensive sensitivity coefficient of human vision to color and contrast perception : .
[0046] (4) Apply Sigmoid transform to obtain the final enhanced image : , in, Refers to a As the base, is the exponent of the variable.
[0047] In order to verify the effectiveness of the highway traffic image enhancement method under complex weather conditions described in this invention, several common traffic-degraded images were selected to test and verify their enhancement performance, namely Figure 3 (a), (b), (c) and (d) in Fig. 2. It can be seen that the original traffic image has complex degradation phenomena such as fogging, color cast and low illumination. The DCP method can eliminate the fogging effect of the light fog image, such as Figure 3 (c) and Figure 3 As shown in (d), the contrast of the processed image is improved, but Figure 3 (a) and Figure 3 For the low-light or dense fog traffic image shown in (b), this method fails to achieve satisfactory enhancement effect and further aggravates the color cast. Similarly, the CAP method can only effectively process traffic images in light fog scenes. Compared with the above two methods, the DAACC method is better in eliminating the fog effect and has a more significant contrast enhancement effect. However, since the complexity and high scene dependence of the traffic scene image degradation pattern in complex traffic scenes are not taken into account, the processing results will have large dark areas and a bluish-green background, as shown in Figure 2. Figure 3 (c) and Figure 3 As shown in (d). The BCDP method has limited enhancement effect on these complex traffic images and introduces additional color cast phenomena, such as Figure 3 The sky area shown in (b) has a red tint. Figure 3 (c) and Figure 3 Image (d) shows a yellowish background hue. MR methods only reduce the hazy background, but the processed image still exhibits a certain degree of residual haze, which hinders the display of image details. Furthermore, these methods perform poorly in improving brightness and are unsuitable for traffic image enhancement under complex weather conditions, such as cloudy and foggy days. Compared to these methods, the method presented in this paper fully considers the degradation mechanisms of traffic images in complex weather conditions, including illumination, absorption, and scattering. By precisely stripping away detail layers, it effectively extracts high-frequency details of key traffic elements (such as lane markings and vehicles), while simultaneously filtering out low-frequency noise and color casts from the original degraded image. Ultimately, leveraging the human visual perception mechanism, the processed image produced by this method exhibits natural, realistic color saturation, rich details, and ample brightness. Key road information, such as vehicles, lane markings, and LCD signage, is clearly visible, ensuring the integrity and reliability of the layered processing mechanism used in this paper for enhancing the quality of degraded traffic images, meeting the analytical requirements of intelligent transportation systems.
[0048] In addition, the present invention uses three evaluation indicators to comprehensively evaluate the image enhancement performance of different methods: block-based contrast quality index (PCQI), newly added visible edge ( ) and the normalized mean gradient of the visible edge ( ). The three evaluation indicators of the enhancement performance of each method on the test image are shown in Table 1, Table 2, and Table 3. It can be seen that the method of the present invention has achieved the best performance in all evaluation indicators on the test image, which is significantly higher than the current mainstream image enhancement methods. Specifically, compared with the suboptimal method, the PCQI index of the present invention has increased by at least 3.09% and at most 34.75%, which fully demonstrates the effectiveness and robustness of the method of the present invention in enhancing the contrast quality of traffic images under complex weather conditions; at the same time, the method of the present invention has and The indicators were improved by at least 14.32% and 80.38%, and by as much as 64.93% and 314.68%, respectively, indicating that the method of the present invention performs excellently in enhancing key detail information and image color expression of traffic images.
[0049] Table 1 Comparison of PCQI indicators of each method’s enhancement performance on the test image
[0050] DCP CAP DAACC BCDP MR The present invention (a) 1.139 1.039 1.000 0.987 1.002 1.477 (b) 0.779 0.801 0.876 0.892 0.761 1.202 (c) 0.880 0.748 0.590 1.053 0.780 1.097 (d) 0.953 0.869 0.761 1.067 0.911 1.100
[0051] Table 2 Enhancement performance of each method on the test image Quantitative comparison of indicators
[0052] DCP CAP DAACC BCDP MR The present invention (a) 4.865 1.904 4.377 2.449 0.980 5.948 (b) 2.049 0.519 0.968 3.117 0.190 5.141 (c) 0.211 0.337 0.095 0.167 0.218 0.400 (d) 0.284 0.281 0.257 0.349 0.243 0.399
[0053] Table 3 Enhancement performance of each method on the test image Quantitative comparison of indicators
[0054] DCP CAP DAACC BCDP MR The present invention (a) 3.056 1.667 2.790 1.689 1.477 11.181 (b) 0.989 0.874 2.124 1.559 0.713 8.808 (c) 1.101 1.002 1.314 1.321 0.974 2.618 (d) 1.291 1.201 1.431 1.489 1.170 2.686
[0055] The above shows and describes the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions merely illustrate the principles of the present invention. Various changes and modifications may be made to the present invention without departing from the spirit and scope of the present invention. Such changes and modifications are intended to fall within the scope of the present invention. The scope of protection claimed by the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for enhancing highway traffic images under complex weather conditions, characterized in that: The following steps are involved: 11) Obtain degraded images of highways under severe weather conditions; 12) Calculate the attenuation coefficient of the degraded image; 13) Calculate the detail layer of the degraded image based on the attenuation coefficient; 14) Enhance the detail layer of degraded images; 15) Obtaining traffic image enhancement: Restoring the natural color of the detail layer of the enhanced degraded image.
2. The method for enhancing highway traffic images under complex weather conditions according to claim 1, characterized in that: The step of calculating the attenuation coefficient of the degraded image comprises the following steps: 21) Degrade the image The L channel is divided into local pixel blocks, and the mean of each local pixel block is calculated and variance , the specific formula is: , , in, Represents the local pixel block of the L channel of the degraded image at the position coordinate The pixel value at Represents the coordinates of the upper left corner of the image block, M and N represent the width and height of the local pixel block respectively; 22) Smoothing the local mean over the entire image through guided filtering and global variance : , , in, express and The position coordinates on the entire image, represents guided filtering, Represents the brightness component of the traffic image in the LAB color space; 23) Use The mean at and variance Calculating attenuation distribution : , Among them, max() and min() are the maximum and minimum value functions respectively; 24) Calculate auxiliary matrix based on attenuation distribution and : , , in is the attenuation distribution The maximum value of Calculate the matrix : , Calculate the attenuation coefficient: , in, is the attenuation coefficient, is a matrix H and W are the width and height of the entire image respectively.
3. The method for enhancing highway traffic images under complex weather conditions according to claim 1, characterized in that: The step of calculating the detail layer of the degraded image based on the attenuation coefficient comprises the following steps: 31) Through Gaussian filter and Convolution obtains the base layer of the degraded image: , in, express and The position coordinates on the entire image, represents the base layer of the degraded image, The attenuation coefficient is Gaussian filter, is the local mean, is the global variance, is a degraded image represented by position coordinates; 32) Use the difference between the degraded image and the base layer to obtain the detail layer: , in, is the detail layer of the degraded image, is the weight coefficient: , in, is the attenuation distribution.
4. The method for enhancing highway traffic images under complex weather conditions according to claim 1, characterized in that: The method of enhancing the detail layer of the degraded image comprises the following steps: 41) Calculate the local contrast and Laplace variance of the degraded image: , , in, is the local contrast of the degraded image, is the Laplace variance of the degraded image, is the result of convolution of the degraded image with the Laplace filter, for The mean of is a degraded image with position coordinate representation, is the local mean of the entire image, H and W are the width and height of the entire image respectively, express and Position coordinates on the entire image; 42) Calculate the enhancement coefficient of the detail layer of the degraded image : ; 43) Based on the enhancement coefficient Enhance the detail layer of a degraded image: , in, is the enhanced detail layer of the degraded image with position coordinate representation, is the detail layer of the degraded image.
5. The method for enhancing highway traffic images in complex weather conditions according to claim 1, characterized in that: The acquisition of the traffic image enhanced image comprises the following steps: 51) Design local sensitivity coefficients for human visual perception : , in, is the attenuation distribution, express and Position coordinates on the entire image; 52) Designing the global sensitivity coefficient of human visual perception : , in, is the threshold, is the detail layer of the enhanced degraded image; 53) Comprehensive local sensitivity coefficient and the global sensitivity coefficient Get the comprehensive sensitivity coefficient of human vision to color and contrast perception : ; 54) Apply Sigmoid transform to get the final enhanced image : , in, Refers to a As the base, is the exponent of the variable.
6. A computer-readable storage medium, characterized in that The storage medium stores a computer program. When the computer program is executed by the processor, the method for enhancing highway traffic images in complex weather conditions as described in any one of claims 1 to 5 can be implemented.
7. A computer device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the method for enhancing highway traffic images under complex weather conditions as described in any one of claims 1 to 5 can be realized.
Citation Information
Patent Citations
Method for improving image definition in foggy days based on imaging model
CN103440623A
Infrared and weak visible image fusion method based on Cauchy ambiguity function
CN109035189A
Underwater image color correction method based on complex underwater imaging model
CN113538276A
Underwater color cast image sharpening method based on affine transformation
CN113962890A
Image adaptive sharpening method and system based on block ambiguity estimation
CN116596780A
Cited By
Environment perception and decision-making method and system of large model in automatic driving
CN120766249A
Image enhancement method based on depth information guidance
CN122199317A