SlideShare a Scribd company logo
1 of 27
Download to read offline
Term Paper 6.854
Solving the Cyclic Order
Preserving Assignment
Problem
Massachusetts Institute of Technology
Jared Glover
Christian Uldall Pedersen
Erik Taarnhøj
22nd December 2006
1 Introduction and motivation 1
Figure 1: Order-preserving matching (left) vs. Non-order-preserving matching (right),
from the inner shape to the outer shape.
Abstract
In this paper, we present a new point-assignment cost function–called
the Procrustean local shape distance (PLSD)–for use with the cyclic order-
preserving assignment problem (COPAP). We present a variation of COPAP
called COPAP-λ in order to give higher cost to matchings which “bunch”
points together in the assignment. We then explore three novel heuristics for
use with the A∗ search algorithm in order to solve COPAP and its related sub-
problem, LOPAP, more efficiently. We compare the performance of these new
A∗ algorithms to the dynamic programming solutions given in the existing
literature on the MPEG-7 shape B data set.
1 Introduction and motivation
Most shape modeling and recognition algorithms rely on being able to solve
a correspondence problem between parts of two or more objects. In 2-D, a
shape is often represented as a closed contour [3, 7, 14, 16, 25]. Some methods
use continuous representations of shape contours, matching curve segments
on one contour to those on another [23], or matching the control points of
two active contours [9]. Others use the skeleton of a contour to represent
the shape of an object [24, 26]. For these methods, skeletal tree branches
must be matched to each other, and a tree edit distance is often employed
to determine the similarity between shapes.
In this paper, we represent the shape of an object by a densely-sampled,
ordered set of discrete points around its contour, where one must find an
optimal assignment of the points on one contour to the points on another
contour. Within this framework, a large body of literature exists on shape
recognition and retrieval [7, 10, 16], as well as on statistical shape modeling [5,
6, 12, 13, 27]. In each case one must solve the correspondence problem in
order to proceed.
In order to find correspondences between the points of two contours,
one typically gives a cost function, C(i, j), for assigning point i on the first
1.1 Point Assignment Cost Functions 2
−0.25 −0.2 −0.15 −0.1 −0.05 0 0.05 0.1 0.15 0.2
−0.25
−0.2
−0.15
−0.1
−0.05
0
0.05
0.1
0.15
0.2
0.25
Figure 2: Tool articulation. Euclidean distance cost function is sensitive to articulation
and concavities, as well as to the initial alignment (in this case by ICP).
contour to point j on the second contour, and these costs are usually as-
sumed to all be independent. In addition, we may have constraints on the
matching; for example, we may require a one-to-one matching or an order-
preserving matching (Figure 1). Scott and Nowak [22] define the Cyclic
Order-Preserving Assignment Problem (COPAP) as the problem of finding
an optimal matching such that the assignment of corresponding points pre-
serves the cyclic ordering inherited from the contours. Alternatively, if we
don’t require the assignment to preserve contour ordering, yet we do de-
sire a one-to-one matching, the problem may be formulated as a bipartite
matching [1] or as a relaxation labeling [21].
1.1 Point Assignment Cost Functions
One recent approach which has had some success using the point-assignment
cost framework is that of shape contexts [1]. The shape context of a point
captures the relative positions of other points on the contour in a log-polar
histogram. The point assignment cost is determined by a χ2
distance between
corresponding shape context histograms.
Another option is to simply align the two shapes as closely as possible, e.g.
using a Hausdorff distance [8] or Iterated Closest Point (ICP) [2], and then to
compute the cost function between two points as the Euclidean distance from
one point to the other. Unfortunately, this method can give poor results when
the contours have large concavities on them, or in the presence of articulation
(e.g. the opening and closing of a tool–figure 2). It is also extremely sensitive
to the initial alignment, so such methods should only be used when it is
known, a priori, that the two shapes will be very similar.
1.2 Overview 3
A third method, which we will use in this paper, is to use local, rather
than global shape information at each point, comparing the shapes of neigh-
borhoods around the two points in order to determine the point assignment
cost. To do this, we will draw on the body of work known as Shape Theory,
pioneered by D.G. Kendall [12] and others [5, 6] in order to provide a mathe-
matical foundation for comparing the shapes of ordered sets of points. One of
the central results of shape theory is the formulation of the Procrustes met-
ric as a distance metric in shape space, which is invariant under translation,
scaling, and rotation, and is thus very desirable for comparing shapes. We
will use this Procrustes shape metric to compute the shape distance between
two point neighborhoods, and will then take the point-assignment cost as the
minimum neighborhood shape distance over varying neighborhood sizes.
1.2 Overview
The paper will proceed as follows: First we will describe the Cyclic Order-
Preserving Assignment Problem (COPAP), as well as the related Linear
Order-Preserving Assignment Problem (LOPAP). We will then present al-
gorithms to solve COPAP and LOPAP, along with their theoretical bounds.
Next, we will discuss how the choice of point-assignment cost function effects
the structure of the problem, and present several heuristic search algorithms
which attempt to take advantage of this structure. Finally, experimental
results will be shown using the MPEG-7 shape database [15, 4], and we will
conclude with some recommendations for solving LOPAP/COPAP in prac-
tice.
2 Problem formulation
2.1 COPAP
We wish to match the points of one closed contour, y1, ..., yn to the points
on another closed contour, x1, ..., xm . (Here we use · to indicate that the
points are ordered, and thus form a vector.) Let φ denote a correspondence
vector, where φi is the index of x to which yi corresponds; that is: yi →
xφi
. Then, given a point-assignment cost function, C(i, φi), the basic Cyclic
Order-Preserving Assignment Problem (COPAP) is:
φ∗
= arg min
φ
i
C(i, φi) s.t. φ is cyclic order-preserving (1)
where φ is cyclic order-preserving if and only if
2.2 LOPAP 4
−0.25 −0.2 −0.15 −0.1 −0.05 0 0.05 0.1 0.15 0.2
−0.25
−0.2
−0.15
−0.1
−0.05
0
0.05
0.1
0.15
0.2
0.25
−0.25 −0.2 −0.15 −0.1 −0.05 0 0.05 0.1 0.15 0.2
−0.25
−0.2
−0.15
−0.1
−0.05
0
0.05
0.1
0.15
0.2
0.25
Figure 3: Solutions to COPAP on two tool contours. Left: Basic COPAP–the match-
ing is “bunched up” along flat portions of the contours. Right: COPAP with spacing
regularization (COPAP-λ)
∃k s.t. φk ≤ φk+1 ≤ · · · ≤ φn ≤ φ1 ≤ · · · ≤ φk−1. (2)
For notational convenience, we write φk
1 = φk, φk
2 = φk+1, etc., wrapping
around as above. Note that our formulation of COPAP is slightly different
from the formulation of Scott and Nowak, since we allow consecutive over-
lapping assignments; that is: we allow φi = φj for different i and j. Because
of this modification, solutions to this basic form of COPAP can look quite
unimpressive for certain cost functions. For example, using a cost function
which depends only on the local shape around the contour points can result
in large flat portions of y getting all matched to the same point on x (Fig-
ure 3). To combat this bunching effect, we introduce a spacing penalty, λ
which is an additive term on the total assignment cost, penalizing the cor-
respondence vector φ every time it “skips” a point. The modified total cost,
with spacing regularization, is thus:
Cλ
tot(φ) =
i
C(i, φi) + λ ·
n
j=1
min(0, φk
j − φk
j−1 − 1) (3)
with the convention that φk
0 = φk
n. We call this modified problem COPAP-λ,
and the optimal solution is φ∗
λ.
2.2 LOPAP
The linear analog to COPAP is called the Linear Order-Preserving Assign-
ment Problem (LOPAP). The difference between COPAP and LOPAP is
2.3 Solving COPAP with LOPAP 5
Figure 4: LOPAP graph. Downward edges correspond to point assignments, φi, while
horizontal edges add spacing penalty, λ.
that LOPAP does not allow “wrap-around” matchings, φ. That is, φ must
be linear-order preserving, i.e. φ1 ≤ φ2 ≤ · · · ≤ φn.
LOPAP has a natural formulation as a shortest paths problem, via the
following graph construction (Figure 4). Construct an (n + 1) × m matrix of
nodes, with directed edges between neighboring edges in the EAST, SOUTH,
and SOUTHEAST directions. Corresponding to each row of edges is a point
yi on contour y, and corresponding to each column of nodes is a point xj on
contour x. In such a graph, every path from the top-left-most node to the
bottom-right-most node corresponds to a (not necessarily unique) assignment
vector, φ from y → x. Every SOUTH or SOUTHEAST action over yi’s edge
row can be mapped to a point correspondence, φi, by taking φi to be the
column j onto which the action took us. Thus, the cost of each SOUTH and
SOUTHEAST edge into a node just below row i in column j will have cost
C(i, j). Every EAST action in the row of nodes just above yi translates to
matching yi to something after the current column’s xj. Incorporating the
spacing penalty into LOPAP is done by giving a cost of λ to each horizontal
edge. LOPAP can then be trivially solved with dynamic programming in
this search graph.
2.3 Solving COPAP with LOPAP 6
s1
s2
s3
s4
e1
e2
e3
e4
Figure 5: COPAP graph. The solution to COPAP can by found by computing n shortest
paths, from sk to ek, and choosing the assignment vector, φk
, corresponding to the shortest
one.
2.3 Solving COPAP with LOPAP
COPAP (and COPAP-λ) can be solved naively with the solution to n LOPAPs,
each with a different rotation of y’s point ordering. The edge rows in the
LOPAP graph would be labeled (from top to bottom) y1, · · · , yn in the first
LOPAP, y2, · · · , yn, y1 in the second LOPAP, etc. These n searches could
also be accomplished by adding another copy of the LOPAP graph below the
original graph, as in Figure 5. We call this new graph the COPAP graph, and
search from n consecutive starting locations at the top-left of the graph to n
consecutive end points at the bottom-right. The running time of this solu-
tion to COPAP, where we solve each LOPAP with dynamic programming, is
O(n2
m), since each LOPAP solution takes O(nm) time to complete, and we
must perform n LOPAPs in total, each independently of the others. We call
this algorithm “DP n-times”. In the next section, we will see how to improve
on this bound using a bisection strategy on the COPAP graph.
2.4 A Bisection Strategy for COPAP 7
s1
s2
s3
s4
e1
e2
e3
e4
Figure 6: COPAP bisection strategy. Each shortest path from si to ei is constrained to
lie between the shortest paths below and above it.
2.4 A Bisection Strategy for COPAP
Consider the state of the “DP n-times” algorithm after finding a shortest path
from si to ei, but before finding the shortest path from si+1 to ei+1 (Figure 6).
The shortest path from si+1 to ei+1 must lie below the shortest path from
si to ei, since any path from si+1 to ei+1 which crosses over the previous
shortest path would have been better off to have followed the shortest path
between the intersection points rather than taking the detour above it. The
same argument applies if we have already computed paths below si+1 → ei+1,
so that we can constrain our search space from above and below, depending
on the order in which paths are found in the COPAP graph.
From [18], we see that the best order in which to compute the shortest
paths is a bisection ordering, starting with sn/2 → en/2 at the first level,
then sn/4 → en/4 and s3n/4 → e3n/4 at the second level, and so on. There
are O(log n) levels in total, and at each level we perform a series of disjoint
bounded searches, with a total of O(nm) work being done in the DPs at each
level. Thus, the total running time of this bisection algorithm, which we call
“DP bisection”, is O(nm log n).
3 Point Assignment Cost
We use a novel point assignment cost function, which we call the Procrustean
Local Shape Distance (PLSD). A formal justification of this cost function is
3.1 Procrustean Local Shape Distance 8
beyond the scope of this paper–for now it suffices to say that PLSD belongs
to a class of point assignment cost functions which consider local, rather
than global shape information, and which use the geometry of the contour
itself, rather than using derived statistics such as curvature or medial axis
skeletons, in order to compute a similarity measure between the local shapes
of contour points. PLSD is similar in nature to Belongie’s shape contexts [1],
in that both methods directly use the observed geometry of the contour in
order to compute the shape signature of a point. However, shape contexts
consider the relative global shape with respect to each point, while the PLSD
captures only local shape information.
Another attribute of our approach is that the PLSD is a multi-resolution
similarity measure–it compares local shapes of varying sizes in order to de-
termine the overall match quality. The only other shape model we are
aware of to use such a multi-resolution technique is the curvature scale space
model [19], where contours are convolved with Gaussian kernels of varying
sizes. Also similar to our method is the SIFT feature representation [17],
which also use multi-resolution information to compare features, although
SIFT features are computed on images, while the PLSD applies to contours.
3.1 Procrustean Local Shape Distance
The Procrustes distance, dP , between two point vectors, x and y, is a metric
on Kendall’s shape space [13] which is invariant to rotation, translation, and
scaling of the point vectors x and y. In related work [7], we use the Procrustes
distance to compute distributions over shapes in the same shape class in order
to achieve robust shape classification and completion of occluded parts of
contours. Given its utility for such shape inference tasks, it seems natural to
attempt to apply the same Procrustean shape metric to the correspondence
problem.
Given a point xi on contour x, we define the local neighborhood of size k
(for k odd) as:
ηk(xi) = xi−(k−1)/2, ..., xi, ..., xi+(k−1)/2 (4)
The Procrustean Local Shape Distance, dP LS, between two points, xi and
yj is the minimum Procrustean shape distance over varying neighborhood
sizes, k:
dP LS(xi, yj) = min
k
dP [ηk(xi), ηk(yj)] (5)
3.2 PLSD Point Assignment Cost Matrix 9
(a) (b) (c)
(d) (e) (f)
Figure 7: Procrustes shape distance over varying local shape neighborhood sizes, k. dP
is plotted vs. k for neighborhoods around the point marked by “*” of size k = 3...21 for
(a)-(c) a good match, and (d)-(f) a bad match.
In Figure 7, we see the Procrustes distance, dP plotted vs. neighborhood
size, k, for both good and bad matches. For good matches, this local shape
distance curve tends to slope downward initially until the local shape is com-
pletely encompassed in the neighborhood, and then rises again as neighboring
features are encountered. For bad matches, the curve may still start at a low
value, since at the smallest neighborhood sizes the measurement noise may
dominate the shape distance, but as the neighborhood grows and more of
the geometry is captured, the shape distance will increase.
We compute the PLSD as the minimum of one of these local shape dis-
tance curves, although better results may be achieved using machine learning
to compute a more discriminative statistic.
3.2 PLSD Point Assignment Cost Matrix
Examining the PLSD point assignment cost matrix for the points of two
shapes reveals a great deal of structure in the assignment problem. As can
be seen in figure 8, the cost matrix typically contains a few high cost rows
and columns, or mountains, interspersed between a number of low-cost rows
3.2 PLSD Point Assignment Cost Matrix 10
−0.2 −0.1 0 0.1 0.2
−0.25
−0.2
−0.15
−0.1
−0.05
0
0.05
0.1
0.15
0.2
0.25
(a)
−0.2 −0.1 0 0.1 0.2
−0.25
−0.2
−0.15
−0.1
−0.05
0
0.05
0.1
0.15
0.2
0.25
(b) (c)
Figure 8: PLSD cost matrix for two butterfly contours. The cost matrix has a very
regular structure.
and columns, or valleys. Remembering the LOPAP graph from section 2.2,
we know that the entries in the point-assignment cost matrix correspond to
downward pointing edges in the LOPAP graph. Since we must cross all of
the rows in the graph in order to get from the start to the end, the total
cost of a path in the LOPAP graph will in many cases be almost entirely
determined by the cost to cross each of the “mountain” rows. If there are
low-cost “passes” through the mountains, a good overall match exists; if not,
then the total match cost will be high. The picture for the column mountains
is less clear, as such mountains can always be passed over by absorbing the
spacing penalty, λ, on the horizontal edges crossing the high-cost columns.
These high-cost row and column mountains often have a clear interpre-
tation in terms of the geometries of the two contours. When the local shape
around a contour point yi on the first shape, y (indexed by the rows in the
cost matrix) is distinct, the PLSD between that point and most points on the
second contour, x (indexed by the columns in the cost matrix) will be high,
and yi will have a high-cost row. When the local shape around a point xj on
the second contour is distinct, the PLSD between that point and most points
on y will be high, giving rise to a high-cost column. In this way, the point-
assignment cost matrix can act as a type of feature detector, where high
cost rows and columns correspond to feature points of unique local shape
on the two contours. In addition, prior knowledge of such contour features
can inform the search algorithm of where the high-cost rows and columns
are located in the search graph. In the next section, we will see how to use
such knowledge to improve upon the basic dynamic programming solution
to LOPAP using an A* heuristic-based search.
4 Heuristic Search 11
4 Heuristic Search
While the basic DP solution to COPAP yields a good asymptotic running
time–O(nm log n)–using the bisection strategy of section 2.4, the story for
LOPAP is not nearly as good. Although it is impossible to improve upon
DP’s worst-case asymptotic running time of Θ(nm), the DP solution expands
all (n + 1) × m states in the LOPAP graph, while many of these states may
never need to be considered in a heuristic search.
In this section, we present several different cost-to-goal heuristic functions
for use with the A* search algorithm [20]. The first of these we call the
LAMBDA heuristic, as it uses the spacing penalty, λ, to determine a lower
bound on the cost-to-goal. The second is the ROWCUT heuristic, which uses
prior knowledge of the high-cost rows in the point-assignment cost matrix
in order to lower bound the cost-to-goal, and the third is the GRIDCUT
heuristic, which uses prior knowledge of both the high cost rows and the
high cost columns. In practice, we may combine these heuristics, at any
node taking the h-function with maximum value (since they are all lower
bounds), or for heuristics which are independent (such as LAMBDA and
ROWCUT), we may add their h-values together to create a new heuristic.
4.1 The LAMBDA heuristic
Each horizontal edge in the LOPAP graph has a cost of λ. In addition, we
may never move up or to the left in the graph. Thus, if we are currently
standing at a node in the bottom-left portion of the LOPAP graph, we must
pay some spacing penalty in order to walk the rest of the way to the goal.
We can lower bound this spacing penalty by λ times the horizontal distance
from the diagonal; that is:
hλ(i, j) = [max(0, (jg − j) − (ig − i))] · λ (6)
where (i, j) is the current position in the graph (row, column), and (ig, jg)
is the position of the goal–for LOPAP, (n + 1, m).
4.2 The ROWCUT heuristic
In order to reach the goal from any node in the LOPAP graph, we must
cross over every row of edges between the current node and the goal. In
particular, we must cross over all of the high-cost, or mountain rows between
the two nodes. Thus, given that the cost matrix has been computed for K
high-cost rows, r1, ..., rK, we can lower bound the cost-to-goal as the sum of
4.3 The GRIDCUT heuristic 12
the minimum costs to cross each row between the current node and the goal,
yielding:
hrowmins(i, j) =
i≤rk<ig
min
ℓ=1...m
C(rk, ℓ) (7)
We can do better by recalling that we can never move to the left in the
LOPAP graph, so from any node we are forced to cross over the rows below
us either at or to the right of the current column. Thus,
hrowcuts(i, j) =
i≤rk<ig
min
ℓ=j...m
C(rk, ℓ) (8)
Note that this entails O(K ·m) pre-processing time (to compute all of the
postfix row-mins), but only O(K) time to compute the heuristic at run-time.
4.3 The GRIDCUT heuristic
If we wish to use column cuts in addition to row cuts, we can no longer
simply sum over all of the cuts, since it is possible to cross over both a row
cut and a column cut simultaneously by traversing a diagonal edge. What
we can do, however, is treat the nodes within one “grid cell” (those nodes
which are bounded by the same row and column cuts) as a single super-node,
(i′
, j′
), in a new graph, with edges in the EAST, SOUTH, and SOUTHEAST
directions, computing the edge costs as follows:
• EAST–minimum of λ and the min. diagonal cost to cross over the eastward-
bounding column cut between super-nodes (i′
, j′
) and
(i′
, j′
+ 1),
• SOUTH–min. cost (taking either a SOUTH or a SOUTHEAST edge) to
cross over the southward-bounding row cut between super nodes (i′
, j′
) and
(i′
+ 1, j′
), and
• SOUTHEAST–C(ri′ , cj′ ) (where ri′ is the i′
-th rowcut and cj′ if the j′
-th
column cut); i.e., the cost to cross diagonally from super-node (i′
, j′
) to
super-node (i′
+ 1, j′
+ 1)
We can then solve the shortest paths problem in this graph of super-nodes,
G′
, using dynamic programming, achieving a lower bound on the cost-to-goal
in the original graph, G, for each super-node cell. The pre-processing time
is O(KL + Kn + Lm), where the grid is segmented by K high-cost rows and
L high-cost columns; however the time to compute the heuristic at run-time
is just a lookup, O(1).
5 Experimental Results 13
5 Experimental Results
Figure 9: Some of the shapes from the MPEG-7 Shape B dataset used in the experiments.
We tested the COPAP and LOPAP algorithms discussed above on a total
of 390 randomly drawn pairs of shapes from the MPEG-7 Shape B dataset
(Figure 9). 360 pairs were drawn from the same class, and 60 from different
classes. We designed the sampling to be imbalanced in this way because in
most practical applications, the contour-based correspondence algorithms we
have considered only give meaningful results when run on pairs of shapes that
are similar to each other; more complex, part-based methods should be used
to compare shapes that are very different. All algorithms were implemented
in a mix of MATLAB and C code, with the heavy pointer-arithmetic and
data structure code being written in C, and everything else in MATLAB.
In particular, this means that the PLSD point-assignment cost function was
implemented in MATLAB, and thus made up a very significant portion of the
total running time of our algorithms. This is not an unreasonable feature,
however, since many point-assignment cost functions are even more compu-
tationally expensive than the PLSD, and we would like our analysis to apply
to those methods as well.
The experiments will be presented in two parts. First, we test LOPAP,
comparing the dynamic programming solution in section 2.2 to the A∗
algo-
rithms in section 4. In addition, we compare A∗
, which yields optimal solu-
tions, to A∗
ǫ [20], an approximation algorithm, with varying second heuristic
function, h2
1
. In the second part of this section, we test COPAP, compar-
ing the “DP n-times” and “DP bisection” algorithms from sections 2.3–2.4
to “A∗
n-times” and “A∗
bisection”, the equivalent algorithms where each
LOPAP is solved with A∗
instead of dynamic programming.
We also investigate the effects of both model and algorithmic parameters–
namely the spacing penalty, λ, and the number of row and column cuts, K
1
The second heuristic function of A∗
ǫ gives the expansion order of all nodes within ǫ%
of the current minimum f-value.
5.1 LOPAP 14
and L–on the performance of the algorithms. In addition, we uncover a
relationship between shape similarity and total running time. We conclude
the section with asymptotic results, increasing the number of points used to
represent each contour and verifying the performance gains of the bisection
strategy over n-times.
5.1 LOPAP
5.1.1 Design
We extracted contours from the MPEG-7 shape dataset in MATLAB, and
sampled 100 evenly-spaced points around each contour. Thus n = m = 100
for every pair of contours we wished to match so that the point-assignment
cost matrix contained exactly 10, 000 entries. We then ran the DP, A*, and
A∗
ǫ algorithms on all 390 pairs. Both variants of A∗
were implemented with
binary heaps, for a running time bound of O(n2
log n). For both A∗
and A∗
ǫ ,
we tried λ=5%, 10%, and 20% of the total match cost (i.e. the length of
the shortest path through the LOPAP graph when λ = 0). This range of
values for λ was manually determined to give the most accurate matchings
on a subset of the MPEG-7 shape dataset. We also tried λ=1% for a subset
of the within-class pairs (roughly 50%), but not for the between-class pairs,
as the running time was prohibitively long. In addition, we set K = L in
all experiments, and tried K=L=2,4,6, and 8. In order to estimate the lo-
cations of the high-cost rows, we randomly chose three columns in the cost
matrix, computed the values of all of their entries, and then chose the top
K rows with maximal sum across the three columns to be the row cuts.
(We applied the same technique on the transposed cost matrix in order to
compute the column cuts). With this estimation scheme, the ROWCUT
heuristic expands (K +3)n entries of the cost matrix in pre-processing, while
the GRIDCUT heuristic expands (2K +6)n entries. Instead of testing ROW-
CUT or GRIDCUT alone, we combined each of them (additively) with the
LAMBDA heuristic in order to achieve a higher lower bound on the cost-to-
goal, as per section 4. For the second heuristic in the A∗
ǫ algorithm, we tried
four functions: L1 distance to goal, L2 distance to goal, L∞ distance to goal,
and L1 distance to the diagonal (leading to the goal).
5.1.2 DP vs. A*
As explained in section 4, the DP algorithm must expand all 10, 000 entries
in the cost matrix in order to determine the optimal solution to LOPAP.
The A* algorithm, on the other hand, need not expand all of the nodes.
5.1 LOPAP 15
Figure 10 illustrates the number of nodes expanded for DP and A*, both in
the actual search and during the pre-processing phase. From this we see that
A* expands significantly fewer nodes than the full DP does. In addition,
the LAMBDA heuristic tends to expand the fewest nodes in total, while
ROWCUT and GRIDCUT expand fewer nodes within the search algorithm.
DP A* λ A* λ rowcut A* λ gridcut
countalg 10000 2055 1777 1804
counttot 10000 2055 2559 3302
talg (sec) 2.683 0.912 0.798 0.879
ttot (sec) 2.683 0.912 0.999 1.26
Table 1: Mean counts and run-times for DP and A∗
, averaged across λ = 5%, 10%,
and 20%, and over all K. The LAMBDA-ROWCUT heuristic outperforms LAMBDA-
GRIDCUT in every category, on average.
1 2 3 4
0
1000
2000
3000
4000
5000
6000
7000
8000
9000
10000
#nodesexpanded
in algorithm
in total
A* lambdaDP A* lambda row cuts A* lambda grid cuts
Figure 10: Cost matrix nodes expanded during LOPAP. DP expands several times as
many nodes as A* does. A* with the LAMBDA heuristic expands the fewest nodes in total,
although LAMBDA-ROWCUT and LAMBDA-GRIDCUT expand fewer nodes within the
search. Results are averaged over λ = 5%, 10%, and 20%, and over all K.
Table 1 shows both the number of nodes expanded and the running times
of DP and A*. Note that the running times are well correlated with the
5.1 LOPAP 16
number of nodes expanded, and also that the LAMBDA-ROWCUT heuristic
outperforms LAMBDA-GRIDCUT in every category, on average.
5.1.3 A∗
vs. A∗
ǫ
Table 2 shows the mean counts and run-times of A∗
and A∗
ǫ (with varying
h2 function). On average, A∗
ǫ expands about 100 fewer states than A∗
does,
at a cost of less than 0.5% in accuracy. However, A∗
ǫ is significantly slower
than A∗
, as it must keep track of 3 heaps (one sorted by h and two sorted
by h2), while A∗
uses only one heap. Also, the L1 and L2 second heuristics
slightly outperform the “diag” and L∞ heuristics, although the difference is
marginal at best.
A∗
A∗
ǫ (L1) A∗
ǫ (L2) A∗
ǫ (diag) A∗
ǫ (L∞)
countalg 1879 1798 1800 1824 1824
counttot 2639 2558 2560 2584 2584
talg (sec) 0.86 1.34 1.32 1.34 1.37
ttot (sec) 1.06 1.54 1.51 1.54 1.56
Table 2: A∗
vs. A∗
ǫ . In the mean case, A∗
ǫ expands fewer nodes, but A∗
has a faster
running time. Results averaged over λ = 5%, 10%, and 20%, and all K.
5.1.4 Effect of spacing penalty
To test our algorithms’ performance under varying model parameters we
now consider the effects of changing the spacing penalty, λ. Intuitively, we
would expect that when λ increases the obtained optimal solution would be
a matching with little spacing penalty. This means that the optimal path
in the LOPAP graph should be close to the diagonal. Therefore, we would
expect that A* should expand fewer nodes and would achieve a faster run-
time. In table 3, we see that our intuition is correct–both the number of
nodes expanded and the running times decrease as λ increases.
We conclude that the spacing penalty has a significant impact on the
performance of A*. However, the spacing penalty is a parameter of the
model and therefore cannot be changed by the algorithm.
5.1.5 Effect of shape similarity
We now examine the effects of shape similarity on the performance of the A∗
LOPAP algorithm. In table 4, we see that finding correspondences between
objects of different classes takes longer than finding correspondences between
5.2 COPAP 17
λ=1% 5% 10% 20%
countalg 5351 2541 1736 1197
counttot 6111 3301 2495 1957
talg (sec) 13.58 2.08 1.04 0.62
ttot (sec) 13.67 2.27 1.24 0.81
Table 3: The effects of the spacing penalty, λ, on A∗
. Here we have used only the
LAMBDA-ROWCUT heuristic, although similar results can be seen for the other heuris-
tics, as well. Results are averaged over all K.
objects of the same class. In contrast, the DP solution works independently
of the data. Figures 11 and 12 suggest that there is a class of hard problems
with low λ and high total cost, d, that are better solved with DP than with
A∗
.
Within class Between class
costtot 1.523 4.133
countalg 1825 2989
counttot 2585 3749
talg (sec) 1.25 3.81
ttot (sec) 1.44 4.01
Table 4: Within-class vs. between-class. Similar shapes expand fewer nodes and find
optimal correspondences in a shorter amount of time. Values averaged over λ = 5%, 10%,
and 20%, and over all K.
5.1.6 LOPAP asymptotics
We now test the asymptotic behavior of the A∗
and DP algorithms on
LOPAP. In figure 13, we see that DP dominates A∗
for large values of n.
This may be because the heap A∗
uses to store nodes in the OPEN list grows
with the number of nodes in the graph. It may also be related to the fact
that we did not try higher numbers of row cuts, K, as we increased n. More
investigation is needed to determine whether A∗
can be made to perform
better than DP on larger problems.
5.2 COPAP
In testing COPAP, we draw upon the results of the LOPAP experiments
in order to reduce the number of variations that are tried. Specifically, we
5.2 COPAP 18
0 5 10 15
0
2
4
6
8
10
12
Total match cost
Time(sec)
DP
A*−lambda
A*−lambda rowcut
A*−lambda gridcut
(a) λ = 1%
0 5 10 15
0
2
4
6
8
10
12
Total match cost
Time(sec)
DP
A*−lambda
A*−lambda rowcut
A*−lambda gridcut
(b) λ = 5%
0 5 10 15
0
2
4
6
8
10
12
Total match cost
Time(sec)
DP
A*−lambda
A*−lambda rowcut
A*−lambda gridcut
(c) λ = 10%
0 5 10 15
0
2
4
6
8
10
12
Total match cost
Time(sec)
DP
A*−lambda
A*−lambda rowcut
A*−lambda gridcut
(d) λ = 20%
Figure 11: Shape similarity LOPAP scatter plot. A∗
trials are plotted on a time vs.
total match cost scale, with the DP run-time shown as a constant line for comparison. For
λ = 10–20%, A∗
has a faster run-time than DP in most experiments, while for λ = 5%,
many of the A∗
run-times are above the DP line, and for λ = 1%, A∗
only beats DP in a
few cases.
compare only A∗
and DP, since the relationship of A∗
to A∗
ǫ has already been
covered. We also implemented a path pruning technique for A∗
which we call
“permutation path pruning” (or PPP) which stops an A∗
search from si to
ei if the min. value on the open list is greater than the total path cost found
at some other permutation, j; in this case no path will be found from si to
ei that is better than the path found from sj to ej. Although this pruning
method destroys the theoretical running time bound of O(n2
log2
n) for A∗
bisection, we found it to improve running times in practice, and so we use it
in all of our COPAP A∗
experiments.
Furthermore, we test only the LAMBDA and LAMBDA-ROWCUT heuris-
tics, as GRIDCUT has been found to be sub-optimal to ROWCUT in most
cases. We also reduce the number of points around each contour from 100 to
5.2 COPAP 19
0 5 10 15
0
1
2
3
4
5
6
7
8
Total match cost
Time(sec)
DP
A*−lambda
A*−lambda rowcut
A*−lambda gridcut
(a) λ = 1%
0 5 10 15
0
1
2
3
4
5
6
7
8
Total match cost
Time(sec)
DP
A*−lambda
A*−lambda rowcut
A*−lambda gridcut
(b) λ = 5%
0 5 10 15
0
1
2
3
4
5
6
7
8
Total match cost
Time(sec)
DP
A*−lambda
A*−lambda rowcut
A*−lambda gridcut
(c) λ = 10%
0 5 10 15
0
1
2
3
4
5
6
7
8
Total match cost
Time(sec)
DP
A*−lambda
A*−lambda rowcut
A*−lambda gridcut
(d) λ = 20%
Figure 12: Shape similarity LOPAP regression. The total match cost has a greater effect
for low values of λ. Also, while the LAMBDA heuristic is the fastest for λ ≥ 10%, it is by
far the slowest when λ = 1%. For values of λ between 1% and 5%, there is some feasible
total match cost, d, for which A∗
is faster than DP below d and DP is faster than A∗
above d.
50, in order to speed up the experiments. We test our algorithms on a total
of 43 pairs of shapes from the MPEG-7 Shape B dataset. We still test λ
values of 5%, 10%, and 20%, but not 1%. The number of row (and columns)
cuts once again varies from 2 to 8.
In section 2 we introduced two strategies for handling COPAP; the n-
times strategy and the bisection strategy. In the first experiment we compare
these two strategies, when used with DP, A∗
LAMBDA and A∗
LAMBDA-
ROWCUT, respectively. The results are shown in table 5. DP is significantly
faster than the two A∗
algorithms and the bisection strategy dominates n-
times.
In table 6 and 7 we show the effect of λ on the performance of A∗
. It is
clear that both A∗
n-times and bisection get significantly faster as λ increases;
5.2 COPAP 20
150 200 250 300 350 400 450
0
20
40
60
80
100
120
140
160
180
#points on contour
Time(sec)
DP
A* lambda
A* lambda rowcut
A* lambda gridcut
Figure 13: Asymptotics of LOPAP. As the number of points on the contour increases,
DP begins to outperform A∗
. Results averaged over λ = 5%, 10%, and 20%, and over all
K.
however, even for λ = 20%, A∗
is still much slower than DP.
In figure 14 we see that A∗
LAMBDA-ROWCUT now expands fewer
nodes, on average, than A∗
LAMBDA does. This is because many of the
nodes that are expanded during pre-processing in A∗
LAMBDA-ROWCUT
will need to be expanded later on in one of the n searches through the COPAP
graph, so we might as well expand the nodes up front and get the extra benefit
that knowledge of the row cuts brings. The flip side is that neither heuristic
makes A∗
expand substantially fewer nodes than the DP does, so a purely
heuristic search for COPAP is not beneficial.
5.2.1 COPAP asymptotics
In our last experiment we test the asymptotic behavior (as n increases) of
the n-times and bisection strategies for COPAP. As A∗
was found to be sub-
optimal to DP for COPAP, we show only the DP asymptotics. In figure 15
we see the result of increasing n, the number of points on each contour. As
explained in section 2 DP n-times has a running time of O(n3
) (when n = m)
and DP bisection has a running time of O(n2
·log(n)). These results support
6 Discussion 21
n times bisection
DP A* λ A* λ row cut DP A* λ A* λ row cut
countalg 2500 1592 1202 2500 1698 1271
counttot 2500 1592 1585 2500 1698 1654
timealg 1.14 87.7 63.6 0.78 49.7 35.8
timetot 1.13 87.7 63.7 0.78 35.8 45.9
Table 5: COPAP–DP vs. A∗
for the n-times and bisection strategies. Although A∗
expands fewer nodes than DP does, DP is an order of magnitude faster than A∗
. Results
are averaged over all values of λ and K.
λ = 5 % λ = 10 % λ = 20 %
λ λ row cut λ λ row cut λ λ row cut
countalg 1979 1449 1547 1182 1249 979
counttot 1979 1831 1547 1566 1249 1357
timealg 173.3 118.9 66.0 51.5 24.0 20.4
timetot 173.3 119.0 66.0 51.6 24.0 20.5
Table 6: A∗
n-times.
the theoretical bounds of section 2, showing the dominance of n-times by the
bisection algorithm.
6 Discussion
We have seen that A∗
outperforms DP on LOPAP in most cases, yet fails
miserably when run on the full-blown COPAP. To understand why, we recall
the COPAP graph from figure 5, and we consider what happens when the
bisection strategy is performed on the graph. The DP bisection strategy
will start by solving the normal n × m LOPAP problem, but after a few
iterations it will be solving much smaller problems, expanding only states
near the diagonal from si to ei. For these smaller problems it is senseless to
apply a heuristic search, as we not only lose the theoretical guarantees of the
DP, but we also require additional data structures and supporting routines
which greatly increase the constants in the running time.
Yet given how much better A∗
is than DP on a single LOPAP, especially
when the two contours are very similar or when the spacing penalty, λ, is
high, it makes sense to try a hybrid strategy, using A∗
on the large problems
encountered at the beginning of the bisection, and returning to dynamic
6 Discussion 22
λ = 5 % λ = 10 % λ = 20 %
λ λ row cut λ λ row cut λ λ row cut
countalg 2071 1525 1671 1256 1354 1032
counttot 2071 1997 1671 1640 1354 1415
timealg 95.4 64.4 39.1 29.4 14.5 13.6
timetot 95.4 64.5 39.1 29.5 14.5 13.7
Table 7: A∗
bisection.
1 2 3 4 5
0
500
1000
1500
2000
2500
#ofnodesexpanded
in algorithm
in total
DP A* lambda
n times
A* lambda row cut
n times
A* lambda
bisection
A* lambda row cut
bisection
Figure 14: Number of nodes expanded for the 4 combinations of A* λ compared to DP.
programming once the state space of a given search is sufficiently small.
In addition, it may not always be necessary to run the complete COPAP
in order to find a good matching between two shapes. If one has knowledge of
which starting points are likely to be worth trying at all, then a few LOPAPs
may be all that are needed to find a good sub-optimal solution.
7 Conclusion 23
100 150 200 250 300 350 400 450 500 550 600
0
500
1000
1500
2000
2500
3000
#points on contour
Time(sec)
DP n times
DP bisection
Figure 15: Asymptotics of COPAP. DP n-times has a running time of O(n3
) while DP
bisection has a running time of O(n2
log n), where n is the number of points on the contour.
7 Conclusion
In this paper, we have presented a new point-assignment cost function–called
the Procrustean Local Shape Distance (PLSD)–for use with the cyclic order-
preserving assignment problem (COPAP). We saw that COPAP could be
represented in a graph as a shortest paths problem, and presented a vari-
ation of COPAP called COPAP-λ which introduced a spacing penalty on
the total assignment cost. We then presented three novel heuristics for use
with the A∗
search algorithm in order to solve COPAP and its related sub-
problem, LOPAP, more efficiently. We compared the performance of these
new A∗
algorithms to the dynamic programming solutions given in the ex-
isting literature on the MPEG-7 shape B data set. We found the ROWCUT
heuristic to be the best, and evaluated the performance of A∗
as we varied the
number of row cuts as well as the spacing penalty, λ. Finally, we saw that a
dynamic programming bisection strategy outperformed A∗
on the full-blown
COPAP problem, and suggested that a hybrid strategy, combining dynamic
programming with heuristic search, is the best way to handle large problems
optimally.
REFERENCES 24
−0.25 −0.2 −0.15 −0.1 −0.05 0 0.05 0.1 0.15 0.2
−0.25
−0.2
−0.15
−0.1
−0.05
0
0.05
0.1
0.15
0.2
0.25
−0.25 −0.2 −0.15 −0.1 −0.05 0 0.05 0.1 0.15 0.2
−0.25
−0.2
−0.15
−0.1
−0.05
0
0.05
0.1
0.15
0.2
0.25
−0.25 −0.2 −0.15 −0.1 −0.05 0 0.05 0.1 0.15 0.2
−0.25
−0.2
−0.15
−0.1
−0.05
0
0.05
0.1
0.15
0.2
0.25
−0.25 −0.2 −0.15 −0.1 −0.05 0 0.05 0.1 0.15 0.2 0.25
−0.25
−0.2
−0.15
−0.1
−0.05
0
0.05
0.1
0.15
0.2
0.25
Figure 16: Optimal solutions to COPAP-λ with the PLSD point-assignment cost func-
tion.
References
[1] Serge Belongie, Jitendra Malik, and Jan Puzicha. Shape matching and
object recognition using shape contexts. IEEE Trans. Pattern Analysis
and Machine Intelligence, 24(24):509–522, April 2002.
[2] P.J. Besl and N.D. McKay. A method for registration of 3-d shapes.
IEEE Transactions on Pattern Analysis and Machine Intelligence,
14(2):239–256, 1992.
[3] A. Blake and M. Isard. Active Contours. Springer-Verlag, 1998.
[4] Miroslaw Bober. Mpeg-7 visual shape descriptors. IEEE Trans. on
Circuits and Systems for Video Technology, 11(6), June 2001.
[5] F.L. Bookstein. A statistical method for biological shape comparisons.
Theoretical Biology, 107:475–520, 1984.
[6] I. Dryden and K. Mardia. Statistical Shape Analysis. John Wiley and
Sons, 1998.
[7] Jared Glover, Daniela Rus, Nicholas Roy, and Geoff Gordon. Robust
models of object geometry. In Proceedings of the IROS Workshop on
From Sensors to Human Spatial Concepts, Beijing, China, 2006.
REFERENCES 25
[8] D.P. Huttenlocher, G.A. Klanderman, and W.A. Rucklidge. Comparing
images using the hausdorff distance. IEEE Transactions on Pattern
Analysis and Machine Intelligence, 15(9):850–863, 1993.
[9] M. Isard and A. Blake. Contour tracking by stochastic propagation of
conditional density. In European Conf. Computer Vision, pages 343–356,
1996.
[10] V. Jain and Robust 2D shape Correspondence using Geodesic
Shape Context H. Zhang. Robust 2d shape correspondence using
geodesic shape context. Pacific Graphics, pages 121–124, May 2005.
[11] D.G. Kendall. The diffusion of shape. Advances in Applied Probability,
9:428–430, 1977.
[12] D.G. Kendall. Shape manifolds, procrustean metrics, and complex pro-
jective spaces. Bull. London Math Soc., 16:81–121, 1984.
[13] D.G. Kendall, D. Barden, T.K. Carne, and H. Le. Shape and Shape
Theory. John Wiley and Sons, 1999.
[14] L. J. Latecki and R. Lak¨amper. Contour-based shape similarity. In
Proc. of Int. Conf. on Visual Information Systems, volume LNCS 1614,
pages 617–624, June 1999.
[15] Longin Jan Latecki, Rolf Lak¨amper, and Ulrich Eckhardt. Shape de-
scriptors for non-rigid shapes with a single closed contour. In IEEE Conf.
on Computer Vision and Pattern Recognition (CVPR), pages 424–429,
2000.
[16] Haibin Ling and David W. Jacobs. Using the inner-distance for clas-
sification of articulated shapes. IEEE Computer Vision and Pattern
Recognition, 2:719–726, June 2005.
[17] David G. Lowe. Object recognition from local scale-invariant features.
In Proc. of the International Conference on Computer Vision ICCV,
pages 1150–1157, 1999.
[18] Maurice Maes. On a cyclic string-to-string correction problem. Inf.
Process. Lett., 35(2):73–78, 1990.
[19] F. Mokhtarian and A. K. Mackworth. A theory of multiscale curvature-
based shape representation for planar curves. In IEEE Trans. Pattern
Analysis and Machine Intelligence, volume 14, 1992.
REFERENCES 26
[20] Judea Pearl. Heuristics: Intelligent Search Strategies for Computer
Problem Solving. Addison-Wesley, Reading, MA, 1984.
[21] S. Ranade and A. Rosenfeld. Point pattern matching by relaxation.
Pattern Recognition, 12:269–275, 1980.
[22] C. Scott and R. Nowak. Robust contour matching via the order pre-
serving assignment problem. IEEE Transactions on Image Processing,
15(7):1831–1838, July 2006.
[23] Thomas Sebastian, Philip Klein, and Benjamin Kimia. On aligning
curves. PAMI, 25(1):116–125, January 2003.
[24] Thomas Sebastian, Philip Klein, and Benjamin Kimia. Recognition of
shapes by editing their shock graphs. volume 26, 2004.
[25] Thomas B. Sebastian and Benjamin B. Kimia. Curves vs skeletons in
object recognition. Signal Processing, 85(2):247–263, February 2005.
[26] Kaleem Siddiqi, Ali Shokoufandeh, Sven J. Dickinson, and Steven W.
Zucker. Shock graphs and shape matching. In ICCV, pages 222–229,
1998.
[27] C. G. Small. The statistical theory of shape. Springer, 1996.
[28] Remco C. Veltkamp. Shape matching: Similarity measures and algo-
rithms. Technical Report UU-CS-2001-03, Utrecht University, 2001.
[29] Yefeng Zheng and David Doermann. Robust point matching for nonrigid
shapes by preserving local neighborhood structures. IEEE Transactions
on Pattern Analysis and Machine Intelligence, 28(4), April 2006.

More Related Content

What's hot

ADAPTIVE MAP FOR SIMPLIFYING BOOLEAN EXPRESSIONS
ADAPTIVE MAP FOR SIMPLIFYING BOOLEAN EXPRESSIONSADAPTIVE MAP FOR SIMPLIFYING BOOLEAN EXPRESSIONS
ADAPTIVE MAP FOR SIMPLIFYING BOOLEAN EXPRESSIONSijcses
 
Understanding the Differences between the erfc(x) and the Q(z) functions: A S...
Understanding the Differences between the erfc(x) and the Q(z) functions: A S...Understanding the Differences between the erfc(x) and the Q(z) functions: A S...
Understanding the Differences between the erfc(x) and the Q(z) functions: A S...Ismael Torres-Pizarro, PhD, PE, Esq.
 
Machine learning (11)
Machine learning (11)Machine learning (11)
Machine learning (11)NYversity
 
Clustering in Hilbert geometry for machine learning
Clustering in Hilbert geometry for machine learningClustering in Hilbert geometry for machine learning
Clustering in Hilbert geometry for machine learningFrank Nielsen
 
Coordinate sampler : A non-reversible Gibbs-like sampler
Coordinate sampler : A non-reversible Gibbs-like samplerCoordinate sampler : A non-reversible Gibbs-like sampler
Coordinate sampler : A non-reversible Gibbs-like samplerChristian Robert
 
Lesson 28: The Fundamental Theorem of Calculus
Lesson 28: The Fundamental Theorem of CalculusLesson 28: The Fundamental Theorem of Calculus
Lesson 28: The Fundamental Theorem of CalculusMatthew Leingang
 
The Fundamental theorem of calculus
The Fundamental theorem of calculus The Fundamental theorem of calculus
The Fundamental theorem of calculus AhsanIrshad8
 
BALANCING BOARD MACHINES
BALANCING BOARD MACHINESBALANCING BOARD MACHINES
BALANCING BOARD MACHINESbutest
 
Elementary Landscape Decomposition of the Hamiltonian Path Optimization Problem
Elementary Landscape Decomposition of the Hamiltonian Path Optimization ProblemElementary Landscape Decomposition of the Hamiltonian Path Optimization Problem
Elementary Landscape Decomposition of the Hamiltonian Path Optimization Problemjfrchicanog
 
International Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentInternational Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentIJERD Editor
 
On algorithmic problems concerning graphs of higher degree of symmetry
On algorithmic problems concerning graphs of higher degree of symmetryOn algorithmic problems concerning graphs of higher degree of symmetry
On algorithmic problems concerning graphs of higher degree of symmetrygraphhoc
 
ON ALGORITHMIC PROBLEMS CONCERNING GRAPHS OF HIGHER DEGREE OF SYMMETRY
ON ALGORITHMIC PROBLEMS CONCERNING GRAPHS OF HIGHER DEGREE OF SYMMETRYON ALGORITHMIC PROBLEMS CONCERNING GRAPHS OF HIGHER DEGREE OF SYMMETRY
ON ALGORITHMIC PROBLEMS CONCERNING GRAPHS OF HIGHER DEGREE OF SYMMETRYFransiskeran
 
Analytic construction of points on modular elliptic curves
Analytic construction of points on modular elliptic curvesAnalytic construction of points on modular elliptic curves
Analytic construction of points on modular elliptic curvesmmasdeu
 
Simulated annealing for MMR-Path
Simulated annealing for MMR-PathSimulated annealing for MMR-Path
Simulated annealing for MMR-PathFrancisco Pérez
 
Polyhedral and algebraic method in computational geometry
Polyhedral and algebraic method in computational geometryPolyhedral and algebraic method in computational geometry
Polyhedral and algebraic method in computational geometrySpringer
 
Common fixed point theorems for contractive maps of
Common fixed point theorems for contractive maps ofCommon fixed point theorems for contractive maps of
Common fixed point theorems for contractive maps ofAlexander Decker
 
ABC convergence under well- and mis-specified models
ABC convergence under well- and mis-specified modelsABC convergence under well- and mis-specified models
ABC convergence under well- and mis-specified modelsChristian Robert
 

What's hot (20)

ADAPTIVE MAP FOR SIMPLIFYING BOOLEAN EXPRESSIONS
ADAPTIVE MAP FOR SIMPLIFYING BOOLEAN EXPRESSIONSADAPTIVE MAP FOR SIMPLIFYING BOOLEAN EXPRESSIONS
ADAPTIVE MAP FOR SIMPLIFYING BOOLEAN EXPRESSIONS
 
Understanding the Differences between the erfc(x) and the Q(z) functions: A S...
Understanding the Differences between the erfc(x) and the Q(z) functions: A S...Understanding the Differences between the erfc(x) and the Q(z) functions: A S...
Understanding the Differences between the erfc(x) and the Q(z) functions: A S...
 
Machine learning (11)
Machine learning (11)Machine learning (11)
Machine learning (11)
 
Clustering in Hilbert geometry for machine learning
Clustering in Hilbert geometry for machine learningClustering in Hilbert geometry for machine learning
Clustering in Hilbert geometry for machine learning
 
Coordinate sampler : A non-reversible Gibbs-like sampler
Coordinate sampler : A non-reversible Gibbs-like samplerCoordinate sampler : A non-reversible Gibbs-like sampler
Coordinate sampler : A non-reversible Gibbs-like sampler
 
Lesson 28: The Fundamental Theorem of Calculus
Lesson 28: The Fundamental Theorem of CalculusLesson 28: The Fundamental Theorem of Calculus
Lesson 28: The Fundamental Theorem of Calculus
 
The Fundamental theorem of calculus
The Fundamental theorem of calculus The Fundamental theorem of calculus
The Fundamental theorem of calculus
 
BALANCING BOARD MACHINES
BALANCING BOARD MACHINESBALANCING BOARD MACHINES
BALANCING BOARD MACHINES
 
Elementary Landscape Decomposition of the Hamiltonian Path Optimization Problem
Elementary Landscape Decomposition of the Hamiltonian Path Optimization ProblemElementary Landscape Decomposition of the Hamiltonian Path Optimization Problem
Elementary Landscape Decomposition of the Hamiltonian Path Optimization Problem
 
International Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentInternational Journal of Engineering Research and Development
International Journal of Engineering Research and Development
 
ABC-Gibbs
ABC-GibbsABC-Gibbs
ABC-Gibbs
 
On algorithmic problems concerning graphs of higher degree of symmetry
On algorithmic problems concerning graphs of higher degree of symmetryOn algorithmic problems concerning graphs of higher degree of symmetry
On algorithmic problems concerning graphs of higher degree of symmetry
 
ON ALGORITHMIC PROBLEMS CONCERNING GRAPHS OF HIGHER DEGREE OF SYMMETRY
ON ALGORITHMIC PROBLEMS CONCERNING GRAPHS OF HIGHER DEGREE OF SYMMETRYON ALGORITHMIC PROBLEMS CONCERNING GRAPHS OF HIGHER DEGREE OF SYMMETRY
ON ALGORITHMIC PROBLEMS CONCERNING GRAPHS OF HIGHER DEGREE OF SYMMETRY
 
Analytic construction of points on modular elliptic curves
Analytic construction of points on modular elliptic curvesAnalytic construction of points on modular elliptic curves
Analytic construction of points on modular elliptic curves
 
CLIM: Transition Workshop - Statistical Emulation with Dimension Reduction fo...
CLIM: Transition Workshop - Statistical Emulation with Dimension Reduction fo...CLIM: Transition Workshop - Statistical Emulation with Dimension Reduction fo...
CLIM: Transition Workshop - Statistical Emulation with Dimension Reduction fo...
 
Integration
IntegrationIntegration
Integration
 
Simulated annealing for MMR-Path
Simulated annealing for MMR-PathSimulated annealing for MMR-Path
Simulated annealing for MMR-Path
 
Polyhedral and algebraic method in computational geometry
Polyhedral and algebraic method in computational geometryPolyhedral and algebraic method in computational geometry
Polyhedral and algebraic method in computational geometry
 
Common fixed point theorems for contractive maps of
Common fixed point theorems for contractive maps ofCommon fixed point theorems for contractive maps of
Common fixed point theorems for contractive maps of
 
ABC convergence under well- and mis-specified models
ABC convergence under well- and mis-specified modelsABC convergence under well- and mis-specified models
ABC convergence under well- and mis-specified models
 

Viewers also liked

Evidence for the charge-excess contribution in air shower radio emission obse...
Evidence for the charge-excess contribution in air shower radio emission obse...Evidence for the charge-excess contribution in air shower radio emission obse...
Evidence for the charge-excess contribution in air shower radio emission obse...Ahmed Ammar Rebai PhD
 
CV Job Application form upd 2016.doc
CV Job Application form upd 2016.docCV Job Application form upd 2016.doc
CV Job Application form upd 2016.docSerbest Abbas
 
5 common mistakes with sales incentive systems: Forgetting the management in ...
5 common mistakes with sales incentive systems: Forgetting the management in ...5 common mistakes with sales incentive systems: Forgetting the management in ...
5 common mistakes with sales incentive systems: Forgetting the management in ...IBM Analytics
 
Juan Hernandez Guzman Resume JDE VB.net
Juan Hernandez Guzman Resume JDE VB.netJuan Hernandez Guzman Resume JDE VB.net
Juan Hernandez Guzman Resume JDE VB.netJuan Hernandez
 
Présentation Software AG Séminaire PPM 8 octobre 2014
Présentation Software AG Séminaire PPM 8 octobre 2014Présentation Software AG Séminaire PPM 8 octobre 2014
Présentation Software AG Séminaire PPM 8 octobre 2014Software AG France Community
 
Stat2 Statistiques Descriptives
Stat2  Statistiques DescriptivesStat2  Statistiques Descriptives
Stat2 Statistiques DescriptivesJean-Louis ESTRADE
 
Méthodes sur les séries numériques
Méthodes sur les séries numériquesMéthodes sur les séries numériques
Méthodes sur les séries numériquesAhmed Ammar Rebai PhD
 

Viewers also liked (8)

Evidence for the charge-excess contribution in air shower radio emission obse...
Evidence for the charge-excess contribution in air shower radio emission obse...Evidence for the charge-excess contribution in air shower radio emission obse...
Evidence for the charge-excess contribution in air shower radio emission obse...
 
CV Job Application form upd 2016.doc
CV Job Application form upd 2016.docCV Job Application form upd 2016.doc
CV Job Application form upd 2016.doc
 
5 common mistakes with sales incentive systems: Forgetting the management in ...
5 common mistakes with sales incentive systems: Forgetting the management in ...5 common mistakes with sales incentive systems: Forgetting the management in ...
5 common mistakes with sales incentive systems: Forgetting the management in ...
 
Juan Hernandez Guzman Resume JDE VB.net
Juan Hernandez Guzman Resume JDE VB.netJuan Hernandez Guzman Resume JDE VB.net
Juan Hernandez Guzman Resume JDE VB.net
 
I AM COMMITTED
I AM COMMITTEDI AM COMMITTED
I AM COMMITTED
 
Présentation Software AG Séminaire PPM 8 octobre 2014
Présentation Software AG Séminaire PPM 8 octobre 2014Présentation Software AG Séminaire PPM 8 octobre 2014
Présentation Software AG Séminaire PPM 8 octobre 2014
 
Stat2 Statistiques Descriptives
Stat2  Statistiques DescriptivesStat2  Statistiques Descriptives
Stat2 Statistiques Descriptives
 
Méthodes sur les séries numériques
Méthodes sur les séries numériquesMéthodes sur les séries numériques
Méthodes sur les séries numériques
 

Similar to 10.1.1.630.8055

IMAGE REGISTRATION USING ADVANCED TOPOLOGY PRESERVING RELAXATION LABELING
IMAGE REGISTRATION USING ADVANCED TOPOLOGY PRESERVING RELAXATION LABELING IMAGE REGISTRATION USING ADVANCED TOPOLOGY PRESERVING RELAXATION LABELING
IMAGE REGISTRATION USING ADVANCED TOPOLOGY PRESERVING RELAXATION LABELING cscpconf
 
IMAGE REGISTRATION USING ADVANCED TOPOLOGY PRESERVING RELAXATION LABELING
IMAGE REGISTRATION USING ADVANCED TOPOLOGY PRESERVING RELAXATION LABELING IMAGE REGISTRATION USING ADVANCED TOPOLOGY PRESERVING RELAXATION LABELING
IMAGE REGISTRATION USING ADVANCED TOPOLOGY PRESERVING RELAXATION LABELING csandit
 
CEE 213—Deformable Solids The Mechanics Project Arizona Stat.docx
CEE 213—Deformable Solids The Mechanics Project Arizona Stat.docxCEE 213—Deformable Solids The Mechanics Project Arizona Stat.docx
CEE 213—Deformable Solids The Mechanics Project Arizona Stat.docxcravennichole326
 
Efficient Solution of Two-Stage Stochastic Linear Programs Using Interior Poi...
Efficient Solution of Two-Stage Stochastic Linear Programs Using Interior Poi...Efficient Solution of Two-Stage Stochastic Linear Programs Using Interior Poi...
Efficient Solution of Two-Stage Stochastic Linear Programs Using Interior Poi...SSA KPI
 
Newton cotes integration method
Newton cotes integration  methodNewton cotes integration  method
Newton cotes integration methodshashikant pabari
 
Optimization Techniques
Optimization TechniquesOptimization Techniques
Optimization TechniquesAjay Bidyarthy
 
6_nome_e_numero_Chapra_Canale_1998_Numerical_Differentiation_and_Integration.pdf
6_nome_e_numero_Chapra_Canale_1998_Numerical_Differentiation_and_Integration.pdf6_nome_e_numero_Chapra_Canale_1998_Numerical_Differentiation_and_Integration.pdf
6_nome_e_numero_Chapra_Canale_1998_Numerical_Differentiation_and_Integration.pdfOke Temitope
 
A Robust Method Based On LOVO Functions For Solving Least Squares Problems
A Robust Method Based On LOVO Functions For Solving Least Squares ProblemsA Robust Method Based On LOVO Functions For Solving Least Squares Problems
A Robust Method Based On LOVO Functions For Solving Least Squares ProblemsDawn Cook
 
Problem Solving by Computer Finite Element Method
Problem Solving by Computer Finite Element MethodProblem Solving by Computer Finite Element Method
Problem Solving by Computer Finite Element MethodPeter Herbert
 
Joint3DShapeMatching - a fast approach to 3D model matching using MatchALS 3...
Joint3DShapeMatching  - a fast approach to 3D model matching using MatchALS 3...Joint3DShapeMatching  - a fast approach to 3D model matching using MatchALS 3...
Joint3DShapeMatching - a fast approach to 3D model matching using MatchALS 3...Mamoon Ismail Khalid
 
Bag of Pursuits and Neural Gas for Improved Sparse Codin
Bag of Pursuits and Neural Gas for Improved Sparse CodinBag of Pursuits and Neural Gas for Improved Sparse Codin
Bag of Pursuits and Neural Gas for Improved Sparse CodinKarlos Svoboda
 
Robust Image Denoising in RKHS via Orthogonal Matching Pursuit
Robust Image Denoising in RKHS via Orthogonal Matching PursuitRobust Image Denoising in RKHS via Orthogonal Matching Pursuit
Robust Image Denoising in RKHS via Orthogonal Matching PursuitPantelis Bouboulis
 
directed-research-report
directed-research-reportdirected-research-report
directed-research-reportRyen Krusinga
 
83662164 case-study-1
83662164 case-study-183662164 case-study-1
83662164 case-study-1homeworkping3
 

Similar to 10.1.1.630.8055 (20)

IMAGE REGISTRATION USING ADVANCED TOPOLOGY PRESERVING RELAXATION LABELING
IMAGE REGISTRATION USING ADVANCED TOPOLOGY PRESERVING RELAXATION LABELING IMAGE REGISTRATION USING ADVANCED TOPOLOGY PRESERVING RELAXATION LABELING
IMAGE REGISTRATION USING ADVANCED TOPOLOGY PRESERVING RELAXATION LABELING
 
IMAGE REGISTRATION USING ADVANCED TOPOLOGY PRESERVING RELAXATION LABELING
IMAGE REGISTRATION USING ADVANCED TOPOLOGY PRESERVING RELAXATION LABELING IMAGE REGISTRATION USING ADVANCED TOPOLOGY PRESERVING RELAXATION LABELING
IMAGE REGISTRATION USING ADVANCED TOPOLOGY PRESERVING RELAXATION LABELING
 
Ijetr021210
Ijetr021210Ijetr021210
Ijetr021210
 
Ijetr021210
Ijetr021210Ijetr021210
Ijetr021210
 
CEE 213—Deformable Solids The Mechanics Project Arizona Stat.docx
CEE 213—Deformable Solids The Mechanics Project Arizona Stat.docxCEE 213—Deformable Solids The Mechanics Project Arizona Stat.docx
CEE 213—Deformable Solids The Mechanics Project Arizona Stat.docx
 
Efficient Solution of Two-Stage Stochastic Linear Programs Using Interior Poi...
Efficient Solution of Two-Stage Stochastic Linear Programs Using Interior Poi...Efficient Solution of Two-Stage Stochastic Linear Programs Using Interior Poi...
Efficient Solution of Two-Stage Stochastic Linear Programs Using Interior Poi...
 
Newton cotes integration method
Newton cotes integration  methodNewton cotes integration  method
Newton cotes integration method
 
Optimization Techniques
Optimization TechniquesOptimization Techniques
Optimization Techniques
 
6_nome_e_numero_Chapra_Canale_1998_Numerical_Differentiation_and_Integration.pdf
6_nome_e_numero_Chapra_Canale_1998_Numerical_Differentiation_and_Integration.pdf6_nome_e_numero_Chapra_Canale_1998_Numerical_Differentiation_and_Integration.pdf
6_nome_e_numero_Chapra_Canale_1998_Numerical_Differentiation_and_Integration.pdf
 
A Robust Method Based On LOVO Functions For Solving Least Squares Problems
A Robust Method Based On LOVO Functions For Solving Least Squares ProblemsA Robust Method Based On LOVO Functions For Solving Least Squares Problems
A Robust Method Based On LOVO Functions For Solving Least Squares Problems
 
Problem Solving by Computer Finite Element Method
Problem Solving by Computer Finite Element MethodProblem Solving by Computer Finite Element Method
Problem Solving by Computer Finite Element Method
 
Joint3DShapeMatching
Joint3DShapeMatchingJoint3DShapeMatching
Joint3DShapeMatching
 
Joint3DShapeMatching - a fast approach to 3D model matching using MatchALS 3...
Joint3DShapeMatching  - a fast approach to 3D model matching using MatchALS 3...Joint3DShapeMatching  - a fast approach to 3D model matching using MatchALS 3...
Joint3DShapeMatching - a fast approach to 3D model matching using MatchALS 3...
 
Bag of Pursuits and Neural Gas for Improved Sparse Codin
Bag of Pursuits and Neural Gas for Improved Sparse CodinBag of Pursuits and Neural Gas for Improved Sparse Codin
Bag of Pursuits and Neural Gas for Improved Sparse Codin
 
Dycops2019
Dycops2019 Dycops2019
Dycops2019
 
Robust Image Denoising in RKHS via Orthogonal Matching Pursuit
Robust Image Denoising in RKHS via Orthogonal Matching PursuitRobust Image Denoising in RKHS via Orthogonal Matching Pursuit
Robust Image Denoising in RKHS via Orthogonal Matching Pursuit
 
BNL_Research_Report
BNL_Research_ReportBNL_Research_Report
BNL_Research_Report
 
directed-research-report
directed-research-reportdirected-research-report
directed-research-report
 
RS
RSRS
RS
 
83662164 case-study-1
83662164 case-study-183662164 case-study-1
83662164 case-study-1
 

10.1.1.630.8055

  • 1. Term Paper 6.854 Solving the Cyclic Order Preserving Assignment Problem Massachusetts Institute of Technology Jared Glover Christian Uldall Pedersen Erik Taarnhøj 22nd December 2006
  • 2. 1 Introduction and motivation 1 Figure 1: Order-preserving matching (left) vs. Non-order-preserving matching (right), from the inner shape to the outer shape. Abstract In this paper, we present a new point-assignment cost function–called the Procrustean local shape distance (PLSD)–for use with the cyclic order- preserving assignment problem (COPAP). We present a variation of COPAP called COPAP-λ in order to give higher cost to matchings which “bunch” points together in the assignment. We then explore three novel heuristics for use with the A∗ search algorithm in order to solve COPAP and its related sub- problem, LOPAP, more efficiently. We compare the performance of these new A∗ algorithms to the dynamic programming solutions given in the existing literature on the MPEG-7 shape B data set. 1 Introduction and motivation Most shape modeling and recognition algorithms rely on being able to solve a correspondence problem between parts of two or more objects. In 2-D, a shape is often represented as a closed contour [3, 7, 14, 16, 25]. Some methods use continuous representations of shape contours, matching curve segments on one contour to those on another [23], or matching the control points of two active contours [9]. Others use the skeleton of a contour to represent the shape of an object [24, 26]. For these methods, skeletal tree branches must be matched to each other, and a tree edit distance is often employed to determine the similarity between shapes. In this paper, we represent the shape of an object by a densely-sampled, ordered set of discrete points around its contour, where one must find an optimal assignment of the points on one contour to the points on another contour. Within this framework, a large body of literature exists on shape recognition and retrieval [7, 10, 16], as well as on statistical shape modeling [5, 6, 12, 13, 27]. In each case one must solve the correspondence problem in order to proceed. In order to find correspondences between the points of two contours, one typically gives a cost function, C(i, j), for assigning point i on the first
  • 3. 1.1 Point Assignment Cost Functions 2 −0.25 −0.2 −0.15 −0.1 −0.05 0 0.05 0.1 0.15 0.2 −0.25 −0.2 −0.15 −0.1 −0.05 0 0.05 0.1 0.15 0.2 0.25 Figure 2: Tool articulation. Euclidean distance cost function is sensitive to articulation and concavities, as well as to the initial alignment (in this case by ICP). contour to point j on the second contour, and these costs are usually as- sumed to all be independent. In addition, we may have constraints on the matching; for example, we may require a one-to-one matching or an order- preserving matching (Figure 1). Scott and Nowak [22] define the Cyclic Order-Preserving Assignment Problem (COPAP) as the problem of finding an optimal matching such that the assignment of corresponding points pre- serves the cyclic ordering inherited from the contours. Alternatively, if we don’t require the assignment to preserve contour ordering, yet we do de- sire a one-to-one matching, the problem may be formulated as a bipartite matching [1] or as a relaxation labeling [21]. 1.1 Point Assignment Cost Functions One recent approach which has had some success using the point-assignment cost framework is that of shape contexts [1]. The shape context of a point captures the relative positions of other points on the contour in a log-polar histogram. The point assignment cost is determined by a χ2 distance between corresponding shape context histograms. Another option is to simply align the two shapes as closely as possible, e.g. using a Hausdorff distance [8] or Iterated Closest Point (ICP) [2], and then to compute the cost function between two points as the Euclidean distance from one point to the other. Unfortunately, this method can give poor results when the contours have large concavities on them, or in the presence of articulation (e.g. the opening and closing of a tool–figure 2). It is also extremely sensitive to the initial alignment, so such methods should only be used when it is known, a priori, that the two shapes will be very similar.
  • 4. 1.2 Overview 3 A third method, which we will use in this paper, is to use local, rather than global shape information at each point, comparing the shapes of neigh- borhoods around the two points in order to determine the point assignment cost. To do this, we will draw on the body of work known as Shape Theory, pioneered by D.G. Kendall [12] and others [5, 6] in order to provide a mathe- matical foundation for comparing the shapes of ordered sets of points. One of the central results of shape theory is the formulation of the Procrustes met- ric as a distance metric in shape space, which is invariant under translation, scaling, and rotation, and is thus very desirable for comparing shapes. We will use this Procrustes shape metric to compute the shape distance between two point neighborhoods, and will then take the point-assignment cost as the minimum neighborhood shape distance over varying neighborhood sizes. 1.2 Overview The paper will proceed as follows: First we will describe the Cyclic Order- Preserving Assignment Problem (COPAP), as well as the related Linear Order-Preserving Assignment Problem (LOPAP). We will then present al- gorithms to solve COPAP and LOPAP, along with their theoretical bounds. Next, we will discuss how the choice of point-assignment cost function effects the structure of the problem, and present several heuristic search algorithms which attempt to take advantage of this structure. Finally, experimental results will be shown using the MPEG-7 shape database [15, 4], and we will conclude with some recommendations for solving LOPAP/COPAP in prac- tice. 2 Problem formulation 2.1 COPAP We wish to match the points of one closed contour, y1, ..., yn to the points on another closed contour, x1, ..., xm . (Here we use · to indicate that the points are ordered, and thus form a vector.) Let φ denote a correspondence vector, where φi is the index of x to which yi corresponds; that is: yi → xφi . Then, given a point-assignment cost function, C(i, φi), the basic Cyclic Order-Preserving Assignment Problem (COPAP) is: φ∗ = arg min φ i C(i, φi) s.t. φ is cyclic order-preserving (1) where φ is cyclic order-preserving if and only if
  • 5. 2.2 LOPAP 4 −0.25 −0.2 −0.15 −0.1 −0.05 0 0.05 0.1 0.15 0.2 −0.25 −0.2 −0.15 −0.1 −0.05 0 0.05 0.1 0.15 0.2 0.25 −0.25 −0.2 −0.15 −0.1 −0.05 0 0.05 0.1 0.15 0.2 −0.25 −0.2 −0.15 −0.1 −0.05 0 0.05 0.1 0.15 0.2 0.25 Figure 3: Solutions to COPAP on two tool contours. Left: Basic COPAP–the match- ing is “bunched up” along flat portions of the contours. Right: COPAP with spacing regularization (COPAP-λ) ∃k s.t. φk ≤ φk+1 ≤ · · · ≤ φn ≤ φ1 ≤ · · · ≤ φk−1. (2) For notational convenience, we write φk 1 = φk, φk 2 = φk+1, etc., wrapping around as above. Note that our formulation of COPAP is slightly different from the formulation of Scott and Nowak, since we allow consecutive over- lapping assignments; that is: we allow φi = φj for different i and j. Because of this modification, solutions to this basic form of COPAP can look quite unimpressive for certain cost functions. For example, using a cost function which depends only on the local shape around the contour points can result in large flat portions of y getting all matched to the same point on x (Fig- ure 3). To combat this bunching effect, we introduce a spacing penalty, λ which is an additive term on the total assignment cost, penalizing the cor- respondence vector φ every time it “skips” a point. The modified total cost, with spacing regularization, is thus: Cλ tot(φ) = i C(i, φi) + λ · n j=1 min(0, φk j − φk j−1 − 1) (3) with the convention that φk 0 = φk n. We call this modified problem COPAP-λ, and the optimal solution is φ∗ λ. 2.2 LOPAP The linear analog to COPAP is called the Linear Order-Preserving Assign- ment Problem (LOPAP). The difference between COPAP and LOPAP is
  • 6. 2.3 Solving COPAP with LOPAP 5 Figure 4: LOPAP graph. Downward edges correspond to point assignments, φi, while horizontal edges add spacing penalty, λ. that LOPAP does not allow “wrap-around” matchings, φ. That is, φ must be linear-order preserving, i.e. φ1 ≤ φ2 ≤ · · · ≤ φn. LOPAP has a natural formulation as a shortest paths problem, via the following graph construction (Figure 4). Construct an (n + 1) × m matrix of nodes, with directed edges between neighboring edges in the EAST, SOUTH, and SOUTHEAST directions. Corresponding to each row of edges is a point yi on contour y, and corresponding to each column of nodes is a point xj on contour x. In such a graph, every path from the top-left-most node to the bottom-right-most node corresponds to a (not necessarily unique) assignment vector, φ from y → x. Every SOUTH or SOUTHEAST action over yi’s edge row can be mapped to a point correspondence, φi, by taking φi to be the column j onto which the action took us. Thus, the cost of each SOUTH and SOUTHEAST edge into a node just below row i in column j will have cost C(i, j). Every EAST action in the row of nodes just above yi translates to matching yi to something after the current column’s xj. Incorporating the spacing penalty into LOPAP is done by giving a cost of λ to each horizontal edge. LOPAP can then be trivially solved with dynamic programming in this search graph.
  • 7. 2.3 Solving COPAP with LOPAP 6 s1 s2 s3 s4 e1 e2 e3 e4 Figure 5: COPAP graph. The solution to COPAP can by found by computing n shortest paths, from sk to ek, and choosing the assignment vector, φk , corresponding to the shortest one. 2.3 Solving COPAP with LOPAP COPAP (and COPAP-λ) can be solved naively with the solution to n LOPAPs, each with a different rotation of y’s point ordering. The edge rows in the LOPAP graph would be labeled (from top to bottom) y1, · · · , yn in the first LOPAP, y2, · · · , yn, y1 in the second LOPAP, etc. These n searches could also be accomplished by adding another copy of the LOPAP graph below the original graph, as in Figure 5. We call this new graph the COPAP graph, and search from n consecutive starting locations at the top-left of the graph to n consecutive end points at the bottom-right. The running time of this solu- tion to COPAP, where we solve each LOPAP with dynamic programming, is O(n2 m), since each LOPAP solution takes O(nm) time to complete, and we must perform n LOPAPs in total, each independently of the others. We call this algorithm “DP n-times”. In the next section, we will see how to improve on this bound using a bisection strategy on the COPAP graph.
  • 8. 2.4 A Bisection Strategy for COPAP 7 s1 s2 s3 s4 e1 e2 e3 e4 Figure 6: COPAP bisection strategy. Each shortest path from si to ei is constrained to lie between the shortest paths below and above it. 2.4 A Bisection Strategy for COPAP Consider the state of the “DP n-times” algorithm after finding a shortest path from si to ei, but before finding the shortest path from si+1 to ei+1 (Figure 6). The shortest path from si+1 to ei+1 must lie below the shortest path from si to ei, since any path from si+1 to ei+1 which crosses over the previous shortest path would have been better off to have followed the shortest path between the intersection points rather than taking the detour above it. The same argument applies if we have already computed paths below si+1 → ei+1, so that we can constrain our search space from above and below, depending on the order in which paths are found in the COPAP graph. From [18], we see that the best order in which to compute the shortest paths is a bisection ordering, starting with sn/2 → en/2 at the first level, then sn/4 → en/4 and s3n/4 → e3n/4 at the second level, and so on. There are O(log n) levels in total, and at each level we perform a series of disjoint bounded searches, with a total of O(nm) work being done in the DPs at each level. Thus, the total running time of this bisection algorithm, which we call “DP bisection”, is O(nm log n). 3 Point Assignment Cost We use a novel point assignment cost function, which we call the Procrustean Local Shape Distance (PLSD). A formal justification of this cost function is
  • 9. 3.1 Procrustean Local Shape Distance 8 beyond the scope of this paper–for now it suffices to say that PLSD belongs to a class of point assignment cost functions which consider local, rather than global shape information, and which use the geometry of the contour itself, rather than using derived statistics such as curvature or medial axis skeletons, in order to compute a similarity measure between the local shapes of contour points. PLSD is similar in nature to Belongie’s shape contexts [1], in that both methods directly use the observed geometry of the contour in order to compute the shape signature of a point. However, shape contexts consider the relative global shape with respect to each point, while the PLSD captures only local shape information. Another attribute of our approach is that the PLSD is a multi-resolution similarity measure–it compares local shapes of varying sizes in order to de- termine the overall match quality. The only other shape model we are aware of to use such a multi-resolution technique is the curvature scale space model [19], where contours are convolved with Gaussian kernels of varying sizes. Also similar to our method is the SIFT feature representation [17], which also use multi-resolution information to compare features, although SIFT features are computed on images, while the PLSD applies to contours. 3.1 Procrustean Local Shape Distance The Procrustes distance, dP , between two point vectors, x and y, is a metric on Kendall’s shape space [13] which is invariant to rotation, translation, and scaling of the point vectors x and y. In related work [7], we use the Procrustes distance to compute distributions over shapes in the same shape class in order to achieve robust shape classification and completion of occluded parts of contours. Given its utility for such shape inference tasks, it seems natural to attempt to apply the same Procrustean shape metric to the correspondence problem. Given a point xi on contour x, we define the local neighborhood of size k (for k odd) as: ηk(xi) = xi−(k−1)/2, ..., xi, ..., xi+(k−1)/2 (4) The Procrustean Local Shape Distance, dP LS, between two points, xi and yj is the minimum Procrustean shape distance over varying neighborhood sizes, k: dP LS(xi, yj) = min k dP [ηk(xi), ηk(yj)] (5)
  • 10. 3.2 PLSD Point Assignment Cost Matrix 9 (a) (b) (c) (d) (e) (f) Figure 7: Procrustes shape distance over varying local shape neighborhood sizes, k. dP is plotted vs. k for neighborhoods around the point marked by “*” of size k = 3...21 for (a)-(c) a good match, and (d)-(f) a bad match. In Figure 7, we see the Procrustes distance, dP plotted vs. neighborhood size, k, for both good and bad matches. For good matches, this local shape distance curve tends to slope downward initially until the local shape is com- pletely encompassed in the neighborhood, and then rises again as neighboring features are encountered. For bad matches, the curve may still start at a low value, since at the smallest neighborhood sizes the measurement noise may dominate the shape distance, but as the neighborhood grows and more of the geometry is captured, the shape distance will increase. We compute the PLSD as the minimum of one of these local shape dis- tance curves, although better results may be achieved using machine learning to compute a more discriminative statistic. 3.2 PLSD Point Assignment Cost Matrix Examining the PLSD point assignment cost matrix for the points of two shapes reveals a great deal of structure in the assignment problem. As can be seen in figure 8, the cost matrix typically contains a few high cost rows and columns, or mountains, interspersed between a number of low-cost rows
  • 11. 3.2 PLSD Point Assignment Cost Matrix 10 −0.2 −0.1 0 0.1 0.2 −0.25 −0.2 −0.15 −0.1 −0.05 0 0.05 0.1 0.15 0.2 0.25 (a) −0.2 −0.1 0 0.1 0.2 −0.25 −0.2 −0.15 −0.1 −0.05 0 0.05 0.1 0.15 0.2 0.25 (b) (c) Figure 8: PLSD cost matrix for two butterfly contours. The cost matrix has a very regular structure. and columns, or valleys. Remembering the LOPAP graph from section 2.2, we know that the entries in the point-assignment cost matrix correspond to downward pointing edges in the LOPAP graph. Since we must cross all of the rows in the graph in order to get from the start to the end, the total cost of a path in the LOPAP graph will in many cases be almost entirely determined by the cost to cross each of the “mountain” rows. If there are low-cost “passes” through the mountains, a good overall match exists; if not, then the total match cost will be high. The picture for the column mountains is less clear, as such mountains can always be passed over by absorbing the spacing penalty, λ, on the horizontal edges crossing the high-cost columns. These high-cost row and column mountains often have a clear interpre- tation in terms of the geometries of the two contours. When the local shape around a contour point yi on the first shape, y (indexed by the rows in the cost matrix) is distinct, the PLSD between that point and most points on the second contour, x (indexed by the columns in the cost matrix) will be high, and yi will have a high-cost row. When the local shape around a point xj on the second contour is distinct, the PLSD between that point and most points on y will be high, giving rise to a high-cost column. In this way, the point- assignment cost matrix can act as a type of feature detector, where high cost rows and columns correspond to feature points of unique local shape on the two contours. In addition, prior knowledge of such contour features can inform the search algorithm of where the high-cost rows and columns are located in the search graph. In the next section, we will see how to use such knowledge to improve upon the basic dynamic programming solution to LOPAP using an A* heuristic-based search.
  • 12. 4 Heuristic Search 11 4 Heuristic Search While the basic DP solution to COPAP yields a good asymptotic running time–O(nm log n)–using the bisection strategy of section 2.4, the story for LOPAP is not nearly as good. Although it is impossible to improve upon DP’s worst-case asymptotic running time of Θ(nm), the DP solution expands all (n + 1) × m states in the LOPAP graph, while many of these states may never need to be considered in a heuristic search. In this section, we present several different cost-to-goal heuristic functions for use with the A* search algorithm [20]. The first of these we call the LAMBDA heuristic, as it uses the spacing penalty, λ, to determine a lower bound on the cost-to-goal. The second is the ROWCUT heuristic, which uses prior knowledge of the high-cost rows in the point-assignment cost matrix in order to lower bound the cost-to-goal, and the third is the GRIDCUT heuristic, which uses prior knowledge of both the high cost rows and the high cost columns. In practice, we may combine these heuristics, at any node taking the h-function with maximum value (since they are all lower bounds), or for heuristics which are independent (such as LAMBDA and ROWCUT), we may add their h-values together to create a new heuristic. 4.1 The LAMBDA heuristic Each horizontal edge in the LOPAP graph has a cost of λ. In addition, we may never move up or to the left in the graph. Thus, if we are currently standing at a node in the bottom-left portion of the LOPAP graph, we must pay some spacing penalty in order to walk the rest of the way to the goal. We can lower bound this spacing penalty by λ times the horizontal distance from the diagonal; that is: hλ(i, j) = [max(0, (jg − j) − (ig − i))] · λ (6) where (i, j) is the current position in the graph (row, column), and (ig, jg) is the position of the goal–for LOPAP, (n + 1, m). 4.2 The ROWCUT heuristic In order to reach the goal from any node in the LOPAP graph, we must cross over every row of edges between the current node and the goal. In particular, we must cross over all of the high-cost, or mountain rows between the two nodes. Thus, given that the cost matrix has been computed for K high-cost rows, r1, ..., rK, we can lower bound the cost-to-goal as the sum of
  • 13. 4.3 The GRIDCUT heuristic 12 the minimum costs to cross each row between the current node and the goal, yielding: hrowmins(i, j) = i≤rk<ig min ℓ=1...m C(rk, ℓ) (7) We can do better by recalling that we can never move to the left in the LOPAP graph, so from any node we are forced to cross over the rows below us either at or to the right of the current column. Thus, hrowcuts(i, j) = i≤rk<ig min ℓ=j...m C(rk, ℓ) (8) Note that this entails O(K ·m) pre-processing time (to compute all of the postfix row-mins), but only O(K) time to compute the heuristic at run-time. 4.3 The GRIDCUT heuristic If we wish to use column cuts in addition to row cuts, we can no longer simply sum over all of the cuts, since it is possible to cross over both a row cut and a column cut simultaneously by traversing a diagonal edge. What we can do, however, is treat the nodes within one “grid cell” (those nodes which are bounded by the same row and column cuts) as a single super-node, (i′ , j′ ), in a new graph, with edges in the EAST, SOUTH, and SOUTHEAST directions, computing the edge costs as follows: • EAST–minimum of λ and the min. diagonal cost to cross over the eastward- bounding column cut between super-nodes (i′ , j′ ) and (i′ , j′ + 1), • SOUTH–min. cost (taking either a SOUTH or a SOUTHEAST edge) to cross over the southward-bounding row cut between super nodes (i′ , j′ ) and (i′ + 1, j′ ), and • SOUTHEAST–C(ri′ , cj′ ) (where ri′ is the i′ -th rowcut and cj′ if the j′ -th column cut); i.e., the cost to cross diagonally from super-node (i′ , j′ ) to super-node (i′ + 1, j′ + 1) We can then solve the shortest paths problem in this graph of super-nodes, G′ , using dynamic programming, achieving a lower bound on the cost-to-goal in the original graph, G, for each super-node cell. The pre-processing time is O(KL + Kn + Lm), where the grid is segmented by K high-cost rows and L high-cost columns; however the time to compute the heuristic at run-time is just a lookup, O(1).
  • 14. 5 Experimental Results 13 5 Experimental Results Figure 9: Some of the shapes from the MPEG-7 Shape B dataset used in the experiments. We tested the COPAP and LOPAP algorithms discussed above on a total of 390 randomly drawn pairs of shapes from the MPEG-7 Shape B dataset (Figure 9). 360 pairs were drawn from the same class, and 60 from different classes. We designed the sampling to be imbalanced in this way because in most practical applications, the contour-based correspondence algorithms we have considered only give meaningful results when run on pairs of shapes that are similar to each other; more complex, part-based methods should be used to compare shapes that are very different. All algorithms were implemented in a mix of MATLAB and C code, with the heavy pointer-arithmetic and data structure code being written in C, and everything else in MATLAB. In particular, this means that the PLSD point-assignment cost function was implemented in MATLAB, and thus made up a very significant portion of the total running time of our algorithms. This is not an unreasonable feature, however, since many point-assignment cost functions are even more compu- tationally expensive than the PLSD, and we would like our analysis to apply to those methods as well. The experiments will be presented in two parts. First, we test LOPAP, comparing the dynamic programming solution in section 2.2 to the A∗ algo- rithms in section 4. In addition, we compare A∗ , which yields optimal solu- tions, to A∗ ǫ [20], an approximation algorithm, with varying second heuristic function, h2 1 . In the second part of this section, we test COPAP, compar- ing the “DP n-times” and “DP bisection” algorithms from sections 2.3–2.4 to “A∗ n-times” and “A∗ bisection”, the equivalent algorithms where each LOPAP is solved with A∗ instead of dynamic programming. We also investigate the effects of both model and algorithmic parameters– namely the spacing penalty, λ, and the number of row and column cuts, K 1 The second heuristic function of A∗ ǫ gives the expansion order of all nodes within ǫ% of the current minimum f-value.
  • 15. 5.1 LOPAP 14 and L–on the performance of the algorithms. In addition, we uncover a relationship between shape similarity and total running time. We conclude the section with asymptotic results, increasing the number of points used to represent each contour and verifying the performance gains of the bisection strategy over n-times. 5.1 LOPAP 5.1.1 Design We extracted contours from the MPEG-7 shape dataset in MATLAB, and sampled 100 evenly-spaced points around each contour. Thus n = m = 100 for every pair of contours we wished to match so that the point-assignment cost matrix contained exactly 10, 000 entries. We then ran the DP, A*, and A∗ ǫ algorithms on all 390 pairs. Both variants of A∗ were implemented with binary heaps, for a running time bound of O(n2 log n). For both A∗ and A∗ ǫ , we tried λ=5%, 10%, and 20% of the total match cost (i.e. the length of the shortest path through the LOPAP graph when λ = 0). This range of values for λ was manually determined to give the most accurate matchings on a subset of the MPEG-7 shape dataset. We also tried λ=1% for a subset of the within-class pairs (roughly 50%), but not for the between-class pairs, as the running time was prohibitively long. In addition, we set K = L in all experiments, and tried K=L=2,4,6, and 8. In order to estimate the lo- cations of the high-cost rows, we randomly chose three columns in the cost matrix, computed the values of all of their entries, and then chose the top K rows with maximal sum across the three columns to be the row cuts. (We applied the same technique on the transposed cost matrix in order to compute the column cuts). With this estimation scheme, the ROWCUT heuristic expands (K +3)n entries of the cost matrix in pre-processing, while the GRIDCUT heuristic expands (2K +6)n entries. Instead of testing ROW- CUT or GRIDCUT alone, we combined each of them (additively) with the LAMBDA heuristic in order to achieve a higher lower bound on the cost-to- goal, as per section 4. For the second heuristic in the A∗ ǫ algorithm, we tried four functions: L1 distance to goal, L2 distance to goal, L∞ distance to goal, and L1 distance to the diagonal (leading to the goal). 5.1.2 DP vs. A* As explained in section 4, the DP algorithm must expand all 10, 000 entries in the cost matrix in order to determine the optimal solution to LOPAP. The A* algorithm, on the other hand, need not expand all of the nodes.
  • 16. 5.1 LOPAP 15 Figure 10 illustrates the number of nodes expanded for DP and A*, both in the actual search and during the pre-processing phase. From this we see that A* expands significantly fewer nodes than the full DP does. In addition, the LAMBDA heuristic tends to expand the fewest nodes in total, while ROWCUT and GRIDCUT expand fewer nodes within the search algorithm. DP A* λ A* λ rowcut A* λ gridcut countalg 10000 2055 1777 1804 counttot 10000 2055 2559 3302 talg (sec) 2.683 0.912 0.798 0.879 ttot (sec) 2.683 0.912 0.999 1.26 Table 1: Mean counts and run-times for DP and A∗ , averaged across λ = 5%, 10%, and 20%, and over all K. The LAMBDA-ROWCUT heuristic outperforms LAMBDA- GRIDCUT in every category, on average. 1 2 3 4 0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 #nodesexpanded in algorithm in total A* lambdaDP A* lambda row cuts A* lambda grid cuts Figure 10: Cost matrix nodes expanded during LOPAP. DP expands several times as many nodes as A* does. A* with the LAMBDA heuristic expands the fewest nodes in total, although LAMBDA-ROWCUT and LAMBDA-GRIDCUT expand fewer nodes within the search. Results are averaged over λ = 5%, 10%, and 20%, and over all K. Table 1 shows both the number of nodes expanded and the running times of DP and A*. Note that the running times are well correlated with the
  • 17. 5.1 LOPAP 16 number of nodes expanded, and also that the LAMBDA-ROWCUT heuristic outperforms LAMBDA-GRIDCUT in every category, on average. 5.1.3 A∗ vs. A∗ ǫ Table 2 shows the mean counts and run-times of A∗ and A∗ ǫ (with varying h2 function). On average, A∗ ǫ expands about 100 fewer states than A∗ does, at a cost of less than 0.5% in accuracy. However, A∗ ǫ is significantly slower than A∗ , as it must keep track of 3 heaps (one sorted by h and two sorted by h2), while A∗ uses only one heap. Also, the L1 and L2 second heuristics slightly outperform the “diag” and L∞ heuristics, although the difference is marginal at best. A∗ A∗ ǫ (L1) A∗ ǫ (L2) A∗ ǫ (diag) A∗ ǫ (L∞) countalg 1879 1798 1800 1824 1824 counttot 2639 2558 2560 2584 2584 talg (sec) 0.86 1.34 1.32 1.34 1.37 ttot (sec) 1.06 1.54 1.51 1.54 1.56 Table 2: A∗ vs. A∗ ǫ . In the mean case, A∗ ǫ expands fewer nodes, but A∗ has a faster running time. Results averaged over λ = 5%, 10%, and 20%, and all K. 5.1.4 Effect of spacing penalty To test our algorithms’ performance under varying model parameters we now consider the effects of changing the spacing penalty, λ. Intuitively, we would expect that when λ increases the obtained optimal solution would be a matching with little spacing penalty. This means that the optimal path in the LOPAP graph should be close to the diagonal. Therefore, we would expect that A* should expand fewer nodes and would achieve a faster run- time. In table 3, we see that our intuition is correct–both the number of nodes expanded and the running times decrease as λ increases. We conclude that the spacing penalty has a significant impact on the performance of A*. However, the spacing penalty is a parameter of the model and therefore cannot be changed by the algorithm. 5.1.5 Effect of shape similarity We now examine the effects of shape similarity on the performance of the A∗ LOPAP algorithm. In table 4, we see that finding correspondences between objects of different classes takes longer than finding correspondences between
  • 18. 5.2 COPAP 17 λ=1% 5% 10% 20% countalg 5351 2541 1736 1197 counttot 6111 3301 2495 1957 talg (sec) 13.58 2.08 1.04 0.62 ttot (sec) 13.67 2.27 1.24 0.81 Table 3: The effects of the spacing penalty, λ, on A∗ . Here we have used only the LAMBDA-ROWCUT heuristic, although similar results can be seen for the other heuris- tics, as well. Results are averaged over all K. objects of the same class. In contrast, the DP solution works independently of the data. Figures 11 and 12 suggest that there is a class of hard problems with low λ and high total cost, d, that are better solved with DP than with A∗ . Within class Between class costtot 1.523 4.133 countalg 1825 2989 counttot 2585 3749 talg (sec) 1.25 3.81 ttot (sec) 1.44 4.01 Table 4: Within-class vs. between-class. Similar shapes expand fewer nodes and find optimal correspondences in a shorter amount of time. Values averaged over λ = 5%, 10%, and 20%, and over all K. 5.1.6 LOPAP asymptotics We now test the asymptotic behavior of the A∗ and DP algorithms on LOPAP. In figure 13, we see that DP dominates A∗ for large values of n. This may be because the heap A∗ uses to store nodes in the OPEN list grows with the number of nodes in the graph. It may also be related to the fact that we did not try higher numbers of row cuts, K, as we increased n. More investigation is needed to determine whether A∗ can be made to perform better than DP on larger problems. 5.2 COPAP In testing COPAP, we draw upon the results of the LOPAP experiments in order to reduce the number of variations that are tried. Specifically, we
  • 19. 5.2 COPAP 18 0 5 10 15 0 2 4 6 8 10 12 Total match cost Time(sec) DP A*−lambda A*−lambda rowcut A*−lambda gridcut (a) λ = 1% 0 5 10 15 0 2 4 6 8 10 12 Total match cost Time(sec) DP A*−lambda A*−lambda rowcut A*−lambda gridcut (b) λ = 5% 0 5 10 15 0 2 4 6 8 10 12 Total match cost Time(sec) DP A*−lambda A*−lambda rowcut A*−lambda gridcut (c) λ = 10% 0 5 10 15 0 2 4 6 8 10 12 Total match cost Time(sec) DP A*−lambda A*−lambda rowcut A*−lambda gridcut (d) λ = 20% Figure 11: Shape similarity LOPAP scatter plot. A∗ trials are plotted on a time vs. total match cost scale, with the DP run-time shown as a constant line for comparison. For λ = 10–20%, A∗ has a faster run-time than DP in most experiments, while for λ = 5%, many of the A∗ run-times are above the DP line, and for λ = 1%, A∗ only beats DP in a few cases. compare only A∗ and DP, since the relationship of A∗ to A∗ ǫ has already been covered. We also implemented a path pruning technique for A∗ which we call “permutation path pruning” (or PPP) which stops an A∗ search from si to ei if the min. value on the open list is greater than the total path cost found at some other permutation, j; in this case no path will be found from si to ei that is better than the path found from sj to ej. Although this pruning method destroys the theoretical running time bound of O(n2 log2 n) for A∗ bisection, we found it to improve running times in practice, and so we use it in all of our COPAP A∗ experiments. Furthermore, we test only the LAMBDA and LAMBDA-ROWCUT heuris- tics, as GRIDCUT has been found to be sub-optimal to ROWCUT in most cases. We also reduce the number of points around each contour from 100 to
  • 20. 5.2 COPAP 19 0 5 10 15 0 1 2 3 4 5 6 7 8 Total match cost Time(sec) DP A*−lambda A*−lambda rowcut A*−lambda gridcut (a) λ = 1% 0 5 10 15 0 1 2 3 4 5 6 7 8 Total match cost Time(sec) DP A*−lambda A*−lambda rowcut A*−lambda gridcut (b) λ = 5% 0 5 10 15 0 1 2 3 4 5 6 7 8 Total match cost Time(sec) DP A*−lambda A*−lambda rowcut A*−lambda gridcut (c) λ = 10% 0 5 10 15 0 1 2 3 4 5 6 7 8 Total match cost Time(sec) DP A*−lambda A*−lambda rowcut A*−lambda gridcut (d) λ = 20% Figure 12: Shape similarity LOPAP regression. The total match cost has a greater effect for low values of λ. Also, while the LAMBDA heuristic is the fastest for λ ≥ 10%, it is by far the slowest when λ = 1%. For values of λ between 1% and 5%, there is some feasible total match cost, d, for which A∗ is faster than DP below d and DP is faster than A∗ above d. 50, in order to speed up the experiments. We test our algorithms on a total of 43 pairs of shapes from the MPEG-7 Shape B dataset. We still test λ values of 5%, 10%, and 20%, but not 1%. The number of row (and columns) cuts once again varies from 2 to 8. In section 2 we introduced two strategies for handling COPAP; the n- times strategy and the bisection strategy. In the first experiment we compare these two strategies, when used with DP, A∗ LAMBDA and A∗ LAMBDA- ROWCUT, respectively. The results are shown in table 5. DP is significantly faster than the two A∗ algorithms and the bisection strategy dominates n- times. In table 6 and 7 we show the effect of λ on the performance of A∗ . It is clear that both A∗ n-times and bisection get significantly faster as λ increases;
  • 21. 5.2 COPAP 20 150 200 250 300 350 400 450 0 20 40 60 80 100 120 140 160 180 #points on contour Time(sec) DP A* lambda A* lambda rowcut A* lambda gridcut Figure 13: Asymptotics of LOPAP. As the number of points on the contour increases, DP begins to outperform A∗ . Results averaged over λ = 5%, 10%, and 20%, and over all K. however, even for λ = 20%, A∗ is still much slower than DP. In figure 14 we see that A∗ LAMBDA-ROWCUT now expands fewer nodes, on average, than A∗ LAMBDA does. This is because many of the nodes that are expanded during pre-processing in A∗ LAMBDA-ROWCUT will need to be expanded later on in one of the n searches through the COPAP graph, so we might as well expand the nodes up front and get the extra benefit that knowledge of the row cuts brings. The flip side is that neither heuristic makes A∗ expand substantially fewer nodes than the DP does, so a purely heuristic search for COPAP is not beneficial. 5.2.1 COPAP asymptotics In our last experiment we test the asymptotic behavior (as n increases) of the n-times and bisection strategies for COPAP. As A∗ was found to be sub- optimal to DP for COPAP, we show only the DP asymptotics. In figure 15 we see the result of increasing n, the number of points on each contour. As explained in section 2 DP n-times has a running time of O(n3 ) (when n = m) and DP bisection has a running time of O(n2 ·log(n)). These results support
  • 22. 6 Discussion 21 n times bisection DP A* λ A* λ row cut DP A* λ A* λ row cut countalg 2500 1592 1202 2500 1698 1271 counttot 2500 1592 1585 2500 1698 1654 timealg 1.14 87.7 63.6 0.78 49.7 35.8 timetot 1.13 87.7 63.7 0.78 35.8 45.9 Table 5: COPAP–DP vs. A∗ for the n-times and bisection strategies. Although A∗ expands fewer nodes than DP does, DP is an order of magnitude faster than A∗ . Results are averaged over all values of λ and K. λ = 5 % λ = 10 % λ = 20 % λ λ row cut λ λ row cut λ λ row cut countalg 1979 1449 1547 1182 1249 979 counttot 1979 1831 1547 1566 1249 1357 timealg 173.3 118.9 66.0 51.5 24.0 20.4 timetot 173.3 119.0 66.0 51.6 24.0 20.5 Table 6: A∗ n-times. the theoretical bounds of section 2, showing the dominance of n-times by the bisection algorithm. 6 Discussion We have seen that A∗ outperforms DP on LOPAP in most cases, yet fails miserably when run on the full-blown COPAP. To understand why, we recall the COPAP graph from figure 5, and we consider what happens when the bisection strategy is performed on the graph. The DP bisection strategy will start by solving the normal n × m LOPAP problem, but after a few iterations it will be solving much smaller problems, expanding only states near the diagonal from si to ei. For these smaller problems it is senseless to apply a heuristic search, as we not only lose the theoretical guarantees of the DP, but we also require additional data structures and supporting routines which greatly increase the constants in the running time. Yet given how much better A∗ is than DP on a single LOPAP, especially when the two contours are very similar or when the spacing penalty, λ, is high, it makes sense to try a hybrid strategy, using A∗ on the large problems encountered at the beginning of the bisection, and returning to dynamic
  • 23. 6 Discussion 22 λ = 5 % λ = 10 % λ = 20 % λ λ row cut λ λ row cut λ λ row cut countalg 2071 1525 1671 1256 1354 1032 counttot 2071 1997 1671 1640 1354 1415 timealg 95.4 64.4 39.1 29.4 14.5 13.6 timetot 95.4 64.5 39.1 29.5 14.5 13.7 Table 7: A∗ bisection. 1 2 3 4 5 0 500 1000 1500 2000 2500 #ofnodesexpanded in algorithm in total DP A* lambda n times A* lambda row cut n times A* lambda bisection A* lambda row cut bisection Figure 14: Number of nodes expanded for the 4 combinations of A* λ compared to DP. programming once the state space of a given search is sufficiently small. In addition, it may not always be necessary to run the complete COPAP in order to find a good matching between two shapes. If one has knowledge of which starting points are likely to be worth trying at all, then a few LOPAPs may be all that are needed to find a good sub-optimal solution.
  • 24. 7 Conclusion 23 100 150 200 250 300 350 400 450 500 550 600 0 500 1000 1500 2000 2500 3000 #points on contour Time(sec) DP n times DP bisection Figure 15: Asymptotics of COPAP. DP n-times has a running time of O(n3 ) while DP bisection has a running time of O(n2 log n), where n is the number of points on the contour. 7 Conclusion In this paper, we have presented a new point-assignment cost function–called the Procrustean Local Shape Distance (PLSD)–for use with the cyclic order- preserving assignment problem (COPAP). We saw that COPAP could be represented in a graph as a shortest paths problem, and presented a vari- ation of COPAP called COPAP-λ which introduced a spacing penalty on the total assignment cost. We then presented three novel heuristics for use with the A∗ search algorithm in order to solve COPAP and its related sub- problem, LOPAP, more efficiently. We compared the performance of these new A∗ algorithms to the dynamic programming solutions given in the ex- isting literature on the MPEG-7 shape B data set. We found the ROWCUT heuristic to be the best, and evaluated the performance of A∗ as we varied the number of row cuts as well as the spacing penalty, λ. Finally, we saw that a dynamic programming bisection strategy outperformed A∗ on the full-blown COPAP problem, and suggested that a hybrid strategy, combining dynamic programming with heuristic search, is the best way to handle large problems optimally.
  • 25. REFERENCES 24 −0.25 −0.2 −0.15 −0.1 −0.05 0 0.05 0.1 0.15 0.2 −0.25 −0.2 −0.15 −0.1 −0.05 0 0.05 0.1 0.15 0.2 0.25 −0.25 −0.2 −0.15 −0.1 −0.05 0 0.05 0.1 0.15 0.2 −0.25 −0.2 −0.15 −0.1 −0.05 0 0.05 0.1 0.15 0.2 0.25 −0.25 −0.2 −0.15 −0.1 −0.05 0 0.05 0.1 0.15 0.2 −0.25 −0.2 −0.15 −0.1 −0.05 0 0.05 0.1 0.15 0.2 0.25 −0.25 −0.2 −0.15 −0.1 −0.05 0 0.05 0.1 0.15 0.2 0.25 −0.25 −0.2 −0.15 −0.1 −0.05 0 0.05 0.1 0.15 0.2 0.25 Figure 16: Optimal solutions to COPAP-λ with the PLSD point-assignment cost func- tion. References [1] Serge Belongie, Jitendra Malik, and Jan Puzicha. Shape matching and object recognition using shape contexts. IEEE Trans. Pattern Analysis and Machine Intelligence, 24(24):509–522, April 2002. [2] P.J. Besl and N.D. McKay. A method for registration of 3-d shapes. IEEE Transactions on Pattern Analysis and Machine Intelligence, 14(2):239–256, 1992. [3] A. Blake and M. Isard. Active Contours. Springer-Verlag, 1998. [4] Miroslaw Bober. Mpeg-7 visual shape descriptors. IEEE Trans. on Circuits and Systems for Video Technology, 11(6), June 2001. [5] F.L. Bookstein. A statistical method for biological shape comparisons. Theoretical Biology, 107:475–520, 1984. [6] I. Dryden and K. Mardia. Statistical Shape Analysis. John Wiley and Sons, 1998. [7] Jared Glover, Daniela Rus, Nicholas Roy, and Geoff Gordon. Robust models of object geometry. In Proceedings of the IROS Workshop on From Sensors to Human Spatial Concepts, Beijing, China, 2006.
  • 26. REFERENCES 25 [8] D.P. Huttenlocher, G.A. Klanderman, and W.A. Rucklidge. Comparing images using the hausdorff distance. IEEE Transactions on Pattern Analysis and Machine Intelligence, 15(9):850–863, 1993. [9] M. Isard and A. Blake. Contour tracking by stochastic propagation of conditional density. In European Conf. Computer Vision, pages 343–356, 1996. [10] V. Jain and Robust 2D shape Correspondence using Geodesic Shape Context H. Zhang. Robust 2d shape correspondence using geodesic shape context. Pacific Graphics, pages 121–124, May 2005. [11] D.G. Kendall. The diffusion of shape. Advances in Applied Probability, 9:428–430, 1977. [12] D.G. Kendall. Shape manifolds, procrustean metrics, and complex pro- jective spaces. Bull. London Math Soc., 16:81–121, 1984. [13] D.G. Kendall, D. Barden, T.K. Carne, and H. Le. Shape and Shape Theory. John Wiley and Sons, 1999. [14] L. J. Latecki and R. Lak¨amper. Contour-based shape similarity. In Proc. of Int. Conf. on Visual Information Systems, volume LNCS 1614, pages 617–624, June 1999. [15] Longin Jan Latecki, Rolf Lak¨amper, and Ulrich Eckhardt. Shape de- scriptors for non-rigid shapes with a single closed contour. In IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), pages 424–429, 2000. [16] Haibin Ling and David W. Jacobs. Using the inner-distance for clas- sification of articulated shapes. IEEE Computer Vision and Pattern Recognition, 2:719–726, June 2005. [17] David G. Lowe. Object recognition from local scale-invariant features. In Proc. of the International Conference on Computer Vision ICCV, pages 1150–1157, 1999. [18] Maurice Maes. On a cyclic string-to-string correction problem. Inf. Process. Lett., 35(2):73–78, 1990. [19] F. Mokhtarian and A. K. Mackworth. A theory of multiscale curvature- based shape representation for planar curves. In IEEE Trans. Pattern Analysis and Machine Intelligence, volume 14, 1992.
  • 27. REFERENCES 26 [20] Judea Pearl. Heuristics: Intelligent Search Strategies for Computer Problem Solving. Addison-Wesley, Reading, MA, 1984. [21] S. Ranade and A. Rosenfeld. Point pattern matching by relaxation. Pattern Recognition, 12:269–275, 1980. [22] C. Scott and R. Nowak. Robust contour matching via the order pre- serving assignment problem. IEEE Transactions on Image Processing, 15(7):1831–1838, July 2006. [23] Thomas Sebastian, Philip Klein, and Benjamin Kimia. On aligning curves. PAMI, 25(1):116–125, January 2003. [24] Thomas Sebastian, Philip Klein, and Benjamin Kimia. Recognition of shapes by editing their shock graphs. volume 26, 2004. [25] Thomas B. Sebastian and Benjamin B. Kimia. Curves vs skeletons in object recognition. Signal Processing, 85(2):247–263, February 2005. [26] Kaleem Siddiqi, Ali Shokoufandeh, Sven J. Dickinson, and Steven W. Zucker. Shock graphs and shape matching. In ICCV, pages 222–229, 1998. [27] C. G. Small. The statistical theory of shape. Springer, 1996. [28] Remco C. Veltkamp. Shape matching: Similarity measures and algo- rithms. Technical Report UU-CS-2001-03, Utrecht University, 2001. [29] Yefeng Zheng and David Doermann. Robust point matching for nonrigid shapes by preserving local neighborhood structures. IEEE Transactions on Pattern Analysis and Machine Intelligence, 28(4), April 2006.