You are on page 1of 4

Department of Electrical Engineering, Indian Institute of Technology Patna

Mini Project 
Motion Detection from a video recorded using a Still Camera 
 
 

    

Krish Mangal 0801EE21 R Harsha Vardhan 0801EE29 R Umesh Reddy 0801EE20 
EE321: Digital Signal Processing Lab 

Moving Object Detection from video


recorded using a still camera
Krish Mangal (0801EE21), R Harsha Vardhan (0801EE29), R Umesh Reddy (0801EE30) 

Aim 
 To identify a moving object from a video shot from a still camera and to change its color with 
respect to the background. 
 To identify the exact path of a moving object from a video captured. 

Basics of Motion Detection 
 Moving object detection is the basis of moving object identification and tracking. Moving object 
detection from video sequences is an important research these days. 
 It is used in many places like in intelligent video surveillance, motion analysis etc. Moving object 
detection is being done using the techniques like Edge Detection, Background Extraction, Frame 
Difference,  Optical  Flow  Method  etc.  with  Optical  flow  method  being  the  most  complicated 
among them. 
 Edge detection gives us the space gradient of the video, while Frame difference and Optical flow 
methods gives the time gradient of the video.  

Algorithm used 
We  have  used  the  frame  difference  and  edge  detection  techniques  to  perform  the  analysis  of  the 
moving body from a video recorded using a still video camera.  

 Firstly, we perform edge detection on each of the frames of the video, and then we compare the 
consecutive frames for difference in edges. 
 From this we get the moving pixels in a frame, we now divide each of the frames into blocks of 
small size, and if the number of moving pixels in a block is over a threshold, we consider  that 


block to have motion, else that block is considered to be without motion.  
All  of  the  blocks  with  some  motion  are  shown  in  color,  while  the  rest  are  shown  in  complete  EE321 
grayscale.  
 Estimation of Path: we can estimate the path of a moving object by plotting the position of the 
moving object’s centroid in each of the frames and with this we may map the moving object’s 
path. 

2 | P a g e  
 
EE321: Digital Signal Processing Lab 

 
Edge Detection 
Applying edge detection to an image leads to a set of connected curves that indicate the boundaries of 
objects,  the  boundaries  of  surface  markings  as  well  as  curves  that  correspond  to  discontinuities  in 
surface orientation. Thus, applying an edge detection algorithm to an image may significantly reduce the 
amount of data to be processed and may therefore filter out information that may be regarded as less 
relevant, while preserving the important structural properties of an image. Edge detection can be done 
using many methods such as Sobels, Roberts, Prewitts, Canny, Kirsch etc.  

 
A Comparison of various Edge Detection techniques, and this shows that Canny Edge detection is the best. 

EE321 

The Flow Chart for our Algorithm 
3 | P a g e  
 
EE321: Digital Signal Processing Lab 

 
Uses 
 This may be used to modify recordings done through a still camera, in live TV recordings etc. 
 This  may  be  used  to  identify  the  path  of  a  cricket  ball  when  its  motion  is  captured  during  a 
match. 
 Can  be  used  for  Toll  booth  automation,  and  also  as  a  part  of  a  larger  Intelligent  Transport 
System. 

Proposed Extensions 
Calculating the velocities of moving objects can be a good extension to this project. This may also be 
implemented on a DSP Kit for further use on field. 

References  
 An  Improved  Moving  Object  Detection  Algorithm  Based  on  Frame  Difference  and  Edge 
Detection  by  ZHAN  Chaohui  ,DUAN  Xiaohui,  XU  Shuoyu,  SONG  Zheng,  LUO  Min,  2007, 
Electronics Department, Peking University, Beijing, 100871. 
 Edge Plane Detection in Spatio‐Temporal Images by Using Edge Vector and Edge Reliability, 
Fumiaki YAMANA, Takahiro SUGIYAMA, Keiichi ABE, 2000. 
 Covariance Analysis of Non‐Translational Motion‐Compensated Frame Differences, 2005,Anant 
G, Veeravalli, W. D. Pan, Mahesh Nalasani, and Manoj Kumar Santha Mohan, Dept. of Electrical 
and Computer Engineering, University of Alabama in Huntsville, Huntsville, AL 35899. 
 

EE321 

4 | P a g e  
 

You might also like