170 likes | 290 Views
Route reduction. 22.4.2013. Route reduction as polygonal approximation problem. Select a subset of the route points (data reduction) Keep the quality as good as possible Segmentation problem. Speed versus quality. Algorithms Quality Complexity
E N D
Route reduction 22.4.2013
Route reduction as polygonal approximation problem • Select a subset of the route points (data reduction) • Keep the quality as good as possible • Segmentation problem
Speed versus quality Algorithms Quality Complexity Optimal 100% O(N2) – O(N3) Heuristic ~50% O(N) – O(N2) Example: N=5000, M=300 Optimal (Dynamic Programming) 30 min Heuristic (Douglas-Peucker) 1 s
Min- problem with L2 metrics Approximate N-point curve by another M-point curve so that approximation error E is minimized: • Approximation error is defined as:
Dynamic programming algorithm (DP)[Perez & Vidal] M b State space m D(n,m) m-1 D(j,m-1) a 1 0 j n N D(n,m) = min { D(j,m-1) + e2(j,n) } Complexity: O(MN2) m<j<n
Optimization step of DP • Each cell has the (optimal) solution for representing first n points into m segments. D(n,m) D(j,m-1) m=2 m=3 m=1 6… 5 4 3 m=4 2 All (optimal) sub-solutions of m-1 segments are considered. n=1
Reduced search approach[Kolesnikov & Fränti] M b W=3 1 a 0 N Reference solution Bounding corridor
Reduced search algorithm • Find a reference solution by any fast algorithm • REPEAT • Construct bounding corridor along the reference path • Apply dynamic programming inside the bounding corridor • UNTIL ”good enough”
Time and space complexity • Processing time T ~ kN2W2/M • Time complexity: O(N) O(N2) • Space complexity: O(NW) • Speed-up for one iteration: TRSDP/TDP = (W/M)2 • Example: • If (W/M)2 = (10/300)2 then (30 min/900) = 2 s
Example of reduced search M=300, W=10F = 99.9%, T = 1.9 s
Multi-resolution approach 44 points 13 points 6 points The original route has 575 points in this example
Top-down or bottom-up? • Top-down • Segments: 1 → 2 → 4 → 8 → … → N/2 → N • Processing time = kN2W2/2+ kN2W2/4 + … • = 2kN2W2 • = O(N2) assuming w and k as constants • Bottom-up • Segments: N → N/2 → N/4 → … → 4 → 2 → 1 • Processing time = kN2W2/(N/2) + k(N/2)2W2/(N/4) + … • = 2kNW2+ 2kNW2/2+ kNW2/4+… • = O(N) assuming w and k as constants
References M. Chen, M. Xu and P. Fränti, "A fast O(N) multi-resolution polygonal approximation algorithm for GPS trajectory simplification", IEEE Trans. Image Processing, 21 (5), 2770-2785, May 2012. A. Kolesnikov and P. Fränti, "Reduced-search dynamic programming for approximation of polygonal curves", Pattern Recognition Letters, 24 (14), 2243-2254, October 2003. • J. C. Perez, E. Vidal, "Optimum polygonal approximation of digitized curves", Pattern Recognition Letter, 15, 743–750, 1994.