37
High-Pass Quantization for Mesh Encoding Olga Sorkine, Daniel Cohen-Or, Sivan Toledo Eurographics Symposium on Geometry Processing, Aachen 2003

High-Pass Quantization for Mesh Encoding Olga Sorkine, Daniel Cohen-Or, Sivan Toledo Eurographics Symposium on Geometry Processing, Aachen 2003

Embed Size (px)

Citation preview

Page 1: High-Pass Quantization for Mesh Encoding Olga Sorkine, Daniel Cohen-Or, Sivan Toledo Eurographics Symposium on Geometry Processing, Aachen 2003

High-Pass Quantization for Mesh Encoding

Olga Sorkine, Daniel Cohen-Or, Sivan Toledo

Eurographics Symposium on Geometry Processing, Aachen 2003

Page 2: High-Pass Quantization for Mesh Encoding Olga Sorkine, Daniel Cohen-Or, Sivan Toledo Eurographics Symposium on Geometry Processing, Aachen 2003

Overview

Geometry quantization Visual quality Connection to spectral properties

Page 3: High-Pass Quantization for Mesh Encoding Olga Sorkine, Daniel Cohen-Or, Sivan Toledo Eurographics Symposium on Geometry Processing, Aachen 2003

Geometry quantization – introduction

Each mesh vertex is represented by Cartesian coordinates, in floating-point.

Geometry compression requires quantization, normally 10-16 bits/coordinate

(xi, yi, zi)

Page 4: High-Pass Quantization for Mesh Encoding Olga Sorkine, Daniel Cohen-Or, Sivan Toledo Eurographics Symposium on Geometry Processing, Aachen 2003

Geometry quantization – introduction

Using smoothness assumptions, the quantized coordinates are predicted and the prediction errors are entropy-coded [Touma and Gotsman 98]

Page 5: High-Pass Quantization for Mesh Encoding Olga Sorkine, Daniel Cohen-Or, Sivan Toledo Eurographics Symposium on Geometry Processing, Aachen 2003

Quantization error

Quantization necessarily introduces errors. The finer the sampling, the more it suffers.

Page 6: High-Pass Quantization for Mesh Encoding Olga Sorkine, Daniel Cohen-Or, Sivan Toledo Eurographics Symposium on Geometry Processing, Aachen 2003

Quantization error

An example: coarsely-sampled sphere

original Quantized to 8 bits/coordinate

Page 7: High-Pass Quantization for Mesh Encoding Olga Sorkine, Daniel Cohen-Or, Sivan Toledo Eurographics Symposium on Geometry Processing, Aachen 2003

Quantization error

A finely-sampled sphere with the same quantization

original Same quantization to 8 bits/coordinate

Page 8: High-Pass Quantization for Mesh Encoding Olga Sorkine, Daniel Cohen-Or, Sivan Toledo Eurographics Symposium on Geometry Processing, Aachen 2003

Quantization error – discussion

Quantization of the Cartesian coordinates introduces high-frequency errors to the surface.

High-frequency errors alter the visual appearance of the surface – affect normals and lighting.

Only conservative quantization (usually 12-16 bits) avoids these visual artifacts.

Page 9: High-Pass Quantization for Mesh Encoding Olga Sorkine, Daniel Cohen-Or, Sivan Toledo Eurographics Symposium on Geometry Processing, Aachen 2003

Quantization – our approach

Transform the Cartesian coordinates to another space using the Laplacian matrix of the mesh.

Quantize the transformed coordinates. The quantization error in the regular Cartesian space will

have low frequency. Low-frequency errors are less apparent to a human

observer.

Page 10: High-Pass Quantization for Mesh Encoding Olga Sorkine, Daniel Cohen-Or, Sivan Toledo Eurographics Symposium on Geometry Processing, Aachen 2003

Relative (laplacian) coordinates

Represent each vertex relatively to its neighbours

( )

1i i i j

j N ii

v v vd

average of the neighbours

the relative coordinate vector

Page 11: High-Pass Quantization for Mesh Encoding Olga Sorkine, Daniel Cohen-Or, Sivan Toledo Eurographics Symposium on Geometry Processing, Aachen 2003

Laplacian matrix

A Matnn(R) the adjacency matrix

D Matnn(R) the degree-diagonal matrix:

Then, the Laplacian matrix L Matnn(R) is:

0i

ij

d i jD

otherwise

otherwise

jNiAij 0

)(1

1L I D A

Page 12: High-Pass Quantization for Mesh Encoding Olga Sorkine, Daniel Cohen-Or, Sivan Toledo Eurographics Symposium on Geometry Processing, Aachen 2003

Laplacian matrix

The previous form is not symmetric. We will use the symmetric Laplacian:

L D A

1

2

3

1

1 0 1 0

0 1 1

0 1 1 1

1 1 1n

n

d

d

d

L

d

d

( )i i i i j

j N i

v d v v

Page 13: High-Pass Quantization for Mesh Encoding Olga Sorkine, Daniel Cohen-Or, Sivan Toledo Eurographics Symposium on Geometry Processing, Aachen 2003

Properties of L

Sort the eigenvalues of L in accending order:

We can represent the geometry in L’s eigenbasis:

1

21 2 2 1 1n n n n

n

x

xc c c c

x

1e e e e

1 2 1

2 1

n n

n n

1e , e , e , e

eigenvectors

“frequencies”

low frequency components

high frequency components

Page 14: High-Pass Quantization for Mesh Encoding Olga Sorkine, Daniel Cohen-Or, Sivan Toledo Eurographics Symposium on Geometry Processing, Aachen 2003

Previous usages of Laplacian matrix

[Karni and Gotsman 00] – progressive geometry compression – Use the eigenvectors of L as a new basis of Rn

– Transmit the coordinates according to this spectral basis– First transmit the lower-eigenvalue coefficients (low frequency

components), then gradually add finer details by transmitting more coefficients.

Page 15: High-Pass Quantization for Mesh Encoding Olga Sorkine, Daniel Cohen-Or, Sivan Toledo Eurographics Symposium on Geometry Processing, Aachen 2003

Previous usages of Laplacian matrix

[Taubin 95] – surface smoothing– “Push” every vertex towards the centroid of its neighbours, i.e.– v’ = (I – L)v

– Iterate, with positive and negative values of (to reduce shrinkage effect)

Page 16: High-Pass Quantization for Mesh Encoding Olga Sorkine, Daniel Cohen-Or, Sivan Toledo Eurographics Symposium on Geometry Processing, Aachen 2003

Previous usages of Laplacian matrix

[Ohbuchi et al. 01] – mesh watermarking – Embed a bitstring in the low-frequency coefficients– Changes in low-frequency components are not visible

[Alexa 02] – morphing using relative coordinates– Produces locally smoother morphs

[Gotsman et al. 03] – A more general class of Laplacian matrices– Mesh embedding on a sphere using eigenvectors

Page 17: High-Pass Quantization for Mesh Encoding Olga Sorkine, Daniel Cohen-Or, Sivan Toledo Eurographics Symposium on Geometry Processing, Aachen 2003

Quantizing the - coordinates

Transform Cartesian to -coordinates:

Quantize -coordinates

To get back Cartesian coordinates:

Lx

1x L

(fixed-point quantization)

Page 18: High-Pass Quantization for Mesh Encoding Olga Sorkine, Daniel Cohen-Or, Sivan Toledo Eurographics Symposium on Geometry Processing, Aachen 2003

Discussion of the linear system

The matrix L is singular, so L1 doesn’t exist.

Adding one anchor point fixes this problem (substitute one vertex (x, y, z) – removes translation degrees of freedom)

1x L

Page 19: High-Pass Quantization for Mesh Encoding Olga Sorkine, Daniel Cohen-Or, Sivan Toledo Eurographics Symposium on Geometry Processing, Aachen 2003

Discussion of the linear system

By quantizing the , we put high-frequency error into . L has very small eigenvalues, so L1

has very large eigenvalues ( 1/)

Thus, L1 amplifies small errors and reverses the

frequencies. 1 1 1 1( )x L L ε L L

Small quantization error for ,high frequency

NOT so small !!low frequency

1x L

Page 20: High-Pass Quantization for Mesh Encoding Olga Sorkine, Daniel Cohen-Or, Sivan Toledo Eurographics Symposium on Geometry Processing, Aachen 2003

Spectrum of quantization error

Write x as: x = a1 e1 + a2 e2 + … + an en

Therefore, = Lx = 1a1 e1 + 2a2 e2 + … + n-1an-1 en-1 + nan en

Quantization error for ( + q ) is:

q = c1 e1 + c2 e2 + … + cn-1 en-1 + cn en

Resulting error in x:

qx = L1 q = (1/1)c1 e1 + (1/2)c2 e2 + … + (1/n-1)cn-1 en-1 + (1/n)cn en

large i – high frequencies

high frequency error – here ci are large

(1/i) is small – attenuates

high-frequency errors(1/i) is large – amplifies

low-frequency errors

Small i – low frequencies

low frequencies – small ci

Thus, the error in x will contain strong low-frequency components but weak high-frequency components.

Page 21: High-Pass Quantization for Mesh Encoding Olga Sorkine, Daniel Cohen-Or, Sivan Toledo Eurographics Symposium on Geometry Processing, Aachen 2003

Discussion of the linear system

Example of low-frequency error:– Find the differences between the horses…

Page 22: High-Pass Quantization for Mesh Encoding Olga Sorkine, Daniel Cohen-Or, Sivan Toledo Eurographics Symposium on Geometry Processing, Aachen 2003

Discussion of the linear system

Example of low-frequency error:– This one is the original horse model

Page 23: High-Pass Quantization for Mesh Encoding Olga Sorkine, Daniel Cohen-Or, Sivan Toledo Eurographics Symposium on Geometry Processing, Aachen 2003

Discussion of the linear system

Example of low-frequency error:– This is the model after quantizing to 8 bits/coordinate

– There is one anchor point (front left leg)

Page 24: High-Pass Quantization for Mesh Encoding Olga Sorkine, Daniel Cohen-Or, Sivan Toledo Eurographics Symposium on Geometry Processing, Aachen 2003

Making the error lower

We add more anchor points, whose Cartesian coordinates are known, as well as the - coordinates.

This “nails” the geometry in place, reducing the low-frequency error

Page 25: High-Pass Quantization for Mesh Encoding Olga Sorkine, Daniel Cohen-Or, Sivan Toledo Eurographics Symposium on Geometry Processing, Aachen 2003

Rectangular Laplacian

We add equations for the anchor points By adding anchors the matrix becomes rectangular, so

we solve the system in least-squares sense:

0 1 0 0

0 0 1 0

L

nx

x

x

2

1 1

2

1

2

n

x

x

constrainedanchor points

xAx

min

Page 26: High-Pass Quantization for Mesh Encoding Olga Sorkine, Daniel Cohen-Or, Sivan Toledo Eurographics Symposium on Geometry Processing, Aachen 2003

Choosing the anchor points

A greedy scheme. Add one anchor point at a time. Each time nail down the vertex that achieved the

maximal error after reconstruction. This process is slow, but it is done only by the encoder. Only a small number of anchors is needed. We

experiment with 0.1%, which gives very good results.

Page 27: High-Pass Quantization for Mesh Encoding Olga Sorkine, Daniel Cohen-Or, Sivan Toledo Eurographics Symposium on Geometry Processing, Aachen 2003

The effect of anchors on the error

Positive error – vertex moves outside of the surface

Negative error – vertex moves inside the surface

0 –

Cartesian quantization 8b/c

-quantization 7b/c4 anchors

-quantization 7b/c20 anchors

-quantization 7b/c2 anchors

Page 28: High-Pass Quantization for Mesh Encoding Olga Sorkine, Daniel Cohen-Or, Sivan Toledo Eurographics Symposium on Geometry Processing, Aachen 2003

Visual error metric

Euclidean distance between and does not faithfully represent the visual error (Cartesian quantization errors are small but the normals change a lot...)

Karni and Gotsman [2000] propose a “visual metric”:

║x – x’║vis = ║x – x’║2 + (1 – )║GL(x) – GL(x’)║2

= 0.5

We are not sure that should be 0.5…

x x

1

( )

1

( )

( )ij j

j N ii i

ijj N i

l v

GL v vl

Page 29: High-Pass Quantization for Mesh Encoding Olga Sorkine, Daniel Cohen-Or, Sivan Toledo Eurographics Symposium on Geometry Processing, Aachen 2003

Visual error metric

We measured the two error components separately:

Mq = ║x – x’║2

Sq = ║GL(x) – GL(x’)║2

Evis = Mq + (1 – ) Sq

Page 30: High-Pass Quantization for Mesh Encoding Olga Sorkine, Daniel Cohen-Or, Sivan Toledo Eurographics Symposium on Geometry Processing, Aachen 2003

Rate-distortion curves

Page 31: High-Pass Quantization for Mesh Encoding Olga Sorkine, Daniel Cohen-Or, Sivan Toledo Eurographics Symposium on Geometry Processing, Aachen 2003

Some results

original -quantization,entropy 7.62

Cartesian quantization,entropy 7.64

We compare to Touma-Gotsman predictive coder that uses Cartesian quantization

Evis[=0.5] = 5.3Evis[=0.15] = 2.3

Evis[=0.5] = 2.5Evis[=0.15] = 2.6

Page 32: High-Pass Quantization for Mesh Encoding Olga Sorkine, Daniel Cohen-Or, Sivan Toledo Eurographics Symposium on Geometry Processing, Aachen 2003

Some results

original -quantization,entropy 6.69

Cartesian quantization,entropy 7.17

We compare to Touma-Gotsman predictive coder that uses Cartesian quantization

Evis[=0.5] = 1.8Evis[=0.15] = 0.9

Evis[=0.5] = 4.8Evis[=0.15] = 4.9

Page 33: High-Pass Quantization for Mesh Encoding Olga Sorkine, Daniel Cohen-Or, Sivan Toledo Eurographics Symposium on Geometry Processing, Aachen 2003

Some results

original -quantization,entropy 10.3

Cartesian quantization,entropy 10.3

We compare to Touma-Gotsman predictive coder that uses Cartesian quantization

Evis[=0.5] = 6.4Evis[=0.15] = 3.9

Evis[=0.5] = 5.0Evis[=0.15] = 5.1

Page 34: High-Pass Quantization for Mesh Encoding Olga Sorkine, Daniel Cohen-Or, Sivan Toledo Eurographics Symposium on Geometry Processing, Aachen 2003

Time statistics

The least-squares system was solved using QR factorization of the normal equations

Implementation on 2 GHz P4 using TAUCS library

Models #verticesFactorization (sec.)Solving

(sec.)

Eight27180.1270.006

Horse198510.9800.040

Fandisk201111.5950.056

Venus500024.8030.151

Max Planck10008610.7900.318

Page 35: High-Pass Quantization for Mesh Encoding Olga Sorkine, Daniel Cohen-Or, Sivan Toledo Eurographics Symposium on Geometry Processing, Aachen 2003

Conclusions

The spectrum of the quantization error affects the visual quality of the quantized mesh

We have proposed a quantization method that concentrates the error in the low-frequencies

The method requires the computational effort of solving a linear least-squares system.

Much more research is needed to fully understand the spectral behavior of meshes…

Page 36: High-Pass Quantization for Mesh Encoding Olga Sorkine, Daniel Cohen-Or, Sivan Toledo Eurographics Symposium on Geometry Processing, Aachen 2003

Acknowledgements

Christian Rössl and Jens Vorsatz from Max-Planck-Institut für Informatik for the models

Israel Science Foundation founded by the Israel Academy of Sciences and Humanities

The Israeli Ministry of Science IBM Faculty Partnership Award German Israel Foundation (GIF) EU research project ‘Multiresolution in Geometric Modelling (MINGLE)’,

grant HPRN-CT-1999-00117.

Page 37: High-Pass Quantization for Mesh Encoding Olga Sorkine, Daniel Cohen-Or, Sivan Toledo Eurographics Symposium on Geometry Processing, Aachen 2003

Thank you!