cording to a selected similarity measure; at the end of
the search, the vehicle representation is updated ex-
tracting a new template at the current vehicle position.
We use this general scheme (Maggio and Cavallaro,
2011) as a baseline and augment it by adding some
domain-specific customizations in the form of mod-
ules which can be dynamically switched on (or off) by
a controller. There are four proposed modules: Mul-
ticorrelation, Template Drift and Refinement, Back-
ground Subtraction and Selective Update.
In the following we summarize the scope of each
module used to extend the basic template matching
procedure providing related details. All the parame-
ters’ values are reported in Section 4.
The presence of artefacts (see Figure 2 (a)) con-
tributes to radical changes of the vehicles’ appearance
between consecutive frames. In such cases the simi-
larity between the current instance of the object and
its representation can be low, thus making the tracker
less accurate and possibly leading to a failure. In or-
der to reduce the influence of the artefacts, we act as if
it were an occlusion problem introducing an alterna-
tive way to compute the similarity between two image
patches which is referred to as Multicorrelation: both
the template and the candidate are divided into nine
regular blocks. A similarity score (e.g., Normalized
Cross Correlation) is so computed between each cou-
ple of corresponding blocks and the final score is ob-
tained by averaging the nine subwindows similarity
values. A statistical analysis of the similarity score
values highlighted that when the issue shown in Fig-
ure 2 (a) arises, the similarity measure computed in
the regular way tends to be lower than a given thresh-
old t
m
. So we use the multicorrelation similarity mea-
sure only when the regular similarity score is under
the given threshold. Figure 2 (c) shows the result of
the multicorrelation approach.
The presence of light, perspective, contrast
changes and distortion, joined with the continuous
update of the template, generate the template drift
problem in the form of the progressive inclusion of
the background into the template model. This effect
is shown in Figure 2 (b).
In order to reduce the template drift, a refinement
is performed at the end of the basic template match-
ing search. The refinement is based on the assumption
that the object is stretched horizontally by effect of the
distortion introduced in the preprocessing stage (see
Figure 1). According to this assumption, we adopt
the following strategy: given the current frame and
the template model found at the previous frame, we
search for a version of the object at a smaller hori-
zontal scale, obtaining a smaller tracking box which
will be properly enlarged backward in order to fit the
original template dimensions. Searching for the ob-
ject at different horizontal scales would make the al-
gorithm much slower, so, in order to improve per-
formances, we first perform a regular search (i.e.,
without any refinement) in order to obtain an initial
guess, afterwards we search for the best match among
a number of candidates obtained discarding the right-
most pixels (the ones which are more likely to contain
background information) and horizontally-scaled ver-
sions of the template. The results of the technique are
shown in Figure 2 (d).
When tracking tall vehicles, the perspective issue
shown in Figure 2 (e) arises: the radical change of
the vehicle appearance in consecutive frames leads
to the progressive inclusion of the background inside
the template model up to the eventual failure of the
tracker. In order to correct this behaviour, after a reg-
ular search, we perform a background aware refine-
ment sliding the tracking window backward in order
to remove the background pixels in the front of the
tracking box through a rough background subtrac-
tion technique based on subsequent frames subtrac-
tion and thresholding. The results of the technique
are shown in Figure 2 (g).
The continuous update of the vehicle representa-
tion induces the template drift problem in those se-
quences in which the vehicles move slowly. An ex-
ample of this problem is shown in Figure 2 (f). Since
the vehicle moves very slowly and considering that
the object changes of appearance between two con-
secutive frames are slight, a shifted version of the
template still returns a high similarity score, while
the continuous update favourites the propagation of a
wrong vehicle representation. In order to correct this
behaviour, we update the object representation only
when it is significantly different from the old one, i.e.,
when the similarity score is under a fixed threshold t
u
.
Figure 2 (h) shows the results of the selective update
mechanism.
Due to the different operations involved in the spe-
cific modules, we found the performancesof the mod-
ules to be dependent on the vehicle speed. In order
to maximize the performances of the overall algo-
rithm on the data, we distinguish between high-speed
(60 km/h or more) and low-speed (less than 60 km/h)
vehicles and introduce a controller component which
dynamically enables or disables the modules.
4 EXPERIMENTAL SETTINGS
AND RESULTS
All the experiments have been performed on the
dataset described in Section 2. The sequences have
VehicleTrackingbasedonCustomizedTemplateMatching
757