440 likes | 718 Views
Geodesic Fréchet Distance Inside a Simple Polygon. Proceedings of the 25th International Symposium on Theoretical Aspects of Computer Science (STACS), Bordeaux, France, 2008 (Acceptance Rate: 27%). Atlas F. Cook IV & Carola Wenk. Overview. Fréchet Distance Importance Intuition
E N D
Geodesic Fréchet Distance Inside a Simple Polygon Proceedings of the 25th International Symposium on Theoretical Aspects of Computer Science (STACS), Bordeaux, France, 2008 (Acceptance Rate: 27%) Atlas F. Cook IV & Carola Wenk
Overview • Fréchet Distance • Importance • Intuition • Geodesic Fréchet Distance • Decision Problem • Optimization Problem • Red-Blue Intersections • Conclusion • References • Questions
Importance of Fréchet Distance • ♫ It’s a beautiful day in the neighborhood…
Importance of Fréchet Distance • Distinguishing your neighbors: • Nose • Hairstyles
Fréchet Distance • Fréchet Distance • Measures similarity of continuous shapes • Similar Different
Fréchet Distance • Comparison of geometric shapes • Computer Vision • Robotics • Medical Imaging Half-Full Same glass! Half-Empty
Fréchet Distance • Fréchet Distance Illustration: • Walk the dog Woof!
Fréchet Distance • Fréchet Distance Illustration:
Fréchet Distance dF • A different walk
Fréchet Distance dF • Fréchet Idea: • Examine all possible walks. • Yields a set M of maximum leash lengths. • dF= shortestleash lengthinM.
Fréchet Distance • Fréchet Distance: • Small dF curves are similar • LargedF curves NOT similar
Calculating Fréchet Distance • Representing all walks: Free Space Diagram Position on blue curve X-axis position “ “ red curve Y-axis position
Calculating Fréchet Distance • Free Space Diagram • White: Person & dog are “close together” Leash length ≤ ε • Green: Person & dog are “far apart” Leash length >ε Free Space Diagram
Calculating Fréchet Distance • Free Space Diagram as ε is varied:
Calculating Fréchet Distance • ComputingdF: • Decision Problem • Optimization Problem
Calculating Fréchet Distance • Decision Problem • Given leash length: ε • Monotone path through free space? • Answer: YES or NO • Dynamic Programming [Alt1995] YES YES NO
Calculating Fréchet Distance • Optimization Problem ε is as small as possible ε is too small ε is too big
Geodesic Fréchet Distance • Defn: Geodesic in a simple polygon – shortest path that avoids obstacles [Mitchell1987]. • Leash stays inside a simple polygon.
Geodesic Fréchet Distance • Computation: • Decision Problem • Geodesic Free Space Diagram • Optimization Problem ε is as small as possible ε is too big ε is too small
Geodesic Fréchet Distance • Geodesics inside a simple polygon: • Funnel [Guibas1989] • Horizontal/vertical line segment in a free space cell. d c p
Geodesic Fréchet Distance • Algorithm: Geodesic Decision Problem • Compute each cell boundary in logarithmic time. y = e Cell Funnel [Guibas1989] • Funnel’s distance function • Piecewise hyperbolic • Bitonic Cell Free Space
Geodesic Fréchet Distance • Algorithm: Geodesic Decision Problem • Compute each cell boundary in logarithmic time. • Test for monotone path: • Cell free space • x-monotone, y-monotone, & connected • Only cell boundaries are required
Geodesic Fréchet Distance • Time: Geodesic Decision Problem • Let N = complexity of Person & Dog curves • Let k = complexity of simple polygon • Time: O(N2 log k) versus O(N2) non-geodesic case • Compute cell boundaries • Test for monotone path YES YES NO
Geodesic Fréchet Distance • Geodesic Optimization Problem ε is as small as possible ε is too small ε is too big
Geodesic Fréchet Distance • Geodesic Optimization Problem • Traditional approach: • Parametric Search • Sort O(N2) constant-complexity cell boundary functions • Geodesic case: • Each cell boundary has O(k) complexity • Straightforward parametric search sorts O(kN2) values • Goal: Faster
Geodesic Fréchet Distance dG • Randomized red-blue intersections • Practical alternative to parametric search • Critical Values • Potential solutions for dF • Resolve with red-blue intersections
Geodesic Fréchet Distance dG • Critical Values • As e increases: • Free space changes monotonically
Geodesic Fréchet Distance dG • Geodesic Optimization Problem • Critical Value • Intersection of monotone functions
Geodesic Fréchet Distance dG • Red-Blue Intersections • Red function properties: • monotone decreasing & continuous • Blue function properties: • monotone increasing & continuous
Geodesic Fréchet Distance dG • Red-Blue Intersections [Palazzi1994] e
Geodesic Fréchet Distance dG • Counting Red-Blue Intersections • Sort the curve values at e = a and e = b • Count the number of blue curves below each red curve e
Geodesic Fréchet Distance dG • Red-Blue Intersections • r3 lies above: • two blue curves at e = a. • one blue curve at e = b. (2-1) intersections for r3 in a ≤ e≤ b. e
Position on cell boundary Geodesic Fréchet Distance • Red-Blue Intersections: • Vertical slab: a ≤ e≤ b • Count number of intersections [arrays] • Report intersections [BST] • Get-random intersection [persistent BST] e
Geodesic Fréchet Distance • Geodesic Optimization Problem • Goal: Make e as small as possible • Repeatedly find a random critical value and use the idea of binary search to converge. ε is as small as possible ε is too small ε is too big
Geodesic Fréchet Distance dG • Parametric Search vs. Randomization: • Parametric Search [traditional] • Sorting cell boundary functions • Huge constant factors [Cole1987] • Randomized Red-Blue Intersections • Practical alternative to parametric search • Not previously applied to Fréchet distance • Faster expected runtime • Straightforward implementation
Geodesic Fréchet Distance • Geodesic Optimization Problem • Parametric Search time: O(k+kN2 log kN) • Red-Blue expected runtime: O(k+(N2 log kN)log N)
Future Work • Geodesic Fréchet Distance • Applications • Faster solution • Randomized alternatives to parametric search • Surfaces • Piecewise-smooth curves
Conclusion • Fréchet Distance • Measures similarity of continuous shapes • Similar Different • Geodesic Fréchet Distance: Simple Polygon • Obstacles affect similarity • Red-Blue intersections • Practical alternative to parametric search
References: • [Alt1995] • Alt, H. & Godau, M.Computing the Fréchet Distance Between Two Polygonal CurvesInternational Journal of Computational Geometry and Applications, 1995, 5, 75-91 • [Cole1987] • Cole, R.Slowing down sorting networks to obtain faster sorting algorithmsJ. ACM, ACM Press, 1987, 34, 200-208
References: • [Cook2007] • Cook IV, A. F. & Wenk, C.Geodesic Fréchet Distance Inside a Simple PolygonProceedings of the 25th International Symposium on Theoretical Aspects of Computer Science (STACS), Bordeaux, France, 2008 • [Guibas1989] • Guibas, L. J. & Hershberger, J.Optimal shortest path queries in a simple polygonJ. Comput. Syst. Sci., Academic Press, Inc., 1989, 39, 126-152
References: • [Mitchell1987] • Mitchell, J. S. B.; Mount, D. M. & Papadimitriou, C. H.The discrete geodesic problemSIAM J. Comput., Society for Industrial and Applied Mathematics, 1987, 16, 647-668 • [Palazzi1994] • Palazzi, L. & Snoeyink, J.Counting and reporting red/blue segment intersectionsCVGIP: Graph. Models Image Process., Academic Press, Inc., 1994, 56, 304-310