prev

next

out of 22

Published on

02-Aug-2016View

214Download

1

Embed Size (px)

Transcript

<ul><li><p>GeoInformatica 4:1, 6788 (2000)</p><p># 2000 Kluwer Academic Publishers. Printed in The Netherlands.</p><p>Compressing Triangulated Irregular Networks</p><p>LEILA DE FLORIANI, PAOLA MAGILLO AND ENRICO PUPPO</p><p>Dipartimento di Informatica e Scienze dellInformazione, Universita` di Genova, Via Dodecaneso, 3516146Genova (Italy)</p><p>Received March 30, 1999; Revised October 25, 1999; Accepted October 25, 1999</p><p>Abstract</p><p>We address the problem of designing compact data structures for encoding a Triangulated Irregular Network</p><p>(TIN). In particular, we study the problem of compressing connectivity, i.e., the information describing the</p><p>topological structure of the TIN, and we propose two new compression methods which have different purposes.</p><p>The goal of the first method is to minimize the number of bits needed to encode connectivity information: it</p><p>encodes each vertex once, and at most two bits of connectivity information for each edge of a TIN; algorithms for</p><p>coding and decoding the corresponding bitstream are simple and efficient. A practical evaluation shows</p><p>compression rates of about 4.2 bits per vertex, which are comparable with those achieved by more complex</p><p>methods. The second method compresses a TIN at progressive levels of detail and it is based on a strategy which</p><p>iteratively removes a vertex from a TIN according to an error-based criterion. Encoding and decoding algorithms</p><p>are presented and compared with other approaches to progressive compression. Our method can encode more</p><p>general types of triangulations, such as those constrained by topographic features, at the cost of a slightly longer</p><p>bitstream.</p><p>Keywords: triangulated irregular networks, geometric compression, terrain modeling, data structures</p><p>1. Introduction</p><p>Huge terrain datasets are increasingly available in GIS. This fact gives rise to challenging</p><p>problems in storage, transmission, and visualization of terrain models. In particular, the</p><p>design of compact structures for encoding a terrain model as a sequential bitstream isimportant to reduce the amount of time needed to transmit it over a communication line</p><p>(e.g., through Internet), to save disk storage space or to load a terrain from disk into</p><p>memory.</p><p>While regular grids can be compressed through techniques similar to those used for</p><p>compressing images [16], this is not true for Triangulated Irregular Networks (TINs). For</p><p>TINs, the problem is different and more involved. While the connecting structure of a grid</p><p>is fixed, the triangulation at the basis of a TIN is not uniquely defined by its vertices, and</p><p>thus it must be encoded explicitly. Such triangulation is usually the result of some</p><p>specialized algorithm which takes into account issues such as preservation of terrain</p><p>features, interpolation of isolines, minimization of the approximation error, etc., and</p><p>typically uses extra knowledge beside the position of vertices. Thus, it is not reasonable to</p><p>encode just the vertices of a TIN, and recompute the underlying triangulation each time the</p><p>TIN is loaded or received.</p></li><li><p>The study of techniques for producing compressed formats of triangle meshes (and, in</p><p>particular, of TINs), generally referred to as geometry compression, has gained increasingattention in the last few years because of the widespread use of TINs as terrain models.</p><p>The problem of TIN compression involves two complementary tasks, which can be</p><p>studied independently:</p><p> Compression of the vertices, i.e., of the numerical information attached to each vertexof the TIN (location, elevation and, possibly, attributes).</p><p> Compression of connectivity, i.e., of information describing the triangles of the TIN astriplets of vertices, and of adjacency information between pairs of triangles.</p><p>Compression of vertices and of connectivity involve different problems and different</p><p>techniques. Thus, they can be treated separately. Vertex compression has been treated by</p><p>some authors [3], [8], [18] by using combinations of lossy methods based on quantization</p><p>and lossless methods based on entropy encoding.</p><p>In this paper, we do not address vertex compression, while we focus on compression</p><p>schemes for TIN connectivity. We propose two compression methods. The first method is</p><p>based on traversing a TIN in a shelling order (i.e., radially around a seed triangle); itencodes each vertex exactly once, and guarantees less than two control bits for each edge</p><p>to encode connectivity. The second method compresses a TIN at progressive levels of</p><p>detail and is based on a strategy which iteratively removes a vertex from a TIN according</p><p>to an error-based criterion. Both methods encode both the triangles of a TIN and their</p><p>adjacency relations directly in the bitstream.</p><p>This paper is organized as follows: in Section 2, we provide a brief survey of existing</p><p>techniques for compressing connectivity; in Section 3, we describe our compression</p><p>method based on shelling; in Section 4, we present our method for progressive</p><p>compression. Section 5 contains some concluding remarks.</p><p>2. Previous work</p><p>Our review of existing literature is focused on methods for compression of connectivity.</p><p>We do not address here methods for vertex compression.</p><p>ATIN is usually maintained (both on disk and in main memory) in an indexed format: alist of vertices and a list of triangles are maintained and the connecting structure of the TIN</p><p>is described by providing three vertex references for each triangle. Since the number of</p><p>triangles in a TIN is roughly twice the number of vertices and since a vertex reference</p><p>requires log n bits for a TIN with n vertices, such a scheme requires at least 6n log n bits.The indexed format can be extended to encode triangle-to-triangle adjacencies by adding,</p><p>for each triangle, the references to its three adjacent triangles. The total number of bits in</p><p>this case raises to 12n log n 6n. In the following we will refer to such structure as theexplicit encoding for a TIN, and we will use it as a reference for evaluating theperformance of compression methods.</p><p>68 DE FLORIANI, MAGILLO, AND PUPPO</p></li><li><p>Techniques for compression of connectivity information of a TIN can be roughlyclassified into:</p><p> Direct methods, which are aimed at minimizing the number of bits needed to encode agiven TIN as it is. The bitstream must be read and processed completely by a</p><p>decompression algorithm in order to obtain a description of the TIN.</p><p> Progressive methods, which encode a coarse TIN representation and a sequence ofdetails which must be added to it in order to recover the initial TIN. In this case, an</p><p>interrupted bitstream provides an approximation of the terrain at a lower resolution.</p><p>Several compression methods proposed in the literature are not restricted to TINs but</p><p>they have been developed for triangle meshes representing free-form surfaces in 3-D</p><p>space. Thus, in our literature survey we sometimes refer to triangle meshes rather than to</p><p>TINs.</p><p>2.1. Direct methods</p><p>Classical direct methods proposed in the literature are based on the decomposition of a</p><p>triangle mesh into triangle strips, or generalizations of triangle strips [3], [8][9]. Suchmethods are especially well-suited for visualization, but less to TIN transmission or</p><p>encoding on disk because they do not provide the full mesh topology.</p><p>A triangle strip is a path of triangles with alternated left and right turns; it is simplyspecified by listing the vertices of its triangles in a zig-zag order (see figure 1 (a)); each</p><p>vertex appears only once in the sequence. A drawback of this simple structure is that a</p><p>triangle mesh in general cannot be decomposed into strips with alternating left and right</p><p>turns [9].</p><p>A more general form of strip is given by so-called generalized triangle strips, whichrepresent standard technology in graphics packages. In this case we do not have a zig-zag</p><p>Figure 1. (a) A triangle strip; the corresponding vertex sequence is 0,1,2,3,4,5,6,7. (b) A generalized trianglestrip; dashed arrow correspond to turns in the same direction as the previous one in the sequence; the</p><p>corresponding vertex sequence with vertex replication is 0,1,2,3,4,2,5,4,6,7,8,9,7,10,11.</p><p>COMPRESSING TRIANGULATED IRREGULAR NETWORKS 69</p></li><li><p>sequence, but each new vertex may correspond either to a right or to a left turn in the</p><p>pattern (see figure 1 (b)). The encoding bitstream either uses a binary code, called a</p><p>swapcode, to specify how to connect each new vertex to the last encoded triangle, or it</p><p>repeats the vertex in case of two successive turns with the same orientation occur (see</p><p>figure 1 (b)). A drawback is that several strips are necessary to cover a triangle mesh and</p><p>vertices shared by more than one strip must be replicated.</p><p>On average each vertex appears twice in the resulting bitstream. It has been shown [9]</p><p>that the problem of generating a minimum number of strips is NP-complete. Evans et al.</p><p>[9] give several heuristics in which they try to maximize the number of triangles per strip,</p><p>to minimize swaps, to avoid strips formed by just one triangle.</p><p>Other methods [1], [8] also allow reusing more of the past vertices than the last two ones</p><p>(as in generalized triangle strips), by storing the last k vertices in a buffer; small codesindicating how to operate on such a buffer are interleaved in the bitstream. Deering [8]</p><p>proposes a buffer of 16 positions and a syntax for the encoding, giving rise to the so-called</p><p>generalized meshes. Bar-Yehuda and Gotsman [1] studied the extent to which we canincrease the buffer size to reduce vertex duplication. They also show that the problem of</p><p>minimizing the buffer size for a given mesh is NP-hard. Chow [3] gave algorithms for</p><p>building generalized meshes which try to optimize the use of the buffer through heuristics.</p><p>Compression rates are about 11 bits of connectivity information per vertex in [3], [8] and</p><p>from 2.5 to 7 in [9].</p><p>Methods based on triangle strips and their variants provide just a description of triangles</p><p>and not of their mutual topological relations. Thus, if the decoded TIN must undergo</p><p>operations that require adjacency relations (e.g., computation of visibility information,</p><p>paths, drainage networks), these should be reconstructed separately with an extra cost.</p><p>Other methods allow reconstruction of adjacency relations from the encoding bitstream</p><p>[7], [19]. Our method presented in Section 3 belongs to this second class.</p><p>Topological surgery by Taubin and Rossignac [18] cuts a triangle mesh along a set ofedges that correspond to a spanning tree of vertices; such tree is determined by selecting</p><p>the minimum number of edges which connect all the vertices. If we imagine cutting the</p><p>given TIN along the edges of the vertex spanning tree, we obtain another TIN which</p><p>contains the same triangles as the original one, and whose dual graph is structured as tree,</p><p>thus forming a spanning tree of triangles of the original TIN (see figure 2).</p><p>The triangle spanning tree can be decomposed into a collection of triangle strips, called</p><p>runs. Runs are connected through branching triangles, each of which connects three runs.The bitstream produced by the method consists of the vertex and of the triangle</p><p>spanning trees. A rather complex algorithm permits to reconstruct the original TIN.</p><p>Through experiments on manifold meshes Taubin and Rossignac show a compression of 4</p><p>bits per vertex on average. The method produces longer strips than the previously</p><p>discussed ones; it requires that all vertices are kept in main memory during both</p><p>compression and decompression; both the coding and the decoding algorithms perform</p><p>consistent graph manipulation and are not easy to implement.</p><p>The method by Touma and Gotsman [19], unlike the previous ones, encodes triangleadjacencies directly in the bitstream. The compression algorithm maintains an active listof edges bounding a (not necessarily simply-connected) polygon which separates triangles</p><p>70 DE FLORIANI, MAGILLO, AND PUPPO</p></li><li><p>already encoded (located inside the polygon) from triangles that have still to be to coded</p><p>(located outside). At each step, the polygon is enlarged by encoding all triangles lying</p><p>outside it which are incident in one of its vertices. The decompression algorithm works in a</p><p>completely similar way.</p><p>The resulting bitstream contains each vertex once, and three types of commands: ADD,</p><p>SPLIT and MERGE, where the first two commands have one argument and the third</p><p>command has two arguments. The argument of ADD is the degree d of a new vertex to beinserted (i.e., the number of triangles incident in such vertex), the arguments of SPLIT and</p><p>MERGE are integer numbers with the meaning of indexes and offsets; such commands</p><p>mark those points at which the number of boundary curves of the current polygon</p><p>increases by splitting one curve into two, or decreases by merging two curves into one,</p><p>respectively. With the exception of MERGE operations (which are rare), the compression</p><p>and the decompression algorithms run in linear time in the number of mesh edges. Details</p><p>about the complexity of MERGE are not provided in [19].</p><p>The method generates an ADD command for each vertex of the mesh. The number of</p><p>SPLIT and MERGE commands depends on the mesh. The authors do not report any</p><p>evaluation of the number of SPLIT or MERGE commands that can occur: they just</p><p>observe that MERGE commands can occur only for meshes of positive genus (i.e., 3-D</p><p>surfaces with through holes), and thus not for terrains.</p><p>If we assume that the degree of any vertex is less than b, the compressed sequencerequires at least 2 log b bits per vertex: two bits for the command (since we have threepossible commands) and log b bits for the degree: for instance, 5 and 6 bits, respectively, ifb 8 or if b 16. The bits necessary to represent possible SPLIT and MERGEcommands add to these. Touma and Gotsman observe that the sequence of codes can be</p><p>compressed further. Since the average degree of a vertex is 6, there is a spread of degrees</p><p>around this value; moreover, there are easily long subsequence repeating the same</p><p>commands and the same arguments. Thus, they use entropy coding combined with run</p><p>length encoding, getting experimental compression rates from 0.2 to 2.4 bits per vertex for</p><p>connectivity.</p><p>Figure 2. (a) A TIN; (b) the same TIN with a vertex at infinity added, and the edges of the vertex spanning treesuperimposed as thick lines; (c) the triangle spanning tree (the dashed lines denote triangles incident in the</p><p>vertex at infinity).</p><p>COMPRESSING TRIANGULATED IRREGULAR NETWORKS 71</p></li><li><p>2.2. Progressive methods</p><p>Progressive methods encode a coarse approximation of a mesh and a sequence ofmodifications which incrementally refine it into the original mesh [12][13], [17]. An</p><p>interrupted bitstream provides an approximation of the whole terrain, which can be seen as</p><p>a form of lossy compression. Progressive compression methods are especially useful formesh transmission or as compact formats for secondary storage since they allow a trade-</p><p>off between loading/transmission time and loss of accuracy. This additional feature is paid</p><p>with compression rates that are usually lower than those of direct methods.</p><p>The...</p></li></ul>