You are on page 1of 27

Session No: CO2-2

Session Topic: Motion Detection and Estimation

DIGITAL VIDEO PROCESSING


(Course code: 19cs3278)
Prepared & Presented by: Dr. Lambodar Jena
Session Objective
To understand the
• Motion analysis
• GMM model
Poll Question-01
• A video consists of a sequence of
A. Frames
B. Signals
C. Packets
D. Slots
Key Concepts
• Introduction to Motion Analysis
• How motion analysis works?
• Uses of motion analysis
Motion Detection
• Motion detection is, the simplest of the three motion-related tasks,
that is, detection, estimation and segmentation.
• Its goal is to identify which image points, or, more generally, which
regions of the image, have moved.
Definition of Motion Detection

• Action of sensing physical movement in a given area

• Motion can be detected by measuring change in speed or vector of an


object
Motion Detection

Goals of motion detection


• Identify moving objects
• Detection of unusual activity patterns
• Computing trajectories of moving objects

Applications of motion detection


• Indoor/outdoor security
• Real time crime detection
• Traffic monitoring
Many intelligent video analysis systems are based on motion detection.
Two Approaches to Motion Detection
• Optical Flow
• Compute motion within region or the frame as a whole

• Change detection
• Detect objects within a scene
• Track object across a number of frames
Background Subtraction

• Uses a reference background image for comparison purposes.


• Current image (containing target object) is compared to reference
image pixel by pixel.
• Places where there are differences are detected and classified as
moving objects.

Motivation: simple difference of two images shows moving


objects
a. Original scene b. Same scene later

Subtraction of scene a from scene b Subtracted image with threshold of 100


Static Scene Object Detection and Tracking

• Model the background and subtract to obtain object mask


• Filter to remove noise
• Group adjacent pixels to obtain objects
• Track objects between frames to develop trajectories
Background Modelling by Michael Knowles
Background Model
After Background Filtering…
Approaches to Background Modeling
• Background Subtraction

• Statistical Methods
(e.g., Gaussian Mixture Model, Stauffer and Grimson 2000)

Background Subtraction:
1. Construct a background image B as average of few images
2. For each actual frame I, classify individual pixels as foreground if
|B-I| > T (threshold)
3. Clean noisy pixels
Background Subtraction

Background Image Current Image


Statistical Methods

• Pixel statistics: average and standard deviation of color and gray


level values
(e.g., W4 by Haritaoglu, Harwood, and Davis 2000)

• Gaussian Mixture Model (e.g., Stauffer and Grimson 2000)


Gaussian Mixture Model
• Model the color values of a particular pixel as a mixture of Gaussians
• Multiple adaptive Gaussians are necessary to cope with acquisition
noise, lighting changes, etc.
• Pixel values that do not fit the background distributions (Mahalanobis
distance) are considered foreground
Gaussian Mixture Model

Block 44x42 Pixel 172x165

Temple1 - RGB Distribution of Pixel 172x165


Temple1 - RG Distribution of Pixel 172x165
250

200

200
150

150 100

B
G

50
100

0
250
50 250
200
200
150
150
0 G 100 100
0 50 100 150 200 250 R
R
R-G Distribution R-G-B Distribution
Motion Estimation
• Digital Video
• Video has been a major part of public consciousness for over 50 years.
• Digital video compression plays an important role in the multimedia
applications.
• In order to manage large multimedia data objects efficiently, these data
objects need to be compressed to reduce the size for storage .
Motion Estimation
• Video Compression
• Video Compression tries to eliminate the temporal redundancy between
adjacent frames.
• Once the redundancies are removed the object requires less memory space.
So being smaller in size, it takes less time for transmission over the network.
• This in turn significantly reduces storage and transmission costs.
Motion Estimation cont…
• INTRODUCTION
• Motion estimation has proven to be effective in exploiting the
temporal redundancy of video sequences and therefore forms a
central part of all hybrid video compression standards.
• Intuition suggests that moving pictures have a pixel conservation
property -that pixels on one frame may be translated to form the pixel
patterns on a subsequent frame
• Images corresponding to objects on one frame move within the frame
to form corresponding objects on the subsequent frame.
• Temporal redundancy that exists between successive frames may be
exploited in a number of ways.
• The simplest method of exploiting temporal redundancy is frame
differencing.
• This strategy assumes that the average motion is small and simply
compresses the pixel differences between two frames.
Principles of Motion Estimation
• Motion estimation and motion compensated prediction is by far the
most efficient and widely used technique for achieving the high levels
of compression that are typified in modern video compression
standards.
• In this techniques, a scene or frame is divided arbitrarily into
macroblock (MB) regions. The assumption is that each MB is
composed of closely associated pixels
Motion Compensation
• During reconstruction, the reference frame is used to predict the
current frame using the motion vectors. This technique is known as
motion compensation.
• During motion compensation, the macroblock in the reference frame
that is referenced to by the motion vector is copied into the
reconstructed frame.
References

You might also like