CN102129689A - Method for modeling background based on camera response function in automatic gain scene - Google Patents

Method for modeling background based on camera response function in automatic gain scene Download PDF

Info

Publication number
CN102129689A
CN102129689A CN201110044805.2A CN201110044805A CN102129689A CN 102129689 A CN102129689 A CN 102129689A CN 201110044805 A CN201110044805 A CN 201110044805A CN 102129689 A CN102129689 A CN 102129689A
Authority
CN
China
Prior art keywords
gain
frame
background
gray
function
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
CN201110044805.2A
Other languages
Chinese (zh)
Other versions
CN102129689B (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.)
NANJING HUICHUAN INDUSTRIAL VISUAL TECHNOLOGY DEVELOPMENT Co Ltd
Original Assignee
Nanjing University
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 Nanjing University filed Critical Nanjing University
Priority to CN2011100448052A priority Critical patent/CN102129689B/en
Publication of CN102129689A publication Critical patent/CN102129689A/en
Application granted granted Critical
Publication of CN102129689B publication Critical patent/CN102129689B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Studio Devices (AREA)

Abstract

The invention discloses a method for modeling a background based on a camera response function in an automatic gain scene, which comprises the following steps of: performing automatic gain progressiveness-based analysis to obtain a roughly divided background area, obtaining low-noise training data by using a joint histogram method, and performing recovery once to obtain a globally optimal camera response function by the method based on maximum likelihood estimation and parameter constraints; online calculating a gain ratio frame by frame by utilizing correlation between a foreground and background difference and the gain ratio and the homography of a grayscale difference function relative to the gain ratio; and if the gain ratio is not 1, performing updating to obtain a background reference frame the same as a current reference frame by using the camera response function and the gain ratio, otherwise determining the background reference frame is unchanged, and obtaining the background reference frame with a gain coefficient the same as that of the current frame along with the change of the gain coefficient of a camera. By the method, the shortcomings of high background change speed, caused by difficulties in realizing automatic gain along with the camera, of the conventional methods are overcome, thereby ensuring high-efficiency motion detection.

Description

Under the automatic gain scene based on the background modeling method of camera response function
Technical field
The present invention relates to Flame Image Process and computer vision field, refer in particular to a kind of in camera automatic gain scene accurately the follower with gain index variation to obtain the background modeling method of accurate motion detection.
Background technology
Motion detection is the important research direction of computer vision, also is the crucial and module on basis during numerous computer visions are used, as the video semanteme mark, and pattern-recognition, traffic video monitoring, human body tracking.The motion detection purpose is with interested moving object complete cutting apart from video.Cut apart the whether accurate precision that directly influences subsequent module.
Method for testing motion can be classified as following a few class [1]: optical flow method, frame difference method, background subtraction method.In the scene of fixed cameras, the background subtraction method is widely studied owing to it all has good effect on speed and precision, and it subtracts each other present frame and reference background frame, passing threshold judgement again, thereby the sport foreground of being partitioned into.The effect of background subtraction method depends on the precision of background modeling, and promptly whether the reference background frame can truly reflect current scene.And existing background modeling method is confined to consider the dynamic change of video camera internal thermal noise, scene, as sleet, the water surface, vegetation rock, the interference of illumination variation, shade.Yet actual interference is not limited to above-mentioned, disturbs as the camera automatic gain.Automatic gain is the inherent function of most cameras, and majority can not manually be cancelled, when uprising suddenly owing to the average irradiance that blocks, reason such as switch lamp causes camera sensor (CCD or CMOS) to receive or during step-down, automatic gain is by adjusting aperture size, aperture time etc., make the gradation of image average reach best visual effect to changing inversely, just as the function of pupil.Automatic gain causes large-scale motion false retrieval, is the background behind prospect or the automatic gain because common background modeling method can't be judged the quick variation of grey scale pixel value on a large scale.
Cucchiara [2]Compensate gray-value variation behind the automatic gain by an empirical model, some important parameters provides with empirical value, and different model camera compensation effect difference is big.Kim [3]The simple hypothesis automatic gain causes the gray-scale value linear change, extrapolate the reference background frame after the variation, and this hypothesis has very mistake when high gray-scale value.Yet above-mentioned algorithm all is from experience and hypothesis, does not recognize that gradation of image value under the automatic gain changes by camera response function CRF to be determined that CRF is by the nonlinear function of the artificial design of producer, can not simply be similar to linear function.So above-mentioned algorithm lacks theory support and versatility.Soh [4]Control automatic gain with the gray-scale value average of reference background frame and change, but need to change the video camera internal circuit configuration, be difficult to general realization.
Because different camera CRF differences, and producer is difficult to also in addition know that for the consideration of maintaining secrecy is unwilling to announce CRF video is by that a camera output.Usually the existing common issue with of CRF recovery algorithms is: operand is big, for the CRF that obtains enough accuracy must increase number of parameters and need repeatedly iteration, and to noise-sensitive.And by Grossberg [5]Few parameter camera response function EMoR (Empirical Model of Response) that proposes, the design constraint of CRF and each the model camera CRF database D oRF (Database ofResponse Functions) that collects are in advance combined, obtain a function that contains N parameter.The advantage of EMoR is not need iteration, so reduced operand, and only need seldom parameter just can accurately recover CRF with respect to other algorithms, but shortcoming is still to need manually to choose in advance training data, be unfavorable for the full-automatic realization of total system, and when training data contained noise, then the poor robustness of EMoR was absorbed in local optimum easily.
List of references:
1.Hu?W?M,Tan?T?N,Wang?L,Maybank?S.A?survey?on?visual?surveillance?of?object?motion?and?behaviors.Ieee?Transactions?on?Systems?Man?and?Cybernetics?Part?C-Applications?and?Reviews,2004,34(3):334-352
2.Cucchiara?R,Melli?R,Prati?A.Auto-iris?compensation?for?traffic?surveillance?systems.In:Proceedings?of?the?IEEE?Intelligent?Transportation?Systems?Conference.Italy:IEEE,2005.851-856
3.Kim?Z.Real?time?object?tracking?based?on?dynamic?feature?grouping?with?background?subtraction.In:Proceedings?of?the?IEEE?Computer?Society?Conference?on?Computer?Vision?and?Pattern?Recognition.Anchorage,USA:IEEE,2008.1626-1633
4.Soh?Y?S,Kwon?Y,Wang?Y.A?new?iris?control?mechanism?for?traffic?monitoring?system.In:Proceedings?of?the?9th?Pacific?Rim?International?Conference?on?Artificial?Intelligence.Guilin,China:Springer,2006.1227-1231
5.Grossberg?M?D,Nayar?S?K.Determining?the?camera?response?from?images:What?is?knowable?Ieee?Transactions?on?Pattern?Analysis?and?Machine?Intelligence,2003,25(11):1455-1467
Summary of the invention
The problem to be solved in the present invention is: in the background subtraction method motion detection, existing background modeling method can't judge that the quick variation of grey scale pixel value on a large scale is the background behind prospect or the automatic gain, exist error big, need collect defective such as training data in advance, be unfavorable for the full-automatic realization of background subtraction method motion detection, and be vulnerable to influences such as noise.
Technical scheme of the present invention is: under the automatic gain scene based on the background modeling method of camera response function, it is characterized in that in background subtraction method motion detection, under the camera automatic gain scene, the reference background frame is followed the variation of camera gain coefficient in real time, obtain the reference background frame identical, may further comprise the steps with the present frame gain coefficient:
1) passes through based on the gradual analysis of automatic gain, the establishing target function, set the critical flase drop threshold value of automatic gain, the gray-value variation of the critical flase drop threshold value of described automatic gain during with the critical flase drop of system's generation automatic gain is characterized as according to setting, detect frame by frame whether the critical flase drop of automatic gain takes place, if take place then obtain the background area of rough segmentation, and use the method for joint histogram to obtain training data, be specially:
11) the average item that utilizes weight maximum among the parameter camera response function EMoR approximate as camera response function CRF obtains gray scale difference value function BDF, and then the postiive gain when obtaining critical flase drop compares k PpWith negative ratio of gains k Nn:
As 1<k c/ k r<k Pp, postiive gain then takes place but do not cause the motion flase drop as yet, work as k Nn<k c/ k r<1, then generation is born gain but is not caused motion flase drop, k as yet r, k cIt is respectively the gain coefficient of reference background frame R and present frame C;
12) be respectively when the ratio of gains: critical flase drop postiive gain k Pp, 1, k during the negative gain of critical flase drop Nn, obtain the corresponding gray scale difference functions respectively, according to k Pp, 1, k NnCorresponding BDF curve is divided into four parts with image-region, constructs objective function with this, and when objective function takes place greater than the then critical flase drop of the critical flase drop threshold value of setting, and rough segmentation goes out the background area of present frame;
13) background area pixels of rough segmentation is via the noise reduction process based on joint histogram, and removes and contain 0,255 data item, obtains the training data of low-dimensional;
2) with resulting training data in the step 1) as the input data, by disposable recovery obtains the camera response function of global optimum based on the method for maximal possibility estimation and restriction on the parameters;
3) maximal value of gray scale difference value is the monotonic increasing function about the ratio of gains, by the correlativity of the preceding background difference and the ratio of gains, and aforesaid monotonic increasing function, by preceding background frames and step 2) in the camera response function that recovered, ask for the ratio of gains frame by frame; Preceding background difference refers to the difference of present frame and reference background frame, and preceding background frames is the general designation of present frame and reference background frame;
4) if the ratio of gains that step 3) is determined is not 1, then by the ratio of gains and step 2) the camera response function that recovers, obtain the reference background frame identical with the gain coefficient of present frame, otherwise the reference background frame is constant, upgrade the reference background frame thus frame by frame, obtain the reference background frame identical with the present frame gain coefficient.
Step 1) is specially:
11) establishing that the camera automatic gain causes in the entire image pixel quantity takes place is the absolute flase drop of N ', positive and negative ratio of gains k Pp, k NnFor
k pp=min{k c/k r|num(BDF(B r(p i),k c/k r)>σ(p i))/N<N′;1≤i≤N} (1)
k nn=min{k c/k r|num(BDF(B r(p i),k c/k r)<-σ(p i))/N<N′;1≤i≤N} (2)
Wherein the collection of pixels in the entire image is P={p 1, p 2...., p N, N is a total number of image pixels; B r(p i), B c(p i) be respectively pixel p iThe gray-scale value of corresponding reference background frame R and the gray-scale value of present frame C; k r, k cIt is respectively the gain coefficient of reference background frame R and present frame C; σ (p i) be p iThe preceding background decision threshold that point is corresponding; Can obtain BDF by CRF; Num () represents qualified number of pixels;
The distribution character of each image-region is respectively k by the ratio of gains during 12) according to critical flase drop Pp, 1, k NnThe time obtain corresponding BDF curve, structure objective function T is divided into four classes with image-region, when T takes place greater than the then critical flase drop of threshold value, and rough segmentation goes out background:
Make x=I i, y=BDF (I i, k j/ k i), k wherein i, k jBe respectively automatic gain two two field picture i of front and back, the pairing gain coefficient of j, k take place j/ k iBe the ratio of gains, I iBe the gray-scale value of i two field picture, k j/ k iBe respectively k Pp, k Nn, 1 o'clock, obtain curve y=Lp (x), y=Ln (x), y=0 is divided into four parts with image-region, P=PA ∪ PB ∪ PC ∪ PD, when automatic postiive gain taking place and be in critical flase drop, PA is the current background zone, and B is arranged c(p i)-B r(p i)>0, B c(p i)-B r(p i)<Lp (B r(p i)); Automatic postiive gain when taking place in PB, and the former highlight regions of having powerful connections that the moving object of low gray-scale value shelters from has B c(p i)-B r(p i)<Ln (B r(p i)); PC when automatic postiive gain takes place for, the moving object of low gray-scale value shelters from former have powerful connections than dark areas, Ln (B is arranged r(p i))<B c(p i)-B r(p i)<0; PD when automatic postiive gain takes place for, the moving object of high gray-scale value shelters from former have powerful connections than dark areas, B is arranged c(p i)-B r(p i)>Lp (B r(p i)), and satisfy num (PA)>>num (PD), num (PB)>num (PC); When negative automatically gain taking place and be in critical flase drop, PA is that the moving object of high gray-scale value shelters from former gray-scale value upper zone of having powerful connections, and 0<B is arranged c(p i)-B r(p i)<Lp (B r(p i)); PB for the moving object of low gray-scale value shelters from former have powerful connections than dark areas, Ln (B is arranged r(p i))<B c(p i)-B r(p i); PC is the current background zone, and Ln (B is arranged r(p i))<B c(p i)-B r(p i)<0; Automatically negative gain takes place shelter from former low gray-scale value zone of having powerful connections because of the moving object that is high gray-scale value, PD is this zone, because cause strong gray scale difference value, B is arranged c(p i)-B r(p i)>Lp (B r(p i)), and satisfy num (PC)>>num (PB), num (PD)>num (PA),
Set up objective function thus:
T = num ( PA ) num ( PA ) + num ( PD ) - nun ( PC ) num ( PB ) + num ( PC ) - - - ( 3 )
The T absolute value is big more, and then the probability that takes place of automatic gain is big more, and setting critical flase drop threshold value t is 0.75, makes that PBG is the background area pixels set of rough segmentation, and when T>t, postiive gain takes place but do not cause motion flase drop, PBG=PA automatically; When T<-during t, negative automatically gain takes place but does not cause motion flase drop, PBG=PC;
13) based on the noise reduction process of joint histogram:
Make H (IX, PX, the X) element number of the gray-scale value that is illustrated in collection of pixels PX among the image X from 0 to IX, promptly
Figure BDA0000047852520000042
B (px i, X) be pixel p x among the image X iGray-scale value, make joint histogram be:
Q_BTF={(m,IC(m))|H(IC(m),PBG,C)=H(m,PBG,R)}(5)
Wherein m ∈ { 0,1,2, ...., 255}, 0≤IC (m)≤255, R, C are respectively reference background frame and present frame, the character that is not subtracted by the CRF dullness, the Q_BTF element number is 256, the element that contains 0 or 255 among the Q_BTF is removed,, obtained gathering P_BTF to remove saturated and the error that is caused that end, element number M<255, P_BTF is the training data of low-dimensional.
Step 2) be specially:
21) in the EMoR framework, based on logarithm and contrafunctional computing, gain coefficient is separated from CRF with scene illumination, in mathematical analysis, change into the input training data set V=P_BTF that linear regression problem: CRF recovers, V satisfies
Figure BDA0000047852520000043
IV iBe that gain coefficient is k iThe time the gradation of image value, IV jBe that gain coefficient is k jThe time the gradation of image value, M is the training data number, IV i, IV jSatisfy:
IV i+ε=BTF ij(IV j) (8)
Wherein BTF is a luminance transfer function, and ε is a Gaussian noise, recovers based on the CRF of maximal possibility estimation and restriction on the parameters under the EMoR framework, obtains globally optimal solution, to the general type negate function of EMoR with take the logarithm:
ln k + ln q = ln ( RCF - 1 ( I ) ) = g 0 ( I ) + Σ n = 1 N d n l n ( I ) - - - ( 9 )
l 1(I) ... .l N(I) be to CRF database D oRF negate function and the back of taking the logarithm use major component that pivot analysis PCA obtains by by main to time arrangement, g 0(I) be CRF database D oRF negate function and take the logarithm after average; Under desirable noise-free case, IV i, IV jCorresponding brightness value q is identical, and gain coefficient k difference, with IV i, IV jSubstitution formula (9) is also subtracted each other,
ln ( k i / k j ) = g 0 ( IV i ) - g 0 ( IV j ) + Σ n = 1 N d n ( l n ( IV i ) - l n ( IV j ) ) - - - ( 10 )
Under actual conditions, i.e. IV i, IV jSatisfy formula (8), then formula (10) is deformed into:
ln ( k i / k j ) = g 0 ( IV i ) - g 0 ( IV j ) + Σ n = 1 N d n ( l n ( IV i ) - l n ( IV j + ϵ ) ) - - - ( 11 )
Because ε is a Gaussian noise, has additive property, so formula (11) has:
ln ( k i / k j ) = g 0 ( IV i ) - g 0 ( IV j ) + Σ n = 1 N d n ( l n ( IV i ) - l n ( IV j ) ) + ϵ ′ - - - ( 12 )
Wherein the Gaussian noise that obtains for the linear operation of ε in formula (11) of ε ' makes d 0-ln (k i/ k j), have:
g 0 ( IV j ) - g 0 ( IV i ) = d 0 + Σ n = 1 N d n ( l n ( IV i ) - l n ( IV j ) ) + ϵ ′ - - - ( 13 )
Order:
t(m)=g 0(IV j(m))-g 0(IV i(m))
φ n ( m ) = l n ( IV i ( m ) ) - l n ( IV j ( m ) ) n ≠ 0 1 n = 0
Then formula (13) becomes
t ( m ) = Σ n = 0 N d n φ n ( m ) + ϵ ′ = d T Φ ( m ) + ϵ ′ - - - ( 14 )
D wherein T=(d 0, d 1, d 2... .., d N), Φ=(φ 0, φ 1, φ 2... .., φ N) T, then following formula becomes the linear regression of standard;
22) use the CRF based on maximal possibility estimation and restriction on the parameters to ask for, smallest error function is:
E D ( d ) = 1 2 Σ m = 1 M { t ( m ) - d T Φ ( m ) } 2 - - - ( 15 )
Wherein, M is the element number of set V, know by EMoR, and when formula (14) is got different n values, basis function l n(I) weight is different, and n is big more, and then the weight of Dui Ying basis function in expression formula is more little, and the respective weights coefficient is more little, the smallest error function under the operation parameter constraint:
E(d)=E D(d)+λE d(d) (16)
λ is constrained parameters, is diagonal matrix, 0<λ 1<λ 2<... ..<λ NBe the element on the matrix λ diagonal line,
E d ( d ) = 1 2 d T d - - - ( 17 )
With formula (15), (17) substitution formula (16):
E ( d ) = 1 2 Σ m = 1 M { t ( m ) - d T Φ ( m ) } 2 + 1 2 λ d T d - - - ( 18 )
By maximal possibility estimation, formula (18) is differentiated to d
▿ E ( d ) = Σ m = 1 M { t ( m ) - d T Φ ( m ) } Φ ( m ) T + λ d T - - - ( 19 )
Make formula (19) be 0 and the distortion:
0 = Σ m = 1 M t ( m ) Φ ( m ) T - d T ( Σ m = 1 M Φ ( m ) Φ ( m ) T + λ ) - - - ( 20 )
Obtain:
d=(λ+Φ TΦ) -1Φ Tt (21)
Wherein T=(t (1), t (2) ...., t (M))
With formula (21) substitution formula (9), obtain CRF through asking the exponential sum function of negating.
Step 3) is specially:
31) analyze that to obtain the BDF maximal value be monotonic increasing function about the ratio of gains, promptly both singly answer;
32) ask for based on the automatic gain of homography:
Make that the BDF maximal value is Δ MI (k j/ k i)), corresponding horizontal ordinate is MI (k j/ k i):
(MI(k j/k i)=I i,ΔMI(k j/k i)=ΔI ji)|max{ΔI ji=(I i,k j/k i)},0≤I i≤255 (22)
If the gray difference of the R of present frame C and reference background frame is only caused by automatic gain, all pixel p in the image so iCorresponding coordinate (x (i)=B r(p i), y (i)=B c(p i)-B r(p i)) formed distribution DC drop on curve D L:{ (x=I, y=Δ I) | Δ I=BDF (I, k c/ k r) on, and Δ MI (k c/ k r)=max (y (i)) by the homography of Δ MI, can obtain k c/ k rIf the prospect of doing exercises exists, k c/ k rInterval s kBe [k C-1/ k R-1-k_th, k C-1/ k R-1+ k_th], k C-1, k R-1Be the gain coefficient of previous frame C and B, k_th is a ratio of gains gradual change scope, gets 0.12, then obtains the interval s of MI correspondence m, ask DC at interval s mPeak value coordinate (MB, Δ MB):
(MB=x(i),ΔMB=y(i))|max{y(i)},x(i)Osm (23)
Make MI (k j/ k i)=MB obtains k by homography j/ k i=k m, in the ideal case, if the peak value that is caused by automatic gain then satisfies k simultaneously m∈ s k, MI (k m)=MB, the new ratio of gains is k c/ k r=k m, consider noise effect, when | MI (k m)-MB<TM, and k m∈ s k, then to upgrade the ratio of gains, otherwise be the peak value that causes by sport foreground, the ratio of gains is constant, and TM gets 5 here;
33) according to step 32) ask for the ratio of gains frame by frame.
The present invention need not to collect in advance training data, makes system automation, and unmanned realization on duty becomes possibility, effectively increases work efficiency, and saves financial resources.The present invention has following advantage compared with prior art:
(1) compatible all types of camera, highly versatile:
Camera model is numerous, and camera automatic gain characteristic has nothing in common with each other, and disturbs based on the automatic gain that the empirical fit method can only be removed limited several cameras, has limited its range of application.And the present invention is from camera gray-scale value output principle, from recovering the camera response function and asking for the ratio of gains in real time and set about, obtain the reference background frame after automatic gain disturbs, theoretical complete and highly versatile, the automatic gain that can eliminate all kinds of cameras is to the background modeling adverse effect, obtain correct motion detection result, be convenient to implement on a large scale;
(2) need not to change hardware configuration, function is independent, and interface is simple:
Than the method for disturbing with the removal automatic gain by change camera hardware structure, the present invention realizes for software, does not need to change hardware configuration, does not influence other functions of modules of system, whether the independent detection automatic gain takes place, and the image of automatic gain is eliminated in output.And low with system other module coupling, the reference background frame output interface after the input interface of present frame and reference background frame only need being provided and eliminating automatic gain gets final product;
(3) fully automatic operation, the precision height:
Previous methods is recovered the training data that the camera response function needs manually to select input, and is random on the one hand big, and the artificial easily noise of introducing needs the people on duty on the other hand, wastes time and energy.And ask for based on the parameter of least square and to be subjected to noise easily and to obtain locally optimal solution.The automatic rough segmentation of the present invention background area, and obtain low noise training data by joint histogram, by the camera response function that recovers to obtain global optimum based on the method for maximal possibility estimation and restriction on the parameters, whole process automatically realizes, unmanned.
(4) operand is little, and real-time is good:
The camera response function is constant for definite camera, so only need once to recover, and the ratio of gains is dynamic change with the variation of automatic gain, need ask for frame by frame, previous methods is asked for the ratio of gains and is similar to the method that the camera response function recovers, operand is huge, can't realize asking in real time of the ratio of gains, the present invention utilizes the relation between the ratio of gains, front and back background frames, the brightness transfer function three, the online ratio of gains of asking for, and then the reference background frame after the automatic gain interference that is eliminated, and operand is little, real-time implementation.
Description of drawings
Fig. 1 is the process flow diagram that the present invention is based on the background modeling method of automatic gain.
The present frame of Fig. 2 (a) when causing critical false retrieval for automatic gain, Fig. 2 (b) causes the pixel distribution of critical false retrieval for automatic gain.
Fig. 3 (a) and Fig. 3 (b) they are at the exemplary video sequence, the present invention and additive method accuracy statistical graph, and wherein: Fig. 3 (a) compares for false drop rate; Fig. 3 (b) compares for loss.
Fig. 4 (a)-Fig. 4 (e) is at the exemplary video sequence, the motion detection comparison diagram of the present invention and additive method, and wherein: Fig. 4 (a) is a present frame, Fig. 4 (b)-Fig. 4 (e) is that the motion detection binary map of the present invention and additive method compares.
Embodiment
Below in conjunction with accompanying drawing the present invention is described in detail, described embodiment is intended to be convenient to the understanding of the present invention.
Fig. 1 is based on the process flow diagram of camera automatic gain background modeling method.According to flow sequence, the specific implementation process of each step of the inventive method is as follows:
1, obtains image sequence
System at first obtains image sequence, and sequence is inputed to two parallel modules: background subtraction method module and automatic gain background modeling method module, automatic gain background modeling method module is implemented the inventive method.
2, judge whether the camera response function recovers, if do not recover, then by the critical flase drop objective function T of structure, and the critical flase drop threshold value of the automatic gain t that sets, the gray-value variation of the critical flase drop threshold value of described automatic gain during with the critical flase drop of system's generation automatic gain is characterized as according to setting, detect the critical flase drop whether automatic gain takes place frame by frame, up to | T|>t, promptly critical flase drop takes place, and then isolates the background area, automatic gain is the process of a quantitative change, when less than threshold value t, can not cause the flase drop of motion detection, during only greater than threshold value t, the flase drop that just can cause motion detection, both critical conditionss are " the critical flase drop of automatic gain ".
[21] utilize the approximate value of the average item of weight maximum among the EMoR, obtain gray scale difference value function BDF, the positive and negative ratio of gains k when obtaining critical flase drop as CRF Pp, k Nn:
Making the camera automatic gain cause in the entire image pixel quantity taking place is the absolute flase drop of N ', and N ' takes a morsel and gets final product, the absolute flase drop as 3%, and the positive and negative ratio of gains of this moment is k Pp, k NnFor
k pp=min{k c/k r|num(BDF(B r(p i),k c/k r)>σ(p i))/N<3%;1≤i≤N}(1)
k nn=min{k c/k r|num(BDF(B r(p i),k c/k r)<-σ(p i))/N<3%;1≤i≤N}(2)
Wherein the collection of pixels in the entire image is P={p 1, p 2...., p N, N is a total number of image pixels; B r(p i), B c(p i) be respectively pixel p iThe gray-scale value of corresponding reference background frame R and the gray-scale value of present frame C; k r, k cIt is respectively the gain coefficient of reference background frame R and present frame C; σ (p i) be p iThe preceding background decision threshold that point is corresponding, " preceding background " is the general designation of present frame and reference background frame; BDF is the grey scale change difference functions under the different gains ratio, ask for BDF and need known CRF, and this stage CRF waits to ask, and learns f by EMoR 0(k * be the topmost component of CRF, and be the average of DoRF q), only need rough segmentation to go out the background area because of this stage again, not high to the accuracy requirement of CRF, so use CRF ≈ f 0(k * q), and then obtain BDF; Num () represents qualified number of pixels, and again because the background subtraction method all has based on morphologic aftertreatment, so pixel that can a small amount of flase drop of filtering is k Pp, k NnBe considered as motion flase drop critical gain ratio.Then as 1<k c/ k r<k Pp, postiive gain then takes place but do not cause the motion flase drop as yet, work as k Nn<k c/ k r<1, then generation is born gain but is not caused the motion flase drop as yet.BDF is the grey scale change difference functions under the different gains ratio.
The distribution character of each image-region is respectively k by the ratio of gains during [22] according to critical flase drop Pp, 1, k NnThe time obtain corresponding BDF curve, structure objective function T is divided into four classes with image-region, when T takes place greater than the then critical flase drop of threshold value, and rough in present frame which is partitioned into partly is the zone at background place.The present frame in any moment all can be divided into two big classes: background, prospect (or claiming moving object), wherein background is the zone that does not change in scene, if automatic gain does not take place, the area relative gray-scale value of this part is constant, but because the generation of automatic gain, can cause the gray-scale value in the zone of this part also to change, therefore first rough segmentation goes out the background area:
Make x=I i, y BDF (I i, k j/ k i), k wherein i, k jBe respectively automatic gain two two field picture i of front and back, the pairing gain coefficient of j, k take place j/ k iBe the ratio of gains, I iBe the gray-scale value of i two field picture, k j/ k iBe respectively k Pp, k Nn, 1 o'clock, obtain curve y=Lp (x), y=Ln (x), y=0 is divided into four parts with image-region, P=PA ∪ PB ∪ PC ∪ PD.
When automatic postiive gain taking place and being in critical flase drop, image-region can be divided into four parts, P=PA ∪ PB ∪ PC ∪ PD.PA is the current background zone, because postiive gain takes place, so B is arranged c(p i)-B r(p i)>0 is not again because cause the motion flase drop as yet, so B is arranged c(p i)-B r(p i) Lp<(B r(p i)); Automatic postiive gain takes place because be that the moving object of hanging down gray-scale value shelters from former highlight regions of having powerful connections, PB is this zone, because cause strong gray scale difference value, B is arranged c(p i)-B r(p i)<Ln (B r(p i)); PC for the moving object of low gray-scale value shelters from former have powerful connections than dark areas, Ln (B is arranged c(p i))<B c(p i)-B c(p i)<0; PD be the moving object of high gray-scale value shelter from former have powerful connections than dark areas, B is arranged c(p i)-B c(p i)>Lp (B c(p i)).PA accounts for major part in the zone as a setting in image when automatic critical gain takes place, and PD accounts for very zonule as highlighted prospect in image, otherwise can suppress the generation of postiive gain, thus num (PA)>>num (PD).Again because cause the enough area of space PB of generation needs of automatic postiive gain, otherwise the entire image gray average can abrupt change, and PC is the common factor of current vehicle penumbra zone and the low gray areas of reference background frame, and shared zone is also very little in image, so num (PB)>num (PC).When negative automatically gain taking place and be in critical flase drop, PA is that the moving object of high gray-scale value shelters from former gray-scale value upper zone of having powerful connections, and 0<B is arranged c(p i)-B c(p i)<Lp (B c(p i)); PB for the moving object of low gray-scale value shelters from former have powerful connections than dark areas, Ln (B is arranged c(p i))<B c(p i)-B c(p i); PC is the current background zone, because negative gain takes place, so B is arranged c(p i)-B c(p i)<0 is not again because cause the motion flase drop as yet, so B is arranged c(p i)-B c(p i)>Ln (B c(p i)); Automatically negative gain takes place shelter from former low gray-scale value zone of having powerful connections because of the moving object that is high gray-scale value, PD is this zone, because cause strong gray scale difference value, B is arranged c(p i)-B c(p i)>Lp (B c(p i)), and satisfy num (PC)>>num (PB), num (PD)>num (PA).In like manner can proper negative gain critical moment, set up objective function thus:
T = num ( PA ) num ( PA ) + num ( PD ) - nun ( PC ) num ( PB ) + num ( PC ) - - - ( 3 )
The T absolute value is big more, and then the probability of automatic gain generation is big more, considers noise and CRF ≈ f 0(kq) approximate error, t gets 0.75, makes that PBG is the background area pixels set of rough segmentation.When T>t, postiive gain takes place but does not cause motion flase drop, PBG=PA automatically.When T<-during t, negative automatically gain takes place but does not cause motion flase drop, PBG=PC.
3. the background area pixels of rough segmentation is via the noise reduction process based on joint histogram, and removes and contain 0,255 data item, avoids the error that camera is full or end, and obtains the training data of low-dimensional.
[31] based on the noise reduction process of joint histogram:
Make H (IX, PX, the X) element number of the gray-scale value that is illustrated in collection of pixels PX among the image X from 0 to IX, promptly
Figure BDA0000047852520000101
B (px i, X) be pixel p x among the image X iGray-scale value.Make joint histogram be:
Q_BTF={(m,IC(m))|H(IC(m),PBG,C)=H(m,PBG,R)} (5)
Wherein m ∈ 0,1,2 ...., 255}, 0≤IC (m)≤255, R, C are respectively reference background frame and present frame.By the character that the CRF dullness does not subtract, than PBG, Q_BTF is more accurate training data, and element number reduces to 256.
[32] for removing the error that is caused saturated and that end, the element that contains 0 or 255 among the Q_BTF is removed, obtained gathering P_BTF, element number M<255.P_BTF promptly is required training data.
4. with the training data of P_BTF, by the camera response function that recovers to obtain global optimum based on the method for maximal possibility estimation and restriction on the parameters as input.
[41] in the EMoR framework, based on logarithm and contrafunctional computing, gain coefficient is separated from CRF with scene illumination, and then change into the linear regression problem.
The input training data set V=P_BTF that CRF recovers, V satisfies
Figure BDA0000047852520000102
IV iBe that gain coefficient is k iThe time the gradation of image value, IV jBe that gain coefficient is k jThe time the gradation of image value.M is the training data number.Have in the ideal case:
IV i=BTF ij(IV j) (7)
But because the noise and the existence of falsely dropping, actual as shown in the formula, wherein ε is a Gaussian noise:
IV i+ε=BTF ij(IV j) (8)
It is local minimum that noise is absorbed in general CRF recovery algorithms easily, and for this reason, proposition CRF based on maximal possibility estimation and restriction on the parameters under the EMoR framework recovers, and obtains globally optimal solution.For gain coefficient k is separated, to the general type negate function of EMoR with take the logarithm:
ln k + ln q = ln ( RCF - 1 ( I ) ) = g 0 ( I ) + Σ n = 1 N d n l n ( I ) - - - ( 9 )
l 1(I) ... .L M(I) be to DoRF negate function and the back of taking the logarithm use major component that PCA obtains by by main to time arrangement, g 0(I) be DoRF negate function and take the logarithm after average.Under desirable noise-free case, IV i, IV jSatisfy formula (7), i.e. IV i, IV jCorresponding brightness value q is identical, and gain coefficient k difference, with IV i, IV jSubstitution formula (9) is also subtracted each other,
ln ( k i / k j ) = g 0 ( IV i ) - g 0 ( IV j ) + Σ n = 1 N d n ( l n ( IV i ) - l n ( IV j ) ) - - - ( 10 )
Under actual conditions, i.e. IV i, IV jSatisfy formula (8), then formula (10) is deformed into:
ln ( k i / k j ) = g 0 ( IV i ) - g 0 ( IV j ) + Σ n = 1 N d n ( l n ( IV i ) - l n ( IV j + ϵ ) ) - - - ( 11 )
Because ε is a Gaussian noise, has additive property, so formula (11) has:
ln ( k i / k j ) = g 0 ( IV i ) - g 0 ( IV j ) + Σ n = 1 N d n ( l n ( IV i ) - l n ( IV j ) ) + ϵ ′ - - - ( 12 )
Wherein the Gaussian noise that obtains for the linear operation of ε in formula (11) of ε ' is consolidation form, makes d 0=-ln (k i/ k j), have:
g 0 ( IV j ) - g 0 ( IV i ) = d 0 + Σ n = 1 N d n ( l n ( IV i ) - l n ( IV j ) ) + ϵ ′ - - - ( 13 )
Order:
t(m)=g 0(IV j(m))-g 0(IV i(m))
φ n ( m ) = l n ( IV i ( m ) ) - l n ( IV j ( m ) ) n ≠ 0 1 n = 0
The m here is a m sample in the formula (6), (IV in the formula (13) i, IV j) promptly be the general reference of sample in the formula (6).
Then formula (13) becomes
t ( m ) = Σ n = 0 N d n φ n ( m ) + ϵ ′ = d T Φ ( m ) + ϵ ′ - - - ( 14 )
D wherein T=(d 0, d 1, d 2... .., d N), Φ=(φ 0, φ 1, φ 2... .., φ N) T, d T, Φ is for formula (14) form is further simplified, and write as the form of multiplication of vectors, with convenient follow-up based on matrix operation.
Then formula (14) becomes the linear regression of standard.
[42] basis function l 1(I) ... .l N(I) be the major component that obtains by pivot analysis PCA by by main to time arrangement gained, weight is successively decreased successively, the basis function of different weights is constrained in separately the weight coefficient scope, avoid over-fitting taking place because of noise causes little weight basis function to obtain big weight coefficient, use maximal possibility estimation rather than the least square method in the algorithm in the past, to obtain separating of global optimum, accurately recover CRF.
Formula (14) is to ask parameter d nThe linear regression problem, get N 3, knows by EMoR CRF is recovered precision>99%, but this precision is to be prerequisite with the accurate coupling that does not contain noise.In order effectively to offset noise effect, use CRF to ask for based on maximal possibility estimation and restriction on the parameters, smallest error function is:
E D ( d ) = 1 2 Σ m = 1 M { t ( m ) - d T Φ ( m ) } 2 - - - ( 15 )
Wherein, M is the element number of match point set V, know by EMoR, and when formula (14) is got different n values, basis function l n(I) weight in expression formula is different, and n is big more, and then the weight of Dui Ying basis function in expression formula is more little, and the respective weights coefficient is more little.For the basis function that prevents little weight obtains big weight coefficient over-fitting takes place and is absorbed in local optimum, the smallest error function under the operation parameter constraint:
E(d)=E D(d)+λE d(d) (16)
λ is constrained parameters, is diagonal matrix, 0<λ 1<λ 2<... ..<λ NIt is the element on the matrix λ diagonal line.
E d ( d ) = 1 2 d T d - - - ( 17 )
With formula (15), (17) substitution formula (16):
E ( d ) = 1 2 Σ m = 1 M { t ( m ) - d T Φ ( m ) } 2 + 1 2 λ d T d - - - ( 18 )
By maximal possibility estimation, formula (18) is differentiated to d
▿ E ( d ) = Σ m = 1 M { t ( m ) - d T Φ ( m ) } Φ ( m ) T + λ d T - - - ( 19 )
Make formula (19) be 0 and the distortion:
0 = Σ m = 1 M t ( m ) Φ ( m ) T - d T ( Σ m = 1 M Φ ( m ) Φ ( m ) T + λ ) - - - ( 20 )
Solve:
d=(λ+Φ TΦ) -1Φ Tt (21)
Wherein
Figure BDA0000047852520000125
t=(t(1),t(2),....,t(M))
With formula (21) substitution formula (9), obtain CRF through asking the exponential sum function of negating.
5. ask for the ratio of gains frame by frame.
[51] automatic gain can cause brightness value to change, and (I k) is the function of the gray-scale value I before taking place about ratio of gains k and automatic gain to the grey scale change difference DELTA.When k determines, obtain Δ (I, k) maximal value is max Δ (k), we obtain max Δ (k) by analysis is monotonic increasing function about k, analyzing and obtaining the BDF maximal value is monotonic increasing function about the ratio of gains, promptly both singly answer:
If the gray-scale value of two width of cloth images is respectively I iAnd I j, the ratio of gains is k j/ k i, the relation of the ratio of gains and gain coefficient is: if the gain coefficient of image i is k i, the gain coefficient of image j is k j, then the ratio of gains of image i and image j is k j/ k iIf promptly the gain coefficient of definite two width of cloth images then can be determined the ratio of gains; If but the known gain ratio then has a lot of gain coefficient value possibilities.If I i, I jGain coefficient is respectively 1 and k j/ k i, BDF=I then j-I i=f (k j/ k iQ)-and f (q), q is the scene brightness value, establishes and works as k j/ k i=k 1The time, q gets q 1Obtain BDF maximal value max (BDF K1)=f (k 1q 1)-f (q 1); If k 2>k 1, have by the CRF monotone increasing: f (k 2q 1)>f (k 1q 1), max (BDF then K2) 〉=f (k 2q 1)-f (q 1)>f (k 1q 1)-f (q 1)=max (BDF K1), so the maximal value of BDF is the monotonically increasing function about the ratio of gains, promptly the BDF maximal value and the ratio of gains are single should the relations.
[52] ask for based on the automatic gain of homography:
Make that the BDF maximal value is Δ MI (k j/ k i)), corresponding horizontal ordinate is MI (k j/ k i):
(MI(k j/k i)=I i,ΔMI(k j/k i)=ΔI ji)|max{ΔI ji=BDF(I i,k j/k i)},0≤I i≤255(22)
If the gray difference of the R of present frame C and reference background frame is only caused by automatic gain, all pixel p in the image so iCorresponding coordinate (x (i)=B r(p i), y (i)=B r(p i)-B r(p i)) formed distribution DC drop on curve D L:{ (x=I, y=Δ I) | Δ I=BDF (I, k c/ k r) on, and Δ MI (k c/ k r)=max (y (i)) by the homography of Δ MI, can obtain k c/ k rB wherein r(p i), B r(p i) be respectively pixel p iCorresponding reference background frame R, the gray-scale value of present frame C, k r, k cIt is respectively the gain coefficient of R and C.Prospect exists even do exercises, and still can obtain k c/ k r, because automatic gain is a progressive process, so k c/ k rInterval s kBe [k C-1/ k R-1-k_th, k C-1/ k R-1+ k_th], k C-1, k R-1Be the gain coefficient of previous frame C and B, k_th is a ratio of gains gradual change scope, gets 0.12 here.Then obtain the interval s of MI correspondence m, ask DC at interval s mPeak value coordinate (MB, Δ MB):
Figure BDA0000047852520000131
Make MI (k j/ k i)=MB obtains k by homography j/ k i=k mIn the ideal case, if the peak value that is caused by automatic gain then satisfies k simultaneously m∈ s k, MI (k m)=MB, the new ratio of gains is k c/ k r=k mConsider noise effect, when | MI (k m)-MB|<TM, and k m∈ s k, then to upgrade the ratio of gains, otherwise be the peak value that causes by sport foreground, the ratio of gains is constant, and TM gets 5 here.
6. upgrade the reference background frame
[61] if the ratio of gains equals 1, automatic gain not taking place then, directly enters background subtraction method module.
[62] if the ratio of gains is not equal to 1, automatic gain takes place then, upgraded obtaining the reference background frame reference background frame identical with the present frame gain coefficient with the ratio of gains by the camera response function.
Fig. 2 correspondence be the critical flase drop that causes of automatic gain constantly, shown in Fig. 2 (a), a large car enters guarded region, automatic postiive gain takes place and be in critical flase drop.Shown in Fig. 2 (b), image is by curve y=Lp (x) at this moment, and y=Ln (x), y=0 are divided into four regional P=PA ∪ PB ∪ PC ∪ PD.
Fig. 3 is at the exemplary video sequence, the present invention and additive method accuracy statistical graph.Shown in Fig. 3 (a), loss average of the present invention is 4.1%, and it is little to fluctuate, and Cucchiara algorithm loss average is 18.3%, and Kim algorithm loss average is 27%, and fluctuation range is bigger, MoG loss average 52.4%.Shown in Fig. 6 (b), false drop rate average of the present invention is 3.2%, and fluctuation is slight, and Cucchiara algorithm false drop rate is about 25.6%, and fluctuation is violent, and Kim algorithm loss is about 23.5%, MoG loss about 48.3%.To sum up can obtain, motion detection precision of the present invention is high and stable, and Cucchiara and Kim take second place respectively, and MoG false drop rate and loss all about 50%, lost efficacy.
Fig. 4 is at the exemplary video sequence, the foreground detection binary map of the present invention and additive method, shown in Fig. 4 (a), the car of low gray scale enters scene, block highlight regions, cause taking place automatic postiive gain, shown in Fig. 4 (b), by the testing result of MoG algorithm, flase drop takes place in the background area of high gray scale easily as can be seen, and omission takes place the foreground area of low gray scale easily, this is because the background area of high gray scale gray scale after automatic postiive gain takes place is bigger, and change violently, the decision threshold of MoG is less than this variation, thereby causes flase drop.And the background of low gray scale foreground area since automatically postiive gain make gray-scale value become big, make it the reference background frame gray scale of convergence region, when difference less than the decision threshold of MoG omission takes place just.Shown in Fig. 4 (c), Cucchiara can eliminate certain flase drop.Shown in Fig. 4 (d), the relative Cucchiara of Kim detects better effects if, but loss is still too high.Cucchiara and Kim are difficult to take into account simultaneously omission and false drop rate, and detect the effect instability.Shown in Fig. 4 (e), this paper method all can be complete under various scenes is partitioned into sport foreground.
The present invention is the new module group on existing background subtraction method basis, whether have automatic gain take place, if do not take place, use existing ripe algorithm to guarantee the motion detection accuracy rate if detecting, only when automatic gain takes place, just call corresponding module, saved calculation resources.The CPU of testing hardware platform is Intel Core P8700, internal memory 2G, and operating system is Linux Suse 11.1.Wherein CRF asks for needs 1.3s approximately, takes place if detect no automatic gain, and then average 0.3ms consuming time automatic gain takes place and upgrade the reference background frame, then average 2.2ms consuming time if detect.The average 19.8ms consuming time of MoG.And CRF only needs once to recover, and takes about 1~2s, and monitoring can be ignored during with respect to length, so satisfy the requirement of motion detection real-time; The present invention simultaneously is by the test of a large amount of typical video sequences, and the result shows that the present invention has high generality and accuracy.
The above only is the embodiment among the present invention, but scope of the present invention should not described by this and limits.It should be appreciated by those skilled in the art,, all belong to claim of the present invention and come restricted portion in any modification or partial replacement that does not depart from the scope of the present invention.

Claims (4)

  1. Under the automatic gain scene based on the background modeling method of camera response function, it is characterized in that in background subtraction method motion detection, under the camera automatic gain scene, the reference background frame is followed the variation of camera gain coefficient in real time, obtain the reference background frame identical, may further comprise the steps with the present frame gain coefficient:
    1) passes through based on the gradual analysis of automatic gain, the establishing target function, set the critical flase drop threshold value of automatic gain, the gray-value variation of the critical flase drop threshold value of described automatic gain during with the critical flase drop of system's generation automatic gain is characterized as according to setting, detect frame by frame whether the critical flase drop of automatic gain takes place, if take place then obtain the background area of rough segmentation, and use the method for joint histogram to obtain training data, be specially:
    11) the average item that utilizes weight maximum among the parameter camera response function EMoR approximate as camera response function CRF obtains gray scale difference value function BDF, and then the postiive gain when obtaining critical flase drop compares k PpWith negative ratio of gains k Nn:
    As 1<k c/ k r<k Pp, postiive gain then takes place but do not cause the motion flase drop as yet, work as k Nn<k c/ k r<1, then generation is born gain but is not caused motion flase drop, k as yet r, k cIt is respectively the gain coefficient of reference background frame R and present frame C;
    12) be respectively when the ratio of gains: critical flase drop postiive gain k Pp, 1, k during the negative gain of critical flase drop Nn, obtain the corresponding gray scale difference functions respectively, according to k Pp, 1, k NnCorresponding BDF curve is divided into four parts with image-region, constructs objective function with this, and when objective function takes place greater than the then critical flase drop of the critical flase drop threshold value of setting, and rough segmentation goes out the background area of present frame;
    13) background area pixels of rough segmentation is via the noise reduction process based on joint histogram, and removes and contain 0,255 data item, obtains the training data of low-dimensional;
    2) with resulting training data in the step 1) as the input data, by disposable recovery obtains the camera response function of global optimum based on the method for maximal possibility estimation and restriction on the parameters;
    3) maximal value of gray scale difference value is the monotonic increasing function about the ratio of gains, by the correlativity of the preceding background difference and the ratio of gains, and aforesaid monotonic increasing function, by preceding background frames and step 2) in the camera response function that recovered, ask for the ratio of gains frame by frame; Preceding background difference refers to the difference of present frame and reference background frame, and preceding background frames is the general designation of present frame and reference background frame;
    4) if the ratio of gains that step 3) is determined is not 1, then by the ratio of gains and step 2) the camera response function that recovers, obtain the reference background frame identical with the gain coefficient of present frame, otherwise the reference background frame is constant, upgrade the reference background frame thus frame by frame, obtain the reference background frame identical with the present frame gain coefficient.
  2. 2. based on the background modeling method of camera response function, it is characterized in that step 1) is specially under the automatic gain scene according to claim 1:
    11) establishing that the camera automatic gain causes in the entire image pixel quantity takes place is the absolute flase drop of N ', positive and negative ratio of gains k Pp, k NnFor
    k pp=min{k c/k r|num(BDF(B r(p i),k c/k r)>σ(p i))/N<N′;1≤i≤N}(1)
    k nn=min{k c/k r|num(BDF(B r(p i),k c/k r)<-σ(p i))/N<N′;1≤i≤N}(2)
    Wherein the collection of pixels in the entire image is P={p 1, p 2...., p N, N is a total number of image pixels; B r(p i), B r(p i) be respectively pixel p iThe gray-scale value of corresponding reference background frame R and the gray-scale value of present frame C; k r, k cIt is respectively the gain coefficient of reference background frame R and present frame C; σ (p i) be p iThe preceding background decision threshold that point is corresponding; Can obtain BDF by CRF; Num () represents qualified number of pixels;
    The distribution character of each image-region is respectively k by the ratio of gains during 12) according to critical flase drop Pp, 1, k NnThe time obtain corresponding BDF curve, structure objective function T is divided into four classes with image-region, when T takes place greater than the then critical flase drop of threshold value, and rough segmentation goes out background:
    Make x=I i, y BDF (I i, k j/ k i), k wherein i, k jBe respectively automatic gain two two field picture i of front and back, the pairing gain coefficient of j, k take place j/ k iBe the ratio of gains, I iBe the gray-scale value of i two field picture, k j/ k iBe respectively k Pp, k Nn, 1 o'clock, obtain curve y=Lp (x), y=Ln (x), y=0 is divided into four parts with image-region, P=PA ∪ PB ∪ PC ∪ PD, when automatic postiive gain taking place and be in critical flase drop, PA is the current background zone, and B is arranged r(p i)-B r(p i)>0, B r(p i)-B r(p i)<LP (B r(p i)); Automatic postiive gain when taking place in PB, and the former highlight regions of having powerful connections that the moving object of low gray-scale value shelters from has B r(p i)-B r(p i)<Ln (B r(p i)); PC when automatic postiive gain takes place for, the moving object of low gray-scale value shelters from former have powerful connections than dark areas, Ln (B is arranged r(p i))<B r(p i)-B r(p i)<0; PD when automatic postiive gain takes place for, the moving object of high gray-scale value shelters from former have powerful connections than dark areas, B is arranged r(p i)-B r(p i)>Lp (B r(p i)), and satisfy num (PA)>>num (PD), num (PB)>num (PC); When negative automatically gain taking place and be in critical flase drop, PA is that the moving object of high gray-scale value shelters from former gray-scale value upper zone of having powerful connections, and 0<B is arranged r(p i)-B r(p i)<Lp (B r(p i)); PB for the moving object of low gray-scale value shelters from former have powerful connections than dark areas, Ln (B is arranged r(p i))<B r(p i)-B r(p i); PC is the current background zone, and Ln (B is arranged r(p i))<B r(p i)-B r(p i)<0; Automatically negative gain takes place shelter from former low gray-scale value zone of having powerful connections because of the moving object that is high gray-scale value, PD is this zone, because cause strong gray scale difference value, B is arranged r(p i)-B r(p i)>Lp (B r(p i)), and satisfy num (PC)>>num (PB), num (PD)>num (PA),
    Set up objective function thus:
    T = num ( PA ) num ( PA ) + num ( PD ) - nun ( PC ) num ( PB ) + num ( PC ) - - - ( 3 )
    The T absolute value is big more, and then the probability that takes place of automatic gain is big more, and setting critical flase drop threshold value t is 0.75, makes that PBG is the background area pixels set of rough segmentation, and when T>t, postiive gain takes place but do not cause motion flase drop, PBG=PA automatically; When T<-during t, negative automatically gain takes place but does not cause motion flase drop, PBG=PC;
    13) based on the noise reduction process of joint histogram:
    Make H (IX, PX, the X) element number of the gray-scale value that is illustrated in collection of pixels PX among the image X from 0 to IX, promptly
    Figure FDA0000047852510000022
    B (px i, X) be pixel p x among the image X iGray-scale value, make joint histogram be:
    Q_BTF={(m,IC(m))|H(IC(m),PBG,C)=H(m,PBG,R)} (5)
    Wherein m ∈ { 0,1,2, ...., 255}, 0≤IC (m)≤255, R, C are respectively reference background frame and present frame, the character that is not subtracted by the CRF dullness, the Q_BTF element number is 256, the element that contains 0 or 255 among the Q_BTF is removed,, obtained gathering P_BTF to remove saturated and the error that is caused that end, element number M<255, P_BTF is the training data of low-dimensional.
  3. 3. based on the background modeling method of camera response function, it is characterized in that step 2 under the automatic gain scene according to claim 2) be specially:
    21) in the EMoR framework, based on logarithm and contrafunctional computing, gain coefficient is separated from CRF with scene illumination, in mathematical analysis, change into the input training data set V=P_BTF that linear regression problem: CRF recovers, V satisfies
    Figure FDA0000047852510000031
    IV iBe that gain coefficient is k iThe time the gradation of image value, IV jBe that gain coefficient is k jThe time the gradation of image value, M is the training data number, IV i, IV jSatisfy:
    IV i+ε=BTF ij(IV j) (8)
    Wherein BTF is a luminance transfer function, and ε is a Gaussian noise, recovers based on the CRF of maximal possibility estimation and restriction on the parameters under the EMoR framework, obtains globally optimal solution, to the general type negate function of EMoR with take the logarithm:
    ln k + ln q = ln ( RCF - 1 ( I ) ) = g 0 ( I ) + Σ n = 1 N d n l n ( I ) - - - ( 9 )
    l 1(I) ... .l N(I) be to CRF database D oRF negate function and the back of taking the logarithm use major component that pivot analysis PCA obtains by by main to time arrangement, g 0(I) be CRF database D oRF negate function and take the logarithm after average; Under desirable noise-free case, IV i, IV jCorresponding brightness value q is identical, and gain coefficient k difference, with IV i, IV jSubstitution formula (9) is also subtracted each other,
    ln ( k i / k j ) = g 0 ( IV i ) - g 0 ( IV j ) + Σ n = 1 N d n ( l n ( IV i ) - l n ( IV j ) ) - - - ( 10 )
    Under actual conditions, i.e. IV i, IV jSatisfy formula (8), then formula (10) is deformed into:
    ln ( k i / k j ) = g 0 ( IV i ) - g 0 ( IV j ) + Σ n = 1 N d n ( l n ( IV i ) - l n ( IV j + ϵ ) ) - - - ( 11 )
    Because ε is a Gaussian noise, has additive property, so formula (11) has:
    ln ( k i / k j ) = g 0 ( IV i ) - g 0 ( IV j ) + Σ n = 1 N d n ( l n ( IV i ) - l n ( IV j ) ) + ϵ ′ - - - ( 12 )
    Wherein the Gaussian noise that obtains for the linear operation of ε in formula (11) of ε ' makes d 0-ln (k i/ k j), have:
    g 0 ( IV j ) - g 0 ( IV i ) = d 0 + Σ n = 1 N d n ( l n ( IV i ) - l n ( IV j ) ) + ϵ ′ - - - ( 13 )
    Order:
    t(m)=g 0(IV j(m))-g 0(IV i(m))
    φ n ( m ) = l n ( IV i ( m ) ) - l n ( IV j ( m ) ) n ≠ 0 1 n = 0
    Then formula (13) becomes
    t ( m ) = Σ n = 0 N d n φ n ( m ) + ϵ ′ = d T Φ ( m ) + ϵ ′ - - - ( 14 )
    D wherein T=(d 0, d 1, d 2... .., d N), Φ=(φ 0, φ 1, φ 2... .., φ N) T, then following formula becomes the linear regression of standard;
    22) use the CRF based on maximal possibility estimation and restriction on the parameters to ask for, smallest error function is:
    E D ( d ) = 1 2 Σ m = 1 M { t ( m ) - d T Φ ( m ) } 2 - - - ( 15 )
    Wherein, M is the element number of set V, know by EMoR, and when formula (14) is got different n values, basis function l n(I) weight is different, and n is big more, and then the weight of Dui Ying basis function in expression formula is more little, and the respective weights coefficient is more little, the smallest error function under the operation parameter constraint:
    E(d)=E D(d)+λE d(d) (16)
    λ is constrained parameters, is diagonal matrix, 0<λ 1<λ 2<... ..<λ NBe the element on the matrix λ diagonal line,
    E d ( d ) = 1 2 d T d - - - ( 17 )
    With formula (15), (17) substitution formula (16):
    E ( d ) = 1 2 Σ m = 1 M { t ( m ) - d T Φ ( m ) } 2 + 1 2 λ d T d - - - ( 18 )
    By maximal possibility estimation, formula (18) is differentiated to d
    ▿ E ( d ) = Σ m = 1 M { t ( m ) - d T Φ ( m ) } Φ ( m ) T + λ d T - - - ( 19 )
    Make formula (19) be 0 and the distortion:
    0 = Σ m = 1 M t ( m ) Φ ( m ) T - d T ( Σ m = 1 M Φ ( m ) Φ ( m ) T + λ ) - - - ( 20 )
    Obtain:
    d=(λ+Φ TΦ) -1Φ Tt (21)
    Wherein
    Figure FDA0000047852510000051
    T=(t (1), t (2) ...., t (M))
    With formula (21) substitution formula (9), obtain CRF through asking the exponential sum function of negating.
  4. According under claim 2 or the 3 described automatic gain scenes based on the background modeling method of camera response function, it is characterized in that step 3) is specially:
    31) analyze that to obtain the BDF maximal value be monotonic increasing function about the ratio of gains, promptly both singly answer;
    32) ask for based on the automatic gain of homography:
    Make that the BDF maximal value is Δ MI (k j/ k i)), corresponding horizontal ordinate is MI (k j/ k i):
    (MI(k j/k i)=I i,ΔMI(k j/k i)=ΔI ji)|max{ΔI ji=BDF(I i,k j/k i)},0≤I i≤255 (22)
    If present frame C and reference background frame gray difference only cause all pixel p in the image so by automatic gain iCorresponding coordinate (x (i)=B r(p i), y (i)=B r(p i)-B r(p i)) formed distribution DC drop on curve D L:{ (x=I, y=Δ I) | Δ I=BDF (I, k c/ k r) on, and Δ MI (k c/ k r)=max (y (i)) by the homography of Δ MI, can obtain k c/ k rIf the prospect of doing exercises exists, k c/ k rInterval s kBe [k C-1/ k R-1-k_th, k C-1/ k R-1+ k_th], k C-1, k R-1Be the gain coefficient of previous frame C and B, k_th is a ratio of gains gradual change scope, gets 0.12, then obtains the interval s of MI correspondence m, ask DC at interval s mPeak value coordinate (MB, Δ MB):
    Figure FDA0000047852510000052
    Make MOI (k j/ k i)=MB obtains k by homography j/ k i=k m, in the ideal case, if the peak value that is caused by automatic gain then satisfies k simultaneously m∈ s k, MI (k m)=MB, the new ratio of gains is k c/ k r=k m, consider noise effect, when | MI (k m)-MB<TM, and k m∈ s k, then to upgrade the ratio of gains, otherwise be the peak value that causes by sport foreground, the ratio of gains is constant, and TM gets 5 here;
    33) according to step 32) ask for the ratio of gains frame by frame.
CN2011100448052A 2011-02-24 2011-02-24 Method for modeling background based on camera response function in automatic gain scene Expired - Fee Related CN102129689B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011100448052A CN102129689B (en) 2011-02-24 2011-02-24 Method for modeling background based on camera response function in automatic gain scene

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011100448052A CN102129689B (en) 2011-02-24 2011-02-24 Method for modeling background based on camera response function in automatic gain scene

Publications (2)

Publication Number Publication Date
CN102129689A true CN102129689A (en) 2011-07-20
CN102129689B CN102129689B (en) 2012-11-14

Family

ID=44267764

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011100448052A Expired - Fee Related CN102129689B (en) 2011-02-24 2011-02-24 Method for modeling background based on camera response function in automatic gain scene

Country Status (1)

Country Link
CN (1) CN102129689B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102509076A (en) * 2011-10-25 2012-06-20 重庆大学 Principal-component-analysis-based video image background detection method
CN105574896A (en) * 2016-02-01 2016-05-11 衢州学院 High-efficiency background modeling method for high-resolution video
CN109844825A (en) * 2016-10-24 2019-06-04 昕诺飞控股有限公司 There are detection systems and method
CN110049250A (en) * 2019-05-15 2019-07-23 重庆紫光华山智安科技有限公司 Image state switching method and device
CN110290318A (en) * 2018-12-29 2019-09-27 中国科学院软件研究所 Spaceborne image procossing and method and system of making decisions on one's own
CN113014827A (en) * 2021-03-05 2021-06-22 深圳英美达医疗技术有限公司 Imaging automatic gain compensation method, system, storage medium and ultrasonic endoscope

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1450444A (en) * 2002-04-09 2003-10-22 三星电子株式会社 Method and circuit for adjusting background contrast in display apparatus
CN101216888A (en) * 2008-01-14 2008-07-09 浙江大学 A video foreground extracting method under conditions of view angle variety based on fast image registration
CN101742319A (en) * 2010-01-15 2010-06-16 北京大学 Background modeling-based static camera video compression method and background modeling-based static camera video compression system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1450444A (en) * 2002-04-09 2003-10-22 三星电子株式会社 Method and circuit for adjusting background contrast in display apparatus
CN101216888A (en) * 2008-01-14 2008-07-09 浙江大学 A video foreground extracting method under conditions of view angle variety based on fast image registration
CN101742319A (en) * 2010-01-15 2010-06-16 北京大学 Background modeling-based static camera video compression method and background modeling-based static camera video compression system

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
《IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE》 20031130 Michael D. Grossberg et al Determining the Camera Response from Images: What Is Knowable? 全文 1-4 第25卷, 第11期 2 *
《Proceedings of the 8th International IEEE Conference on Intelligent Transportation Systems》 20050916 Rita Cucchiara et al Auto-iris Compensation for Traffic Surveillance Systems 全文 1-4 , 2 *
《计算机学报》 20060430 章卫祥 等 一个稳健的用于HDR图像的相机响应函数标定算法 全文 1-4 第29卷, 第4期 2 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102509076A (en) * 2011-10-25 2012-06-20 重庆大学 Principal-component-analysis-based video image background detection method
CN102509076B (en) * 2011-10-25 2013-01-02 重庆大学 Principal-component-analysis-based video image background detection method
CN105574896A (en) * 2016-02-01 2016-05-11 衢州学院 High-efficiency background modeling method for high-resolution video
CN105574896B (en) * 2016-02-01 2018-03-27 衢州学院 A kind of efficient background modeling method towards high-resolution video
CN109844825A (en) * 2016-10-24 2019-06-04 昕诺飞控股有限公司 There are detection systems and method
CN110290318A (en) * 2018-12-29 2019-09-27 中国科学院软件研究所 Spaceborne image procossing and method and system of making decisions on one's own
CN110049250A (en) * 2019-05-15 2019-07-23 重庆紫光华山智安科技有限公司 Image state switching method and device
CN110049250B (en) * 2019-05-15 2020-11-27 重庆紫光华山智安科技有限公司 Camera shooting state switching method and device
CN113014827A (en) * 2021-03-05 2021-06-22 深圳英美达医疗技术有限公司 Imaging automatic gain compensation method, system, storage medium and ultrasonic endoscope

Also Published As

Publication number Publication date
CN102129689B (en) 2012-11-14

Similar Documents

Publication Publication Date Title
US10810723B2 (en) System and method for single image object density estimation
Jodoin et al. Extensive benchmark and survey of modeling methods for scene background initialization
US8243991B2 (en) Method and apparatus for detecting targets through temporal scene changes
EP2959454B1 (en) Method, system and software module for foreground extraction
CN107123131B (en) Moving target detection method based on deep learning
CN102129689B (en) Method for modeling background based on camera response function in automatic gain scene
CN111797653B (en) Image labeling method and device based on high-dimensional image
CN108197546B (en) Illumination processing method and device in face recognition, computer equipment and storage medium
US9129379B2 (en) Method and apparatus for bilayer image segmentation
CN106886216B (en) Robot automatic tracking method and system based on RGBD face detection
US20140307917A1 (en) Robust feature fusion for multi-view object tracking
US10026004B2 (en) Shadow detection and removal in license plate images
US20070154088A1 (en) Robust Perceptual Color Identification
Stringa Morphological Change Detection Algorithms for Surveillance Applications.
CN113324864B (en) Pantograph carbon slide plate abrasion detection method based on deep learning target detection
CN105044122A (en) Copper part surface defect visual inspection system and inspection method based on semi-supervised learning model
CN103344583B (en) A kind of praseodymium-neodymium (Pr/Nd) component concentration detection system based on machine vision and method
CN112419261B (en) Visual acquisition method and device with abnormal point removing function
Tiwari et al. A survey on shadow detection and removal in images and video sequences
Raut et al. Detection and identification of plant leaf diseases based on python
CN114298948A (en) Ball machine monitoring abnormity detection method based on PSPNet-RCNN
Cao et al. Learning spatial-temporal representation for smoke vehicle detection
KR102171384B1 (en) Object recognition system and method using image correction filter
CN111127355A (en) Method for finely complementing defective light flow graph and application thereof
Cristani et al. A spatial sampling mechanism for effective background subtraction.

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
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20110720

Assignee: Nanjing Mdt InfoTech Ltd

Assignor: Nanjing University

Contract record no.: 2013320000099

Denomination of invention: Method for modeling background based on camera response function in automatic gain scene

Granted publication date: 20121114

License type: Exclusive License

Record date: 20130314

LICC Enforcement, change and cancellation of record of contracts on the licence for exploitation of a patent or utility model
ASS Succession or assignment of patent right

Owner name: NANJING HUICHUAN INDUSTRIAL VISUAL TECHNOLOGY DEVE

Free format text: FORMER OWNER: NANJING UNIVERSITY

Effective date: 20140612

C41 Transfer of patent application or patent right or utility model
COR Change of bibliographic data

Free format text: CORRECT: ADDRESS; FROM: 210093 NANJING, JIANGSU PROVINCE TO: 210042 NANJING, JIANGSU PROVINCE

TR01 Transfer of patent right

Effective date of registration: 20140612

Address after: 210042, Nanjing District, Jiangsu province Xu Xu Zhuang Software Park, B District, F District, three layers of research

Patentee after: NANJING HUICHUAN INDUSTRIAL VISUAL TECHNOLOGY DEVELOPMENT CO., LTD.

Address before: 210093 Nanjing, Gulou District, Jiangsu, No. 22 Hankou Road

Patentee before: Nanjing University

CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20121114

Termination date: 20200224

CF01 Termination of patent right due to non-payment of annual fee