Video Camera Security and Surveillance System

connectionviewΤεχνίτη Νοημοσύνη και Ρομποτική

17 Νοε 2013 (πριν από 3 χρόνια και 6 μήνες)

79 εμφανίσεις



ICAMES 2008



YILDIZ TECHNICAL UNIVERSI
TY

FACULTY OF ELECTRIC AND ELECTRONIC ENGINEERING
COMPUTER ENGINEERING DEPARTMENT





Video Camera Security and Surveillance
System





Team Members : Semih Altınsoy


Denis Kürov


Team Advisor:
Assist. Prof. M. Elif Karslıgil













I
stanbul, 2008


































Bu
projenin bütün hakları Yıldız Teknik Üniversitesi Bilgisaya
r Mühendisliği Bölümü’ne aittir.
ii



ABSTRACT

The mentioned project is a video surveillance security system which alerts users for below
mentioned situations. The main workflow is that a fixed security

camera will capture the
videos continuously to checkout if there is movement in the area. If there is any movement
in the zone, the movement differentiation between the current one and predefined
movement frequency value will be compared. If it is above t
he predefined value, the object
will be checked if it is human or not. After that, if the moving object is a human, its identity
will be compared with current image database by face detection and face recognition
techniques. If the face identity is not fou
nd in the database, the user will be alerted about
current situation.

The considered solution will not be limited by capturing the whole place and checking
every piece of it. Actually it will have a feature called “zone marking”. Therefore the user
will be

able to select a special part of the screen (zone) and then he/she can define different
security rules for that zone. For example, there can be a capturing camera in the kitchen and
a mother can select a zone near the oven. If her child walks into that zo
ne, system can give
alert. Also selecting a door with the zone feature can prevent unprivileged entering in some
places.

The system will also be manageable by remote clients like mobile phones and other PCs. In
that way users can receive and control alerts

of the system and manage logs, videos that
system saved as critical.

The project will have a server component which will be responsible for authentication and
authorization of client parts. For example if a malicious person sends some false alarms to
the
mobile component they will not succeed. Client should firstly authenticate itself to the
server part with certificate based, key based and password based techniques. Therefore the
server part will also be responsible for that communication part. Additional
ly, if the client
needs some NAT traversal techniques to bypass the firewalls and routers
,

again the server
part will also be responsible for that communication part.

1



1.
INTRODUCTION

People are using technology to solve their problems. Nowadays
,

one of
the biggest
problems is burglary. In Turkey,
85.964

houses,
55.967

vacation spots,

202 banks,

4.307

official foundations

burglary

were
occurred
in 20
0
6
.

Last year, the rate of increase of
burglary was %58 approximately.

So security is very important with t
hose statistics.
[1]

Our project is
video surveillance security system
to provide security with doing necessary
procedures
. We will have a camera and watch the room. We will have permission rules for
detection like deny_all, allow_all, allow_only(list) and
deny_only(list).

System looks for
movement. If there is any movement that exceed critical value, system will do

face
det
ection and

check rules. And we have pictures in our database for allow_only(list). If user
choose “a
llow_only” feature, system

will chec
k that person is in our database.

P
rincipal
component

analysis
technique

is used for face recognition.

So

system will make face
recognition.

If it is true there is no risk. But if we do not know that person,

we will alert
user.

I
f user select “allow_all” f
eature
,

we do not need to alert.

P
rincipal component

analysis is used for reco
g
nition
.
B
ecause it

i
s

very useful in
computer
vision

problem of human face recognition.

Eigenvectors

are derived from the covariance
matrix of the probability distribution of hi
gh vector space of possible faces of humans in
database.

Firstly we calculate mean of the faces.

Then we subtract the mean face
from every
face in the database

and calculate covariance matrix.

After calculating eigen vectors and
eigen
values of this covari
ance matrix
,

we choose the principal component that is the
biggest eigen value.

Then we calculate eigenfaces.

When system
recognizes

a face, it
subtracts

mean face

from it and computes its projection onto the face space and find
eigenface. After computing
the distance in face space between the faces in database, we
make
decision

about face.

User can select different security levels for motion detection, face detection and
recognition. They can control and manage system easily with these features.

Other part

of the system is “zone” feature. User can select a special part of the screen

(zone)
and then he/she can define different security rules for that zone. For example
there could be
a camera in the garden. Users can select the swimming pool and if someone co
mes close to
swimming pool, system will alert user.

2



The server component will be responsible for authentication and authorization of client
parts. For example if a malicious person sends some false alarms to the mobile component
they will not succeed.
If

a

client of the system decides to send/communicate with other part,
it should firstly authenticate itself to the server part. For that purpose certificate based, key
based and password based techniques are considered for authentication. Also if user
chooses

to connect directly to the capturing client side he/she needs some NAT traversal
techniques to bypass the firewalls and routers. Therefore the server part will also be
responsible for that communication part.

That system’s abilities are;

-
Burglar followin
g

-
Prevent accessing forbidden areas

-
Child protection for accidents

etc.

2
.

Project Structure and Modu
les

2
.1 Face Detection

This part of the project will find face in the picture and send this picture to face recognition
to recognize. This is a face dete
ction algorithm in colour images.

The algorithm first corrects the colour with lightning compensation technique. Then the
colour space is transformed YCbCr colour space. Skin tone pixels are detected in YCbCr
space. The detected pixels are segmented

into
connected components and then grouped into
face candidates. The facial feat
ure detection module rejects the
s
e

regions that do not
contain any facial features.

2
.1.1

Skin Tone Detection

Lighting compensation technique that uses reference white to normalize
the colour
appearance is used. With lighting compensation, that algorithm detects more skin
-
tone
facial pixels.

It has been observed that the red
-
green
-
blue space is not a good choice for face detection.

The tint
-
saturation
-
luma space provides good results
. YCbCr space is widely used in video
compression standards and it is similar to the TSL space.
[
2]

3



Face detection based on cluster (Cb/Y)
-
(Cr/Y) subspace is not very good. So, YCbCr colo
u
r
space is nonlinearly transformed to make skin cluster luma
-
independ
ent
. Transformed
chrome is Cb’(Y) and Cr’(Y).

C’
i
(Y)= { (C
i
(Y)


C
i
-
(Y)) ∙ W
c
i
/

W
c
i
(Y) + C
i
-
(K
h
) if Y<K
l
or K
h
<Y


{ C
i
(Y) if Y Є [K
l
,

K
h
],


W
c
i
(Y)= { WL
c
i
+
(
(Y
-
Ymin)

∙ (Wc
i
-

WLc
i
)
)/ (K
l
-

Ymin) if Y<

K
l



{ WHc
i
+ ((Ymax
-
Y)

∙ (Wc
i
-

WHc
i
))/ (Ymax
-

K
h
) if K
h
<Y


C
b
-
(Y)= { 108 + ((K
l
-

Y) ∙ (118
-
108)) / (K
l
-

Ymin) if Y<

K
l


{108 + ((Y
-

K
lh
) ∙ (118
-
108)) / (Ymax
-

K
h
)

if K
h
<Y

C
r
-
(Y)= { 154
-

((K
l
-

Y) ∙ (15
4
-
144)) / (K
l
-

Ymin) if Y<

K
l


{154
-

((Y
-

K
lh
) ∙ (154
-
132)) / (Ymax
-

K
h
) if K
h
<Y

Wc
b
=46.97,
WLc
b
=23, WHc
b
=14, Wc
r
=38.76, WLc
r
=20, WHc
r
=
10, K
l
=125,

K
h
=188

Ymin and Yamx values are 16 and 235 in YCbCr space.

T
he elliptical model is,

(x
-
ec
x
)
2

/ a
2
+ (y
-
ec
y
)
2

/ b
2

= 1

x =
(
cosθ *

C’
b
(Y)
-
c
x
) + (sinθ *

C’
r
(Y)
-

c
y
)

y= (
-
sin
θ *

C’
b
(Y)
-
c
x
) + (
cos
θ *

C’
r
(Y)
-

c
y
)

c
x
=109.38, c
y
=152.02, θ=2.53 in radian, ec
x
=1.6, ec
y
=2.41, a=25.39, b=14.
03

This elliptical model shows

the skin pixels region.
[
2]









Figure 2
.1 Transformed CbCr space

[
2]

4







Figure 2
.2 Skin Tone Detection

2
.1.2

Mouth Map

The color of mouth reg
ion contains red component and weaker blue component. So the
chrominance component Cr is stronger than Cb in mouth region.

Mouth Map= Cr
2
∙ (

Cr
2


η ∙ Cr/Cb)
2

η = 0.95 ∙ ((1/n) ∑Cr(x,y)
2
) / ( (1/n) ∑ Cr(x,y)/Cb(x,y) )

Cr
2
and Cr/Cb are normalized to the range [0,255]. n is the number of pixels in face mask.












Figure 2.3

Mouth Ma
p[
2]

2
.1.3

Eye

For the face recognition we should also find eyes in the picture to resize photo. After the
facial feature detection module rejects the regions that do not contain any facial features, we
will find eyes of the fac
e with b
lack dots in the up
-
half

of the picture.

After all of these procedures we send this picture to face recognition

module
.

2
.2

Face Recognition:

In that project, for the face recognition part it was used the technique called “Eigenspace
projection”. If we sum
marize it: Firstly the images that are in the database are taken and
5



projected in a subspace. After that that subspace (actually a matrix) and other
e
igen

vector
and eigen values are stored into a XML file for further usage. In the testing stage the XML
da
ta is taken into memory and the testing image is projected in the previous subspace like
training images. After that that projected testing image is compared with previously
computed subspaces of the training data. For the comparison part
Euclidean

distanc
e or
mehalanobis distance can be used. If the distance value that is computed is close to
threshold

value (something previously defined) the image or person is recognized otherwise
he/she is not recognized. The more detailed the descr
iption (a step by step

approach
) is
described
below:

2
.2.1
Eigenspace
Creation



Load the image data into memory



Produce a centered image from the all training images that are converted to one
dimensional
vector
. That operation is done by summing all the training vectors and
crea
ting a mean vector of them. After that all the training vectors are subtracted
from that mean vector and after that all of them become mean centered.




Create data matrix
: Once we compute the mean centered data all the vectors are
combined into a one single

matrix. The matrix's size is

NxP (P: number of images
and N
: entries of each that have in their mean computed vectors) and all vectors are
concatenated in one single.



Create the covariance matrix
: The created data matrix (in previous step) is
multiplied w
ith its transpose. Therefore with that operation we got the covariance
matrix.



Compute the eigenvalues and eigenvectors : The eigen values and eigen vectors are
computed from the covariance matrix with the following equation :

ΩV =
ΛV so

here V is the eige
nvectors associated with that matrix. There are supposed to
be P
-
1 (P is the number of
images)

eigenvectors.



Order the
eigenvectors:

All the computed eigenvectors (except 0 valued ones) are
sorted from high to low according to their eigenvalues. After tha
t the sorted vectors
are combined in a one bigger one which is named eigenspace. That eigenspace is
where the other images will be projected into in the following sections.
[
3]

6



2
.2.2

Project
the

Training D
ata




Each of the mean centered images are projected

into the eigenspace we created in
the previous section. The projection operations id done by taking the dot product of
all computed eigenvectors with the mean centered image. After that operation every
image has its own eigensubspace. The eigensubspace is

just a vector like mean
centered image but, has as many entries as number of eigenvalues.



All that data is stored in XML format for further usage for testing and identifying
other images.

2
.2.3

Identify
t
he T
est Images





The previously stored data is pull
ed from XML file into the memory




The test image is mean centered as we did in “Eigenspace Creation” section.



The mean centered test image is projected in previous eigenspace as all the training
data was.



The test image's eigensubspace is compared (compari
son may be done with
Euclidean

and mehalanobis technique) with every subspace of the training images.
If a very close match occurs we can say that person is identified.

3
. Basic Modules

3.1
Motion detection:

Motion detection is a trigger for face detection

and recognition
module.

For motion detection we are looking for current and previous frame.


(Current Frame


Previous Frame) > Threshold

For this situation, we can understand that there is a motion.Threshold is a value for motion
sensitivity.

3.2

Face
Detection Module
:

The basic p
urpose of that module is getting the captured
image and searching

a face in it

and

using “fac
e detection in color images in YCbC
r space

technique. If it founds a valid face
,

it resizes it and sends it to Face Recognition Modul
e.
Otherwise it reports the result to Zone

Module that nothing interested was found.

Sub Modules
:

7



-
Lighting compensation: It uses reference white to normalize the color appearance. It
increases the success of the skin detection.

-
Skin tone detection:
It fi
nds skin tone regions in the picture and segment into connected
component.

-

Mouth and Eye Map: It finds mouth and eye in the picture to understand that it is a face.
Also it is necessary to find eye
s

to resize picture for face recognition module.

3.3

Face

Recognition Module
:
The basic purpose of t
hat module is to take

the test image
which came from the Face Detection Module and projects it into the
precomput
ed

eigenspace to see if that face is in database already or not.

Sub Modules:

-

compute_Eigenspace
:
That module uses the training data and cr
eates
an eigenspace for
further computations of test images
.

-

test_Image
: The module checks if the image is in the database or not by applying the
eigenspace projection rules that were defined in above sections.

3
.
4

Zone Module
:
That module is responsible for the rules that will be applied on different
places on the screen. When a new frame is taken it firstly should pass the Zone Module's
rules. After that if in its zone there are some rules that says that that fra
me should be sent
for face detection

and

it is sent.

Sub modules
:

-
add_Policy : That sub module adds a new policy to the current screen section. The options
are “allow_all”,”deny_all”,”allow_only [list of users]”,”deny_only [list of users]”. The
policies a
re kept in Linked list object.

-
remove_Policy: That one removes a policy rule
.

-
edit_Policy: Edits the mentioned one
.

-
list_Policy
: Gets
all

list that was added.

-
apply_policy : That is the most important
sub module

in that
main module. It works as
follow;

it scans the current security list and if it gets a match
, it quits. For example
, if the
user ha
s allow_only['xuser'] and deny_all for a specific zone. The module firstly will see if
8



the 'xuser' is in the screen if so that is a match and quits. If no match occurs the second rule
is p
rocessed which is deny_all that

is an alarm and that notifies the us
er about the current
situation. Finally if the apply_policy gets a negative result
,

it is an alert otherwise

and

no
one is disturbed.

3.5

Server Module
:
That module will be responsible for getting and sending alerts from
clients
and

send back

to the clien
ts that are on its trusted list. If someone tries to receive or
send something that is not on the trust list it will be rejected. The module mainly will be
responsible for authentication between clients and for the transportation of the alerts and
data bet
ween clients.






Figure 3
.1 Module Diagram







9



4.
Conclusions and Future Work

In conclusion, this system can make b
urglar following
, p
revent accessing forbidden areas
,
c
hild protection for accidents etc.


This s
ystem is a real time system. So its some features like face recognition and detection
can be better and more faster.

Also for the future work there can be a mobile part.

The system
can

be manageable by remote clients like mobile phones
, PDAs

and other PCs.

In that way users can receive and control alerts of the system and manage logs, videos that
system saved as critical
.

U
ser can connect remote desktop computer

with his/her mobile phone

and control

, manage
logs and videos that system saved
.
















10



REFERENCES

[1]

http://www.egm.gov.tr/

[
2
]

Face Detection in Color Images
-

Rein
-
Lien Hsu
y
, Student Member, IEEE, Mohamed
Abdel
-
Mottaleb
,
Member, IEEE, Anil K. Jain
y
, Fellow, IEEE

[
3]
ANALYSIS OF PCA
-
BASED AND FISHER

DISCRIMINANT
-
BASED IMAGE
RECOGNITION

A
L
GORITHMS

-

Wendy S. Yambor
, July 2000