Professional Documents
Culture Documents
INTRODUCTION
1.1 OVERVIEW
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
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.
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.
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
Chapter 2
This chapter includes the surveys conducted on the existing systems and the base
papers.
Chapter 3
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
Chapter 7
This chapter gives details about the future enhancements of the project.
5
CHAPTER - 2
LITERATURE SURVEY
2.1 INTRODUCTION
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.
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.
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.
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
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.
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.
Security:
Range:
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:
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.
It requires knowledge of the system for the owner to operate zigbee compliant
devices.
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.
The description of the papers surveyed are given in this section and the details of
the papers are given after the conclusion.
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.
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.
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
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.
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.
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.
18
system is still under active development. Raspbian is highly optimized for the
Raspberry Pi line's low-performance ARM CPUs.
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.
3. 4GB micro-SD card (at least) but I recommend to use 8GB Class -10
19
Installing Raspbian Jessie
There are multiple ways to install the Raspbian Jessie on your Raspberry Pi.
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.
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.
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.
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.
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.
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.
5. On first boot, you will see the list of available operating systems to start
installation.
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.
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.).
23
Fig 3.5 Raspbian Jessie
11. That's it. You have successfully installed the Raspbian Operating System.
Raspberry pi-:
24
Fig. 3.6 Raspberry pi 3 model B
25
Technical specifications-:
4USB ports
40 GPIO pins
Ethernet port
Camera interface
Display interface
VideoCore IV 3D graphics
Power: 10W(2A)
26
Plug-and-Play Setup
With simple plug-and-play setup, you'll be making video calls in no time on most
major IMs
With your webcam's VGA sensor, the people you care about will see you in natural
color
5-Megapixel Photos
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
Technical Specifications
28
Requires installation of software available for download
at www.logitech.com/downloads.
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: 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
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.
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
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
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.
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.
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.
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.
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.
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 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.
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.
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
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.
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.
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).
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:
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
47
Fig 5.3: Setup of a raspberry pi
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.
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
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:
Again type in the command 'sudo nano /etc/default/motion ' and press enter. Set '
start_motion_daemon ' to yes. Save and exit.
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.
The algorithm used for detecting the motion of the objects is shown below.
Step6: Check if the difference value between the two frames (i.e. rate of movement) is
greater than the value set by the user.
51
Fig 5.4: Live stream using raspberry pi
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.
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.
53
Fig 5.5: Live streaming using webcam and raspberry pi
54
command 'sudo nano /etc/default/motion ' and press enter. Set '
start_motion_daemon ' to yes. Save and exit.
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.
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
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 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.
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”.
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”.
65