Int
ern
at
i
onal
Journ
al of Ele
ctrical
an
d
Co
mput
er
En
gin
eeri
ng
(IJ
E
C
E)
Vo
l.
9
, No
.
4
,
Aug
us
t
201
9
, p
p.
2403
~
2415
IS
S
N:
20
88
-
8708
,
DOI: 10
.11
591/
ijece
.
v
9
i
4
.
pp2403
-
24
15
2403
Journ
al h
om
e
page
:
http:
//
ia
es
core
.c
om/
journa
ls
/i
ndex.
ph
p/IJECE
Autonom
ous a
b
norm
al b
ehav
i
ou
r detect
ion usin
g
traject
or
y anal
ysis
Muhamme
d Shua
au,
K
a Fei
Tha
n
g,
N
ai S
hyan
L
ai
School
of Engin
ee
ring
,
Fa
cul
t
y
o
f
Com
puti
ng,
En
gine
er
ing
&
T
echnolog
y
,
As
ia
Paci
f
ic Uni
ver
sit
y
of
T
ec
hn
olog
y
&
Innova
t
ion,
Ma
lay
si
a
Art
ic
le
In
f
o
ABSTR
A
CT
Art
ic
le
history:
Re
cei
ved
J
un
16
, 2
01
8
Re
vised
N
ov
2
1
, 2
01
8
Accepte
d
Ma
r
4
, 2
01
9
Abnorm
al
beha
viour
det
e
ct
ion
ha
s
at
tra
cted
signif
ic
a
ti
on
amount
of
at
te
nt
ion
in
the
past
d
ecade
du
e
to
inc
r
ea
sed
se
cu
rity
c
once
rns
aro
und
the
worl
d
.
The
amount
of
dat
a
from
sur
vei
llanc
e
ca
m
er
as
have
excee
d
ed
hum
an
ca
pa
ci
t
y
and
there
is
a
gre
at
er
n
ee
d
for
anomal
y
det
e
ction
s
y
st
e
m
s
for
cri
m
e
m
onit
oring.
Thi
s
pape
r
proposes
a
soluti
on
to this
proble
m
in a
r
ecept
ion area
cont
ex
t
b
y
using
tra
jector
y
ext
ra
ct
ion
through
G
aussian
Mixture
Models
and
Kalman
Filt
er
for
dat
a
associati
on.
Here
,
tr
aj
e
ctor
y
anal
y
s
is
was
per
form
ed
on
ext
r
ac
t
ed
tr
ajec
tor
ie
s
to
detec
t
four
diff
ere
n
t
anomali
es
such
as
enteri
ng
staff
area,
runn
i
ng,
loiteri
ng
an
d
squatt
ing
dow
n.
The
d
evelope
d
anomal
y
det
e
ct
ion
al
gori
thms
were
te
sted
on
vide
os
ca
ptur
ed
at
As
ia
Paci
f
i
c
Univer
sit
y
’s
re
ce
pt
ion
area.
The
se
a
lgori
th
m
s
were
abl
e
to
ac
hi
eve
a
prom
ising
d
et
e
ct
ion
accura
c
y
o
f
89%
and
a
fa
lse
posit
ive
rate
of
4.
52%
.
Ke
yw
or
d
s
:
Abn
or
m
al
b
eh
avio
ur
Anom
al
y detec
ti
on
Secu
rity
Traj
ect
or
y a
nal
ysi
s
Visu
al
s
urveil
la
nce
Copyright
©
201
9
Instit
ut
e
o
f Ad
vanc
ed
Engi
n
ee
r
ing
and
S
cienc
e
.
Al
l
rights re
serv
ed
.
Corres
pond
in
g
Aut
h
or
:
Ka
Fei
Tha
ng,
School
of E
ng
i
neer
i
ng,
Asia Pacific
U
niv
e
rsity
o
f
Te
chnolo
gy &
In
novatio
n,
Tech
no
l
og
y
Pa
rk Mal
ay
sia
, Bu
kit Jal
il
, Kual
a Lu
m
pu
r
, 570
00, Mal
ay
sia
.
Em
a
il
: dr
.k
a
.f
e
i@ap
u.
e
du.m
y
1.
INTROD
U
CTION
Abn
or
m
al
behavio
ur
detect
io
n
is
one
of
the
m
os
t
i
m
po
rtant
resea
rch
area
in
c
om
pu
te
r
vision.
It
is
a
ver
y
c
halle
nging
an
d
di
ver
se
area
t
hat
has
at
tract
ed
a
si
gnific
at
ion
am
ou
nt
of
at
te
ntio
n
in
the
past
de
cade
.
Au
t
horiti
es
an
d
c
orp
or
at
io
ns
ve
ry
oft
en
rel
y
on
s
urveil
la
nc
e
vid
e
o
fee
ds
to
m
on
it
or
pu
blic
places
a
nd
oth
e
r
com
m
on
areas
su
c
h
as
rece
ption
areas
.
H
ow
e
ve
r,
the
a
m
ou
nt
of
data
from
su
rv
ei
ll
ance
cam
eras
hav
e
exceede
d
t
he
c
apacit
y
of
hu
m
an
operato
rs.
Hu
m
an
ope
ra
tors
a
re
of
te
n
sloppy,
s
uffer
from
fati
gu
e
a
n
d
get
distract
ed
easi
l
y.
Hen
ce hu
m
an
operat
or
s
a
re
un
a
ble
to
eff
e
ct
ively
m
on
it
or
the
vid
e
o
fee
ds
an
d
co
uld
r
e
su
lt
in
dange
rous
occ
urren
ce
s
bei
ng
ne
glect
ed.
T
he
so
luti
on
t
o
t
his
pr
ob
le
m
is
to
use
a
n
aut
onom
ou
s
a
nom
al
y
detect
ion
i
n
s
urveil
la
nce
vid
eo
s
to
a
ut
om
at
ic
ally
dete
ct
wh
e
n
a
s
uspic
io
us
e
ven
t
has
occ
urred
bas
e
d
on the c
onte
xt.
Ma
ny
diff
e
re
nt
app
r
oac
hes
t
o
aut
onom
ou
s
ano
m
al
y
dete
ct
ion
ha
ve
be
en
us
e
d
by
re
searche
rs
in
recent
ye
ars.
I
n
[
1],
su
s
picious
be
hav
i
our
detect
ion
wa
s
perform
ed
by
util
isi
ng
con
te
xt
ual
in
for
m
at
ion
.
This
syst
em
c
on
sist
of
a
c
on
te
xt
sp
ace
m
od
el
that
prov
i
des
c
on
te
xt
sensiti
ve
in
f
or
m
at
ion
w
hich
wa
s
represe
nted
by
the
beh
a
viou
r
cl
ass
an
d
fr
e
quency
of
it
s
oc
currence
.
T
he
n
a
data
stream
cl
us
te
rin
g
al
gorithm
was
us
e
d
to
update
t
he
beh
a
viour
m
od
el
e
ff
ic
ie
ntly
from
the
vid
e
o
fee
d
with
li
m
it
ed
res
ources
a
nd
tim
e.
Finall
y,
an
inf
eren
ce
al
gorith
m
was
us
ed
to
cl
assify
the
beh
avi
our
by
usi
ng
the
in
for
m
at
ion
fr
om
c
urren
t
con
te
xt
and
th
e
pr
e
viously
l
earn
e
d
co
ntext
to
m
ake
an
i
nf
e
ren
ce
a
bout
an
ob
se
r
v
ed
beh
a
viou
r.
I
n
[2
]
th
e
researc
hers
pr
opos
e
d
an
uns
up
e
r
vised
a
nom
al
y
detection
syst
e
m
us
ing
featur
e
cl
us
te
ri
ng.
Ga
us
sia
n
Mi
xtu
re
Mod
el
(
GMM)
based
foregr
ound
detect
io
n
was
us
e
d
with
adap
ti
ve
reg
i
on
updati
ng
in
wh
ic
h
the
in
put
fr
am
e
was
div
ide
d
i
n
to
no
n
-
o
ver
la
pp
i
ng
N×
N
blo
ck
s
an
d
gr
a
di
ent
sim
i
la
rity
betwee
n
the
ba
ckgr
ound
an
d
input
fr
am
e
was
cal
culat
ed.
Mult
i
ple
obj
ect
tra
ckin
g
was
t
he
n
pe
rfor
m
ed
and
obj
ect
feat
ur
es
wer
e
e
xt
racted
Evaluation Warning : The document was created with Spire.PDF for Python.
IS
S
N
:
2088
-
8708
In
t J
Elec
&
C
om
p
En
g,
V
ol.
9
, N
o.
4
,
A
ugust
201
9
:
24
03
-
2415
2404
fo
ll
owe
d
by
scene
analy
sis
to
cl
assify
the
even
t.
A
no
m
al
y
detect
ion
without
pr
i
or
knowle
dge
ab
ou
t
the
env
i
ronm
ent
was
m
ade
po
s
sib
le
by
extracti
ng
patte
r
ns
th
rough
feat
ur
e
cl
ust
ering
a
nd
m
a
tc
hin
g
t
he
traj
e
ct
or
y
to
cl
us
te
r
by
c
om
par
ing
with
a
pr
e
de
fine
d
t
hr
es
hold
unde
r
Gaussi
an
distr
ibu
ti
on
to
dete
ct
abnor
m
al
par
t
of
the tra
j
ect
ory
.
The
al
gorithm
w
as a
ble to
ach
ie
ve
go
od r
es
ul
ts.
In
[
3],
ab
nor
m
al
beh
avio
ur
detect
ion
wa
s
based
on
tr
ajecto
ry
Sp
ar
s
e
Re
con
str
uction
An
al
ysi
s
(S
RA
).
Tra
j
ect
or
ie
s
extr
act
ed
fr
om
ob
j
ect
tr
ackin
g
of
nor
m
al
beh
avio
urs
wer
e
colle
ct
ed
an
d
cat
egoris
ed
in
to
diff
e
re
nt
Ro
ute
set
s
an
d
sa
m
pled
with
Least
-
square
s
Cub
ic
S
plin
e
Curves
Appro
xim
a
ti
on
(LC
SCA).
Test
trajecto
ries
wer
e
al
so
re
pr
ese
nted
with
LCSC
A
featu
res
an
d
traject
or
ie
s
we
re
cl
assifi
ed
us
i
ng
S
RA
on
the
dicti
onary
dataset
us
e
d.
In
[
4]
a
m
eth
od
was
pro
pose
d
f
o
r
l
oiter
ing
detect
ion
wh
ic
h
is
a
n
a
bnorm
a
l
beh
a
viou
r
in
m
any
con
te
xts.
The
m
e
tho
d
was
base
d
on
Traj
ect
or
y
Di
r
ect
ion
Histo
ry
An
al
ysi
s
(T
D
HA)
an
d
Inverse
Per
sp
e
ct
ive
Ma
pp
i
ng
wh
ic
h
wa
s
use
d
to
reso
l
ve
di
stortion
of
tra
je
ct
or
y
dire
ct
io
n
due
to
pe
rspect
ive
eff
e
ct
. In
T
DHA,
d
irect
io
n
be
tween
t
wo
vect
or
s
we
re
cal
cul
at
ed
f
or
dir
ect
ion
histo
ry
a
nd an
gle b
et
wee
n
them
was
cal
culat
ed t
o
analy
se d
ire
ct
ion
v
a
riat
ions betwee
n
vect
or
s
. In
[
5], a covar
ia
nce f
eat
ur
e d
escri
pto
r o
ve
r
the
whole
vid
e
o
f
ram
e
us
ing
H
orn
-
Schu
nck
op
ti
cal
flow
co
m
pu
ta
ti
on
al
gorithm
was
us
ed
to
e
nc
od
e
m
ov
ing
inf
or
m
at
ion
and
on
e
-
cl
ass s
up
port
vector m
a
chine
al
gorith
m
w
as u
sed
to c
la
ssify ab
nor
m
al
ev
ents.
In
[6
]
,
a
bnorm
al
detect
ion
al
gorithm
was
pro
posed
base
d
on
a
n
im
age
descr
ipto
r
a
nd
a
non
-
li
ne
ar
cl
a
ssific
at
ion
m
et
ho
d.
H
ist
ogram
of
op
ti
cal
flow
ori
entat
ion
w
as
us
e
d
to
encode
m
ov
ing
inf
or
m
at
ion
of
ev
er
y
fr
am
e
and
on
e
-
cl
ass
sup
port
vecto
r
m
achine
for
cl
assifi
ca
ti
on
.
T
he
n
the
researc
hers
use
d
a
sta
te
tran
sit
ion
m
od
el
to
redu
ce
false
detect
i
on
s
due
t
o
s
ho
rt
ab
norm
al
even
ts
w
hich
occ
ur
ve
ry
rar
el
y
in
sm
all
nu
m
ber
of
fr
am
es
in
the
l
ong
seq
ue
nce.
The
sta
te
trans
it
ion
m
od
el
ch
ang
e
d
s
hort
ab
norm
al
even
ts
to
norm
al
s
ta
te
and
vice
ve
rsa
a
nd
it
was
fou
nd
to
be
ve
ry
eff
e
ct
ive.
I
n
[
7]
ano
m
al
y
detect
i
on
base
d
on
a
hi
erarc
hical
ac
ti
vity
-
patte
rn
disc
ov
ery
f
ram
ewo
r
k
was
pr
opos
e
d.
I
n
t
he
offli
ne
trai
ning
pha
se,
norm
al
vid
eos
we
re
in
pu
t
an
d
i
m
ages
wer
e
s
plit
in
to
fixe
d
siz
e
cel
ls
to
get
lo
w
le
vel
visu
al
featu
res
from
the
cel
ls.
T
hen
an
al
ysi
s
was
carried
out
to
fin
d
dif
fer
e
nt
norm
al
activity
patte
rn
s
pr
es
ent
in
the
trai
ning
vi
deos.
T
hen
i
n
the
te
st
ph
ase
,
a
un
i
fied
e
nergy
f
un
ct
io
n
was
de
sig
ned
to
cal
culat
e
ano
m
al
y
ener
gy
of
each
c
el
l
in
the
te
st
fr
am
e.
Finall
y,
a
com
bin
at
io
n
of
ene
rg
y
val
ue
an
d
sp
at
ia
l
-
te
m
po
ral
relat
ion
sh
i
p
of
cel
ls
we
re
use
d
to
fi
nd
a
bn
or
m
al
reg
i
on
s
pr
e
sen
t.
In
[
8],
a
tra
j
ect
ory
base
d
sp
ars
e
rec
on
st
ru
ct
io
n
f
ram
e
work
was
us
e
d
f
or
vid
e
o
a
no
m
al
y
detect
ion
in
vo
lving
m
ulti
ple
obj
ect
s.
T
he
li
near
sp
a
rsity
m
od
el
was
ke
rn
el
iz
ed
to
e
nab
le
s
up
e
rio
r
cl
ass
separ
a
bili
ty
. Th
is l
ed
to
a
n
i
m
pr
ov
e
d detec
ti
on
rate.
In
[9
]
, a
l
oiteri
ng
a
n
al
gorith
m
w
as prop
os
e
d
to
detect
loit
erin
g.
T
raj
ect
ory
ex
tract
io
n w
as p
er
f
or
m
ed
and
loit
eri
ng
de
te
ct
ion
was
pe
rfor
m
ed
by
analy
zi
ng
the
tr
ajecto
ry
thr
ough
cal
culat
ed
an
gles
betwee
n
ve
ct
ors
on
the
tra
j
ect
ory
and
a
fixe
d
po
i
nt.
The
n
tra
j
ect
ory
is
con
s
idere
d
loit
erin
g
if
the
traject
or
y
durati
on
is
m
or
e
than
a
fi
xed
ti
m
e
or
the
va
ri
ance
of
the
dif
fer
e
nce
bet
wee
n
the
a
ng
le
s
is
m
or
e
than
a
fixed
c
onsta
nt.
I
n
[
10
]
,
an
an
om
al
y
d
et
ect
ion
syst
em
was
pro
posed
usi
ng
ob
je
ct
trackin
g
a
nd
cl
assify
i
ng
act
ivit
ie
s
based
on
sem
antic
s
-
based
a
ppr
oach.
T
he
r
esearc
hers
detect
ed
su
s
pi
ci
ou
s
act
ivit
ie
s
su
c
h
as
loit
e
rin
g,
st
olen
l
ugga
ge,
aband
on
e
d
ob
j
ect
s,
et
c.
I
n
[11],
histo
gr
a
m
of
opti
cal
flo
w
or
ie
ntati
on
s
was
us
e
d
to
e
nc
od
e
m
ov
ing
inf
or
m
at
ion
an
d
one
cl
ass
suppo
rt
vector
m
achine
or
ke
r
ne
l
pr
incipal
co
m
po
nen
t
analy
sis
m
et
ho
d
wa
s
us
ed
for
cl
assifi
cat
ion o
f
a
bnorm
al
act
ivit
ie
s.
In
[
12
]
,
the
res
earche
rs
highli
gh
te
d
th
at
the
pr
ese
nce
of
a
pa
ssive,
sta
ndin
g
c
row
d
is
a
n
i
nd
i
cat
io
n
a
n
abno
rm
al
event
cou
ld
occur.
The
m
et
ho
do
l
og
y
in
vo
l
ve
d
identify
in
g
sti
ll
crowd
by
us
i
ng
e
dges
an
d
colo
ur
var
ia
ti
ons
dom
inate
d
by
s
kin
colo
ur
within
t
he
cr
owd.
Wh
en
the
cr
owd
was
detect
ed
f
or
a
certai
n
nu
m
ber
of
fr
am
es,
the
incident
was
a
na
ly
sed
for
ab
no
rm
al
beh
a
viou
r.
I
n
[
13]
,
an
om
al
y
detection
was
base
d
on
sh
ort
local
traject
or
i
es
of
f
oreg
rou
nd
supe
r
-
pix
el
s.
I
n
[14],
a
n
onli
ne
fr
am
ework
f
or
vide
o
an
om
aly
detect
ion
was
pro
po
se
d
with
com
pact
set
of
hi
gh
ly
des
cripti
ve
featu
r
es
ext
racted
f
ro
m
a
no
vel
c
el
l
structu
re.
A
cel
l
structu
re
was
const
ru
ct
e
d
f
or
the
entire
sce
ne
to
de
fine
s
pa
ti
o
-
te
m
po
ral
r
egio
ns
to
be
a
naly
sed
a
nd
co
m
pact
set
of
featur
e
s
we
re
e
xtracte
d.
The
c
om
pact
featu
res
we
re
the
n
analy
s
ed
t
o
c
onstruc
t
var
i
ous
m
odel
s
an
d
finall
y
an
inf
eren
ce
m
echan
ism
that
us
es
local
sp
at
io
tem
po
ral
nei
ghbour
hood
of
cel
ls
wer
e
us
e
d
t
o
disti
nguish ab
norm
al
acti
on
s.
In
[15],
a
rea
l
-
tim
e
m
ov
ing
obj
ect
act
io
n
recog
niti
on
s
yst
e
m
was
propose
d
base
d
on
m
otion
analy
sis.
The
syst
e
m
was
i
m
ple
m
ented
on
a
PixelSt
rea
m
s
-
bas
ed
FPGA.
The
m
ov
in
g
obj
ect
detect
ion
wa
s
perform
ed
by
the
delta
-
fr
am
e
m
e
tho
d
w
hi
ch
determ
ines
the
a
bs
ol
ute
diff
e
re
nce
between
tw
o
s
uc
cessi
ve
i
m
ages.
This
m
et
ho
d
was
use
d
because
of
it
s
abili
ty
to
ad
apt
to
c
ha
nges
in
li
gh
t
i
ntensit
y
var
ia
ti
ons.
I
n
[
16
]
,
a
h
a
rdwar
e
m
od
el
t
o
m
easur
e
m
otion
es
tim
a
ti
on
wa
s
pro
po
se
d
us
in
g
bit
plane
m
at
ching
al
gorithm
.
The
al
gorit
hm
cal
culat
ed
th
e
true
m
otion
betwee
n
vi
de
o
f
ram
es
fo
r
a
blo
c
k
an
d
rem
ov
ed
te
m
po
ral
redu
nd
a
ncies
be
tween
vid
e
o f
ram
es. A
lso,
it
tracke
d
the
m
otion
of f
ea
tu
res
in vide
o
se
que
nces.
In
t
his
pa
per,
a
ru
le
-
base
d
ano
m
al
y
detect
ion
syst
em
in
a
rece
pti
on
a
rea
co
ntext
is
pro
po
se
d.
The
a
dvanta
ge
of
s
uch
a
sys
tem
is
that
the
la
rg
e
am
ounts
of
la
belle
d
tr
ai
nin
g
data
re
qu
i
red
with
m
achine
le
arn
in
g
a
ppr
oa
ches
a
re
no
t
ne
e
ded
an
d
t
he
syst
e
m
is
m
or
e
reli
able.
T
he
a
no
m
al
ie
s
that
are
detect
ed
with
the
syst
e
m
are
ru
nn
i
ng,
enteri
ng
the
sta
ff
ar
ea,
loit
ering
a
nd
s
udde
n
squat
dow
n.
Sudd
e
n
squat
do
wn
is
Evaluation Warning : The document was created with Spire.PDF for Python.
In
t J
Elec
&
C
om
p
En
g
IS
S
N:
20
88
-
8708
Auton
omo
us
abnor
ma
l
be
hav
iou
r
d
et
ect
io
n usin
g
tr
aject
ory
ana
ly
sis
(
M
uham
med Sh
uaau
)
2405
consi
der
e
d
as
an
an
om
al
y
becau
se
if
a
pe
rson
s
udde
nly
sq
uats
dow
n,
it
cou
ld
m
ea
n
that
there
w
as
an
aggressi
ve
act
ion
f
ro
m
so
m
e
body
s
uch
as
s
hootin
g
or
t
hrow
i
ng
thin
gs
.
The
blo
c
k
dia
gr
am
of
t
he
propose
d
syst
e
m
arch
it
ect
ur
e is
sho
wn
in Fig
ure
1.
The
rest
of
th
e
pap
e
r
is
or
ga
nised
as
f
ollo
ws.
Sect
io
n
2
pr
ese
nts
the
vi
deo
processi
ng
al
g
or
it
hm
.
Mult
iple
obj
e
ct
trackin
g
al
gorithm
s
and
an
om
aly
detect
ion
al
go
rith
m
s
are
pr
ese
nted
i
n
sect
io
ns
3
-
7.
In
sect
io
n
8,
r
esults
of
te
sti
ng
the
al
gorith
m
s
al
on
g
with
a
discuss
i
on
are
presente
d.
The
pa
pe
r
is
f
inall
y
con
cl
ud
e
d
i
n
s
ect
ion
9.
F
o
r
e
g
r
o
u
n
d
d
e
t
e
c
t
i
o
n
u
s
i
n
g
G
M
M
M
u
l
t
i
p
l
e
O
b
j
e
c
t
t
r
a
c
k
i
n
g
u
s
i
n
g
K
a
l
m
a
n
F
i
l
t
e
r
F
e
a
t
u
r
e
e
x
t
r
a
c
t
i
o
n
(
t
r
a
j
e
c
t
o
r
y
,
B
L
O
B
a
r
e
a
,
v
e
l
o
c
i
t
y
)
C
l
a
s
s
i
f
i
c
a
t
i
o
n
b
a
s
e
d
o
n
f
e
a
t
u
r
e
s
O
u
t
p
u
t
r
e
s
u
l
t
I
n
p
u
t
v
i
d
e
o
Figure
1.
Pro
pose
d
syst
em
b
lock
d
ia
gr
am
2.
VID
E
O P
ROCESSI
NG AL
GORIT
HM
Fig
ure
2
sho
w
s
the
flo
wc
hart
of
vi
de
o
pro
cessi
ng
al
gorit
hm
.
The
al
gor
it
h
m
is
run
unti
l
al
l
the
fr
am
es
of
t
he
vid
e
o
file
are
processe
d.
O
bj
ect
trackin
g
is
pe
rfor
m
ed
fir
st,
w
hich
rea
ds
the
fr
am
e
from
the
vid
e
o
file
and
detect
s
m
ov
in
g
obj
ect
s.
The
de
te
ct
ed
m
ov
in
g
obj
ect
s
are
t
hen
ass
ociat
ed
to
tracks
w
hic
h
stor
e
the
tra
j
ect
ory
histor
y
an
d
m
a
ny
oth
er
detai
ls
about
the
m
ov
in
g
obj
ect
.
T
he
trackin
g
m
e
thod
is
exp
la
in
ed
in
the n
e
xt secti
on.
S
t
a
r
t
A
r
e
t
h
e
r
e
a
n
y
m
o
r
e
f
r
a
m
e
s
t
o
r
e
a
d
i
n
v
i
d
e
o
f
i
l
e
?
S
t
o
p
N
O
T
r
a
c
k
m
o
v
i
n
g
o
b
j
e
c
t
s
Y
E
S
I
s
t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Af
te
r
cal
li
n
g
obj
ect
t
rack
i
ng
m
et
ho
d,
the
al
gorithm
checks
to
see
i
f
the
m
et
ho
d
retu
rned
a
ny
track
s
of
a
m
ov
in
g
ob
j
ect
w
hich
co
nt
ai
ns
the
traje
ct
or
y
hist
or
y.
I
f
no
trac
ks
a
re
r
et
urned,
the
al
gorithm
con
ti
nues
by
disp
la
yi
ng
the f
ram
e
and
m
oves
on
to p
r
oces
sing
n
e
xt
f
ra
m
e.
I
f
trac
ks
are
av
ai
la
ble
the
n
t
he
al
gorithm
checks
to
see
if
t
he
tra
ck
is
a
reli
able
track.
Re
li
able
tracks
are
t
hose
trac
ks
w
hose
total
visible
co
un
t
is
m
or
e
than
a
Evaluation Warning : The document was created with Spire.PDF for Python.
IS
S
N
:
2088
-
8708
In
t J
Elec
&
C
om
p
En
g,
V
ol.
9
, N
o.
4
,
A
ugust
201
9
:
24
03
-
2415
2406
set
threshold
.
This
is
done
t
o
re
du
ce
false
detect
ion
s
of
noise
as
m
ov
ing
obje
ct
s
due
t
o
sm
all
illu
m
i
nation
changes
.
The
t
hr
es
hold
has
to
be
determ
ined
ex
per
im
ental
ly
and
it
depends
on
the
f
r
a
m
e
rate
of
th
e
vid
e
o
input
use
d.
If
t
he
th
res
ho
l
d
is
too
high,
act
ua
l
m
ov
ing
obje
ct
s
m
igh
t
not
be
detect
ed
a
nd
if
t
he
value
is
to
o
low,
a
l
ot
of
noise
will
be
de
te
ct
ed.
The
t
hresh
old
us
ed
i
n
the
pro
gr
am
was
8
an
d
the
fra
m
e
rate
of
the
vid
e
o
us
e
d
was
9.8
f
r
a
m
es
per
seco
nd.
A
n
obj
ect
has
to
be
m
ov
ing
f
or
at
le
ast
8
fr
am
es
bef
or
e
it
s
trajecto
ry
histor
y
will
b
e a
naly
sed.
Wh
e
n
reli
able
tracks
of
m
ov
i
ng
ob
j
ec
ts
are
a
vaila
ble,
their
tr
ajec
tory
hist
or
y
i
s
analy
sed
.
The
tra
j
ect
ori
es
are
analy
se
d
in
a
loop
s
o
that
the
al
gori
thm
can
detect
m
ulti
ple
people
an
d
che
ck
their
trajecto
ry
histo
ries
f
or
an
om
alies.
They
a
re
c
heck
e
d
t
o
see
if
the
pe
rs
on
is
in
the
sta
ff
are
a,
r
unni
ng,
loit
erin
g
or
s
qu
at
ti
ng
do
wn.
If
a
n
an
oma
ly
is
detect
ed
in
the
traject
ory
analy
sis,
the
trajecto
ry
is
cl
assifi
ed
as
ab
norm
al
and
it
is
hi
gh
l
igh
te
d
wit
h
a
red
bo
unding
box
a
nd
la
belle
d
with
a
desc
riptio
n
of
the
ano
m
al
y.
W
he
n
on
e
ano
m
al
y i
s d
et
ect
ed
in a t
raj
e
ct
or
y, the
sam
e
traj
ect
or
y i
s
not chec
ke
d
f
or
oth
e
r
an
om
al
ies
beca
us
e t
hat p
ers
on
will
already
be
classi
fied
as
a
bnorm
al
.
If
no
a
no
m
al
ies
are
detect
ed
in
the
tr
aject
ory
analy
sis,
the
n
a
gr
ee
n
boun
ding
box
is
dr
awn
ar
ound
the
pe
rs
on
a
nd
is
la
bell
ed
as
“M
ovin
g”.
On
ce
al
l
the
traject
or
ie
s
a
re
analy
sed
a
nd
m
ov
ing
peop
le
are
cl
assifi
ed
an
d
highli
gh
te
d,
t
he
fr
am
e
is
disp
la
ye
d
a
nd
t
he
al
gorithm
c
on
ti
nues
proce
ssing
t
he
rem
ai
nin
g
fr
am
es
un
ti
l
al
l
the
f
ram
es
a
re
pr
ocesse
d.
The
m
et
ho
ds
us
e
d
to
detect
the
a
no
m
al
ie
s
are
e
xp
la
i
ned
in
th
e
fo
ll
owin
g
sect
i
on
s
.
3.
MU
LT
IPLE
OBJECT
TR
ACKIN
G
AL
GORIT
HM
Figure
3
sho
w
s
the
m
ulti
ple
obj
ect
trac
king
m
et
ho
d
pro
posed.
T
he
fr
am
e
is
read
f
r
om
vid
eo
file
and
foregr
ound
m
a
sk
is
obta
ine
d
by
us
i
ng
GM
M
and
t
hen
m
orp
ho
l
og
ic
al
openi
ng
an
d
cl
osi
ng
with
rectangula
r
structu
rin
g
el
em
ents
are
done
to
rem
ov
e
no
i
se.
The
n
bl
ob
analy
sis
is
per
f
or
m
ed
to
detec
t
the
m
ov
ing
obj
ect
s
.
The
BL
OB
a
na
ly
sis
returns
the
boun
ding
boxe
s
of
the
m
ov
i
ng
obj
ect
s
and
their
ar
ea
in
pix
el
s.
Th
e
BLOB
area is
the
n use
d
to
fur
t
her re
duce
detect
ion n
oise.
S
t
a
r
t
S
t
o
p
M
a
s
k
=
g
e
t
f
o
r
e
g
r
o
u
n
d
m
a
s
k
o
f
F
r
a
m
e
u
s
i
n
g
G
M
M
M
a
s
k
=
p
e
r
f
o
r
m
m
o
r
p
h
o
l
o
g
i
c
a
l
p
r
o
c
e
s
s
i
n
g
o
n
M
a
s
k
B
b
o
x
e
s
,
B
l
o
b
a
r
e
a
s
=
p
e
r
f
o
r
m
b
l
o
b
a
n
a
l
y
s
i
s
o
n
M
a
s
k
F
r
a
m
e
=
R
e
a
d
n
e
x
t
v
i
d
e
o
f
r
a
m
e
R
e
m
o
v
e
d
e
t
e
c
t
i
o
n
s
f
r
o
m
B
b
o
x
e
s
a
n
d
B
l
o
b
a
r
e
a
s
i
f
b
l
o
b
a
r
e
a
<
A
r
e
a
t
h
r
e
s
h
o
l
d
P
r
e
d
i
c
t
n
e
w
l
o
c
a
t
i
o
n
s
o
f
e
x
i
s
t
i
n
g
T
r
a
c
k
s
u
s
i
n
g
K
a
l
m
a
n
F
i
l
t
e
r
C
o
s
t
M
a
t
r
i
x
=
d
i
s
t
a
n
c
e
s
b
e
t
w
e
e
n
p
r
e
d
i
c
t
e
d
B
b
o
x
a
n
d
e
a
c
h
d
e
t
e
c
t
e
d
B
b
o
x
A
s
s
i
g
n
d
e
t
e
c
t
i
o
n
s
t
o
T
r
a
c
k
s
u
s
i
n
g
H
u
n
g
a
r
i
a
n
a
s
s
i
g
n
m
e
n
t
A
l
g
o
r
i
t
h
m
b
a
s
e
d
o
n
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c
am
era.
Fig
ure
4
sh
ows
the t
hr
e
e
re
gions in
the
r
ece
ption area
to il
lustrate
thi
s approac
h.
The
BLOB
a
r
ea
for
a
perso
n
wal
king
in
r
egio
n
3
is
m
uch
m
or
e
than
oth
e
r
re
gions
because
this
reg
i
on
is
cl
ose
r
to
cam
era
posit
ion
.
T
he
m
i
nim
u
m
BLOB
area
thres
hol
d
f
or
t
his
re
gio
n
is
higher
a
nd
if
a
detect
ion
area
is
s
m
aller
than
the
threshold
,
that
detect
ion
is
delet
ed.
This
is
becau
se
ve
r
y
s
m
all
detect
i
on
s
in
this re
gion is
noise
du
e
to
il
lu
m
inati
on
c
hanges. Si
m
i
la
rly
, r
egi
on 2 an
d re
gion
1
is
proce
ssed base
d on
BLOB
area.
The
sam
e
per
s
on
walkin
g
in
re
gion
1
ha
s
a
m
uch
s
m
a
ll
er
BLOB
area
com
par
ed
to
walkin
g
i
n
re
gi
on
3.
The regi
on m
i
nim
u
m
area th
r
esh
old
s
s
ho
ud
be
determ
ined exp
e
rim
ental
l
y
Evaluation Warning : The document was created with Spire.PDF for Python.
In
t J
Elec
&
C
om
p
En
g
IS
S
N:
20
88
-
8708
Auton
omo
us
abnor
ma
l
be
hav
iou
r
d
et
ect
io
n usin
g
tr
aject
ory
ana
ly
sis
(
M
uham
med Sh
uaau
)
2407
Figure
4
.
Mult
iple o
bject
trac
king m
et
ho
d
Af
te
r
delet
in
g
t
he
detect
ion
s
ba
sed
on
are
a,
t
he
nex
t
ste
p
is
to
assig
n
detec
ti
on
s
t
o
trac
ks
and
ad
d
t
he
boundi
ng
box
coor
din
at
es
to
trajecto
ry
histo
ry
of
the
trac
k.
In
or
der
to
do
this,
Kalm
an
Fil
te
r
is
first
us
ed
t
o
pr
e
dict
the
ne
xt
locat
ion
of
th
e
exist
in
g
trac
ks
wh
ic
h
a
re
al
read
y
as
sig
ned.
I
f
the
re
a
re
no
e
xisti
ng
trac
ks
t
he
n
the
al
gorithm
create
s
ne
w
tr
ack
for
eac
h
de
te
ct
ion
a
nd
in
the
fo
ll
owin
g
cal
ls
to
this
functi
on
to
proc
ess
th
e
rem
ai
nin
g
f
ra
m
es o
f
t
he vide
o fil
e, it pre
dic
ts t
he next l
oca
ti
on
us
in
g Kal
m
an
Fil
te
r
if m
otion i
s
detect
ed.
Af
te
r
predict
in
g
the
nex
t
l
oca
ti
on
s,
c
os
t
m
atr
ix
is
cal
culat
e
d.
C
os
t
m
a
trix
is
an
M
by
N
m
at
rix
that
con
ta
in
s
the
E
uclidia
n
distan
ces
betwe
en
ea
ch
detect
ion
a
nd
pr
e
dicte
d
lo
c
at
ion
of
e
ve
ry
existi
ng
t
rack
wh
e
re
M
repre
se
nts
t
he
nu
m
ber
of
t
rack
s
an
d
N
is
the
num
ber
of
detect
ion
s
.
Eac
h
value
i
n
t
he
m
at
rix
re
pr
ese
nts
the
cost
of
a
ssig
ni
ng
the
N
th
dete
ct
ion
t
he
M
th
t
rack.
Af
te
r
cal
culat
ing
the
c
ost
m
a
trix,
Jam
es
Mu
nkres
’s
var
ia
nt
of
the
H
unga
ri
an
assig
nm
ent
al
gorithm
is
us
e
d
to
determ
ine
wh
ic
h
trac
ks
are
m
issi
ng
and
wh
ic
h
dete
ct
ion
s
sh
oul
d
be
gin
new
t
rack
s
.
T
he
al
gorithm
is
al
so
s
upplied
with
a
scal
a
r
val
ue
w
hich
is
the
cost
of
no
n
-
assignm
ent.
This
value
repre
sents
the
cost
of
a
trac
k
or
de
te
ct
ion
rem
ain
in
g
unassig
ne
d.
T
his
value
was
al
so
determ
ined
ex
per
im
ental
ly
a
nd
20
is
the
va
lue
us
e
d
in
th
e
i
m
ple
m
entat
io
n.
T
he
assig
nm
ent
al
gorithm
returns
the
ind
ic
es
of
the
track
s
w
hich
a
re
assig
ned
a
nd
un
ass
ign
e
d.
It
al
so
returns
t
he
ind
ic
es
of
una
ssigne
d
detect
ion
s
.
Fo
r
assi
gn
e
d
de
te
c
ti
on
s
retu
r
ned
f
r
om
assig
nm
ent
al
go
rith
m
,
the
pr
edict
e
d
boun
ding
bo
x
is
rep
la
ced
with
the
act
ual
detect
ed
bo
unding
bo
x.
T
he
n
track
’s
a
ge
a
nd
t
otal
visible
count
are
in
creased
.
Co
ns
e
cutive
inv
isi
ble
c
ount
of
the
trac
k
i
s
set
to
0.
F
or
unassig
ne
d
tr
acks
t
he
pr
e
di
ct
ed
bo
undi
ng
box
is
delet
ed
from
trajecto
ry
hist
or
y
because
traject
or
y
a
naly
sis
sh
ould
only
be
perfor
m
ed
on
act
ua
l
detect
ion
s
a
nd
no
t
pr
e
dicti
on
s
. T
he
n
the
trac
k’
s
ot
her
pro
per
ti
es
are set acc
ordi
ng
ly
.
Fo
r
un
a
ssig
ne
d
detect
ions,
a
new
track
is
a
dd
e
d
an
d
sto
re
d
in
the
tracks
arr
ay
.
A
fter
th
at
tracks
are
delet
ed
if
the
track
’s
a
ge
is
le
ss
tha
n
a
ge
t
hresh
old
an
d
(t
otal
visible
c
ount/
age
)
is
le
ss
than
0.6
.
T
he
above
conditi
on
will
beco
m
e
true
if
a
track
is
l
os
t
f
or
s
om
e
fr
am
es
wh
ic
h
c
ou
l
d
m
ean
that
the
p
ers
on
st
oppe
d
m
ov
ing
or
if
a
no
ise
is
detect
ed
an
d
only
ap
pear
s
for
a
very
sh
or
t
ti
m
e.
If
a
per
son
sto
pped
m
ov
in
g
an
d
the
track
of
that
per
s
on
is
del
et
ed,
w
he
n
th
e
per
s
on
sta
rt
s
m
ov
in
g
aga
in
a
new
t
ra
ck
will
be
cr
eat
ed.
The
i
nfor
m
at
ion
st
or
e
d
i
n
eac
h
trac
k
are
t
rac
k
ID, b
ou
nd
i
ng
box hist
or
y,
B
LOB
a
rea h
ist
ory
,
a
ge,
t
otal
vi
sible
count a
nd cons
ecuti
ve
i
nv
isi
bl
e co
un
t
.
The
trac
k
I
D
of
1
is
assi
gned
to
first
trac
k
an
d
t
hen
it
is
increm
ented
for
eac
h
of
th
e
fo
ll
owi
ng
tracks.
A
new
boundi
ng
box
is
ad
ded
to
the
e
nd
of
boundi
ng
bo
x
a
rr
ay
of
the
trac
k
e
ve
ry
tim
e
it
is
de
te
ct
ed
and
t
his
f
or
m
s
the
boun
ding
box
histo
ry
w
hich
is
al
so
t
he
tr
ajecto
ry
histo
r
y.
Ce
ntro
i
ds
ar
e
the
m
idd
le
po
int o
f
the
bo
unding
box.
BLOB
a
r
ea
histo
ry
is
a
lso
sa
ved
i
n
a
si
m
il
ar
way
to
boundi
ng
b
ox
histor
y.
The
se
two
pro
per
ti
es
are
la
te
r
analy
sed
for
a
no
m
al
y
detect
ion
.
T
he
BLOB
area
hi
story
is
on
ly
use
d
in
the
dete
ct
ion
of
sq
ua
tt
ing
dow
n
a
no
m
al
y
tog
et
he
r
with
tr
ajecto
ry
hist
ory
.
The
a
ge,
t
otal
visible
co
un
t
an
d
c
onse
cutiv
e
inv
isi
ble
c
ount
pro
pe
rti
es
are
u
se
d
to
m
anage
track
s
a
nd
to
d
et
erm
ine
reli
able
trac
ks
.
It
is
al
so
u
se
d
t
o
re
m
ov
e
no
ise
as e
xp
la
i
ned b
e
f
or
e.
4.
ALGO
RITH
M
TO
D
ET
E
CT ENTE
RI
NG STAF
F
A
REA
The
al
gorithm
us
e
d
to
detect
wh
e
n
a
pe
rson
enters
the
sta
f
f
area
is
sh
ow
n
in
Fig
ur
e
5
.
The
ob
j
ect
’s
la
st
boundi
ng
box
is
us
e
d
t
o
get
the
la
st
ce
nt
ro
id
w
hich
gi
ves
t
he
obj
ect
’
s
cu
rr
e
nt
locat
i
on.
T
his
ce
ntr
oi
d’
s
x
and
y
co
ordina
te
s
are
check
e
d
to
see
if
it
is
inside
the
rec
eption
desk
sta
ff
area
w
hich
can
be
bo
unde
d
by
a
rectan
gle.
If
t
he
ce
ntr
oid
is
w
it
hin
the
rece
ption
sta
ff
area
r
ect
ang
le
,
the
obj
ect
’s
tra
j
ect
ory
histo
ry
is
furthe
r
analy
sed
to
se
e
if
the
ob
j
ect
ca
m
e
fr
om
ou
tsi
de
the
recept
ion
sta
ff
ar
ea.
This
is
done
to
avo
id
cl
assify
ing
as
abno
rm
al
wh
en
the
rece
ptio
ni
st
m
ov
es
in
side
the
r
ece
ptio
n
a
rea.
If
any
of
t
he
obj
ect
’
s
previ
ou
s
cent
r
oid
is
Evaluation Warning : The document was created with Spire.PDF for Python.
IS
S
N
:
2088
-
8708
In
t J
Elec
&
C
om
p
En
g,
V
ol.
9
, N
o.
4
,
A
ugust
201
9
:
24
03
-
2415
2408
ou
tsi
de
the
rec
eption
a
rea
re
ct
ang
le
,
the
n
the
pe
rson
cam
e
fr
om
ou
tsi
de
and
that
is
de
te
ct
ed
as
abno
rm
al.
Howe
ver,
if
none
of
t
he
obje
ct
’s
pre
vious
centr
oid
s
are
outsi
de
t
he
r
ecepti
on
area
rectan
gl
e,
that
is
not
detect
ed
as
abn
or
m
al
b
ecause
it
m
eans th
at
th
e rece
ption
ist
i
s m
ov
ing.
S
t
a
r
t
a
b
n
o
r
m
a
l
=
f
a
l
s
e
I
s
t
h
e
o
b
j
e
c
t
’
s
l
a
s
t
c
e
n
t
r
o
i
d
i
n
s
i
d
e
t
h
e
r
e
c
e
p
t
i
o
n
d
e
s
k
r
e
c
t
a
n
g
l
e
?
S
t
o
p
N
O
I
s
a
n
y
o
f
t
h
e
o
b
j
e
c
t
’
s
p
r
e
v
i
o
u
s
c
e
n
t
r
o
i
d
o
u
t
o
f
r
e
c
e
p
t
i
o
n
d
e
s
k
r
e
c
t
a
n
g
l
e
?
Y
E
S
N
O
a
b
n
o
r
m
a
l
=
t
r
u
e
Y
E
S
Figure
5
.
Al
gorithm
to
detect
w
he
n
a
p
e
rs
on
enters
sta
ff are
a
5.
ALGO
RITH
M
TO
D
ET
E
CT RU
NNIN
G
Fig
ure
6
s
how
s
the
al
gorith
m
that
is
us
ed
to
detect
wh
e
n
a
per
s
on
is
run
ning.
I
f
the
nu
m
ber
of
boundi
ng
bo
xe
s
or
ce
ntro
i
ds
i
n
the
tra
j
ect
ory
histor
y
of
th
e
track
is
m
or
e
than
the
num
ber
of
fr
am
es
use
d
to
fin
d
vel
ocity
then
t
he
a
ver
a
ge
velocit
y
of
the
trac
k
is
cal
c
ulate
d.
T
he
num
ber
of
f
ram
es
to
co
ns
i
der
wh
e
n
cal
culat
ing
vel
ocity
is
a
pr
e
de
fine
d
value
whose
m
os
t
optim
u
m
value
ca
n
be
determ
ined
ex
per
im
e
ntall
y.
In
t
his
re
searc
h
,
10
f
ram
es
wer
e
us
e
d
t
o
f
ind
velocit
y
a
nd
this
is
rou
ghly
eq
uiv
al
ent
to
1
sec
ond
s
ince
the
fr
am
e
rate
of
t
he
te
st
vi
deo
s
wer
e
9.8
fr
am
es
pe
r
sec
ond.
S
uch
a
sm
al
l
value
was
us
e
d
be
cause
the
rece
ption
area
is
ver
y
sm
al
l
and
it
ta
kes
ver
y
short
tim
e
to
ru
n
ac
ro
ss
the
area.
If
th
e
nu
m
ber
of
points
in
the
traj
ect
or
y
histor
y a
re less
than f
ram
es n
eede
d t
o
cal
c
ula
te
v
el
ocity
the
n
the
m
et
ho
d r
et
urns
the
tra
j
e
ct
or
y as
norm
al
.
If
t
her
e
a
re
e
noug
h
po
i
nts
in
the
traj
ect
or
y
histor
y
t
hen
t
he
instanta
ne
ou
s
velocit
y
bet
ween
ad
j
ace
nt
centr
oid
s
a
re
c
al
culat
ed.
Eac
h
cent
ro
i
d
can
be
re
pr
ese
nte
d
by
it
s
x
a
nd
y
coo
r
dina
te
s
and
t
his
is
show
n
i
n
Figure
7
.
The
velocit
ie
s
of
the
trajecto
ries
are
cal
c
ulate
d
in
a
loop
w
hich
r
uns
dow
nw
a
r
d.
The
c
ounter
var
ia
ble
i
is
ini
ti
al
ise
d
to
the
l
ast
centr
oid
in
the
be
ginni
ng
and
the
l
oop
is
r
un
unti
l
the
c
ounter
dec
reas
es
by
the
num
ber
of
fr
am
es
need
e
d
to
cal
culat
e
th
e
velocit
y.
I
n
each
it
erati
on
t
he
insta
ntane
ous
ve
locit
y
between
adj
ace
nt ce
ntr
oi
ds
i a
nd i
-
1 ar
e cal
culat
ed
.
Eucli
dean
d
ist
a
nc
e
=
√
(
X
i
−
X
i
−
1
)
2
+
(
Y
i
−
Y
i
−
1
)
2
(1)
Vel
oc
ity
=
Eucli
dean
distanc
e
1
fra
me
ra
te
⁄
(2)
The
E
uclidea
n
distance
is
cal
culat
ed
us
in
g
t
he
f
orm
ula
in
(
1
)
a
nd
the
n
th
e
velocit
y
is
c
al
culat
ed
by
div
idi
ng
the
distance
by
dura
ti
on
of
the
fr
a
m
e
as
in
(
2
)
.
This
velocit
y
is
add
e
d
to
a
var
i
able
to
find
th
e
total
velocit
y
of
al
l
it
erati
on
s.
The
n
wh
e
n
t
he
l
oop
has
finis
hed,
the
a
ver
a
ge
ve
locit
y
is
cal
culat
ed
by
div
i
din
g
th
e
total
velocit
y
by
the
nu
m
ber
of
fr
am
es
us
ed
to
fin
d
the
velocit
y.
The
n
the
aver
age
ve
locit
y
is
com
par
e
d
against
t
he
r
un
ning
th
res
ho
l
d
wh
ic
h
was
det
erm
ined
ex
per
i
m
ental
ly
.
The
value
us
e
d
for
run
ning
th
res
hold
is
150.
If
t
he
ave
rag
e
velocit
y
exceed
s
this
thr
esh
old
the
n
the
trajecto
ry
is
con
si
der
e
d
a
bnorm
al
.
If
the
thr
esh
ol
d
is n
ot ex
cee
de
d
the
n
t
he
tra
j
e
ct
or
y i
s c
onsid
ered n
or
m
al
.
Evaluation Warning : The document was created with Spire.PDF for Python.
In
t J
Elec
&
C
om
p
En
g
IS
S
N:
20
88
-
8708
Auton
omo
us
abnor
ma
l
be
hav
iou
r
d
et
ect
io
n usin
g
tr
aject
ory
ana
ly
sis
(
M
uham
med Sh
uaau
)
2409
S
t
a
r
t
a
b
n
o
r
m
a
l
=
f
a
l
s
e
I
s
n
u
m
b
e
r
o
f
c
e
n
t
r
o
i
d
p
o
i
n
t
s
i
n
o
b
j
e
c
t
’
s
t
r
a
j
e
c
t
o
r
y
h
i
s
t
o
r
y
>
F
r
a
m
e
s
T
o
F
i
n
d
V
?
V
e
l
o
c
i
t
y
=
0
n
=
i
n
d
e
x
o
f
o
b
j
e
c
t
’
s
l
a
s
t
c
e
n
t
r
o
i
d
i
=
n
Y
E
S
S
t
o
p
N
O
I
s
i
>
(
n
-
F
r
a
m
e
s
T
o
F
i
n
d
V
)
?
d
i
s
t
a
n
c
e
=
E
u
c
l
i
d
e
a
n
d
i
s
t
a
n
c
e
b
e
t
w
e
e
n
c
e
n
t
r
o
i
d
i
a
n
d
(
i
-
1
)
V
e
l
o
c
i
t
y
=
V
e
l
o
c
i
t
y
+
(
d
i
s
t
a
n
c
e
/
(
1
/
f
r
a
m
e
r
a
t
e
)
)
Y
E
S
i
=
i
-
1
V
e
l
o
c
i
t
y
=
V
e
l
o
c
i
t
y
/
F
r
a
m
e
s
T
o
F
i
n
d
V
N
O
I
s
V
e
l
o
c
i
t
y
>
r
u
n
n
i
n
g
t
h
r
e
s
h
o
l
d
?
N
O
a
b
n
o
r
m
a
l
=
t
r
u
e
Y
E
S
Figure
6
.
Al
gorithm
to
detect
w
he
n
a
p
e
rs
on
is run
ning
Fig
ure
7
.
Ce
ntr
oid
points
on a
traject
or
y
6.
ALGO
RITH
M
TO
D
ET
E
CT LOITE
R
I
NG
Figure
8
s
how
s
the
loit
erin
g
detect
ion
al
go
r
it
h
m
.
The
m
eth
od
us
ed
is
a
dopte
d
f
ro
m
[9]
.
The
tw
o
pr
e
def
i
ned
c
on
sta
nts u
se
d
in t
he
be
ginnin
g o
f
the alg
or
it
hm
are
m
ini
m
u
m
age of
the trac
k
be
f
or
e it
s trajec
tory
can
be
a
naly
sed
f
or
loit
eri
ng
and
t
he
m
axi
mu
m
age
of
the
track
exce
edi
ng
w
hich
will
cause
the
trac
k
to
be
detect
ed
as
loit
erin
g.
In
the
i
m
ple
m
entat
ion
the
m
ini
m
u
m
age
was
set
t
o
be
the
age
w
hi
ch
c
orres
ponds
to
30
seco
nd
s
of
co
nt
inu
ous
m
otion.
The
m
axi
m
u
m
age
was
set
to
be
the
age
equ
al
to
60
se
conds
to
co
nti
nuous
m
ot
ion
.
T
hese
con
sta
nts
can
be
set
based
on
the
l
ocati
on
w
her
e
loit
eri
ng
is
to
be
det
ect
ed.
Since
th
e
A
sia
P
aci
fic
U
ni
versi
ty
’s
receptio
n
area
is
a
very
s
m
all
place,
60
sec
onds
of
con
ti
nu
ous
m
o
ti
on
can
be
flagg
e
d
as
loit
ering b
eca
use
it
is not n
or
m
al
to
kee
p
m
ov
i
ng conti
nuously
in s
uc
h
a
s
m
al
l place
.
The
trac
k’
s
a
ge
is
first
com
par
e
d
to
the
m
ini
m
u
m
track
age
c
onsta
nt
and
if
it
is
m
or
e
than
the
m
ini
m
u
m
track
age
co
ns
ta
nt
bu
t
le
ss
than
the
m
axi
m
u
m
track
ag
e
con
sta
nt,
the
n
traject
or
y
anal
ysi
s
i
s
perform
ed
to
s
ee
if
the
perso
n
is
loit
eri
ng.
If
t
he
ab
ove
c
onditi
on
fail
s
t
hen
the
trac
k’s
age
is
c
om
par
ed
to
m
axi
m
u
m
track
a
ge
c
onsta
nt
and if it
e
xceeds t
he
c
onsta
nt, t
he
tra
j
ect
ory
is co
ns
ide
re
d
lo
it
ering
.
Figure
9
s
how
s
the
traject
or
y
analy
sis
m
et
ho
d
us
e
d
ad
opte
d
f
ro
m
[9
]
.
A
po
i
nt
w
hich
is
ou
tsi
de
the
trajecto
ry
is
ta
ken
(
point
O)
a
nd
A
is
t
he
init
ia
l
po
i
nt
w
hile
D=
{
D
i
|
I
=
1,
2,
…
m
}
is
a
c
ollec
ti
on
of
m
po
i
nts
with a tim
e int
erv
al
wh
ic
h
is
a co
ns
ta
nt call
ed
“
a
ng
le
F
ram
eIn
te
val” (
1
se
cond
i
n
this
res
earch
).
θ
i
is t
he
angle
betwee
n
the
ve
ct
or
⃗
⃗
⃗
⃗
⃗
an
d
t
he
ve
ct
or
⃗
⃗
⃗
⃗
⃗
⃗
i
.
T
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e
f
P
o
i
n
t
A
d
d
t
h
e
t
a
t
o
e
n
d
o
f
a
n
g
l
e
A
r
r
a
y
Y
E
S
i
=
i
+
a
n
g
l
e
F
r
a
m
e
I
n
t
e
r
v
a
l
d
e
l
t
a
A
n
g
l
e
s
=
d
i
f
f
e
r
e
n
c
e
b
e
t
w
e
e
n
a
d
j
a
c
e
n
t
a
n
g
l
e
s
o
f
A
n
g
l
e
A
r
r
a
y
V
a
r
i
a
n
c
e
=
v
a
r
i
a
n
c
e
o
f
d
e
l
t
a
A
n
g
l
e
s
N
O
I
s
t
r
a
c
k
’
s
a
g
e
>
=
m
a
x
T
r
a
c
k
A
g
e
O
R
V
a
r
i
a
n
c
e
>
t
h
r
e
s
h
o
l
d
?
N
O
N
O
a
b
n
o
r
m
a
l
=
t
r
u
e
Y
E
S
Fig
ure
8
.
Al
gorithm
to
detect
loit
ering
Figure
9
.
Loite
rin
g
tra
j
ect
ory
analy
sis m
et
ho
d [9
]
Evaluation Warning : The document was created with Spire.PDF for Python.
In
t J
Elec
&
C
om
p
En
g
IS
S
N:
20
88
-
8708
Auton
omo
us
abnor
ma
l
be
hav
iou
r
d
et
ect
io
n usin
g
tr
aject
ory
ana
ly
sis
(
M
uham
med Sh
uaau
)
2411
Wh
e
n
the
tra
j
e
ct
or
y
is
loit
ering
the
a
ngle
θ
i
cha
ng
e
s
pe
rio
dical
ly
.
Ther
ef
or
e
,
the
dif
fer
e
nce
bet
wee
n
the adjace
nt a
ngle
s
wer
e cal
c
ulate
d nex
t
as s
ta
te
d
in
[9
]
.
Δθ
i
=
θ
(
i
+
1
)
−
θ
i
(5)
The
tra
j
ect
or
y
was
t
hen cla
ssifie
d
as
loit
erin
g base
d on the
fo
ll
owin
g
c
ondi
ti
on
.
[
t
rac
k
′
s
a
ge
>
ma
x
imu
m
tr
ack
age
]
or
[
Va
r
(
Δθ
i
)
>
ξ
]
(6)
If
the trac
k’
s a
ge
is
m
or
e than
the m
axi
m
u
m
track
age constant (
60
sec
onds
in
this re
se
arch
)
then
the
track
was
c
ons
idere
d
loit
erin
g. Als
o,
if
the
va
riance
of the
diff
e
re
nce bet
ween ad
j
ace
nt
ang
le
s
we
re more
t
han
a
set
thres
hold
,
then
t
he
trac
k
was
c
on
si
der
e
d
loit
erin
g.
Th
e
thres
hold
ca
n
be
determ
ined
experim
ental
l
y
an
d
the v
al
ue use
d i
n
the
resea
rch
was 35.
7.
ALGO
RITH
M
TO
D
ET
E
CT SQU
ATTI
NG DO
WN
Figure
10
sho
ws
the
al
gorith
m
us
ed
to
detect
if
a
trajecto
r
y
is
sq
uatti
ng
dow
n.
P
red
e
fine
d
co
ns
ta
nt
n
is
the
nu
m
ber
of
po
i
nts
from
the
trajecto
ry
hi
story
to
be
use
d
in
the
detect
i
on
of
s
quat
ti
ng
down.
‘
n’
po
i
nts
of
centr
oid
s
a
nd
BLOB
areas
from
the
track
ar
e
extracte
d
a
nd
then
th
ey
are
us
e
d
to
determ
ine
if
the
tra
j
ec
tory
is
sq
u
at
ti
ng
do
w
n.
T
he
co
nd
it
ion
for
squat
dow
n
is
if
the
BLOB
areas
a
re
sorte
d
in
de
scen
ding
orde
r
wh
ic
h
m
eans
they
a
r
e
dec
reasin
g
a
nd
y
co
ordi
nates
of
the
ce
ntr
oid
s
are
sorte
d
in
asce
ndin
g
order
beca
us
e
wh
e
n
so
m
eon
e
squat
s
down
they
ar
e
m
ov
ing
dow
nw
a
r
d.
Als
o,
s
ta
nd
a
rd
dev
ia
ti
on
of
x
c
oor
din
at
es
shou
l
d
be
le
ss
than
a
n
e
xperi
m
ental
ly
determ
ined
co
ns
ta
nt
A
an
d
sta
nda
rd
de
viati
on
of
y
coor
din
at
es
sh
oul
d
be
m
or
e
than
an
e
xperim
ent
al
ly
de
te
rm
ined
c
onsta
nt
B.
The
reas
on
f
or
ab
ov
e
c
onditi
on
s
are
that
w
hen
s
om
eon
e
sq
ua
t
s
dow
n,
ho
rizo
nt
al
m
otion
(x
coor
din
at
e
m
ov
em
ents)
will
be
ve
ry
li
tt
le
and
ver
ti
cal
m
otion
(y
co
ord
inate
m
ot
ion
)
will
be
m
or
e.
I
f
t
he
conditi
ons
a
re
true
t
hen
the
t
raj
ect
or
y
is
cl
assifi
ed
a
s
s
qua
tt
ing
dow
n
a
nd
t
he
m
et
ho
d
retu
r
ns t
raj
ect
or
y as
a
bnorm
al
.
S
t
a
r
t
a
b
n
o
r
m
a
l
=
f
a
l
s
e
I
s
b
l
o
b
A
r
e
a
s
s
o
r
t
e
d
d
e
s
c
e
n
d
i
n
g
A
N
D
y
C
o
o
r
d
s
s
o
r
t
e
d
a
s
c
e
n
d
i
n
g
A
N
D
D
e
v
i
a
t
i
o
n
o
f
x
C
o
o
r
d
s
<
A
A
N
D
D
e
v
i
a
t
i
o
n
o
f
y
C
o
o
r
d
s
>
B
?
b
l
o
b
A
r
e
a
s
=
l
a
s
t
n
b
l
o
b
a
r
e
a
s
o
f
t
r
a
c
k
x
C
o
o
r
d
s
=
l
a
s
t
n
x
C
o
o
r
d
s
o
f
c
e
n
t
r
o
i
d
s
y
C
o
o
r
d
s
=
l
a
s
t
n
y
C
o
o
r
d
s
o
f
c
e
n
t
r
o
i
d
s
S
t
o
p
a
b
n
o
r
m
a
l
=
t
r
u
e
N
O
Y
E
S
Figure
10.
Algorithm
to
detec
t sq
uatti
ng
do
wn
Evaluation Warning : The document was created with Spire.PDF for Python.
IS
S
N
:
2088
-
8708
In
t J
Elec
&
C
om
p
En
g,
V
ol.
9
, N
o.
4
,
A
ugust
201
9
:
24
03
-
2415
2412
8.
RESU
LT
S
A
ND AN
ALYSIS
The
pro
po
se
d
al
gorithm
s
wer
e
i
m
ple
m
ented
us
in
g
M
ATL
AB
an
d
te
ste
d
on
on
a
n
I
ntel
Core
i
7
-
6700
m
achine
with
3.40
GHz
CP
U
an
d
1
6GB
RAM
.
The
M
ATL
AB
pro
gra
m
was
able
to
proce
ss
each
fr
am
e
in
35
m
s w
it
h
t
he l
ongest e
xecu
ti
on p
at
h.
8
.
1.
Ex
peri
ment
al setup
The
pro
po
se
d
al
gorithm
s
were
te
ste
d
on
vide
os
ca
ptured
by
a
su
r
veill
anc
e
cam
era
at
Asia
Paci
fic
Un
i
ver
sit
y’s
r
ecepti
on
area.
The
vid
e
os
wer
e
ta
ken
a
ft
er
sim
ul
at
ing
diff
e
re
nt
scena
rios
s
uc
h
as
e
nterin
g
receptio
n
a
rea,
loit
erin
g,
r
unning
a
nd
s
qua
tt
ing
dow
n.
Vi
deos
wer
e
ta
ke
n
us
in
g
sin
gle
pe
rs
on
sce
ne
s
an
d
m
ul
ti
ple p
eo
pl
e scenes
. F
i
gur
e
11
s
hows
exa
m
ples o
f
vi
deo i
m
ages u
se
d
a
fter
run
ning th
e algori
thm
s.
F
igure
11.
Vide
o
im
ages u
se
d i
n
te
sti
ng
Evaluation Warning : The document was created with Spire.PDF for Python.