
Background Modeling and Foreground Detection for Maritime Video Surveillance 14-11
Algorithm 14.3 Foreground Computation.
Input: I, A
Output: F
mask
Data Structure: B
Initialize: ∀ i, j F
mask
(i, j) = 1
for each color value v of pixe l p ∈ I do
if |B(i, j)| 6= ⊘ then
for each couple T := {c, f(c)} ∈ B(i, j) do
if |v − c| < A then
F
mask
(i, j) ← 0
break;
end if
end for
end if
end for
In this way, the problem of modeling waves, gradual illumination changes, noise in sensor
data, and movement of small background elements can be addressed [5]. Indeed, the adaptive
number of couples for each pixel can model non-regular patterns that cannot be associated
with any predefined ...