exploit the spatial and temporal dependencies of the
pixels by developing MRF models for background
subtraction. MRF assumes that each variate
corresponding to its pixel location is connected to its
four or eight nearest neighbours. MRF needs cost
functions which are related with the compatibility
functions between the scene variable and the
corresponding pixel value. Basically any
background model can be used to define the cost
functions. This paper chooses a codebook-based
background model for the cost functions. Almost all
MRF-based background models select the fixed
values for all MRF parameters. For example,
(Migdal, et al., 2005) assigns the constant energy
potentials for all the spatial, posterior and temporal
cliques and (Wu, et al., 2010) assumes all
compatibility functions are exponentially distributed
with constant parameters. (McHugh, et al., 2009)
models the background subtraction as a binary
hypothesis test and determines the detection
threshold by means of Ising model. (Xu, et al., 2008)
recovers the background image from a sequence of
images containing moving foreground objects. A
loopy belief propagation is employed for
background estimation.
A loopy belief propagation is also adopted in this
paper. However its roles are quite different in that it
decides whether an image pixel belongs to
background or foreground in this paper, while Xu, et
al. use it to indicate from which frame the pixel
should be selected.
This paper makes major contributions that
exploits both the spatial and temporal dependencies
by developing MRF models for background
subtraction and proposes a recursive approach for
estimating the MRF regularizing parameters.
2 MRF-BASED FOREGROUND
DETECTION
Let
{
i
x= denote a set of binary random variable,
where
i
represents a pixel location. A state space is
assumed, say
{
0,1Λ=
, so that
i
x ∈Λ
for all
i
. Let
Ω
be the set of all possible configurations:
()
{
12
,,, : ,1
Ni
xxx iN
ω
Ω = = ⋅⋅⋅ ∈Λ ≤ ≤
(1)
And a set of random variable
is assumed to be
a MRF. Then the probability
()
PX
= is a Gibbs
distribution, depicted as:
()
()
1
U
T
PX e
Z
ω
−
==
(2)
where
is a normalizing constant called the
partition function,
T
is a constant called the
temperature and
)
U
is the energy function. The
energy is a sum of clique potentials
()
c
V
over all
possible cliques
c
^
, which is defined as
)
)
)
()
,
,
,
ciiijij
ciij
UV VxVxx
ωω
∈
==+
∑∑
^
(3)
For MRF-based background model, a superscript
is added to the random variable
i
so that
i
is
replaced with
t
i
, where t represents a time index.
The energy function
)
U
is extended in the
following way, to include the time dependency as
well as the spatial dependency.
)
)
() ( ) ( )
1
,,
,,
, ,
c
c
ttt tt
i i ij i j ij i j
iij ij
UV
Vx V xx V xx
ωω
∈
−
=
=+ +
∑∑ ∑
^
(4)
The scene variable
t
i
is associated with the pixel
value
t
i
y at time t and pixel location
i
.
That is,
t
i
has a value of
0
when its corresponding pixel value
t
i
y comes from the background model and 1
t
i
x
in
case of foreground.
There is some statistical dependency between the
pixel value
t
i
y at time t and its corresponding
decision result or scene variable
t
i
at each pixel
location
i
. A background pixel must come out from
the background model, and so the potential
t
ii
Vx
in
(4) measures how the background pixel deviates
from the background model, for the same case with
the foreground pixel. Thus,
(
t
ii
Vx
can be defined as:
()
tt
ii
t
ii
t
i
d y y Background
Vx
Foreground
μ
⎧
∈
⎪
=
⎨
Γ∈
⎪
⎩
(5)
where
is the proportional constant and
is
the potential associated with the foreground pixel,
which is optimally adjusted using the EM algorithm,
as explained later in 2.2. And
()
t
i
dy
can be obtained
using any pixel-based background model. Since this
paper employs the codebook model (Kim, et al.,
2005),
)
t
i
dy
is defined as a minimum distance
between an input pixel
t
i
y and the centroids of the
codeword
k
c
belonging to the codebook
i
C
.
The node
i is arranged in a two-dimensional grid,
and so its scene variable
t
i
should be compatible
with the nearby scene variables
t
. Let
be a
ICINCO 2011 - 8th International Conference on Informatics in Control, Automation and Robotics
282