Documents
Resources
Learning Center
Upload
Plans & pricing Sign in
Sign Out

1-2-3-4-5-6 - University of British Columbia

VIEWS: 0 PAGES: 14

									            Compressing Connectivity




  University of
British Columbia
                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

  University of
British Columbia
             TG Connectivity Coder: Intuition
                                   demo

                  Vertex based traversal
                  Edges incident on any vertex can be ordered
                   consistently counter-clockwise
                      True in any planar graph
                      Determines order




  University of
British Columbia
                  TG Connectivity Coder
                      Grow encoded (decoded) region
                      Use spiral-like border extension
                                 add <valence>
                                                                             2
                      Pivot   2                                          1           New
              1                                                      1
                                                                                     Vertex
                                      1            Output
      1                                            “add 4”   1                   0
                                          Cut
                                          Border



          3                           1                          3               1


                              2                                          2
      Free edges
  University of
British Columbia
                TG Connectivity Coder



                       3       Remove                    2
            2                                    2
                                 full
                   0       2
                                vertex                       1
    2                                    2



        3                  1                 3               1


                   2                                 2



  University of
British Columbia
               TG Coder – Special Cases
                  Boundaries
      Before                     Add       After
                                dummy
                                vertices



                                 Close
                                 mesh




  University of
British Columbia
                 TG Encoding Example
Mesh                                                                Stack
                                    6                          4-5-6-12-13
                                                               4-5-6-12
                                                               3-4-5-6-12
                                                               3-4-5-6-9-10-11
                                                               3-4-5-6-9-10
                                                               2-3-4-5-6-9-10
                                                               2-3-4-5-6-9
                                                               2-3-4-5-6
                                                               1-2-3-4-5-6-7-8
                                                               6-12-13
                                                               1-2-3-4-5
                                                               1-2-3-4
                                                               1-2-3-4-5-6
                                                               1-2-3
                                                               1-2-3-4-5-6-7


                                        11
                     12

                                            10     9
            13        4         3

                            1           2
                 5                                                 Output
                                7       8                           4
                                                                    dummy4
                                                                    5Add 3 10
                                                               Add7,Add 6, Add 7
                                                               Add


  if
  ActiveList.RemoveFullVertices();
  e := ActiveList.focus.FreeEdge(); current focus
  pickMesh;
  whilean unvisited triangle //mesh// of Mesh; full vertices
        Mesh.HasBoundary()Input if // next exhausted
                       //
- getActiveList.focus.Full() (v1,v2,v3)removefree edge in c. clockwise order
- declare Stack; := Mesh.GetBoundaryLoop();lastCatchvertex along edge e
  ActiveList.Add(v1,v2,v3);ActiveList.focus.NextNeighbor() //removal
  u - VertexList
    :=-ActiveList.focus.Neighbor(e);// focus// triangle for moveloops
        ActiveList.focus =Stack of active lists
                       //            //the
                                        neighboring all removed
                                             just marked boundary focus
  output(“addu(dummy, VertexList.size);all // Create dummy vertex
  if-u.Free() %d add
      Vertex            add %d”, active list
                                    //      v2.degree, Mesh are visited
- declare ActiveList;%d// Currentv1.degree,triangles ofv3.degree);
  ActiveList.focusVertexList);
    - Mesh.Add(u, := // Boundary loop vertexes
      ActiveList.Add(u); Stack.push(ActiveList);
                                            // Connect This is always possible
- declare VertexList; v1;output(“add %d”, u.degree); //them together
             TG Encoding Algorithm: Output
                  Output command sequence:

                   Add 7, Add 6, Add 7, Add 5, Add 4
                   Add dummy 10
                   Add 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


  University of
British Columbia
                 TG Decoding Example
Mesh                                                                Stack
                                    6                          4-5-6-12-13
                                                               4-5-6-12
                                                               3-4-5-6-12
                                                               3-4-5-6-9-10-11
                                                               3-4-5-6-9-10
                                                               2-3-4-5-6-9-10
                                                               2-3-4-5-6-9
                                                               2-3-4-5-6
                                                               1-2-3-4-5-6-7-8
                                                               6-12-13
                                                               1-2-3-4
                                                               1-2-3
                                                               1-2-3-4-5
                                                               1-2-3-4-5-6
                                                               1-2-3-4-5-6-7


                                        11
                     12

                                            10     9
            13        4         3

                            1           2
                 5                                                 Input
                                                                   Output
                                7       8                            EOF35
                                                                     Add 4
                                                                    dummy 10
                                                               Add7,Add 6, Add 7
                                                               Add


- getActiveList.focus.Full() (v1,v2,v3)removefree full c. clockwise order
  e
  if:= ActiveList.focus.FreeEdge(); next
  ActiveList.RemoveFullVertices();//currentMesh;
  e:=ActiveList.focus.FreeEdge();if // offreeexhausted vertices
  whilean unvisited triangle //encoded meshfocus edge in c. clockwise order
  pickinput;EOF
        not
        Mesh.HasDummy()// Input         handle edge in
                                     // next   boundaries
- declareu(degree);of vertices (v1,v2,v3);listsdummyvertexwithmove given degree
  u--Vertexdegrees Mesh.GetDummy(); //the last vertex u,removed
  DummyVertex u(degree);
  VertexActiveList.focus =Stack of//// focusnew triangle for removal
  ActiveList.Add(v1,v2,v3);ActiveList.focus.NextNeighbor() along edge e
    :=readStack;
      -ActiveList.focus.Neighbor(e); create just marked
            dummy:=    //          active
                                        pick a
                                        neighboring vertex// the focus
- declare ActiveList;%dv3); // catch// all triangle ofv3.degree); predecessor
  if-Mesh.Remove(dummy);add %d”, v1.degree,triangles andMeshand its
  ActiveList.Add(u);
  output(“add %d add
   - u.Free()
      Mesh.Add(v1, v2, // Current activeremovebetween focus are visited edges
                                  // first v2.degree,
                                     // list dummy
                                     insert u            all its incident
  Mesh.Add(u);
    - ActiveList.Add(v1,v2,v3); ActiveList.focusmesh // This is alwaysedges
      ActiveList.Add(u); Stack.push(ActiveList);:= to have two more possible
                                  // update the
- ActiveList.focus := v1;output(“add %d”, u.degree);v1; Stack.Push(ActiveList);
                 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                               2
                           2                                             1
                                   3           “split 6”                         1
     1                1                                    1                                 Second
                          21                                           10 1
                                                                        21                   Cut
                                                                                             Border


         3                                 1                   3                         1


                           2                                             2

  University of
British Columbia
             More TG Special Cases
                  Genus > 0: Merge operation required
                      Occurs when two
                       different cut-borders
                       intersect




                  Non-manifolds: Cut into manifold pieces


  University of
British Columbia
             Typical Command Distribution




                      Coded to 2.0 bits/vertex

  University of
British Columbia
             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




  University of
British Columbia
                   Lower Bound on Connectivity Coding
                   Performance

                  Theorem (Tutte, 1960): Asymptotically (as
                   n ) number of different planar
                   triangulations on n vertices tends to

                        n  1
                             16
                                          
                                   3 n  2 256 n1
                                  2
                                         5

                                           27
                  Entropy of this (uniform) distribution per
                   vertex is

                      log2 n 
                          n
                                       
                                  log2 256  3.24...
                                        27
                                                        bits/vertex
  University of
British Columbia

								
To top