valence-based connectivity coding
DESCRIPTION
Valence-based Connectivity Coding. Hu Jianwei 2007-11-07. Why Mesh Compression. Slow networks require data compression to reduce the latency Small storage devices need data compression to save space. Surface Based Meshes. Connectivity How the vertices connect with each other Geometry - PowerPoint PPT PresentationTRANSCRIPT
Valence-based Connectivity CodingValence-based Connectivity Coding
Hu Jianwei2007-11-07
Why Mesh CompressionWhy Mesh Compression
• Slow networks require data compression to reduce the latency
• Small storage devices need data compression to save space
Surface Based MeshesSurface Based Meshes
• Connectivity– How the vertices connect with each other
• Geometry– Coordinates of the vertices
face1 1 2 3 4face2 3 4 3face3 5 2 1 3
facef
vertex1 ( x, y, z )vertex2 ( x, y, z )vertex3 ( x, y, z )
vertexv
ClassificationClassification
• Connectivity encoding
• Geometry encoding
• Single-rate compression
• Progressive compression
Valence-based CompressionValence-based Compression
• Triangle Mesh Compression [98 Touma & Gotsman]
• Valence-Driven Connectivity Encoding for 3D Meshes [01 Alliez & Desbrun]
• Near-Optimal Connectivity Encoding of 2-Manifold Polygon Meshes [02 Khodakovsky et al.]
• Compressing Polygon Mesh Connectivity with Degree Duality Prediction [02 Isenburg]
Key ObservationKey Observation
• A genus-0 manifold mesh is topologically equivalent to a planar graph
• The vertices incident on any mesh vertex may be ordered
98 Touma & Gotsman
Code WordsCode Words
• The topology may be encoded with:– add<degree>– split<offset>– merge<index><offset>
• Then entropy encoded– Huffman– arithmetic– run-length
98 Touma & Gotsman
Example TraversalExample Traversal98 Touma & Gotsman
Example TraversalExample Traversal98 Touma & Gotsman
Example TraversalExample Traversal98 Touma & Gotsman
Example TraversalExample Traversal98 Touma & Gotsman
Example TraversalExample Traversal98 Touma & Gotsman
Example TraversalExample Traversal98 Touma & Gotsman
Example TraversalExample Traversal98 Touma & Gotsman
Example TraversalExample Traversal98 Touma & Gotsman
Example TraversalExample Traversal98 Touma & Gotsman
Example TraversalExample Traversal98 Touma & Gotsman
Example TraversalExample Traversal98 Touma & Gotsman
Example TraversalExample Traversal98 Touma & Gotsman
Example TraversalExample Traversal98 Touma & Gotsman
Add dummy vertices98 Touma & Gotsman
Example TraversalTraversal98 Touma & Gotsman
Encoding98 Touma & Gotsman
Encoding98 Touma & Gotsman
Encoding98 Touma & Gotsman
Add 6; Add 7 ; Add 4 ;
Encoding98 Touma & Gotsman
Add 6; Add 7 ; Add 4 ;
Encoding98 Touma & Gotsman
Add 6; Add 7 ; Add 4 ; Add 4 ;
Encoding98 Touma & Gotsman
Add 6; Add 7 ; Add 4 ; Add 4 ;
Encoding98 Touma & Gotsman
Add 6; Add 7 ; Add 4 ; Add 4 ; Add 8 ;
Encoding98 Touma & Gotsman
Add 6; Add 7 ; Add 4 ; Add 4 ; Add 8 ; Add 5 ;
Encoding98 Touma & Gotsman
Add 6; Add 7 ; Add 4 ; Add 4 ; Add 8 ; Add 5 ; Add 5 (focus full) ;
Encoding98 Touma & Gotsman
Add 6; Add 7 ; Add 4 ; Add 4 ; Add 8 ; Add 5 ; Add 5 ;
Encoding98 Touma & Gotsman
Add 6; Add 7 ; Add 4 ; Add 4 ; Add 8 ; Add 5 ; Add 5 ;
Encoding98 Touma & Gotsman
Add 6; Add 7 ; Add 4 ; Add 4 ; Add 8 ; Add 5 ; Add 5 ; Add 4 ;
Encoding98 Touma & Gotsman
Add 6; Add 7 ; Add 4 ; Add 4 ; Add 8 ; Add 5 ; Add 5 ; Add 4 ; Add 5 ;
Encoding98 Touma & Gotsman
Add 6; Add 7 ; Add 4 ; Add 4 ; Add 8 ; Add 5 ; Add 5 ; Add 4 ; Add 5 ; Split 5 ;
Encoding98 Touma & Gotsman
Add 6; Add 7 ; Add 4 ; Add 4 ; Add 8 ; Add 5 ; Add 5 ; Add 4 ; Add 5 ; Split 5 ;
Encoding98 Touma & Gotsman
Add 6; Add 7 ; Add 4 ; Add 4 ; Add 8 ; Add 5 ; Add 5 ; Add 4 ; Add 5 ; Split 5 ; Add 4 ;
Encoding98 Touma & Gotsman
Add 6; Add 7 ; Add 4 ; Add 4 ; Add 8 ; Add 5 ; Add 5 ; Add 4 ; Add 5 ; Split 5 ; Add 4 ; Add 4 (focus full) ;
Encoding98 Touma & Gotsman
Add 6; Add 7 ; Add 4 ; Add 4 ; Add 8 ; Add 5 ; Add 5 ; Add 4 ; Add 5 ; Split 5 ; Add 4 ; Add 4 ;
Encoding98 Touma & Gotsman
Add 6; Add 7 ; Add 4 ; Add 4 ; Add 8 ; Add 5 ; Add 5 ; Add 4 ; Add 5 ; Split 5 ; Add 4 ; Add 4 ; Add Dummy 6 ;
Encoding98 Touma & Gotsman
Add 6; Add 7 ; Add 4 ; Add 4 ; Add 8 ; Add 5 ; Add 5 ; Add 4 ; Add 5 ; Split 5 ; Add 4 ; Add 4 ; Add Dummy 6 ;
Encoding98 Touma & Gotsman
Add 6; Add 7 ; Add 4 ; Add 4 ; Add 8 ; Add 5 ; Add 5 ; Add 4 ; Add 5 ; Split 5 ; Add 4 ; Add 4 ; Add Dummy 6 ; Add 4 (focus full);
Encoding98 Touma & Gotsman
Add 6; Add 7 ; Add 4 ; Add 4 ; Add 8 ; Add 5 ; Add 5 ; Add 4 ; Add 5 ; Split 5 ; Add 4 ; Add 4 ; Add Dummy 6 ; Add 4 ; (focus full)
Encoding98 Touma & Gotsman
Add 6; Add 7 ; Add 4 ; Add 4 ; Add 8 ; Add 5 ; Add 5 ; Add 4 ; Add 5 ; Split 5 ; Add 4 ; Add 4 ; Add Dummy 6 ; Add 4;
Encoding98 Touma & Gotsman
Add 6; Add 7 ; Add 4 ; Add 4 ; Add 8 ; Add 5 ; Add 5 ; Add 4 ; Add 5 ; Split 5 ; Add 4 ; Add 4 ; Add Dummy 6 ; Add 4;
Encoding98 Touma & Gotsman
Add 6; Add 7 ; Add 4 ; Add 4 ; Add 8 ; Add 5 ; Add 5 ; Add 4 ; Add 5 ; Split 5 ; Add 4 ; Add 4 ; Add Dummy 6 ; Add 4;
Huffman codingrun-length
coding
Decoding98 Touma & Gotsman
Add 6; Add 7 ; Add 4 ; Add 4 ; Add 8 ; Add 5 ; Add 5 ; Add 4 ; Add 5 ; Split 5 ; Add 4 ; Add 4 ; Add Dummy 6 ; Add 4;
Decoding98 Touma & Gotsman
Add 6; Add 7 ; Add 4 ; Add 4 ; Add 8 ; Add 5 ; Add 5 ; Add 4 ; Add 5 ; Split 5 ; Add 4 ; Add 4 ; Add Dummy 6 ; Add 4;
Decoding98 Touma & Gotsman
Add 6; Add 7 ; Add 4 ; Add 4 ; Add 8 ; Add 5 ; Add 5 ; Add 4 ; Add 5 ; Split 5 ; Add 4 ; Add 4 ; Add Dummy 6 ; Add 4;
Decoding98 Touma & Gotsman
Add 6; Add 7 ; Add 4 ; Add 4 ; Add 8 ; Add 5 ; Add 5 ; Add 4 ; Add 5 ; Split 5 ; Add 4 ; Add 4 ; Add Dummy 6 ; Add 4;
Decoding98 Touma & Gotsman
Add 6; Add 7 ; Add 4 ; Add 4 ; Add 8 ; Add 5 ; Add 5 (focus full); Add 4 ; Add 5 ; Split 5 ; Add 4 ; Add 4 ; Add Dummy 6 ; Add 4;
Decoding98 Touma & Gotsman
Add 6; Add 7 ; Add 4 ; Add 4 ; Add 8 ; Add 5 ; Add 5 ; Add 4 ; Add 5 ; Split 5 ; Add 4 ; Add 4 ; Add Dummy 6 ; Add 4;
Decoding98 Touma & Gotsman
Add 6; Add 7 ; Add 4 ; Add 4 ; Add 8 ; Add 5 ; Add 5 ; Add 4 ; Add 5 ; Split 5 ; Add 4 ; Add 4 ; Add Dummy 6 ; Add 4;
Decoding98 Touma & Gotsman
Add 6; Add 7 ; Add 4 ; Add 4 ; Add 8 ; Add 5 ; Add 5 ; Add 4 ; Add 5 ; Split 5 ; Add 4 ; Add 4 ; Add Dummy 6 ; Add 4;
Decoding98 Touma & Gotsman
Add 6; Add 7 ; Add 4 ; Add 4 ; Add 8 ; Add 5 ; Add 5 ; Add 4 ; Add 5 ; Split 5 (focus full); Add 4 ; Add 4 ; Add Dummy 6 ; Add 4;
Decoding98 Touma & Gotsman
Add 6; Add 7 ; Add 4 ; Add 4 ; Add 8 ; Add 5 ; Add 5 ; Add 4 ; Add 5 ; Split 5 ; Add 4 ; Add 4 ; Add Dummy 6 ; Add 4;
Decoding98 Touma & Gotsman
Add 6; Add 7 ; Add 4 ; Add 4 ; Add 8 ; Add 5 ; Add 5 ; Add 4 ; Add 5 ; Split 5 ; Add 4 ; Add 4 ; Add Dummy 6 ; Add 4;
Decoding98 Touma & Gotsman
Add 6; Add 7 ; Add 4 ; Add 4 ; Add 8 ; Add 5 ; Add 5 ; Add 4 ; Add 5 ; Split 5 ; Add 4 ; Add 4 (focus full); Add Dummy 6 ; Add 4;
Decoding98 Touma & Gotsman
Add 6; Add 7 ; Add 4 ; Add 4 ; Add 8 ; Add 5 ; Add 5 ; Add 4 ; Add 5 ; Split 5 ; Add 4 ; Add 4 ; Add Dummy 6 ; Add 4;
Decoding98 Touma & Gotsman
Add 6; Add 7 ; Add 4 ; Add 4 ; Add 8 ; Add 5 ; Add 5 ; Add 4 ; Add 5 ; Split 5 ; Add 4 ; Add 4 ; Add Dummy 6 (list full, pop list); Add 4;
Decoding98 Touma & Gotsman
Add 6; Add 7 ; Add 4 ; Add 4 ; Add 8 ; Add 5 ; Add 5 ; Add 4 ; Add 5 ; Split 5 ; Add 4 ; Add 4 ; Add Dummy 6 ; Add 4 (focus full);
Decoding98 Touma & Gotsman
Add 6; Add 7 ; Add 4 ; Add 4 ; Add 8 ; Add 5 ; Add 5 ; Add 4 ; Add 5 ; Split 5 ; Add 4 ; Add 4 ; Add Dummy 6 ; Add 4; (focus full)
Decoding98 Touma & Gotsman
Add 6; Add 7 ; Add 4 ; Add 4 ; Add 8 ; Add 5 ; Add 5 ; Add 4 ; Add 5 ; Split 5 ; Add 4 ; Add 4 ; Add Dummy 6 ; Add 4; (focus full, list full)
Decoding98 Touma & Gotsman
Add 6; Add 7 ; Add 4 ; Add 4 ; Add 8 ; Add 5 ; Add 5 ; Add 4 ; Add 5 ; Split 5 ; Add 4 ; Add 4 ; Add Dummy 6 ; Add 4;
ExampleExample98 Touma & Gotsman
ResultsResults
Model #tri bits/tri
Eight 1536 0.2
Triceratops 5666 1.4
Cow 5804 1.1
Beethoven 5028 1.4
Dodge 16646 0.9
Starship 8152 0.5
Average 0.9
98 Touma & Gotsman
Less than 1.5 bits per vertex on the average
ObstacleObstacle
• The number of split codes and the range of their offsets turn out to seriously impede the compression ratios
• This is a serious obstacle to guarantee a linear worst case bit-rate complexity
01 Alliez & Desbrun
Occurrence of “splits”Occurrence of “splits”01 Alliez & Desbrun
Occurrence of “splits”Occurrence of “splits”01 Alliez & Desbrun
Occurrence of “splits”Occurrence of “splits”01 Alliez & Desbrun
Occurrence of “splits”Occurrence of “splits”01 Alliez & Desbrun
Occurrence of “splits”Occurrence of “splits”01 Alliez & Desbrun
processed region
unprocessed region
Occurrence of “splits”Occurrence of “splits”01 Alliez & Desbrun
processed region
unprocessed region
Occurrence of “splits”Occurrence of “splits”01 Alliez & Desbrun
processed region
unprocessed region
Occurrence of “splits”Occurrence of “splits”01 Alliez & Desbrun
unprocessed region
processed region
Occurrence of “splits”Occurrence of “splits”01 Alliez & Desbrun
unprocessed region
split
processed region
The Best Pivot CandidateThe Best Pivot Candidate01 Alliez & Desbrun
How to ChooseHow to Choose
• The minimum free edges as the next pivot
• An adaptive mean number of free edges to select the next pivot vertex
01 Alliez & Desbrun
Getting Rid of the SplitsGetting Rid of the Splits01 Alliez & Desbrun
The Resulting ConquestThe Resulting Conquest01 Alliez & Desbrun
98 Touma & Gotsman
01 Alliez & Desbrun
Compression resultsCompression results01 Alliez & Desbrun
Not Triangles … Polygons!Not Triangles … Polygons!02 Isenburg
Add Free Vertices and FacesAdd Free Vertices and Faces
focusprocessed region
unprocessed region
boundary
boundary slots
45
3
4
34 45. . .. . .
focus(widened)
start slot
end slotfreevertices
5
5
4
4
3
3 exit focus
02 Isenburg
Free Vertex Splits BoundaryFree Vertex Splits Boundary
focus
processed region
unprocessed region
45
3
4
34 45. . .. . .
Ssplitoffset
02 Isenburg
Free Vertex Merges BoundaryFree Vertex Merges Boundary
stackfocus
processed region
processed region
unprocessed region
boundary in stack
mergeoffset
45
3
4
34 45. . .. . .
M
02 Isenburg
Resulting CodeResulting Code
• Two symbol sequences
– vertex degrees (+ “split” / “merge”)
– face degrees
• Compress with arithmetic coder
02 Isenburg
3. . . . . .64 4 44 M 5 44S
4 5. . . . . .3 64 4 4 4 4 4 4 4
Example Decoding RunExample Decoding Run02 Isenburg
45
3 . . .64 4 4 45 2
. . .3 64 4
6 3 5 444
3 5
Example Decoding RunExample Decoding Run02 Isenburg
45
3 . . .64 4 4 45 2
. . .3 64 4
6 3 5 444
3 5
4
Example Decoding RunExample Decoding Run02 Isenburg
focus
45
3 . . .64 4 4 45 2
. . .3 64 4
6 3 5 444
3 5
6
Example Decoding RunExample Decoding Run02 Isenburg
3
45
3 . . .64 4 4 45 2
. . .3 64 4
6 3 5 444
3 5
freevertex
Example Decoding RunExample Decoding Run02 Isenburg
exitfocus
45
3 . . .64 4 4 45 2
. . .3 64 4
6 3 5 444
3 5
6
Example Decoding RunExample Decoding Run02 Isenburg
5
45
3 . . .64 4 4 45 2
. . .3 64 4
6 3 5 444
3 5
free vertices
Example Decoding RunExample Decoding Run02 Isenburg
5
45
3 . . .64 4 4 45 2
. . .3 64 4
6 3 5 444
3 5
3
Example Decoding RunExample Decoding Run02 Isenburg
5
45
3 . . .64 4 4 45 2
. . .3 64 4
6 3 5 444
3 5
3
Example Decoding RunExample Decoding Run02 Isenburg
exitfocus
45
3 . . .64 4 4 45 2
. . .3 64 4
6 3 5 444
3 5
4
Example Decoding RunExample Decoding Run02 Isenburg
4
45
3 . . .64 4 4 45 2
. . .3 64 4
6 3 5 444
3 5
Example Decoding RunExample Decoding Run02 Isenburg
4
45
3 . . .64 4 4 45 2
. . .3 64 4
6 3 5 444
3 5
5
Example Decoding RunExample Decoding Run02 Isenburg
exitfocus
45
3 . . .64 4 4 45 2
. . .3 64 4
6 3 5 444
3 5
4
Example Decoding RunExample Decoding Run02 Isenburg
focus(widened)
startslot
endslot
45
3 . . .64 4 4 45 2
. . .3 64 4
6 3 5 444
3 5
5
3
3
Example Decoding RunExample Decoding Run02 Isenburg
4
45
3 . . .64 4 4 45 2
. . .3 64 4
6 3 5 444
3 5
Example Decoding RunExample Decoding Run02 Isenburg
exitfocus
4
45
3 . . .64 4 4 45 2
. . .3 64 4
6 3 5 444
3 5
5
Example Decoding RunExample Decoding Run02 Isenburg
focus(widened)
45
3 . . .64 4 4 45 2
. . .3 64 4
6 3 5 444
3 5
Example Decoding RunExample Decoding Run02 Isenburg
4
45
3 . . .64 4 4 45 2
. . .3 64 4
6 3 5 444
3 5
Example Decoding RunExample Decoding Run02 Isenburg
focus
exitfocus
45
3 . . .64 4 4 45 2
. . .3 64 4
6 3 5 444
3 5
4
Example Decoding RunExample Decoding Run02 Isenburg
3
45
3 . . .64 4 4 45 2
. . .3 64 4
6 3 5 444
3 5
Example Decoding RunExample Decoding Run02 Isenburg
exitfocus
45
3 . . .64 4 4 45 2
. . .3 64 4
6 3 5 444
3 5
4
Example Decoding RunExample Decoding Run02 Isenburg
focus(widened)
45
3 . . .64 4 4 45 2
. . .3 64 4
6 3 5 444
3 5
Example Decoding RunExample Decoding Run02 Isenburg
6
45
3 . . .64 4 4 45 2
. . .3 64 4
6 3 5 444
3 5
Example Decoding RunExample Decoding Run02 Isenburg
6
45
3 . . .64 4 4 45 2
. . .3 64 4
6 3 5 444
3 5
2
Example Decoding RunExample Decoding Run02 Isenburg
6
45
3 . . .64 4 4 45 2
. . .3 64 4
6 3 5 444
3 5
4
Example Decoding RunExample Decoding Run02 Isenburg
exitfocus
45
3 . . .64 4 4 45 2
. . .3 64 4
6 3 5 444
3 5
4
Example Decoding RunExample Decoding Run02 Isenburg
focus(widened)
45
3 . . .64 4 4 45 2
. . .3 64 4
6 3 5 444
3 5
Example Decoding RunExample Decoding Run02 Isenburg
5
45
3 . . .64 4 4 45 2
. . .3 64 4
6 3 5 444
3 5
. . . . . .
Average Distributions Average Distributions
2
3
4
56 7 8 9+
vertex degrees
3
4
5 6 7 8 9+
face degrees
add
mergesplit
case
02 Isenburg
Degree CorrelationDegree Correlation02 Isenburg
Face Degree Prediction Face Degree Prediction 02 Isenburg
focus(widened)
4
3
3
3 + 4 + 3=
33.333
average degree offocus vertices
“face degree context”
fdc =
fdc 3.3
3.3 fdc 4.3
4.3 fdc 4.9
4.9 fdc
Vertex Degree Prediction Vertex Degree Prediction 02 Isenburg
6
=
degree offocus face
“vertex degree context”
vdc 6
vdc 6
vdc =
vdc = 4
vdc = 5
4
5
3
6
Compression Gain Compression Gain 02 Isenburg
triceratopsgalleoncessna
…tommygun
cowteapot
withoutbits per vertexmodel
min / max / average gain [%] = 0 / 31 / 17
withbits per vertex
1.1892.0932.543
…2.2581.7811.127
1.1922.3712.811
…2.9171.7811.632
Compression Gain Compression Gain 02 Isenburg
vs. Face Fixer coder [00 Isenburg & Snoeyink]
Reducing the Number of SplitsReducing the Number of Splits02 Isenburg
• A simple version of [Alliez & Desbrun]’s stratege – Only move the focus if the smallest number of slots is 0
or 1
focus
exitfocus
Compression Gain Compression Gain 02 Isenburg
Valence-based CompressionValence-based Compression
• Valence-based coding is widely considered to be the best connectivity coding method available
• If valence-based coding is not optimal, it is probably not far from this
Arithmetic CodingArithmetic Coding
• Arithmetic coding is a method for lossless data compression
• It is a form of variable-length entropy encoding
• Arithmetic coding encodes the entire message into a single number, a fraction n where (0.0 ≤ n < 1.0)
Arithmetic Coding ExampleArithmetic Coding Example
• Four-symbol model– 60% chance of symbol NEUTRAL – 20% chance of symbol POSITIVE– 10% chance of symbol NEGATIVE– 10% chance of symbol END-OF-DATA
• Decoding of 0.538
Arithmetic Coding ExampleArithmetic Coding Example
• The interval for NEUTRAL would be [0, 0.6)
• The interval for POSITIVE would be [0.6, 0.8)
• The interval for NEGATIVE would be [0.8, 0.9)
• The interval for END-OF-DATA would be [0.9, 1)
Arithmetic Coding ExampleArithmetic Coding Example
0.538 falls into the sub-interval for NEUTRAL, [0, 0.6)• The interval for NEUTRAL would be [0, 0.36) -- 60% of [0, 0.6)
• The interval for POSITIVE would be [0.36, 0.48) -- 20% of [0, 0.6)
• The interval for NEGATIVE would be [0.48, 0.54) -- 10% of [0, 0.6)
• The interval for END-OF-DATA would be [0.54, 0.6). -- 10% of [0, 0.6)
A diagram showing decoding of 0.538
Arithmetic Coding ExampleArithmetic Coding Example
0.538 falls into the sub-interval for NEUTRAL, [0, 0.6)• The interval for NEUTRAL would be [0, 0.36) -- 60% of [0, 0.6)
• The interval for POSITIVE would be [0.36, 0.48) -- 20% of [0, 0.6)
• The interval for NEGATIVE would be [0.48, 0.54) -- 10% of [0, 0.6)
• The interval for END-OF-DATA would be [0.54, 0.6). -- 10% of [0, 0.6)
A diagram showing decoding of 0.538
Arithmetic Coding ExampleArithmetic Coding Example
0.538 falls into the sub-interval for NEGATIVE, [0.48, 0.54)• The interval for NEUTRAL would be [0.48, 0.516) -- 60% of [0.48, 0.54)
• The interval for POSITIVE would be [0.516, 0.528) -- 20% of [0.48, 0.54)
• The interval for NEGATIVE would be [0.528, 0.534) -- 10% of [0.48, 0.54)
• The interval for END-OF-DATA would be [0.534, 0.540) -- 10% of [0.48, 0.54)
A diagram showing decoding of 0.538
Arithmetic Coding ExampleArithmetic Coding Example
0.538 falls into the sub-interval for END-OF-DATA, [0.534, 0.540)
Decoding is complete
A diagram showing decoding of 0.538
The same message could have been encoded by the equally short fractions .534, .535, .536, .537 or .539.