FAST DYNAMIC QUANTIZATION ALGORITHM FOR VECTOR MAP COMPRESSION Minjie Chen, Mantao Xu and Pasi...

18
FAST DYNAMIC QUANTIZATION ALGORITHM FOR VECTOR MAP COMPRESSION Minjie Chen, Mantao Xu and Pasi Fränti University of Eastern Finland

Transcript of FAST DYNAMIC QUANTIZATION ALGORITHM FOR VECTOR MAP COMPRESSION Minjie Chen, Mantao Xu and Pasi...

Page 1: FAST DYNAMIC QUANTIZATION ALGORITHM FOR VECTOR MAP COMPRESSION Minjie Chen, Mantao Xu and Pasi Fränti University of Eastern Finland.

FAST DYNAMIC QUANTIZATION ALGORITHM FOR VECTOR MAP COMPRESSION

Minjie Chen, Mantao Xu and Pasi Fränti

University of Eastern Finland

Page 2: FAST DYNAMIC QUANTIZATION ALGORITHM FOR VECTOR MAP COMPRESSION Minjie Chen, Mantao Xu and Pasi Fränti University of Eastern Finland.

Vector Compression

Vector data, embrace a number of geographic information or objects such as waypoints, routes and areas. It is represented with a sequence of points in a given coordinate system. In order to save storage cost, compression algorithm for vector data is needed.

-6 -4 -2 0 250

52

54

56

58

Longitude

La

titu

de

Map of UKGPS traces

Page 3: FAST DYNAMIC QUANTIZATION ALGORITHM FOR VECTOR MAP COMPRESSION Minjie Chen, Mantao Xu and Pasi Fränti University of Eastern Finland.

Polygonal Approximation

Reduce the number of points in the vector map such that the data is represented in a coarser resolution.(Douglas73’,Perez94’,Schuster 98’, Bhowmick07’)

-6 -4 -2 0 250

52

54

56

58

Longtitude

Latit

ude

-6 -4 0 250

52

54

56

58

Longtitude

Latit

ude

Number of point is reduced from 10910 to 239

Page 4: FAST DYNAMIC QUANTIZATION ALGORITHM FOR VECTOR MAP COMPRESSION Minjie Chen, Mantao Xu and Pasi Fränti University of Eastern Finland.

Quantization-based method

Reduce every points’ coding cost. The coordinate value is quantized and differential coordinates is encoded(Shekhar 02’, Akimov 04’)

-6 -4 -2 0 250

52

54

56

58

Longtitude

Latit

ude

-6 -4 -2 0 250

52

54

56

58

Longtitude

Latit

ude

Given quantization level l, differential coordinates is quantized as:( ) [ / ] ([ / ] ,[ / ] )i iQ l l x l l y l l v vi i

Coding Q (vi) is equivalent to coding an integer vector q = ([Δxi/l], Δyi/l])

Page 5: FAST DYNAMIC QUANTIZATION ALGORITHM FOR VECTOR MAP COMPRESSION Minjie Chen, Mantao Xu and Pasi Fränti University of Eastern Finland.

Coding of quantized residual vectors

Integer vector q = ([Δxi/l], Δyi/l]) is encoded by probability distributions of qx and qy:

Codebook itself must be encoded. But a large-sized codebook is intractable in order to achieve a desirable coding efficiency

An intuitive solution is to adopt a single-parameter geometric distribution to model qx and qy:

where px , py can be approximated by maximum likelihood estimation.Other solutions, uniform, negative binomial or Poisson distribution can also be considered

2 2(q) log ([ / ] log ([ / ]r f x l f y l

| || |(| |) (1 ) , (| |) (1 ) yxqq

x x x y y yf q p p f q p p

Page 6: FAST DYNAMIC QUANTIZATION ALGORITHM FOR VECTOR MAP COMPRESSION Minjie Chen, Mantao Xu and Pasi Fränti University of Eastern Finland.

Coding of quantized residual vectors

Example of using geometric distribution to estimate the probability (allocated coding

bits) of q ,for l = 0.0025

-0.1 -0.05 0 0.05 0.10

0.05

0.1

0.15

0.2

0.25

estimated

real

-0.1 -0.05 0 0.05 0.10

0.02

0.04

0.06

0.08

0.1

0.12

0.14

0.16

estimated

real

For ∆xl For ∆yl

Page 7: FAST DYNAMIC QUANTIZATION ALGORITHM FOR VECTOR MAP COMPRESSION Minjie Chen, Mantao Xu and Pasi Fränti University of Eastern Finland.

Error Measure (Distortion)

Suppose poly-line {pi,…,pj} is approximated by line segment , the approximation error can be defined as the sum of square distances from vertices pk (i≤k≤j):

r ri jp p

22 ( , ) ( , )

jr r r ri j k i j

k i

e p p d p p p

Poly-line {pi,…, pj} (black line) is approximated by (blue line )with approximating error

2 2 2 22 1 2 3 4( , )r r

i je p p d d d d

12 21

( , )m m

Mr ri i

m

E e p p

The distortion can be calculated by:

This can be calculated in O(1) time by [Perez 94’]

Page 8: FAST DYNAMIC QUANTIZATION ALGORITHM FOR VECTOR MAP COMPRESSION Minjie Chen, Mantao Xu and Pasi Fränti University of Eastern Finland.

Dynamic Quantization

2min , . . ,E s t R c

The distortion E is minimized under the constraint of bit constraint R:

Dynamic quantization optimizes the cost function:

1 12 21

( ( , ) ( , ))m m m m

Mr r r ri i i i

m

J E R e p p r p p

Combine polygonal approximation and quantization-based method using dynamic programming. [Kolesnikov 05’]:

Page 9: FAST DYNAMIC QUANTIZATION ALGORITHM FOR VECTOR MAP COMPRESSION Minjie Chen, Mantao Xu and Pasi Fränti University of Eastern Finland.

Dynamic Quantization

The minimization is solved by the shortest path search on a weighted directed acyclic graph (DAG) and dynamic programming. Suppose Ji is the minimum weighting sum from p1 to pi on G, A is an array used for backtracking operation, the recursive equation can be defined by:

2 1{1 1}min ( ( , ) ( , )), 0r r r r

i k k i k ik iJ J e p p r p p J

2{1 1}arg min ( ( , ) ( , ))r r r r

i k k k i k ik i

A J e p p r p p

-5.75 -5.7 -5.65 -5.6 -5.55 -5.5 -5.45 -5.4 -5.35 -5.3 -5.2550

50.05

50.1

50.15

50.2

50.25

original

PA

DQ

Page 10: FAST DYNAMIC QUANTIZATION ALGORITHM FOR VECTOR MAP COMPRESSION Minjie Chen, Mantao Xu and Pasi Fränti University of Eastern Finland.

Dynamic Quantization

Two parameters: Lagrangian parameter λ quantization level l

Given one l, different λ → one rate-distortion curve

Existing approach calculates many rate-distortion curves with different l and the best is the lower envelope of the set of curves.

Rate-distortion curve for quantization step qk=0.01/2k, k=0, 1/2,1,…, 5

Time-expensive0 2 4 6 8 10 12

10-8

10-7

10-6

10-5

10-4

rate (bits)

dis

tort

ion

(M

SE

)

Page 11: FAST DYNAMIC QUANTIZATION ALGORITHM FOR VECTOR MAP COMPRESSION Minjie Chen, Mantao Xu and Pasi Fränti University of Eastern Finland.

Dynamic Quantization – fast solution

Proposed: if ∆x, ∆y follows geometric distribution or uniform distribution, by setting

for each l, one optimal Lagrangian parameter λ is estimated as:

black ‘+’: error balance principle red ‘o’: proposed

/ 0J l

0 5 1010

-8

10-7

10-6

10-5

10-4

rate (bits)

dis

tort

ion

(M

SE

)

Relationship between λ and l is derived, no need for multiple calculation of rate-distortion curve

21ln 2

6l

Page 12: FAST DYNAMIC QUANTIZATION ALGORITHM FOR VECTOR MAP COMPRESSION Minjie Chen, Mantao Xu and Pasi Fränti University of Eastern Finland.

Time complexity

Shortest path algorithm on a weighted DAG takes O(N2) time.

Incorporating a stop search criterion in DAG shortest path search

22( , )( , )

( ) ( )i

r rr rA ik i

i

e p pe p p

i k i A

The proposed method can also be applied for bit-rate constraint problem by several iterations using binary search on the quantization level l.

Time complexity reduced as O(N2/M)

Page 13: FAST DYNAMIC QUANTIZATION ALGORITHM FOR VECTOR MAP COMPRESSION Minjie Chen, Mantao Xu and Pasi Fränti University of Eastern Finland.

Pseudo code

Page 14: FAST DYNAMIC QUANTIZATION ALGORITHM FOR VECTOR MAP COMPRESSION Minjie Chen, Mantao Xu and Pasi Fränti University of Eastern Finland.

Experiments

0.55 0.6 0.65 0.7 0.75

51.4

51.45

51.5

51.55

0.55 0.6 0.65 0.7 0.75

51.4

51.45

51.5

51.55

0.55 0.6 0.65 0.7 0.75

51.4

51.45

51.5

51.55

0.55 0.6 0.65 0.7 0.75

51.4

51.45

51.5

51.55

128bits/point, original 10 bits/point

5 bits/point 2 bits/point

Page 15: FAST DYNAMIC QUANTIZATION ALGORITHM FOR VECTOR MAP COMPRESSION Minjie Chen, Mantao Xu and Pasi Fränti University of Eastern Finland.

Resulting rate-distortion curve

2 4 6 8 10 1210

-8

10-7

10-6

10-5

10-4

rate (bits)

dis

tort

ion

(M

SE

)

CBCRLDQFDQ

CBC: clustering-based methodRL: reference line methodDQ: Dynamic quantizationFDQ: Fast dynamic quantization

Page 16: FAST DYNAMIC QUANTIZATION ALGORITHM FOR VECTOR MAP COMPRESSION Minjie Chen, Mantao Xu and Pasi Fränti University of Eastern Finland.

Proof For geometric distribution For uniform distribution

Page 17: FAST DYNAMIC QUANTIZATION ALGORITHM FOR VECTOR MAP COMPRESSION Minjie Chen, Mantao Xu and Pasi Fränti University of Eastern Finland.

Conclusions

Derivation for optimal Lagrangian multiplier λ for each quantization step l

Fast dynamic quantization algorithm with O(N2/M) time complexity for lossy compression of vector data.

Page 18: FAST DYNAMIC QUANTIZATION ALGORITHM FOR VECTOR MAP COMPRESSION Minjie Chen, Mantao Xu and Pasi Fränti University of Eastern Finland.

Reference

[Douglas 73’] D. H. Douglas, T. K. Peucker, "Algorithm for the reduction of the number of points required to represent a line or its caricature", The Canadian Cartographer, 10 (2), pp. 112-122, 1973.

[Perez 94’] J. C. Perez, E. Vidal, "Optimum polygonal approximation of digitized curves", Pattern Recognition Letters, 15, 743–750, 1994.

[Schuster 98’] G. M. Schuster and A. K. Katsaggelos, "An optimal polygonal boundary encoding scheme in the rate-distortion sense", IEEE Trans. on Image Processing, vol.7, pp. 13-26, 1998.

[Bhowmick 07’] P. Bhowmick and B. Bhattacharya, "Fast polygonal approximation of digital curves using relaxed straightness properties", IEEE Trans. on PAMI, 29 (9), 1590-1602, 2007.

[Shekhar 02’] S. Shekhar, S. Huang, Y. Djugash, J. Zhou, "Vector map compression: a clustering approach", 10th ACM Int. Symp.Advances in Geographic Inform, pp.74-80, 2002.

[Akimov 04’] A. Akimov, A. Kolesnikov and P. Fränti, "Coordinate quantization in vector map compression", IASTED Conference on Visualization, Imaging and Image Processing (VIIP’04), pp. 748-753, 2004.

[Kolesnikov 05’] A. Kolesnikov, "Optimal encoding of vector data with polygonal approximation and vertex quantization", SCIA’05, LNCS, vol. 3540, 1186–1195. 2005.