Академический Документы
Профессиональный Документы
Культура Документы
BLOCK MATCHING
Arif Mahmood, Sohaib Khan
Department of Computer Science, Lahore University of Management Sciences
{arifm,sohaib}@lums.edu.pk
1
Intermediate Value of
ABSTRACT
0.8
0.6
(b) Proposed
0.4
0.2
(a) Traditional
0
-0.2
-0.4
0
10
20
30
40
50
60
70
80
90
100
Fig. 1. Comparison of growth patterns of correlation coefficient at a specific search block having = 0.40. The traditional form (a) and the proposed monotonic form (b) follow
different paths to reach the same final value.
II - 469
ICIP 2007
Although block matching with maximization of has advantage from the compression point of view [1], the high
computational cost of has often been cited as a criticism
on its use in practice [2], [3], [4]; while SAD based BMC is
computationally attractive, mainly because of the existence of
Early Termination Algorithms (ETA). Two types of ETA are
well studied for SAD: monotonic growth based ETA [4], [5]
and the tight lower bound based ETA [6]. In monotonic growth
based ETA, at a search location, as soon as the partial value of
SAD becomes larger than the yet known minima, remaining
calculations are skipped. In bound based ETA, a lower bound
on SAD is evaluated at each search location. Locations exhibiting lower bound larger than the yet known minima are
skipped. In contrast to SAD, to the best of our knowledge,
no ETA has been developed for based block matching. The
growth pattern based ETA have not been applied to based
block matching, because of the non-monotonic growth pattern of (Figure 1). Whereas, the bound based ETA have not
been applied to because of the absence of useful bounds on
. Currently, the best available bound on is derived from the
Cauchy-Schwartz inequality which is always fixed to +1, the
maximum possible value of , therefore it cannot be used for
early termination.
Due to the non-monotonic growth pattern and the absence
of tight bounds, the concept of early termination has been traditionally considered inapplicable to the based block matching [2], [3], [4]. In contrast to this traditional understanding
we, for the first time, not only argue the applicability of the
early termination but also propose ETA of both types. For
growth based ETA, we propose a monotonic form of , such
that during the block matching process, as the computations
proceed on a specific search location, the value of decreases
monotonically (Figure 1). As soon as the current value of
falls below the yet known maxima, further calculations on that
location become redundant and can be skipped. For bound
based ETA, a new upper bound on is derived, which is
tighter than the currently used Cauchy-Schwartz inequality
based bound. If at any search location, the proposed upper
bound is found to be lower than the yet known best maxima,
that specific search location can be eliminated from the search
space. The bound based early ETA is used in cascade with the
growth pattern based ETA to obtain significant speedup.
The proposed algorithm is tested on a dataset of commercial movies. On most of the datasets, more than 80% of the
computations were found to be eliminated. On average, our
technique is ten times faster than the best known implementation in Fourier domain (FFTW [7]) and three times faster than
the best known spatial domain implementation (Bounded Partial Correlation [8]).
2. PROBLEM DEFINITION
A digital video is as a sequence of frames (F ), indexed at
discrete time k, each frame F (k) of size l m pixels. For
encoding purpose, each frame F (k) is divided into nonoverlapping blocks b(k, io , jo ), each of size n n pixels, where
(io , jo ) represent the spatial location of first pixel of the block
b(k, io , jo ) within frame F (k). Motion estimation is carried
out for each block b = b(k, io , jo ) by finding its closest match
b = b(k , io , jo ), where k = k + k , io = io + io and
jo = jo + jo . The block b is to be selected by the maximization of bb [1]
io , jo ) = arg max |bb | ,
(k,
k ,io ,jo
where
bb =
(1)
(2)
n
n
i=1 j=1
(3)
n
n
i=1 j=1
Sb2
1
(Sb )2 ,
n2
n
n
i=1 j=1
(4)
b2 (i, j).
II - 470
2
= bb .
b b
(5)
n
n
bb
1 2
=1
(i, j),
2 i=1 j=1 bb
(9)
(11)
i=1 j=1
where:
b(k, io + i, jo + j) = b(k, io + i, jo + j) b ,
b
(7)
:: A
n
i=1 j=1
In bound based ETA, an upper bound on is derived as a function of the contents of the two blocks to be matched. Then that
upper bound is used to filter out the search locations, exhibiting large dissimilarities with the block b. The proposed bound
is based upon the following L1 norm and L2 norm inequalities [5]:
||b||1 ||b ||1 ||b b ||1 ,
(12)
II - 471
(13)
(14)
i,j
2
1
|b(i, j)|
|b (i, j)| .
2
n i,j
i,j
(15)
From Equations (6) and (15), upper bound ubb on bb is
given by:
ubb = 1
2
1
|
b(i,
j)|
(16)
II - 472