CN106846260A - Video defogging method in a kind of computer - Google Patents

Video defogging method in a kind of computer Download PDF

Info

Publication number
CN106846260A
CN106846260A CN201611189605.5A CN201611189605A CN106846260A CN 106846260 A CN106846260 A CN 106846260A CN 201611189605 A CN201611189605 A CN 201611189605A CN 106846260 A CN106846260 A CN 106846260A
Authority
CN
China
Prior art keywords
frame
video
sigma
haze
channel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201611189605.5A
Other languages
Chinese (zh)
Other versions
CN106846260B (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.)
Changshu Institute of Technology
Original Assignee
Changshu Institute of Technology
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 Changshu Institute of Technology filed Critical Changshu Institute of Technology
Priority to CN201611189605.5A priority Critical patent/CN106846260B/en
Publication of CN106846260A publication Critical patent/CN106846260A/en
Application granted granted Critical
Publication of CN106846260B publication Critical patent/CN106846260B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/73Deblurring; Sharpening
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30232Surveillance

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Of Color Television Signals (AREA)

Abstract

The invention discloses video defogging method in a kind of computer, its step includes:Step 1, the edge amplitude Density Estimator comentropy based on consecutive frame difference extracts key frame of video;Step 2, representative pixel points are extracted based on key frame marginal information amplitude information entropy;Step 3, based on Cross Correlation Matching algorithm and generalized procrustes analysis registering key frame of video pixel-by-pixel;Step 4, the spreading rate based on color Estimation of Mean atmosphere illumination intensity and based on two-dimensional nucleus regression optimization key frame of video;Step 5, the spreading rate of video non-key frame is estimated based on Catmull-Rom cubic splines;Step 6, according to atmospherical scattering model, using the model parameter estimated, the haze sequence of video images after output recovery.

Description

Video defogging method in computer
Technical Field
The invention belongs to the technical field of computer image processing, and particularly relates to a video defogging method in a computer.
Background
The fields of security systems, urban traffic, military technology, criminal investigation, navigation, meteorology, astronomy and the like often need to acquire haze video image sequences from outdoor monitoring. The poor weather such as haze makes the image color that video monitoring was caught dim, the contrast ratio becomes low, and the serious degradation of image quality has directly influenced the visual effect of image, seriously influences their application. The influence of haze weather is removed from the video, and the restoration of the color and the contrast of the image has important research significance and practical significance.
There are several defogging methods for videos: on the basis of a depth of field distribution model, the Wangxiaitong of the navy Dalian naval vessel academy acquires the reference depth of field and the sky brightness of an image by using a dark primary color idea, and then realizes the defogging treatment of the video at sea by using a relative depth of field method. The Wangxiaitong also combines the traditional two-dimensional empirical mode decomposition to provide a construction method of a high-frequency auxiliary signal, the high-frequency auxiliary signal is added into an original video image signal, the obtained auxiliary signal of the intrinsic mode component is decomposed, and the frequency component of the original signal, which is closest to the auxiliary signal, is obtained, so that the problem of the defogging of the maritime video with deficient local or global extreme points is solved. Hautiere et al have proposed video defogging studies based on-board camera systems for vehicles whose visible light range is very sensitive to the atmospheric environment. Lilongli provides a defogging algorithm for a lossy compressed video image, and the obvious characteristic that the image can be divided into high-frequency sub-bands and low-frequency sub-bands through wavelet transformation is utilized to help find out the irregular regions, so that the transmissivity of the irregular regions is processed, and the phenomenon of uneven color is eliminated after the image is restored through a dark primary color prior algorithm.
Existing video defogging methods can be divided into two categories: the basic idea of the first category of methods is to calculate the propagation rate, which is then used to perform a defogging process on each frame of the video. The requirement of using a reference image is too strict, so that the method is difficult to realize in practical application. The second method is to separate the background image and the foreground image, to be clarified by the relative defogging algorithm, and to fuse the two results to obtain the final defogged video. The foreground detection method comprises the following steps: (1) background subtraction is a method of constructing a background model image of a scene and detecting a moving area according to the difference between the current image and the background model image, and the method is mainly applied to the detection of the movement of a target under the condition that a camera is fixed. However, information detected by the background subtraction method is generally incomplete, and a ghost phenomenon is easily generated. (2) The time difference method is used for extracting a motion region by calculating two or three adjacent frames of images in a continuous haze video image sequence by adopting a pixel difference method and thresholding the result. However, it is difficult to extract all the related feature pixels, and voids are easily generated inside the motion entity. (3) The optical flow method is based on the basic principle that each pixel in an image is endowed with a velocity vector to form an image motion field, the projection relation of the velocity vector and the motion field can be used for calculating the one-to-one corresponding relation between points on the image and real objects at a certain moment of motion, and the image is dynamically analyzed according to the change characteristics of the vector.
Most of the existing video defogging methods mainly focus on processing each frame image of the video independently, and do not utilize redundant information among each frame of the video to reduce the calculation amount, so that the problem of low speed exists. In addition, in the video defogging process, the space-time consistency of the video is not considered, and the continuity and the smoothness of video frames and frames cannot be maintained, so that the problem of flicker is caused.
Disclosure of Invention
In order to solve the technical problem, the invention provides a video defogging method based on two-dimensional kernel regression and a Catmull-Rom cubic spline in a computer. The method is characterized in that the video defogging method is realized by utilizing the technologies of edge amplitude kernel density estimation, information entropy, generalized alignment algorithm, two-dimensional kernel regression, Catmull-Rom and the like. The method comprises the following specific steps:
step 1, inputting a haze video image sequence, and extracting video key frames based on an information entropy estimated by edge information amplitude kernel density of adjacent frame difference;
step 2, extracting representative pixel points of the key frame based on the edge amplitude information entropy;
step 3, registering video key frames pixel by pixel based on a cross-correlation matching algorithm and a generalized alignment algorithm;
step 4, estimating the atmospheric illumination intensity and the two-dimensional kernel regression optimization video key frame propagation rate based on the color mean value;
step 5, estimating the transmission rate of the non-key frames of the video based on a Catmull-Rom cubic spline;
and 6, outputting the recovered haze video image sequence according to the atmospheric scattering model.
The step 1 of the invention comprises the following steps:
step 1-1, inputting a haze video image sequence, and calculating the difference of brightness channels of two adjacent frames of the haze video image sequence: suppose that the haze video image sequence has N frames, respectively f1,f2,…,fN,fNExpressing the sequence of the N frame of haze video images, converting each frame of image from an RGB color space into a YUV (Y expresses brightness and chroma), and calculating the absolute value of the difference of brightness Y channels of the adjacent two frames of YUV spaces by the following formula:
wherein,respectively representing the luminance Y channel of the N-1 th frame and the luminance Y channel of the N-th frame, dN-1Representing the absolute value of the difference between the luminance Y channel of the N-1 th frame and the luminance Y channel of the N-th frame, the luminance Y channel of all N frames having a size M1×M2Wherein M is1And M2Respectively counting the number of rows and columns of the video frame;
step 1-2, calculating the edge amplitude information of the absolute value of the differences between all luminance Y channels, drExpressing the absolute value of the difference between the r-th luminance Y channel, r is more than or equal to 1 and less than or equal to N-1, and calculating d by the following formularEdge amplitude information e of the ith row and jth column of pixelsr(i,j):
Wherein i is more than or equal to 1 and less than or equal to M1,1≤j≤M2Representing the horizontal direction edge of the pixel of the ith row and the jth column, is calculated by the following formula
The vertical direction edge of the pixel of the ith row and the jth column is expressed by the following formula
Step 1-3, calculating drKernel density function of edge information amplitude of (1): for any edge amplitude e, the kernel density function p (e) is:
wherein,gaussian kernel function of variable u being a one-dimensional kernel functionThe smoothing parameter s is calculated by the following formula:
where σ represents the set of edge amplitudes er={er(1,1),er(1,2),…,er(M1,M2) Standard deviation of, edge magnitude bins are calculated according to step 1-2, er(M1,M2) Denotes the M th1Line M2Edge magnitude of the column.
Step 1-4, extracting a key frame of the haze video image sequence based on the kernel density function information entropy of the edge information amplitude: at the edge amplitude set erIs sampled n in equal steps between the minimum and maximum values of1(invention n)1100) data, labeled respectively:
c1=min(er),c2=c1+Δ,c3=c1+2Δ,…,cn=c1+(n1-1)Δ,
wherein the step lengthcnDenotes the nth data, n1The kernel density function corresponding to each data is respectively Denotes cnCorresponding kernel density function, calculating d by the following formularInformation entropy H ofr
If d isrIs greater than a threshold value H0,H0If the value is 0.1, the r frame f in the haze video image sequencerAre key frames.
The step 2 of the invention comprises:
let the r frame f in the haze video image sequencerFor key frames, for edge amplitude set { e }r(1,1),er(1,2),…,er(M1,M2) Sorting the elements of the first n according to descending order2With greater edge amplitude corresponding to positionThe pixel points of (2) are taken as representative pixel points, whereinRespectively representing the edge amplitude value in the r-th frame as the n-th frame2The abscissa and ordinate of a large pixel point.
The step 3 of the invention comprises:
two adjacent key frames in the haze video image sequence are respectively set asAndr1,r2respectively represent the serial numbers of adjacent key frame videos, and r is more than or equal to 11≤r2≤N,Andthe coordinates of the representative pixel points are respectivelyAndusing a cross-correlation matching algorithm, respectivelyAndselecting a window by taking the representative pixel point as the center,as a reference frame, the frame is,as a frame to be registered, with a reference frameEach representative pixel point is taken as a reference point, and in a frame to be registeredAnd searching a window with the maximum correlation coefficient as a matching point. Wherein the correlation coefficient is calculated as follows:
suppose thatThe center coordinate isOf the representative pixel point of (1) is composed of all the luminances in the windowThe vector is Y1The center coordinate isThe vector formed by all the luminances in the representative pixel point window is Y2Then Y is1And Y2The correlation coefficient of (d) defines:
whereinAndrespectively represent vector Y1Mean sum vector Y of2Is measured.
And selecting a representative pixel point pair with a corresponding relation according to a cross-correlation matching algorithm, and calculating translation, rotation and scaling transformation parameters of a reference frame and a frame to be registered by using a generalized alignment algorithm to realize pixel-by-pixel registration between two key frames.
Step 4 of the invention comprises the following steps:
step 4-1, establishing an atmospheric scattering illumination model of the video key frame: the key frame atmosphere scattering illumination model of the haze video image sequence is as follows:
Ic(p)=t(p)Jc(p)+(1-t(p))Ac
wherein, Jc(p) and Ic(p) respectively representing the c channel value of the haze-free video key frame pixel point p and the c channel value of the haze video key frame pixel point p, c ∈ { R, G, B }, R, G and B respectively representing three colors of red, green and blue, and t (p) ∈ [0,1]Representing the atmospheric light transmittance, A, at a pixel point pcRepresenting the atmospheric illumination intensity of the c channel;
step 4-2, estimating the atmospheric illumination intensity of the video key frame based on the color mean vector: the magnitude of the atmospheric illumination intensity is set to be a constant 240, and the average value is normalized by the red, green and blue color channels of the key frameAs the direction of the intensity of the atmospheric illumination, whereinRespectively representing the red channel mean value, the green channel mean value and the blue channel mean value of the key frame, and then the estimated values of the atmospheric illumination intensity of the red, green and blue channels are:
wherein A isR、AG、ABRespectively representing an estimated value of the atmospheric illumination intensity of the red channel, an estimated value of the atmospheric illumination intensity of the green channel and an estimated value of the atmospheric illumination intensity of the blue channel;
4-3, optimizing the propagation rate based on two-dimensional kernel regression: preliminarily estimating the atmospheric illumination propagation rate t (p) of a pixel point p according to an optimal contrast method proposed by Jin-Han Kim:
and (3) optimizing the propagation rate by adopting a two-dimensional kernel regression method:
assuming that the propagation rate estimated value of the ith row and the jth column pixel point is ti,jThe propagation rate t under the local window with radius w at the point is calculated by the following formulai,jTwo-dimensional kernel regression function of
WhereinComputing a two-dimensional kernel regression function for a two-dimensional Gaussian kernel functionIn the formula (2), the denominator part is calculated as:
the molecular fraction was calculated as:
the step 5 of the invention comprises:
for two adjacent key frames in haze video image sequenceAndis provided withThe previous key frame of Next key frame ofIs composed ofRegistering the 4 neighboring key framesAndestimating and optimizingAndpropagation rate ofEstimation of position based on Catmull-Rom cubic splineAndnon-key frames in betweenThe propagation rate of the corresponding pixel inComprises the following steps:
wherein r is1<k<r2-r1K is an integer, and the parameter x represents two key framesAndthe k-th non-key frame in between,
the step 6 of the invention comprises: and recovering and outputting the haze video image sequence according to the following formula:
has the advantages that: the invention has the advantages that the video defogging method based on the two-dimensional kernel regression and the Catmull-Rom cubic spline is provided, the video key frames are extracted based on the edge amplitude kernel density information entropy of the difference of adjacent frames, the low gray contrast of the haze video image sequence can be overcome, and the key frames in the haze video image sequence can be extracted quickly and accurately. The atmospheric illumination intensity estimation method based on the color mean value can better reflect the illumination effect. The video key frame propagation rate optimization based on the two-dimensional kernel regression avoids the problem of incoherent recovered images caused by abrupt change of the propagation rate. The propagation rate estimation method based on the Catmull-Rom cubic spline for the non-key frames of the video avoids the problems that the propagation rate needs to be estimated again every frame and the video is in a flash state after being recovered. The innovation points of the invention comprise:
(1) the method provides the entropy extraction of the video key frames based on the edge amplitude kernel density information of the difference of adjacent frames. The gray contrast of the haze image is low, the edge information can well reflect the content transformation of the haze video image sequence, and the key frames in the haze video image sequence can be extracted quickly and accurately.
(2) And the atmospheric illumination intensity estimation based on the color mean value and the video key frame propagation rate optimization based on two-dimensional kernel regression are provided. The direction of atmospheric illumination in the haze image is important, and a scalar is adopted in a common defogging method, so that the direction in which the illumination cannot be emitted is reflected in the recovered image. The invention provides that the illumination effect can be better embodied by taking the average value of different color channels as the direction of the atmospheric illumination intensity. Two-dimensional kernel regression optimization is adopted for the propagation rate of the video key frame, so that the problem of incoherent recovery images caused by abrupt change of the propagation rate is avoided.
(3) Video non-key frame propagation rate estimation based on Catmull-Rom cubic spline is provided. The propagation rate of the non-key frame is estimated by using the estimated propagation rate of the key frame, so that the problems that the propagation rate needs to be estimated again every frame and the flash exists after the video is recovered are solved.
Drawings
The foregoing and other advantages of the invention will become more apparent from the following detailed description of the invention when taken in conjunction with the accompanying drawings.
FIG. 1 is a flow chart of the present invention.
Detailed Description
The method comprises the steps of extracting key frames of haze videos, extracting representative pixel points in the key frames, matching the key frames pixel by pixel, estimating atmospheric illumination intensity, optimizing key frame propagation rate, estimating non-key frame propagation rate and the like, and achieves defogging of the haze images of the videos rapidly, wherein the specific working flow is shown in fig. 1.
Step 1, extracting video key frames based on information entropy estimated by edge information amplitude kernel density of adjacent frame difference;
(1-1) calculating the difference between the luminance channels of two adjacent frames. Suppose that the sequence of haze video images collected from monitoring has N frames, respectively f1,f2,…,fNEach frame of image is converted from RGB color space to YUV space. Calculating the absolute value of the difference of the luminance Y channels of the YUV space of the difference between two adjacent frames:
wherein Respectively representing the luminance Y channels of the 1 st, 2 nd, 3 rd 3 … th, N-1 th, N frames, with the size M1×M2
(1-2) calculating the absolute value d of the difference between luminance Y channels1,d2,…,dN-1The edge information amplitude of (1).
drR is more than or equal to 1 and less than or equal to N-1, and i is more than or equal to 1 and less than or equal to M1) And j is not less than 1 and not more than M2) Edge information amplitude of position:
wherein,the edge in the horizontal direction is shown,
the edge in the vertical direction is shown,
(1-3) calculating the absolute value d of the difference between luminance Y channelsr(1. ltoreq. r. ltoreq.N-1) kernel density function of edge amplitudes. For any one edgeAmplitude e, whose kernel density function is:
whereinFor one-dimensional kernel functions, the invention uses Gaussian kernel functionsThe calculation formula of the smoothing parameter s is as follows:
where σ represents the set of edge amplitudes er={er(1,1),er(1,2),…,er(M1,M2) Standard deviation of.
(1-4) extracting key frames based on the information entropy of the edge amplitude kernel density function:
at the edge amplitude set erIs sampled n in equal steps between the minimum and maximum values of1Data, labeled respectively as:
c1=min(er),c2=c1+Δ,c3=c1+2Δ,…,cn=c1+(n1-1)Δ (7)
wherein the step sizeTheir corresponding kernel density functions are respectivelyThen dr(r is more than or equal to 1 and less than or equal to N-1) the information entropy is as follows:
if d isr(r is more than or equal to 1 and less than or equal to N-1) information entropy is more than threshold value H0(the value of the invention is 0.1), the r frame f in the haze video image sequencerAre key frames.
Step 2, extracting representative pixel points of the key frame based on the edge amplitude information entropy;
let the r frame f in the haze video image sequencerFor key frames, for edge amplitude set { e }r(1,1),er(1,2),…,er(M1,M2) Sorting the elements of the first n according to descending order2Of corresponding position of edge amplitudeThe pixel points of (2) are taken as representative pixel points.
Step 3, registering video key frames pixel by pixel based on a cross-correlation matching algorithm and a generalized alignment algorithm;
two adjacent key frames in the haze video image sequence are respectively set asAnd(r1,r2respectively representing the sequence numbers of the videos), and their representative pixel points are respectivelyAndusing a cross-correlation matching algorithm, respectively(reference frame) andand (3) selecting a window by taking the representative pixel point of the frame to be registered as the center, and searching the window with the maximum correlation coefficient in the frame to be registered as a matching point by taking each representative pixel point of the reference frame as a reference point. And selecting a representative pixel point pair with a corresponding relation according to a cross-correlation matching algorithm, and calculating translation, rotation and scaling transformation parameters of a reference frame and a frame to be registered by using a generalized alignment algorithm to realize pixel-by-pixel registration between two key frames.
Step 4, estimating the atmospheric illumination intensity based on the color mean value and optimizing the video key frame propagation rate based on two-dimensional kernel regression;
(4-1) establishing an atmospheric scattering illumination model of the video key frame;
the key frame atmosphere scattering illumination model of the haze video image sequence is as follows:
Ic(p)=t(p)Jc(p)+(1-t(p))Ac(9)
wherein Jc(p) and Ic(p) c channel values of pixel points p of the original video key frame and the observed video key frame are respectively represented, c ∈ { R, G, B } represents three colors of red, green and blue, t (p) ∈ [0,1]Representing the atmospheric light transmittance, A, at a pixel point pcRepresents the atmospheric illumination intensity of the c ∈ { R, G, B } channel.
(4-2) estimating atmospheric illumination intensity of the video key frame based on the color mean vector;
the magnitude of the atmospheric illumination intensity is set at a constant 240. Average value normalized by three color channels of red, green and blue of key frameAs the direction of the intensity of the atmospheric illumination, whereinThree of red, green and blue representing key framesIndividual color channel means. Then the estimated values of the atmospheric illumination intensities of the red, green and blue channels are:
(4-3) two-dimensional kernel regression-based propagation rate optimization:
initially estimating the propagation rate of the pixel point p based on the optimal contrast method proposed by Jin-Han Kim
In this method, the propagation rate between different targets is abrupt, and the blocking effect exists. The depth distance between adjacent pixels in the video keyframe is gradual, and the propagation rate should also be gradual. Therefore, the invention provides a two-dimensional kernel regression method for optimizing the coarse estimation of the propagation rate of the formula (11);
assuming that the propagation rate estimated value of the pixel point of the ith row and the jth column is ti,jThen the propagation rate t is at the local window with radius w at that pointi,jThe two-dimensional kernel regression smoothing of (a) is:
whereinIs a two-dimensional gaussian kernel function. The denominator part is calculated as:
the molecular fraction was calculated as:
step 5, estimating the transmission rate of the non-key frames of the video based on a Catmull-Rom cubic spline;
two adjacent key frames in the haze video image sequence are respectively set asAnd(1≤r1≤r2≤N),the previous key frame ofThe next key frame ofRegistering the 4 neighboring key frames using the method of step 3Andthe method of step 4 is used to estimate the corresponding optimized propagation rates in the 4 frames asEstimation of position based on Catmull-Rom cubic splineAndnon-key frames in between(r1<k∈Z<r2-r1) The propagation rate of the corresponding pixel inIs composed of
Wherein the parametersRepresenting the kth non-key frame between two key frames.
And 6, outputting the recovered haze video image sequence by using the estimated model parameters according to the atmospheric scattering model.
Estimating atmospheric illumination of the haze video image sequence according to a formula (10) in the step (4-2), optimizing the transmission rate of the video key frame according to the step (4-3), estimating the transmission rate of the video non-key frame according to the step (5), and recovering and outputting the haze video image sequence according to the following formula
The present invention provides a method for defogging a video image in a computer, and a plurality of methods and ways for implementing the same, and the above description is only a preferred embodiment of the present invention, it should be noted that, for those skilled in the art, a plurality of modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention. All the components not specified in the present embodiment can be realized by the prior art.

Claims (7)

1. A method for removing fog from video in a computer is characterized by comprising the following steps:
step 1, inputting a haze video image sequence, and extracting video key frames based on an information entropy estimated by edge information amplitude kernel density of adjacent frame difference;
step 2, extracting representative pixel points of the key frame based on the edge amplitude information entropy;
step 3, registering video key frames pixel by pixel based on a cross-correlation matching algorithm and a generalized alignment algorithm;
step 4, estimating the atmospheric illumination intensity and the two-dimensional kernel regression optimization video key frame propagation rate based on the color mean value;
step 5, estimating the transmission rate of the non-key frames of the video based on a Catmull-Rom cubic spline;
and 6, outputting the recovered haze video image sequence according to the atmospheric scattering model.
2. The method of claim 1, wherein step 1 comprises the steps of:
step 1-1, inputting a haze video image sequence, and calculating the difference of brightness channels of two adjacent frames of the haze video image sequence: suppose that the haze video image sequence has N frames, respectively f1,f2,…,fN,fNExpressing an N frame haze video image sequence, converting each frame image from an RGB color space to a YUV space, and calculating the absolute value of the difference of brightness Y channels of two adjacent frames of YUV spaces by the following formula:
d N - 1 = | f N - 1 Y - f N Y | ,
wherein,respectively representing the luminance Y channel of the N-1 th frame and the luminance Y channel of the N-th frame, dN-1Representing the absolute value of the difference between the luminance Y channel of the N-1 th frame and the luminance Y channel of the N-th frame, the luminance Y channel of all N frames having a size M1×M2Wherein M is1And M2Respectively counting the number of rows and columns of the video frame;
step 1-2, calculating the edge amplitude information of the absolute value of the differences between all luminance Y channels, drExpressing the absolute value of the difference between the r-th luminance Y channel, r is more than or equal to 1 and less than or equal to N-1, and calculating d by the following formularEdge amplitude information e of the ith row and jth column of pixelsr(i,j):
e r ( i , j ) = ( e r h ( i , j ) ) 2 + ( e r v ( i , j ) ) 2 ,
Wherein i is more than or equal to 1 and less than or equal to M1,1≤j≤M2Representing the horizontal direction edge of the pixel of the ith row and the jth column, is calculated by the following formula
e r h ( i , j ) = d r ( i + 1 , j - 1 ) + 2 d r ( i , j + 1 ) + d r ( i + 1 , j + 1 ) - d r ( i - 1 , j - 1 ) - 2 d r ( i - 1 , j ) - d r ( i - 1 , j + 1 ) ,
The vertical direction edge of the pixel of the ith row and the jth column is expressed by the following formula
e r v ( i , j ) = d r ( i - 1 , j + 1 ) + 2 d r ( i , j + 1 ) + d r ( i + 1 , j + 1 ) - d r ( i - 1 , j - 1 ) - 2 d r ( i , j - 1 ) - d r ( i + 1 , j - 1 ) ;
Step 1-3, calculating drKernel density function of edge information amplitude of (1): for any edge amplitude e, the kernel density function p (e) is:
p ( e ) = 1 M 1 M 2 s &Sigma; i = 1 M 1 &Sigma; j = 1 M 2 K s 1 ( e - e r ( i , j ) s ) ,
wherein,gaussian kernel function of variable u being a one-dimensional kernel functionThe smoothing parameter s is calculated by the following formula:
s = ( 4 3 M 1 M 2 ) 1 / 5 &sigma; ,
where σ represents the set of edge amplitudes er={er(1,1),er(1,2),…,er(M1,M2) Standard deviation of, edge magnitude bins are calculated according to step 1-2, er(M1,M2) Denotes the M th1Line M2Edge amplitude of the column;
step 1-4, extracting a key frame of the haze video image sequence based on the kernel density function information entropy of the edge information amplitude: at the edge amplitude set erIs sampled n in equal steps between the minimum and maximum values of1Data, labeled respectively as:
c1=min(er),c2=c1+Δ,c3=c1+2Δ,…,cn=c1+(n1-1)Δ,
wherein the step lengthn1The kernel density function corresponding to each datum is p (c)1),p(c2),…,p(cn1),p(cn1) Denotes cnCorresponding kernel density function, calculating d by the following formularInformation entropy H ofr
H r = - &Sigma; r 1 = 1 n 1 c r 1 l o g ( p ( c r 1 ) ) ,
If d isrIs greater than a threshold value H0,H0If the value is 0.1, the r frame f in the haze video image sequencerAre key frames.
3. The method of claim 2, wherein step 2 comprises:
let the r frame f in the haze video image sequencerFor key frames, for edge amplitude set { e }r(1,1),er(1,2),…,er(M1,M2) Sorting the elements of the first n according to descending order2With greater edge amplitude corresponding to positionThe pixel points of (2) are taken as representative pixel points, whereinRespectively representing the edge amplitude value in the r-th frame as the n-th frame2The abscissa and ordinate of a large pixel point.
4. The method of claim 3, wherein step 3 comprises:
two adjacent key frames in the haze video image sequence are respectively set asAndr1,r2respectively represent the serial numbers of adjacent key frame videos, and r is more than or equal to 11≤r2≤N,Andthe coordinates of the representative pixel points are respectivelyAndusing a cross-correlation matching algorithm, respectivelyAndselecting a window by taking the representative pixel point as the center,as a reference frame, the frame is,as a frame to be registered, with a reference frameEach representative pixel point is taken as a reference point, and in a frame to be registeredSearching a window with the maximum correlation coefficient as a matching point, wherein the correlation coefficient is calculated as follows:
suppose thatThe center coordinate isThe vector formed by all the luminances in the window of the representative pixel point is Y1The center coordinate isThe vector formed by all the luminances in the representative pixel point window is Y2Then Y is1And Y2The correlation coefficient of (d) defines:
&rho; 1 = &Sigma; ( Y 1 - Y &OverBar; 1 ) ( Y 2 - Y &OverBar; 2 ) ( Y 1 - Y &OverBar; 1 ) 2 ( Y 2 - Y &OverBar; 2 ) 2 ,
whereinAndrespectively represent vector Y1Mean sum vector Y of2The mean value of (a);
and selecting a representative pixel point pair with a corresponding relation according to a cross-correlation matching algorithm, and calculating translation, rotation and scaling transformation parameters of a reference frame and a frame to be registered by using a generalized alignment algorithm to realize pixel-by-pixel registration between two key frames.
5. The method of claim 4, wherein step 4 comprises the steps of:
step 4-1, establishing an atmospheric scattering illumination model of the video key frame: the key frame atmosphere scattering illumination model of the haze video image sequence is as follows:
Ic(p)=t(p)Jc(p)+(1-t(p))Ac
wherein, Jc(p) and Ic(p) respectively representing the c channel value of the haze-free video key frame pixel point p and the c channel value of the haze video key frame pixel point p, c ∈ { R, G, B }, R, G and B respectively representing three colors of red, green and blue, and t (p) ∈ [0,1]Representing the atmospheric light transmittance, A, at a pixel point pcRepresenting the atmospheric illumination intensity of the c channel;
step 4-2, estimating the atmospheric illumination intensity of the video key frame based on the color mean vector: the magnitude of the atmospheric illumination intensity is set to be a constant 240, and the average value is normalized by the red, green and blue color channels of the key frameAs the direction of the intensity of the atmospheric illumination, whereinRespectively representing the red channel mean value, the green channel mean value and the blue channel mean value of the key frame, and then the atmospheric illumination intensity estimated values of the red channel, the green channel and the blue channel are as follows:
A R = 240 I &OverBar; R I &OverBar; R + I &OverBar; G + I &OverBar; B , A G = 240 I &OverBar; G I &OverBar; R + I &OverBar; G + I &OverBar; B , A B = 240 I &OverBar; B I &OverBar; R + I &OverBar; G + I &OverBar; B ,
wherein A isR、AG、ABRespectively representing the estimated value of the atmospheric illumination intensity of the red channel and the atmosphere of the green channelAn estimated value of the illumination intensity and an estimated value of the atmospheric illumination intensity of the blue channel;
4-3, optimizing the propagation rate based on two-dimensional kernel regression: preliminarily estimating the atmospheric illumination propagation rate t (p) of a pixel point p according to an optimal contrast method proposed by Jin-Han Kim:
t ( p ) = max { min c &Element; { R , G , B } min p &Element; B { I c ( p ) - A c - A c } , max c &Element; { R , G , B } max p &Element; B { I c ( p ) - A c 255 - A c } } ,
and (3) optimizing the propagation rate by adopting a two-dimensional kernel regression method:
assuming that the propagation rate estimated value of the ith row and the jth column pixel point is ti,jThe propagation rate t under the local window with radius w at the point is calculated by the following formulai,jTwo-dimensional kernel regression function of
t i , j * = &Sigma; k 1 = - w w &Sigma; k 2 = - w w K h 2 ( ( i + k 1 , j + k 2 ) , ( i , j ) ) t i + k 1 , j + k 2 &Sigma; k 1 = - w w &Sigma; k 2 = - w w K h 2 ( ( i + k 1 , j + k 2 ) , ( i , j ) ) ,
WhereinComputing a two-dimensional kernel regression function for a two-dimensional Gaussian kernel functionIn the formula (2), the denominator part is calculated as:
&Sigma; k 1 = - r r &Sigma; k 2 = - r r K h 2 ( ( i + k 1 , j + k 2 ) , ( i , j ) ) = &Sigma; k 1 = - w w &Sigma; k 2 = - w w 1 h 2 K h 1 ( i + k 1 - i h ) K h 1 ( j + k 2 - j h ) = &Sigma; k 1 = - w w &Sigma; k 2 = - w w 1 h 2 K h 1 ( k 1 h ) K h 1 ( k 2 h ) ,
the molecular fraction was calculated as:
&Sigma; k 1 = - w w &Sigma; k 2 = - w w K h 2 ( ( i + k 1 , j + k 2 ) , ( i , j ) ) t i + k 1 , j + k 2 = &Sigma; k 1 = - w w &Sigma; k 2 = - w w 1 h 2 K h 1 ( k 1 h ) . K h 1 ( k 2 h ) t i + k 1 , j + k 2 .
6. the method of claim 5, wherein step 5 comprises:
for two adjacent key frames in haze video image sequenceAndis provided withThe previous key frame of The next key frame ofRegistering the 4 neighboring key framesAndestimating and optimizingAndpropagation rate ofEstimation of position based on Catmull-Rom cubic splineAndnon-key frames in betweenThe propagation rate of the corresponding pixel inComprises the following steps:
t r 0 + k = 1 2 x 3 x 2 x 1 T - 1 3 - 3 1 2 - 5 4 - 1 - 1 0 1 0 0 2 0 0 t r 3 * t r 2 * t r 1 * t r 0 * ,
wherein r is1<k<r2-r1K is an integer and parameterx represents two key framesAndthe k-th non-key frame in between,
7. the method of claim 6, wherein step 6 comprises: and recovering and outputting the haze video image sequence according to the following formula:
J c ( p ) = I c ( p ) - A c t ( p ) + A c .
CN201611189605.5A 2016-12-21 2016-12-21 Video defogging method in a kind of computer Active CN106846260B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611189605.5A CN106846260B (en) 2016-12-21 2016-12-21 Video defogging method in a kind of computer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611189605.5A CN106846260B (en) 2016-12-21 2016-12-21 Video defogging method in a kind of computer

Publications (2)

Publication Number Publication Date
CN106846260A true CN106846260A (en) 2017-06-13
CN106846260B CN106846260B (en) 2019-06-07

Family

ID=59139652

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611189605.5A Active CN106846260B (en) 2016-12-21 2016-12-21 Video defogging method in a kind of computer

Country Status (1)

Country Link
CN (1) CN106846260B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110211065A (en) * 2019-05-23 2019-09-06 九阳股份有限公司 A kind of color calibration method and device of food materials image
CN117474801A (en) * 2023-10-30 2024-01-30 安徽大学 Non-uniform remote sensing video image defogging method integrating space-time frequency information
CN118379316A (en) * 2024-06-21 2024-07-23 中铁电气化铁路运营管理有限公司 Image edge detection method, system and equipment based on entropy analysis and edge density

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104036466A (en) * 2014-06-17 2014-09-10 浙江立元通信技术股份有限公司 Video defogging method and system
CN104978719A (en) * 2015-06-16 2015-10-14 浙江工业大学 Self-adaptive traffic video real-time defogging method based on temporal-spatial coherence
CN105550999A (en) * 2015-12-09 2016-05-04 西安邮电大学 Video image enhancement processing method based on background reuse
CN105631829A (en) * 2016-01-15 2016-06-01 天津大学 Night haze image defogging method based on dark channel prior and color correction
CN105989583A (en) * 2016-07-19 2016-10-05 河海大学 Image defogging method
CN106056557A (en) * 2016-06-12 2016-10-26 南京邮电大学 Single image quick defogging method based on improved atmospheric scattering model
CN106157267A (en) * 2016-07-12 2016-11-23 中国科学技术大学 A kind of image mist elimination absorbance optimization method based on dark channel prior

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104036466A (en) * 2014-06-17 2014-09-10 浙江立元通信技术股份有限公司 Video defogging method and system
CN104978719A (en) * 2015-06-16 2015-10-14 浙江工业大学 Self-adaptive traffic video real-time defogging method based on temporal-spatial coherence
CN105550999A (en) * 2015-12-09 2016-05-04 西安邮电大学 Video image enhancement processing method based on background reuse
CN105631829A (en) * 2016-01-15 2016-06-01 天津大学 Night haze image defogging method based on dark channel prior and color correction
CN106056557A (en) * 2016-06-12 2016-10-26 南京邮电大学 Single image quick defogging method based on improved atmospheric scattering model
CN106157267A (en) * 2016-07-12 2016-11-23 中国科学技术大学 A kind of image mist elimination absorbance optimization method based on dark channel prior
CN105989583A (en) * 2016-07-19 2016-10-05 河海大学 Image defogging method

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
CONG-HUA XIE ET AL: "Single image dehazing using kernel regression model and dark channel prior", 《IMAGE AND VIDEO PROCESSING》 *
JIN-HWAN KIM ET AL: "Optimized contrast enhancement for real-time image and video dehazing", 《JOURNAL OF VISUAL COMMUNICATION AND IMAGE REPRESENTATION》 *
刘明: "基于MSR改进算法的图像和视频去雾研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
吴世新: "面向智能交通监控的低质视频增强方法研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
孙剑芬: "视频监控系统中运动目标检测算法的研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
朱鸣涛等: "基于先验知识和滤波器的图像去雾霾算法设计与实现", 《软件导刊》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110211065A (en) * 2019-05-23 2019-09-06 九阳股份有限公司 A kind of color calibration method and device of food materials image
CN110211065B (en) * 2019-05-23 2023-10-20 九阳股份有限公司 Color correction method and device for food material image
CN117474801A (en) * 2023-10-30 2024-01-30 安徽大学 Non-uniform remote sensing video image defogging method integrating space-time frequency information
CN117474801B (en) * 2023-10-30 2024-05-07 安徽大学 Non-uniform remote sensing video image defogging method integrating space-time frequency information
CN118379316A (en) * 2024-06-21 2024-07-23 中铁电气化铁路运营管理有限公司 Image edge detection method, system and equipment based on entropy analysis and edge density

Also Published As

Publication number Publication date
CN106846260B (en) 2019-06-07

Similar Documents

Publication Publication Date Title
Dudhane et al. C^ 2msnet: A novel approach for single image haze removal
Toet et al. Merging thermal and visual images by a contrast pyramid
CN107301624B (en) Convolutional neural network defogging method based on region division and dense fog pretreatment
CN102831591B (en) Gaussian filter-based real-time defogging method for single image
Guo et al. Lightweight deep network-enabled real-time low-visibility enhancement for promoting vessel detection in maritime video surveillance
CN105631831B (en) Video image enhancing method under the conditions of a kind of haze
CN109460764B (en) Satellite video ship monitoring method combining brightness characteristics and improved interframe difference method
CN106682586A (en) Method for real-time lane line detection based on vision under complex lighting conditions
CN110866879B (en) Image rain removing method based on multi-density rain print perception
Milford et al. Condition-invariant, top-down visual place recognition
CN102665034A (en) Night effect removal method for camera-collected video
CN104966054B (en) Detection method of small target in unmanned plane visible images
CN106846260B (en) Video defogging method in a kind of computer
CN105046653A (en) Method and system for removing raindrops in videos
CN111815528A (en) Bad weather image classification enhancement method based on convolution model and feature fusion
Chen et al. Research on moving object detection based on improved mixture Gaussian model
CN111598814B (en) Single image defogging method based on extreme scattering channel
CN112200746A (en) Defogging method and device for traffic scene image in foggy day
CN104933728A (en) Mixed motion target detection method
Wang et al. Haze removal algorithm based on single-images with chromatic properties
Pal et al. Visibility enhancement techniques for fog degraded images: a comparative analysis with performance evaluation
Maxwell et al. Real-time physics-based removal of shadows and shading from road surfaces
CN104299200A (en) Color-enhanced single image rain removing processing method
Li et al. Multiple linear regression haze-removal model based on dark channel prior
UKINKAR et al. Object detection in dynamic background using image segmentation: A review

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