CN105488814A - Method for detecting shaking backgrounds in video - Google Patents

Method for detecting shaking backgrounds in video Download PDF

Info

Publication number
CN105488814A
CN105488814A CN201510836815.8A CN201510836815A CN105488814A CN 105488814 A CN105488814 A CN 105488814A CN 201510836815 A CN201510836815 A CN 201510836815A CN 105488814 A CN105488814 A CN 105488814A
Authority
CN
China
Prior art keywords
pixel
matrix
shake
value
local updating
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201510836815.8A
Other languages
Chinese (zh)
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.)
South China University of Technology SCUT
Original Assignee
South China University of Technology SCUT
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 South China University of Technology SCUT filed Critical South China University of Technology SCUT
Priority to CN201510836815.8A priority Critical patent/CN105488814A/en
Publication of CN105488814A publication Critical patent/CN105488814A/en
Pending legal-status Critical Current

Links

Abstract

The invention discloses a method for detecting shaking backgrounds in a video. The method comprises the following steps: S1, obtaining a to-be-detected video sequence; S2, calculating a local updating count of each pixel in each frame image of the video sequence; S3, according to the local updating count of each pixel, calculating the shake measure of each pixel to further obtain a shake measure matrix of each frame image; S4, clustering all elements of the shake measure matrix in two categories, and marking one category, in which pixels of relatively few elements are located, as S1; and S5, marking all pixel points in the S1 as the shaking backgrounds. According to the method, the shaking backgrounds are identified, so that the influences of the shaking backgrounds on moving foreground extraction can be eliminated and the accuracy of a moving foreground algorithm in the video can be improved.

Description

A kind ofly detect in video the method for shaking background
Technical field
The present invention relates to computer vision field, be specifically related to a kind ofly detect in video the method for shaking background.
Background technology
Moving object detection in video is the basis of intelligent video analysis, is one of major issue in computer vision field, its objective is to be extracted from background image by interested Moving Objects from video sequence image.Motion detection is widely used in the fields such as computer vision, pattern-recognition, target recognition and tracking, moving image encoding, security monitoring.But, due to the dynamic change of background image, as the impact of weather, illumination, shadow, shake background etc., make moving object detection become one quite difficulty work.In the present invention, shake background refers to the part of shaking regularly in background, the leaf comprising swing, the ripples flickered, the flag and colored ribbon etc. that float, these backgrounds are in video also in motion, therefore existing algorithm of target detection is usually judged to be prospect mistakenly, have impact on Detection results.
Current existing moving target detecting method ultimate principle algorithmically can be divided three classes: frame differential method, background subtracting method and optical flow method.Background subtracting method is a kind of wherein method be generally used, and this method adopts the present frame of image sequence and reference background model relatively to detect moving object.This class methods speed is fast, and accuracy is good, is easy to realize, and a lot of researchist has carried out studying comparatively widely in background modeling.Wherein code book model method is representational common method, more effectively can adapt to localized variation and the global change of illumination, but actual Detection results display, although the method can detect static background preferably, but shake background can not be removed well, for this reason, the present invention proposes a kind of method detecting shake background.
Summary of the invention
In order to overcome shortcoming that prior art exists with not enough, the invention provides and a kind ofly detect in video the method for shaking background.
The present invention adopts following technical scheme:
Detect in video a method of shaking background, comprise the steps:
S1 obtains video sequence to be detected;
S2 calculates the local updating counting of each pixel in the every two field picture of video sequence;
S3 counts according to the local updating of each pixel, and the shake calculating each pixel is estimated, and matrix is estimated in the shake obtaining every two field picture further;
The all elements cluster that S4 estimates matrix to shake is 2 classes, and a class of getting the pixel place of less element is designated as S 1;
S5 is by S 1in all pixels be labeled as shake background.
Described S2 calculates the local updating counting of each pixel in the every two field picture of video sequence, is specially:
In code book model, comprise the training step of code book, in the code book training stage, each pixel has multiple code word, makes λ (x, y)represent the longest minimum value of not mating interval in all code words of pixel (x, y), in like manner, λ [8-n (x, y)]represent the longest interval of not mating of eight neighborhood pixel of pixel (x, y), wherein (x, what y) represent is 8 neighborhood points of pixel (x, y) to 8-n;
The local updating defining each pixel (x, y) is counted as and compares according to the recent renewal time of around eight pixels and central pixel point and add up, thus obtains this pixel local updating count value at a time, and formula is as follows:
LUC ( x , y ) = &Sigma; n = 1 8 L n , Then L n = 1 , &lambda; &lsqb; 8 - n ( x , y ) &rsqb; < &lambda; ( x , y ) 0 , O t h e r w i s e .
Shake the degrees of shaking estimated for describing each pixel in described S3, detailed process is as follows:
S3.1 remembers that the resolution of training sample image is the matrix of H × W, initialization size H × W, T (0), S (0)for the null matrix of initialization matrix;
S3.2, by t and the LUC value in t-1 moment, calculates the matrix T of current time t picture frame (t), be defined as
T (t)=|LUC (t)-LUC (t-1)|;
S3.3 threshold value T preset time lif, pixel (x, y), the λ of 1≤x≤H, 1≤y≤W (x, y)value is greater than threshold value T l, represent that this pixel is at T ldo not upgrade in time period, then to T (t)each element carry out upgrading and obtain new matrix T (t):
T ( x , y ) ( t ) = 0 , &lambda; ( x , y ) &GreaterEqual; T L T ( x , y ) ( t ) , O t h e r w i s e
Wherein for matrix T (t)element.
S3.4 uses following formula accumulated matrix T (t)value, obtain matrix S (t), be referred to as shake and estimate;
S (t)=S (t-1)+T (t)
Described T lscope (15,30).
Beneficial effect of the present invention:
(1) propose the concept of local updating counting, utilize comparing and statistics of the pixel recent renewal time of pixel and surrounding neighbors, the local updating situation of pixel color attribute can be reflected, contribute to classifying further and the renewing speciality of statistical pixel;
(2) propose to shake the concept estimated, by the further process counted local updating, obtain each pixel of quantitative identification be motion prospect, static background, or shake as backgrounds such as leaf, colored ribbon, ripples, obtain the method judging pixel class clearly;
(3) by the discriminant classification to pixel, better can understand scene, contribute to the higher level application that other need scene to understand;
(4) by identifying the background of shake, the impact that shake background is extracted sport foreground can be eliminated, improve the accuracy of sport foreground algorithm in video.
Accompanying drawing explanation
Fig. 1 is method flow diagram of the present invention;
Fig. 2 is that results contrast figure is estimated in leaf of the present invention shake.
Fig. 3 is that results contrast figure estimated by leaf colored ribbon.
Embodiment
Below in conjunction with embodiment and accompanying drawing, the present invention is described in further detail, but embodiments of the present invention are not limited thereto.
Embodiment
The present invention is quantitatively described the degrees of shaking of object in video sequence, proposes a kind of method identifying targetedly and extract shake background.First propose local updating counting and shake the concept estimated, sue for peace according to the local updating counting of pixel historical frames afterwards, the summation utilizing this to try to achieve calculates shake and estimates in modeling process, then by cluster sport foreground, static background and shake background separately.Method in this paper not only can improve the accuracy rate of foreground detection, also can be used for the research and apply that relevant video scene is understood.
As shown in Figure 1, a kind ofly detect in video the method for shaking background, comprise the steps:
S1 obtains video sequence to be detected;
S2 calculates the local updating counting of each pixel in the every two field picture of video sequence;
In order to describe certain pixel regeneration characteristics at a time, the present invention proposes local updating counting (LUC-LocalUpdateCount) concept.For studying the regeneration characteristics of some pixels, the recent renewal time according to around eight pixels and central pixel point compares and adds up, thus obtains the local updating count value of this point, and method is as follows.
In the code book model proposed in prior art, comprise the training step of code book, in the code book training stage, each pixel has multiple code word, in code book model, makes λ (x, y)represent minimum in all code words of pixel (x, y) and the longlyest do not mate interval (MNRL), λ (x, y)less, pixels illustrated was mated recently, also meaned most recently updated.In like manner, λ [8-n (x, y)]represent that the longest of eight neighborhood pixel of pixel (x, y) does not mate interval.Definition
L n = 1 , &lambda; &lsqb; 8 - n ( x , y ) &rsqb; < &lambda; ( x , y ) 0 , O t h e r w i s e
Then the formula of LUC and local updating counting is.
LUC ( x , y ) = &Sigma; n = 1 8 L n
That is, concerning pixel (x, y), 8 points around minimum the longest does not mate little than central point (x, y) of interval, then L nvalue is 1, otherwise is zero, and the local updating counting LUC that (x, y) puts (x, y)be 8 field point L nvalue sum.Can the regeneration characteristics of a certain pixel of quantitative description by above-mentioned two formula, more than the pixel number of center recent renewal in neighborhood, LUC will be larger, otherwise LUC will be less, levels off to 0.
In table 1,1,2,3,4,5,6,7,8 is pixel (x, y) numbering of each pixel in eight neighborhood, table 2 is the longest interval λ non-match time (MNRL) of each pixel of eight neighborhood pixel, the eight neighborhood pixel getting central point in table 1 compares, and the λ value according to them calculates regeneration characteristics.If the λ of neighborhood point is less than central point, represent neighborhood newer than center, then arranging this neighborhood territory pixel value is 1, otherwise is then set to 0.All obtain right figure relatively afterwards.In the rightest figure, neighborhood value is cumulative asks summation, just obtains the LUC eigenwert of central pixel point.
S3 counts according to the local updating of each pixel, and the shake calculating each pixel is estimated, and matrix is estimated in the shake obtaining every frame;
The resolution of note training sample image is H × W, and the present invention proposes to shake the concept estimated, the degrees of shaking of each pixel of its energy quantitative description.It is calculated as described below:
(1) initialization size is the matrix T of H × W (0), S (0)for the null matrix of initialization matrix.
(2) by t and the LUC value in t-1 moment, the matrix T of current time t picture frame is calculated (t), be defined as
T (t)=|LUC (t)-LUC (t-1)|
(3) given threshold value T lif, the λ of pixel (x, y) (1≤x≤H, 1≤y≤W) (x, y)value is greater than threshold value T l, represent that this pixel is at T ldo not upgrade in time period.Then to T (t)each element upgrade:
T ( x , y ) ( t ) = 0 , &lambda; ( x , y ) &GreaterEqual; T L T ( x , y ) ( t ) , O t h e r w i s e
Obtain new matrix T (t), T here lspan be (15,30).Use the value of following formula accumulated matrix, obtain matrix S (t), be referred to as shake and estimate.
S (t)=S (t-1)+T (t)
Described cumulative S (1)=S (0)+ T (1), then S (2)=S (1)+ T (2)......
T (t)this value, when t is greater than 0, is all calculated by the formula in S3.2 at every turn, and S (0)be defined as 0.
For have the people of motion, static background, shake the video of leaf be example, for static background point, because its central point λ value is all 0, obtaining LUC value is 0, thus shake to estimate matrix S value be 0; And for the leaf rocked, its λ value is generally smaller, T (t)matrix can not be cleared.When leaf pixel is detected as prospect, the most unlucky survey of the pixel around it is prospect, and the pixel around it is unlucky (λ value of background is all 0) mostly, and LUC value is obtained larger.And due to shake, this pixel of subsequent time may be detected as again background, and this pixel of the subsequent time obtained may be detected as again background, then the LUC value obtained is 0, and the matrix T obtained is then larger.After accumulation a period of time, the matrix S of shake background can obviously increase; And for the region that people appears at, its neighborhood territory pixel λ value size is close, and λ value major part is greater than T l, T (t)be set to 0, thus the shake of people estimate compare shake leaf less.Result as shown in Figure 2.The example of another colored ribbon as shown in Figure 3.Can find out, the shake situation of really energy accurate response background is estimated in the shake that the present invention proposes.
As shown in Figure 2, along with the carrying out of the training of code book algorithm, about 150 frames, namely separate static background, the leaf of gentle agitation, the leaf of violent shake and prospect (people) by shaking the calculating estimated.
As shown in Figure 3, about 120 frames, namely static background, the colored ribbon slightly floated, the colored ribbon acutely floated and prospect (people) is separated by shaking the calculating estimated.
The all elements cluster that S4 estimates matrix to shake is 2 classes, and a class of getting the pixel place of less element is designated as S 1;
In the present invention, code book model training can estimate matrix S to the shake of pixel after terminating (t)do cluster and improve efficiency in testing process with this.The present invention adopts K-means cluster, and in order to get rid of the randomness of K-means method, consider that in real Scene, shake factor always accounts for the less part of image scaled, we are by matrix S (t)element to gather be 2 classes, a class of getting the pixel place of less element is designated as S 1.
S5 is by S 1in all pixels be labeled as shake background.
Ergodic Matrices S 1in all pixels, extract all S 1in pixel and be labeled as shake background.
Idiographic flow is as follows:
(1) frame of video x is read in t, frame number t adds 1;
(2) the LUCt matrix calculating present frame estimates s-matrix with rocking;
(3) if frame number t%T k==0;
(3.1) according to S (t)the value of matrix carries out Kmeans cluster to pixel, and clusters number value is herein 2, namely branches away the background into shake and the background of non-rocking;
(3.2) cluster complete after pixel be divided into two classes, a class is the background of rocking, and another kind of is the prospect of static background and motion;
(3.3) obtain the foreground image removing background, and s-matrix is reset to null matrix;
Otherwise (i.e. t%T (4) kunequal to 0), then enter into next detection.
Generally consider that background can dynamic change, thus except the training stage terminate after can perform cluster, also can perform once every frame in testing process.Because the time loss of clustering algorithm is larger, for meeting the real-time of detection algorithm, T kvalue generally according to frame per second, get the frame number of 6-8 second.
Above-described embodiment is the present invention's preferably embodiment; but embodiments of the present invention are not limited by the examples; change, the modification done under other any does not deviate from Spirit Essence of the present invention and principle, substitute, combine, simplify; all should be the substitute mode of equivalence, be included within protection scope of the present invention.

Claims (4)

1. detect in video a method of shaking background, it is characterized in that, comprise the steps:
S1 obtains video sequence to be detected;
S2 calculates the local updating counting of each pixel in the every two field picture of video sequence;
S3 counts according to the local updating of each pixel, and the shake calculating each pixel is estimated, and matrix is estimated in the shake obtaining every two field picture further;
The all elements cluster that S4 estimates matrix to shake is 2 classes, and a class of getting the pixel place of less element is designated as S 1;
S5 is by S 1in all pixels be labeled as shake background.
2. method according to claim 1, is characterized in that, described S2 calculates the local updating counting of each pixel in the every two field picture of video sequence, is specially:
In code book model, comprise the training step of code book, in the code book training stage, each pixel has multiple code word, makes λ (x, y)represent the longest minimum value of not mating interval in all code words of pixel (x, y), in like manner, λ [8-n (x, y)]represent the longest interval of not mating of eight neighborhood pixel of pixel (x, y), wherein (x, what y) represent is 8 neighborhood points of pixel (x, y) to 8-n;
The local updating defining each pixel (x, y) is counted as and compares according to the recent renewal time of around eight pixels and central pixel point and add up, thus obtains this pixel local updating count value at a time, and formula is as follows:
LUC ( x , y ) = &Sigma; n = 1 8 L n , Then L n = 1 , &lambda; &lsqb; 8 - n ( x , y ) &rsqb; < &lambda; ( x , y ) 0 , O t h e r w i s e .
3. method according to claim 1, is characterized in that, shake the degrees of shaking estimated for describing each pixel in described S3, detailed process is as follows:
S3.1 remembers that the resolution of training sample image is the matrix of H × W, initialization size H × W, T (0), S (0)for the null matrix of initialization matrix;
S3.2, by t and the LUC value in t-1 moment, calculates the matrix T of current time t picture frame (t), be defined as
T (t)=|LUC (t)-LUC (t-1)|;
S3.3 threshold value T preset time lif, pixel (x, y), the λ of 1≤x≤H, 1≤y≤W (x, y)value is greater than threshold value T l, represent that this pixel is at T ldo not upgrade in time period, then to T (t)each element carry out upgrading and obtain new matrix T (t):
Wherein for matrix T (t)element;
S3.4 uses following formula accumulated matrix T (t)value, obtain matrix S (t), be referred to as shake and estimate;
S (t)=S (t-1)+T (t)
4. method according to claim 3, is characterized in that, described T lscope (15,30).
CN201510836815.8A 2015-11-25 2015-11-25 Method for detecting shaking backgrounds in video Pending CN105488814A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510836815.8A CN105488814A (en) 2015-11-25 2015-11-25 Method for detecting shaking backgrounds in video

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510836815.8A CN105488814A (en) 2015-11-25 2015-11-25 Method for detecting shaking backgrounds in video

Publications (1)

Publication Number Publication Date
CN105488814A true CN105488814A (en) 2016-04-13

Family

ID=55675780

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510836815.8A Pending CN105488814A (en) 2015-11-25 2015-11-25 Method for detecting shaking backgrounds in video

Country Status (1)

Country Link
CN (1) CN105488814A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115022675A (en) * 2022-07-01 2022-09-06 天翼数字生活科技有限公司 Video playing detection method and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100158372A1 (en) * 2008-12-22 2010-06-24 Electronics And Telecommunications Research Institute Apparatus and method for separating foreground and background
US20110142343A1 (en) * 2009-12-11 2011-06-16 Electronics And Telecommunications Research Institute Method and apparatus for segmenting multi-view images into foreground and background based on codebook
CN103578119A (en) * 2013-10-31 2014-02-12 苏州大学 Target detection method in Codebook dynamic scene based on superpixels
CN104715480A (en) * 2015-03-11 2015-06-17 南京邮电大学 Statistical background model based target detection method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100158372A1 (en) * 2008-12-22 2010-06-24 Electronics And Telecommunications Research Institute Apparatus and method for separating foreground and background
US20110142343A1 (en) * 2009-12-11 2011-06-16 Electronics And Telecommunications Research Institute Method and apparatus for segmenting multi-view images into foreground and background based on codebook
CN103578119A (en) * 2013-10-31 2014-02-12 苏州大学 Target detection method in Codebook dynamic scene based on superpixels
CN104715480A (en) * 2015-03-11 2015-06-17 南京邮电大学 Statistical background model based target detection method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
桂姜琴: "智能视频监控中的目标检测算法研究", 《中国优秀硕士学文论文全文数据库 信息科技辑》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115022675A (en) * 2022-07-01 2022-09-06 天翼数字生活科技有限公司 Video playing detection method and system
CN115022675B (en) * 2022-07-01 2023-12-15 天翼数字生活科技有限公司 Video playing detection method and system

Similar Documents

Publication Publication Date Title
Reddy et al. Improved anomaly detection in crowded scenes via cell-based analysis of foreground speed, size and texture
Yang et al. Video scene understanding using multi-scale analysis
CN109635721B (en) Video human body falling detection method and system based on track weighted depth convolution order pooling descriptor
CN109583305A (en) A kind of advanced method that the vehicle based on critical component identification and fine grit classification identifies again
CN103093198B (en) A kind of crowd density monitoring method and device
CN107590427B (en) Method for detecting abnormal events of surveillance video based on space-time interest point noise reduction
CN103810476A (en) Method for re-identifying pedestrians in video monitoring network based on small-group information correlation
CN107886507B (en) A kind of salient region detecting method based on image background and spatial position
CN103679142A (en) Target human body identification method based on spatial constraint
CN106056165B (en) A kind of conspicuousness detection method based on super-pixel relevance enhancing Adaboost classification learning
CN112329656B (en) Feature extraction method for human action key frame in video stream
Du et al. Abnormal event detection in crowded scenes based on structural multi-scale motion interrelated patterns
CN104036526A (en) Gray target tracking method based on self-adaptive window
CN103049749A (en) Method for re-recognizing human body under grid shielding
Xia et al. Vision-based traffic accident detection using matrix approximation
CN106056078A (en) Crowd density estimation method based on multi-feature regression ensemble learning
CN108154089B (en) Size-adaptive-based crowd counting method for head detection and density map
CN104077571A (en) Method for detecting abnormal behavior of throng by adopting single-class serialization model
Zhu et al. Pedestrian detection in low-resolution imagery by learning multi-scale intrinsic motion structures (mims)
CN110909645B (en) Crowd counting method based on semi-supervised manifold embedding
Schulz et al. Object-class segmentation using deep convolutional neural networks
CN105488814A (en) Method for detecting shaking backgrounds in video
CN106874885B (en) Crowd abnormity detection method based on energy level distribution change
KR20120079495A (en) Object detection system for intelligent surveillance system
CN107423695A (en) Dynamic texture identification method based on bipartite graph

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20160413

WD01 Invention patent application deemed withdrawn after publication