Image Processing Based Smart Home Automationusing Raspberry Piand Python
Image Processing Based Smart Home Automationusing Raspberry Piand Python
net/publication/359046281
CITATIONS READS
0 2,015
3 authors, including:
Ahmed J Jameel
84 PUBLICATIONS 384 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Ahmed J Jameel on 20 March 2022.
Abstract—The latest advances in computer vision are • Allow for wireless control over the door lock using an
making our life more and more automated; its algorithms Android mobile application developed specifically for this
can run homes, drive cars, make diagnoses, and assist system.
people in many other ways. Home automation is becoming one
of the most increasingly growing topics nowadays since it can
• Obtain the body temperature of the person standing by the
provide us with methods that can make our lives easier and door as a form of COVID-19 precautionary measure. This
better in quality. This system aims to increase the safety rate in feature will be operating in two operational modes.
homes by exposing potential intruders that might try to get in
private properties. It does that by using image processing II. LITERATURE SURVEY
algorithms that are going to analyze the face of whoever is by the A. Existing Techniques
door whenever motion is detected. If the face is authorized, the Many techniques have been innovated to create home
door will automatically open. Whereas any unauthorized faces automated systems. B. Shinde et. al. in [1] has developed a
will lead the system to initiate an automatic video call with the
home automation system using an Arduino microcontroller,
user to see who is by the door. The system also allows wireless
home automation by providing the choice to lock/unlock the door along with an android mobile application that sends
through a mobile application. Moreover, the application will commands to the Arduino which will control the appliances
display the body temperature retrieved from IR contactless accordingly. Both are connected to each other via Wi-Fi. In
temperature sensor that is added to provide COVID-19 [2], Krishna Rathi et. al. made use of hand gestures to control
precautionary measures. To increase the usage range of this the appliances, by using an accelerometer, Raspberry pi, flex
system, it consists of two operational modes controlling the sensor and an Arduino kit along with a hand gesture
functionality of the system in relation with the body temperature recognition algorithm, a person’s gestures was used to control
measured. the appliances at home. Whereas Saddam in [3], made use of
the DTMF technology, this is where each number on the
Keywords—Home automation, face recognition.
keypad has two frequencies, so by using a DTMF decoder, we
I. INTRODUCTION can assign each number a command that must be performed
when pressed. For merely security purposes, B Madhuravani.
Our houses, offices and other private properties are always at
et. al in [4], developed a system using Raspberry Pi, where
risk of being attacked by intruders that would be accessing
When motion is detected, the face will be captured and
them for many different reasons, such as theft, damaging
processed by a face recognition algorithm, which will alert by
property etc. Hence, restricting access to our properties is very
a buzzer and sending an email/SMS, if the face is not
crucial and would surely protect against intruders. One of the
recognized. Speech recognition technique was implemented
most efficient ways is the use facial recognition in smart home
by Nainsi Soni. et. al. in [5]. This system allows total control
applications. Facial recognition can be implemented by using
on home appliances by speech commands only. The process
various algorithms that would be able to identify and highlight
of achieving this technique needs signal pre-processing,
specific facial characteristics. Especially, during these
feature extraction from the signal, language and pronunciation
ongoing circumstances involving Covid-19; it is a much better
modelling and finally decoding the message. Utilizing such
option than anything that would include touching such as
system in home automation can be extremely helpful for
using pins or fingerprints. Implementing such a method in a
people who might struggle with blindness or immobility.
system that could be connected to the internet was made
Sudhasmita Behera. et.al in [6] designed a system that
possible by using the Internet of Things technology. It is a
controls home appliances using SMS messages in which GSM
technology of wirelessly interconnected devices over a
wireless technology was used. First, the user sends SMS
network that can communicate with each other in real-time
message to the system with the desired commands that needs
using the internet without any human intervention. In other
to be done. Second, the system stores this message and
words, it can be considered as machine-to-machine
generates control signal. Finally, the signal is sent to the
communication. This technology can collect data and
hardware that was programmed to perform these commands.
information, analyze it and then perform an action based on
LabVIEW is a programming software that provides graphical
the information gathered. This goal of this paper is to design
approach to develop applications that requires control and
a low-cost intrusion detection system using a Raspberry Pi 4
measure. Due to its features and the ability to visualize every
that is capable of the following:
part of the program, S Jermilla. et. al in [7] used it in a home
• Executing detection/recognition algorithms upon motion
automation project. In [8] Idris used an MLX90614 Non-
detection and controlling the door look according to its
contact Infrared temperature sensor to retrieve the body
results.
temperatures.
• Act as a smart intercom system and initiate an automatic
video call with the owner of the property.
B. Face detection and recognition input port that allows users to record HD video and high-
Facial detection is the ability of the system to detect the resolution photos. Using Python and specific libraries
presence of humans or faces in a photo using algorithms and written for the Pi, users can create tools that take photos and
formulas. There are several different approaches and video, and analyze them in real-time or save them for later
techniques to perform the face detection. First, the feature- processing. Thus, it will allow us to implement a facial
based face detection which was used by Tomasz Orczyk and detection and recognition algorithms and control the door lock
Piotr Porwik in [9], this depends on the face features such as based on that. We chose to work with Raspberry Pi4 due to
nose and eyes to detect the human’s face. Second approach is several reasons. First, it contains 1.5 GHz 64-bit quad core
ARM Cortex-A72 processor which makes it faster than the
the geometric base face detection, it is based on the geometric
previous models and this will provide higher performance for
structure of the face image. V. Starovoitov and D. Samal used
video calls. Second, the gigabit Ethernet that ensures higher
this technique in [10]. Finally, the Haar Cascade classifier speed network connections. Finally, it has a pair of micro-
algorithm which was implemented by Senthamizh HDMI ports that support 4k resolution for video streaming.
Selvi.R.et.al for criminal identification purposes [11].
Whereas Facial recognition is the ability to recognize a new 2. PIR motion sensor
input face image depending on the closest match from the Passive Infrared sensors can detect the changes in the level of
stored database. There are multiple face recognition infrared radiations. Generally, all objects emit infrared
algorithms that are constantly being improved aiming to find radiations, but the strength of this radiation varies depending
the best approach to identify faces. Eigenface algorithm uses on the temperature, so when a human pass by the sensor they
linear algebra concepts to recognize faces. In [12] Marijeta will be detected because of the difference in radiation between
Slavković.et.al implemented this algorithm for a face the human body and other objects in the background. We used
recognition system. In Fisherface algorithm, the classes of the this sensor to build our system with two operational modes:
samples are taken under consideration. The aim of this In the first operational mode whenever motion is detected the
algorithm is to maximize the scatter between classes and temperature will be measured and sent to the application to
minimize the scatter within each. Local Binary Pattern warn the user. If the face is recognized by the algorithm as an
Histogram (LBPH) that was introduced in 1994, is considered authorized user, the door will automatically open even if the
to be one of the simplest face recognition algorithms. Farah temperature is high. This application is useful for homes and
Deeba.et.al developed an LBPH-based Enhanced Real-Time personal properties because even if the user’s body
Face Recognition system in [13]. temperature is high, they still need to enter their own house.
The second operational mode is suitable for offices and
workplaces. Whenever motion is detected, the temperature
III. METHOLODGY sensor will measure the temperature of the visitor and send it
This system consists of both hardware and software to the user. If the temperature exceeds the limit which is 37.5°,
components. The hardware components consist of all the the door will not open automatically even if the user was
electrical components required to run the system. Whereas the recognized by the algorithm. This will ensure that no one with
software part consists of all the algorithms and programs
required to run the main functions of the system. high fever enters the building to reduce the risk of having a
COVID-19 infection in the organization.
4. Webcam
A webcam camera will be used to enable the face detection,
recognition, and the video call.
Out of the 10 attempts, it was 100% successful in detecting Fig 5: Notifications received from the application
faces, whereas had an accuracy of 80% in recognizing the
faces. It was also noticeable that the lighting conditions had a
great effect on the system. A slight change in the lighting can
change the results. Hence, it is better to provide a light source
with a stable brightness to provide more accuracy.