You are on page 1of 65

CHAPTER - 1

INTRODUCTION

1.1 OVERVIEW

The Surveillance means to monitor something. Security in residential


complexes is restricted to limited geographical locations due to the traditional
devices and process used for securing any apartment or complexes. High Definition
Surveillance Camera using raspberry pi is set up in the areas which need to be
monitored. This system is motivation from other systems which explains similar
systems with some disadvantages which is tried to be solved. It also includes some
additional feature like data backup, push alert messages instead of SMS schemes
which requires additional hardware like GSM. New technologies are included like
IOT (Internet of thing) based applications. The internet of Things (IOT) is the
internetworking of physical devices, buildings and other items embedded with
electronics, software, sensors, actuators and network connectivity that enable these
objects to collect and exchange data. It is expected that by 2020, 20 billion devices
will be connected with the Internet. This system is built in general purpose and so
area is not limited for the use of system and include many applications where it can
be used which replace existing system. It is also user friendly as if user can access the
system from remotely as well as locally as per the situation. Two different
controlling android applications are provided for accessing raspberry pi through
command line or GUI based.

In the present world where we live there are already devices, which are
connected to each other and help in day to day aspects, for example wearable fitness
devices, sensors which help in automatic garages, RFIDs in ID cards used in
Universities and Industries to gain and lock access. However, imagine this after a
few years where billions of devices will be connected to each other including cars,
phones etc. Internet of Things(IOT) is a going development of the Internet by which
every day things objects have communication capabilities which allow them to send
and receive data. It is expected to connect systems, devices, sensors which can
communicate without need of machine-to-machine Communication .

1
IOT refers to an enormous variety of devices such as sensors that assist fire
fighters in rescue and search operations, heart beat and blood pressure measuring
devices, bio-chips that are implanted in farm animals. The internet of things
presently is being used in the fields of automobiles, agriculture, security surveillance,
smart homes and health care. The IOT expects to use low cost computing devices
where there is less energy consumptions and limited impact to the environment .

The project aims to simplify motion detection and the interface to be user
friendly, which would send prompt notifications when motion is detected. The main
limitation of Internet of things is that as the devices have limited computing power
the security aspects come in question as the transmitted and received data cannot be
encrypted and decrypted. However, Internet of things offers many advantages that
overcome this disadvantage. The IOT will revolutionize everyday life and help in
situations like managing airports' passenger flows, smart homes, heating buildings,
caring for the elderly .

The IOT has its own challenges, which need to be addressed. Every device
will require an IP address to communicate, the present IPv4 has only 4.3 billion
unique addresses, which will be exhausted soon and hence we will need to adapt to
IPv6. The next challenge would be data storage, as billions of devices are connecting
the data would need to be stored for which massive storage space is required. After
the data have been collected we need to make sure that the security policies are in
place as more and more personal information will be collected from devices which
not get breached and the data should not get in the hands of hackers. Privacy would
also be a great challenge as after the recent hacks people are becoming more
concerned about their privacy. Hence these challenges need to be taken in careful
consideration before planning any project related to the loT. In this project of motion
detection these security challenges have been considered .

2
Fig 1.1 IOT used in different fields

1.2 PROBLEM STATEMENT

The core problem faced by any system is its cost effectiveness. The existing
systems available are cctv cameras, fingerprint detection, face recognition, so these
traditional methods employed for building such security systems includes costly
sensors and different modules which unnecessarily increase the cost and complexity
and are also difficult to implement.
These limitations provided us an impetus to build a cost effective, efficient, high
speed processing security system that can be controlled and monitored miles and miles
away through the internet.
The need to develop a cost effective surveillance system through innovative
technology immensely influenced the development of this project. This project will
design and implement a security system based on Raspberry Pi microcomputer. The
system should be able to detect motion (intruder), activate a camera to take frames of
video after motion is sensed and then send an alert to the facility owner through
electronic mail plus an image attachment.
The cost of installation of any security system depends on several factors. First, the
type of camera being used is of great consideration. A typical digital camera e.g. CCTV

3
and IP camera with an LCD costs about US $ 450 [25] (different brands can differ on
prices) while the Raspberry Pi SBC together with its camera module is estimated at
US$ 80.
Another aspect of this project is to present an idea of monitoring and tracking of an
intruder through the use of a camera. Any object passing through the field of view of
camera will be detected then tracked in case the object attempts to move any body part.

1.3 OBJECTIVE

In recent years, lots of research have been done in computer vision domain. Video
surveillance in real-time scenario, especially for humans, like tracking and behavior
analysis is one of the most active research topics in computer vision and artificial
intelligence in present situation. The main focus is providing the low-cost and efficient
video surveillance system for home application and can have wide scope in other areas
such as elevator monitoring and server room monitoring. As the traditional surveillance
system requires huge storage capacity and consumes lot of network bandwidth, hence it
becomes necessary to provide solution for such design issues.

Recently security concerns have grown tremendously, it is important for all to be


able to safeguard their property from worldly harms such as thefts, destruction of
property etc. As the technology is widely growing in modern world, the
methodologies used by thieves and robbers are also equally improved in stealing.
Therefore, it is necessary for the surveillance techniques also to be improved with the
changing world. The latest technologies used against theft and destruction are the
video surveillance and monitoring. Even when needed, having a security camera
system may sometimes be impossible due to the expensive cost for installation.

Raspberry pi is credit card sized computer that has the capability to become a
camera security system when its own camera board is used. A new methodology has
been developed to detect the motion. Pyroelectric infrared (PIR) sensors are used
instead of any algorithm for motion detection. Whenever the motion is detected
through PIR sensor inside the room, the image is captured through camera and
temporarily stored in the raspberry pi module. After motion is detected user gets push
up message on android without any delay and here python script is also used which
directs the pi to send email notifications everytime motion is detected With these

4
components, a cost effective, low power and efficient security camera system is made.
Therefore, advantages like these, makes this application ideal for monitoring in
prevented or secured areas.

1.4 ORGANIZATION OF THE REPORT

The project is all about building up a Multi-purpose Surveillance System. There are
seven chapters that deals with the design and implementation details.

Chapter 1

This chapter deals on the objective and overview of the project.

Chapter 2

This chapter includes the surveys conducted on the existing systems and the base
papers.

Chapter 3

In this chapter, the specifications , characteristics, environment descriptions and


system requirements of the project.

Chapter 4

Here, the entire design and architecture of the system with the help of flow diagrams
and system requirements are discussed.

Chapter 5

In this chapter, the system implementation along with the screenshots are explained.

Chapter 6

This chapter gives the conclusions of the project.

Chapter 7

This chapter gives details about the future enhancements of the project.

5
CHAPTER - 2

LITERATURE SURVEY

2.1 INTRODUCTION

Information security is importance in any organizations such as business, records


keeping, financial and so on. This information security will help the organizations to
fulfill the needs of the customers in managing their personal information, data, and
security information. There are a few challenges faced by the organizations in
managing the information so that it would fall in hand of unauthorized person or
hackers. Talking about security, surveillance is the measure that is taken for
maintaining it. Also, monitoring the important happenings in those organizations is a
necessary thing. The proposed system uses IoT(Internet of Things) from which a
multipurpose surveillance and monitoring system can be developed.Surveillance
technology has always had a key role to play in the oil and gas industry, but that role
is changing.

Site security remains of paramount importance and always will; however,


surveillance technology has evolved, both in terms of quality and capability, so has

6
industry mind-set regarding its application. Complete risk management is now the
overarching challenge.Security nowadays has reached its peak playing a vital role in
securing day to day objects, valuables and belongings in a technologically challenging
environment. There are various modes to ensure security, yet surveillance is highly
advantageous than others. Surveillance camera ensures both security and threats
priory. The security system using surveillance can be enhanced by embedding
necessary sensors to it. They include raspberry pi, PIR sensor board, night vision
camera module and SD card. Here we construct security surveillance system under
the IoT domain which is implemented through raspberry pi.

Internet of Things is a network of physical devices, home appliances and other


embedded with electronics, software, sensors, actuators and connectivity which
enables these objects to connect and exchange data. Internet of Things is very useful
for developing such a smart system. A security camera is possible to monitor the
people, find the intruders, controlling the denial and acceptance of access. This
monitoring can also be done during the night with the usage of night vision camera.

Raspberry pi is considered as the most advanced system which can withstand any
type of coding. It is a low cost device which can perform multiple functions like an
ordinary computer. Raspberry pi is a single board computer which provides
portability, compatibility, flexibility, clarity to the camera with extra vision.

Based on the idea, a literature survey was done and the details are reported here.

2.2 EXISTING SYSTEM

In today’s world security and safety are highly mattering much in all types of
organizations and institutions. A system is necessary to manage and sort all these
kinds of security issues of the organizations. The proposed system uses Internet of

7
Things(IoT) to develop a surveillance system that is easy to install and handle. Before
going to the proposed system, let us look into the survey on the existing systems.

CCTV is one among the most commonly used surveillance techniques. It is


widely used in day to day life. However, it has its own disadvantages. It is costlier to
install as the system may require many recording devices, cameras and monitors. The
major limitation of CCTV cameras is that they can only monitor a limited area. The
cameras can be vandalized in various ways, such as spraying something on the lens or
sticking gums . Even the angle of the camera can be altered. CCTV information is
very much important now a days,so they can be hacked by hackers too.

Fig 2.1 CCTV Cameras

Robots controlled by WiFi is another existing system that is used for video
surveillance. This uses GPS tracking system. The system also had few disadvantages
like the size and weight of the robot was high. The architecture of the Robot is
complex and also more components are required. GPS tracking system does not give
100% success rates at all times.

8
Fig 2.2 Wi-Fi Controlled Robot

Zigbee communication is most prominently used for controlling sensor networks.


It is a low-cost and low-powered network. Zigbee controlled video surveillance
system also is being used. The main disadvantage of Zigbee is that the access range is
very small, ranging from 10-100 meters.

Fig 2.3 Zigbee Controlled Robot

Raspberry Pi, the most advanced and latest innovation in internet technology, has
several uses in the field of automation, IoT(Internet of Things) and so on. It is a credit
card sized computer which can be connected to peripherals like USB keyboard,

9
mouse, cameras and so on. In the papers referred, a Robot controlled by Raspberry Pi
is developed for monitoring and surveillance. Being a robot again the same
disadvantages like cost, components and complexity are common.

2.3 ISSUES IN EXISTING SYSTEM

CCTV, or closed circuit television, is the most commonly used security system
for homes, stores, banks and businesses. A CCTV system is made up of single or
multiple cameras, a recording device and a monitor. Systems can be wired or wireless.
While CCTV has many advantages, there are disadvantages in both types of system.

A major disadvantage for CCTV cameras is that they can only monitor a limited area.

Criminals can vandalize the cameras in various ways, such as sticking gum or
spraying something on the lens. They may even be able to change the angle of the
camera. Criticism from the general public is usually about the lack of privacy and
high cost to install for personal use.

Wireless systems need a specified frequency for the camera to send signals to the
receiving and recording station. Other electric motored products, such as air
conditioning, fluorescent lighting and cordless telephones can cause interruptions in
the frequencies, affecting the picture quality. Wireless systems are subject to
distortion in image quality, and need experts in wireless technology to identify and
repair system breakdowns. Some systems may not be completely wireless, as they
require an electric power cable.

Wired CCTV systems have the disadvantage of being fixed to a particular area,
meaning the camera can't simply change location. The installation and cabling of
these cameras is a difficult task that demands the assistance of professionals.

The value of CCTV information has increased, resulting in a higher risk from hackers.

10
Hacking CCTV footage has led to privacy issues, such as images captured by
CCTV of naked women distributed across the Internet. It is not possible to completely
protect public security systems from hackers. As the system connects to a network,
hackers can hack into the system virtually from outside locations.

The disadvantages of Wi-Fi are as follows:

Security:

To combat this consideration, wireless networks may choose to utilize some of


the various encryption technologies available. Some of the more commonly utilized
encryption methods, however, are known to have weaknesses that a dedicated
adversary can compromise.

Range:

The typical range of a common 802.11g network with standard equipment is on


the order of tens of meters. While sufficient for a typical home, it will be insufficient
in a larger structure. To obtain additional range, repeaters or additional access points
will have to be purchased. Costs for these items can add up quickly.

Reliability:

Like any radio frequency transmission, wireless networking signals are subject to
a wide variety of interference, as well as complex propagation effects that are beyond
the control of the network administrator.

Speed:

The speed on most wireless networks (typically 1-54 Mbps) is far slower than
even the slowest common wired networks (100Mbps up to several Gbps). However,
in specialized environments, the throughput of a wired network might be necessary.

11
The disadvantages of Wi-Fi controlled Robot are as follows:

Limited Frequency Range: The frequency range used for typical RF


communication is near about 3KHz-3GHz. The use of channel separator increases the
reliability but decreases the actual usable working frequency range.

Limited Functions: The limited number of channels causes less number of


combinations and thus there are less numbers of available functions.

Limited Working Range: The working range of RF circuits with transmitters


and receiver is very small. It starts from a few meters to a few kilometres. The
working varies from circuits to circuits, but mainly depends on the values of physical
components used in the circuit. Mainly Wi-Fi and Wi-Max wireless services are used
in RF transmitter and receiver circuits. The following table shows the actual working
range of different wireless standards that can be used in wireless communication.

Reliability of Operation: The RF circuits are very prone to errors due to external
conditions such as EMI (Electro-Magnetic Interference), medium saturation,
absorption due to repetitive reflections from surface. Hence the output recovered is
not always what is expected. This might be a serious problem when working with
scientific experimental components.

Security reasons: This is the main disadvantage of using a RF circuit and the
main reason why RF circuits are not preferred today. The RF frequency band is
available for almost all the users for data communication. So there might be a
scenario where more than one user is trying to accommodate channel for its own
communication. In such case the frequency band may get interference from another
user. Or worst case would be, some user intentionally trying to jam our

12
communication network. The RF jammer circuits are very easy to design; hence the
question of security arises when RF circuit is used in the circuit. This security loop
hole can be very dangerous when the robot is being used for very confidential
purposes. In areas of military these security threats can produce disastrous outcomes.

Following are the disadvantages of Zigbee:

 It requires knowledge of the system for the owner to operate zigbee compliant
devices.

 It is not secure like wifi based secured system.

 Replacement cost will be high when any problem occurs in zigbee compliant
home appliances.

 Like other wireless systems, zigbee based communication is prone to attack from
unauthorized people.

 The coverage is limited and hence can not be used as outdoor wireless
communication system. It can be used in indoor wireless applications.

2.4 SUMMARY OF LITERATURE SURVEY

The description of the papers surveyed are given in this section and the details of
the papers are given after the conclusion.

1. Here a security system using Raspberry Pi and NodeMCU (IoT/WiFi


module) which integrates sensor alerts with video surveillance techniques.
Raspberry Pi is a low cost, low power, single board computer which can handle
multiple functions like a normal computer. Intrusion and fire detection are the
prime features of this system. This system is purely based on WiFi connectivity.

13
2. Road Traffic is one of the most vital problem in our hastily developing
world. This paper presents of study of different aspects and issues related to the
problem.It emphasizes on using prominent technology -Internet of Things (IoT)
for developing smart system to monitor various parameters related to road traffic
and using it for effective solution.Traffic surveillance can be very useful for
future planning such as pollution control, traffic signal control, infrastructure and
road planning, accidental blockage avoidance. The data obtained from this system
can be useful for the prediction of the traveling time and path.

3. This paper proposes a surveillance system that can be adapted at houses


for smart automation.The main objective is to design and execute a cost effective
and open source home automation and surveillance system. The use of Internet of
Things (IoT) has provided great flexibility in connecting various modules and
controlling the same through a webpage. In this project, a webcam is connected to
one of the USB ports present on the Raspberry Pi board. A DC motor is
connected to GPIO pins of Raspberry Pi through a driver circuit for controlling of
the door. A particular IP-address is allotted by the router which is interfaced with
the Raspberry Pi through an Ethernet cable.

4. The proposed robotic unit is used for video surveillance of remote place
as well as remotely control of the unit using Wi-Fi as medium. Raspberry pi serve
the purpose of server as well as the microprocessor for the system. An embedded
web server creates an easy way for monitoring & controlling any device which is
at remote place. Video is captured through the webcam placed on the robotic unit
and lively transmitted to the remote end. Controls are provided on the console
page where one can see the live streaming as well as can control the movement of
robotic unit. This paper gives an approach towards video surveillance and control
using advanced processor like raspberry pi.

14
5. Along with the use of Raspberry pi, this paper features an Android
application, which is used to control the device. The Android application will
open a web-page which has video screen for surveillance and buttons to control
robot and camera. Android Smartphone and Raspberry pi board is connected to
Wi-Fi. An Android Smartphone sends a wireless command which is received by
Raspberry pi board and accordingly robot moves. The Video Streaming is done
using MJPG streamer program that gets mjpeg data and sends it through a HTTP
session. The Raspberry pi programming is done in python language. The
experimental result shows that the video streamed up to 15 frames per second.

6. In this paper, the tracking of human with respect to a video surveillance


is studied and techniques adapted to track a person are given in detail. It gives
few algorithms for filtering, segmentation and object tracking.

7. Robots are being used in variety of industrial applications for various


activities like pick and place, painting, assembling of subsystems and in
hazardous places for material handling etc. Robots are becoming more and more
advanced as technology increment in the areas of CPU speed, sensors, memories
etc. And there is ever demanding applications even in defence. So, this paper uses
aspects of robotics along with IoT to create a Surveillance system.

8. In the proposed system the robot can transmit video in a wireless fashion
reducing the cost of wires, implementation of advanced technology so which is
proposed to be a high security alert. The robot can return to the docking station
recharging operations when the on-board battery is too low hence an high
security system which is high alert for people and hence on the whole Monitoring
easy through Computer and storing of the video Detecting persons through PIR
sensors and thus alert in the server side only when there is detection of human
and use of multiple use of sensors like ultrasonic sensors and so on for High
Protection.

15
9. This paper gives a description to develop a robot which can move in
autonomous mode as well as to control in remote mode as per the user control for
video monitoring and relay to the user. The proposed robot motion will be
controlled with PWM techniques using a Microcontroller and Bidirectional DC
Bridge for Motor Driving. It is proposed to address the low cost, efficient, high
speed processing & control hardware for the self-navigating robotics application.

16
CHAPTER - 3

SPECIFICATIONS

3.1 INTRODUCTION

In this chapter, we will have a look at the specifications like hardware


requirements, software setup and other performance requirements.

3.1.1 PURPOSE

Security nowadays has reached its peak playing a vital role in securing day to day
objects, valuables and belongings in a technologically challenging environment.
There are various modes to ensure security, yet surveillance is highly advantageous
than others. Surveillance camera ensures both security and threats priory. The security
system using surveillance can be enhanced by embedding necessary sensors to it.
They include raspberry pi, PIR sensor board, night vision camera module and SD card.
Here we construct security surveillance system under the IoT domain which is
implemented through raspberry pi.

Internet of Things is a network of physical devices, home appliances and other


embedded with electronics, software, sensors, actuators and connectivity which
enables these objects to connect and exchange data. Internet of Things is very useful
for developing such a smart system. A security camera is possible to monitor the
people, find the intruders, controlling the denial and acceptance of

access. This monitoring can also be done during the night with the usage of night
vision camera.

17
Raspberry pi is considered as the most advanced system which can withstand any
type of coding. It is a low cost device which can perform multiple functions like an
ordinary computer. Raspberry pi is a single board computer which provides
portability, compatibility, flexibility, clarity to the camera with extra vision.

3.1.2 PROJECT SCOPE

 The basic aim of the project is to provide more accurate security measures.

 This will be useful when it comes in getting any sort of details regarding the
intruders, law breakers etc.

 Further it can be enhanced to fit into any kind of system with slight
modifications.

 For example, it can be used for industrial monitoring for any kind of
mishaps.

3.2 OVERALL DESCRIPTION

3.2.1 OPERATING ENVIRONMENT

Raspbian is a Debian-based computer operating system for Raspberry Pi. There


are several versions of Raspbian including Raspbian Stretch and Raspbian Jessie.
Since 2015 it has been officially provided by the Raspberry Pi Foundation as the
primary operating system for the family of Raspberry Pi single-board
computers. Raspbian was created by Mike Thompson and Peter Green as an
independent project. The initial build was completed in June 2012. The operating

18
system is still under active development. Raspbian is highly optimized for the
Raspberry Pi line's low-performance ARM CPUs.

Raspbian uses PIXEL, Pi Improved Xwindows Environment, Lightweight as its


main desktop environment as of the latest update. It is composed of a
modified LXDE desktop environment and the Openbox stacking window manager
with a new theme and few other changes. The distribution is shipped with a copy of
computer algebra program Mathematica and a version of Minecraftcalled Minecraft
Pi as well as a lightweight version of Chromium as of the latest version.

Jessie is the official operating system for Raspberry Pi. As compared to Windows
10 IoT, Raspbian Jessie is a full desktop operating system where you can perform lots
of tasks just like any PC. A lot of tools are available out of the box, like LibreOffice
Suite, Java development environment etc., and you can browse the internet, configure
your mails, play games etc. in this operating system. Along with these common uses,
you can use this OS in your home automation projects as well.

Prerequisites

1. Raspberry Pi 2 or latest.

2. Mobile charger (Micro USB charger) to power up your Raspberry Pi

3. 4GB micro-SD card (at least) but I recommend to use 8GB Class -10

4. Monitor or display screen (optional) to connect Raspberry Pi.

5. Card reader to transfer OS image to micro-SD card.

6. Laptop or Desktop to transfer OS image in micro-SD card.

7. Image file of Raspbian Jessie OS, which is optional if we choose NOOBS


method.

8. Image writing software.

9. Supported Wi-Fi dongle or a LAN cable to connect your Raspberry Pi to the


network.

19
Installing Raspbian Jessie

There are multiple ways to install the Raspbian Jessie on your Raspberry Pi.

1. Download and install the Raspbian Jessie image. or

2. We can use NOOBS to install Raspbian Jessie.

Installing Raspbian Jessie by downloading the image

1. Insert the micro-SD card into card reader and connect it with your PC.

2. Format your SD card with FAT file system. To format your SD card, you can
use a very good toolfrom SD Association's Formatting Tool.

3. Download Raspbian Jessie image from the official site. We have two options
on the landing page - Raspbian Jessie and Raspbian Jessie Lite. For this
article and further articles, we will be using Raspbian Jessie’s full image but
you can use any of the both. Extract the zip file.

4. For next step, we need a software to write the operating system image into SD
card. For this purpose, you can use Win32DiskManager tool.

Fig 3.1 Win32 Disk Imager

5. Select your SD card from available device options.

6. Select the location of the Raspbian Jessie’s image file wherever you have
downloaded it in your PC.

20
7. Click Write button in Win32 Disk Imager.

8. After sometime, your memory card will be ready. On completion, remove


your SD card and insert into the Raspberry Pi’s memory card slot. (You can
find this slot on the back side of the Raspberry Pi).

9. Power On your Raspberry Pi. The first boot will take some time (5 mins
approx.).

10. After the booting, you will get the following screen.

Fig 3.2 Raspbian Jessie OS

Installing Raspbian Jessie using NOOBS

NOOBS is a simple tool for beginners. You just need a NOOBS software in your SD
card and rest of the things will be done by NOOBS itself. You can get this software
by purchasing pre-installed SD cards or you can download it from here. There are two
modes of this software NOOBS and NOOBS Lite.

NOOBS is an easy operating system installer which contains Raspbian. It also


provides a selection of alternative operating systems which are then downloaded from
the internet and installed.

21
NOOBS Lite contains the same operating system installer without Raspbian
pre-loaded. It provides the same operating system selection menu allowing Raspbian
and other images to be downloaded and installed.

To start installation, follow these steps.

1. Format the SD card with FAT. To format your SD card, one can use a very
good tool from SD Association's Formatting Tool.

2. Download NOOBS from the official raspberry website .

3. Extract the downloaded zip file on the root of the SD card.

4. Put the SD card in Raspberry Pi and boot up the device.

5. On first boot, you will see the list of available operating systems to start
installation.

Fig 3.3 NOOBS setup

22
6. From this list, select Raspbian and click install.

7. After selecting the operating system, NOOBS will warn that it will overwrite
all data on SD card. Do you want to continue? Click Yes.

Fig 3.4 NOOBS setup

8. After some time, your memory card will be ready. On completion, remove
your SD card and insert into Raspberry Pi’s memory card slot. (You can find
this slot on the back side of the Raspberry Pi).

9. Power On your Raspberry Pi. The first boot will take some time (5 mins
approx.).

10. After booting, you will get the following screen.

23
Fig 3.5 Raspbian Jessie

11. That's it. You have successfully installed the Raspbian Operating System.

3.2 EXTERNAL INTERFACE REQUIREMENTS

3.2.1 HARDWARE REQUIREMENTS

Raspberry pi-:

24
Fig. 3.6 Raspberry pi 3 model B

The Raspberry Pi is a series of small single-board computers developed in the


United Kingdom by the Raspberry Pi Foundation. The Raspberry pi is a low cost
single board, packing considerable computer power in a size of a credit card. The
Raspberry pi board contains many features like camera connector, Ethernet port,
GPIO pins for interfacing sensors and switches, USB ports to connect to external
devices like keyboard, mouse, Wi-Fi adapter etc., HDMI port to interface to monitors
like LCD screens, projectors, TVs etc. and ab audio jack also available. By all these
embedded on a single board. The Raspberry pi has no internal mass storage or built-in
operating system and hence it requires an SD card preloaded with version of the
Linux Operating system. All models of Raspberry pi include an ARM compatible
CPU and an on-chip GPU.

The Raspberry Pi 3 is the third-generation Raspberry Pi. It replaced the Raspberry Pi


2 Model B in February 2016

25
Technical specifications-:

 A 1.2GHz 64-bit quad-core ARMv8 CPU

 802.11n Wireless LAN

 Bluetooth Bluetooth Low Energy (BLE) 1GB

 4USB ports

 40 GPIO pins

 Full HDMI port

 Ethernet port

 Combined 3.5mm audio jack and composite video

 Camera interface

 Display interface

 Micro SD card slot (now push-pull rather than push- push)

 VideoCore IV 3D graphics

 Power: 10W(2A)

 System-on-chip used: Broadcom

Logitect Webcam C170 :

The Logitech Webcam C170 is easy to use and supports plug-and-play


connectivity with USB 2.0. It features Logitech's Fluid Crystal Technology and the
VGA sensor supports video clear video calling at 640 x 480 resolution. You can use
the C170 to capture video at 1024 x 768 resolution. Plus, it captures up to
5-megapixel photos with a little help from the Logitech software. There's a built-in
microphone with noise reduction, so you can clearly hear who you are talking with.
And, the webcam includes a universal clip that can attach to your laptop or desktop
monitor.

26
Plug-and-Play Setup

With simple plug-and-play setup, you'll be making video calls in no time on most
major IMs

Fig 3.7 Logitech C170 Web-Cam

Clear Video Calls

With your webcam's VGA sensor, the people you care about will see you in natural
color

5-Megapixel Photos

You can take beautiful, high-resolution snapshots up to 5-megapixels (software


enhanced)

Built-In Mic with Noise Reduction

The built-in mic with noise reduction gives you clear conversations without annoying
background noise

27
XVGA Video Recording

Record lively, colorful videos in XVGA (1024 x 768) resolution and share them with
friends, family and the world on Facebook, YouTube, Twitter or your blog

Universal Clip

You can attach your webcam securely to a laptop or LCD monitor, or sit it on a shelf
or desk.

System Requirements

 1 GHz (1.6 GHz recommended)


 512 MB RAM or more
 200 MB hard drive space
 Internet connection
 USB 1.1 port (2.0 recommended)
 Dual-core CPU with 1 GB RAM
 Broadband Internet with 256 kbps upload or higher

Technical Specifications

 Video calling (640 x 480 pixels) with recommended system


 Video capture: Up to 1024 x 768 pixels
 Logitech Fluid Crystal™ Technology
 Photos: Up to 5 megapixels (software enhanced)
 Built-in mic with noise reduction
 Hi-Speed USB 2.0 certified (recommended)
 Universal clip fits laptops, LCD or CRT monitor
 Pan, tilt, and zoom controls
 Video and photo capture
 Face tracking
 Motion detection

28
 Requires installation of software available for download
at www.logitech.com/downloads.

3.2.2 SOFTWARE REQUIREMENTS

Putty-:

Putty is a free and open-source terminal emulator, serial console and network
file transfer application. It supports several network protocols, including SCP, SSH,
Telnet, rlogin, and raw socket connection. It can also connect to a serial port. The
name "Putty" has no definitive meaning. Putty was originally written for Microsoft
Windows, but it has been ported to various other operating systems. Official ports are
available for some Unix-like platforms, with work-in-progress ports to Classic Mac
OS and Mac OS, and unofficial ports have been contributed to platforms such as
Symbian, Windows Mobile and Windows Phone. Putty was written and is
maintained primarily by Simon Tatham.

29
Fig. 3.8 Putty Configuration

Putty consists of several components:

 Putty: The Telnet, rlogin, and SSH client itself, which can also connect to a
serial port
 PSCP: an SCP client, i.e. command-line secure file copy
 PSFTP: an SFTP client, i.e. general file transfer sessions much like FTP
 PuTTYtel: A Telnet-only client
 Plink: a command-line interface to the Putty back ends

30
 Pageant: an SSH authentication agent for Putty, PSCP and Plink
 Puttygen: an RSA, DSA, ECDSA and EdDSA key generation utility
 pterm: a standalone terminal emulator

3.3 MOTION DETECTION METHODS

Fig 3.9 Motion Detection

Background Subtraction Method:

A very widely used method which is simple to implement by just subtracting the
current frame from previous frame and obtaining threshold value of difference
between given pixel value and obtained pixel value. If threshold value is greater than
the given the pixel it is considered as foreground. This method is not as appropriate as
it is highly inaccurate and gives false rate detection.

Real Time Background Subtraction and Shadow Detection Technique Theory:


It describes two type of distortion namely brightness distortion and chromaticity
distortion based on RGB values of pixels in given image. This method is accurate up
to some extends as it also detect the shadow part of object .

Template Matching Template Matching:

It is probably the best method for some specific environment. It's the most
accurate although sometimes there is lack of originality in object detected. Object can
be detected for one specific video using a template cropped from the video. However,

31
there is no guaranteed accuracy because all that is known is the best match for each
frame; no scanning is done on the percentage template matches the frame. It only
works if the object is always in the video, otherwise it will create a false detection

Shape Based Shape based method:

It is used to detect objects in real-world images. The shape features are more
striking as compared to local features like SIFT because most object categories are
better described by their shape then texture, such as cows, horses and cups and also
for wiry objects like bikes, chair or ladders, local features contain large amount of
background noise. Thus shape features are often used as a replacement to local
features

3.4 OTHER NON-FUNCTIONAL REQUIREMENTS

3.4.1 PERFORMANCE REQUIREMENTS

It doesn’t matter whether you’re using your Raspberry Pi to run retro games, as a
media center, or any of the other wonderful projects that might pique your interest. If
the Pi isn’t configured to run at its most optimum, you’re going to have a bad
experience.

 Connect a reliable power supply:

One thing you need to make sure with any Raspberry Pi setup is that you’re
using a reliable power supply. The Raspberry Pi 3 (which is the best solution for
desktop use) requires a micro-USB power connector. Ideally this should be connected
to a power supply adaptor with a 2.5A capacity. While it may seem more convenient
to connect the Pi directly to a USB port on your power bar, or to use your smartphone
charger, these deliver unreliable results.

Consider this: You’re using the Pi for desktop work, internet, email, office tasks.
Some programming. You don’t want the computer to suddenly freeze or shut down

32
because you’re asking too much of it. Avoid this by ensuring the power supply is up
to specification, and reliable. You’ll find a 5V 2.5A power supply is more than
powerful enough.

 Use a light weighted OS:

Once your power requirements are sorted out, you’ll need to install a distro that
uses as few resources as possible. Pushing performance on your Raspberry Pi means
keeping things to a minimum, and several Linux operating systems (distributions or
distros) have been developed with this purpose in mind.6 Lightweight Operating
Systems for Your Raspberry Pi.

3.4.2 SECURITY REQUIREMENTS

The Raspberry Pi and many other inexpensive computer boards like it have
become part of the "Internet of Things" or IoT revolution. Internet-connected
computing devices have emerged beyond traditional servers, desktops, laptops, and
mobile devices. Now your TV, DVR (digital video recorder), thermostat, refrigerator,
Internet radio, Raspberry Pi, and other devices are on the network too.

IoT has been huge for experimentation and innovation. But as projects get rushed
to completion, there have been severe consequences for ignoring security. And this
applies both to commercial products and hobby projects. I'll talk about the Raspberry
Pi specifically in this article, so this post is oriented more toward do-it-yourself
projects.

Before anything else, one tip has to be first. Change the passwords on the
devices—don't leave them at the default setting. Default passwords are easy to look
up. So that's a common thing attackers will always try.

33
CHAPTER - 4

SYSTEM DESIGN

4.1 INTRODUCTION

The project is about video surveillance system using raspberry pi and webcam.
The need to develop a cost effective surveillance system through innovative
technology immensely influenced the development of this project. This project will
design and implement a security system based on Raspberry Pi microcomputer. The
system should be able to detect motion (intruder), activate a camera to take frames of
video and then the facility owner can stream through the browser.

Another aspect of this project is to present an idea of monitoring and tracking


of an intruder through the use of a camera. Any object passing through the field of
view of camera will be detected then tracked in case the object attempts to move any
body part. In video surveillance, motion detection refers to the capability of the
surveillance system to detect motion and capture the events.

Motion detection is usually a software-based monitoring algorithm which will


signal the surveillance camera to begin capturing the event when it detects motions.
This is also called activity detection. An advanced motion detection surveillance
system can analyse the type of motion to see if it warrants an alarm. In this project, a
camera fixed to its base has been placed and is set as an observer at the outdoor for
surveillance. Any small movement with a level of tolerance it picks is detected as
motion.

34
4.2 System Architecture

The system to be designed cannot wholly replace the role of CCTV and IP
surveillance cameras especially in large commercial set ups but will make it easy for
low income home owners to monitor their homes at a very affordable price. In
addition to the fact that the Raspberry Pi board is cheap, the camera to be used in this
case is relatively cheap compared to the others. The whole security system circuitry is
simple and easy to implement.

In video surveillance, motion detection refers to the capability of the surveillance


system to detect motion and capture the events. Motion detection is usually a
software-based monitoring algorithm which will signal the surveillance camera to
begin capturing the event when it detects motions. This is also called activity
detection. An advanced motion detection surveillance system can analyse the type of
motion to see if it warrants an alarm. In this project, a camera fixed to its base has
been placed and is set as an observer at the outdoor for surveillance. Any small
movement with a level of tolerance it picks is detected as motion. As shown in the
figure below, the whole architecture of the system is composed of five modules
namely

 Raspberry Pi 3 model
 Pi camera/USB Camera
 WiFi Dongle
 Monitor/laptop

35
Fig 4.1: Raspberry pi

There are a few different versions of the Raspberry Pi, each made for different
uses. All of the current versions use a micro sd card for the os and file storage. They
are powered by a micro-USB port, have one HDMI port, one audio/video jack socket,
and a 40-pin GPIO connector. The Raspberry Pi is a low-cost credit-card sized
single-board computer. The Raspberry Pi was created in the UK by the Raspberry Pi
Foundation. The Raspberry Pi Foundation's goal is to "advance the education of
adults and children, particularly in the field of computers, computer science and
related subjects. Many people have used the Raspberry Pi to make things like cameras,
gaming machines, robots, web servers and media centres.

36
Fig 4.2: WiFi dongle

A USB adapter or dongle plugs into one of your desktop or laptop’s universal
serial bus (USB) ports, allowing you to connect to a wireless network in the home,
office, or a public place. You can use this connection to access shared files, devices,
and documents, or to connect to the Internet. This is a handy alternative for those
using computers that do not have integrated network adapters. A USB device is
often less expensive than a replacement network card. Adapters tend to be bulkier
than dongles, but more powerful. However, dongles fit in the pocket, so are more
portable. These devices resemble memory sticks .

37
Fig 4.3: System architecture of video surveillance

The security system to be designed in this project can be used extensively to


monitor facilities by owners. The owner shall be able to monitor their property from
wherever they are in the world. It will not replace the use of CCTV and camera
surveillance systems but reduce the cost of implementation of a basic security system.
This thus will enable small home owners to secure their facility at a cheaper cost.

4.2.1 Flow Chart

The flow chart for the video surveillance system is based on the video tracking
of the intruders or thieves. It basically describes about the live video streaming that
occurs only when there is motion detected in the surroundings. However, this project
will not attempt to design the motion detection device, camera or the Raspberry PI. It
will therefore use these systems together with a suitable program script to accomplish
a real time surveillance system as desired. The flow chart basically describes about
the capturing of the video in the live stream and editing it without the noise and
filtering it. Finally the live stream is seen in the localhost using the ip address which
was found out by the ip scanner.

38
The figure below shows the flow chart of the project where the live stream video
is recorded. An appliance that enables embedded image capture capabilities that
allows video images or extracted information to be compressed, stored or transmitted
over communication networks or digital data link. Digital video surveillance systems
are used for any type of monitoring. Broadly, video surveillance is the image
sequences which are recorded to monitor the live activities of a particular scene. The
importance of this digital evidence is given the first priority for any kind of
occurrence. This digital information is recently become the field of interest to the
researchers on the field of AI, Robotics, Forensic Science and other major fields of
science.

The project is about video surveillance system using raspberry pi and


webcam. The need to develop a cost effective surveillance system through innovative
technology immensely influenced the development of this project. This project will
design and implement a security system based on Raspberry Pi microcomputer. The
system should be able to detect motion (intruder), activate a camera to take frames of
video and then the facility owner can stream through the browser.

Aside from the intrinsic usefulness of being able to segment video streams into
moving and background components, detecting moving blobs provides a focus of
attention for recognition, classification, and activity analysis, making these later
processes more efficient since only “moving” pixels need be considered. There are
three conventional approaches to moving object detection: temporal differencing,
background subtraction and optical flow. Temporal differencing is very adaptive to
dynamic environments, but generally does a poor job of extracting all relevant feature
pixels.

A static camera observing a scene is a common case of a surveillance system.


Detecting intruding objects is an essential step in analysing the scene. A usually
applicable assumption is that the images of the scene without the intruding objects
exhibit some regular behaviour that can be well described by a statistical model. If a

39
statistical model of the scene has been revealed, an intruding object can be detected
by spotting the parts of the image that don’t fit the model. This process is usually
known as “background subtraction”.

The importance of this digital evidence is given the first priority for any kind of
occurrence. This digital information is recently become the field of interest to the
researchers on the field of AI, Robotics, Forensic Science and other major fields of
science. The figure below shows the flow chart of the project where the live stream
video is recorded. An appliance that enables embedded image capture capabilities that
allows video images or extracted information to be compressed, stored or transmitted
over communication networks or digital data link. Digital video surveillance systems
are used for any type of monitoring. Broadly, video surveillance is the image
sequences which are recorded to monitor the live activities of a particular scene.

40
Fig 4.4: Flow chart of video surveillance

This project is focused on developing a surveillance system that detects


motion and to respond speedily by capturing an image and relaying it to an
administrator device through the internet platform. The system will require Raspberry
Pi module, motion detection sensor, camera and 3 internet connection. It will come up
with an implementation of a surveillance system which presents the idea of
monitoring a particular place in remote areas. The system can be monitored by the
user form anywhere in the world.

41
4.2.2 Description

The raspberry pi is the main hardware device which is being used. A raspberry
pi can be used to implement a security system with motion detection, image
processing and alert mechanism. The alert ought to contain a time lapse photo or
video and transmitted over the internet. This thus will enable the users to monitor the
homes from anywhere in the world. The work flow diagram is almost the same as the
data flow diagram. We can use a raspberry pi or a webcam for the live video
streaming in the browser with the help of the ip address. The ip address is known of
the raspberry pi using the angry ip scanner.

The flow chart is the description of the whole process. Nowadays this project
is basically used for home security purposes in various places to avoid some thefts
and any other problems where the intruders cause in the society. The project has many
advantages and a few disadvantages as it works live streaming in the internet and does
not work if there is no power supply. The raspberry pi is the main part of this project.
If it stops then the whole project and the setup will not work.

Usually a simple bottom-up approach is applied and the scene model has a
probability density function for each pixel separately. A pixel from a new image is
considered to be a background pixel if its new value is well described by its density
function. For example, for a static scene the simplest model could be just an image of
the scene without the intruding objects. The next step would be, for example, to
estimate appropriate values for the variances of the pixel intensity levels from the
image since the variances can vary from pixel to pixel. However, pixel values often
have complex distributions and more elaborate models are needed.

4.3 Summary

42
We can use this system for military applications installing suitable sensors. Just
by changing the robotic unit design we can use it in hospitals for patient monitoring.
Using some chemical sensors we can detect harmful gas

leakage in the chamber the time delay which occurs in the execution of commands
can be reduced and thus we can have more real time access to the robot. With reduced
time delay we can have faster operation and quick response to any illegal activities in
the monitored area. Also it can be used as a spy robot. The robot is very economical.

Human quest for an automatic detection system of everyday occurrence lead to


the necessity of inventing an intelligent surveillance system which will make lives
easier as well as enable us to compete with tomorrows technology and on the other
hand it pushes us to analyse the challenge of the automated video surveillance
scenarios harder in view of the advanced artificial intelligence. It will come up with
an implementation of a surveillance system which presents the idea of monitoring a
particular place in remote areas.

The simplest form of the reference image is a time-averaged background


image. This method suffers from many problems and requires a training period absent
of foreground objects. The motion of background objects after the training period and
foreground objects motionless during the training period would be considered as
permanent foreground objects.

In addition, the approach cannot cope with gradual illumination changes in the
scene. These problems lead to the requirement that any solution must constantly
re-estimate the background model. Many adaptive background modelling methods
have been proposed to deal with these slowly-changing stationary signals. Friedman
and Russell modelled each pixel in a camera scene by an adaptive parametric mixture
model of three Gaussian distributions. The methods can cope well with the
illumination changes; however, can not handle the problem of objects being
introduced or removed from the scene

43
CHAPTER - 5

SYSTEM IMPLEMENTATION

5.1 Introduction

Of the many projects that you can build with Raspberry pi, one of the most
interesting and permanently useful is the motion capture security system. All you
need is the usual Raspberry Pi setup, a webcam and an optional battery pack, along
with a nondescript case for concealing the security system. With this setup, you can
keep an eye on your property from a remote location, receiving alerts if anything is
captured by the webcam and a link to the footage if necessary. Compared with the
price of off-the-shelf security systems, this is remarkably affordable and portable,
and as you’ll see below can be setup in minutes.

The system will require Raspberry Pi module, motion detection sensor, camera
and 3 internet connection. It will come up with an implementation of a surveillance
system which presents the idea of monitoring a particular place in remote areas. The
system can be monitored by the user form anywhere in the world. The system should
be able to detect motion (intruder), activate a camera to take frames of video and then
the facility owner can stream through the browser. Another aspect of this project is to
present an idea of monitoring and tracking of an intruder through the use of a camera.
Any object passing through the field of view of camera will be detected then tracked
in case the object attempts to move any body part.

5.2 Overview of the project environment

44
The project needs a Raspberry pi, a formatted SD card, a webcam (for compatible
devices) and a power supply; you will probably need a powered USB hub too, as
many webcams need their own power supply when connected to the Pi. This might be
a powered USB cable, or a battery solution for the Raspberry Pi, of which there are
many options, most of which you can find via the eLinux wiki. Note that there are
alternatives, however, such as 4x or 6x rechargeable AA batteries. Some
portable iPad chargers will also work – but check your charger’s model number
online before attempting to connect to your Raspberry Pi).

Fig 5.1: SD card and webcam

The above pictures are the sd card and the webcam which are being used in the video
surveillance system to be used in the raspberry pi and to detect if there are any
intruders in the live streaming.

45
Overview of the system implementation:

Step 1: Gathering the components:

 Raspberry Pi 3 Model B (Any version will work, but in PI 3 we have the provision
for WiFi that can make this server wireless)
 USB Webcam (I will use my old Logitech Webcam. Use a better camera for better
results.)
 5V 2A Power Source (I will use my Honor 13000mah Power Bank )
 Lan Cable ( RJ - 45 Cable )
 Minimum 8 GB Class 10 SD Card ( I will use Sandisk 32GB class 10 SD Card )

If you haven't install the Raspbian OS on the SD card, then you will need a memory
card reader and checkout our tutorial on how to install the OS in Raspberry Pi.

46
Fig 5.2: USB webcam

Step 2: Setting up of raspberry pi:

 We assume you have the SD Card with the raspbian OS installed.


 Then insert the SD Card in the Pi.
 Connect the USB camera to any one of the four available USB port.
 Connect the ethernet cable aka LAN cable to your Pi and connect the other end
to your router.
 Then Power Up the Raspberry Pi.
 The next step is only for Raspberry Pi 3 users. Others. go to step 4.

47
Fig 5.3: Setup of a raspberry pi

Step 3: Connecting the pi to the internet:

 Open the desktop of Raspbian and connect to WiFi by putting the correct
password.

48
 When the raspbian is connected to the network by WiFi, then shut down the
system.
 Now detach the LAN cable and restart. Then you must be connected to the
Internet via WiFi only.
 This will help to move your webcam and the pi anywhere without the RJ-45
cable.

Step 4: Knowing the pi ip address:

 Open your browser on laptop or mobile. (laptop or mobile has to be in the same
network as the pi)
 Go to your Router settings by typing in the default IP address of your router.
(written somewhere on your router.)
 Find the list of connected devices.
 Find the corresponding IP address of the device named raspberry. In our case, it
is 192.168.0.107

Step 5: Connect to the pi by SSH connection(Putty):

 Open up Putty and type in the IP address of your Pi and connect.


 'pi' & 'raspberry' is the default 'login as' and 'password' in Raspbian.
 It is always a good practice to Update and Upgrade the system as soon as you
log in.
 To do it, type in the command 'sudo apt-get update' and 'sudo apt-get upgrade'
one at a time.

Step 6: Install the software and do the necessary things:

 Type in the command 'sudo apt-get install motion ' to start the installation.
 Now to make sure that the camera is correctly detected.

49
 Type in the command 'lsusb' and enter. You should see the name of your
camera. If it is NOT there, then there is some problem in your camera or the
camera is not supported in 'motion'.
 After the installation is complete, type in the command ' sudo nano
/etc/motion/motion.conf ' and press enter.

Then you have to change some settings in the .conf file. It might be difficult sometimes
to find the settings but use 'ctrl + w' to find it. So follow the steps:

1. Make sure 'daemon' is ON.


2. Set 'framerate' anywhere in between 1000 to 1500.
3. Keep 'Stream_port' to 8081.
4. 'Stream_quality' should be 100.
5. Change 'Stream_localhost' to OFF.
6. Change 'webcontrol_localhost' to OFF.
7. Set 'quality' to 100.
8. Set 'width' & 'height' to 640 & 480.
9. Set 'post_capture' to 5.
10. Press ctrl + x to exit. Type y to save and enter to conform.

Again type in the command 'sudo nano /etc/default/motion ' and press enter. Set '
start_motion_daemon ' to yes. Save and exit.

Step 7: Start the server:

First of all your have to restart the motion software. To do it type in the command 'sudo
service motion restart' and press enter.

Again type in the command 'sudo motion' and press enter. Now your server is ready.

50
Step 8 : It’s done:

 Now open up your browser. Type in the IP address of your raspberry Pi and the
port number in this way:
 192.168.0.107:8081 (First there is the IP address, then a ':', then the port
number). Press Enter.

Now you can see the Live feed coming from your webcam directly on your laptop
or mobile or both at the same time.

5.2.1 Algorithm used 1:

The algorithm used for detecting the motion of the objects is shown below.

Algorithm for person alert:

Step 1: Capture frame from camera in real time

Step2: Convert the RGB image to Gray scale

Step3: Get the current and the last frames.

Step4: Find the difference between these two frames

Step5: Threshold this image

Step6: Check if the difference value between the two frames (i.e. rate of movement) is
greater than the value set by the user.

Step7: If yes then record the live stream.

51
Fig 5.4: Live stream using raspberry pi

5.3 Performance analysis :

The raspberry pi is setup successfully by inserting the sd card in it. The ethernet
cable is connected to the raspberry pi and the other end to the router. Then the usb
camera is connected to the raspberry pi and the raspberry pi is turned on. The
raspberry pi desktop is opened and the correct password is typed for connecting to the
wifi. After this the setup is shut down and switvhed on again when the wifi is
connected. The LAN cable is detached where the pi and the webcam can be placed
anywhere in the room without the LAN cable.

Opening the browser on laptop or mobile and going to the Router settings by
typing in the default IP address of the router is done successfully. Finding the list of
connected devices and finding the corresponding IP address of the device
named raspberry is done.

52
Opening up Putty and typing in the IP address of the Pi and connecting is done.
'pi' & 'raspberry' is the default 'login as' and 'password' in Raspbian. The upgradation
and the updation has been done successfully as soon as it is logged in.It is done by
typing in the command 'sudo apt-get update' and 'sudo apt-get upgrade' one at a time.

Typing in the command 'sudo apt-get install motion ' for starting the installation
is done. Now to make sure that the camera is correctly detected, typing in the command
'lsusb' and pressing enter is done. You should see the name of your camera. If it is NOT
there, then there is some problem in your camera or the camera is not supported in
'motion'. After the installation is completed, typing in the command ' sudo nano
/etc/motion/motion.conf ' and pressing enter is successfully done.

This project is about a remotely monitor surveillance area using Raspberry Pi


architecture. Raspberry Pi model is a credit card sized single board computers
developed in the UK by the Raspberry Pi Foundation, which provides all the basic
features of a computer. Live video streaming refers to sending video signals real time
over the Internet. Stream video can be clearly visualized on webpage due to Raspberry
Pi, which is having picture quality configurations.

Also video surveillance over wireless sensor networks has been widely adopted
in various cyber-physical systems including border security, traffic analysis, healthcare
systems in hospitals, public safety (bus, mall etc.), wildlife tracking and
environment/weather monitoring etc.

The simplest form of the reference image is a time-averaged background


image. This method suffers from many problems and requires a training period absent
of foreground objects. The motion of background objects after the training period and
foreground objects motionless during the training period would be considered as
permanent foreground objects. In addition, the approach cannot cope with gradual
illumination changes in the scene. These problems lead to the requirement that any
solution must constantly re-estimate the background model. Many adaptive
background modelling methods have been proposed to deal with these
slowly-changing stationary signals. Friedman and Russell modelled each pixel in a
camera scene by an adaptive parametric mixture model of three Gaussian
distributions.

53
Fig 5.5: Live streaming using webcam and raspberry pi

5.3.1 Simulation Parameters

The simulation parameters include:

Making sure 'daemon' is ON.Set 'framerate' anywhere in between 1000 to 1500.


Keeping 'Stream_port' to 8081. Stream_quality' should be 100. Change
'Stream_localhost' to OFF. Change 'webcontrol_localhost' to OFF.
Set 'quality' to 100. Set 'width' & 'height' to 640 & 480. Set 'post_capture' to.
Press ctrl + x to exit. Type y to save and enter to conform. Again type in the

54
command 'sudo nano /etc/default/motion ' and press enter. Set '
start_motion_daemon ' to yes. Save and exit.

5.3.2 Comparison between Existing and Proposed:

The real time video surveillance system presented in this project has been
designed with robustness as the major design goal. Its main characteristic which
supports the aim for robustness is the use of a two-stage multi-resolution approach
along with the use of multiple cues. In order to perform the transition from motion
detection to video content analysis a sequence of operations had to be maintained.
Background maintenance and subtraction is a common computer vision task. The
usual pixel-level approach has been analysed. First, some basic principles and
requirements are extracted and then the contributions from the literature are
summarized. Further, based on the presented principles, some standard theory and
some recent results are analysed. Firstly, algorithm which has used the parametric
Gaussian mixture probability density is described. Recursive equations are used to
constantly update the parameters and to select the appropriate number of components
for each pixel. Then the algorithm which has used the old Grimson and Stauffer’s
work with an improvement is described. Finally, the method which was followed
from their discussion has been showed and their results obtained have been analysed.

Background maintenance and subtraction is a common computer vision task.


The usual pixel-level approach has been analyzed. First, some basic principles and
requirements are extracted and then the contributions from the literature are
summarized. Further, based on the presented principles, some standard theory and
some recent results are analyzed. Firstly, algorithm which has used the parametric
Gaussian mixture probability density is described. Recursive equations are used to
constantly update the parameters and to select the appropriate number of components
for each pixel. Then the algorithm which has used the old Grimson and Stauffer’s
work with an improvement is described. Finally, the method which was followed
from their discussion has been showed and their results obtained have been analyzed.

55
Video motion detection is fundamental in many autonomous video
surveillance strategies. However, in outdoor scenes where inconsistent lighting and
unimportant, but distracting, background movement is present, it is a challenging
problem. In real time environment where scene is not under control situation is much
worse and noisy. Light may change anytime which cause system output less
meaningful to deal with. Recent research has produced several background modeling
techniques, based on image differencing, that exhibit real-time performance and high
accuracy for certain classes of scene. The aim of this research work is to assess the
performance of some of these background modeling techniques (namely, the Gaussian
Mixture Model, temporal differencing, the Hybrid Detection, shadow detection and
removal Algorithm) using video sequences of outdoor of homes.

5.4 Summary:

Motion detection in consequent images is nothing but the detection of the moving
object in the scene. In video surveillance, motion detection refers to the capability of
the surveillance system to detect motion and capture the events. Motion detection is
usually a software-based monitoring algorithm which will signal the surveillance
camera to begin capturing the event when it detects motions. This is also called
activity detection. An advanced motion detection surveillance system can analyse the
type of motion to see if it warrants an alarm. In this project, a camera fixed to its base
has been placed and is set as an observer at the outdoor for surveillance. Any small
movement with a level of tolerance it picks is detected as motion.

Aside from the intrinsic usefulness of being able to segment video streams into
moving and background components, detecting moving blobs provides a focus of
attention for recognition, classification, and activity analysis, making these later
processes more efficient since only “moving” pixels need be considered. There are
three conventional approaches to moving object detection: temporal differencing,
background subtraction and optical flow. Temporal differencing is very adaptive to
dynamic environments, but generally does a poor job of extracting all relevant feature
pixels.

56
Background subtraction provides the most complete feature data but is
extremely sensitive to dynamic scene changes due to lighting and extraneous events.
Optical flow can be used to detect independently moving objects in the presence of
camera motion; however, most optical flow computation methods are computationally
complex, and cannot be applied to full-frame video streams in real-time without
specialized hardware.

57
CHAPTER - 6

CONCLUSION

Various researches have been conducted to develop a fully automated video


surveillance system that can mimic the activity of human brain in identifying events
in moving objects. However, due to the advanced technological breakthroughs in
video capturing devices, increase in the number of cameras used, dynamic nature of
the objects (human, vehicles, animals) in the video has made this process a very
challenging field of research. The epitome concern of this research work is to propose
a video surveillance system that is robust and can perform object detection, tracking
and classification and can be used to provide security protection to both private and
commercial sections.

The proposed multimedia security algorithms have been implemented on both


text and image. The secret key used is derived from the randomly generated
polynomial. The transformation matrix is constructed from the secret key whereas the
input image is encrypted using transformation matrix. This thesis attempts the image
encryption algorithms such as ZTMM and PRBIE. Both these algorithms divide the
image into zones and the zones are divided into blocks. Each zone value is provides
with different key value. By means of polynomial function, the part of the secret key
is send to the participants, which is called as share. The receiver uses the Lagrange
Interpolation formula for reconstructing the polynomial from the shares of the
participants. Now the key should be derived from the share so that the receiver could
decrypt the image using the key.

58
It is observed from the visual test, that it is very tough to get any sorts of
information about the original image from the encrypted images. Aside from the
particular technical solutions, the findings of the statistical test show that ZTMM is
better than PRBIE in image processing. The research conducted is applied by using
symmetric-key systems which can be extended to serve the security requirements of
mission critical surveillance systems used by the police, military, Pay -TV and armed
forces, and also ensure the security of widely used portable multimedia systems.
Compared to the original image the size of the share, which is sent to the participant,
is too small. Thus, the method ZTMM is advanced in security and better in encryption
quality with minimal memory requirement and computational time.

The limitations of the systems need to be well-understood and widely


published. Not only might this aid in the acceptance of such systems being deployed,
but would also ensure that both operators and those subject to the surveillance have a
decent understanding of the capabilities of such systems, rather than relying on either
Hollywood representations or on the sales pitch of security systems companies. Such
over-reliance is a significant worry in the deployment of systems such as face
reconstruction and behavioural interpretation. Without clear guidelines on the limits
of such systems the chances of over-reaction by security personnel to false positives
could create serious consequences for the individuals falsely targeted. In addition, the
deployment of advanced CCTV systems should not be taken as a guarantee of perfect
security. All security systems have vulnerabilities and these systems themselves will
be vulnerable to attack in a number of ways, both directly through interception and
possible replacement of signals or simply interrupting power or communications
signals, up to attacks based on bypassing the trigger points in the analysis.

The further transfer of power from the surveilled to the surveillers, which such
systems could represent, creates a broader problem. As discussed above, the level of
regulation of current manual CCTV capabilities varies significantly between countries
and between types of place. In many jurisdictions, only public authorities can deploy
cameras in public places, although in others cameras placed on private property but
which view public areas are permitted. Covert surveillance deployment in private or

59
semi-private locations is also variable as to its legality and restrictions. As capabilities
for automated processing of the footage from these systems become available, and
then no doubt become cheaper, their use in workplaces, for example, is likely to rise.

The main purpose of our multi-functional surveillance system is to serve as a


tool to be applied in various places for maximised monitoring. Not only does it
monitor but it also administers to other capabilities such as taking videos and pictures
at the right moments which it has been programmed to pick up. These moments refer
to instances such as intruder detection, theft occurrences and dangerous exposures.
The footage which is saved also prompts the sending of some appropriate details in
the form of a notification to the user’s mobile device. In addition, the night vision
facility ensures extra protection and safety for activities such as burglary and
break-ins tend to happen after hours more often. Moreover, this system is suited for
overseeing in different venues such as hospitals, houses, industries, banks, army
vicinity, etc.

In all, video surveillance systems are currently undergoing a transition from


traditional analog solutions to digital solutions. These systems are increasingly
becoming a part of daily life and are used in airports, banks, offices, hospitals, traffic
points and even at residential apartments. They are used extensively in security
conscious fields like military, intelligent traffic monitoring, legal departments and
also provide high level security in border monitoring and transport environments. The
research work has presented an enhanced framework for moving object detection,
tracking and classification for automatic video surveillance. Several image processing
and machine vision algorithms have been enhanced so as to improve the overall
performance of the Automatic Video Surveillance System (AVSS). The experimental
results from each phase have proved that all the proposed methods are effective and
enhance the final output of the proposed video surveillance system. The system was
able to work effectively with both degraded and quality indoor and outdoor videos,
consisting of humans, human groups, vehicles and animals. The system was also able
to handle occluded objects efficiently. Thus, it can be concluded that the framed
research objectives in Chapter 1 are all met and the proposed Video 191 Surveillance

60
System for Protecting People and Property (V2S3P) can be considered as an
appropriate and suitable candidate for video surveillance used by security departments

CHAPTER - 7

FUTURE ENHANCEMENTS

Some disadvantages faces are that the video files considered are from single
stationary cameras only. In future, multiple stationary cameras will be utilized and a
fusion algorithm to combine the results will be developed. Efficient lossless video
surveillance algorithms will be proposed to avoid the degradation of video frames. In
future, small size of objects will be considered for classification. The system can be
combined with biometric recognition systems like face recognition system to identify
a person to further improve the security.

With digital video transmission, encryption methodologies are needed that can
protect digital video from attacks during transmission. So the developed algorithms
can be applied on video images and web based systems. To prevent malicious attack
on computer networks, more mathematical theorems may be used for encryption
purpose. Also the receiver may use some other formula for reconstructing the
polynomial instead of Lagrange Interpolation formula.

61
The applications of this system in the military field can be expanded upon by
incorporating more suitable sensors. With respect to various other areas, the system
can become more specific and less generalised with the improvement of algorithms
and upgraded sensors. Along with this, the practicality of the system can be boosted
by enforcing more cost-effective measures without setting back the efficiency of the
system. Certain discrepancies in the functioning of the system can be bettered by
addressing technical challenges such as minimising the time delay which occurs
between the detecting and informing phases. Furthermore, the system can be worked
upon to enable more functions such as enabling the detection of objects and pets and
accommodating the algorithms pertaining to facial recognition for increased
productivity.

It is said that the industry will power ahead to over $2.5 billion in the next
couple of years - a massive 30 percent growth in the number of houses with home
automation systems. More importantly, as home automation moves into the
mainstream, the technology powering it will rapidly expand and improve in scope and
application.

62
REFERENCES

63
[1] International Conference on Signal Processing, Informatics, Communication
and Energy Systems(SPICES), Sruthy S, Sudhish N George, IEEE 2017, “WiFi
Enabled Home Security Surveillance System using Raspberry Pi and IoT Module”.

[2] International Conference on Innovations in Power and Advanced Computing


Technologies(i-PACT), Rickin Patel, Vipul K. Dabhi, Harshadkumar B. Prajapati,
IEEE 2017, “A Survey on IoT based Road Traffic Surveillance and Accident
Detection System”.

[3] International Conference on Intelligent Computing and Control Systems


(ICICCS), Syed Ali Imran Quadri, P.Sathish, IEEE 2017, “IoT based Home
Automation and Surveillance System”.

[4] Internation Journal of Research in Advent Technology(IJRAT),I.Y.Sheikh,


Harshal C.Chavan, Jaya S. Vyawhare, Sampada B. Mahajan, Rahul S.
Raut ,“CONVERGENCE 2016”, 06th-07th April 2016,”Wi-Fi Surveillance Robot
Using Raspberry Pi”.

[5] International Conference on Communication and Signal Processing,Ashish U.


Bokade and V. R. Ratnaparkhe, IEEE 2016, “Video Surveillance Robot Control using

Smartphone and Raspberry Pi ”.

[6] International Smart Cities Conference, Mohammed A. AlGhamdi, Murtaza A.


Khan , Sultan H. AlMotiri,IEEE 2015, “Automatic Motion Tracking of a Human in a
Surveillance Video”.

[7] International Journal of Emerging Technology and Advanced


Engineering,Volume 5,Issue 2, V. Meenakshi, Ch. Lakshmi Saketh, K. KalyanKumar,
IJETA 2015, “Secured Spy IP Control Robot Using Raspberry Pi”.

64
[8] International Journal of Scientific Engineering and Technology, Volume 2,
Issue 5, Md Athiq UR Raza Ahamed M., Wajid Ahamed, IJSET 2013, “A Domestic
Robot for Security Systems by Video Surveillance Using Zigbee

Technology”.

[9]International Journal of Scientific & Engineering Research Volume 3,


Issue 8, Pavan.C, Dr. B. Sivakumar, IJSET August-2012, “Wi-Fi Robot For Video
Monitoring & Surveillance System”.

65