Advances Image-Based Automated Security System

As security is a serious concern nowadays, it becomes important to develop a product that deals with security issues without any human intervention. Hence, an automatic security system is a proposed device that ensures the security of the premises. Using both emerging technologies and specialized hardware, we can achieve safety goals and be able to develop the proposed device. It is an IoT-based approach that includes cloud computing, OpenCV, and web application for developing a security-based automatic system. Using raspberry pi and software, the authors design an automated security system where all the used electrical items are controlled. This system deals with the protection of possessions, minimizing break-ins, and avoiding any dangerous situations. The additional salient feature is that it also deals with the COVID-19 alerts, which are generated from the temperature sensor. Therefore, it protects the premises not only from any unauthorized access but also protects the premises from any infected person.


INTRoDUCTIoN
As security is crucial nowadays, every organization needs a path to keep unwanted or unauthorized person outside the premises to make their organization fully secured.It is feasible to develop a secure system that can be accessed remotely by humans.The efficient way of dealing with security is by using low powered embedded devices and software because the efficiency of the system should be increased and the energy consumption for the entire process should be decreased.
IoT is a powerful technology with which every single thing can connect with the internet and can perform the dedicated task assigned by the human without any human involvement.IoT devices like Raspberry Pi (Patil et al., 2017), pi camera, sensors such as motion sensor and temperature sensor are low powered and hence consumes less energy and perform the desired task.Moreover, combining this technology with OpenCV (Akbas & Ahuja, 2020) results in the production of the two-dimensional output from the three-dimensional article.This helps us to determine the vehicle's and the person's identity.Identification of this information generates the data from the devices.Now it becomes difficult to handle the large amount of data that is generated from IoT devices through sensors or pi camera from an external environment.In order to store the entire data and analyze the data, cloud computing comes into the role.Cloud computing is the delivery of the resources required by the user and provides the space to store a large amount of data.Hence, combining IoT, OpenCV and cloud computing provides the path to ensure the desired task to get completed.
The main aim of this research is to prevent the presence of any unauthorized person within the premises.The primary objective is to reduce human work and accomplish the task of security automatically (Penmatsa & Ganta, 2020).As automation becomes the prime factor for the security, this paper aimed to design and implement an automatic security system with the help of low powered devices and the system that provides overall control to the owner remotely.
Moreover, this research also deals with the problem of the pandemic situation by deploying the temperature sensor that automatically allows only those people into the premises whose body temperature is normal.Hence, it is an efficient security system (Indumathi & Gitanjali, 2020) that ensures security, provides convenience to the user, being energy efficient and provide remote connectivity.When the device automatically alerts the status of what is going on at your place ensures security.Moreover, the devices interact with each other and decide without any human involvement.All the activity gets automatically completed that provides convenience to the user.

ReLATeD woRK
Some of the methods are discovered over the last couple of years on the image processing technique using OpenCV for object detection.There are several ways for extraction and identification of the number from the number plate.Moreover, there are also several algorithms designed in order to recognize the face.Additionally, IoT draws attention to the security of possession remotely.So, we can see (Table 1) the different ways that are carried out in previous years (Reddy, Marla, Favorskaya, Satapathy, Singh, Bansal, Kamal, & Kumar, 2022).
In the last four years, there has been a drastic change in the development of smart and intelligent security system.Over the year, various systems are developed which enhances their previous shortcomings.But some of the challenges persist which needs to be eradicated.These challenges include accuracy, proper orientation, high resolution and limitations of hardware components used (Reddy, Marla, Favorskaya, Satapathy, Singh, Bansal, Kamal, & Kumar, 2022).
As the main aim of any algorithm is to ensure accuracy, consistency, efficiency and reliability.Hence it becomes more important to cover all the possible cases and deals with them in such a way that the algorithm provides the best result along with accuracy, efficiency, and consistency.In the case of image processing techniques, there are so many such cases that are not deal which reduces the accuracy rate.Such cases are orientation, resolution, and any hardware challenge.So these all cases need to consider which brings out accuracy and consistency (Sharma et al., 2020;Singh, Bansal, & Kumar, 2020).

PRoPoSeD MeTHoD
There are several modules in our proposed system that combines to ensure the security of the premises.In this system, we use microcontroller i.e., raspberry pi in order to control the function of all modules and provide the required output according to the way it is programmed.Here, raspberry pi connects to the face detection and recognition module and number plate detection and recognition module.The pi camera is the main component which is responsible for taking all the inputs in form of images iff there is any motion detected from the motion sensor (Fig. 1).From the image, it is determined that the person is authorized or not.If the person or vehicle is authorized then they are automatically allowed and the door gets opened.But if the person is not authorized, then a notification is passed to the owner giving them information about the person or the vehicle present in the premises (Kumar et al., 2021;Kumar et al., 2017a;Kumar, Ranjan, Singh, & Tripathy, 2020).If the owner allowed the person or vehicle then the door gets opened otherwise the doors remains closed.Hence, this provides the basic outline of the proposed system in which three major modules are number plate detection and identification, face detection and recognition and the website that provides the notification (Indumathi & Gitanjali, 2020).

Number Plate Detection and Identification Module
This is the first module of the proposed system in which the number plate of a vehicle is detected and matched over the database.In this module, (Fig. 2) the image clicked from the Pi camera is taken and after that the image is converted into GRAY scale.After conversion, if the image of the vehicle is not clear or not properly oriented then blurring techniques are applied in order to extract the number plate (Sermanet et al., 2013).Some of the blurring techniques are Blur, Gaussian blur, Bilateral Filter blur, Median blur etc.After that, the canny edge of the image is determined.Canny edge is a method that provides basic and useful information from the image.In order to find the number plate, we have to extract all those edges that form a closed rectangular contour.It provides the region of interest of the image i.e., number plate from the image.The selected ROI (region of interest) is passed to the pytesseract that extracts the text from the region of interest (Deb et al., 2012).

Face Detection and Recognition
This is the second module of the proposed system in which the face of the person is detected and then recognized (Fig. 3).In this module, the haarcascade library is used that determines the region of interest i.e., the face from the image (Viola & Jones, 2001).This implies the detection of the face from the captured image.The image clicked from the Pi camera is taken, after which the image is matched from the data set of the images.The data set contains a hundred images of the individual.That means the model is trained with a data set that contains a huge number of images.Recognition of the face depends upon the accuracy of the image matched with the data set, if the image crosses the threshold percentage, then the person is an authorized person (Meena & Sharan, 2016).The face is identified only and only if the result obtained is greater than the threshold value (Kumar, 2020;Kumar et al., 2015c;Singh, Bansal, & Kumar, 2020).

website Notification
In this module, every information is notified to the owner about the unauthorized vehicle or unauthorized person present within the premises (Fig. 4).This website is developed using Django framework that takes input only if the person is unauthorized from the above two modules (number plate detection and identification and face detection and recognition).If the person is unauthorized and known to the owner then the owner allows the person remotely to enter the premises.But if the person is unauthorized and is not recognized by the owner then it is clear that the person is intruder hence the owner denies the person to enter the premises and takes required actions.In our website, there are specific buttons to allow or deny access (Dubey et al., 2020;Kumar et al., 2017b).

FLow DIAGRAMS
The flow chart (Fig. 5) represents the working of our first algorithm i.e., Number Plate Detection and Identification.The algorithm is designed (Akbas & Ahuja, 2020) in such a way that the image is being captured, converted into gray-scale and then canny edge is determined to obtain all contours.After that, contours having length four is being determined which is our required number plate which needs to be passed through pytesseract for the extraction of the numbers.These steps are performed one by one achieving our final result i.e. car's number in text format (Punhani et al., 2019).This flow chart gives a complete view of the importance of blurring techniques.There are so many possibilities that the orientation of the car is not fixed or the image captures is not having good quality (Kumar et al., 2016;Reghu & Kumar, 2019).So, this algorithm handles such cases also.In these two scenarios blurring techniques are applied until the number is extracted from the license plate.Hence it increases the accuracy rate of having the correct output.
The flow chart (Fig. 6) represents the working of our second algorithm i.e., Face Detection and Recognition.This algorithm is designed in such a way that the image of the face of a person is being captured using a Pi camera which is processed through Haarcascade Library.The face is detected using the Face_Extractor method that helps us to identify the region of interest.After this collecting all the samples into the folder so that they can be trained further.The entire model then trained using LBPHF and using model.predictdetermines the confidence of the image (Kumar et al., 2015a(Kumar et al., , 2015b;;Kumar, Ranjan, Singh, & Tripathy, 2020).If the confidence of the image is having a value larger than the threshold value then the person is authorized otherwise not.This provides precision in the obtained result of face recognition and helps to achieve efficiency in the proposed system.

ReSULTS AND oBSeRVATIoNS
The real implementation of the proposed system is shown in (Fig 7).The results obtained from each and every module of the proposed system are discussed in detail which are as follows:

Number Plate Detection and Identification
We have performed our algorithm on following number of datasets and hence determined the following observation (Table 2).Here True Positive represents that the image of car is given and the correct number is determined, True Negative represents that the image of car is not given and no number is determined, False positive represents that the image of car is present but number is not determined and false negative represents that the image of car is not given but number is determined (Kumar et al., n.d.;Sudhakaran et al., 2020).
When the dataset is 50 the accuracy rate of detecting the correct number from the number plate is 90%, for 100 datasets the accuracy rate is 92% when taking 200 datasets the accuracy rate reaches 89.5% and for 500 datasets the accuracy rate is determined is 91.2%.Hence the overall accuracy rate of the different datasets is 90%.From the table, it is clear that when taking 100 datasets is provides a better accuracy rate for our proposed system.The overall accuracy gained from our proposed system is 90% when taking different datasets.
Plotting the graph (Fig. 9) according to the result based on the level of accuracy.Taking X-axis with the dataset for number plate detection and identification and Y-axis with the rate of accuracy.From the graph, it is clear that the accuracy at 100 datasets is the highest.This means while traversing our algorithm on 100 datasets we get the best result i.e. the maximum number of the vehicle is correctly identified in this dataset.While taking 200 datasets provides the least accuracy rate.

Face Detection and Recognition
We have performed our face detection algorithm on 243 images and compared those with another existing algorithm as shown in (Table 3).From the below observation it can be concluded that the accuracy of our proposed method is better than the existing algorithms.Here true positive means that the face is detected from the captured image and the face is correctly recognized.False positive means that the image is detected but not recognized and false negative means that the image is not present but it recognized.The existing method like Haar provides an accuracy rate of 91.76% for correct face detection and recognition.While LBP method provides 90.12% accuracy rate only which is less than the accuracy rate of Haar.But our proposed method provides an accuracy rate of 93.28% which is higher than the accuracy rate of the other two existing methods.Plotting the graph (Fig. 9) according to the result based on the comparison.Taking X-axis with the different types of methods for face detection and recognition and Y axis with the rate of accuracy.From the graph, it is clear that the accuracy of the proposed method is greater than the accuracy of the existing system.
This means that the proposed system can obtain the result for all such cases which is not been able to deal with in the other two methods.Hence the overall accuracy rate of the proposed system is 93.82 which is higher than the other two methods such as Haar method and the LBP method.Hence able to achieve precision and accuracy rate for our proposed method.

NoVeLITy IN THe PAPeR
"The main feature of our proposed system is identifying the authorized number plate of an unauthorized person present within the premises".Though determining the unauthorized person and unauthorized vehicle is done separately but they are connected via a database.In order to identify such a case where the vehicle is authorized but the person inside that vehicle is unauthorized is the main novelty of the paper.

FUTURe woRK
As we know that technology is a phenomenon which keeps on updating day by day and regarding object detection there are lot of techniques for detection, classification, recognition, etc.So, in the social security department, technologies like Artificial Intelligence, Deep Learning, Robotics, Neural Network and Machine Learning are widely used in many situations.
In the upcoming generation, many countries will have an automated system for their various license plate monitoring as well as traffic rules problems.The algorithm should be optimized to give higher results and an authority centric delivery system should be built to automate the social security and traffic rules problems.

CoNCLUSIoN
This paper concludes the successful execution of the proposed device that deals with the security issues without any human interference.In case of presence of any unauthorized person or unauthorized vehicle, the system notifies the owner through the website so that user can handle the situation remotely.
Conflict of Interest: There is no conflict of interest.For any further information and data, you may contact at sk4sunilkumar@gmail.com.

Figure
Figure 1.Automated security system

Figure
Figure 3. Face detection and recognition

Figure 5 .
Figure 5. Process of vehicle's number identification

Figure 6 .
Figure 6.Process of face recognition

Figure
Figure 7. Result obtained

Figure 8 .
Figure 8. Experimental results on different dataset