The Application of Webcam as Motion Sensor on Remote Security System

Ardi

Thesis

Bachelor of Computer Science

School of Informatics Management and Computer Science KHARISMA

2005

 

Abstract

This research constructs a device as a security camera to detect motions and follow the object's movement on the monitored area. If a motion detected, the device would rotate following the object and then send the recorded video through email to the users. The device consists of a webcam, motion sensor, motor steppers and software in a personal computer (PC).

The main focus of this research was the design of hardware and the design of algorithm of the software to detect motion through the changing images captured from the webcam.

The hardware consists of a motion sensor, two motor steppers, and mechanical gears to rotate the webcam. The motion sensor and motor steppers would be connected to the parallel port of the personal computer through a designed Printed Circuit Board (PCB), whilst the webcam connected to the personal computer through a USB. The software would receive inputs from the motion sensor and images from the webcam.

Generally, the algorithm detecting the motion by analysing the pixels of the difference in Red Green Blue (RGB) colours proportion between the pictures of an empty situation and the live pictures received from the camera, and also consider the signal input from the motion sensor. Overall, the algorithm consists of three parts starting with initialisation, detecting, and culminate in reporting.

First of all, before starting to monitor the area, the system will record and analyse the pixels of the Red Green Blue (RGB) colours proportion of the pictures of an empty situation. Split the images into nine sectors, and each sector would have a number representing the sum of the RGB ratio.

Secondly, the software will continuously receive and examine the RGB ratio of the images from the webcam against the RGB proportion of the pictures of an empty situation recorded on the first step, then calculate the difference of the RGB proportions. Two consideration factors should be true to decide whether there was a motion or not: 1) the calculation results in a significant difference outweigh the fault tolerance, and 2) the sensor also signals a movement. Besides calculating the difference in RGB proportion, the sensor also plays an essential role in detecting a motion. Firstly, if the images analyser detects a movement, but the sensor did not signal activity and vice versa, then the motion was probably not human, or just a bias, then ignore it.

Finally, If a motion detected, before recording the images, start to identify the object on the image, analyse each pixel on which sector that has the bigger difference of RGB, and arranges to focus on the sector, if the sector was not in the centre-middle, then send a signal output to the parallel port to command the motor steppers to rotate to the specific sector. After no movement detected, then stop recording the video, and send it through email.

 

Keywords:

Image Analysis, RGB Analysis, Computer & Hardware Interfacing, Algorithm, WebCam, Motor Stepper, Motion Sensor, Parallel Port

 

Cite