0% found this document useful (0 votes)
49 views46 pages

Smart Mirror _final_doc (4)

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views46 pages

Smart Mirror _final_doc (4)

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 46

A Technical Seminar Report

On
SMART MIRROR
Submitted in the partial fulfilment of the requirements for the award of the
degree in

BACHELOR OF TECHNOLOGY

IN

COMPUTER SCIENCE & ENGINEERING(ARTIFICIAL


INTELLIGENCE & MACHINE LEARNING)
MATAM SHANTHI 21BR1A6630

Under the Guidance of


G.SANDHYA RANI

DEPARTMENT OF COMPUTER SCIENCE AND


ENGINEERING(ARTIFICIAL INTELLIGENCE & MACHINE
LEARNING)
Kavitha Memorial Educational Society's

VIJAYA ENGINEERING COLLEGE


Approved By AICTE New Delhi& Affiliated To JNTUH-Hyderabad
AMMAPALEM (V), NEAR THANIKELLA, KHAMMAM-507305
2021-2025
Kavitha Memorial Educational Society’s

VIJAYA ENGINEERING COLLEGE


DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING(AI&ML)
(Approved By AICTE-New Delhi & Affililiated to JNTUH-Hyderabad)
AMMAPALE(V), NEAR THANIKELLA KHAMMAM-507305

BONAFIDE CERTIFICATE

This is to certify that dissertation entitled as MACHINE LEARNING is a Bonafide


work carried out by M.SHANTHI Reg.No:21BR1A6630 submitted technical
seminar report and presented in manner required for its acceptance in partial
fulfilment for award of degree of Bachelor of technology in computer Science and
Engineering of Jawaharlal Nehru Technologies University Hyderabad, Hyderabad
during the academic year 2021-2025

Internal Guide Head of the department.


G.SANDHYA RANI G.SANDHYA RANI

External viva voice held on

External examiner
DECLARATION

I M.SHANTHI bearing Reg No: 21BR1A6630 hereby declare that the Technical Seminar Report
entitled “MACHINE LEARNING” is done by me and submitted in partial fulfillment of the
requirements for the award of the degree in BACHELOR OF TECHNOLOGY.

DATE:

PLACE: KHAMMAM SIGNATURE OF THE


CANDIDATE
M.SHANTHI
ACKNOWLEDGEMENT

I wish to convey my sincere thanks to Mr. PARUPALLI USHAKIRAN KUMAR Garu,


Secretary of Vijaya Engineering College.

I hereby that the Vice Chairperson Smt. PARUPALLI VIJAYA LAXMI Garu for providing
every requirement needed for completion of this technical seminar report.

I hereby thank the Principal Dr.V.CHINNAIAH sir for providing every requirement needed
for completion of this technical seminar report.

I hereby thank the Vice-Principal Dr.V.CHINNAIAH sir for providing every requirement
needed for completion of this technical seminar report.

I offer my sincere thanks to Mr.SHAIK SAIDA Head of the department Computer Science
and Engineering (Artificial Intelligence and Machine Learning) providing every requirement needed
for completion of this technical seminar report.

I heartly thank my guide Smt. G.SANDHYA RANI for suggesting and giving the support to
complete this technical seminar report.

MATAM SHANTHI
21BR1A6630
ABSTRACT

In this project, we were asked to experiment with a real world dataset, and to explore how
machine learning algorithms can be used to find the patterns in data. Throughout the
project, we applied several machine learning techniques such as classification and
supervised learning, aiming to enhance our understanding of data analysis and artificial
intelligence. This process involved data preprocessing, model training, and evaluation to
identify the most accurate predictive models.We were expected to gain experience using a
common data-mining and machine learning library, Weka, and were expected to submit a
report about the dataset and the algorithms used. After performing the required tasks on a
dataset of my choice, herein lies my final report.The results underscore the significance of
machine learning in enhancing decision-making processes, optimizing operations, and
driving innovation across industries.
TABLE OF CONTENTS

Chapter No. Title PAGE NO.

1 Introduction 01-03

2 Raspberry Pi 3 Model B 04-20

3 System Development 21-26

4 Project Simulation 27-29

5 Challenges and Future Improvement 30-32

6 Applications and Advantages 33-35

7 Conclusion 36

8 Reference 37
LIST OF FIGURES

S No: Name Page


1 Smart Mirror 03
2 Raspberry pi 3 pin diagram 10
3 NOOBS installation 11

4 Schematic diagram of light reflection on a one way mirror 19


5 Wood Frame 20

6 Level 0 Design of Smart Mirror 22

7 Level 1 Design of Smart Mirror 22


8 Diagram of Devices Interfacing with Embedded Computer 23
9 Making Wood Frame 24
10 Assembly (One way mirror) 25
11 Assembly (Monitor) 25
12 Program Flow 26
13 Normal View of Smart Mirror 28
14 View of Smart Mirror (When the room is dark) 29
15 View of Smart Mirror (When the room is bright 29
16 (Hair Color Simulation) 34
MACHINE LEARNING

CHAPTER 1

INTRODUCTION

1
MACHINE LEARNING

1.1 Introduction

What is Machine Learning?


Machine learning is an application of artificial intelligence (AI) that provides systems the ability
to automatically learn and improve from experience without being explicitly programmed.
Machine learning focuses on the development of computer programs that can access data
and use it learn for themselves.

The process of learning begins with observations or data, such as examples, direct experience, or
instruction, in order to look for patterns in data and make better decisions in the future based on
the examples that we provide. The primary aim is to allow the computers learn automatically
without human intervention or assistance and adjust actions accordingly.

Some machine learning methods:

Machine learning algorithms are often categorized as supervised or unsupervised.


 Supervised machine learning algorithms can apply what has been learned in the past to
new data using labeled examples to predict future events. Starting from the analysis of a
known training dataset, the learning algorithm produces an inferred function to make
predictions about the output values. The system is able to provide targets for any new input
after sufficient training. The learning algorithm can also compare its output with the correct,
intended output and find errors in order to modify the model accordingly.
 In contrast, unsupervised machine learning algorithms are used when the information
used to train is neither classified nor labeled. Unsupervised learning studies how systems
can infer a function to describe a hidden structure from unlabeled data. The system doesn’t
figure out the right output, but it explores the data and can draw inferences from datasets to
describe hidden structures from unlabeled data.
 Semi-supervised machine learning algorithms fall somewhere in between supervised
and unsupervised learning, since they use both labeled and unlabeled data for training –
typically a small amount of labeled data and a large amount of unlabeled data. The
systems that use this method are able to considerably improve learning accuracy. Usually,
semi-supervised learning is chosen when the acquired labeled data requires skilled and
relevant resources in order to train it / learn from it. Otherwise, acquiringunlabeled data
generally doesn’t require additional resources.
 Reinforcement machine learning algorithms is a learning method that interacts with its
environment by producing actions and discovers errors or rewards. Trial and error search
and delayed reward are the most relevant characteristics of reinforcement learning. This
method allows machines and software agents to automatically determine the ideal
behavior within a specific context in order to maximize its performance.

2
MACHINE LEARNING

1.2 Objective

The purpose of machine learning is to discover patterns in your data and then make predictions
based on often complex patterns to answer business questions, detect and analyse trends and
help solve problems.

Machine learning is effectively a method of data analysis that works by automating the process
of building data models.

Figure 1 : Machine Learning

1.1.1 Supervised learning


Supervised learning is the machine learning task of learning a function that maps an input to an
output based on example input-output pairs. It infers a function from labeled training data
consisting of a set of training examples. In supervised learning, each example is a pair consisting
of an input object (typically a vector) and a desired output value (also called the supervisory
signal). A supervised learning algorithm analyzes the training data and produces an inferred
function, which can be used for mapping new examples. An optimal scenario will allow for the
algorithm to correctly determine the class labels for unseen instances.
This requires the learning algorithm to generalize from the training data to unseen situations in a
"reasonable" way (see inductive bias).
The parallel task in human and animal psychology is often referred to as concept Learning.
The aim of supervised machine learning is to build a model that makes predictions based on
3
MACHINE LEARNING

evidence in the presence of uncertainty. Supervised learning uses classification and regression
techniques to develop predictive models.
• Classification techniques predict discrete responses
• Regression techniques predict continuous responses
• Using Supervised Learning to Predict Heart Attack.

4
SMART MIRROR

CHAPTER 2

Raspberry Pi 3 Model B

4
SMART MIRROR

1.1 Raspberry Pi 3 Model B

The Raspberry Pi is a very small and low-cost computer which has the size of a credit
card and can be plugged into any computer monitor or TV. It uses a standard keyboard
and mouse. It has all the capability of a desktop like browsing the internet, playing high-
definition video, making spreadsheets, word processing and playing games. What
isunique to Raspberry Pi is that it allows the user to interact with the outside world and is
currently used in many digital projects. Users can learn to write programs by using
languages like Scratch and Python.

The Multipurpose Surveillance Robot has utilized the Raspberry Pi 3 Model B which is
the second generation Raspberry Pi which replaced the original Raspberry Pi 3 Model B+.
It has:

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

 4 USB ports

 40 GPIO pins

 Full HDMI port

 Ethernet port

 Combined 3.5 mm audio jack and composite video

 Camera interface (CSI)

 Display interface (DSI)

 Micro SD card slot

 Video Core IV 3D graphics core

5
SMART MIRROR

1.1.1 Raspberry Pi 3 Model B Hardware

1.1.1.1 Hardware of Raspberry Pi Required Accessories

 Micro SD Card
An 8 GB class 4 micro SD card with NOOBS (New Out Of the Box Software)
pre-installed, is recommended. The minimum recommended capacity of an SD
card is 8 GB. 4 GB is recommended for image installation. Even smaller cards
can be used for some distributions like OpenElec and Arch. The SD card class
determines the write speed a card can sustain. A class 4 SD card can achieve 4
MB/s write speed whereas for a class 10 card 10 MB/s is attainable. But this
does not mean a class 10 card will perform better than a class 4 one. Because,
in many cases, the higher write speed is achieved at the cost of read speed and
increased seek time. The Raspberry Pi 3 Model B requires a micro- SD card.

 Display and connectivity cable


Any HDMI/DVI monitor and any TV works as display for pi. But one with an
HDMI input is recommended.

 Keyboard and mouse


Raspberry pi works with any standard keyboard and mouse.Wireless keyboard
and mouse will work if already paired with Pi. Keyboard layout can be
configured through raspi-configure.

 Power supply
The Pi is powered by a USB micro power supply like most standard mobile
phone chargers. A good-quality power supply is required that can supply at
least 700mA at 5V.Power supplies with less than 700 mA current should
workfor basic usage but the Pi might reboot if too much power is drawn .

 Ethernet (network) cable


An Ethernet cable is necessary to connect Pi to a local network and the internet.

 USB wireless dongle


Pi can also be connected to a wireless network through use of a USB wireless
dongle which will need to be configured.
 Audio lead
A standard 3.5mm audio jack is used to audio through speakers and
headphones. An audio is required in the absence of an HDMI cable. If the Pi
isconnected to the monitor through an HDMI cable no separate audio lead is
necessary as audio can be played directly from the display. But if playing
audio through speakers is preferable, it will have to be configured.

6
SMART MIRROR

1.1.1.2 BCM2837

The Raspberry Pi 3 Model B uses the Broadcom processor BCM2837. The underlying
architecture in BCM2837 is identical to BCM2836 . It has an ARMv8 CPU.

1.1.1.3 Power

The device is powered by a 5V micro USB supply. Exactly how much current (mA) the
Raspberry Pi requires is dependent on what is connected to it. A 1.2A (1200 mA) power
supply from a reputable retailer will provide apple power to run a Pi. Typically, the model
B uses between 700-1000mA depending on what peripherals are connected; the model A
can use as little as 500mA with no peripherals attached. The maximum power the
Raspberry Pi can use is 1 Amp. If someone needs to connect a USB device that will take
the power requirements above 1 Amp, then they must connect it to an externally-powered
USB hub. The power requirements of the Raspberry Pi increase as it makes use of the
various interfaces on the Raspberry Pi. The GPIO pins can draw 50mA safely; distributed
across all the pins; an individual GPIO pin can only safely draw 16mA. The HDMI port
uses 50mA, the camera module requires 250 mA, and the keyboards and micecan take as
little as 100mA or over 1000mA. Back-powering occurs when USB hubsdo not provide a
diode to stop the hub from powering against the host computer. Some hubs will back-feed
the Raspberry Pi. This means that the hubs will power the RaspberryPi through its USB
input cable, without the need for a separate micro-USB power cable, and bypass the
voltage protection. If the Raspberry Pi is connected to a hub that back-feeds to it and the
hub experiences power surge, the Raspberry Pi could potentiallybe damaged.

7
SMART MIRROR

1.1.1.4 USB

The Raspberry Pi 3 Model B is equipped with four USB 2.0 ports. These are connected to
LAN9512 combo hub/Ethernet chip IC3, which is itself a USB device connected to the
single upstream USB port on BCM2837. The USB ports enable the attachment of
peripherals such as keyboard, mice, webcams that provide the Pi with additional
functionality. There are some differences between the USB hardware on the Raspberry Pi
and the USB hardware on desktop computers or laptop/tablet devices. The USB host port
inside the PI is an On-The-Go (OTG) host as the application processor powering the PI,
BCM2836, was originally intended to be used in the mobile market: i.e. as the single USB
port on a phone for connection to a PC, or to a single device, In essence, the OTG
hardware is simpler than the equivalent hardware on PC. OTG in general supports
communication to all types of USB device, but to provide an adequate level of
functionality for the most of the USB devices that one might plug into a Pi, the system
software has to do more work. In general, every device supported by Linux is possible to
use with the Pi, subject to a few caveats detailed further down. Linux has probably the
most comprehensive driver database for legacy hardware of any operating system. The
OTG hardware on Raspberry Pi has a similar level of support for certain devices, which
may present a higher software processing overhead. The Raspberry Pi also has only one
root USB port: all traffic from all connected devices is funneled down this bus, which
operates at a maximum speed of 480mbps. The OTG hardware on Raspberry Pi has a
simpler level of support for certain devices, which may present a higher software
processing overhead. The Raspberry Pi also has only one root USB port: all traffic from
all connected devices is funneled down this bus, which operates at a maximum speed of
480mbps. The USB specification defines three device speeds - Low, Full and High. Most
mice and keyboards are Low-speed, most USB sound devices are Full-speed and most
video devices (webcams or video capture) are High-speed. Generally, there are no issues
with connecting multiple High-speed USB devices to a Pi. The software overhead
incurred when talking to Low- and Full-speed devices means that there are soft
limitations on the number of simultaneously active Low- and Full-speed devices. Small
numbers of these types of devices connected to a Pi will cause no issues. USB devices
have defined power requirements, in units of 100mA from 100mA to 500mA. The device
advertises its own power requirements to the USB host when it is first connected. In
theory, the actual power consumed by the device should not exceed its stated
requirement. The USB ports on a Raspberry Pi have a design loading of 100mA each -
sufficient to drive "low-power" devices such as mice and keyboards. Devices such as
WiFi adapters, USB hard drives, USB pen drives all consume much more current and
should be powered from an external hub with its own power supply. While it is possible
to plug a 500mA device into a Pi and have it work with a sufficiently powerful supply,
reliable operation is not guaranteed. In addition, hot plugging high-power devices into the
Pi's USB ports may cause a brownout which can cause the Pi to reset.

8
SMART MIRROR

1.1.1.5 GPIO pins

One powerful feature of the Raspberry Pi is the row of GPIO (General Purpose
Input/Output) pins. These pins are a physical interface between the Pi and the outside
world. The GPIO pins can be programmed to interact in amazing ways with the real
world. Inputs don't have to come from a physical switch; it could be input from a sensoror
a signal from another computer or device, for example. The output can also doanything.
In addition to the familiar USB, Ethernet and HDMI ports, the Raspberry Pi offers the
ability to connect directly to a variety of electronic devices. These include:

 Digital outputs: turn lights, motors, or other devices on or off

 Digital inputs: read an on or off state from a button, switch, or other sensor

 Communication with chips or modules using low-level protocols: SPI, I²C, or


serial UART

Connections are made using GPIO ("General Purpose Input/Output") pins. Unlike USB,
etc., these interfaces are not "plug and play" and require care to avoid miswiring. The
Raspberry PI GPIOs use 3.3V logic levels, and can be damaged if connected directly to
5V levels (as found in many older digital systems) without level-conversion circuitry.
Note that no analogue input or output is available. However, add-on boards such as the
Rpi-Gertboard provide this capability. The Raspberry Pi Model A+ and B+ boards,
andthe Pi 3 Model B, have a 40-pin header marked J8, arranged as 2x20 pins. The first
26pins are the same as P1 on the A/B boards, with the remaining 14 pins
providingadditional GPIO and ground pins, and an EEPROM ID feature for auto-
configuration with add-on "HAT" boards. GPIO voltage levels are 3.3 V and are not 5 V
tolerant. Thereis no over-voltage protection on the board - the intention is that people
interested in serious interfacing will use an external board with buffers, level conversion
and analogI/O rather than soldering directly onto the main board.

All the GPIO pins can be reconfigured to provide alternate functions, SPI, PWM, I²C and
so. At reset only pins GPIO 14 & 15 are assigned to the alternate function UART, these
two can be switched back to GPIO to provide a total of 17 GPIO pins. Each of their
functions and full details of how to access are detailed in the chipset datasheet.
Each GPIO can interrupt, high/low/rise/fall/change. There is currently no support for
GPIO interrupts in the official kernel, however a patch exists, and requiring compilation
of modified source tree. The 'Raspbian "wheezy"' version that is currently recommended
for starters already includes GPIO interrupts. GPIO input hysteresis (Schmitt trigger) can
be on or off, output slew rate can be fast or limited, and source and sink current is
configurable from 2 mA up to 16 mA. Note that chipset GPIO pins 0-27 are in the same
block and these properties are set per block, not per pin. See GPIO Datasheet Addendum
- GPIO Pads Control. Particular attention should be applied to the note regarding SSO

9
SMART MIRROR

(Simultaneous Switching Outputs): to avoid interference, driving currents should be kept


as low as possible. The available alternative functions and their corresponding pins are
detailed below. These numbers are in reference to the chipset documentation and may not
match the numbers exposed in Linux. Only fully usable functions are detailed, for some
alternative functions not all the necessary pins are available for the functionality to be
actually used. A Raspberry Pi 3 pin diagram is given below:

Figure 2: Raspberry Pi 3 pin diagram

10
SMART MIRROR

1.1.2 Raspberry Pi 3 Model B Operating System Setup

There are different ways to install operating system into raspberry pi. The main two
systems are discussed below. We use NOOBS to install operating system into raspberry pi.

1.1.2.1 Raspbian

Raspbian is the default operating system for regular use on Raspberry Pi. Raspbian is a
free operating system based on Debian and optimized for Raspberry Pi hardware.
Raspbian comes with over 35000 packages; precompiled software bundled in a nice
format for easy installation on Raspberry Pi. Raspbian is a community project under
active development, with the emphasis on developing stability and performance of as
many Debian packages as possible. (update it. Forcus on both and discuss about the
features and benefits. Finally say which method you have used.)

1.1.2.2 NOOBS

New out Of the Box Software is an easy operating system install manager for
theRaspberry Pi. The most convenient way to get NOOBS is to purchase a micro SD card
with NOOBS pre-installed. It can also be downloaded from the Raspberry Pi website.
After downloading the NOOBS zip file, the contents of the file will have to be copied to a
formatted SD card on a computer.

Figure 3: NOOBS installation

11
SMART MIRROR

 Installing NOOBS on an SD card

 Format an SD that is 4 GB or larger as FAT. Download and extract files from


the NOOBS zip file.

 Copy the extracted file onto the SD card immediately after formatting so that
the files are in the root directory of the SD card.

 The files might be copied into a single folder. In that case, the files inside the
folder must be copied across rather than the folder itself.

 The ‘’RECOVERY” fat partition will be automatically resized to a minimum and a


list of available to install OSs will be displayed.

 Format an SD card as FAT

 Windows: The SD Association’s Formatting Tool is recommended for


Windows users which can be downloaded from sdcard.org. It is necessary to
set “FORMAT SIZE ADJUSTMENT” option “ON” in the “Options” menu
sothat the entire SD card volume is formatted instead of a single partition.

 Mac OS: The SD Association’s Formatting Tool is also available for Mac
users. The default OSX Disc utility can also be used to format the disc.
Inorder to do that, the SD card has to be selected and choose Erase with MS-
DOS format.

 Linux: For Linux user’s parted (or the command line version parted) is
recommended.

 Included in NOOBS

Only Raspbian is installed in NOOBS by default. The others can be installed


with a network connection.

 NOOBS and NOOBS Lite

NOOBS comes in two forms: offline and network install; or network install
only. The full version comes with Raspbian included and so it can be installed
from the SD card directly without any internet connection. The NOOBS Lite
or any other operating system needs to be installed while online. The operating
system image on the full version might get outdated. So, if aninternet
connection is available during installation, the user will be given the option to
choose to download the new version if the current one is outdated. An
elaborate documentation of NOOBS and NOOBS source code is available on
GitHub.

12
SMART MIRROR

1.2 Remote Access

1.2.1 Access over internet

Raspberry Pi can be connected to another computer or a mobile device. One method is to


set-up port forwarding. To set-up port forwarding one must change the configuration of
their router to forward all inbound traffic from the internet to a specific port to the local
IP address of their Raspberry Pi. One disadvantage of doing this is that it exposes a
network port on a private LAN to the public network. This is security vulnerability and
must be managed carefully. One secure alternative to port forwarding is the Weaved
service. Weaved is software that needs to be install on the Raspberry Pi and it will allow
Pi to connect to any device over the internet.

1.2.2 VNC

VNC is a graphical desktop sharing system that allows someone to remotely control the
desktop interface of one computer from another. It transmits the keyboard and mouse
events form the controller, and receive updates to the screen over the network from the
remote host. This enables a user to use the desktop of the Pi inside a window on their
computer. They will be able to control it as though they were working on Raspberry Pi
itself . VNC is used widely across every industry sector by individuals and organizations
for different use cases which include providing IT desktop support tocolleagues and
friends, and also accessing system and services on the move.

1.2.3 SSH (Secure Shell)

Secure Shell, or SSH is a network protocol which operates at Application layer of OSI
model to allow encrypted remote login and other services for secure operations over an
unsecured network. SSH provides a secure channel in a unsecure network through a
client- server architecture. SSH is capable of securing any network service but typical
applications include remote command-line login and remote command execution. The
command line of Raspberry Pi can be accessed from another computer in the same
network using SSH. SSH server is enabled on Raspberry Pi by default. It can be disabled
as well. SSH is built into Linux distributions and Mac OS, and a third-party SSH client is
available for Windows.

1.2.4 FTP
The File Transfer Protocol is a standard network protocol to transfer files between a client
computer and a host computer. It is based on client-server architecture and
utilizesseparate connections for control and data between client and server. FTP clients
can authenticate themselves with clear-text sign-in usually in the form of username and
password but they can also sign in anonymously if the server is configured to do so.
13
SMART MIRROR

Sometime FTP is secured with SSL/TLS (FTPS) in order to protect username and
password and encrypt the content.

14
SMART MIRROR

FTP can be used to transfer files between a Raspberry Pi and another computer. Although
with default program sftp-server of Raspbian, the users with sufficient privilege can
transfer files or directories. And access to the file system of the limited users is also
required often.

1.2.5 SFTP

The FTP is a popular file transfer protocol for transferring file between two remote
systems. SFTP, which stands for SSH File Transfer Protocol, is a separate protocol
packages with SSH that works in a similar way over a secure connection. The advantageis
it leverages a secure connection to transfer file and traverse file system on both local and
remote system. Almost in all cases, SFTP is preferable to FTP because of its underlying
security. The SSH File Transfer Protocol is a network protocol that provides file access,
file transfer, and file management functionalities over SSH. By using SFTP one can easily
change, browse and edit files on their Raspberry Pi. SFTP is easierto setup that FTP as
Raspbian has SSH enabled by default.

1.2.6 SCP (Secure Copy)

Secure Copy or SCP is a means of securely transferring file between a local host and a
remote host or two remote hosts. Its utilizes SSH, SCP is a command for sending files
over SSH. This means someone can copy files between computers, such as Raspberry Pi
to desktop or laptop, or vice-versa. SCP uses the same mechanism as SSH for
authentication which ensures the authenticity and confidentiality of the data in transit. A
client can upload files to a server and additionally add their basic attributes like
permissions or timestamps. A client can request to download files from the server as well.

1.2.7 RSYNC

There is a tool called RSYN to synchronize folders between computers. Someone might
want to transfer some files from their desktop computer or laptop to their Pi, and for them
to be kept up to date, or they might want the pictures taken by Pi transferred to their
computer automatically. Using RSYNC over SSH allows someone to transfer files to their
computer automatically. RSYNC is widely-used tool to keep copy of a file in two
computers simultaneously. It is commonly used in Unix-like operating system and
functions both as a file synchronization and file transfer mechanism. It uses a type of
delta algorithm for reducing network usage. Zlib may be used for additional compression
and Stunnel or SSH can be used for data security.

15
SMART MIRROR

1.2.8 Web Server

A web server can be installed on a Raspberry Pi to host a full website locally in a network
or globally on the internet. It can also be used to display some information that needs to
be shared with other machines in the local network. There are various web
serversavailable, with different advantage for usage like Apache and NGINX. This
project uses the Apache web server to access Raspberry Pi over the local network.

1.3 Apache Web Server

The Apache HTTP Server, more often called Apache, is the world’s most used web server
software. It played a key role in the initial growth of World Wide Web (WWW). It
quickly overtook NCSA HTTP as the dominant HTTP server. It is the most popular
webserver software since April 1996. In 2009 Apache became the first web server
software to serve more than a hundred million websites. Apache can be installed on the
Raspberry Pi to allow it to serve web pages. On its own, Apache can serve HTML files
over HTTP, and with additional modules can serve dynamic web pages using scripting
languages such as PHP.

1.4 NODE JS

Node.js is an open-source, cross-platform JavaScript runtime environment for developing


a diverse variety of server tools and applications. Although Node.js is not a JavaScript
framework, many of its basic modules are written in JavaScript, and developers can write
new modules in JavaScript. The runtime environment interprets JavaScript using
Google’s V8 JavaScript engine. Node.js has an event-driven architecture capable
ofasynchronous I/O. These design choices aim to optimize throughput and scalability in
Web applications with many input/output operations, as well as for real-time Web
applications (e.g., real- time communication programs and browser games). The Node.js
distributed development project, governed by the Node.js Foundation, is facilitated by the
Linux Foundation’s Collaborative Projects program Corporate users of Node.js software
include Go Daddy, Groupon, IBM, LinkedIn ,Microsoft, Netflix, PayPal, Rakuten, SAP,
Voxer, Walmart, Yahoo! and Cisco Systems.

16
SMART MIRROR

1.5 Electron

Electron (formerly known as Atom Shell) is an open-source framework developed by


GitHub. It allows for the development of desktop GUI applications using the Node.js
runtime and the Chromium web browser, originally used for the development of backend
web applications. Electron is the main framework behind two notable open-source source
code editors: GitHub's Atom, and Microsoft's Visual Studio Code. A basic Electron app
consists of three files: package.json (metadata), main.js (code) and index.html (graphical
user interface). The framework is provided by the Electron executable file (electron.exe in
Windows, electron.app on macOS and electron on Linux). Developers wishing to add
branding and custom icon can rename and/or edit the Electron executable file.

1.6 Python

Python is widely used high-level, interpreted, dynamic programming language. Its design
philosophy emphasizes code readability and its syntax structure allows programmers to
express concepts in fewer lines of code that would be possible in languages like C++ or
Java. The language contains construct to enable clear programs on both small and large
scale. Python is a wonderful and powerful programming language that’s easy to use (easy
to read and write) and Raspberry Pi lets it connect a project to the real world. Python
syntax is very clean, with an emphasis on readability and uses standard English
keywords.

1.7 HTML

Hyper Text Markup Language, usually referred to as HTML, is the most common markup
tool to make any website. HTML defines the contents of a website. Along with CSS and
JavaScript, HTML is a cornerstone technology used to create web pages as well as to
create web interfaces for mobile and web applications. Web browsers can read HTML
files and render them into visible or audible web pages. HTML describes the structure ofa
website semantically and, before the advent of CSS, included cues for the representation
or appearance of the document or web page which makes it a markup language
ratherthan a programming language.

17
SMART MIRROR

1.8 CSS

CSS is a style sheet language for describing the presentation of a document written in a
markup language. Although most often used to set the visual style of web pages and user
interfaces written in HTML or XHTML, the language is perfectly capable of being
applied to any XML document, including plain XML, SVG and XUL, and is applicable
torendering in speech, or on other media. Along with HTML and JavaScript, CSS is a
cornerstone technology used by most website to create visually engaging web pages, user
interfaces for web applications, and user interfaces for many mobile applications. CSS is
capable of maintaining style of multiple web pages at once.

1.9 Java Script

JavaScript extends HTML by defining how a webpage should behave when particular
HTML events occur. It is the programming language of the web. It is also a high- level
and object-oriented language. It is a high-level, untyped, and interpreted programming
language. It has been standardized in the ECMAScript language specification. Alongside
HTML and CSS, it is one of the tree core technologies of the World Wide Web content
production. The majority of websites enjoy it and it is supported by all modern web
browsers without plug-ins. JavaScript has a API for working with text, arrays, dates and
regular expressions, but does not include any I/O, such as networking, storage or graphics
facilities. It relies for these upon the host environment upon which it is embedded.

1.10 PHP

PHP is a very popular and widely-used sever scripting language. It is powerful tool for
making dynamic websites. It is free and can be used as general purpose programming
language as well. PHP originally stood for Personal Home Page, but now stands for the
recursive backronym PHP: Hypertext Preprocessor. PHP code may be embeddedinto
HTML code, or it can be used in combination with various web template systems, web
content management system and web frameworks. PHP code is usually processed by a
PHP interpreter implemented as a module in the web server or as a Common Gateway
Interface (CGI) executable. The web server combines the results of the interpreted and
executed PHP code, which may be any type of data, including images, with the generated
web pages. PHP code may also be executed with a command-line interface (CLI) and can
be used to implement standalone graphical applications .

18
SMART MIRROR

1.11 Existing System

The Smart Mirror by Evan Cohen and Michel Mach inspired us to make this project.
Evan Cohen Smart Mirror offers mainly software part and offers a wide range of voice
commands to interact with the mirror. The voice command support weather, time anddate
information, adding reminders, showing pictures and even controlling the light in
thehouse.

How Smart Mirror Works

1. Monitor

The size of the mirror is really dictated by the kind of monitor we get. We wanted to get
something large as possible but also with a removable arm so it could fit inside of a case.
Another important aspect is making sure we get a monitor with the inputs towards the
center of the monitor rather than the sides.We was cautious to get a monitor with it’s
inputs on the bottom or side because it would be hard to make the frame to fit and havethe
raspberry pi’s HDMI cord also fit. We use the Samsung B1930 18.5 inch LCD monitor.

2. One way mirror

This is probably the most important part of the hardware because it’s responsible for
creating the futuristic effect and is the biggest part of the smart mirror. Wikipedia
provides the following definition.

A one-way mirror, sometimes called two-way mirror, is a mirror that is partially


reflective and partially transparent. When one side of the mirror is brightly lit and the
other is dark, it allows viewing from the darkened side but not vice versa (Loy, 1999).

This was the most difficult component to find because of these technical requirements,
but we make a one-way mirror customly. The one that was we made unfortunately not
very reflective so sometimes we can see the interior of the device. This is not ideal but in
the right conditions it works well and it can always be replaced with better quality glass
inthe future

19
SMART MIRROR

Figure 4: Schematic diagram of light reflection on a one-way mirror

In the case of this project this essentially means that the dark or black parts of the
screen will be seen as a reflection and the light parts will be seen normally. So if thereis
white text over a black background the white text will be seen as an overlay with the
user reflected in the background.

This was the most difficult component to find because of these technical requirements,
but we made a custom made one way mirror. The one that was made unfortunately not
very reflective so sometimes we can see the interior of the device. This is not ideal but
in the right conditions it works well and it can always be replaced with better quality
glass in the future.

3. Wood frame
Wood Frame is another important part of the Smart Mirror. How the whole project look
like is depend on the wood frame. We make it reusable, enough scope for adding other
sensor for future improvement of this project. How we design the wood frame given in
below figure

20
SMART MIRROR

Figure 5: Wood Frame

21
SMART MIRROR

CHAPTER 3

SYSTEM DEVELOPMENT

22
SMART MIRROR

3.1 Hardware Design


For making smart mirror we make two level design pattern .First we design initial design
of the smart mirror. Then we design the first level design pattern of the smart mirror.

3.1.1 Level 0 Design of Smart Mirror


At first we design the level 0 design which is the initial design of the smart mirror. This is
the initial idea of making the smart mirror then we expand it in level 1 design.

Figure 6: Level 0 Design of Smart Mirror

3.1.2 Level 1 Design of Smart Mirror


After completing level zero level we design the first level design pattern. In first level
design pattern we design whole idea and working procedure of the smart mirror.

Figure 7: Level 1 Design of Smart Mirror

23
SMART MIRROR

3.1.3 Devices Interfacing with Computer


Based on the diagram, a minimum of two USB ports are required in order to get the Smart
Mirror usable for a user without a keyboard and mouse. The mirror’s display is connected
through HDMI to prevent having to buy an HDMI to VGA/DVI adapter. A high
displayresolution is also required, meaning graphics processing capabilities are of high
importance.

Figure 8: Diagram of Devices Interfacing with Embedded Computer

24
SMART MIRROR

3.1.4 Making Wood Frame

We take the measurements for the frame and start cutting. We used both screws and glue
to make sure it was sturdy enough, the final product weighs quite a lot. Put some air holes
at the top and a hole for the cord at the bottom.

We also cut the "frame" in the front in an angle, just because we like it. Then we put the
front on the frame and we are almost done.

We make 4 small pieces of wood that we later can put behind the screen, to make sure it
doesn't fall backwards.

Figure 9: Making Wood Frame

25
SMART MIRROR

3.1.5 Assembly

We take the frame and put the mirror in the front. Place the screen behind it and plug in
all the things we need. Start the Raspberry and make sure everything works. Then we turn
it off and put the final 4 pieces behind the screen to make it stay up. Then we just plug
everything in there and maybe use some cable ties to make it look a little nice.

Figure 10: Assembly (One way mirror)

Figure 11: Assembly (Monitor)

26
SMART MIRROR

3.2 Software

Design Program

Flow
Our Smart mirror started when the user switched on the raspberry pi. Then device parsed
command and translate the API call. In the next step API processed Query and return data
to the raspberry pi. After that Raspberry pi received those data and processed into the
display widget.

Figure 12: Program Flow

27
SMART MIRROR

CHAPTER 4

PROJECT SIMULATION

28
SMART MIRROR

4.1 Hardware
The hardware looks very good but the glass could be more reflective. In some conditions
we can see a bit of the interior of the device

Figure 13: Normal view of Smart Mirror

4.2 Software
The webpage consists of clock in top left position, calendar in top left position, compliments
lower third position, current weather of Dhaka in top right position, weather forecast of Dhaka in
top right position and newsfeed of New York Times in bottom bar.

29
SMART MIRROR

Figure 14: View of Smart Mirror (When the room is dark)

Figure 15: View of Smart Mirror (When the room is dark)

30
SMART MIRROR

CHAPTER 5

CHALLENGES AND FUTURE IMPROVEMENTS

31
SMART MIRROR

5.1 Challenges Faced


IOT provides a great platform for enablement of social development in varied societies
across the world and with the proliferation of Internet across the various sections of the
society in developing countries coupled with lowering costs of microprocessors
andsensors will make IOT devices accessible to low income households.

But there are lot of shortcomings related to enablement of high speed internet and basic
technology services architecture for commercial and business usage in developing
countries. Until and unless, a basic infrastructure is in place, devices would be of no value
to the users.

While IOT brings about new opportunities; at the same time, it adds multiple layers of
complexity. Such a new environment of devices will add a new dimension for policy
makers in emerging economies who will need to chalk out a new blueprint for IOT related
regulatory concerns.

In an ideal environment, information exchange should take place between all the
interconnected IOT devices. But the actual scenario is inherently more complex and
depends on various levels of communication protocols stacks between such devices.

Making smart mirrors was not so easy for us. Found lot of difficulty in searching of
hardware. One way mirror is not available in our country. Searched one way mirror
everywhere in the city but we failed to manage the one way mirror. Made lot of research
about one way mirror. Finally we got the solution for making a normal mirror into the one
way mirror. Making the wood frame was another challenge for us. Collecting information
about this kind of project was not easy because there were not so much information about
this kind of project.

32
SMART MIRROR

5.2 Future Improvements


Time and other resources is always factor in a better product. There is always room for
improvement and this project has a lot of areas that needs work. Voice control system
must be added to the smart mirror so that anyone can update their calendar, schedule, and
so much more. Our future plan is adding facial recognition so that after setting up a
profile and sending a picture of themselves to the Cognitive Services database, everyone
would be able to step in front of the mirror and get a personalized display showing the
information based on our preferences. Our mirror is not hundred percent reflective we
will try to make this more reflective. We will add new feature like Email module,
Facebook module another module according to the demand of Smart Mirror User.

33
SMART MIRROR

CHAPTER 6

APPLICATIONS AND ADVANTAGES

34
SMART MIRROR

APPLICATIONS

 Home Automation
 Shopping Malls
 Beauty Stores
 Barber Shops

Figure 16: (Hair Color Simulation)

35
SMART MIRROR

ADVANTAGES

 User Friendly
 Voice Input
 Easy to communicate
 Health and fitness tracking
 Upgradable

36
SMART MIRROR

CONCLUSION

To summarize, this application is a new technology for living a smart life. This is a new kind of
smart device that people don’t see every day and it looks very spectacular. To improve its
functionality, the Smart Mirror may be connected to household appliances, mobile devices, and
other gadgets. With the help of this smart mirror, users may better arrange their activities. Clearly,
there are many options for electronic integration in the home. However, a mirror is one of the best
places to start.

37
SMART MIRROR

REFERENCES

[1]. International Journal of Engineering Research & Technology (IJERT) ISSN: 2394-2320
Vol 5, Issue 3, March 2018. Vinmay Patil, Mayuresh Hirnaik, Vaibhav Borole B.E.students in IT.
[2]. M. Z. Poh, D. McDuff, R. Picard, “A medical mirror for non-contact health monitring,”
In ACM SIGGRAPH 2011 Emerging Technologies SIGGRAPH ’11, New York, NY, USA, ACM
(2011)
[3]. GitHub/MichMich/MagicMirror (2016) Retrieved 20 April 2016.
https://github.com/MichMich/MagicMirror GitHub/HannahMitt/HomeMirror (2016) Retrieved
20 April 2016.
[4]. N. Carlini, P. Mishra, T. Vaidya, Y. Zhang, M. Sherr, C. Shields, D. Wagner,
and W. Zhou. 2016. Hidden voice commands. In USENIX Security, Austin, TX, 2016.

38

You might also like