CN110889805A - Image defogging method based on dark channel compensation and atmospheric light value improvement - Google Patents

Image defogging method based on dark channel compensation and atmospheric light value improvement Download PDF

Info

Publication number
CN110889805A
CN110889805A CN201910949482.8A CN201910949482A CN110889805A CN 110889805 A CN110889805 A CN 110889805A CN 201910949482 A CN201910949482 A CN 201910949482A CN 110889805 A CN110889805 A CN 110889805A
Authority
CN
China
Prior art keywords
image
dark channel
formula
value
dark
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910949482.8A
Other languages
Chinese (zh)
Other versions
CN110889805B (en
Inventor
胡辽林
高强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hainan Caishunbao Technology Co ltd
Shenzhen Wanzhida Technology Co ltd
Original Assignee
Xian University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xian University of Technology filed Critical Xian University of Technology
Priority to CN201910949482.8A priority Critical patent/CN110889805B/en
Publication of CN110889805A publication Critical patent/CN110889805A/en
Application granted granted Critical
Publication of CN110889805B publication Critical patent/CN110889805B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • G06T5/73
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration by the use of local operators
    • G06T5/30Erosion or dilatation, e.g. thinning
    • G06T5/70
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30181Earth observation
    • G06T2207/30192Weather; Meteorology
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/10Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation

Abstract

The invention discloses an image defogging method based on dark channel compensation and atmospheric light value improvement, which not only can effectively correct an underestimated dark channel value and weaken the halo effect at the edge of an image scene, but also can accurately acquire the atmospheric light value of the image, so that the recovered image is clearer and more natural, and the detail is more reserved. The method comprises the following specific implementation steps: firstly, solving a minimum channel image by using R, G, B color channels of an original image, and acquiring a compensated dark channel image by using a dark channel compensation model; then, calculating the atmospheric light value of the image by performing graying processing, quadtree segmentation and other steps on the original image; and finally, estimating the image transmittance by combining the dark channel image and the atmospheric light value, and recovering the fog-free image through an atmospheric scattering model. The experimental result and subjective and objective evaluation prove the feasibility and effectiveness of the method.

Description

Image defogging method based on dark channel compensation and atmospheric light value improvement
Technical Field
The invention belongs to the technical field of image processing, and particularly relates to an image defogging method based on dark channel compensation and atmospheric light value improvement.
Background
In a haze scene, atmospheric suspended particles tend to generate certain absorption and scattering effects on light, so that the visibility of outdoor images is greatly reduced, the phenomena of degradation such as contrast reduction and color attenuation of the images occur, the visual observation of human eyes and the normal operation of machine vision equipment are influenced, and therefore, the research on the image defogging method has very important practical significance.
The image defogging method is mainly divided into two types, one type is a defogging method based on image enhancement, and the image clearness is realized mainly by improving contrast, highlighting detail characteristics and the like, but the method ignores the internal relation of a real fog scene, so that the color distortion phenomenon of the image is easily caused; the other defogging method is an image restoration method based on an atmospheric scattering physical model, and an image restoration model is derived by means of a strict theoretical formula.
An image defogging algorithm based on hypothesis or priori knowledge becomes the most widely applied defogging method at present, for example, He and other people find a new theory, namely a dark channel prior theory (DCP), by carrying out statistics on outdoor defogged images, the method utilizes dark channel prior to estimate atmospheric light and transmittance, improves a transmittance map by Soft Matting (SM) to recover clear defogged images, but the Soft Matting technique greatly increases the time complexity and space complexity of the dark channel prior inspection algorithm, then He and other people successively provide guide filtering instead of Soft Matting to reduce the complexity of the calculation method but still have obvious residual fog in a distant view region, Meng and other people provide a defogging algorithm based on boundary constraint, the method recovers the defogged images by increasing the constraint conditions of parameters in a physical model, improves the recovery effect by sacrificing a small amount of details to obtain clear images, but processes the calculation complexity of operation, finds that the calculation complexity is greater than that of the boundary constraint, and sets up a linear attenuation coefficient of the transmittance and a depth of field by using a Saturation coefficient of Saturation of a human beings (Hue, Saturation coefficient of Saturation, and Saturation coefficient of the Saturation of the image, thus, and the method realizes the unified recovery of the brightness of the background image by using a simple observation method of observation of a saturated image.
In the above defogging algorithm, the dark channel prior defogging method proposed by He et al is known to more people for simplicity and effectiveness, but in practical application, the method directly affects the overall image recovery effect due to the problems of underestimation of the dark channel, inaccurate selection of the atmospheric light value, and the like.
Disclosure of Invention
The invention aims to provide an image defogging method based on dark channel compensation and atmospheric light value improvement, which can effectively solve the problem of insufficient dark channel prior algorithm in the prior art.
The invention adopts the technical scheme that an image defogging method based on dark channel compensation and atmospheric light value improvement is implemented according to the following steps:
step 1, acquiring a red, green and blue three color channel value minimum value channel image I of an input foggy day image I (x)dark1Then, the initial dark channel image I is obtained through minimum value filtering calculationdark2(x);
Step 2, according to the minimum value channel image Idark1Initial dark channel image Idark2(x) Calculating a dark channel compensation model to obtain a compensated dark channel image Idark(x);
Step 3, calculating an atmospheric light value A of the foggy day image I (x) by combining an improved quadtree segmentation method, and according to the compensated dark channel image Idark(x) Calculating the atmospheric transmittance t (x);
and 4, substituting the atmospheric light value A and the atmospheric transmittance t (x) into an atmospheric scattering model formula of the foggy day image, denoising through a fogless image recovery formula, and calculating a fogless image J (x).
Step 1 initial dark channel image Idark2(x) The expression is as follows:
Figure BDA0002225308720000031
the specific process of the step 2 is as follows:
step (ii) of2.1 solving the minimum value channel image Idark1Initial dark channel image Idark2(x) And identifying and extracting a halo region part in the initial dark channel image, wherein the specific expression is as follows:
Iedge1=αIdark1-βIdark2(2);
in the formula (2), Iedge1Representing halo region maps before correction, α and β are weighting parameters;
step 2.2, the extracted halo image is corrected by using morphological corrosion and weighted fusion operation processing, namely:
Figure BDA0002225308720000032
bringing formula (2) into equation (3) yields:
Figure BDA0002225308720000033
in the formula (4), Iedge2(x) Indicating the modified halo region, ξ1、ξ2For weighting parameters, Ω (x) is a filtering area centered at x, and the structural elements of the filtering take a square matrix of 15 × 15;
and 2.3, carrying out image fusion on the corrected halo image and the original dark channel image in a linear fusion mode to obtain a dark channel compensation model:
Idark=Idark2+Iedge2(5);
the dark channel compensation model can be obtained by bringing formula (4) into formula (5):
Figure BDA0002225308720000034
in the formula (6), IdarkRepresenting the fused dark channel image, C1、C2、C3And C4For linear weighting coefficients, ε (x) is the random error of the random variable representation model.
Step 2.3 in step C1、C2、C3And C4For linear weighting coefficients, the calculation method is as follows:
let I0(x)、I1(x)、I2(x)、I3(x) And I4(x) Respectively represent I in formula (6)dark(x)、Idark1(x)、 Idark2(x)、
Figure BDA0002225308720000041
And
Figure BDA0002225308720000042
variables, combined with ε (x) to N (0, σ)2) And the nature of the normal distribution, we can obtain:
I(x)~N(C1I1(x)+C2I2(x)+C3I3(x)+C4I4(x),σ2) (7)
assuming that the probability of each pixel error is independent, the following joint probability density function is constructed:
Figure BDA0002225308720000043
in the formula, i represents a pixel point, and logarithms are taken from two sides of the formula (8) at the same time to obtain:
Figure BDA0002225308720000044
the maximum value of the equation (9) is σ
Figure BDA0002225308720000045
Assuming σ is a constant, the maximum of the above equation can be converted to the minimum of the following equation
Figure BDA0002225308720000046
And (3) solving the minimum value of the formula (11) by adopting a gradient descent algorithm, and respectively solving partial derivatives of the parameters in the formula (11) to obtain:
Figure BDA0002225308720000047
Figure BDA0002225308720000048
Figure BDA0002225308720000049
Figure BDA00022253087200000410
step 3, calculating the atmospheric light value A of the foggy day image I (x) by combining an improved quadtree segmentation method, which comprises the following specific steps:
step 3.1, according to the initial threshold value T0Obtaining a gray scale image I from the input foggy day image I (x)gray
Step 3.2, aiming at the gray level image IgrayObtaining a filtered image I using median filteringmedian
Step 3.3, image ImedianAveragely dividing the four rectangular areas and four adjacent areas by a quadtree segmentation method;
step 3.4, calculating the average pixel value of each rectangular area, subtracting the standard deviation of the area from the average pixel value to obtain a score, and selecting the maximum score and the area corresponding to the maximum score;
step 3.5, the four adjacent areas are marked again;
step 3.6, rotating the four marked adjacent regions counterclockwise, and recombining the four marked adjacent regions into an image;
step 3.7, calculating the average pixel value of each region in the step 3.6 minus the standard deviation of the corresponding region, and selecting the maximum score and the region corresponding to the maximum score;
step 3.8, comparing the maximum score in the step 3.4 with the maximum score in the step 3.7, and selecting a region with the maximum score;
step 3.9, repeat step 3.2 andstep 3.3, until the size of the area is smaller than the initial threshold T0The area is a target area;
and 3.10, calculating the average value of the gray values of the target area, wherein the average value is the atmospheric light value A.
Step 4, the atmospheric scattering model formula is as follows:
I(x)=J(x)t(x)+A[1-t(x)](16)。
step 4, the process of calculating the fog-free image J (x) is as follows:
Figure BDA0002225308720000051
in the formula (17), t0The lower threshold value set for the transmittance t (x) is 0.1.
The invention has the beneficial effects that:
1) the image halo phenomenon caused by underestimation of a dark channel value in the existing dark channel prior image defogging algorithm is solved by using a dark channel compensation model;
2) the atmospheric light value selection method for the quadtree segmentation increases a strategy of comparing adjacent regions, so that the atmospheric light value selection is more accurate.
Drawings
FIG. 1 is a flow chart of a method for image defogging based on dark channel compensation and improvement of atmospheric light values according to the present invention;
FIG. 2(a) is a diagram of a region partitioned by a conventional quadtree partitioning method;
FIG. 2(b) shows the left leakage region after the quadtree division method;
FIG. 2(c) is a combined image of the regions segmented by the quadtree segmentation method;
FIG. 3(a) is a foggy day image;
FIG. 3(b) is an original dark channel image;
FIG. 3(c) is a compensated dark channel image;
FIG. 3(d) shows the results of the original treatment;
FIG. 3(e) is the result of the compensated processing;
FIG. 4(a) is a foggy day image;
FIG. 4(b) is an atmospheric light value region selected by the quadtree splitting method;
FIG. 4(c) is an atmospheric light value region selected for improved quadtree splitting;
FIG. 4(d) is a processing result of the quadtree splitting method;
FIG. 4(e) is a processing result of the improved quadtree splitting method;
FIG. 5(a) is an original foggy day image;
FIG. 5(b) shows the results of He arithmetic processing;
FIG. 5(c) shows the processing results of Meng algorithm;
FIG. 5(d) is the results of the Zhu algorithm processing;
FIG. 5(e) shows the processing result of the method of the present invention.
Detailed Description
The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
The origin of the dark channel prior theory: he et al proposed a new defogging solution in 2009, which He et al found by observing a large number of defogged and haze-free images: in most non-sky areas of fog-free images, the pixel value of at least one color channel of the red, green and blue color channels of the image is low and approaches to zero, and the formula is expressed as
Figure BDA0002225308720000071
In the formula Jc(y) represents the three color channels of the image and Ω (x) represents a square filter window centered at j (x), typically 15 × 15. This formula, the dark channel prior condition.
The dark channel first pass algorithm is based on an atmospheric scattering model, and the mathematical expression of the atmospheric scattering physical model is I (x) ═ J (x) t (x) + A [1-t (x) ]
In the formula, i (x) represents a haze image, j (x) represents a haze-free image, t (x) represents transmission transmittance, a represents an atmospheric light value, j (x) t (x) is a direct attenuation term, that is, the amount of target emission light entering a shooting device after being attenuated by atmospheric scattering, and a [1-t (x) ] is atmospheric scattered light, mainly the amount of atmospheric light entering the device after being scattered by haze.
When the atmospheric transmittance is obtained, the image is subjected to windowing refinement processing, if the atmospheric light value A is known, the transmittance t (x) is a local constant, and two minimum value filtering operations are carried out to obtain the atmospheric transmittance
Figure RE-GDA0002341753330000082
The prior condition that the dark channel value in the fog-free image tends to zero can be obtained
Figure RE-GDA0002341753330000083
In the formula, in order to enable the restored image to be closer to a real scene, a parameter mu is introduced, and the value of the method is 0.95.
When the transmittance value t (x) is very small, the value of j (x) will be too large, resulting in excessive white field as a whole. To avoid this problem, the present invention sets a lower threshold t for the transmittance t (x)0And if the value is 0.1, the fog-free image recovery formula is expressed as
Figure BDA0002225308720000083
The invention relates to an image defogging method based on dark channel compensation and atmospheric light value improvement, which is specifically implemented according to the following steps as shown in figure 1:
step 1, acquiring a red, green and blue three color channel value minimum value channel image I of an input foggy day image I (x)dark1Then, the initial dark channel image I is obtained through minimum value filtering calculationdark2(x);
Initial dark channel image Idark2(x) The expression is as follows:
Figure BDA0002225308720000084
step 2, according toMinimum value channel image Idark1Initial dark channel image Idark2(x) Calculating a dark channel compensation model to obtain a compensated dark channel image Idark(x);
The specific process is as follows:
step 2.1, solving a minimum value channel image Idark1Initial dark channel image Idark2(x) And identifying and extracting a halo region part in the initial dark channel image, wherein the specific expression is as follows:
Iedge1=αIdark1-βIdark2(2);
in the formula (2), Iedge1Representing halo region maps before correction, α and β are weighting parameters;
step 2.2, the extracted halo image is corrected by using morphological corrosion and weighted fusion operation processing, namely:
Figure BDA0002225308720000091
bringing formula (2) into equation (3) yields:
Figure BDA0002225308720000092
in the formula (4), Iedge2(x) Indicating the modified halo region, ξ1、ξ2For weighting parameters, Ω (x) is a filtering area centered at x, and the structural elements of the filtering take a square matrix of 15 × 15;
and 2.3, carrying out image fusion on the corrected halo image and the original dark channel image in a linear fusion mode to obtain a dark channel compensation model:
Idark=Idark2+Iedge2(5);
the dark channel compensation model can be obtained by bringing formula (4) into formula (5):
Figure BDA0002225308720000093
in the formula (6), IdarkRepresenting the fused dark channel image, C1、C2、C3And C4For linear weighting coefficients, ε (x) is the random error of the random variable representation model;
step 2.3 in step C1、C2、C3And C4For linear weighting coefficients, the calculation method is as follows:
let I0(x)、I1(x)、I2(x)、I3(x) And I4(x) Respectively represent I in formula (6)dark(x)、Idark1(x)、 Idark2(x)、
Figure BDA0002225308720000094
And
Figure BDA0002225308720000095
variables, combined with ε (x) to N (0, σ)2) And the nature of the normal distribution, we can obtain:
I(x)~N(C1I1(x)+C2I2(x)+C3I3(x)+C4I4(x),σ2) (7)
assuming that the probability of each pixel error is independent, the following joint probability density function is constructed:
Figure BDA0002225308720000096
in the formula, i represents a pixel point, and logarithms are taken from two sides of the formula (8) at the same time to obtain:
Figure BDA0002225308720000101
the maximum value of the equation (9) is σ
Figure BDA0002225308720000102
Assuming σ is a constant, the maximum of the above equation can be converted to the minimum of the following equation
Figure BDA0002225308720000103
And (3) solving the minimum value of the formula (11) by adopting a gradient descent algorithm, and respectively solving partial derivatives of the parameters in the formula (11) to obtain:
Figure BDA0002225308720000104
Figure BDA0002225308720000105
Figure BDA0002225308720000106
Figure BDA0002225308720000107
step 3, calculating an atmospheric light value A of the foggy day image I (x) by combining an improved quadtree segmentation method, and according to the compensated dark channel image Idark(x) Calculating the atmospheric transmittance t (x);
the specific process of calculating the atmospheric light value A of the foggy day image I (x) by combining the improved quadtree segmentation method comprises the following steps:
step 3.1, according to the initial threshold value T0Taking the value of 30 x 30, and calculating the gray level image I (x) of the input foggy day image I (x)gray
Step 3.2, aiming at the gray level image IgrayObtaining a filtered image I using median filteringmedian
Step 3.3, image ImedianEqually dividing into four rectangular regions by a quadtree division method, as shown in fig. 2(a), and four adjacent regions;
step 3.4, calculating the average pixel value of each rectangular area, subtracting the standard deviation of the area from the average pixel value to obtain a score, and selecting the maximum score and the area corresponding to the maximum score;
step 3.5, re-marking the four adjacent regions, as shown in fig. 2 (b);
and 3.6, rotating the four adjacent marked areas anticlockwise, and recombining the four adjacent marked areas into an image, as shown in fig. 2 (c).
Step 3.7, calculating the average pixel value of each region in the step 3.6 minus the standard deviation of the corresponding region, and selecting the maximum score and the region corresponding to the maximum score;
step 3.8, comparing the maximum score in the step 3.4 with the maximum score in the step 3.7, and selecting a region with the maximum score;
step 3.9, repeat step 3.2 and step 3.3 until the region size is smaller than the initial threshold T0The area is a target area;
and 3.10, calculating the average value of the gray values of the target area, wherein the average value is the atmospheric light value A.
Step 4, substituting the atmospheric light value A and the atmospheric transmittance t (x) into an atmospheric scattering model formula of the foggy day image, denoising through a fogless image recovery formula, and calculating a fogless image J (x);
step 4, the atmospheric scattering model formula is as follows:
I(x)=J(x)t(x)+A[1-t(x)](16)。
the process of calculating the fog-free image J (x) is as follows:
Figure BDA0002225308720000111
in the formula (17), t0The lower threshold value set for the transmittance t (x) is 0.1.
Examples
The invention obtains the transmittance of the image by the color attenuation prior algorithm proposed by Zhu et al, and then by means of the formula
Figure RE-GDA0002341753330000122
Reversely deducing dark channels which are not underestimated, selecting 100 training samples and 2400 ten thousand pixel points to train a linear model, obtaining the best training result C1-0.91098, C2-0.12076, C3-0.12893, C4-0.03144,
Figure BDA0002225308720000122
1) halo phenomenon existing a priori to dark channel
Processing the actual image, and obtaining a result graph before and after dark channel compensation: selecting a foggy day image as shown in fig. 3 (a); FIG. 3(b) is an original dark channel image; FIG. 3(c) is a compensated dark channel image; FIG. 3(d) shows the results of the original treatment; fig. 3(e) shows the processing result after compensation.
As can be seen by comparing fig. 3(c) and fig. 3(b), the compensated dark channel significantly improves the pixel values at the image edges and preserves the detail features of the image scene. The experimental result of fig. 3(e) shows that the method based on the dark channel compensation model provided by the invention can effectively remove the halo effect.
2) Improvement of atmospheric light value
Processing the actual image, and obtaining a result graph before and after the improvement of the quadtree method: FIG. 4(a) is a foggy day image; FIG. 4(b) is an atmospheric light value region selected by the quadtree splitting method; FIG. 4(c) is an atmospheric light value region selected for the improved quadtree splitting method; FIG. 4(d) is a processing result of the quadtree splitting method; FIG. 4(e) is a processing result of the improved quadtree splitting method; as can be seen from fig. 4(a) to 4(e), the atmospheric light value of the image selected by the original quadtree segmentation method is lower than the real atmospheric light value, so that the defogging of the distant view region in the restored image is not thorough.
3) Comparison of results
Selecting an original foggy day image as a picture in fig. 5 (a); FIG. 5(b) shows the He algorithm processing result, and there is still significant residual fog in the distant view region; FIG. 5(c) shows the processing results of Meng algorithm; FIG. 5(d) is the results of the Zhu algorithm processing; FIG. 5(e) shows the processing result of the method of the present invention; compared with other algorithm processing, the image restored by the method is real and natural, and the brightness of the image is more consistent with the observation of human eyes.
In order to further verify the actual recovery effect of the method, the 4 groups of images are objectively evaluated by adopting indexes such as average gradient, contrast, information entropy, processing time and the like, and the indexes are shown in tables 1-4.
TABLE 1
Figure BDA0002225308720000131
TABLE 2
Figure BDA0002225308720000132
TABLE 3
Figure BDA0002225308720000133
Figure BDA0002225308720000141
TABLE 4
Figure BDA0002225308720000142
The above experimental data show that the method has certain advantages and advances in image detail characteristics, gray contrast and algorithm processing time, but the method is slightly inferior to Meng algorithm and Zhu algorithm in image definition.
Through the mode, the image defogging method based on dark channel compensation and atmospheric light value improvement not only can effectively correct the underestimated dark channel value and weaken the halo effect at the edge of the image scene, but also can accurately acquire the atmospheric light value of the image, so that the recovered image is clearer and more natural, and the details are reserved more abundantly. The method comprises the following specific implementation steps: firstly, solving a minimum channel image by using R, G, B color channels of an original image, and acquiring a compensated dark channel image by using a dark channel compensation model; then, calculating the atmospheric light value of the image by performing graying processing, quadtree segmentation and other steps on the original image; and finally, estimating the image transmittance by combining the dark channel image and the atmospheric light value, and recovering the fog-free image through an atmospheric scattering model. The experimental result and subjective and objective evaluation prove the feasibility and effectiveness of the method.

Claims (7)

1. An image defogging method based on dark channel compensation and atmospheric light value improvement is characterized by comprising the following steps:
step 1, acquiring a red, green and blue three color channel value minimum value channel image I of an input foggy day image I (x)dark1Then, the initial dark channel image I is obtained through minimum value filtering calculationdark2(x);
Step 2, according to the minimum value channel image Idark1Initial dark channel image Idark2(x) Calculating a dark channel compensation model to obtain a compensated dark channel image Idark(x);
Step 3, calculating an atmospheric light value A of the foggy day image I (x) by combining an improved quadtree segmentation method, and according to the compensated dark channel image Idark(x) Calculating the atmospheric transmittance t (x);
and 4, substituting the atmospheric light value A and the atmospheric transmittance t (x) into an atmospheric scattering model formula of the foggy day image, denoising through a fogless image recovery formula, and calculating a fogless image J (x).
2. The method for defogging an image based on the compensation of the dark channel and the improvement of the atmospheric light value according to the claim 1, wherein the step 1 of the initial dark channel image Idark2(x) The expression is as follows:
Figure FDA0002225308710000011
3. the image defogging method based on the dark channel compensation and the atmospheric light value improvement is characterized in that the step 2 specifically comprises the following steps:
step 2.1, solving a minimum value channel image Idark1Initially, theDark channel image Idark2(x) And identifying and extracting a halo region part in the initial dark channel image, wherein the specific expression is as follows:
Iedge1=αIdark1-βIdark2(2);
in the formula (2), Iedge1Representing halo region maps before correction, α and β are weighting parameters;
step 2.2, the extracted halo image is corrected by using morphological corrosion and weighted fusion operation processing, namely:
Figure FDA0002225308710000021
bringing formula (2) into equation (3) yields:
Figure FDA0002225308710000022
in the formula (4), Iedge2(x) Indicating the modified halo region, ξ1、ξ2As weighting parameters, Ω (x) is a filtering area with x as the center, and the structural elements of the filtering are a square matrix of 15 × 15;
and 2.3, carrying out image fusion on the corrected halo image and the original dark channel image in a linear fusion mode to obtain a dark channel compensation model:
Idark=Idark2+Iedge2(5);
the dark channel compensation model can be obtained by bringing formula (4) into formula (5):
Figure FDA0002225308710000023
in the formula (6), IdarkRepresenting the fused dark channel image, C1、C2、C3And C4For linear weighting coefficients, ε (x) is the random error of the random variable representation model.
4. Dark-based cartoon of claim 3Image defogging method with channel compensation and atmospheric light value improvement, characterized in that step 2.3 is performed by C1、C2、C3And C4For linear weighting coefficients, the calculation method is as follows:
let I0(x)、I1(x)、I2(x)、I3(x) And I4(x) Respectively represent I in formula (6)dark(x)、Idark1(x)、Idark2(x)、
Figure FDA0002225308710000024
And
Figure FDA0002225308710000025
variables, combined with ε (x) to N (0, σ)2) And the nature of the normal distribution, we can obtain:
I(x)~N(C1I1(x)+C2I2(x)+C3I3(x)+C4I4(x),σ2) (7)
assuming that the probability of each pixel error is independent, the following joint probability density function is constructed:
Figure FDA0002225308710000026
in the formula, i represents a pixel point, and logarithms are taken from two sides of the formula (8) at the same time to obtain:
Figure FDA0002225308710000031
the maximum value of the equation (9) is σ
Figure FDA0002225308710000032
Assuming σ is a constant, the maximum of the above equation can be converted to the minimum of the following equation
Figure FDA0002225308710000033
And (3) solving the minimum value of the formula (11) by adopting a gradient descent algorithm, and respectively solving partial derivatives of the parameters in the formula (11) to obtain:
Figure FDA0002225308710000034
Figure FDA0002225308710000035
Figure FDA0002225308710000036
Figure FDA0002225308710000037
5. the image defogging method based on the dark channel compensation and the atmospheric light value improvement is characterized in that the atmospheric light value A of the foggy day image I (x) calculated by the method combining the improved quadtree segmentation in the step 3 is specifically processed by the following steps:
step 3.1, according to the initial threshold value T0Obtaining a gray scale image I (x) from the input foggy weather image I (x)gray
Step 3.2, aiming at the gray level image IgrayObtaining a filtered image I using median filteringmedian
Step 3.3, the image ImedianAveragely dividing the four rectangular areas and four adjacent areas by a quadtree segmentation method;
step 3.4, calculating the average pixel value of each rectangular area, subtracting the standard deviation of the area from the average pixel value to obtain a score, and selecting the maximum score and the area corresponding to the maximum score;
step 3.5, the four adjacent areas are marked again;
step 3.6, rotating the four marked adjacent regions counterclockwise, and recombining the four marked adjacent regions into an image;
step 3.7, calculating the average pixel value of each region in the step 3.6 minus the standard deviation of the corresponding region, and selecting the maximum score and the region corresponding to the maximum score;
step 3.8, comparing the maximum score in the step 3.4 with the maximum score in the step 3.7, and selecting a region with the maximum score;
step 3.9, repeat step 3.2 and step 3.3 until the region size is smaller than the initial threshold T0The area is a target area;
and 3.10, calculating the average value of the gray values of the target area, wherein the average value is the atmospheric light value A.
6. The image defogging method based on the dark channel compensation and the atmospheric light value improvement as claimed in claim 1, wherein the atmospheric scattering model formula in step 4 is as follows:
I(x)=J(x)t(x)+A[1-t(x)](16)。
7. the image defogging method based on the dark channel compensation and the atmospheric light value improvement is characterized in that the step 4 of calculating the fog-free image J (x) comprises the following steps:
Figure FDA0002225308710000041
in the formula (17), t0The lower threshold value set for the transmittance t (x) is 0.1.
CN201910949482.8A 2019-10-08 2019-10-08 Image defogging method based on dark channel compensation and atmospheric light value improvement Active CN110889805B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910949482.8A CN110889805B (en) 2019-10-08 2019-10-08 Image defogging method based on dark channel compensation and atmospheric light value improvement

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910949482.8A CN110889805B (en) 2019-10-08 2019-10-08 Image defogging method based on dark channel compensation and atmospheric light value improvement

Publications (2)

Publication Number Publication Date
CN110889805A true CN110889805A (en) 2020-03-17
CN110889805B CN110889805B (en) 2023-08-18

Family

ID=69746050

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910949482.8A Active CN110889805B (en) 2019-10-08 2019-10-08 Image defogging method based on dark channel compensation and atmospheric light value improvement

Country Status (1)

Country Link
CN (1) CN110889805B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113962872A (en) * 2020-07-21 2022-01-21 四川大学 Two-channel joint optimization night image defogging method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104299198A (en) * 2014-10-14 2015-01-21 嘉应学院 Fast image defogging method based on dark channels of pixels
US9355439B1 (en) * 2014-07-02 2016-05-31 The United States Of America As Represented By The Secretary Of The Navy Joint contrast enhancement and turbulence mitigation method
CN109785262A (en) * 2019-01-11 2019-05-21 闽江学院 Image defogging method based on dark channel prior and adaptive histogram equalization
CN109919879A (en) * 2019-03-13 2019-06-21 重庆邮电大学 A kind of image defogging method based on dark channel prior Yu bright channel prior

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9355439B1 (en) * 2014-07-02 2016-05-31 The United States Of America As Represented By The Secretary Of The Navy Joint contrast enhancement and turbulence mitigation method
CN104299198A (en) * 2014-10-14 2015-01-21 嘉应学院 Fast image defogging method based on dark channels of pixels
CN109785262A (en) * 2019-01-11 2019-05-21 闽江学院 Image defogging method based on dark channel prior and adaptive histogram equalization
CN109919879A (en) * 2019-03-13 2019-06-21 重庆邮电大学 A kind of image defogging method based on dark channel prior Yu bright channel prior

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
杨燕等: "结合暗通道先验的光补偿快速去雾算法", 《计算机工程与科学》 *
谢昊伶等: "基于背景光估计与暗通道先验的水下图像复原", 《光学学报》 *
郭继昌等: "水下图像增强和复原方法研究进展", 《中国图象图形学报》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113962872A (en) * 2020-07-21 2022-01-21 四川大学 Two-channel joint optimization night image defogging method
CN113962872B (en) * 2020-07-21 2023-08-18 四川大学 Dual-channel joint optimization night image defogging method

Also Published As

Publication number Publication date
CN110889805B (en) 2023-08-18

Similar Documents

Publication Publication Date Title
CN111598791B (en) Image defogging method based on improved dynamic atmospheric scattering coefficient function
Wang et al. A fast single-image dehazing method based on a physical model and gray projection
CN107358585B (en) Foggy day image enhancement method based on fractional order differential and dark channel prior
CN105631829A (en) Night haze image defogging method based on dark channel prior and color correction
CN109255759A (en) Image defogging method based on sky segmentation and transmissivity adaptive correction
CN106846263A (en) The image defogging method being immunized based on fusion passage and to sky
CN105959510B (en) A kind of video rapid defogging method
CN111861896A (en) UUV-oriented underwater image color compensation and recovery method
CN111161167B (en) Single image defogging method based on middle channel compensation and self-adaptive atmospheric light estimation
CN107895357A (en) A kind of real-time water surface thick fog scene image Enhancement Method based on FPGA
CN111598814B (en) Single image defogging method based on extreme scattering channel
CN111145105A (en) Image rapid defogging method and device, terminal and storage medium
CN108765337B (en) Single color image defogging processing method based on dark channel prior and non-local MTV model
CN110889805B (en) Image defogging method based on dark channel compensation and atmospheric light value improvement
CN112750089B (en) Optical remote sensing image defogging method based on local block maximum and minimum pixel prior
CN111598800B (en) Single image defogging method based on space domain homomorphic filtering and dark channel priori
CN112825189B (en) Image defogging method and related equipment
Song et al. An adaptive real-time video defogging method based on context-sensitiveness
CN115170437A (en) Fire scene low-quality image recovery method for rescue robot
Kumari et al. Improved single image and video dehazing using morphological operation
CN112686825A (en) Ground dense fog scene gray image defogging method based on FPGA
CN111260589A (en) Retinex-based power transmission line monitoring image defogging method
Han et al. Single image dehazing method via sky-regions segmentation and dark channel prior
Yang et al. Improved Dark Channel Prior Dehazing Algorithm Combined with Sky Recognition
CN111028156A (en) Mixed filtering image defogging algorithm based on dark channel prior model

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20230724

Address after: Room 003, Room 423, Floor 4, Building 5, Yabulun Industrial Park, Yazhou District, Sanya, Hainan 572000

Applicant after: Hainan Caishunbao Technology Co.,Ltd.

Address before: 518000 1002, Building A, Zhiyun Industrial Park, No. 13, Huaxing Road, Henglang Community, Longhua District, Shenzhen, Guangdong Province

Applicant before: Shenzhen Wanzhida Technology Co.,Ltd.

Effective date of registration: 20230724

Address after: 518000 1002, Building A, Zhiyun Industrial Park, No. 13, Huaxing Road, Henglang Community, Longhua District, Shenzhen, Guangdong Province

Applicant after: Shenzhen Wanzhida Technology Co.,Ltd.

Address before: 710048 Shaanxi province Xi'an Beilin District Jinhua Road No. 5

Applicant before: XI'AN University OF TECHNOLOGY

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant