DynaMap project

Download Report

Transcript DynaMap project

DEPARTMENT OF COMPUTER SCIENCE
UNIVERSITY OF JOENSUU
JOENSUU, FINLAND
Efficient algorithms for
polygonal approximation
Alexander Kolesnikov
Polygonal approximation of discrete curves
P
qr
qr+1
q1
Q
qM
Given the N-vertex polygonal curve P.
a) Min-e problem: Given the number of line segments M, approximate
the curve P by polygonal curve Q with minimum error E(P).
b) Min-# problem: given bound on approximation error, approximate
curve P by polygonal curve Q with minimum number of line segments.
Examples of polygonal approximation
Vectorization
Digital cartography
Image analysis
3-D paths
Optimal vs. Heuristic algorithms
1)
2)
3)
4)
5)
6)
7)
8)
9)
10)
11)
12)
Heuristic approaches
Sequential tracing approach
Split method
Merge method
Split-and-Merge method
Dominant point detection
Relaxation labeling
K-means method
Genetic algorithm
Ant colony optimization method
Tabu search
Discrete particle swarm algorithm
Vertex adjustment method
Optimal methods
1) Min-# problem:
Shortest path in graph
2) Min- problem:
K-link shortest path in graph
Min- problem: Optimal vs. Heuristic
Heuristic algorithms
Non-optimal: F<100%
Fast: O(N)O(N2)
(seconds and less)
Optimal algorithm
Optimal: F=100%
Slow: O(N2)O(N3)
(minutes and more)
Heuristic  Efficient  Optimal
Heuristic algorithms
Non-optimal: F<100%
Fast: O(N)O(N2)
(seconds and less)
Optimal algorithm
Optimal: F=100%
Slow: O(N2)O(N3)
(minutes and more)
Efficent algorithm
Fast: O(N)O(N2)
Close to optimal: F100%
Contents
A) Min- problem for open curves
B) Min- problem for closed curves
C) Min- problem for multiple-objects
A) Min- problem for open curve
qr
qr+1
qM
q1
Approximate the given open N-vertex polygonal curve P by another one
Q consisting of at most M line segments with minimum error E(P):
M 2
E(P)  min  e2 (qr , qr  1)
{q } r  2
r
A) L2-approximation error for a segment
Approximation error for curve segment (pi,...,pj) :
j 1
e2 ( p , p )   ( y  aij x  bij ) 2 /(1 aij 2 )
k
k
i j
k i 1
A) Full search in state space
Goal state:
M
b
D(N,M)
State space 
m
D(n,m)
D(j,m-1)
1
Start state
1
j
e2(j,n)
n

N

Dn, m  min D j, m  1  e 2  p j , pn  ; m  1,...,M ;
m 1 j  n
Complexity: O(MN2)
A) Reduced search in state space
The reference solution.
The bounding corridor.
A) Iterative reduced search DP algorithm
W=10
M=300
Time complexity: O(W2N2/M)
Spce complexity: O(WN)
A) Iterative reduced search DP algorithm
W=10
M=300
a) Fidelity:
F  100%
b) Complexity:
O(W2N2/M) =O(N)-O(N2)
c) Time reducing: (W/M)2
The trade-off between the run time and optimality is
regulated by the corridor width and the number of iterations.
B) Min- problem for closed curve
p1=pN
M 1
E(P)  min  e2 (qr , qr  1)
{q } r  1
r
Approximate the given closed N-vertex polygonal curve P by another
one Q consisting of at most M line segments with minimum error E(P).
Full search DP algorithm complexity: O(MN3)
B) State space for wrapped DP search
5
2
2
1
5
1
8
4
4
7
3
3
6
B) Closed curves: Analysis of state space
G
HG(m) - optimal path for
G
Conjugate states: HG(m-M) = HG(m) – (N-1);
nstart=arg min {D(HG(m),m)  D(HG(m-M), m-M)} –(N-1);
Mm2M
B) Min- path with conjugate states
is old start point
is new start point
B) Closed curves: Results
Heuristic algorithm:
Fidelity F=88-100%
T=100 s
Proposed algorithm:
Fidelity F=100%
T=10.4 s.
C) Multi-object min- problem
Given K polygonal curves P1, P2, …,PK, approximate it
by set of K another polygonal curves Q1, Q2 ,…, QK
with a given total number of segments M.
C) Multi-object min- problem (cont’d)
Given K polygonal curves P1, P2, …,PK, approximate it
by set of K another polygonal curves Q1, Q2 ,…, QK with
a given total number of segments M so that the total
approximation error with measure L2 is minimized.
E ( P1 ,...,PK , M )  min min
{M k } {qm }
K
subject to:
M
k 1
k
M
K M k 1
2
e
  qk ,m , qk ,m1 
k 1 m 1
C) Full-search DP algorithm
Step 1: Solve optimal approximation problem for every object by DP
to obtain the Rate-Distortion functions {gk(m)};
Step 2: Solve problem of the optimal allocation of the number of
segments among objects by DP using the Rate-Distortion functions
{gk(m)};
Step 3: Re-solve the optimal approximation problem of every object
using the found optimal number of segments.
Time complexity:
Space complexity:
O(N3)
O(N2)
Vector map: N = 10,000-100,000
Iterative reduced search for multi-object
min- problem
Step 1: Find preliminary approximation of every
object for an initial number of segments.
Step 2: Iterate the following:
a) Apply multiple-goal reduced search DP
to define the Rate-Distortion functions.
b) Solve the optimal allocation of the found
number of the segments among the objects
using the Rate-Distortion functions.
C) Full vs. Iterative reduced DP search
Reduced
Fidelity F
 100%
Time complexity O(N)-O(N2)
Space complexity O(NW)
Full Search
100%
O(N3)
O(N2)
The trade-off between the run time and optimality is
regulated by the corridor width W and the number of
iterations.
Summary
A) Iterative Reduced search DP algorithm for min-
problem open curve
B) DP algorithm for min- problem for closed curve
C) DP algorithm for min- problem fom multiple-objects