Approximating Polygonal Curves - PowerPoint PPT Presentation

About This Presentation
Title:

Approximating Polygonal Curves

Description:

Condition 2: If angle( pipk, pipj ) /2, then d(pk,pi) ?. ... The whole plane if d(pi,pk) ? ... Initialize p1.flag as 0, pi.flag as and push p1 into Queue. ... – PowerPoint PPT presentation

Number of Views:110
Avg rating:3.0/5.0
Slides: 51
Provided by: nxm
Category:

less

Transcript and Presenter's Notes

Title: Approximating Polygonal Curves


1
Approximating Polygonal Curves
Nov. 18, 2002
2
Overview
  • Introduction
  • min- problem VS min-? problem
  • tolerance zone criterion VS infinite beam
    criterion
  • Space-efficient algorithm

3
Overview (cont.)
  • Breadth-first search algorithm
  • Performance comparison
  • A new algorithm
  • Summary

4
Introduction
  • Given an n-vertex polygonal curve
  • P p1,p2,,pn in R2.
  • The problem of approximating P
  • Find a polygonal curve P p1,p2,,pm in
    R2.
  • P is an ordered subsequence of the vertices
    along P.

5
Introduction
Example
6
Introduction
  • Min- problem
  • minimize the size of m of P for a given error
    tolerance ?
  • Min- ? problem
  • minimize the deviation error ? between P and P
    for a given size m of P

7
Introduction
  • Tolerance zone criterion
  • Max Disth( pipj , pk ), where h?1,2,? and i
    k j
  • Infinite beam criterion (parallel-strip
    criterion)
  • Max Disth(L(pipj),pk), where h?1,2,? and i k
    j

8
Introduction
  • Condition 1 dist (L(pipj),pk) ?.
  • Condition 2 If angle( pipk, pipj ) ?/2, then
    d(pk,pi) ?.
  • Condition 3 If angle( pjpk, pjpi ) ?/2, then
    d(pk,pj) ?.

9
Introduction
  • The tolerance region criterion need satisfy all
    three conditions.
  • The infinite beam criterion only need satisfy
    Condition 1.

10
Introduction
  • The tolerance zone criterion
  • The infinite beam criterion

11
Introduction
  • We consider
  • Min- problem
  • Tolerance zone criterion
  • 2-dimentional space R2

12
Space-efficient algorithm
  • 2-D double cone DCik
  • The whole plane if d(pi,pk) ?
  • Otherwise, the area that is bounded by the two
    lines tangent to the error tolerance region of pk
    and contain pi.

13
Space-efficient algorithm
  • The segment pipj approximates pk iff pj ?DCik.

14
Space-efficient algorithm
  • Given P p1,p2,,pn and ?.
  • Initialize p1.flag as 0 and pi.flag as ?.
  • for i 1-gtn-1 do
  • computer Cone C(pi, pi1)
  • if pi.flag 1 lt pi1.flag Update (pi1.flag)
  • while Cone C is not empty
  • go to to next vertex pj
  • check if segment pi pj in Cone C
  • if yes and pi.flag 1 lt pj.flag , then Update
    (pj.flag)
  • computer Cone C(pi, pj) and join with C
    ? C
  • end while
  • end for

15
i 1 j 3
p6 ?
p4 ?
p2 ? 1
p8 ?
p5 ?
p1
p3 ?
0
p7 ?
16
i 1 j 4
p6 ?
p4 ? 1
p2 ? 1
p8 ?
p5 ?
p1
p3 ?
0
p7 ?
17
i 1 j 5
p6 ?
p4 ? 1
p2 ? 1
p8 ?
p5 ?
p1
p3 ?
0
p7 ?
18
i 1 j 6
p6 ? 1
p4 ? 1
p2 ? 1
p8 ?
p5 ?
p1
p3 ?
0
p7 ?
19
i 1 j 7
p6 ? 1
p4 ? 1
p2 ? 1
p8 ?
p5 ?
p1
p3 ?
0
p7 ?
20
i 2 j 4
p6 ? 1
p4 ? 1
p2 ? 1
p8 ?
p5 ?
p1
p3 ? 2
0
p7 ?
21
p6 ? 1
p4 ? 1
p2 ? 1
p8 ? 1
p5 ?
p1
p3 ? 2
0
p7 ? 1
22
p6 ? 1
p4 ? 1
p2 ? 1
p8 ? 1
p5 ? 2
p1
p3 ? 2
0
p7 ? 1
23
Space-efficient algorithm
  • This 2-D min- algorithm under the tolerance zone
    criterion takes
  • O(n2) time
  • O(n) space

24
Breadth-first Search algorithm
  • Basic idea
  • Each vertex is updated at most one time.
  • Once pn.flag ? ?, the program ends.
  • Queue
  • push pi---- pi.flag updated
  • pop pi ---- computing Cone C based on pi

25
Breadth-first Search algorithm
  • Given P p1,p2,,pn and ?.
  • Initialize p1.flag as 0, pi.flag as ? and push p1
    into Queue .
  • While pn.flag ? do
  • pop pi from Queue
  • compute Cone C(pi,pi1)
  • if pi1.flag not updated
  • then update (pi1.flag) and push pi1 into Queue
  • while Cone C is not empty
  • go to next vertex pj
  • if pj.flag not updated, then check if
    segment pipj in Cone C
  • if yes, then update (pj.flag) and push pj into
    Queue
  • compute Cone C(pi, pj) and join C with C
    ? C
  • end while
  • end while

26
p6 ? 1
p4 ? 1
p2 ? 1
p8 ?
p5 ?
p1
p3 ?
0
p7 ?
Queue p2 p4 p6
27
p6 ? 1
p4 ? 1
p2 ? 1
p8 ?
p5 ?
p1
p3 ? 2
0
p7 ?
Queue p4 p6 p3
28
p6 ? 1
p4 ? 1
p2 ? 1
p8 ?
p5 ? 2
p1
p3 ? 2
0
p7 ?
Queue p6 p3 p5
29
p6 ? 1
p4 ? 1
p2 ? 1
p8 ? 2
p5 ? 2
p1
p3 ? 2
0
p7 ? 2
Queue p3 p5 p7 p8
30
p6 ? 1
p4 ? 1
p2 ? 1
p8 ? 2
p5 ? 2
p1
p3 ? 2
0
p7 ? 2
Queue p3 p5 p7 p8
31
Performance comparison
  • Update time
  • The first one each vertex is updated at least 1
    time and at most O(n) time( maybe 3 times).
  • The second one each vertex is updated at most 1
    time.

32
Performance comparison
  • Check time
  • The check time of a vertex is the number of times
    when it is used to compute cone or check.
  • The second one has less check time of each
    vertex.

33
Performance comparison
34
A new algorithm
  • Divide-and-conquer approach
  • Min- problem
  • L1 metric
  • O(n4/3d)-time deterministic algorithm, for any
    dgt 0

35
Preliminaries
  • L1 metric d( p,q )pxqxpy-qy
  • Given Cltp1,pngt and ?gt0.
  • G?(C)(V,E?), where Vp1,pn and
  • E?(pi,pj)1iltjn, and ?(pi,pj) ?

36
Compact Representation of G?
  • Clique cover
  • g G1 (V1,E1),,Gl (Vl,El)
  • Gi holds 3 conditions.
  • Each Gi is a complete bipartite graph.
  • E E1? ?El.
  • Ei ? Ej Ø for i ? j.
  • Let g G1,,Gl, compute a shortest path
    between u and v in G in O(gV) time.

37
Compact Representation of G?
38
The Min- Algorithm under the L1 Metric
  • A line segment qr-?/4F(qr)?/4, x(q)ltx(r).
  • d(p,qr) ? if and only if exactly one of
  • the following three conditions hold.

39
The Min- Algorithm under the L1 Metric
  • Three conditions
  • x(p)ltx(q) and d(p,q) ?.
  • x(p)gtx(r) and d(p,r) ?.
  • x(q) x(p) x(r) and qr intersects the vertical
    segment pp-.

40
The Min- Algorithm under the L1 Metric
  • Algorithm
  • C1 ltp1,,p?n/2? gt and C2 ltp?n/2?1,,pngt
  • Recursively compute the clique covers g1 and g2
    of G?(C1) and G?(C2).

41
The Min- Algorithm under the L1 Metric
  • The Merge step to compute a clique cover g12 of
    the set E12(pi,pj)?G? pi ?C1, pj ?C2
  • H12 (pi,pj)?E12 x(pi) x(pj),
  • -?/4F(pi,pj)?/4
  • Similarly, compute a clique cover of the
    remaining edges of E12.

42
The Min- Algorithm under the L1 Metric
  • Definition 1
  • H12(pi,pj)pi?C1,pj?C2,x(pi)x(pj),
  • -?/4F(pi,pj)?/4
  • H12 ? H12
  • Definition 2
  • pi is relevant for pj, if x(pk)gtx(pj) then d(pk,
    pj) ?, for i k ?n/2?
  • pj is relevant for pi, if x(pk)ltx(pi) then d(pk,
    pi) ?, for ?n/2? 1 k j

43
pi1, p ?n/2? are relevant for pj p1,pi are
not relevant for pj.
44
The Min- Algorithm under the L1 Metric
  • Definition 3
  • cone(pi) the cone of rightward directed rays
    emanating from pi.
  • A ray q originating from pi belongs to cone(pi)
    if -?/4F(q)?/4 and d(pk, q) ?, for
    ik?n/2?. .
  • if x(pk)ltx(pi) then d(pk, pi) ? and
  • if x(pk)x(pi) then ray q intersects the vertical
    segment pk-pk
  • Symmetrically cone(pj).

45
The Min- Algorithm under the L1 Metric
  • For any (pi,pj) ?H12, (pi,pj) ?H12
  • if and only if
  • pi is relevant for pj and pj is relevant for pi
  • pj ?cone(pi ) and pi ?cone(pj)
  • We compute a clique cover for H12 in four steps.

46
The Min- Algorithm under the L1 Metric
  • Step 1 We compute a clique cover of the edges in
    H12.
  • Step 2 For each bipartite clique (A1,A2)
    computed in Step 1, we compute a clique cover of
    the pairs (pi,pj) ? A1xA2 such that pi is
    relevant for pj and pj is relevant for pi .

47
The Min- Algorithm under the L1 Metric
  • Step 3 For each pi ? C1, we compute cone(pi)
    for each pj ? C2, we compute cone(pj).
  • Step 4 For each bipartite clique (B1,B2)
    computed in Step 3, we compute a clique cover of
    the pairs (pi,pj) ? B1xB2 such that pj ?cone(pi )
    and pi ?cone(pj).

48
Summary
  • Three algorithms
  • Space efficient algorithm
  • Breadth-first search algorithm
  • A new algorithm using divide-and-conquer approach
  • Compare the performance between first two
    algorithms.

49
Future Work
  • Compute the properties of each vertex in advance.
  • Example get the up-bound and low-bound of each
    vertex by computing the tangent curves in
    advance.
  • Saving the time for computing cones of each
    vertex.

50
Future Work
  • Divide-and conquer approach
  • Based on the third algorithm
  • Can we improve performance by dividing the
    polygonal chain C into four sub chains?
Write a Comment
User Comments (0)
About PowerShow.com