CN104008527A - Method for defogging single image - Google Patents
Method for defogging single image Download PDFInfo
- Publication number
- CN104008527A CN104008527A CN201410153443.4A CN201410153443A CN104008527A CN 104008527 A CN104008527 A CN 104008527A CN 201410153443 A CN201410153443 A CN 201410153443A CN 104008527 A CN104008527 A CN 104008527A
- Authority
- CN
- China
- Prior art keywords
- image
- max
- propagation
- norm
- mist elimination
- 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
Links
Landscapes
- Color Image Communication Systems (AREA)
- Image Processing (AREA)
Abstract
The invention discloses a method for defogging a single image. A propagation image is acquired through regional color mean vectors of an RGB image I to be defogged and an L2 norm of the RGB image I to be defogged, and then the defogged image is calculated according to the propagation image and an atmosphere light value. According to the method, the single RGB color image can be directly utilized, and no information provided from the outside is needed; meanwhile, in the calculation process of the defogged image, the defogged image can be directly obtained through coefficients, and the brightness of the image does not need to be further increased after the image is defogged so as to meet the display requirement.
Description
Technical field
The invention belongs to digital image processing field, be applicable to the pre-service in early stage of computer vision application, can be widely used in the fields such as road, square video monitoring, drive recorder, is more particularly a kind of single image defogging method capable.
Background technology
In recent years, the atmospheric pollution of China is more and more serious, and consequent haze causes atmospheric visibility to reduce, and outdoor video surveillance is difficult to directly obtain having the image information of certain visibility, directly causes the inefficacy of surveillance.The mist elimination that utilizes software algorithm to realize image in the image basis for this reason obtaining at video camera is processed, and the visibility that increases image seems significant.
Existing image mist elimination algorithm mainly comprises: the method based on many views, the method based on priori and directly utilize the method for single image mist elimination.Method based on many views and priori need to be provided by the external world prior imformations such as the degree of depth, and these depth informations are difficult to obtain in actual applications, so the applicability of these two class methods is not strong.Directly utilize single image mist elimination only to need single image, the required all information of mist elimination are obtained from treat the single image of mist elimination voluntarily by algorithm, are current common method.
Yet at present conventional single image defogging method capable, mostly utilize the propagation figure of atmosphere light value and reflection picture depth information to calculate the image after mist elimination, yet the method for obtaining propagation figure realizes based on helping secretly mostly, if application number is 201210011326.5, name is called the patent of invention of " a kind of single image defogging method capable and device ", and utilize to help secretly, has following defect:
Dark passage method need to carry out the computing of twice calculated minimum to each sliding window image block, and the computing of calculated minimum is because needs are according to pixels worth and carry out sorting operation all pixels in image block, therefore calculate comparatively consuming time.
Summary of the invention
Main inventive point of the present invention is that by region RGB color vector statistical nature, obtaining propagation schemes, and the method can directly be utilized single width RGB coloured image, without the external world, provides any other information; The present invention simultaneously calculates usage factor α in mist elimination image process and can directly obtain mist elimination image, without further increasing brightness of image to meet display requirement after mist elimination.
For solving the problems of the technologies described above, a kind of single image defogging method capable of the present invention, the method is by having the atmosphere light value of mist RGB coloured image and the propagation figure of reflection picture depth information to calculate the image after mist elimination, and the propagation figure in the method obtains by the following method:
Steps A, obtain field color mean vector and the L2 norm thereof for the treatment of mist elimination RGB image I;
Steps A-1, input size are m * n treats mist elimination RGB image I, corresponding 1 * 3 color vector [I of each pixel in image I
r(i, j), I
g(i, j), I
b(i, j)], wherein, i, j represents pixel coordinate, i ∈ [1, m], j ∈ [1, n], m, n are positive integer;
Steps A-2: obtain the All Ranges window Ω (i, j) meeting the following conditions in image I: classify central pixel point as with the capable j of i, build size and be (2r+1) * regional window (2r+1); Wherein, the span of i is that r+1 is to the integer between m-r; The span of j be r+1 to the integer between n-r, the radius that r is regional window;
Steps A-3: utilize following formula to obtain the image I field color mean vector E (i, j) that each regional window Ω (i, j) is corresponding
E(i, j)=[e
r(i, j), e
g(i, j), e
b(i, j)]
t, wherein
c ∈ { R, G, B};
Steps A-4: according to each E (i, j), obtain the L2 norm u (i, j) of corresponding image I field color mean vector, its expression-form: u (i, j)=|| E (i, j) ||
2;
Step B, obtain the propagation figure T of reflection picture depth information;
Step B-1, utilize following formula to calculate the initial value of propagation figure T
In formula, A is atmosphere light value, A
texpression is carried out transposition computing to A;
Step B-2, utilization guiding filtering algorithm are further optimized propagation figure initial value
obtain reflecting the propagation figure T of picture depth information.
Another inventive point of the present invention, has the following steps that can adopt of the atmosphere light value A of mist RGB coloured image to obtain:
A, set up the matrix U of a m * n, wherein, in matrix U, the capable j column element of i is the L2 norm u (i of image I field color mean vector, j), when i<r+1 or i>m-r and j<r+1 or j>n-r, u (i, j)=0;
B, choose i corresponding to greatest member in matrix U
max, j
max;
C, in image I with i
max, j
maxcentered by pixel, set up size and be (2r+1) * regional window Ω (2r+1)
max(i
max, j
max), r is regional window radius;
D, calculating Ω
max(i
max, j
max) in the L2 norm of 1 * 3 color vector corresponding to all pixels, wherein in color vector L2 norm, color vector corresponding to maximal value is atmosphere light value A.
In order directly to obtain mist elimination image, without further increasing brightness of image to meet demonstration after mist elimination
Requirement, in single image defogging method capable of the present invention, according to following formula, calculate image J after mist elimination:
In formula, t
0=0.3, a ∈ [0.6,0.9], T (i, j) is for propagating figure, and I (i, j) is for treating the former figure of mist elimination; Max (T (i, j), t
0) represent as T (i, j)>=t
0time, max (T (i, j), t
0)=T (i, j); Otherwise max (T (i, j), t
0)=t
0.
The present invention compared with prior art has following significant advantage: (1) image defogging method capable based on region RGB color vector statistical nature, can directly utilize single width RGB coloured image, and without the external world, provide any other information; (2) without carrying out a large amount of search minimum operation, improved the real-time of image mist elimination; (3) directly obtain mist elimination image, without further increasing brightness of image to meet display requirement after mist elimination.
Accompanying drawing explanation
Fig. 1 obtains All Ranges window Ω (i, the j) schematic diagram satisfying condition in image I;
Fig. 2 (a) is the original Misty Image I of embodiment; Fig. 2 (b) is for propagating the initial value of figure in embodiment
fig. 2 (c) is filtered propagation figure T for embodiment guides; Image J after Fig. 2 (d) embodiment mist elimination;
Embodiment
A kind of single image defogging method capable of the present invention, the method is by having the atmosphere light value of mist RGB coloured image and the propagation figure of reflection picture depth information to calculate the image after mist elimination, and the propagation figure in the method obtains by the following method:
Steps A, obtain field color mean vector and the L2 norm thereof for the treatment of mist elimination RGB image I;
Steps A-1, input size are m * n treats mist elimination RGB image I, corresponding 1 * 3 color vector [I of each pixel in image I
r(i, j), I
g(i, j), I
b(i, j)], wherein, i, j represents pixel coordinate, i ∈ [1, m], j ∈ [1, n], m, n are positive integer;
Steps A-2: obtain the All Ranges window Ω (i, j) meeting the following conditions in image I: classify central pixel point as with the capable j of i, build size and be (2r+1) * regional window (2r+1); Wherein, the span of i is that r+1 is to the integer between m-r; The span of j be r+1 to the integer between n-r, the radius that r is regional window;
Steps A-3: utilize following formula to obtain the image I field color mean vector E (i, j) that each regional window Ω (i, j) is corresponding
E(i, j)=[e
r(i, j), e
g(i, j), e
b(i, j)]
t, wherein
c ∈ { R, G, B};
Steps A-4: according to each E (i, j), obtain the L2 norm u (i, j) of corresponding image I field color mean vector, its expression-form: u (i, j)=|| E (i, j) ||
2;
Step B, obtain the propagation figure T of reflection picture depth information;
Step B-1, utilize following formula to calculate the initial value of propagation figure T
In formula, A is atmosphere light value, A
texpression is carried out transposition computing to A;
Step B-2, utilization guiding filtering algorithm are further optimized propagation figure initial value
obtain reflecting the propagation figure T of picture depth information; Utilize guiding filtering algorithm further to optimize propagation figure initial value
for techniques well known, specifically referring to He, K.M., Sun, J., and Tang, X.O.Guided Image Filtering, IEEE Transactions on Pattern Analysis and Machine Intelligence, 2013,35 (6): 1397-1409 repeats no more herein!
The atmosphere light value that obtains mist RGB coloured image can adopt classic method to obtain also can adopt following steps:
A, set up the matrix U of a m * n, wherein, in matrix U, the capable j column element of i is the L2 norm u (i of image I field color mean vector, j), when i<r+1 or i>m-r and j<r+1 or j>n-r, u (i, j)=0;
B, choose i corresponding to greatest member in matrix U
max, j
max;
C, in image I with i
max, j
maxcentered by pixel set up regional window Ω
max(i
max, j
max), regional window size is that (2r+1) * (2r+1), r is regional window radius;
D, calculating Ω
max(i
max, j
max) in the L2 norm of 1 * 3 color vector corresponding to all pixels, wherein in color vector L2 norm, color vector corresponding to maximal value is atmosphere light value A.
While utilizing atmosphere light value and propagation figure to calculate mist elimination image, can adopt traditional formula
realize, but the mist elimination image effect obtaining is not good, need to further carries out fade up processing to reach display effect;
Also can adopt mist elimination formula of the present invention
T wherein
0=0.3, α ∈ [0.6,0.9], T (i, j) is for propagating figure, and I (i, j) is for treating the former figure of mist elimination; Max (T (i, j), t
0) represent as T (i, j)>=t
0time, max (T (i, j), t
0)=T (i, j); Otherwise max (T (i, j), t
0)=t
0, α=0.8 is optimal effectiveness.
Embodiment
As shown in Fig. 2 (a), the colour that size is 470 * 350 is treated mist elimination image I, and its mist elimination process is specific as follows: steps A, obtain field color mean vector and the L2 norm thereof for the treatment of mist elimination RGB image I;
To be 470 * 350 treat mist elimination RGB image I, corresponding 1 * 3 color vector [I of each pixel in image I for steps A-1, input size
r(i, j), I
g(i, j), I
b(i, j)], i wherein, j represents pixel coordinate, i ∈ [Isosorbide-5-Nitrae 70], j ∈ [1,350];
Steps A-2: obtain the All Ranges window Ω (i, j) meeting the following conditions in image I: this regional window is classified central pixel point as with the capable j of i, size is (2r+1) * (2r+1); Wherein, r is regional window radius, and r=7 represents to get 7 pixels, and the span that this regional window size is 15 * 15, i is the integer between 8 to 463; The span of j is the integer between 8 to 354;
Steps A-3: utilize following formula to obtain the image I field color mean vector E (i, j) that each regional window Ω (i, j) is corresponding
E(i, j)=[e
r(i, j), e
g(i, j), e
b(i, j)]
t, wherein
c ∈ { R, G, B};
Steps A-4: according to each E (i, j), obtain the L2 norm u (i, j) of corresponding image I field color mean vector, its expression-form: u (i, j)=|| E (i, j) ||
2;
Step B, obtain the propagation figure T of reflection picture depth information;
Step B-1, utilize following formula to calculate the initial value of propagation figure T
as shown in Fig. 2 (b):
In formula, A is atmosphere light value, A
texpression is carried out transposition computing to A, and wherein, the computation process of atmosphere light value A is as follows:
(1) set up the matrix U of 470 * 350, wherein, in matrix U, the capable j column element of i is the L2 norm u (i of image I field color mean vector, j), when i<8 or i>463 and j<8 or j>354, u (i, j)=0;
(2) choose i corresponding to greatest member in matrix U
max, j
max;
(3) in image I with i
max, j
maxcentered by pixel set up regional window Ω
max(i
max, j
max), regional window size is that (2r+1) * (2r+1), r is regional window radius, r=7, and window size is 15 * 15;
(4) calculate Ω
max(i
max, j
max) in the L2 norm of color vector of all elements, wherein in color vector L2 norm, color vector corresponding to maximal value is atmosphere light value A;
Step B-2, utilization guiding filtering algorithm are further optimized propagation figure initial value
the propagation figure T that obtains reflecting picture depth information is as Fig. 2 (c);
Step C, utilize propagation figure T and atmosphere light value A to calculate image J after mist elimination, as shown in Figure 2 (d) shows:
In formula, t
0=0.3, α=0.8, A=[0.9294,0.9373,0.9333];
Single image defogging method capable of the present invention, the image defogging method capable based on region RGB color vector statistical nature, can directly utilize single width RGB coloured image, without the external world, provides any other information; Usage factor α can directly obtain mist elimination image simultaneously, without further increasing brightness of image to meet display requirement after mist elimination.
Claims (5)
1. a single image defogging method capable, the method, by having the atmosphere light value of mist RGB coloured image and the propagation figure of reflection picture depth information to calculate the image after mist elimination, is characterized in that, the propagation figure in the method obtains by the following method:
Steps A, obtain field color mean vector and the L2 norm thereof for the treatment of mist elimination RGB image I;
Steps A-1, input size are m * n treats mist elimination RGB image I, corresponding 1 * 3 color vector [I of each pixel in image I
r(i, j), I
g(i, j), I
b(i, j)], wherein, i, j represents pixel coordinate, i ∈ [1, m], j ∈ [1, n], wherein, m, n are positive integer;
Steps A-2: obtain the All Ranges window Ω (i, j) meeting the following conditions in image I: classify central pixel point as with the capable j of i, build size and be (2r+1) * regional window (2r+1); Wherein, the span of i is that r+1 is to the integer between m-r; The span of j be r+1 to the integer between n-r, r regional window radius;
Steps A-3: utilize following formula to obtain the image I field color mean vector E (i, j) that each regional window Ω (i, j) is corresponding
E(i, j)=[e
r(i, j), e
g(i, j), e
b(i, j)]
t, wherein
c ∈ { R, G, B};
Steps A-4: according to each E (i, j), obtain the L2 norm u (i, j) of corresponding image I field color mean vector, its expression-form: u (i, j)=|| E (i, j) ||
2;
Step B, obtain the propagation figure T of reflection picture depth information;
Step B-1, utilize following formula to calculate the initial value of propagation figure T
In formula, A is atmosphere light value, A
texpression is carried out transposition computing to A;
Step B-2, utilization guiding filtering algorithm are further optimized propagation figure initial value
obtain reflecting the propagation figure T of picture depth information.
2. single image defogging method capable according to claim 1, is characterized in that, has the obtaining step of atmosphere light value A of mist RGB coloured image as follows:
A, set up the matrix U of a m * n, wherein, in matrix U, the capable j column element of i is the L2 norm u (i of image I field color mean vector, j), when i<r+1 or i>m-r and j<r+1 or j>n-r, u (i, j)=0;
B, choose i corresponding to greatest member in matrix U
max, j
max;
C, in image I with i
max, j
maxcentered by pixel, set up size and be (2r+1) * regional window Ω (2r+1)
max(i
max, j
max);
D, calculating Ω
max(i
max, j
max) in the L2 norm of 1 * 3 color vector corresponding to all pixels, wherein in color vector L2 norm, 1 * 3 color vector corresponding to maximal value is atmosphere light value A.
3. single image defogging method capable according to claim 1 and 2, is characterized in that, according to following formula, calculates image J after mist elimination:
In formula, t
0=0.3, α ∈ [0.6,0.9], T (i, j) is for propagating figure, and I (i, j) is for treating the former figure of mist elimination; Max (T (i, j), t
0) represent as T (i, j)>=t
0time, max (T (i, j), t
0)=T (i, j); Otherwise max (T (i, j), t
0)=t
0.
4. single image defogging method capable according to claim 3, is characterized in that, described α=0.8.
5. single image defogging method capable according to claim 1 and 2, is characterized in that, regional window radius r=7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410153443.4A CN104008527B (en) | 2014-04-16 | 2014-04-16 | Method for defogging single image |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410153443.4A CN104008527B (en) | 2014-04-16 | 2014-04-16 | Method for defogging single image |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104008527A true CN104008527A (en) | 2014-08-27 |
CN104008527B CN104008527B (en) | 2017-02-01 |
Family
ID=51369168
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410153443.4A Expired - Fee Related CN104008527B (en) | 2014-04-16 | 2014-04-16 | Method for defogging single image |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104008527B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104599266A (en) * | 2014-12-31 | 2015-05-06 | 小米科技有限责任公司 | Detection method for fog area in image, device and terminal |
CN108093175A (en) * | 2017-12-25 | 2018-05-29 | 北京航空航天大学 | A kind of adaptive defogging method of real-time high-definition video and device |
CN108898562A (en) * | 2018-06-22 | 2018-11-27 | 大连海事大学 | A kind of mobile device image defogging method based on deep learning |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS61112285A (en) * | 1984-11-07 | 1986-05-30 | Hitachi Ltd | Conversational image emphasis system |
CN102170574A (en) * | 2011-05-23 | 2011-08-31 | 北京工业大学 | Real-time video defogging system |
CN102289791A (en) * | 2011-06-29 | 2011-12-21 | 清华大学 | Method for quickly demisting single image |
CN102609909A (en) * | 2012-01-13 | 2012-07-25 | 安科智慧城市技术(中国)有限公司 | Method and device for defogging single image |
CN103578083A (en) * | 2013-09-07 | 2014-02-12 | 西安电子科技大学 | Single image defogging method based on joint mean shift |
-
2014
- 2014-04-16 CN CN201410153443.4A patent/CN104008527B/en not_active Expired - Fee Related
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS61112285A (en) * | 1984-11-07 | 1986-05-30 | Hitachi Ltd | Conversational image emphasis system |
CN102170574A (en) * | 2011-05-23 | 2011-08-31 | 北京工业大学 | Real-time video defogging system |
CN102289791A (en) * | 2011-06-29 | 2011-12-21 | 清华大学 | Method for quickly demisting single image |
CN102609909A (en) * | 2012-01-13 | 2012-07-25 | 安科智慧城市技术(中国)有限公司 | Method and device for defogging single image |
CN103578083A (en) * | 2013-09-07 | 2014-02-12 | 西安电子科技大学 | Single image defogging method based on joint mean shift |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104599266A (en) * | 2014-12-31 | 2015-05-06 | 小米科技有限责任公司 | Detection method for fog area in image, device and terminal |
CN104599266B (en) * | 2014-12-31 | 2017-07-14 | 小米科技有限责任公司 | The detection method in fog region, device and terminal in image |
CN108093175A (en) * | 2017-12-25 | 2018-05-29 | 北京航空航天大学 | A kind of adaptive defogging method of real-time high-definition video and device |
CN108093175B (en) * | 2017-12-25 | 2018-11-13 | 北京航空航天大学 | A kind of adaptive defogging method of real-time high-definition video and device |
CN108898562A (en) * | 2018-06-22 | 2018-11-27 | 大连海事大学 | A kind of mobile device image defogging method based on deep learning |
CN108898562B (en) * | 2018-06-22 | 2022-04-12 | 大连海事大学 | Mobile equipment image defogging method based on deep learning |
Also Published As
Publication number | Publication date |
---|---|
CN104008527B (en) | 2017-02-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102063706B (en) | Rapid defogging method | |
CN105046666B (en) | A kind of method of the real-time defogging of traffic video based on dark primary priori | |
CN103761720B (en) | Image defogging method and image demister | |
CN104361312B (en) | A kind of method and apparatus that character recognition is carried out to image | |
CN104299192B (en) | A kind of single image to the fog method based on atmospheric light scattering physical model | |
CN101515326A (en) | Method for identifying and detecting fire flame in big space | |
CN103747213A (en) | Traffic monitoring video real-time defogging method based on moving targets | |
EP3598386A1 (en) | Method and apparatus for processing image | |
CN104966054B (en) | Detection method of small target in unmanned plane visible images | |
CN103700078A (en) | Defogging method for image with few backgrounds containing fog | |
CN103258332A (en) | Moving object detection method resisting illumination variation | |
CN104809709A (en) | Single-image self-adaptation defogging method based on domain transformation and weighted quadtree decomposition | |
Park et al. | Fast execution schemes for dark-channel-prior-based outdoor video dehazing | |
CN105550999A (en) | Video image enhancement processing method based on background reuse | |
CN104616258A (en) | Rapid defogging method for road image | |
CN112651459A (en) | Defense method, device, equipment and storage medium for confrontation sample of deep learning image | |
CN102523364A (en) | Document image strike-through eliminating method and system | |
CN104021527A (en) | Rain and snow removal method in image | |
CN104717400A (en) | Real-time defogging method of monitoring video | |
CN105654511A (en) | Quick detecting and tracking method for weak moving object | |
CN104008527A (en) | Method for defogging single image | |
CN110458029A (en) | Vehicle checking method and device in a kind of foggy environment | |
CN111027564A (en) | Low-illumination imaging license plate recognition method and device based on deep learning integration | |
CN117854402A (en) | Abnormal display detection method and device of display screen and terminal equipment | |
CN106846260A (en) | Video defogging method in a kind of computer |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20170201 Termination date: 20190416 |