A CCTV system with SMS alert (CMDSA): An implementation of pixel processing
algorithm for motion detection
Nurul Hidayah Ab Rahman, Nurul Azma Abdullah, Isredza Rahmi A. Hamid, Chuah Chai Wen, and Mohamad
Shafiqur Rahman Mohd Jelani
Citation: AIP Conference Proceedings 1891, 020013 (2017);
View online: https://doi.org/10.1063/1.5005346
View Table of Contents: http://aip.scitation.org/toc/apc/1891/1
Published by the American Institute of Physics
Articles you may be interested in
Face recognition for criminal identification: An implementation of principal component analysis for face
AIP Conference Proceedings 1891, 020002 (2017); 10.1063/1.5005335
A brief review of augmented reality science learning
AIP Conference Proceedings 1891, 020044 (2017); 10.1063/1.5005377
A CCTV system with SMS alert (CMDSA): An
implementation of pixel processing algorithm for motion
Nurul Hidayah Ab Rahmana),*, Nurul Azma Abdullahb), Isredza Rahmi A. Hamidc),
Chuah Chai Wend), and Mohamad Shafiqur Rahman Mohd Jelani
Soft Computing and Multimedia Centre, Fakulti Sains Komputer dan Teknologi Maklumat, Universiti Tun Hussein
Onn Malaysia, 86400 Batu Pahat, Johor, Malaysia
a),* Corresponding author: firstname.lastname@example.org
Abstract. Closed-Circuit TV (CCTV) system is one of the technologies in surveillance field to solve the problem of
detection and monitoring by providing extra features such as email alert or motion detection. However, detecting and
alerting the admin on CCTV system may complicate due to the complexity to integrate the main program with an
external Application Programming Interface (API). In this study, pixel processing algorithm is applied due to its
efficiency and SMS alert is added as an alternative solution for users who opted out email alert system or have no
Internet connection. A CCTV system with SMS alert (CMDSA) was developed using evolutionary prototyping
methodology. The system interface was implemented using Microsoft Visual Studio while the backend components,
which are database and coding, were implemented on SQLite database and C# programming language, respectively. The
main modules of CMDSA are motion detection, capturing and saving video, image processing and Short Message
Service (SMS) alert functions. Subsequently, the system is able to reduce the processing time making the detection
process become faster, reduce the space and memory used to run the program and alerting the system admin instantly.
Closed-Circuit TV (CCTV) system surveillance is a well-known monitoring solution for physical and
environmental security. Data from CCTV surveillance is commonly used during post-incident investigation, for
example during collecting evidence of crimes. As reported by Shahrudin , Malaysia’s crime index is increased to
4.6% with a total of 38,877 crimes involving properties in the first quarter of year 2016. It suggests the need of
proactive solutions that refer to providing security mechanisms which may prevent security incidents occurrence
and/or minimizing risks and losses , . For example, an automated real time intelligent CCTV system that
encompasses a stimuli detection which could be either motion detection or sound detection, and an alert system such
as email alert and screen alert to enhance the detection and surveillance experience .
However, the problem of a CCTV system that use email alert is it cannot be reached immediately considering the
factor of Internet connection and device portability. In this study, therefore, CCTV motion detection with Short
Message Service (SMS) alert system (CMDSA) is introduced to overcome the problem of detecting and alerting the
system admin using pixel processing algorithm and SMS alert. The system is expected to reduce the processing time
The 2nd International Conference on Applied Science and Technology 2017 (ICAST’17)
AIP Conf. Proc. 1891, 020013-1–020013-6; https://doi.org/10.1063/1.5005346
Published by AIP Publishing. 978-0-7354-1573-7/$30.00
making the detection process become faster, reduce the space and memory used to run the program and alerting the
system admin instantly. The contribution of this study is two-fold:
1.Applying pixel processing algorithm for motion detection that could save both memory and space.
2.Sending a SMS alert to the system admin once a motion detected.
The remaining of this paper is structured as follows. Next section discusses on related concepts of this study and
relevant previous works. It follows by design and development section that describes the whole processes of system
development. Result and discussion highlights the outcomes and advantages, and final section outlines conclusion
and future work.
BACKGROUND OF STUDY
This section presents an overview of related concepts on this study such as what is a CCTV system and how it
works, description of motion detection algorithm and comparative summary of existing CCTV systems and
Closed-circuit television (CCTV) is a television (TV) system consists of cameras, monitor and its recorder where
the signal is broadcast for surveillance and security purposes . The combination of camera and monitor makes a
CCTV system where images are sent to the monitor. A camera creates series of image frames, called as video that
will be transmitted to CCTV monitor. A CCTV monitor is practically the same as a television receiver except that it
does not have the tuning circuits and allow other camera controls without going to the camera, for example
brightness and contrast controls .
CCTV system encompasses many types ranging from a simple system that using a graphical interface system
with portable cameras to a complex system that using coaxial cable to transfer signal to its recorder. For a complex
CCTV system, the camera can be customized to the environment with a controller. As explained by Tilley ,
surveillance activities using CCTV commence with a camera captures video and converts the captured video into
signals. These signals are then sent to the viewer (i.e. a hardware used to convert the signal to a user viewable form)
either by cables or wirelessly.
Motion detection algorithm and alert system
Motion detection is an extra feature that can be integrated into a CCTV system in providing effective
surveillance activities. Two techniques to integrate the feature into a CCTV system are: (1) motion sensor, and (2)
motion detection algorithm . A motion sensor is a device that can be installed separately with a CCTV camera
and programmed to work together. The second method is by embedding motion detection algorithm inside the
CCTV system program that can be further programmed to perform an action, usually send an alert, after a motion
detected. Two common algorithms to program motion detection are frame comparison and pixel processing.
Frame comparison algorithm detects motions by comparing frame by frame and verifying motion occurrence
from frame differences values while pixel processing algorithm detects movement by observing pixel differences
values and focuses on those particular changes to verify a movement ,. The latter algorithm has been
highlighted in providing efficiency as it covers a small area where the pixel changing occurs, hence it could save
both memory and time such as those that applied the algorithm for traffic surveillance , and examined image
processing for detecting defects in industrial pipes .
Alert system is an action triggered when some condition is met that includes the following :
1.Sound alert system is an alarm sound made, for example, a sound will be made by the CCTV system
program when a motion is detected.
2.Email alert system is an alert system where it sends an email to the system admin that needs an Internet
connection to be undertaken.
3.SMS alert system is an alert system where the system sends a SMS to the admin. It needs a valid contact
number and more convenient in a scenario of limited Internet connection.
In this study, pixel processing algorithm is applied due to its efficiency and SMS alert is added as an alternative
solution for users who opted out email alert system or have no Internet connection.
A comparative summary between CMDSA and other existing systems
Table 1 presents a comparative summary between CMDSA with two existing CCTV systems in market which
are Net-I Viewer and Spy CCTV.
TABLE 1: Comparative summary between CMDSA and other existing systems
Characteristics Net-I Viewer
Spy CCTV CMDSA: CCTV Motion
Detection with SMS Alert
Supported devices CCTV camera (USB and
Coaxial) , web Cam
CCTV camera (coaxial only) CCTV camera (USB and
coaxial) , Web Cam, IP
Motion detection Yes (Frame comparison
algorithm – Night Vision)
No Yes (Pixel processing
Email alert system Yes Yes Yes
Sound alert system No No Yes
SMS alert system No No Yes (50 numbers at one time)
The basic function of Net-I Viewer is to detect motion and send alert via email using frame comparison
algorithm and only support camera that using USB, coaxial and web cam while Spy CCTV is basic CCTV software
with no motion detection algorithm. Taken together, CMDSA provides more supported camera devices, integrates
motion detection feature and enable all alert systems. Additionally, the SMS alert can be set up to 50 numbers.
THE DESIGN AND DEVELOPMENT OF CMDSA
The whole CMDSA development activities are presented in this section. This study was carried out using
evolutionary prototyping methodology adopted from Smith  that consists of five phases, namely: (1) planning;
(2) requirement analysis; (3) design; (4) implementation and testing; and (5) maintenance – this phase was not
formally undertaken due to CMDSA was developed in a controlled environment.
Planning phase is where the system is being planned, why and how the system will be made are also discussed in
this phase. It is divided into two steps as follows:
1. Project initiation - a preliminary analysis is undertaken about how the CCTV system will be used, why it
should be built as well as identifying advantages and disadvantages of the system.
2. Project management - the developer will create work plan, identifying project risks, outlining budget, and
finding the most effective technique to develop the system.
Requirement analysis describes the analysis that is required in order to develop the proposed system through
functional requirements and non-functional requirements. Functional requirements outline what the system should
do and support the user activities in performing and completing tasks by using the proposed CMDSA. The list below
shows the functional requirements for CMDSA.
•The system allows the user to log in by using username and password given default as “admin”.
•The system displays two modules which are setting up the SMS Alert and setting up the CCTV.
•The system allows motion to be detected.
•The system allows the camera to go into standby mode if no motion detected.
•The system allows SMS to be send to the set phone number immediately after motion detected.
The non-functional requirements describe the CMDSA’s security implementation that includes authentication by
login, pixel processing algorithm and SMS Alert system.
System design defines the architecture, components, modules, interfaces and data for a system requirement.
Figure 1 presents the overall system design of CMDSA.
CMDSA was developed with four main modules, namely: (1) Configure CCTV, (2) Configure SMS alert, (3)
View the live camera, and (4) Change user credentials. When first initiate, the system will scan any available camera
drivers and load in in the camera list. In the following step, a user needs to enable connection to the selected camera
and a live preview will be displayed on the interface. Configuring SMS alert involves the user logged a phone
number and enable motion detection. If a motion is detected then the video capture will be started and a SMS will be
send to the logged number. Alternatively, the user can opt for normal mode in which the camera recording all the
activity until stop button is clicked.
Implementation and testing
Implementation phase of CMDSA involves implementation on the interface and on the backend coding. The
system interface was implemented using Microsoft Visual Studio while the backend components, which are
database and coding, were implemented on SQLite database and C# programming language, respectively. The key
function of CMDSA, motion detection works by defining the following three properties of pixel processing :
1. pixelIntensity - the intensity of a single pixel on grey scale images can be between 0 and 255. In
identifying a moving object, this property sets the difference value (e.g. default value is 30) that should be
recognized between two frames on the same pixel.
FIGURE 1: System design CCTV motion detection
with SMS alert
FIGURE 2: Pseudo code example for motion detection
2.pixelSensitivy – this property defines the value of pixels that should be identified as moving object in
order to recognize motion.
3.frameNo - this property defines the number of frames should be checked per seconds.
In CMDSA, the users need to set pixel intensity value that defining the sensitivity of pixel. Once a motion is
detected, a red marker is programmed to appear on the live camera view indicating that the pixel of the area is
changing and an alert will automatically being sent via SMS (see Figure 2).
Testing of CMDSA involves examine the final system debugged including detecting a motion, send a SMS as
well as database connection, settings functions, motion detection, and camera driver detection.
RESULT AND DISCUSSION
This section highlights the main outcome of CMDSA and its advantages. This study aims to design, develop and
test the CCTV Motion Detection with SMS Alert Subsequently, all system functionalities are running well and
therefore, this study successfully achieved the objectives. The main modules of CMDSA—motion detection, was
programmed with detection, capturing video, saving video, image processing and SMS alert functions (see Figure
The efficiency of CMDSA is demonstrated by the execution of SMS alert that can be received by the admin just
in a few seconds and not fully depending on the Internet connection. Similar observation was echoed by Azid and
Kumar  that analyze the performance of SMS based home security system. It should be noted that the issue of
service interruption from telecommunication service provider is beyond of this study’s scope.
CMDSA automates most of the surveillance and alert activities that would be practical for the intelligent
surveillance in smart home implementation. For instance, the user just needs to set up a SMS number and enable
both SMS alert and motion detection to get the system start. The system will then run automatically from detecting
the motion, saving the video and sending alert to the admin.
CONCLUSION AND FUTURE WORK
With increasing solutions introduced to improve surveillance activities, detecting and alerting process need an
efficient algorithm to be run perfectly with the CCTV system. CMDSA has achieved its objective to design, develop
and test a CCTV system with motion detection and SMS alert function that save cost, memory and faster processing
time. CMDSA is a promising alternative solution such as in smart home industries, particularly by adding some
functionality and feasibility improvement. Some of the improvements are:
•Enhance the pixel processing algorithm with night vision and heat features.
•Anti-False alarm module which can reduce the number of false alarm that might be triggered by using height
algorithm of an object.
FIGURE 3: Example of SMS alert screenshot
The authors express appreciation to the Ministry of Higher Education (MOHE) and Universiti Tun Hussein Onn
Malaysia (UTHM). This research is supported by RAGS grant (Vot R066) and Gates IT Solution Sdn. Bhd. under its
publication scheme. Thanks to anonymous reviewer for valuable comments.
1.H.S. Shahrudin, “Malaysia's crime index sees 4.6 per cent increase”, Retrieved on 18 January 2017 from
2.I.R.A. Hamid, and J.H. Abawajy, “An approach for profiling phishing activities”, Computers & Security, 45,
3.C.C. Wen, E. Dawson, J.M.G. Nieto, and L. Simpson, “A framework for security analysis of key derivation
functions”, in International Conference on Information Security Practice and Experience, (Springer Berlin
Heidelberg, 2012), pp. 199-216.
4.Y.I. Yoon and J.A. Chun, “Tracking System for mobile user Based on CCTV”, in The IEEE International
Conference on Information Networking (2014), pp. 374-378.
5.K. Painter and N. Tilley, “Surveillance of public space: CCTV, street lighting and crime prevention”, Monsey:
Criminal Justice Press, 10, (1999).
6.N. Tilley, “Understanding car parks, crime, and CCTV: evaluation lessons from safer cities”, (Home Office
Police Department, London, 1993).
7.J.W. Davis and A.E. Bobick, “The representation and recognition of human movement using temporal
templates” in Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern
Recognition, (1997), pp. 928-934.
8.K. Kohli, and J.P. Singh, “Motion Detection Algorithm”, Int. Journ. of Comp. Sc. & Apps 1:12, (2013).
9.M.A. Alam, M.N. Ali, M.A.A.A Syed, M.A., N. Sorif, and M.A. Rahaman, “An algorithm to detect and
identify defects of industrial pipes using image processing” in Proceedings of the 8th International Conference
on Software, Knowledge, Information Management and Applications, (IEEE, 2014) pp. 1-6.
10.A.C.P. Uy, R.A. Bedruz, A.R. Quiros, A. Bandala, and E.P. Dadios, “Machine vision for traffic violation
detection system through genetic algorithm” in Proceedings of the International Conference on Humanoid,
Nanotechnology, Information Technology, Communication and Control, Environment and Management ,
(IEEE, 2015), pp. 1-7.
11.G. Lee, R. Mallipeddi, G.J. Jang, and M. Lee, “A Genetic Algorithm-Based Moving Object Detection for Real-
time Traffic Surveillance”, IEEE Signal Processing Letters 22(10), 1619-1622 (2015).
12.M.F. Smith, Software Prototyping: Adoption, Practice and Management (McGraw-Hill, London, 1991).
13.Ozeki VoIP SDK Product Guide, “How to implement motion detector using C#”, Retrieved on 18 January
2017 from http://www.voip-sip-sdk.com/p_587-how-to-implement-motion-detection-using-ozeki-voip-sip-sdk-
14.S.I. Azid, and S. Kumar,” Analysis and Performance of a Low Cost SMS Based Home Security System”,
International Journal of Smart Home 5(3), 15-24 (2011).