Anna University Chennai 600 025: Ocs-352 - Iot Concepts and Applications
Anna University Chennai 600 025: Ocs-352 - Iot Concepts and Applications
ASSIGNMENT – II
MINI PROJECT
<TITLE>
Submitted By
NAME:
REG.No.
By
NAME: S.BHUVANESH
REG NO: 922321105005
DEP: EEE
ACKNOWLEDGEMENT
It is a great privilege for us to express our profound gratitude to our teacher
Mr.Senthilkumar, University college of engineering Dindigul for his constant guidance, valuable
suggestions, supervision and inspiration throughout the course work without which it would have
been difficult to complete the work within scheduled time.
We would like to express our gratitude towards all the faculty members for his/her
kind cooperation and encouragement which helped us in completion of this project.
We are also indebted to the Head of the Department, University college of
engineering Dindigul for permitting us to pursue the project. We would like to take this
opportunity to thank all the respected teachers of this department for being a perennial source of
inspiration and showing the right path at the time of necessity.
---------------------------------
-
S.Bhuvanesh
(922321105005)
---------------------------------
-
---------------------------------
-
---------------------------------
-
CERTIFICATE OF APPROVAL
The project report titled “Home Security System Using Raspberry pi” prepared
by S.Bhuvanesh (922321105005) is hereby approved and certified as a creditable study in
technological subjects performed in a way sufficient for its acceptance for partial fulfilment of
the degree for which it is submitted.
-----------------------------------
--------------------------------------
--------------------------------------
RECOMMENDATION
We hereby recommend that the project report titled “Home Security System
Using Raspberry pi” prepared by S.Bhuvanesh (922321105005)be accepted in partial fulfillment
of the requirement for the Degree of Bachelor of engineering in Anna University , University
college of engineering Dindigul.
-------------------
------------------
--------------------------------------
ABSTRACT
With the advancement of modern technologies areas related to robotics and
computer vision, real time image processing has become a major technology under consideration.
So here a try has been made for a novel approach for capturing images from the Pi Camera in
real time environment and process them as we are required. This project portrays an machine
learning approach for face recognization to accomplish this process very quick with high
identification rates using OpenCV. Here in this project depicts a basic and simple equipment
execution of face location framework utilizing Raspberry Pi, which itself is a minicomputer of a
small estimate and is of a low cost. The framework is modified utilizing Python programming
language. The destinations of the face recognization are to recognize appearances and its spatial
area in any pictures or recordings .The proposed framework distinguishes the faces present in a
grey scale and colored image. This project center around usage of face detection framework for
human recognizable proof in light of OpenCV library with python. Here in this project the idea
of identification has been built up by composing distinguishable code for dataset generator,
trainer and indicator. Effectiveness of the framework is examined by ascertaining the Face
recognization rate for every one of the database. The outcomes uncover that the proposed
framework can be utilized for face detection even from low quality pictures and shows incredible
execution level. At last the data that will be shown alongside recognized photograph has been put
away on database. This concept has a higher scope on security and surveillance projects and
various operation.
LIST OF FIGURES
Figure Page no
Figure 1: Block Diagram 9
Figure 3: Raspberry Pi 11
Chapters Page No
Chapter 1: Introduction 1
Chapter 2: Literature Review
2.1: Earlier Developments 3
2.2: Recent Developments 4
2.3: Face Recognization 6
Chapter 3: Overview of the Project
3.1 Block Diagram 9
3.2 Hardware equipments 9
3.3 Circuit Diagram 10 10
Chapter 4: Component Description
4.1: Raspberry Pi 11
4.2 Raspberry Pi Camera 14
4.3 2 channel Relay 15
4.3.1 2 Channel Relay with Raspberry Pi 17
4.4 DC Motor 18
4.5 LED 19
Chapter 5: Methodology
5.1 Installing Raspbian on the Raspberry Pi 20
5.2 Installation of OpenCV 21
5.3 Face Recognization 24
5.4 Haar Cascade Classifier Algorithm 26
INTRODUCTION
Home automation alludes to the use of computer applications and information
technology for control of home and residential appliances. Its application changes from basic
remote control of lighting to complex microcontroller based systems including changing degrees
of insight and automation. Home automation results in ease of work, increased efficiency, and
security benefits prompting improved personal satisfaction. The prevalence of system
empowered home automation has been expanding incredibly as of late because of
straightforwardness and a lot higher affordability. Also, with the fast development of the
Internet, there is the potential for the remote control and checking of such network enabled
appliances. Notwithstanding, the new and energizing chances to expand the availability of
gadgets inside the home is the end goal of home automation. Modeling of a home automation
system for controlling all the various devices in Remote locations can be achieved through a
variety of communication options such as wireless LAN technologies, dial-up modems, satellite
communication, cellular network, Internet and so on. The main virtue of home automation can be
stated as its security facilities where one can be notified and one can be alarmed by this home
automation if there is any threat caused to someone’s privacy. Home automation enables human
beings to take advantage of high-tech functionality that was almost impossible to visualize a few
years back. The convenience factor here is huge. Having the capacity to keep the majority of the
automation inside home associated through one interface is a huge step forward towards
innovation and home automation. Theoretically, all one has to do is simply figure out how to
utilize one application on a cell phone and tablet, and one will have the capacity to take
advantage of incalculable capacities and gadgets all through the home. This reduces the
expectation to absorb information for new clients, makes it simpler to get to the usefulness
someone really need for their home. Smart home systems tend to be wonderfully flexible when it
comes to the accommodation of new devices and appliances and other technology. No matter
how state-of-the-art your appliances seem today, there will be newer, more impressive models
developed as time goes on. Beyond that, you’ll probably add to the suite of devices as it will
replace the older ones or discover new technology to accompany indoor and outdoor spaces.
Being able to integrate these newcomers seamlessly will make everyones job as a homeowner
much easier, and allows to keep upgrading to the latest lifestyle technology. Home automation
LITERATURE REVIEW: CHAPTER 2
frameworks can associate motion detectors, surveillance cameras, automated entryway locks, and
other substantial safety efforts all through the home so
2|Page
INTRODUCTION: CHAPTER 1
INTRODUCTION
Home automation alludes to the use of computer applications and information
technology for control of home and residential appliances. Its application changes from basic
remote control of lighting to complex microcontroller based systems including changing degrees
of insight and automation. Home automation results in ease of work, increased efficiency, and
security benefits prompting improved personal satisfaction. The prevalence of system
empowered home automation has been expanding incredibly as of late because of
straightforwardness and a lot higher affordability. Also, with the fast development of the
Internet, there is the potential for the remote control and checking of such network enabled
appliances. Notwithstanding, the new and energizing chances to expand the availability of
gadgets inside the home is the end goal of home automation. Modeling of a home automation
system for controlling all the various devices in Remote locations can be achieved through a
variety of communication options such as wireless LAN technologies, dial-up modems, satellite
communication, cellular network, Internet and so on. The main virtue of home automation can be
stated as its security facilities where one can be notified and one can be alarmed by this home
automation if there is any threat caused to someone’s privacy. Home automation enables human
beings to take advantage of high-tech functionality that was almost impossible to visualize a few
years back. The convenience factor here is huge. Having the capacity to keep the majority of the
automation inside home associated through one interface is a huge step forward towards
innovation and home automation. Theoretically, all one has to do is simply figure out how to
utilize one application on a cell phone and tablet, and one will have the capacity to take
advantage of incalculable capacities and gadgets all through the home. This reduces the
expectation to absorb information for new clients, makes it simpler to get to the usefulness
someone really need for their home. Smart home systems tend to be wonderfully flexible when it
comes to the accommodation of new devices and appliances and other technology. No matter
how state-of-the-art your appliances seem today, there will be newer, more impressive models
developed as time goes on. Beyond that, you’ll probably add to the suite of devices as it will
replace the older ones or discover new technology to accompany indoor and outdoor spaces.
Being able to integrate these newcomers seamlessly will make everyones job as a homeowner
much easier, and allows to keep upgrading to the latest lifestyle technology. Home automation
LITERATURE REVIEW: CHAPTER 2
frameworks can associate motion detectors, surveillance cameras, automated entryway locks, and
other substantial safety efforts all through the home so
2|Page
LITERATURE REVIEW: CHAPTER 2
Page | 1
INTRODUCTION: CHAPTER 1
one can enact them from one cell phone before making a beeline for bed. It will
provide security cautions on different gadgets relying upon the time of day an alarm goes off,
and watch activities continuously whether someone is in the house or most of the way around the
world. A very important part of this security virtue of home automation is keeping surveillance
through cameras and survilliance on the entryway automated and which can be only open by
certain identities which are granted permission to enter. For this doing face recognization where
if the face is recognized then the door will open otherwise not. In this proposed scheme face
recognization which generally involves two stages which are face detection and then face
recognization is done. Face Detection where the picture is searched to feed a face, then the
picture is processed to crop and extract the person’s face for easier recognization. Face
Recognization is the part where that detected and processed face is compared to a database of
known faces, to decide who that person is. Here face detection is performed on Intel’s open
source framework called OpenCV. OpenCV (Open Source Computer Vision) is a library that can
be imported in almost all computer languages like python, C, Java etc. python. Raspberry pi-cam
has been used to capture the picture of the faces that we are going to store in the database. Here
in this proposed scheme one will basically go through three stages which are face detection, data
gathering(where we will click picture of the faces of the respective identities) and the final stage
is going to be the face recognization part which will match the live faces with the pictures of the
faces in the database and give us the identification details of the given entity and work further for
extra requirements. If the matching index is 50% or more then only it can be said that it is a
successful facial recognization process. OpenCV has got lot of algorithms but in this particular
project. Here Haar-Cascade algorithm Haar Cascade Algorithm has been used mainly. This
whole setup is done on the operating system of Raspberry Pi which is known as Raspbian.
Python has been used here as the platform to perform the functions and keeping OpenCV the
main domain. Finally home automation can be summed up as the most convenient form of
modern day technology. Home automation is actually a mixture of a lot of virtues coming
together like safety, control, comfort, convinience and most importantly peace of mind. This
form is a very flexible form of technology which is growing in the market very rapidly and is on
the upsurge for being a game changer in the field of modern day automation.
2|Page
LITERATURE REVIEW: CHAPTER 2
Page | 2
The idea of home automation has been revolving around for around for some
time. It’s very recent that actual smart homes have come into existence. Keeping in mind the
advantages related to home automation research and development projects already started from a
long time back but due to the absence of standard networking of the home appliances nobody
could move forward with this concept. The major roadblock was removed in 1992 with the
development of the consumer electronic bus by Electronics Industries Association of America.
The CEBus standard includes specification for a layered network architecture based on open
system interconnection model with network layer protocols for the physical, Data Link, Network
layer and application layer [1]. A proposed scheme by Cross & Douligeris states that fiber optics
might be the best medium for home automation network because with fiber, the limitations of the
home automation system can be reduced and capabilities can be increased to include many more
functions, leading to complete home integration. They observed that although CEBus includes
fiber optics as one of the physical media but it is not specifying the configuration of the fiber
optic network. After that they designed a fiber optics network which offered various advantages
such as (i) increased bandwidth, (ii) immunity to electromagnetic noise, (iii) ease of installation,
and (iv) safety from electric shock hazards. There were a few drawbacks as well that the cost was
high and as fiber optics cannot carry direct current they had to use an alternate source of energy
[2-3]. In early 1990s, the consumer electronics devices was evolving into digital format,
henceforth the need was felt to interconnect these home appliances through digital links to
preserve the fidelity of information transmitted. Chen proposed a home automation network
which will serve the above purpose. Other than the digital link main feature of the proposed
home automation network was the Digital access system which due to which the home
automation network could communicate and with the outside world also. Chen researched the
use of IEEE 1394 for the proposed network as it could handle both data and isochronous traffic
well at a data rate above 100 Mbps [4]. Fujieda sensed for thriving and achieving complete
3|Page
LITERATURE REVIEW: CHAPTER 2
marketability. Home networks should be installed easily which will require network buildup
without extra wiring. Therefore he proposed the scheme for wireless media in home networks
and named it as wireless home networks. Fujieda suggested the use of 400MHz special low
4|Page
LITERATURE REVIEW: CHAPTER 2
power band for wireless home networks. He developed a small and low power
microwave oven, air conditioner and washing machines, Bluetooth access point and home
terminal in a home. All appliances had the Bluetooth unit embedded within them and wee
connected to internet [5]. In 2005 Hayong Oh and others, mentioned the importance of energy
efficiency for the routing scheme of the sensors placed at home. In the upcoming automated
home, sensors are required to be placed everywhere in the house which will collect various
physical data such as temperature, humidity, and light to provide information to various
appliances. The authors discussed that in the conventional sensor routing scheme every sensor
node detects an event and then broadcasts the event to all sensor nodes within one hop range
from where all the nodes broadcast the message to the next nodes. This process is repeated until
the event reaches the base station. This scheme generally cause drainage of battery power and the
batteries have got limited power so the routing scheme needs to efficient enough for successful
implementation of home networking. Henceforth they advised a new sensor routing scheme for
home automation networks and called it as RDSR (Relative Direction based Sensor Routing).
This scheme divides the home area into sectors and locates a manager node to each sector. The
sensor devices transfer the data to manager nodes in its sector and then the data is transferred to
the base station through the shortest path of two dimensional coordinates resulting in an energy
efficient scheme [6]. In 2006 Mario Kolberg and Evan H.Magill mentioned the control of
complex networked appliances. Presently computer interface is most used to configure and
remotely control these appliances. However the authors discussed that this will be unsuitable for
the target audience who are not that much familiar with the use of computers. Therefore they
proposed Anoto-enabled pen and paper as a suitable alternative as users are highly familiar with
pen and paper and they will find it suitable for control. In the suggested system data is
transferred to the service provider through
Bluetooth communication and mobile processed and sent to the user’s home.
Using this approach appliance can be controlled in the home and outside the home [7].
In recent years the Internet of Things (IOT) have enabled innovation to make
daily lives easier and comfortable. From refrigerators, to apparatuses, to home security and many
others can be controlled with smart home innovation. When home devices are remotely
5|Page
LITERATURE REVIEW: CHAPTER 2
controlled from anywhere irrespective of anything through internet it becomes a important virtue
of the IoT (Internet of Things).
6|Page
LITERATURE REVIEW: CHAPTER 2
power band for wireless home networks. He developed a small and low power
microwave oven, air conditioner and washing machines, Bluetooth access point and home
terminal in a home. All appliances had the Bluetooth unit embedded within them and wee
connected to internet [5]. In 2005 Hayong Oh and others, mentioned the importance of energy
efficiency for the routing scheme of the sensors placed at home. In the upcoming automated
home, sensors are required to be placed everywhere in the house which will collect various
physical data such as temperature, humidity, and light to provide information to various
appliances. The authors discussed that in the conventional sensor routing scheme every sensor
node detects an event and then broadcasts the event to all sensor nodes within one hop range
from where all the nodes broadcast the message to the next nodes. This process is repeated until
the event reaches the base station. This scheme generally cause drainage of battery power and the
batteries have got limited power so the routing scheme needs to efficient enough for successful
implementation of home networking. Henceforth they advised a new sensor routing scheme for
home automation networks and called it as RDSR (Relative Direction based Sensor Routing).
This scheme divides the home area into sectors and locates a manager node to each sector. The
sensor devices transfer the data to manager nodes in its sector and then the data is transferred to
the base station through the shortest path of two dimensional coordinates resulting in an energy
efficient scheme [6]. In 2006 Mario Kolberg and Evan H.Magill mentioned the control of
complex networked appliances. Presently computer interface is most used to configure and
remotely control these appliances. However the authors discussed that this will be unsuitable for
the target audience who are not that much familiar with the use of computers. Therefore they
proposed Anoto-enabled pen and paper as a suitable alternative as users are highly familiar with
pen and paper and they will find it suitable for control. In the suggested system data is
transferred to the service provider through
Bluetooth communication and mobile processed and sent to the user’s home.
Using this approach appliance can be controlled in the home and outside the home [7].
In recent years the Internet of Things (IOT) have enabled innovation to make
daily lives easier and comfortable. From refrigerators, to apparatuses, to home security and many
others can be controlled with smart home innovation. When home devices are remotely
7|Page
LITERATURE REVIEW: CHAPTER 2
controlled from anywhere irrespective of anything through internet it becomes a important virtue
of the IoT (Internet of Things).
8|Page
LITERATURE REVIEW: CHAPTER 2
Security and living greener are the main features of the present homes. Current
patterns in home automation includes remotely controlled appliances and computerized gadgets,
portable/email/content warnings, and remote video observation Sensors are the most important
part of this home automation system as it acts as the eyes of the system. There are sensors for an
extensive variety of uses, for example, measuring temperature, dampness, light, fluid, and gas
and recognizing development or commotion. In case of Java Based Home Automation System
the World Wide Web is used by the home appliances to control and monitor then the software
engine is written in Java code that can be portable and also can be used on any platform. The
embedded system board is connected to the pc home server and serves the java pages and java
beans [8]. In case of the Integrated Residential Gateway Controller for Home Energy
Management System, high performance is derived from compact OS and to reduce the memory
space than the three steps plug & player mechanism is used for reducing installation engineering
[9]. In case of the Remote Controller for Home and Office Appliances by Telephone, the home
based design and the development of the phone based remote controller for the home and office
automation, in this advanced technique the remote controller is used for time and energy
consuming [10]. The verification of the proposed algorithm, several LED’s were used to indicate
the proper execution. The Rpi has received an email through the user from a system connected to
the internet. Gmail has been used in order to conduct mail communication. The corresponding
results were generated by a series of e-mail communication. For example an E-
mail sent as “ON=1 ON Time=7:00. OFF Time=8:00 to the RPi account from the
user account. The algorithm that is used starts its process by scanning the mail [11]. According to
R.A. Ramlee, smart home system via Wireless Bluetooth is the is the new virtue of this
automated technologies where it is acting as a motivation for disable persons making it possible
for them to carry out the daily activity, safely and comfortably [12]. Girish Birajdar and Shrikant
Mahindrakar have developed a way in to automate home appliances using an Embedded Web
Server combined with a Raspberry Pi. Embedded Web Server (EWS). is the embedded system
which can serve the web documents on request from the client. It generally deals with
management of dynamic content and is very easy to use and operates at a fast speed. EWS design
includes a complete web server with TCP/IP support, running different OS, memory, application
wise [13].
2|Page
LITERATURE REVIEW: CHAPTER 2
Android based home automation makes the system more flexible and provides
attractive user interface compared to other home automation systems. In this system mobile
devices are integrated into home automation systems. A novel architecture for a home
automation system is proposed using the relatively new communication technologies. The
system consists of mainly three components is a Wi-Fi module, raspberry pi board and relay
circuits. Wi-Fi is used as the communication channel between android phone and the raspberry pi
board [14].
Face detection is one of the current research topics in the computer vision field. It
is very easy for human beings to detect faces on the other hand it is difficult for computers to
detect faces.. The difficulties associated with face detection are variations in scale, pose,
orientation, lighting condition, facial expression etc. Many approaches have been implemented
but each has its own advantages and limitations. The proposed system is relay on the appearance
based approach. Here the face detection is done by extracting facial features like eye feature,
bridge of the nose feature, mouth feature etc. which are present in a grey scale image. These
features are proportional to the change in contrast values between adjacent groups of pixels but
not to the intensity values of a pixel. The features used in this system are named as rectangular
features and are reminiscent of Haar basis functions [15] [16]. The suggested face detection
system detects the faces with low false positive rate. Initially the face detection is done with 10
and 12 stage detector but it gives poor detection accuracy and high false positive rate. The 14
stage detector gives good accuracy in face detection and very low false positive rates. The
detector works well on Raspberry Pi with a 5MP camera and detects the faces of captured image
with the lowest resolution of 640x480 and the highest resolution of 2560x1920pixels with
acceptable detection speed [17]. Patel and shah introduced a research on facial feature extraction
techniques for automatic face annotation. A vital role is being played by automatic face
annotation role in multimedia information. The method to identify human faces from image and
assign appropriate human name is known as automatic face annotation. In face annotation face
detection and face recognition are the two most important virtues. An author also discuss the
3|Page
LITERATURE REVIEW: CHAPTER 2
phases of the automatic face annotation and surveyed various techniques of facial feature
extraction [18].
4|Page
LITERATURE REVIEW: CHAPTER 2
Patoliya and Desai developed ATM Security System using Embedded Linux
Platform which is being based on the face detection system. Raspberry pi is being used for the
implementation of this system with the extended capabilities of Computer Vision (OpenCV)
software which is used for Image processing operation. One tine password technique is used in
this system which increases the security of the system. In an unauthorized condition ATM door
has been locked and it’s only when the OTP password is entered my watchman [19]. Heshmat et
al. introduced Face Identification system in Video. An author proposed CIE-Luv color space,
facial feature extraction and variance estimation. In surveillance, human machine interfacing,
Database management system can be implemented and is of great use as it is creating a proper
visual interface here. The experimental results shows the efficiency and the usefulness of the
system where the system can recognize different faces and work accordingly and this one is
highly advantageous due to it high security advantages [20]. Intensive research work and detailed
study on implementation of smart door lock system using GSM network by Jie-Ci Yang [21]. Pi
Camera Module is a add on with Raspberry Pi which acts as a visual interface in case of face
detection or Recognization, This interface uses the dedicated CSI interface, which was designed
especially for interfacing to cameras [22]. An algorithm known as Haar Cascade classifier is used
for detection of the object which it has been trained for, from the source. This proposed system
uses Haar Cascades classifier as a face detection algorithm [23]. Face preprocessing is the
module which lessens the issues that makes the image vague to perceive the face. for example,
less brightness and complexity issues and noise in the picture and ensure the facial highlights
dependably be in a consistent position. In this task we use histogram leveling for face
preprocessing. For proficiency we utilize separate preprocessing which is histogram evening out
for left and right face. So histogram leveling is completed multiple times, right off the bat for the
entire face and the other two for side appearances [24]. For better working, each stage of the
cascade must have a low false negative rate, because if the actual object is classified as a
nonobject, then the classification of that branch stops, with no way to correct the mistake made.
However, each stage can have a relatively high false positive rate, because even if the n-th stage
classifies the non-object as actually being the object, then this mistake can be fixed in n+1-the
and subsequent stages of the classifier[25-26]. The purpose or objective of the suggested work is
to implement a working model of a smart door and to give solutions to the problem faced by
people in day to day incidents of burglary or losing the key and also to promote and ignite the
4|Page
LITERATURE REVIEW: CHAPTER 2
work being done on IOT systems and implementing it with the help of key research areas of
Neural Networks and IoT APIs and protocols[27].
After the detailed study of the previous works, here in this proposed scheme
developing a home automation system using a Raspberry Pi with which one will be able to
control home appliances and the most important virtue of this project will be the home
surveillance where the face recognization technology which will be used as a part of security in
this project. The main platform which is being used is OpenCV which is a open source computer
vision library a part of python and will be used in Python.
5|Page
OVERVIEW OF THE PROJECT: CHAPTER 3
Miniature Door
Pi Camera LED
• RASPBERRY Pi
• RASPBERRY Pi CAMERA
• 4 CHANNEL 2 SLOT RELAY
• DC MOTOR
• LED
• BREADBOARD
• CONNECTING WIRES
• MINIATURE DOOR
6|Page
OVERVIEW OF THE PROJECT: CHAPTER 3
Miniature Door
Pi Camera LED
• RASPBERRY Pi
• RASPBERRY Pi CAMERA
• 4 CHANNEL 2 SLOT RELAY
• DC MOTOR
• LED
• BREADBOARD
• CONNECTING WIRES
• MINIATURE DOOR
7|Page
COMPONENT DESCRIPTION: CHAPTER 4
Camera
slot Pi camera
Raspberry pi
GPIO DC Motor
Relay LED
Here one can see that the Pi camera is attached to the camera slot and the DC
motor and Relay is attached to the GPIO pins of the Raspberry Pi. As it is a two channel relay so
it is connected to the LED and the DC motor which helps in driving the DC motor.Here the DC
motor drives a miniature door which is being used for a door locking system for surveillance
purposes. The door only opens after a successful recognization process, when the face is stored
2|Page
COMPONENT DESCRIPTION: CHAPTER 4
previously in the database and that image has got the access to open the door then it will work
otherwise it won’t open.
3|Page
COMPONENT DESCRIPTION: CHAPTER 4
Figure3:Raspberry Pi
In the above figure no.3 the Raspberry Pi is a low priced, small sized computer
that plugs into a computer monitor or TV, and uses a normal peripherals like keyboard and
mouse. It is a capable little device that enables people of all ages to explore computing, and to
learn how to program in languages like Scratch and Python. It’s capable of doing everything
you’d expect a desktop computer to do, from browsing the internet and playing high-definition
video, to making spreadsheets, word-processing, and playing games. The Raspberry Pi was first
launched in 2012, and there have been a few changes and variations performed from that point
forward. The first Pi had a single core 700MHz CPU and simply 256MB RAM, and the most
recent model has a quad-core 1.4GHz CPU with 1GB RAM.All over the world, individuals use
Raspberry Pi to get the skills of programming abilities, , do home automation, and even use them
in modern applications.The Raspberry Pi works in the open source environment: it runs Linux
(diverse distribution), and its principle supported working system, Raspbian, is open source and
3|Page
COMPONENT DESCRIPTION: CHAPTER 4
runs a suite of open source programming. The Raspberry Pi Foundation adds to the Linux part
and
4|Page
COMPONENT DESCRIPTION: CHAPTER 4
different other open source extends just as releasing its very own lot
programming as open source.
Here Raspberry pi is being used as a main controller to derive other features like
face recognization and detection which we are doing in our project.
5|Page
COMPONENT DESCRIPTION: CHAPTER 4
different other open source extends just as releasing its very own lot
programming as open source.
Here Raspberry pi is being used as a main controller to derive other features like
face recognization and detection which we are doing in our project.
6|Page
COMPONENT DESCRIPTION: CHAPTER 4
Voltages:
Two 5V pins and two 3V3 pins are present on the board, as well as a number of
ground pins (0V), which are unconfigurable. The remaining pins are all general purpose 3V3
pins, meaning outputs are set to 3V3 and inputs are 3V3-tolerant.
Outputs:
A GPIO pin designated as an output pin can be set to high (3V3) or low (0V).
Inputs:
A GPIO pin designated as an input pin can be read as high (3V3) or low (0V).
This is made easier with the use of internal pull-up or pull-down resistors. Pins GPIO2 and
GPIO3 have fixed pull-up resistors, but for other pins this can be configured in software. The
GPIO pins can be used for other functions also. Some are available on all pins and others on
some specific pins.
2|Page
COMPONENT DESCRIPTION: CHAPTER 4
The Pi camera comes with a flex cable. The flex cable is inserted into the
connector which is located between the Ethernet and HDMI port with the silver connectors
facing the HDMI port. The flex cable connector is opened by pulling the tabs on the top of the
connector upwards then towards the Ethernet port. The flex cable then is inserted firmly into the
connector. The top part of the connector then is pushed towards the HDMI connector and down,
while the flex cable is held in place. Here the Pi camera is being utilized for the face detection
and the face recognization process where firstly are captured and stored it in the database using
python and then again using the camera while the automation and the surveillance part.
3|Page
COMPONENT DESCRIPTION: CHAPTER 4
This is a LOW Level 5V 2-channel relay interface board, and each channel needs
a 15-20mA driver current. It is used to control various appliances and equipment with large
current. It is equipped with high-current relays that work under AC250V 10A or DC30V 10A. It
has a standard interface that can be controlled directly by microcontroller. Relay is being used
here as a driver circuit to drive other appliances through the relay.
FEATURES:
• Relay maximum output: DC 30V/10A, AC 250V/10A.
• 2 Channel Relay Module with Optocoupler LOW Level Trigger expansion board,
which is perfect with arduino.
4|Page
COMPONENT DESCRIPTION: CHAPTER 4
INPUT:
• VCC: Connected to positive supply voltage
• GND: Connected to negative supply voltage
• IN1: Signal triggering terminal 1 of relay module
• IN2: Signal triggering terminal 2 of relay module
OUTPUT:
• There is one NC(Normal-close), NO(Normal-open) and COM(common) in each
sub-modular of the relay so there are 2NC,2NO and 2COM.
5|Page
COMPONENT DESCRIPTION: CHAPTER 4
• Connect the signal terminal IN2、IN1 of 2-channel relay to port 17、18 of the
2-channel relay-----------------Raspberry Pi
IN2-----------------------17
IN1-----------------------18
6|Page
COMPONENT DESCRIPTION: CHAPTER 4
4.4 DC MOTOR:
7|Page
COMPONENT DESCRIPTION: CHAPTER 4
through it. In this proposed scheme the DC motor is connected to the relay and drives the
miniature door after successful recognization process.
8|Page
COMPONENT DESCRIPTION: CHAPTER 4
8|Page
COMPONENT DESCRIPTION: CHAPTER 4
LED (Light Emitting Diode) will glow otherwise it will not glow which will in turn unlock the
door.
9|Page
METHODOLOGY: CHAPTER 5
METHODOLOGY
10 | P a g e
METHODOLOGY: CHAPTER 5
Step2 (install dependencies): The first step is to update and upgrade any existing
packages.
unzip opencv.zip
2|Page
METHODOLOGY: CHAPTER 5
Creating a Python virtual environment that will be used for computer vision
development Python2.7 is used.
mkvirtualenv cv -p python2
In the event that Raspberry Pi is ever booted; log out and log back in; or open up
another terminal one needs to utilize the "workon" order to re-get to the "cv" virtual
environment.
source ~/.profile
workon cv
3|Page
METHODOLOGY: CHAPTER 5
The only Python dependency is NumPy, a Python package used for numerical
processing:
OpenCV needs to be compiled and installed .First one should check whether one
is in the virtual environment then “execution of the command “workon” will be done.
workon cv
After being sure that one is in the “cv” virtual environment then one needs to
setup the build using CMake.
4|Page
METHODOLOGY: CHAPTER 5
cd ~/opencv-3.3.0/
make -j4
ls -l /usr/local/lib/python2.7/site-packages/
total 1852
cd ~/.virtualenvs/cv/lib/python2.7/site-packages/
ln -s /usr/local/lib/python2.7/site-packages/cv2.so cv2.so
5|Page
METHODOLOGY: CHAPTER 5
Open a new terminal, execute the source and workon commands, and then finally
attempt to import the Python + OpenCV bindings.
source ~/.profile
$ workon cv
$ python
>>> cv2.__version__
'3.3.0'
• Face Recognition
Step1: Instaling OpenCV 3.3.0
6|Page
METHODOLOGY: CHAPTER 5
After the installation of open cv library, the first and foremost thing is to test
whether the pi camera is working properly or not. If the camera is properly installed the to
ongoing steps are to be performed. The camera must be aligned in the correct manner to detect
and recognize the features of the face.
Detecting faces and after that gather data. The most common way to detect faces
is by using Haar Cascade Algorithm. In this algorithm real time face detection is performed.
Step5: Trainer
On this second phase, we must take all user data from our dataset and "trainer"
the OpenCV Recognizer. This is done directly by a specific OpenCV function. The result will be
a .yml file that will be saved on a "trainer/" directory.
Step5: Recognizer
Here capturing a face will be done on the camera and if this person had his face
captured and trained before, our recognizer will make a "prediction" returning its id and an
index, shown how confident the recognizer is with this match.
Here face recognization has been done using one kind of classifier which is
known as Haar Cascade classifier. In this process of face recognition the most important part is
of image processing. Image processing is a numerically serious task and one of the greatest
7|Page
METHODOLOGY: CHAPTER 5
territories of research for a major information field. It is a procedure on the picture to change it
into desired looking or which the info is a picture and the output might be a picture or set of
characters related with the specific picture. It alludes to variety of techniques that are utilized to
augment the data output from an image.
8|Page
METHODOLOGY: CHAPTER 5
It is basically a classifier which is being used to detect objects for which it has
been trained for. First and foremost, the algorithm needs a lot of positive pictures and negative
pictures to prepare the Haar cascade classifier. Positive pictures are pictures with clear faces
where negative pictures are those with no countenances. Each feature is represented as a single
value obtained from the difference of the sums of pixels in white rectangle from the sum of all
pixels in the black rectangle. All different possible sizes and locations of classifier is used for
calculating of plenty of features. As the number of classifiers increase the arithmetic
computations seems to take a long time. Instead of it, the concept of Integral Image has been
used. Image Processing Integral image is a data structure which is a summed area table and
algorithm for quickly and efficiently generating sum of values in a rectangular grid subset. To
avoid the complex calculation we use Adaboost machine learning algorithm, which is inbuilt in
OpenCV library that is cascade classifier, it eliminates the redundancy in the classifiers. Any
classifier which has a probability of 50% of more in detection is treated as weak classifier. The
Sum of all weak classifier gives a strong classifier which makes the decision about detection.
Classification takes place in stages, if the selected region fails in the first stage, we discard it.
One doesn’t use the classifiers on that region which is discarded. The region which passes all the
stages i.e. all strong classifiers is treated as the detected face. Detected Faces are passed to the
Face recognition phase. Local Binary Patterns histogram algorithm (LBPH) has been used for
face recognition. Local binary patterns are simple at the same time very efficient texture operator
which assigns the pixels of the image by comparing with the adjacent pixels as threshold and
which results in a binary result.
• EDGE FEATURES
8|Page
METHODOLOGY: CHAPTER 5
• LINE FEATURES
• CENTER-SURROUND FEATURES
• SPECIAL DIAGONAL LINE FEATURES
a) EDGE FEATURES:
b) LINE FEATURES:
9|Page
METHODOLOGY: CHAPTER 5
c) CENTER-SURROUND FEATURE:
10 | P a g e
METHODOLOGY: CHAPTER 5
11 | P a g e
METHODOLOGY: CHAPTER 5
In this proposed scheme it has been decided to bring on a normal dc motor and
connect it with a relay which will be connected to the main controller Raspberry Pi. The DC
Motor will also connected to any of the pins of Raspberry Pi. DC motor here is helping the
miniature door to open after the face is recognized in Face Recognization process. This whole
system is a post part of the surveillance of Home automation.
11 | P a g e
RESULTS AND DISCUSSIONS: CHAPTER 6
12 | P a g e
RESULTS AND DISCUSSIONS: CHAPTER 6
In figure no 15 the whole system is depicted where one can see there is a box like
structure which is holding the Pi camera upright so it could take clear and proper pictures for the
purpose of face recognization.
2|Page
RESULTS AND DISCUSSIONS: CHAPTER 6
3|Page
RESULTS AND DISCUSSIONS: CHAPTER 6
The above figure is the outcome of the Face Recognization. This picture is taken
by the Raspberry Pi camera which is used for the face recognization. Firstly taking the pictures
and storing it in the database then during the recognization process the outcome shows the name
of the identity if it is stored in the database and it also shows the matching index which is
previously mentioned that if it is 45% or more then it is successful otherwise not. Here clearly it
is not the case as the matching index is showing 29.0%.
4|Page
RESULTS AND DISCUSSIONS: CHAPTER 6
In the above figure it is the output of the face recognization and the person is
identified properly. The matching index here is 44% which is almost 45% (the desired matching
index) so one can say here that it is approximately successful.
5|Page
RESULTS AND DISCUSSIONS: CHAPTER 6
In the above figure one can see that one face is being recognized as it is stored in
the database and another face is not properly recognized and is showing “Unknown “from here
one can conclude that if the face is not stored in the database previously then the face won’t be
recognized and will show unknown
In this proposed scheme it has been already decided to introduce a smart door
lock system where a miniature door will be used. The door will be driven by a DC motor which
will be driven by a relay. the Pi camera is attached to the camera slot and the DC motor and
Relay is attached to the GPIO pins of the Raspberry Pi. As it is a two channel relay so it is
6|Page
RESULTS AND DISCUSSIONS: CHAPTER 6
connected to the LED and the DC motor which helps in driving the DC motor .Here the DC
motor drives a miniature door which is being used for a door locking system for surveillance
purposes. The door only opens after a successful recognization process, when the face is stored
previously in the database and that image has got the access to open the door then it will work
otherwise it won’t open.
7|Page
RESULTS AND DISCUSSIONS: CHAPTER 6
7|Page
CONCLUSION AND FUTRURE WORKS: CHAPTER 7
8|Page
REFERENCES: CHAPTER 8
one of the fields that utilizes facial recognition the most is security. Facial recognition is an
extremely viable apparatus that can help law masters perceive offenders and programming
organizations are
9|Page
REFERENCES: CHAPTER 8
[1] Electronics Industries Association, Consumer Electronics Group, EIA Home Automation
System: EIA/Is-60, EIA ,1992.
[2] D.L. Cross, C. Douligeris; “A Fiber Optic Home Automation System”, IEEE Transactions
on Consumer Electronics, Vol. 39, No. 3, August 1993,pp. 636-645.
[3] C. Douligiris; “Intelligent Home Systems” IEEE Communication Magazine, October 1993,
pp. 52-61
2|Page
REFERENCES: CHAPTER 8
[4] W.Y. Chen; “Emerging Home Digital Networking Needs”, Proc. 4th IEEE Int. workshop on
Community Networking, Atlanta, 1997, pp. 7-12..
[5] H. Fujieda, Y. Horiike, T. Yamamoto and T. Nomura; “A Wireless Home Network and its
Application Systems”, IEEE Transactions on Consumer Electronics, Vol. 46, No.
2, May 2000, pp. 283-290.
[6] H.Oh, H.Bahn, K.J. Chae; “An Energy-Efficient Sensor Routing Scheme for Home
Automation Networks”, IEEE Transactions on Consumer Electronics, Vol. 51,
No.3, August 2005.
[7] Mario Kolberg & Evan H. Magill; “Using Pen and Paper to control Networked Appliances”,
IEEE Communications Magazine, November 2006, pp. 148-154.
[8] Al-Ali A. R and Al-Rousan M., "Java-based home automation system", IEEE Transactions
on Consumer Electronics, vol. 50, 2003,no. 2, pp. 498-504.
3|Page
REFERENCES: CHAPTER 8
[12] R.A.Ramlee, D.H.Z.Tang dan M.M.Ismail(2012), “Smart Home System For Disabled
People Via Wireless Bluetooth”, IEEE International Conference on System
Engineering and Technology ,pp. 978-983,2012.
[13] G.Birajda and S.Mahindrakar, “Embedded web server based home automation using
raspberry pi”, International Journal of Modern Trends in Engineering and Research, vol. 1,
no.5 ,,India,September2014.
[15] Paul Viola and Michael Jones, “Rapid object detection using boosted cascade of simple
Features”, IEEE Conference on Computer vision and Pattern Recognition, 2001,
Vol.1,pp. 511518.
[16] C. Papageorgiou, M. Oren and T. Poggio, “A general framework for object detection”,
InInternational Conference on Computer Wsion, Bombay, Jan 1998, pp. 555-562.
[17] N.V. Naik, A.Venunadan and Kumara .K .R,"Face Detection on Open CV using Raspberry
Pi", Department of ECE,GSIT, Karwar, Karnataka, IJEECS, volume6, 2017.
[18] T.Patel and B.Shah, “A Survey on Facial Feature Extraction Techniques for Automatic Face
Annotation”, IEEE International Conference on Innovative Mechanisms for
Industry Applications (ICIMIA),Bangalore, India, 2017.
[19] J.J. Patoliya and M.M. Desai, “Face Detection based ATM Security System using
Embedded Linux Platform”, IEEE 2017 2nd International Conference for
Convergence in Technology (I2CT),Mumbai, India,2017.
4|Page
REFERENCES: CHAPTER 8
[21] J.C Yang, "An Intelligent Automated Door Control System Based on a Smart
Camera".2012.
[22] W. F. Abaya, J. Basa, M. Sy, A. C. Abad and E.P. Dadios, "Low cost smart security camera
with night vision capability using Raspberry Pi and OpenCV," 2014 International
Conference on
Humanoid, Nanotechnology, Information Technology, Communication and
Control,
Environment and Management (HNICEM), Palawan, 2014, pp. 1-6
[23] P.Pasumarti1, P. P. Sekhar “Classroom Attendance Using Face Detection and Raspberry-Pi”
International Research journal of Engineering and Technology (IRJET), Volume: 05 Issue:
03. p3-p5,Mar-2018
[24] S.Rajkumar, J.Prakash, “Automated attendance using Raspberry pi”, International Journal
Of Pharmacy & Technology (IJPT), Vol. 8, No. 3, pp. 16214-16221, September
2016.-
[27] N.Saini, S.Kaur and H.Singh A Review: Face Detection Methods And Algorithms,
International Journal of Engineering Research & Technology (IJERT) ISSN:2278-0181
www.ijert.org Vol. 2 Issue 6, June – 2013.
2|Page
DATASHEETS
1 Introduction
The Raspberry Pi Compute Module 3+ (CM3+) is a range of DDR2-SODIMM-
mechanicallycompatible System on Modules (SoMs) containing processor, memory, eMMC
Flash (on non-Lite variants) and supporting power circuitry. These modules allow a designer to
leverage the Raspberry Pi hardware and software stack in their own custom systems and form
factors. In addition these modules have extra IO interfaces over and above what is available on
the Raspberry Pi model A/B boards, opening up more options for the designer.
The CM3+ Lite product is the same as CM3+ except the eMMC Flash is not
fitted, and the SD/eMMC interface pins are available for the user to connect their own SD/eMMC
device.
Note that the CM3+ is electrically identical and, with the exception of higher CPU
z-height, physically identical to the legacy CM3 products.
3|Page
DATASHEETS
2 Features
2.1 Hardware
Low cost
Low power
High availability
High reliability
– Module IO pins have 15 micro-inch hard gold plating over 2.5 micron Nickel
2.2 Peripherals
48x GPIO
2x I2C
2x SPI
2x UART
2x SD/SDIO
1x HDMI 1.3a
1x USB2 HOST/OTG
per lane) 1x 4-lane DSI Display Interface (up to 1Gbps per lane)
2.3 Software
2|Page
DATASHEETS
3 Block Diagram
3|Page