Professional Documents
Culture Documents
Background Subtraction
October 29, 2012
Copyright@ www.vns-group.com
Introduction Challenges
2 Basic Methods
Motivation
1 2 3
plays an important in many computer vision applications in most cases, objects are the most interest, not the scene less processing costs, computational time, etc
in general, the camera is still and the background is static the moving target can be extracted by subtracting the current image from the background scene
Challenges
gradual (sunset or sunrise) or sudden (for e.g., clouds) illumination changes effects of frequent moving objects in the scene (e.g., trees) structure changes in the scene (e.g., furniture arrangements in indoor environment or new cars entering or leaving in outdoor car-park)
2 3
should be able to adapt to illumination changes, should be able to learn from a clean or non-clean image sequences should automatically adapt to the sudden changes of the scene structure
Background Modelling
assumed that it is possible to capture a clean background (without moving targets) at time t (in general, this is possible only in indoor environment, for e.g., a shopping mall before the shop opens) mean lter: the background is the mean of previous n frames median lter: the background is the median of previous n frames more complex models: to address the challenges discussed in the previous slide
2 3 4
models the background as the mean of previous n frames is rather fast but very memory consuming
Mathematically,
1 B= n
Ii
i=1
where B is the background image Ii for i {1, 2, , n} is an image at time i Disadvantages can not adapt to the gradual changes over time requires n M N buffer for an image size of M N
model the background as a running average a weighted average where recent frames have a higher weight no more memory requirement
Mathematically,
Bt+1 = It + (1 ) Bt
where is the learning rate
Pnder(1997) t Guassian distribution over the histogram B = N(, ) where mut = It + (1 ) t t = (It t )2 + (1 ) t2
Pixel Classication
1
Challenges: th is a global threshold (the same for all pixels) how to choose th th is not a function of time
Advantages Easy to implement Less computational cost (fast - real time) Shortcomings High memory requirements (need to keep n number of frames in
Mixture of Gaussian
pixel location
requires to adapt to the permanent scene change a single background model is not adequate Solution proposed by Stauffer and Grimson in 1998 Mixture of K Gaussians (i , i , i ) to cope with multiple
background objects
each Gaussian distribution describes one of the background
Mixture of Gaussian-Cont:
Algorithm Overview values of a particular pixel is modeled as a mixture of adaptive
Gaussians
for instance, the history at a pixel (x0 , y0 ) is given as
{I1 , I2 , , It },
this history is modeled as a mixture of K Gaussians:
K
P(It ) =
i=1
i = 1
Mixture of Gaussian-Cont:
Segmenting the foreground weights are updated at every new frame update the model N(i,t , i,t ) if it matches the current value
(those at distance
2.5).
MOG models both the foreground and background. How to segment? 1 rank models by i /|i | 2 a model is background if it occurs frequently (high i ) and does not vary much (low i ).
b
B = arg min
b k =1
k > T
2000
http://www.cs.rutgers.edu/~elgammal/Research/BGS/
research_bgs.htm
10453/2494/2004001173.pdf?sequence=1
Interactions (IEEE)
proposed by Nuria Oliver, Barbara Rosario, Alex P. Pentland 2000
Assignment: Install OpenCV in your computer. make yourself familiar with OpenCV. What is OpenCV? OpenCV (Open Source Computer Vision) is a library of
Learning OpenCV: Computer Vision with the OpenCV Library OpenCV 2 Computer Vision Application Programming Cookbook
Assignment: thousands codes available. need to know which one to choose and how to use https://sites.google.com/site/backgroundsubtraction/