Keyword

1 Introduction

In the present world, situation security assumes a vital part. Numerous individuals utilize distinctive sorts of security system to keep their property from unapproved person’s entry. Security system helps individuals to feel somewhat safe while they have to travel or avoid their home for work. A large number of the security system works just inside a specific territory limit [1], for instance, CCTV, as a person need to see camera footage from control room. The current security systems against robbery are entirely costly as a certain measure of cash must be paid to administration supplier to store the recorded video despite the fact that there is no human movement is recognized. The solution for this problem is an intelligent surveillance system that can start recording video only after a human motion is detected. This eventually minimizes the required storage space and makes system cost-effective.

The proposed framework gives more security with the assistance of Web at less expensive cost and requires less storage space. In literature [2 and 3], researchers have proposed various methods for people counting. In literature [410], researchers have proposed many image processing methods/algorithms for human counting which are prone to problems such as occlusion or shadow and overlapping. To address these problems at some extent, Rossi and Bozzoli [4] and Sexton et al. [5] proposed a technique in which the position of camera is vertical as for the plane of the floor. In literature [11], researchers proposed an improved adaptive background mixture model for real-time tracking with shadow detection. The proposed framework gives a smart security system which gives home security with SMS and e-mail notice about the unapproved people nearness, programmed human checking and switching off all the appliances which consumes more power by customizing coding with particular appliances. Proposed system performs various tasks such as motion detection, human detection and counting, alarm activation, SMS notification through GSM and Internet Twilio account, and e-mail notification.

To improve the system performance, two boards are used—Raspberry Pi and Arduino. Raspberry Pi works in surveillance mode and Arduino works in normal mode. Arduino verifies the password and allows Raspberry Pi to start the surveillance mode. Once the password is verified, Arduino turns off all the electrical appliances by customizing coding with specific appliances. Raspberry Pi performs various tasks in surveillance mode such as motion and human detection, human counting, sending SMS, and e-mail notification to user after human detection. After human detection, Raspberry Pi sends command to Arduino for sending SMS to user by communicating with GSM module. By default, system remains in normal mode.

As the user enters correct password, system starts working in surveillance mode. In surveillance mode, Raspberry Pi detects human motion and counts number of people in a room. The location of a camera is at the entrance of a room. The human count is implemented by background subtraction [2] method in OpenCV. If any human is detected in surveillance mode, then using the GSM module and Twilio account message is sent to the owner of the house. The highlights of proposed system are as follows:

  1. (1)

    The proposed framework includes people counting, and two notices are sent to client by SMS: One SMS is sent through GSM and one SMS is sent through Twilio trial account with the assistance of Web. The recorded video is sent as a e-mail to client. At the point when there is no individual in the premises, the framework works in ordinary mode.

  2. (2)

    Raspberry Pi detects motion and human presence and it counts number of humans in a room. As the system detects human presence, immediately a SMS notification is sent to the user. The system also sends the recorded video to users mail id. As a human is detected, GSM module gets instruction from Arduino regarding SMS notification. Another SMS notification is sent through Internet Twilio trial account. The alarm is turned on as human presence is detected.

  3. (3)

    The proposed system also provides a facility to control electrical appliances by turning them off. The proposed system offers few advantages such as-

    1. (i)

      Less memory storage space is used for recording video as system start recording the video only after motion is detected.

    2. (ii)

      Recorded video is e-mail to user so that the user can inspect it later.

    3. (iii)

      User gets noticed (SMS and Email) just after human detection, so that he can take necessary actions immediately.

2 Working Principle

The proposed framework is initiated by entering right password. The movement recognition algorithm is actualized to distinguish the moving items and human count in room is done by utilizing OpenCV. After the password verification system starts working in surveillance mode and all the electrical appliances are turned off appliances by customizing coding with specific appliances. If motion is detected, the system checks for human detection. As system detects human presence, a notification through SMS is sent and alarm is turned on. The activity of that human is recorded and e-mailed to user.

If the video consists of less than or equal to 100 moving frames, the video is immediately sent to user, and if the video exceeds 100 moving frames, then the video of those moving frames will be sent in the next e-mail. Motion is detected by background subtraction method MOG2 algorithm. In the event if the movement is identified, then human discovery is executed by HAAR cascade classifier. The proposed framework is sufficiently keen to identify human movement, checks number of individuals, and informs client by sending SMS, and e-mails the recorded video to client. Figure 1 demonstrates the block diagram of proposed framework. Step by step working process is as follows:

Fig. 1
figure 1

Block diagram

  1. (1)

    Start process by entering correct password. System goes in surveillance mode as Arduino allows Raspberry pi to turn on the camera and all electrical appliances are turned off.

  2. (2)

    Wait for motion detection—Confirm the human detection, people counting mode and send SMS to the owner, Alarm is turned ON.

  3. (3)

    Security mode is ON—Record video as security system is broken and e-mail that recorded video to user.

  4. (4)

    Enter password again to make system work in normal mode.

3 System Architecture

3.1 Elements of the System

Raspberry Pi2 is the primary handling unit. OpenCV is build and introduced on it for image processing. Arduino is subprocessing unit which is in charge for initialization of fundamental handling unit after getting password from client. Python is utilized for interfacing between Raspberry Pi2 and Arduino, and Python is additionally utilized for sending SMS through Web; furthermore, it is utilized to send e-mail to the client/user.

3.2 Hardware and Software Design

In addition to Raspberry Pi, Arduino and GSM module are the principle equipments utilized for the framework. The GSM module (needs a SIM card to work) is associated with Arduino by USB to serial converter. A LCD screen is utilized to show the entered secret word. Two relays of 12 volts are utilized which are associated between raspberry pi and Arduino. One relay is in charge of activation and deactivation of fundamental procedure, i.e., Raspberry Pi. Other relay gives a control to turn off/on electrical appliances. Figure 2 demonstrates the algorithm utilized for the proposed framework.

Fig. 2
figure 2

Algorithm

4 Results

Figure 3 demonstrates the pictorial view of the proposed framework. For the proposed framework, different components should be dealt with, for example, distinctive lighting condition intensely aggravates the nature of a camera pictures. Inaccurate decision of parameters selection for various conditions causes issues in camera vision. Figure 4 demonstrates the password check. On the off chance if the wrong password is entered, then framework does not get enacted. As framework peruses right password, it turns off all the electrical appliances present in the premises. In Fig. 5, red light is a heavy load. Subsequent to perusing right password, the system turns it off and turns on blue light which indicates the actuation of primary handling framework, i.e., Raspberry Pi.

Fig. 3
figure 3

Pictorial view of proposed system

Fig. 4
figure 4

Password verification

Fig. 5
figure 5

Controlling electrical appliances

After enactment, the framework initiates primary system that identifies movement and confirms human movement. The challenge in image processing of proposed system is to distinguish a human and check number of people.

For this, subtraction of foreground image from the background image is necessary. Figure 6 indicates result for human identification. For execution assessment, there are few things which ought to be considered, for example, picture handling time per outline, Web speed, and time required for SMS sending by GSM. Figure 7 indicates result for SMS and e-mail notification.

Fig. 6
figure 6

Human detection

Fig. 7
figure 7

SMS and e-mail notification

The recorded video for security mode is in JPEG format as it can be played using any standard video player. As human motion is detected, main system will count number of people and a SMS will be sent to user regarding security alert which will notify user about unauthorized persons’ presence. GSM module will send a SMS to user. A video will be recorded and saved on SD card as well as will be e-mailed to user. Figures 6 and 7 show e-mail and SMS notification results send to user after human detection. SMS sending is done through GSM and Internet.

4.1 Observations and Comparison

Depending on the experiment performed on the proposed system, Table 1 shows the observation that is made and Table 2 shows comparison of existing system.

Table 1 Observation table
Table 2 Comparison between existing systems

5 Conclusion

The proposed framework is cheaper in cost as it requires less storage space and no individual to monitor persistently from control room. In the proposed framework, two hardware boards are utilized to enhance the execution of the framework. The proposed system also provides facility of instantaneous alert to user so action can be taken immediately. The proposed system can be implemented at high-alert places such as banks, industry, or any other places where this type of security is required.

The future thought is to attempt and add some more elements to the framework like face recognition for user for activation and deactivation of the system and mobile-based home automation framework which will permit client to control the proposed framework through mobile. As Internet assumes an imperative part in the proposed framework, utilization of 3G/4G network would be suggested for better execution.