CN105404847B - A kind of residue real-time detection method - Google Patents
A kind of residue real-time detection method Download PDFInfo
- Publication number
- CN105404847B CN105404847B CN201410472162.5A CN201410472162A CN105404847B CN 105404847 B CN105404847 B CN 105404847B CN 201410472162 A CN201410472162 A CN 201410472162A CN 105404847 B CN105404847 B CN 105404847B
- Authority
- CN
- China
- Prior art keywords
- residue
- prospect
- long period
- pixel
- gaussian
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Image Analysis (AREA)
Abstract
The present invention discloses a kind of residue real-time detection method, comprising the following steps: obtains video image data;Background modeling is carried out to video image using mixed Gauss model innovatory algorithm, establishes a long period background model and a short cycle background model respectively, wherein background is divided into stability region and dynamic area;Long period background model, which is subtracted, by current video frame obtains long period prospect FL, short cycle background model is subtracted by current video frame and obtains short cycle prospect FS;To long period prospect FLWith short cycle prospect FSIt is analyzed and is detected residue, mark residue and alarmed.The present invention models background using a kind of quick mixed Gauss model innovatory algorithm, and background is divided into stability region and dynamic area, improves the accuracy for leaving analyte detection, while improving the execution rate of algorithm.
Description
Technical field
The present invention relates to application of the computer vision technique in round-the-clock high-definition video monitoring system, and in particular to a kind of
Residue real-time detection method based on full HD video monitoring system under round-the-clock complicated light condition.
Background technique
Nearly 2 years, be the period of security industry high speed development, and safety problem is the major issue that the whole society pays close attention to jointly, is lost
Object detecting method is stayed to be that prevention is dangerous, guarantee an important measures of safety, especially with potential danger in security industry
It plays an important role in the high risk industry of danger, is similar to the high-risk fields such as airport, history relic sight spot, military control area
Institute.Remnant object detection method is mainly used in these Different high risk sites, is whether to have something lost to the region of user's critical concern monitoring
The object abandoned or left is automatically analyzed and is detected, when some object is left or abandoned certain time in some region
Afterwards, system can detecte out the object, can mark object, and trigger alarm to prevent unexpected generation.
Current remnant object detection method, primarily directed to the lower monitoring environment of clarity.And in Different high risk sites, it is right
The requirement for monitoring product is high, especially requires clarity higher and higher, the full HD web camera of current large-scale 1080P
It is generalized and is applied to these Different high risk sites, to amplify viewing afterwards, control details.Full HD web camera makes image clearly
Degree haves a qualitative leap, but also brings a series of problem of reality to high-definition monitoring system, the management for video image
It will be doubled and redoubled with the workload of ex-post analysis, it is higher to the requirement of real-time of residue analysis work.
In addition, existing remnant object detection method is primarily present following problem at present:
Mixed Gauss model is directlyed adopt at present and carries out background modeling, does not account for each frame of mixed Gaussian background modeling
It requires to be updated the parameter of each Gaussian function of each Color Channel of each pixel after video image, calculation amount is non-
It is often huge, it is difficult to meet the requirement of algorithm real-time, the limitation shows more especially in full HD video monitoring system
Obviously;Shadow detection method effect is poor at present, especially can not be by moving target under round-the-clock complicated light change condition
It is preferably separated with the movement shade of its projection;It is left in analyte detection at present and stringent pick is not carried out to the target of interference
It removes, causes the false detection rate of residue excessively high.
The Chinese invention patent application of Publication No. CN103714325A and publication number CN 102509075A individually disclose
One kind is based on residue and loses object detecting method, carries out background modeling using mixed Gauss model and establishes long period background
Model and short cycle background model, but there are still data renewal amount is big, the slow problem of processing speed.
The real-time of analyte detection is left in full HD video monitoring system under round-the-clock complicated light condition so how to improve
Property, accuracy, robustness are a problem to be solved.
Summary of the invention
Effect that present invention aim to address existing remnant object detection methods under round-the-clock complicated light change condition
The problem of difference, provides a kind of efficient remnant object detection method, is suitable for full HD video monitoring under whole day complexity light condition
Residue in system in real time, accurate detection.
To achieve the goals above, residue real-time detection method of the invention, comprising the following steps:
S10 obtains video image data;
S30 carries out background modeling to video image using mixed Gauss model innovatory algorithm, establishes a long period respectively
Background model and a short cycle background model, wherein background is divided into stability region and dynamic area, in stability region
In, in the background model of a pixel, what the pixel value that a Gaussian Profile and the every frame of mixed Gauss model newly enter matched
When frequency is higher than the threshold value of a setting, then each Gaussian Profile of the background model of the pixel is joined in next N frame image
Number all no longer updates, and after N frame, resets each Gaussian Distribution Parameters of mixed Gauss model and restarts to learn, until
There is Gaussian Profile to be greater than the threshold value of setting, so circulation with the matched frequency of pixel value newly entered repeatedly again;In dynamic area
In, in the background model of a pixel, two or three Gaussian functions are constantly alternately matched with the pixel value newly obtained, this is several
When the sum of a Gaussian function weight is greater than the threshold value of a setting, then the background model of the pixel in next M frame image
Each Gaussian Distribution Parameters all no longer update, and the mean value of these Gaussian Profiles is indicated to the background value of the pixel, in M frame
Afterwards, each Gaussian Distribution Parameters of mixed Gauss model are reset and restart to learn, until there is new Gaussian Profile weight
The sum of be greater than setting threshold value, so circulation repeatedly, wherein M, N are integer;
S40 subtracts long period background model by current video frame and obtains long period prospect FL, subtracted by current video frame
Short cycle background model is gone to obtain short cycle prospect FS;
S50, to long period prospect FLWith short cycle prospect FSIt is analyzed and is detected residue, mark residue simultaneously
It alarms.
Above-mentioned residue real-time detection method, wherein each height of mixed Gauss model is reset in the step S30
This distribution parameter includes the following steps:
S31, ωi,t/σi,tIt is worth weighted value corresponding to maximum Gaussian Profile to be set as:
S32, weight corresponding to remaining Gaussian Profile are all provided with are as follows:
Wherein, ωi,tWeight for i-th of Gaussian Profile in t moment, σi,tIt is i-th of Gaussian Profile in the side of t moment
Difference, K are the number of Gaussian function in mixed Gauss model,β is the [0,1) floating number in section.
Above-mentioned residue real-time detection method, wherein obtain video image by the way of taking out frame in the step S10
Data.
Above-mentioned residue real-time detection method, wherein further include following steps between the step S10 and step S30
S20, the step S20 include the following steps:
S21 carries out down-sampled processing to video image using bilinear interpolation value method.
Above-mentioned residue real-time detection method, wherein the step S20 further includes following steps:
S22 carries out noise reduction process to video image data collected under Night using Gaussian filter.
Above-mentioned residue real-time detection method, wherein the step S50 further includes following steps:
S510 eliminates long period prospect F using the cast shadow suppressing algorithm based on mixed GaussianLWith short cycle prospect FSIn
Move shade.
Above-mentioned residue real-time detection method, wherein the step S510 includes the following steps:
S511, using detecting long period prospect F based on the shadow model in hsv color spaceLWith short cycle prospect FSIn
Doubtful shade;
S512, according to long period prospect FLWith short cycle prospect FSIn be judged as the pixel of doubtful shade to carry out mixing high
The study of this shadow model updates;
S513 judges long period prospect FLWith short cycle prospect FSIn doubtful shade whether be movement shade, and eliminate length
Period prospect FLWith short cycle prospect FSIn movement shade.
Above-mentioned residue real-time detection method, wherein the step S50 further includes step S520, the step S520
Include the following steps:
S521, to long period prospect FLWith short cycle prospect FSBinary conversion treatment is carried out, long period prospect binary map is obtained
FL /With short cycle prospect binary map FS /;
S522 handles long period prospect binary map F using morphologic methodL /With short cycle prospect binary map FS /;
S523 eliminates long period prospect binary map F using the method for zone markerL /With short cycle prospect binary map FS /In
Connected region.
Above-mentioned residue real-time detection method, wherein the step S523 further includes following steps:
Using region-growing method to long period prospect binary map FL /With short cycle prospect binary map FS /In connected region into
Line flag calculates the area R of each connected regioniIf the area R of the connected regioniLess than scheduled area threshold Rmin, then will
The connected region is rejected from prospect.
Above-mentioned residue real-time detection method, wherein the step S50 further includes following steps:
S530, by analyzing long period prospect binary map FL /With short cycle prospect binary map FS /The characteristics of, in prospect
Target is classified, and the target object O of doubtful residue is obtainedcur, classifying rules are as follows:
FL /(x, y)=1 and FS /(x, y)=1, (x, y) point pixel belong to moving target;
FL /(x, y)=1 and FS /(x, y)=0, (x, y) point pixel belong to the target object O of doubtful residuecur;
FL /(x, y)=0 and FS /(x, y)=1, (x, y) point pixel belong to scene changes target or noise;
FL /(x, y)=0 and FS /(x, y)=0, (x, y) point pixel belong to target context.
Above-mentioned residue real-time detection method, wherein the step S50 further includes following steps:
S540 leaves using the method detection that objective contour is combined with target's center's peripheral region color histogram is doubtful
The target object O of objectcurIn take object O awayremove, and reject the target object O of doubtful residuecurIn take object O awayremove,
Obtain temporarily static target object Oabandon。
Above-mentioned residue real-time detection method, wherein the step S540 further includes following steps:
S541, according to target object OcurObjective contour feature judge that candidate takes object O awayEtemp;
S542, according to target object OcurCentral periphery field color histogram feature judges that candidate takes object O awayHtemp;
S543 takes object O away according to candidateEtempObject O is taken away with candidateHtemp, determining to take object O awayremove, reject doubtful leave
The target object O of objectcurIn take object O awayremove, obtain temporarily static target object Oabandon, the temporarily static mesh of judgement
Mark object OabandonWith take object O awayremoveDecision publicity are as follows:
Above-mentioned residue real-time detection method, wherein the step S50 further includes following steps:
S550 detects pedestrian using the pedestrian detection algorithm based on HOG and features of skin colors, rejects temporarily static object
Body OabandonIn static pedestrian, obtain the target object of candidate residue.
Above-mentioned residue real-time detection method, wherein the step S50 further includes following steps:
S560 carries out mass tracking to the target object of each candidate residue, and to the target of each candidate residue
The frame number Num of the lasting stop of objectiIt is counted respectively, when the accumulative frame number stopped of the target object of some candidate residue
More than the threshold value T of a settingnumWhen, i.e. Numi> Tnum, the target object of candidate's residue labeled as residue, leave by triggering
Object is alarmed, and marks the circumscribed rectangular region of residue in source images according to the logical place of the residue.
Remnant object detection method of the invention generates the good effect of the following:
Effect 1: the present invention takes out frame using video image, down-sampled processing method reduces at full HD video image analysis
The workload of reason improves the real-time of detection algorithm.
Effect 2: the present invention using selective gaussian filtering method, under round-the-clock monitoring mode, it is contemplated that daytime mould
Formula noise loss image quality is high, without being filtered;And the larger poor image quality of Night influence of noise, then it carries out
Filtering processing.Improve the robustness and flexibility of detection algorithm.
Effect 3: the present invention models background using a kind of quick mixed Gauss model innovatory algorithm.In view of mixed
Closing Gauss model especially suitable outdoor during background modeling has the case where complicated light conversion, but it calculates complexity, no
Only to background modeling, also prospect is modeled, real-time is poor.It is left with a kind of quick mixed Gauss model innovatory algorithm raising
The accuracy of analyte detection, while improving the execution rate of algorithm.
Effect 4: the present invention models the shade in prospect using mixed Gaussian shadow model, to shadow Detection effect
Preferably, moving target and the movement shade of its projection under round-the-clock complicated light change condition can preferably be separated.
Effect 5: the present invention uses stringent elimination method, eliminates jamming target (noise takes object, static pedestrian away) to something lost
The influence for staying object improves the accuracy of algorithm, reduces omission factor and false detection rate to the greatest extent.
Below in conjunction with the drawings and specific embodiments, the present invention will be described in detail, but not as a limitation of the invention.
Detailed description of the invention
Fig. 1 is the residue real-time detection method based on full HD video monitoring system under round-the-clock complicated light condition
Flow chart;
Fig. 2 is the flow chart that the algorithm of movement shade is detected based on mixed Gaussian shadow model.
Specific embodiment
Technical solution of the present invention is described in detail in the following with reference to the drawings and specific embodiments, to be further understood that
The purpose of the present invention, scheme and effect, but it is not intended as the limitation of scope of the appended claims of the present invention.
Residue provided by the invention based on full HD video monitoring system under round-the-clock complicated light condition is examined in real time
Survey method, the flow chart of this method as shown in Figure 1, specifically includes the following steps:
Step 10: obtaining video image data by the way of taking out frame.
The step uses one frame of every 30 frame pumping from streaming media server to carry out leaving analyte detection.Monitor camera is being captured
When image, image rate is maintained at 25 frames/second or 30 frames/second, and after full HD image further upgrades, frame per second can reach 60
Frame/second.Image data amount is too big, and is all greatly duplicate scene, it is not necessary that all locates to each frame image
Reason, reduces analysis workload by the way of taking out frame, while improving the real-time of detection algorithm.
Step 20: image pre-treatment carries out down-sampled processing to video image first, then to collecting under Night
Video image carry out gaussian filtering noise reduction process.
The step 20 further includes steps of
Step 21: down-sampled processing being carried out to video image using bilinear interpolation value method, which scales backsight
Frequency picture quality is high, eliminates the discontinuous situation of pixel.
Bilinear interpolation value method is arranged coordinate and is sat by the floating-point that reciprocal transformation obtains for a purpose pixel in image
Be designated as (i+u, j+v), wherein i, j are nonnegative integer, u, v be [0,1) floating number in section, then this pixel value f (i+u,
J+v can be) (i, j) by coordinate in original image, (i+1, j), (i, j+1), corresponding to (i+1, j+1) around four pixels value
It determines, it may be assumed that
F (i+u, j+v)=(1-u) (1-v) f (i, j)+(1-u) vf (i, j+1)
+u(1-v)f(i+1,j)+uvf(i+1,j+1)
Wherein f (i, j) indicates the pixel value at source images (i, j).
Step 22: noise reduction process being carried out to acquired image under Night using Gaussian filter, to day mode
Lower acquired image does not need then to carry out noise reduction process.Gaussian filtering is highly effective to inhibition noise.
Gaussian filter is a kind of average filter of Weighted Coefficients, the color of certain pixel by the nine grids centered on it picture
Plain weighted average determines, using the Gaussian filter template of 3*3, it may be assumed that
Step 30: using a kind of quick mixed Gauss model innovatory algorithm to background modeling, establishing a long week respectively
Phase background model and a short cycle background model.
Mixed Gauss model algorithm is that each Color Channel of each pixel for video image establishes one comprising K (3
~5) mixed Gauss model of a Gaussian function obtains preferable target detection effect, often wishes in order to handle complex scene
K is hoped to be the bigger the better, each function includes weights omega, mean μ, variance δ again in K Gaussian function2Three parameters, one frame of every acquisition
It requires to be updated three parameters of each Gaussian function of each Color Channel of each pixel after new video image, calculate
The calculation amount of method is very huge, is difficult to meet the requirement of real-time.
A kind of quick mixed Gauss model innovatory algorithm can not only handle complex scene and obtain preferable target detection effect
Fruit, and processing speed is improved, the Gaussian parameter to pixel is not all to update in every frame image, reduces mixed Gaussian
The parameter renewal frequency of model.
A kind of quick mixed Gauss model innovatory algorithm notices that usually only small part region is ratio in monitoring scene
It is more chaotic, and most of region be it is static, background is divided into stability region (most of static region) and dynamic area
(region of small part confusion).The pixel of stability region is always presented identical pixel value, and the pixel value is always and mixing
Same Gaussian Profile in Gaussian Background model matches, and the pixel value newly entered in this Gaussian Profile and image sequence matches
Frequency it is very high, the distribution of weights ω after overfittingi,tIt can larger and varianceIt is smaller, wherein ωi,tFor i-th of Gauss
It is distributed in the weight of t moment,It is i-th of Gaussian Profile in the variance of t moment, then ωi,t/σi,tKeep maximum for a long time, from
And can be using the mean value of same Gaussian Profile as the pixel value of background in the long period, therefore the background of stability region pixel is joined
Exponential model does not need every frame and is all updated.Mixed Gaussian background modeling algorithm is improved accordingly, when in a certain pixel
In background model, a certain Gaussian Profile is higher than certain threshold value with the frequency that the pixel value that every frame newly enters matches, then connects down
Each Gaussian Distribution Parameters of the background model of the pixel all no longer update in N (100~200) the frame image come, in N (100
~200) after frame, again each Gaussian Distribution Parameters ωi,tSetting starts to learn in the state of relatively equality, Zhi Daoyou
There is Gaussian Profile to be greater than the threshold value of setting, so circulation with the matched frequency of pixel value newly entered repeatedly.In addition to stability region
With outside above-mentioned innovatory algorithm, the speed of algorithm is also improved with the method in dynamic area.There is the chaotic dynamic moved repeatedly
Region, pixel always repeat that several values are presented, and are constantly trained, must be had to Gauss model by the pixel value newly obtained
Two or three Gaussian functions are constantly alternately matched with the pixel value newly obtained, the weights omega of these Gaussian functionsi,tIt can be compared with
Variance greatlyIt is smaller, ωi,t/σi,tKeep larger for a long time, and the weights omega between several Gaussian functionsi,tIt is not much different.When
These Gaussian function weights omegasi,tThe sum of when being greater than certain threshold value, then pixel in next M (10~50) frame image
Each Gaussian Distribution Parameters of the background model of point all no longer update, and the mean value of these Gaussian Profiles is indicated the pixel
Background value reset each Gaussian Distribution Parameters of mixed Gauss model after M (10~50) frame and restart to learn,
Until there is the sum of new Gaussian Profile weight to be greater than certain threshold value, recycle repeatedly.
The Gaussian Profile weight ω of a certain pixeli,tThe state of relatively equality is arrived in setting according to the following rules:
1)ωi,t/σi,tIt is worth weighted value corresponding to maximum Gaussian Profile to be set as:
2) weight corresponding to remaining Gaussian Profile is all provided with are as follows:
Wherein,β is the [0,1) floating number in section.
Step 40: current video frame is individually subtracted long and short cycle background model and obtains long period prospect FLWith short cycle prospect
FS。
Step 50: to long period prospect FLWith short cycle prospect FSIt is analyzed and is detected residue, mark residue
And it alarms.
Specifically, step 50 the following steps are included:
Step 510: long period prospect F is eliminated using a kind of cast shadow suppressing algorithm based on mixed GaussianLBefore short cycle
Scape FSIn movement shade.
Since monitoring scene is round-the-clock, light is complicated, and flow of the people is big, and the shade under the existing intense light conditions of shade has dim light again
Under the conditions of shade, or even there is shade and the overlapped situation of other targets, lead to not accurate real-time judge target
Risk cannot alarm in time.It needs to eliminate the shade in prospect when therefore leaving analyte detection.
Cast shadow suppressing algorithm mainly uses the cast shadow suppressing algorithm based on color space in existing remnant object detection method,
These methods to the detection of weak shade and inhibitory effect also compared with effectively, but not to the strong shadow inhibitory effect under high light conditions
It is very ideal.
First with shade the hsv color space the characteristics of, judgement is detected as cast shadow suppressing algorithm based on mixed Gaussian
Whether the pixel of sport foreground is doubtful shade, and non-doubtful shade is moving target.The picture is used if being judged as doubtful shade
Element value updates the parameter of mixed Gaussian shadow model, and finally judges that this pixel is shade or fortune with mixed Gaussian shadow model
Moving-target, if foreground pixel and effective shadow state of mixed Gaussian shadow model match, which determines
To move shade, it is otherwise judged to moving target.The cast shadow suppressing algorithm more effectively can inhibit shade to moving object detection
It influences, it is not only good to weak shadow Detection effect, moreover it is possible to largely to detect strong shadow, and there is stronger real-time.
The flow chart that the algorithm of movement shade is detected based on mixed Gaussian shadow model is as shown in Figure 2.
The step 510 further includes steps of
Step 511: detection long period prospect FLWith short cycle prospect FSIn doubtful shade.
Shade is detected using based on the shadow model in hsv color space, judges whether foreground pixel is doubtful shade
Decision formula is as follows:
In formula, IH(x,y)、IS(x,y)、IV(x, y) and SH(x,y)、SS(x,y)、SV(x, y) respectively indicate coordinate points (x,
Y) H, S, the V component of place's pixel new input value I (x, y) and background pixel value S (x, y).If I (x, y) is judged as shade,
This mask SP (x, y) is set to 1, and otherwise SP (x, y) is set to 0.0≤α of parameterS≤βS≤ 1, parameter alphaSValue will consider shade
Intensity, when the shade projected in background is stronger, αSIt is smaller, βSFor enhancing the robustness to noise, the i.e. brightness of present frame not
It can be too similar with background.Parameter τSLess than zero, parameter τRSelection then mainly debug by rule of thumb.
Step 512: according to long period prospect FLWith short cycle prospect FSIn be judged as the pixel of doubtful shade and mixed
The study of Gauss shadow model updates.In order to guarantee that mixed Gaussian shadow model is adequately learnt, background segment at not
Same region, each region is not necessarily intended to be connected to, but the pixel color values in each region are identical, as long as there is one in some region
Pixel point value is detected as doubtful shade, and the mixed Gaussian shadow model ginseng of all the points in this region is just updated with the pixel
Number.
Mixture Gaussian background model when mixed Gaussian shadow model and sport foreground detect the difference is that, mixing is high
This background model is learnt according to all input values of pixel, and mixed Gaussian shadow model is then according to before being detected as
Scape, and the input pixel value for being judged as doubtful shade carries out study update.In mixed Gaussian shadow model, if inputting doubtful yin
A certain Gaussian Profile meets in shadow value and shade Gauss model:
Wherein subscript S indicates mixed Gaussian shadow model.The distribution parameter updates according to the following rules:
If without Gaussian Profile and doubtful shadows pixels value ItMatching, then the smallest Gaussian Profile of weight will be by new height
This distribution is updated, and the mean value being newly distributed is It, initialize biggish standard deviationWith lesser weightRemaining Gauss
Distribution keeps identical mean value and variance, but their weight can decay, it may be assumed that
Finally, the weight of all Gaussian Profiles is normalized, and each branch is pressedIt arranges from big to small, ifK,Each Gaussian Profile byThe order of descending arrangement, if top n distribution meets following criterion,
This N number of distribution is considered as shade distribution, it may be assumed that
Step 513: judging long period prospect FLWith short cycle prospect FSIn doubtful shade whether be movement shade, and disappear
Except long period prospect FLWith short cycle prospect FSIn movement shade, eliminate movement shade prospect be moving target.
Judge doubtful shade whether be move shade decision formula it is as follows:
In formula, subscript S indicates mixed Gaussian shadow model, i=1,2, Λ, Kt.If I (x, y) is judged as movement yin
Shadow, then this mask SPP (x, y) is set to 1, and otherwise SPP (x, y) is set to 0.Even doubtful shade ItMean value is distributed with each shade
Absolute value of the difference be less than or equal to departmental standard difference DSTimes, then ItIt is judged to movement shade, is otherwise judged to moving target.
Step 520: respectively to long period prospect FLWith short cycle prospect FSCarry out post-processing operation, target in guarantee prospect
Integrality, and eliminate the influence of pinpoint target (noise spot).Obtain long period prospect binary map FL /With short cycle prospect two
Value figure FS /。
The step 520 further includes steps of
Step 521: to long period prospect FLWith short cycle prospect FSBinary conversion treatment is carried out, long period prospect two-value is obtained
Scheme FL /With short cycle prospect binary map FS /。
Step 522: long period prospect binary map F is handled using morphologic methodL /With short cycle prospect binary map FS /,
The integrality of target in guarantee prospect.To FL /And FS /Image carries out closed operation operation (first expanding post-etching), according to different
" structural element " fills the intracorporal minuscule hole of object, and the boundary of smooth target object while, which is not obvious, changes its face
Product.
Step 523: F is eliminated using the method for zone markerL /And FS /Small areas target (noise spot).Area is used first
The connected region in prospect is marked in domain growth method, calculates the area R of each connected regioni(the pixel that region includes
Number), if the area R of the connected regioniLess than scheduled area threshold Rmin, then the connected region is rejected from prospect.
Region-growing method utilize region growing thought, each growth course can one connected region of label, only need pair
Image, which carries out single pass, can mark all connected regions.Algorithm steps are as follows:
1) foreground image to be marked is inputted, a label matrix with input picture same size, a queue are initialized
And blip counting Index;
2) by sequential scan foreground image from left to right, from top to bottom, when the prospect picture that scanning is not labeled to one
When plain p, Index adds 1, and marks p (value of respective point is assigned to Index) in label matrix, meanwhile, the eight neighborhood point of p is scanned,
The foreground pixel not being labeled if it exists is then marked in label matrix, and is put into queue, the kind as region growing
Son;
3) when queue is not sky, a growth seed point p1 is taken out from queue, scans the eight neighborhood point of p1, if it exists
Not marked foreground pixel is then marked in label matrix, and is put into queue;
4) 3 are repeated until queue is sky, a connected region label is completed;
5) 2 are gone to, is finished until entire image is scanned, obtains the number Index of label matrix and connected region.
Step 530: by analyzing long period prospect binary map FL /With short cycle prospect binary map FS /The characteristics of, to prospect
In target classify, obtain the target object O of doubtful residuecur.The rule of classification is as follows:
1)FL /(x, y)=1 and FS /(x, y)=1, (x, y) point pixel belong to moving target;
2)FL /(x, y)=1 and FS /(x, y)=0, (x, y) point pixel belong to the target object O of doubtful residuecur;
3)FL /(x, y)=0 and FS /(x, y)=1, (x, y) point pixel belong to scene changes target or noise;
4)FL /(x, y)=0 and FS /(x, y)=0, (x, y) point pixel belong to target context;
Step 540: being taken away using the method detection that objective contour is combined with target's center's peripheral region color histogram
Object Oremove, eliminate and take object O awayremoveThe target object O of doubtful residue is rejected in influence to target in prospectcurIn take away
Object Oremove, obtain temporarily static target object Oabandon。
Object O is taken in judgement away in existing remnant object detection methodremoveMainly according to the contour feature of target, but in background wheel
In the case that exterior feature is more complicated, the method for edge matching can not remove false-alarm well, and target's center's peripheral region color is straight
The method of square map analysis can make up the shortcomings that edge matching colouring information is lost.
The target object O of doubtful residuecurInclude temporarily static target object OabandonWith take object O awayremove, the step
It is rapid to be mainly just to discriminate between temporarily static target object OabandonWith take object O awayremove, removal erroneous judgement.
The step 540 further includes steps of
Step 541: judging that candidate takes object O away according to objective contour featureEtemp。
Extract the target object O of doubtful residuecurIn ROI marginal point and current video frame in ROI marginal point,
And count OcurThe total N of the edge pixel point of each ROI in prospectcurAnd the corresponding edge the ROI picture in current video frame
The total N of vegetarian refreshmentstemp.Judge that candidate takes object O away according to objective contour featureEtempThe decision formula of judgement is as follows:
Wherein, TeIt is the threshold value for the edge pixel point difference that object is taken in judgement away.
Step 542: judging that candidate takes object O away according to target's center's peripheral region color histogram featureHtemp。
The decision formula judged according to target's center's peripheral region color histogram feature is as follows:
Wherein, TdThe distance threshold for being the temporarily static object of judgement and taking object away, if D two histograms of smaller explanation are got over
It is similar, it is bigger to be detected as a possibility that taking object away, otherwise a possibility that being detected as temporary stationary object is bigger.Calculate D value
Formula is as follows:
Wherein, HEAnd HCRespectively indicate peripheral region AEWith central area ACGrey level histogram, the gray scale of two histograms
Grade is identical, and gray scale normalization has all been carried out before calculating.
Step 543: object O is taken away according to candidateEtempObject O is taken away with candidateHtemp, determining to take object O awayremove, reject doubtful
The target object O of residuecurIn take object O awayremove, obtain temporarily static target object Oabandon。
The temporarily static target object O of judgementabandonWith take object O awayremoveDecision publicity it is as follows:
Step 550: detecting pedestrian using based on the pedestrian detection algorithm of HOG and features of skin colors, eliminate movement a distance
Temporarily static target object O is rejected in influence of the pedestrian static suddenly to target in prospect afterwardsabandonIn static pedestrian,
Obtain the target object of candidate residue.
Pedestrian detection algorithm based on HOG and features of skin colors not only takes full advantage of the good characteristic of HOG feature, Er Qieke
The problem that HOG vector dimension is big, calculating is slow has been taken, features of skin colors has been added, detection accuracy is significantly improved, reduce pedestrian's
False detection rate and omission factor.
One SVM of the step mainly first HOG of application positive negative sample as much as possible and features of skin colors description son training
Classifier, training SVM classifier is the process carried out offline, and selected positive and negative sample data is more, covering surface is wider,
The classifier classification results that training obtains are more accurate.Then target object O temporarily static in extraction prospectabandonHOG
Son is described with features of skin colors, is classified with trained SVM classifier, that is, can determine whether temporarily static target object
OabandonIt whether is temporarily static pedestrian target.Reject temporarily static target object OabandonIn pedestrian target, waited
Select the target object of residue.
Extract temporarily static target object OabandonHOG and features of skin colors description son algorithm steps it is as follows:
1) each temporarily static target object OabandonThe ROI for regarding a present frame as carries out gray processing to ROI;
2) standardization (normalization) of color space is carried out to ROI using Gamma correction method, it is therefore an objective to adjust pair of image
Than degree, reduce image local shade and illumination variation caused by influence, while the interference of noise can be inhibited;
3) gradient (including size and Orientation) of each pixel of ROI is calculated;Purpose be in order to capture profile information, while into
The interference that one step weakened light shines.
4) ROI is divided into multiple small cell factories (cell);
5) histogram of gradients for counting each cell, forms the Feature Descriptor of each cell;
6) block (block) will be formed per several cell, the Feature Descriptor of all cell is connected in a block
Just to obtain the HOG Feature Descriptor of the block.In order to improve calculating speed, integral vector is introduced when calculating HOG feature
Figure, this avoid computing repeatedly caused by the overlapping as block, improves calculating speed.
7) in each block, the statistics with histogram of n dimension is carried out to the number of pixel in the space Cb and Cr respectively, directly
The interval division of square figure is determined by RCb and RCr, each obtains features of skin colors description of a 2*n dimension.I.e. in each block
The interior 2*n dimensional vector that an expression colour of skin is added.The colour of skin of face has cluster property well, the information colour of skin in the space YCrCb
Value in the space CrCb only concentrates within the scope of some, can use this feature and it is distinguished with background and other colors
It opens.
8) in all block in ROI, the stronger block of some classification capacities is chosen as last feature, by this
HOG and features of skin colors description for the block being selected a bit, which are together in series, can be obtained by the HOG Feature Descriptor of the ROI.It should
HOG and features of skin colors description of ROI is final for the feature vector used of classifying.
Step 560: mass tracking being carried out to the target object of each candidate residue, and each candidate residue is continued
The frame number Num of stopiIt is counted respectively, when the accumulative frame number stopped of some object is more than certain threshold value TnumWhen, i.e. Numi
> Tnum, the target object of candidate's residue is labeled as residue, triggering residue alarm.And according to the logic of the residue
Position marks the circumscribed rectangular region of residue in source images.
Certainly, the present invention can also have other various embodiments, without deviating from the spirit and substance of the present invention, ripe
It knows those skilled in the art and makes various corresponding changes and modifications, but these corresponding changes and change in accordance with the present invention
Shape all should fall within the scope of protection of the appended claims of the present invention.
Claims (14)
1. a kind of residue real-time detection method, which comprises the following steps:
S10 obtains video image data;
S30 carries out background modeling to video image using mixed Gauss model innovatory algorithm, establishes a long period background respectively
Model and a short cycle background model, wherein background is divided into stability region and dynamic area, in stability region, when
In the background model of one pixel, the pixel value similarity mode rate that a Gaussian Profile and the every frame of mixed Gauss model newly enter is high
When the threshold value of a setting, then each Gaussian Distribution Parameters of the background model of the pixel are not in next N frame image
It updates again, after N frame, resets each Gaussian Distribution Parameters of mixed Gauss model and restart to learn, until there is height again
This is distributed the threshold value for being greater than setting with the matched frequency of pixel value newly entered, so circulation repeatedly;In dynamic area, when one
In the background model of pixel, each pixel is characterized using K Gaussian distribution model, and pixel is always corresponded to by statistical law
To several values repeated, by continuous model training, every time the new pixel value into pixel always with K Gaussian Profile mould
Two or three similarity modes in type, when the sum of these Gaussian function weights are greater than the threshold value of a setting, then next
M frame image in each Gaussian Distribution Parameters of background model of the pixel all no longer update, and by these Gaussian Profiles
Mean value indicate the background value of the pixel, after M frame, reset each Gaussian Distribution Parameters of mixed Gauss model and again
Start to learn, until there is the sum of new Gaussian Profile weight to be greater than the threshold value of setting, so circulation repeatedly, wherein M, N are whole
Number, the integer that K is 3 to 5;
S40 subtracts long period background model by current video frame and obtains long period prospect FL, subtracted by current video frame short
Period background model obtains short cycle prospect FS;
S50, to long period prospect FLWith short cycle prospect FSIt is analyzed and is detected residue, mark residue and carried out
Alarm.
2. residue real-time detection method according to claim 1, which is characterized in that reset in the step S30
Each Gaussian Distribution Parameters of mixed Gauss model include the following steps:
S31, ωi,t/σi,tIt is worth weighted value corresponding to maximum Gaussian Profile to be set as:
S32, weight corresponding to remaining Gaussian Profile are all provided with are as follows:
Wherein, ωi,tWeight for i-th of Gaussian Profile in t moment, σi,tIt is i-th of Gaussian Profile in the variance of t moment, K is
The number of Gaussian function in mixed Gauss model,β is the [0,1) floating number in section.
3. residue real-time detection method according to claim 1, which is characterized in that using pumping frame in the step S10
Mode obtain video image data.
4. residue real-time detection method according to claim 1, which is characterized in that the step S10 and step S30 it
Between further include following steps S20, the step S20 includes the following steps:
S21 carries out down-sampled processing to video image using bilinear interpolation value method.
5. residue real-time detection method according to claim 4, which is characterized in that the step S20 further includes as follows
Step:
S22 carries out noise reduction process to video image data collected under Night using Gaussian filter.
6. residue real-time detection method according to claim 1, which is characterized in that the step S50 further includes as follows
Step:
S510 eliminates long period prospect F using the cast shadow suppressing algorithm based on mixed GaussianLWith short cycle prospect FSIn movement
Shade.
7. residue real-time detection method according to claim 6, which is characterized in that the step S510 includes following step
It is rapid:
S511, using detecting long period prospect F based on the shadow model in hsv color spaceLWith short cycle prospect FSIn it is doubtful
Shade;
S512, according to long period prospect FLWith short cycle prospect FSIn be judged as doubtful shade pixel carry out mixed Gaussian yin
The study of shadow model updates;
S513 judges long period prospect FLWith short cycle prospect FSIn doubtful shade whether be movement shade, and eliminate long period
Prospect FLWith short cycle prospect FSIn movement shade.
8. residue real-time detection method according to claim 7, which is characterized in that the step S50 further includes step
S520, the step S520 include the following steps:
S521, to long period prospect FLWith short cycle prospect FSBinary conversion treatment is carried out, long period prospect binary map F is obtainedL /With it is short
Period prospect binary map FS /;
S522 handles long period prospect binary map F using morphologic methodL /With short cycle prospect binary map FS /;
S523 eliminates long period prospect binary map F using the method for zone markerL /With short cycle prospect binary map FS /Middle connected region
Domain.
9. residue real-time detection method according to claim 8, which is characterized in that the step S523 further includes as follows
Step:
Using region-growing method to long period prospect binary map FL /With short cycle prospect binary map FS /In connected region marked
Note, calculates the area R of each connected regioniIf the area R of the connected regioniLess than scheduled area threshold Rmin, then by the company
It is rejected from prospect in logical region.
10. residue real-time detection method according to claim 9, which is characterized in that the step S50 further includes as follows
Step:
S530, by analyzing long period prospect binary map FL /With short cycle prospect binary map FS /The characteristics of, to the target in prospect
Classify, obtains the target object O of doubtful residuecur, classifying rules are as follows:
FL /(x, y)=1 and FS /(x, y)=1, (x, y) point pixel belong to moving target;
FL /(x, y)=1 and FS /(x, y)=0, (x, y) point pixel belong to the target object O of doubtful residuecur;
FL /(x, y)=0 and FS /(x, y)=1, (x, y) point pixel belong to scene changes target or noise;
FL /(x, y)=0 and FS /(x, y)=0, (x, y) point pixel belong to target context.
11. residue real-time detection method according to claim 10, which is characterized in that the step S50 further include as
Lower step:
S540 detects doubtful residue with the method that target's center's peripheral region color histogram combines using objective contour
Target object OcurIn take object O awayremove, and reject the target object O of doubtful residuecurIn take object O awayremove, obtain
Temporarily static target object Oabandon。
12. residue real-time detection method according to claim 11, which is characterized in that the step S540 further include as
Lower step:
S541, according to target object OcurObjective contour feature judge that candidate takes object O awayEtemp;
S542, according to target object OcurCentral periphery field color histogram feature judges that candidate takes object O awayHtemp;
S543 takes object O away according to candidateEtempObject O is taken away with candidateHtemp, determining to take object O awayremove, reject doubtful residue
Target object OcurIn take object O awayremove, obtain temporarily static target object Oabandon, the temporarily static object of judgement
Body OabandonWith take object O awayremoveDecision publicity are as follows:
13. residue real-time detection method according to claim 11, which is characterized in that the step S50 further include as
Lower step:
S550 detects pedestrian using the pedestrian detection algorithm based on HOG and features of skin colors, rejects temporarily static target object
OabandonIn static pedestrian, obtain the target object of candidate residue.
14. residue real-time detection method according to claim 13, which is characterized in that the step S50 further include as
Lower step:
S560 carries out mass tracking to the target object of each candidate residue, and to the target object of each candidate residue
Lasting stop frame number NumiIt is counted respectively, when the accumulative frame number stopped of the target object of some candidate residue is more than
The threshold value T of one settingnumWhen, i.e. Numi> Tnum, the target object of candidate's residue is labeled as residue, triggering residue report
It warns, and marks the circumscribed rectangular region of residue in source images according to the logical place of the residue.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410472162.5A CN105404847B (en) | 2014-09-16 | 2014-09-16 | A kind of residue real-time detection method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410472162.5A CN105404847B (en) | 2014-09-16 | 2014-09-16 | A kind of residue real-time detection method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105404847A CN105404847A (en) | 2016-03-16 |
CN105404847B true CN105404847B (en) | 2019-01-29 |
Family
ID=55470326
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410472162.5A Active CN105404847B (en) | 2014-09-16 | 2014-09-16 | A kind of residue real-time detection method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105404847B (en) |
Families Citing this family (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107545559A (en) * | 2016-06-29 | 2018-01-05 | 鸿富锦精密电子(天津)有限公司 | Legacy decision-making system and legacy decision method |
CN106650638A (en) * | 2016-12-05 | 2017-05-10 | 成都通甲优博科技有限责任公司 | Abandoned object detection method |
CN108629254B (en) * | 2017-03-24 | 2020-11-27 | 杭州海康威视数字技术股份有限公司 | Moving target detection method and device |
CN107292284B (en) * | 2017-07-14 | 2020-02-28 | 成都通甲优博科技有限责任公司 | Target re-detection method and device and unmanned aerial vehicle |
CN108053418B (en) * | 2017-11-29 | 2020-10-23 | 中国农业大学 | Animal background modeling method and device |
CN109583414B (en) * | 2018-12-10 | 2020-12-22 | 江南大学 | Indoor road occupation detection method, device, medium and processor based on video detection |
CN109948455B (en) * | 2019-02-22 | 2020-12-18 | 中科创达软件股份有限公司 | Detection method and device for left-behind object |
CN110232359B (en) * | 2019-06-17 | 2021-10-01 | ***通信集团江苏有限公司 | Retentate detection method, device, equipment and computer storage medium |
CN111062273B (en) * | 2019-12-02 | 2023-06-06 | 青岛联合创智科技有限公司 | Method for tracing, detecting and alarming remaining articles |
CN111369529B (en) * | 2020-03-04 | 2021-05-14 | 厦门星纵智能科技有限公司 | Article loss and leave-behind detection method and system |
CN111524158B (en) * | 2020-05-09 | 2023-03-24 | 黄河勘测规划设计研究院有限公司 | Method for detecting foreground target in complex scene of hydraulic engineering |
CN111723773B (en) * | 2020-06-30 | 2024-03-29 | 创新奇智(合肥)科技有限公司 | Method and device for detecting carryover, electronic equipment and readable storage medium |
CN112070033A (en) * | 2020-09-10 | 2020-12-11 | 天津城建大学 | Video carry-over detection method based on finite-state machine analysis |
CN112560655A (en) * | 2020-12-10 | 2021-03-26 | 瓴盛科技有限公司 | Method and system for detecting masterless article |
CN113743212B (en) * | 2021-08-02 | 2023-11-14 | 日立楼宇技术(广州)有限公司 | Method and device for detecting congestion or carryover at entrance and exit of escalator and storage medium |
CN114022468B (en) * | 2021-11-12 | 2022-05-13 | 珠海安联锐视科技股份有限公司 | Method for detecting article left-over and lost in security monitoring |
CN115272174B (en) * | 2022-06-15 | 2023-05-19 | 武汉市市政路桥有限公司 | Municipal road detection method and system |
CN114926463B (en) * | 2022-07-20 | 2022-09-27 | 深圳市尹泰明电子有限公司 | Production quality detection method suitable for chip circuit board |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102509075A (en) * | 2011-10-19 | 2012-06-20 | 北京国铁华晨通信信息技术有限公司 | Remnant object detection method and device |
CN103714325A (en) * | 2013-12-30 | 2014-04-09 | 中国科学院自动化研究所 | Left object and lost object real-time detection method based on embedded system |
US8798403B2 (en) * | 2012-01-31 | 2014-08-05 | Xerox Corporation | System and method for capturing production workflow information |
-
2014
- 2014-09-16 CN CN201410472162.5A patent/CN105404847B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102509075A (en) * | 2011-10-19 | 2012-06-20 | 北京国铁华晨通信信息技术有限公司 | Remnant object detection method and device |
US8798403B2 (en) * | 2012-01-31 | 2014-08-05 | Xerox Corporation | System and method for capturing production workflow information |
CN103714325A (en) * | 2013-12-30 | 2014-04-09 | 中国科学院自动化研究所 | Left object and lost object real-time detection method based on embedded system |
Non-Patent Citations (1)
Title |
---|
改进双背景模型的遗留物检测算法研究;李亚辉等;《计算机工程与设计》;20140630;第35卷(第6期);第2192-2196页 |
Also Published As
Publication number | Publication date |
---|---|
CN105404847A (en) | 2016-03-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105404847B (en) | A kind of residue real-time detection method | |
CN110516609B (en) | Fire disaster video detection and early warning method based on image multi-feature fusion | |
CN104392468B (en) | Based on the moving target detecting method for improving visual background extraction | |
CN102542289B (en) | Pedestrian volume statistical method based on plurality of Gaussian counting models | |
CN103632158B (en) | Forest fire prevention monitor method and forest fire prevention monitor system | |
CN109918971B (en) | Method and device for detecting number of people in monitoring video | |
CN105513053B (en) | One kind is used for background modeling method in video analysis | |
CN105184818B (en) | A kind of video monitoring anomaly detection method and its detecting system | |
CN113537099B (en) | Dynamic detection method for fire smoke in highway tunnel | |
CN107025652A (en) | A kind of flame detecting method based on kinetic characteristic and color space time information | |
CN106127812B (en) | A kind of passenger flow statistical method of the non-gate area in passenger station based on video monitoring | |
Vosters et al. | Background subtraction under sudden illumination changes | |
CN110263609A (en) | A kind of automatic identifying method of safety cap wear condition | |
CN106204594A (en) | A kind of direction detection method of dispersivity moving object based on video image | |
CN102760230B (en) | Flame detection method based on multi-dimensional time domain characteristics | |
CN107154044B (en) | Chinese food image segmentation method | |
Karpagavalli et al. | Estimating the density of the people and counting the number of people in a crowd environment for human safety | |
CN105096342A (en) | Intrusion detection algorithm based on Fourier descriptor and histogram of oriented gradient | |
CN109255326A (en) | A kind of traffic scene smog intelligent detecting method based on multidimensional information Fusion Features | |
CN108921857A (en) | A kind of video image focus area dividing method towards monitoring scene | |
CN103198319A (en) | Method of extraction of corner of blurred image in mine shaft environment | |
CN106570885A (en) | Background modeling method based on brightness and texture fusion threshold value | |
CN107103301B (en) | Method and system for matching discriminant color regions with maximum video target space-time stability | |
CN103049748A (en) | Behavior-monitoring method and behavior-monitoring system | |
CN102609710B (en) | Smoke and fire object segmentation method aiming at smog covering scene in fire disaster image video |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |