Abstract
Traffic sign recognition is of great significance to promote traffic sustainability and maintain traffic safety. GPS monitoring systems and advanced autonomous vehicles are often heavily reliant on camera imagery. Algorithms based on dark channel prior are susceptible to color distortion when processing traffic images containing bright sky or high-brightness areas, which can negatively impact the identification of traffic signals and signage located in elevated positions. To address this issue, this paper proposes a dehazing algorithm (SRSTO) that combines sky region segmentation and transmittance optimization. Firstly, the gradient, brightness and saturation information are calculated, followed by the construction of a threshold function used in area segmentation. This approach is utilized to partition the image into areas not containing sky highlights and the area that contains them. Subsequently, the dark channel images of the sky and the non-sky regions are acquired, morphological operations are further performed in layers and blocks, and then the atmospheric scattered light value is calculated. Secondly, the functional relationship between the transmittance of the sky region and the brightness of the image is constructed, the transmittance of the sky and the non-sky region are optimized, and the transmittance map is further improved by using guided filtering. A simulated annealing algorithm is employed to intelligently optimize parameters such as sky segmentation threshold and sky brightness area transmittance, followed by improving the adaptability of the algorithm. Finally, combined with Gaussian filtering and Sobel edge enhancement, the image brightness is further adjusted. Using Information Entropy and NIQE as objective evaluation indexes, combined with subjective evaluation, it is concluded that the proposed method has good convergence and self-adaptive ability, and the objective indexes and subjective effects are better, especially for the hazed images containing air traffic signs.
Keywords
Introduction
Modern, intelligent traffic monitoring systems can be intuitively used to track the escape direction of hit-and-run vehicles, the vehicle type, color, and license plate number. However, on hazy days, the imaging equipment is affected by the scattering and absorption of atmospheric suspended particles and atmospheric light participation in the imaging, the image contrast becomes reduced, and the details are blurred, greatly reducing image quality [1]. Thus, the normal operation of the outdoor vision system is greatly affected, with additional difficulty for traffic control, and significantly increased risks and hidden dangers to safety protection. Image restoration methods mainly include traditional spatial filtering and frequency domain filtering [2], differential equation algorithm [3] and deep learning algorithm [4, 5]. For image dehazing, Nayer and Narasimha [6, 7] provided a detailed description and derivation of the atmospheric scattering model, which was widely referenced by later researchers [8, 9] as the theory of image dehazing. At present, image dehazing methods are mainly divided into deep learning-based forms and those based on traditional mathematical and physical models. Deep learning dehazing algorithms are mainly based on neural networks [10, 11], while parameter estimation algorithms are based on adversarial neural networks [12, 13]. The latter can often achieve better dehazing results because of the participation of data training. However, constructing datasets is often difficult, and many are artificially made. For example, it is not easy to form adaptive processing for images in real life [13–15]. Traditional dehazing algorithms focus on analyzing the main reasons for the degradation of hazy images from the perspective of mathematics and physics, and they set parameters and establish mathematical models according to the characteristics of hazy images. The classical dehazing methods include the dark channel prior [16, 17] and color fading first algorithms [18, 19]. He et al. [16] made the first breakthrough in image dehazing by proposing the dark channel prior based method for single image dehazing. However, the restored image was prone to color distortion. According to Zhu et al. [20], the fog concentration at any pixel of the haze-containing image is proportional to the difference between the brightness and saturation of the pixel. Thus, a mathematical model of color pre-decay was constructed, and the transmission was modified to optimize the dehazing effect. Guided filtering was used instead of soft matting to optimize the transmission images and suppress noise [21]. Another study combined dark channel prior and bright channel prior with a multi-scale retina algorithm to dynamically optimize the transmission map [22]. A global dehazing method (IDGCP) was proposed by using gamma correction preprocessing (GCP) and uniform virtual transformation on hazy images, which reduced the processing time [23]. However, due to the inherent limitations of the atmospheric scattering model (ASM), the fuzzy effect will appear in the restoration results. To solve this problem, Ju et al. [17] obtained an enhanced ASM (EASM) by introducing the light absorption coefficient into ASM, then developed the gray-world-assumption-based technique called IDE to enhance hazy images. To balance luminance and contrast, Liu et al. [24] reformulated the haze removal problem into a luminance reconstruction scheme. Bui et al. [25] developed a color-ellipsoid-prior-based image dehazing technology by jointly considering contrast and over-saturation. To further study the characteristics of hazy image and realize dehazing images with sky regions, Ni et al. [26] proposed a traffic image dehazing method that combines dark channel prior and the Retinex model, and optimized the dehazing effect through the transmission and filtering algorithm.
Traffic lights and signs are often located at great heights and are easily affected by the haze in the sky. Dehazing methods based on dark channel prior are suitable for hazed images with moderate illumination. However, due to channel selection and the error in estimating the transmittance of high-brightness areas, the restored image becomes dark, and high-brightness areas such as the sky and rivers are prone to mosaic effects and color distortion. This distortion phenomenon can be corrected based on sky region segmentation. The selection of segmentation threshold is often directly affected by the depth and brightness of the hazy image, which makes accurate selection challenging. To solve these problems, we propose a haze removal algorithm (SRSTO) that combines sky region segmentation and transmittance optimization, and then use the simulated annealing algorithm to help optimize the parameters. The main contributions of SRSTO are as follows:
(1) By analyzing the statistical characteristics of a large number of hazy images, the functional mapping relationship between the sky segmentation threshold and the gradient, the saturation information and the average brightness is constructed, and the functional relationship between the sky transmission and the average brightness is given.
(2) Once the image segmentation is complete, the regions without and with sky are separated, and the dark channel images are smoothed and filtered to remove noise. The atmospheric light value in each block is obtained using the block idea, and the transmission map is further optimized by using guided filtering to improve the dehazing effect of the model.
(3) Simulated annealing optimization algorithm is used to obtain the adaptive coefficient, and the parameter value law is found to improve the convergence and adaptability of the algorithm. The experimental results demonstrate that the proposed algorithm performs efficiently in dehazing images, especially those that include aerial traffic signs.
Related works
The algorithm based on sky segmentation is combined with the dark channel prior to realizing single traffic image dehazing. Preprocessing by the sky segmentation algorithm can help dehazing to be more targeted and purposeful [35]. Zhou et al. [27] used the mean shift technique and the prior information of the sky color rule to obtain the sky area of the foggy image, and introduced an adaptive threshold constraint based on the sky area to estimate the atmospheric light; however, the selection of the sky segmentation threshold is difficult. Certain scholars [28] applied the particle swarm optimization (PSO) algorithm to the Otsu segmentation method to accurately segment sky and non-sky regions, and achieved a good segmentation effect. Meanwhile, the network weight of the particle swarm optimization algorithm encoding and the selection of genetic operators are sometimes cumbersome, and the model will easily fall into a local optimal solution. The simulated annealing algorithm can comprehensively optimize the parameters when the objective function is set [29]. Algorithms based on dark channel priors have made great achievements in image dehazing [30–32]. To address the issue of the dark channel prior dehazing algorithm degrading sky scenes, a simple algorithm was proposed [30] to identify and replace the sky region in the original image in the DCP-processed image, resulting in a dehazed image with a natural-looking sky region. In [31], the authors introduced a method using dark channel priors and median filtering to restore and enhance images affected by aerosol scattering. The experimental results showed that the method outperforms existing algorithms in terms of image quality. Based on the dark channel prior algorithm, Haosu S et al. [32] used texture function and gradient and texture function optimization for the bright area and non-bright area of the image, respectively, and achieved a better dehazing effect. To reduce the halo effect of the DCP algorithm, a new strategy was adopted to compute the dual transmission maps using the dark channel and atmospheric light [33], while in this method, the image darkens after dehazing. In this paper, based on sky segmentation, the transmittance of the sky area and non-sky area is optimized, and the Gaussian filter and edge enhancement algorithms are used to further adjust the image brightness.
Simulated Annealing Algorithm [36]
The simulated annealing (SA) algorithm begins with a higher initial temperature and combines probability characteristics to randomly search for the optimal global solution of the objective function from the solution space during the continuous temperature decrease process.
If the state of the material is defined by the energy of the particle, the Metropolis algorithm describes the annealing process by a simple mathematical model. Assuming that the energy of the material in state i is E (i), then the material transforms from state i to state j at temperature T according to the following law:
(1) If E (j) ⩽ E (i), the state is transformed.
(2) If E (j) > E (i), the state transition is accepted with the probability
At a certain temperature, after sufficient conversion, the material will reach thermal equilibrium. The probability of the material being in state i satisfies Boltzman distribution as follows:
Since
The above equation indicates that the lower the temperature, the closer the material approaches the minimum energy state, so the simulated annealing algorithm can be used to solve the optimization problem of finding the minimum value.
In computer image processing, the image degradation process in hazy days can be usually represented by the following atmospheric scattering model:
The purpose of dark channel dehazing is to calculate the target value J (
He et al. used Equation (4) as a constraint condition to solve Equation (3) and obtained the dehazed image J (
(1) Transmission estimation: The atmospheric light value A is obtained from the hazy image by using the dark channel map. Combined with the constraint condition equation (5), the transmission is estimated as
(2) Soft matting and recovering the scene radiance: we restrict the transmission t (
The DCP algorithm in the image to haze has achieved great success, whereas in the process of solving, assumptions t (
SRSTO algorithm framework
As the transmittance of the sky area is different from that of vehicles and buildings, the sky is far away from the camera, so the depth d(x) is very large. In the DCP algorithm, t (x) ⟶1 but t (

Flow of the SRSTO algorithm.
The algorithm is mainly divided into the following four steps:
(1) The gradient, saturation and brightness ratio of the image are determined, and the characteristic image of the sky segmentation threshold is obtained. The functional relationship between the sky segmentation threshold and the three is given, and the image is segmented into sky and non-sky regions.
(2) The dark channel map is calculated, the block thought erosion is used to smooth and de-noise it, and the atmospheric scattered light value A is further calculated by combining the DCP algorithm. The functional relationship between the transmittance of the sky region and the average brightness of the image is constructed, and different transmittance optimization is performed for the sky region and the non-sky region.
(3) For calculating the average value of multiple experiments, the simulated annealing algorithm is employed to optimize the threshold parameters, and the fundamental law of parameter values is obtained through several experiments.
(4) The Gaussian filter is implemented to smooth the extra noise generated in dehazing, and the edge enhancement and brightness adjustment are further performed to maintain the details of the defogged image. Through the comparison of subjective and objective indicators, the proposed algorithm can effectively deal with traffic images with sky area and yield a good visual effect.
Image segmentation
The depth and transmission of the sky and the non-sky region in the traffic image with fog, as well as the brightness and saturation are different. The gradient of the image changes more rapidly in the area with severe gray change, which can effectively reflect the edge details. Let f (x, y) be the color value corresponding to the point (x, y).
(1) Obtaining the gradient
At the junction of high-brightness areas such as traffic signs, buildings and the sky, the gradient of the image will change greatly, hence we calculate the gradient information of the image to better realize the segmentation of the image edge. We convert the image into a gray image, and then get the gradient of the points (x, y) as follows:
(2) Calculation of image saturation
The saturation of an image is related to the difference between R, G and B. The greater the difference between any two colors, the greater the saturation, so we use the sum of RGB differences to reflect the saturation information.
We denote R (x, y) , G (x, y) , B (x, y) as the three color components of the point (x, y), and the saturation information of (x, y) is [41]:
(3) Calculation of brightness ratio
Firstly, the image is converted from RGB to HSV color space, where the V component represents the brightness information of the image [37], and the proportion of the V component of each point in the average brightness is denoted as
In hazy images with sky regions, the brightness of the sky and other regions is larger than that of non-sky regions, so Vratio can be used as a feature variable to distinguish sky regions from non-sky regions.
According to Equations (7), (8) and (9), we can obtain the feature image of the sky segmentation Feature = (Grad + Satu + Vratio)/3, and further calculate the mean grayscale value of the characteristic image F
m
to obtain the segmentation threshold:

Segmentation effect of different images under different thresholds.
As seen from the above figure, the smaller the adaptive factor, the more parts are identified as the sky area, while the larger the value, the more likely that the sky will not be segmented out. To increase the adaptability of image segmentation, the simulated annealing algorithm is used to optimize the value of adapt to find out the law of parameter values.
(1) Dark channel optimization and atmospheric light value calculation
Firstly, the dark channel of the image is calculated according to Equation (4). Subsequently, the image is properly divided into blocks, and we let the scoring block factor be Blocksize. In each block, the dark channel map is smoothed and denoised by using the erosion algorithm of mathematical morphology. The position of 0.1% scale pixel is taken, then the corresponding value of the pixel with the highest brightness in the original image is found at these positions, and its value is estimated as the atmospheric light value A.
(2) Transmittance optimization after image segmentation
For the non-sky area, the initial transmittance is obtained according to Equation (5). For the sky area, it is found that the transmittance changes inversely with the mean brightness of the image through a large number of experiments, so we set the transmittance of the sky area as:
Guided filtering [21] can suppress noise, smooth details, and enhance edge information. Its running speed is independent of the filter window size when using the idea of the least square method through frame filtering and integrating image technology, so it has the advantage of fast calculation speed and denoising action.
After the sky region segmentation step, the transmittance of the sky region is optimized according to Equation (11), and then the non-sky region is optimized using guided filtering. Figure 3 shows the comparison of the image transmittance before and after optimization when Tsky = 0.9, adapt = 1.3.
From Fig. 3 below, after the optimization of transmittance and guided filtering, the dot noise in the transmittance map is removed, and the details, such as edge details, are better preserved, resulting in enhanced visual effects.

Transmittance modification effect.
In order to optimize the image segmentation factor adapt, block factor Blocksize and sky transmittance factor Tsky, and to better maintain the color and structural features after dehazing, we use the no-reference NIQE (Natural Image Quality Evaluator) [38, 40] to construct the objective function of the SA algorithm:
NIQE obtains the quality evaluation index through feature extraction, NSS (natural scene statistical) modeling and feature regression based on the fact that high-quality natural scene images follow certain statistical characteristics. It uses the distance between the NSS feature model and the MVG (multivariate Gaussian model) extracted from the distorted image features to represent the quality of the distorted image [41], and its expression is [38]:
In order to enhance the visual effect after image dehazing and remove the noise introduced in the image dehazing process, based on the Sobel edge operator and Gaussian filtering algorithm, the image de-noising and color enhancement steps are realized by adjusting different brightness values, so as to avoid noise amplification and color distortion.
Algorithm
(1) Calculate the gradient, saturation and brightness ratio, get sky segmentation threshold by Equation (10);
(2) Obtain the dark channel image according to equation (4) and then divide it into several blocks, smoothed and de-noise it by corrosion algorithm; Locate the atmospheric light A acorrding to [16];
(3) Calculate the optimized transmission t (
(4) Get J (
Experimental comparison
Subjective evaluation
A total of 12 different images were selected from the network or photographed by ourselves for experiments and compared with the traditional DCP algorithm [16], CLAHE [39], IDGCP [23], IDE [17], DTMSG [33] and ORDCP [26]. The experiments were completed using Matlab R2020. The subjective comparison is shown in the following Fig. 4.
From the above Fig. 4, it can be seen that the DCP, IDGCP and DTMSG algorithms have severe distortion at the gap interface after dehazing, and the overall image color becomes dark. The CLAHE algorithm has a lighter image color. The IDE algorithm also shows an exemplary processing effect in dehazing images, especially for Tra1-Tra2 and Tra10, it has good performance in preserving image information and structure.However, the proposed algorithm performs better in dehazing and detail preserving of aerial objects, as shown in Figures Tra1, Tra2, Tra4-Tra6, Tra8, and Tra11. After SRSTO processing, the edge information and the text display of aerial signs is also clearer.

Comparison of the dehazing effect (from top to bottom, the hazy images are Road, Tra1-Tra11).
We adopt NIQE and IE (Information Entropy) [40] as objective evaluation indexes, which can all be realized without reference.
In the above formula, n (0≤n≤255) represents the total number of gray levels contained in image J, E represents the expectation equation, and P i represents the probability of occurrence of the ith gray level in image J, which can be obtained from the gray histogram statistics.
The image IE can be used to evaluate the quality of dehazing images. If the IE of the dehazed image increases, it shows that the dehazed image contains more information than the original hazy image, which effectively removes the influence of haze and restores the detailed texture included in the image [26]. According to this principle, the larger the IE value, the more information the image contains, i.e., the richer detailed textural information in the image; the smaller the image IE value, and the less detail texture information in the image.According to Anish et al. [38], NIQE is also a no-reference evaluation index that can evaluate the overall natural degree of the restoration result. The smaller the NIQE value, the better the structure of image restoration. Fig. 5 illustrates the comparison curves of IE (Information Entropy) and NIQE (Naturalness Image Quality Evaluator) processed by various algorithms.

Comparison curves of IE and NIQE.
From Fig. 5, we can see that IDE and SRSTO perform better in both information entropy reflecting the image information, and NIQE reflecting the image structure. The proposed SRSTO algorithm shows good stability in IE and NIQE, and the SRSTO algorithm achieves large IE in more than 83% of images. More than 90% of the images have achieved a small NIQE. Combined with the image comparison in Figure 4, the SRSTO algorithm has more advantages in the haze removal methods from images containing air signs, such as Tra1, Tra2, Tra4, Tra5, Tra8-Tra11. In addition, the details of the dehazed images are better maintained, and the aerial objects look clearer. Although ORDCP has the highest IE in the image Road, the exposure phenomenon occurs at the lower ground connection, and the structure preservation is weaker than IDE.
In Fig. 5, the dehazing depth of image Road for ORDCP is more thorough. Similarly,when processed by Tra11, although IE is slightly weaker than IDE and IDGCP, it can be seen that the words in the air reminder in the dehazed image processed by SRSTO are clearer. Although the DTMSG algorithm has achieved a small NIQE on images Tra7 and Tra9, however, the details of the dehazed images are not clear, darkened and blurred. Based on the subjective and objective comparison, the SRSTO algorithm corrects the ringing effect that is easy to appear in DCP algorithms.It maintains the clarity of the edge and other details of air signs, and has a better dehazing effect on traffic images containing air signs.
Aimed at enhancing hazy images with sky and bright regions, we propose an image dehazing algorithm based on sky region segmentation and simulated annealing optimization parameters (SRSTO). Firstly, by analyzing the gradient, saturation and brightness ratio of the hazy image, the sky segmentation threshold is constructed, and the image is divided into sky region and non-sky region. Then, the transmittance of the two parts is optimized. The experimental results show that, when the optimization parameters are searched based on a simulated annealing algorithm, the parameter adaptability of image processing is increased. The sky segmentation algorithm takes the gradient information, saturation information and brightness information into account, and constructs the parameter equation based on the statistics of many images, laying the foundation for subsequent image processing. By optimizing the transmission, the issue of distortion in the sky area typically observed in traditional dark channel prior algorithms can be effectively corrected. After dehazing various types of traffic images with sky region, the obtained image contour becomes more evident, the details are more complete, and the effect of dehazing recognition is better, especially for images with sky traffic signs.
The research also has certain limitations because the Simulated Annealing algorithm has certain randomness and local optimality, and the characteristics of each image correspond to different parameters. After ten optimizations,the ranges of the three parameters adapt, Blocksize and Tsky are [1.23, 1.35] , [10, 30] and [0.5, 1.12], choosing a more stable parameter optimization algorithm may better improve the dehazing performance. In our future work, we will explore more stable algorithms to effectively dehaze complex scenes. Additionally, we will analyze intricate image scenes to enhance the accuracy of traffic sign recognition.
