1 / 56

Geodesic Fréchet Distance inside a Simple Polygon

Geodesic Fréchet Distance inside a Simple Polygon. by Atlas F. Cook IV and Carola Wenk. Overview. Fréchet Distance d F Calculating d F : Decision Problem Optimization Problem Geodesic Fréchet Distance d G Decision Problem Funnels and Hourglasses Optimization Problem

zora
Download Presentation

Geodesic Fréchet Distance inside a Simple Polygon

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Geodesic Fréchet Distance inside a Simple Polygon by Atlas F. Cook IV and Carola Wenk

  2. Overview • Fréchet Distance dF • Calculating dF: • Decision Problem • Optimization Problem • Geodesic Fréchet Distance dG • Decision Problem • Funnels and Hourglasses • Optimization Problem • Randomized Red-Blue Intersections • Conclusion • References

  3. Fréchet Distance dF • Fréchet Distance measures the similarity of two curves. • Computing the Fréchet distance: • Walk the dog…Woof!

  4. Fréchet Distance dF • Fréchet Idea: • Both the person and dog walk forward on their own curves from beginning to end • A leash is maintained

  5. Fréchet Distance dF • Fréchet Idea: • A different walk

  6. Fréchet Distance dF • Fréchet Idea: • Each walk has its own maximum leash length.

  7. Fréchet Distance dF • Fréchet Idea: • Examine all possible walks. • Yields a set M of maximum leash lengths. • dF= shortest leash lengthinM.

  8. Fréchet Distance dF • Mathematical dF: [Alt1995] • Find all maximum leash lengths. • Return the smallest of theseleash lengths. dF(a,b) = inf f,g:[0,1] [0,1] where f and g range over continuous non-decreasing reparametrizations. max ||a(f(t))-b(g(t))|| t [0,1]

  9. Calculating Fréchet Distance • Representing all walks: Free Space Diagram Position on blue curve  X-axis position “ “ red curve  Y-axis position

  10. Calculating Fréchet Distance • Free Space Diagram: • Classifies distances using a parameter ε: • White “Free Space”  Leash length ≤ ε • Green “Constrained Space”  Leash length > ε • EX: ε = 10  All leash lengths ≤ 10 are white. Leash Length=15 Leash Length=5

  11. Calculating Fréchet Distance • Free Space Diagram as ε is varied:

  12. Calculating Fréchet Distance • ComputingdF: • Decision Problem • Optimization Problem

  13. Calculating Fréchet Distance • Decision Problem • Given a leash length ε • Is there a monotone path through the whitespace from the lower left corner of the free space diagram to the upper right corner? • Answer: YES or NO YES YES NO

  14. Calculating Fréchet Distance • Optimization Problem • Find the smallestε that still yields a path. • This value is the Fréchet distance. ε is as small as possible ε is too small ε is too big

  15. Geodesic Fréchet Distance dG • Geodesic Fréchet distance dG • Geodesic = shortest path that avoids obstacles. • The leash must stay inside a simple polygon.

  16. Geodesic Fréchet Distance dG • How do we calculate dG? • Decision Problem • Calculate Geodesic Free Space Diagram • Optimization Problem • Return the smallest ε with a monotone path through the free space diagram. ε is as small as possible ε is too big ε is too small

  17. Geodesic Fréchet Distance dG • Geodesics inside a simple polygon: • Funnel [Guibas1989] • Describes any horizontal/vertical line segment in a free space cell. Free Space Cells C12 C22 C32 C11 C21 C31

  18. Geodesic Fréchet Distance dG • Geodesics inside a simple polygon: • Hourglass [Guibas1989] • Describes an entire free space cell Open Hourglass Closed Hourglass Intersecting Hourglass

  19. Geodesic Fréchet Distance dG • Free Space in a Cell: • (x,y)-monotone • Why? • Pick a point q cd. • As q varies from c to d, d(p,q) is bitone. • Interpretation: • Any horizontal/vertical line segment in a cell has at most one free interval • This is the definition of (x,y)-monotone. q q q

  20. Geodesic Fréchet Distance dG • Free Space in a Cell: • Connected • Why? • Any two points in a cell’s free space are connected by a bitone path through an hourglass. • Holds for all three types of hourglasses.

  21. Geodesic Fréchet Distance dG • Algorithm: Geodesic Decision Problem • Compute each cell boundary in O(log k) time • A funnel [Guibas1989]represents a cell boundary. • Intersect a funnel’s distance function with y = ε. • The (at most two) intersections define the free space.

  22. Geodesic Fréchet Distance dG • Algorithm: Geodesic Decision Problem • Compute each cell boundary in O(log k) time • Propagate reachability data through a cell • Cell Free Space • (x,y)-monotone & connected • Only cell boundaries are required for propagation • Given boundaries  O(1) time propagation

  23. Geodesic Fréchet Distance dG • Big-Oh Geodesic Decision Problem • Let N = complexity of Person & Dog curves • Let k = complexity of simple polygon • Time: O(N2 log k) • Compute cell boundaries  O(N2 log k) time • Propagate reachability  O(N2) time

  24. Geodesic Fréchet Distance dG • Geodesic Optimization Problem • Return the smallest ε with a monotone path through the geodesic free space diagram. ε is as small as possible ε is too small ε is too big

  25. Geodesic Fréchet Distance dG • Geodesic Optimization Problem • Traditional non-geodesic approach: • Parametric Search • Sort O(N2) constant-complexity cell boundary functions • Geodesic Parametric Search • Each cell boundary has O(k) complexity • Straightforward parametric search sorts O(kN2) values • Too slow

  26. Geodesic Fréchet Distance dG • Alternative to parametric search • Randomized algorithm • Applies to both non-geodesic & geodesic Fréchet optimization problems in the plane • Resolves “critical values” using red-blue intersections

  27. Geodesic Fréchet Distance dG • Critical Values • Values that must be examined to find dF • Free space in cell Cij is a function of e • Let aij(e) be the bottom free space boundary • Let bij(e) be the top free space boundary

  28. Geodesic Fréchet Distance dG • Critical Values • As e increases: • aij(e) decreases monotonically • bij(e) increases monotonically

  29. Geodesic Fréchet Distance dG • Every critical value is a “red-blue” intersection between some aij(e) and bkl(e).

  30. Geodesic Fréchet Distance dG • Red-Blue Intersections • Red curves: R = { r1(x), r2(x),…, rm(x) } • Blue curves: B = { b1(x), b2(x),…, bn(x) } • Goal: • Given a search domain x[a,b] • Count the number of red-blue intersections in [a,b]

  31. Geodesic Fréchet Distance dG • Red-Blue Intersections • ri(x) properties for 1 ≤ i ≤ m: • O(k) complexity • monotone decreasing & continuous • min( ri(x) ) = ymin • bi(x) properties for 1 ≤ j ≤ n : • O(k) complexity • monotone increasing & continuous • max( bj(x) ) = ymax // ymin ≤ ymax • No new curve begins in the interior of [a,b]

  32. Geodesic Fréchet Distance dG • Why Red-Blue Intersections Apply to Type (c) critical values • aij(e) properties as e→∞: • O(k) complexity • decreasing & continuous • min( aij(e) ) = 0.0 • bij(e) properties as e→∞: • O(k) complexity • increasing & continuous • max( bij(e) ) = 1.0 // top of cell boundary

  33. Geodesic Fréchet Distance dG • Why Red-Blue Intersections Apply to Type (c) critical values • Precomputing type (a) and (b) critical values shrinks search domain [a,b] until no new curve begins inside [a,b]. [a,b]

  34. Geodesic Fréchet Distance dG • Red-Blue Intersections • Compute & sort all curve values at x = a • Suppose ri(a) ≥ bj(a) • ri(x) ∩ bj(x) for x ≥a because ri(∞)=ymin≤ bj(∞)=ymax

  35. Geodesic Fréchet Distance dG • Red-Blue Intersections • Sort the curve values at x = a and x = b • Count the number of blue curves below each red curve

  36. Geodesic Fréchet Distance dG • Red-Blue Intersections • r3(x) intersects two blue curves for x ≥a. • r3(x) intersects one blue curve for x ≥b. • Subtracting and accounting for x=b intersections reveals that r3(x) must have (2-1)=1 intersection in [a,b].

  37. Geodesic Fréchet Distance dG • Algorithm: Geodesic Optimization Problem • Precompute all type (a) and (b) critical values • Yields search domain: [a,b] • Count intersections in [a,b] for each row j. • Let Cj be the counting data structure. • Pick a random intersection in [a,b] for each row using Cj. • Goal: O(log N) expected iterations

  38. Geodesic Fréchet Distance dG • Geodesic Optimization Problem • Pick the curve aMjinvolved in the most intersections in [a,b] for each row using Cj. • Goal: At most O(N) iterations • Calculate intersections involving aMj • Discard aMj. • Store all intersections in a global pool P. • P is similar to Cole’s [Cole1987] parametric search. • Why not pick O(N) intersections at random? • Cj does not support fast random access.

  39. Geodesic Fréchet Distance dG • Geodesic Optimization Problem • Medians • Find the median Ξ of pool P. • Find the median Ψ of the O(N) randomly selected intersections. • Decision Problem • Run decision problem on the two medians Ξ, Ψ. • Shrink the search domain [a,b]. • Discard the resolved half of pool P. • Go back to step 2 (intersection counting) until all row-based type (c) critical values are resolved.

  40. Geodesic Fréchet Distance dG • Geodesic Optimization Problem • Column-based type (c) critical values • Resolve in the same spirit as the row-based values. • Return the smallest critical value e* that satisfied the decision problem.

  41. Geodesic Fréchet Distance dG • Number of Steps: • O(log N) expected • A random intersection is resolved each step • Shrinks the search domain [a,b] • O(N) worst-case • Each step discards one aMj for every row. • There are O(N) aMjper row.

  42. Geodesic Fréchet Distance dG • Geodesic Optimization Problem • Step Time: • Intersection counting dominates • O(N2 log kN) • Expected runtime: O(k+(N2 log kN)log N) • Worst-case runtime: O(k+N3 log kN) • Space: O(k+N2) • Parametric Search time: O(k+kN2 log kN)

  43. Geodesic Fréchet Distance dG • Parametric Search vs. Randomization: • Parametric Search • Large constant factors [Cole1987] • Randomization • Alternative to parametric search [Agarwal1998] • Not previously applied to Fréchet distance • Better expected runtime • Straightforward implementation • Applies to the non-geodesic Fréchet distance in the plane in O(N2 log2 N) time

  44. Conclusion • First algorithm for the geodesic Fréchet distance inside a simple polygon. • Decision Problem • Compute cell boundaries • Propagate reachability • Optimization Problem • Randomized alternative to parametric search: • Red-blue intersections • Applies to both the non-geodesic and geodesic Fréchet distances in the plane.

  45. References: • [Agarwal1998] • Agarwal, P. K. & Sharir, M.Efficient algorithms for geometric optimizationACM Comput. Surv., ACM Press, 1998, 30, 412-458 • [Alt1995] • Alt, H. & Godau, M.Computing the Frechet Distance Between Two Polygonal CurvesInternational Journal of Computational Geometry and Applications, 1995, 5, 75-91

  46. References: • [Cole1987] • Cole, R.Slowing down sorting networks to obtain faster sorting algorithmsJ. ACM, ACM Press, 1987, 34, 200-208 • [Guibas1989] • Guibas, L. J. & Hershberger, J.Optimal shortest path queries in a simple polygonJ. Comput. Syst. Sci., Academic Press, Inc., 1989, 39, 126-152

  47. Thank you for your attention.

  48. Extra Slides

  49. Calculating Fréchet Distance • Representing all walks: End of all walks Start of all walks

  50. Geodesic Fréchet Distance dG • Geodesic Optimization Problem • Type (b) critical value • Involves a single cell • aij = bij

More Related