Lossless coding and decoding method and apparatus for three-dimensional grid
By comparing the differences between the 3D mesh and the reconstructed mesh, and encoding the mesh difference information, the problem of low encoding efficiency caused by repeated points and non-manifold structures in the existing technology is solved, and lossless encoding and accurate reconstruction of the 3D mesh are achieved.
Patent Information
- Application Number
- PCT/CN2024/101876
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-07-03
- Filing Date
- 2024-06-27
- Publication Date
- 2025-01-09
AI Technical Summary
Existing technologies struggle to perform lossless encoding of 3D meshes containing repeating points and non-manifold structures, resulting in low encoding efficiency and an inability to accurately reconstruct the original mesh.
By comparing the differences between the 3D mesh and the reconstructed mesh, the mesh difference information is encoded to achieve lossless encoding of the 3D mesh. This includes merging duplicate points and splitting non-manifold structures, restoring duplicate points and non-manifold structures, and ensuring the completeness and efficiency of the encoding.
It achieves lossless encoding of 3D meshes containing repeating points and non-manifold structures, and can accurately reconstruct the original mesh, thus improving encoding efficiency and accuracy.
Smart Images

Figure CN2024101876_09012025_PF_FP_ABST
Abstract
Description
A three-dimensional grid lossless encoding and decoding method and device 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 the next generation of digital media, following audio, images, and video. Three-dimensional meshes and point clouds are two commonly used representations of 3D models. Compared to traditional multimedia such as images and videos, 3D mesh models offer greater interactivity and realism, leading to their increasing application in various fields, including commerce, manufacturing, construction, education, medicine, entertainment, art, and the military.
[0003] With the increasing demand for visually appealing 3D mesh models and the emergence of more sophisticated 3D scanning technologies and 3D modeling software, the size and complexity of 3D mesh data captured by 3D scanning equipment or 3D modeling software are rapidly increasing. Therefore, efficiently compressing 3D mesh data is crucial for its convenient transmission, storage, and processing.
[0004] A 3D mesh often contains three main types of information: topology, geometry, and attributes. Topology, also known as connectivity information, describes the connections between elements such as vertices and facets 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 color. 3D mesh data compression often targets these three types of information, individually based on their data characteristics. Furthermore, for 3D meshes with texture maps, the texture maps also need to be compressed.
[0005] Draco, a library for compressing and decompressing 3D geometric meshes and point clouds, was released by the Google Chrome team in January 2017. It aims to improve the storage and transmission of 3D graphics and significantly accelerate the encoding, transmission, and decoding of 3D data. Draco supports compression of 3D mesh geometry, connectivity, and attribute information. It supports both lossy and near-lossless modes. During lossy encoding, Draco first filters out duplicate points in the geometry and attribute information, encoding each duplicate point only once. In near-lossless mode, duplicate points are not filtered out, and each duplicate point is encoded multiple times, resulting in reduced encoding efficiency in Draco's near-lossless mode. Furthermore, the Edgebreaker method used by Draco to encode connectivity relationships is currently one of the most efficient methods for encoding 3D mesh connectivity information. However, Edgebreaker requires the mesh to be encoded to have a manifold structure. For meshes with non-manifold structures, Draco must decompose them into manifold structures to correctly encode them. However, Draco does not merge the split structures at the decoding end, which means that the mesh output by the decoder has more split points than the original mesh input by the encoder. This makes Draco unable to losslessly encode meshes with non-manifold structures.
[0006] MPEG, the international standards organization for video image processing, is developing a new dynamic 3D mesh compression standard, V-DMC. Currently, it is also using an Edgebreaker-based solution for encoding static 3D meshes and has temporarily reused the Draco codec. MPEG is also attempting to implement an Edgebreaker-based 3D mesh codec provided by MPEG to compress the geometric, connectivity, and attribute information of 3D meshes. The currently proposed solution supports both lossy and lossless modes. In lossy mode, duplicate points in the geometric 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 results in reduced coding efficiency in lossless mode.
[0007] Therefore, a new Edgebreaker-based lossless coding method is proposed, which can realize arbitrary three-dimensional meshes containing repeated points, non-manifold structures, and geometric information and attribute information with different connection relationships. It is of great significance to realize lossless coding of three-dimensional meshes in a complete and more efficient way.
[0008] Summary of the Invention
[0009] In order to solve the above problems existing in the prior art, the present invention provides a method and apparatus for lossless encoding and decoding of three-dimensional meshes. The technical problems to be solved by the present invention are achieved through the following technical solutions:
[0010] In a first aspect, an embodiment of the present invention provides a three-dimensional mesh lossless encoding method, applied to an encoding end, the method comprising:
[0011] Encode the three-dimensional grid to obtain an encoded information code stream;
[0012] Decoding the encoded information code stream to obtain a reconstructed three-dimensional grid;
[0013] 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.
[0014] In a second aspect, an embodiment of the present invention provides a three-dimensional mesh lossless encoding device, the device comprising:
[0015] An encoding module, used for encoding the three-dimensional grid to obtain an encoded information code stream;
[0016] A decoding module, configured to decode the encoded information stream to obtain a reconstructed three-dimensional grid;
[0017] 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.
[0018] In a third aspect, an embodiment of the present invention provides a three-dimensional mesh lossless decoding method, applied to a decoding end, the method comprising:
[0019] Decode the encoded information stream to obtain a reconstructed three-dimensional mesh;
[0020] Decode the grid difference information code stream to obtain the grid difference information;
[0021] A decoded three-dimensional grid is obtained based on the reconstructed three-dimensional grid and the grid difference information.
[0022] In a fourth aspect, an embodiment of the present invention provides a three-dimensional mesh lossless decoding device, the device comprising:
[0023] A coding information decoding module is used to decode the coding information code stream to obtain a reconstructed three-dimensional grid;
[0024] A grid difference information decoding module is used to decode the grid difference information code stream to obtain grid difference information;
[0025] The decoded three-dimensional grid generation module is configured to obtain a decoded three-dimensional grid based on the reconstructed three-dimensional grid and the grid difference information.
[0026] Beneficial effects of the present invention:
[0027] The 3D mesh lossless encoding method provided by an embodiment of the present invention first encodes the 3D mesh to obtain an encoded information stream; second, decodes the encoded information stream to obtain a reconstructed 3D mesh; and finally compares the 3D mesh with the reconstructed 3D mesh to obtain mesh difference information, which is then encoded to obtain a mesh difference information stream. This embodiment of the present invention can handle mesh data with special conditions, such as the need to add or delete vertices, or adjust connectivity, by comparing the 3D mesh with the reconstructed 3D mesh and encoding the mesh difference information, thereby achieving complete lossless encoding of the 3D mesh.
[0028] Furthermore, embodiments of the present invention can achieve more efficient mesh encoding by merging duplicate points and mesh encoding and decoding, and restoring duplicate points. By splitting non-manifold structures and mesh encoding and decoding, and restoring non-manifold structures, non-manifold meshes can be losslessly encoded using the Edgebreaker algorithm. In summary, embodiments of the present invention can achieve complete and lossless mesh encoding when encoding any mesh containing duplicate points, non-manifold structures, or geometric information and attribute information with different connection relationships.
[0029] The 3D mesh lossless decoding method provided by an embodiment of the present invention first decodes the encoded information bitstream to obtain a reconstructed 3D mesh; then decodes the mesh difference information bitstream to obtain mesh difference information; and finally, obtains a decoded 3D mesh based on the reconstructed 3D mesh and the mesh difference information. This method, based on the reconstructed 3D mesh and the mesh difference information, accurately reconstructs the original mesh and achieves lossless decoding for mesh data with special conditions, such as those requiring vertex additions, deletions, or connection adjustments.
[0030] 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
[0031] Figure 1 is a schematic diagram of the five modes of Edgebreaker;
[0032] Figure 2 is a schematic diagram of the vertex traversal process and operation mode string in Edgebreaker;
[0033] FIG3 is a schematic diagram of a flow chart of a three-dimensional mesh lossless encoding method provided by an embodiment of the present invention;
[0034] FIG4 is a schematic diagram of a three-dimensional grid lossless coding framework proposed in an embodiment of the present invention;
[0035] FIG5 is a schematic diagram of a grid coding framework according to an embodiment of the present invention;
[0036] FIG6 is a schematic diagram of manifold mesh edges and diagonals according to an embodiment of the present invention;
[0037] FIG7 is a schematic diagram of a Corner relationship, i.e., an angular relationship, according to an embodiment of the present invention;
[0038] Figure 8 is a schematic diagram of the judgment conditions and traversal rules of the five CLERS modes;
[0039] FIG9 is a schematic diagram of a parallelogram prediction coding algorithm used in geometric information coding according to an embodiment of the present invention;
[0040] FIG10 is a schematic diagram of UV coordinate prediction based on three-dimensional to two-dimensional projection in attribute information encoding according to an embodiment of the present invention;
[0041] FIG11 is a schematic structural diagram of a three-dimensional grid lossless encoding device provided by an embodiment of the present invention;
[0042] FIG12 is a schematic flow chart of a three-dimensional mesh lossless decoding method provided by an embodiment of the present invention;
[0043] FIG13 is a schematic diagram of a three-dimensional grid lossless decoding framework proposed in an embodiment of the present invention;
[0044] FIG14 is a schematic diagram of a framework of trellis decoding according to an embodiment of the present invention;
[0045] FIG15 is a schematic structural diagram of a three-dimensional grid lossless decoding device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0046] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. 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 making creative efforts are within the scope of protection of the present invention.
[0047] In order to facilitate understanding of the embodiments of the present invention, a brief introduction to the relevant prior art is first given.
[0048] (1) MPEG-based 3D mesh compression tool based on Edgebreaker
[0049] The Edgebreaker-based 3D mesh compression tool currently provided by MPEG encodes and stores the connectivity, geometry, and attribute information of a 3D mesh separately. The core module, encoding the connectivity information, uses the Edgebreaker algorithm. Conventional compression methods are used to encode the geometry and attribute information, namely, data quantization, predictive compression (such as parallelogram prediction), and entropy coding. Because the tool uses a connectivity-driven encoding method, the encoding of the geometry and attribute information follows the encoding order of the connectivity information. This method implicitly embeds the vertex order of the connectivity encoding in the vertex order of the geometry information, avoiding the need to transmit the vertex order of the connectivity encoding separately, thereby saving this bit overhead.
[0050] (2)Edgebreaker
[0051] The Edgebreaker method (EB) is a 3D mesh connectivity encoding method with advantages such as good compression performance, ease of implementation, and an upper limit on compression ratios. The Edgebreaker method itself only describes how to compress 3D mesh connectivity information; further compression of the 3D mesh requires additional techniques such as geometric compression and entropy coding.
[0052] Edgebreaker encoding can compress triangular meshes that are homeomorphic to a sphere to a compression efficiency of 2 bits per triangle or less. 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 labeled according to the mode it is in, generating a CLERS string that provides a compact representation of the mesh's connectivity.
[0053] Figure 1 shows the five modes of the Edgebreaker method. The Edgebreaker method divides the mesh into a traversed portion and an untraversed portion, with the boundary between the two portions being called the active boundary. During the Edgebreaker encoding process, the triangle to be traversed is accessed through the active edges on the active boundary, and the mode to be used is determined based on the relationship between the active edge and the triangle in which it resides. The other vertex in the triangle containing the active edge is called the third vertex. If the third vertex is not on the active boundary, the current triangle is marked in C mode. If the third vertex is on the active boundary and is the next vertex of the current active edge in counterclockwise order, the current triangle is marked in R mode. If the third vertex is on the active boundary and is the previous vertex of the current active edge in counterclockwise order, the current triangle is marked in L mode. If the third vertex is on the active boundary and is both the previous vertex and the next vertex of the current active edge in counterclockwise order, the current triangle is marked in E mode. If the third vertex is on the active edge, but is neither the previous vertex nor the next vertex of the current active edge in counterclockwise order, then the current triangle is marked as S mode.
[0054] After marking each triangle, 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 achieve higher compression efficiency.
[0055] Figure 2 shows a schematic diagram of a two-dimensional grid using EB coding. According to the EB coding rules, the final entropy coding pattern codeword is CCRRSLCRSERRELCRRRCRRRE.
[0056] 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.
[0057] To address the above-mentioned drawbacks, embodiments of the present invention provide a three-dimensional mesh lossless encoding method and apparatus based on Edgebreaker, and correspondingly propose a three-dimensional mesh lossless decoding method and apparatus.
[0058] It should be noted that the execution body of the 3D mesh lossless encoding method / apparatus and the 3D mesh lossless decoding method / apparatus provided in the embodiments of the present invention can be run in an electronic device. The electronic device can be a server or a terminal device, but is not limited thereto.
[0059] 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. As shown in FIG3 , the method includes:
[0060] Scode1, encodes the three-dimensional grid to obtain the encoded information code stream;
[0061] Scode2, decodes the coded information stream to obtain the reconstructed 3D mesh;
[0062] Scode3 compares the 3D mesh with the reconstructed 3D mesh to obtain mesh difference information, encodes the mesh difference information, and obtains a mesh difference information code stream.
[0063] Each step is described below.
[0064] 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 given as an example below, as shown in Figure 4. The coding framework may include processing links such as merging duplicate points, splitting non-manifold structures, grid coding, grid decoding, restoring non-manifold structures, restoring duplicate points, comparing grids, grid adjustment information coding, and texture map coding. It should be noted that the coding framework of the embodiment of the present invention may also include other processing links required for coding such as adding virtual points, which are not specifically limited here. The input grid in Figure 4 is a three-dimensional grid. Among them, merging duplicate points and splitting non-manifold structures can be combined as preprocessing. Some processing links such as preprocessing in Figure 4 may not necessarily exist, and the specific needs need to be determined based on the actual situation of the input three-dimensional grid.
[0065] For Scode1, encoding a three-dimensional grid can correspond to the process from pre-processing to grid encoding in Figure 4. The encoded information code stream can correspond to the grid code stream in Figure 4.
[0066] In an optional implementation, encoding the three-dimensional grid may include:
[0067] Encodes the geometric connectivity, geometric information and attribute connectivity of 3D meshes.
[0068] For ease of understanding, please refer to the schematic diagram of the mesh coding framework shown in Figure 5. Encoding geometric connectivity relationships and encoding attribute connectivity relationships are considered connectivity relationship encoding, while encoding geometric information is considered geometric information encoding. Of course, the processing steps for encoding a 3D mesh in the embodiments of the present invention are not limited to those shown above; for example, they may also include attribute information encoding and non-manifold structure information encoding as shown in Figure 5. It should be noted that the embodiments of the present invention do not restrict the order in which the 3D mesh connectivity relationship encoding and the remaining information are encoded. Geometric information, attribute information, and non-manifold structure information may be encoded simultaneously with the connectivity relationship encoding, or geometric information, attribute information, and non-manifold structure information may be encoded sequentially according to the connectivity relationship encoding order after the connectivity relationship encoding is completed. Both are reasonable. Furthermore, when encoding the geometric and attribute information of vertices, the geometric and attribute information of duplicate points generated by non-manifold removal may be encoded only once or multiple times. The encoding method for the geometric and attribute information of duplicate points generated by non-manifold removal is not limited here; please refer to the following description for details.
[0069] 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.
[0070] The following describes each processing step in FIG4 .
[0071] (1) Merge duplicate points
[0072] In a 3D mesh, there are many geometrically duplicated points in the mesh due to the presence of vertices with the same geometric coordinates but different texture coordinates at the texture boundary. Therefore, filtering out these duplicated points can significantly improve the encoding efficiency of geometric information.
[0073] In an embodiment of the present invention, the process of encoding geometric information of a three-dimensional mesh may include:
[0074] When there are geometrically duplicated points in the 3D grid, the duplicated points are merged to obtain a deduplicated grid.
[0075] Based on whether the merging of duplicate points has been performed, information indicating whether the merging of duplicate points has been performed is obtained and encoded.
[0076] Please refer to the duplicate point merging process in Figure 4 to understand that the above process may include:
[0077] 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.
[0078] 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 index in the connection relationship is adjusted.
[0079] Finally, based on whether duplicate point merging has been performed, information indicating whether duplicate point merging has been performed is obtained. This information indicating whether duplicate point merging has been performed can be encoded immediately or later, such as during a processing step such as geometric information encoding, without limitation herein. The information indicating whether duplicate point merging has been performed can be an identifier, such as an identifier represented by a numerical value of 0 or 1, with 0 indicating that duplicate point merging has not been performed and 1 indicating that duplicate point merging has been performed. Of course, the form of the information indicating whether duplicate point merging has been performed is not limited to this.
[0080] In addition to the recorded information indicating whether the duplicate point merging process has been performed, after the 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.
[0081] 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 out 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 performed immediately after obtaining it or in a subsequent encoding implementation, such as encoding during processing steps such as geometric information encoding. Another way is to retain the duplicate points of texture coordinates at the encoding end and restore the duplicate points at the decoding end based on the attribute connection relationship as a reference, without encoding the duplicate point identifier. The embodiments of the present invention do not limit the representation method of duplicate points.
[0082] (2) Splitting non-manifold structures
[0083] The current mesh input to the non-manifold structure splitting process can be either an input mesh that has not been processed for duplicate point merging or a mesh that has been processed for duplicate point merging. The current mesh may contain non-manifold points and non-manifold edges, and needs to be converted to a manifold mesh. Specifically, referring to the non-manifold structure splitting process in FIG4 , the process of encoding the connectivity of the 3D mesh may include:
[0084] 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;
[0085] Before splitting the non-manifold structure, it is determined whether the geometric information and attribute information in the current grid have the same connection relationship and the information is recorded.
[0086] 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.
[0087] 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 and UV triangles, that is, the geometric connection relationship and UV connection relationship, are consistent. If the geometric triangles and UV triangles are inconsistent, the geometric vertices and UV vertices have different connection relationships. If the number of geometric vertices and the number of UV vertices are inconsistent, but the number of geometric triangles and the number of UV triangles are consistent, then the geometric vertices and UV vertices also have different connection relationships. The above determination method in the embodiment of the present invention is only an example and is not intended to be limiting. Other determination methods may also be used.
[0088] The information indicating whether the geometric information and attribute information in a mesh have the same connection relationship can also be in the form of a similar identifier as described above, or can also be indicated by the presence of difference information between the attribute connection relationship and the geometric connection relationship. If the difference information exists, the geometric information and attribute information have different connection relationships; if the difference information does not exist, the geometric information and attribute information have the same connection relationship. There is no restriction on the representation form of this indication information. The information indicating whether the geometric information and attribute information in a mesh have the same connection relationship can be encoded immediately or during processing steps such as connection relationship encoding.
[0089] 2) determining whether to perform non-manifold structure splitting processing on the current grid based on whether a non-manifold structure exists, recording and encoding information indicating whether the non-manifold structure splitting processing has been performed;
[0090] 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 non-manifold structure splitting process can be used to represent it. If the number is 0, it indicates that the non-manifold structure splitting process has not been performed, and the number is greater than 0, it indicates 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.
[0091] It can be understood that the information indicating whether the non-manifold structure splitting process has been performed can also be described as information indicating whether the non-manifold structure exists.
[0092] 3) After the non-manifold structure exists and has been split, the non-manifold splitting related information is recorded and encoded;
[0093] The information related to the non-manifold removal includes the non-manifold identification of the vertex and the index information of the duplicate points generated by the non-manifold removal. The encoding of the information related to the non-manifold removal can be performed in the non-manifold structure information encoding processing stage.
[0094] When determining that a non-manifold structure is present, the current mesh is subjected to corresponding non-manifold structure splitting processing based on information indicating whether the geometric information and attribute information in the mesh have the same connection relationship, thereby obtaining a manifold mesh; and the non-manifold splitting related information is recorded;
[0095] 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 different situations according to whether the geometric information and attribute information in the current grid have the same connection relationship. Specifically:
[0096] Case 1: 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 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 the vertices generated by the process are recorded;
[0097] 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.
[0098] The following first describes the process of splitting non-manifold structures. This process can be divided into splitting non-manifold edges and splitting non-manifold points.
[0099] The process of splitting non-manifold edges may include A1 to A3:
[0100] A1, build the preset data structure of the current grid;
[0101] 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;
[0102] A2, find the non-manifold edges of the current grid based on the preset data structure;
[0103] Specifically, the condition for determining a non-manifold edge is that an edge exists in three or more triangles simultaneously. The specific determination method can be implemented based on a constructed preset data structure. For example, one method 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 method can be that A1 constructs a CornerTable data structure to establish a correspondence between angles and edges in the mesh, and A2 uses it to find non-manifold edges. Specifically, for a manifold mesh, each edge is opposite to at most two angles, and the two opposite angles are called opposite angles. As shown in Figure 6, angle a and angle d are opposite to edge bc, and angle a and angle d are opposite angles; for non-manifold edges, there will be three or more opposite angles. Therefore, non-manifold edges can also be found through the correspondence between angles and edges. Of course, the method for determining non-manifold edges in the embodiment of the present invention is not limited to the above.
[0104] A3: For each non-manifold edge, create a duplicate vertex with the same geometric and attribute information for each of the two vertices of the non-manifold edge. Select a triangle containing the non-manifold edge, so that the third vertex of the triangle and the two newly added vertices form a new triangle. Replace the original triangle with the new triangle, converting the non-manifold edge into a manifold edge.
[0105] This step adds vertices and modifies the connectivity. Iterate steps A2 to A3 until all non-manifold edges in the current mesh are converted to manifold edges.
[0106] The process of splitting non-manifold points can include B1 to B3:
[0107] B1, build the CornerTable data structure of the current grid;
[0108] To split non-manifold points, we first need to build a CornerTable data structure to establish the correspondence between each vertex and the corner of the vertex.
[0109] B2, based on the correspondence between vertices and vertex corners in the CornerTable data structure, find the non-manifold points in the current grid by traversing the vertex corners;
[0110] Specifically, a two-step process is performed for each vertex. The first step is to start at a corner of the vertex and sequentially traverse all corners adjacent to that corner that form a sector, marking the vertex and the traversed corners as traversed. If, after completing the above process, a vertex still has untraversed corners, it is considered a non-manifold point.
[0111] B3: For each non-manifold point, create a duplicate vertex with the same geometric and attribute information and modify the connection relationship. Connect the untraversed corners to the newly added duplicate vertex, splitting the non-manifold point into two manifold vertices. After all non-manifold points are converted into manifold points, a manifold mesh is obtained.
[0112] 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 to manifold points.
[0113] As mentioned above, if the geometric information and attribute information in the current grid have the same connection relationship, the above-mentioned process of splitting the non-manifold structure is performed on the current grid once 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 grid have different connection relationships, the above-mentioned process of splitting the non-manifold structure is performed on the geometric information and attribute information in the current grid respectively to obtain a manifold mesh, and a set of duplicate point index information and non-manifold identification of the vertices generated by the splitting non-manifold 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.
[0114] The embodiment of the present invention does not limit the representation method of duplicate point index information, for example, duplicate point group index: points with the same index belong to the same duplicate point group, ie, have the same vertex information.
[0115] (3) Grid coding
[0116] The following describes each encoding step in conjunction with FIG5 .
[0117] ① Connection relationship coding
[0118] 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.
[0119] 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.
[0120] This step establishes a CornerTable data structure to represent the connectivity of the mesh, and uses CornerTable to traverse all triangles in the mesh to generate the Edgebreaker CLERS pattern string.
[0121] 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 triangles in the mesh, and number the corners of each triangle in counterclockwise order. If the mesh has f triangles, then the mesh will have 3f corners. The advantage of this numbering is that the sequence number of the triangle where the current corner is located can be calculated through the sequence number of the corner, as shown in formula 1; you can also calculate the previous corner c in the counterclockwise direction of the current corner c. p and the next angle c n The serial number is shown in Equation 2 and Equation 3. i =c / 3 (1)
[0122] Among them, c is the index of the current angle, f i is the number of the triangle where the current angle c is located. " / " is integer division, and the result is rounded down. p =(f i *3)+(c-1)%3 (2)
[0123] Among them, "*" is multiplication and "%" is modulo operation. n =(f i *3)+(c+1)%3 (3)
[0124] CornerTable consists of four parts: V-table, O-table, U-table, and M-table. 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 flags of whether each triangle has been traversed during the traversal process, and the M-table stores the flags of whether each vertex has been traversed during the traversal process.
[0125] CornerTable can be used to construct the relationship shown in Figure 7, where c represents the current corner, cp represents the previous corner of the current corner c (counterclockwise), and cn represents the next corner of the current corner c. co is the opposite corner of the current corner c, which can be obtained by querying the O table. ct is the serial number of the triangle in which c is located, which can be calculated using formula (1). cv represents the vertex of the current corner, which can be obtained by querying the V table. cl represents the corner to the left of the current corner c, which can be obtained by querying the opposite corner of cp in the O table; cr represents the corner to the right of the current corner c, which can be obtained by querying the opposite corner of cn in the O table.
[0126] After using CornerTable to establish the relationships between corners, vertices, and triangles, we can traverse the mesh in a spiral order to obtain the Edgebreaker CLERS pattern string representing the mesh connectivity. The judgment conditions and traversal rules for the five patterns are shown in Figure 8. The currently 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, and the triangles where xl and xr are located have not been visited, then the current triangle is in S mode. At this time, the traversal path will produce two branches. The depth-first traversal principle is adopted. The first triangle traversed is the triangle where xr is located, and the triangle where xl is located is stored in the stack. After waiting for the branch where xr is located to be traversed, 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 end point of the current traversal path branch has been traversed.
[0127] 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.
[0128] 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.
[0129] If the information indicating whether the geometric information and the attribute information in the mesh have the same connection relationship indicates that the geometric information and the attribute information in the current mesh have the same connection relationship, the connection relationship encoding process is performed once.
[0130] 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, then the geometric connection relationship and the attribute connection relationship need to be encoded separately. 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 the same and corresponding, it is just that the corresponding geometric vertex index and texture vertex index are not one-to-one corresponding. Therefore, it is only necessary to construct a CLERS pattern string once based on 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 traversed corners are traversed, and the difference information between 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.
[0131] The connection relationship encoding may further include encoding information indicating whether the geometric information and attribute information in the mesh have the same connection relationship, information indicating whether the non-manifold structure has been split, information related to the non-manifold split, etc. The encoding method is not limited here.
[0132] After the connection relationship coding is completed, the connection information code stream and the connection relationship coding order can be obtained.
[0133] ②Geometric information encoding
[0134] The geometric information encoding can be realized based on the geometric information and connection relationship encoding order of the manifold mesh.
[0135] 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.
[0136] Take the parallelogram predictive coding algorithm as an example: there are four vertices a, b, c, and d, which constitute two adjacent triangles in the grid shown in FIG9 .
[0137] In Figure 9, the geometric information of points a, b, and c has been encoded, and the geometric information of point d is yet to be encoded. Then, the predicted value d' of the geometric coordinates of point d can be calculated using equation (4). d'(x,y,z)=b(x,y,z)+c(x,y,z)-a(x,y,z) (4)
[0138] Where (x, y, z) represents the geometric coordinates. After obtaining d', calculate the difference between d' and the three-dimensional coordinates of point d, as shown in Equation 5: Δd(x, y, z) = d(x, y, z) - d'(x, y, z) (5)
[0139] Performing entropy coding on Δd can obtain a geometric information code stream.
[0140] For triangles that cannot be predicted using parallelograms, such as triangles at the boundary of the mesh, the difference coding method can be used to encode geometric information, that is, the coordinate values of adjacent encoded vertices are used as the predicted values of the current vertex coordinates, and the residuals are calculated and predicted.
[0141] The geometric information encoding may further include encoding information indicating whether duplicate point merging has been performed, duplicate point identifiers, etc. The encoding method is not limited here.
[0142] After the geometric information coding is completed, the geometric information code stream and the geometric coding order can be obtained.
[0143] ③ Attribute information encoding
[0144] Attribute information encoding can be achieved based on the attribute information and connection relationship encoding order of the manifold mesh.
[0145] Attribute information for a 3D mesh typically includes UV coordinates, normal vectors, and other information. If a mesh has such attribute information, it can be encoded. Taking UV coordinates as an example, there are many encoding methods available, including differential prediction coding, parallelogram prediction coding, and similar triangle prediction coding. The present invention does not limit specific encoding methods. The following uses the similar triangle prediction algorithm as an example for illustration.
[0146] 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 a set and predict the UV coordinates of the vertex opposite to τ 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 the edge τ be N and P respectively, the opposite vertex of the triangle adjacent to the new triangle through τ be O, and the projection point of C on τ be X. As shown in Figure 10, 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:
[0147] 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.
[0148] First calculate the UV coordinate of point X:
[0149] Calculating vectors Rotated() means flipping the vector 90 degrees:
[0150] 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.
[0151] Finally calculate the predicted UV coordinates of point C pred c :
[0152] in, and Both represent the vector of the UV coordinates between point C and point O, but are calculated and expressed in different ways.
[0153] After obtaining the UV coordinate prediction value, subtract it from the original UV coordinate to obtain the residual value.
[0154] The steps to encode UV coordinates are as follows:
[0155] Step 1) Select an initial triangle from the connection relationship and directly encode the UV coordinates of the three vertices of the initial triangle without prediction. Store the edges of the initial triangle in the edge set.
[0156] In 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 3D-to-2D projection relationship of the triangle, 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.
[0157] In step 3), add the two edges of the new triangle to the edge set and remove the edge τ at the top of the set. Then, take the next edge from the set and continue encoding the UV coordinates of the opposite vertex of the triangle adjacent to that edge. Return to step 3) until the UV coordinates of all vertices are encoded.
[0158] Step 4), entropy encode the UV coordinate residual and output the UV coordinate code stream.
[0159] After the attribute information is encoded, the attribute information code stream and the attribute encoding order can be obtained.
[0160] ④ Non-manifold structural information encoding
[0161] Non-manifold structural information encoding can be achieved based on attribute encoding order and geometric encoding order.
[0162] This process may include:
[0163] 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.
[0164] Among them, 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 processed for non-manifold structure splitting, that is, there is no non-manifold structure, there is no need to further encode the non-manifold identifiers of the vertices in the non-manifold related information and the duplicate point index information generated by the non-manifold splitting; if the information indicating whether the non-manifold structure splitting process has been performed indicates that the mesh has been processed for non-manifold structure splitting, that is, there is a non-manifold structure, then it is necessary to encode the non-manifold identifiers of the vertices in the non-manifold related information and the duplicate point index information generated by the non-manifold splitting, but it needs to be done based on different situations of the information indicating whether the geometric information and attribute information in the mesh have the same connection relationship.
[0165] Among them, the information indicating whether the non-manifold structure splitting process has been performed can be represented by setting a flag indicating whether the non-manifold structure splitting process has been performed: if the non-manifold structure splitting process has not been performed, the flag is set to 0, and there is no need to encode the non-manifold flag of the vertex and the index information of the repeated points generated by splitting the non-manifold; if the non-manifold structure splitting process has been performed, the flag is set to 1, and then the non-manifold flag of the vertex and the index information of the 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 flags or the number of repeated points generated by splitting the non-manifold. If the number is 0, it indicates that the non-manifold structure splitting process has not been performed. If the number is greater than 0, it indicates that the non-manifold structure splitting process has been performed. The representation method of the information indicating whether the non-manifold structure splitting process has been performed is not limited here.
[0166] 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 mesh 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:
[0167] Case 1: If the geometric information and attribute information in the indicated mesh have the same connectivity, then the non-manifold identifier of a set of vertices and the index information of duplicate points generated by decomposing the non-manifold are encoded;
[0168] In this case, the geometric information and attribute information in the grid have the same connection relationship, that is, the geometric coordinates and attribute coordinates are in a one-to-one correspondence. At this time, the non-manifold identifier of a group of vertices and the index information of repeated points 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.
[0169] A specific implementation method may be to set a flag bit for each vertex in the manifold mesh to indicate whether the current point is a duplicate point generated by non-manifold removal, and to encode the index information of the duplicate points generated by non-manifold removal. Then, entropy coding is performed on the binary string sequence of flag bits and the index information of the duplicate points generated by non-manifold removal, arranged in the corresponding coding order, to obtain a non-manifold structure information code stream.
[0170] Case 2: If the geometric information and attribute information in the indicated mesh have different connection relationships, the non-manifold identifier of a group of vertices and the duplicate point index information generated by removing the non-manifold are encoded for the geometric information and attribute information respectively.
[0171] This situation is that the geometric information and attribute information in the grid have different connection relationships, that is, the geometric coordinates and 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.
[0172] A specific implementation method may be to set a flag 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 non-manifold decomposition, and to encode the index information of the geometric duplicate points and the attribute duplicate points generated by non-manifold decomposition. Then, entropy coding is performed on the binary string sequence of flag bits and the index information of the duplicate points generated by non-manifold decomposition, arranged in the corresponding coding order. After the non-manifold structure information is encoded, a non-manifold structure information bitstream is obtained.
[0173] In embodiments of the present invention, the non-manifold structure information bitstream can be stored in a variety of ways within the total bitstream: one is to store the non-manifold structure information bitstream as a separate sub-bitstream; another is to store the geometric non-manifold structure information bitstream within the geometric information bitstream and the attribute non-manifold structure information bitstream within the attribute information bitstream; and further, the geometric non-manifold structure information bitstream and the attribute non-manifold structure information bitstream can be stored as two bitstreams within the total bitstream. Embodiments of the present invention do not limit the storage method of the non-manifold structure information bitstream within the total bitstream.
[0174] It is understandable that the connection information code stream, geometric information code stream, attribute information code stream and non-manifold structure information code stream can be mixed into the total code stream, that is, the coding information code stream in Scode1, which is also the grid code stream in Figure 4.
[0175] (4) Grid decoding
[0176] The process of mesh decoding, restoring non-manifold structure, and recovering duplicate points corresponds to the process of decoding the coded information bitstream in Scode2 to reconstruct the 3D mesh. As shown in Figure 4, mesh decoding results in a reconstructed manifold mesh. Restoring non-manifold structure yields a reconstructed deduplicated mesh, while recovering duplicate points yields a reconstructed mesh. This reconstructed mesh is the 3D mesh obtained by Scode2.
[0177] Decode the encoded information stream, including:
[0178] Decoding the geometric connectivity, geometric information, and attribute connectivity of the 3D mesh, including decoding the attribute information and non-manifold structure information of the 3D mesh.
[0179] 1) Decoding the connection relationship
[0180] This step is to implement the decoding of the connection relationship code stream.
[0181] First, information indicating whether the geometric information and attribute information in the grid have the same connection relationship can be decoded. Furthermore, information indicating whether the non-manifold structure splitting processing has been performed, information related to the non-manifold splitting, etc. can also be decoded, or these related information about the non-manifold splitting can also be obtained in the non-manifold structure information decoding.
[0182] 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.
[0183] 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.
[0184] If the geometric information and attribute information have the same connectivity, only one set of connectivity needs to be reconstructed. If the geometric information and attribute information have different connectivity, taking the attribute information as texture coordinates as an example, an optional implementation method can first reconstruct the geometric connectivity based on the decoded pattern string, and then traverse the corners in the currently decoded connected area and the difference between the texture connectivity and the geometric connectivity in the currently decoded connected area to reconstruct the texture connectivity. In addition, the vertex traversal order is provided to the geometric information decoding and attribute information decoding processing steps. Of course, the above method is an optional example of how to decode and reconstruct the attribute connectivity.
[0185] 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.
[0186] 2) Decoding geometric information
[0187] Geometric information decoding is to decode the geometric information code stream, which can be achieved by using the connection relationship decoding order.
[0188] 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.
[0189] 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 obtained by entropy decoding; then, the predicted coordinates of the point to be decoded are predicted according to the parallelogram law based on the decoded triangle; the predicted coordinates are added to the residual value obtained by entropy decoding to obtain the geometric coordinate position 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 the geometric coordinates of the triangle are decoded, 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. There is no restriction on the specific decoding method, as long as it corresponds to the encoding end.
[0190] By decoding the geometric information, the geometric information of the manifold mesh can be obtained.
[0191] 3) Decoding attribute information
[0192] Attribute information decoding is to decode the attribute information code stream, which can be achieved by using the connection relationship decoding order.
[0193] 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 following describes the decoding process using the similar triangle prediction algorithm.
[0194] The steps to decode UV coordinates are as follows:
[0195] Step 1: Entropy decode the UV coordinate code stream.
[0196] Step 2: Decode the UV coordinates of the three vertices of the initial triangle. Predictions are not calculated here; the initial triangle directly encodes its UV coordinates instead of encoding the residual. Store the edges of the initial triangle in the edge set.
[0197] In step 3, edge τ is selected from the set according to the access criteria, and the UV coordinates of the vertices of the new triangle formed with τ are decoded. First, the UV coordinate prediction value of the point to be decoded is calculated using the same calculation method as the encoder, using the 3D-to-2D triangle mapping relationship. The predicted value is then added to the residual error from entropy decoding to obtain the reconstructed UV coordinate.
[0198] Step 4: Add the two edges of the new triangle to the edge set and remove the top edge τ. Take the next edge from the set and continue decoding the UV coordinates of the opposite vertex of the triangle adjacent to that edge. Return to step 3 until the UV coordinates of all vertices are decoded.
[0199] By decoding the attribute information, the attribute information of the manifold mesh reconstruction can be obtained.
[0200] 4) Decoding non-manifold structural information
[0201] 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.
[0202] Specifically, first, the information indicating whether the non-manifold structure has been split is obtained by decoding. For example, the information indicating whether the non-manifold structure has been split 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 the non-manifold split, 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.
[0203] When decoding information related to non-manifold decomposition, 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. This part of the decoding adopts the same method as the encoding, and is divided into two cases based on whether the geometric information and attribute information have the same connection relationship:
[0204] If the geometric information and attribute information have the same connectivity, entropy decoding is used to obtain the non-manifold identifiers of a set of vertices and the index information of duplicate points generated by removing the non-manifolds. If the geometric information and attribute information have different connectivity, entropy decoding is used to obtain the non-manifold identifiers of the geometric vertices and the index information of duplicate geometric points generated by removing the non-manifolds, and the non-manifold identifiers of the attribute vertices and the index information of duplicate attribute points generated by removing the non-manifolds. This information is recorded and output to the non-manifold structure recovery process.
[0205] (5) Restoring non-manifold structures
[0206] Regarding the trellis decoding process described above, decoding the encoded information stream may include:
[0207] Decoding and reconstructing the connection relationship, and determining whether to perform non-manifold structure restoration processing based on information obtained by decoding indicating whether the splitting non-manifold structure processing has been performed;
[0208] 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 demolition related information obtained by decoding.
[0209] Then, during the non-manifold structure recovery process, recovery can be performed based on the decoded information. Specifically, when determining to perform non-manifold structure recovery, the non-manifold structure is restored based on the decoded non-manifold disassembly related information. The decoded non-manifold disassembly related information includes the non-manifold identifiers of the vertices and the index information of the duplicate points generated by the non-manifold disassembly.
[0210] Specifically, the recovery process for non-manifold edges and non-manifold points is the same. For example, using the duplicate point index information generated by splitting a non-manifold as the duplicate point group index, we can first traverse all vertices in the order in which they were decoded. Based on the non-manifold identifiers of the vertices, we create a hash table. 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 non-manifold splitting, the current vertex corresponds to the current vertex's index, meaning its index is not updated. If the current vertex is a duplicate point generated by non-manifold splitting and is the target vertex to be merged into its duplicate point group, the current vertex corresponds to the current vertex's index, meaning its index is not updated. 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 non-manifold splitting but is not the target vertex to be merged into its duplicate point group, the hash table is searched for the index of the target vertex to be merged into in the reconstructed manifold mesh based on the duplicate point group index of the current vertex to merge into the duplicate point group. This operation is then performed to merge the duplicate points generated by non-manifold splitting, meaning the current vertex index is updated to the index of the target vertex to be merged into. Finally, the geometric coordinate list and attribute coordinate list are updated, and the indices of the geometric vertices and attribute vertices in the connection relationship are updated to obtain the reconstructed non-manifold mesh.
[0211] 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. This part of the decoding adopts the same method as the encoding, and is divided into two cases based on whether the geometric information and attribute information have the same connection relationship:
[0212] If the geometric information and attribute information have the same connection relationship, the above process is executed once to obtain a non-manifold mesh with the same connection relationship between the reconstructed geometric information and attribute information; if the geometric information and attribute information have different connection relationships, the geometric vertices and attribute vertices are traversed in the decoding order of the geometric vertices and 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 attribute vertices respectively, and the index information of the geometric duplicate points generated by disassembling 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 disassembling 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 judgment and merging operations of the duplicate points generated by disassembling the non-manifold are performed 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 with different connection relationships between the reconstructed geometric information and attribute information.
[0213] (6) Restore duplicate points
[0214] Regarding the trellis decoding process described above, decoding the encoded information stream may include:
[0215] Decode the geometric information, and based on the information obtained by decoding indicating whether the duplicate point merging process has been performed, when it is indicated that the duplicate point recovery process needs to be performed, restore the geometric duplicate points according to the attribute connection relationship obtained by decoding.
[0216] Then, in the process of restoring the non-manifold structure, restoration can be performed based on the decoded information.
[0217] The information indicating whether the duplicate point merging process has been performed can be decoded and obtained before this processing step.
[0218] If the bitstream contains a duplicate point identification bitstream, the duplicate point identification bitstream is decoded. Based on the duplicate point identification, duplicate vertices are generated and the connection relationship is adjusted to obtain a reconstructed mesh. If the bitstream does not contain a duplicate point identification bitstream, the duplicate points are restored based on the correspondence between geometric vertices and texture vertices.
[0219] Restoring duplicate points based on the correspondence between geometric vertices and texture vertices essentially restores the one-to-one correspondence between geometric vertices and texture vertices. This is done in two steps: first, in the connection relationship, find a vertex where a geometric vertex corresponds to multiple texture coordinates; then, create a duplicate point for this geometric vertex and update the index of the geometric vertex in the connection relationship.
[0220] Specifically, based on the connection relationship, a correspondence between geometric vertices and texture vertices is established. Then, all geometric vertices are traversed. If a geometric vertex corresponds to multiple texture vertices, geometric vertices with the same coordinate values are created and the geometric connection relationship is updated to ensure a one-to-one correspondence between geometric vertices and texture vertices, thus recovering the geometric duplicate points in the mesh.
[0221] (7) Comparison grid
[0222] The mesh comparison and mesh adjustment information encoding process corresponds to the process in Scode3 of comparing the 3D mesh with the reconstructed 3D mesh, obtaining mesh difference information, encoding this mesh difference information, and generating a mesh difference information code stream. For more information, please refer to Figure 4 for the mesh comparison and mesh adjustment information encoding process. The mesh adjustment information in Figure 4 is the mesh difference information.
[0223] The grid comparison can be performed based on the input grid, the reconstructed grid and the connection relationship encoding sequence.
[0224] The processing step may include: performing grid comparison processing on the input grid and the reconstructed grid, obtaining information indicating whether there is a grid difference and encoding it, and obtaining grid difference representation information when there is a grid difference, so as to adjust the reconstructed grid based on the information at the decoding end to obtain a lossless decoded grid that is exactly the same as the original three-dimensional grid.
[0225] Therefore, the grid difference information includes:
[0226] Information indicating whether a grid difference exists; and, if a grid difference exists, additional grid difference representation information. The information indicating whether a grid difference exists can also be implemented using the identifier described above, which is not detailed here. Alternatively, the indication information can be represented by the size of a list of grid difference representation information. If the list size is 0, it indicates that no grid difference information exists; if the list size is greater than 0, it indicates that grid difference information exists. Of course, the representation is not limited to this, and the encoding method is not limited here.
[0227] The comparison of the 3D mesh and the reconstructed 3D mesh includes:
[0228] The three-dimensional meshes are 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.
[0229] 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.
[0230] 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 3D mesh with the number of repetitions in the original 3D mesh. If the number of repetitions of a certain geometric coordinate in the original 3D mesh is greater than the number of repetitions of the coordinate in the reconstructed 3D mesh, add a new duplicate point to the reconstructed 3D 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 3D mesh is less than the number of repetitions of the coordinate in the reconstructed 3D mesh, delete the redundant duplicate points in the reconstructed 3D 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. You can delete the vertices immediately, or you can first record the vertices to be deleted and then, after comparing the connection relationship differences, delete all the vertices to be deleted. 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.
[0231] 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 a matching relationship between the vertices of the reconstructed 3D mesh and the original 3D mesh: for vertices that do not have geometric duplicate points, the matching relationship between the vertex 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, the vertex matching relationship is determined by comparing whether the facets connected to each duplicate point in the original 3D mesh and the reconstructed 3D mesh correspond to each other.
[0232] If the facets connected by a repeated point A in the original 3D mesh and the facets connected by a repeated point B in the reconstructed 3D mesh both correspond, then point A and point B are matched. If a repeated point A in the original 3D mesh does not match any of the repeated points in the reconstructed 3D mesh, then a certain unmatched repeated point in the reconstructed 3D mesh is assigned to match point A according to a certain rule (this rule does not limit vertex selection). After comparing the number of geometric vertices, the number of repeated points corresponding to each geometric coordinate in the reconstructed 3D mesh is equal to the number of repeated points in the original 3D mesh. Therefore, according to the above method, each vertex in the reconstructed 3D mesh can be matched to a vertex in the original mesh. After establishing the facet correspondence and vertex matching relationship between the original 3D mesh and the reconstructed 3D mesh, the vertex index in each facet in the original 3D mesh is compared to see if there is a difference between the index of the vertex in the corresponding facet in the reconstructed 3D mesh. If there is a difference, 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.
[0233] After the mesh comparison process, at least one or more of the following can be obtained: an added vertex index list, a deleted vertex index list, and a connection relationship modification information list. The mesh difference information includes one or more of these: an added vertex index list, a deleted vertex index list, and a connection relationship modification information list. Of course, the content of the mesh difference information is not limited to the above.
[0234] (8) Grid adjustment information encoding
[0235] The processing step 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 a grid difference exists.
[0236] 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. This is all reasonable.
[0237] (9) Texture image encoding
[0238] The texture map of the input grid is texture-encoded to obtain a texture code stream. A video encoder may be used to encode the texture map, and the specific encoding method is not limited.
[0239] It is understandable that an output stream can be obtained based on the mixing of various streams to be transmitted to the decoding end.
[0240] The 3D mesh lossless encoding method provided by the embodiments of the present invention first encodes the 3D mesh to obtain an encoded information stream; then, decodes the encoded information stream to obtain a reconstructed 3D mesh; and finally, compares the 3D mesh with the reconstructed 3D mesh to obtain mesh difference information, which is then encoded to obtain a mesh difference information stream. By comparing the 3D mesh with the reconstructed 3D mesh and encoding the mesh difference information, special cases such as the need to add or delete vertices or adjust connectivity can be handled, thereby achieving complete lossless encoding.
[0241] Furthermore, embodiments of the present invention can achieve more efficient mesh encoding by merging duplicate points and mesh encoding and decoding, and restoring duplicate points. By splitting non-manifold structures and mesh encoding and decoding, and restoring non-manifold structures, non-manifold meshes can be losslessly encoded using the Edgebreaker algorithm. In summary, embodiments of the present invention can achieve complete and lossless mesh encoding when encoding any mesh containing duplicate points, non-manifold structures, or geometric information and attribute information with different connection relationships.
[0242] 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, as shown in FIG11 , comprising:
[0243] An encoding module, used for encoding the three-dimensional grid to obtain an encoded information code stream;
[0244] A decoding module, used for decoding the coded information stream to obtain a reconstructed three-dimensional mesh;
[0245] 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.
[0246] 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, and will not be repeated here.
[0247] 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, as shown in FIG12 , and includes:
[0248] Sdecode1, decodes the coded information stream to obtain the reconstructed 3D mesh;
[0249] Sdecode2, decodes the grid difference information code stream to obtain the grid difference information;
[0250] Sdecode3 obtains the decoded 3D mesh based on the reconstructed 3D mesh and mesh difference information.
[0251] To facilitate understanding of the three-dimensional mesh lossless decoding method according to an embodiment of the present invention, FIG13 shows a three-dimensional mesh lossless decoding framework. The input code stream is the code stream transmitted from the encoding end. Decoding the input code stream can obtain the various code streams therein, including the encoding information code stream, the mesh difference information code stream, and the texture map code stream. The compressed mesh code stream in FIG13 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 ease of explanation, FIG13 only lists the main processing steps, including mesh decoding, restoring non-manifold structure, restoring repeated points, mesh adjustment information decoding, adjusting and reconstructing the mesh, and texture map decoding. Corresponding to the encoding end, some processing steps in the decoding framework may not necessarily exist and need to be determined based on the decoding situation.
[0252] This decoding framework can more efficiently and completely implement lossless decoding of arbitrary grids containing repeated points, non-manifold structures, and grids with different geometric and attribute connectivity.
[0253] 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 grid difference information code stream, and a texture map code stream, etc. For Sdecode1, the coding information code stream is decoded to obtain a reconstructed three-dimensional grid. This part corresponds to the process of grid decoding, restoring non-manifold structure, and restoring repeated points in Figure 13. You can refer 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 for understanding. 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.
[0254] Specifically, the trellis decoding framework of the embodiments of the present invention is illustrated in Figure 14 . At the decoding end, the compressed trellis code stream input on the left side of Figure 14 is the coded information code stream. Decoding this code stream yields a connection information code stream, a geometry information code stream, an attribute information code stream, and a non-manifold structure information code stream. The processing steps within this trellis decoding framework include connection relationship decoding, geometry information decoding, attribute information decoding, non-manifold structure information decoding, and manifold trellis reconstruction. Of course, some processing steps or code streams may not exist.
[0255] The decoded coded information stream in Sdecode1 may include at least:
[0256] Decoding the geometric connectivity, geometric information, and attribute connectivity of the 3D mesh. Decoding the geometric connectivity and attribute connectivity may be considered connectivity decoding. Of course, decoding the coded information stream in this embodiment of the present invention may also include decoding the attribute information and non-manifold structure information as shown in FIG14 .
[0257] 1) Decoding the connection relationship
[0258] In summary, this processing step involves decoding information indicating whether the geometry and attribute information in the mesh have the same connectivity relationship, then decoding the connectivity relationship codestream to obtain a pattern string. If the geometry and attribute information have the same connectivity relationship, only one set of connectivity relationships needs to be reconstructed. If the geometry and attribute information have different connectivity relationships, the attribute connectivity relationships are reconstructed based on the attribute connectivity codestream, in addition to the reconstructed geometry connectivity relationships. The connectivity relationship and decoded vertex order of the manifold mesh can be output. For details, please refer to the corresponding section on the encoding end above and will not be explained in detail here.
[0259] Furthermore, the processing link may 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 is performed.
[0260] That is, in the embodiment of the present invention, the connection relationship of the decoding and encoding information code stream may include:
[0261] 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 non-manifold splitting related information obtained by decoding; wherein, the non-manifold splitting related information can 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.
[0262] 2) Decoding geometric information
[0263] This processing link can decode and obtain information indicating whether the duplicate point merging process has been performed to determine whether the duplicate point restoration process should be performed.
[0264] That is, in the embodiment of the present invention, the geometric information of the decoded coded information stream may include:
[0265] Decode the geometric information, and based on the information obtained by decoding indicating whether the duplicate point merging process has been performed, when it is indicated that the duplicate point recovery process needs to be performed, restore the geometric duplicate points according to the attribute connection relationship obtained by decoding.
[0266] This processing step decodes the geometric information bitstream according to the connection decoding order to obtain the geometric information of the manifold mesh. The mesh's geometric information can be decoded using decoding methods corresponding to the encoder, such as using parallelogram inverse prediction. For details, please refer to the previous section on the encoder; detailed explanation is omitted here.
[0267] 3) Decoding attribute information
[0268] This processing step uses the decoding method corresponding to the encoder to decode the attribute information bitstream based on the connection decoding order. For example, it uses similar triangle inverse prediction to decode the texture coordinates of the mesh. For details, please refer to the corresponding section on the encoder above; detailed explanation is omitted here.
[0269] 4) Decoding non-manifold structural information
[0270] This processing step may first decode to obtain information indicating whether the non-manifold structure splitting process has been performed. If it is determined that the non-manifold structure splitting process has been performed, the non-manifold structure information code stream is decoded to obtain non-manifold splitting related information. This process may be performed according to the order of decoding the geometric information and the order of decoding the attribute information.
[0271] Specifically, when decoding non-manifold structure information, the information indicating whether the non-manifold structure has been split is first decoded. If it indicates that the non-manifold structure has been split, the non-manifold splitting related information is further decoded, including the non-manifold identification information of the vertex and the duplicate point index information generated by the non-manifold split. This is specifically performed based on 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, the non-manifold identification information of a set of vertices and the duplicate point index information generated by the non-manifold split are further decoded; if the geometric information and attribute information in the mesh have different connection relationships, the non-manifold identification information of the geometric vertices and the geometric duplicate point index information generated by the non-manifold split, and the non-manifold identification information of the attribute vertices and the attribute duplicate point index information generated by the non-manifold split are respectively decoded. For details, please refer to the introduction of the corresponding part of the encoding end above, which will not be explained in detail here.
[0272] 5) Reconstructing the manifold mesh
[0273] Specifically, the connection relationship, geometric information, and attribute information of the manifold mesh can be used to directly reconstruct the manifold mesh.
[0274] The above is the main processing process of grid decoding. After grid decoding, when it is necessary to restore the non-manifold structure, the non-manifold structure is restored based on the reconstructed manifold grid 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 grid have the same connection relationship. The duplicate points generated by the non-manifold demolition are merged, the connection relationship is adjusted, and the non-manifold structure in the grid is restored to obtain the reconstructed deduplicated grid, that is, the reconstructed non-manifold grid.
[0275] Then, when duplicate point recovery is required, the correspondence between geometric and attribute information is used to recover duplicate points in the reconstructed deduplicated mesh and obtain a reconstructed 3D mesh. For details on these two processing steps, please refer to the corresponding sections on the encoder side above and will not be explained in detail here.
[0276] For Sdecode2, the grid difference information code stream is decoded to obtain the grid difference information; see FIG13 for a process of obtaining the grid adjustment information by decoding the grid adjustment information code stream. This process may include:
[0277] 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 indication information is further decoded.
[0278] The grid difference representation information may include:
[0279] One or more of the following: add vertex index list, delete vertex index list, and connection relationship modification information list. Of course, the mesh difference representation information is not limited to the above.
[0280] 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.
[0281] For Sdecode3, a decoded three-dimensional grid is obtained based on the reconstructed three-dimensional grid and the grid difference information, which corresponds to the process of adjusting the reconstructed grid to obtain the decoded grid in Figure 13.
[0282] The mesh difference information used in this step mainly includes mesh difference representation information. In other words, based on the reconstructed 3D mesh and the mesh difference information, a decoded 3D mesh is obtained, including:
[0283] 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.
[0284] When adjusting and reconstructing the three-dimensional mesh based on the mesh difference representation information obtained by decoding, taking the existence of differences in the number of geometric vertices and differences in connection relationships as an example, it specifically includes: first, creating a duplicate point for each vertex in the added vertex index list. Secondly, the vertex deletion method corresponding to the encoding end is used 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 are 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, the connection relationship of the mesh is adjusted according to the connection relationship modification information list. The face index to be modified and the position of the vertex index to be modified in the face are read in sequence, and the vertex index at that position is modified.
[0285] The 3D mesh lossless decoding method provided by the embodiments of the present invention first decodes the coded information bitstream to obtain a reconstructed 3D mesh; then decodes the mesh difference information bitstream to obtain mesh difference information; and finally, based on the reconstructed 3D mesh and the mesh difference information, a decoded 3D mesh is obtained. This method accurately reconstructs the original mesh for special mesh data, such as those requiring vertex additions, deletions, or connection adjustments, achieving lossless encoding.
[0286] 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.
[0287] 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, as shown in FIG15 , comprising:
[0288] A coding information decoding module is used to decode the coding information code stream to obtain a reconstructed three-dimensional grid;
[0289] A grid difference information decoding module is used to decode the grid difference information code stream to obtain grid difference information;
[0290] The decoded 3D mesh generation module is used to obtain a decoded 3D mesh based on the reconstructed 3D mesh and the mesh difference information.
[0291] 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.
[0292] The above description is only a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention are included in the scope of protection 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 merging of duplicate points has been performed, restore the geometric duplicate points according to the attribute connection relationship obtained by decoding when it is indicated that the duplicate points need to be restored.
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 merging of duplicate points has been performed, restore the geometric duplicate points according to the attribute connection relationship obtained by decoding when it is indicated that the duplicate points need to be restored.
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
Patent Citations
Methods and devices for encoding and decoding three dimensional grids
CN101626509A
Prediction-based three-dimensional mesh coding method
CN102625126A
Coding method, decoding method, coding device and decoding device for three-dimensional grid data
CN104243958A
Method and apparatus for handling duplicate points in point cloud compression
CN111512342A
Method and apparatus for encoding / decoding 3D mesh information including stitching information
US20090278844A1