Motion Detection In Multi Frame Video Surveillance System

advertisement
Motion Detection In Multi Frame Video
Surveillance System
Kusam Tejaswini1, Diwakar R. Marur2
Department of Electronics and Communication Engineering, SRM University, India.
Kusam Tejaswini, Electronics and Communication Engineering,
SRM University (email : tejakusam@gmail.com). Vijayawada,
India, 9840953663. Diwakar R. Marur, Electronics and
Communication Engineering, SRM University (email :
diwakar.r@ktr.srmuniv.ac.in). Chennai, India, 9444878525.
2010-11
2009-10
2008-09
2000-01
Vehicle detection, tracking, classification and
counting are very important for military, civilian and
government applications such as highway
monitoring, traffic planning, toll collection and traffic
flow. Traffic counts, speed and vehicle classification
are fundamental data for a variety of transportation
projects ranging from transportation planning to
modern intelligent transportation system [2].
1990-91
National highways, Expressways and roads are
getting overcrowded due to increase in number of
vehicles. The Ministry of Transport Government of
India conducted an Economic survey on increasing
automobiles in the year 2015. Fig 1 depicts the
growth rate of vehicles from 1950 to 2011 based on
that survey [1].
1980-81
INTRODUCTION
1970-71
I.
Moving objects detection algorithm should
be characterized by some important features such as
accuracy, real-timeness. Motion detection is the
action of sensing the physical movement in a given
area. It is also the process of determining the
movement of an object from two or more successive
images.
1960-61
Keywords - Motion detection, pixel variant, traffic
monitoring, Gaussian mixtures, Threshold value.
Traffic monitoring and Information Systems related
to vehicles classification still rely on sensors for
estimating traffic parameters. In earlier days
magnetic loop detectors are used to count vehicles
passing over them [3]. Now-a-days vision based
systems offer a number of advantages over earlier
methods.
Computer vision is concerned with the theory
behind artificial system that extract information from
images. The theme in the development of this field
has been duplicate the abilities of human vision by
electronically perceiving and understanding an
image. A camera coupled with computer vision
technique makes an intelligent transportation system
based on video [4].
1950-51
Abstract - Increasing number of vehicles
demand intelligent management of traffic systems. Video
analysis systems are mostly based on motion detection
and tracking of objects. In this paper, a method is
proposed for vehicle detection and vehicle counting. Here
a system is built in order to provide a vision to the
systems. The main technique introduced is the
background updating technique in every frame that
contains no moving objects in the scene. After the
appearance of a moving object, background updating is
locked out. This algorithm becomes again susceptible to
luminance changes while the moving object is in the
scene. The proposed method is excellent in real-time
performance because it requires only a little memory and
computation. Experiment results show that this method
can detect the moving objects efficiently and accurately
form the video recorded by a camera with changing
background and noise.
Number of vehicles
1,2
Years
Fig 1. Registered number of vehicles as per
economic survey [1].
Once the movement detection occurs, calculations are
made from two images to determine the type of
movement made. This can be achieved either by
mechanical devices that physically interact with the
field or by electronic devices that quantifies and
measures changes in the given environment [5].
During the past decades, research in vision
technique have various algorithms for detecting
moving objects such as consecutive temporal
difference [6], optical flow approach method [7], and
background subtraction [8]. Among all these
methods, background subtraction algorithms are most
popular, because they are relatively simple in
computing in a static scene. This system uses a single
camera mounted on a pole or other tall structure,
looking down on the traffic scene. It can be used for
detecting and classifying vehicles in multiple lanes
and for any direction of traffic flow.
II.
RELATED WORK
For many years tracking moving vehicles
has been an active area of research in computer
vision. In real time system described in [9] uses a
feature based method along with occlusion reasoning
for tracking vehicles in congested traffic scenes. In
order to handle occlusions, instead of tracking entire
vehicles, vehicle sub-features are tracked. A moving
object recognition method described in [10], uses an
adaptive background subtraction technique to
separate vehicles from the background. The
background is modeled as a slow time varying image
sequence, which allows it to adapt to changes in
lighting and weather conditions. Other popular video
based traffic counting systems use high-angle
cameras to count traffic by detecting vehicles passing
digital sensors. As a pattern passes over the digital
detector, the change is recognized and a vehicle is
counted. The length of time that this change takes
place can be translated into speed estimates. When
driving in the dark environment, drivers normally
turn on the headlights to obtain a clear vision on the
road. These headlamps produce illumination on the
ground and this region will be classified as moving
object. This headlight detection method includes high
intensity region detection and classification for cars
and bikes is described in [11].
A. Steps in Motion detection
Vehicles detection must be implemented at
different environment where the light and the traffic
status changing. In our proposed system, we accept
the traffic flow video from a camera and convert
video into frames extract reference backgrounds
and performs detection of moving objects. The
system we propose consists of three stages.
1.
2.
3.
System Initialization: System gets initialized
and set up in this stage. Camera records
continuous stream of data and sends to the
system for analysis.
Background Subtraction: In this stage, a set
of frames are taken into focus and on
successive
analysis
and
operations
background subtraction takes place.
Vehicle Detection: In this stage, using the
subtracted background image all the moving
vehicles can be tracked and counted.
This detection algorithm uses the ratio of
intensities recorded in a region of the two frames to
detect the change. It is expressed by
σi2 = 1/card{Ai}∑[(Bm – Cm) - µAi]2 ≥T
(1)
Where σi2 is the variance of the intensity ratios, Bm is
the background image that does not contain moving
objects, Cm is the current frame of the scene, Ai is the
observed region of interest of the processed image,
card{Ai} stands for the region size, T is
predetermined threshold and μAi is the average of the
intensity ratio.
B. Configuring Raspberry Pi
The configuration of Raspberry PI (RPI) is
shown in the Figure 2. The RPI board is powered by
connecting the board to micro USB power jack. By
using the Ethernet cable, RPI is connected to
computer to access keyboard, mouse and monitor.
Before powering the RPI one should check the
network settings in order to obtain Internet Protocol
(IP) address automatically. PuTTy and Xming are the
softwares that should be installed successfully for
terminal emulator and display server respectively.
Finally install Open Computer Vision (OpenCV) on
RPI [12].
C. Vision to RPI
The RPI Camera Board plugs directly into
the USB port on the RPI board. After configuring
RPI, at the command prompt type sudo raspi-config
to enable camera. The software for performing image
analysis and manipulation is installed in RPI to drive
the motion sensing camera. In order to test the
camera type raspistill –o image.jpg to capture the
image using RPI. After giving the command a
preview will appear for few seconds, and then change
briefly while the image is captured.
Start
System
initialization
Calculate pixel
variance for the input
pair of frames
Threshold input pair
of frames
Fig 2. Configuring RPI [13]
III.
System design
A. Resolution setting
No
Before capturing the images from web camera, it
is expected to check current screen resolution. This
application may not produce desired results, if the
resolution is less than 1024 x 768. It is recommended
to change the resolution to 1024 x 768 or higher for
optimal performance. Most of the applications need
to perform such classification and counting based on
existing stored images.
Is pixel
variant
σi2 > T
Yes
Track the
movement in
the frame
B. Vehicle detection
This part is coded by using Raspbian OS with
OpenCV library on python platform. System is
designed to start getting images from web camera.
Every frame will be processed to find a moving
vehicle from the images captured. Activity diagram
of the proposed system shown in the Fig 3. The USB
Camera which is interfaced with RPI board will
capture the images continuously taking low
resolution images and comparing them to one another
for changes caused by something moving in camera
field of vision. When change is detected the camera
takes a higher resolution snapshots and then again go
back to look for changes. These higher resolution
snapshots are saved in SD Card and for investigation
purpose this data is uploaded in to web server. The
system uses a single camera mounted on a pole or
other tall structure, looking down on the traffic scene.
It can be used for detecting and classifying vehicles
in multiple lanes and for any direction of traffic flow.
Acquire image
and store
Fig 3. Activity diagram for vehicle
Detection.
IV.
EXPERIMENTAL RESULTS
This system has been tested on a laptop
powered by an Intel Core Duo (1.83 GHZ) CPU and
2GB RAM. Equipped with a camera. We tested the
system on image sequences. The system is able to
detect the motion of vehicles successfully.The Fig 4.
determines the background of an image. Considering
the Fig 5. as an current image the motion has to be
detected. Results for Detection of a vehicle is as
shown in the Figs.6-7.
Fig. 4 Background image
Fig 6. Result showing vehicle detection on
command prompt window.
V.
CONCLUSION
Due to increase in expressway, highways
and traffic congestion, there is a huge amount of
potential applications of vehicle detection and
tracking on expressway and highways. In this paper
we have demonstrated vision based system for
effective detection and counting of vehicles running
on roads. The main aim of our system is to detect the
moments of vehicles by analyzing camera pictures
with the help of computer vision. Vehicle counting
process accepts the video from single camera &
detects the moving vehicles and counts them.
REFERENCES
Fig. 5 Current image
[1]
[2]
[3]
[4]
Fig 6. Motion detected image
The motion of the vehicles can be analysed on the
command window as shown in the Fig 7.
[5]
[6]
According to the Ministry of Transport Economy
survey [Online]
Available:
https://books.google.co.in/books?id=a42CLhuNE4YC
&pg=PA454&lpg=PA454&dq=total+no+of+vehicles+r
egistered+in+india+during+2010-2015.
Neeraj K. Kanhere, Stanley T. Birchfield, Wayne A.
Sarasua, Tom C. Whitney, “Real-time detection and
tracking of vehicle base fronts for measuring traffic
counts and speeds on highways", Transportation
Research Record, no. 1993. (2007)
Surendra Gupte, Osama Masoud, Robert F. K. Martin,
and Nikolaos P. Papanikolopoulos, “Detection and
Classification of Vehicles”,
in Proc. of IEEE
Transactions On Intelligent Transportation Systems,
vol. 3, Issue. 1, March 2002.
Cucchiara R., Grana C., Piccardi M., Prati A.,
“Detecting Moving Objects, Ghosts, and Shadows in
Video Streams,” IEEE Transactions on Pattern Analysis
and Machine Intelligence, vol. 25, Issue 10, Oct. 2003,
pp. 1337 – 1342.
Brajesh patel, Neelam patel, “Motion detection based
on multi frame video under surveillance system”, in
Proc. of International Journal of Computer Science and
Network Security (IJCSNS), vol.12, no.3, March 2012.
Fu-Yuan Hu, Yan-Ning Zhang, Lan Yao, “An effective
detection algorithm for moving object with complex
background,” in Proc. of International Conference on
Machine learning and Cybernetics, vol. 8, Aug. 2005,
pp. 5011 - 5015.
[7]
[8]
[9]
[10]
[11]
[12]
[13]
Pathirana P.N., Lim A.E.K., Carminati J., Premaratne
M., “Simultaneous estimation of optical flow and object
state, A modified approach to optical flow calculation,”
in Proc. of IEEE International Conf. on Networking
sensing and Control, England, 15-17 Apr 2007, pp. 634
– 638.
Piccardi M.,“Background subtraction techniques a
review,” in proc. IEEE International Conf. on Systems
Man and Cybernetics, Sydney, Australia, vol. 4, 10-13
Oct 2004, pp. 3099 – 3104.
D. Beymer, P. McLauchlan, B. Coifman, and J. Malik,
“A real-time computer vision system for measuring
traffic parameters”, in Proc. of IEEE Conf. on
Computer Vision and Pattern Recognition, Puerto Rico,
United States, June 1997, pp. 496–50.
K. P. Karmann and A. von Brandt, “Moving object
recognition using an adaptive background memory,” in
Capellini, editor, Time-Varying Image Processing and
Moving Object Recognition, vol. 2, pp. 297-307.
Thou-Ho Chen, Jun-Liang Chen, Chin-Hsing Chen and
Chao-Ming Chang, "Vehicle Detection and Counting
by Using Headlight Information in the Dark
Environment", in Proc. of IEEE International Conf. on
Intelligent Information Hiding and Multimedia Signal
Processing (IIHMSP07), Kaohsiung, Taiwan, Nov.
26-28, 2007, pp. 519-522.
Open Computer Vision Installation on Raspberry Pi
board. [Online] Available: http://opencvprogramming
with the raspberry pi_tutorial 1- opencv installation on
the pi.mp4.
Configuring Raspberry PI [Online]
Available:
http://www.raspberrypi.org/forums/Viewtopic.
Download