US 12,347,079 B2
Method for image defogging based on dark channel prior
Dengyin Zhang, Nanjing (CN); Wenjie Zhang, Nanjing (CN); and Zhou Ye, Nanjing (CN)
Assigned to NANJING UNIVERSITY OF POSTS AND TELECOMMUNICATIONS, Nanjing (CN)
Filed by NANJING UNIVERSITY OF POSTS AND TELECOMMUNICATIONS, Nanjing (CN)
Filed on May 4, 2023, as Appl. No. 18/312,094.
Application 18/312,094 is a continuation of application No. PCT/CN2023/086203, filed on Apr. 4, 2023.
Claims priority of application No. 202211143731.2 (CN), filed on Sep. 20, 2022.
Prior Publication US 2024/0104702 A1, Mar. 28, 2024
Int. Cl. G06T 5/73 (2024.01); G06T 7/90 (2017.01)
CPC G06T 5/73 (2024.01) [G06T 7/90 (2017.01); G06T 2207/10024 (2013.01); G06T 2207/30192 (2013.01)] 7 Claims
OG exemplary drawing
 
1. A method for image defogging based on a dark channel prior, comprising:
acquiring a dark channel image and a light channel image of a haze weather image according to the haze weather image; wherein acquiring the dark channel image and the light channel image of the haze weather image comprising:
taking a minimum value of pixel points in R, G, and B three channels of an input image to obtain the dark channel image, and taking a minimum value in a neighborhood of the pixel points,
calculating dark channel pixel values of the haze weather image through formula (1);

OG Complex Work Unit Math
wherein, c represents a certain channel of R, G, and B three channels, Jc represents pixel values of each channel in a color image, Ω(x) represents a window centered on pixel X, and a size of the window is a size of the neighborhood;
taking a maximum value of the pixel points in the R, G, and B three channels of the input image to obtain the light channel image, and taking a maximum value in the neighborhood of the pixel points;
calculating light channel pixel values of the haze weather image through formula (2),

OG Complex Work Unit Math
selecting pixel values in the light channel image and calculating an atmospheric light value A; wherein selecting pixel values in the light channel image and calculating the atmospheric light value A, comprising:
selecting pixel values within a preset range in the light channel pixel values;
averaging the selected pixel points to obtain the atmospheric light value A;
obtaining a transmittance image based on the light channel image and the atmospheric light value A; wherein obtaining the transmittance image based on the light channel image and the atmospheric light value A, comprising:
comparing the calculated light channel pixel values with the calculated atmospheric light value A to obtain a prior value Jdl(x) between the dark channel pixel values and the light channel pixel values, an expression of the prior value Jdl(x) is:

OG Complex Work Unit Math
wherein pixels in sky areas or high brightness areas of the haze weather image, at least one color channel has a pixel value close to 255, a prior value 255 of the high brightness areas is obtained, and the dark channel pixel values are Jd(x)→0; the light channel pixel values are Jl(x)→255;
substituting the obtained prior value into a atmospheric scattering model to calculate the transmittance image, the atmospheric scattering model is:
I(x)=J(x)t(x)+A(1−t(x).
wherein, J(x) represents the input image; J(x) represents a clear image; A is the atmospheric light value; t(x) represents the transmittance image;
an obtained transmittance image in dark areas is:

OG Complex Work Unit Math
an obtained transmittance image in the high brightness areas is:

OG Complex Work Unit Math
introducing a factor ω for optimizing images in t(x), the transmittance image is:

OG Complex Work Unit Math
performing threshold processing on the transmittance image;
obtaining a restored image of defogging based on the transmittance image and the atmospheric light value A.