Smart Surveillance System by Amrit Sinha, Ankur Singh and Manas Kashyap USN 1CR14CS011, 1CR14CS015 and 1CR14CS076
Smart Surveillance System by Amrit Sinha, Ankur Singh and Manas Kashyap USN 1CR14CS011, 1CR14CS015 and 1CR14CS076
Mrs. Swetha K V
Assistant Professor
Department of CSE, CMRIT, Bengaluru
2017-18
VISVESVARAYA TECHNOLOGICAL UNIVERSITY
JNANASANGAMA, BELAGAVI - 590018
Certificate
This is to certify that the project entitled “Smart Surveillance System” is a
bonafide work carried out by Amrit Sinha ( USN:1CR14CS011 ), Ankur Singh
( USN:1CR14CS015 ), and Manas Kashyap( USN:1CR14CS076 ) in partial
fulfillment of the award of the degree of Bachelor of Engineering in Computer Science
& Engineering of Visvesvaraya Technological University, Belgaum, during the year
2017-18. It is certified that all corrections / suggestions indicated during reviews have
been incorporated in the report. The project report has been approved as it satisfies
the academic requirements in respect of the project work prescribed for the Bachelor
of Engineering Degree.
External Viva
1.
2.
Acknowledgement
“Acknowledgement - We take this opportunity to thank all of those
who have generously helped us to give a proper shape to our work and
complete our BE project successfully. A successful project is fruitful cul-
mination efforts by many people, some directly involved and some others
indirectly, by providing support and encouragement.”
Amrit Sinha
Ankur Singh
Manas Kashyap
i
Table of Contents
Table of Contents ii
List of Figures iv
List of Tables v
Abstract vi
1 Preamble 1
1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Problem Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2 Literature Survey 4
2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2 Literature Survey . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3 Theoretical Background 10
3.1 Raspberry Pi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.2 Why are we using Raspberry instead of Arduino? . . . . . . . . . . . . 12
3.3 What model of raspberry pi are we using? . . . . . . . . . . . . . . . . 12
3.4 Pi Camera Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.5 OpenCV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.6 Python . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.7 Amazon Web Services . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
5 System Analysis 30
5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
ii
5.2 Feasibility Study . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
6 System Design 35
6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
6.2 System Development Methodology . . . . . . . . . . . . . . . . . . . . 36
6.3 DESIGN USING UML . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
6.4 CLASS DIAGRAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
6.5 ACTIVITY DIAGRAM . . . . . . . . . . . . . . . . . . . . . . . . . . 40
6.6 SEQUENCE DIAGRAM . . . . . . . . . . . . . . . . . . . . . . . . . . 42
6.7 USE CASE DIAGRAM . . . . . . . . . . . . . . . . . . . . . . . . . . 43
7 Implementation 44
7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
7.2 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
7.3 Working Principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
7.4 Face Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
7.5 Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
8 Testing 52
8.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
8.2 Testing Methodologies . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
8.3 Test Case 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
8.4 Test Case 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
8.5 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
References 58
iii
List of Figures
iv
List of Tables
v
Abstract
Nowadays the need for a safe and secure system is desired by each
and every individual in the society. The most commonly used system,
Closed Circuit TeleVision (CCTV) is being implemented everywhere such
as in hospitals, warehouses, parking lots, buildings etc... However this
very system though effective has its downside when it comes to cost. Thus
the need for a cost effective system is required. In this project we propose
to use a security camera with the night vision capabilities using raspberry
pi and openCV. This is a cost effective method that uses a credit card
sized chip RPI. The image is captured and each frame is processed. The
image is stored and an email is sent if human is detected. This system has
accuracy of about 83 %. Also we use a pi camera. So the image is captured
via the pi camera and it is send to the raspberry pi for processing for face
and human detection with the help of openCV. Then, the face detected
is compared with the database, if the human detected is known (visitor)
or not (stranger) and based on the output, an email is generated and is
sent to the user.The security camera can be controlled using a custom AI
assistant. The AI features include turning on and turning off the security
camera using voice control. Thus, one can provide a low cost security
system.
vi
Chapter 1
Preamble
1
Smart Surveillance System Chapter 1
1.1 Introduction
Nowadays, people want one sole thing that is to make them feel safe and secure. The
most commonly used security system is the CCTV (closed circuitTelevision). The cost
of implementation of CCTV varies depending upon the size and use of the system.
It is usually installed in hospitals, malls, parking lots etc. However, with the help
of CCTV one can monitor the area 24/7, or the footage if stored in a location can
beretrieved when required. Although, it can be used to deter crime and allows the
authorities to identify and solve a crime, it doesn’t detect neither recognize the person
who is involved.
We have implemented a system which provides both face detection and face recog-
nition with the help of Raspberry pi 3 which is a credit card sized minicomputer and a
Pi camera which is made especially for the raspberry pi 3. Thus, when dealing with the
real-time image processing, Open source computer vision(openCV) software,a pow-
erful library of image processing tools, is a good choice. With the help of a smart
surveillance system, we have achieved a system that can record the event, detect and
recognize the person. A GSM module is used to send a message stating whether the
person is an intruder or a visitor. If it is a visitor, then a command is sent by the
user to perform some operation like- open the door (any type of automation is imple-
mented) however if it is a stranger an alarm is generated to indicate that there is an
intruder.
The developed SVSS provides a wide range of features in order to solve the following
problems in surveillance areas:
• Detecting objects.
• Face detection.
• Internet Of Things(IOT)
• AI Assistant
Literature Survey
4
Smart Surveillance System Chapter 2
2.1 Introduction
Literature survey is mainly carried out in order to analyze the background of the
current project which helps to find out flaws in the existing system and guides on which
unsolved problems we can work out. So, the following topics not only illustrate the
background of the project but also uncover the problems and flaws which motivated
to propose solutions and work on this project.
2.2.1 Paper 1
SMART SURVEILLANCE CAMERA USING RASPBERRY PI 2 AND OPENCV
Context: Abstract Nowadays the need for a safe and secure system is desired by
each and every individual in the society. The most commonly used system, Closed
Circuit TeleVision (CCTV) is being implemented everywhere such as in hospitals,
warehouses, parking lots, buildings etc... However this very system though effective
has its downside when it comes to cost. Thus the need for a cost effective system
is required. The existing system for surveillance is a security camera with the night
vision capabilities using raspberry pi and openCV. This is a cost effective method that
uses a credit card sized chip RPI. The image is captured and each frame is processed.
The image is stored and an email is sent if human is detected. The existing system
has accuracy of about 83 %. In this project we propose to use an enhanced recent
model- raspberry pi 2 which has operating speed 900MHz. Also we use a pi camera.
So the image is captured via the pi camera and it is send to the raspberry pi 2 for
processing for face and human detection with the help of openCV. Then, the face
detected is compared with the database, if the human detected is known (visitor) or
not (stranger) and based on the output, an audio output is produced and a message
is sent to the user. Thus, one can provide a low cost security system.
2.2.2 Paper 2
Low Cost Smart Security Camera with Night Vision Capability Using Raspberry Pi
and PIR Sensor
Context:Abstract: In order to further maintain peace and provide security to peo-
ple now a day, Closed-circuit television (CCTV) surveillance system is being utilized.
This study focused on the design and implementation of a low cost smart security
camera with night vision capability using Raspberry Pi (RPI) with PIR. The system
was designed to be used inside a warehouse facility. It has human detection and smoke
detection capability that can provide precaution to potential crimes and potential fire.
The credit card size Raspberry Pi (RPI) with A passive infrared sensor (PIR sensor)
handles the moving body, control algorithms for the alarms and sends captured pic-
tures to users email via Bluetooth. As part of its alarm system, it will play the E-
speech sounds: intruder when there is detection. The system uses ordinary webcam
but its IR filter was removed in order to have night vision capability. With help of
LDR it will sense whether it is night or day if it is night the led will on when it detect
intruder.
2.2.3 Paper 3
Motion sensor and face recognition based surveillance system Using Raspberry Pi
Context: An intelligent surveillance system is a smart monitoring system which is
developed from the security point of view. The objective of this project is to develop
a system that monitors the area in which it is being implemented. An Intelligent
surveillance system is applicable in the area where no one is permissible to enter, also
where we need to detect if any motion has been done. For this a digital camera is
used. By combining the PIR sensor and camera we can use this system to detect the
motion. The Camera is used to catch the live images of the area in which it is being
implemented, if any object is moving. The captured images are stored in a particular
folder. The stored images will be then useful to work on.. As the PIR sensor recognize
the motion it uses local binary pattern histogram (LBPH) and matches his/her face
with the data provided in the database. If the face is not matched with the database
then he is unauthorised and the buzzer starts buzz ring including the message/mail
services to the owners.
2.2.4 Paper 4
Object Detection on Raspberry Pi
Context: Object dis covery and following are es s ential and tes t ing undertakings
in numerous PC v is ion applications , for e xa m ple, reconnaiss ance, vehicle route
and s elf-s ufficient robot route. Ques tion recognition includes finding objects in the
cas ing of a video s uccess ion. Each following strategy requires a question recognition
component either in each edge or when the protest firs t s hows up in the video. For ins
tance figuring the meas ure of a planet(as tronomy), d is tinguis hing dis eas e in a ma
mmograp hy s can(medicine), abs taining fro m controlling into an obstacle(robotics
), and identify ing a man’s eye s hading or hair co lor(s ec urit y). The goal is to
construct a model that can recognize the protes t of indicated s hading that make
utilization of open s ource equipment and that chips away at the premis e of vis ual
informat ion caught from an ordinary webcam which has a reasonable lucidity. Having
a picture p reparing calculat ion which dis tinguis hes a protest firs t and after that
tracks it the length of it is in the observable pathway of the camera. As the protes t
moves , thePC/portable PC/implanted Board offers flag to engine to turn the came
ra which is mounted on a stepper engine. We executed the proposed calculation on
Raspberry Pi board utilizing OpenCV on Linu x foundation. It is a proficient protes
t following technique which take ca re of the fo llo wing is s ues .
2.2.5 Paper 5
Smart Surveillance System using Raspberry Pi and Face Recognition
Context: Abstract: This paper proposes the Smart Surveillance System using
Raspberry Pi and Image Processing. This system will serve as smart security module
for monitoring. Traditional surveillance systems only records the activities based on
motion, but this system serves the purpose of facial recognition so as to reduce the
error caused due to motion detection .Raspberry Pi camera module is used to capture
images once the motion is detected by the PIR Sensor. This system will monitor when
motion detected and checks for the faces in the image captured and with the help of
face recognition alerts if the face detected is not stored in the database.
2.2.6 Paper 6
Survey Paper on Smart Surveillance System
Context: This paper deals with the survey of Smart surveillance monitoring system
using Raspberry pi. Video Surveillance is important as far as security is concerned
these days. Commercial spaces, schools and hospitals, warehouses and other chal-
lenging indoor and outdoor environments require high end cameras. The current
technologies require RFIDs which are costly and hence the security domain in all be-
comes expensive and hence there was a need to work on this. This paper describes
the use of low cost single on board computer Raspberry Pi. This new technology
is less expensive and in this project it is used as a standalone platform for image
processing. It increases the usage of mobile technology to provide essential security
to our homes and for other control applications. The proposed home security system
captures information and transmits it via a 3G Dongle to a Smart Phone using web
application Raspberry pi.
2.2.7 Paper 7
Enhanced Home Security Using IOT and Raspberry PI
Context: A smart home application features great help to our everyday life. This
system rejuvenates facilities of a house to evolve into a smart home by adding more
security features. The improvement in security aspect offers innovative and productive
scope to the means of living. All these characteristics is adapted by using Internet of
Things (IoT) and Raspberry Pi. The recognition problem is always questionable in
smart home applications. So, a recovery is done to identify the intruder as known or
unknown by the use of image processing techniques for face recognition. This tend to
solve many issues in terms of authentication. This protection mechanism notifies the
user accordingly, giving a clear picture of the scenario happening at the users house.
The sensor based system highlights many features enabling it to be widely used. Fire
sensor detects any temperature increase in the living room and posts its status in
the URL given to the user. The gas sensor helps in detecting the presence of any gas
leakage based on the intensity of the gas in air. With the help of DC motor, auto door
locking mechanism is actuated. This is very useful. All the statuses are processed
between the sensors and the user via IoT. Raspberry Pi connects all the components
and brings forth the proper functioning of the whole package. The procedures that
are used here are very simple. Hence, even novice users could understand the systems
advanced features and use it with ease. The use of surveillance camera also helps
in identifying the presence of flame and thus a buzzer is activated in the case of fire
detection.
2.2.8 Paper 8
Real Time Face Detection and Tracking Using OpenCV
Context: In this paper, we intend to Implement a real-time Face detection and
tracking the head poses position from high definition video using Haar Classifier
through Raspberry Pi BCM2835 CPU processor which is a combination of SoC with
GPU based Architecture. SimpleCV and OpenCV libraries are used for face detec-
tion and tracking the head poses position. The experimental result computed by
using computer vision SimpleCV and OpenCV framework libraries along with above
mentioned hardware results were obtained through of 30 fps under 1080p resolutions
for higher accuracy and speediness for face dete ction and tracking the head poses
position.
Theoretical Background
10
Smart Surveillance System Chapter 3
3.1 Raspberry Pi
The Raspberry Pi is a series of small single-board computers developed in the United
Kingdom by the Raspberry Pi Foundation to promote the teaching of basic computer
science in schools and in developing countries.[5][6][7] The original model became far
more popular than anticipated,[8] selling outside its target market for uses such as
robotics. It does not include peripherals (such as keyboards, mice and cases). How-
ever, some accessories have been included in several official and unofficial bundles.[8]
Several generations of Raspberry Pis have been released. All models feature a
Broadcom system on a chip (SoC) with an integrated ARM compatible central pro-
cessing unit (CPU) and on-chip graphics processing unit (GPU).
Processor speed ranges from 700 MHz to 1.4 GHz for the Pi 3 Model B+; on-board
memory ranges from 256 MB to 1 GB RAM. Secure Digital (SD) cards are used to store
the operating system and program memory in either SDHC or MicroSDHC sizes. The
boards have one to four USB ports. For video output, HDMI and composite video are
supported, with a standard 3.5 mm phono jack for audio output. Lower-level output
is provided by a number of GPIO pins which support common protocols like IC. The
B-models have an 8P8C Ethernet port and the Pi 3 and Pi Zero W have on-board
Wi-Fi 802.11n and Bluetooth. Prices range from US$5 to $35.
The first generation (Raspberry Pi 1 Model B) was released in February 2012,
followed by the simpler and cheaper Model A. In 2014, the Foundation released a board
with an improved design, Raspberry Pi 1 Model B+. These boards are approximately
credit-card sized and represent the standard mainline form-factor. Improved A+ and
B+ models were released a year later. A ”Compute Module” was released in April
2014 for embedded applications. The Raspberry Pi 2 which added more RAM was
released in February 2015.
A Raspberry Pi Zero with smaller size and reduced input/output (I/O) and
general-purpose input/output (GPIO) capabilities was released in November 2015 for
US$5. By 2017, it became the newest mainline Raspberry Pi. On 28 February 2017,
the Raspberry Pi Zero W was launched, a version of the Zero with Wi-Fi and Blue-
tooth capabilities, for US$10.[15][16] On 12 January 2018, the Raspberry Pi Zero WH
was launched, the same version of the Zero W with pre-soldered GPIO headers.[17]
Raspberry Pi 3 Model B was released in February 2016 with a 64 bit quad core
processor, and has on-board WiFi, Bluetooth and USB boot capabilities.[18] On Pi
Day 2018 model 3B+ appeared with a faster 1.4 GHz processor and a 3 times faster
network based on gigabit ethernet (300 Mbit / s) or 2.4 / 5 GHz dual-band Wi-Fi (100
Mbit / s).[1] Other options are: Power over Ethernet (PoE), USB boot and network
boot (an SD card is no longer required). This allows the use of the Pi in hard-to-reach
places (possibly without electricity).
Dept Of CSE, CMRIT, Bengaluru - 560037 11
Smart Surveillance System Chapter 3
The organisation behind the Raspberry Pi consists of two arms. The first two
models were developed by the Raspberry Pi Foundation. After the Pi Model B was
released, the Foundation set up Raspberry Pi Trading, with Eben Upton as CEO, to
develop the third model, the B+. Raspberry Pi Trading is responsible for developing
the technology while the Foundation is an educational charity to promote the teaching
of basic computer science in schools and in developing countries.
The Foundation provides Raspbian, a Debian-based Linux distribution for down-
load, as well as third-party Ubuntu, Windows 10 IoT Core, RISC OS, and specialised
media centre distributions.[19] It promotes Python and Scratch as the main program-
ming language, with support for many other languages.[20] The default firmware is
closed source, while an unofficial open source is available
• Memory: Arduino boards have just enough memory to store your programs
whereas raspberry pi has memory card slot which can be used for primary data
storage just like the HDD of a PC or laptop.
• VERDICT: If you are developing simple project that does not require networking
and multitasking you should go for an Arduino, whereas if your project requires
multitasking,networking and more complex computer functions you should go
for a Raspberry pi.
3.5 OpenCV
OpenCV (Open Source Computer Vision Library) is an open source computer vision
and machine learning software library. OpenCV was built to provide a common
Dept Of CSE, CMRIT, Bengaluru - 560037 17
Smart Surveillance System Chapter 3
infrastructure for computer vision applications and to accelerate the use of machine
perception in the commercial products. Being a BSD-licensed product, OpenCV
makes it easy for businesses to utilize and modify the code.
The library has more than 2500 optimized algorithms, which includes a compre-
hensive set of both classic and state-of-the-art computer vision and machine learning
algorithms. These algorithms can be used to detect and recognize faces, identify ob-
jects, classify human actions in videos, track camera movements, track moving objects,
extract 3D models of objects, produce 3D point clouds from stereo cameras, stitch
images together to produce a high resolution image of an entire scene, find similar
images from an image database, remove red eyes from images taken using flash, follow
eye movements, recognize scenery and establish markers to overlay it with augmented
reality, etc. OpenCV has more than 47 thousand people of user community and esti-
mated number of downloads exceeding 14 million. The library is used extensively in
companies, research groups and by governmental bodies.
Along with well-established companies like Google, Yahoo, Microsoft, Intel, IBM,
Sony, Honda, Toyota that employ the library, there are many startups such as Ap-
plied Minds, VideoSurf, and Zeitera, that make extensive use of OpenCV. OpenCVs
deployed uses span the range from stitching streetview images together, detecting in-
trusions in surveillance video in Israel, monitoring mine equipment in China, helping
robots navigate and pick up objects at Willow Garage, detection of swimming pool
drowning accidents in Europe, running interactive art in Spain and New York, check-
ing runways for debris in Turkey, inspecting labels on products in factories around
the world on to rapid face detection in Japan.
It has C++, Python, Java and MATLAB interfaces and supports Windows, Linux,
Android and Mac OS. OpenCV leans mostly towards real-time vision applications and
takes advantage of MMX and SSE instructions when available. A full-featured CUDA
and OpenCL interfaces are being actively developed right now. There are over 500
algorithms and about 10 times as many functions that compose or support those
algorithms. OpenCV is written natively in C++ and has a templated interface that
works seamlessly with STL containers.
3.6 Python
Python is a high-level, interpreted, interactive and object-oriented scripting language.
Python is designed to be highly readable. It uses English keywords frequently where
as other languages use punctuation, and it has fewer syntactical constructions than
other languages.
do not need to compile your program before executing it. This is similar to
PERL and PHP.
• Python is Interactive You can actually sit at a Python prompt and interact
with the interpreter directly to write your programs.
History of Python Python was developed by Guido van Rossum in the late eighties
and early nineties at the National Research Institute for Mathematics and Computer
Science in the Netherlands.
Python is derived from many other languages, including ABC, Modula-3, C, C++,
Algol-68, SmallTalk, and Unix shell and other scripting languages.
Python is copyrighted. Like Perl, Python source code is now available under the
GNU General Public License (GPL).
Python is now maintained by a core development team at the institute, although
Guido van Rossum still holds a vital role in directing its progress.
Python Features Python’s features include
• Easy-to-learn Python has few keywords, simple structure, and a clearly defined
syntax. This allows the student to pick up the language quickly.
• Easy-to-read Python code is more clearly defined and visible to the eyes.
• A broad standard library Python’s bulk of the library is very portable and
cross-platform compatible on UNIX, Windows, and Macintosh.
• Interactive Mode Python has support for an interactive mode which allows
interactive testing and debugging of snippets of code.
• Portable Python can run on a wide variety of hardware platforms and has the
same interface on all platforms.
• Extendable You can add low-level modules to the Python interpreter. These
modules enable programmers to add to or customize their tools to be more
efficient.
• GUI Programming Python supports GUI applications that can be created and
ported to many system calls, libraries and windows systems, such as Windows
MFC, Macintosh, and the X Window system of Unix.
• Scalable Python provides a better structure and support for large programs
than shell scripting.
Apart from the above-mentioned features, Python has a big list of good features,
few are listed below
• It provides very high-level dynamic data types and supports dynamic type check-
ing.
• It can be easily integrated with C, C++, COM, ActiveX, CORBA, and Java.
3.7.1 Characteristics
1. On-demand self-service Users are able to provision cloud computing resources
without requiring human interaction, mostly done though a web-based self-service
portal (management console).
2. Broad network access Cloud computing resources are accessible over the net-
work, supporting heterogeneous client platforms such as mobile devices and worksta-
tions.
3. Resource pooling Service multiple customers from the same physical resources,
by securely separating the resources on logical level.
4. Rapid elasticity Resources are provisioned and released on-demand and/or au-
tomated based on triggers or parameters. This will make sure your application will
have exactly the capacity it needs at any point of time.
5. Measured service Resource usage are monitored, measured, and reported (billed)
transparently based on utilization. In short, pay for use.
22
Smart Surveillance System Chapter 4
4.1 Introduction
This chapter describes about the requirements. It specifies the hardware and software
requirements that are required in order to run the application properly. The Software
Requirement Specification (SRS) is explained in detail, which includes overview of dis-
sertation as well as the functional and non-functional requirement of this dissertation.
A SRS document describes all data, functional and behavioral requirements of the
software under production or development. SRS is a fundamental document, which
forms the foundation of the software development process. Its the complete descrip-
tion of the behavior of a system to be developed. It not only lists the requirements
of a system but also has a description of its major feature. Requirement Analysis in
system engineering and software engineering encompasses those tasks that go into de-
termining the need or conditions to meet for a new or altered product, taking account
of the possibly conflicting requirements of the various stakeholders, such as beneficia-
ries or users. Requirement Analysis is critical to the success to a development project.
Requirement must be documented, measurable, testable, related to in identified busi-
ness needs or opportunities, and defined to a level of detail sufficient for system design.
The SRS functions as a blueprint for completing a project. The SRS is often referred
to as the parent document because all subsequent project management documents,
such as design specifications, statements of work, software architecture specification,
testing and validation plans, and documentation plans, are related to it. It is impor-
tant to note that an SRS contains functional and non-functional requirements only.
Thus the goal of preparing the SRS document is to
• Face detection
• Automation
• Product Requirements
• Organizational Requirements
• User Requirements
The system’s overall properties commonly mark the difference between whether the
development project has succeeded or failed.
Non-functional requirements of our project include:
• Security
• Ease of Use: The front end is designed in such a way that it provides an interface
which allows the user to interact in an easy manner.
• Modularity: The complete product is broken up into many modules and wellde-
fined interfaces are developed to explore the benefit of flexibility of the product.
• Robustness: This software is being developed in such a way that the overall
performance is optimized and the user can expect the results within a limited
time with utmost relevancy and correctness.
The customers are those that perform the eight primary functions of systems
engineering,with special emphasis on the operator as the key customer. Operational
requirements will define the basic need and, at a minimum, will be related to these
following points:
• Performance and related parameters: It points out the critical system parame-
ters to accomplish the mission
• Storage: microSD
• Ports: HDMI, 3.5mm analogue audio-video jack, 4 USB 2.0, Ethernet, Camera
Serial Interface (CSI), Display Serial Interface (DSI)
• Library: OpenCV
System Analysis
30
Smart Surveillance System Chapter 5
5.1 Introduction
Design is a meaningful engineering representation of something that is to be built.
It is the most crucial phase in the developments of a system. Software design is a
process through which the requirements are translated into a representation of soft-
ware. Design is a place where design is fostered in software Engineering. Based on the
user requirements and the detailed analysis of the existing system, the new system
must be designed. This is the phase of system designing. Design is the perfect way to
accurately translate a customers requirement in the finished software product. Design
creates a representation or model, provides details about software data structure,
architecture, interfaces and components that are necessary to implement a system.
The logical system design arrived at as a result of systems analysis is converted into
physical system design.
• Operational Feasibility
• Economic Feasibility
• Technical Feasibility
• Social Feasibility
are easily made, or that the amount of effort required to do so is considerably greater
than the amount of money that can be gained.
The feasibility of implementing a face recognition system in an FPGA device based
on Gabor filters for feature extraction and the nearest neighbor technique for classi-
fication have been investigated. The resulting face-recognition design can be used in
a door access control system. In this study, a Xilinx system generator and an ISE
project navigator were used to design the required simulation and to produce the
hardware implementation reports. The distributive arithmetic FIR filter was used in
the feature extraction stage to compute the convolution operation between the input
image (three region images) and each of the 40 Gabor matrices (filter coefficients).
In the classification stage, the simulation design of the nearest neighbor technique
was attempted based on the City Block distance. The results obtained using the
simulations confirmed the feasibility of implementing a face recognition system on an
FPGA device with minimum hardware. The process of converting the MATLAB code
of Gabor filters into 40 fixed matrices can reduce the hardware resources to only one
8.192KB RAM for each filter. Since the Xilinx simulation provides a one-to-one real-
istic correspondence between simulation and real implementation, this validates our
research and will soon be implemented on a Xilinx FPGA device. This research will
serve as the foundation for future studies and further improvement in both system
reliability and face recognition accuracy, leading to the design of a door access con-
trol system based on face recognition. The required time processing and the critical
path delay of the FPGA device will be discussed in future research when the hard-
ware implementation and camera modeling are completed. Future work will focus
on reducing the processing time delay by either reducing the number of the selected
Gabor filter orientations and scales or by dividing the resulting Gabor matrix into
sub-matrices and applying these sub-matrices to the system in parallel at the same
time by increasing the hardware utilization of the FPGA device.
Since we are trying to develop a prototype, we cannot determine the operational
scale of our device. But once it is designed, tested, and implemented we would grad-
ually get to know about its scale of information. Based on the cost and accuracy
effectiveness, we believe that once our device is implemented, it will be well accepted
by the society.
implementation and operation. In case, the benefits outweigh costs, the decision is
made to design and implement the system.
The determination of economic feasibility requires an identification of the potential
costs associated with the implementation of the proposed system. When multiple
layers are added to the existing devices, the cost may be increased by 50 percent to
100 percent, which is still a feasible price for a high security authentication device.
There are a few issues which may potentially skew the calculations for the economic
feasibility study. The first is the advancement of technology in materials and software
used for the proposed system which may increase the price accordingly. The second
is the reduction in price if the devices are manufactured in bulk.
In terms of cost benefits, the banking and financial organizations are expected to
appreciate the benefits immediately. An increase in efficiency, a lower duration of a
down time due to increased troubleshooting ability, and a potential for new users are
all benefits of the system. The proposed model with thorough cost and risk analysis
shows that the system is economically feasible to be implemented as a profitable
authentication system with assured security from imposters.
This study is carried out to check the economic impact that the system will have on
the organization. The amount of fund that the company can pour into the research
and development of the system is limited. The expenditures must be justified. Thus
the developed system as well within the budget and this was achieved because most
of the technologies used are freely available. Only the customized products had to be
purchased.
Our device is a combination of both hardware and software. The hardware components
are easily available in the market at a very cheap rate. Also the software used in this
project is a free source software.
System Design
35
Smart Surveillance System Chapter 6
6.1 Introduction
Design is a meaningful engineering representation of something that is to be built.
It is the most crucial phase in the developments of a system. Software design is a
process through which the requirements are translated into a representation of soft-
ware. Design is a place where design is fostered in software Engineering. Based on the
user requirements and the detailed analysis of the existing system, the new system
must be designed. This is the phase of system designing. Design is the perfect way
to accurately translate a customers requirement in the finished software product. De-
sign creates a representation or model, provides details about software data structure,
architecture, interfaces and components that are necessary to implement a system.
The logical system design arrived at as a result of systems analysis is converted into
physical system design.
• Coding: In this phase programmer starts his coding in order to give a full
sketch of product. In other words system specifications are only converted in to
machine readable compute code.
• Testing: In this phase all programs (models) are integrated and tested to en-
sure that the complete system meets the software requirements. The testing is
concerned with verification and validation.
• Maintenance: The maintenance phase is the longest phase in which the soft-
ware is updated to fulfill the changing customer need, adapt to accommodate
change in the external environment, correct errors and oversights previously
undetected in the testing phase, enhance the efficiency of the software.
• Less human resources required as once one phase is finished those people can
start working on to the next phase.
Implementation
44
Smart Surveillance System Chapter 7
7.1 Introduction
The implementation phase of the project is where the detailed design is actually
transformed into working code. Aim of the phase is to translate the design into a
best possible solution in a suitable programming language. This chapter covers the
implementation aspects of the project, giving details of the programming language
and development environment used. It also gives an overview of the core modules
of the project with their step by step flow. The implementation stage requires the
following tasks:
• Careful planning.
The input is the pi camera, which is used to capture the image and the captured
image is sent to the processor which checks for the faces. If any faces are detected
then it is further processed to check if the face is familiar or not. Finally the output
is produced.
compared with the image, if any face is found based upon the haar like feature, [3]a
rectangle box is drawn to indicatethat a face is detected.
7.5 Code
Testing
52
Smart Surveillance System Chapter 8
8.1 Introduction
Testing is an important phase in the development life cycle of the product this was
the phase where the error remaining from all the phases was detected. Hence testing
performs a very critical role for quality assurance and ensuring the reliability of the
software. Once the implementation is done, a test plan should be developed and run
on a given set of test data. Each test has a different purpose, all work to verify that all
the system elements have been properly integrated and perform allocated functions.
The testing process is actually carried out to make sure that the product exactly does
the same thing what is suppose to do. Testing is the final verification and validation
activity within the organization itself. In the testing stage following goals are tried to
achieve:-
During testing the major activities are concentrated on the examination and mod-
ification of the source code. The test cases executed for this project are listed below.
Description of the test case, steps to be followed; expected result, status and screen-
shots are explained with each of the test cases.
• Guarantee that all independent paths within a module have been exercised at
least once.
• Execute all loops at their boundaries and within their operational bounds.
• Interface error.
• Performance errors.
• Error in objects.
Advantages:
• The test is unbiased as the designer and the tester are independent of each other.
• The tester does not need knowledge of any specific programming languages.
• The test is done from the point of view of the user, not the designer.
8.5 Results
The smart surveillance camera is very effective in a way that it provides security by
reducing the alarming raise of crime at home. The Face of the human being is detected
easily with the help of the implemented algorithm a Haar classifier. like cascade.
56
Smart Surveillance System Chapter 9
9.1 Conclusion
Thus, we have developed a smart surveillance camera that can be started using alexa
and is capable of providing face detection a. Also the camera system is compact and
can be implemented with low cost. The implemented face detection algorithm (Haar
like cascade classifier) is very effective, with an accuracy of 88.9 percent which can be
increased further by effectively improving the illumination of the area. However, this
system is connected with the help of a Ethernet cable to the laptop to communicate
with the raspberry pi. This can be overcome by making the system wireless.
[1] Wilson Feipeng Abaya, a Low cost smart security camera with night vision ca-
pability, De La Salle Univ., Manila, Philippines
[9] Nicola L. C Talbot and Gavin C. Cawley. A fast index assignment algorithm for
robust vector quantisation of image data. In Proceedings of the I.E.E.E. Interna-
tional Conference on Image Processing, Santa Barbara, California, USA, October
1997.
58