Pattern Recognition 43 (2010) 153--159
Contents lists available at ScienceDirect
Pattern Recognition
journal homepage: www.elsevier.com/locate/pr
Approximate input sensitive algorithms for point pattern matching
Dror Aiger
a,b, ∗
, Klara Kedem
a,c
a
Department of Computer Science, Ben Gurion University, Be'er Sheva, Israel
b
Orbotech LTD, Yavne, Israel
c
Computer Science Department, Cornell University, USA
ARTICLE INFO ABSTRACT
Article history:
Received 31 January 2009
Received in revised form 1 May 2009
Accepted 17 May 2009
Keywords:
Geometric pattern matching
Hausdorff distance
Approximation
Randomization
We study input sensitive algorithms for point pattern matching under various transformations and the
Hausdorff metric as a distance function. Given point sets P and Q in the plane, the problem of point
pattern matching is to determine whether P is similar to some portion of Q, where P may undergo trans-
formations from a group G of allowed transformations. All algorithms are based on methods for extracting
small subsets from Q that can be matched to a small subset of P. The runtime is proportional to the
number k of these subsets. Let d be the number of points in P that are needed to define a transformation
in G. The key observation is that for some set B ⊂ P of cardinality larger than d, the number of subsets
of Q of this cardinality that match B, is practically small, as the problem becomes more constrained. We
present methods to extract efficiently all these subsets in Q. We provide algorithms for homothetic, rigid
and similarity transformations in the plane and give a general method that works for any dimension and
for any group of transformations. The runtime of our algorithms depends roughly linearly on the number
of subsets k, in addition to an n log n factor. Thus our approximate matching algorithms run roughly
in time O(n log n + km log n), where m and n are the number of points in P and Q, respectively. The
constants hidden in the big O vary depending on the group of transformations G.
© 2009 Elsevier Ltd. All rights reserved.
1. Introduction
A central problem in pattern recognition, computer vision, and
robotics, is the question of whether two point sets P and Q resemble
each other. One approach to this problem, first used by Huttenlocher
and Kedem [17] and further developed by Huttenlocher et al. [18],
is based on the minimum Hausdorff distance between point sets in
the plane. The Hausdorff distance between two point sets P and Q is
defined as
H(P, Q ) = max(h(P, Q ), h(Q , P))
where the directional distance from P to Q is
h(P, Q ) = max
p∈P
min
q∈Q
d(p, q)
Here, d(·, ·) represents a more familiar metric on points; for instance,
the standard Euclidean metric (the L
2
metric) or the L
1
or L
∞
metrics.
This work was partly supported by the MAGNET program of the Israel Ministry
of Industry and Trade (IMG4 consortium).
∗
Corresponding author at: Department of Computer Science, Ben Gurion
University, Be'er Sheva, Israel.
E-mail address: aiger@cs.bgu.ac.il (D. Aiger).
0031-3203/$ - see front matter © 2009 Elsevier Ltd. All rights reserved.
doi:10.1016/j.patcog.2009.05.014
The minimum Hausdorff distance problem is to find
D(P, Q , G) = min
T∈G
h(T (P), Q )
where G is the group of allowed transformations. The pattern match-
ing problem is, given a parameter > 0, to find a transformation
T ∈ G such that h(T (P), Q ) .
Algorithms for solving the minimum Hausdorff distance exactly
for transformations other than translation have high computation
time even for rigid transformations. The best known algorithm for
rigid transformations was given by Chew et al. [10], and requires
O(m
3
n
2
log
2
mn) time, where |P|=m and |Q |=n. To overcome the high
complexity of exact algorithms, approximation and randomization
were considered by several authors for both the minimum Hausdorff
distance and the pattern matching problems [3,8,9,14–16,20–22]. Let
∗
be the minimum directional Hausdorff distance between P and
Q. The approximate algorithm finds a transformation that maps P
within distance (1 + )
∗
from Q for some > 0.
The alignment scheme [19,15,14] is a common heuristic for geo-
metric matching that works as follows: pick a small subset B of P,
called a base. For every subset of Q of size |B| compute the trans-
formation T that maps B to the respective subset of Q, and verify
the quality of each transformation T by computing h(T (P), Q ), or
by counting the number of points, p
i
in P, such that h(T (p
i
), Q ) .
Based on this scheme, Goodrich et al. [14] considered the