CN111784601A - Image defogging method - Google Patents

Image defogging method Download PDF

Info

Publication number
CN111784601A
CN111784601A CN202010593554.2A CN202010593554A CN111784601A CN 111784601 A CN111784601 A CN 111784601A CN 202010593554 A CN202010593554 A CN 202010593554A CN 111784601 A CN111784601 A CN 111784601A
Authority
CN
China
Prior art keywords
image
theta
value
pixel
formula
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
CN202010593554.2A
Other languages
Chinese (zh)
Other versions
CN111784601B (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.)
Zhejiang Tongshan Artificial Intelligence Technology Co ltd
Original Assignee
Zhejiang Tongshan Artificial Intelligence Technology Co ltd
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 Zhejiang Tongshan Artificial Intelligence Technology Co ltd filed Critical Zhejiang Tongshan Artificial Intelligence Technology Co ltd
Priority to CN202010593554.2A priority Critical patent/CN111784601B/en
Publication of CN111784601A publication Critical patent/CN111784601A/en
Application granted granted Critical
Publication of CN111784601B publication Critical patent/CN111784601B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/73Deblurring; Sharpening
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)

Abstract

The invention relates to an image defogging method, which comprises the following steps: 1: processing an original image, reading the gray value of a three-channel pixel, obtaining a pixel deviation degree index theta and recording the minimum value J of the three gray values; 2: comparing theta and J with set threshold values thetav and Jv; 3: obtaining a dark channel transmittance graph T1 by using a correlation formula; 4: refining the dark channel transmittance map T1 through guide filtering to obtain a refined transmittance map T2; 5: fitting a corresponding formula by using the transmittance graph T2 and the global atmospheric light value A, determining related parameters and ensuring that the standard deviation of the fitting process is less than a set value, and then bringing pixel points under the conditions that theta is less than theta v and J is greater than Jv into the corresponding formula for defogging; 6: and (5) merging the two partial images which are respectively defogged in the step (4) and the step (5), and outputting the defogged image according to the fog image forming model. Compared with the prior art, the invention solves the problem that the dark channel principle does not stand in the white sky and light-colored areas.

Description

Image defogging method
Technical Field
The invention relates to the technical field of image processing, in particular to an image defogging method.
Background
The dark channel principle is not true in white sky and light color areas, and if the dark channel principle is not corrected, the defogging intensity is too high, so that defects such as noise appear, and the image quality is influenced. This patent adopts and cuts apart the sky and handles alone, and the method that the remaining part then adopted dark channel principle defogging has realized better defogging effect.
The image defogging has important significance and practical value for the actual production and life. The defogging algorithm is one of the research hotspots of image processing, and the existing defogging algorithms can be roughly divided into two types: one category can be categorized as image enhancement algorithms: the method is characterized in that the contour and edge detail characteristics of a fog image are improved by increasing the contrast of the image, such as histogram equalization, a defogging algorithm based on Retinex and the like, and the algorithms are obvious in the aspect of improving the contrast, but are lack in color recovery, and the saturation of the restored image is obviously reduced; one is a defogging algorithm based on a physical degradation model: the prior knowledge of the foggy and fogless image is used for estimating the model parameters, and then the obtained model parameters are used for restoring the fogless image. Such as a defogging algorithm based on a dark channel principle, a defogging algorithm based on a color line and the like, the algorithms are slightly weaker than an image enhancement algorithm in contrast restoration, but have more obvious advantages in color restoration. The defogging algorithm based on the dark channel is widely applied due to the simple algorithm complexity and good effect. Defogging algorithms (hereinafter DCP) based on the dark channel principle recognize that the formation of fog can be described by a physical degradation model:
I(x)=J(x)t(x)+A[1-t(x)]
wherein J (x) is a haze-free image, A is ambient light, and t (x) is transmittance. Namely observation image i (x) is composed of a light curtain formed by the scattering of attenuated real image superimposed with ambient light. Ambient light a may be estimated by counting the brighter pixels; while for the local quantity transmittance t (x) that is difficult to estimate, the DCP algorithm utilizes dark channel a priori knowledge to simplify the estimation of t (x). The DCP considers that the fog-free image has color objects, shadows and dark objects widely in a priori, so that the image obtained by filtering the fog-free image with the minimum value of the sliding window is mostly 0 or close to 0 except the sky. Accordingly, t (x) estimation can be simplified:
Figure BDA0002556648160000021
in order to make the defogged image more realistic, the transmittance t (x) is generally estimated by adopting an enhanced defogging factor regulation mode:
Figure BDA0002556648160000022
and restoring the fog-free image according to A and t (x).
In the white sky and light color areas, the essential reason that the dark channel prior algorithm fails is that the gray values of three channels of the pixels are relatively close and have larger values, and then the formula is as follows:
Figure BDA0002556648160000023
j (x) in (a) cannot be ignored, and a large deviation will occur if the simplified formula is also used for processing.
Disclosure of Invention
The present invention is directed to overcome the above-mentioned drawbacks of the prior art, and provides an image defogging method, which is a method for partitioning the sky and processing the sky separately, and defogging the sky and the rest of the sky by using the dark channel principle.
The purpose of the invention can be realized by the following technical scheme:
an image defogging method comprising the steps of:
step 1: processing the shot original image, reading the gray value of a three-channel pixel, further obtaining a pixel deviation degree index theta and recording the minimum value J of the three gray values;
step 2: comparing the pixel deviation degree index theta and the minimum gray value J with set threshold values thetav and Jv;
and step 3: finding out dark channel image I aiming at pixel points meeting conditions that theta is larger than or equal to theta v and J is smaller than or equal to Jvd(X), taking pixels with the highest pixel gray value and the set percentage number as a global atmospheric light value A aiming at pixel points meeting the conditions that theta is less than theta v and J is greater than Jv, and obtaining a dark channel transmittance graph T1 by using a correlation formula;
and 4, step 4: refining the dark channel transmittance map T1 through guide filtering to obtain a refined transmittance map T2;
and 5: fitting a corresponding formula by using the transmittance graph T2 and the global atmospheric light value A, determining related parameters and bringing pixel points with the conditions that theta is less than thetav and J is greater than Jv into the corresponding formula for defogging after ensuring that the standard deviation of the fitting process is less than a set value;
step 6: and (5) merging the two partial images which are respectively defogged in the step (4) and the step (5), and outputting the defogged image according to the fog image forming model.
Further, θ v in step 2 is 30.
Further, the Jv value in step 2 is 130.
Further, the set percentage in the step 3 is 0.1%.
Further, the correlation formula in step 3 is:
Figure BDA0002556648160000031
in the formula, ω is a defogging factor.
Further, the set value in step 5 is 0.001.
Further, the value of the defogging factor is 0.95.
Further, the corresponding formula in step 5 is:
Figure BDA0002556648160000032
in the formula, k, n and m are fitting parameters.
Compared with the prior art, the invention has the following advantages
(1) The method effectively solves the problem that the dark channel principle is not established in a white sky and light color area, and effectively finds out the pixels which do not accord with the dark channel prior theory in the image through the pixel deflection angle and the minimum pixel value;
(2) the invention solves the difficult problem of solving the transmissivity of the bright area by a method of a fitting formula;
(3) according to the invention, the areas which do not accord with the dark channel prior are subjected to special defogging treatment and then are fused with the normal area to obtain the final defogged image, and the accuracy rate is higher.
Drawings
FIG. 1 is a flow chart of the method of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, shall fall within the scope of protection of the present invention.
In order to screen out the pixel points which do not accord with the dark channel prior theory, the method uses two indexes: one is a pixel deflection angle used for evaluating the similarity degree between three-channel gray values of pixel points; the other is the minimum pixel value used to observe the minimum of the three channel pixel gray values.
As shown in fig. 1, the image defogging method provided by the invention comprises the following steps:
A. processing an original image shot by an electronic eye, reading the gray value of a three-channel pixel, calculating a pixel deviation degree index theta, and recording the minimum value of three gray values as J; then carrying out step B;
B. comparing the calculated pixel deviation degree index theta and the minimum gray value J with set threshold values theta v and Jv; if theta is larger than or equal to theta v and J is smaller than or equal to Jv, entering the step D, and defogging by using a dark channel prior method; otherwise, entering the step C, and defogging by a transmittance fitting method; this embodiment may let θ v be 30, Jv be 130;
C. taking the pixel with the number of 0.1% with the highest pixel gray value as a global atmospheric light value A in all the pixel points with the theta less than theta v and the J more than Jv; then carrying out step D;
D. after the step C is finished, the step can be carried out, and a dark channel image I is found in all pixel points of which theta is more than or equal to theta v and J is less than or equal to Jvd(X) and using the formula:
Figure BDA0002556648160000041
calculating dark channel transmittance T1; then carrying out step E; this embodiment can set ω to 0.95;
E. refining the transmittance graph T1 through guide filtering to obtain a refined transmittance graph T2; then, carrying out step F;
F. fitting the formula using the transmittance map T2 and the global atmospheric light value a:
Figure BDA0002556648160000042
determining parameters k, n and m, and ensuring that the standard deviation of fitting is less than 0.001 in the fitting process; carrying out defogging by substituting the pixel points with theta less than theta v and J greater than Jv into a fitting formula; then carrying out step G;
G. merging the two partial images which are defogged by different methods; then carrying out step H;
H. and outputting the defogged image according to the fog image forming model.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (8)

1. An image defogging method, characterized by comprising the steps of:
step 1: processing the shot original image, reading the gray value of a three-channel pixel, further obtaining a pixel deviation degree index theta and recording the minimum value J of the three gray values;
step 2: comparing the pixel deviation degree index theta and the minimum gray value J with set threshold values thetav and Jv;
and step 3: finding out dark channel image I aiming at pixel points meeting conditions that theta is larger than or equal to theta v and J is smaller than or equal to Jvd(X), taking pixels with the highest pixel gray value and the set percentage number as a global atmospheric light value A aiming at pixel points meeting the conditions that theta is less than theta v and J is greater than Jv, and obtaining a dark channel transmittance graph T1 by using a correlation formula;
and 4, step 4: refining the dark channel transmittance map T1 through guide filtering to obtain a refined transmittance map T2;
and 5: fitting a corresponding formula by using the transmittance graph T2 and the global atmospheric light value A, determining related parameters and bringing pixel points with the conditions that theta is less than thetav and J is greater than Jv into the corresponding formula for defogging after ensuring that the standard deviation of the fitting process is less than a set value;
step 6: and (5) merging the two partial images which are respectively defogged in the step (4) and the step (5), and outputting the defogged image according to the fog image forming model.
2. The image defogging method according to claim 1, wherein thetav value in the step 2 is 30.
3. The image defogging method according to claim 1, wherein the Jv value in the step 2 is 130.
4. The image defogging method according to claim 1, wherein the set percentage in the step 3 is 0.1%.
5. The image defogging method according to claim 1, wherein the correlation formula in the step 3 is:
Figure FDA0002556648150000011
in the formula, ω is a defogging factor.
6. The image defogging method according to claim 1, wherein the set value in the step 5 is 0.001.
7. The image defogging method according to claim 5, wherein the value of the defogging factor is 0.95.
8. The image defogging method according to claim 1, wherein the corresponding formula in the step 5 is:
Figure FDA0002556648150000021
in the formula, k, n and m are fitting parameters.
CN202010593554.2A 2020-06-27 2020-06-27 Image defogging method Active CN111784601B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010593554.2A CN111784601B (en) 2020-06-27 2020-06-27 Image defogging method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010593554.2A CN111784601B (en) 2020-06-27 2020-06-27 Image defogging method

Publications (2)

Publication Number Publication Date
CN111784601A true CN111784601A (en) 2020-10-16
CN111784601B CN111784601B (en) 2024-05-14

Family

ID=72760228

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010593554.2A Active CN111784601B (en) 2020-06-27 2020-06-27 Image defogging method

Country Status (1)

Country Link
CN (1) CN111784601B (en)

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110188775A1 (en) * 2010-02-01 2011-08-04 Microsoft Corporation Single Image Haze Removal Using Dark Channel Priors
CN102682443A (en) * 2012-05-10 2012-09-19 合肥工业大学 Rapid defogging algorithm based on polarization image guide
CN105279739A (en) * 2015-09-08 2016-01-27 哈尔滨工程大学 Self-adaptive fog-containing digital image defogging method
US20160071244A1 (en) * 2014-09-04 2016-03-10 National Taipei University Of Technology Method and system for image haze removal based on hybrid dark channel prior
US20160292824A1 (en) * 2013-04-12 2016-10-06 Agency For Science, Technology And Research Method and System for Processing an Input Image
WO2016169244A1 (en) * 2015-04-20 2016-10-27 中国矿业大学 Method of denoising and enhancing video image based on random spray retinex and device utilizing same
KR101784350B1 (en) * 2016-06-02 2017-10-11 한국항공대학교산학협력단 Dehazing method and device based on improved median dark channel prior
CN107578386A (en) * 2017-09-01 2018-01-12 荆门程远电子科技有限公司 A kind of optimization defogging processing method of unmanned plane shooting image
CN108230275A (en) * 2018-02-05 2018-06-29 电子科技大学 The method of image defogging
CN108460735A (en) * 2018-02-06 2018-08-28 中国科学院光电技术研究所 Improved dark channel defogging method based on single image
CN108876743A (en) * 2018-06-26 2018-11-23 中山大学 A kind of image rapid defogging method, system, terminal and storage medium
CN109190621A (en) * 2018-09-06 2019-01-11 东北大学 Greasy weather automatic license plate recognition method
CN109255759A (en) * 2018-08-02 2019-01-22 辽宁师范大学 Image defogging method based on sky segmentation and transmissivity adaptive correction
CN111292258A (en) * 2020-01-15 2020-06-16 长安大学 Image defogging method based on dark channel prior and bright channel prior

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110188775A1 (en) * 2010-02-01 2011-08-04 Microsoft Corporation Single Image Haze Removal Using Dark Channel Priors
CN102682443A (en) * 2012-05-10 2012-09-19 合肥工业大学 Rapid defogging algorithm based on polarization image guide
US20160292824A1 (en) * 2013-04-12 2016-10-06 Agency For Science, Technology And Research Method and System for Processing an Input Image
US20160071244A1 (en) * 2014-09-04 2016-03-10 National Taipei University Of Technology Method and system for image haze removal based on hybrid dark channel prior
WO2016169244A1 (en) * 2015-04-20 2016-10-27 中国矿业大学 Method of denoising and enhancing video image based on random spray retinex and device utilizing same
CN105279739A (en) * 2015-09-08 2016-01-27 哈尔滨工程大学 Self-adaptive fog-containing digital image defogging method
KR101784350B1 (en) * 2016-06-02 2017-10-11 한국항공대학교산학협력단 Dehazing method and device based on improved median dark channel prior
CN107578386A (en) * 2017-09-01 2018-01-12 荆门程远电子科技有限公司 A kind of optimization defogging processing method of unmanned plane shooting image
CN108230275A (en) * 2018-02-05 2018-06-29 电子科技大学 The method of image defogging
CN108460735A (en) * 2018-02-06 2018-08-28 中国科学院光电技术研究所 Improved dark channel defogging method based on single image
CN108876743A (en) * 2018-06-26 2018-11-23 中山大学 A kind of image rapid defogging method, system, terminal and storage medium
CN109255759A (en) * 2018-08-02 2019-01-22 辽宁师范大学 Image defogging method based on sky segmentation and transmissivity adaptive correction
CN109190621A (en) * 2018-09-06 2019-01-11 东北大学 Greasy weather automatic license plate recognition method
CN111292258A (en) * 2020-01-15 2020-06-16 长安大学 Image defogging method based on dark channel prior and bright channel prior

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
苏晋鹏等: "基于阈值分割的暗原色先验图像去雾方法", 《计算机工程与应用》, pages 208 - 210 *

Also Published As

Publication number Publication date
CN111784601B (en) 2024-05-14

Similar Documents

Publication Publication Date Title
CN106530246B (en) Image defogging method and system based on dark Yu non local priori
CN111292258B (en) Image defogging method based on dark channel prior and bright channel prior
CN107103591B (en) Single image defogging method based on image haze concentration estimation
CN108389175B (en) Image defogging method integrating variation function and color attenuation prior
CN110570360B (en) Retinex-based robust and comprehensive low-quality illumination image enhancement method
CN109087254B (en) Unmanned aerial vehicle aerial image haze sky and white area self-adaptive processing method
CN106875351A (en) A kind of defogging method towards large area sky areas image
CN111861896A (en) UUV-oriented underwater image color compensation and recovery method
CN107527325B (en) Monocular underwater vision enhancement method based on dark channel priority
CN108805826B (en) Method for improving defogging effect
CN109118450B (en) Low-quality image enhancement method under sand weather condition
Yu et al. Image and video dehazing using view-based cluster segmentation
CN107093173A (en) A kind of method of estimation of image haze concentration
CN114119383B (en) Underwater image restoration method based on multi-feature fusion
CN108765316B (en) Mist concentration self-adaptive judgment method
Ding et al. Restoration of single sand-dust image based on style transformation and unsupervised adversarial learning
CN111091501A (en) Parameter estimation method of atmosphere scattering defogging model
CN117495719A (en) Defogging method based on atmospheric light curtain and fog concentration distribution estimation
Zhang et al. Dehazing with improved heterogeneous atmosphere light estimation and a nonlinear color attenuation prior model
Sudhakara et al. An edge detection mechanism using L* A* B color-based contrast enhancement for underwater images
CN116797484A (en) Image defogging method and system based on improved dark channel prior
CN113379631B (en) Image defogging method and device
CN111784601A (en) Image defogging method
CN113298730B (en) Defogging restoration method based on image decomposition
Negru et al. Exponential image enhancement in daytime fog conditions

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
GR01 Patent grant
GR01 Patent grant