[go: up one dir, main page]

CN105023256B - A kind of image defogging method and system - Google Patents

A kind of image defogging method and system Download PDF

Info

Publication number
CN105023256B
CN105023256B CN201510495589.1A CN201510495589A CN105023256B CN 105023256 B CN105023256 B CN 105023256B CN 201510495589 A CN201510495589 A CN 201510495589A CN 105023256 B CN105023256 B CN 105023256B
Authority
CN
China
Prior art keywords
mrow
image
channel
fog
value
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
Application number
CN201510495589.1A
Other languages
Chinese (zh)
Other versions
CN105023256A (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.)
Harbin Super-Resolution Fx Technology Co Ltd
Original Assignee
Harbin Super-Resolution Fx 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 Harbin Super-Resolution Fx Technology Co Ltd filed Critical Harbin Super-Resolution Fx Technology Co Ltd
Priority to CN201510495589.1A priority Critical patent/CN105023256B/en
Publication of CN105023256A publication Critical patent/CN105023256A/en
Application granted granted Critical
Publication of CN105023256B publication Critical patent/CN105023256B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Processing (AREA)

Abstract

The present invention relates to a kind of image defogging method and system, comprise the following steps:Input artwork, i.e. a width colour foggy image;The basic image and levels of detail of the colored foggy image are extracted respectively;Obtain the view data of tri- passages of R, G, B of the basic image;The global atmosphere light and transmissivity of each passage of basic image are asked for respectively;The fog free images of each passage are recovered according to the global atmosphere light and transmissivity of each passage of basic image, so as to obtain fogless basic image;Levels of detail information is added to fogless basic image;The fogless basic image that with the addition of levels of detail information is smoothed and brightness and contrast's enhancing is handled, obtains fogless original image.The present invention disclosure satisfy that the defog effect that requirement of real-time and can has reached.

Description

Image defogging method and system
Technical Field
The invention relates to an image defogging method and system.
Background
In real life, foggy weather is often encountered, and foggy pictures taken in foggy weather cannot be normally used due to low visibility, so that many defogging algorithms are presented.
At present, in the prior art, a plurality of algorithms for defogging the foggy images exist, although the defogging method has advantages, disadvantages and good instantaneity, the defogging effect is not good, and the instantaneity cannot meet the requirements.
Disclosure of Invention
The invention aims to provide an image defogging method and an image defogging system, which can meet the real-time requirement and achieve a good defogging effect.
The technical scheme for solving the technical problems is as follows: an image defogging method comprising the steps of:
step 1, inputting an original image, namely a color foggy image;
step 2, respectively extracting a base image and a detail layer of the color foggy image;
step 3, acquiring R, G, B image data of three channels of the base image;
step 4, respectively obtaining the global atmospheric light and the transmissivity of each channel of the base image;
step 5, recovering the fog-free image of each channel according to the global atmospheric light and the transmissivity of each channel of the base image, thereby obtaining the fog-free base image;
step 6, adding detail layer information to the fog-free base image;
and 7, smoothing the fog-free base image added with the detail layer information and enhancing the brightness and contrast to obtain a fog-free original image.
On the basis of the technical scheme, the invention can be further improved as follows:
further, the global atmospheric light of each channel obtained in the step 4 is calculated according to the following method: obtaining dark channel data of each channel, comparing the dark channel data of each channel with a threshold value t, comparing the dark channel data with a pixel value at a corresponding position of the original image when the dark channel data is greater than the threshold value t, and taking the pixel value at the corresponding position of the original image as a global atmospheric light value of the channel when the dark channel data is greater than the data at the corresponding position of the original image; and otherwise, taking the threshold t as a global atmospheric light value, and respectively calculating the average value of the global atmospheric light values of all dark channels in each channel as the global atmospheric light value of the channel.
Further, in the step 4, the transmittance is calculated according to the following method:
wherein,t (x) is the transmittance; Ω (x) represents a template window centered on pixel point x; a is the global atmospheric light value, c represents R, G, B three channels, and I (y) is the target value after defogging; g (x) is a Gaussian convolution template with a template size of 13X 13.
Further, in the step 5, the fog-free base image j (x) is obtained according to the following method:
wherein, I (x) is the input original image; t is t0=0.3。
The invention has the beneficial effects that: by optimizing the global atmosphere light and the transmittance, the real-time requirement is met and a good defogging effect can be achieved.
Another technical solution of the present invention for solving the above technical problems is as follows: an image defogging system comprising:
the input module is used for inputting an original image, namely a color foggy image;
the extraction module is used for respectively extracting the base image and the detail layer of the color foggy image;
an acquisition module for acquiring R, G, B three channels of image data of the base image;
the calculation module is used for respectively calculating the global atmospheric light and the transmittance of each channel of the base image;
the recovery module is used for recovering the fog-free image of each channel according to the global atmospheric light and the transmissivity of each channel of the base image so as to obtain the fog-free base image;
the adding module is used for adding detail layer information to the fog-free base image;
and the enhancement processing module is used for carrying out smoothing processing and brightness and contrast enhancement processing on the fog-free base image added with the detail layer information to obtain a fog-free original image.
On the basis of the technical scheme, the invention can be further improved as follows:
the global atmospheric light of each channel acquired by the acquisition module is calculated according to the following method: obtaining dark channel data of each channel, comparing the dark channel data of each channel with a threshold value t, comparing the dark channel data with a pixel value at a corresponding position of the original image when the dark channel data is greater than the threshold value t, and taking the pixel value at the corresponding position of the original image as a global atmospheric light value of the channel when the dark channel data is greater than the data at the corresponding position of the original image; and otherwise, taking the threshold t as a global atmospheric light value, and respectively calculating the average value of the global atmospheric light values of all dark channels in each channel as the global atmospheric light value of the channel.
Further, the transmittance is calculated in the acquisition module according to the following method:
wherein,t (x) is the transmittance; Ω (x) represents a template window centered on pixel point x; a is the global atmospheric light value, c represents R, G, B three channels, and I (y) is the target value after defogging; g (x) is a Gaussian convolution template with a template size of 13X 13.
Further, the restoration module acquires the fog-free basis image j (x) according to the following method:
wherein, I (x) is the input original image; t is t0=0.3。
The invention has the beneficial effects that: by optimizing the global atmosphere light and the transmittance, the real-time requirement is met and a good defogging effect can be achieved.
Drawings
FIG. 1 is a schematic flow chart of an image defogging method according to the present invention;
FIG. 2 is a schematic structural diagram of an image defogging system according to the present invention.
Detailed Description
The principles and features of this invention are described below in conjunction with the following drawings, which are set forth by way of illustration only and are not intended to limit the scope of the invention.
As shown in fig. 1, an image defogging method is characterized by comprising the following steps:
step 1, inputting an original image, namely a color foggy image;
step 2, respectively extracting a base image and a detail layer of the color foggy image;
step 3, acquiring R, G, B image data of three channels of the base image;
step 4, respectively obtaining the global atmospheric light and the transmissivity of each channel of the base image;
the global atmosphere light of each channel obtained in the step 4 is calculated according to the following method: obtaining dark channel data of each channel, comparing the dark channel data of each channel with a threshold value t, comparing the dark channel data with a pixel value at a corresponding position of the original image when the dark channel data is greater than the threshold value t, and taking the pixel value at the corresponding position of the original image as a global atmospheric light value of the channel when the dark channel data is greater than the data at the corresponding position of the original image; and otherwise, taking the threshold t as a global atmospheric light value, and respectively calculating the average value of the global atmospheric light values of all dark channels in each channel as the global atmospheric light value of the channel.
In the step 4, the transmittance is calculated according to the following method:
wherein,t (x) is the transmittance; Ω (x) denotes by pixel point x
A template window at the center; a is the global atmosphere light value, c represents R, G, B three channels, I (y)
Is the target value after defogging; g (x) is a Gaussian convolution template with a template size of 13X 13.
Step 5, recovering the fog-free image of each channel according to the global atmospheric light and the transmissivity of each channel of the base image, thereby obtaining the fog-free base image; in the step 5, the fog-free base image J (x) is obtained according to the following method:
wherein, I (x) is the input original image; t is t0=0.3。
Step 6, adding detail layer information to the fog-free base image;
and 7, smoothing the fog-free base image added with the detail layer information and enhancing the brightness and contrast to obtain a fog-free original image.
As shown in fig. 2, an image defogging system includes:
the input module is used for inputting an original image, namely a color foggy image;
the extraction module is used for respectively extracting the base image and the detail layer of the color foggy image;
an acquisition module for acquiring R, G, B three channels of image data of the base image;
the global atmospheric light of each channel acquired by the acquisition module is calculated according to the following method: obtaining dark channel data of each channel, comparing the dark channel data of each channel with a threshold value t, comparing the dark channel data with a pixel value at a corresponding position of the original image when the dark channel data is greater than the threshold value t, and taking the pixel value at the corresponding position of the original image as a global atmospheric light value of the channel when the dark channel data is greater than the data at the corresponding position of the original image; and otherwise, taking the threshold t as a global atmospheric light value, and respectively calculating the average value of the global atmospheric light values of all dark channels in each channel as the global atmospheric light value of the channel. The calculation module is used for respectively calculating the global atmospheric light and the transmittance of each channel of the base image;
the obtaining module calculates the transmittance according to the following method:
wherein,t (x) is the transmittance; Ω (x) represents a template window centered on pixel point x; a is the global atmospheric light value, c represents R, G, B three channels, and I (y) is the target value after defogging; g (x) is a Gaussian convolution template with a template size of 13X 13.
The recovery module is used for recovering the fog-free image of each channel according to the global atmospheric light and the transmissivity of each channel of the base image so as to obtain the fog-free base image; the recovery module acquires the fog-free basis image J (x) according to the following method:
wherein, I (x) is the input original image; t is t0=0.3。
The adding module is used for adding detail layer information to the fog-free base image;
and the enhancement processing module is used for carrying out smoothing processing and brightness and contrast enhancement processing on the fog-free base image added with the detail layer information to obtain a fog-free original image.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (6)

1. An image defogging method is characterized by comprising the following steps:
step 1, inputting a color foggy image;
step 2, respectively extracting a base image and a detail layer of the color foggy image;
step 3, acquiring R, G, B image data of three channels of the base image;
step 4, respectively obtaining the global atmospheric light and the transmissivity of each channel of the base image;
step 5, recovering the fog-free image of each channel according to the global atmospheric light and the transmissivity of each channel of the base image, thereby obtaining the fog-free base image;
step 6, adding detail layer information to the fog-free base image;
step 7, smoothing and brightness and contrast enhancement processing are carried out on the fog-free base image added with the detail layer information to obtain a fog-free original image;
the global atmosphere light of each channel obtained in the step 4 is calculated according to the following method: obtaining dark channel data of each channel, comparing the dark channel data of each channel with a threshold value t, comparing the dark channel data with a pixel value at a corresponding position of the original image when the dark channel data is greater than the threshold value t, and taking the pixel value at the corresponding position of the original image as a global atmospheric light value of the channel when the dark channel data is greater than the data at the corresponding position of the original image; and otherwise, taking the threshold t as a global atmospheric light value, and respectively calculating the average value of the global atmospheric light values of all dark channels in each channel as the global atmospheric light value of the channel.
2. The image defogging method according to claim 1, wherein the transmittance is calculated in the step 4 according to the following method:
<mrow> <mi>t</mi> <mrow> <mo>(</mo> <mi>x</mi> <mo>)</mo> </mrow> <mo>=</mo> <mover> <mi>t</mi> <mo>&amp;OverBar;</mo> </mover> <mrow> <mo>(</mo> <mi>x</mi> <mo>)</mo> </mrow> <mo>*</mo> <mi>G</mi> <mrow> <mo>(</mo> <mi>x</mi> <mo>)</mo> </mrow> <mo>;</mo> </mrow>
wherein,t (x) is the transmittance; Ω (x) represents a template centered on a pixel point xA window; a is the global atmospheric light value, c represents R, G, B three channels, and I (y) is the target value after defogging; g (x) is a Gaussian convolution template with a template size of 13X 13.
3. The image defogging method according to claim 2, wherein in the step 5, the fog-free base image J (x) is obtained according to the following method:
<mrow> <mi>J</mi> <mrow> <mo>(</mo> <mi>x</mi> <mo>)</mo> </mrow> <mo>=</mo> <mi>A</mi> <mo>-</mo> <mfrac> <mrow> <mi>A</mi> <mo>-</mo> <mi>I</mi> <mrow> <mo>(</mo> <mi>x</mi> <mo>)</mo> </mrow> </mrow> <mrow> <mi>m</mi> <mi>a</mi> <mi>x</mi> <mrow> <mo>(</mo> <mi>t</mi> <mo>(</mo> <mi>x</mi> <mo>)</mo> <mo>,</mo> <msub> <mi>t</mi> <mn>0</mn> </msub> <mo>)</mo> </mrow> </mrow> </mfrac> <mo>;</mo> </mrow>
wherein, I (x) is the input original image; t is t0=0.3。
4. An image defogging system, comprising:
the input module is used for inputting a color foggy image;
the extraction module is used for respectively extracting the base image and the detail layer of the color foggy image;
an acquisition module for acquiring R, G, B three channels of image data of the base image;
the calculation module is used for respectively calculating the global atmospheric light and the transmittance of each channel of the base image;
the recovery module is used for recovering the fog-free image of each channel according to the global atmospheric light and the transmissivity of each channel of the base image so as to obtain the fog-free base image;
the adding module is used for adding detail layer information to the fog-free base image;
the enhancement processing module is used for carrying out smoothing processing and brightness and contrast enhancement processing on the fog-free base image added with the detail layer information to obtain a fog-free original image;
the global atmosphere light of each channel obtained in the calculation module is calculated according to the following method: obtaining dark channel data of each channel, comparing the dark channel data of each channel with a threshold value t, comparing the dark channel data with a pixel value at a corresponding position of the original image when the dark channel data is greater than the threshold value t, and taking the pixel value at the corresponding position of the original image as a global atmospheric light value of the channel when the dark channel data is greater than the data at the corresponding position of the original image; and otherwise, taking the threshold t as a global atmospheric light value, and respectively calculating the average value of the global atmospheric light values of all dark channels in each channel as the global atmospheric light value of the channel.
5. The image defogging system according to claim 4, wherein said calculation module calculates the transmittance according to the following method:
<mrow> <mi>t</mi> <mrow> <mo>(</mo> <mi>x</mi> <mo>)</mo> </mrow> <mo>=</mo> <mover> <mi>t</mi> <mo>&amp;OverBar;</mo> </mover> <mrow> <mo>(</mo> <mi>x</mi> <mo>)</mo> </mrow> <mo>*</mo> <mi>G</mi> <mrow> <mo>(</mo> <mi>x</mi> <mo>)</mo> </mrow> <mo>;</mo> </mrow>
wherein,t (x) is the transmittance; Ω (x) represents a template window centered on pixel point x; a is totalLocal atmospheric light value, c represents R, G, B three channels, I (y) is the target value after defogging; g (x) is a Gaussian convolution template with a template size of 13X 13.
6. The image defogging system according to claim 5, wherein the restoring module acquires the fog-free base image J (x) according to the following method:
<mrow> <mi>J</mi> <mrow> <mo>(</mo> <mi>x</mi> <mo>)</mo> </mrow> <mo>=</mo> <mi>A</mi> <mo>-</mo> <mfrac> <mrow> <mi>A</mi> <mo>-</mo> <mi>I</mi> <mrow> <mo>(</mo> <mi>x</mi> <mo>)</mo> </mrow> </mrow> <mrow> <mi>m</mi> <mi>a</mi> <mi>x</mi> <mrow> <mo>(</mo> <mi>t</mi> <mo>(</mo> <mi>x</mi> <mo>)</mo> <mo>,</mo> <msub> <mi>t</mi> <mn>0</mn> </msub> <mo>)</mo> </mrow> </mrow> </mfrac> <mo>;</mo> </mrow>
wherein, I (x) is the input original image; t is t0=0.3。
CN201510495589.1A 2015-08-13 2015-08-13 A kind of image defogging method and system Active CN105023256B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510495589.1A CN105023256B (en) 2015-08-13 2015-08-13 A kind of image defogging method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510495589.1A CN105023256B (en) 2015-08-13 2015-08-13 A kind of image defogging method and system

Publications (2)

Publication Number Publication Date
CN105023256A CN105023256A (en) 2015-11-04
CN105023256B true CN105023256B (en) 2018-02-13

Family

ID=54413200

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510495589.1A Active CN105023256B (en) 2015-08-13 2015-08-13 A kind of image defogging method and system

Country Status (1)

Country Link
CN (1) CN105023256B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105825483B (en) * 2016-03-21 2018-10-16 电子科技大学 A kind of method that image removes haze and sand and dust
CN106023092B (en) * 2016-05-04 2020-12-11 中国农业大学 A kind of image defogging method and device
CN105898111B (en) * 2016-05-06 2018-11-27 西安理工大学 A kind of video defogging method based on spectral clustering
JP6463512B2 (en) * 2016-05-24 2019-02-06 オリンパス株式会社 Image signal processing apparatus, image signal processing method, and image signal processing program
CN105979120B (en) * 2016-06-03 2019-03-12 华南农业大学 Video defogging system and video defogging method based on distributed computing
CN107451975B (en) * 2017-04-25 2019-06-07 中国人民解放军空军工程大学 A kind of view-based access control model weights similar picture quality clarification method
CN107392870B (en) * 2017-07-27 2020-07-21 Oppo广东移动通信有限公司 Image processing method, image processing device, mobile terminal and computer readable storage medium
CN107392871B (en) * 2017-07-27 2020-01-10 Oppo广东移动通信有限公司 Image defogging method and device, mobile terminal and computer readable storage medium
CN108810506B (en) * 2018-06-13 2021-09-07 中国航空工业集团公司洛阳电光设备研究所 An FPGA-based image processing method and system for enhanced fog penetration
CN112330568B (en) * 2020-11-27 2024-12-03 云南省烟草农业科学研究院 A brightness compensation method for tobacco leaf images with uneven illumination
CN112465033B (en) * 2020-11-30 2021-08-03 哈尔滨市科佳通用机电股份有限公司 Brake pad cotter pin loss detection method, system and device based on deep learning

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7876974B2 (en) * 2003-08-29 2011-01-25 Vladimir Brajovic Method for improving digital images and an image sensor for sensing the same
CN102243758A (en) * 2011-07-14 2011-11-16 浙江大学 Fog-degraded image restoration and fusion based image defogging method
CN103034983A (en) * 2013-01-10 2013-04-10 厦门大学 Defogging method based on anisotropic filtering

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7876974B2 (en) * 2003-08-29 2011-01-25 Vladimir Brajovic Method for improving digital images and an image sensor for sensing the same
CN102243758A (en) * 2011-07-14 2011-11-16 浙江大学 Fog-degraded image restoration and fusion based image defogging method
CN103034983A (en) * 2013-01-10 2013-04-10 厦门大学 Defogging method based on anisotropic filtering

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"一种改进的单幅图像快速去雾方法与实验";肖钟捷等;《地球信息科学》;20150430;第17卷(第4期);第497页第6-17段 *
"实时域变换图像去雾";吴金亮;《计算机与网络》;20150630(第10期);第44页第4.1节及图1 *

Also Published As

Publication number Publication date
CN105023256A (en) 2015-11-04

Similar Documents

Publication Publication Date Title
CN105023256B (en) A kind of image defogging method and system
CN103020920B (en) Method for enhancing low-illumination images
CN103049888A (en) Image/video demisting method based on combination of dark primary color of atmospheric scattered light
CN107301623B (en) Traffic image defogging method and system based on dark channel and image segmentation
CN102063706B (en) Rapid defogging method
CN102831591B (en) Gaussian filter-based real-time defogging method for single image
CN106530257A (en) Remote sensing image de-fogging method based on dark channel prior model
CN103077504B (en) A kind of image defogging method capable based on self-adaptation illumination calculation
CN107767354A (en) A kind of image defogging algorithm based on dark primary priori
CN103426151B (en) A kind of image defogging method and device
WO2016206087A1 (en) Low-illumination image processing method and device
CN102243758A (en) Fog-degraded image restoration and fusion based image defogging method
CN103914820B (en) Image haze removal method and system based on image layer enhancement
CN107301624A (en) The convolutional neural networks defogging algorithm pre-processed based on region division and thick fog
CN104463816A (en) Image processing method and device
CN105913390B (en) Image defogging method and system
CN105046658A (en) Low-illumination image processing method and device
CN103020921A (en) Single image defogging method based on local statistical information
CN104050637A (en) Quick image defogging method based on two times of guide filtration
CN102982513A (en) Adaptive image defogging method based on textures
CN104809709A (en) Single-image self-adaptation defogging method based on domain transformation and weighted quadtree decomposition
CN106127715A (en) A kind of image defogging method and system
CN105631823A (en) Dark channel sky area defogging method based on threshold segmentation optimization
CN103020914A (en) Rapid image defogging method based on spatial continuity principle
CN106355560B (en) The extracting method and system of air light value in a kind of haze image

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Shi Jian

Inventor after: Zhang Leilei

Inventor after: Liu Jingdong

Inventor after: Song Bo

Inventor after: Zhong Zhaoyu

Inventor after: Na Yongrui

Inventor before: Qiu Xuan

TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20180116

Address after: 150000 Heilongjiang Province, Harbin city Nangang District Fuhua four Street No. 6

Applicant after: HARBIN SUPER-RESOLUTION FX TECHNOLOGY CO., LTD.

Address before: 541002 No. 102, Zhongshan South Road, Xiangshan District, Guilin City, Guangxi Zhuang Autonomous Region

Applicant before: Qiu Xuan

GR01 Patent grant
GR01 Patent grant