CN109934780A - A kind of traffic surveillance videos defogging method based on dark primary priori - Google Patents
A kind of traffic surveillance videos defogging method based on dark primary priori Download PDFInfo
- Publication number
- CN109934780A CN109934780A CN201910128634.8A CN201910128634A CN109934780A CN 109934780 A CN109934780 A CN 109934780A CN 201910128634 A CN201910128634 A CN 201910128634A CN 109934780 A CN109934780 A CN 109934780A
- Authority
- CN
- China
- Prior art keywords
- image
- dark primary
- dark
- obtains
- defogging
- 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.)
- Pending
Links
Landscapes
- Image Processing (AREA)
Abstract
The invention discloses a kind of traffic surveillance videos defogging methods based on dark primary priori, comprising the following steps: data acquisition: S101 extracts the frame in video as input, obtains characteristic image;S103, luminance picture processing: the characteristic image that will acquire calculates mean value and variance of the image in grayscale image, obtains brightness image;S105, the dark primary processing of image, will acquire the dark primary that brightness image calculates image, obtains the dark primary value of image;S107 obtains fine figure.The utility model has the advantages that the present invention is by optimizing atmospheric environment light, it takes and averages to satisfactory pixel, instead of the way of the value for taking the certain point in image of script, and add restriction threshold values, avoid the excessively white phenomenon in sky areas, by the optimization experiment to parameters, the comparison of result and original method after giving optimization obtains more accurate defogging result and faster calculating speed.
Description
Technical field
The present invention relates to video image technical fields, it particularly relates to a kind of road monitoring based on dark primary priori
Video defogging method.
Background technique
There are the intensity of at least one Color Channel for each regional area of outdoor fog free images most of at present
Very low pixel.The defogging model established using this priori, we can directly estimate the concentration of mist and recovery obtains height
The mist elimination image of quality.But excessively slow, the too many floating-point operation of the calculating speed of the stingy figure link of soft picture, takes a substantial amount of time
And CyberSpace.Such as the color image of a 900*600, the time for carrying out defogging is probably 65ms, hence it is evident that is unable to reach
The standard of video defogging, it is even more impossible to meet industrial requirement of real-time.It is to choose secretly by the estimation for atmospheric environment light
Preceding 0.1% pixel of maximum brightness in primary colors corresponds in original foggy image their pixel.And it is a few to select this
The highest value of brightness is A value in pixel, that is, has chosen atmosphere of the value of the certain point in original foggy image as whole picture figure
Environment light.Sky areas is not illustrated and handled in algorithm, so color region distortion, light occurs in sky areas
Spot, transition are unnatural.Be experimentally confirmed, at present algorithm region scene big for snowfield, sky, sea etc. or target with
Color is much like in atmosphere light, and the statistical law of dark primary priori may be invalid.
For the problems in the relevant technologies, currently no effective solution has been proposed.
Summary of the invention
For the problems in the relevant technologies, the present invention proposes a kind of traffic surveillance videos defogging side based on dark primary priori
Method, optimizes the improvement to transmissivity estimating part, and the guiding filtering after being added to box filtering optimization improves efficiency of algorithm, makes
It meets real-time, optimizes the estimation of atmospheric environment light, chooses preceding 0.15% pixel of maximum brightness in image dark primary,
It averages as atmosphere light, sets the threshold values A of A0It is 200, improves the treatment effect of sky areas.
To overcome above-mentioned technical problem present in existing the relevant technologies.
The technical scheme of the present invention is realized as follows:
A kind of traffic surveillance videos defogging method based on dark primary priori, comprising the following steps:
Data acquisition: S101 extracts the frame in video as input, obtains characteristic image;
S103, luminance picture processing: the characteristic image that will acquire calculates mean value and side of the image in grayscale image
Difference obtains brightness image;
S105, the dark primary processing of image, will acquire the dark primary that brightness image calculates image, obtains image
Dark primary value;
S107 obtains fine figure, will acquire the guiding filtering fining transmission of the dark primary value addition box filtering of image,
Obtain transmissivity transmission figure;
S109 exports defogging figure;By before taking-up maximum brightness in the dark primary value for obtaining image in S105 0.15%
Pixel calculates the average value of pixel as A, adds limitation parameter A to global atmosphere light0, threshold values is set, output is obtained and goes
Mist figure.
Further, in S103 described in step, the characteristic image that will acquire carries out greyscale transformation in advance, obtains gray scale
Figure.
Further, in the dark primary processing of S105 image described in step, window size 15*15, input picture J's is dark
Primary colors JdarkAre as follows:Wherein;
Jdark(x) the dark brightness for being pixel x, subscriptcFor one in tri- channels RGB, Jc(y) exist for J (y)
Single channel brightness on the c of channel, Ω (x) is a patch domain centered on pixel x, and y belongs in the patch domain
Point group.
Further, S107 described in step is obtained in fine figure, the time complexity of the guiding filtering fining transmission
It is O (N), is calculated by following formula: qi=akIi+bk,Wherein;
I is guidance figure, and q is the transmissivity after optimization, and ω k is the window using k as filter center, is defined as r, r's
Size becomes according to the variation of window size, and in k between navigational figure I and original image q, linear coefficient ak and bk are in ω k
Constant.
Further, S109 described in step is exported in defogging figure, threshold values A0=200, and calculated by following formula: I (x)
=J (x) t (x)+A (1-t (x)).
Beneficial effects of the present invention:
1, the present invention is by the single image defogging algorithm based on dark primary priori, under the premise of guaranteeing defog effect,
By the guiding filtering after addition box filtering optimization, instead of the soft picture FIG pull handle of script, simplify algorithm complexity,
Improve processing speed.
2, the present invention is taken and is averaged to satisfactory pixel by optimizing to atmospheric environment light, instead of
The way of the value for taking the certain point in image of script, and restriction threshold values is added, the excessively white phenomenon in sky areas is avoided, is led to
The optimization experiment to parameters is crossed, the comparison of result and original method after giving optimization obtains more accurate defogging
As a result with faster calculating speed.
Detailed description of the invention
It in order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, below will be to institute in embodiment
Attached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations of the invention
Example, for those of ordinary skill in the art, without creative efforts, can also obtain according to these attached drawings
Obtain other attached drawings.
Fig. 1 is a kind of process of traffic surveillance videos defogging method based on dark primary priori according to an embodiment of the present invention
Schematic diagram;
Fig. 2 is a kind of process of traffic surveillance videos defogging method based on dark primary priori according to an embodiment of the present invention
Judge schematic diagram;
Fig. 3 is a kind of function of traffic surveillance videos defogging method based on dark primary priori according to an embodiment of the present invention
Curve graph.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, those of ordinary skill in the art's every other embodiment obtained belong to what the present invention protected
Range.
According to an embodiment of the invention, providing a kind of traffic surveillance videos defogging method based on dark primary priori.
As shown in Figure 1-3, the traffic surveillance videos defogging method according to an embodiment of the present invention based on dark primary priori, packet
Include following steps:
Data acquisition: S101 extracts the frame in video as input, obtains characteristic image;
S103, luminance picture processing: the characteristic image that will acquire calculates mean value and side of the image in grayscale image
Difference obtains brightness image;
S105, the dark primary processing of image, will acquire the dark primary that brightness image calculates image, obtains image
Dark primary value;
S107 obtains fine figure, will acquire the guiding filtering fining transmission of the dark primary value addition box filtering of image,
Obtain transmissivity transmission figure;
S109 exports defogging figure;By before taking-up maximum brightness in the dark primary value for obtaining image in S105 0.15%
Pixel calculates the average value of pixel as A, adds limitation parameter A to global atmosphere light0, threshold values is set, output is obtained and goes
Mist figure.
With the aid of the technical scheme, pass through
In addition, in one embodiment, in S103 described in step, the characteristic image that will acquire carries out gray scale change in advance
It changes, obtains grayscale image.
In addition, in one embodiment, in the dark primary processing of S105 image described in step, window size 15*15 is defeated
Enter the dark primary J of image JdarkAre as follows:Wherein;
Jdark(x) the dark brightness for being pixel x, subscriptcFor one in tri- channels RGB, Jc(y) exist for J (y)
Single channel brightness on the c of channel, Ω (x) is a patch domain centered on pixel x, and y belongs in the patch domain
Point group.
In addition, in one embodiment, S107 described in step is obtained in fine figure, the guiding filtering fining transmission
Time complexity is O (N), is calculated by following formula: qi=akIi+bk,Wherein;
I is guidance figure, and q is the transmissivity after optimization, and ω k is the window using k as filter center, is defined as r, r's
Size becomes according to the variation of window size, and in k between navigational figure I and original image q, linear coefficient ak and bk are in ω k
Constant.
In addition, in one embodiment, S109 described in step is exported in defogging figure, threshold values A0=200, and by following public
Formula calculates: I (x)=J (x) t (x)+A (1-t (x)).
In addition, in one embodiment, as shown in figure 3, carrying out ash in advance for the above-mentioned characteristic image that will acquire
For degree transformation, by calculating mean value and variance of the picture in grayscale image, when there are brightness exception, mean value can deviate mean value
Point, if average point is 128, variance also can be less than normal;If it is normal brightness, then it is judged as brightness image, if low-light level
Figure, then carry out greyscale transformation operation.Greyscale transformation selects gamma transformation, the formula of gamma transformation are as follows: S=cr γ;Wherein c and γ
For normal number, wherein;
As γ < 1, the value of γ is smaller, is more obvious to the extension of image low ash angle value, corrects too dark brightness.It can be by gray scale
It is worth lesser low gray level areas and expands to wider gray scale interval, and by wider high gray scale area compresses to lesser gray area
Between.The effect converted in this way, which is exactly that low gray level areas is spread, to be come, and is brightened;And wide high gray areas, it is compressed relatively narrow
Section also brightens, therefore transformed overall effect is to brighten;
As γ > 1, the extension of the high gray value part of image is more obvious, amendment brightness is excessively bright.It can will be less than some gray scale
The gray areas of value K is compressed to lesser gray scale interval, and the gray areas that will be above K expands to larger gray scale interval.The L is enabled to be
The maximum value of gray scale, k=3/4L, then just there is the gray areas of [0.3/4L] [0.3/4L] to be mapped to as [0.1/8L] [0.1/
8L] output;And by the high gray scale area maps in this part [3/4L] [3/4L] to the section [1/8L] [1/8L].The knot converted in this way
Fruit is exactly to be compressed to lower gray scale interval lower than the gray areas of K, and the gray value of brighter high gray areas is extended to
Biggish gray scale interval becomes less bright, and whole effect is exactly that the contrast of image increases, but due to luminance area
It is extended, it is also just less bright.
In addition, in one embodiment, for the dark primary J of above-mentioned input picture JdarkFor, calculate a pixel
Dark primary be the process being minimized twice.It is for the first time minimum value of the y point in RGB triple channel, is with pixel for the second time
The brightness of the smallest y is compared in a patch domain centered on point x.
In addition, in one embodiment, being obtained in fine figure for S107 described in above-mentioned steps, the guiding filtering is fine
The time complexity for changing transmission is for O (N), because of q=a I, which be can guarantee if q has edge, and I centainly has side
Edge.Defining pk first is the pixel average for filtering original image, ∑kIt is the window ω of navigational figure IkA 3*3 association side
Poor matrix, | ω | the number of pixel in window ω is represented, ε is an adjusting parameter for preventing ak value excessive, and ε value is 0.001,
U is the unit matrix of a 3*3, ukIt is the average value of color matrices in window ω, can calculates as follows:
Wherein, a is observedkPartial calculating, navigational figure I and filtering image piIt is multiplied, to the result I after multiplicationipiMake box
Son filtering.UkAnd pkRespectively I and p is in window ωkIn mean value, box filtering furthermore is carried out to I, p respectively, then by result phase
Multiply, bkEqually with box filtering improve arithmetic speed, finally obtain ak and bk two open intermediate conveyor figure, postfilter
Output image qiFormula is as follows
Wherein, a is respectively obtainedkAnd bk, and carry out box filtering respectively and two new transmission picture a can be obtainediAnd bi,
In addition a and b is the mean value in window ω k.By the filtered a of boxiAfter being multiplied with navigational figure I again with biIt is added, obtains
The transmissivity transmission figure q of final finingi。
The guiding filtering for adding box filtering optimization needs to be connected with former algorithm, into the input picture p of wave filter
It is exactly coarse transmissivity transmission figure t (x) of the foregoing description, observation McGarney formula obtains:
Cause J (x) value bigger than normal when t (x) value is too small, to keep the image being reconditioned integrally excessively white, is arranged in former algorithm
There is limit value t0=1, takes the maximum value of t (x), t0, max (t (x), t0).So selected t=max (t (x), t0) is guidance filter
The input of wave.After calculating above, image q is namely based on the transmittance figure after guiding filtering optimization.
In conclusion by means of above-mentioned technical proposal of the invention, it can be achieved that following effect:
1, the present invention is by the single image defogging algorithm based on dark primary priori, under the premise of guaranteeing defog effect,
By the guiding filtering after addition box filtering optimization, instead of the soft picture FIG pull handle of script, simplify algorithm complexity,
Improve processing speed.
2, the present invention is taken and is averaged to satisfactory pixel by optimizing to atmospheric environment light, instead of
The way of the value for taking the certain point in image of script, and restriction threshold values is added, the excessively white phenomenon in sky areas is avoided, is led to
The optimization experiment to parameters is crossed, the comparison of result and original method after giving optimization obtains more accurate defogging
As a result with faster calculating speed.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention
Within mind and principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.
Claims (5)
1. a kind of traffic surveillance videos defogging method based on dark primary priori, which comprises the following steps:
Data acquisition: S101 extracts the frame in video as input, obtains characteristic image;
S103, luminance picture processing: the characteristic image that will acquire calculates mean value and variance of the image in grayscale image, obtains
Take brightness image;
S105, the dark primary processing of image, will acquire the dark primary that brightness image calculates image, obtains the dark original of image
Color value;
S107 obtains fine figure, will acquire the guiding filtering fining transmission of the dark primary value addition box filtering of image, obtains
Transmissivity transmission figure;
S109 exports defogging figure;By before taking-up maximum brightness in the dark primary value for obtaining image in S105 0.15% pixel
Point calculates the average value of pixel as A, adds limitation parameter A to global atmosphere light0, threshold values is set, output defogging is obtained
Figure.
2. the traffic surveillance videos defogging method according to claim 1 based on dark primary priori, which is characterized in that step
In the S103, the characteristic image that will acquire carries out greyscale transformation in advance, obtains grayscale image.
3. the traffic surveillance videos defogging method according to claim 1 based on dark primary priori, which is characterized in that step
In the dark primary processing of the S105 image, the dark primary J of window size 15*15, input picture JdarkAre as follows:Wherein;
Jdark(x) the dark brightness for being pixel x, subscriptcFor one in tri- channels RGB, JcIt (y) is J (y) in channel c
On single channel brightness, Ω (x) is a patch domain centered on pixel x, and y is the point group belonged in the patch domain.
4. the traffic surveillance videos defogging method according to claim 1 based on dark primary priori, which is characterized in that step
The S107 is obtained in fine figure, and the time complexity of the guiding filtering fining transmission is O (N), passes through following formula meter
It calculates:Wherein;
I is guidance figure, and q is the transmissivity after optimization, and ω k is the window using k as filter center, is defined as r, the size of r
Become according to the variation of window size, in k between navigational figure I and original image q, linear coefficient ak and bk are constant in ω k.
5. the traffic surveillance videos defogging method according to claim 1 based on dark primary priori, which is characterized in that step
In the S109 output defogging figure, threshold values A0=200, and calculated by following formula: I (x)=J (x) t (x)+A (1-t (x)).
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910128634.8A CN109934780A (en) | 2019-02-21 | 2019-02-21 | A kind of traffic surveillance videos defogging method based on dark primary priori |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910128634.8A CN109934780A (en) | 2019-02-21 | 2019-02-21 | A kind of traffic surveillance videos defogging method based on dark primary priori |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109934780A true CN109934780A (en) | 2019-06-25 |
Family
ID=66985679
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910128634.8A Pending CN109934780A (en) | 2019-02-21 | 2019-02-21 | A kind of traffic surveillance videos defogging method based on dark primary priori |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109934780A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112874438A (en) * | 2021-03-01 | 2021-06-01 | 上海应用技术大学 | Real-time defogging display windshield device |
CN114324140A (en) * | 2021-12-15 | 2022-04-12 | 东风汽车集团股份有限公司 | Road guardrail damage monitoring method, device and equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106251301A (en) * | 2016-07-26 | 2016-12-21 | 北京工业大学 | A kind of single image defogging method based on dark primary priori |
WO2017175231A1 (en) * | 2016-04-07 | 2017-10-12 | Carmel Haifa University Economic Corporation Ltd. | Image dehazing and restoration |
CN107451966A (en) * | 2017-07-25 | 2017-12-08 | 四川大学 | A kind of real-time video defogging method realized using gray-scale map guiding filtering |
CN107680054A (en) * | 2017-09-26 | 2018-02-09 | 长春理工大学 | Multisource image anastomosing method under haze environment |
CN109165676A (en) * | 2018-07-27 | 2019-01-08 | 北京以萨技术股份有限公司 | A kind of round-the-clock highway fog grade monitoring method based on video analysis |
-
2019
- 2019-02-21 CN CN201910128634.8A patent/CN109934780A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2017175231A1 (en) * | 2016-04-07 | 2017-10-12 | Carmel Haifa University Economic Corporation Ltd. | Image dehazing and restoration |
CN106251301A (en) * | 2016-07-26 | 2016-12-21 | 北京工业大学 | A kind of single image defogging method based on dark primary priori |
CN107451966A (en) * | 2017-07-25 | 2017-12-08 | 四川大学 | A kind of real-time video defogging method realized using gray-scale map guiding filtering |
CN107680054A (en) * | 2017-09-26 | 2018-02-09 | 长春理工大学 | Multisource image anastomosing method under haze environment |
CN109165676A (en) * | 2018-07-27 | 2019-01-08 | 北京以萨技术股份有限公司 | A kind of round-the-clock highway fog grade monitoring method based on video analysis |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112874438A (en) * | 2021-03-01 | 2021-06-01 | 上海应用技术大学 | Real-time defogging display windshield device |
CN114324140A (en) * | 2021-12-15 | 2022-04-12 | 东风汽车集团股份有限公司 | Road guardrail damage monitoring method, device and equipment |
CN114324140B (en) * | 2021-12-15 | 2024-04-09 | 东风汽车集团股份有限公司 | Road guardrail damage monitoring method, device and equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110148095B (en) | Underwater image enhancement method and enhancement device | |
CN102231206B (en) | Colorized night vision image brightness enhancement method applicable to automotive assisted driving system | |
CN106780368B (en) | Underwater image enhancement method based on foreground model | |
CN108734670B (en) | Method for restoring single night weak-illumination haze image | |
CN106886985B (en) | A kind of adaptive enhancement method of low-illumination image reducing colour cast | |
CN103593830B (en) | A kind of low illumination level video image enhancement | |
CN108596853A (en) | Underwater picture Enhancement Method based on bias light statistical model and transmission map optimization | |
CN108765342A (en) | A kind of underwater image restoration method based on improvement dark | |
CN109087254B (en) | Unmanned aerial vehicle aerial image haze sky and white area self-adaptive processing method | |
KR100512976B1 (en) | Black/White streching system capable of improving contrast and a method of Black/White streching thereof | |
Zheng et al. | Infrared traffic image enhancement algorithm based on dark channel prior and gamma correction | |
CN104867121B (en) | Image Quick demisting method based on dark primary priori and Retinex theories | |
CN111476732B (en) | Image fusion and denoising method and system | |
CN103455979A (en) | Low illumination level video image enhancement method | |
CN107527325B (en) | Monocular underwater vision enhancement method based on dark channel priority | |
CN107705258B (en) | Underwater image enhancement method based on three-primary-color combined pre-equalization and deblurring | |
CN107533756A (en) | Image processing apparatus, camera device, image processing method and storage image processing unit image processing program storage medium | |
CN110570360A (en) | Retinex-based robust and comprehensive low-quality illumination image enhancement method | |
WO2024060576A1 (en) | Image dehazing method based on dark channel prior | |
US20150332437A1 (en) | Image processing device, image processing method, and control program | |
CN109934780A (en) | A kind of traffic surveillance videos defogging method based on dark primary priori | |
CN109118450A (en) | A kind of low-quality images Enhancement Method under the conditions of dust and sand weather | |
CN110047052A (en) | A kind of strong Xanthophyll cycle night vision Enhancement Method based on FPGA | |
Jiang et al. | Multiple templates auto exposure control based on luminance histogram for onboard camera | |
CN108765310B (en) | Adaptive transmissivity restoration image defogging method based on multi-scale window |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190625 |