BACKGROUND
SUBTRACTION
Iftekharul Islam (C133014)
Amanat Ullah Juwel (C133008)
1
Background subtraction, also known as foreground detection
is a technique in the fields of image processing and computer vision
wherein an image's foreground is extracted for further processing
(object recognition etc.)
Background subtraction is a widely used approach for detecting
moving objects in videos from static cameras.
detecting the moving objects from the difference between the current
frame and a reference frame
based on a static background hypothesis(often not applicable in real
environments)
WHAT IS BACKGROUND
SUBTRACTION?
2
Moving object tracking by using PTZ camera
BACKGROUND SUBTRACTION
3
Surveillance tracking or human poses estimation
Video Surveillance
Optical Motion Capture
Human Computer Interaction
Content based Video Coding
Trafc monitoring
Real-time Motion Gesture Recognition
APPLICATIONS
4
Detecting moving objects:
Current Frame Reference Frame Background Image
Difference
FRAME DIFFERENCE METHOD
5
Image at time t: Background at time t:
I (x, y, t) B(x, y, t)
> Th
1. Estimate the background for time t.
2. Subtract the estimated background from the input frame.
3. Apply a threshold, Th, to the absolute difference to get the
foreground mask.
SIMPLE APPROACH
6
Frame difference:
| frameiframesi-1| > Th
The estimated background is just the previous frame
It evidently works only in particular conditions of objects speed
and frame rate
Very sensitive to the threshold Th
THE BASIC METHODS
7
Background is estimated to be the previous frame. Background
subtraction equation then becomes:
B(x ,y ,t) = I (x ,y ,t-1)
I (x, y, t) - I (x, y, t 1) > Th
FRAME DIFFERENCING
8
TH = 50 TH = 150
TH = 100 TH = 130
9
THRESHOLDING
Delay
Video Background Foreground Data Foreground
Preprocessing
Frame Modeling Detection Validation Masks
Flow diagram of a generic background subtraction algorithm
BACKGROUND SUBTRACTION
ALGORITHMS
10
Coding: Applying basic methods
Using Frame Difference and
Thresholding
Applying on images
BACKGROUND SUBTRACTION USING
MATLAB 11
12
OUTPUT IMAGES
13
OUTPUT IMAGES
THANK YOU
14