on the complexity of affine image matching stacs 2007, aachen university of lbeck institute for...
DESCRIPTION
Overview On the Complexity of Affine Image Matching 1.Notation and the Problem 2.Structure of the Searchspace 3.Polynomial Time AlgorithmTRANSCRIPT
On the Complexity ofAffine Image Matching
STACS 2007, Aachen
University of LübeckInstitute for Theoretical Computer ScienceLübeck, Germany
Thursday, February 22th 2007
Christian Hundt and Maciej Liśkiewicz
Foto: Andreas Herrmann
What is Image Matching?On the Complexity of Affine Image Matching
? ? ?
OverviewOn the Complexity of Affine Image Matching
1. Notation and the Problem
2. Structure of the Searchspace
3. Polynomial Time Algorithm
Section 1On the Complexity of Affine Image Matching
Notation and the Problem
Notation and the ProblemR2-Functions and Images
On the Complexity of Affine Image Matching
A: R R R
Notation and the ProblemR2-Functions and Images
On the Complexity of Affine Image Matching
A: Z Z R
Discretization of A ( step I ):
Notation and the ProblemR2-Functions and Images
On the Complexity of Affine Image Matching
A: Z Z R
Notation and the ProblemR2-Functions and Images
On the Complexity of Affine Image Matching
A: Z Z R
Notation and the ProblemR2-Functions and Images
On the Complexity of Affine Image Matching
A: Z Z Z
14 19 12 14
18 21 13 17
16 18 13 15
14 19 12 14
Discretization of A ( step II ):
Notation and the ProblemImage Metric
On the Complexity of Affine Image Matching
BA
: R R R ( e.g. (a,b) = |a-b| )
(A, B) = ( A(x,y), B(x,y) ) dx dy- -
Notation and the ProblemImage Metric
On the Complexity of Affine Image Matching
BA
(A, B) = ( A(x,y), B(x,y) ) N
N
Discretization of for Images:
14N2
y=-N x=-N
Notation and the ProblemTransformations
On the Complexity of Affine Image Matching
f(A)(x,y) = A( f -1(x,y) )
A f(A)
f
f -118
18
Notation and the ProblemTransformations
On the Complexity of Affine Image Matching
f(A)(x,y) = A( f -1(x,y) )
A f(A)
f -1
????????????
and with Images?
Notation and the ProblemTransformations
On the Complexity of Affine Image Matching
A f(A)
Notation and the ProblemTransformations
On the Complexity of Affine Image Matching
A f(A)
Nearest Neighbour Interpolation!!!
Notation and the ProblemTransformations
On the Complexity of Affine Image Matching
f (i, j) =[ f -1(i, j) ], if in (-N ... N)2
sonst
Discretization of f:
(0,0)
(0,1)
(0,2)
(0,3)
(1,0) (2,0) (3,0) (4,0)
(1,1) (2,1) (3,1) (4,1)
(1,2) (2,2) (3,2) (4,2)
(1,3) (2,3) (3,3) (4,3)
Notation and the ProblemTransformations
On the Complexity of Affine Image Matching
f (i, j) =[ f -1(i, j) ], if in (-N ... N)2
sonst
Discretization of f:
(3,1)(0,0)
(0,1)
(0,2)
(0,3)
(1,0) (2,0) (3,0) (4,0)
(1,1) (2,1) (3,1) (4,1)
(1,2) (2,2) (3,2) (4,2)
(1,3) (2,3) (3,3) (4,3)
Notation and the ProblemTransformations
On the Complexity of Affine Image Matching
f (i, j) =[ f -1(i, j) ], if in (-N ... N)2
sonst
Discretization of f:
(3,1)(2,1)(0,0)
(0,1)
(0,2)
(0,3)
(1,0) (2,0) (3,0) (4,0)
(1,1) (2,1) (3,1) (4,1)
(1,2) (2,2) (3,2) (4,2)
(1,3) (2,3) (3,3) (4,3)
Notation and the ProblemTransformations
On the Complexity of Affine Image Matching
f (i, j) =[ f -1(i, j) ], if in (-N ... N)2
sonst
Discretization of f:
(3,1)(2,1)(1,1)(0,0)
(0,1)
(0,2)
(0,3)
(1,0) (2,0) (3,0) (4,0)
(1,1) (2,1) (3,1) (4,1)
(1,2) (2,2) (3,2) (4,2)
(1,3) (2,3) (3,3) (4,3)
Notation and the ProblemTransformations
On the Complexity of Affine Image Matching
f (i, j) =[ f -1(i, j) ], if in (-N ... N)2
sonst
Discretization of f:
(3,1)(2,1)(1,1)(0,1)(0,0)
(0,1)
(0,2)
(0,3)
(1,0) (2,0) (3,0) (4,0)
(1,1) (2,1) (3,1) (4,1)
(1,2) (2,2) (3,2) (4,2)
(1,3) (2,3) (3,3) (4,3)
Notation and the ProblemTransformations
On the Complexity of Affine Image Matching
f (i, j) =[ f -1(i, j) ], if in (-N ... N)2
sonst
Discretization of f:
(3,1)(2,1)(1,1)(0,1)(0,0)
(0,1)
(0,2)
(0,3)
(1,0) (2,0) (3,0) (4,0)
(1,1) (2,1) (3,1) (4,1)
(1,2) (2,2) (3,2) (4,2)
(1,3) (2,3) (3,3) (4,3)
Notation and the ProblemTransformations
On the Complexity of Affine Image Matching
f (i, j) =[ f -1(i, j) ], if in (-N ... N)2
sonst
Discretization of f:
(3,1)(2,1)(1,1)(0,1)
(0,2)
(0,3)
(1,2)
(1,3)
(2,2)
(2,3)
(3,2)
(3,3)
(0,0)
(0,1)
(0,2)
(0,3)
(1,0) (2,0) (3,0) (4,0)
(1,1) (2,1) (3,1) (4,1)
(1,2) (2,2) (3,2) (4,2)
(1,3) (2,3) (3,3) (4,3)
Notation and the ProblemTransformations
On the Complexity of Affine Image Matching
Discretization of F:
N(F) = { f | f F and f injecive }
Notation and the ProblemImage Matching
On the Complexity of Affine Image Matching
BA
f ?
Input: Image A, distorted image B, set of admissible transformations F
Solution:Transformation f in F
Goal: min (f(A), B) = min ( A( (x,y) ), B(x,y) )14N2 y=-N x=-N
N N
f F N(F)
Notation and the ProblemHow to ...
On the Complexity of Affine Image Matching
1. enumerate N(F) ?
2. estimate |N(F)| ?
Notation and the ProblemElastic Image Matching
On the Complexity of Affine Image Matching
f
f(A)A
Set of transformation F: ||(x,y)-(x‘,y‘)|| 1 ||f(x,y)-f(x‘,y‘)||
[Keysers; Unger; 2002] Elastic Image Matching is NP-complete.
Notation and the ProblemProjective Image Matching
On the Complexity of Affine Image Matching
f(A)A
Set of transformation F: f(x,y) = (a/c, b/c) and (a,b,c) = M(x,y,1)
Open Problem.
f
Notation and the ProblemAffine Image Matching
On the Complexity of Affine Image Matching
f(A)A
Set of transformation F: f(x,y) = M(x, y) + t
Our result: Affine Image Matching can be solved in polynomial time.
f
Notation and the ProblemMore Image Matching Classes
On the Complexity of Affine Image Matching
f
f
f
f
f
Translation:
Scaling:
Rotation:
Rotation &Scaling:
LinearTransformation:
f(x,y) = +1 0
0 1
s 0
0 s
cos sin
-sin cos
s cos s sin
-s sin s cos
x
y
t1
t2
f(x,y) =x
y
f(x,y) =x
y
f(x,y) =x
y
f(x,y) =a1 a2
a3 a4
x
y
Section 2On the Complexity of Affine Image Matching
Structure of the Search Space
Structure of the Search SpaceAffine Transformation vs. R6
On the Complexity of Affine Image Matching
f(x,y) = +a1 a2
a3 a4
xy
t1
t2
Transformation:
Vector in R6: v = ( )T
Structure of the Search SpaceAffine Transformation vs. R6
On the Complexity of Affine Image Matching
f(x,y) = +a2
a3 a4
xy
t1
t2
Transformation:
Vector in R6: a1, v = ( )T
Structure of the Search SpaceAffine Transformation vs. R6
On the Complexity of Affine Image Matching
f(x,y) = +a2
a3 a4
xy
t1
t2
Transformation:
Vector in R6: a1, v = ( )T
Structure of the Search SpaceAffine Transformation vs. R6
On the Complexity of Affine Image Matching
f(x,y) = +
a3 a4
xy
t1
t2
Transformation:
Vector in R6: a1, a2, v = ( )T
Structure of the Search SpaceAffine Transformation vs. R6
On the Complexity of Affine Image Matching
f(x,y) = +
a3 a4
xy
t1
t2
Transformation:
Vector in R6: a1, a2, v = ( )T
v = ( )T
Structure of the Search SpaceAffine Transformation vs. R6
On the Complexity of Affine Image Matching
f(x,y) = +xyTransformation:
Vector in R6: a1, a2, t1,
a3 a4
t2
v = ( )T
Structure of the Search SpaceAffine Transformation vs. R6
On the Complexity of Affine Image Matching
f(x,y) = +
a3 a4
xyTransformation:
Vector in R6:
t2
a1, a2, t1,
v = ( )T
Structure of the Search SpaceAffine Transformation vs. R6
On the Complexity of Affine Image Matching
f(x,y) = +xyTransformation:
Vector in R6:
t2
a1, a2, t1, a3,
a4
v = ( )T
Structure of the Search SpaceAffine Transformation vs. R6
On the Complexity of Affine Image Matching
f(x,y) = +
a4
xyTransformation:
Vector in R6:
t2
a1, a2, t1, a3,
v = ( )T
Structure of the Search SpaceAffine Transformation vs. R6
On the Complexity of Affine Image Matching
f(x,y) = +xyTransformation:
Vector in R6:
t2
a1, a2, t1, a3, a4,
v = ( )T
Structure of the Search SpaceAffine Transformation vs. R6
On the Complexity of Affine Image Matching
f(x,y) = +xy
t2
Transformation:
Vector in R6: a1, a2, t1, a3, a4,
v = ( )T
Structure of the Search SpaceAffine Transformation vs. R6
On the Complexity of Affine Image Matching
f(x,y) = +xyTransformation:
Vector in R6: a1, a2, t1, a3, a4, t2
v = ( )T
Structure of the Search SpaceAffine Transformation vs. R6
On the Complexity of Affine Image Matching
f(x,y) = +xyTransformation:
Vector in R6: a1, a2, t1, a3, a4, t2
v = ( )T
Structure of the Search SpaceAffine Transformation vs. R6
On the Complexity of Affine Image Matching
f(x,y) = +xyTransformation:
Vector in R6:
a1 a2
a3 a4
t1
t2
a1, a2, t1, a3, a4, t2
v = f -1
Structure of the Search SpaceHyperplanes
On the Complexity of Affine Image Matching
Xiji‘: i x1 + j x2 + x3 - i‘ + 0.5 0
Yijj‘: i x4 + j x5 + x6 - j‘ + 0.5 0
Let HN be a set of hyperplanes in R6 which contains for all i, j, i‘, j‘ [-N,N] the hyperplanes:
A(HN) is the set of cells in R6 defined by HN.
Structure of the Search SpaceCentral Property
On the Complexity of Affine Image Matching
Lemma 1. For two vectors u, v R6 it holds that u = v iff if for all i, j, i‘ [-N,N] u and v belong to the same half-subspace according to the partition of R6 with the hyperplane Xiji‘.
The same holds for Yijj‘.
Structure of the Search SpaceMain Result
Theorem 1. Let F be the set of affine transformations, then N(F) A(HN).
On the Complexity of Affine Image Matching
Corollary 1. |A(HN)| = O(N18).
Section 3On the Complexity of Affine Image Matching
Polynomial Time Algorithm
Polynomial Time AlgorithmEfficient Representation
Lemma 2. Each convex cell of A(HN) contains a vector coordinates of which can be encoded by rational numbers of lenght O(log N).Moreover the representatives can be computed efficiently.
On the Complexity of Affine Image Matching
Polynomial Time AlgorithmThe Algorithm
On the Complexity of Affine Image Matching
Theorem 2. [Edelsbrunner, 1987] Any arrangement of n hyperplanes in R6 can be constructed in O(n6) time.
Polynomial Time AlgorithmThe Algorithm
On the Complexity of Affine Image Matching
Algorithm ImageMatching( )Input: Images A, B of size (2N+1) (2N+1)Output: Transformation f = arg min (f‘(A), B)
1. Construct A(HN).2. Set f = Id and = .3. For all C A(HN) do4. compute the representative g for C,5. compute ‘ = (g-1(A), B),6. if (‘ < ) then set = ‘ and f = g-1.7. Return f.
f‘ F
Polynomial Time AlgorithmRunning Time
On the Complexity of Affine Image Matching
Lemma 3. The algorithm runs in time O(N20).
Theorem 3. The Affine Image Matching Problem can be solved in polynomial time.
Polynomial Time AlgorithmExtensions
On the Complexity of Affine Image Matching
1. Many subclasses of Affine Transformation
2. Images with more than two Dimensions.
3. Linear Interpolation
Summary
1. The Search Space of discretized inverse affine Transformation has a regular structure.
2. The Affine Image Matching Problem can be solved in polynomial time.
On the Complexity of Affine Image Matching
Thank you for your attention!
Any Questions?
On the Complexity of Affine Image Matching