CN111223052B - Image defogging method based on improved tolerance mechanism - Google Patents
Image defogging method based on improved tolerance mechanism Download PDFInfo
- Publication number
- CN111223052B CN111223052B CN201911015955.3A CN201911015955A CN111223052B CN 111223052 B CN111223052 B CN 111223052B CN 201911015955 A CN201911015955 A CN 201911015955A CN 111223052 B CN111223052 B CN 111223052B
- Authority
- CN
- China
- Prior art keywords
- image
- value
- dark
- channel
- tolerance mechanism
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 31
- 230000007246 mechanism Effects 0.000 title claims abstract description 26
- 238000010586 diagram Methods 0.000 claims description 12
- 238000001914 filtration Methods 0.000 claims description 12
- 238000002834 transmittance Methods 0.000 claims description 12
- 230000008569 process Effects 0.000 claims description 5
- 238000012937 correction Methods 0.000 claims description 3
- 238000004364 calculation method Methods 0.000 claims description 2
- 238000012545 processing Methods 0.000 abstract description 4
- 230000000007 visual effect Effects 0.000 abstract description 3
- 230000009467 reduction Effects 0.000 abstract description 2
- 238000011084 recovery Methods 0.000 description 6
- 230000005540 biological transmission Effects 0.000 description 2
- 239000002131 composite material Substances 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000015556 catabolic process Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000006731 degradation reaction Methods 0.000 description 1
- 230000002542 deteriorative effect Effects 0.000 description 1
- 230000005669 field effect Effects 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/73—Deblurring; Sharpening
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/90—Dynamic range modification of images or parts thereof
- G06T5/94—Dynamic range modification of images or parts thereof based on local image properties, e.g. for local contrast enhancement
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
Abstract
The invention discloses an image defogging method based on an improved tolerance mechanism, which comprises the steps of adding the improved tolerance mechanism into an atmospheric scattering model to obtain a final image restoration formula, and further processing an image O to be defogged to obtain a final restored image F; the invention can more accurately compensate the part of the target picture which does not meet the prior rule of the dark channel, avoid the reduction of defogging capacity and improve the visual effect of the image.
Description
Technical Field
The invention belongs to the technical field of computer vision, and particularly relates to an image defogging method based on an improved tolerance mechanism.
Background
Under the foggy environment, the visibility and contrast of the shot scenery are reduced due to the influence of atmospheric scattering, so that the safety of aviation, sea transportation and road traffic is directly influenced, and various outdoor monitoring systems, such as video monitoring systems, cannot work reliably in severe weather. Therefore, simple and effective image defogging is of great importance to improve the reliability and robustness of the vision system.
Defogging algorithms for images are largely divided into two categories: one is based on image enhancement, which is defogging based on the exponential relationship between the reduction of image quality and the distance from the scene point to the imaging sensor, so that the image enhancement technique assuming that the scene depth is unchanged cannot defog the atomized image well. Another class is methods based on atmospheric scattering physical models. The method establishes an image degradation model based on an atmospheric scattering rule, can utilize priori knowledge, and has inherent superiority. The He Kaiming et al propose a simple dark channel priori single image defogging method based on a statistical rule of an outdoor defogging image database, and obtain good defogging effects on general outdoor images, but the method is built on a dark channel assumption, and for a bright area which does not meet the assumption, the transmissivity in the algorithm is smaller, and color distortion occurs in a recovery result, so Jiang Jianguo et al propose a tolerance mechanism for repairing the problem of color distortion, wherein the tolerance mechanism compensates the transmissivity of the area which does not meet the assumption of the dark channel, but the existing tolerance mechanism has the phenomenon of overcompensation.
Disclosure of Invention
In order to solve the defects in the prior art, the invention provides an image defogging method based on an improved tolerance mechanism, and provides a method for enabling defogging results to be more natural.
The technical scheme adopted by the invention is as follows:
an image defogging method based on an improved tolerance mechanism adds the improved tolerance mechanism into an atmospheric scattering model, and a formula for obtaining final image recovery is as follows:further processing the defogging image O to obtain a final recovered image F, wherein,O c (i) The value of a pixel point i in a channel c of the image to be defocused, and t (i) is the value of the pixel point i in the transmissivity image; a is the value of global atmospheric light, K is the tolerance, gamma is the correction index, t 0 For the transmittance threshold, c is a certain channel of RGB.
Further, when |O c (i) -A| < K, then the image is restored by taking in the formulaAdjusting; when |O c (i) -a| > K, then no adjustment is needed to take 1 in the formula for image restoration.
Further, the K is 55; gamma is 0.4; t is t 0 The value is 0.1.
Further, the atmospheric scattering model is expressed as: o (O) c (i)=F c (i)t(i)+A(1-t(i))。
Further, the calculation method of the value A of the global atmosphere light comprises the following steps:
and (3) obtaining a channel value with the lowest pixel value in an RGB channel of the image to be defogged, storing the channel value as a dark channel diagram, carrying out minimum value filtering treatment on the dark channel diagram, and taking the average value of the pixels with the brightness of the pixels of the dark channel diagram ranked at the front 0.1% as the value A of the global atmosphere light.
Further, the method for calculating the transmittance image comprises the following steps:
according to the atmospheric scattering model O dark (i)=F dark (i) t (i) +A (1-t (i)), let F dark (i) The transmittance image is derived for =0:wherein omega is a fog constant parameter, the value of O is 0.95 dark (i) For the value of pixel i in the dark channel of the image to be defogged, F dark (i) Is the value of pixel i in the dark channel of the haze-free image.
Further, the transmittance image is refined by adopting a guide filtering process, wherein the guide image is a dark channel image O after the filtering process dark 。
The invention has the beneficial effects that:
aiming at the fact that the existing tolerance mechanism can improve the color distortion phenomenon of a bright area through the transmissivity compensation of the area which does not meet the dark channel assumption, the invention can avoid but not excessively compensate, more accurately compensate the part of the area which does not meet the dark channel priori rule in the target picture, avoid the defogging capacity from being reduced, improve the visual effect of the image, and introduce a composite function to enable the compensation amplitude of the transmissivity to be reasonable, so that the defogging result is more natural.
Drawings
FIG. 1 is a flow chart of image defogging based on an improved tolerance mechanism of the present invention;
FIG. 2 is an original image of an example of the present invention;
FIG. 3 is a dark channel diagram of an example of the invention;
FIG. 4 is a graph of transmittance for an example of the invention;
FIG. 5 is a graph of transmission after refinement of an example of the invention;
FIG. 6 is a restoration diagram of the comparison method (without the addition of tolerance mechanism) of the present invention;
fig. 7 is a final recovery diagram of an example of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
As shown in fig. 1, the image defogging method based on the improved tolerance mechanism provided by the invention comprises the following steps:
step 1, obtaining the channel value with the lowest pixel point value in RGB channels of an image to be defogged (shown in figure 2), storing the channel value as a dark channel map, and then carrying out minimum value filtering treatment on the dark channel map just obtained to obtain a required dark channel map O after the filtering treatment dark (as shown in fig. 3):
wherein O is dark (i) Is the value of pixel i in the dark channel of the image to be defocused, Ω (i) is a window centered on pixel i, O c And (y) is the value of the pixel point y in the channel c of the image to be defogged, and c is a certain channel of RGB.
And 2, taking an average value of the pixels with the brightness ranking of 0.1% in the dark channel diagram after the filtering processing in the step 1 as a value A of the global atmosphere light.
Step 3, according to an atmospheric scattering model:
O dark (i)=F dark (i)t(i)+A(1-t(i)) (2)
wherein O is dark (i) The value of the pixel point i in the dark channel of the image to be defocused; f (F) dark (i) The value of pixel i in the dark channel for the haze-free image; t (i) is the value of pixel i in the transmittance image; a is the value of global atmospheric light; according to the prior knowledge of the dark channel (the pixel value in the dark channel diagram of the haze-free image is very low), the prior theory of the dark channel indicates the dark channel diagram F of the haze-free image dark 0) combining formula (1) and formula (2), let F dark (i) The transmission image (as shown in fig. 4) derived by =0 is:
wherein ω is a fog constant parameter, and in order to preserve fog in a part of the image, a depth of field effect is given to people, and the value is 0.95.
And 4, carrying out refinement treatment on the transmissivity image obtained in the step 3 by adopting guide filtering treatment, wherein the guide image is a dark channel image after the filtering treatment (as the dark channel image is subjected to minimum value filtering treatment, the image edge is obvious, and good edge information is reserved, so that the effect of edge treatment of guide filtering can be improved by using the dark channel image after the filtering treatment as the guide image), and a refined transmissivity image is obtained (as shown in fig. 5).
Step 5, according to an atmospheric scattering model:
O c (i)=F c (i)t(i)+A(1-t(i)) (4)
wherein O is c (i) The value of a pixel point i in a channel c of the image to be defocused, and t (i) is the value of the pixel point i in the transmissivity image; a is the value of global atmospheric light.
The method for adding the improved tolerance mechanism is used for processing the defogging image O, and the formula for obtaining the final restored image is as follows:
wherein K is a tolerance, and in this embodiment, the value is 55; gamma is a correction index, which in this example takes a value of 0.4; in the process of; f (F) c (i) To finally restore the value of i, O of the pixel point in the c channel of the image c (i) For the value of pixel point i in the c channel of the image to be defogged, A is the value of global atmosphere light, t 0 Is a transmittance threshold (taking into account that when the value of the transmittance image t is small, F is large, resulting in the recovered image being too white, the value is 0.1 in this embodiment); when |O c (i) A| < K is a bright area, the prior rule of a dark channel is not satisfied, if adjustment is needed, the formula of image recovery is takenWhen |O c (i) The area with A| > K meets the prior rule of the dark channel, and the adjustment is not needed, so that 1 is taken from the formula of image restoration.
The recovery formula without adding tolerance mechanism is compared with the original method:
referring to fig. 6, a restored image (without tolerance mechanism) is obtained by the original method, wherein the problem is color incompatibility as indicated in the figure, and the texture is absent, and the original method can improve the color distortion phenomenon of the bright area by compensating the transmissivity of the area which does not meet the assumption of the dark channel, but the compensation cannot be too large, otherwise the defogging capability is causedDegradation, deteriorating visual effects of the image; FIG. 7 is an image resulting from the addition of tolerance mechanism recovery; the invention introduces a composite functionThe compensation amplitude of the transmissivity tends to be reasonable, the defogging result is more natural, and obviously, the color change of the edge of the picture 7 is gentle, the color is more full, the texture is clear, and the picture is more real.
The above embodiments are merely for illustrating the design concept and features of the present invention, and are intended to enable those skilled in the art to understand the content of the present invention and implement the same, the scope of the present invention is not limited to the above embodiments. Therefore, all equivalent changes or modifications according to the principles and design ideas of the present invention are within the scope of the present invention.
Claims (6)
1. An image defogging method based on an improved tolerance mechanism is characterized in that the improved tolerance mechanism is added into an atmospheric scattering model to obtain a final image restoration formula, and then a defogging image O is processed to obtain a final restored image F; wherein, the formula of image restoration is expressed as:
when |O c (i) -A| < K, then the image is restored by taking in the formulaAdjusting; when |O c (i) -A| > K, then taking 1 in the formula of image restoration, i.e. without adjustment;
wherein O is c (i) The value of a pixel point i in a channel c of the image to be defocused, and t (i) is the value of the pixel point i in the transmissivity image; a is the value of global atmospheric light, K is the tolerance, gamma is the correction index, t 0 For the transmittance threshold, c is a certain channel of RGB.
2. The image defogging method based on an improved tolerance mechanism according to claim 1, wherein the calculating method of the transmittance image t is as follows:
according to the atmospheric scattering model O dark (i)=F dark (i) t (i) +A (1-t (i)), let F dark (i) The transmittance image is derived for =0:wherein omega is a fog constant parameter, omega takes a value of 0.95 and O dark (i) For the value of pixel i in the dark channel of the image to be defogged, F dark (i) Is the value of pixel i in the dark channel of the haze-free image.
3. The image defogging method based on improved tolerance mechanism according to claim 2, wherein the transmittance image t is refined by using a guided filter process, wherein the guided image is a dark channel image O after the filter process dark 。
4. A method of image defogging based on an improved tolerance mechanism according to claim 1, 2 or 3, wherein said K has a value of 55; gamma is 0.4; t is t 0 The value is 0.1.
5. The improved tolerance mechanism-based image defogging method of claim 4, wherein the atmospheric scattering model is expressed as: o (O) c (i)=F c (i)t(i)+A(1-t(i))。
6. The image defogging method based on an improved tolerance mechanism according to claim 5, wherein the calculation method of the value a of the global atmosphere light is:
and (3) obtaining a channel value with the lowest pixel value in an RGB channel of the image to be defogged, storing the channel value as a dark channel diagram, carrying out minimum value filtering treatment on the dark channel diagram, and taking the average value of the pixels with the brightness of the pixels of the dark channel diagram ranked at the front 0.1% as the value A of the global atmosphere light.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911015955.3A CN111223052B (en) | 2019-10-24 | 2019-10-24 | Image defogging method based on improved tolerance mechanism |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911015955.3A CN111223052B (en) | 2019-10-24 | 2019-10-24 | Image defogging method based on improved tolerance mechanism |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111223052A CN111223052A (en) | 2020-06-02 |
CN111223052B true CN111223052B (en) | 2023-05-09 |
Family
ID=70829128
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911015955.3A Active CN111223052B (en) | 2019-10-24 | 2019-10-24 | Image defogging method based on improved tolerance mechanism |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111223052B (en) |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9361670B2 (en) * | 2014-09-04 | 2016-06-07 | National Taipei University Of Technology | Method and system for image haze removal based on hybrid dark channel prior |
CN106530257A (en) * | 2016-11-22 | 2017-03-22 | 重庆邮电大学 | Remote sensing image de-fogging method based on dark channel prior model |
CN109785262A (en) * | 2019-01-11 | 2019-05-21 | 闽江学院 | Image defogging method based on dark channel prior and adaptive histogram equalization |
-
2019
- 2019-10-24 CN CN201911015955.3A patent/CN111223052B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN111223052A (en) | 2020-06-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107301623B (en) | Traffic image defogging method and system based on dark channel and image segmentation | |
CN106530246B (en) | Image defogging method and system based on dark Yu non local priori | |
CN107767354B (en) | Image defogging algorithm based on dark channel prior | |
CN109255759B (en) | Image defogging method based on sky segmentation and transmissivity self-adaptive correction | |
CN108765342A (en) | A kind of underwater image restoration method based on improvement dark | |
CN108154492B (en) | A kind of image based on non-local mean filtering goes haze method | |
CN112837233B (en) | Polarization image defogging method for acquiring transmissivity based on differential polarization | |
CN110689490A (en) | Underwater image restoration method based on texture color features and optimized transmittance | |
CN111161167B (en) | Single image defogging method based on middle channel compensation and self-adaptive atmospheric light estimation | |
CN107067375A (en) | A kind of image defogging method based on dark channel prior and marginal information | |
CN104331867B (en) | The method, device and mobile terminal of image defogging | |
CN105989583B (en) | A kind of image defogging method | |
CN109934779B (en) | Defogging method based on guided filtering optimization | |
CN112465720B (en) | Image defogging method and device based on image sky segmentation and storage medium | |
CN112200755B (en) | Image defogging method | |
CN107977941B (en) | Image defogging method for color fidelity and contrast enhancement of bright area | |
CN108898561B (en) | Defogging method, server and system for foggy image containing sky area | |
Zhang et al. | A fast video image defogging algorithm based on dark channel prior | |
CN111091501A (en) | Parameter estimation method of atmosphere scattering defogging model | |
CN111223052B (en) | Image defogging method based on improved tolerance mechanism | |
CN109191405B (en) | Aerial image defogging algorithm based on transmittance global estimation | |
CN116433513A (en) | Road monitoring video defogging method, system, electronic equipment and storage medium | |
CN116229404A (en) | Image defogging optimization method based on distance sensor | |
CN110852971A (en) | Video defogging method based on dark channel prior and Retinex and computer program product | |
CN113989164B (en) | Underwater color image restoration method, system and storage medium |
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 | ||
TR01 | Transfer of patent right |
Effective date of registration: 20231026 Address after: Room 3A12, Building E, No. 33 Dongqi Road, Dongshan Street, Jiangning District, Nanjing City, Jiangsu Province, 210000 Patentee after: Nanjing Jutong Technology Co.,Ltd. Address before: Zhenjiang City, Jiangsu Province, 212013 Jingkou District Road No. 301 Patentee before: JIANGSU University |
|
TR01 | Transfer of patent right |