You are on page 1of 32

Purbanchal University

Project Report On

Security System Using IP Camera

Submitted by:

Rajan Bhandari

(team)

Submitted to:

Department of Computer Engineering

Purbanchal University

Date:

1
DECLARATION

I hereby declare that this project work entitled “Security System Using IP Camera” submitted
to KHWOPO COLLEGE, is a record of an original work done by me under the guidance of Er.
Milan Chikanbanjar SIR, project supervisor and member of Computer Department, KHWOPO
COLLEGE, and this project work is submitted in the partial fulfillment of the requirements for
the award of Bachelor Degree in Computer Engineering. The results embodied in this thesis
have not been submitted in any other University for the award of any degree.

STUDENT NAME

Rajan Bhandari

2
Acknowledgment

I would like to commence my acknowledgement by expressing my utmost gratitude and respect


to our supervisor Er. Milan Chikanbanjar SIR. He provided invaluable suggestions and insights
for the project. We must oblige to his feedback and immense help during the development of
the project.

We would also like to extend our special thanks to our Head of Department Asst. Prof. Shiva
Prasad Mahato sir for his constructive recommendation, counsel and direction during the
planning of this project work. We would like to express gratitude to our Principal Prof. Raju Bhai
Tyata SIR for his encouragement, suggestions and assistance during development of the
project.

Also we would like to extend our thanks all teaching member of electronics and communication
department for their tremendous support and help.

Last but not the least, we would like to express special thanks to families and class mate for
providing us exceptional moral support and advices throughout the project.

3
ABSTRACT
We as a human being should always be aware of risk and remain alert of it. In the world of

entrepreneurship, risk can come in the form of other human beings too. Hence, it has become

vital to safeguard our establishment. Technology has become integral portion of human life. It

has nearly touched all aspect of human life. For this very project we have amalgamated both

human need and technology. We have designed the system that provides 24-hour surveillance

to our beloved establishment. Already existing IP camera technology is used for monitoring the

establishment from any remote area.

4
Contents
Acknowledgment............................................................................................................................3
ABSTRACT........................................................................................................................................4
CHAPTER 1.......................................................................................................................................7
INTRODUCTION............................................................................................................................7
Project Objective.........................................................................................................................8
Problem Definition.......................................................................................................................8
Research Scope............................................................................................................................9
Chapter 2.......................................................................................................................................10
Literature Review...........................................................................................................................10
CHAPTER 3.....................................................................................................................................11
HARDWARE IMPLEMENTATION....................................................................................................11
ROUTER......................................................................................................................................11
2.2. IP CAMERAS........................................................................................................................11
CAT CABLES................................................................................................................................11
SERVER.......................................................................................................................................11
COMPUTER................................................................................................................................12
SOFTWARE COMPONENTS............................................................................................................12
AVI..............................................................................................................................................12
3.2. .NET Framework.................................................................................................................12
C#...............................................................................................................................................13
VISUAL STUDIO .NET..................................................................................................................13
FIDDLER......................................................................................................................................13
AForge.net for framework.........................................................................................................13
Chapter 4.......................................................................................................................................14
Terminology...................................................................................................................................14
Motion Detection Algorithms....................................................................................................14
TWO FRAMES DIFFERENCE MOTION DETECTOR...................................................................14
SIMPLE BACKGROUND MODELING MOTION DETETCTOR....................................................14

5
CUSTOM FRAME DIFFERENCE MOTION DETECTOR..............................................................14
Motion Processing Algorithms..................................................................................................15
MOTION AREA HIGHLIGHTING..............................................................................................15
MOTION BORDER HIGHLIGHTING.........................................................................................15
GRID MOTION AREA PROCESSING.........................................................................................15
BLOB COUNTING OBJECT PROCESSING.................................................................................15
Internet Protocol.......................................................................................................................16
HTTP...........................................................................................................................................16
CHAPTER 5.....................................................................................................................................18
System Analysis..............................................................................................................................18
Feasibility test................................................................................................................................18
OPERATIONAL FEASIBILITY........................................................................................................18
TECHNICAL FEASIBILITY.............................................................................................................19
ECONOMIC FEASIBILITY.............................................................................................................19
RISK FEASIBILITY.........................................................................................................................19
NAT OPERATION........................................................................................................................20
CAMERA ADDRESSING AND DNS...............................................................................................21
SYSTEM ARCHITECTURE.............................................................................................................22
WORKING MECHANISM.............................................................................................................23
.......................................................................................................................................................25
Chapter 6.......................................................................................................................................26
SYSTEM REQUIREMENTS...........................................................................................................26
MAINTENANCE..........................................................................................................................26
Hardware fabrication.................................................................................................................27
Database connection.................................................................................................................27
Testing and Debugging..............................................................................................................28
Chapter 7.......................................................................................................................................29
Results........................................................................................................................................29
Conclusion..................................................................................................................................29
Limitations.................................................................................................................................30
6
Future Enhancement.................................................................................................................30
REFERENCE.....................................................................................................................................32

7
CHAPTER 1
INTRODUCTION
We love and hold dear our hard earn property. We always have strong connection with our
home and care about the organization and other establishment that we have set up. As people
of world are far from pristine, it is paramount to provide security to them and know about
culprit. For this very purpose, we have internet protocol camera or commonly known as IP
camera. It captures the video of designated area and transfer that captured video and also live
stream video to designated computer of its network. It should not be mistaken with webcams
as IP camera is solely designed for surveillance. IP camera is connected to network and data it
collects is transferred to the network computer. There authorized personal can view the videos,
record, store it in desired devices and manage it any form possible. If one has IP network
connection in their establishment, they can deploy it. In addition to streaming live videos it can
also zoom the captured videos, could also be deployed for motion detection (best exemplified
in heist Hollywood movies) and also for analysis of video. In addition to above mentioned
functionality it could also transfer video to multiple computers in a network (best exemplified
by ATM videos of bank which are send to all security branch of bank). IP camera holds pre-
eminence against CCTV as they are flexible to install, provides higher quality image, provide
stability in video capturing and also more importantly scalability as one could add additional IP
camera in required place of establishment within the network.

PROJECT OBJECTIVE
The primary objective if this project is to develop the” security system using IP camera”
featuring live remote monitoring, motion detection and record on HDD and more secured
system. Other prominent objectives of this project are listed below.

 To effectively execute online surveillance of designated establishment


 To provide clear images of culprit in case of theft and intrusion.
 To manage and operate an office while being miles away from it.
 To monitor wildlife.
 To establish a server for data storage and clients distributed all over labeled places.

8
 To setup application in place where data is stored i.e. server side and also to setup
where user are i.e. client side.

PROBLEM DEFINITION
In this section we will detail regarding the various problems that are needed to be addressed to
arrive at working solution. It is wise and vital to have a roadmap for the project. It will outline
the purpose of every steps of project. Principal steps required to establish the security system
using IP camera are discussed below.

 It is vital to provide live remote viewing and monitoring of the multiple


establishments at once a sit is economical. It is provided by IP cameras. Without PC
one could stream the video from IP camera from internet. For it one should have
access to camera connection and network. It eradicates the need of carrying
connected PC or physical presence in server side to stream the video.
 To provide extra layer to security motion detection of any object or person is added.
 IP cameras offer the function such as Pan, Tilt and Zoom of cameras which can be
viewed and controlled remotely. It adds more layer to security.
 It has the feature of password to limit the access of captured videos, encryption to
safe videos from hacking in a network. Authenticating the connection can also be
added to camera system using security and encrypted certificates. It allows only
specific device over a network for discern, eradicating the hacking of system.

Research Scope
Research in the field of this control system can give anticipated benefits. Moreover, this system
is most economical in the present scenario of developing countries like Nepal. With the boom
in industries and rise in entrepreneurship among today’s youth it could be integral part of their
establishment, their dreams and future. One could use software to transcend the use of camera
and its function.

9
Chapter 2

LITERATURE REVIEW
Inception of technology and camera-based surveillance could be traced back to 1970 in the
form of closed-circuit television camera commonly known as CCTV. They were analog and bulky
in nature. They required lot of coaxial cable for wiring to connect camera and computer. As the
recorded footage was stored in VCR, they become full periodically and constant change of tape
was required. As a result, the cost of maintaining CCTV become less economically feasible even
though components used has reasonable cost.

Due to rise in expense alternate was researched. Digital video is its result which was stored in
DVR. It provided the function of overwriting and hence old and unrequired videos could be
overwritten and data could also be easily transferred.

With steep rise in technology camera become more sophisticated as DVR based on computer
was able to handle multiple camera inputs on one screen and thus making multiplexer
obsolete. In addition to it, it could ring the alarm at certain situation; automatically activate the
camera, pan, zoom and tilt camera as required and more importantly remote access of
cameras. Software also developed immensely. User has flexible software choice and has design
per requirement. Due to it, we could implement cameras of our choice in the software we are
more comfortable to use.

For most of time, camera was separate entity. Separate setup and devices were required for it.
It all was removed when camera was integrated with network interfaces. It provides better
image quality and multiple functions for user to operate camera. Such camera could be directly
connected to local area network as well as wide area network. Hence, could be accessed from a
designated computer in a network shedding the need of coaxial cable. CAT cable was used in its
place which was less expensive and could be used to operate multiple cameras at once. Its
network video servers converted analog output into digital output.

10
CHAPTER 3

HARDWARE IMPLEMENTATION
Hardware is the building block of our project. It is a spine that makes project physically possible.
We have used the following mentioned hardware components for the project. We have used
the components that are set by IT industry. We have also been flexible as if future upgraded
versions are available; following components could be replaced by them.

ROUTER
Router is a networking device that transmits and receives data packets in and from different
computer network. It creates an internetwork. It finds the best possible route for the data
packets to reach destination. When the packet is sent from IP camera it reads the information
regarding IP address of sender and receiver and send it to specified address.

IP CAMERAS
It is the crux of our system. It constitutes of cameras which is used to obtain the video frames of
and around establishment. It is encoded with the IP address so that its data could be read by
servers and also to provide security as outer interference is mitigated by it.

CAT CABLES
CAT cables are used to connect cameras with servers physically. It can also act as multiplexer
as we can deploy one cable to collect data from multiple cameras and transmit it to single
monitor. It is predominantly used in large establishment like university and hospitals. It is
placed in establishment during their building phase. Commonly CAT-5 cable has been used as it
is less expensive.

SERVER
It is where all the video frames and data collected are transmitted to and stored. As data is
stored in it, user can view the footage from any place of the world if he/she has internet
connection. It sheds the need of being physically present in cable connected location. It can also
store mammoth amount of data.

11
COMPUTER
It is utilized to view data from IP camera by being physically present in areas where cameras are
connected. It is set in same network as IP cameras and connected through CAT cables. From it,
user can install camera software and monitor all data, logs, storage of data.

SOFTWARE COMPONENTS
Software is pivotal to our project as it provides platform for hardware components like IP
cameras, server to work and process data on. It transcends the work of hardware components.
It increases the function of all other components. Hardware alone cannot function properly in
our system. It should be guided and interface should be provided to it so that it could function
as per requirement and smoothly. Instead of just viewing the video like we do while watching
any movie, software allows user to process, analyze and compile data regarding all frames of
videos received. By software we could command hardware to perform specified functions.
Software could be the backbone of the designed system. Smooth flow of project depends on
the software. We have used following software in our project.

AVI
Our captured video gets saved n AVI extensions. It stands for Audi Video Interleave. It smoothly
adds both audio and video into one file and could be run on all variety of mobile and PC. Its
quality remains intact over long period of time and also if it is opened or saved multiple times.
It also has the benefit of playback without the implementation of codecs. It has simple
architecture.

NET FRAMEWORK
It is library of codes. From it we can use desired code for our project implementation. It has
overabundance of modules to work on. As camera and its components are developed by
different entities, one component may accept one module whereas another may not. To
accommodate all we use multiple modules and sub modules. It has the ability to track data type
at any time.

12
C#
It is a programming language. Using it, we can develop a program and provide platform for
cameras to work. It combines the best possible features of previous C and C++ programing
language. Its syntax is simple. It is used as once data is assigned to certain type it cannot
transform to other unrelated type. It makes C# more safe and secure. In it code could be
lengthy sometimes but it ensures robustness and simplifies the debugging process of code.

VISUAL STUDIO .NET


It is development environment designed by Microsoft. From it, graphical user interface can be
developed. It can also be developed websites. Utilizing it, we can develop website which can be
used to view videos send from cameras. We can view data being in any place by just using the
developed site.

FIDDLER
It has the capability to log all HTTP traffic from user computer to internet and back. Hence, we
use it in our design system to inspect traffic and also supervise transmitted data. It can be
further improvised by using .NET language as it is event-based scripting subsystem. We can
implement it, to control the traffic in our network. Using it, authorized personal can add extra
security to system and also monitor it.

AFORGE.NET FOR FRAMEWORK


It constitutes of several useful library. It has the feature of imaging which can be used to
enhance and process the image. It also has motion detection and processing routines in its
library.
It’s a forge. Video library has many useful classes which allows user to access and process video
from received camera.

13
Chapter 4

Terminology
MOTION DETECTION ALGORITHMS

TWO FRAMES DIFFERENCE MOTION DETECTOR


This motion detector could be labeled as one of the simplest to use and also one of the fastest.
The bedrock of this algorithm is based on the differentiation between two subsequent frames
of video that is being streamed and finding how much one amount differs from another.
Difference in those frames defines the motion level. But it has one limitation. When it has to
operate for moving object, it is unable to highlight them precisely. But apart from it, it is highly
useful. It is imperative especially for motion detection.

SIMPLE BACKGROUND MODELING MOTION DETETCTOR


It catches the dissimilarity between existing frame of video and background demonstrating
frame.it uses modeling scene’s background. In it updates concurrently and detects the scene’s
change. It’s this unique ability allows more pronounced emphasizing of motion pictures frames.

CUSTOM FRAME DIFFERENCE MOTION DETECTOR


This detection algorithm is based on finding the difference between current live video frame
and predetermined background frame. It is amalgamation of previously discussed motion
detector. It can detect the differences between the two concurrent consecutive frames. It also
detects the difference or change between the current frame and predetermined background
frame. Due to its two above mentioned qualities it is fast in one hand and it can also detects
when objects are in motion in an certain surrounding. For it to be deployed, individual need to
predefine the background frame. For it algorithm of motion detector will use first video frame
that it takes as the base and use that as background frame. But since it never changes itself, it
will be complicated for it to adapt when the background scene is changed.

14
MOTION PROCESSING ALGORITHMS

MOTION AREA HIGHLIGHTING


This motion processing algorithm is employed to emphasize areas in which motion occurs
which is discovered by the motion detection algorithm. It highlights those areas with specified
color.

MOTION BORDER HIGHLIGHTING


The work of this motion processing algorithm is to highlight the border section of areas which
are in motion. That motion is found by motion detection algorithm. It is significant and useful
when algorithms can precisely pinpoint moving items.

GRID MOTION AREA PROCESSING


It processes grid of the motion frame. It divides the whole single motion frame into a grid
which constitute of cells. With this division motion level can be separately calculated for each
divided cells. Due to this facility we can know which cell has more motion and which cell has
less motion. It could also highlight the cells and designated areas which we can enable and
disable as per requirement. It also provides facility for user to stipulate onset of cells motion
level and it could be highlighted.

BLOB COUNTING OBJECT PROCESSING


It is a motion processing algorithm that can count each individual separate item in the motion
frames. Those frames are dispensed by motion detection algorithm. It also has the
functionality of highlighting the detected items. Those objects could be highlighted in
rectangular box of user specified color. For objects to be counted and highlighted in frame their
size should content the indicated limits. From this procedure one can totally ignore the items
which are smaller than predefined size. This motion processing algorithm work best with
Motion detection algorithm which can precisely pinpoint the moving items.

15
INTERNET PROTOCOL
To transmit and spread datagram across internet protocols is required to mitigate chaos during
data transfer and between devices. Internet protocol is fore front and widely used protocol for
this purpose. It transmits data packets of users across all over internet. In internet layer it is the
primary protocol. In it delivers datagram from the source to endpoint host which are exclusively
centered in the addresses. It manages the datagram structure and encapsulates the data. It
also defines how address of source and destination datagram is done.

If there is only one customer on single IP address then Static IP addressing could be
implemented. It is constant and trustworthy over Voice over Internet Protocol. If we have set
our own computer as a server then its IP should be set as static as it provides quicker upload
and download of files. As the address is permanent it can bring security risk. It could be tracked
and exploited for data mining by them.

Every time when user log into their computer, if user desire to have different IP address
assigned to them then they can implement Dynamic IP addressing. It also hinges on upon the
ISP the customer use for their computer. This service may vary according to the ISP service. It
presents less security threat and risk than Static IP. It also facilitate for automatic network
configuration. Due to it, there is less involvement of human who could configure network badly
and could also damage it. It also increases and save the IP address as same one IP address could
be assigned to multiple users. The router itself set Dynamic Host Configuration Protocol.

HTTP
It is a mode that is deployed to transmit and route information and data all over the internet.
At the inception of internet it was simply utilized to transmit HTML pages. It is a request and
then response protocol amid client and server. Client pledges the request as it institutes a TCP
connection to a specific port on a remote host. Usually this port is 80 and it is also default.
Upon receiving the request from the client the HTTTP server transmit the acknowledgement
signal back to client. It also sends the message and information generated by it. GET and POST

16
methods are widely used as HTTP request method. For a specified source GET method is
deployed. For processing the data in destination the POST method id deployed.

17
CHAPTER 5

SYSTEM ANALYSIS
We initialized this project to design and develop a system which will provide optimal security
while being based on IP camera. It is deployed as consumer friendly product. Camera
implemented in this system is interconnected to web server. It provides the user access of
streaming video. It is done over HTTP protocol and it utilizes camera’s IP address. From any
remote areas of the world they could stream their videos and images, provided that they have
internet access. Separate software is installed in server and application on their computer to
access the data. The video obtained from camera is uploaded in server. If there is intrusion in
home then the software that we have installed in server will process and analyze recorded image
and its motion. The server could be placed at home or any other place as desired by user. That
footage could be accessed in internet. Those images could be transmitted to users home via email
or mail box. That message could be labeled as intruder message to differentiate them from other
messages. It should also allow user to access the raw footage from the camera. But in top of its
entire technical prowess it ought to be of reasonable cost i.e. economical and its interface should
be simple and welcoming to user.

FEASIBILITY TEST
OPERATIONAL FEASIBILITY
This project’s system design and its interface should be simple and friendly to user and it also
should be up to user requirements. Then only the project could be truly beneficial. This test will
be about the project and its system design being realistic. This should be considered when the
system is in development phase and also when installed. This feasibility test will make sure that
the designed system is useable after it is designed and implemented. This particular system has
been designed with user friendly features. The application can be operated easily by any user
with the knowledge of computers, and requires no extra training for the user. The area and scope
of this project is vast and depends upon the purpose of user.

18
TECHNICAL FEASIBILITY
This analysis concern with the technology related to this project. It involves the determination of
whether or not a system can actually be developed to solve the problem it addresses .Some
technical issues that arose during the analysis are:
 Is it possible and feasible to physically design the system with component available in local
market, technology that we have inherited and available people.
 If firsthand, expertise and technology is obligatory, how easily can it be acquired or
developed
 How easily can system be expanded
Since the system implemented in the software, the software technologist required for the
application are readily available in the market with some support. Security system using IP is one
of the challenging and reliable topics to the growing world. Thus project is found to be
technically feasible.

ECONOMIC FEASIBILITY
The analysis concerns the cost effectiveness of the application. Some of the economic issues we
faced are:
 While making the system cost reasonable, could it be ensured that we could reap benefits
from it.
 Is dropping the project possible if it became not feasible on the process and will burden us
with expenses.
Our application was found to be cost effectiveness as its benefit would exceed the cost. This
system is the real time system after the development it can be implement to practical life.

RISK FEASIBILITY
This will be a secured system because we have encryption and authentication system. We will be
secured login with the remote access through internet connection this system is provided with
alert configuration and mail alert monitoring. Our application is used in motion detection

19
NAT OPERATION
When completely secure system is established for devices in office or home they are protected
by firewall. But for those devices IP address is required. It is allotted by Network Address
Translation (NAT). When we try to initialize access from our home which will be private network
to the internet which is public network then those routes is blocked by routers we have on our
home and protective firewalls. Traversal of NAT happens itself spontaneously and it then
facilitates those ports which are mapping the router. When a specific device needs connection
then it is which allows inbound traffic. Many devices may be connected in a single network. And
each individual device may request for the connection and access to internet. To identify each
devices and their separate internet request they must be distinctively recognized. For this
purpose each devices are assigned distinctive and unique port numbers. For this assignment of
port number UPnP is to be initiated. User can manually configure the router and all its setting
regarding IP addresses, port and NAT provided that they have required technical skills and
profound knowledge regarding it. We define it as Port Forwarding. When the requested
information and data packet arrives at router then it forward it to the asking device through the
port that is defined above. Only from that specified port the traffic is allowed inside that device.
We could state that virtual server is being created only for the user device. We could configure
separate port for camera (let’s suppose port 3000). In the internet the IP address of router
(http://140.203.7.1:3000) which is connected to camera is read and accessed on previously
mentioned port 3000. Then the internet traffic directs the camera’s live video stream to that
user.

20
.
Figure: NAT operation

CAMERA ADDRESSING AND DNS


The IP camera which we had installed in our system has its own Domain Name System which is
also called as DNS. The major benefit of having DNS is that it allows user to have address with
name of their choice such as http://mysecure camera.net. It saves the user of remembering IP
address which are quite difficult to remember and user are not used to it. When it is first
bought it has pre written name. If user like then they could continue using it or if they desire
they can change it. Its DNS service could be user manually or with automation too. Home based
internet user generally and widely uses dynamic IP address every time they access the internet.
Hence the update of DNS should be done in daily basis. However user may face technical
difficulty when they try to configure the DNS and other setup by themselves and also frequent
connection difficulty. It is due to interface problem with our connection with the ISP and their
routers. User could obtain DNS name from the services that provides DNS. For example one
could contact dyndns.org when they need to have specific address for their IP address.
Certain tools could be used to unceasingly apprise the DNS.

21
SYSTEM ARCHITECTURE
In the project, an authorized user i.e. a user or client who is the administrator of the security
system can use the Software Application to connect to the Camera which is on LAN or is
connected to the Internet.
The user can configure username for camera and password for its protection and also domain
name as discussed above for the installed camera on their network to connect to the camera
after the authentication of the username password combination, User can monitor camera
output and also record the feeds .User can use different camera features like zoom, pan, tilt
etc. and observe the surrounding of the camera more clearly and conveniently and camera also
automatically record the video feed once the motion on the surrounding is detected

Internet/WAN

Figure: System architecture

22
WORKING MECHANISM
IP camera is connected to computer or server using network cables. But computers in servers
do not read it instantly. For it we have to re write the IP address of camera which belongs to the
server. Only then the camera gets activated for inspection.

It also has built-in facility of web server for viewing the videos. From it, user can view anywhere
from the world provided that user have internet connection and login details.

The captured videos are divided into multiple packets which constitutes its data in the form of 0
and 1. Those packets are transmitted over the network and re-assembled to obtain video.
To transfer data, we specified IP address of camera and destination. For it, we have used NAT to
provide IP address. We implemented Static IP as it assigns same IP to camera and computer.
But if user is viewing over internet it is best to assign Dynamic IP address as it provides new IP
address each time user logs in. We assigned port to view data send from camera to computer.
We assigned specific port available in computer to receive and view data send from IP camera.
To get access to IP cameras, A Forge. Video library is used as it provides access to JPEG and
MJPEG streams. As videos are transmitted over the network, it is obliged to follow the set and
defined protocols over the network. It follows TCP/IP protocol to transmit data without
confusion and without complication. Link layer collects the data. Network layer specifies the
sender and destination IP and MAC. Transport layer decides which protocol is more suitable for
it and user finally views it in application layer. Data is transmitted using Ethernet cables.
We can view data from internet too. HTTP is used as our data is transmitted over internet. It
provides request/response protocol between two cameras at server side and user at client side.
It adds security in transmission.
On top of viewing data send from camera, we have made camera to be made smart. It is
programed to detect intrusion, process and capture it. For it we used motion processing
algorithm.
Aforge.net framework is used for motion detection from camera in specified location. Using the
set of classes and algorithm aforge.net framework is used to motion detection. It is
programmed so as to capture region which has highest motion, to have ability to count all
objects in motion in a frame and track them. All classes have [0, 1] range. Now if we get the

23
data of 0.05 then it means that there is 5 % motion in object. We have presented the code for
motion detection and their processing.

// C# Sample Code
// create motion detector
MotionDetector detector = new MotionDetector(
new SimpleBackgroundModelingDetector( ),
new MotionAreaHighlighting( ) );

// continuously feed video frames to motion detector


while (... )
{
// process new video frame and check motion level
if ( detector.ProcessFrame( videoFrame ) > 0.02 )
{
// ring alarm or do somethng else
}}

We added two frames difference motion detection algorithm which is based on detecting
change in two consequent video frames, simple background modeling motion detector which
base the current frame of video with the background frame, custom frame difference motion
detector which has predefined video frame to work on.

We also made camera to process the motion it capture using motion processing algorithm
We have implemented multiple but equally important algorithm to process the motion of
video.
One is motion area highlighting which process only specified motion in captured frame, motion
border highlighting which highlights the area in which motion is detected, grid motion area
processing which allows user to divide frame in multiple frame and blob counting objects
processing which allows user to count objects in video frame.
We have data flow diagram which compares the frame between external entities and the
processed frame. From it, we can get data of which information has entered the system and if
there has been any change in the pre-defined information. We used entity relationship diagram

24
data modeling of our captured frames. It depicts data in terms of entities, attributes and
relationship as described by data. Entities could be person or object. Attributes is the detailed
description of entities. Relationship is the process in which separate entities are associated with
each other. To supervise how existing system operates and also how new ones do we
implement USE-case models.

PC/Laptop Ethernet IP camera


router

Data Storage Cable /DSL


Modem

Internet

Fig1: Block Diagram of IP Surveillance System

25
Chapter 6
SYSTEM REQUIREMENTS
We will need following electric components and networking constituents to fulfill the vision of
our project in physical world. Hence we have listed those components which we will need in
this project. They are as follows:

 PENTIUM IV COMPUTER
 MINIMUM 256 MBOF RAM
 HARD DISK WITH SPACE 6 GB
 SMOOTH AND UNINTEREUPTED CONNECTION OF INTERNET
 WINDOWS VERSION XP OR VERSION ABOVE IT

MAINTENANCE
Maintenance is one of the most crucial part of the design if system. It allows us to fix if there is
any issue present in the system. If new idea gets generated and new and better technology is
available then we can accommodate those into the system. It could also be configured
according to the user requirement and their businesses. Each and every part; it may be
hardware components and also software components, should be maintained if needed.
Maintaining the system is not limited to one time or little number of times but it remains
perpetual action. It is so to maintain system at optimal level and also to upgrade the system. I
surely will make system more effective. But cost curb should also be kept in consideration
whilst maintenance.

For maintenance of any system four primary activities is attached. They are:

 Receiving the request for maintenance of system from users.


 Translating those user requests into physical modifications.
 Design of user request modification.
 Finally execution of those modifications.

26
HARDWARE FABRICATION
We collected all required hardware for our project. They were IP camera, Ethernet cables,
computers and servers. IP cameras come with its own pre-assigned IP address. As this IP
address and that of our network do not match, it is vital to re assign IP address to camera same
to that of network. For that we connect it to computer, login to its software and change its IP
address as required to work in system. Then using network cables, it is connected to server. We
could see if it is ON or not by checking the blink in server and also performing PING in respect to
assigned IP address of camera. The server is also connected to any computer via network
cables. From it, user can view all the video frames from IP cameras.

DATABASE CONNECTION
We have designed and created our application for our system. But it needs to be connected to
Access database. For this task classes is used. That classes are stowed in the “
System.Data.OleDb” namespace. We also have instilled “System.Data.OleDb.dll” library on our
project. For optimal use of class we need both of them.

We established the connection with the database. After the connection is done then we can
actually entree the database. To ensure this “System.Data.OleDb” namespace arrange for the
“OleDbConnection” class.

In c programming it takes Connection String as argument and authorizes the value to the
Constructor statement. This instance is sustained by the OLEDB Data Provider. It is shown
below:

connetionString = "Provider=Microsoft.Jet.OLEDB.4.0;
Data Source=yourdatabasename.mdb;";

cnn = new OleDbConnection(connetionString);

27
At inception connection between c programmed application and user specified Data Source is
instituted. Then with the assistance of Connection Object SQL commands will execute the
process of recover and management of data in the allocated database.

When all the activities in Database are finished disconnection is imitated and also the data
transfer is halted. Its code is shown below.

cnn.Close ();
}

TESTING AND DEBUGGING


It is vital to perform testing to ensure quality of software and to review coding and design of an
overall system. It is also used to locate error if any. We individually checked the physical
condition of all components used. We see if used IP cameras have any physical damage or not.
We also checked if the cable used to connect all components is cut in any part or not.

We rerun the code implemented to motion detection and processing. We checked if they
execute in all required scenarios. Modules from .NET and its boundary condition is tested to
make sure the information is flowing as per specified areas. We have added those modules in a
whole system. We focused don interface and if there is any errors or mismatches in it. We
viewed overall program structure. We reviewed the codes to check whether the logic of our
program is correct and useable or not. We simulated test cases to execute all codes we have
written.

We have done black box testing to review the functions of the designed product and if is fully
operational or not.

We find iota of error in our design and system. We successfully tested the designed system and
debugged the errors.

28
Chapter 7
RESULTS
We were able to successfully obtain the desired result.
IP cameras were successfully added to the network. It was able to transfer the captured videos
to server and computer. It ensures the completion in connection between all hardware
components.
We have used .NET and its framework for various purposes. We have used it to implement
modules to ensure cohesion between all components used. Since we were able to successfully
view video, it ensures cohesion and smoothness between components. We also were able to
tilt, zoom and pan camera all the time. We have used framework for processing the captured
data and to analyze the motions of any object or person in a video. Our code for this procedure
ran successfully. We were able to analyze the moving object like vehicles and peoples. We got
the data of how they moved, their pace and other activities. We collected those data and saved
them for future reference. From it we were able to differentiate between non-living objects,
male or female as they have different motion. Hence, we were successful in implementation of
our project. We were able to achieve the objective of providing security suing IP cameras.

CONCLUSION
Protecting our property has become a monumental task. For protection perpetual monitoring is
required but it is next to impossible to keep track if our property all the time. Hiring a security
guard is another solution to the problem but it is very unreliable. So, we need reliable and cost-
effective solution to our problem. We need a fusion of software and hardware system which
will monitor our property and detect the intruder. Our project entitled “Security System Using
IP Camera “is one such application that can solve security related problem. So, for any
project ,one should focus on the target similar to laser beam can cut through anything that
comes in its way since , being an academic project the first thing that should be focused is the
utilization and coverage of as many concepts and logic learned during the academic period
.Our project does that by converging the concepts of file systems, image processing ,computer

29
networks, computer programming ,software engineering and much more field that are needed
to complete a software development cycle. We have core belief that any project no matter
where or how it is done should fulfill one key criterion, that is, it should try to solve the problem
or help to upgrade the existing system. So, we have tried to address all these issues. We gained
practical experience, learned TCP/IP protocol, motion detection and various other tools and
resources.

Finally one must focus consistently for the improvement and develop uniquely distinct feature
in whatever field one is involved as we know that, developing masterpiece takes time .we
devoted our time, knowledge as well as imagination for the preparation of this application
system .we tried our best to make this application simple yet powerful and useful tool.

LIMITATIONS
How much we design system in detail a designed system always has baggage of its limitations. It
could always be enhanced. Our system also has its own limitation due to unavailability of
technology or other reasons. Therefore, our system has also some limitations.

The limitations in our system are listed below:

 Our designed system cannot function if surpasses the pre-located bandwidth for its
operation. If such happen, it will cease to function unless further bandwidth is allocated
to it.
 Our systems camera has minor issue of dynamic range. Its ability to measure light
intensity is less. Due to it some images at low light could be less effective.

FUTURE ENHANCEMENT
The project “Security System Using IP Camera” in itself is self-sufficed. But it has also room for
development and enhancement with addition of features and code. As video consume large
pie of bandwidth, one could develop a program to mitigate it. For it, we can use saved
bandwidth for other purposes. It is also little bit expensive. We hope that future components
could be of reasonable price and with advancement of technology it has such possibility. It has
low dynamic range. With more technology growth we hope the ration of maximum and

30
minimum measurable light intensity could be increased. Due to the lack of time and resource
we were not able to implement all those great ideas and concept.

31
REFERENCE
1) www.msdn.microsoft.com/en-us/vstudio/hh388566.aspx

2) www.wikipedia.orghttp://en.wikipedia.org/wiki/IP_camera

3) http://code.google.com/p/aforge/

4) http://en.wikipedia.org/wiki/Internet_protocol_suite

5) http://en.wikipedia.org/wiki/Domain_Name_System

6) http://www.fiddler2.com/Fiddler/dev/

7) http://www.codeproject.com/Articles/10248/Motion-Detection-Algorithms

32

You might also like