\documentclass[11pt,twoside]{article}\makeatletter

\IfFileExists{xcolor.sty}%
  {\RequirePackage{xcolor}}%
  {\RequirePackage{color}}
\usepackage{colortbl}
\usepackage{wrapfig}
\usepackage{ifxetex}
\ifxetex
  \usepackage{fontspec}
  \usepackage{xunicode}
  \catcode`⃥=\active \def⃥{\textbackslash}
  \catcode`❴=\active \def❴{\{}
  \catcode`❵=\active \def❵{\}}
  \def\textJapanese{\fontspec{Noto Sans CJK JP}}
  \def\textChinese{\fontspec{Noto Sans CJK SC}}
  \def\textKorean{\fontspec{Noto Sans CJK KR}}
  \setmonofont{DejaVu Sans Mono}
  
\else
  \IfFileExists{utf8x.def}%
   {\usepackage[utf8x]{inputenc}
      \PrerenderUnicode{–}
    }%
   {\usepackage[utf8]{inputenc}}
  \usepackage[english]{babel}
  \usepackage[T1]{fontenc}
  \usepackage{float}
  \usepackage[]{ucs}
  \uc@dclc{8421}{default}{\textbackslash }
  \uc@dclc{10100}{default}{\{}
  \uc@dclc{10101}{default}{\}}
  \uc@dclc{8491}{default}{\AA{}}
  \uc@dclc{8239}{default}{\,}
  \uc@dclc{20154}{default}{ }
  \uc@dclc{10148}{default}{>}
  \def\textschwa{\rotatebox{-90}{e}}
  \def\textJapanese{}
  \def\textChinese{}
  \IfFileExists{tipa.sty}{\usepackage{tipa}}{}
\fi
\def\exampleFont{\ttfamily\small}
\DeclareTextSymbol{\textpi}{OML}{25}
\usepackage{relsize}
\RequirePackage{array}
\def\@testpach{\@chclass
 \ifnum \@lastchclass=6 \@ne \@chnum \@ne \else
  \ifnum \@lastchclass=7 5 \else
   \ifnum \@lastchclass=8 \tw@ \else
    \ifnum \@lastchclass=9 \thr@@
   \else \z@
   \ifnum \@lastchclass = 10 \else
   \edef\@nextchar{\expandafter\string\@nextchar}%
   \@chnum
   \if \@nextchar c\z@ \else
    \if \@nextchar l\@ne \else
     \if \@nextchar r\tw@ \else
   \z@ \@chclass
   \if\@nextchar |\@ne \else
    \if \@nextchar !6 \else
     \if \@nextchar @7 \else
      \if \@nextchar (8 \else
       \if \@nextchar )9 \else
  10
  \@chnum
  \if \@nextchar m\thr@@\else
   \if \@nextchar p4 \else
    \if \@nextchar b5 \else
   \z@ \@chclass \z@ \@preamerr \z@ \fi \fi \fi \fi
   \fi \fi  \fi  \fi  \fi  \fi  \fi \fi \fi \fi \fi \fi}
\gdef\arraybackslash{\let\\=\@arraycr}
\def\@textsubscript#1{{\m@th\ensuremath{_{\mbox{\fontsize\sf@size\z@#1}}}}}
\def\Panel#1#2#3#4{\multicolumn{#3}{){\columncolor{#2}}#4}{#1}}
\def\abbr{}
\def\corr{}
\def\expan{}
\def\gap{}
\def\orig{}
\def\reg{}
\def\ref{}
\def\sic{}
\def\persName{}\def\name{}
\def\placeName{}
\def\orgName{}
\def\textcal#1{{\fontspec{Lucida Calligraphy}#1}}
\def\textgothic#1{{\fontspec{Lucida Blackletter}#1}}
\def\textlarge#1{{\large #1}}
\def\textoverbar#1{\ensuremath{\overline{#1}}}
\def\textquoted#1{‘#1’}
\def\textsmall#1{{\small #1}}
\def\textsubscript#1{\@textsubscript{\selectfont#1}}
\def\textxi{\ensuremath{\xi}}
\def\titlem{\itshape}
\newenvironment{biblfree}{}{\ifvmode\par\fi }
\newenvironment{bibl}{}{}
\newenvironment{byline}{\vskip6pt\itshape\fontsize{16pt}{18pt}\selectfont}{\par }
\newenvironment{citbibl}{}{\ifvmode\par\fi }
\newenvironment{docAuthor}{\ifvmode\vskip4pt\fontsize{16pt}{18pt}\selectfont\fi\itshape}{\ifvmode\par\fi }
\newenvironment{docDate}{}{\ifvmode\par\fi }
\newenvironment{docImprint}{\vskip 6pt}{\ifvmode\par\fi }
\newenvironment{docTitle}{\vskip6pt\bfseries\fontsize{22pt}{25pt}\selectfont}{\par }
\newenvironment{msHead}{\vskip 6pt}{\par}
\newenvironment{msItem}{\vskip 6pt}{\par}
\newenvironment{rubric}{}{}
\newenvironment{titlePart}{}{\par }

\newcolumntype{L}[1]{){\raggedright\arraybackslash}p{#1}}
\newcolumntype{C}[1]{){\centering\arraybackslash}p{#1}}
\newcolumntype{R}[1]{){\raggedleft\arraybackslash}p{#1}}
\newcolumntype{P}[1]{){\arraybackslash}p{#1}}
\newcolumntype{B}[1]{){\arraybackslash}b{#1}}
\newcolumntype{M}[1]{){\arraybackslash}m{#1}}
\definecolor{label}{gray}{0.75}
\def\unusedattribute#1{\sout{\textcolor{label}{#1}}}
\DeclareRobustCommand*{\xref}{\hyper@normalise\xref@}
\def\xref@#1#2{\hyper@linkurl{#2}{#1}}
\begingroup
\catcode`\_=\active
\gdef_#1{\ensuremath{\sb{\mathrm{#1}}}}
\endgroup
\mathcode`\_=\string"8000
\catcode`\_=12\relax

\usepackage[a4paper,twoside,lmargin=1in,rmargin=1in,tmargin=1in,bmargin=1in,marginparwidth=0.75in]{geometry}
\usepackage{framed}

\definecolor{shadecolor}{gray}{0.95}
\usepackage{longtable}
\usepackage[normalem]{ulem}
\usepackage{fancyvrb}
\usepackage{fancyhdr}
\usepackage{graphicx}
\usepackage{marginnote}

\renewcommand{\@cite}[1]{#1}


\renewcommand*{\marginfont}{\itshape\footnotesize}

\def\Gin@extensions{.pdf,.png,.jpg,.mps,.tif}

  \pagestyle{fancy}

\usepackage[pdftitle={Smart Lock using Image Recognition},
 pdfauthor={}]{hyperref}
\hyperbaseurl{}

	 \paperwidth210mm
	 \paperheight297mm
              
\def\@pnumwidth{1.55em}
\def\@tocrmarg {2.55em}
\def\@dotsep{4.5}
\setcounter{tocdepth}{3}
\clubpenalty=8000
\emergencystretch 3em
\hbadness=4000
\hyphenpenalty=400
\pretolerance=750
\tolerance=2000
\vbadness=4000
\widowpenalty=10000

\renewcommand\section{\@startsection {section}{1}{\z@}%
     {-1.75ex \@plus -0.5ex \@minus -.2ex}%
     {0.5ex \@plus .2ex}%
     {\reset@font\Large\bfseries}}
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
     {-1.75ex\@plus -0.5ex \@minus- .2ex}%
     {0.5ex \@plus .2ex}%
     {\reset@font\Large}}
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
     {-1.5ex\@plus -0.35ex \@minus -.2ex}%
     {0.5ex \@plus .2ex}%
     {\reset@font\large}}
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
     {-1ex \@plus-0.35ex \@minus -0.2ex}%
     {0.5ex \@plus .2ex}%
     {\reset@font\normalsize}}
\renewcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}%
     {1.5ex \@plus1ex \@minus .2ex}%
     {-1em}%
     {\reset@font\normalsize\bfseries}}


\def\l@section#1#2{\addpenalty{\@secpenalty} \addvspace{1.0em plus 1pt}
 \@tempdima 1.5em \begingroup
 \parindent \z@ \rightskip \@pnumwidth 
 \parfillskip -\@pnumwidth 
 \bfseries \leavevmode #1\hfil \hbox to\@pnumwidth{\hss #2}\par
 \endgroup}
\def\l@subsection{\@dottedtocline{2}{1.5em}{2.3em}}
\def\l@subsubsection{\@dottedtocline{3}{3.8em}{3.2em}}
\def\l@paragraph{\@dottedtocline{4}{7.0em}{4.1em}}
\def\l@subparagraph{\@dottedtocline{5}{10em}{5em}}
\@ifundefined{c@section}{\newcounter{section}}{}
\@ifundefined{c@chapter}{\newcounter{chapter}}{}
\newif\if@mainmatter 
\@mainmattertrue
\def\chaptername{Chapter}
\def\frontmatter{%
  \pagenumbering{roman}
  \def\thechapter{\@roman\c@chapter}
  \def\theHchapter{\roman{chapter}}
  \def\thesection{\@roman\c@section}
  \def\theHsection{\roman{section}}
  \def\@chapapp{}%
}
\def\mainmatter{%
  \cleardoublepage
  \def\thechapter{\@arabic\c@chapter}
  \setcounter{chapter}{0}
  \setcounter{section}{0}
  \pagenumbering{arabic}
  \setcounter{secnumdepth}{6}
  \def\@chapapp{\chaptername}%
  \def\theHchapter{\arabic{chapter}}
  \def\thesection{\@arabic\c@section}
  \def\theHsection{\arabic{section}}
}
\def\backmatter{%
  \cleardoublepage
  \setcounter{chapter}{0}
  \setcounter{section}{0}
  \setcounter{secnumdepth}{2}
  \def\@chapapp{\appendixname}%
  \def\thechapter{\@Alph\c@chapter}
  \def\theHchapter{\Alph{chapter}}
  \appendix
}
\newenvironment{bibitemlist}[1]{%
   \list{\@biblabel{\@arabic\c@enumiv}}%
       {\settowidth\labelwidth{\@biblabel{#1}}%
        \leftmargin\labelwidth
        \advance\leftmargin\labelsep
        \@openbib@code
        \usecounter{enumiv}%
        \let\p@enumiv\@empty
        \renewcommand\theenumiv{\@arabic\c@enumiv}%
	}%
  \sloppy
  \clubpenalty4000
  \@clubpenalty \clubpenalty
  \widowpenalty4000%
  \sfcode`\.\@m}%
  {\def\@noitemerr
    {\@latex@warning{Empty `bibitemlist' environment}}%
    \endlist}

\def\tableofcontents{\section*{\contentsname}\@starttoc{toc}}
\parskip0pt
\parindent1em
\def\Panel#1#2#3#4{\multicolumn{#3}{){\columncolor{#2}}#4}{#1}}
\newenvironment{reflist}{%
  \begin{raggedright}\begin{list}{}
  {%
   \setlength{\topsep}{0pt}%
   \setlength{\rightmargin}{0.25in}%
   \setlength{\itemsep}{0pt}%
   \setlength{\itemindent}{0pt}%
   \setlength{\parskip}{0pt}%
   \setlength{\parsep}{2pt}%
   \def\makelabel##1{\itshape ##1}}%
  }
  {\end{list}\end{raggedright}}
\newenvironment{sansreflist}{%
  \begin{raggedright}\begin{list}{}
  {%
   \setlength{\topsep}{0pt}%
   \setlength{\rightmargin}{0.25in}%
   \setlength{\itemindent}{0pt}%
   \setlength{\parskip}{0pt}%
   \setlength{\itemsep}{0pt}%
   \setlength{\parsep}{2pt}%
   \def\makelabel##1{\upshape ##1}}%
  }
  {\end{list}\end{raggedright}}
\newenvironment{specHead}[2]%
 {\vspace{20pt}\hrule\vspace{10pt}%
  \phantomsection\label{#1}\markright{#2}%

  \pdfbookmark[2]{#2}{#1}%
  \hspace{-0.75in}{\bfseries\fontsize{16pt}{18pt}\selectfont#2}%
  }{}
      \def\TheFullDate{2020-01-15 (revised: 15 January 2020)}
\def\TheID{10.34257/GJCSTGVOL20IS6PG29\makeatother }
\def\TheDate{2020-01-15}
\title{Smart Lock using Image Recognition}
\author{}\makeatletter 
\makeatletter
\newcommand*{\cleartoleftpage}{%
  \clearpage
    \if@twoside
    \ifodd\c@page
      \hbox{}\newpage
      \if@twocolumn
        \hbox{}\newpage
      \fi
    \fi
  \fi
}
\makeatother
\makeatletter
\thispagestyle{empty}
\markright{\@title}\markboth{\@title}{\@author}
\renewcommand\small{\@setfontsize\small{9pt}{11pt}\abovedisplayskip 8.5\p@ plus3\p@ minus4\p@
\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ plus2\p@
\belowdisplayshortskip 4\p@ plus2\p@ minus2\p@
\def\@listi{\leftmargin\leftmargini
               \topsep 2\p@ plus1\p@ minus1\p@
               \parsep 2\p@ plus\p@ minus\p@
               \itemsep 1pt}
}
\makeatother
\fvset{frame=single,numberblanklines=false,xleftmargin=5mm,xrightmargin=5mm}
\fancyhf{} 
\setlength{\headheight}{14pt}
\fancyhead[LE]{\bfseries\leftmark} 
\fancyhead[RO]{\bfseries\rightmark} 
\fancyfoot[RO]{}
\fancyfoot[CO]{\thepage}
\fancyfoot[LO]{\TheID}
\fancyfoot[LE]{}
\fancyfoot[CE]{\thepage}
\fancyfoot[RE]{\TheID}
\hypersetup{citebordercolor=0.75 0.75 0.75,linkbordercolor=0.75 0.75 0.75,urlbordercolor=0.75 0.75 0.75,bookmarksnumbered=true}
\fancypagestyle{plain}{\fancyhead{}\renewcommand{\headrulewidth}{0pt}}

\date{}
\usepackage{authblk}

\providecommand{\keywords}[1]
{
\footnotesize
  \textbf{\textit{Index terms---}} #1
}

\usepackage{graphicx,xcolor}
\definecolor{GJBlue}{HTML}{273B81}
\definecolor{GJLightBlue}{HTML}{0A9DD9}
\definecolor{GJMediumGrey}{HTML}{6D6E70}
\definecolor{GJLightGrey}{HTML}{929497} 

\renewenvironment{abstract}{%
   \setlength{\parindent}{0pt}\raggedright
   \textcolor{GJMediumGrey}{\rule{\textwidth}{2pt}}
   \vskip16pt
   \textcolor{GJBlue}{\large\bfseries\abstractname\space}
}{%   
   \vskip8pt
   \textcolor{GJMediumGrey}{\rule{\textwidth}{2pt}}
   \vskip16pt
}

\usepackage[absolute,overlay]{textpos}

\makeatother 
      \usepackage{lineno}
      \linenumbers
      
\begin{document}

             \author[1]{Afnanul  Hassan}

             \author[2]{Zaria  Fahamida}

             \author[3]{Proloy  Sen}

             \author[4]{Dr. Syed Akhter  Hossain}

             \affil[1]{  Daffodil International University}

\renewcommand\Authands{ and }

\date{\small \em Received: 6 December 2019 Accepted: 1 January 2020 Published: 15 January 2020}

\maketitle


\begin{abstract}
        


In the 21st century, for a digital lifestyle in a smart city, security is one of the core ingredients to ensure digital continuity. The existing smart security technologies use a smartphone, card, and fingerprint that need additional devices to carry or can spread out infectious diseases. Now it is high time to think about an additional device free and more timeconsuming technique. So, an intelligent system is proposed in this paper to secure our doors with face authentication. The human face is a unique and easy identifying feature of a human. The registered user?s image is saved in the device as a dataset to train the lock. The system recognizes the registered faces very fast and controls the hardware part to be unlocked. The system is capable of detecting and recognizing human faces from a real-time video. It is usable in the door lock, car lock, hutch, and many more security purposes.

\end{abstract}


\keywords{face detection, image recognition, open CV, smart lock, raspberry Pi.}

\begin{textblock*}{18cm}(1cm,1cm) % {block width} (coords) 
\textcolor{GJBlue}{\LARGE Global Journals \LaTeX\ JournalKaleidoscope\texttrademark}
\end{textblock*}

\begin{textblock*}{18cm}(1.4cm,1.5cm) % {block width} (coords) 
\textcolor{GJBlue}{\footnotesize \\ Artificial Intelligence formulated this projection for compatibility purposes from the original article published at Global Journals. However, this technology is currently in beta. \emph{Therefore, kindly ignore odd layouts, missed formulae, text, tables, or figures.}}
\end{textblock*}


\begin{textblock*}{10cm}(1.05cm,3cm)
{{\textit{CrossRef DOI of original article:}} \underline{10.34257/GJCSTGVOL20IS6PG29}}
\end{textblock*}\let\tabcellsep& 	 	 		 
\section[{Introduction}]{Introduction}\par
ay after day, we are moving towards modernity. But the percentage of home robbed and things stolen is 70.5\% \hyperref[b0]{[1]} of the total crime in the last ten years, and it is escalating, which is a barrier to our smart lifestyle. The existing smart technologies of door security needs memorizing a password or carrying additional devices like mobile phone, cards. Being stolen or lost the additional devices or forgetting the password can hamper the existing smart security systems. Changing the hand of the additional device or getting the password leaked can allow any stranger to pass through the lock. Besides that, the fingerprint system can spread out infectious diseases. Many authors proposed various kinds of digital door locks, password-based locks, etc. \hyperref[b1]{[2]}. But the solution proposed in this paper is to recognize the valid user's face to unlock the lock because faces are one of the most important visual stimuli \hyperref[b2]{[3]}. Also, it is a unique feature of every man. From a real-time video, the image of a human face is detected and recognized using the LBPH (Local Binary Pattern Histogram) algorithm. LBPH algorithm has become a standard and mostly used image recognition and detecting technique. Compared with other algorithms LBPH algorithm cannot only recognize the frontal face but also recognize the side face. This algorithm is widely used for image recognition. So, the face authentication technique for security purposes can be a timely and more intelligent idea.\par
The paper is organized as follows. Section II summarizes the previous works done by many authors. Section III describes the complete architecture of the proposed system with details of the used algorithm. Section IV contains the conclusion. 
\section[{II.}]{II.} 
\section[{Related Works}]{Related Works}\par
Onoyan A.O. et al. \hyperref[b3]{[4]} has developed a biometric-based door lock system by using ATMEGA 328 Arduino microcontroller, fingerprint scanner R305. When the fingerprint be matched with the registered fingerprints, a signal is sent to incite the door lock process, and the door stays open for 5 seconds. Adarsh V Patil et al. \hyperref[b4]{[5]} has manifested an android based smart door locking system. Arduino Uno, android, smartphones have been used to complete this lock security system. A pre-determined password concept is used. Anuradha R.S et al. \hyperref[b5]{[6]} has proposed an optimized locking and unlocking a process by using a wireless system. The proposed idea had been implemented by using Arduino Uno, DC motor, Wi-Fi. This system aimed to allow a user to lock and unlock a door within the Wi-Fi range from inside or outside a house. Agbo David O et al. \hyperref[b6]{[7]} has implemented a door locking system using an android app and the Bluetooth module. The app could be connected with the Bluetooth module HC-05 to show the current activity about the door is open or close. If the password is correct, the door will be opened. Otherwise, it will be kept closed. Janaki Venukumar et al. \hyperref[b7]{[8]} stated that security is the most vital issue nowadays for us when we are out of our households. The proposed project shows a keyless system for operating lock using a pre-defined password. To get entered the must memorize the password. Lia Kamelia et al. \hyperref[b8]{[9]} proposed that present days are the era of living in smart technology. So, the term "smart home" gives broad thinking to us of living in new technologies. To make the smart home just using the device of our pocket, the mobile phone where Bluetooth will be enough to communicate with devices. Arvasu Chikara et al. \hyperref[b9]{[10]} proposed a solution for the bank system to secure our money because a bank deserves an extra level of security. The solution is a combination of fingerprint authentication and face authentication. The image and fingerprint data of the authentic persons are saved by the bank authority in the database. The authentic person must match both face and fingerprint to have access to the money of the bank.\par
The idea of a smart home lock with automated technologies is practiced throughout this decade. But most of them are developed to work with an android device. Some use Bluetooth and some Wi-Fi. Both of these need an additional device to use the lock. Fingerprint and pre-defined password systems reduced the necessity of extra device but needed user interaction. Moreover, the fingerprint authentication system can spread infectious diseases. Besides all of these systems, our proposed system will work without an additional device and user interaction. The system will just see the user and be unlocked after authentication. 
\section[{III.}]{III.} 
\section[{System Architecture}]{System Architecture}\par
The proposed system has an aim to protect premises and belongings smartly and without the necessity of an additional device. It just recognizes the authorized user's faces to unlock the lock. This process can make life easier. In the proposed system, the lock needs to detect and recognize the human face. So, the proposed lock consists of Raspberry Pi 3 which is a lowcost mini-computer in credit card size., which comes with Bluetooth 4.1 and a camera. As shown in Fig. \hyperref[fig_0]{1} the whole process has two main parts, such as (a) Registration Process and (b) Unlocking process. At the registration process, the 1st user starts from inputting information like name, and then the lock detects and saves 20 images of the user's face to train. On the other hand, any new user must be verified by inputting any previous user's information like name. After training, the lock will be ready to be unlocked, and at the unlocking process, the lock keeps capturing video. If any registered user's face is recognized, it will stay open for 7 seconds and then becomes ready to be locked again. The complete system architecture can be described in 5 main steps. 
\section[{a) Receiving User Data via Bluetooth}]{a) Receiving User Data via Bluetooth}\par
At the very beginning, the lock needs registered users with face's images to know who is the authentic person. The user can use a mobile application that provides an entirely user-friendly interface to input user data. This is the one and the only use of any additional device. The lock, which is made with Raspberry Pi 3, receives the user information via Bluetooth 4.1 from the mobile application. The 1st user can be registered without hassle. But in the case of multiple users, other users must input any previous user's information to be registered. 
\section[{b) Face Detection and Dataset Creation}]{b) Face Detection and Dataset Creation}\par
While the data of new users be received, the lock itself starts capturing real-time video to detect any face. From the video, if any human face is found, the system saves the image's ROI (Region of Interest). Thus 20 faces will be saved along with the name of the new user.\par
While detecting face, the system converts each frame of video into grayscale to make the task easier. Using the Numpy library, the grayscale image can be converted into an n-dimensional array.\par
In this case, the OpenCV (Open Source Computer Vision) python library works with the Haarcascade classifier to classify human frontal face, and except ROI (Region of Interest) other numbers of the n-dimensional array will be changed into "0". Thus, the ROI of the face will be classified, and only the face is captured and saved in the lock's dataset. The dataset is created uniquely for an individual lock. So, authentic faces for a deferent lock is different. 
\section[{c) Training Dataset}]{c) Training Dataset}\par
The Face detection procedure cannot be completed without training the system according to the dataset. The dataset is combined with the user's name, ID, and image of the user. The name and ID are received from the Android app, and the camera itself will capture the pictures of faces after detection. Combining all of these a file with .yml extension is created to work. When the file is created, the camera becomes ready to recognize the authentic face. The training procedure is done by following the LBPH algorithm.\par
The LBPH Face Recognizer is a mostly used face detection algorithm \hyperref[b10]{[11]}. It works with the Numpy array, which is an n-dimensional Array created from the grayscale image of the input image. Now the algorithm is going to be discussed.\par
The n-dimensional array mainly contains the density of white in every pixel from the range of 0 to 255. As shown in the following Fig.  {\ref 2} value of every pixel be compared with neighboring pixels in radius 'r'. Here for the pixel threshold, 90 is compared with the neighboring pixel in radius, r = 1. Lower and equal values than the threshold values are changed into '0' otherwise changed into '1'. The binary digits from neighboring pixels can make an 8-bit binary value. Here the 8-bit value is 10001101, which is 141 in decimal. So, the new threshold value is set 141. Thus, the process continues for every pixel. 
\section[{Fig. 2: Applying LBP operation}]{Fig. 2: Applying LBP operation}\par
The LBP Operation can be applied on a large scale just by increasing the value of r. Fig. \hyperref[fig_1]{3} is visualizing the LBP operation on a large scale if it is used with different values of r.  The final histogram signifies the key image topographies of the image. The LBPH algorithm works the same for each face, and everything keeps saved in a .yml file 
\section[{d) Recognizing Face to Unlock the Lock}]{d) Recognizing Face to Unlock the Lock}\par
This step is the most significant because the algorithm is now trained. Each histogram formed mainly signifies each image in the registered users' dataset. Henceforward, the system takes input images from the camera. For the input image of a new person, the same steps are taken to create a histogram that signifies the input image. Now the final histogram (hist2) is compared with the trained images' histogram (hist1). A difference, D is calculated for all images of n number in the dataset according to the following Eq. (  {\ref 1}) \hyperref[b11]{[12]}.\par
The minimum value of D defines the matching with the input image and the specific image. If any matching happens, the person recognizes as an authentic person. If the person is authentic, the lock unlocks. Otherwise, it remains the same without being opened. 
\section[{e) Unlocking the Lock}]{e) Unlocking the Lock}\par
Whenever the lock recognizes any face from the database, the lock outputs a "1" that provides current to a servo motor. The servo motor rotates a disk, and the disc helps to unlock the lock. The mechanism of working is shown in Fig. \hyperref[fig_3]{5}. Where the servo motor can turn the wheel, and the wheel works to lock and unlock the device.  
\section[{Expected result and Discussion}]{Expected result and Discussion}\par
The proposed idea can register new faces and then identify those to open the lock. the dataset is created with registered users' frontal faces to train the machine. The system takes 20 faces of each user. The faces are saved with the user name and unique ID. Fig. \hyperref[fig_4]{6} shows the dataset creates for an individual user.  After training the proposed system waits for the registered faces and if found it opens within a moment otherwise remains closed. The effectiveness or accuracy of the system is calculated using Eq. ( 2) \hyperref[b13]{[13]}.\par
The accuracy is measured by counting the number of correct predictions and the total number of predictions. For this proposed idea the accuracy is calculated 76\%. A quality camera and enough light give a more accurate performance. The process is so fast that it takes about no time to be unlocked if any registered face is found.\par
V. 
\section[{Conclusion}]{Conclusion}\par
The proposed idea of using image recognition in a lock can make lives smarter. The system uses the \par
OpenCV computer vision library to recognize the authentic registered user by image processing. Working with every pixel of an image makes the system more accurate. According to the registered users' dataset it can recognize faces accurately. In low light, it may take a few more seconds to recognize. But enough light gives a perfect service. The experimental result shows that the system can detect and recognize one or more than one face from a real-time video. At least one authentic face is enough to open the lock. The system can be widely used in any security purposes like a door, car, hutch, etc.\begin{figure}[htbp]
\noindent\textbf{1}\includegraphics[]{image-2.png}
\caption{\label{fig_0}Fig. 1 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{3}\includegraphics[]{image-3.png}
\caption{\label{fig_1}Fig. 3 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{4}\includegraphics[]{image-4.png}
\caption{\label{fig_2}Fig. 4 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{5}\includegraphics[]{image-5.png}
\caption{\label{fig_3}Fig. 5 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{6}\includegraphics[]{image-6.png}
\caption{\label{fig_4}Fig. 6 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{7}\includegraphics[]{image-7.png}
\caption{\label{fig_5}Fig. 7 :}\end{figure}
 \begin{figure}[htbp]
\noindent\textbf{}\includegraphics[]{image-8.png}
\caption{\label{fig_6}}\end{figure}
 			\footnote{© 2020 Global Journals} 		 		\backmatter  			  				\begin{bibitemlist}{1}
\bibitem[Leopold and Rhodes ()]{b2}\label{b2} 	 		‘A Comparative view of face perception’.  		 			D A Leopold 		,  		 			G Rhodes 		.  	 	 		\textit{J. Comp. Psychol}  		2010. 124  (3)  p. .  	 
\bibitem[Patil et al.]{b4}\label{b4} 	 		\textit{Android Based Smart Door Locking System},  		 			A Patil 		,  		 			Ch Patgar 		,  		 			S Prakash 		,  		 			S A Kumar 		,  		 			J 		.  		 	 
\bibitem[Venukumar ()]{b7}\label{b7} 	 		‘Arduino Based Door Access Control’.  		 			J Venukumar 		.  	 	 		\textit{Int. J. Res. Advent Technol}  		2016. 4  (8) .  	 
\bibitem[Kamelia et al. ()]{b8}\label{b8} 	 		\textit{Door-Automation System Using Bluetooth-Based Android for Mobile Phone},  		 			L Kamelia 		,  		 			A Noorhassan 		,  		 			M Sanjaya 		,  		 			E Mulyana 		.  		2014. 9.  	 
\bibitem[Ahmed et al. (2018)]{b10}\label{b10} 	 		‘LBPH based improved face recognition at low resolution’.  		 			A Ahmed 		,  		 			J Guo 		,  		 			F Ali 		,  		 			F Deeba 		,  		 			A Ahmed 		.  	 	 		\textit{Int. Conf. Artif. Intell. Big Data, ICAIBD}  		2018. 2018. May. 2018. p. .  	 
\bibitem[Nehete et al. ()]{b1}\label{b1} 	 		\textit{Literature Survey on Door Lock Security Systems},  		 			P R Nehete 		,  		 			J P Chaudhari 		,  		 			S R Pachpande 		,  		 			K P Rane 		.  		2016.  	 
\bibitem[Local Gabor Binary Pattern Histogram Sequence (LGBPHS): A novel non-statistical model for face representation Proc. IEEE Int. Conf. Comput. Vis ()]{b12}\label{b12} 	 		‘Local Gabor Binary Pattern Histogram Sequence (LGBPHS): A novel non-statistical model for face representation’.  	 	 		\textit{Proc. IEEE Int. Conf. Comput. Vis},  				 (IEEE Int. Conf. Comput. Vis)  		2005. I p. .  	 
\bibitem[Odu et al. ()]{b6}\label{b6} 	 		‘Low-Cost Removable (Plug-In) Electronic Password-Based Door Lock’.  		 			A David Odu 		,  		 			M Chinaza Alice 		,  		 			O J Odinya 		.  	 	 		\textit{Am. J. Eng. Res}  		2017.  (6)  p. .  	 
\bibitem[A. R. S. #1, B. R. #2, K. K. #3, K. S. #4, S. Venkatasubramanian, and B. E. Student ()]{b5}\label{b5} 	 		‘Optimized Door Locking and Unlocking Using IoT for Physically Challenged People’.  	 	 		\textit{Int. J. Innov. Res. Comput. Commun. Eng. (An ISO}  		A. R. S. \#1, B. R. \#2, K. K. \#3, K. S. \#4, S. Venkatasubramanian, and B. E. Student (ed.)  		2007. 3297.  	 
\bibitem[Onyan and Enalume ()]{b3}\label{b3} 	 		\textit{Property Security Using a Biometric Based Door Lock System},  		 			A O Onyan 		,  		 			K O Enalume 		.  		2018.  	 
\bibitem[Chikara et al. ()]{b9}\label{b9} 	 		\textit{Smart Bank Locker Using Fingerprint Scanning and Image Processing},  		 			A Chikara 		,  		 			P Choudekar 		,  		 			D Asija 		.  		2020. p. .  	 
\bibitem[The Complete method of calculating accuracy is described in <<https://developers.google.com/ machine-learning/crash-course/classification/accur acy>> accessed on 29-05-2020 at 6]{b13}\label{b13} 	 		\textit{The Complete method of calculating accuracy is described in <<https://developers.google.com/ machine-learning/crash-course/classification/accur acy>> accessed on 29-05-2020 at 6},  		p. 20.  	 
\bibitem[The crime rate in Bangladesh is broadly]{b0}\label{b0} 	 		\textit{The crime rate in Bangladesh is broadly},  		 \url{<<https://www.numbeo.com/crime/country\textunderscore result.jsp}  		 	 	 (country=Ban gladesh>> accessed on 29-05-2020 at 6:20 p.m) 
\bibitem[Zhang et al. ()]{b11}\label{b11} 	 		 			W Zhang 		,  		 			S Shan 		,  		 			W Gao 		,  		 			X Chen 		,  		 			H Zhang ; W 		,  		 			S Shan 		,  		 			W Gao 		,  		 			X Chen 		,  		 			H Zhang 		.  		\textit{Local Gabor Binary Pattern Histogram Sequence (LGBPHS): A novel non-statistical model Zhang},  				2005.  	 
\end{bibitemlist}
 			 		 	 
\end{document}
