A dark channel dehazing method and system fusing color enhancement information

CN118608428BActive Publication Date: 2026-09-25BEIFANG UNIV OF NATITIES
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410743317.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-11
Publication Date
2026-09-25
Estimated Expiration
2044-06-11

AI Technical Summary

Technical Problem

因此,暗通道先验方法不能有效地对有雾图像中的高亮区域进行处理

Benefits of technology

[0094]由上述技术方案可知,本发明实施例提供的融合彩色增强信息的暗通道去雾方法,将I(x)转换至YCbCr空间,通过修正大气光值和透射率进行Y通道图像进行自适应融合复原,得到YCbCr空间的复原图像J”(x);基于彩色的有雾图像I(x)的暗通道图像Idark(x)初步调节I(x)的大气光值,并进一步基于容差调节机制修正天空及明亮区域的透射率,得到修正大气光图A'和透射率修正图t'last(x);将复原图像J”(x)的灰度图作为梯度域引导滤波的引导图像,对透射率修正图t'last(x)进行引导滤波,将引导滤波后的图和修正大气光图A'代入大气散射模型中,得到RGB空间的复原图像J'(x);自适应加权融合RGB空间的复原图像J'(x)和YCbCr空间的复原图像J”(x),获得自适应融合复原图像J(x)。本发明的方法基于区间估计的大气光值估计方法和天空区域的透射率自适应补偿方法,保证了大气散射模型中关键参数估计的精确度,针对复原图像色彩饱和度和亮度不足的问题,采用基于视觉感知的亮度修正模型,有效提高复原图像的亮度和色彩表现力,对不同雾浓度场景下的有雾图像去雾效果理想,具有较好的鲁棒性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118608428B_ABST
    Figure CN118608428B_ABST
Patent Text Reader

Abstract

The application provides a dark channel defogging method and system for fusing color enhanced information, and belongs to the technical field of image processing. The method comprises the following steps: converting I(x) to YCbCr space, performing adaptive fusion restoration on the Y channel image by modifying the atmospheric light value and the transmittance, and obtaining a restored image J''(x) in YCbCr space; obtaining a dark channel image I dark (x) of the foggy image I(x) based on color; preliminarily adjusting the atmospheric light value of I(x), and further modifying the transmittance of the sky and bright areas based on a tolerance adjustment mechanism to obtain a modified atmospheric light image A' and a transmittance modification image t' last (x); taking the gray image of the restored image J''(x) as a guide image for gradient domain guided filtering, performing guided filtering on the transmittance modification image t' last (x), and substituting the guided filtered image and the modified atmospheric light image A' into an atmospheric scattering model to obtain a restored image J'(x) in RGB space; adaptively weighting and fusing the restored image J'(x) in RGB space and the restored image J''(x) in YCbCr space to obtain an adaptively fused restored image J(x).
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a dark channel dehazing method that integrates color enhancement information. Background Technology

[0002] Haze is one of the leading causes of image blurring. During hazy weather, the presence of numerous tiny particles in the atmosphere absorbs and scatters light, leading to blurred textures and color distortion in images acquired by professional monitoring and remote sensing imaging systems. This affects subsequent visual tasks such as outdoor surveillance, target tracking, and scene analysis. Insufficient color saturation and brightness result in blurred image details and inaccurate feature extraction in subsequent recognition tasks. Therefore, effectively restoring images acquired under hazy weather conditions is an important research area.

[0003] In recent years, significant breakthroughs have been achieved in dehazing algorithms based on physical models. He et al., through statistical analysis of numerous haze-free images, discovered that most block areas in haze-free images always contain pixels with very low grayscale values. Minimum filtering can be used to process foggy images to obtain a dark channel map, which is then refined using a soft matting algorithm. Finally, a transmittance map is obtained through a medium propagation function. This method achieves ideal dehazing results for foggy images without sky, and the color restoration is relatively natural. However, some limitations remain in practical applications. First, when the fog in a foggy image is dense, the dark channel prior method struggles to effectively extract the dark channel of that local area. This is because the dark channel prior method relies on pixels with extremely low values ​​to estimate transmittance and atmospheric light values. Therefore, it cannot effectively process bright areas in foggy images. Second, the dark channel prior method requires multiple large-scale linear equation calculations, resulting in high time complexity. Therefore, its practicality in real-world applications is poor. Summary of the Invention

[0004] In view of this, the present invention provides a dark channel dehazing method and system that integrates color enhancement information, which effectively processes the bright areas in foggy images, is applicable to dehazing of foggy images in different fog concentration scenarios, improves the color saturation and brightness of the restored image, and has good practicality.

[0005] The technical solution adopted by the embodiments of the present invention to solve its technical problem is as follows:

[0006] A dark channel dehazing method that integrates color enhancement information includes:

[0007] Step S1: I(x) is converted to YCbCr space, and the Y channel image is adaptively fused and restored by correcting atmospheric light value and transmittance to obtain the restored image J(x) in YCbCr space.

[0008] Step S2, based on the dark channel image I of the colored hazy image I(x) dark (x) The atmospheric light value of I(x) is initially adjusted, and the transmittance of the sky and bright areas is further corrected based on the tolerance adjustment mechanism to obtain the corrected atmospheric light map A' and the transmittance correction map t'. last (x);

[0009] Step S3: Use the grayscale image of the restored image J(x) as the guide image for gradient domain guided filtering, and apply it to the transmittance correction image t' last (x) Perform guided filtering, and substitute the guided filtered image and the corrected atmospheric light image A' into the atmospheric scattering model to obtain the restored image J'(x) in RGB space;

[0010] Step S4: Adaptively weightedly fuse the restored image J'(x) in the RGB space and the restored image J"(x) in the YCbCr space to obtain the adaptively fused restored image J(x).

[0011] Preferably, step S1 includes:

[0012] Step S11: Map the atmospheric scattering model of I(x) to the YCbCr space to obtain the Y channel image I. Y (x), Cb channel image I Cr (x), Cr channel image I Br The atmospheric scattering model expression for I(x) is:

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

[0014] In the formula: x is the image pixel position, I(x) is the pixel value of the foggy image at pixel x; J(x) is the pixel value of the restored image at pixel x; t(x) is the transmittance at pixel x; A is the global atmospheric light value;

[0015] Step S12, obtain the foggy image I Y Dark channel image of (x) The dark channel images were statistically analyzed in descending order of brightness. The location of the top 0.1% of pixels, in I Y Find the corresponding pixel in (x) and calculate the mean value of the pixel as the pixel value of each point in the global atmospheric light map of YCbCr space, thus obtaining the global atmospheric light map A in YCbCr space. Y ;

[0016] Step S13: Introduce the dehazing coefficient ω into the initial transmittance map t in the YCbCr space. Y (x), t Y The expression for (x) is:

[0017]

[0018] In the formula, ω∈(0,1], and Ω(x) represents the filter window;

[0019] Step S14, I Y (x) serves as a guide map for the initial transmittance map t. Y (x) Perform guided filtering and refinement to obtain the transmittance correction map t” in the YCbCr space. last (x);

[0020] Step S15, the transmittance correction map t” last (x) and the global atmospheric light map A Y Substitute the Y channel to restore image J Y The expression (x) is used to obtain the restored Y-channel image J. Y (x):

[0021]

[0022] Step S16, merge the three-channel images J Y (x), I Cr (x), I Br (x), and convert the merged image from YCbCr space to RGB space to obtain the restored image J(x) in YCbCr space.

[0023] Preferably, step S2 includes:

[0024] Step S21, obtain the dark channel image I of I(x). dark (x):

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

[0026] Step S22, for I dark Perform grayscale opening operations on both sides of expression (x) to obtain the dark channel image I'. dark (x):

[0027] I' dark (x)=J′ dark (x)t′(x)+A′(1-t′(x))

[0028] In the formula, I'dark (x), J' dark (x), A', and t'(x) are pairs of I dark (x), J dark The result of performing grayscale opening operations on (x), A, and t(x);

[0029] Step S23, let J' dark (x)→0, I' dark (x)=A'(1-t'(x)), introducing the dehazing coefficient ω into the initial transmittance map t'(x) in the RGB space, the expression for t'(x) is:

[0030]

[0031] In the formula, t'(x)≥0, I' dark (x) / A'∈(0,1);ω∈(0,1];

[0032] Step S24: Define the expression for the corrected atmospheric light value A' and the range of values ​​for A', to obtain the corrected atmospheric light map A' in RGB space; wherein, the maximum pixel value of I(x) in the three RGB channels is taken as the upper limit of A', and I' dark (x) The maximum value is used as the lower limit:

[0033]

[0034] α=mean(I′ dark (x))

[0035]

[0036] In the formula, α is the adjustment parameter, and mean(·) represents the mean value over all elements;

[0037] Step S25, define the tolerance adjustment map Map(x) and the U expression for the tolerance adjustment parameter:

[0038] Map(x) = I(x) - βA

[0039] N = {Map(x) | Map(x) ≥ 0}

[0040]

[0041] In the formula, β is the adjustment factor; N is the set of pixels in the tolerance adjustment map that are greater than or equal to 0. num Let I(x) be the total number of pixels in set N. num This represents the number of elements in I(x);

[0042] Step S26: The region satisfying |I(x)-A'|<U is taken as the sky and bright region of the hazy image I(x), and the transmittance correction map t' is generated based on the tolerance mechanism. last The expression (x) is defined as:

[0043]

[0044] The corrected atmospheric light map A' in the RGB space and the initial transmittance map t'(x) in the RGB space are imported into the corrected transmittance map t'. last In formula (x), the transmittance correction diagram t' is obtained. last (x).

[0045] Preferably, step S4 is based on the expression for J(x) of the adaptively fused and restored image as follows:

[0046] J(x) = qJ′(x) + pJ″(x)

[0047]

[0048] In the formula: p and q are adjustment parameters, and q = 1 - p.

[0049] Preferably, the defogging coefficient ω is ω = 0.95; and the adjustment factor β is β = 0.95.

[0050] This invention provides a dark channel dehazing system that integrates color enhancement information, comprising:

[0051] The YCbCr spatial restoration module is used to convert I(x) to YCbCr space, and adaptively fuse and restore the Y channel image by correcting atmospheric light value and transmittance to obtain the restored image J(x) in YCbCr space.

[0052] RGB space restoration module for the dark channel image I based on a colored hazy image I(x). dark (x) The atmospheric light value of I(x) is initially adjusted, and the transmittance of the sky and bright areas is further corrected based on the tolerance adjustment mechanism to obtain the corrected atmospheric light map A' and the transmittance correction map t'. last (x);

[0053] The RGB space restoration module is used to use the grayscale image of the restored image J(x) as the guide image for gradient domain guided filtering, and to modify the transmittance correction image t'. last (x) Perform guided filtering, and substitute the guided filtered image and the corrected atmospheric light image A' into the atmospheric scattering model to obtain the restored image J'(x) in RGB space;

[0054] An adaptive weighted fusion module is used to adaptively weighted fuse the restored image J'(x) in the RGB space and the restored image J"(x) in the YCbCr space to obtain an adaptively fused restored image J(x).

[0055] Preferably, the YCbCr spatial restoration module:

[0056] Mapping the atmospheric scattering model of I(x) onto the YCbCr space yields the Y-channel image I. Y (x), Cb channel image I Cr (x), Cr channel image I Br The atmospheric scattering model expression for I(x) is:

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

[0058] In the formula: x is the image pixel position, I(x) is the pixel value of the foggy image at pixel x; J(x) is the pixel value of the restored image at pixel x; t(x) is the transmittance at pixel x; A is the global atmospheric light value;

[0059] Find the foggy image I Y Dark channel image of (x) The dark channel images were statistically analyzed in descending order of brightness. The location of the top 0.1% of pixels, in I Y Find the corresponding pixel in (x) and calculate the mean value of the pixel as the pixel value of each point in the global atmospheric light map of YCbCr space, thus obtaining the global atmospheric light map A in YCbCr space. Y ;

[0060] The dehazing coefficient ω is introduced into the initial transmittance diagram t in the YCbCr space. Y (x), t Y The expression for (x) is:

[0061]

[0062] In the formula, ω∈(0,1], and Ω(x) represents the filter window;

[0063] Will I Y (x) serves as a guide map for the initial transmittance map t. Y (x) Perform guided filtering and refinement to obtain the transmittance correction map t” in the YCbCr space. last (x);

[0064] The transmittance correction graph t” last (x) and the global atmospheric light map A Y Substitute the Y channel to restore image JY The expression (x) is used to obtain the restored Y-channel image J. Y (x):

[0065]

[0066] Merging three-channel images J Y (x), I Cr (x), I Br (x), and convert the merged image from YCbCr space to RGB space to obtain the restored image J(x) in YCbCr space.

[0067] Preferably, the RGB space restoration module:

[0068] Find the dark channel image I of I(x). dark (x):

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

[0070] to I dark Perform grayscale opening operations on both sides of expression (x) to obtain the dark channel image I'. dark (x):

[0071] I' dark (x)=J′ dark (x)t′(x)+A′(1-t′(x))

[0072] In the formula, I' dark (x), J' dark (x), A', and t'(x) are pairs of I dark (x), J dark The result of performing grayscale opening operations on (x), A, and t(x);

[0073] Let J' dark (x)→0, I' dark (x)=A'(1-t'(x)), introducing the dehazing coefficient ω into the initial transmittance map t'(x) in the RGB space, the expression for t'(x) is:

[0074]

[0075] In the formula, t'(x)≥0, I' dark (x) / A'∈(0,1);ω∈(0,1];

[0076] Define the expression for the corrected atmospheric light value A' and the range of values ​​for A', thus obtaining the corrected atmospheric light map A' in RGB space; where the maximum pixel value of I(x) in the three RGB channels is taken as the upper limit of A', and I' dark (x) The maximum value is used as the lower limit:

[0077]

[0078] α=mean(I′ dark (x))

[0079]

[0080] In the formula, α is the adjustment parameter, and mean(·) represents the mean value over all elements;

[0081] Define the tolerance adjustment plot Map(x) and the U expression for the tolerance adjustment parameter:

[0082] Map(x) = I(x) - βA

[0083] N = {Map(x) | Map(x) ≥ 0}

[0084]

[0085] In the formula, β is the adjustment factor; N is the set of pixels in the tolerance adjustment map that are greater than or equal to 0. num Let I(x) be the total number of pixels in set N. num This represents the number of elements in I(x);

[0086] The regions satisfying |I(x)-A'|<U are designated as the sky and bright regions of the hazy image I(x), and a transmittance correction map t' based on a tolerance mechanism is generated. last The expression (x) is defined as:

[0087]

[0088] The corrected atmospheric light map A' in the RGB space and the initial transmittance map t'(x) in the RGB space are imported into the corrected transmittance map t'. last In formula (x), the transmittance correction diagram t' is obtained. last (x).

[0089] Preferably, the expression for J(x) based on adaptive fusion restoration of the image is:

[0090] J(x) = qJ′(x) + pJ″(x)

[0091]

[0092] In the formula: p and q are adjustment parameters, and q = 1 - p.

[0093] Preferably, the defogging coefficient ω is ω = 0.95; and the adjustment factor β is β = 0.95.

[0094] As can be seen from the above technical solution, the dark channel dehazing method for fusing color enhancement information provided in this embodiment of the invention transforms I(x) to the YCbCr space, and performs adaptive fusion restoration of the Y channel image by correcting atmospheric light value and transmittance to obtain the restored image J(x) in the YCbCr space; the dark channel image I(x) is based on the colored hazy image I(x). dark (x) The atmospheric light value of I(x) is initially adjusted, and the transmittance of the sky and bright areas is further corrected based on the tolerance adjustment mechanism to obtain the corrected atmospheric light map A' and the transmittance correction map t'. last (x); The grayscale image of the restored image J (x) is used as the guide image for gradient domain guided filtering, and the transmittance correction image t' is then processed. last (x) is guided filtering, and the guided-filtered image and the corrected atmospheric light image A' are substituted into the atmospheric scattering model to obtain the restored image J'(x) in RGB space; the restored image J'(x) in RGB space and the restored image J"(x) in YCbCr space are adaptively weighted and fused to obtain the adaptively fused restored image J(x). The method of this invention is based on the atmospheric light value estimation method of interval estimation and the adaptive compensation method of transmittance in the sky region, which ensures the accuracy of the estimation of key parameters in the atmospheric scattering model. In order to address the problem of insufficient color saturation and brightness in the restored image, a brightness correction model based on visual perception is adopted, which effectively improves the brightness and color performance of the restored image. It has an ideal dehazing effect on foggy images under different fog concentration scenes and has good robustness. Attached Figure Description

[0095] Figure 1 This is a schematic diagram illustrating the implementation process of the dark channel dehazing method that integrates color enhancement information according to the present invention.

[0096] Figure 2 This is a schematic diagram of the atmospheric scattering model.

[0097] Figure 3 This is a display image of the dataset used in this invention, showing the foggy conditions.

[0098] Figure 4 This is a schematic diagram comparing the sky region transmittance compensation results of the present invention.

[0099] Figure 5 This is a schematic diagram comparing the results of gradient domain guided filtering of the present invention on the refinement of the transmittance map.

[0100] Figure 6This is a schematic diagram comparing the results of transmittance map refinement using guided filtering in the YCbCr color space of this invention.

[0101] Figure 7 This diagram illustrates a comparison of the defogging effects of different methods. Detailed Implementation

[0102] The technical solution and effects of the present invention will be further described in detail below with reference to the accompanying drawings.

[0103] Based on the above theoretical foundation, this invention provides a dark channel dehazing method that integrates color enhancement information, referring to... Figure 1 The implementation process is illustrated in the diagram below. The implementation process is as follows:

[0104] Step S1: I(x) is converted to YCbCr space, and the Y channel image is adaptively fused and restored by correcting atmospheric light value and transmittance to obtain the restored image J(x) in YCbCr space.

[0105] Step S2, based on the dark channel image I of the colored hazy image I(x) dark (x) The atmospheric light value of I(x) is initially adjusted, and the transmittance of the sky and bright areas is further corrected based on the tolerance adjustment mechanism to obtain the corrected atmospheric light map A' and the transmittance correction map t'. last (x);

[0106] Step S3: Use the grayscale image of the restored image J(x) as the guide image for gradient domain guided filtering, and apply it to the transmittance correction image t' last (x) Perform guided filtering, and substitute the guided filtered image and the corrected atmospheric light image A' into the atmospheric scattering model to obtain the restored image J'(x) in RGB space;

[0107] Step S4: Adaptively weightedly fuse the restored image J'(x) in RGB space and the restored image J"(x) in YCbCr space to obtain the adaptively fused restored image J(x).

[0108] In step S1, the process of restoring YCbCr space I(x) includes:

[0109] Step S11: Map the atmospheric scattering model of I(x) onto the YCbCr space to obtain the Y channel image I. Y (x), Cb channel image I Cr (x), Cr channel image I Br (x); according to Figure 2 Here is a schematic diagram of the atmospheric scattering model, and its expression is:

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

[0111] In the formula: x is the image pixel position, I(x) is the pixel value of the foggy image at pixel x; J(x) is the pixel value of the restored image at pixel x; t(x) is the transmittance at pixel x; A is the global atmospheric light value;

[0112] The dark channel dehazing method in YCbCr color space is performed only on the Y channel and satisfies:

[0113]

[0114] In the formula: J Y (x), I Y (x) represents the Y channel of the restored image and the foggy image in the YCbCr space, respectively; A Y t Y (x) represents the atmospheric light value and transmittance of the Y channel in YCbCr space, respectively.

[0115] Step S12, obtain the foggy image I Y Dark channel image of (x) The dark channel images were statistically analyzed in descending order of brightness. The location of the top 0.1% of pixels, in I Y Find the corresponding pixel in (x) and calculate the mean value of the pixel as the pixel value of each point in the global atmospheric light map of YCbCr space, thus obtaining the global atmospheric light map A in YCbCr space. Y ;

[0116] Step S13: Introduce the dehazing coefficient ω into the initial transmittance map t in the YCbCr space. Y (x), t Y The expression for (x) is:

[0117]

[0118] In the formula, ω∈(0,1], t Y (x) represents the initial transmittance map of the Y channel in the YCbCr space, and Ω(x) represents the filter window with a size of 5×5; in order to increase the visual fidelity of the restored image, ω=0.95 is also introduced for adjustment;

[0119] Step S14, I Y (x) serves as a guide map for the initial transmittance map t. Y (x) Perform guided filtering and refinement to obtain the transmittance correction map t” in the YCbCr space. last (x);

[0120] Figure 6This diagram illustrates the comparison of transmittance before and after guided filtering refinement. Guided filtering is used to refine the initial transmittance map, yielding the final transmittance t″. last (x).

[0121] Step S15, modify the transmittance correction map t” last (x) and global atmospheric light map A Y Substitute the Y channel to restore image J Y The expression (x) is used to obtain the restored Y-channel image J. Y (x):

[0122]

[0123] Step S16, merge the three-channel images J Y (x), I Cr (x), I Br (x), and transform the merged image from YCbCr space to RGB space to obtain the restored image J(x) in YCbCr space, where:

[0124] The conversion formula between YCbCr and RGB color space is as follows:

[0125]

[0126] The inverse transformation formula from YCbCr color space to RGB color space can be expressed as follows:

[0127]

[0128] The steps in step S2, which involve image processing in the RGB space, include:

[0129] Step S21: Normalize the input hazy image I(x) by normalizing the pixel values ​​of the hazy image I(x) to between 0 and 1. Then, use minimum value filtering to process the input normalized hazy image to obtain the dark channel image I(x). dark (x):

[0130] I dark (x)=J dark (x)t(x)+A(1-t(x)) (7)

[0131] Step S22, for I dark The expression (x) is processed by grayscale opening to eliminate bright areas in the foggy image, thus avoiding the influence of bright areas on the estimation of atmospheric light values, and obtaining the dark channel image I'. dark (x):

[0132] I' dark (x)=J′ dark(x)t′(x)+A′(1-t′(x)) (8)

[0133] In the formula, I' dark (x), J' dark (x), A', and t'(x) are pairs of I dark (x), J dark The result of grayscale opening operation on (x), A and t(x); the specific steps of grayscale opening operation are as follows: first, perform erosion operation: calculate the grayscale difference between each point in the local area and the corresponding point of the structuring element, and select the minimum value of the difference as the erosion result of the point; then perform dilation operation: add the corresponding points of the structuring element of each point in the original image, and take the maximum value of the sum as the grayscale value of the point.

[0134] Step S23, according to the dark channel prior theory, let J' dark (x)→0, I' dark (x)=A'(1-t'(x)), considering that retaining a certain amount of fog in the restored image will give the restored image a sense of depth, which is more in line with human visual observation; the dehazing coefficient ω is introduced into the initial transmittance map t'(x) in the RGB space, and the expression of t'(x) is:

[0135]

[0136] In the formula, t'(x)≥0, I' dark (x) / A'∈(0,1); ω∈(0,1]; the reference value is ω=0.95;

[0137] Step S24: Define the expression for the corrected atmospheric light value A' and the range of values ​​for A', to obtain the corrected atmospheric light map A' in RGB space; wherein, the maximum pixel value of I(x) in the three RGB channels is taken as the upper limit of A', and I' dark (x) The maximum value is used as the lower limit (to prevent the restored image from generating a lot of noise due to insufficient transmittance). By assigning different weights to the upper and lower limits of the atmospheric light value estimation interval, the accurate atmospheric light value A′ is obtained:

[0138]

[0139] α=mean(I′ dark (x)) (11)

[0140]

[0141] In the formula, α is an adjustment parameter related to the grayscale distribution of the dark channel image, mean(·) represents taking the mean over all elements; α is a sum of I' dark Parameters related to the gray-scale distribution of (x);

[0142] Step S25, the present invention adopts an adaptive compensation method for transmittance in the sky region to estimate transmittance: since there are no pixels that tend to zero in the sky region, the transmittance estimation of the sky region does not conform to the dark channel theory. In order to accurately estimate the transmittance of the sky region, the sky region needs to be selected as the tolerance adjustment region for transmittance. Define the tolerance adjustment map Map(x) and the expression of tolerance adjustment parameter U as follows:

[0143] Map(x)=I(x)-βA (13)

[0144] N={Map(x)|Map(x)≥0} (14)

[0145]

[0146] In the formula, β is an adjustment factor. To avoid halo effect in regions with abrupt depth of field, the present invention sets β=0.95; since white objects in the image will also affect the selection of tolerance adjustment parameters, the present invention uses pixels greater than or equal to 0 in Map(x) to calculate the tolerance parameter, N is the set of pixels greater than or equal to 0 in the tolerance adjustment map, N num is the total number of pixels in set N, I(x) num represents the number of elements (pixels) in I(x);

[0147] Step S26, taking the region satisfying |I(x)-A'|<U as the sky and bright region of the hazy image I(x), the transmittance correction map t' based on the tolerance mechanism last (x) is defined as:

[0148]

[0149] Wherein, the region with |I(x)-A′|<U is regarded as the sky and bright region, and the transmittance of pixels in this region is corrected. For the region with |I(x)-A′|≥U, it is regarded as a non-sky region, and the transmittance of this region remains unchanged. Import the corrected atmospheric light map A' in the RGB space and the initial transmittance map t'(x) in the RGB space into the transmittance correction map t' last (x) formula to obtain the transmittance correction map t' last (x).

[0150] Figure 4 is a schematic diagram comparing transmittance correction results of sky regions. From Figure 4 it can be found that foggy images contain a large number of sky and bright regions, and at this time the dark channel map extracted by the dark channel prior method has a large error, which leads to deviation in the calculation of transmittance in the sky region ( Figure 4The first row of column (c) in the middle of the image causes artifacts in the sky region of the restored image. The adaptive sky region transmittance compensation method of the present invention can effectively solve the problem of inaccurate sky region transmittance estimation. Figure 4 (Second row of column (c)) Compared with the dark channel prior algorithm, the restored image of the present invention is more ideal in terms of dehazing effect and color reproduction.

[0151] In step S3, the image J is restored using the Y channel. Y (x) serves as the guiding image for gradient domain guided filtering. This image is used to filter the corrected transmittance map, and the obtained atmospheric light value A' and transmittance t' are then compared. dark Substituting (x) into equation (1) yields the initial restored image J'(x), and the restored image J' in the RGB color space is obtained. dark (x). Reference Figure 5 The diagram shows a comparison of transmittance map thinning using gradient-domain guided filtering. Since the dark channel image is obtained by processing a square window using minimum filtering, directly processing the dark channel image would result in block artifacts in the restored image. Therefore, this invention uses gradient-domain guided filtering to thin the transmittance map. Figure 5 It can be observed that the refined transmittance map shows more obvious details and textures, and has higher contrast.

[0152] Step S4, based on the adaptive fusion restoration image, has the following expression for J(x): This enhances the realism and color saturation of the restored image.

[0153] J(x)=qJ′(x)+pJ″(x) (17)

[0154]

[0155] In the formula: p and q are adjustment parameters, and q = 1 - p. J(x) is the final restored clear image.

[0156] After implementing the dark channel dehazing method that integrates color enhancement information according to the present invention, the effectiveness of the dark channel dehazing method can be further verified. The specific steps include: First, randomly selecting 1000 images from the OTS dataset as a subset of the OTS dataset, along with the I-HAZE and O-HAZE datasets as experimental datasets. The OTS dataset consists of 500 indoor simulated foggy images and 500 outdoor simulated foggy images. The I-HAZE dataset contains 35 pairs of foggy images and corresponding real, fog-free indoor images. The O-HAZE dataset contains 45 pairs of real foggy images and corresponding real, fog-free images of different outdoor scenes. The dehazing algorithm based on color attenuation priors by Zhu et al. (see reference...) is then used. Figure 7(g) The image processing procedure shown in column (g) and the boundary constraint-based dehazing algorithm by Meng et al. (see [reference]). Figure 7 (e) The image processing steps shown in column (e), Ren et al.'s dehazing algorithm based on multi-scale convolutional neural networks (see...) Figure 7 (f) The image processing procedure shown in column (f), Cai et al.'s end-to-end system-based dehazing algorithm (see [reference]). Figure 7 (c) Image processing steps shown in column (see He et al.'s dehazing algorithm based on dark channel prior). Figure 7 (d) The image processing steps shown in column (and the dehazing algorithm based on nonlocal priors by Berman et al.) (see column (d)). Figure 7 (b) The image processing procedures shown in the column) and the method of the present invention (see reference) Figure 7 The experimental results are compared with those shown in column (h), and a subjective and objective analysis is performed on the experimental results. Figure 7 As shown, the analysis is based on the subjective visual effect of the restored image.

[0157] It can be seen that dehazing algorithms based on nonlocal priors perform well in the sky region, but are incomplete in the foreground region and the restored image is too dark. Dehazing algorithms based on end-to-end systems perform well in the sky region, but are incomplete in the distant non-sky region and are too dark in the foreground. Dehazing algorithms based on dark channel priors result in excessively low brightness in the non-sky region and oversaturated colors in the sky region, resulting in an overall dark restored image. Dehazing algorithms based on boundary constraints exhibit color distortion and color cast in the edge region of the sky. Dehazing algorithms based on multi-scale convolutional neural networks are oversaturated in the sky region and incomplete in the non-sky region. Dehazing algorithms based on color attenuation priors result in dark colors in the foreground region of the non-sky region and overall oversaturation of the dehazed image, leading to the loss of some details. The dark channel dehazing method of this invention, which integrates color enhancement information, restores images that appear natural in the sky region without oversaturation, and completely dehazes non-sky regions without color distortion, resulting in an ideal overall restored image effect.

[0158] To objectively analyze the dehazing effects of different methods on restored images, this invention uses Structural Similarity Image Measure (SSIM), Peak Signal-to-Noise Ratio (PSNR), and time complexity as objective evaluation metrics to quantitatively analyze the dehazing results. Specifically, higher values ​​for PSNR and SSIM indicate a closer resemblance between the restored image and the true haze-free image, resulting in better dehazing performance.

[0159] The definition of peak signal-to-noise ratio is:

[0160]

[0161] Among them, I ry I gv I by I represents the pixel values ​​of the RGB color channels of a true haze-free image. rd I gd I bd This represents the RGB color channel pixel values ​​of the restored image. MSE represents the restored image I... d and true fog-free image I y The mean square error is given by equation (19), where a and c represent the number of rows and columns of the foggy image, respectively. I represents the maximum pixel value of the image.

[0162]

[0163] In the formula, μ y and σ y Let μ represent the mean and variance of the grayscale values ​​of a real, fog-free image, respectively. d and σ d Let σ represent the mean and variance of the grayscale values ​​of the restored image, respectively. yd Let C1 = (k1l) be the covariance between the real, fog-free image and the restored image. 2 And C2=(k2l) 2 It is a constant used to maintain stability. l is the dynamic range of pixel values, where k1 = 0.01 and k2 = 0.03.

[0164] The objective evaluation indicators for defogging effect are shown in Tables 1-3, and the analysis is as follows:

[0165] Table 1 Comparison of mean PSNR values ​​for image dehazing using different methods.

[0166]

[0167] Table 2 Comparison of SSIM mean values ​​for image dehazing using different methods.

[0168]

[0169] Table 3 Comparison of defogging times for different methods (S)

[0170]

[0171]

[0172] Overall, the dark channel dehazing method of this invention, which integrates color enhancement information, achieves higher PSNR and SSIM than the dehazing algorithms based on color attenuation priors proposed by Zhu et al., boundary constraints proposed by Meng et al., multi-scale convolutional neural networks proposed by Ren et al., end-to-end systems proposed by Cai et al., dark channel priors proposed by He et al., and nonlocal priors proposed by Berman et al. This indicates that the dark channel dehazing method of this invention, which integrates color enhancement information, obtains restored images with more information, more natural detail and texture restoration, and clearer images. In terms of time complexity, it is optimal on most datasets.

[0173] Based on a comprehensive evaluation of both subjective and objective results, the dark channel dehazing method of the present invention, which integrates color enhancement information, can effectively restore the detailed texture information of an image, and the removal of fog also achieves an ideal effect.

[0174] Furthermore, the present invention provides a dark channel dehazing system that integrates color enhancement information, for implementation Figure 1 The system, as shown, includes:

[0175] The YCbCr spatial restoration module is used to convert I(x) to YCbCr space, and adaptively fuse and restore the Y channel image by correcting atmospheric light value and transmittance to obtain the restored image J(x) in YCbCr space.

[0176] RGB space restoration module for the dark channel image I based on a colored hazy image I(x). dark (x) The atmospheric light value of I(x) is initially adjusted, and the transmittance of the sky and bright areas is further corrected based on the tolerance adjustment mechanism to obtain the corrected atmospheric light map A' and the transmittance correction map t'. last (x);

[0177] The RGB space restoration module is used to take the grayscale image of the restored image J(x) as the guide image for gradient domain guided filtering, and to modify the transmittance correction image t'. last (x) Perform guided filtering, and substitute the guided filtered image and the corrected atmospheric light image A' into the atmospheric scattering model to obtain the restored image J'(x) in RGB space;

[0178] The adaptive weighted fusion module is used to adaptively weighted fuse the restored image J'(x) in RGB space and the restored image J""x" in YCbCr space to obtain the adaptively fused restored image J(x).

[0179] The specific implementation of the YCbCr space restoration module is described in steps S11-S16 above. The specific implementation of the RGB space restoration module is described in steps S21-S26 above. The specific implementation of the adaptive weighted fusion module is described in the aforementioned method. Further details will not be provided here.

[0180] This invention employs an atmospheric light value estimation method based on interval estimation, an adaptive compensation method for sky region transmittance, and a brightness correction model based on visual perception. By estimating the atmospheric light value and transmittance in the atmospheric scattering model, the reconstructed image is derived from the atmospheric scattering model. The interval estimation method uses grayscale opening operations to perform interval estimation of the atmospheric light value to obtain accurate atmospheric light values ​​and acquire the initial transmittance. The adaptive compensation method for sky region transmittance uses tolerance adjustment parameters to extract the sky region and adaptively corrects the transmittance of the sky region. The brightness correction model based on visual perception improves the brightness and color saturation of the reconstructed image by adaptively fusing the RGB and YCbCr color spaces.

[0181] This invention provides ideal dehazing results for foggy images under different fog concentrations and exhibits good robustness.

[0182] The atmospheric light value estimation method based on interval estimation and the adaptive compensation method for transmittance of the sky region adopted in this invention ensure the accuracy of the estimation of key parameters in the atmospheric scattering model.

[0183] This invention addresses the problem of insufficient color saturation and brightness in restored images by employing a brightness correction model based on visual perception, which effectively improves the brightness and color performance of the restored images.

[0184] The above-disclosed embodiments are merely preferred embodiments of the present invention and should not be construed as limiting the scope of the invention. Those skilled in the art will understand that implementing all or part of the above-described embodiments and making equivalent changes in accordance with the claims of the present invention are still within the scope of the invention.

Claims

1. A dark channel dehazing method that integrates color enhancement information, characterized in that, include: Step S1: Convert I(x) to YCbCr space, and perform adaptive fusion restoration of Y channel image by correcting atmospheric light value and transmittance to obtain restored image J''(x) in YCbCr space; Step S2, based on the dark channel image I of the colored hazy image I(x) dark (x) The atmospheric light value of I(x) is initially adjusted, and the transmittance of the sky and bright areas is further corrected based on the tolerance adjustment mechanism to obtain the corrected atmospheric light map A' and the transmittance correction map t'. last (x); Step S3: Use the grayscale image of the restored image J''(x) as the guide image for gradient domain guided filtering, and apply it to the transmittance correction image t' last (x) Perform guided filtering, and substitute the guided filtered image and the corrected atmospheric light image A' into the atmospheric scattering model to obtain the restored image J'(x) in RGB space; Step S4: Adaptively weightedly fuse the restored image J'(x) in the RGB space and the restored image J''(x) in the YCbCr space to obtain the adaptively fused restored image J(x); Step S1 includes: Step S11: Map the atmospheric scattering model of I(x) onto the YCbCr space to obtain the Y channel image I. Y (x), Cb channel image I Cr (x), Cr channel image I Br The atmospheric scattering model expression for I(x) is: , In the formula: x is the image pixel position, I(x) is the pixel value of the foggy image at pixel x; J(x) is the pixel value of the restored image at pixel x; t(x) is the transmittance at pixel x; A is the global atmospheric light value; Step S12, obtain the foggy image I Y Dark channel image of (x) The dark channel images were statistically analyzed in descending order of brightness. The location of the first 0.1% of pixels, in I Y Find the corresponding pixel in (x) and calculate the mean value of the pixel as the pixel value of each point in the global atmospheric light map of YCbCr space, thus obtaining the global atmospheric light map A in YCbCr space. Y ; Step S13: Introduce the dehazing coefficient ω into the initial transmittance map t in the YCbCr space. Y (x), t Y The expression for (x) is: , In the formula, ω∈(0,1], and Ω(x) represents the filter window; Step S14, I Y (x) serves as a guide map for the initial transmittance map t. Y (x) Perform guided filtering and refinement to obtain the transmittance correction map t'' in the YCbCr space. last (x); Step S15, the transmittance correction map t'' last (x) and the global atmospheric light map A Y Substitute the Y channel to restore image J Y The expression (x) is used to obtain the restored Y-channel image J. Y (x): , Step S16, merge the three-channel images J Y (x), I Cr (x), I Br (x), and convert the merged image from YCbCr space to RGB space to obtain the restored image J''(x) in YCbCr space; Step S2 includes: Step S21, obtain the dark channel image I of I(x). dark (x): , Step S22, for I dark Perform grayscale opening operations on both sides of expression (x) to obtain the dark channel image I'. dark (x): , In the formula, I' dark (x), J' dark (x), A', and t'(x) are pairs of I dark (x), J dark The result of performing grayscale opening operations on (x), A, and t(x); Step S23, let J' dark (x)→0, I' dark (x)=A'(1-t'(x)), introducing the dehazing coefficient ω into the initial transmittance map t'(x) in the RGB space, the expression for t'(x) is: , In the formula, t'(x)≥0, I' dark (x) / A'∈(0,1);ω∈(0,1]; Step S24: Define the expression for the corrected atmospheric light value A' and the range of values ​​for A', to obtain the corrected atmospheric light map A' in RGB space; wherein, the maximum pixel value of I(x) in the three RGB channels is taken as the upper limit of A', and I' dark (x) The maximum value is used as the lower limit: , , , In the formula, α is the adjustment parameter, and mean(▪) represents the mean value over all elements; Step S25, define the tolerance adjustment map Map(x) and the U expression for the tolerance adjustment parameter: , , , In the formula, β is the adjustment factor; N is the set of pixels in the tolerance adjustment map that are greater than or equal to 0. num Let I(x) be the total number of pixels in set N. num This represents the number of elements in I(x); Step S26: The region satisfying |I(x)-A'|<U is taken as the sky and bright region of the hazy image I(x), and the transmittance correction map t' is generated based on the tolerance mechanism. last The expression (x) is defined as: , The corrected atmospheric light map A' in the RGB space and the initial transmittance map t'(x) in the RGB space are imported into the corrected transmittance map t'. last In formula (x), the transmittance correction diagram t' is obtained. last (x).

2. The dark channel dehazing method according to claim 1, characterized in that, The expression for J(x) in step S4, based on the adaptive fusion and restoration of the image, is: , , In the formula: p and q are adjustment parameters, and q = 1 - p.

3. The dark channel dehazing method for fusing color enhancement information as described in claim 2, wherein the dehazing coefficient ω is ω=0.95; and the adjustment factor β is β=0.

95.

4. A dark channel dehazing system that integrates color enhancement information, characterized in that, include: The YCbCr spatial restoration module is used to convert I(x) to YCbCr space, and adaptively fuse and restore the Y channel image by correcting atmospheric light value and transmittance to obtain the restored image J''(x) in YCbCr space. RGB space restoration module for the dark channel image I based on a colored hazy image I(x). dark (x) The atmospheric light value of I(x) is initially adjusted, and the transmittance of the sky and bright areas is further corrected based on the tolerance adjustment mechanism to obtain the corrected atmospheric light map A' and the transmittance correction map t'. last (x); The RGB space restoration module is used to use the grayscale image of the restored image J''(x) as the guide image for gradient domain guided filtering, and to modify the transmittance correction image t' last (x) Perform guided filtering, and substitute the guided filtered image and the corrected atmospheric light image A' into the atmospheric scattering model to obtain the restored image J'(x) in RGB space; An adaptive weighted fusion module is used to adaptively weighted fuse the restored image J'(x) in the RGB space and the restored image J''(x) in the YCbCr space to obtain an adaptively fused restored image J(x); The YCbCr space restoration module: Mapping the atmospheric scattering model of I(x) onto the YCbCr space yields the Y-channel image I. Y (x), Cb channel image I Cr (x), Cr channel image I Br The atmospheric scattering model expression for I(x) is: , In the formula: x is the image pixel position, I(x) is the pixel value of the foggy image at pixel x; J(x) is the pixel value of the restored image at pixel x; t(x) is the transmittance at pixel x; A is the global atmospheric light value; Find the foggy image I Y Dark channel image of (x) The dark channel images were statistically analyzed in descending order of brightness. The location of the first 0.1% of pixels, in I Y Find the corresponding pixel in (x) and calculate the mean value of the pixel as the pixel value of each point in the global atmospheric light map of YCbCr space, thus obtaining the global atmospheric light map A in YCbCr space. Y ; The dehazing coefficient ω is introduced into the initial transmittance diagram t in the YCbCr space. Y (x), t Y The expression for (x) is: , In the formula, ω∈(0,1], and Ω(x) represents the filter window; Will I Y (x) serves as a guide map for the initial transmittance map t. Y (x) Perform guided filtering and refinement to obtain the transmittance correction map t'' in the YCbCr space. last (x); The transmittance correction graph t'' last (x) and the global atmospheric light map A Y Substitute the Y channel to restore image J Y The expression (x) is used to obtain the restored Y-channel image J. Y (x): , Merging three-channel images J Y (x), I Cr (x), I Br (x), and convert the merged image from YCbCr space to RGB space to obtain the restored image J''(x) in YCbCr space; The RGB space restoration module: Find the dark channel image I of I(x). dark (x): , to I dark Perform grayscale opening operations on both sides of expression (x) to obtain the dark channel image I'. dark (x): , In the formula, I' dark (x), J' dark (x), A', and t'(x) are pairs of I dark (x), J dark The result of performing grayscale opening operations on (x), A, and t(x); Let J' dark (x)→0, I' dark (x)=A'(1-t'(x)), introducing the dehazing coefficient ω into the initial transmittance map t'(x) in the RGB space, the expression for t'(x) is: , In the formula, t'(x)≥0, I' dark (x) / A'∈(0,1);ω∈(0,1]; Define the expression for the corrected atmospheric light value A' and the range of values ​​for A', thus obtaining the corrected atmospheric light map A' in RGB space; where the maximum pixel value of I(x) in the three RGB channels is taken as the upper limit of A', and I' dark (x) The maximum value is used as the lower limit: , , , In the formula, α is the adjustment parameter, and mean(▪) represents the mean value over all elements; Define the tolerance adjustment plot Map(x) and the U expression for the tolerance adjustment parameter: , , , In the formula, β is the adjustment factor; N is the set of pixels in the tolerance adjustment map that are greater than or equal to 0. num Let I(x) be the total number of pixels in set N. num This represents the number of elements in I(x); The regions satisfying |I(x)-A'|<U are designated as the sky and bright regions of the hazy image I(x), and a transmittance correction map t' based on a tolerance mechanism is generated. last The expression (x) is defined as: , The corrected atmospheric light map A' in the RGB space and the initial transmittance map t'(x) in the RGB space are imported into the corrected transmittance map t'. last In formula (x), the transmittance correction diagram t' is obtained. last (x).

5. The dark channel dehazing system that integrates color enhancement information as described in claim 4, characterized in that, The expression for J(x) based on adaptive fusion and image restoration is: , , In the formula: p and q are adjustment parameters, and q = 1 - p.

6. The dark channel dehazing system that integrates color enhancement information as described in claim 5, characterized in that, The defogging coefficient ω is set to ω=0.95; the adjustment factor β is set to β=0.95.