Encoding method, decoding method, apparatus and device
By partitioning non-manifold structures into manifold meshes and encoding specific identifier and index information for duplicate vertices, the method addresses inefficiencies in existing encoding methods, achieving more efficient reversible encoding of three-dimensional meshes.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- VIVO MOBILE COMM CO LTD
- Filing Date
- 2024-06-24
- Publication Date
- 2026-05-26
AI Technical Summary
Existing methods for encoding three-dimensional mesh data, particularly those with non-manifold structures, result in significant bit overhead and inefficiencies due to the need to identify and encode duplicate vertices in manifold meshes, making reversible encoding challenging.
The proposed method involves partitioning the non-manifold structure into a manifold mesh, adding non-manifold identifier information to duplicate vertices, and encoding this information along with index information to create a code stream that allows for efficient reversible encoding by distinguishing between duplicate vertices generated by partitioning and those already present in the original mesh.
This approach enables more efficient reversible encoding of three-dimensional meshes by reducing the need to mark every vertex with non-manifold identifiers, thereby minimizing redundancy and improving encoding efficiency.
Smart Images

Figure 2026516911000001_ABST
Abstract
Description
Technical Field
[0001] (Cross - reference to related applications) This application claims the priority of Chinese Patent Application No. 202310802552.3, filed in China on June 30, 2023, and the entire content of the same application is incorporated herein by reference.
[0002] This application belongs to the field of codec technology, and specifically relates to an encoding method, a decoding method, an apparatus, and a device.
Background Art
[0003] The demand for the visual effect of three - dimensional mesh models is increasing more and more. Along with the emergence of many more mature three - dimensional scanning technologies and three - dimensional modeling software, the data scale and complexity of the three - dimensional mesh models obtained by three - dimensional scanning devices or three - dimensional modeling software are also increasing rapidly. Therefore, how to efficiently encode three - dimensional mesh data is the key to realizing the easy transmission, storage, and processing of three - dimensional mesh data. In related technologies, in order to realize the reversible encoding of three - dimensional meshes, when encoding a three - dimensional mesh including a non - manifold structure, after splitting the non - manifold structure from the three - dimensional mesh, it is necessary to set an identifier for each vertex in the manifold mesh obtained, and determine whether it is a point generated by splitting the non - manifold structure. When the number of vertices in the manifold mesh is relatively large, this encoding method causes a relatively large bit overhead and is disadvantageous for efficiently realizing the reversible encoding of three - dimensional meshes.
Summary of the Invention
Problems to be Solved by the Invention
[0004] The embodiments of this application provide an encoding method, a decoding method, an apparatus, and a device that can solve the problem of how to efficiently realize the reversible encoding of three - dimensional meshes.
Means for Solving the Problems
[0005] According to the first aspect, an encoding method is provided, and this method is The encoding process involves partitioning the non-manifold structure in the original mesh to obtain a manifold mesh, The encoding terminal adds non-manifold identifier information to the duplicate vertices in the manifold mesh and determines the index information of the first duplicate vertex among the duplicate vertices, wherein the non-manifold identifier information is used to indicate whether the duplicate vertex is a duplicate vertex that occurred when the non-manifold structure was partitioned, and the first duplicate vertex is a duplicate vertex that occurred when the non-manifold structure was partitioned. The encoding terminal includes encoding the non-manifold identifier information and the index information of the first duplicate vertices to obtain a first code stream, the first instruction information being used to indicate whether or not a non-manifold structure exists in the original mesh.
[0006] According to a second aspect, a decoding method is provided, which is: The decoding end decodes the first code stream and obtains decoding information, wherein the decoding information includes non-manifold identifier information and index information of the first duplicate vertex, the first duplicate vertex being a duplicate vertex generated by subdividing the non-manifold structure in the original mesh, and the non-manifold identifier information is used to indicate whether or not the duplicate vertex is a duplicate vertex generated when the non-manifold structure was subdivided. The decoding end includes recovering the non-manifold structure in the original mesh based on the decoding information.
[0007] According to a third aspect, an encoding device is provided, which device is A first acquisition module for decomposing the non-manifold structure in the original mesh and obtaining a manifold mesh, A first processing module for adding non-manifold identifier information to duplicate vertices in the manifold mesh and determining index information for a first duplicate vertex among the duplicate vertices, wherein the non-manifold identifier information is used to indicate whether the duplicate vertex is a duplicate vertex that occurred when the non-manifold structure was partitioned, and the first duplicate vertex is a duplicate vertex that occurred when the non-manifold structure was partitioned. It includes a second acquisition module for encoding the non-manifold identifier information and the index information of the first duplicate vertices to obtain a first code stream.
[0008] According to a fourth aspect, a decoding device is provided, which is A fifth acquisition module for decoding a first code stream and obtaining decoded information, wherein the decoded information includes non-manifold identifier information and index information of a first duplicate vertex, the first duplicate vertex being a duplicate vertex generated by subdividing the non-manifold structure in the original mesh, and the non-manifold identifier information is used to indicate whether or not the duplicate vertex is a duplicate vertex generated when the non-manifold structure is subdivided. The system includes a second processing module for recovering the non-manifold structure in the original mesh based on the aforementioned decoded information.
[0009] According to a fifth embodiment, an encoding device is provided that includes a processor and a communication interface, wherein the processor performs a partitioning process on a non-manifold structure in the original mesh to obtain a manifold mesh, adds non-manifold identifier information to the duplicate vertices in the manifold mesh, and determines index information for a first duplicate vertex among the duplicate vertices, wherein the non-manifold identifier information is used to indicate whether the duplicate vertex is a duplicate vertex that occurred when the non-manifold structure was partitioned, and the first duplicate vertex is used to encode the fact that it is a duplicate vertex that occurred when the non-manifold structure was partitioned, the non-manifold identifier information and the index information of the first duplicate vertex, and obtains a first code stream.
[0010] According to the sixth aspect, a decoding device is provided which includes a processor and a communication interface, wherein the processor decodes a first code stream and obtains decoding information, the decoding information includes non-manifold identifier information and index information of the first duplicate vertices, the first duplicate vertices being duplicate vertices generated by subdividing the non-manifold structure in the original mesh, the non-manifold identifier information being used to indicate whether the duplicate vertices are duplicate vertices generated when subdividing the non-manifold structure, and to recover the non-manifold structure in the original mesh based on the decoding information.
[0011] According to the seventh aspect, an electronic device is provided, including a processor and a memory, wherein the memory stores a program or instruction that can be executed on the processor, and when the program or instruction is executed by the processor, a step of the method according to the first or second aspect is realized.
[0012] According to the eighth aspect, a codec system is provided, which includes an encoding device and a decoding device, wherein the encoding device may be used to perform the steps of the encoding method described in the first aspect, and the decoding device may be used to perform the steps of the decoding method described in the second aspect.
[0013] According to the ninth aspect, a readable storage medium is provided, the readable storage medium storing a program or instruction, and when the program or instruction is executed by a processor, a step of the method according to the first aspect is realized, or a step of the method according to the second aspect is realized.
[0014] According to the tenth aspect, a chip is provided, the chip comprising a processor and a communication interface, the communication interface being coupled with the processor, the processor executing a program or instructions, and being used to implement the method according to the first aspect or the method according to the second aspect.
[0015] According to the eleventh aspect, a computer program / program product is provided, the computer program / program product is stored in a storage medium, and the computer program / program product is executed by at least one processor to realize a step of the method according to the first aspect, or a step of the method according to the second aspect. [Effects of the Invention]
[0016] In the embodiments of the present application, the encoding end divides the non-manifold structure in the original mesh to obtain a manifold mesh, adds non-manifold identifier information to the overlapping vertices in the manifold mesh, determines the index information of the first overlapping vertex among the overlapping vertices, and the non-manifold identifier information is used to indicate whether the overlapping vertex is an overlapping vertex generated when dividing the non-manifold structure. The first overlapping vertex is an overlapping vertex generated when dividing the non-manifold structure. The encoding end encodes the non-manifold identifier information and the index information of the first overlapping vertex to obtain a first code stream. According to the above solution, the decoding end can restore the non-manifold structure of the original mesh based on the non-manifold identifier information and the index information of the first overlapping vertex obtained by decoding this first code stream, so as to achieve the purpose of performing reversible encoding on the original mesh. When encoding a mesh including a non-manifold structure, the encoding end adds non-manifold identifiers only to the overlapping points in the manifold mesh instead of adding non-manifold identifiers to each vertex in the manifold mesh, so that reversible encoding of the three-dimensional mesh can be realized more efficiently.
Brief Description of Drawings
[0017] [Figure 1] Schematic diagrams of five patterns of the Edgebreaker encoding method. [Figure 2] Schematic flowchart of the encoding method of the embodiments of the present application. [Figure 3] Schematic diagram of the reversible encoding framework of the three-dimensional mesh of the embodiments of the present application. [Figure 4] Schematic diagram of the correspondence between edges and corners in the manifold mesh of the embodiments of the present application. [Figure 5] Schematic diagram of the angular relationship in the embodiments of the present application. [Figure 6] Schematic diagram of the traversal rules of five patterns of the Edgebreaker encoding method in the embodiments of the present application. [Figure 7] Schematic diagram of two adjacent triangles in the mesh of the embodiments of the present application. [Figure 8]Schematic diagram for predicting UV coordinates based on three-dimensional to two-dimensional projection in an embodiment of the present application. [Figure 9] Schematic flowchart of the decoding method in an embodiment of the present application. [Figure 10] Schematic diagram of the reversible decoding framework of the three-dimensional mesh in an embodiment of the present application. [Figure 11] Schematic diagram of the modules of the encoding device in an embodiment of the present application. [Figure 12] Schematic diagram of the modules of the decoding device in an embodiment of the present application. [Figure 13] Structural block diagram of the electronic device in an embodiment of the present application. [Figure 14] Structural block diagram of the encoding device or decoding device in an embodiment of the present application.
Embodiments for Carrying Out the Invention
[0018] The following clearly and completely describes the technical solutions in the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments obtained by those skilled in the art based on the embodiments in the present application shall fall within the protection scope of the present application.
[0019] The terms "first," "second," etc., used in this application are intended to distinguish similar objects and not to describe a specific order or sequence. It should be understood that these terms are interchangeable where appropriate, so that the embodiments of this application can be carried out in an order other than those illustrated or described herein, and the objects distinguished by "first" and "second" are generally of the same kind and do not limit the number of objects; for example, the first object may be one or more. In this application, "or" represents at least one of the connected objects. For example, "A or B" covers three solutions: Solution 1: includes A but not B, Solution 2: includes B but not A, Solution 3: includes both A and B. The character " / " generally indicates that the preceding and succeeding related objects are in an "or" relationship.
[0020] The term "instruction" as used in this application may be direct (or explicit) or indirect (or implicit). Here, a direct instruction may be understood as the sender clearly informing the receiver of specific information, operations to be performed, or desired results in the instructions sent by the sender, while an indirect instruction may be understood as the receiver determining or judging the corresponding information based on the instructions sent by the sender, and determining the operations to be performed or desired results based on the judgment.
[0021] It should be noted that the technologies described in the embodiments of this application are not limited to Long Term Evolution (LTE) / LTE-Advanced (LTE-A) systems, but are also applicable to other wireless communication systems, such as Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), Frequency Division Multiple Access (FDMA), Orthogonal Frequency Division Multiple Access (OFDMA), Single-carrier Frequency-Division Multiple Access (SC-FDMA), or other systems. The terms "system" and "network" in the embodiments of this application are always used interchangeably, and the technologies described may be applied to the systems and radio technologies mentioned above, or to other systems and radio technologies. The following description illustrates a New Radio (NR) system and uses NR terminology in most of the following descriptions; however, these technologies may also be applied to systems other than NR systems, such as 6th Generation (6G) communication systems.
[0022] To help those skilled in the art better understand the embodiments of this application, they will first be described as follows.
[0023] With the rapid development of multimedia technology, related research results are rapidly being industrialized and have become an essential component of people's lives. Three-dimensional models will become the next generation of digital media, following audio, images, and video. Three-dimensional meshes and point clouds are two commonly used three-dimensional model representation methods. Compared to conventional multimedia such as images and videos, three-dimensional mesh models have stronger interactivity and realism, and are therefore increasingly being applied in various fields such as commerce, manufacturing, construction, education, medicine, entertainment, art, and military.
[0024] With the increasing demand for visual effects on three-dimensional mesh models, and the emergence of many more mature three-dimensional scanning technologies and three-dimensional modeling software, the data size and complexity of three-dimensional mesh models acquired by three-dimensional scanning equipment or three-dimensional modeling software are rapidly increasing. Therefore, how to efficiently compress three-dimensional mesh data is key to enabling the easy transmission, storage, and processing of three-dimensional mesh data.
[0025] A single three-dimensional mesh often contains three main types of information simultaneously: topology, geometry, and attribute information. Topology, also known as connectivity information, is used to describe the connection relationships between vertices and elements such as patches in the mesh. Geometry information consists of the three-dimensional coordinates of all vertices in the mesh, and attribute information records other information attached to the mesh, such as normal vectors, texture coordinates (i.e., UV coordinates), and color. Compression of three-dimensional mesh data generally involves compressing these three types of information according to their respective data characteristics. In the case of three-dimensional meshes with texture maps, it may also be necessary to compress the texture maps.
[0026] Draco is a library for compressing and decompressing three-dimensional (3D) geometric meshes and point clouds, aiming to improve the storage and transmission of 3D graphics and significantly accelerate the encoding, transmission, and decoding of 3D data. Draco supports the compression of geometric, connection, and attribute information of three-dimensional meshes. Draco supports both lossy and near-lossy patterns. The Edgebreaker compression method used by Draco to encode connection relationships is currently one of the most efficient methods for encoding three-dimensional mesh connection information.
[0027] However, Edgebreaker requires that the mesh to be encoded be a manifold structure, and for meshes that have a non-manifold structure, Draco cannot encode them correctly unless it divides them into a manifold structure. However, Draco does not integrate the structures divided at the decoding end, and as a result the mesh output from the decoding end has more divided points than the original mesh input from the encoding end. Consequently, Draco cannot reversibly encode meshes that contain such non-manifold structures.
[0028] The Moving Pictures Experts Group (MPEG), an international standardization organization for video images, is developing a new dynamic 3D mesh compression standard (Video-based Dynamic Mesh Coding, V-DMC). Currently, even when encoding static 3D meshes, they are adopting an Edgebreaker-based approach and have chosen to temporarily multiplex the Draco codec. At the same time, MPEG is attempting to implement an Edgebreaker-based 3D mesh codec by MPEG to achieve compression of geometric, connection, and attribute information of 3D meshes. Since Edgebreaker requires the mesh to be encoded to have a manifold structure, the currently proposed approach divides 3D meshes with non-manifold structures into manifold structures before encoding. Therefore, for reversible patterns, the three-dimensional mesh codec based on Edgebreaker provided by MPEG records and encodes the duplicate point index information generated by partitioning the non-manifold at the encoding end, and adds a single identifier to each vertex of the partitioned manifold mesh to indicate whether or not it is a duplicate point generated by partitioning the non-manifold. At the decoding end, the non-manifold structure of the original three-dimensional mesh is recovered according to this identifier and the duplicate point index information generated by partitioning the non-manifold, thereby achieving reversible encoding of the three-dimensional mesh. Since the partitioning of the non-manifold structure is achieved by adding duplicate points that have the same geometric and attribute information, in the decoded three-dimensional mesh, only the duplicate points may be points newly added by partitioning the non-manifold. If a single identifier is set for each vertex to determine whether or not it is a point generated by partitioning the non-manifold, a certain degree of encoding redundancy occurs.
[0029] Both of the above two approaches are three-dimensional mesh compression methods implemented based on Edgebreaker, and both have the problem of needing to partition any non-manifold structures that may exist in the input mesh. On the other hand, for lossless compression, it is necessary to recover any non-manifold structures that may exist in the original three-dimensional mesh at the decoding end. Therefore, proposing a new lossless coding method based on Edgebreaker that can realize non-manifold three-dimensional meshes is of great significance for achieving more efficient lossless coding of non-manifold meshes.
[0030] The Edgebreaker-based 3D mesh compression tool currently offered by MPEG encodes and stores connection information, geometric information, and attribute information of a 3D mesh, respectively. The core module, which encodes connection information, uses the Edgebreaker algorithm. General compression methods are employed for encoding geometric and attribute information, namely quantization, predictive compression (e.g., parallelogram prediction), and entropy coding of the data. Because this tool employs a connection-driven encoding method, the encoding of geometric and attribute information follows the encoding order of the connection information. By embedding the vertex order of the encoding of connection relationships into the vertex order of the geometric information in this manner, the transmission of the vertex order of the encoding of connection relationships is avoided, thereby saving bit overhead in this part.
[0031] The Edgebreaker method is an encoding method for three-dimensional mesh connection relationships that has advantages such as high compression performance, ease of implementation, and the ability to set an upper limit on the compression ratio. The Edgebreaker method itself only describes the method for compressing three-dimensional mesh connection information; it is necessary to achieve compression of the three-dimensional mesh through geometric information compression and entropy coding, etc.
[0032] Edgebreaker coding technology can achieve a compression efficiency of 2 bits or less per triangle for triangular meshes in phase with a sphere. The coding algorithm accesses each triangle in the mesh in depth-first order using five different patterns (called C, L, E, R, and S). Based on the pattern in which each triangle lies, it is marked, a CLERS string is generated, and a compact representation of the mesh connection relationships is obtained.
[0033] The five patterns of the Edgebreaker method are shown in Figure 1. The Edgebreaker method divides the mesh into traversed and untraversed parts, and the boundary between the two parts is called the movable boundary. In the Edgebreaker coding process, the triangles to be traversed are accessed by movable edges on the movable boundary, and the pattern to use is selected based on the relationship between the movable edge and the triangle in which it is located. Another vertex in the triangle where the movable edge is located is called the third vertex. If the third vertex is not on the movable boundary, the current triangle is marked as pattern C. If the third vertex is on the movable boundary and, according to counterclockwise order, is the vertex after the current movable edge vertex, the current triangle is marked as pattern R. If the third vertex is on the movable boundary and, according to counterclockwise order, is the vertex before the current movable edge vertex, the current triangle is marked as pattern L. If the third vertex is on the movable boundary and, according to counterclockwise order, is the vertex before the current movable edge vertex and the vertex after the current movable edge, the current triangle is marked as pattern E. The current triangle is marked as an S-pattern if the third vertex lies on a movable boundary, but, following counterclockwise order, is neither the vertex immediately preceding the current movable edge vertex nor the vertex immediately following the current movable edge.
[0034] Each time a triangle is marked, the movable boundary is updated, and the next movable edge is selected according to a certain rule. After traversing all triangles, entropy coding is performed on the resulting CLERS string to achieve higher compression efficiency.
[0035] In the following sections, the encoding method according to the embodiments of this application will be described in detail with reference to several embodiments and their application scenarios, accompanied by drawings.
[0036] As shown in Figure 2, embodiments of this application provide an encoding method which includes: Step 201: The encoding end decomposes the non-manifold structure in the original mesh to obtain a manifold mesh.
[0037] Selectively, the original mesh is a three-dimensional mesh. This original mesh may be understood as a three-dimensional mesh corresponding to any video frame.
[0038] The non-manifold structure in the embodiments of this application includes at least one of a non-manifold edge and a non-manifold point.
[0039] The above-mentioned non-manifold edges refer to edges in a mesh that simultaneously exist in at least three triangles.
[0040] The above non-manifold points may be determined by the following method: First, a corner table is constructed to establish the correspondence between each vertex in the original mesh and the corner of that vertex. Starting from a corner corresponding to a vertex, all adjacent corners that form a sector are traversed in sequence, and the vertex and the traversed corner are marked as traversed. If, after performing the above process, there are still vertices with untraversed corners, these vertices are indicated as non-manifold points.
[0041] Selectively, in the embodiments of this application, a mesh is called a manifold mesh if each edge of the mesh is shared by a maximum of two patches and there are no non-manifold points; otherwise, it is called a non-manifold mesh.
[0042] In this step, the original mesh is divided into a manifold mesh to facilitate encoding based on the encoding scheme in subsequent related technologies, for example, by employing a three-dimensional mesh encoder based on Edgebreaker.
[0043] Step 202: The encoding terminal adds non-manifold identifier information to the duplicate vertices in the manifold mesh and determines the index information of the first duplicate vertex among the duplicate vertices, the non-manifold identifier information is used to indicate whether the duplicate vertex is a duplicate vertex that occurred when the non-manifold structure was partitioned, and the first duplicate vertex is a duplicate vertex that occurred when the non-manifold structure was partitioned.
[0044] The duplicate vertices mentioned above include the first duplicate vertex and the second duplicate vertex. The second duplicate vertex is the duplicate vertex in the original mesh before the non-manifold structure is partitioned.
[0045] In the embodiments of this application, non-manifold identifier information indicates whether or not a duplicate vertex (i.e., a duplicate point) in the manifold mesh is a duplicate vertex that occurred when the non-manifold structure was subdivided. For example, if the non-manifold identifier information is 1, it indicates that the duplicate vertex is a duplicate vertex that occurred when the non-manifold structure was subdivided, and if the non-manifold identifier information is 0, it indicates that the duplicate vertex is not a duplicate vertex that occurred when the non-manifold structure was subdivided.
[0046] Step 203: The encoding terminal encodes the non-manifold identifier information and the index information of the first duplicate vertex to obtain a first code stream.
[0047] Since the division of a non-manifold structure is achieved by adding duplicate points that have the same geometric and attribute information, a manifold mesh contains two types of duplicate points: duplicate points that exist in the original input mesh itself (i.e., the second duplicate vertex in this application) and duplicate points that are newly generated by dividing the non-manifold structure (i.e., the first duplicate vertex mentioned above). If a non-manifold structure exists in the original mesh, it is necessary to encode the non-manifold identifier information of the two types of duplicate points and the index information of the first duplicate point. The decoding end then integrates the duplicate vertices generated by dividing the non-manifold structure and adjusts the connection relationships based on this non-manifold identifier information and index information, thereby recovering the non-manifold structure in the original mesh and achieving reversible encoding of a three-dimensional mesh containing a non-manifold structure.
[0048] In the embodiment of this application, the encoding end divides the non-manifold structure in the original mesh to obtain a manifold mesh, adds non-manifold identifier information to the duplicate vertices in the manifold mesh, determines the index information of the first duplicate vertex among the duplicate vertices, the non-manifold identifier information is used to indicate whether the duplicate vertex is a duplicate vertex that arose when the non-manifold structure was divided, the first duplicate vertex is a duplicate vertex that arose when the non-manifold structure was divided, and the encoding end encodes the non-manifold identifier information and the index information of the first duplicate vertex to obtain a first code stream. With the above method, the decoding end can decode this first code stream and recover the non-manifold structure of the original mesh based on the non-manifold identifier information and the index information of the first duplicate vertex obtained, thereby achieving the objective of performing reversible encoding on the original mesh. When encoding a mesh containing a non-manifold structure, the encoding terminal adds a non-manifold identifier only to overlapping points in the manifold mesh, rather than adding a non-manifold identifier to each vertex in the manifold mesh. This allows for more efficient reversible encoding of three-dimensional meshes.
[0049] Selectively, the first code stream further includes encoded information of the first instruction information, which is used to indicate whether or not a non-manifold structure exists in the original mesh.
[0050] Selectively, the methods of the embodiments of this application are The encoding terminal encodes the manifold mesh and obtains a second code stream, The encoding terminal further includes obtaining the total code stream of the original mesh based on the first code stream and the second code stream.
[0051] In the embodiments of this application, when the decoding end recovers the non-manifold structure, it requires the non-manifold identifier information and the index information of the first duplicate vertices, as well as the manifold mesh. By encoding the manifold mesh, the decoding end can recover the non-manifold structure based on the manifold mesh, the non-manifold identifier information, and the index information of the first duplicate vertices.
[0052] Selectively, the encoding end encodes the manifold mesh to obtain a second code stream. The encoding end encodes second target information of the manifold mesh and obtains the second code stream, Here, the second target information includes connection relationships, geometric information, and attribute information.
[0053] Selectively, the attribute information includes UV coordinates, i.e., texture coordinates. UV coordinates are information that describes the vertex texture of a three-dimensional mesh.
[0054] In the embodiments of this application, the connection relationships are encoded using an Edgebreaker method to obtain a CLERS pattern string that can concisely represent the connection relationships, the pattern string is compressed using entropy encoding to obtain a connection relationship subcode stream (which may also be described as a connection relationship code stream), the geometric information of the mesh is encoded using a method such as parallelogram prediction to obtain a geometric information subcode stream (which may also be described as a geometric information code stream), and the UV coordinates in the attribute information of the mesh are encoded using a method such as similar triangle prediction to obtain an attribute information subcode stream (which may also be described as an attribute information code stream). Based on the connection relationship subcode stream, the geometric information subcode stream and the attribute information subcode stream, the above second code stream is obtained.
[0055] Selectively determining the index information of the first duplicate vertex among the duplicate vertices is: This includes determining the index information of the first duplicate vertex based on the coding order of at least one of the geometric information and attribute information in the manifold mesh.
[0056] The first duplicate vertices described above include geometrically duplicate vertices and attributeally duplicate vertices. If the geometrically duplicate vertices and attributeally duplicate vertices in the manifold mesh have the same connection relationship, index information for the first duplicate vertices may be obtained based on the coding order of the coded geometric information or attribute information. If the geometrically duplicate vertices and attributeally duplicate vertices in the manifold mesh have different connection relationships, index information for the geometrically duplicate vertices among the first duplicate vertices may be obtained based on the coding order of the geometric information, and index information for the attributeally duplicate vertices among the first duplicate vertices may be obtained based on the coding order of the attribute information.
[0057] Selectively, the first overlapping vertex includes geometrically overlapping vertices and attributely overlapping vertices. When the geometric vertices and attribute vertices in the manifold mesh have the same connection relationship, the geometrically overlapping vertices and attribute overlapping vertices share a set of non-manifold structure information, and the non-manifold structure information includes non-manifold identifier information and index information, or When the geometric vertices and attribute vertices in the manifold mesh have different connection relationships, the geometrically overlapping vertices correspond to a first set of non-manifold structure information, and the attribute overlapping vertices correspond to a second set of non-manifold structure information, and both the first set of non-manifold structure information and the second set of non-manifold structure information include non-manifold identifier information and index information.
[0058] In the embodiments of this application, having the same connection relationship between geometric vertices in a manifold mesh and attribute vertices means that there is a one-to-one correspondence between geometric vertices and attribute vertices in a manifold mesh. Having different connection relationships between geometric vertices in a manifold mesh means that there is no one-to-one correspondence between geometric vertices and attribute vertices in a manifold mesh.
[0059] It should be noted that, in the embodiments of this application, attribute vertices may be described exemplarily as UV vertices.
[0060] Selectively, the total code stream of the original mesh is The system further includes a third code stream obtained by encoding second instruction information for indicating whether the geometric vertices and attribute vertices in the manifold mesh have the same connection relationship.
[0061] Here, by encoding the second instruction information mentioned above, it is possible to determine whether the decoding end obtains one set of non-manifold structure information or two sets of non-manifold structure information.
[0062] Selectively, the total code stream of the original mesh is The system further includes a fourth code stream obtained by encoding a third instruction information for duplicate vertices in the manifold mesh, the third instruction information being used to indicate whether the geometric information and attribute information of the duplicate vertices have been duplicate-encoded.
[0063] In the embodiments of this application, by encoding a third instruction information, the decoding end can know whether to encode the geometric and attribute information of the duplicate vertices repeatedly / multiple times, and facilitates the decoding end to decode and obtain the corresponding duplicate vertices.
[0064] When selectively the encoding terminal encodes the connection relationships, geometric information, and attribute information simultaneously, the total code stream of the original mesh is: The system further includes a fifth code stream obtained by encoding a fourth instruction information for a vertex in the manifold mesh, the fourth instruction information being used to indicate whether or not the vertex is a duplicate vertex.
[0065] Here, simultaneously encoding the connection relationships, geometric information, and attribute information means that when encoding, the order in which the three are encoded is not distinguished, and the encoding is performed simultaneously.
[0066] Here, by encoding the fourth instruction information described above, the decoding terminal can determine which vertices are duplicates during decoding, and thereby determine which duplicate vertices were generated by partitioning the non-manifold structure based on the non-manifold identifier of the duplicate vertices.
[0067] Selectively, the total code stream of the original mesh is The system further includes a sixth code stream obtained by encoding the texture map information of the original mesh.
[0068] In the embodiments of this application, a video encoder may be used to encode the texture map information to obtain a sixth code stream, i.e., a subcode stream of the texture map (which may also be described as a texture map code stream).
[0069] As shown in Figure 3, the three-dimensional mesh coding framework in the embodiment of this application first searches for and records the overlapping points of the original mesh (i.e., the second overlapping points) in the preprocessing step, divides the original mesh containing the non-manifold structure to obtain a manifold mesh, records the overlapping points (i.e., the first overlapping points) generated by dividing the non-manifold structure, encodes connection information for the manifold mesh using the Edgebreaker method to obtain a pattern string, and performs entropy coding on it to encode the geometric information of the manifold mesh. For example, a parallelogram prediction coding method may be used, and the method of encoding geometric information is not limited here. If attribute information such as UV coordinates exists in the mesh, it may be encoded using a method such as similar triangle prediction coding, and the method of encoding attribute information is not limited here. When encoding non-manifold structure information, first, an indication information of whether or not a non-manifold structure exists in the mesh is encoded. If a non-manifold structure exists in the mesh, then non-manifold identifier information of the overlapping points and index information of the overlapping points generated by dividing the non-manifold structure are encoded according to the encoding order of the vertices. The non-manifold identification information regarding the overlapping points here is obtained by encoding a single flag bit at each overlapping vertex in the partitioned manifold mesh, thereby identifying whether or not the overlapping point arose from partitioning a non-manifold structure. Finally, the multiple code streams are stream-mixed to obtain the final output code stream (i.e., the total code stream).
[0070] The specific implementation method for the encoding process is explained below.
[0071] As shown in Figure 3, the reversible coding framework for three-dimensional meshes of this application is mainly divided into five parts: partitioning of non-manifold structures in preprocessing, coding of connection relationships, coding of geometric information, coding of attribute information, and coding of non-manifold structure information. Each of these is described below.
[0072] 1) Decomposition of non-manifold structures in pretreatment, Input: Original mesh, Output: Manifold mesh and overlapping points (including overlapping points in the original mesh and overlapping points resulting from the subdivision of the non-manifold structure), The preprocessing step may include other preprocessing modules necessary for encoding, such as filtering duplicate points and adding virtual points. For ease of explanation, Figure 3 lists only the modules for partitioning the non-manifold structure covered by this application.
[0073] Before removing non-manifold structures, duplicate points in the original input mesh can first be searched for and recorded, for example, using a hash table. Using a hash table as an example, a hash table is established, where the key of the hash table is the three-dimensional coordinate of the vertex, and the value is the number of occurrences of the vertex with this three-dimensional coordinate. If the number of occurrences is greater than 1, it indicates a duplicate point, and thus duplicate points in the original mesh are searched for, identified, and recorded.
[0074] The partitioning of non-manifold structures can be broadly divided into two parts: partitioning of non-manifold edges and partitioning of non-manifold vertices.
[0075] The first step in dividing non-manifold edges is to find them. The condition for identifying a non-manifold edge is that one edge exists in three or more triangles simultaneously. Specifically, this can be achieved by establishing a data structure to store the triangles in which each edge resides and querying the number of triangles corresponding to that edge to find non-manifold edges, or by constructing a Corner Table to establish the correspondence between angles in the mesh and edges, and then finding non-manifold edges. Specifically, for a manifold mesh, each edge faces at most two angles, and these two opposing angles are called diagonals. As shown in Figure 4, angles a and d face edge bc, and angles a and d are diagonals, but non-manifold edges have three or more diagonals. Therefore, non-manifold edges can also be found by the correspondence between angles and edges.
[0076] The second step in splitting a non-manifold edge is to add vertices and modify the connection relationships. After finding a non-manifold edge, duplicate vertices are created for each of the two vertices of the non-manifold edge, a triangle t on which the non-manifold edge is located is selected, a new triangle t' is constructed with the third vertex of this triangle and the two newly added vertices, the original triangle t is replaced with t', and this process is repeated until the non-manifold edge is converted into a manifold edge.
[0077] To partition non-manifold points, it is first necessary to construct a Corner Table and establish the correspondence between each vertex and its angles. For each vertex, a two-step operation is performed. In the first step, starting from an angle of a vertex, all angles adjacent to that angle and forming a sector are traversed in order, and the vertex and the traversed angles are marked as traversed. If, after performing the above process, there are still vertices with untraversed angles, these vertices are indicated as non-manifold points. In the second step, for each non-manifold point, one duplicate point is created, the connection relationships are corrected, and angles not traversed in the first step are connected to the newly added duplicate point, thus partitioning the non-manifold point into two manifold vertices. This process is repeated until all vertices are converted into manifold points.
[0078] The above process requires recording the overlapping points that occur when partitioning the non-manifold structure.
[0079] 2) Encoding of connection relationships, Input: Connection relationships of a manifold mesh, Output: Encoded connection relationship subcode streams and vertex coding order. This application describes how to represent the connection relationships of a three-dimensional mesh by encoding them using the Edgebreaker method and establishing a Corner Table, and how to generate an Edgebreaker CLERS pattern string by traversing all triangles in the mesh using the Corner Table.
[0080] Corner tables are used to show the relationship between corners, vertices, and triangles in a mesh. Before constructing a corner table, it is necessary to number the corners. This is done by traversing the triangles according to the order of the triangle patches in the mesh, and numbering the corners of each triangle in a counterclockwise order. If the mesh has f triangle patches, then the mesh has 3f corners. The advantage of numbering in this way is that the number of the triangle to which the current corner belongs can be calculated from the corner number, as shown in Equation 1. Furthermore, in a counterclockwise direction, the numbers of the corner c_p before the current corner c and the corner c_n after it can be calculated, as shown in Equations 2 and 3.
[0081]
number
number
[0082]
number
number
[0083]
number
number
[0084] The Corner Table consists of four parts: the V-table, O-table, U-table, and M-table. Here, 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 an identifier indicating whether or not each triangle was scanned during the scanning process, and the M-table stores an identifier indicating whether or not each vertex was scanned during the scanning process.
[0085] Using the Corner Table, we can construct the relationships shown in Figure 5, where c represents the current angle, cp represents the angle immediately preceding the current angle c (in the counterclockwise direction), and cn represents the angle following the current angle c. co is the diagonal angle to the current angle c and can be obtained by searching the O table. ct is the number of the triangle in which c is located and may be calculated by Equation 1. cv represents the vertex of the current angle and can be obtained by searching the V table. cl represents the left angle of the current angle c and can be obtained by searching the diagonal angle of cp in the O table, and cr represents the right angle of the current angle c and can be obtained by searching the diagonal angle of cn in the O table.
[0086] After constructing the relationships between corners, vertices, and triangles using a Corner Table, the mesh can be traversed in a spiral order to obtain the Edgebreaker CLERS pattern string representing the mesh connection relationships. At this time, the five pattern determination conditions and traverse rules are shown in Figure 6. If the corner currently being traversed is x, and the vertex xv corresponding to x has never been accessed, the current triangle is a C pattern and the next triangle to be traversed is the triangle where xr is located. Otherwise, if the triangle where xl is located has been accessed, the current triangle is an L pattern and the next triangle to be traversed is the triangle where xr is located. If the triangle where xr is located has been accessed, the current triangle is an R pattern and the next triangle to be traversed is the triangle where xl is located, and vertex xv has been accessed. If neither the triangle containing xl nor xr has ever been accessed, the current triangle is an S pattern. In this case, the traverse path has two branches. Adopting the depth-first traverse principle, the first triangle to be traversed is the triangle containing xr. The triangle containing xl is stored in the stack, and after the traverse of the branch containing xr is complete, the triangle containing xl must be traversed. If both the triangles containing xl and xr have been accessed, the current triangle pattern is an E pattern. In this case, the traverse is performed to the endpoint of the current traverse path branch.
[0087] An initial triangle is randomly selected from the mesh, and the triangles in the mesh are traversed according to the rules described above to generate a CLERS pattern string. If the traverse path is complete but there are still triangles in the mesh that have not been traversed, one untraversed triangle is randomly selected and the next traverse begins until all triangles in the mesh have been traversed.
[0088] Entropy coding is used to compress the CLERS pattern string and obtain the final connection information code stream.
[0089] 3) Encoding of geometric information, Input: Geometric information of the manifold mesh and the coding order of the connection relationships. Output: Subcode stream of geometric information and coded order of geometric information. The encoded geometric information may employ various methods, such as differential predictive coding algorithms, parallelogram predictive coding algorithms, and multi-parallelogram predictive coding algorithms, and specific coding methods will not be emphasized here. Taking the parallelogram predictive coding algorithm as an example, four vertices a, b, c, and d are established, forming two adjacent triangles in the mesh shown in Figure 7.
[0090] Here, if the geometric information of points a, b, and c has already been encoded, and the geometric information of point d needs to be encoded, then the predicted value d' of the geometric coordinates of point d can be calculated using Equation 4.
[0091]
number
number
number
number
[0092] For triangles that cannot be predicted using parallelograms, such as triangles on the mesh boundary, geometric information is encoded using a differential coding method. That is, the coordinate values of adjacent coded vertices are used as predicted values for the current vertex coordinates, and the residuals are calculated to make a prediction.
[0093] 4) Encoding of attribute information, Input: Manifold mesh attribute information and coding order of connection relationships. Output: Attribute information subcode stream and attribute information encoding order. Three-dimensional mesh attribute information generally includes UV coordinates and normal vectors, with UV coordinates being used as an example. Various encoding methods can be used for UV coordinates, including differential prediction coding, parallelogram prediction coding, and similar triangle prediction coding; specific encoding methods will not be emphasized here. The similar triangle prediction algorithm will be described below.
[0094] First, a triangle in a three-dimensional mesh is selected as the initial triangle. The UV coordinates of the three vertices of the initial triangle are directly encoded without prediction, and the edges of the initial triangle are stored in an edge set. This set may be a data structure that satisfies certain access criteria. Next, edge τ is extracted from the set, and the UV coordinates of the corresponding vertices of τ in the next new triangle are predicted. Then, the two edges other than τ in the new triangle are added to the set. The point to be predicted is denoted as point C, the endpoints of edge τ are N and P respectively, the corresponding vertices of the triangle adjacent to the new triangle via τ are O, and the projection point of C onto τ is X. As shown in Figure 8, 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 coordinate of point C. The specific calculation flow is as follows:
number
number
[0095] First, calculate the UV coordinates of point X:
number
number
number
number
number
number
number
number
number
[0096] The `Rotated()` method calculates a vector and rotates it 90 degrees:
number
number
number
number
[0097] After obtaining the predicted UV coordinates, subtract them from the original UV coordinates to obtain the residual values.
[0098] The steps for encoding UV coordinates are as follows: (1) Select an initial triangle based on connectivity relationships and directly encode the UV coordinates of the three vertices of the initial triangle without making any predictions. Store the edges of the initial triangle in the edge set.
[0099] (2) Select an edge τ from the set according to the access criteria and encode the UV coordinates for the vertices of the new triangle formed with τ. Using the projection relationship of the triangle from three dimensions to two dimensions, calculate the predicted values of the points to be encoded according to the UV coordinate prediction calculation process described above. Subtract the predicted values from the original UV coordinate values to obtain the residuals.
[0100] (3) Add the two edges of the new triangle to the edge set and remove the vertex edge τ from the set. Take the next edge from the set and continue encoding the UV coordinates of the vertices of the triangle adjacent to this edge until the encoding of the UV coordinates of all vertices is complete, then return to step (3).
[0101] The UV coordinate residuals are entropy encoded, and a UV coordinate code stream is output.
[0102] 5) Encoding of non-manifold structure information, Input: Information indicating whether or not a non-manifold structure exists in the mesh, non-manifold identifier of the duplicate point, index information of the duplicate point generated by partitioning the non-manifold, encoding order of geometric information, encoding order of attribute information. Output: Non-manifold structure information subcode stream, First, information indicating whether or not a non-manifold structure exists in the mesh (i.e., the first indicator information) is encoded. This can be represented by setting an identifier for whether or not a non-manifold structure exists in a single mesh, or by the number of duplicate points generated by partitioning the non-manifold structure in the mesh; the method of representation is not limited here. Let's take setting an identifier for whether or not a non-manifold structure exists as an example: If a non-manifold structure does not exist in the mesh, i.e., the number of duplicate points generated by partitioning the non-manifold is 0, the identifier is set to 0, and there is no need to encode the non-manifold identifier of the duplicate point and the index information of the duplicate point (i.e., the first duplicate vertex) generated by partitioning the non-manifold. If a non-manifold structure exists in the mesh, i.e., the number of duplicate points generated by partitioning the non-manifold is greater than 0, the identifier is set to 1, and the non-manifold identifier of the duplicate point and the index information of the duplicate point generated by partitioning the non-manifold are encoded.
[0103] The duplicate points resulting from the partitioning of a non-manifold include two parts: geometric duplicate points and attribute duplicate points. Considering whether the geometric vertices and attribute vertices (e.g., UV vertices) have the same connectivity relationship, the situation can be divided into two cases: In the first case, when the geometric vertices and attribute vertices in the mesh have the same connectivity relationship, the non-manifold identifier of one set of duplicate points and the index information of the duplicate points resulting from the partitioning of the non-manifold are directly encoded, and the index information is obtained based on the encoding order of the geometric information and attribute information at the encoding ends. In the second case, when the geometric vertices and attribute vertices in the mesh have different connectivity relationships, the non-manifold identifiers of two sets of duplicate points and the index information of the duplicate points resulting from the partitioning of the non-manifold are encoded, and the index information is obtained based on the encoding order of the geometric information and attribute information at the encoding ends, respectively. The representation method for the index information of duplicate points resulting from the partitioning of a non-manifold structure may be either a target vertex index that needs to be integrated when recovering the non-manifold structure, or a duplicate point group index: points with the same index belong to the same duplicate point group, i.e., have the same vertex information, and the representation method is not limited here.
[0104] Specific implementation: A flag bit is set for each duplicate vertex in the manifold mesh, used to indicate whether the current point is a duplicate point resulting from the partitioning of a non-manifold, and the index information of the duplicate points resulting from the partitioning of the non-manifold is recorded. Then, the binary string sequence obtained by arranging the flag bits according to the corresponding coding order and the index information of the duplicate points resulting from the partitioning of the non-manifold structure are entropy coded to obtain a code stream of non-manifold structure information.
[0105] There may be multiple ways to store the code streams of non-manifold structure information in the total code stream: one is to store the code streams of non-manifold structure information as a single, one-channel subcode stream; another is to store the code streams of geometric non-manifold structure information in the subcode stream of geometric information and the code streams of attribute non-manifold structure information in the subcode stream of attribute information; and the code streams of geometric non-manifold structure information and the code streams of attribute non-manifold structure information may be stored in the total code stream as two-channel subcode streams. The method of storing the code streams of non-manifold structure information in the total code stream is not emphasized here.
[0106] It should be explained that when encoding the geometric and attribute information of vertices, the geometric and attribute information of duplicate points may be skipped, meaning they may be encoded only once, or not skipped at all. Here, we do not emphasize whether or not to skip the encoding of the geometric and attribute information of duplicate points. However, if the encoding of the geometric and attribute information of duplicate points is skipped, additional information must be transmitted to indicate whether or not the vertex's geometric and attribute information has been skipped. Otherwise, the geometric and attribute information of vertices whose encoding has been skipped cannot be decoded, and duplicate points cannot be searched for and obtained at the decoding end. Specifically, a single identifier may be set for each vertex to indicate whether or not the encoding of its geometric and attribute information has been skipped, and here we do not limit the method of representation.
[0107] The embodiments of this application do not limit the order in which the encoding of three-dimensional mesh connection relationships and the encoding of vertex information are performed. Geometric information, attribute information, and non-manifold structure information may be encoded simultaneously with the encoding of connection relationships, or geometric information, attribute information, and non-manifold structure information may be encoded sequentially based on the encoding order of connection relationships after the encoding of connection relationships is completed. However, if geometric information, attribute information, and non-manifold structure information are encoded simultaneously with the encoding of connection relationships, it is possible to determine which vertices are duplicates during the decoding process by adding information indicating whether or not a vertex is a duplicate point. Based on the non-manifold identifier of the duplicate point, it is necessary to determine which duplicate points were generated by dividing the non-manifold. Regarding the information indicating whether or not a vertex is a duplicate point, one duplicate point identifier may be set for each vertex to indicate whether or not a vertex is a duplicate point, and the representation method is not limited here.
[0108] When considering whether geometric vertices and UV vertices have the same connectivity relationship, it is also necessary to encode information indicating whether or not the geometric vertices and UV vertices have the same connectivity relationship. Regarding the representation of this information, a single identifier indicating whether or not the geometric vertices and UV vertices have the same connectivity relationship may be established, and this representation method is not limited here.
[0109] In the above-described solution of the embodiment of this application, the coding end divides the non-manifold structure in the original mesh to obtain a manifold mesh, adds non-manifold identifier information to the duplicate vertices in the manifold mesh, and determines the index information of the first duplicate vertex among the duplicate vertices. The non-manifold identifier information is used to indicate whether the duplicate vertex is a duplicate vertex that arose when the non-manifold structure was divided, and the first duplicate vertex is a duplicate vertex that arose when the non-manifold structure was divided. The coding end encodes the non-manifold identifier information and the index information of the first duplicate vertex to obtain a first code stream. With the above solution, the decoding end can decode this first code stream and recover the non-manifold structure of the original mesh based on the non-manifold identifier information and the index information of the first duplicate vertex, thereby achieving the objective of performing reversible encoding on the original mesh. When encoding a mesh containing a non-manifold structure, the encoding terminal adds a non-manifold identifier only to overlapping points in the manifold mesh, rather than adding a non-manifold identifier to each vertex in the manifold mesh. This allows for more efficient reversible encoding of three-dimensional meshes.
[0110] As shown in Figure 9, embodiments of the present application further provide a decoding method which includes the following steps: Step 901: The decoding end decodes the first code stream and obtains decoding information, which includes non-manifold identifier information and index information of the first duplicate vertex, the first duplicate vertex being a duplicate vertex generated by subdividing the non-manifold structure in the original mesh, and the non-manifold identifier information is used to indicate whether or not the duplicate vertex is a duplicate vertex generated when the non-manifold structure is subdivided.
[0111] Step 902: The decoding end recovers the non-manifold structure in the original mesh based on the decoding information.
[0112] In the embodiment of this application, the decoding end decodes the first code stream to obtain non-manifold identifier information and index information of the first duplicate vertices, and recovers the non-manifold structure of the original mesh based on the index information of the first duplicate vertices and the non-manifold identifier information. This approach achieves the objective of performing lossless coding on the original mesh by recovering the non-manifold structure of the original mesh based on the non-manifold identifier information and index information of the first duplicate vertices obtained by decoding the first code stream. Since non-manifold identifiers are added only to the duplicate points in the manifold mesh, rather than adding non-manifold identifiers to each vertex in the manifold mesh, a lossless codec for a three-dimensional mesh can be realized more efficiently.
[0113] Selectively, the decoding information further includes first indicator information for indicating whether or not a non-manifold structure exists in the original mesh, The decoding end recovers the non-manifold structure in the original mesh based on the decoding information. When the first instruction information indicates that a non-manifold structure exists in the original mesh, the method includes recovering the non-manifold structure in the original mesh based on the first duplicate vertex index information and the non-manifold identifier information.
[0114] Selectively, recovering the non-manifold structure in the original mesh based on the index information of the first duplicate vertices and the non-manifold identifier information is: Reconstructing a manifold mesh based on second target information of the manifold mesh, wherein the second target information is obtained by decoding a second code stream, and the second target information includes connection relationships, geometric information, and attribute information. This includes recovering the non-manifold structure in the original mesh based on the reconstructed manifold mesh, the index information of the first duplicate vertices, and the non-manifold identifier information.
[0115] In the embodiments of this application, the decoding end decodes a second code stream to obtain second target information of the manifold mesh. For example, a CLERS pattern string is obtained by entropy decoding, and the connection relationships are reconstructed using the pattern string. Geometric information of the mesh is decoded using a method such as parallelogram inverse prediction, and UV coordinates in the mesh attribute information are decoded using a method such as similar triangle inverse prediction. When decoding non-manifold structure information, first information indicating whether or not a non-manifold structure exists in the mesh (i.e., first indicator information) is decoded. If a non-manifold structure exists in the mesh, further decoding is performed to obtain non-manifold identifier information of the overlapping points and index information of the overlapping points generated by dividing the non-manifold structure. The overlapping points generated by dividing the non-manifold structure are integrated, and the connection relationships are adjusted, further restoring the non-manifold structure in the mesh, thereby realizing a lossless codec for meshes containing non-manifold structures.
[0116] Selectively, recovering the non-manifold structure in the original mesh based on the reconstructed manifold mesh, the index information of the first duplicate vertices, and the non-manifold identifier information is: This includes recovering the non-manifold structure in the original mesh based on the reconstructed manifold mesh, the index information of the first duplicate vertices, the non-manifold identifier information, and the fourth instruction information. Here, the fourth instruction information is obtained by decoding the fifth code stream, and the fourth instruction information is used to indicate whether or not a vertex in the manifold mesh is a duplicate vertex.
[0117] Here, the decoding end can determine which of the four indicator information obtained through decoding is a duplicate vertex when the geometric information, attribute information, and connection relationships of the manifold mesh are encoded simultaneously. Based on the non-manifold identifier of the duplicate vertex, it is possible to determine which of the duplicate vertices were generated by partitioning the non-manifold structure.
[0118] Selectively, the decoding end decodes the second code stream and obtains the second target information of the manifold mesh. This includes decoding a second code stream based on a third instruction information for duplicate vertices in a manifold mesh, and obtaining geometric and attribute information of the manifold mesh. Here, the third instruction information is obtained by decoding the fourth code stream, and the third instruction information is used to indicate whether or not duplicate encoding has been performed on the geometric information and attribute information of the duplicate vertices.
[0119] In the embodiments of this application, the decoding end can determine whether the geometric and attribute information of the duplicate vertices is encoded repeatedly / multiple times based on the third instruction information obtained through decoding, thereby facilitating the decoding end to obtain the corresponding duplicate vertices through decoding.
[0120] Selectively, the first overlapping vertex includes geometrically overlapping vertices and attributely overlapping vertices. When the geometric vertices and attribute vertices in the manifold mesh have the same connection relationship, the geometrically overlapping vertices and attribute overlapping vertices share a set of non-manifold structure information, and the non-manifold structure information includes non-manifold identifier information and index information, or When the geometric vertices and attribute vertices in the manifold mesh have different connection relationships, the geometrically overlapping vertices correspond to a first set of non-manifold structure information, and the attribute overlapping vertices correspond to a second set of non-manifold structure information, and both the first set of non-manifold structure information and the second set of non-manifold structure information include non-manifold identifier information and index information.
[0121] In the embodiments of this application, having the same connection relationship between geometric vertices in a manifold mesh and attribute vertices means that there is a one-to-one correspondence between geometric vertices and attribute vertices in a manifold mesh. Having different connection relationships between geometric vertices in a manifold mesh means that there is no one-to-one correspondence between geometric vertices and attribute vertices in a manifold mesh.
[0122] Selectively, the methods of the embodiments of this application are The third code stream is decoded to obtain second instruction information indicating whether the geometric vertices and attribute vertices in the manifold mesh have the same connection relationship, The method further includes determining, based on the second instruction information, whether the geometric vertices and attribute vertices in the manifold mesh have the same connection relationship.
[0123] Selectively, the methods of the embodiments of this application are The process further includes decoding the sixth code stream and obtaining the texture map information of the original mesh.
[0124] The three-dimensional mesh decoding framework in the embodiment of this application is as shown in Figure 10. When decoding the connection relationship subcode stream to obtain a pattern string and reconstruct the connection relationships, decoding the geometric information of the mesh using a decoding method corresponding to the coding end, decoding the attribute information of the mesh using a decoding method corresponding to the coding end, and decoding the non-manifold structure information, first decoding whether or not non-manifold structure information (i.e., first indicator information) exists in the mesh, and if a non-manifold structure exists in the mesh, further decoding is performed to obtain the non-manifold identifier of the duplicate points and the duplicate point index information generated by dividing the non-manifold. (Note: Here again, the order of decoding the three-dimensional mesh connection relationships and decoding the vertex information is not emphasized, and it is sufficient to maintain the correspondence with the coding end method.) When recovering the non-manifold structure in post-processing, the duplicate points generated by dividing the non-manifold are integrated, and the connection relationships are adjusted to recover the non-manifold structure in the mesh. The lossless codec of the mesh containing the non-manifold structure is completed. It should be noted that the post-processing steps may include post-processing modules necessary for accurate decoding, such as recovering filtered duplicate points and removing added virtual vertices. For ease of explanation, Figure 10 lists only the modules for recovering non-manifold structures that are the subject of this application.
[0125] The specific implementation method for the decryption process is explained below.
[0126] As shown in Figure 10, the reversible decoding framework for three-dimensional meshes of this application is mainly divided into six parts: decoding of connection relationships, decoding of geometric information, decoding of attribute information, decoding of non-manifold structure information, reconstruction of the manifold mesh, and recovery of the non-manifold structure in post-processing. Each of these is described below.
[0127] 1) Decoding of connection relationships: Input: Connection relationship subcode stream to be decrypted, Output: Connection relationships of the manifold mesh and the vertex order of the decoded mesh. First, the connection relationship subcode stream is decoded to obtain a pattern string. The pattern string is traversed in a certain order (forward or reverse), and the connection relationships are reconstructed based on the corresponding patterns in the string. The traversal order of the vertices is output to the geometric information and attribute information decoding module.
[0128] 2) Decoding of geometric information: Input: Subcode stream of geometric information, decoding order of connection relationships, Output: Geometric information of the manifold mesh.
[0129] The decoding process for mesh geometric coordinates is the reverse of the encoding process: first, the coordinate prediction residuals are entropy-decoded. Then, based on the decoded triangles, the predicted coordinates of the points to be decoded are predicted according to the parallelogram method. Adding the residual values obtained by entropy decoding to the predicted coordinates gives the geometric coordinate positions to be decoded. The vertex traverse 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 triangles are encoded directly, without using predictive coding. After decoding the geometric coordinates of this triangle at the decoding end, the traverse decoding of the geometric coordinates of the vertices of other triangles is started, using the triangle as the initial triangle. It is also possible to use other decoding methods here, and the specific decoding method should not be emphasized, but rather correspond to the encoding end.
[0130] 3) Decoding of attribute information: Input: Code stream of attribute information to be decrypted, decryption order of connection relationships, Output: Attribute information of the manifold mesh reconstruction.
[0131] Using UV coordinates as an example, the decoding method where UV coordinates correspond to the encoded ends will not be emphasized here. Below, we will describe the decoding process using a similar triangle prediction algorithm.
[0132] The steps for decoding the UV coordinates are as follows: (1) Entropy-decode the UV coordinate code stream.
[0133] (2) The UV coordinates of the three vertices of the initial triangle are decoded. Predicted values are not calculated here. The initial triangle's UV coordinates are directly encoded, rather than encoding the residuals. The edges of the initial triangle are stored in the edge set.
[0134] (3) Select an edge τ from the set according to the access criteria and decode the UV coordinates for the vertices of the new triangle formed with τ. First, use the three-dimensional to two-dimensional mapping relationship of the triangle to calculate the predicted UV coordinates of the points to be decoded using a calculation method that matches the coded edges. Then, add the predicted values and the residuals from the entropy decoding to obtain the reconstructed UV coordinates.
[0135] (4) Add the two edges of the new triangle to the edge set and remove the vertex edge τ from the set. Take the next edge from the set and continue decoding the UV coordinates of the vertices of the triangles adjacent to this edge until the decoding of the UV coordinates of all vertices is complete, then return to step (3).
[0136] 4) Decoding of non-manifold structure information: Input: Subcode stream of non-manifold structure information, decoding order of geometric information and decoding order of attribute information. Output: Information indicating whether or not a non-manifold structure exists in the mesh, non-manifold identifiers for duplicate points, and index information for duplicate points resulting from the partitioning of the non-manifold structure.
[0137] First, the data is decoded to obtain information indicating whether or not a non-manifold structure exists in the mesh. For example, if this information is an identifier indicating the presence or absence of a non-manifold structure, if the identifier is 0, there is no need to decode the non-manifold identifier of the duplicate points and the index information of the duplicate points resulting from the division of the non-manifold structure, and the subsequent module for recovering the non-manifold structure is skipped. If the identifier is 1, the non-manifold identifier of the duplicate points and the index information of the duplicate points resulting from the division of the non-manifold structure are decoded. (Note: To consider the case where geometric vertices and UV vertices have the same connection relationship, the decoded information indicating whether or not the geometric vertices and UV vertices have the same connection relationship is used to determine whether or not the non-manifold identifier information of the geometric vertices and UV vertices and the index information of the duplicate points resulting from the division of the non-manifold structure need to be decoded, respectively.)
[0138] The decoding of the non-manifold identifiers of duplicate points and the index information of duplicate points generated by partitioning the non-manifold structure employs a method corresponding to the encoding end. First, entropy decoding is performed to obtain the non-manifold identifiers of the duplicate points, and then the index information of duplicate points generated by partitioning the non-manifold structure is decoded and recorded. This information is output to the non-manifold structure recovery module.
[0139] 5) Reconstructing the manifold mesh: Input: Connection relationships of the manifold mesh, geometric information of the manifold mesh, attribute information of the manifold mesh, Output: Manifold mesh, The manifold mesh can be directly reconstructed using the connection relationships, geometric information, and attribute information of the manifold mesh.
[0140] 6) Recovery of non-manifold structure: Input: Manifold mesh, non-manifold identifier of duplicate points, index information of duplicate points generated by partitioning the non-manifold structure. Output: Reconstruction of non-manifold mesh The recovery process for non-manifold edges and non-manifold vertices is the same. First, duplicate points are searched for in the manifold mesh, which may be done using methods such as a hash table or a kd-tree. Taking a hash table as an example, a hash table is established, the key of which is the coordinates of a vertex, and the value is the number of occurrences of the vertex with these coordinates, which is used to search for, determine, and record duplicate points. Then, all duplicate points are traversed, and based on the non-manifold identifier of the duplicate point, it is determined whether the current duplicate point is a duplicate point that arose from partitioning the non-manifold. If the current duplicate point is not a duplicate point resulting from the subdivision of the non-manifold, the current vertex corresponds to the index of the current vertex, i.e., the index is not updated. If the current vertex is a duplicate point resulting from the subdivision of the non-manifold, the duplicate point index information resulting from the subdivision of the non-manifold is used to determine whether it is a target vertex that the point with the current vertex information is to merge. If it is a target vertex to be merged, the current vertex corresponds to the index of the current vertex, and the index is not updated. If it is not a target vertex to be merged, the operation to merge the duplicate point resulting from the subdivision of the non-manifold is performed, i.e., the index of the current point is updated to the index of its corresponding target vertex to be merged. Finally, the geometric information list and attribute information list are updated, and the index values of the geometric points and attribute points in the connection relationships are updated to obtain the reconstructed non-manifold mesh.
[0141] To explain, considering whether geometric vertices and attribute vertices have the same connection relationship, if geometric vertices and attribute vertices have different connection relationships, then the geometric vertices and attribute vertices perform the above steps respectively to obtain a reconstructed non-manifold mesh.
[0142] When decoding connection relationships, geometric information, attribute information, and non-manifold structure information simultaneously, it is also necessary to decode additional information indicating whether or not a vertex is a duplicate point. In such cases, during the decoding process, it is necessary to search and determine whether or not a duplicate point is a duplicate point that arose from dividing the non-manifold structure, and then to merge the duplicate points, update the geometric information list and attribute information list, and update the index values of the geometric and attribute vertices in the connection relationships to recover the non-manifold structure. After post-processing, such as removing virtual points, the reconstructed non-manifold mesh is finally obtained.
[0143] In the embodiment of this application, the decoding end decodes the first code stream to obtain non-manifold identifier information and index information of the first duplicate vertices, and recovers the non-manifold structure of the original mesh based on the index information of the first duplicate vertices and the non-manifold identifier information. This approach achieves the objective of performing lossless coding on the original mesh by recovering the non-manifold structure of the original mesh based on the non-manifold identifier information and index information of the first duplicate vertices obtained by decoding the first code stream. Since non-manifold identifiers are added only to the duplicate points in the manifold mesh, rather than adding non-manifold identifiers to each vertex in the manifold mesh, a lossless codec for a three-dimensional mesh can be realized more efficiently.
[0144] In the encoding method according to the embodiment of this application, the execution body may be an encoding device. In the embodiment of this application, the encoding device according to the embodiment of this application will be described using the example that the encoding device performs the encoding method.
[0145] As shown in Figure 11, the embodiment of this application further provides an encoding device 1100, which encoding device 1100 is A first acquisition module 1101 for decomposing the non-manifold structure in the original mesh and obtaining a manifold mesh, A first processing module 1102 for adding non-manifold identifier information to duplicate vertices in the manifold mesh and determining index information of the first duplicate vertex among the duplicate vertices, wherein the non-manifold identifier information is used to indicate whether the duplicate vertex is a duplicate vertex that occurred when the non-manifold structure was partitioned, and the first processing module 1102 is a duplicate vertex that occurred when the non-manifold structure was partitioned, It includes a second acquisition module 1103 for encoding the non-manifold identifier information and the index information of the first duplicate vertices to obtain a first code stream.
[0146] Selectively, the first code stream further includes encoded information of the first instruction information, which is used to indicate whether or not a non-manifold structure exists in the original mesh.
[0147] Selectively, the apparatus of the embodiments of this application is A third acquisition module for encoding the aforementioned manifold mesh to obtain a second code stream, The system further includes a fourth acquisition module for obtaining the total code stream of the original mesh based on the first code stream and the second code stream.
[0148] Selectively, the third acquisition module is used to encode the second target information of the manifold mesh in order to obtain the second code stream. Here, the second target information includes connection relationships, geometric information, and attribute information.
[0149] Selectively, the first overlapping vertex includes geometrically overlapping vertices and attributely overlapping vertices. When the geometric vertices and attribute vertices in the manifold mesh have the same connection relationship, the geometrically overlapping vertices and attribute overlapping vertices share a set of non-manifold structure information, and the non-manifold structure information includes non-manifold identifier information and index information, or When the geometric vertices and attribute vertices in the manifold mesh have different connection relationships, the geometrically overlapping vertices correspond to a first set of non-manifold structure information, and the attribute overlapping vertices correspond to a second set of non-manifold structure information, and both the first set of non-manifold structure information and the second set of non-manifold structure information include non-manifold identifier information and index information.
[0150] Selectively, the total code stream of the original mesh is The system further includes a third code stream obtained by encoding second instruction information for indicating whether the geometric vertices and attribute vertices in the manifold mesh have the same connection relationship.
[0151] Selectively, the total code stream of the original mesh is The system further includes a fourth code stream obtained by encoding a third instruction information for duplicate vertices in the manifold mesh, the third instruction information being used to indicate whether the geometric information and attribute information of the duplicate vertices have been duplicate-encoded.
[0152] When selectively the encoding terminal encodes the connection relationships, geometric information, and attribute information simultaneously, the total code stream of the original mesh is: The system further includes a fifth code stream obtained by encoding a fourth instruction information for a vertex in the manifold mesh, the fourth instruction information being used to indicate whether or not the vertex is a duplicate vertex.
[0153] The encoding device of the embodiment of this application divides the non-manifold structure of the original mesh to obtain a manifold mesh, adds non-manifold identifier information to the duplicate vertices in the manifold mesh, and determines the index information of the first duplicate vertex among the duplicate vertices, wherein the non-manifold identifier information is used to indicate whether or not the duplicate vertex is a duplicate vertex that occurred when the non-manifold structure was divided, the first duplicate vertex is a duplicate vertex that occurred when the non-manifold structure was divided, and the encoding end encodes the non-manifold identifier information and the index information of the first duplicate vertex to obtain a first code stream. With the above method, the decoding end can recover the non-manifold structure of the original mesh based on the non-manifold identifier information and the index information of the first duplicate vertex obtained by decoding this first code stream, thereby achieving the objective of performing reversible encoding on the original mesh. When encoding a mesh containing a non-manifold structure, the encoding terminal adds a non-manifold identifier only to overlapping points in the manifold mesh, rather than adding a non-manifold identifier to each vertex in the manifold mesh. This allows for more efficient reversible encoding of three-dimensional meshes.
[0154] As shown in Figure 12, the embodiment of this application further provides a decoding device 1200, A fifth acquisition module 1201 for decoding a first code stream and obtaining decoded information, wherein the decoded information includes non-manifold identifier information and index information of a first duplicate vertex, the first duplicate vertex being a duplicate vertex generated by subdividing the non-manifold structure in the original mesh, and the non-manifold identifier information is used by the fifth acquisition module 1201 to indicate whether or not the duplicate vertex is a duplicate vertex generated when the non-manifold structure is subdivided. The system includes a second processing module 1202 for recovering the non-manifold structure in the original mesh based on the aforementioned decoding information.
[0155] Selectively, the decoding information further includes first indicator information for indicating whether or not a non-manifold structure exists in the original mesh, The second processing module is used to recover the non-manifold structure in the original mesh based on the first duplicate vertex index information and non-manifold identifier information when the first instruction information indicates that a non-manifold structure exists in the original mesh.
[0156] Selectively, the second processing module, A reconstruction submodule for reconstructing a manifold mesh based on second target information of the manifold mesh, wherein the second target information is obtained by decoding a second code stream, and the reconstruction submodule includes connection relationships, geometric information and attribute information. The system includes a recovery submodule for recovering the non-manifold structure in the original mesh based on the reconstructed manifold mesh, the index information of the first duplicate vertices, and the non-manifold identifier information.
[0157] Selectively, the recovery submodule is used to recover the non-manifold structure in the original mesh based on the reconstructed manifold mesh, the index information of the first duplicate vertices, the non-manifold identifier information, and the fourth instruction information. Here, the fourth instruction information is obtained by decoding the fifth code stream, and the fourth instruction information is used to indicate whether or not a vertex in the manifold mesh is a duplicate vertex.
[0158] Selectively, the apparatus of the embodiments of this application is The system further includes a sixth acquisition submodule for decoding a second code stream and obtaining second target information of the manifold mesh.
[0159] Selectively, the sixth acquisition module is used to decode the second code stream based on the third instruction information for duplicate vertices in the manifold mesh, and to acquire the geometric and attribute information of the manifold mesh. Here, the third instruction information is obtained by decoding the fourth code stream, and the third instruction information is used to indicate whether or not duplicate encoding has been performed on the geometric information and attribute information of the duplicate vertices.
[0160] Selectively, the first overlapping vertex includes geometrically overlapping vertices and attributely overlapping vertices. When the geometric vertices and attribute vertices in the manifold mesh have the same connection relationship, the geometrically overlapping vertices and attribute overlapping vertices share a set of non-manifold structure information, and the non-manifold structure information includes non-manifold identifier information and index information, or When the geometric vertices and attribute vertices in the manifold mesh have different connection relationships, the geometrically overlapping vertices correspond to a first set of non-manifold structure information, and the attribute overlapping vertices correspond to a second set of non-manifold structure information, and both the first set of non-manifold structure information and the second set of non-manifold structure information include non-manifold identifier information and index information.
[0161] Selectively, the apparatus of the embodiments of this application is A seventh acquisition module for decoding a third code stream and obtaining second instruction information to indicate whether the geometric vertices and attribute vertices in the manifold mesh have the same connection relationship, The system further includes a determination module for determining whether the geometric vertices and attribute vertices in the manifold mesh have the same connection relationship, based on the second instruction information.
[0162] The decoding device of the embodiment of this application decodes a first code stream to obtain first instruction information, non-manifold identifier information, and first duplicate vertex index information. If the first instruction information indicates that a non-manifold structure exists in the original mesh, the non-manifold structure in the original mesh is recovered based on the first duplicate vertex index information and the non-manifold identifier information. This method achieves the objective of performing reversible coding on the original mesh by recovering the non-manifold structure of the original mesh based on the non-manifold identifier information and the first duplicate vertex index information obtained by decoding the first code stream. Since non-manifold identifiers are added only to duplicate points in the manifold mesh, rather than to each vertex in the manifold mesh, a reversible codec for a three-dimensional mesh can be realized more efficiently.
[0163] The encoding or decoding device in the embodiments of this application may be an electronic device, such as an electronic device having an operating system, or a component of an electronic device, such as an integrated circuit or a chip. This electronic device may be a terminal or other device. Other exemplary devices may be a server, network-attached storage (NAS), etc., and the embodiments of this application are not specifically limited.
[0164] The encoding apparatus according to the embodiment of this application can implement each process realized by the embodiment of the method shown in Figure 2 and achieve the same technical effects, and to avoid repetition of the explanation, it will not be explained further here.
[0165] The decoding apparatus according to the embodiment of this application can implement each process realized by the embodiment of the method shown in Figure 9 and achieve the same technical effects, and to avoid repetition of the explanation, it will not be explained further here.
[0166] Selectively, as shown in Figure 13, embodiments of the present application further provide an electronic device 1300 including a processor 1301 and a memory 1302, the memory 1302 storing a program or instruction that can be executed by the processor 1301, and when this program or instruction is executed by the processor 1301, each step of the embodiment of the encoding or decoding method described above can be realized and the same technical effect can be achieved. To avoid repetition of the explanation, no further explanation is provided here.
[0167] Embodiments of this application further provide an encoding device including a processor and a communication interface, wherein the processor performs a partitioning process on a non-manifold structure in the original mesh to obtain a manifold mesh, adds non-manifold identifier information to duplicate vertices in the manifold mesh, and determines index information for a first duplicate vertex among the duplicate vertices, wherein the non-manifold identifier information is used to indicate whether the duplicate vertex is a duplicate vertex that arose when the non-manifold structure was partitioned, and the first duplicate vertex is used to encode the fact that it is a duplicate vertex that arose when the non-manifold structure was partitioned, the non-manifold identifier information and the index information of the first duplicate vertex, and to obtain a first code stream. Embodiments of this device correspond to embodiments of the above encoding method, and each implementation process and implementation method of embodiments of the above method can be applied to embodiments of this device and achieve the same technical effects.
[0168] Embodiments of this application further provide a decoding device including a processor and a communication interface, wherein the processor decodes a first code stream and obtains decoding information, the decoding information including non-manifold identifier information and index information of the first duplicate vertices, the first duplicate vertices being duplicate vertices generated by subdividing the non-manifold structure in the original mesh, the non-manifold identifier information being used to indicate whether the duplicate vertices are duplicate vertices generated when subdividing the non-manifold structure, and to recover the non-manifold structure in the original mesh based on the decoding information. Embodiments of this device correspond to embodiments of the above decoding method, and each implementation process and implementation method of the embodiment of the above method can be applied to embodiments of this device and achieve the same technical effects.
[0169] Specifically, Figure 14 is a schematic diagram of the hardware structure of an encoding device or decoding device that realizes an embodiment of the present application.
[0170] This encoding or decoding device includes, but is not limited to, some of the following components: radio frequency unit 1401, network module 1402, audio output unit 1403, input unit 1404, sensor 1405, display unit 1406, user input unit 1407, interface unit 1408, memory 1409, and processor 1410.
[0171] As those skilled in the art will understand, the encoding or decoding device may further include a power supply (e.g., a battery) to power each component, and the power supply may be logically connected to the processor 1410 by a power management system, thereby enabling functions such as charge / discharge management and power consumption management by the power management system. The device structure shown in Figure 14 does not constitute a limitation on the device, and the device may include more or fewer components than those shown, or combinations of some components, or different arrangements of components, which will not be described further here.
[0172] It should be understood that in the embodiments of this application, the input unit 1404 may include a graphics processing unit (GPU) 14041 and a microphone 14042, the graphics processor 14041 processing still images or video image data obtained by an image capture device (e.g., a camera) in video capture mode or image capture mode. The display unit 1406 may include a display panel 14061, which may be configured in the form of a liquid crystal display, organic light-emitting diodes, etc. The user input unit 1407 includes at least one of a touch panel 14071 and other input devices 14072. The touch panel 14071 is also called a touchscreen. The touch panel 14071 may include two parts: a touch detection device and a touch controller. The other input devices 14072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control buttons, switch buttons, etc.), a trackball, a mouse, or an operating lever, and will not be described further here.
[0173] In the embodiments of this application, the radio frequency unit 1401 can receive downlink data from network-side equipment and transmit it to the processor 1410 for processing, and the radio frequency unit 1401 can also transmit uplink data to network-side equipment. Generally, the radio frequency unit 1401 includes, but is not limited to, an antenna, amplifier, transceiver, coupler, low-noise amplifier, duplexer, etc.
[0174] Memory 1409 may be used to store software programs or instructions and various types of data. Memory 1409 may include a first storage area mainly for storing programs or instructions and a second storage area for storing data, where the first storage area can store an operating system, an application program or instructions necessary for at least one function (e.g., audio playback function, image playback function, etc.), etc. Memory 1409 may also include volatile memory or non-volatile memory, or memory 1409 may include both volatile and non-volatile memory. Here, non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (Erasable PROM, EPROM), electrically erasable programmable read-only memory (Electrically EPROM, EEPROM), or flash memory. Volatile memory may be random access memory (RAM), static random access memory (Static RAM, SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (Synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (Double Data Rate SDRAM, DDRSDRAM), enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (Synch link DRAM, SLDRAM), and direct memory bus random access memory (Direct Rambus RAM, DRRAM). Memory 1409 in the embodiments of this application includes, but is not limited to, these and any other suitable types of memory.
[0175] The processor 1410 may include one or more processing units, and optionally, the processor 1410 integrates an application processor and a modem processor, where the application processor mainly handles operations related to the operating system, user interface and application programs, and the modem processor mainly handles wireless communication signals, such as a baseband processor. To be clear, the above modem processor does not have to be integrated into the processor 1410.
[0176] Selectively, if this device is an encoding device: Processor 1410 is used to partition the non-manifold structure in the original mesh and obtain a manifold mesh. The encoding terminal adds non-manifold identifier information to the duplicate vertices in the manifold mesh and determines the index information of the first duplicate vertex among the duplicate vertices, wherein the non-manifold identifier information is used to indicate whether the duplicate vertex is a duplicate vertex that occurred when the non-manifold structure was partitioned, and the first duplicate vertex is a duplicate vertex that occurred when the non-manifold structure was partitioned. The encoding terminal encodes the non-manifold identifier information and the index information of the first duplicate vertex to obtain a first code stream.
[0177] Selectively, the first code stream further includes encoded information of the first instruction information, which is used to indicate whether or not a non-manifold structure exists in the original mesh.
[0178] Selectively, the processor 1410 further, Encoding the aforementioned manifold mesh to obtain a second code stream, This is used to obtain the total code stream of the original mesh based on the first code stream and the second code stream.
[0179] Selectively, the processor 1410 further, Used to encode the second target information of the manifold mesh and obtain the second code stream, Here, the second target information includes connection relationships, geometric information, and attribute information.
[0180] Selectively, the first overlapping vertex includes geometrically overlapping vertices and attributely overlapping vertices. When the geometric vertices and attribute vertices in the manifold mesh have the same connection relationship, the geometrically overlapping vertices and attribute overlapping vertices share a set of non-manifold structure information, and the non-manifold structure information includes non-manifold identifier information and index information, or When the geometric vertices and attribute vertices in the manifold mesh have different connection relationships, the geometrically overlapping vertices correspond to a first set of non-manifold structure information, and the attribute overlapping vertices correspond to a second set of non-manifold structure information, and both the first set of non-manifold structure information and the second set of non-manifold structure information include non-manifold identifier information and index information.
[0181] Selectively, the total code stream of the original mesh is The system further includes a third code stream obtained by encoding second instruction information for indicating whether the geometric vertices and attribute vertices in the manifold mesh have the same connection relationship.
[0182] Selectively, the total code stream of the original mesh is The system further includes a fourth code stream obtained by encoding a third instruction information for duplicate vertices in the manifold mesh, the third instruction information being used to indicate whether the geometric information and attribute information of the duplicate vertices have been duplicate-encoded.
[0183] When selectively the encoding terminal encodes the connection relationships, geometric information, and attribute information simultaneously, the total code stream of the original mesh is: The system further includes a fifth code stream obtained by encoding a fourth instruction information for a vertex in the manifold mesh, the fourth instruction information being used to indicate whether or not the vertex is a duplicate vertex.
[0184] Selectively, if the above device is a decryption device: The processor 1410 is used to decode the first code stream and obtain decoded information, the decoded information includes non-manifold identifier information and index information of the first duplicate vertices, the first duplicate vertices are duplicate vertices that arose from the subdivision process of the non-manifold structure in the original mesh, the non-manifold identifier information is used to indicate whether or not the duplicate vertices are duplicate vertices that arose when the non-manifold structure was subdivision, and the first indication information is used to indicate whether or not a non-manifold structure exists in the original mesh. The decoding terminal recovers the non-manifold structure in the original mesh based on the decoding information.
[0185] Selectively, the decoding information further includes first indicator information for indicating whether or not a non-manifold structure exists in the original mesh, The aforementioned processor 1410 further, When the first instruction information indicates that a non-manifold structure exists in the original mesh, it is used to recover the non-manifold structure in the original mesh based on the first duplicate vertex index information and non-manifold identifier information. Selectively, the processor 1410 further, This is used to reconstruct the manifold mesh based on second target information of the manifold mesh, where the second target information is obtained by decoding a second code stream, and the second target information includes connection relationships, geometric information, and attribute information. This is used to recover the non-manifold structure in the original mesh based on the reconstructed manifold mesh, the index information of the first duplicate vertices, and the non-manifold identifier information.
[0186] Selectively, the processor 1410 further, Used to recover the non-manifold structure in the original mesh based on the reconstructed manifold mesh, the index information of the first duplicate vertices, the non-manifold identifier information, and the fourth instruction information. Here, the fourth instruction information is obtained by decoding the fifth code stream, and the fourth instruction information is used to indicate whether or not a vertex in the manifold mesh is a duplicate vertex.
[0187] Selectively, the processor 1410 further, The second code stream is used to decode and obtain the second target information of the manifold mesh.
[0188] Selectively, the processor 1410 further, Based on the third instruction information for duplicate vertices in the manifold mesh, the second code stream is decoded and used to obtain the geometric and attribute information of the manifold mesh. Here, the third instruction information is obtained by decoding the fourth code stream, and the third instruction information is used to indicate whether or not duplicate encoding has been performed on the geometric information and attribute information of the duplicate vertices.
[0189] Selectively, the first overlapping vertex includes geometrically overlapping vertices and attributely overlapping vertices. When the geometric vertices and attribute vertices in the manifold mesh have the same connection relationship, the geometrically overlapping vertices and attribute overlapping vertices share a set of non-manifold structure information, and the non-manifold structure information includes non-manifold identifier information and index information, or When the geometric vertices and attribute vertices in the manifold mesh have different connection relationships, the geometrically overlapping vertices correspond to a first set of non-manifold structure information, and the attribute overlapping vertices correspond to a second set of non-manifold structure information, and both the first set of non-manifold structure information and the second set of non-manifold structure information include non-manifold identifier information and index information.
[0190] Selectively, the processor 1410 further, The third code stream is decoded to obtain second instruction information indicating whether the geometric vertices and attribute vertices in the manifold mesh have the same connection relationship, Based on the second instruction information, it is used to determine whether the geometric vertices and attribute vertices in the manifold mesh have the same connection relationship.
[0191] In the embodiment of this application, the non-manifold structure of the original mesh is partitioned to obtain a manifold mesh, non-manifold identifier information is added to the duplicate vertices in the manifold mesh, and index information of the first duplicate vertex among the duplicate vertices is determined. The non-manifold identifier information is used to indicate whether the duplicate vertex is a duplicate vertex that arose when the non-manifold structure was partitioned, and the first duplicate vertex is a duplicate vertex that arose when the non-manifold structure was partitioned. The encoding end encodes the non-manifold identifier information and the index information of the first duplicate vertex to obtain a first code stream. With the above method, the decoding end can decode this first code stream and recover the non-manifold structure of the original mesh based on the non-manifold identifier information and the index information of the first duplicate vertex obtained, thereby achieving the objective of performing reversible encoding on the original mesh. When encoding a mesh containing a non-manifold structure, the encoding terminal adds a non-manifold identifier only to overlapping points in the manifold mesh, rather than adding a non-manifold identifier to each vertex in the manifold mesh. This allows for more efficient reversible encoding of three-dimensional meshes.
[0192] Embodiments of this application further provide a readable storage medium in which a program or instruction is stored, and when this program or instruction is executed by a processor, each process of the embodiment of the encoding or decoding method described above can be realized and the same technical effects can be achieved, and to avoid repetition of the description, no further explanation is provided here.
[0193] Here, the processor is the processor in the apparatus described in the above embodiment. The readable storage medium includes a computer-readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk, or an optical disk.
[0194] Embodiments of this application further provide a chip comprising a processor and a communication interface, the communication interface being coupled with the processor, the processor executing a program or instructions and being used to implement each process of the embodiment of the encoding or decoding method and achieving the same technical effects, which are not described further herein to avoid repetition of the description.
[0195] It should be understood that the chips referred to in the embodiments of this application may also be called system-level chips, system chips, chip systems, or system-on-a-chip, etc.
[0196] Embodiments of this application further provide a computer program / program product in which the computer program / program product is stored in a storage medium and executed by at least one processor to realize each process of the above-described embodiment of the encoding method or decoding method and achieve the same technical effects, and to avoid repetition of the description, no further description is provided here.
[0197] Embodiments of this application further provide a codec system including an encoding device or a decoding device, wherein the encoding device may be used to perform the steps of the encoding method described above, and the decoding device may be used to perform the steps of the decoding method described above.
[0198] It should be noted that, in this specification, the terms “include,” “incorporate,” or any other variation thereof are intended to cover non-exclusive “include,” thereby including not only those elements but also other elements not explicitly listed, or elements specific to such process, method, article, or apparatus. Unless otherwise specified, an element limited by the phrase “includes one of…” is not excluded from the existence of other identical elements in a process, method, article, or apparatus containing that element. It should also be noted that the scope of methods and apparatus in embodiments of this application is not limited to performing functions in the order shown or discussed, but may include performing functions in a manner that is essentially simultaneous or in reverse order based on the functions involved, for example, performing methods described in a different procedure than that described, and adding, omitting, or combining various steps. Furthermore, features described by reference to some examples may be combined with other examples.
[0199] As will be readily apparent to those skilled in the art from the above description of the embodiments, the methods of the above embodiments can be implemented in the form of software and a necessary general-purpose hardware platform. Of course, they may also be implemented in hardware, but in many cases the former is a more preferred embodiment. With this understanding in mind, the technical invention of this application may be embodied in substance or in part in relation to the art in the form of a computer software product, which is stored on a single storage medium (e.g., ROM / RAM, magnetic disk, optical disk) and contains some instructions for causing a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to perform the methods of each embodiment of this application.
[0200] The above describes embodiments of this application, accompanied by drawings; however, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can, by the suggestion of this application, make many forms, as long as they do not deviate from the spirit and claims of this application, and all of these fall within the scope of protection of this application.
Claims
1. An encoding method, The encoding process involves partitioning the non-manifold structure in the original mesh to obtain a manifold mesh, The encoding terminal adds non-manifold identifier information to the duplicate vertices in the manifold mesh and determines the index information of the first duplicate vertex among the duplicate vertices, wherein the non-manifold identifier information is used to indicate whether the duplicate vertex is a duplicate vertex that occurred when the non-manifold structure was partitioned, and the first duplicate vertex is a duplicate vertex that occurred when the non-manifold structure was partitioned. An encoding method comprising the encoding terminal encoding the non-manifold identifier information and the index information of the first duplicate vertices to obtain a first code stream.
2. The method according to claim 1, wherein the first code stream further includes encoded information of first instruction information, the first instruction information is used to indicate whether or not a non-manifold structure exists in the original mesh.
3. The aforementioned method, The encoding terminal encodes the manifold mesh and obtains a second code stream, The method according to claim 1 or 2, further comprising the encoding terminal obtaining a total code stream of the original mesh based on the first code stream and the second code stream.
4. The encoding terminal encodes the manifold mesh and obtains a second code stream, The encoding end encodes a second target information of the manifold mesh and obtains the second code stream, The method according to claim 3, wherein the second target information includes connection relationships, geometric information, and attribute information.
5. The aforementioned first duplicate vertex includes geometrically duplicate vertices and attributeally duplicate vertices, When the geometric vertices and attribute vertices in the manifold mesh have the same connection relationship, the geometrically overlapping vertices and attribute overlapping vertices share a set of non-manifold structure information, and the non-manifold structure information includes non-manifold identifier information and index information, or The method according to any one of claims 1 to 4, wherein, when the geometric vertices and attribute vertices in the manifold mesh have different connection relationships, the geometrically overlapping vertices correspond to a first set of non-manifold structure information, and the attribute overlapping vertices correspond to a second set of non-manifold structure information, and both the first set of non-manifold structure information and the second set of non-manifold structure information include non-manifold identifier information and index information.
6. The total code stream of the original mesh is: The method according to claim 5, further comprising a third code stream obtained by encoding a second instruction information for indicating whether the geometric vertices and attribute vertices in the manifold mesh have the same connection relationship.
7. The total code stream of the original mesh is: The method according to any one of claims 1 to 6, further comprising a fourth code stream obtained by encoding a third instruction information for duplicate vertices in the manifold mesh, the third instruction information being used to indicate whether the geometric information and attribute information of the duplicate vertices have been duplicate-encoded.
8. When the encoding terminal encodes the connection relationship, geometric information, and attribute information simultaneously, the total code stream of the original mesh is: The method according to claim 4, further comprising a fifth code stream obtained by encoding a fourth instruction information for a vertex in the manifold mesh, wherein the fourth instruction information is used to indicate whether or not the vertex is a duplicate vertex.
9. A decryption method, The decoding end decodes the first code stream and obtains decoding information, wherein the decoding information includes non-manifold identifier information and index information of the first duplicate vertex, the first duplicate vertex being a duplicate vertex generated by subdividing the non-manifold structure in the original mesh, and the non-manifold identifier information is used to indicate whether or not the duplicate vertex is a duplicate vertex generated when the non-manifold structure was subdivided. A decoding method comprising the decoding end recovering a non-manifold structure in the original mesh based on the decoding information.
10. The decoding information further includes a first indicator information for indicating whether or not a non-manifold structure exists in the original mesh, The decoding end recovers the non-manifold structure in the original mesh based on the decoding information. The method according to claim 9, wherein, when the first instruction information indicates that a non-manifold structure exists in the original mesh, the method includes recovering the non-manifold structure in the original mesh based on the first duplicate vertex index information and the non-manifold identifier information.
11. Based on the index information of the first duplicate vertices and the non-manifold identifier information, recovering the non-manifold structure in the original mesh is: Reconstructing a manifold mesh based on second target information of the manifold mesh, wherein the second target information is obtained by decoding a second code stream, and the second target information includes connection relationships, geometric information, and attribute information. The method according to claim 9 or 10, comprising recovering the non-manifold structure in the original mesh based on the reconstructed manifold mesh, the index information of the first duplicate vertices, and the non-manifold identifier information.
12. Recovering the non-manifold structure in the original mesh based on the reconstructed manifold mesh, the index information of the first duplicate vertices, and the non-manifold identifier information is: This includes recovering the non-manifold structure in the original mesh based on the reconstructed manifold mesh, the index information of the first duplicate vertices, the non-manifold identifier information, and the fourth instruction information. The method according to claim 11, wherein the fourth instruction information is obtained by decoding a fifth code stream, and the fourth instruction information is used to indicate whether or not a vertex in the manifold mesh is a duplicate vertex.
13. The method according to claim 11 or 12, further comprising the decoding end decoding a second code stream to obtain second target information of the manifold mesh.
14. The decoding end decodes the second code stream and obtains the second target information of the manifold mesh, This includes decoding a second code stream based on a third instruction information for duplicate vertices in a manifold mesh, and obtaining geometric and attribute information of the manifold mesh. The method according to claim 13, wherein the third instruction information is obtained by decoding the fourth code stream, and the third instruction information is used to indicate whether or not duplicate encoding has been performed on the geometric information and attribute information of the duplicate vertices.
15. The aforementioned first duplicate vertex includes geometrically duplicate vertices and attributeally duplicate vertices, When the geometric vertices and attribute vertices in the manifold mesh have the same connection relationship, the geometrically overlapping vertices and attribute overlapping vertices share a set of non-manifold structure information, and the non-manifold structure information includes non-manifold identifier information and index information, or The method according to any one of claims 9 to 14, wherein, when the geometric vertices and attribute vertices in the manifold mesh have different connection relationships, the geometrically overlapping vertices correspond to a first set of non-manifold structure information, and the attribute overlapping vertices correspond to a second set of non-manifold structure information, and both the first set of non-manifold structure information and the second set of non-manifold structure information include non-manifold identifier information and index information.
16. The third code stream is decoded to obtain second instruction information indicating whether the geometric vertices and attribute vertices in the manifold mesh have the same connection relationship, The method according to claim 15, further comprising determining whether the geometric vertices and attribute vertices in the manifold mesh have the same connection relationship based on the second instruction information.
17. An encoding device, A first acquisition module for decomposing the non-manifold structure in the original mesh and obtaining a manifold mesh, A first processing module for adding non-manifold identifier information to duplicate vertices in the manifold mesh and determining index information for a first duplicate vertex among the duplicate vertices, wherein the non-manifold identifier information is used to indicate whether the duplicate vertex is a duplicate vertex that occurred when the non-manifold structure was partitioned, and the first duplicate vertex is a duplicate vertex that occurred when the non-manifold structure was partitioned. An encoding device comprising a second acquisition module for encoding the non-manifold identifier information and the index information of the first duplicate vertices to obtain a first code stream.
18. A decoding device, A fifth acquisition module for decoding a first code stream and obtaining decoded information, wherein the decoded information includes non-manifold identifier information and index information of a first duplicate vertex, the first duplicate vertex being a duplicate vertex generated by subdividing the non-manifold structure in the original mesh, and the non-manifold identifier information is used to indicate whether or not the duplicate vertex is a duplicate vertex generated when the non-manifold structure is subdivided. A decoding apparatus comprising a second processing module for recovering the non-manifold structure in the original mesh based on the decoding information.
19. Electronic device comprising a processor and memory, wherein the memory stores a program or instruction that can be executed on the processor, and when the program or instruction is executed by the processor, the electronic device implements the steps of the encoding method described in any one of claims 1 to 8, or the steps of the decoding method described in any one of claims 9 to 16.
20. A readable storage medium wherein a program or instruction is stored in the readable storage medium, and when the program or instruction is executed by a processor, the steps of the encoding method described in any one of claims 1 to 8 or the steps of the decoding method described in any one of claims 9 to 16 are realized.