A defogging method based on atmospheric light curtain and fog concentration distribution estimation

By employing adaptive foreground and background segmentation and guided filtering for refined processing, combined with an improved quadtree segmentation algorithm, the problem of inaccurate estimation of atmospheric light value and transmittance in the dark channel prior dehazing algorithm is solved, achieving high-quality image dehazing effect and improving image clarity and contrast.

CN117495719BActive Publication Date: 2026-04-21XIDIAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
XIDIAN UNIV
Filing Date
2023-11-06
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing dark channel prior dehazing algorithms are inaccurate in estimating atmospheric transmittance and atmospheric light values, resulting in darker images, color distortion in the sky area, and loss of detail after dehazing.

Method used

By employing a defogging method based on atmospheric light curtain and fog concentration distribution estimation, including adaptive near-field segmentation and guided filtering for refined processing, combined with an improved quadtree segmentation algorithm, the atmospheric light value and transmittance are accurately estimated, the atmospheric light curtain map is optimized, and high-quality restoration of foggy images is achieved.

Benefits of technology

It improves the dehazing effect, solves the problems of color distortion and loss of detail in the sky area, achieves a balanced dehazing effect, and enhances the image clarity and contrast.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117495719B_ABST
    Figure CN117495719B_ABST
Patent Text Reader

Abstract

This invention discloses a dehazing method based on atmospheric light curtain and fog concentration distribution estimation. The main method utilizes the atmospheric light curtain and fog concentration distribution estimation to dehaze foggy images. Specifically, the method includes: first, analyzing the image using dark channel prior dehazing theory; then, estimating the transmittance using an improved atmospheric light curtain transmittance estimation method to accurately calculate the atmospheric light curtain; subsequently, using the atmospheric light curtain to solve for the accurate transmittance; next, using an improved quadtree algorithm to solve for the atmospheric light value on the fog concentration distribution map; and finally, substituting the transmittance and atmospheric light value into an atmospheric scattering model to obtain a clear image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image processing technology, specifically relating to a defogging method based on atmospheric light curtain and fog concentration distribution estimation. Background Technology

[0002] With the increasing application of computer vision systems in fields such as scene monitoring, autonomous driving, and target detection, recovering high-resolution, high-contrast, and sharp-edge images from degraded images due to fog has become a hot topic in the field of computer vision. To further improve the performance of computer vision systems, image dehazing is necessary for the images acquired at the front end. Image dehazing algorithms reduce or even remove the interference caused by fog on image quality during signal processing, restoring good image clarity and more detailed information. Image dehazing has significant application value in video surveillance, object detection, consumer electronics, and military applications, and possesses broad development prospects.

[0003] Atmospheric transmittance is a crucial parameter in image dehazing, and its accuracy directly impacts the quality of the final dehazed image. Existing image restoration-based dehazing methods primarily rely on dark channel prior dehazing algorithms. These algorithms utilize minimum filtering to estimate atmospheric transmittance from the dark channel image, achieving satisfactory dehazing results. However, the transmittance calculations obtained by these algorithms are susceptible to the influence of white areas in the image. Consequently, in certain scenarios, the calculated transmittance and atmospheric light values ​​are often inaccurate, leading to issues such as underexposed image brightness, distorted sky colors, and loss of image details in the restored image. Summary of the Invention

[0004] To overcome the shortcomings of the prior art, the present invention aims to provide a defogging method based on atmospheric light curtain and fog concentration distribution estimation, in order to solve the problem of inaccurate estimation of atmospheric transmittance and atmospheric light value in existing dark channel prior methods, and further solve the problems of color distortion and loss of detail in the sky area scene.

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

[0006] A defogging method based on atmospheric light curtain and fog concentration distribution estimation includes the following steps:

[0007] Step 1: For the original foggy image I, estimate and optimize the initial atmospheric light curtain using the dark channel prior defogging theory;

[0008] Step 2: Using the average atmospheric light curtain as the threshold, perform adaptive foreground and background segmentation on the foggy image I to obtain an accurate atmospheric light curtain;

[0009] Step 3: Calculate the atmospheric transmittance t(x);

[0010] Step 4: Obtain the fog concentration distribution map of fog image I;

[0011] Step 5: Locate the atmospheric light value on the fog concentration distribution map. The gray value of the coordinate corresponding to the fog image I is the estimated atmospheric light value A.

[0012] Step 6: Inversely derive the atmospheric scattering model to obtain the foggy image restoration model. Substitute the foggy image I, atmospheric transmittance t(x), and atmospheric light value A into the restoration model to obtain the clear image J.

[0013] In one embodiment, step 1, estimating the initial atmospheric light curtain and optimizing it using guided filtering, is as follows:

[0014] Step 1.1: The foggy image I is considered as a degraded clear image. The foggy imaging model, i.e., the degradation and attenuation process, is represented by the following formula:

[0015] I(x)=J(x)t(x)+A[1-t(x)]

[0016] In the formula, I(x) represents the pixel value of the sharp image at x after degradation and attenuation, and J(x) represents the pixel value of the sharp image at x.

[0017] Step 1.2, define A[1-t(x)] as the atmospheric light curtain V, then the transmittance is t(x)=1-V / A;

[0018] Step 1.3: The foggy image I is filtered using guided filtering to remove noise and preserve edge details. In one embodiment, the atmospheric light curtain has the following two constraints:

[0019] W(x,y)≥V(x,y)≥0

[0020] In the formula, W(x,y) represents the minimum channel value of each pixel in the foggy image, which is roughly estimated using the minimum brightness value in the foggy image. The expression is as follows:

[0021] W(x,y)=min(I(x,y))

[0022] In the formula, I(x,y) is the brightness value of the (x,y) pixel in the foggy image;

[0023] In one embodiment, in step 1.3, the output image q of the guided filter and the guided image G satisfy a linear relationship within a two-dimensional window, expressed as:

[0024]

[0025] In the formula, i and k are pixel indices, and q i G represents the pixel value of the output image q at window position i.i This represents the pixel value of the guide image at window position i;

[0026] ω k For the filter window, a k and b k The coefficients of the linear function at the center pixel k of the filter window are obtained by the following formula:

[0027]

[0028]

[0029]

[0030]

[0031] In the formula, κ is the factor that prevents a from being a k Excessively large filter parameters, where ω is the filter window size, p i μ is the pixel value at position i in the image to be filtered. k It guides the image in the filter window ω k The mean of the middle, The image to be filtered is in the filtering window ω k The mean of the middle, It guides the image in the filter window ω k The variance in the diagram is represented by ε, which is the regularization parameter. Typically, the guide image and the image to be filtered are the same image. Therefore, the foggy image I is used as both the guide image and the image to be filtered, and the optimized image is obtained through calculation.

[0032] In one embodiment, step 2, adaptive foreground and background segmentation, consists of: enhancing the defogging level of the foreground area, reducing the defogging level of the background area, smoothing the edges of the foreground and background areas, and merging the defogging foreground and background areas.

[0033] In one embodiment, the adaptive foreground / farground segmentation represents the separated atmospheric light curtain V′(x,y) as:

[0034]

[0035] In the formula, V(x,y) represents a precise atmospheric light curtain, V mean V(x,y) represents the mean value of the atmospheric light curtain. nearby V(x,y) represents the grayscale value of the near-field atmospheric light curtain. distant This indicates the grayscale value of the distant atmospheric light curtain;

[0036] The smoothing of foreground and background edges refers to performing image smoothing operations at the foreground and background dividing lines of the atmospheric light curtain. Therefore:

[0037] V(x,y)nearby = a·V(x,y) distant +b

[0038] In the formula, a and b represent linear coefficients. Constraints are added to a and b:

[0039] a+b=1

[0040] The adaptive near-far scene segmentation and smoothing of the atmospheric light curtain V (x,y) is finally represented as:

[0041]

[0042] In one embodiment, the atmospheric transmittance t(x) is calculated using a transmittance estimation method based on an improved atmospheric light curtain, as follows:

[0043]

[0044] In the formula, t0 represents the lower limit of the atmospheric transmittance t(x), and V is the atmospheric light curtain.

[0045] In one embodiment, step 4 involves estimating an initial fog concentration distribution map, and then processing the initial fog concentration map using a morphological erosion algorithm and a guided filtering algorithm to obtain a refined fog concentration distribution map. The steps are as follows:

[0046] Step 4.1, calculate the fog concentration value f at pixel (x,y). density (x,y), as follows:

[0047] f density (x,y)=|s(x,y)-v(x,y)|

[0048] In the formula, s(x,y) and v(x,y) represent the saturation value and brightness value of pixel (x,y), respectively;

[0049] Step 4.2, according to f density (x,y), solve for the fog concentration in foggy image I to obtain the initial fog concentration distribution map;

[0050] Step 4.3: Perform morphological erosion on the image;

[0051] Step 4.4: Perform guided filtering on the image to further refine the initial fog concentration distribution map, eliminate the influence of white buildings and white objects in the image, and obtain a refined fog concentration distribution map.

[0052] In one embodiment, an improved quadtree segmentation algorithm is used to locate atmospheric light values, as follows:

[0053] Step 5.1: By scanning the foggy image, the foggy image is recursively divided into four equal parts. The difference between the standard deviation and the mean of the pixel values ​​of each region is calculated as the label of each region. Each time the division is performed, the size of the four labels is compared and the region with the largest label is selected to continue to be divided into four equal parts.

[0054] Step 5.2: Repeat the above operations, and set the grayscale value of white objects as the judgment threshold. That is, pixels with a grayscale value greater than the threshold in each region are identified as white objects. In the calculation, only the average value of regions with a grayscale value less than the threshold is calculated. Let the size of this average value be the label of each region. By comparing the size of the labels, the region with the largest label is selected for recursive segmentation. The recursion stops when the label size is greater than the label threshold. The expression is as follows:

[0055] Ω = {S(x,y)|0<S(x,y)<t}

[0056]

[0057] In the formula, Ω represents the set of pixels in the region that are less than the white object detection threshold, S(x,y) represents the pixel value, t represents the white object detection threshold, l represents the mean of the part of the region that does not contain white objects, and crad(Ω) represents the number of elements in the set Ω.

[0058] Step 5.3: Set a label threshold γ. When the value is less than the label threshold, the region is the area where the atmospheric light value is located. Calculate the maximum value in this region using the following expression:

[0059] f max =max(Ω) last )

[0060] In the formula, f max Ω represents the grayscale value at the deepest point in the fog density map. last This refers to the region containing atmospheric light values; record f. max Given the coordinates of the pixel, calculate the mean RGB channel value at the corresponding coordinate position in the original image. The expression is:

[0061]

[0062] In the formula, A is the final atmospheric light value. r A g A b These are the atmospheric light values ​​for the three RGB channels, respectively.

[0063] In one embodiment, step 6, the restoration formula is as follows.

[0064] J(x)=(I(x)-A) / t(x)+A

[0065] Compared with existing technologies, this invention introduces an atmospheric light curtain map instead of a depth map, refines the atmospheric light curtain map through guided filtering, and performs foreground and background segmentation to obtain an accurate atmospheric light curtain map, thereby determining the accurate atmospheric transmittance. First, an accurate fog concentration distribution map is estimated, and then improved quadtree segmentation is applied to the fog concentration map to obtain atmospheric light values, thus solving the problem of inaccurate prior atmospheric light value estimation in the dark channel. This invention achieves balanced defogging in both foreground and background areas, thus solving the problem of defogging distortion in the sky area and demonstrating good defogging effects for various scenes. Attached Figure Description

[0066] Figure 1 This is a flowchart of the algorithm in an example of the present invention.

[0067] Figure 2 This is a schematic diagram of an atmospheric scattering model.

[0068] Figure 3 The image shows the prior dehazing map for the dark channel. Among them, (a) is the original image, (b) is the transmittance map, (c) is the initial dehazing map, and (d) is the optimized dehazing map.

[0069] Figure 4 This is a schematic diagram of the guiding filter principle.

[0070] Figure 5 The images show the results of the atmospheric light curtain before and after guided filtering refinement in an example of this invention. (a) shows the result before guided filtering, and (b) shows the result after guided filtering.

[0071] Figure 6 The images show the results of adaptive near-far scene segmentation and smoothing of the atmospheric light curtain in an example of this invention. (a) shows the result before boundary smoothing, and (b) shows the result after boundary smoothing.

[0072] Figure 7 This is a graph showing the relationship between the difference in brightness and saturation of a foggy image and the fog concentration in an example of the present invention.

[0073] Figure 8 This is a diagram illustrating the fog concentration calculation process in an example of the present invention. (a) is the original image, (b) is the initial fog concentration diagram, (c) is the corrosion result diagram, and (d) is the final fog concentration diagram.

[0074] Figure 9 This is a schematic diagram of atmospheric light value estimation in an example of the present invention.

[0075] Figure 10The image shown is the dehazing result of the Dormitory image in an example of the present invention. Among them, (a) is the Dormitory image, (b) is DCP, (c) is FVR, (d) is BCCR, (e) is DEFADE, (f) is PI-Dehaze, (g) is MSCNN, (h) is DTGD, and (i) is AFD. Detailed Implementation

[0076] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0077] refer to Figure 1 This invention discloses a defogging method based on atmospheric light curtain and fog concentration distribution estimation, which mainly includes the following steps:

[0078] Step 1: For the original foggy image I, estimate and optimize the initial atmospheric light curtain.

[0079] In this step, the initial atmospheric light curtain is estimated using the dark channel prior dehazing theory, and then guided filtering is used to optimize the initial atmospheric light curtain. The process is as follows:

[0080] Step 1.1, according to Figure 2 The atmospheric scattering model shows the factors contributing to fog image formation. Foggy image I can be considered as a degradation of a clear image. The fog imaging model, i.e., the degradation and attenuation process, is expressed by the following equation:

[0081] E(d,λ)=E d (d,λ)+E a (d,λ)

[0082] =E0(λ)e -β(λ)d +E ∞ (λ)(1-e -β(λ)d )

[0083] In the formula, E0(λ)e -β(λ)d E represents the incident light attenuation model. ∞ (λ)(1-e -β(λ)d Let I(x) = E(d,λ) and t(x) = e -β(λ)d J(x) = E0(λ), A = E ∞ (λ), where I(x) represents a foggy image, J(x) represents a clear image, t(x) represents transmittance, and A represents atmospheric light value. Further simplification yields the atmospheric scattering model expression as:

[0084] I(x)=J(x)t(x)+A[1-t(x)]

[0085] Step 1.2, define A[1-t(x)] as atmospheric light curtain V, then the transmittance is t(x)=1-V / A.

[0086] Due to the physical characteristics of the atmospheric light curtain, it requires two constraints: first, the atmospheric light curtain must always be true and pure white; second, each pixel of the atmospheric light curtain V cannot exceed the minimum channel value of each pixel in the input image. As shown in the following formula:

[0087] W(x,y)≥V(x,y)≥0

[0088] In the formula, W(x,y) is the minimum channel value of each pixel in the foggy image, which can be roughly estimated using the minimum brightness value in the foggy image. The expression is:

[0089] W(x,y)=min(I(x,y))

[0090] In the formula, I(x,y) is a foggy image.

[0091] Figure 3 The image shows the effect of prior dehazing in the dark channel. Combining (a), (b), (c), and (d), it can be seen that after applying initial transmittance dehazing, a noticeable white halo effect appears at the edges of the restored image. Figure 3 As shown in (c). Existing algorithms use soft matting techniques to further refine the initial transmittance, resulting in a dehazing result as shown in [image / dehazing]. Figure 3 As shown in (d), the white aperture phenomenon is significantly reduced, but the overall image still has the problem of being too dark and having color distortion in some areas.

[0092] Step 1.3: Apply guided filtering to the foggy image I to remove noise and preserve edge details. The guided filtering model is as follows: Figure 4 As shown, the output image q and the guiding image G of the guided filter satisfy a linear relationship within a two-dimensional window, expressed as:

[0093]

[0094] In the formula, i and k are pixel indices, and q i G represents the pixel value of the output image q at window position i. i ω represents the pixel value of the guide image at window position i; k For the filter window, a k and b k This represents the linear function coefficient at the center pixel k of the filter window. The output image is compared with the linear function coefficient a. k and b k related.

[0095] Finding the coefficients of a linear function minimizes the difference between the input value G and the output value q. Therefore, the problem of finding the two linear coefficients is transformed into an optimal solution problem, expressed as follows:

[0096]

[0097]

[0098]

[0099]

[0100] In the formula, κ is the factor that prevents a from being a k Excessively large filter parameters, where ω is the filter window size, p i μ is the pixel value at position i in the image to be filtered. k It guides the image in the filter window ω k The mean of the middle, The image to be filtered is in the filtering window ω k The mean of the middle, It guides the image in the filter window ω k The variance in the diagram is represented by ε, which is the regularization parameter. Typically, the guide image and the image to be filtered are the same image. Therefore, the foggy image I is used as both the guide image and the image to be filtered, and the optimized image is obtained through calculation.

[0101] In practical applications, guided filtering can exhibit different performance characteristics depending on the guided image. When the guided image is relatively flat in a local region, the local variance is small, and thus a k =0, b k =μ k Guided filtering is similar to mean filtering, only performing a mean operation on the current local region; when the gradient of the guided image is large in a local region and there is edge detail information, the local variance is large, and in this case, a k =0, b k =0, the guided image has the function of maintaining the same details as the guided image. Figure 5 The image illustrates the effects of guided filtering before and after processing in an example of the present invention. Figure 5 As shown in (a), before the atmospheric light curtain was refined, the tree branches, grass, and buildings within the red box exhibited severe blockiness, with significant loss of detail on the tree branches, leaving only the trunk; the grass and soil details in the lower left corner were not separated; and the building outlines in the lower right corner were lost. After refined using guided filtering, the details were significantly improved. Figure 5 As shown in (b), the tree branches are well rendered, the grass is clearly detailed, and the building outlines are sharp. Therefore, the guided filter method effectively optimizes the atmospheric light curtain in terms of detail sharpness.

[0102] Step 2: Using the average atmospheric light curtain as the threshold, perform adaptive near-field segmentation on the foggy image I to obtain an accurate atmospheric light curtain.

[0103] The adaptive foreground / farground segmentation in this step specifically involves: enhancing the dehazing effect in the foreground area, reducing the dehazing effect in the background area, smoothing the edges of foreground and farground areas, and then blending the dehazed foreground and farground areas. Specifically:

[0104] Step 2.1 uses the mean value of the atmospheric light curtain as the segmentation threshold to achieve adaptive foreground and background segmentation of the image, suppressing the dehazing effect in the foreground region while enhancing the dehazing effect in the background region, thereby optimizing the overall dehazing performance of the image. The separated atmospheric light curtain V′(x,y) is represented as:

[0105]

[0106] In the formula, V(x,y) represents a precise atmospheric light curtain, V mean V(x,y) represents the mean value of the atmospheric light curtain. nearby V(x,y) represents the grayscale value of the near-field atmospheric light curtain. distant This indicates the grayscale value of the distant atmospheric light curtain;

[0107] Step 2.2: Smooth the foreground / ground boundary line. This invention smooths the foreground / ground edge by performing image smoothing at the foreground / ground boundary line of the atmospheric light curtain. Therefore, the foreground / ground atmospheric light curtain at the boundary line can be represented by a linear function:

[0108] V(x,y) nearby = a·V(x,y) distant +b

[0109] In the formula, a and b represent linear coefficients. Constraints are added to a and b:

[0110] a+b=1

[0111] Combining the above process, the atmospheric light curtain V(x,y) after adaptive near-far scene segmentation and smoothing is finally expressed as:

[0112]

[0113] Figure 6 It demonstrates the smooth, adaptive segmentation of foreground and background scenery by the atmospheric light curtain. Figure 6 In (a), the transition area between foreground and background buildings results in a noticeable boundary line in the final dehazed image. After adaptive foreground / background segmentation smoothing, as shown in (a), the transition area between foreground and background buildings results in a noticeable boundary line in the final dehazed image. Figure 6 As shown in (b), the image changes smoothly around the boundary of the transition zone, with finer details and a significant smoothing effect.

[0114] Step 3: Calculate the atmospheric transmittance t(x).

[0115] This step uses a transmittance estimation method based on an improved atmospheric light curtain to calculate atmospheric transmittance t(x), and further processes the transmittance to obtain a refined transmittance. After restoration of degraded images from foggy weather, the images are easily affected by noise, resulting in an overall brighter image. Furthermore, if the atmospheric transmittance t(x) is too small, it will directly cause the atmospheric attenuation term J(x)t(x) to approach 0. Therefore, a lower limit t0 = 0.1 is set for the atmospheric transmittance t(x). The final refined atmospheric transmittance estimate is as follows:

[0116]

[0117] In the formula, t0 represents the lower limit of the atmospheric transmittance t(x), and V is the atmospheric light curtain.

[0118] Step 4: Obtain the fog concentration distribution map of fog image I.

[0119] In this step, an initial fog concentration distribution map is estimated, and then a morphological erosion algorithm and a guided filtering algorithm are used to process the initial fog concentration map to obtain a refined fog concentration distribution map. The steps are as follows:

[0120] Step 4.1, based on the characteristics of human vision and through statistical analysis of a large number of foggy images, a relationship was found between scene depth, fog density, brightness, and the difference in saturation. As scene depth increases, fog density also increases, and the difference in brightness and saturation also increases accordingly; the three are positively correlated, as shown in the following formula:

[0121] d(x,y)∝c(x,y)∝(v(x,y)-s(x,y))

[0122] In the formula, d(x,y) is the scene depth, c(x,y) is the fog density, v(x,y) is the brightness, and s(x,y) is the saturation.

[0123] Based on this, the difference between brightness and saturation in a foggy image represents the fog density distribution map. The fog density value f at pixel (x,y) is then calculated. density (x,y), as follows:

[0124] f density (x,y)=|s(x,y)-v(x,y)|

[0125] In the formula, s(x,y) and v(x,y) represent the saturation value and brightness value of pixel (x,y), respectively; Figure 7 The image illustrates the relationship between the difference in brightness and saturation of a foggy image and the fog concentration in an example of the present invention. Combined with... Figure 7As shown in (a), (b), (c), and (d), the difference between brightness and saturation gradually increases with the increase of fog concentration. The difference between brightness and saturation is greatest in dense fog areas.

[0126] Step 4.2, according to f density (x,y) is used to solve for the fog concentration in foggy image I, and an initial fog concentration distribution map is obtained. However, the initial fog concentration map cannot avoid the influence of white objects in the image on the estimation of atmospheric light values.

[0127] Step 4.3: Perform morphological erosion on the image. The influence of white buildings in the image is basically eliminated. However, the window of morphological erosion causes a blocky effect, which means that the white objects in the image are not completely eliminated.

[0128] Step 4.4: Perform guided filtering on the image to further refine the initial fog concentration distribution map, eliminate the influence of white buildings and white objects in the image, and obtain a refined fog concentration distribution map. Figure 8 The document details steps 4.2, 4.3, and 4.4, ultimately yielding a refined fog density map. First, the fog density of the original image is calculated, as follows: Figure 8 As shown in (b), the white objects in the thin fog area of ​​the initial fog density map have similar gray values ​​to those in the distant dense fog area. This increases the difficulty of locating atmospheric light value regions. It can be concluded that the initial fog density map cannot completely eliminate the influence of white objects on atmospheric light value estimation. Therefore, for... Figure 8 (b) Perform morphological corrosion, and the corrosion result is as follows: Figure 8 As shown in (c), the influence of white buildings has been largely eliminated from the image, but the windowing caused by morphological erosion results in a blocky effect, meaning that white objects in the image are not completely eliminated. Therefore, for Figure 8 (c) Guided filtering is performed to further refine the initial fog concentration map, and the results are as follows: Figure 8 As shown in (d), the final fog density map eliminates the effects of white buildings and white objects in the image.

[0129] Step 5: Locate the atmospheric light value on the fog concentration distribution map. The gray value of the coordinate corresponding to the fog image I is the estimated atmospheric light value A.

[0130] In this step, an improved quadtree segmentation algorithm is used to locate atmospheric light values ​​on the fog density map, as follows:

[0131] Step 5.1: Traditional quadtree segmentation estimates atmospheric light values. This involves scanning a foggy image and recursively dividing it into four equal parts. The difference between the standard deviation and the mean of the pixel values ​​in each region is used as the label for that region. After each segmentation, the four labels are compared, and the region with the largest label is further divided into four equal parts. This process is repeated until the label of the segmented region is less than a pre-set threshold, at which point the quadtree segmentation stops. The quadtree segmentation method is as follows: Figure 9 As shown.

[0132] Step 5.2: White objects in foggy images can interfere with the threshold determination during quadtree segmentation. Therefore, the quadtree segmentation discrimination method has been improved. To avoid white objects affecting the mean of each region, this invention sets the grayscale value of white objects as the determination threshold when repeating the above operations. That is, pixels with a grayscale value greater than the threshold in each region are identified as white objects. The calculation only calculates the mean of regions with a grayscale value less than the threshold. Let the size of this mean be the label of each region. By comparing the size of the labels, the region with the largest label is selected for recursive segmentation until the label size is greater than the label threshold, at which point the recursion stops. The expression is as follows:

[0133] Ω = {S(x,y)|0<S(x,y)<t}

[0134]

[0135] In the formula, Ω represents the set of pixels in the region that are less than the threshold for determining white objects, S(x,y) represents the pixel value, t represents the threshold for determining white objects, l represents the mean value of the part of the region that does not contain white objects, and crad(Ω) represents the number of elements in the set Ω.

[0136] Step 5.3: Set a label threshold γ. When the value is less than the label threshold, the region is the area where the atmospheric light value is located. Calculate the maximum value in this region using the following expression:

[0137] f max =max(Ω) last )

[0138] In the formula, f max Ω represents the grayscale value at the deepest point in the fog density map. last This refers to the region containing atmospheric light values; record f. max Given the coordinates of the pixel, calculate the mean RGB channel value at the corresponding coordinate position in the original image. The expression is:

[0139]

[0140] In the formula, A is the final atmospheric light value. r A g A bThese are the atmospheric light values ​​for the three RGB channels, respectively.

[0141] Step 6: Obtain the foggy image restoration model by inversely calculating the atmospheric scattering model. Substitute the foggy image I, atmospheric transmittance t(x), and atmospheric light value A into the restoration model to obtain the clear image J, thus completing the dehazing operation on the original image. The final restoration formula obtained by this invention can be expressed as follows:

[0142] J(x)=(I(x)-A) / t(x)+A

[0143] Table 1 presents the objective evaluation metrics of the Dormitory dehazing results for foggy images in this invention, compared with other algorithms. The seven classic comparison algorithms are: Dark Channel Prior (DCP), Fast Visibility Restoration (FVR), Boundary Constraint and Contextual Regularization (BCCR), Dubbed Density of Fog Assessment based Defogger (DEFADE), Prior Information Based Image Dehazing Algorithm (PI-Dehaze), Multi-scale Convolutional Neural Networks (MSCNN), and Dual Transmission Maps Strategy and gGradient-Domain (DTGD).

[0144] For ease of description, the dehazing algorithm based on atmospheric light curtain and fog concentration distribution estimation (AFD) of this invention is referred to as AFD. The parameter settings are as follows: median filter window sv is 41, constant p is 0.95, guided filter window r is 50, regularization parameter ε is 0.004, lower limit of transmittance t0 is 0.1, and white object determination threshold t is 0.8.

[0145] The comparative experiment used standard deviation (STD), average gradient (AG), and information entropy (IE) as image evaluation metrics. As shown in Table 1, the present invention ranked first among all algorithms in terms of standard deviation (STD) and average gradient (AG), and second in terms of information entropy (IE). Overall, the invention demonstrates excellent performance, objectively verifying its superior capabilities.

[0146] Table 1

[0147] method STD AG IE Dormitory 57.0224 4.6180 7.1367 DCP 55.3000 4.7915 7.3879 FVR 27.6873 6.7469 6.5460 BCCR 62.8141 6.3770 6.6207 DEFADE 79.6426 6.9868 7.0395 PI-Dehaze 83.0301 6.5531 7.5904 MSCNN 63.0718 5.4936 7.3176 DTGD 56.1544 5.1158 7.1350 AFD 85.2983 7.4064 7.5036

[0148] Subjective evaluation metrics comparing Dormitory's dehazing results for foggy images with other algorithms are as follows: Figure 10 As shown. Compared to foggy images, all seven image dehazing algorithms achieved dehazing effects to varying degrees. The processing results of the DCP algorithm are shown below. Figure 10 As shown in (b), small scenes such as street cars and plants appear blurred, and the overall image brightness is low. This is due to errors in atmospheric light value estimation. The dehazed image produced by the FVR algorithm is shown below. Figure 10 As shown in (c), the dehazed image exhibits severe blockiness and significant loss of detail, with an overall grayish tone. This is primarily due to the lack of refinement in the atmospheric veil obtained from the minimum filtering solution, resulting in poor final dehazing performance. The processing results of the BCCR algorithm are as follows: Figure 10 As shown in (d), the overall brightness of the image is too high, causing oversaturation of buildings and white objects, resulting in color distortion and poor visual quality. The processing result of the DEFADE algorithm is as follows: Figure 10 As shown in (e), the overall image brightness is too low, the colors of the plants are distorted, and the details of the building floors and the grass are severely blurred. The processing result of the PI-Dehaze algorithm is as follows... Figure 10 As shown in (f), the image dehazing is incomplete, the overall tone is grayish, the blue roofs, white buildings, and green vegetation are light in color, and the overall contrast is low. The processing result of the MSCNN algorithm is as follows: Figure 10 As shown in (g), low image contrast and color saturation result in blurred details. The processing result of the DTGD algorithm is as follows: Figure 10 As shown in (h), the image is severely sharpened, with oversaturated colors in the highlight areas and an overall blackish tone. The dehazed image produced by the algorithm of this invention is shown below. Figure 10 As shown in (i), the overall brightness of the image is balanced, the contrast and saturation of plants, buildings and streets are moderate, the details of floors and grass are clear, and the overall visual effect is better than other contrast algorithms.

Claims

1. A defogging method based on atmospheric light curtain and fog concentration distribution estimation, characterized in that, Includes the following steps: Step 1: For the original foggy image I, estimate and optimize the initial atmospheric light curtain using the dark channel prior defogging theory; Step 2: Using the average atmospheric light curtain as the threshold, perform adaptive foreground and background segmentation on the foggy image I to obtain an accurate atmospheric light curtain; the adaptive foreground and background segmentation is as follows: enhance the defogging degree of the distant area, reduce the defogging degree of the near area, smooth the edges of the foreground and background, and fuse the defogging foreground and background areas. Step 3: Calculate atmospheric transmittance t ( x ); Step 4: Obtain the fog concentration distribution map of fog image I; Step 5: Locate the atmospheric light value on the fog concentration distribution map. The gray level of the corresponding coordinate in the foggy image I is the estimated atmospheric light value. A ; Step 6: Inversely derive the atmospheric scattering model to obtain the foggy image restoration model, and combine the foggy image I with the atmospheric transmittance. t ( x ) and atmospheric light value A Substituting the image into the restoration model yields a clear image. J ; The adaptive near-far scene segmentation separates the atmospheric light curtain. V ´( x , y ) is represented as: In the formula, V ( x, y This indicates a precise atmospheric light curtain. V mean This represents the average value of the atmospheric light curtain; V ( x, y ) nearby This indicates the grayscale value of the near-field atmospheric light curtain. V ( x, y ) distant This indicates the grayscale value of the distant atmospheric light curtain; The smoothing of foreground and background edges refers to performing image smoothing operations at the foreground and background dividing lines of the atmospheric light curtain. Therefore: In the formula, a and b To represent linear coefficients, add constraints to a and b: Adaptive near-field segmentation and smoothing of atmospheric light curtain V ''( x , y The final expression is: 。 2. The defogging method based on atmospheric light curtain and fog concentration distribution estimation according to claim 1, characterized in that, In step 1, the initial atmospheric light curtain is estimated and optimized using guided filtering, as follows: Step 1.1: The foggy image I is considered as a degraded clear image. The foggy imaging model, i.e., the degradation and attenuation process, is represented by the following formula: In the formula, I ( x ) indicates a clear image in x The pixel value after degradation and attenuation, Indicates correspondence x The pixel values ​​of a clear image; Step 1.2, A [1- t ( x Defined as an atmospheric light curtain. V The transmittance is t ( x )=1- V / A ; Step 1.3: Use guided filtering to filter the foggy image I to remove noise and preserve edge details.

3. The defogging method based on atmospheric light curtain and fog concentration distribution estimation according to claim 2, characterized in that, The atmospheric light curtain has the following two constraints: In the formula, W ( x , y () represents the minimum channel value of each pixel in the foggy image. A rough estimate is made using the minimum brightness value in the foggy image, expressed as: In the formula, I ( x , y ) is a foggy image in ( x, y The brightness value of a pixel.

4. The defogging method based on atmospheric light curtain and fog concentration distribution estimation according to claim 2, characterized in that, Step 1.3, the output image of the guided filter q and guide image G A linear relationship exists within a two-dimensional window, expressed as: In the formula, i and k It is a pixel index. q i Indicates the output image q In window position i pixel values, G i Indicates the position of the guide image in the window. i Pixel values; ω k For filtering window, a k and b k Indicates the pixel at the center of the filtering window k The coefficients of the linear function of position are obtained by the following formula: In the formula, It is to prevent a k Excessively large filter parameters ω It is the size of the filtering window. p i The image to be filtered is at position i pixel values, μ k It guides the image in the filter window. ω k The mean of the middle, The image to be filtered is in the filtering window ω k The mean of the middle, σ 2 k It guides the image in the filter window. ω k The variance in ε This represents the regularization parameter; the guide image and the image to be filtered are the same image, therefore the foggy image is used. I The optimized image is obtained by taking the guiding image and the image to be filtered as inputs and performing calculations.

5. The defogging method based on atmospheric light curtain and fog concentration distribution estimation according to claim 1, characterized in that, Atmospheric transmittance was calculated using a transmittance estimation method based on an improved atmospheric light curtain. t ( x ), which is represented as follows: In the formula, t 0 represents atmospheric transmittance. t ( x The lower limit of the value of ) V It serves as an atmospheric light curtain.

6. The defogging method based on atmospheric light curtain and fog concentration distribution estimation according to claim 1, characterized in that, Step 4 involves estimating the initial fog concentration distribution map, and then processing the initial fog concentration map using morphological erosion and guided filtering algorithms to obtain a refined fog concentration distribution map. The steps are as follows: Step 4.1, calculate pixels ( x , y Fog concentration value at ) f density ( x , y ),as follows: In the formula, s ( x , y )and v ( x , y ) respectively represent pixels ( x , y The saturation and brightness values ​​of ( ); Step 4.2, according to f density ( x , y ), solve for the fog concentration in foggy image I, and obtain the initial fog concentration distribution map; Step 4.3: Perform morphological erosion on the image; Step 4.4: Perform guided filtering on the image to further refine the initial fog concentration distribution map, eliminate the influence of white buildings and white objects in the image, and obtain a refined fog concentration distribution map.

7. The defogging method based on atmospheric light curtain and fog concentration distribution estimation according to claim 1, characterized in that, Atmospheric light value localization is performed using an improved quadtree segmentation algorithm, as follows: Step 5.1: By scanning the foggy image, the foggy image is recursively divided into four equal parts. The difference between the standard deviation and the mean of the pixel values ​​of each region is calculated as the label of each region. Each time the division is performed, the size of the four labels is compared and the region with the largest label is selected to continue to be divided into four equal parts. Step 5.2: Repeat step 5.1, and set the grayscale value of white objects as the judgment threshold. That is, pixels with a grayscale value greater than the threshold in each region are identified as white objects. In the calculation, only the average value of regions with a grayscale value less than the threshold is calculated. Let the size of this average value be the label of each region. By comparing the size of the labels, the region with the largest label is selected for recursive segmentation. The recursion stops when the label size is greater than the label threshold. The expression is as follows: In the formula, Ω represents the set of pixels within the region that are smaller than the threshold for determining white objects. S ( x , y ) represents the pixel value size. t This indicates the threshold for detecting white objects. l This represents the mean of the portion of the area that does not contain white objects. crad (Ω) represents the number of elements in set Ω; Step 5.3, Set the label threshold γ When the value is less than the label threshold, the region is the area where the atmospheric light value is located. The maximum value in this region is calculated using the following expression: In the formula, f max Ω represents the grayscale value at the deepest point in the fog density map. last This refers to the region where atmospheric light values ​​are located. Record f max Given the coordinates of the pixel, calculate the mean RGB channel value at the corresponding coordinate position in the original image. The expression is: In the formula, A This is the final atmospheric light value. A r , A g , A b These are the atmospheric light values ​​for the three RGB channels, respectively.

8. The defogging method based on atmospheric light curtain and fog concentration distribution estimation according to claim 1, characterized in that, The restoration formula for step 6 is as follows: 。

Citation Information

Patent Citations

  • Single-image self-adaptation defogging method based on domain transformation and weighted quadtree decomposition

    CN104809709A

  • Adaptive processing method for smog sky and white area in aerial images of unmanned aerial vehicles

    CN109087254A