Image defogging method and system

By using an improved dark channel prior algorithm and the AOD-Net image dehazing method, high-precision real-time dehazing is achieved for traffic signal sign images in foggy weather under both dense and light fog conditions. This solves the shortcomings of existing algorithms in terms of real-time performance and high precision, and achieves better dehazing results and shorter running time.

CN116703759BActive Publication Date: 2026-05-12WUHAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
WUHAN UNIV
Filing Date
2023-05-25
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing image dehazing algorithms struggle to meet the high standards of real-time performance and precision required for traffic signal signs in foggy weather, especially under conditions of dense fog and light fog.

Method used

An improved image dehazing method based on the dark channel prior algorithm and an improved AOD-Net image dehazing method are adopted to perform image dehazing processing for dense fog and light fog, respectively. By improving the atmospheric light intensity estimation, transmittance estimation and transmittance map refinement steps, and combining the improved K estimation module and loss function, the dehazing effect and real-time performance are improved.

Benefits of technology

In dense fog conditions, the improved method based on the dark channel prior algorithm enhances visual effects and metrics while shortening algorithm runtime; in light fog conditions, the improved AOD-Net method improves contrast and saturation, meets real-time requirements, and outperforms other algorithms overall.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116703759B_ABST
    Figure CN116703759B_ABST
Patent Text Reader

Abstract

The present application provides an image defogging method and system, which can realize real-time and high-precision defogging of foggy images. The method comprises the following steps: step I, judging whether the foggy image is an image taken in thick fog or thin fog; step II, adopting corresponding method A or B for image defogging according to the judgment result; in method A, for a given single foggy image, only the first 0.1% of pixels with the maximum dark channel value in the upper 1 / 4 region of the image are selected, the average value of the pixels mapped to the corresponding positions of the foggy image is used to calculate the atmospheric light intensity; the improved formula is used to roughly estimate the transmittance to obtain a rough transmittance map; the original image converted into a gray-scale image is used as a guide image, and the rough transmittance map is used as an input image to obtain a refined transmittance map; based on this, the image without fog is restored; in method B, the improved K estimation module is used for training and feature extraction to obtain the parameters required for restoring the image without fog, and then the image without fog is generated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer vision technology, specifically relating to image dehazing methods and systems. Background Technology

[0002] Image dehazing aims to remove particulate matter of varying materials, sizes, shapes, and concentrations from images taken in adverse weather conditions, including smoke and fog. The removal of these particles is collectively referred to as dehazing. In recent years, with the continuous innovation and development of technologies such as autonomous vehicles, the recognition of traffic signs on the road is a crucial part of the implementation of autonomous driving algorithms. During foggy or hazy weather, road signs and traffic lights may become blurred, leading to unrecognizable or misidentified images, potentially with very serious consequences. Therefore, effective dehazing of images of traffic signs and other similar objects in foggy conditions is essential.

[0003] Currently, numerous different image dehazing algorithms have been proposed, such as color restoration methods, degradation model-based methods, and optical model-based methods. These algorithms are mainly designed and implemented based on different methods such as prior knowledge, physical models, and deep learning. Researchers have designed many efficient and effective image dehazing algorithms based on different deep learning models such as convolutional neural networks and generative adversarial networks. In addition to traditional indoor and outdoor image dehazing tasks, more and more researchers are beginning to explore more application scenarios. These tasks place higher demands on the robustness and real-time performance of algorithms, and also provide a broader space for research in the field of image dehazing. Although researchers have proposed many algorithms, these algorithms still cannot meet the high accuracy requirements of practical application scenarios in terms of real-time image dehazing, especially for image dehazing of traffic signal signs in foggy weather, where the requirements for real-time performance are even more stringent. Summary of the Invention

[0004] This invention is made to solve the above-mentioned problems, and aims to provide an image defogging method and system that can perform real-time, high-precision defogging on images taken in foggy weather, especially traffic signal sign images in foggy weather.

[0005] To achieve the above objectives, the present invention adopts the following solution:

[0006] Method 1

[0007] This invention provides an image dehazing method, comprising the following steps:

[0008] Step 1: Determine whether the foggy image was taken under conditions of dense fog or light fog;

[0009] Step II: Based on the judgment results, perform image dehazing using the appropriate methods: For dense fog, use the improved image dehazing method A based on the dark channel prior algorithm; for light fog, use the improved AOD-Net image dehazing method B.

[0010] The improved image dehazing method A based on the dark channel prior algorithm includes the following steps:

[0011] Step A1: For a given single foggy image, use the minimum filter (window radius r = 15) to process the three color channels R, G, and B in the image to calculate the dark channel value of the image.

[0012] Step A2: Based on the dark channel value calculated in step A1, for a given single foggy image, only the top 0.1% of pixels with the largest dark channel value in the upper 1 / 4 region of the image are selected, and the atmospheric light intensity is calculated by mapping the average value of the corresponding pixels in the foggy image to these values.

[0013] Step A3: For a given single foggy image, use the improved formula to roughly estimate its transmittance, obtaining a rough transmittance map:

[0014]

[0015] In the formula, the correction coefficient ω = 0.9; Indicates the minimum filter; Ic(y) represents the minimum value among the three color channels; Ic(y) represents the hazy image to be processed; the superscript c represents the three color channels; A c This indicates the atmospheric light intensity corresponding to the channel;

[0016] Step A4: For a given single foggy image, the original image converted to grayscale is used as the guide image, and the rough transmittance map obtained in step A3 is used as the input image. The resulting output image is the refined transmittance map.

[0017] Step A5: Based on the data obtained in steps A2 and A4, perform a dehazing operation on the foggy image to recover a fog-free image;

[0018] AOD-Net image dehazing improvement method B includes the following steps:

[0019] Step B1: The improved K estimation module is used for training during the model training process;

[0020] The improved K-estimation module contains five convolutional layers with kernel sizes of 1×1, 3×3, 5×5, 7×7, and 3×3. The outputs of convolutional layers 1 and 2 are concatenated and used as the input of convolutional layer 3 after a spatial random deactivation operation. The outputs of convolutional layers 2 and 3 are concatenated and used as the input of convolutional layer 4. The outputs of convolutional layers 1, 2, 3, and 4 are concatenated and used as the input of convolutional layer 5.

[0021] Step B2: Based on the training results of step B1, for foggy images, the improved K estimation module is used to extract features to obtain the parameters required to recover the fog-free image.

[0022] Step B3: Generate a fog-free image using the fog-free image generation module in the AOD algorithm and the parameters obtained in step B2.

[0023] Preferably, in the image dehazing method provided by the present invention, in step I, a judgment is made based on the atmospheric scattering coefficient β:

[0024] When β≥2.7, it is a dense fog condition; when β<2.7, it is a light fog condition.

[0025] Preferably, in step B1, the image dehazing method provided by the present invention uses the following loss function to replace the original loss function of the AOD algorithm:

[0026]

[0027] In the formula, x i For the predicted value, y i Let n be the target value, n be the total number of predicted or target values, and δ be the hyperparameter.

[0028] Preferably, in the image dehazing method provided by the present invention, δ = 1.0 in step B1.

[0029] Method Two

[0030] Method 2 of the present invention provides another image dehazing method, including the following steps:

[0031] Step A1: For a given single foggy image, use a minimum filter with a window radius of r = 15 to process the three color channels R, G, and B in the image to calculate the dark channel value of the image.

[0032] Step A2: Based on the dark channel value calculated in step A1, for a given single foggy image, select the top 0.1% of pixels with the largest dark channel value in the upper 1 / 4 region of the image, and use the average value of the corresponding pixels in the foggy image mapped to them to calculate the atmospheric light intensity.

[0033] Step A3: For a given single foggy image, use the improved formula to roughly estimate its transmittance, obtaining a rough transmittance map:

[0034]

[0035] In the formula, the correction coefficient ω = 0.9; Indicates the minimum filter; Ic(y) represents the minimum value among the three color channels; Ic(y) represents the hazy image to be processed; the superscript c represents the three color channels; A c This indicates the atmospheric light intensity corresponding to the channel;

[0036] Step A4: For a given single foggy image, the original image converted to grayscale is used as the guide image, and the rough transmittance map obtained in step A3 is used as the input image. The resulting output image is the refined transmittance map.

[0037] Step A5: Based on the data obtained in steps A2 and A4, perform a dehazing operation on the foggy image to restore a fog-free image.

[0038] Preferably, the image dehazing method provided by Method 2 of the present invention is used to dehaze foggy images under dense fog conditions where the atmospheric scattering coefficient β≥2.7.

[0039] Method 3

[0040] Method 3 of the present invention provides a third image dehazing method, including the following steps:

[0041] Step B1: The improved K estimation module is used for training during the model training process;

[0042] The improved K-estimation module contains five convolutional layers with kernel sizes of 1×1, 3×3, 5×5, 7×7, and 3×3. The outputs of convolutional layers 1 and 2 are concatenated and used as the input of convolutional layer 3 after a spatial random deactivation operation. The outputs of convolutional layers 2 and 3 are concatenated and used as the input of convolutional layer 4. The outputs of convolutional layers 1, 2, 3, and 4 are concatenated and used as the input of convolutional layer 5.

[0043] Step B2: Based on the training results of step B1, for foggy images, the improved K estimation module is used to extract features to obtain the parameters required to recover the fog-free image.

[0044] Step B3: Generate a fog-free image using the fog-free image generation module in the AOD algorithm and the parameters obtained in step B2.

[0045] Preferably, the image dehazing method provided by Method 3 of the present invention is used to dehaze foggy images under light fog conditions where the atmospheric scattering coefficient β < 2.7.

[0046] <System>

[0047] Furthermore, the present invention also provides an image dehazing system capable of automatically implementing the above-described method, comprising:

[0048] The judgment unit determines whether the foggy image was taken under conditions of dense fog or light fog.

[0049] The dehazing unit performs image dehazing processing based on the judgment result: for dense fog, an improved image dehazing unit based on the dark channel prior algorithm is used; for light fog, an improved AOD-Net image dehazing unit is used.

[0050] The image dehazing improvement unit performs image dehazing processing according to the following steps A1 to A5:

[0051] Step A1: For a given single foggy image, use a minimum filter with a window radius of r = 15 to process the three color channels R, G, and B in the image to calculate the dark channel value of the image.

[0052] Step A2: Based on the dark channel value calculated in step A1, for a given single foggy image, select the top 0.1% of pixels with the largest dark channel value in the upper 1 / 4 region of the image, and use the average value of the corresponding pixels in the foggy image mapped to them to calculate the atmospheric light intensity.

[0053] Step A3: For a given single foggy image, use the improved formula to roughly estimate its transmittance, obtaining a rough transmittance map:

[0054]

[0055] In the formula, the correction coefficient ω = 0.9; Indicates the minimum filter; Ic(y) represents the minimum value among the three color channels; Ic(y) represents the hazy image to be processed; the superscript c represents the three color channels; A c This indicates the atmospheric light intensity corresponding to the channel;

[0056] Step A4: For a given single foggy image, the original image converted to grayscale is used as the guide image, and the rough transmittance map obtained in step A3 is used as the input image. The resulting output image is the refined transmittance map.

[0057] Step A5: Based on the data obtained in steps A2 and A4, perform a dehazing operation on the foggy image to recover a fog-free image;

[0058] The AOD-Net image dehazing improvement unit performs image dehazing processing according to the following steps B1 to B3:

[0059] Step B1: The improved K estimation module is used for training during the model training process;

[0060] The improved K-estimation module contains five convolutional layers with kernel sizes of 1×1, 3×3, 5×5, 7×7, and 3×3. The outputs of convolutional layers 1 and 2 are concatenated and used as the input of convolutional layer 3 after a spatial random deactivation operation. The outputs of convolutional layers 2 and 3 are concatenated and used as the input of convolutional layer 4. The outputs of convolutional layers 1, 2, 3, and 4 are concatenated and used as the input of convolutional layer 5.

[0061] Step B2: Based on the training results of step B1, for foggy images, the improved K estimation module is used to extract features to obtain the parameters required to recover the fog-free image.

[0062] Step B3: Generate a fog-free image using the fog-free image generation module in the AOD algorithm and the parameters obtained in step B2;

[0063] The control unit is connected in communication with the judgment unit and the defogging unit, and controls their operation.

[0064] Preferably, the image dehazing system provided by method three of the present invention further includes: an input display unit, which is communicatively connected to the control unit, for allowing the user to input operation commands and displaying them accordingly.

[0065] The role and effect of invention

[0066] The image dehazing method and system involved in this invention first determine whether the foggy image was taken under conditions of dense fog or light fog. Then, based on the determination result, the corresponding method two or three is used for image dehazing. Method two is an improved image dehazing method based on the dark channel prior algorithm. It improves the atmospheric light intensity estimation step, the transmittance estimation step, and the transmittance map refinement step on the basis of the original dark channel prior algorithm. This effectively ensures the accuracy of the calculation of various values ​​of the atmospheric scattering model during the dehazing process of foggy images, improves the visual effect, peak signal-to-noise ratio (PSNR) index, and structural similarity index (SSIM) of the dehazed image, and significantly shortens the algorithm's running time, improving real-time performance. The image dehazed by this method not only improves the dehazing effect but also makes the sky color more natural and more in line with visual perception. Moreover, only a single foggy image is needed to recover a fog-free image. The operation is simple, and the dehazing effect is good and stable. It is particularly effective for foggy images under dense fog conditions. Method 3 is an improved AOD-Net image dehazing method. It improves the K estimation module and adopts a new loss function, which can enhance the robustness of the function while ensuring stability. This method is superior to other algorithms in terms of real-time performance, with the shortest running time. It can better meet the needs of real-world scenarios. Moreover, the contrast, saturation and other indicators of the dehazed image are significantly improved compared with other image dehazing methods. It has the best overall performance in processing foggy images and the best effect on foggy images under light fog conditions. Attached Figure Description

[0067] Figure 1 The flowchart is a process for the improved image dehazing method based on the dark channel prior algorithm involved in this invention.

[0068] Figure 2 This is a flowchart of the AOD-Net image dehazing improvement method according to an embodiment of the present invention;

[0069] Figure 3 This is a structural diagram of the improved K estimation module in the AOD-Net image dehazing improvement method according to an embodiment of the present invention;

[0070] Figure 4 The image dehazing improvement method based on dark channel prior algorithm (improved DCP) involved in the embodiments of the present invention is shown in the visualization comparison chart with other methods; wherein, (a) dense fog image (unprocessed image), (b) original DCP processed image, (c) FFA processed image, (d) Uformer processed image, (e) improved DCP processed image, and (f) Ground Truth processed image.

[0071] Figure 5The images shown are visualization results of the AOD-Net image dehazing improvement method according to the embodiments of the present invention; wherein, (a) hazy image (unprocessed image), (b) original AOD processed image, (c) FFA processed image, (d) Uformer processed image, (e) improved DCP processed image, and (f) Ground Truth processed image. Detailed Implementation

[0072] The specific implementation schemes of the image dehazing method and system involved in this invention will be described in detail below with reference to the accompanying drawings.

[0073] <Example 1>

[0074] like Figures 1-3 As shown, the image dehazing method involved in this embodiment has the following specific steps:

[0075] Step I: Determine whether the foggy image was taken under conditions of dense fog or light fog based on the atmospheric scattering coefficient β; when β ≥ 2.7, it is a dense fog condition, and when β < 2.7, it is a light fog condition.

[0076] Atmospheric scattering model:

[0077] I(x)=J(x)e -βd(x) +A(1-e -βd(x) )

[0078] In the formula, β is the atmospheric scattering coefficient; I(x) represents the final image of the foggy day image; J(x) represents the actual image light intensity of the corresponding scene in the fog-free condition; A represents the atmospheric light intensity; and d(x) represents the depth of field, i.e. the distance between the camera and the object.

[0079] Step II: Based on the judgment results, use the corresponding method to dehaze the image: For dense fog, use the improved image dehazing method A based on the dark channel prior algorithm; for light fog, use the improved AOD-Net image dehazing method B.

[0080] The improved image dehazing method A based on the dark channel prior algorithm includes the following steps:

[0081] Step A1: For a given single foggy image, use a minimum filter with a window radius of r = 15 to process the three color channels R, G, and B to calculate the dark channel value. The minimum filter calculates the minimum value for each region in each of the three channels, with the minimum filter processing in 15×15 pixel blocks.

[0082] Step A2: Based on the dark channel value calculated in step A1, for a given single foggy image, select the top 0.1% of pixels with the largest dark channel value in the upper 1 / 4 region of the image, and use the average value of the corresponding pixels in the foggy image mapped to them to calculate the atmospheric light intensity.

[0083] Step A3: For a given single foggy image, use the improved formula to roughly estimate its transmittance, obtaining a rough transmittance map:

[0084]

[0085] In the formula, the correction coefficient ω = 0.9; Indicates the minimum filter; Ic(y) represents the minimum value among the three color channels; Ic(y) represents the hazy image to be processed; the superscript c represents the three color channels; A c This indicates the atmospheric light intensity corresponding to the channel.

[0086] Step A4: For a given single foggy image, the original image converted to grayscale is used as the guide image, and the coarse transmittance map obtained in step A3 is used as the input image. The resulting output image is the refined transmittance map. The specific process of the transmittance map refinement is as follows:

[0087] 1) Downsample the input image p and the guide image I at a downsampling ratio of s, and the downsampling results are p' and I'.

[0088] 2) Apply mean filtering with a filtering radius of r' to p' and I', and the results are mean... p with mean I The values ​​of I' multiplied by I' and I' multiplied by p' are then subjected to mean filtering with a filtering radius of r', resulting in corr values ​​respectively. I and corr Ip The dot product is an operation that multiplies the values ​​at the same positions in two matrices; it is not matrix multiplication.

[0089] 3) Calculate the variance var of I' I And the covariance cov of I' and p Ip The formulas for calculating variance and covariance are respectively var I =corr I -mean I .*mean I , cov Ip =corr Ip –mean I .*mean p Where “.*” represents the same dot product operation as in step A2.

[0090] 4) Calculate a = cov Ip . / (var I +ε), b=mean p –a.*mean I Where ε is the regularization parameter that controls the smoothness, and ". / " is the dot division operation corresponding to dot multiplication.

[0091] 5) Apply mean filtering to a and b using the filtering radius r', and the results are respectively mean a and mean b .

[0092] 6) For mean a and mean b Perform an upsampling operation at a ratio of s.

[0093] 7) Upsample the mean a and mean b Substituting into the formula q = mean a .*I+mean b Finally, q is the output image after guided filtering.

[0094] The formula q = mean in the model a .*I+mean b Its linear combination property enables the transformation of the structure of the guiding image I into the output p during filtering.

[0095] Step A5: Based on the data obtained in steps A2 and A4, perform a dehazing operation on the foggy image to restore a fog-free image.

[0096] AOD-Net image dehazing improvement method B includes the following steps:

[0097] Step B1: The improved K estimation module is used for training during the model training process;

[0098] The network in this method consists of an improved K-estimation module and a haze-free image generation module, which calculates and reconstructs haze-free images based on a deformed atmospheric scattering model. The formula for the deformed atmospheric scattering model is defined as follows:

[0099] J(x)=K(x)I(x)-K(x)+b(B1-1)

[0100]

[0101] The K estimation module is a key structure in the network, responsible for calculating the value of K(x) in formulas (B1-1) and (B1-2) and passing this parameter to the next module to recover the fog-free image.

[0102] The improved K-estimation module contains five convolutional layers with kernel sizes of 1×1, 3×3, 5×5, 7×7, and 3×3. The outputs of convolutional layers 1 and 2 are concatenated and used as the input to convolutional layer 3 after spatial random deactivation. The outputs of convolutional layers 2 and 3 are concatenated as the input to convolutional layer 4. The outputs of convolutional layers 1, 2, 3, and 4 are concatenated as the input to convolutional layer 5. The initial input is a hazy image x, which is then used by the K-estimation module to calculate the parameters K(x) required to reconstruct the hazy image.

[0103] Replace the original loss function of the AOD algorithm with the following loss function:

[0104]

[0105] In the formula, x i For the predicted value, y i Let n be the target value, n be the total number of predicted values ​​or target values, and δ be the hyperparameter. In this embodiment, δ = 1.0.

[0106] Step B2: Based on the training results of step B1, for foggy images, the improved K estimation module is used to extract features to obtain the parameters required to recover the fog-free image.

[0107] Step B3: Generate a fog-free image using the fog-free image generation module in the AOD algorithm and the parameters obtained in step B2.

[0108] <Example 2>

[0109] In this third embodiment, a foggy traffic signal sign dataset was created using the Mapillary traffic signal sign dataset to compare the defogging effects of the three methods of this invention with other advanced algorithms.

[0110] As shown in Table 1, Figure 4 (a) In dense fog conditions, the improved image dehazing method based on the dark channel prior algorithm (improved DCP) in this invention achieves a peak signal-to-noise ratio (PSNR) of 19.0626, outperforming other algorithms; its structural similarity (SSIM) index is 0.6063, slightly lower than Uformer but outperforming other algorithms. As shown in Table 2, the running time of the method in this invention is significantly reduced compared to the previous method.

[0111] Table 1 Image evaluation metrics of the improved Dark Channel Prior (DCP) dehazing algorithm

[0112]

[0113] Table 2. Running time of dehazing algorithms for images of different sizes.

[0114]

[0115]

[0116] As shown in Table 3, Figure 5 (a) In the case of light fog, the peak signal-to-noise ratio (PSNR) of the improved AOD-Net image dehazing method (improved AOD) in this invention is 28.3406, which is better than the other algorithms; the structural similarity (SSIM) index is 0.9421, which is the same as Uformer and better than the other algorithms.

[0117] Table 3 Image evaluation metrics of the improved AOD-Net dehazing algorithm

[0118]

[0119] As shown in Table 4, when testing a dataset containing 90 hazy images and 10 dense fog images, in the hazy condition, the average PSNR and SSIM of the improved AOD algorithm of this invention were 25.5618 and 0.9013, respectively, both superior to the other algorithms; in the dense fog condition, the average PSNR and SSIM of the improved DCP algorithm were 16.5627 and 0.6323, respectively, both superior to the other algorithms.

[0120] Table 4. Average Evaluation Indicators for Light Fog, Dense Fog, and Combined Effects

[0121]

[0122] Figure 4 The visualization results of the improved image dehazing method based on the dark channel prior algorithm are shown in (a) to (e), respectively: hazy image, original dark channel prior algorithm, FFA algorithm, Uformer algorithm, improved image dehazing method based on dark channel prior algorithm, and Ground Truth. Figure 5 The visualization results of the AOD-Net image dehazing improvement method are shown. From (a) to (e), the results are: a foggy image, the original deep learning AOD-Net algorithm (AOD algorithm), the FFA algorithm, the Uformer algorithm, the AOD-Net image dehazing improvement method, and Ground Truth, respectively.

[0123] In summary, the improved AOD algorithm has the shortest average running time and performs best in processing traffic signal sign images under most fog conditions. The improved DCP algorithm, on the other hand, performs best in handling extreme dense fog conditions. Therefore, in Method 1 of this invention, using either Method 2 or Method 3 for image dehazing under different fog conditions yields the best results. Using Method 2 or Method 3 alone can also achieve superior results compared to existing technologies.

[0124] <Example 3>

[0125] This embodiment three provides an image dehazing system capable of automatically implementing the above-described method of the present invention. The system includes a judgment unit, a dehazing unit, an input display unit, and a control unit.

[0126] The judgment unit performs the steps described in step I above to determine whether the foggy image was taken under conditions of dense fog or light fog.

[0127] The dehazing unit performs the steps described in step II above, and uses the appropriate unit to perform image dehazing processing based on the judgment result: for dense fog, an improved image dehazing unit based on the dark channel prior algorithm is used; for light fog, an improved AOD-Net image dehazing unit is used. Specifically, the improved image dehazing unit performs image dehazing processing according to steps A1 to A5 above. The improved AOD-Net image dehazing unit performs image dehazing processing according to steps B1 to B3 above.

[0128] The input display unit is used to allow users to input operation commands and to display the input, output, and intermediate processing data of the corresponding unit or section.

[0129] The control unit is communicatively connected to the judgment unit, the defogging unit, and the input display unit, controlling their operation.

[0130] The above embodiments are merely illustrative examples of the technical solutions of the present invention. The image dehazing method and system involved in the present invention are not limited to the contents described in the above embodiments, but are subject to the scope defined by the claims. Any modifications, additions, or equivalent substitutions made by those skilled in the art based on these embodiments are within the scope of protection claimed by the claims of the present invention.

Claims

1. An image dehazing method, characterized in that, Includes the following steps: Step 1: Determine whether the foggy image was taken under conditions of dense fog or light fog; Step II: Based on the judgment results, perform image dehazing using the appropriate methods: For dense fog, use the improved image dehazing method A based on the dark channel prior algorithm; for light fog, use the improved AOD-Net image dehazing method B. The improved image dehazing method A based on the dark channel prior algorithm includes the following steps: Step A1: For a given single foggy image, use the minimum filter to process the three color channels R, G, and B in the image to calculate the dark channel value of the image. Step A2: Based on the dark channel value calculated in step A1, for a given single foggy image, select the top 0.1% of pixels with the largest dark channel value in the upper 1 / 4 region of the image, and use the average value of the corresponding pixels in the foggy image mapped to them to calculate the atmospheric light intensity. Step A3: For a given single foggy image, use the improved formula to roughly estimate its transmittance, obtaining a rough transmittance map: (A3) In the formula, the correction coefficient ω =0.9; Indicates the minimum filter; This represents the minimum value among the three color channels; Indicates a foggy image to be processed; superscript c Represents three color channels; A c This indicates the atmospheric light intensity corresponding to the channel; Step A4: For a given single foggy image, the original image converted to grayscale is used as the guide image, and the rough transmittance map obtained in step A3 is used as the input image. The resulting output image is the refined transmittance map. Step A5: Based on the data obtained in steps A2 and A4, perform a dehazing operation on the foggy image to recover a fog-free image; AOD-Net image dehazing improvement method B includes the following steps: Step B1, during model training, utilize the improved... K The estimation module is trained; Improved K The estimation module contains five convolutional layers with kernel sizes of 1×1, 3×3, 5×5, 7×7, and 3×3. The outputs of convolutional layers 1 and 2 are concatenated and used as the input of convolutional layer 3 after a spatial random deactivation operation. The outputs of convolutional layers 2 and 3 are concatenated and used as the input of convolutional layer 4. The outputs of convolutional layers 1, 2, 3, and 4 are concatenated and used as the input of convolutional layer 5. Step B2, based on the training results of step B1, for foggy images, utilize the improved... K The estimation module extracts features to obtain the parameters needed to recover the haze-free image; Step B3: Generate a fog-free image using the fog-free image generation module in the AOD algorithm and the parameters obtained in step B2.

2. The image dehazing method according to claim 1, characterized in that: in, In step I, based on the atmospheric scattering coefficient β Make a judgment: when β When the value is ≥ 2.7, it is considered dense fog. β When the temperature is less than 2.7, it indicates a light fog.

3. The image dehazing method according to claim 1, characterized in that: in, In step B1, the following loss function is used to replace the original loss function of the AOD algorithm: (B1) In the formula, x i For predicted values, y i For the target value, n The total number of predicted or target values. δ This is a hyperparameter.

4. The image dehazing method according to claim 3, characterized in that: in, In step B1, δ =1.

0.

5. An image dehazing method, characterized in that, Includes the following steps: Step A1, for a given single foggy image, using a window radius of... r= The minimum filter of 15 processes the three color channels R, G, and B in the image to calculate the dark channel value of the image. Step A2: Based on the dark channel value calculated in step A1, for a given single foggy image, select the top 0.1% of pixels with the largest dark channel value in the upper 1 / 4 region of the image, and use the average value of the corresponding pixels in the foggy image mapped to them to calculate the atmospheric light intensity. Step A3: For a given single foggy image, use the improved formula to roughly estimate its transmittance, obtaining a rough transmittance map: (A3) In the formula, the correction coefficient ω =0.9; Indicates the minimum filter; This represents the minimum value among the three color channels; Indicates a foggy image to be processed; superscript c Represents three color channels; A c This indicates the atmospheric light intensity corresponding to the channel; Step A4: For a given single foggy image, the original image converted to grayscale is used as the guide image, and the rough transmittance map obtained in step A3 is used as the input image. The resulting output image is the refined transmittance map. Step A5: Based on the data obtained in steps A2 and A4, perform a dehazing operation on the foggy image to recover a fog-free image; In step A4, the specific process of refining the transmittance map is as follows: 1) Input image p and guide image I Downsampling is performed at a downsampling ratio of 1. s The downsampling result is p’ and I’ ; 2) To p’ and I’ The filtering radius is r’ The mean filtering results are as follows: p with mean I and to I’ Dot product I’ and I’ Dot product p’ The values ​​are filtered with a radius of 1000. r’ Mean filtering, the results are corr I and corr Ip The dot product is an operation that multiplies the values ​​at the same positions in two matrices. 3) Calculation I’ variance var I ,as well as I’ and p covariance Ip The formulas for calculating variance and covariance are respectively var I = corr I - mean I .* mean I cov Ip = corr Ip – mean I .* mean p Where ".*" represents the dot product operation; 4) Calculation a = cov Ip . / (var I + ε ), b = mean p – a .* mean I ;in ε This is a regularization parameter that controls smoothness; " / " represents the dot division operation corresponding to dot multiplication. 5) Using the filter radius r’ right a and b Perform mean filtering separately, and the results are respectively mean a and mean b ; 6) For mean a and mean b Perform upsampling operation, with a ratio of s ; 7) Upsample the mean a and mean b Substitute into the formula q = mean a .* I + mean b Finally obtained q This is the output image after guided filtering; Formulas in the model q = mean a .* I + mean b The linear combination property of the image can guide the filtering process. I Structure transformation to output p Among them.

6. The image dehazing method according to claim 5, characterized in that: in, This image dehazing method is used to improve the atmospheric scattering coefficient. β Dehaze images of foggy days with a density of ≥ 2.

7.

7. An image dehazing method, characterized in that, Includes the following steps: Step B1, during model training, utilize the improved... K The estimation module is trained; Improved K The estimation module contains five convolutional layers with kernel sizes of 1×1, 3×3, 5×5, 7×7, and 3×3. The outputs of convolutional layers 1 and 2 are concatenated and used as the input of convolutional layer 3 after a spatial random deactivation operation. The outputs of convolutional layers 2 and 3 are concatenated and used as the input of convolutional layer 4. The outputs of convolutional layers 1, 2, 3, and 4 are concatenated and used as the input of convolutional layer 5. Step B2, based on the training results of step B1, for foggy images, utilize the improved... K The estimation module extracts features to obtain the parameters needed to recover the haze-free image; Step B3: Generate a fog-free image using the fog-free image generation module in the AOD algorithm and the parameters obtained in step B2; In step B1, the improved K The estimation module and the haze-free image generation module constitute a network that calculates and reconstructs the haze-free image based on the deformed atmospheric scattering model; the formula for the deformed atmospheric scattering model is defined as follows: (B1-1) (B1-2) in K The estimation module is a key structure of the network, responsible for calculating the equations (B1-1) and (B1-2). K(x) The value of the parameter is then passed to the next module to recover the fog-free image; The initial input is a fog-free image. x ,go through K The estimation module calculates the parameters required to recover the haze-free image. K(x) ; Replace the original loss function of the AOD algorithm with the following loss function: (B1) In the formula, x i For predicted values, y i For the target value, n The total number of predicted or target values. δ This is a hyperparameter.

8. The image dehazing method according to claim 7, characterized in that: in, This image dehazing method is used to improve the atmospheric scattering coefficient. β Dehazing was performed on foggy images with a resolution of < 2.

7.

9. An image dehazing system, characterized in that, include: The judgment unit determines whether the foggy image was taken under conditions of dense fog or light fog. The dehazing unit performs image dehazing processing based on the judgment result: for dense fog, an improved image dehazing unit based on the dark channel prior algorithm is used; for light fog, an improved AOD-Net image dehazing unit is used. The image dehazing improvement unit based on the dark channel prior algorithm performs image dehazing processing according to the following steps A1~A5: Step A1: For a given single foggy image, use the minimum filter to process the three color channels R, G, and B in the image to calculate the dark channel value of the image. Step A2: Based on the dark channel value calculated in step A1, for a given single foggy image, select the top 0.1% of pixels with the largest dark channel value in the upper 1 / 4 region of the image, and use the average value of the corresponding pixels in the foggy image mapped to them to calculate the atmospheric light intensity. Step A3: For a given single foggy image, use the improved formula to roughly estimate its transmittance, obtaining a rough transmittance map: (A3) In the formula, the correction coefficient ω =0.9; Indicates the minimum filter; This represents the minimum value among the three color channels; Indicates a foggy image to be processed; superscript c Represents three color channels; A c This indicates the atmospheric light intensity corresponding to the channel; Step A4: For a given single foggy image, the original image converted to grayscale is used as the guide image, and the rough transmittance map obtained in step A3 is used as the input image. The resulting output image is the refined transmittance map. Step A5: Based on the data obtained in steps A2 and A4, perform a dehazing operation on the foggy image to recover a fog-free image; The AOD-Net image dehazing improvement unit performs image dehazing processing according to the following steps B1~B3: Step B1, during model training, utilize the improved... K The estimation module is trained; Improved K The estimation module contains five convolutional layers with kernel sizes of 1×1, 3×3, 5×5, 7×7, and 3×3. The outputs of convolutional layers 1 and 2 are concatenated and used as the input of convolutional layer 3 after a spatial random deactivation operation. The outputs of convolutional layers 2 and 3 are concatenated and used as the input of convolutional layer 4. The outputs of convolutional layers 1, 2, 3, and 4 are concatenated and used as the input of convolutional layer 5. Step B2, based on the training results of step B1, for foggy images, utilize the improved... K The estimation module extracts features to obtain the parameters needed to recover the haze-free image; Step B3: Generate a fog-free image using the fog-free image generation module in the AOD algorithm and the parameters obtained in step B2; The control unit is connected in communication with the judgment unit and the defogging unit, and controls their operation.

10. The image dehazing system according to claim 9, characterized in that, Also includes: The input display unit is connected in communication with the control unit and is used to allow users to input operation commands and display the corresponding commands.