Three-dimensional grid lossless coding and decoding method and device
By combining repeating points and splitting non-manifold structures, combined with the Edgebreaker algorithm, the three-dimensional grid is destructively encoded and decoded, which solves the problem of low coding efficiency of non-manifold structures in the existing technology, and realizes the efficient losslessness of the three-dimensional grid Encoding and decoding.
Patent Information
- Application Number
- CN202310806432.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-03
- Publication Date
- 2025-01-03
AI Technical Summary
The existing three-dimensional grid coding technology, especially the Edgebreaker-based method, cannot loserless encoding of 3-dimensional grids with non-manifold structures, resulting in a decrease in encoding efficiency and the output grids during decoding, which cannot be completed. And efficient lossless coding.
A lossless encoding method of three-dimensional mesh is proposed. By combining repeated points and splitting non-manifold structures, the non-manifold mesh is encoded using the Edgebreaker algorithm, and the repetitive points and non-manifold structures are restored at the decoding end to realize the mesh The encoding and decoding of differential information ensures the completeness and efficiency of encoding and decoding.
Complete lossless encoding and decoding of three-dimensional grids containing repeating points and non-manifold structures is realized, which improves coding efficiency and can accurately reconstruct the original grid, which is suitable for any three-dimensional grid with different connection relationships.
Smart Images

Figure CN119254994A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of coding and decoding, and in particular relates to a three-dimensional grid lossless coding and decoding method and device. Background Art
[0002] In recent years, with the rapid development of multimedia technology, related research results have been rapidly industrialized and have become an indispensable part of people's lives. Three-dimensional models have become a new generation of digital media after audio, images, and videos. Three-dimensional grids and point clouds are two commonly used ways to represent three-dimensional models. Compared with traditional multimedia such as images and videos, three-dimensional grid models have stronger interactivity and realism, making them more and more widely used in various fields such as commerce, manufacturing, construction, education, medicine, entertainment, art, and military.
[0003] With the increasing demand for visual effects of 3D mesh models and the emergence of more mature 3D scanning technologies and 3D modeling software, the data size and complexity of 3D mesh models obtained by 3D scanning equipment or 3D modeling software are also growing rapidly. Therefore, how to efficiently compress 3D mesh data is the key to convenient transmission, storage and processing of 3D mesh data.
[0004] A 3D mesh often contains three main types of information: topological information, geometric information, and attribute information. Topological information, also known as connectivity information, is used to describe the connection between elements such as vertices and patches in the mesh; geometric information is the 3D coordinates of all vertices in the mesh; attribute information records other information attached to the mesh, such as normal vectors, texture coordinates, and colors. The compression of 3D mesh data is often based on the compression of these three types of information according to their data characteristics. In addition, for 3D meshes with texture maps, the texture maps also need to be compressed.
[0005] Draco is a library for compressing and decompressing 3D geometric meshes and point clouds released by the Google Chrome team in January 2017. It aims to improve the storage and transmission of 3D graphics and greatly accelerate the encoding, transmission and decoding of 3D data. Draco supports the compression of 3D mesh geometry information, connection relationship information and attribute information. Draco supports lossy mode and near-lossless mode. When Draco is lossy encoding, it will first filter out duplicate points in the geometry information and attribute information, so that each duplicate point is only encoded once; while in the near-lossless mode, duplicate points are not filtered out, and each duplicate point is encoded multiple times, which leads to a decrease in the encoding efficiency of Draco's near-lossless mode. In addition, the Edgebreaker method used by Draco when encoding connection relationships is currently one of the most efficient methods for encoding 3D mesh connection information. However, Edgebreaker requires the mesh to be encoded to be a manifold structure. For meshes with non-manifold structures, Draco must split them into manifold structures to encode them correctly. However, Draco does not merge the split structures at the decoding end, which makes the mesh output by the decoding end have more split points than the original mesh input by the encoding end. This will cause Draco to be unable to losslessly encode such meshes with non-manifold structures.
[0006] MPEG, the international standards organization for video image neighborhood, is developing a new dynamic 3D mesh compression standard V-DMC. Currently, it also chooses to adopt an Edgebreaker-based solution when encoding static 3D meshes and temporarily reuses the Draco codec. At the same time, MPEG is also trying to implement the Edgebreaker-based 3D mesh codec provided by MPEG to achieve compression of 3D mesh geometry information, connection information, and attribute information. In the currently proposed solution, it supports lossy mode and lossless mode. In lossy mode, duplicate points in geometry information and attribute information are first filtered out, so that each duplicate point is encoded only once; in lossless mode, duplicate points are not filtered out, and each duplicate point is encoded multiple times, which leads to a decrease in coding efficiency in lossless mode.
[0007] Therefore, a new Edgebreaker-based lossless coding method is proposed, which can realize arbitrary three-dimensional meshes with repeated points, non-manifold structures, and different connection relationships between geometric information and attribute information. It is of great significance to realize lossless coding of three-dimensional meshes completely and with higher coding efficiency. Summary of the invention
[0008] In order to solve the above problems existing in the prior art, the present invention provides a three-dimensional grid lossless encoding and decoding method and device. The technical problem to be solved by the present invention is achieved through the following technical solutions:
[0009] In a first aspect, an embodiment of the present invention provides a three-dimensional mesh lossless encoding method, which is applied to an encoding end, and the method includes:
[0010] Encode the three-dimensional grid to obtain a coded information code stream;
[0011] Decoding the coded information code stream to obtain a reconstructed three-dimensional grid;
[0012] The three-dimensional grid is compared with the reconstructed three-dimensional grid to obtain grid difference information, and the grid difference information is encoded to obtain a grid difference information code stream.
[0013] In a second aspect, an embodiment of the present invention provides a three-dimensional grid lossless encoding device, the device comprising:
[0014] An encoding module, used for encoding the three-dimensional grid to obtain an encoding information code stream;
[0015] A decoding module, used for decoding the coded information code stream to obtain a reconstructed three-dimensional grid;
[0016] The comparison module is used to compare the three-dimensional grid with the reconstructed three-dimensional grid to obtain grid difference information, encode the grid difference information, and obtain a grid difference information code stream.
[0017] In a third aspect, an embodiment of the present invention provides a three-dimensional grid lossless decoding method, which is applied to a decoding end, and the method includes:
[0018] Decode the coded information code stream to obtain a reconstructed three-dimensional mesh;
[0019] Decode the grid difference information code stream to obtain the grid difference information;
[0020] A decoded three-dimensional grid is obtained based on the reconstructed three-dimensional grid and the grid difference information.
[0021] In a fourth aspect, an embodiment of the present invention provides a three-dimensional mesh lossless decoding device, the device comprising:
[0022] A coding information decoding module, used for decoding the coding information code stream to obtain a reconstructed three-dimensional grid;
[0023] A grid difference information decoding module is used to decode the grid difference information code stream to obtain the grid difference information;
[0024] The decoded three-dimensional grid generation module is used to obtain a decoded three-dimensional grid based on the reconstructed three-dimensional grid and the grid difference information.
[0025] Beneficial effects of the present invention:
[0026] The three-dimensional mesh lossless encoding method provided in the embodiment of the present invention first encodes the three-dimensional mesh to obtain an encoding information code stream; secondly, decodes the encoding information code stream to obtain a reconstructed three-dimensional mesh; finally, compares the three-dimensional mesh with the reconstructed three-dimensional mesh to obtain mesh difference information, encodes the mesh difference information, and obtains a mesh difference information code stream. The embodiment of the present invention can process mesh data with special circumstances, such as the need to add vertices, delete vertices, or adjust connection relationships, by comparing the three-dimensional mesh with the reconstructed three-dimensional mesh and encoding mesh difference information, thereby achieving complete lossless encoding of the three-dimensional mesh.
[0027] Furthermore, the embodiments of the present invention can achieve more efficient encoding of the mesh by merging repeated points and mesh encoding and decoding and restoring repeated points, and can achieve lossless encoding of the non-manifold mesh using the Edgebreaker algorithm by splitting the non-manifold structure and mesh encoding and decoding and restoring the non-manifold structure. In summary, the embodiments of the present invention can achieve complete and lossless mesh encoding when encoding any mesh containing repeated points, non-manifold structures, geometric information and attribute information with different connection relationships.
[0028] The three-dimensional mesh lossless decoding method provided in the embodiment of the present invention first decodes the coded information bitstream to obtain a reconstructed three-dimensional mesh; then decodes the mesh difference information bitstream to obtain mesh difference information; and finally obtains a decoded three-dimensional mesh based on the reconstructed three-dimensional mesh and the mesh difference information. The embodiment of the present invention obtains a decoded three-dimensional mesh based on the reconstructed three-dimensional mesh and the mesh difference information, and can accurately reconstruct the original mesh and achieve lossless decoding for mesh data with special circumstances, such as the need to add vertices, delete vertices, or adjust connection relationships.
[0029] Furthermore, the embodiments of the present invention can achieve lossless decoding for grids containing repeated points, non-manifold structures, etc. through grid decoding, recovery of non-manifold structures, and recovery of repeated points. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 This is a diagram of the five modes of Edgebreaker;
[0031] Figure 2 This is a schematic diagram of the vertex traversal process and operation mode string in Edgebreaker;
[0032] Figure 3 A schematic diagram of a process flow of a three-dimensional mesh lossless encoding method provided by an embodiment of the present invention;
[0033] Figure 4 A schematic diagram of a three-dimensional grid lossless coding framework proposed in an embodiment of the present invention;
[0034] Figure 5 A schematic diagram of a grid coding framework according to an embodiment of the present invention;
[0035] Figure 6 A schematic diagram of manifold mesh edges and diagonals according to an embodiment of the present invention;
[0036] Figure 7 A schematic diagram of a Corner relationship, i.e., an angle relationship, according to an embodiment of the present invention;
[0037] Figure 8 This is a diagram of the judgment conditions and traversal rules of the five modes of CLERS;
[0038] Fig. 9 Schematic diagram of a parallelogram prediction coding algorithm used in geometric information coding in an embodiment of the present invention;
[0039] Fig.10 It is a schematic diagram of UV coordinate prediction based on three-dimensional to two-dimensional projection in attribute information encoding in an embodiment of the present invention;
[0040] Fig.11 A schematic diagram of the structure of a three-dimensional grid lossless encoding device provided by an embodiment of the present invention;
[0041] Fig.12 A schematic diagram of a process flow of a three-dimensional mesh lossless decoding method provided by an embodiment of the present invention;
[0042] Fig.13 A schematic diagram of a three-dimensional grid lossless decoding framework proposed in an embodiment of the present invention;
[0043] Fig.14 A schematic diagram of a grid decoding framework according to an embodiment of the present invention;
[0044] Fig.15 A schematic structural diagram of a three-dimensional grid lossless decoding device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0045] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0046] In order to facilitate understanding of the embodiments of the present invention, the relevant prior art is first briefly introduced.
[0047] (I) 3D mesh compression tool based on Edgebreaker provided by MPEG
[0048] The Edgebreaker-based 3D mesh compression tool currently provided by MPEG encodes and stores the connection information, geometric information and attribute information of the 3D mesh separately. The core module, i.e. the module for encoding the connection information, uses the Edgebreaker algorithm. Conventional compression methods are used for encoding the geometric information and attribute information, i.e. data quantization, predictive compression (such as parallelogram prediction) and entropy coding. Since the tool adopts a connection relationship driven coding method, the coding of geometric information and attribute information will follow the coding order of the connection information. In this way, the vertex order of the connection relationship coding is implicitly included in the vertex order of the geometric information to avoid the separate transmission of the vertex order of the connection relationship coding, thereby saving this part of the bit overhead.
[0049] (2)Edgebreaker
[0050] The Edgebreaker method (EB for short) is a 3D mesh connection relationship coding method with good compression performance, easy implementation, and the ability to provide an upper limit for compression ratio. The Edgebreaker method itself only describes the compression method for 3D mesh connection information, and the compression of 3D meshes can only be achieved through geometric information compression and entropy coding.
[0051] Edgebreaker encoding technology can compress triangular meshes that are homeomorphic to the sphere to 2 bits or less per triangle. The encoding algorithm uses five different modes (called C, L, E, R, and S) to access each triangle of the mesh in depth-first order. Each triangle is marked according to the mode it is in, and a CLERS string is generated to obtain a compact representation of the mesh connectivity.
[0052] The five modes of the Edgebreaker method are: Figure 1As shown. The Edgebreaker method divides the mesh into a traversed part and an untraversed part, and the boundary between the two parts is called the active boundary. In the Edgebreaker encoding process, the triangle to be traversed is accessed through the active edge on the active boundary, and the mode to be used is selected according to the relationship between the active edge and the triangle in which it is located. The other vertex in the triangle where the active edge is located is called the third vertex. If the third vertex is not on the active boundary, the current triangle is marked as C mode. If the third vertex is on the active boundary and is the next vertex of the current active edge vertex in counterclockwise order, the current triangle is marked as R mode. If the third vertex is on the active boundary and is the previous vertex of the current active edge vertex in counterclockwise order, the current triangle is marked as L mode. If the third vertex is on the active boundary and is both the previous vertex of the current active edge vertex and the next vertex of the current active edge in counterclockwise order, the current triangle is marked as E mode. If the third vertex is on the active boundary, but is neither the previous vertex of the current active edge vertex nor the next vertex of the current active edge in counterclockwise order, the current triangle is marked as S mode.
[0053] After marking a triangle each time, the active boundary is updated and the next active edge is selected according to certain rules. After traversing all triangles, the obtained CLERS string is entropy encoded to obtain higher compression efficiency.
[0054] Figure 2 A schematic diagram of a two-dimensional grid using EB coding is given. According to the coding rule of EB, the final entropy coded mode codeword is CCRRSLCRSERRELCRRRCRRRE.
[0055] However, since the five modes of the Edgebreaker method cannot process non-manifold meshes, the mesh must be converted into a manifold mesh before using the Edgebreaker method.
[0056] In view of the above defects, the embodiments of the present invention provide a three-dimensional mesh lossless encoding method and device based on Edgebreaker, and correspondingly propose a three-dimensional mesh lossless decoding method and device.
[0057] It should be noted that the execution subject of the 3D mesh lossless encoding method / device and the 3D mesh lossless decoding method / device provided in the embodiments of the present invention can be run in an electronic device, wherein the electronic device can be a server or a terminal device, but is not limited thereto.
[0058] In a first aspect, an embodiment of the present invention provides a three-dimensional grid lossless encoding method, which is applied to an encoding end, such as Figure 3As shown, the method includes:
[0059] Scode1, encodes the three-dimensional grid to obtain the encoded information code stream;
[0060] Scode2, decodes the coded information stream to obtain the reconstructed 3D mesh;
[0061] Scode3 compares the three-dimensional mesh with the reconstructed three-dimensional mesh to obtain mesh difference information, encodes the mesh difference information, and obtains a mesh difference information code stream.
[0062] Each step is described below.
[0063] In order to facilitate a clear understanding of the solution of the embodiment of the present invention, a three-dimensional grid lossless coding framework is exemplarily given below. Figure 4 The coding framework may include processing steps such as merging duplicate points, splitting non-manifold structures, grid coding, grid decoding, restoring non-manifold structures, restoring duplicate points, comparing grids, encoding grid adjustment information, and encoding texture maps. It should be noted that the coding framework of the embodiment of the present invention may also include other processing steps required for coding such as adding virtual points, which are not specifically limited here. Figure 4 The input mesh in is a three-dimensional mesh. Among them, merging duplicate points and splitting non-manifold structures can be combined as preprocessing. Figure 4 Some processing steps such as preprocessing may not necessarily exist, and the specific decision needs to be made based on the actual situation of the input three-dimensional grid.
[0064] For Scode1, the encoding three-dimensional grid can correspond to Figure 4 The process from preprocessing to grid coding. The coded information code stream can correspond to Figure 4 The grid code stream in .
[0065] In an optional implementation manner, encoding the three-dimensional grid may include:
[0066] Encode the geometric connectivity, geometric information and attribute connectivity of 3D meshes.
[0067] For easier understanding, see Figure 5 The schematic diagram of the mesh coding framework is shown in FIG. Among them, encoding geometric connection relationship and encoding attribute connection relationship belong to connection relationship coding, and encoding geometric information belongs to geometric information coding. Of course, the processing steps of encoding three-dimensional mesh in the embodiment of the present invention are not limited to those shown above, for example, it can also include Figure 5The attribute information encoding and non-manifold structure information encoding in the 3D mesh are provided. It should be noted that the embodiment of the present invention does not limit the order of encoding the connection relationship of the three-dimensional mesh and the encoding of other information. It can be that the geometric information, attribute information and non-manifold structure information are encoded while encoding the connection relationship; or it can be that after the connection relationship is encoded, the geometric information, attribute information and non-manifold structure information are encoded in sequence according to the connection relationship encoding order. This is all reasonable. Moreover, when encoding the geometric information and attribute information of the vertices, the geometric information and attribute information of the repeated points generated by the non-manifold splitting can be encoded only once or multiple times. The encoding method of the geometric information and attribute information of the repeated points generated by the non-manifold splitting is not limited here. Please refer to the following description for details.
[0068] The attribute information in this embodiment is illustrated by texture coordinates (UV coordinates), and the attribute vertices can also be described as texture vertices or UV vertices. The UV in the embodiment can also be described as a texture, that is, an example of the attribute information.
[0069] The following, Figure 4 Each processing step is described separately.
[0070] (1) Merge duplicate points
[0071] In a 3D mesh, there are vertices with the same geometric coordinates but different texture coordinates at the texture boundary, which leads to a large number of geometric duplicate points in the mesh. Therefore, filtering out geometric duplicate points can significantly improve the coding efficiency of geometric information.
[0072] In the embodiment of the present invention, the process of encoding geometric information of a three-dimensional grid may include:
[0073] When there are geometrically duplicated points in the three-dimensional grid, the three-dimensional grid is processed by merging the duplicated points to obtain a de-duplicated grid;
[0074] Based on whether the merging duplicate points process has been performed, information indicating whether the merging duplicate points process has been performed is obtained and encoded.
[0075] See also Figure 4 In the process of merging duplicate points, the above process can include:
[0076] First, for the input mesh, it is necessary to determine whether there are any geometric duplicate points. Specifically, the correspondence between the geometric vertex index and the coordinate value is established; all vertices are traversed, and when multiple geometric vertices have the same coordinate values, it means that these vertices are geometric duplicate points.
[0077] Secondly, when there are geometric duplicate points, the duplicate points are merged, that is, the geometric duplicate points are filtered out. Specifically, multiple duplicate geometric vertices are merged into one vertex, and the corresponding vertex indexes in the connection relationship are adjusted.
[0078] Finally, based on whether the merged duplicate points processing has been performed, information indicating whether the merged duplicate points processing has been performed is obtained. The information indicating whether the merged duplicate points processing has been performed can be encoded immediately or can be encoded later, such as encoding in the processing link such as geometric information encoding, which is not limited here. Among them, the information indicating whether the merged duplicate points processing has been performed can be an identifier, such as an identifier represented by a value of 0 or 1, specifically 0 indicates that the merged duplicate points processing has not been performed, and 1 indicates that the merged duplicate points processing has been performed. Of course, the form of the information indicating whether the merged duplicate points processing has been performed is not limited to this.
[0079] In addition to the recorded information indicating whether the duplicate point merging process has been performed, after some duplicate points have been filtered out through the duplicate point merging process, the filtered out duplicate points can also be represented in a certain manner.
[0080] The filtered duplicate points can be represented in a variety of ways. For example, one way is to set an identifier for each vertex after filtering the duplicate points, record the number of times the current vertex is repeated, and encode the duplicate point identifier to obtain a duplicate point identifier code stream. Similarly, encoding the duplicate point identifier can be encoded immediately after obtaining it or in a subsequent encoding implementation, such as encoding in the processing link such as geometric information encoding, etc. Another way is to retain the duplicate points of texture coordinates at the encoding end, and restore the duplicate points at the decoding end with reference to the attribute connection relationship, without encoding the duplicate point identifier. The embodiment of the present invention does not limit the representation method of duplicate points.
[0081] (2) Splitting non-manifold structures
[0082] The current mesh input in the non-manifold structure splitting process can be the input mesh that has not been processed by merging duplicate points, or the mesh that has been processed by merging duplicate points. The current mesh may have non-manifold points and non-manifold edges, and it needs to be converted into a manifold mesh. For details, see Figure 4 The process of splitting the non-manifold structure processing link and encoding the connection relationship of the three-dimensional grid can include:
[0083] 1) Before splitting the non-manifold structure, it is necessary to determine whether the geometric information and attribute information in the current grid have the same connection relationship, and record and encode the information indicating whether the geometric information and attribute information in the grid have the same connection relationship;
[0084] Before splitting the non-manifold structure, determine whether the geometric information and attribute information in the current grid have the same connection relationship and record the information.
[0085] Taking the attribute information as UV coordinates as an example, it can be determined whether the geometric coordinates and UV coordinates in the current mesh have the same connection relationship based on whether the number of geometric vertices is consistent with the number of UV vertices, and whether the geometric triangles are consistent with the UV triangles.
[0086] Specifically, first determine whether the number of geometric vertices is consistent with the number of UV vertices. If they are consistent, then determine whether the geometric triangles are consistent with the UV triangles, that is, whether the geometric connection relationship is consistent with the UV connection relationship. If the geometric triangles are inconsistent with the UV triangles, the geometric vertices and the UV vertices have different connection relationships; if the number of geometric vertices is inconsistent with the number of UV vertices, but the number of geometric triangles is consistent with the number of UV triangles, the geometric vertices and the UV vertices also have different connection relationships. The above determination method of the embodiment of the present invention is only an example and is not a limitation, and can also be determined in other ways.
[0087] The form of the information indicating whether the geometric information and attribute information in the mesh have the same connection relationship can also be similar to the above-mentioned identifier, or it can also be indicated by whether the difference information between the attribute connection relationship and the geometric connection relationship exists. If the difference information exists, the geometric information and the attribute information have different connection relationships. If the difference information does not exist, the geometric information and the attribute information have the same connection relationship. There is no restriction on the representation form of the indication information. The encoding of the information indicating whether the geometric information and the attribute information in the mesh have the same connection relationship can be encoded immediately or in the processing link such as the connection relationship encoding.
[0088] 2) determining whether to perform non-manifold structure splitting processing on the current grid according to whether the non-manifold structure exists, recording and encoding information indicating whether the non-manifold structure splitting processing has been performed;
[0089] The embodiment of the present invention records information indicating whether the non-manifold structure splitting process has been performed. The information indicating whether the non-manifold structure splitting process has been performed can be an identifier, such as the information indicating whether the duplicate point merging process has been performed similar to the above-described information, and can also be an identifier represented by a numerical value of 0 or 1, specifically 0 indicates that the non-manifold structure splitting process has not been performed, and 1 indicates that the non-manifold structure splitting process has been performed. Alternatively, the number of non-manifold identifiers of the vertices in the mesh or the number of duplicate points generated by the splitting of the non-manifold structure can be used to represent it. If the number is 0, it means that the non-manifold structure splitting process has not been performed, and the number is greater than 0, it means that the non-manifold structure splitting process has been performed. The form of the information indicating whether the non-manifold structure splitting process has been performed is not limited here. The information indicating whether the non-manifold structure splitting process has been performed can be encoded immediately, or it can be encoded in subsequent processing links such as connection relationship encoding or non-manifold structure information encoding, which is reasonable.
[0090] It can be understood that the information indicating whether the splitting non-manifold structure processing has been performed can also be described as information indicating whether the non-manifold structure exists.
[0091] 3) After the non-manifold structure exists and has been split, the non-manifold splitting related information is recorded and encoded;
[0092] The information related to the non-manifold disassembly includes the non-manifold identification of the vertex and the index information of the duplicate points generated by the non-manifold disassembly. The encoding of the information related to the non-manifold disassembly can be performed in the non-manifold structure information encoding processing stage.
[0093] When determining that there is a non-manifold structure, according to the information indicating whether the geometric information and the attribute information in the grid have the same connection relationship, the current grid is subjected to corresponding non-manifold structure splitting processing to obtain a manifold grid; and the non-manifold splitting related information is recorded;
[0094] The splitting of non-manifold structures is achieved by adding duplicate points with the same geometric information and attribute information. When splitting non-manifolds, it is necessary to deal with the different situations according to whether the geometric information and attribute information in the current grid have the same connection relationship. Specifically:
[0095] Case 1: when determining whether there is a non-manifold structure, if the information indicating whether the geometric information and attribute information in the mesh have the same connection relationship indicates that the geometric information and attribute information in the current mesh have the same connection relationship, a process of splitting the non-manifold structure is performed on the current mesh to obtain a manifold mesh, and a set of duplicate point index information and non-manifold identifiers of vertices generated by the process are recorded;
[0096] Case 2: When determining whether a non-manifold structure is present, if the information indicating whether the geometric information and attribute information in the mesh have the same connection relationship indicates that the geometric information and attribute information in the current mesh have different connection relationships, the process of splitting the non-manifold structure is performed once on the geometric information and attribute information in the current mesh respectively to obtain a manifold mesh, and a set of repeated point index information and non-manifold identifiers of vertices generated by the non-manifold splitting process are recorded for the geometric information and attribute information respectively.
[0097] The following first describes the process of splitting non-manifold structures. The process can be divided into splitting non-manifold edges and splitting non-manifold points.
[0098] The process of splitting non-manifold edges may include A1 to A3:
[0099] A1, construct the preset data structure of the current grid;
[0100] The preset data structure includes a data structure representing the number of triangles corresponding to an edge, or a CornerTable data structure representing the relationship between vertices and angles;
[0101] A2, find the non-manifold edge of the current grid based on the preset data structure;
[0102] Specifically, the judgment condition for a non-manifold edge is that an edge exists in three or more triangles at the same time. The specific judgment method can be implemented based on the constructed preset data structure. For example, one way can be that A1 establishes a data structure to store the triangles where each edge is located, and A2 finds the non-manifold edge by querying the number of triangles corresponding to the edge; another way can be that A1 constructs a CornerTable data structure to establish the correspondence between corners and edges in the grid, and A2 uses it to find the non-manifold edge. Specifically, for a manifold grid, each edge is opposite to at most two corners, and the two opposite corners are called diagonals. Figure 6 As shown, angle a and angle d are opposite to side bc, and angle a and angle d are opposite angles; and for non-manifold edges, there will be three or more opposite angles. Therefore, non-manifold edges can also be found through the corresponding relationship between angles and edges. Of course, the determination method of non-manifold edges in the embodiment of the present invention is not limited to the above.
[0103] A3: for each non-manifold edge, create a duplicate vertex with the same geometric information and attribute information for the two vertices of the non-manifold edge; select a triangle where the non-manifold edge is located, so that the third vertex in the triangle and the two newly added vertices form a new triangle; replace the original triangle with the new triangle, and transform the non-manifold edge into a manifold edge;
[0104] This step is to add vertices and modify the connection relationship. Iterate steps A2 to A3 until all non-manifold edges in the current mesh are converted into manifold edges.
[0105] The process of splitting non-manifold points can include B1 to B3:
[0106] B1, build the CornerTable data structure of the current grid;
[0107] To split non-manifold points, you first need to build a CornerTable data structure to establish the correspondence between each vertex and the corner of the vertex.
[0108] B2, based on the correspondence between vertices and vertex angles in the CornerTable data structure, find the non-manifold points in the current grid by traversing the vertex angles;
[0109] Specifically, two steps are performed for each vertex. In the first step, starting from a certain angle of the vertex, all angles adjacent to the angle and forming a fan are traversed in turn, and the vertex and the traversed angles are marked as traversed. If there are still vertices with untraversed angles after executing the above process, it means that the vertex is a non-manifold point.
[0110] B3, for each non-manifold point, create a duplicate vertex with the same geometric information and attribute information for the non-manifold point, and modify the connection relationship; connect the untraversed corners to the newly added duplicate vertex, and split the non-manifold point into two manifold vertices; after all non-manifold points are converted into manifold points, a manifold mesh is obtained.
[0111] This step is to add vertices and modify the connection relationship. Iterate steps B2 to B3 until all non-manifold points in the current mesh are converted into manifold points.
[0112] As mentioned above, if the geometric information and attribute information in the current mesh have the same connection relationship, the above-mentioned process of splitting the non-manifold structure processing is executed once on the current mesh to obtain a manifold mesh, and a set of duplicate point index information and non-manifold identification of the vertices generated by the process are recorded; if the geometric information and attribute information in the current mesh have different connection relationships, the above-mentioned process of splitting the non-manifold structure processing is executed once on the geometric information and attribute information in the current mesh respectively to obtain a manifold mesh, and a set of duplicate point index information and non-manifold identification of the vertices generated by the non-manifold splitting process are recorded for the geometric information and attribute information respectively, that is, the CornerTable data structures of the geometric information and attribute information are constructed respectively, and the non-manifold edges of the geometric information and the non-manifold points of the geometric information are split respectively, and the non-manifold edges of the attribute information and the non-manifold points of the attribute information are split respectively, and the non-manifold identification of the geometric vertices and the non-manifold identification of the attribute vertices generated by the process, as well as the geometric duplicate point index information and the attribute duplicate point index information are recorded respectively.
[0113] The embodiment of the present invention does not limit the representation method of the repeated point index information, such as repeated point group index: points with the same index belong to the same repeated point group, that is, have the same vertex information.
[0114] (3) Grid Coding
[0115] The following combination Figure 5 Each coding step is explained.
[0116] ① Connection relationship coding
[0117] The mesh currently input in this step can be a manifold mesh, which can be obtained by splitting non-manifold structures, or can be directly input. The connection relationship encoding is implemented based on the connection relationship of the input manifold mesh.
[0118] The connection relationship encoding uses the Edgebreaker method to encode the connection information to obtain a pattern string, and then performs entropy encoding on the pattern string to achieve the encoding of the connection relationship.
[0119] This step establishes a CornerTable data structure to represent the connection relationship of the mesh, and uses CornerTable to traverse all triangles in the mesh to generate the CLERS pattern string of Edgebreaker.
[0120] CornerTable is used to represent the relationship between corners, vertices and triangles in a mesh. Before building CornerTable, you first need to number the corners, traverse the triangles in the order of the triangle patches in the mesh, and number the corners of each triangle in counterclockwise order. If the mesh has f triangle patches, then the mesh will have 3f corners. The advantage of this numbering is that the triangle number of the current corner can be calculated through the corner number, as shown in Formula 1; you can also calculate the previous corner c of the current corner c in the counterclockwise direction. p and the next angle c n The serial number is shown in Equation 2 and Equation 3.
[0121] f i =c / 3 (1)
[0122] Among them, c is the index of the current angle, f i is the serial number of the triangle where the current angle c is located, " / " is integer division, and the result is rounded down.
[0123] c p =(f i *3)+(c-1)%3 (2)
[0124] Among them, "*" is multiplication and "%" is modulo operation.
[0125] c n =(f i *3)+(c+1)%3 (3)
[0126] CornerTable consists of four parts: V, O, U, and M. The V table stores the vertex index corresponding to each corner, the O table stores the diagonal index of each corner, the U table stores the flag of whether each triangle has been traversed during the traversal process, and the M table stores the flag of whether each vertex has been traversed during the traversal process.
[0127] CornerTable can be used to construct Figure 7The relationship shown in Figure 1 is as follows: c represents the current angle, cp represents the previous angle of the current angle c (counterclockwise), and cn represents the next angle of the current angle c. co is the opposite angle of the current angle c, which can be obtained by querying the O table. ct is the serial number of the triangle where c is located, which can be calculated by formula (1). cv represents the vertex of the current angle, which can be obtained by querying the V table. cl represents the angle to the left of the current angle c, which can be obtained by querying the opposite angle of cp in the O table; cr represents the angle to the right of the current angle c, which can be obtained by querying the opposite angle of cn in the O table.
[0128] After using CornerTable to build the relationship between corners, vertices and triangles, the mesh can be traversed in a spiral order to obtain the CLERS pattern string of Edgebreaker that represents the mesh connection relationship. At this time, the judgment conditions and traversal rules of the five modes are as follows: Figure 8 As shown. The current traversed angle is x. If the vertex xv corresponding to x has not been visited, the current triangle is in C mode, and the next triangle to be traversed is the triangle where xr is located; otherwise, if the triangle where xl is located has been visited, the current triangle is in L mode, and the next triangle to be traversed is the triangle where xr is located; if the triangle where xr is located has been visited, the current triangle is in R mode, and the next triangle to be traversed is the triangle where xl is located; if the vertex xv has been visited, but the triangles where xl and xr are located have not been visited, the current triangle is in S mode, and the traversal path will generate two branches. Using the principle of depth-first traversal, the first triangle traversed is the triangle where xr is located, and the triangle where xl is located is stored in the stack. After the traversal of the branch where xr is located is completed, the triangle where xl is located is traversed; if the triangles where xl and xr are located have been visited, the mode of the current triangle is E, and the traversal has reached the end of the current traversal path branch.
[0129] Randomly select an initial triangle in the mesh, traverse the triangles in the mesh according to the above rules, and generate a CLERS pattern string. When the traversal path ends, but there are still untraversed triangles in the mesh, randomly select an untraversed triangle and start the next traversal until all triangles in the mesh have been traversed.
[0130] By using entropy coding to compress the CLERS pattern string, the final connection information code stream can be obtained, and the connection relationship coding order, that is, the vertex coding order, can also be determined.
[0131] If the information indicating whether the geometric information and the attribute information in the grid have the same connection relationship indicates that the geometric information and the attribute information in the current grid have the same connection relationship, the above connection relationship encoding process is performed once.
[0132] If the information indicating whether the geometric information and attribute information in the grid have the same connection relationship indicates that the geometric information and attribute information in the current grid have different connection relationships, it is necessary to encode the geometric connection relationship and the attribute connection relationship respectively. The embodiment of the present invention does not limit the encoding method of the attribute connection relationship. The connection relationship of the attribute coordinates can be encoded independently, or only the difference information of the attribute connection relationship relative to the geometric connection relationship can be encoded. A specific example is given for illustration. Since the number of geometric triangles and texture triangles is consistent and corresponding, but the corresponding geometric vertex index and texture vertex index are not one-to-one corresponding, it is only necessary to construct a CLERS pattern string once according to the CornerTable of the geometric information and encode it. In this case, for the texture vertex, after the pattern string encoding of each connected area of the geometric information is completed, the corners that have been traversed are traversed, and the difference information of the texture connection relationship and the geometric connection relationship is recorded and encoded according to the TC table and OTC table of the texture vertex. Among them, the TC table stores the texture vertex index corresponding to each corner in the texture triangle, and the OTC table stores each diagonal index in the texture triangle.
[0133] The connection relationship encoding may also include encoding information indicating whether the geometric information and attribute information in the grid have the same connection relationship, information indicating whether the non-manifold structure splitting process has been performed, non-manifold splitting related information, etc. The encoding method is not limited here.
[0134] After the connection relationship encoding is completed, the connection information code stream and the connection relationship encoding order can be obtained.
[0135] ②Geometric information encoding
[0136] The geometric information encoding can be realized based on the geometric information and connection relationship encoding order of the manifold mesh.
[0137] There are many methods that can be used to encode geometric information, such as a difference prediction coding algorithm, a parallelogram prediction coding algorithm, a multi-parallelogram prediction coding algorithm, etc. The embodiment of the present invention does not limit the specific encoding method.
[0138] Take the parallelogram prediction coding algorithm as an example: there are four vertices a, b, c, and d, forming Fig. 9 Two adjacent triangles in the mesh shown.
[0139] Fig. 9The geometric information of points a, b, and c has been encoded, and the geometric information of point d is to be encoded. Then, the predicted value d' of the geometric coordinates of point d can be calculated using equation (4).
[0140] d'(x,y,z)=b(x,y,z)+c(x,y,z)-a(x,y,z) (4)
[0141] Where (x, y, z) represents the geometric coordinates. After obtaining d', the difference between d' and the three-dimensional coordinates of point d is calculated, as shown in Formula 5:
[0142] Δd(x,y,z)=d(x,y,z)-d'(x,y,z) (5)
[0143] Entropy coding of Δd can obtain a geometric information code stream.
[0144] For triangles that cannot be predicted using parallelograms, such as triangles at the boundary of a mesh, the geometric information can be encoded using a difference encoding method, that is, the coordinate values of adjacent encoded vertices are used as the predicted values of the current vertex coordinates to calculate and predict the residuals.
[0145] The geometric information encoding may further include encoding information indicating whether the duplicate point merging process has been performed, duplicate point identification, etc. The encoding method is not limited here.
[0146] After the geometric information encoding is completed, the geometric information code stream and the geometric encoding order can be obtained.
[0147] ③ Attribute information encoding
[0148] Attribute information encoding can be implemented based on the attribute information and connection relationship encoding sequence of the manifold mesh.
[0149] The attribute information of a three-dimensional mesh generally includes UV coordinates, normal vectors, etc. If the mesh has attribute information such as UV coordinates, it can be encoded. Taking UV coordinates as an example, there are many encoding methods that can be used for UV coordinates, including difference prediction encoding, parallelogram prediction encoding, and similar triangle prediction encoding. The embodiment of the present invention does not limit the specific encoding method. The following is an example of a similar triangle prediction algorithm.
[0150] First, select a triangle in a three-dimensional mesh as the initial triangle, directly encode the UV coordinates of the three vertices of the initial triangle without predicting them, and store the edges of the initial triangle in an edge set. This set can be a data structure that meets certain access criteria. Then take out an edge τ from the set and predict the UV coordinates of the opposite vertex of τ in the next new triangle. And put the two sides of the new triangle except τ into the set. Let the point to be predicted be point C, the two end points of edge τ be N and P respectively, the opposite vertex of the triangle adjacent to the new triangle through τ is O, and the projection point of C on τ is X. For example Fig.10 As shown, since the UV coordinates of points N, P, and O are encoded before point C, these three points can be used to predict the UV coordinates of point C. The specific calculation process is as follows:
[0151] Let C uv , X uv , N uv , P uv , O uv are the UV coordinates of each point, C G , X G , N G , P G , O G are the geometric coordinates of each point.
[0152] First calculate the UV coordinate of point X:
[0153]
[0154]
[0155] Calculating vectors Rotated() means flipping the vector 90 degrees:
[0156]
[0157] in, Among these vectors, the vectors with G as the subscript represent the vector representation of the geometric coordinates between the corresponding points, and the vectors with UV as the subscript represent the vector representation of the UV coordinates between the corresponding points.
[0158] Finally, calculate the predicted UV coordinates of point C pred c :
[0159]
[0160]
[0161]
[0162] in, and Both represent the vectors of the UV coordinates between point C and point O, but they are expressed in different calculation methods / value forms.
[0163] After obtaining the predicted UV coordinate value, subtract it from the original UV coordinate to get the residual value.
[0164] The steps to encode UV coordinates are as follows:
[0165] Step 1), select an initial triangle from the connection relationship, directly encode the UV coordinates of the three vertices of the initial triangle without prediction, and store the initial triangle edges in the edge set.
[0166] Step 2), select edge τ from the set according to the access criteria, and encode the UV coordinates of the vertices of the new triangle formed by τ. Using the projection relationship of the triangle from three dimensions to two dimensions, the predicted value of the point to be encoded is calculated according to the above UV coordinate prediction value calculation process. The residual is obtained by subtracting the predicted value from the original UV coordinate value.
[0167] Step 3), add the two edges of the new triangle to the edge set, remove the edge τ at the top of the set. Take the next edge from the set, continue to encode the UV coordinates of the vertices of the triangles adjacent to the edge, and return to step 3) until the UV coordinates of all vertices are encoded.
[0168] Step 4), entropy encode the UV coordinate residual and output the UV coordinate code stream.
[0169] After the attribute information is encoded, the attribute information code stream and the attribute encoding order can be obtained.
[0170] ④ Non-manifold structural information encoding
[0171] The non-manifold structural information encoding can be achieved based on attribute encoding order and geometric encoding order.
[0172] This process may include:
[0173] Whether to perform non-manifold structure information encoding is determined based on information indicating whether split non-manifold structure processing has been performed, and when it is determined that non-manifold structure information encoding is performed, based on information indicating whether geometric information and attribute information in the grid have the same connection relationship, the split non-manifold related information is correspondingly encoded to obtain a non-manifold structure information code stream.
[0174] Among them, the information indicating whether the non-manifold structure splitting process has been performed can be encoded first. If the information indicating whether the non-manifold structure splitting process has been performed indicates that the mesh has not been split non-manifold structure splitting process, that is, there is no non-manifold structure, and there is no need to further encode the non-manifold identification of the vertices in the non-manifold related information and the repeated point index information generated by the non-manifold splitting process; if the information indicating whether the non-manifold structure splitting process has been performed indicates that the mesh has been split non-manifold structure splitting process, that is, there is a non-manifold structure, then it is necessary to encode the non-manifold identification of the vertices in the non-manifold related information and the repeated point index information generated by the non-manifold splitting process, but it needs to be performed based on different situations of the information indicating whether the geometric information and attribute information in the mesh have the same connection relationship.
[0175] Among them, the information indicating whether the split non-manifold structure processing has been performed can be represented by setting a flag indicating whether the split non-manifold structure processing has been performed: if the split non-manifold structure processing has not been performed, the flag is set to 0, and there is no need to encode the non-manifold identifier of the vertex and the index information of repeated points generated by splitting the non-manifold; if the split non-manifold structure processing has been performed, the flag is set to 1, and then the non-manifold identifier of the vertex and the index information of repeated points generated by splitting the non-manifold are encoded. Alternatively, the indication information can also be represented by the number of vertex non-manifold identifiers or the number of repeated points generated by splitting the non-manifold. If the number is 0, it indicates that the split non-manifold structure processing has not been performed. If the number is greater than 0, it indicates that the split non-manifold structure processing has been performed. The representation method of the information indicating whether the split non-manifold structure processing has been performed is not limited here.
[0176] The duplicate points generated by non-manifold removal include geometric duplicate points and attribute duplicate points. Based on whether the geometric information and attribute information in the grid have the same connection relationship, the non-manifold identification of the encoded vertex and the duplicate point index information generated by non-manifold removal are divided into two cases:
[0177] Case 1: If the geometric information and attribute information in the indicated mesh have the same connection relationship, the non-manifold identification of a set of vertices and the index information of duplicate points generated by decomposing the non-manifold are encoded;
[0178] In this case, the geometric information and attribute information in the grid have the same connection relationship, that is, the geometric coordinates and the attribute coordinates are in a one-to-one correspondence. At this time, the non-manifold identifier of a group of vertices and the duplicate point index information generated by disassembling the non-manifold are directly encoded. The index information can be obtained according to the encoding order of the geometric information and attribute information at the encoding end.
[0179] The specific implementation method may be to set a flag bit for each vertex in the manifold mesh to indicate whether the point at the current position is a duplicate point generated by disassembling the non-manifold, and encode the index information of the duplicate points generated by disassembling the non-manifold. Then, entropy coding is performed on the flag bit binary string sequence arranged in the corresponding coding order and the index information of the duplicate points generated by disassembling the non-manifold to obtain the non-manifold structure information code stream.
[0180] Case 2: if the geometric information and attribute information in the indicated mesh have different connection relationships, a non-manifold identifier of a group of vertices and duplicate point index information generated by removing the non-manifold are encoded for the geometric information and attribute information respectively.
[0181] This situation is that the geometric information and attribute information in the grid have different connection relationships, that is, the geometric coordinates and the attribute coordinates are not in a one-to-one correspondence. At this time, the non-manifold identifier of the geometric vertex and the geometric duplicate point index information generated by removing the non-manifold, and the non-manifold identifier of the attribute vertex and the attribute duplicate point index information generated by removing the non-manifold are encoded respectively. The index information can be obtained according to the geometric information encoding order and the attribute information encoding order of the encoding end respectively.
[0182] A specific implementation method may be to set a flag bit for each geometric vertex and each attribute vertex in the manifold mesh, respectively, to indicate whether the geometric vertex and attribute vertex at the current position are duplicate points generated by disassembling the non-manifold, and to encode the geometric duplicate point index information and attribute duplicate point index information generated by disassembling the non-manifold, respectively. Then, entropy coding is performed on the flag bit binary string sequence arranged in the corresponding coding order and the duplicate point index information generated by disassembling the non-manifold, and after the non-manifold structure information is encoded, the non-manifold structure information code stream can be obtained.
[0183] In the embodiment of the present invention, the non-manifold structure information code stream can be stored in the total code stream in multiple ways: one is to use the non-manifold structure information code stream as a separate sub-code stream; another is to store the code stream of geometric non-manifold structure information in the geometric information code stream, and store the code stream of attribute non-manifold structure information in the attribute information code stream; the code stream of geometric non-manifold structure information and the code stream of attribute non-manifold structure information can also be stored as two code streams in the total code stream. The embodiment of the present invention does not limit the storage method of the non-manifold structure information code stream in the total code stream.
[0184] It can be understood that the connection information code stream, the geometric information code stream, the attribute information code stream and the non-manifold structure information code stream can be mixed into the total code stream, that is, the coded information code stream in Scode1, that is, Figure 4 The grid code stream in .
[0185] (4) Grid decoding
[0186] The process of mesh decoding, restoring non-manifold structures, and restoring duplicate points corresponds to the process of decoding the coded information stream in Scode2 to obtain the reconstructed 3D mesh. Figure 4 After mesh decoding, the reconstructed manifold mesh is obtained. If the non-manifold structure is restored, the reconstructed deduplication mesh is obtained. If the repeated points are restored, the reconstructed mesh is obtained. The reconstructed mesh is the reconstructed 3D mesh obtained by Scode2.
[0187] Decode the encoded information stream, including:
[0188] Decoding the geometric connection relationship, geometric information and attribute connection relationship of the 3D mesh, and of course, decoding the attribute information and non-manifold structure information of the 3D mesh can also be included.
[0189] 1) Decoding for connection relationships
[0190] This step is to decode the connection relationship code stream.
[0191] First, the information indicating whether the geometric information and attribute information in the grid have the same connection relationship can be decoded. Furthermore, the information indicating whether the non-manifold structure splitting processing has been performed, the non-manifold splitting related information, etc. can be decoded, or these related information about the non-manifold splitting can also be obtained in the non-manifold structure information decoding.
[0192] Connection relationship decoding includes geometric connection relationship decoding and attribute connection relationship decoding. Specifically, decoding the connection relationship code stream can obtain a pattern string, traverse the pattern string in a certain order (forward or reverse order), and reconstruct the connection relationship according to the corresponding pattern in the pattern string.
[0193] Corresponding to the connection relationship encoding, the connection relationship decoding also needs to be performed according to different situations of the information indicating whether the geometric information and the attribute information in the grid have the same connection relationship.
[0194] If the geometric information and the attribute information have the same connection relationship, only one set of connection relationships needs to be reconstructed; if the geometric information and the attribute information have different connection relationships, taking the attribute information as texture coordinates as an example, in an optional implementation, the geometric connection relationship can be reconstructed based on the decoded pattern string, and then the corners in the currently decoded connected area and the difference information between the texture connection relationship and the geometric connection relationship in the currently decoded connected area are traversed to reconstruct the texture connection relationship. In addition, the traversal order of the vertices is provided to the geometric information decoding and attribute information decoding processing links. Of course, the above method is an optional example method for decoding and reconstructing the attribute connection relationship.
[0195] Through connection relationship decoding, the connection relationship of the manifold mesh and the vertex order of connection relationship decoding can be obtained as the connection relationship decoding order.
[0196] 2) Decoding geometric information
[0197] Geometric information decoding is to decode the geometric information code stream, which can be achieved by using the connection relationship decoding order.
[0198] At this time, the information indicating whether the duplicate point merging process has been performed, the duplicate point identifier, etc. can be first decoded. Of course, this information can also be decoded before determining whether the duplicate point restoration process needs to be performed.
[0199] The decoding process of the mesh geometric coordinates is the inverse process of the encoding process. Taking the encoding method shown in the previous article as an example, the coordinate prediction residual is first entropy decoded; then the predicted coordinates of the points to be decoded are predicted according to the parallelogram rule based on the decoded triangles; the predicted coordinates are added to the residual values obtained by entropy decoding to obtain the geometric coordinate positions to be decoded. The vertex traversal order here is the same as the vertex order of the encoded geometric information. It should be noted that the geometric coordinates of the initial triangle do not use predictive coding, but directly encode their geometric coordinate values. After decoding the geometric coordinates of the triangle, the geometric coordinates of the vertices of other triangles are traversed and decoded as the initial triangle. In addition, other decoding methods may also be used here, and there is no restriction on the specific decoding method, as long as it corresponds to the encoding end.
[0200] By decoding the geometric information, the geometric information of the manifold mesh can be obtained.
[0201] 3) Decoding attribute information
[0202] Attribute information decoding is to decode the attribute information code stream, which can be achieved by using the connection relationship decoding order.
[0203] Taking the UV coordinates in the attribute information as an example, the specific decoding method is not limited here, and a decoding method corresponding to the encoding method can be used. The decoding process using the similar triangle prediction algorithm is described below.
[0204] The steps to decode UV coordinates are as follows:
[0205] Step 1: Entropy decode the UV coordinate code stream.
[0206] Step 2: Decode the UV coordinates of the three vertices of the initial triangle. The prediction value is not calculated here. The initial triangle directly encodes its UV coordinates instead of encoding the residual. Store the initial triangle edges in the edge set.
[0207] Step 3: Select edge τ from the set according to the access criteria, and decode the UV coordinates of the vertices of the new triangle formed with τ. First, use the mapping relationship from 3D to 2D of the triangle to calculate the predicted value of the UV coordinate of the point to be decoded in the same way as the encoding end. Then add the predicted value to the residual of entropy decoding to obtain the reconstructed UV coordinate.
[0208] Step 4: Add the two edges of the new triangle to the edge set and remove the edge τ at the top of the set. Take the next edge from the set and continue decoding the UV coordinates of the vertices of the triangles adjacent to the edge, and return to step 3 until the UV coordinates of all vertices are decoded.
[0209] By decoding the attribute information, the attribute information of the manifold mesh reconstruction can be obtained.
[0210] 4) Decoding non-manifold structural information
[0211] Information indicating whether the non-manifold structure splitting process has been performed, information related to the non-manifold splitting, etc. can be decoded in this link.
[0212] Specifically, first, the information indicating whether the non-manifold structure splitting processing has been performed is decoded. For example, the information indicating whether the non-manifold structure splitting processing has been performed is an identifier. If the identifier is 0, there is no need to decode the non-manifold splitting related information, that is, there is no need to decode the non-manifold identifier of the vertex and the duplicate point index information generated by splitting the non-manifold, and skip the subsequent processing link of restoring the non-manifold structure; if the identifier is 1, it is necessary to decode the non-manifold splitting related information.
[0213] When decoding the information related to the non-manifold, it is necessary to perform corresponding processing based on the information indicating whether the geometric information and attribute information in the grid have the same connection relationship. The decoding of this part adopts the method corresponding to the encoding, and is divided into two cases according to whether the geometric information and attribute information have the same connection relationship:
[0214] If the geometric information and attribute information have the same connection relationship, entropy decoding is used to obtain a set of non-manifold identifiers of vertices and the index information of duplicate points generated by removing the non-manifold; if the geometric information and attribute information have different connection relationships, the non-manifold identifiers of geometric vertices and the index information of geometric duplicate points generated by removing the non-manifold, and the non-manifold identifiers of attribute vertices and the index information of attribute duplicate points generated by removing the non-manifold are decoded respectively. This information is recorded and output to the non-manifold structure recovery processing link.
[0215] (5) Restoring non-manifold structures
[0216] With respect to the mesh decoding process described above, decoding the coded information stream may include:
[0217] Decoding and reconstructing the connection relationship, and determining whether to perform non-manifold structure recovery processing based on information obtained by decoding indicating whether the split non-manifold structure processing has been performed;
[0218] When it is determined to perform the process of restoring the non-manifold structure, the non-manifold structure is restored according to the non-manifold removal related information obtained by decoding.
[0219] Then, in the process of restoring the non-manifold structure, the restoration can be performed based on the decoded information. Specifically, the process of restoring the non-manifold structure is to restore the non-manifold structure based on the decoded non-manifold disassembly related information when determining to perform the non-manifold structure restoration process; wherein the decoded non-manifold disassembly related information includes the non-manifold identification of the vertex and the repeated point index information generated by the non-manifold disassembly.
[0220] Specifically, the recovery process of non-manifold edges and non-manifold points is the same. Taking the duplicate point index information generated by splitting the non-manifold as the duplicate point group index as an example, we can first traverse all vertices in the decoding order of the vertices, and establish a hash table based on the non-manifold identifier of the vertex. The key of the hash table is the duplicate point group index generated by splitting the non-manifold, and the value is the index of the target vertex to be merged. If the current vertex is not a duplicate point generated by splitting the non-manifold, the current vertex corresponds to the index of the current vertex, that is, its index is not updated; if the current vertex is a duplicate point generated by splitting the non-manifold and is the target vertex to be merged into the duplicate point group, the current vertex corresponds to the index of the current vertex, that is, its index is not updated, and the duplicate point group index of the current vertex and the index of the current vertex in the reconstructed manifold mesh are added to the hash table; if the current vertex is a duplicate point generated by splitting the non-manifold, but is not the target vertex to be merged into the duplicate point group, the index of the target vertex to be merged into the reconstructed manifold mesh is searched in the hash table according to the duplicate point group index of the current point, so as to merge the duplicate points generated by splitting the non-manifold, that is, update the index of the current vertex to the index of the target vertex to be merged into. Finally, update the geometric coordinate list and attribute coordinate list, and update the indexes of the geometric vertices and attribute vertices in the connection relationship to obtain the reconstructed non-manifold mesh.
[0221] When recovering non-manifold structures, it is necessary to perform corresponding processing based on the information indicating whether the geometric information and attribute information in the mesh have the same connection relationship. The decoding of this part adopts the method corresponding to the encoding, and is divided into two cases according to whether the geometric information and attribute information have the same connection relationship:
[0222] If the geometric information and the attribute information have the same connection relationship, the above process is executed once to obtain a non-manifold mesh in which the geometric information and the attribute information have the same connection relationship; if the geometric information and the attribute information have different connection relationships, the geometric vertices and the attribute vertices are traversed in the decoding order of the geometric vertices and the attribute vertices respectively, and a geometric hash table and an attribute hash table are established according to the non-manifold identifiers of the geometric vertices and the attribute vertices respectively, and the index information of the geometric duplicate points generated by splitting the non-manifold and the index of the geometric target vertex to be merged in the reconstructed manifold mesh, the index information of the attribute duplicate points generated by splitting the non-manifold and the index of the attribute target vertex to be merged in the reconstructed manifold mesh are stored respectively, and the above-mentioned operations of judging and merging the duplicate points generated by splitting the non-manifold are executed respectively, and the geometric coordinate list and the attribute coordinate list are updated, and the geometric vertex index and the attribute vertex index in the connection relationship are updated to obtain a non-manifold mesh in which the geometric information and the attribute information have different connection relationships.
[0223] (6) Restore duplicate points
[0224] With respect to the mesh decoding process described above, decoding the coded information stream may include:
[0225] Decode the geometric information, and based on the information obtained by decoding indicating whether the duplicate point merging process has been performed, restore the geometric duplicate points according to the attribute connection relationship obtained by decoding when it is indicated that the duplicate point restoration process needs to be performed.
[0226] Then, in the process of restoring the non-manifold structure, restoration can be performed based on the decoded information.
[0227] The information indicating whether the merging of duplicate points has been performed can be decoded and obtained before this processing step.
[0228] If the code stream contains a duplicate point identification code stream, then decode the duplicate point identification code stream. Generate duplicate vertices based on the duplicate point identification, and adjust the connection relationship to obtain a reconstructed mesh. If the code stream does not contain a duplicate point identification code stream, restore the duplicate points based on the correspondence between the geometric vertices and the texture vertices.
[0229] Restoring duplicate points based on the correspondence between geometric vertices and texture vertices is essentially restoring the one-to-one correspondence between geometric vertices and texture vertices. It is mainly divided into two steps: first, in the connection relationship, find a vertex that corresponds to multiple texture coordinates for a geometric vertex; then, create a duplicate point for the geometric vertex and update the index of the geometric vertex in the connection relationship.
[0230] Specifically, the corresponding relationship between geometric vertices and texture vertices is established based on the connection relationship. Then, all geometric vertices are traversed, and when one geometric vertex corresponds to multiple texture vertices, geometric vertices with the same coordinate values are created, and the geometric connection relationship is updated so that the geometric vertices correspond to the texture vertices one by one, thereby recovering the geometric duplicate points in the mesh.
[0231] (7) Comparison grid
[0232] Comparing the grid and encoding the grid adjustment information corresponds to the process of comparing the 3D grid with the reconstructed 3D grid in Scode3, obtaining the grid difference information, encoding the grid difference information, and obtaining the grid difference information code stream. Figure 4 The grid comparison and grid adjustment information coding process is understood. Figure 4 The grid adjustment information in is the grid difference information.
[0233] The grid comparison can be performed based on the input grid, the reconstructed grid and the connection relationship encoding sequence.
[0234] The processing step may include: performing grid processing on the input grid and the reconstructed grid to obtain and encode information indicating whether there is a grid difference, and obtaining grid difference representation information when there is a grid difference, so as to adjust the reconstructed grid according to the information at the decoding end to obtain a lossless decoded grid that is exactly the same as the original three-dimensional grid.
[0235] Therefore, the grid difference information includes:
[0236] Information indicating whether there is a grid difference; and additional grid difference representation information when there is a grid difference. The information indicating whether there is a grid difference can also be implemented using the identifier described above, which will not be described in detail here. Alternatively, the indication information can also be represented by the list size of the grid difference representation information. If the list size is 0, it means that there is no grid difference information. If the list size is greater than 0, it means that there is grid difference information. Of course, its representation form is not limited to this, and its encoding method is not limited here.
[0237] Among them, comparing the three-dimensional mesh and reconstructing the three-dimensional mesh includes:
[0238] The three-dimensional mesh is compared and reconstructed from one or more of a plurality of encoded items; wherein the plurality of encoded items include geometric connectivity, geometric information, and attribute connectivity.
[0239] After the aforementioned processing steps, there are mainly two types of differences between the reconstructed 3D mesh and the original 3D mesh: one is the difference in the number of geometric vertices, and the other is the difference in connection relationships.
[0240] First, compare the difference in the number of geometric vertices. Traverse the geometric coordinates of each vertex in the mesh, and compare the number of repetitions of the geometric coordinates in the reconstructed three-dimensional mesh with the number of repetitions in the original three-dimensional mesh. If the number of repetitions of a certain geometric coordinate in the original three-dimensional mesh is greater than the number of repetitions of the coordinate in the reconstructed three-dimensional mesh, add new duplicate points in the reconstructed three-dimensional mesh, and write the vertex index to be repeated into the added vertex index list. When the number of repetitions of a certain geometric coordinate in the original three-dimensional mesh is less than the number of repetitions of the coordinate in the reconstructed three-dimensional mesh, delete the redundant duplicate points in the reconstructed three-dimensional mesh, and write the vertex index to be deleted into the deleted vertex index list. Here, there are multiple ways to implement the operation of deleting vertices. The vertices can be deleted immediately, or the vertices to be deleted can be recorded first, and then all the vertices to be deleted can be deleted uniformly after comparing the difference in connection relationships. The embodiment of the present invention does not limit the specific implementation method. Therefore, by comparing the difference in the number of vertices, the added vertex index list and the deleted vertex index list are obtained.
[0241] Secondly, compare the differences in connection relationships. After the above processing steps, the number of facets in the reconstructed 3D mesh is the same as that in the original 3D mesh, but the vertex index in each facet may be different. First, according to the traversal order of the facets when encoding the connection relationship, establish the correspondence between the facets of the reconstructed 3D mesh and the facets of the original 3D mesh. Then, establish the matching relationship of the vertices between the reconstructed 3D mesh and the original 3D mesh: for vertices that do not have geometric duplicate points, the matching relationship between the vertices of the reconstructed 3D mesh and the original 3D mesh can be established based on the 3D coordinates; for vertices that have geometric duplicate points, judge by comparing whether the facets connected to each duplicate point in the original 3D mesh and the reconstructed 3D mesh correspond.
[0242] If the face connected to a certain repeated point A in the original 3D mesh corresponds to the face connected to a certain repeated point B in the reconstructed 3D mesh, then point A and point B are matched; if a certain repeated point A in the original 3D mesh does not match all the repeated points in the reconstructed 3D mesh, then a certain unmatched repeated point in the reconstructed 3D mesh is specified to match point A according to a certain rule (the rule for selecting vertices is not limited here). After the step of comparing the difference in the number of geometric vertices, the number of repeated points corresponding to each geometric coordinate in the reconstructed 3D mesh has been made equal to the number of repeated points corresponding to the original 3D mesh, so according to the above method, each vertex in the reconstructed 3D mesh can be matched to a vertex of the original mesh. After establishing the corresponding relationship of the facets and the matching relationship of the vertices between the original 3D mesh and the reconstructed 3D mesh, compare whether there is a difference between the index of the vertex in each facet in the original 3D mesh and the index of the matching vertex in the corresponding facet in the reconstructed 3D mesh. If there is a difference, the connection relationship modification information is obtained. The connection relationship modification information includes the facet index to be modified, the position of the vertex index to be modified in the facet, and the modified vertex index value.
[0243] After comparing the mesh processing steps, at least one or more of the added vertex index list, the deleted vertex index list, and the connection relationship modification information list can be obtained. The mesh difference representation information includes: one or more of the added vertex index list, the deleted vertex index list, and the connection relationship modification information list. Of course, the content of the mesh difference representation information is not limited to the above.
[0244] (8) Grid adjustment information encoding
[0245] The processing link can perform entropy coding on each part of the grid difference representation information to obtain a grid difference representation information code stream, namely a grid adjustment information code stream. The grid adjustment information coding can also include coding of information indicating whether there is a grid difference.
[0246] The information indicating whether there is a grid difference can be implemented by encoding an identifier. The embodiment of the present invention does not limit its specific representation method. For example, the encoding flag can be used to explicitly indicate or the list size of the grid difference representation information can be used to implicitly indicate whether the grid needs to be adjusted, etc., which are all reasonable.
[0247] (9) Texture image encoding
[0248] The texture map of the input grid is subjected to texture encoding processing to obtain a texture map bit stream; the texture map may be encoded using a video encoder, and the specific encoding method is not limited.
[0249] It is understandable that an output code stream can be obtained based on the mixing of various code streams to be transmitted to the decoding end.
[0250] The three-dimensional mesh lossless encoding method provided by the embodiment of the present invention first encodes the three-dimensional mesh to obtain an encoding information code stream; secondly, decodes the encoding information code stream to obtain a reconstructed three-dimensional mesh; finally, compares the three-dimensional mesh with the reconstructed three-dimensional mesh to obtain mesh difference information, encodes the mesh difference information, and obtains a mesh difference information code stream. The mesh data with special circumstances can be processed by comparing the three-dimensional mesh with the reconstructed three-dimensional mesh and encoding the mesh difference information, such as the need to add vertices, delete vertices, or adjust the connection relationship, thereby achieving complete lossless encoding.
[0251] Furthermore, the embodiments of the present invention can achieve more efficient encoding of the mesh by merging repeated points and mesh encoding and decoding and restoring repeated points, and can achieve lossless encoding of the non-manifold mesh using the Edgebreaker algorithm by splitting the non-manifold structure and mesh encoding and decoding and restoring the non-manifold structure. In summary, the embodiments of the present invention can achieve complete and lossless mesh encoding when encoding any mesh containing repeated points, non-manifold structures, geometric information and attribute information with different connection relationships.
[0252] In a second aspect, corresponding to the three-dimensional mesh lossless encoding method provided in the first aspect, an embodiment of the present invention further provides a three-dimensional mesh lossless encoding device, such as Fig.11 As shown, the device comprises:
[0253] An encoding module, used for encoding the three-dimensional grid to obtain an encoding information code stream;
[0254] A decoding module, used for decoding the coded information code stream to obtain a reconstructed three-dimensional mesh;
[0255] The comparison module is used to compare the three-dimensional grid with the reconstructed three-dimensional grid, obtain grid difference information, encode the grid difference information, and obtain a grid difference information code stream.
[0256] For the specific content of the three-dimensional grid lossless encoding device, please refer to the relevant part of the three-dimensional grid lossless encoding method described in the first aspect above, which will not be repeated here.
[0257] In a third aspect, corresponding to the three-dimensional mesh lossless encoding method provided in the first aspect, an embodiment of the present invention further provides a three-dimensional mesh lossless decoding method, which is applied to a decoding end, such as Fig.12 As shown, the method includes:
[0258] Sdecode1, decodes the coded information stream to obtain a reconstructed 3D mesh;
[0259] Sdecode2, decodes the grid difference information code stream to obtain the grid difference information;
[0260] Sdecode3 obtains the decoded 3D mesh based on the reconstructed 3D mesh and mesh difference information.
[0261] In order to facilitate understanding of the three-dimensional grid lossless decoding method of the embodiment of the present invention, Fig.13 A three-dimensional mesh lossless decoding framework is proposed. The input bitstream is the bitstream transmitted from the encoder. Decoding the input bitstream can obtain various bitstreams, including the encoding information bitstream, the mesh difference information bitstream and the texture map bitstream. Fig.13 The mesh code stream compressed in the decoding is the encoding information code stream, and the mesh adjustment information code stream is the mesh difference information code stream. It should be noted that the decoding framework may also include processing steps required for correct decoding such as deleting added virtual vertices. For the sake of convenience, Fig.13 Only the main processing steps are listed, including mesh decoding, recovery of non-manifold structure, recovery of repeated points, mesh adjustment information decoding, adjustment and reconstruction of mesh, and texture map decoding. Corresponding to the encoding end, some processing steps in the decoding framework may not exist, and need to be determined according to the decoding situation.
[0262] This decoding framework can more efficiently and completely realize lossless decoding of arbitrary grids containing repeated points, non-manifold structures, and grids with different geometric and attribute connections.
[0263] First, the embodiment of the present invention can decode the input code stream to obtain multiple code streams, which may include a coding information code stream, a mesh difference information code stream, and a texture map code stream. For Sdecode1, the coding information code stream is decoded to obtain a reconstructed three-dimensional mesh, which corresponds to Fig.13 The process of grid decoding, restoring non-manifold structure, and restoring repeated points in the three-dimensional grid lossless coding method described in the first aspect above can be understood by referring to the process of grid decoding, restoring non-manifold structure, and restoring repeated points in the three-dimensional grid lossless coding method described in the first aspect above. The coded information code stream is grid decoded to obtain a reconstructed manifold grid. If the non-manifold structure is restored, a reconstructed deduplicated grid is obtained. If the repeated points are restored, a reconstructed grid is obtained, that is, the reconstructed three-dimensional grid obtained by Sdecode1.
[0264] Specifically, the framework of grid decoding in the embodiment of the present invention can be found in Fig.14 Understand, as the decoding end, Fig.14 The compressed mesh code stream input on the left side is the coded information code stream, and its decomposition can obtain the connection information code stream, geometric information code stream, attribute information code stream and non-manifold structure information code stream, etc. The processing links in the mesh decoding framework may include connection relationship decoding, geometric information decoding, attribute information decoding, non-manifold structure information decoding and reconstruction of manifold mesh, etc. Of course, some processing links or code streams may not exist.
[0265] The decoded coded information stream in Sdecode1 may at least include:
[0266] Decoding the geometric connection relationship, geometric information and attribute connection relationship of the three-dimensional grid. Among them, decoding the geometric connection relationship and attribute connection relationship may belong to connection relationship decoding. Of course, in the embodiment of the present invention, decoding the coded information code stream may also include Fig.14 Attribute information decoding and non-manifold structure information decoding, etc.
[0267] 1) Decoding for connection relationships
[0268] In general, this processing link is to decode to obtain information indicating whether the geometric information and attribute information in the mesh have the same connection relationship, and decode the connection relationship code stream to obtain a pattern string. If the geometric information and attribute information have the same connection relationship, only one set of connection relationships needs to be reconstructed. If the geometric information and attribute information have different connection relationships, then on the basis of reconstructing the geometric connection relationship, the attribute connection relationship is reconstructed according to the code stream of the attribute connection relationship. The connection relationship of the manifold mesh and the decoded vertex order can be output. For details, please refer to the introduction of the corresponding part of the encoding end in the previous article, which will not be explained in detail here.
[0269] Furthermore, the processing link can decode and obtain information indicating whether the non-manifold structure splitting process has been performed, so as to determine whether the non-manifold structure restoration process should be performed.
[0270] That is to say, in the embodiment of the present invention, the connection relationship of the decoding encoding information code stream may include:
[0271] Decode and reconstruct the connection relationship, determine whether to restore the non-manifold structure based on the information obtained by decoding that indicates whether the non-manifold structure splitting processing has been performed, and when it is determined to restore the non-manifold structure, perform the non-manifold structure restoration processing according to the decoded non-manifold splitting related information; wherein the non-manifold splitting related information may be obtained by decoding the non-manifold structure information, and the decoded non-manifold splitting related information includes the non-manifold identification of the vertex and the repeated point index information generated by splitting the non-manifold.
[0272] 2) Decoding geometric information
[0273] This processing link can decode and obtain information indicating whether the merging duplicate points process has been performed to determine whether to perform the restoring duplicate points process.
[0274] That is, in the embodiment of the present invention, the geometric information of the decoded coded information stream may include:
[0275] Decode the geometric information, and based on the information obtained by decoding indicating whether the duplicate point merging process has been performed, restore the geometric duplicate points according to the attribute connection relationship obtained by decoding when it is indicated that the duplicate point restoration process needs to be performed.
[0276] This processing link can decode the geometric information code stream according to the connection relationship decoding order to obtain the geometric information of the manifold mesh. The geometric information of the mesh can be decoded using a decoding method corresponding to the encoding end, such as using a parallelogram inverse prediction method to decode the geometric information of the mesh. For details, please refer to the introduction of the corresponding part of the encoding end above, which will not be explained in detail here.
[0277] 3) Decoding attribute information
[0278] This processing link can decode the attribute information of the manifold mesh reconstruction according to the decoding order of the connection relationship, using the decoding method corresponding to the encoding end, such as using similar triangle inverse prediction and other methods to decode the texture coordinates of the mesh. For details, please refer to the introduction of the corresponding part of the encoding end above, which will not be explained in detail here.
[0279] 4) Decoding non-manifold structural information
[0280] The processing link may be to first decode to obtain information indicating whether the non-manifold structure splitting process has been performed, and when it is determined that the non-manifold structure splitting process has been performed, decode the non-manifold structure information code stream to obtain the non-manifold splitting related information. The process may be performed according to the geometric information decoding order and the attribute information decoding order.
[0281] Specifically, when decoding non-manifold structure information, first decode the information indicating whether the non-manifold structure has been split. If it indicates that the non-manifold structure has been split, further decode to obtain non-manifold split related information, including non-manifold identification information of vertices and repeated point index information generated by splitting the non-manifold. Specifically, it is performed according to the information indicating whether the geometric information and attribute information in the mesh have the same connection relationship. If the geometric information and attribute information in the mesh have the same connection relationship, further decode to obtain a set of non-manifold identification information of vertices and repeated point index information generated by splitting the non-manifold; if the geometric information and attribute information in the mesh have different connection relationships, respectively decode the non-manifold identification information of the geometric vertices and the geometric repeated point index information generated by splitting the non-manifold, and the non-manifold identification information of the attribute vertices and the attribute repeated point index information generated by splitting the non-manifold. For details, please refer to the introduction of the corresponding part of the encoding end above, which will not be explained in detail here.
[0282] 5) Reconstructing the manifold mesh
[0283] Specifically, the connection relationship, geometric information, and attribute information of the manifold mesh can be used to directly reconstruct the manifold mesh.
[0284] The above is the main processing process of mesh decoding. After mesh decoding, when it is necessary to restore the non-manifold structure, the non-manifold structure is restored based on the reconstructed manifold mesh and the non-manifold demolition related information. This part needs to be processed in different ways according to the information indicating whether the geometric information and attribute information in the mesh have the same connection relationship. The duplicate points generated by non-manifold demolition are merged, the connection relationship is adjusted, and the non-manifold structure in the mesh is restored to obtain the reconstructed deduplicated mesh, that is, the reconstructed non-manifold mesh.
[0285] Then, when it is necessary to restore duplicate points, the duplicate points in the reconstructed deduplicated mesh are restored according to the correspondence between the geometric information and the attribute information to obtain the reconstructed 3D mesh. For details of these two processing steps, please refer to the introduction of the corresponding part of the encoding end above, which will not be described in detail here.
[0286] For Sdecode2, decode the grid difference information code stream to obtain the grid difference information; see Fig.13 The process of obtaining the grid adjustment information by decoding the grid adjustment information code stream in the grid adjustment information code stream may include:
[0287] The grid difference information code stream is decoded to obtain information indicating whether a grid difference exists; and when the information indicating whether a grid difference exists indicates that a grid difference exists, grid difference indicating information is also decoded.
[0288] The grid difference representation information may include:
[0289] One or more of the add vertex index list, the delete vertex index list and the connection relationship modification information list. Of course, the mesh difference representation information is not limited to the above contents.
[0290] If the information indicating whether there is a grid difference indicates that there is no grid difference, there is no need to perform the Sdecode3 step.
[0291] For Sdecode3, based on the reconstructed 3D grid and grid difference information, the decoded 3D grid is obtained, which corresponds to Fig.13 The process of adjusting the reconstructed grid to obtain the decoded grid.
[0292] The grid difference information used in this step mainly includes grid difference representation information. That is, based on the reconstructed three-dimensional grid and the grid difference information, a decoded three-dimensional grid is obtained, including:
[0293] When the mesh difference information obtained by decoding includes mesh difference representation information, the mesh is adjusted and reconstructed according to the reconstructed three-dimensional mesh and the mesh difference representation information to obtain a decoded three-dimensional mesh.
[0294] When adjusting and reconstructing the three-dimensional mesh according to the mesh difference representation information obtained by decoding, taking the difference in the number of geometric vertices and the difference in connection relationship as an example, it specifically includes: first, for each vertex in the added vertex index list, create a duplicate point. Secondly, use the vertex deletion method corresponding to the encoding end to delete the vertices in the deleted vertex index list. The vertices can be deleted immediately, or the vertices to be deleted can be recorded first, and then all the vertices to be deleted can be deleted uniformly after adjusting the connection relationship. At this time, the vertex deletion method corresponding to the encoding end can be used, and the specific implementation method is not limited. Then, adjust the connection relationship of the mesh according to the connection relationship modification information list. Read the patch index that needs to be modified and the position of the vertex index that needs to be modified in the patch in turn, and modify the vertex index at that position.
[0295] The three-dimensional mesh lossless decoding method provided by the embodiment of the present invention first decodes the coded information bitstream to obtain a reconstructed three-dimensional mesh; then decodes the mesh difference information bitstream to obtain mesh difference information; and finally obtains a decoded three-dimensional mesh based on the reconstructed three-dimensional mesh and the mesh difference information. The decoded three-dimensional mesh is obtained based on the reconstructed three-dimensional mesh and the mesh difference information, and the original mesh can be accurately reconstructed for mesh data with special circumstances, such as the need to add vertices, delete vertices, or adjust connection relationships, to achieve lossless coding.
[0296] Furthermore, the embodiments of the present invention can achieve lossless decoding for grids containing repeated points, non-manifold structures, etc. through grid decoding, restoration of repeated points, and restoration of non-manifold structures.
[0297] In a fourth aspect, corresponding to the three-dimensional mesh lossless decoding method provided in the second aspect, an embodiment of the present invention further provides a three-dimensional mesh lossless decoding device, such as Fig.15 As shown, the device comprises:
[0298] A coding information decoding module, used for decoding the coding information code stream to obtain a reconstructed three-dimensional grid;
[0299] A grid difference information decoding module is used to decode the grid difference information code stream to obtain the grid difference information;
[0300] The decoded three-dimensional mesh generation module is used to obtain a decoded three-dimensional mesh based on the reconstructed three-dimensional mesh and the mesh difference information.
[0301] For the specific content of the three-dimensional grid lossless decoding device, please refer to the relevant part of the three-dimensional grid lossless decoding method described in the third aspect above, which will not be repeated here.
[0302] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A three-dimensional mesh lossless encoding method, characterized in that: include: Encode the three-dimensional grid to obtain a coded information code stream; Decoding the coded information code stream to obtain a reconstructed three-dimensional grid; The three-dimensional grid is compared with the reconstructed three-dimensional grid to obtain grid difference information, and the grid difference information is encoded to obtain a grid difference information code stream.
2. The three-dimensional mesh lossless encoding method according to claim 1, characterized in that: The grid difference information includes: Information indicating whether there is a mesh difference; and when there is a mesh difference, additional mesh difference representation information.
3. The three-dimensional mesh lossless encoding method according to claim 1, characterized in that: The encoded three-dimensional grid comprises: The geometric connection relationship, geometric information and attribute connection relationship of the three-dimensional grid are encoded.
4. The three-dimensional mesh lossless encoding method according to claim 3, characterized in that: The comparing the three-dimensional mesh with the reconstructed three-dimensional mesh comprises: The three-dimensional mesh and the reconstructed three-dimensional mesh are compared from one or more of a plurality of encoded items; wherein the plurality of encoded items include geometric connectivity, geometric information, and attribute connectivity.
5. The three-dimensional mesh lossless encoding method according to claim 3, characterized in that: The process of encoding the geometric information of the three-dimensional grid comprises: When there are geometrically repeated points in the three-dimensional grid, merging the repeated points to obtain a de-duplicated grid; Based on whether the merging duplicate points process has been performed, information indicating whether the merging duplicate points process has been performed is obtained and encoded.
6. The three-dimensional mesh lossless encoding method according to claim 3 or 5, characterized in that: The process of encoding the connection relationship of the three-dimensional grid includes: Determine whether to perform split non-manifold structure processing on the current grid according to whether there is a non-manifold structure, record and encode information indicating whether the split non-manifold structure processing has been performed; After a non-manifold structure exists and has been split, the non-manifold splitting related information is recorded and encoded; wherein the non-manifold splitting related information includes the non-manifold identification of the vertex and the repeated point index information generated by the non-manifold splitting.
7. The three-dimensional mesh lossless encoding method according to claim 2, characterized in that: The grid difference representation information includes: One or more of the following are added vertex index list, deleted vertex index list and connection relationship modification information list.
8. The three-dimensional mesh lossless encoding method according to claim 6, characterized in that: Decoding the coded information code stream, comprising: Decode and reconstruct the connection relationship, determine whether to restore the non-manifold structure based on the information obtained by decoding indicating whether the non-manifold structure splitting processing has been performed, and when it is determined to restore the non-manifold structure, restore the non-manifold structure according to the non-manifold splitting related information obtained by decoding.
9. The three-dimensional mesh lossless encoding method according to claim 5, characterized in that: Decoding the coded information code stream, comprising: Decode the geometric information, and based on the information obtained by decoding indicating whether the duplicate point merging process has been performed, restore the geometric duplicate points according to the attribute connection relationship obtained by decoding when it is indicated that the duplicate point restoration process needs to be performed.
10. A three-dimensional grid lossless encoding device, characterized in that: include: An encoding module, used for encoding the three-dimensional grid to obtain an encoding information code stream; A decoding module, used for decoding the coded information code stream to obtain a reconstructed three-dimensional grid; The comparison module is used to compare the three-dimensional grid with the reconstructed three-dimensional grid to obtain grid difference information, encode the grid difference information, and obtain a grid difference information code stream.
11. A three-dimensional mesh lossless decoding method, characterized in that: include: Decode the coded information code stream to obtain a reconstructed three-dimensional mesh; Decode the grid difference information code stream to obtain the grid difference information; A decoded three-dimensional grid is obtained based on the reconstructed three-dimensional grid and the grid difference information.
12. The three-dimensional mesh lossless decoding method according to claim 11, characterized in that: Decoding the coded information code stream, comprising: The geometric connection relationship, geometric information and attribute connection relationship of the three-dimensional mesh are decoded.
13. The three-dimensional mesh lossless decoding method according to claim 12, characterized in that: Decoding the connection relationship of the coded information code stream includes: Decode and reconstruct the connection relationship, determine whether to restore the non-manifold structure based on the information obtained by decoding that indicates whether the non-manifold structure splitting processing has been performed, and when it is determined to restore the non-manifold structure, restore the non-manifold structure according to the decoded non-manifold splitting related information; wherein the decoded non-manifold splitting related information includes the non-manifold identification of the vertex and the repeated point index information generated by splitting the non-manifold.
14. The three-dimensional mesh lossless decoding method according to claim 12, characterized in that: Decoding the geometric information of the coded information stream includes: Decode the geometric information, and based on the information obtained by decoding indicating whether the duplicate point merging process has been performed, restore the geometric duplicate points according to the attribute connection relationship obtained by decoding when it is indicated that the duplicate point restoration process needs to be performed.
15. The three-dimensional mesh lossless decoding method according to claim 11, characterized in that: Decoding the grid difference information code stream to obtain the grid difference information includes: The grid difference information code stream is decoded to obtain information indicating whether a grid difference exists; and when the information indicating whether a grid difference exists indicates that a grid difference exists, grid difference indicating information is also decoded.
16. The three-dimensional mesh lossless decoding method according to claim 15, characterized in that: The grid difference representation information includes: One or more of the following are added vertex index list, deleted vertex index list and connection relationship modification information list.
17. The three-dimensional mesh lossless decoding method according to claim 16, characterized in that: Obtaining a decoded three-dimensional grid based on the reconstructed three-dimensional grid and the grid difference information, including: When the mesh difference information obtained by decoding includes mesh difference representation information, the mesh is adjusted and reconstructed according to the reconstructed three-dimensional mesh and the mesh difference representation information to obtain a decoded three-dimensional mesh.
18. A three-dimensional grid lossless decoding device, characterized in that: include: A coding information decoding module, used for decoding the coding information code stream to obtain a reconstructed three-dimensional grid; A grid difference information decoding module is used to decode the grid difference information code stream to obtain the grid difference information; The decoded three-dimensional grid generation module is used to obtain a decoded three-dimensional grid based on the reconstructed three-dimensional grid and the grid difference information.
Citation Information
Cited By
Zero byte coding of attribute connectivity in polygon meshes
US20250159217A1
