and DH (Sizintsev et al., 2008) where a template of
an object is available and one or more unseen frames
are searched to optimally locate the template - for ob-
ject detection or tracking purposes. The rest of the
paper is organized as follows. Section 2 describes
the proposed LH method. In Section 3, we present
a computational analysis of LH. Experimental results
are shown in Section 4 and we conclude the paper in
Section 5.
2 LINE HISTOGRAM
Image histograms provide a quantized representation
of an image’s intensity or colour distribution, the
granularity of which is determined by the number of
bins used. An important property is that histograms
for non-intersecting regions may be summed (Per-
reault and Hebert, 2007; Sizintsev et al., 2008) as
S(A∪ B) = S(A) + S(B) (1)
where S(.) is a histogram and A and B are two im-
age regions which may or may not be connected.
This property forms the foundation of the integral his-
togram and distributive histogram techniques and also
underpins the line histogram technique proposedhere.
When obtaining a single histogram for a whole
image, or subset of an image, it is optimal to generate
the distribution directly from the pixel data. However,
when performing a task that requires histograms to be
calculated for overlapping regions, e.g. in an exhaus-
tive search, significant computational savings may be
gained by precomputing an image’s histogram. For
example, the IH (Porikli, 2005) extends the concept
of the integral image (Crow, 1984) by precomput-
ing histograms at every pixel location such that the
stored histogram at a given pixel describes the dis-
trbution of the subimage contained within the upper
left of that location. This allows an arbitrarily sized
and positioned histogram to be efficiently calculated
from a combination of four previously determined
histograms. The DH (Sizintsev et al., 2008) precom-
putes column histograms for a subset of an image,
such that it is specifically tailored to an exhaustive
search. The proposed LH method is, in some sense,
an extension of the DH in that column histograms are
also precomputed, but for full length columns, that
span the entire image.
Our LH approach has three phases: an exhaustive
search, followed by line histogram initialisation, and
finally rotational search. The exhaustive search gen-
erates similarity scores for each pixel location. Initial-
isation precomputes column histograms for the entire
image, with each location in a column containing the
Figure 2: Histogram initialisation.
histogram of all the pixels from the first position to
the current position. For rotational search, the tem-
plate is rotated through 1
◦
→ 180
◦
and the orientation
and position yielding the best similarity score is se-
lected.
Exhaustive Search. The first stage of the algo-
rithm is to perform an exhaustive search of the en-
tire image, retaining a subset of image locations most
closely matching the unrotated search template. The
DH is an extremely fast technique and is applied to
this end in our proposed LH method. The question
of how many close matches to retain for further at-
tention is not trivial and has thus far been determined
empirically. By enforcing a minimum distance be-
tween matches, based on the image size, it is possible
to ensure that all the matches are not so tightly clus-
tered that potential matches are overlooked. If only a
few matches are retained, or if they are localized to
a sub-area of the image, it is possible to initialise the
LH for small areas containing the matches. This po-
tentially offers additional computational savings. We
will touch on this again but later below LH initialisa-
tion is explained for the whole image. To perform his-
togram matching in general, there are many measures
that can be used, e.g. the L
1
norm, Bhattacharrya dis-
tance, Earth Mover’s distance, or χ
2
difference. Here,
we use the L
1
norm on 64-bin histograms.
Histogram Initialisation. Consider an image, P,
with M rows and N columns. The inititialized LH will
then be a M × N × B matrix, where B is the number
of bins. Starting at the first row, histograms are calcu-
lated at each pixel location along each column, with
each location’s histogram describing the distribution
of the pixel located at that position and all those above
it on that column (see Fig. 2). In practice, this in-
volves performing a memory copy of the histogram
immediately above the current location and then in-
crementing the bin corresponding to the current pixel.
Note the histogram of the first pixel marked p(1, n) in
column n is S(p(1, n)) and includes one pixel p(1, n),
the histogram of the second pixel marked p(2, n) in
column n is S(p(2, n)) and includes two pixels p(1, n),
ICPRAM 2012 - International Conference on Pattern Recognition Applications and Methods
128