Alexander Kolesnikov

Polygonal approximation

  1. Introduction
  2. Heuristic algorithms
  3. Optimal algorithms for min-e problem
  4. Iterative reduced search
  5. Optimal algorithms for min-# problem
  6. Approximation of closed contours
  7. Multiple-object polygonal approximation
  8. References
  9. List of publications

3.7 Multiple-object polygonal approximation

3.7.1 Problem formulation

The problem of polygonal approximation of a single curve can be extended to the case of multiple curves (see Fig. 3.7.1) as follows:

Multiple object min-# problem: Given K polygonal curves P1P2PK, approximate it by set of K another polygonal curves Q1Q2QK with the minimum total number of segments M so that the approximation error does not exceed a given maximum tolerance e.

Multiple object min-e problem: Given K polygonal curves P1P2PK, approximate it by set of K another polygonal curves Q1Q2QK with a given total number of segments M so that the total approximation error is minimized.

 


Figure 3.7.1: Example of multiple-object vector map: "Elevation map" [NLS], the total number of vertices N=38924, the number of objects K=569.

Solution for the multiple-object min-# problem depends on the error measure in use. In the case of L¥ error measure, the problem reduces to the single-object min-# problem as the optimization can be solved for every object independently [244]. In the case of additive error measures (L1, L2, etc.), on the other hand, the problem is not trivial. Fortunately, in practical applications we mostly have to deal with error measure L¥ because the use of additive error measures (L1 or L2) is not practical in the case of min-# problem.

The case of min-e approximation of multiple objects (with any error measure) is more complicated. The optimal approximation cannot be obtained by solving the approximation of each individual objects separately because the given total number of approximation segments should be optimally distributed among all objects. For example, uniform allocation of the segments can assign too many segments to the less complicated objects and, respectively, lacking the segments for more complicated objects. This situation is illustrated in Fig. 3.7.2.


Figure 3.7.2: Example of multiple object approximation with uniform allocation of the segments numbers (Mk» NkM/N); MD=3×9 and ML=6 (left), and with optimal allocation of the segments number (right), MD=3×4 and ML=21. The number of points in the objects are ND = 3×121 ("Diamond"), and NL = 82 ("Leaf").

The multiple-object min-e problem can be formulated as the following optimization task for the total approximation error E(P1, …, PKK) for K objects {P1, …, PK}:

where e2(qk,mqk,m+1) is approximation error with measure L2 of curve segment {pi, …, pj} of Pk by the correspondent line segment (qk,mqk,m+1) of Qk; M is a given total number of segments and Mk is the number of segments in object Pk.

3.7.2 Survey of solutions

Shuster and Katsaggelos considered problem of lossy encoding of object boundaries in rate-distortion sense [244]. The digitized contour is approximated by polygon Q, which leads to the smallest distortion for a given rate (number of bits). Actually, the case when the rate is proportional to the number of line segments corresponds to the multiple-object min-e problem. Schuster and Katsaggelos [244] considered two different classes of distortion measures: L¥ and L2. For the first class (measure L¥ ), they used scheme based on the shortest path algorithm for a weighted directed acyclic graph. For the second class (measure L2) they proposed two algorithms.

The first algorithm is based on the Lagrangian multipliers method, which uses the DP algorithm for the shortest path in a directed acyclic graph. The time complexity of the Lagrangian approach for a fixed multiplier l is the same as for the base shortest path algorithm. The shortest path algorithm is invoked several times by the bisection algorithm to find the optimal l * and, hence, the time complexity is a function of the number of required iterations. Thus, the complexity of the first algorithm is O(N2 log N) because it is defined by the complexity of the shortest path algorithm and the number of bisection iterations. Since the Lagrangian multiplier method can only find solutions on the convex hull of the operational rate-distortion functions, they also proposed a tree-pruning based algorithm. This method is a one pass variant algorithm with the complexity of O(N2), but the efficiency of the pruning scheme cannot be guaranteed in general.

Algorithms with the complexity of higher than O(N2) can be used for relatively small input. This can be suitable for the encoding of object contours for MPEG-4 standard [132] but it can be too slow in the case of large vector maps.

3.7.3 Reduced search algorithm

P7, the min-eproblem of optimal approximation of multiple-object vector data was considered. We have introduced two algorithms for solving the problem based on dynamic programming: full search and iterative reduced search. Full search algorithm of complexity O(N3) has been introduced to represent the DP approach for joint optimization the number of segments and the approximation of the individual objects. At first, the rate-distortion functions are computed for all the objects as minimal approximation error for all possible number of segments. Then problem of optimal allocation of constrained resource is solved by DP algorithm. Finally the optimal approximation for every object is calculated for the found optimal distribution of segment numbers.

a)
b)
Figure 3.7.3: Illustration of the multiple-goal state space W k for full search DP algorithm (sample problem of Nk=34 and Mk=12) (left), and the multiple-goal bounding corridor of width W=3 in the state space for reduced search DP algorithm (sample problem of Nk=34 and Mk=12) (right). The reference path H(m) in the corridor is marked with dark gray circles, and the goal states with gray squares.

Because the time and space complexity of the full search algorithm is high, the iterative reduced search approach was generalized to the problem under consideration. We follow the main idea of the reduced search by reducing the search space by a given preliminary solution for the approximation, and then perform the search in the reduced space iteratively (see Fig. 3.7.3). Main difference to the full search is that a smaller search area is needed, which makes the algorithm faster. The iterative reduced search algorithm has time complexity of O(N)- O(N2). This is significantly smaller than the O(N3) of the full search, or the O(N2log(N)) of [244]. The reduced search approach is also applicable for very large data sets with reasonable memory requirements. Although the optimality of the algorithm cannot be guaranteed in general, the experiments indicate that the method is capable of finding the optimal solution even in the case of very large data sets (see Fig. 3.7.4). The algorithm can also be tuned for obtaining very fast sub-optimal solutions by reducing the number of iterations and corridor width.

a)
b)
Figure 3.7.4: Approximation results for test data "Elevation map": solution (fragment) for straightforward approach, Douglas-Peucker approximation with uniform allocation of the segments numbers: E0 = 892158, T0 = 1.7s (left); final result (fragment) of optimal approximation with optimal number of segments after 20 iterations; E20 = 124093, T20 = 22 s (right). The vector data reduction ratio is 5:1 (N=38924, M=7784). Processing time for full search algorithm is 157 s.

3.7.4 Summary

We have introduced two algorithms for solving the problem based on dynamic programming: full search and iterative reduced search. The algorithms optimize the number of segments and the approximation of the individual objects jointly . Experimental results indicate that the proposed algorithm reaches the optimal solution in all cases tested even though the optimality cannot be guaranteed in general. The iterative reduced search algorithm has time complexity of O(N)-O(N2) depending on the given the data reduction ratio.


Copyright (c) 2003, All rights reserved, Alexander Kolesnikov