1 / 14

Compressing Connectivity

Compressing Connectivity. Compressing Connectivity. Encode mesh structure adjacency + orientation User can control traversal order => order (+ info stored) define encoding Compression = Utilize redundancy In mesh Face has 3 vertices

marylong
Télécharger la présentation

Compressing Connectivity

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Compressing Connectivity

  2. Compressing Connectivity • Encode mesh structure • adjacency + orientation • User can control traversal order => order (+ info stored) define encoding • Compression = Utilize redundancy • In mesh • Face has 3 vertices • Most edges have 2 faces => Edgebreaker • Most vertices have valence 6 => TG coder

  3. TG Connectivity Coder: Intuition • Vertex based traversal • Edges incident on any vertex can be ordered consistently counter-clockwise • True in any planar graph • Determines order demo

  4. TG Connectivity Coder • Grow encoded (decoded) region • Use spiral-like border extension • add <valence> 2 Pivot 2 1 New Vertex 1 1 Output “add 4” 1 0 1 1 Cut Border 1 1 3 3 2 2 Free edges

  5. TG Connectivity Coder Remove full vertex 3 2 2 2 2 0 1 2 2 1 1 3 3 2 2

  6. TG Coder – Special Cases • Boundaries Before Add dummy vertices After Close mesh

  7. Stack Stack Stack Stack Stack Stack Stack Stack Stack Stack Stack Stack Stack Stack Stack Stack Stack Stack Stack Stack Stack Stack Stack Stack Stack Stack Stack Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh 1-2-3-4-5 1-2-3 1-2-3-4 4-5-6-12 4-5-6-12-13 2-3-4-5-6-9-10 3-4-5-6-12 3-4-5-6-12 3-4-5-6-9-10-11 1-2-3-4-5-6 2-3-4-5-6-9 3-4-5-6-9-10-11 1-2-3-4-5-6-7 2-3-4-5-6 1-2-3-4-5-6-7-8 4-5-6-12-13 3-4-5-6-9-10-11 1-2-3-4-5-6-7-8 1-2-3-4-5-6-7-8 4-5-6-12-13 2-3-4-5-6-9-10 3-4-5-6-9-10-11 6-12-13 3-4-5-6-9-10 1-2-3-4-5-6-7-8 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 11 11 11 11 11 11 11 11 11 11 11 12 12 12 12 12 12 12 10 10 10 10 10 10 10 10 10 10 10 10 10 10 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 13 13 13 13 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 Output Output Output Output Output Output Output Output Output Output Output Output Output Output Output Output Output Output Output Output Output Output Output Output Output Output Output 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 Add 4 Add 4 Add 4 Add dummy 10 Add 3 Add 4 Add 4 Add 4 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 - e := ActiveList.focus.FreeEdge(); // next free edge in c. clockwise order - u := ActiveList.focus.Neighbor(e); // neighboring vertex along edge e - if u.Free() - ActiveList.Add(u); output(“add %d”, u.degree); // This is always possible - if ActiveList.focus.Full() // if current focus full - ActiveList.focus = ActiveList.focus.NextNeighbor() // move focus - ActiveList.RemoveFullVertices(); // remove exhausted vertices // focus just marked for removal - e := ActiveList.focus.FreeEdge(); // next free edge in c. clockwise order - u := ActiveList.focus.Neighbor(e); // neighboring vertex along edge e - if u.Free() - ActiveList.Add(u); output(“add %d”, u.degree); // This is always possible - if ActiveList.focus.Full() // if current focus full - ActiveList.focus = ActiveList.focus.NextNeighbor() // move focus - ActiveList.RemoveFullVertices(); // remove exhausted vertices // focus just marked for removal - ActiveList.RemoveFullVertices(); // remove exhausted vertices - e := ActiveList.focus.FreeEdge(); // next free edge in c. clockwise order - u := ActiveList.focus.Neighbor(e); // neighboring vertex along edge e - if u.Free() - ActiveList.Add(u); output(“add %d”, u.degree); // This is always possible - if ActiveList.focus.Full() // if current focus full - ActiveList.focus = ActiveList.focus.NextNeighbor() // move focus - e := ActiveList.focus.FreeEdge(); // next free edge in c. clockwise order - u := ActiveList.focus.Neighbor(e); // neighboring vertex along edge e - if u.Free() - ActiveList.Add(u); output(“add %d”, u.degree); // This is always possible - e := ActiveList.focus.FreeEdge(); // next free edge in c. clockwise order - u := ActiveList.focus.Neighbor(e); // neighboring vertex along edge e - if u.Free() - ActiveList.Add(u); output(“add %d”, u.degree); // This is always possible - ActiveList.RemoveFullVertices(); // remove exhausted vertices - ActiveList.RemoveFullVertices(); // remove exhausted vertices - ActiveList.RemoveFullVertices(); // remove exhausted vertices - e := ActiveList.focus.FreeEdge(); // next free edge in c. clockwise order - u := ActiveList.focus.Neighbor(e); // neighboring vertex along edge e - if u.Free() - ActiveList.Add(u); output(“add %d”, u.degree); // This is always possible - ActiveList.RemoveFullVertices(); // remove exhausted vertices - ActiveList.RemoveFullVertices(); // remove exhausted vertices // the last triangle removed // all triangles of Mesh are visited - get Mesh; // Input mesh - declare Stack; // Stack of active lists - declare ActiveList; // Current active list - declare VertexList; // Boundary loop vertexes - ActiveList.RemoveFullVertices(); // remove exhausted vertices // focus just marked for removal - while Mesh.HasBoundary() - VertexList := Mesh.GetBoundaryLoop(); // Catch all boundary loops - Vertex u(dummy, VertexList.size); // Create dummy vertex - Mesh.Add(u, VertexList); // Connect them together - ActiveList.RemoveFullVertices(); // remove exhausted vertices - pick an unvisited triangle (v1,v2,v3) of Mesh; - ActiveList.Add(v1,v2,v3); - output(“add %d add %d add %d”, v1.degree, v2.degree, v3.degree); - ActiveList.focus := v1; Stack.push(ActiveList); - while Mesh.HasBoundary() - VertexList := Mesh.GetBoundaryLoop(); // Catch all boundary loops - Vertex u(dummy, VertexList.size); // Create dummy vertex - Mesh.Add(u, VertexList); // Connect them together - e := ActiveList.focus.FreeEdge(); // next free edge in c. clockwise order - u := ActiveList.focus.Neighbor(e); // neighboring vertex along edge e - if u.Free() - ActiveList.Add(u); output(“add %d”, u.degree); // This is always possible - e := ActiveList.focus.FreeEdge(); // next free edge in c. clockwise order - u := ActiveList.focus.Neighbor(e); // neighboring vertex along edge e - if u.Free() - ActiveList.Add(u); output(“add %d”, u.degree); // This is always possible - e := ActiveList.focus.FreeEdge(); // next free edge in c. clockwise order - u := ActiveList.focus.Neighbor(e); // neighboring vertex along edge e - if u.Free() - ActiveList.Add(u); output(“add %d”, u.degree); // This is always possible - e := ActiveList.focus.FreeEdge(); // next free edge in c. clockwise order - u := ActiveList.focus.Neighbor(e); // neighboring vertex along edge e - if u.Free() - ActiveList.Add(u); output(“add %d”, u.degree); // This is always possible - ActiveList.RemoveFullVertices(); // remove exhausted vertices // focus just marked for removal - while Mesh.HasBoundary() - VertexList := Mesh.GetBoundaryLoop(); // Catch all boundary loops - Vertex u(dummy, VertexList.size); // Create dummy vertex - Mesh.Add(u, VertexList); // Connect them together Add 4 Add 5 Add 7, Add 6, Add 7 TG Encoding Example

  8. TG Encoding Algorithm: Output • Output command sequence:Add 7, Add 6, Add 7, Add 5, Add 4Add dummy 10Add 3, Add 4, Add 4, Add 4, Add 4, Add 4, Add 4 • Entropy compressed bitstream: • Huffman code:Add 4 Add 7 Add 5 Add 6 Add dummy 10 Add 3 1 00 0100 0101 0110 0111 • Resulting in 27 bits = 2.25 bits/vertex

  9. Stack Stack Stack Stack Stack Stack Stack Stack Stack Stack Stack Stack Stack Stack Stack Stack Stack Stack Stack Stack Stack Stack Stack Stack Stack Stack Stack Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh Mesh 1-2-3-4-5 1-2-3-4 1-2-3 4-5-6-12-13 3-4-5-6-12 2-3-4-5-6-9 1-2-3-4-5-6-7-8 1-2-3-4-5-6-7-8 4-5-6-12-13 1-2-3-4-5-6-7 1-2-3-4-5-6 1-2-3-4-5-6-7-8 2-3-4-5-6-9-10 3-4-5-6-9-10-11 3-4-5-6-9-10-11 4-5-6-12-13 2-3-4-5-6-9-10 3-4-5-6-9-10-11 6-12-13 3-4-5-6-9-10-11 4-5-6-12 3-4-5-6-12 2-3-4-5-6 3-4-5-6-9-10 1-2-3-4-5-6-7-8 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 11 11 11 11 11 11 11 11 11 11 11 11 12 12 12 12 12 12 12 12 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 13 13 13 13 13 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 Input Input Input Input Input Input Output Input Input Input Input Input Input Input Input Input Input Input Input Input Input Input Input Input Input Input Input 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 Add 4 EOF Add 3 Add 4 Add 4 Add 4 Add dummy 10 Add 4 Add 4 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 - ActiveList.RemoveFullVertices(); // remove exhausted vertices // focus just marked for removal - if ActiveList.focus.Full() // if current focus full - ActiveList.focus = ActiveList.focus.NextNeighbor() // move focus - e:=ActiveList.focus.FreeEdge(); // next free edge in c. clockwise order - DummyVertex u(degree); // create new vertex u, with the given degree - ActiveList.Add(u); // insert u between focus and its predecessor - Mesh.Add(u); // update the mesh to have two more edges - ActiveList.RemoveFullVertices(); // remove exhausted vertices - ActiveList.RemoveFullVertices(); // remove exhausted vertices - ActiveList.RemoveFullVertices(); // remove exhausted vertices - if ActiveList.focus.Full() // if current focus full - ActiveList.focus = ActiveList.focus.NextNeighbor() // move focus - ActiveList.RemoveFullVertices(); // remove exhausted vertices // focus just marked for removal - e := ActiveList.focus.FreeEdge(); // next free edge in c. clockwise order - u := ActiveList.focus.Neighbor(e); // neighboring vertex along edge e - if u.Free() - ActiveList.Add(u); output(“add %d”, u.degree); // This is always possible - ActiveList.RemoveFullVertices(); // remove exhausted vertices // focus just marked for removal - e:=ActiveList.focus.FreeEdge(); // next free edge in c. clockwise order - DummyVertex u(degree); // create new vertex u, with the given degree - ActiveList.Add(u); // insert u between focus and its predecessor - Mesh.Add(u); // update the mesh to have two more edges - if ActiveList.focus.Full() // if current focus full - ActiveList.focus = ActiveList.focus.NextNeighbor() // move focus - e:=ActiveList.focus.FreeEdge(); // next free edge in c. clockwise order - DummyVertex u(degree); // create new vertex u, with the given degree - ActiveList.Add(u); // insert u between focus and its predecessor - Mesh.Add(u); // update the mesh to have two more edges - e:=ActiveList.focus.FreeEdge(); // next free edge in c. clockwise order - DummyVertex u(degree); // create new vertex u, with the given degree - ActiveList.Add(u); // insert u between focus and its predecessor - Mesh.Add(u); // update the mesh to have two more edges - e:=ActiveList.focus.FreeEdge(); // next free edge in c. clockwise order - Vertex u(degree); // create new vertex u, with the given degree - ActiveList.Add(u); // insert u between focus and its predecessor - Mesh.Add(u); // update the mesh to have two more edges - ActiveList.RemoveFullVertices(); // remove exhausted vertices - while Mesh.HasDummy() // handle boundaries - Vertex dummy:= Mesh.GetDummy(); // pick a dummy vertex - Mesh.Remove(dummy); // remove dummy and all its incident edges - get input; // Input encoded mesh - declare Stack; // Stack of active lists - declare ActiveList; // Current active list - ActiveList.RemoveFullVertices(); // remove exhausted vertices - ActiveList.RemoveFullVertices(); // remove exhausted vertices // the last triangle removed // all triangles of Mesh are visited - while not EOF - read degrees of vertices (v1,v2,v3); - Mesh.Add(v1, v2, v3); // catch first triangle - ActiveList.Add(v1,v2,v3); ActiveList.focus := v1; Stack.Push(ActiveList); - pick an unvisited triangle (v1,v2,v3) of Mesh; - ActiveList.Add(v1,v2,v3); - output(“add %d add %d add %d”, v1.degree, v2.degree, v3.degree); - ActiveList.focus := v1; Stack.push(ActiveList); - e:=ActiveList.focus.FreeEdge(); // next free edge in c. clockwise order - DummyVertex u(degree); // create new vertex u, with the given degree - ActiveList.Add(u); // insert u between focus and its predecessor - Mesh.Add(u); // update the mesh to have two more edges - e:=ActiveList.focus.FreeEdge(); // next free edge in c. clockwise order - DummyVertex u(degree); // create new vertex u, with the given degree - ActiveList.Add(u); // insert u between focus and its predecessor - Mesh.Add(u); // update the mesh to have two more edges - e:=ActiveList.focus.FreeEdge(); // next free edge in c. clockwise order - DummyVertex u(degree); // create new vertex u, with the given degree - ActiveList.Add(u); // insert u between focus and its predecessor - Mesh.Add(u); // update the mesh to have two more edges - ActiveList.RemoveFullVertices(); // remove exhausted vertices // focus just marked for removal - ActiveList.RemoveFullVertices(); // remove exhausted vertices - e:=ActiveList.focus.FreeEdge(); // next free edge in c. clockwise order - Vertex u(degree); // create new vertex u, with the given degree - ActiveList.Add(u); // insert u between focus and its predecessor - Mesh.Add(u); // update the mesh to have two more edges Add 4 Add 5 Add 7, Add 6, Add 7 TG Decoding Example

  10. TG Coder – Special Cases • Cut-border intersects itself: • split <offset> • Offset = distance (sum of free counts from focus to split vertex ) 2 2 1 1 2 Output “split 6” 2 2 1 1 3 1 1 1 1 0 Second Cut Border 2 1 1 2 1 1 1 3 3 2 2

  11. More TG Special Cases • Genus > 0: Merge operation required • Occurs when two different cut-borders intersect • Non-manifolds: Cut into manifold pieces

  12. Typical Command Distribution Coded to 2.0 bits/vertex

  13. TG Algorithm Performance • Disadvantages: • No theoretical upper bound on code length • Advantages: • Gives very good compression rates (approx 2 bits/vertex) on typical meshes • Gives excellent rates on highly regular meshes

  14. Lower Bound on Connectivity Coding Performance • Theorem (Tutte, 1960): Asymptotically (as n ) number of different planar triangulations on n vertices tends to • Entropy of this (uniform) distribution per vertex is bits/vertex

More Related