[ieee 2011 first international conference on informatics and computational intelligence (ici) -...

6
A Motion Detection Based Surveillance System(MDSS) Atif Ali Khan*, Muneeb Iqbal *School of Engineering, University of Warwick Coventry CV4 7AL, UK †The School of Architecture, Computing and Engineering (ACE), University of East London, UK [email protected], [email protected] AbstractSecurity is one of the biggest issues in today’s world. According to Metropolitan Police Service there have been a total of 33,471 robberies out of which 90% of them were personal and rest business and there has been a total of 92,135 burglaries out of which 70% of them were residential and the rest were non residential. The above figure shows that no doubt the crime is happing and let it be residential or non- residential places are not safe. There is surely a need for a system which can act as a surveillance for our offices and home and which is easy to use, which can run on a PC, which can be accessed via different medium like mobile phone, email or PDA. Human eye has always been considered as the most reliable source of surveillance. This paper concentrates on developing a computer based system which would replace human eye in surveillance. Machine vision is implemented to detect intruders and notify humans about the unexpected motion using SMS and email communication technologies. The system is a distributed application and can interact with its users from all over the world. Various motion detection algorithms were discussed and suitable choice was made for the project. There are more efficient algorithms available if the required reliability of the system is higher. Keywords- machine vision; video surveillance; distributed systems; threashholding; client-server architecture, peer-to-peer architecture. I. INTRODUCTION Computer based surveillance is an important topic of current computer science research. Security cameras are recording days and nights at different public and private spots. Visual information is vital for humans. Cameras are used in different ways to provide site security at different places according to the requirements. An intelligent system which automatically analyzes the images and image sequences in the area of research is referred as ‘computer vision’ or ‘machine vision’ [1]. Use of computer vision in the field of surveillance is increasing. This will relieve the humans from watching hundreds of hours of video tapes. Intelligent systems are replacing human based surveillance by automatically identifying and notifying the events in the image sequences. Modern systems and research based on computer vision have proved that the computers can be made capable enough to sense the scene and react accordingly. If the machine vision is compared to human vision, undoubtedly we can say that human eye can collect the scene information at a very high speed and transfer that to the brain for processing. Computer vision, it is of course a tedious and time consuming process. This process can take much longer to gather, analyse and respond according to the scene scenario as compared to human vision. If the eye can do it, so can the machine [2]. Although the complexity of computer vision is high graded it has been successfully used in many different areas such as surveillance, automated inspection, robot assembly, vehicle guidance, traffic monitoring and automated toll collection in which one of the author has worked previously [3]. No doubt eye can be classified as ultimate vision machine but it is ill suited for certain tasks which machine can do more accurately i.e. measurement. Robot eye can actually reach remote measurements of high accuracy. A human eye will tend to be tired after a couple of hours of image acquisition. On the other hand a machine eye will be capable of doing that for days and weeks and without blinking. In this paper use of computer vision is discussed in the context of its use in surveillance. An intelligent system is developed with the sponsorship of Intelligent Design Solutions GB Ltd., to provide computer controlled security in the areas where presence of any person or a moving object (living or non-living) is considered as breach of security. For example, offices and banks during the nights where no one is supposed to be present or an empty house whose residents are away for short period etc. II. SYSTEM OVERVIEW A client/server system is proposed and developed which will be able to detect any kind of motion within the camera range. After detecting the motion it will send an email and a text message in real time to the concerned person. The system is named as “Motion Detection Surveillance System (MDSS)” which is a distributed system based on n-tier architecture. The overall goal of the system is be to detect object motion on the site under surveillance and inform the relevant person through email and message. Once the responsible person has been notified further safety action will be taken by human activity to find whether the moving object identified by the system is a threat to the security and is there a need for a legal action to be taken. 2011 First International Conference on Informatics and Computational Intelligence 978-0-7695-4618-6/11 $26.00 © 2011 IEEE DOI 10.1109/ICI.2011.31 132 2011 First International Conference on Informatics and Computational Intelligence 978-0-7695-4618-6/11 $26.00 © 2011 IEEE DOI 10.1109/ICI.2011.31 132

Upload: muneeb

Post on 10-Mar-2017

214 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: [IEEE 2011 First International Conference on Informatics and Computational Intelligence (ICI) - Bandung, Indonesia (2011.12.12-2011.12.14)] 2011 First International Conference on Informatics

A Motion Detection Based Surveillance System(MDSS)

Atif Ali Khan*, Muneeb Iqbal † *School of Engineering, University of Warwick Coventry CV4 7AL, UK

†The School of Architecture, Computing and Engineering (ACE), University of East London, UK [email protected], [email protected]

Abstract— Security is one of the biggest issues in today’s world. According to Metropolitan Police Service there have been a total of 33,471 robberies out of which 90% of them were personal and rest business and there has been a total of 92,135 burglaries out of which 70% of them were residential and the rest were non residential. The above figure shows that no doubt the crime is happing and let it be residential or non-residential places are not safe. There is surely a need for a system which can act as a surveillance for our offices and home and which is easy to use, which can run on a PC, which can be accessed via different medium like mobile phone, email or PDA. Human eye has always been considered as the most reliable source of surveillance. This paper concentrates on developing a computer based system which would replace human eye in surveillance. Machine vision is implemented to detect intruders and notify humans about the unexpected motion using SMS and email communication technologies. The system is a distributed application and can interact with its users from all over the world. Various motion detection algorithms were discussed and suitable choice was made for the project. There are more efficient algorithms available if the required reliability of the system is higher.

Keywords- machine vision; video surveillance; distributed systems; threashholding; client-server architecture, peer-to-peer architecture.

I. INTRODUCTION

Computer based surveillance is an important topic of current computer science research. Security cameras are recording days and nights at different public and private spots. Visual information is vital for humans. Cameras are used in different ways to provide site security at different places according to the requirements. An intelligent system which automatically analyzes the images and image sequences in the area of research is referred as ‘computer vision’ or ‘machine vision’ [1]. Use of computer vision in the field of surveillance is increasing. This will relieve the humans from watching hundreds of hours of video tapes. Intelligent systems are replacing human based surveillance by automatically identifying and notifying the events in the image sequences.

Modern systems and research based on computer vision have proved that the computers can be made capable enough to sense the scene and react accordingly. If the machine vision is compared to human vision, undoubtedly we can say

that human eye can collect the scene information at a very high speed and transfer that to the brain for processing. Computer vision, it is of course a tedious and time consuming process. This process can take much longer to gather, analyse and respond according to the scene scenario as compared to human vision.

If the eye can do it, so can the machine [2]. Although the complexity of computer vision is high graded it has been successfully used in many different areas such as surveillance, automated inspection, robot assembly, vehicle guidance, traffic monitoring and automated toll collection in which one of the author has worked previously [3]. No doubt eye can be classified as ultimate vision machine but it is ill suited for certain tasks which machine can do more accurately i.e. measurement. Robot eye can actually reach remote measurements of high accuracy. A human eye will tend to be tired after a couple of hours of image acquisition. On the other hand a machine eye will be capable of doing that for days and weeks and without blinking. In this paper use of computer vision is discussed in the context of its use in surveillance.

An intelligent system is developed with the sponsorship of Intelligent Design Solutions GB Ltd., to provide computer controlled security in the areas where presence of any person or a moving object (living or non-living) is considered as breach of security. For example, offices and banks during the nights where no one is supposed to be present or an empty house whose residents are away for short period etc.

II. SYSTEM OVERVIEW

A client/server system is proposed and developed which will be able to detect any kind of motion within the camera range. After detecting the motion it will send an email and a text message in real time to the concerned person.

The system is named as “Motion Detection Surveillance System (MDSS)” which is a distributed system based on n-tier architecture. The overall goal of the system is be to detect object motion on the site under surveillance and inform the relevant person through email and message. Once the responsible person has been notified further safety action will be taken by human activity to find whether the moving object identified by the system is a threat to the security and is there a need for a legal action to be taken.

2011 First International Conference on Informatics and Computational Intelligence

978-0-7695-4618-6/11 $26.00 © 2011 IEEE

DOI 10.1109/ICI.2011.31

132

2011 First International Conference on Informatics and Computational Intelligence

978-0-7695-4618-6/11 $26.00 © 2011 IEEE

DOI 10.1109/ICI.2011.31

132

Page 2: [IEEE 2011 First International Conference on Informatics and Computational Intelligence (ICI) - Bandung, Indonesia (2011.12.12-2011.12.14)] 2011 First International Conference on Informatics

Figure 1: Camera Based Surveillance System

The system is based on three major components: A client component, which provides a GUI for the users to communicate with the system containing login start and stop facilities for surveillance. This is also responsible for the visual detection of object motion. Whenever there is any motion sensed, the second component of the system, the server, is notified about the event. The client takes the snapshot of the object and temporarily stores the image on the local machine. Whenever the server is notified about the motion detection a separate thread running on the client side software communicates with the server and uploads the snap shot taken to the server storage within the relevant user’s storage space. The server component of the system is responsible for many tasks which include handling client validations, receiving pictures taken by the clients, connection to the database, sending emails and text messages on mobile phones for the user notifications. The third component is the database which holds the records for all users. A web based front end is developed which allows the user to register, download software and see the pictures taken by the client which are uploaded to the server.

III. DESIGN AND ANALYISIS

Feature Driven Development was chosen as the development methodology. Project’s requirements were captured using Unified Modelling Language (UML) Use Case Diagrams. The requirements were listed as features. Complex features were subdivided further to make simple features. Development was planned on the basis of ‘plan by feature’. Overall model of the system was built which includes: Activity diagram, sequence diagram, class diagram, conceptual web design and database design.

A. Requirements

The requirements were classified as functional requirements and non-functional requirements which are as follows:

1) Functional Requirements: • The system should be a distributed system. • The system should be able to capture video. • The system should be able to detect motion from the

captured video. • The system should able to take snapshots of the

moving objects/intruder.

• The system should be able to send SMS in real time to notify the stakeholder (person interested in the security of the premises).

• The system should be able to generate automated emails for notifications.

• The system should be able to handle more than one client at the same time (Multi-tasking/Multi-threading).

• The system should be able to transfer the snapshots to distributed location for permanent storage, so this could provide accessibility to stakeholder to see them from remote location.

• The system should also provide web-based front end for users to register and download software.

• The system should be able to restrict unauthorized access.

• The system should have GUI at the client side of the system for users to interact with the system.

2) Non Functional Requirements:

• The system should be robust. • The system should be user friendly • It should be operating system independent.

B. UML Use Case Diagram for MDSS

The UML Use Cases were used to visualise the requirements. Fig 2 shows the use case diagram for the project requirements.

Figure 2. Use Case Diagram for MDSS requirements

133133

Page 3: [IEEE 2011 First International Conference on Informatics and Computational Intelligence (ICI) - Bandung, Indonesia (2011.12.12-2011.12.14)] 2011 First International Conference on Informatics

C. Overall Model of MDSS

Fig 3 visualises the overall model of the system.

Figure 3. Overall Model of MDSS

D. Building A Feature List

Listed below is a complete feature list. Client:

Protect unauthorised access by username and password, Start/Stop Capture, Start/Stop Motion Detection, Facility to change the threshold value, Detect intruders, Take snapshots of intruder, Transfer snapshot files to the application server., Close the program

Server: Validate user logins from database, Create user folders on the server storage to save files from appropriate user, Handle client connections, Receive and save snapshots received, Send SMS to appropriate user and Generate emails and send them to appropriate user (one in every 60 minutes).

Database: Create a database, Create table(s), and Create fields to hold relevant records

Web Front End: Register users, Login to the website, Download software, See pictures received from motion detection engine

All of the above mentioned features were developed accordingly and integrated together to build the entire system.

E. Plan and Design by Feature

After listing all the required features, planning was made on the basis of these features. The highest attention was given to the implementation of motion detection engine.

Java Media Framework (JMF) was used to capture images and detect motion followed by client GUI, access security and other features. Designing a system is the most vital phase in the development of any system. The design phase of MDSS consisted of activity diagram, sequence diagram and complete class model along with database design and a design for the web front end of the system were constructed.

1). Activity Diagram: Activity diagram was developed to

visualise the activities going on. Fig 4 shows the activity diagram. It starts from the authenticating user and runs through all of the processes.

Figure 4. Sequence Diagram for MDSS

2). Sequence Diagram: Activity diagram visualises the order in which various features of the system work together to make the entire system meaningful. After developing activity diagram, sequence diagram was built which presents the sequential flow of the components and classes and their objects. The sequence diagram is shown in fig 5.

Figure 5. Sequence Diagram for MDSS

134134

Page 4: [IEEE 2011 First International Conference on Informatics and Computational Intelligence (ICI) - Bandung, Indonesia (2011.12.12-2011.12.14)] 2011 First International Conference on Informatics

3). Configuration Management: • Initially it was planned that the Server will send

SMS to the users. Later on during the research and the design phase it was decided to use the client to send SMS. This change would be shown in the class-model of the system as a new class.

• Another initial requirement of the system was that it would send emails along with the attachment of the snapshot files of intruders. It was later discovered that one instance of intruder would make the system take multiple snapshots. Also the snapshots would be stored in the server storage. If those snapshots are also sent as attachments it would use users inbox space plus the files would also be stored permanently on the server’s storage. Therefore it was decided that the notification email would simply include simple text informing users of the motion detected on site

4). Class Model: The classes listed in the planning phase

were modelled using UML class diagrams. Following is the list of models of all the classes needed for the implementation of the system. Classes required in the client application are shown in figure 6 below.

Figure 6 Classes required for MDSS client

MDSSClientApp: This class defines the application. It contains the main method of the application. Startup() and getApplication() methods initiates the application. MDSSClientView: This class shows the first form of the GUI. If the user is already registered and has a username and password he/she can enter the details in the required fields and connect to the server. It also gives user a URL link to the registration page in case the user is not registered. MDSSClientAboutBox: This class displays “About” box which displays the version and vendor information from the Help Menu. ImagePanel: This class provides solution for one of the requirements which involves saving snapshots of intruders. MainApp: This class would handle most of the features of GUI and other network communications between client and server and associates with other classes. This class implements runnable interface and performs certain tasks simultaneously. Font: Fonts in the applications can be

modified using this class. Snaps: This class brings up a list of saved images locally and would transfer/delete those files to the server over the network. SendSMS: This class implements SMS sending feature of the project. It will follow the API provided by the SMS Gateway provider and will send SMS in real time. It will also check that no more than one SMS is sent in 60 minutes to avoid a lot of SMS being sent out which would both be economical and less annoying for users at the same time. LaunchBrowser: This class provides a one click feature to go to the registration web page of the MDSS website.

5). Conceptual design for MDSS website: There was a requirement to have a website for the MDSS which would allow users to get themselves register, download MDSS client, view intruder’s snapshots taken and update their personal details. A conceptual web design was constructed which shows the navigation between the various web pages.

Figure 7: Conceptual web design for MDSS website

6). Database Design: Database design was developed and named as “mdsp”. As shown in the figure 8, the database consisted of one table called “userdetails”. This table has four fields name, email, password and mobile number. “Email” is used as a primary key of the table. It will later also be used to send email notification to the users. “Password” field contains the password of the user. “Email” and “Password” will be collectively used for user identification and authorisation. “Name” field holds full name of the user. “Mobile_No” field holds contact number of the user. SMS would be sent to the mobile phone contact numbers held in this field.

Figure 8: Database Design of MDSS

135135

Page 5: [IEEE 2011 First International Conference on Informatics and Computational Intelligence (ICI) - Bandung, Indonesia (2011.12.12-2011.12.14)] 2011 First International Conference on Informatics

IV. IMPLEMENTATION AND TESTING

The implementation of MDSS was done in Java development platform and MySQL database. All the features listed in the ‘building a feature list’ phase were implemented.

A. Protection of Unauthorised Access

Protecting unauthorized access by username and password was one of the functional requirements. It was implemented by creating window form containing the fields E-mail address and Password. User was required to fill in this form and click on “Sign in” button. This initiates a connection between the client and the server. The information entered in the fields is sent over the network to the server where it is compared against the database. The server will then respond back whether to allow or deny access. Below is the snippet of the code which implements this feature.

MDSSClientView.java takes the details from the user and establishes a connection with the server at the hard coded ip address and port number of the server. It also initiates an instance of MainApp class. verifyUser() method of MainApp.java receives the result from the server about the user verification. On the server side of the system ChatHandler.java class receives the username and password. It compares them against the database. If the values are verified from the database it sends a message “true” to the client. Receiving true at the client end means the user has been verified and access is granted to the user. In case of wrong details entered in the E-mail and Password field access is denied. In case of correct details entered access is granted to the system. User E-mail, Name and Mobile No. are extracted from the database and displayed on the GUI. User is also given the access to start capture by pressing “Start Capture” button.

Figure 9. Screen shot of Sign In form.

B. User Friendly Interface

a). Start Stop Capture: The second feature in the client application is to provide users the facility to start and stop capturing video. A button is included to start video capturing. Video Capturing and Motion Detection is mainly influenced by Konrad Rzeszutek [4]. The class MotionDetector.java is mostly inspired from the work done

by M. Sugrue and E. R. Davies [5]. Figure 11 shows the effect before and after pressing the “Start Detection” button. Left image shows when there is no motion detection. Right image shows the intruders detected by changing the edges in the red and yellow colour.

Figure 10: Results before and after pressing “Start Detection” button.

b). Facility to change threshold value: A facility to change the threshold value of the motion detection engine was a requirement. This feature gives users a facility to change the sensitivity of the motion detection engine. In figure 10, a slider labelled “Average Movement Sensitivity” is provided for variable significant motion value.

c). Snapshots of intruders: Once the intruder was

detected, the next step was required to take snapshots of intruder. This was implemented by creating a takeSnap() method in MotDetCodec.java. TakeSnap() method initiates an object of class ImagePanel and calls saveJPG() method which stores the snapshot temporarily in the local storage. Once the motion detection engine has detected the intruder and its snapshots have been taken and stored in the local storage, the files are then transferred to the server’s storage. The snapshots taken by MDSS are stored in the \\MovingObjects of local storage. A separate thread is executing all the time which checks for any files stored at this location. If there are any files found it initiates a new socket connection at the server’s ip address and port number 1476. Files are then transferred over this connection and they are deleted from the local storage to save storage space. Method sendSnaps() of Snaps.java sends the files. RecieveFiles.java of server receives the files. This implementation was thoroughly tested and the results were successful

d). Database for MDDS: As MDSS is a multiple users

system. Snapshot files from various users are transferred to the server. It was required to have a mechanism which would separately store files from different users. The solution was provided by creating different folders for each user. Thus files received by the server will go to the appropriate user’s folder. Method createUserDir() of ChatHandler.java provides this functionality. It was required for MDSS to have a database which would hold

136136

Page 6: [IEEE 2011 First International Conference on Informatics and Computational Intelligence (ICI) - Bandung, Indonesia (2011.12.12-2011.12.14)] 2011 First International Conference on Informatics

users information. MySQL was used for database and phpMyAdmin was used for creating database and tables. Fig 4.7 shows the database “mdsp” and table “userdetails” required for MDSS created in MySQL using phpMyAdmin.

e). SMS/Email Notifications: Sending SMS in real time

to appropriate users for notification of motion detection was another major requirement of the system. For this, various SMS Gateway and Service providers where evaluated. Clickatell [6] was chosen to be used in the implementation of MDSS. A user account was created with clickatell. £5 worth of SMS was bought for implementation and testing of the system. Clickatell provides API for integration. This was followed in the implementation of MDSS and the results were successful. SMS sending feature was limited by sending maximum of one message every 60 minutes in case of intruders detected. Java API was used to implement email generation. MDSS takes the email address of the relevant user from the database and send an email at that address. A domain www.mdss.org.uk was registered for MDSS and the web front end is been uploaded on the server and is accessible on the internet.

Fig 12: Login page of www.mdss.org.uk., Test Message by MDSS

V. LEGAL AND ETHICAL ISSUES

There are a lot of ethical issues revolving around development of new systems. As in other new technological arenas, legal decisions lag behind technical developments. Ethics fill the gap as people negotiate how use of electronic information should proceed [7]. The MDSS deals with saving user’s name, passwords, email, mobile numbers and not just that this system will be saving pictures of residential or business premises fallen in to wrong hands can be miss used. It becomes a very big responsibility for the firm to make sure they do observe the ethical codes, data protection act and who even is involved with the system is aware of their ethical responsibilities.

VI. CONCLUSION

This paper described the use of computer vision in surveillance to reduce the crime. The motivation behind developing MDSS was to make a simple system, which a

common man can use with ease by simply manipulating his computer and a webcam. MDSS can be used for home and business purpose. Motion Distillation Algorithm by M. Sugrue and E.R. Davies is proved to be the best for such motion detection applications. The overall system was built using sun micro systems java development platform. The database was implemented using MySQL and Clickatell was used as a SMS Gateway provider. Though there are few bugs in the proposed system but it can fairly be said that the system provides a good baseline for further development in similar areas of surveillance by the machines. The main advantage of the design is that it is technology independent i.e. it can be implemented on any technology.

ACKNOWLEDGMENT

We are grateful to Allah Almighty for the courage and strength He gave us to complete the goals of this project. We are thankful for the support and encouragement given by our parents and their prayers for our success. We also obliged our professors specially Dr Anastasis Petrou whose knowledge and guidance was paramount in the realization of our objectives and keeping us motivated throughout the project.

REFERENCES [1] Zivkovi, Z., (2005). Motion Detection and Object Tracking in Image

Sequences, Ph.D. Thesis. University of Twente, [Avaiilable Online].

[2] Davies, E.R., “Machine Vision: Theory, Algorithms, Practicalities” 3rd Edition (2005). San Francisco: Elsevier Inc.

[3] Khan, A.A.; Yakzan, A.I.E.; Ali, M.; , "Radio Frequency Identification (RFID) Based Toll Collection System," Computational Intelligence, Communication Systems and Networks (CICSyN), 2011 Third International Conference on 26-28 July 2011, pp.103-107.

[4] http://darnok.org/programming/motion-detection/

[5] Sugrue, M., and Davies, E.R.: ‘Motion distillation for pedestrian surveillance’. Proc. 6th IEEE Int. Workshop on Visual Surveillance (VS 2006), Graz, Austria, May 2006, pp. 105–11.

[6] Clickatell Bulk SMS Gateway http://www.clickatell.com/

[7] Ethical Issues in Electronic Information Systems, University of Colorado,Boulder. http://www.colorado.edu/geography/gcraft/notes/ethics/ethics_f.html

137137