Polygonal Curve Simplification Open Problem 24 Polygonal Curve Simplification From the Open Problems Project http://maven.smith.edu/~orourke/TOPP/ Jory Denny Computational Geometry CSCE620-600 Professor Nancy M. Amato 1 1
Outline Introduction Results Conclusion Problem Definition Applications Results Douglas and Peuker Optimal Algorithms Approximate Algorithms Conclusion Summary of Results Future Directions 2 2
Introduction Problem Definition Given a polygonal curve 𝑃= 𝑝 0 , 𝑝 1 , 𝑝 2 ,…, 𝑝 𝑛−1 , a polygonal curve 𝑃 ′ ={ 𝑝 𝑖 0 = 𝑝 0 ,…, 𝑝 𝑖 𝑘 = 𝑝 𝑛 } is a simplification of 𝑃 if 𝑘<𝑛, and 𝑃 ′ ⊂𝑃. Distance metric 𝑑( 𝑝 1 𝑝 2 , 𝑝 𝑘 ) – minimum distance between 𝑝 𝑘 and 𝑝 1 𝑝 2 Example: Euclidean, Manhattan, etc. Error criterion – method of calculating error 𝑒( 𝑝 𝑟 𝑝 𝑠 ) Example: Hausdorff criterion - max 𝑟≤𝑘≤𝑠 {𝑑 𝑝 𝑟 𝑝 𝑠 , 𝑝 𝑘 } Error 𝜖 of a simplification 𝑃′ is defined as the maximum error of each line segment in 𝑃′
Introduction Problem Definition 𝛼 pn p1 Solid line is original curve Dotted line is an example simplification 𝛼 is the error of the simplification (maximum distance of one of the original points to a line segment of the simplification)
Introduction Problem Definition Problems: Min-# problem: Given a polygonal curve 𝑃 and a real number 𝜖≥0, compute an 𝜖-approximation of 𝑃 that uses the smallest number of vertices among all 𝜖-approximations of 𝑃. Min-𝝐 problem: Given a polygonal curve 𝑃 and an integer 𝑘, compute an approximation of 𝑃 with at most 𝑘 vertices that minimizes the error over all approximations of 𝑃 that have at most 𝑘 vertices. Bounds dependent on the error criterion and distance metric used
Introduction Applications Geographic Information Systems Cartography Computer Graphics Medical Imaging Data Compression http://cs.joensuu.fi/~koles/approximation/Image42.gif
Outline Introduction Results Conclusion Problem Definition Applications Results Douglas and Peuker Optimal Algorithms Approximate Algorithms Conclusion Summary of Results Future Directions 7 7
Results Douglas and Peucker (Douglas and Peucker, 73) Input is 𝜖≥0 Recursive line simplification Approximate curve by line segment 𝑝 0 𝑝 𝑛 Find the vertex 𝑝 𝑘 furthest from this line If the error of this vertex is within tolerance stop Else recurs on each sub-chain 𝑃 1 ={ 𝑝 0 ,…, 𝑝 𝑘 } and 𝑃 2 = 𝑝 𝑘+1 , …, 𝑝 𝑛−1 𝑂(𝑛 log 𝑛) -time implementation (Hershberger and Snoeyink, 94) The algorithm is commonly used heuristic
Results Douglas and Peucker (Douglas and Peucker, 73) Iteration 1: Intermediate point selected with largest error. Recurs on both halves. Iteration 2: Left error within 𝜖 input. Recurs on right half. Iteration 3: Approximation within 𝜖 limit.
Results Optimal Algorithms For optimal results for both problems with any error criterion and distance metric problem was formulated as a graph search problem (Imai and Iri, 88) Trivially 𝑂( 𝑛 3 )-time Graph constructed in 𝑂( 𝑛 2 log 𝑛 )-time for the min-# problem and 𝑂( 𝑛 2 log 2 𝑛 )-time for the min-𝜖 problem (Melkman and O’Rourke, 88) Further reduced to 𝑂( 𝑛 2 )-time for the min-# problem and 𝑂( 𝑛 2 log 𝑛 )-time for the min-𝜖 problem. Showed 𝑂 𝑛 -time and 𝑂( 𝑛 2 )-time algorithms for convex case (Chan and Chin, 96) The graph is an undirected graph of all possible approximation segments 𝑝 𝑟 𝑝 𝑠 which lie within 𝜖. The min-# problem is then a single source shortest path problem from 𝑝 1 to 𝑝 𝑛 to minimize the number of segments Min-𝜖 problem can then be solved with binary search on Min-# as subroutine
Results Optimal Algorithms First subquadratic time algorithms used Clique Cover Graph construction technique using distance metrics (other than Euclidean) to achieve 𝑂( 𝑛 4 3 +𝛿 )-time (Agarwal and Varadarajan, 00) Special graph construction allowed for subquadratic running time For min-𝜖 problem this is expected time (i.e., randomized for this) Query based approach incrementally constructing a BFS obtained subquadratic time for Euclidean distance metric with infinite beam criterion (Daescu and Mi, 05) Only holds for specific input (𝑑 𝑝 𝑖 , 𝑝 𝑗 <𝜖 𝑎𝑛𝑑 𝑑 𝑝 𝑖 , 𝑝 𝑗 > 𝜖 2 𝑓𝑜𝑟 𝑎𝑙𝑙 0≤𝑖<𝑗≤𝑛−1)
Results Approximate Algorithms Other work in approximate algorithms under certain criterion show interesting results 𝑂( 𝑛 4 3 +𝛿 )-time algorithms for two different error criterion (Hausdorff and Frechet) and a number of distance metrics error 𝜖 2 (Agarwal et. al., 05) Asymptotically optimal and linear time algorithm using the area of the domain between the two curves as error criterion based on local refining/coarsening strategy (Chen et. al., 05) Optimal simplification in near linear time for specific application of rendering, which mainly focuses on retaining the shape of the curve for visual purposes (Buzer, 07) p1 pn 𝛼 p1 pn 𝛼 Hausdorff criterion Frechet criterion (parametrically determined maximum)
Outline Introduction Results Conclusion Problem Definition Applications Results Douglas and Peuker Optimal Algorithms Approximate Algorithms Conclusion Summary of Results Future Directions 13 13
Conclusion Summary of Results For the general min-# problem (which is the main focus in the literature) Ω( 𝑛 2 )-time For specific distance metrics and metric criterions exact algorithms are near linear in 𝑂( 𝑛 4 3 +𝛿 )-time Approximate algorithms vary but all have near linear running time
Conclusion Future Directions Furthur study into the min-𝜖 problem is needed, as most work focuses on min-# problem Further extension of either the query based method or Clique Cover graph construction could be used to attain optimal results in near linear time? Open question: Can the general problem be solved in subquadratic time?
References D. H Douglas and T. K. Peucker. Algorithms for the reduction of the number of points required to represent a line or its caricature. The Canadian Cartographer, 10(2):112-122, 1973. H. Imai and M. Iri. Polygonal approximations of a curve – Formulations and algorithms. Computational Morphography, 1988. A. Melkman and J. O’Rourke. On polygonal chain approximation. Computational Morphography, 1988. J. Hershberger and J. Snoeyink. An O(nlogn) implementation of the Douglas-Peucker algorithm for line simplification. Proc. 10th Annu. ACM Sympos. Comput. Geom., 383-384,1994. W. S. Chan and F. Chin. Approximation of polygonal curves with minimum number of line segments or minimum error. Internat. J. Comput. Geom. Appl., 6:59-77, 1996. P. K. Agarwal and K. R. Varadarajan. Efficient algorithms for approximating polygonal chains. Discrete Comput. Geom., 23:273-291, 2000. O. Daescu and N. Mi. Polygonal chain approximation: a query based approach. Comput. Geom. Theory Appl., 30(1): 41-58, 2005. P. K. Agarwal and S. Har-Peled and N. H. Mustafa and Y. Wang. Near-linear time approximation algorithms for curve simplification. Proc. of the 10th Annual European Symp. on Algorithms, 29-41, 2005. L. Chen and J. Wang and J. Xu. Asymptotically optimal and linear-time algorithm for polygonal curve simplification. Tech. Report Penn. State Dept. of Mathematics, NO. AM274, 2005. L. Buzer. Optimal simplification of polygonal chain for rendering. In Proc. of the 23rd annual symp. on Comp. geom,168-174, 2007.