Upload
silvia-long
View
230
Download
1
Tags:
Embed Size (px)
Citation preview
Efficient algorithms for
polygonal approximation
DEPARTMENT OF COMPUTER SCIENCE UNIVERSITY OF JOENSUU JOENSUU, FINLAND
Alexander Kolesnikov
Polygonal approximation of discrete curves
qr+1qr
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.
q1 qM
P
Q
Examples of polygonal approximation
Vectorization Image analysis
Digital cartography 3-D paths
Optimal vs. Heuristic algorithmsHeuristic approaches
1) Sequential tracing approach 2) Split method 3) Merge method 4) Split-and-Merge method 5) Dominant point detection 6) Relaxation labeling 7) K-means method 8) Genetic algorithm 9) Ant colony optimization method 10) Tabu search 11) Discrete particle swarm
algorithm 12) 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)
Efficent algorithm Fast: O(N)O(N2) Close to optimal: F100%
Optimal algorithm Optimal: F=100% Slow: O(N2)O(N3) (minutes and more)
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+1qr
)1
,(2
2}{
2min)(
r
qrq
M
rrq
ePE )1
,(2
2}{
2min)(
r
qrq
M
rrq
ePE
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):
q1 qM
A) L2-approximation error for a segment
Approximation error for curve segment (pi,...,pj) :
1
1)21/(2)(),(2
j
ikabkxakyj
pipe ijijij
1
1)21/(2)(),(2
j
ikabkxakyj
pipe ijijij
A) Full search in state space
M
N11
b
n
m
j
State space
D(n,m)
D(j,m-1)
D(N,M)
Start state
e2(j,n)
Goal state:
Complexity: O(MN2)
;,...,1;,1,min, 2
1MmppemjDmnD nj
njm
;,...,1;,1,min, 2
1MmppemjDmnD nj
njm
A) Reduced search in state space
The reference solution.
The bounding corridor.
A) Iterative reduced search DP algorithm
M=300
W=10
Time complexity: O(W2N2/M)
Spce complexity: O(WN)
A) Iterative reduced search DP algorithm
M=300
W=10
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.
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
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)
)1
,(1
1}{
2min)(
r
qrq
M
rrq
ePE )1
,(1
1}{
2min)(
r
qrq
M
rrq
ePE
p1=pN
B) State space for wrapped DP search
1
2
3
4
51
2
3
6
7
4
8
5
B) Closed curves: Analysis of state space
Conjugate states: HG(m-M) = HG(m) – (N-1);
nstart=arg min {D(HG(m),m) D(HG(m-M), m-M)} –(N-1); Mm2M
Conjugate states: HG(m-M) = HG(m) – (N-1);
nstart=arg min {D(HG(m),m) D(HG(m-M), m-M)} –(N-1); Mm2M
HG(m) - optimal path for G
G
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.
subject to:
MMK
kk
1
MMK
kk
1
K
k
M
mmkmkK
k
mk
qqeMPPEqM 1
1
11,,
21 ,minmin),,...,(
}{}{
K
k
M
mmkmkK
k
mk
qqeMPPEqM 1
1
11,,
21 ,minmin),,...,(
}{}{
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: O(N3) Space complexity: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.
Reduced Full Search
Fidelity F 100% 100% Time complexity O(N)-O(N2) O(N3) Space complexity O(NW) O(N2)
C) Full vs. Iterative reduced DP search
The trade-off between the run time and optimality is
regulated by the corridor width W and the number of
iterations.
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