You are on page 1of 6

SMART SECURITY CAMERA SYSTEM FOR VIDEO SURVEILLANCE

USING OPEN CV
MANJUNATH H. S.
PG Student, ECE Department, DBIT, Bengaluru, Karnataka, India
manjunathhs1989@gmail.com

MRS. ROOPA B. S.
Associate Prof., ECE Department, DBIT, Bengaluru, Karnataka, India
roopa.0303@gmail.com

ABSTRACT: In present scenario, the security concerns have grown tremendously. Nowadays, in
order to maintain peace and provide security to people, Closed-circuit television (CCTV)
surveillance system is used. The paper is focused on the design of a low cost smart security camera
with night vision capability using Intel Atom Processor and Open Source Computer Vision
(OpenCV). This system can be used inside a house, store room or warehouse facility. This system
includes human detection and smoke detection capability that can provide precaution to potential
crimes and fire accidents. When some object motion is detected, the system identifies it as human
and also it identifies fire presence. Then it triggers the alarm system and sends notification to the
user. Intel atom processor kit with OpenCV software handles the image processing, control
algorithms for the alarms and sends captured Images through email.

KEYWORDS: Video Surveillance, CCTV, Computer Vision, OpenCV, Motion Detection,


Background Subtraction, Human Detection, Haar Classifier, Smoke Detection.

INTRODUCTION

Video surveillance system is becoming a important tool for many organizations and public for
safety and security applications. Normally CCTV monitoring system is used for video
surveillance. CCTV surveillance systems are used in houses, supermarkets, factories, hospitals,
hotels, schools, and companies for 24/7 monitoring. It gives real-time monitoring, provides
surveillance footage, and allows to have evidences against illegal activities. By using CCTV
crimes can be determined. Current CCTV camera is just a passive monitoring device because it
records video and saves the footage to help the authorities to identify the cause of any incident
such as crime or fire accident. It cannot prevent or trigger alarm to take action immediately. Many
times, continuous watching of multiple video streams by human operators and manual browsing of
thousands of video frames for crime scene and forensic analysis are neither reliable nor scalable.
This has raised the need to develop a active video surveillance system that is low-cost, reliable and
can process video data for automated real time alerts to prevent unwanted events.

This paper proposes a active surveillance camera that has the capability of identifying the changes
in the scene being monitored and able to give notification or alarm as the event happens. Open
Source Computer Vision (OpenCV) software which is a powerful library of image processing tools
is a good choice for real-time imaging processing. The library is written in C and C++ and runs
under Linux, Windows, Android and Mac OS X. OpenCV is a free software that can help
optimize code for basic image processing techniques and it provides various image processing
functions and computer vision algorithms [2]. By using OpenCV, surveillance system will not just
record video, it can identify or differentiate the changes in the scene that is being monitored.

Human made crimes and fire accidents are common events that create problems and loss to people
and society. Thus fire detection systems are considered as one of the most important and vital
surveillance systems. Many of the current fire detection systems depend only on smoke sensors
which are not usable in some places. The design in this paper aims to develop a better fire
detection system that can detect fire hazards during the early stages of the fire. Background
subtraction method is used for motion detection and it is classified as human or fire by using
computer vision algorithms [1]. Detected event is then recorded, alarm system is triggered and
immediate notification is sent to the user to take further action. Intel atom processor kit is used as
the processing unit for the system. A normal CCTV camera or a webcam with night vision
capability can be used for this video surveillance system to monitor during both day and night.

RELATED WORK

OpenCV is one of the key that is enabling technologies for computer vision. OpenCV provides a
wide range of approaches to detect an object and also there are various techniques to identify
object location in OpenCV [2]. The researchers have presented a design of a low cost smart secuity
camera system using OpenCV in [1]. Background subtraction algorithms are widely used method
for motion detection when the monitoring camera is placed at fixed location. There are several
methods for performing background subtraction which are proposed by many researchers in
different journals. The paper [3] provides a review on various background subtraction techniques.
A comparative study and performance evaluation of various background subtraction algorithms is
provided in [4][10]. Human detection is done by identifying the shape of moving object
recognized. It is completely dependent on the background subtraction process. Haar classifiers
algorithms can be used to detect human structures in video. Human detection method using haar
classifiers is presented in [5]. If face detection is used, it will be difficult to detect face at long
distance, so head and shoulder parts of human body are considered to be more appropriate for
human detection [6]. Dalal and Trigg's method uses the fact that shape of the object can be well
represented by local intensity gradients distribution or edge directions [7]. Paul Viola and Michael
Jone have introduced a method that accurately detect object using Haar feature-based cascade
classifiers [8].

DESIGN METHODOLOGY

System Design

Intel Atom Processor Kit Webcam


(Image Processing Unit) (Surveillance Camera)

Alarm & Email


Notification System

Figure 1. System Block Diagram.

416
Figure 1 shows the simple block diagram of the whole system. Intel Atom processor kit is the
processing unit of the system and is the central platform for image processing and signal alerting.
A camera captures the scene to be processed by Intel Atom processor and it has night vision
capability to capture the scene during night or dark condition. The system performs the motion
detection of an object moving by using the background subtraction algorithm. When the moving
object is detected, the system classifies it as human or smoke. If there is detection, the system
triggers alarm system and sends email notification to indicate unauthorized human invasion or fire
accident.

System Flow Chart


The algorithm is separated into three parts as motion detection, human detection and smoke
detection. The first step is to detect motion of an object in the scene, if the motion is not detected,
the program will not go to human detection and smoke detection algorithms. If the motion is
detected in the scene, the current frame of the scene will be processed by human detection
algorithm. If the moving object is identified as non-human object, the current frame is processed
by smoke detection algorithm to detect fire presence. Now if there is a detection of either human
or fire, then alarm and email interface function will be activated. General system flowchart is
shown in Figure 2.

Figure 2. System Flowchart

Motion Detection using Background Subtraction


Background subtraction technique is one of the simplest method for motion detection. Since the
camera used for monitoring is set at fixed location, background subtraction algorithm can be used
for motion detection. Frame difference technique is the simplest method of background
subtraction. In frame difference technique, moving objects within a given background can be

417
obtained from the difference of the current frame and a reference frame, called as "background
frame". Processing speed and illumination changes are the most common challenges for the
background subtraction algorithms. According to comparative study of various algorithms, the
basic background subtraction has the lowest processing speed requirement but difficult to
implement in a complex background environment [4]. The basic background subtraction is chosen
due to its low computational requirement. Figure 3 shows the simple background subtraction
algorithm which can be implemented using equation (1).

|Image(x,y,t) Image(x,y,t-1)| > Th (1)

Background
Model
Video Input Comparison of
Video frames Background
Extracting Difference subtracted
with Background
Video frames of frames image
model

No motion detected

Figure 3. Block Diagram of Background Subtraction.

Human Detection
If the motion is detected, that particular frame will be the input frame to the human detection
process. the program converts the captured image to gray scale, improves the contrast of the image
and stores it in memory. The converted image will be processed through Haar Classifier Stages. If
head and shoulder feature is not detected, the program considers it as non-human object and will
move to smoke detection, or it is detected as human, then intruder sound alarm is raised and
picture is captured and notification is sent to user through email. Head and Shoulder feature are
used for human detection since it is the most unvarying part of human body. Also, OpenCV has
available haar cascade file "haarcascade_mcs_upperbody.xml" which involves head and shoulder
feature. Haar feature based cascade classifiers can detect object accurately which uses the change
in contrast between adjacent rectangular group of pixels. The relative light and dark areas are
being determined by the contras variance between the pixel groups. Two or three adjacent groups
with a relative contrast variance form a Haar-like feature. Eq. (2) and (3) are used for computing
integral areas needed for developing Haar Classifier.

(2)
Where: A[x,y] = the original integral image
AI[x,y] = integral image

(3)
Where: A[x',y] = the original integral image
AI[x,y] = integral image

418
Fire/Smoke Detection
The behavior of smoke is considered for developing the smoke detection algorithm. The main
behavior smoke is that when smoke starts spreading, the area of moving area will increase and also
the direction of smoke is always upward. Since this Surveillance system is used indoor, wind
doesn't affect the movement of smoke. To determine the direction of smoke, the moment extracted
from the motion detection algorithm is used to obtain the coordinate of the centroid. Eq. (4) and
(5) is used to get the moment and Y-centroid. if the y-coordinate of the centroid is decreasing, it
means that the area of the contour drawn is going up. When y value reaches a certain threshold, it
means there is smoke detected. Now smoke alarm is triggered and fire notification is sent. if there
is no smoke, then background will be updated.

(4)
(5)
where: is the moment
is the center of mass in y-axis

Alarm System
Alarm system includes triggering alarm system when there is human detection and fire/smoke
detection. Email feature includes sending email notification to user using Simple Mail Transfer
protocol (SMTP).

CONCLUSION

Since safety is the primary concern and an integrated smart camera system will be a significant
help in the security. This paper proposes a system that is solution to the current needs of video
surveillance security system. This can be developed with low cost and can be used in any indoor
security needs. With computer vision that provides smart, active and real time monitoring in video
surveillance system, immediate actions can be taken to avoid thefts and fire hazards.

REFERENCES

Abaya, W.F.; Basa, J.; Sy, M.; Abad, A.C.; Dadios, E.P., "Low cost smart security camera
with night vision capability using Raspberry Pi and OpenCV," Humanoid, Nanotechnology,
Information Technology, Communication and Control, Environment and Management
(HNICEM), 2014 International Conference on , vol., no., pp.1,6, 12-16 Nov. 2014
Ali A.; Farzin F. (2001). An Implementation on Object MoveDetection Using OpenCV,
Department of Systems and computer Engineering, Carleton Univ., Ottawa.
M. Piccardi (October 2004). "Background subtraction techniques: a review," IEEE International
Conference on Systems, Man and Cybernetics 4: 30993104
Y. Benezeth; P.-M. Jodoin; B. Emile; H. Laurent; C. Rosenberger4. (2010), "Comparative Study
of Background Subtraction Algorithms". Journal of Electronics Imaging19 (2010). Oct.
16, 2012
Viola, P. and Jones, M. (2001). Rapid object detection using boosted cascade of simple features,
IEEE Conference on Computer Vision and Pattern Recognition, 2001.

419
Mukherjee, S and Das, K. (2013). A Novel Equation based Classifier for Detecting Human
in Images, InternationalJournal of Computer Applications (0975 8887), Volume 72
No.6, May 2013
Ogale, N. (2006). A survey of techniques for human detectionfrom video, Department of
Computer Science Maryland Univ. 2006.
Wilson, P. and Fernandez, J. (2006). Facial feature detectionusing Haar classifier. Journal
of Computing Science in Colleges, Volume 21 Issue 4, Pages 127-133, April 2006.
Rapee krerngkamjornkit, Milan Simic, "Enhancement of Human Body Detection and Tracking
Algorithm based on Viola and Jones Framework" IEEE, TELSIKS 2013.
Mr. Deepjoy Das a1nd Dr. Sarat Saharia, "Implementation And performance Evaluation Of
Background Subtraction Algorithms", International journal on Computational Sciences &
Applications (IJCSA) Vol.4, no.2, April 2014.

420

You might also like