Design and Implementation of an Embedded Smart Intruder Surveillance System

. Remote and scattered valuable and sensitive locations such as labs and offices inside university campus need efficient monitoring and warning system. As well as scattered area and belonging. This research presents a Real-Time intruder Surveillance System based on a single board computer (SBC). Thus the design and development of a cost effective surveillance management system based SBC that can be deployed efficiently in remote and scattered locations such as universities belonging. The fusion of embedded Python codes with SBC that attached to cameras, Long distance sensors, alerting circuitry and wireless module presents a novel integration based effective cost solution and enhances SBC of much flexibility of improvement and development for pervasive remote locations. The system proves the high integrity of smooth working with web application, it's cost effective and thus can be deployed as many of units to seize and concisely covered remote and scattered area as well as university belonging and departments. The system can be administrated by a remote user sparsely or geographically away from any networked workstation. The proposed solution offers efficient stand alone, flexibility to upgrade and cheap development and installation as well as cost effective ubiquitous surveillance solution. In conclusion, the system acceptable boundaries of successful intruder recognition and warning alert are computed between 1m and 3m distance of intruder from system camera. Recognition rate of 95% and 83% are achieved and the successful warning alert were in the range of 86-97%.


Introduction
Nowadays, the demands on video surveillance system are rapidly increasing in the security applications. Video Surveillance is of paramount essence as far as security in general is of high importance. Commercial and public spaces, universities and hospitals, warehouses require sufficient video capturing's which are thus introduced to keep high checks to activities in their domesticity and vicinities for security reasons. The current available technologies require RFIDs which are largely considered costly and hence the security domain and installations becomes highly expensive. For the benefits of this study in curtailing the high expenses, this project aims at using an embedded video surveillance system of single-board computer Raspberry Pi. This justification is as such that embed systems becoming more and more a part of our daily dealings, endeavours and device driven. Embedded system usage has cut across all kinds of devices used in transportation services, communication devices, entertainments, industrial activities, military formation among others [1,2]. Therefore, the need for befitting solutions using computational prowess is of the essence. This has yearned for solutions and the availability of increased computational power.to manage our daily activities. Currently, the implementations of security surveillance have to aid users for a wide variety of orthogonal designed thereby retaining some semantics based on real time operating system i.e. Raspbian [2,3]. This project describes the potential use of low cost and single-board computer Raspberry Pi with wireless internet. This is in adherence to the face detection algorithm programmed in Python-based platform as the default programming environment. In comparison to the former, this new approach is less expensive than the latter. The project aims at proposing an efficient system which captures images real time with the ability to display them on a browser using TCP/IP [1]. This study is motivated by; remote and scattered valuable and sensitive locations such as labs and offices at university campus need efficient monitoring and warning system. Beside, a semiautonomous surveillance system based on human monitoring assistance is not optimum. And finally, a costly solution is emerging for multi-location surveillance system deployment.
The purpose of this research is to design and implement a cost effective solution that would be capable of handling in an efficient manner an intruder detection system that will determine its identity and location. As well as investigating the existing features and limitations of an embedded real-time surveillance system based on SBC using the raspberry pi platform. To accomplish this goal, developing of a cost effective surveillance management system based SBC that can be deployed efficiently in remote and scattered locations such as universities and detect intrusion is conducted. As well as to implement fast and smart intruder warning system for a university campus.
According to our survey, the surveillance system does not in cooperate immediate alert in case of any unauthorized entry into the universities. This paper is focused on developing a surveillance system that detects stranger with the ability to respond speedily by capturing and relaying it to admin office based wireless module and thus activate the alert system both at intruder location and office admin.

Related Work
Extensive related literatures to the research topic have been reviewed in the last few years to examine the gaps and the contribution of various researchers in the field. Studies of many systems for remote monitoring and control are designed for commercial products and experimental research platforms.
A study of a home embedded surveillance system for evaluating the development of a Low-cost security system by using small PIR is presented by Shake and Sumedha S [4]. Developing of a surveillance system which with low cost without losing the semantics of using low power, and less memory and more efficiency using a set of various sensors. Their system helped in monitoring the household activities in real time from anywhere based on microcontroller which are considered nowadays as a limited resources and an open source solution compared to SBC is presented in [5]. Khandavalli Michael Angelo and Katakala Karthik, introduced the use of embedded system video capturing and motion detection system. The embedded web monitoring system uses the powerful ARM9 chip as its processing unit (PU). It provides the system with high embedded processor performance to process the main control, thereby compressing and web processing the captures in a simple form, inexpensive, stable and widespread as compared to others. However, their work did not consider the reaction process of any unusual events [6]. D. Jeevanand et al. in (2014), works on the design of a network video capturing system using Raspberry pi as presented. Their application system captures the videos, shares them among networked systems which also allows the alerts the controlling person with short messages as service alarm as demanded by the client. They designed the system to works in a real time environment and it was supported by Raspberry [7]. In [8], The researchers provided in their study a system that works with a low cost and high effective intelligent monitoring system which are power full to be used in elevators, home security systems and much other application built with low power consumptions. As compared to other embedded systems, this real time system provides client with video monitoring as help [8]. Sneha Singhd et al, described IP Camera Video Surveillance system using Raspberry Pi technology .Their study used this system of low cost to single -board Raspberry Pi technology. The system used a standalone platform for the hosting of image processing. The Researchers aim at developing a system with the capability of capturing real time images and displaying them on browsers using TCP/IP. It further used the algorithm to face detect and implements the design on RaspberryPI which enables live video streaming along the human face detection. Part of the limitation of the study was the lack of including any of surveillance reactions [9]. Mahima F. Chauhan and Prof. Gharge Anuradha P submitted a design and development of a Real Time Video Surveillance System Based on Embedded Web Server Raspberry PI B+ Board. Their system also incurred a low cost, with good openness and portability and it is easy to maintain and upgrade. These are considered as the targets for researchers of this application system to provide better security solutions. This system can be used for security purposes in banking halls, industrial environments, military institutions etc [10]. Figure 2 depicts the entirety of the system which composed of five parts, namely the Raspberry Pi embedded Linux controller, the PIR sensor, camera, the Wi-Fi adapter and a power supply.

Fig. 1. Surveillance System Architecture
For an embedded real-time surveillance system to be used as an effective monitoring and alert system, it has to have at least three functions, which are detection, picture identifying and alert mechanism. The network of an embedded real-time surveillance system mainly consists of two parts as presented in Figure. 1.

Hardware Design
In size description, Raspberry Pi is comparable to a Credit card, which is fully featured computer deployed on the Linux operating system. Raspberry Pi has all incorporated components that aid its connection ports where peripheral devices are plugged by the users. With its HDMI compartments monitor for displays can be plugged through, for pointing and navigation, mouse and keyboard are inserted into the Universal Serial Bus (USB) ports while for the speakers, it provides a reliable 3.5 mm audio jack. In another model B+, there exists an Ethernet socket point for internet connectivity. In general it is as efficient and reliable in terms of functionality as compared to a normal desktop computer with its size compatibility. This is thus an advantage as instance messages, emailing, web surfing, and wordprocessing, watching high-definition videos etc. could be done on it. Also, its flexibility cuts across diverse kind of electronics project handling and as a vital tool for acquiring programming skills. Raspberry Pi foundation is relatively cheap.
The raspberry pi camera is of a normal resolution of 5 mega pixel, it also has a fixed focus lens on-board. The camera capability in pixel is 2592 x 1944 for static images, still images, while it maintained 1080p30, 720p60 and 640x480p60/90 for videoing. The camera objective is to capture images, videos based on the event of detection.
The PIR sensor, a Pyroelectric device for detecting motion by measurement the changes acquired in infrared levels in its field of view that is emitted by the surrounding objects. Its size is small, inexpensive; its power is low and easy to use for this reason it is found in appliances and gadgets that are used in homes or business outfits. The PIR sensor also referred to as PIR, "Passive Infrared", "Pyroelectric", or "IR motion" sensors. Holds is a basic building block of a Pyroelectric sensor which can detect several levels of infrared radiation. The emission is sometimes on low level radiation, it then tends hotter and the more radiation is emitted. The PIR sensors consist of three pins ground, digital out and 3-5V DC. It is connected to the Pi using female/male jumper connectors. In the event that no motion detected, the digital output will remain low, however, when some motion is detected, the digital out will deliver as high (3.3V) and thus we use our Raspberry Pi in sensing this. It also has the ability of sensing in the area within a ranges less than 20 feet (6 meters) at an angle value of 110°. The Fig. 3 below explains how the connection of the Pi's 5V pin to the sensor's power pin and the Pi's ground pin to the sensor's ground pin. Finally, it connects the sensor's signal pin to pin GPIO16 on the Pi.
The PIR sensor comprises of two slots as depicted on Fig. 4, each of the slots is made from special material which is sensitive to IR.

Fig. 3. The Schematic Diagram of PIR Sensor Connect to Raspberry Pi
The lenses used are not really active much and so are observed that the two slots can 'see' out past some distances (basically the sensitivity of the sensor). When the sensor is inactive, both slots detect a replica amount of IR, the ambient amount radiated in the room, walls or outdoors. In an event of human of animal move detection or sensing, the first operation is to intercept a half of PIR sensor, which causes a positive differential alteration between the halves. Consequently, when the warm body departs the sensing area, the reverse of the previous operation occurs, resulting to the generation of negative deferential change. The resulting change pulses are thus what are detected.

Fig. 4. PIR Sensor Operation
The opto-isolator is a small device that allows to transference of a signal between portions of a circuit while maintaining those two portions electrically isolated. This circuit is used in a wide classification of communications, control and monitoring systems that use light to block electrical high voltage from influence a lower power system receiving a signal. The circuit used in this system to control the voltage source so that can to run lamp or buzzer with main power supply voltage. The opto isolator established to provide solution of very economically, technically distinguished for many applications and it has some general characteristics and prominent features. Such as high input to output voltage isolation, suitable to AC and DC usage, complete solid state construction and low drive current. Figure 5 show circuit diagram to opto isolator connects to Raspberry Pi with lamp 220 V and buzzer.

Fig. 5. Opto-isolator interface
Mainly Wi-Fi is using the 2.4GHz and 5GHz ISM radio bands. This technology allows various devices, such as personal computers, smart phones, tablet and digital camera to communicate with network resources such as the Internet via a wireless network access point. Wi-Fi dongle is connected over USB port as an extension. It has wireless speeds that can reach up to 300 Mbps. The dongle is characterized easily to work with IEEE 802.11b/g networks, and some dongles appear as security keys, whereas others serve as adapters as the case may be. Its function in this project is to transfer the captured images of the intruder which are saved on the SD card from raspberry pi to drop box where it is stored into. This provides the easy access to the admin and any staff to see the pictures at ubiquitous positions or anywhere. The following block diagram depicted in the Figure shows the process of transferring captured pictures to the drop box, Figure 6.

Software Requirements and Design
Raspberry pi is a single board computer (SBC) base Linux Operating System (OS) which offers high flexibility to modify. Hence its functionality offers a base for open source software additions. The designed system software package is based on PIR module for movement detection activities which yields good activity with light and the capturing of picture by camera module and thus activating the alarm circuitry present in buzzer. The block diagram of system software in Figure 7 shows the main package tasks.
The main procedures in the software contain two parts, the first part being the motion detection phase and secondly, are the signal transmission. The connections between the two parts are further presented in the flow chart. The first part this program will be continuously moderating any activity and movements by the PIR sensor to detect motion. Meanwhile, if the PIR sensor detects an intruder, it will prompt the camera to capture the image of the intruder and in turn allows the raspberry to run lightening. This means that when motion is detected, it will continue taking the culprit images and recording the videos by making sure that the intruder do not escape capture. The second part is the signal transmission that saves the image. The signal transmission relates the raspberry pi to administrator with the main purpose of this is to alert the admin when an intruder is detected. Then the program sends the captured images to the admin for the purpose of storage. The system alarming continuously for one (1) minute then its goes to sleep mode and the whole procedure is repeated again in a continuous fashion.

Results and Discussion
This paper discusses on the result gained from experiments and it also focuses on the problems confronted during the progression of this paper. The results obtained in this paper contain the setup and configuration of the designed Surveillance System. The results are partitioned into three parts which are the capturing of an intruder images, the communication between monitoring area and the admin office and finally download of the captured images to the Dropbox. This system has the ability to capture images continuously in situations where the intruder enters into the surveillance zone. The captured images differ from each other according the PIR sensor sensitivity range. In other words, the camera will start taking pictures of the strange (intruder) when he enters into a lesser range, from 6 meters and whenever the range falls less, the captured picture will be clearer. Figures 7, 8 and 9 represent the screen shots pictures which were photographed by the system as the intruder encroaches into the monitoring zone in different ranges. Fig. 7 shows the picture that was taken at the beginning ingress of the stranger in the monitoring area, for this reason the image was less obvious.  The final image in the Fig. 9 was more evident because the intruder was closely in front of the camera and through acquaintance on the stranger person who entered the surveillance zone. After testing the system, we found the system to be able to achieve the required results.
Here are some pictures that were captured of the intruder of this system which were gotten after the successful execution of the entire system. Fig. 9. Intruder Image capturing Nearby Detection Zone The designed system is empirically validated based captured images, 30 samples, recognition rate for various distance with the assumption of good lighting environment. Highest recognition rate achieved for separation distance of 1m with 0.95, since more clear and focus image captured raised the matching ratio. As the distance increased the rate of recognition is decreased especially beyond 3m distance where ratio of recognition is less than 0.78. Figure 10 exploit the distance effects the system recognition rate where 0.95 and 0.4 recognition rate is resulted for apart distance of 1m and 6m respectively.  Figure 11 shows the successful intruder alert based distance variation of the intruder. Samples are collected for 100 image and incremental distance step of 1m is adopted. Obviously seen, that the intruder distance is highly effects the successful warning alert, this is true as the recognition rate is higher than apart distance. This rate of warning alert shows that system is working in acceptable region of 3m while as the distance increased system performance is degraded due to imperfect recognition rate. Fig. 11. Warning Alert (Successful with Blue colour and false with red colour) with various intruder distance In conclusion, the system acceptable boundaries are computed between 1m and 3m distance of intruder from system camera. Recognition rate of 95% and 83% are achieved and the successful warning alert were in the range of 86-97%. In reality, one of the challenges of the designed system is the spatial positioning in the field and specifically the camera that captured intruder image. The optimum positioning depend on various parameters and can vary from monitoring place to another. The latency time of the system was computed to be in average range of less than 1sec since the capture and alert process. Link availability is of high impact on latency time of the system alert task. This system works efficiently with the lowest time delay in addition to high response speed by capturing and relaying images to admin office based wireless module to activate the alert system both at intruder location sites and the admin office. As shown in Fig. 12, the captured images of the stranger were saved and kept in the dropbox by the 3G dongle.

Conclusion
A successful system has been applied with low cost ubiquitous surveillance system for intruder detection and identification is presented according to its objectives and desired specifications. The system response was in real time efficient. Also, this project was focused on the design and implementation of cost effective solution that was capable of handling in an efficient way the intruder detection and determining its identity and location. The system performance has been elucidated in relationship to the response speed of captured video presentation at the intruder and transmitted video display to the admin officer The system has the capability to observe multitargets and has been successfully built with low cost as an achievement.