Encoding method and apparatus, decoding method and apparatus, and electronic device
By acquiring and encoding sub-mesh merging information at the encoding end, the problem of insufficient decoding mesh recovery performance in existing technologies is solved, and high-quality 3D mesh data decoding is achieved.
Patent Information
- Application Number
- PCT/CN2025/103811
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-06-28
- Filing Date
- 2025-06-26
- Publication Date
- 2026-01-02
AI Technical Summary
Existing technologies fail to effectively handle repeatedly divided sub-mesh boundary points when decoding 3D mesh data, resulting in a decrease in the performance of decoded mesh recovery.
The encoding end obtains the merging information of the reconstructed sub-grids and encodes it into a bitstream, which is then sent to the decoding end. The decoding end performs merging processing on the reconstructed sub-grids based on the merging information, thereby improving the recovery performance of the decoded grid.
By merging the data, a high-quality decoded mesh is recovered, improving the decoding performance of 3D mesh data.
Smart Images

Figure CN2025103811_02012026_PF_FP_ABST
Abstract
Description
Encoding method, decoding method, device and electronic equipment
[0001] Cross-reference to related applications
[0002] The present application is based on the Chinese patent application No. 202410862743.3, filed on June 28, 2024, and claims the priority of the Chinese patent application No. 202410862743.3, the whole content of which is incorporated herein by reference. TECHNICAL FIELD
[0003] The present application relates to the field of coding and decoding, in particular, to an encoding method, a decoding method, a device and an electronic equipment. BACKGROUND
[0004] In recent years, with the rapid development of multimedia technology, relevant research results are rapidly industrialized and become an important part of people's life. Three-dimensional models have become a new generation of digital media after audio, image and video. Three-dimensional mesh is a common representation of three-dimensional models. Compared with traditional multimedia such as images and videos, three-dimensional mesh models have stronger interactivity and more realistic characteristics, which have been widely used in various fields such as business, manufacturing, construction, education, medicine, entertainment, art and military.
[0005] With the increasing demand for three-dimensional mesh models in visual effects, the data size and complexity of three-dimensional mesh models are also increasing rapidly. Efficient compression of three-dimensional mesh data is crucial to facilitate the transmission, storage and processing of three-dimensional mesh data. For example, the encoding end divides the three-dimensional mesh into multiple sub-meshes, and performs simplification and quantization operations on each sub-mesh. These operations can reduce the size of the code stream, but also reduce the recovery performance of the decoding end for the three-dimensional mesh. Therefore, how to ensure the recovery performance of the decoded mesh is a problem to be solved. SUMMARY
[0006] The embodiments of the present application provide an encoding method, a decoding method, a device and an electronic equipment, which can improve the recovery performance of the decoded mesh.
[0007] In a first aspect, an encoding method is provided, which is executed by an encoding end, and the method comprises:
[0008] The encoding end encodes multiple sub-meshes of a three-dimensional mesh to obtain a first code stream;
[0009] The encoding end decodes the first code stream to obtain multiple reconstructed sub-meshes;
[0010] The encoding end obtains target merging information according to the plurality of reconstructed sub-meshes and the three-dimensional mesh, and the target merging information includes at least one of sub-mesh-related merging information and vertex-related merging information in the plurality of reconstructed sub-meshes.
[0011] The encoding end encodes the target merging information to obtain a second code stream.
[0012] The encoding end generates a target code stream based on the first code stream and the second code stream.
[0013] In a second aspect, a decoding method is provided, which is performed by a decoding end and includes the following steps.
[0014] The decoding end obtains a target code stream corresponding to a three-dimensional mesh, wherein the three-dimensional mesh includes a plurality of sub-meshes.
[0015] The decoding end decodes the target code stream to obtain a plurality of reconstructed sub-meshes and target merging information, wherein the target merging information includes at least one of sub-mesh-related merging information and vertex-related merging information in the plurality of reconstructed sub-meshes.
[0016] The decoding end performs merging processing on the plurality of reconstructed sub-meshes according to the target merging information.
[0017] In a third aspect, an encoding apparatus is provided, which includes the following components.
[0018] A first encoding module is configured to encode a plurality of sub-meshes of a three-dimensional mesh to obtain a first code stream.
[0019] A decoding module is configured to decode, by the encoding end, the first code stream to obtain a plurality of reconstructed sub-meshes.
[0020] An obtaining module is configured to obtain target merging information according to the plurality of reconstructed sub-meshes and the three-dimensional mesh, and the target merging information includes at least one of sub-mesh-related merging information and vertex-related merging information in the plurality of reconstructed sub-meshes.
[0021] A second encoding module is configured to encode the target merging information to obtain a second code stream.
[0022] A generating module is configured to generate a target code stream based on the first code stream and the second code stream.
[0023] In a fourth aspect, a decoding apparatus is provided, which includes the following components.
[0024] An obtaining module is configured to obtain a target code stream corresponding to a three-dimensional mesh, wherein the three-dimensional mesh includes a plurality of sub-meshes.
[0025] The decoding module is configured to decode the target bitstream to obtain a plurality of reconstructed sub-meshes and target merging information, wherein the target merging information comprises at least one of sub-mesh related merging information and vertex related merging information in the plurality of reconstructed sub-meshes.
[0026] The merging processing module is configured to perform merging processing on the plurality of reconstructed sub-meshes according to the target merging information.
[0027] In a fifth aspect, an electronic device is provided, which includes a processor and a memory, the memory storing programs or instructions executable on the processor, and the programs or instructions, when executed by the processor, implement the steps of the encoding method according to the first aspect.
[0028] In a sixth aspect, an electronic device is provided, which includes a processor and a memory, the memory storing programs or instructions executable on the processor, and the programs or instructions, when executed by the processor, implement the steps of the decoding method according to the second aspect.
[0029] In a seventh aspect, an electronic device is provided, which includes a memory configured to store three-dimensional mesh data, and a processing circuit configured to implement the steps of the encoding method according to the first aspect, or implement the steps of the decoding method according to the second aspect.
[0030] In an eighth aspect, a readable storage medium is provided, which stores programs or instructions, and the programs or instructions, when executed by a processor, implement the steps of the method according to the first aspect, or implement the steps of the method according to the second aspect.
[0031] In a ninth aspect, a codec system is provided, which includes an encoding end device and a decoding end device, the encoding end device being configured to implement the steps of the method according to the first aspect, and the decoding end device being configured to implement the steps of the method according to the second aspect.
[0032] In a tenth aspect, a chip is provided, which includes a processor and a communication interface, the communication interface and the processor being coupled, and the processor being configured to run programs or instructions to implement the steps of the method according to the first aspect, or implement the steps of the method according to the second aspect.
[0033] In an eleventh aspect, a computer program / program product is provided, which is stored in a storage medium, and the program / program product is executed by at least one processor to implement the steps of the method according to the first aspect, or implement the steps of the method according to the second aspect.
[0034] In the embodiment of the present application, the encoding end can encode a plurality of sub-grids in the original grid to obtain a first code stream, reconstruct the grid based on the first code stream to obtain a plurality of reconstructed sub-grids, then obtain target merging information based on the plurality of reconstructed sub-grids and the original grid, encode the target merging information to obtain a second code stream, and generate a target code stream based on the first code stream and the second code stream and send it to the decoding end. Thus, the decoding end can obtain the plurality of reconstructed sub-grids and the target merging information by decoding the target code stream, and then merge the plurality of reconstructed sub-grids based on the target merging information, which is beneficial to improve the recovery performance of the decoded grid. BRIEF DESCRIPTION OF DRAWINGS
[0035] FIGS. 1-4 are schematic diagrams of dividing an original three-dimensional grid into a plurality of sub-grids;
[0036] FIG. 5 is a schematic diagram of an encoding method according to an embodiment of the present application;
[0037] FIG. 6 is a schematic diagram of an encoding framework according to an embodiment of the present application;
[0038] FIG. 7 is a schematic diagram of a sub-grid merging process according to an embodiment of the present application;
[0039] FIG. 8 is a schematic diagram of a sub-grid merging process according to an embodiment of the present application;
[0040] FIG. 9 is a schematic diagram of a decoding method according to an embodiment of the present application;
[0041] FIG. 10 is a schematic diagram of a decoding framework according to an embodiment of the present application;
[0042] FIG. 11 is a schematic diagram of a sub-grid merging process according to an embodiment of the present application;
[0043] FIG. 12 is a schematic block diagram of an encoding device according to an embodiment of the present application;
[0044] FIG. 13 is a schematic block diagram of a decoding device according to an embodiment of the present application;
[0045] FIG. 14 is a schematic block diagram of an electronic device according to an embodiment of the present application;
[0046] FIG. 15 is a schematic diagram of the hardware structure of a terminal according to an embodiment of the present application. DETAILED DESCRIPTION
[0047] With reference to the drawings, the technical solutions in the embodiments of the present application will be clearly described. Obviously, the described embodiments are only some but not all of the embodiments of the present application. Based on the embodiments in the present application, all the other embodiments obtained by a person of ordinary skill in the art belong to the scope of protection of the present application.
[0048] The terms "first", "second" and the like in the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than that illustrated or described herein, and the objects distinguished by "first", "second" are generally a category and do not limit the number of objects, for example, the first object can be one or more. In addition, "or" in the present application means at least one of the connected objects. For example, "A or B" covers three schemes, namely, scheme one: including A and not including B; scheme two: including B and not including A; scheme three: including A and including B. The character " / " generally represents that the objects before and after are in an "or" relationship.
[0049] The encoding end, the encoding device, the decoding end and the decoding device in the embodiments of the present application can be a terminal, which can also be called a terminal device or a user equipment (UE). The terminal can be a mobile phone, a tablet computer, a laptop computer (also called a notebook computer), a personal digital assistant (PDA), a palm computer, a netbook, an ultra-mobile personal computer (UMPC), a mobile Internet device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device (Wearable Device) or a vehicle-mounted device (VUE), a pedestrian terminal (PUE), a smart home (a home device with wireless communication function, such as a refrigerator, a television, a washing machine or furniture, etc.), a game console, a personal computer (PC), a teller machine or a self-service machine, etc. The wearable device includes a smart watch, a smart bracelet, a smart earphone, smart glasses, smart jewelry (smart bracelet, smart necklace, smart ring, smart necklace, smart anklet, smart necklace, etc.), a smart wristband, smart clothing, etc. It should be noted that the specific type of the terminal is not limited in the embodiments of the present application.
[0050] For the convenience of understanding the embodiments of the present application, the three-dimensional mesh technology related to the present application is described.
[0051] In recent years, with the rapid development of multimedia technology, the related research results are rapidly industrialized, and become an important part of people's life. Three-dimensional model becomes a new generation of digital media after audio, image, video. Three-dimensional mesh and point cloud are two common three-dimensional model representation methods. Compared with traditional image, video and other multimedia, three-dimensional mesh model has stronger interactivity and realistic characteristics, which makes it more and more widely used in business, manufacturing, construction, education, medicine, entertainment, art, military and other fields.
[0052] With the increasing demand for three-dimensional mesh model in visual effect, and the emergence of many more mature three-dimensional scanning technology and three-dimensional modeling software, the data size and complexity of three-dimensional mesh model obtained by three-dimensional scanning equipment or three-dimensional modeling software also increases dramatically. Therefore, how to efficiently compress three-dimensional mesh data is the key to realize the convenient transmission, storage and processing of three-dimensional mesh data.
[0053] Three-dimensional mesh contains three main information: topology information, geometry information and attribute information. Among them, topology information, also known as connection relationship information (or connection information), is used to describe the connection relationship between elements such as vertices and faces in the mesh; geometry information includes three-dimensional coordinates of all vertices in the mesh; attribute information records other information attached to the mesh, such as normal vector, texture coordinate and color, etc. The compression of three-dimensional mesh data is often to compress the three kinds of information according to their data characteristics respectively. In addition, for three-dimensional mesh with texture map, the texture map also needs to be compressed.
[0054] The Moving Picture Experts Group (MPEG) is developing a new dynamic mesh compression standard, such as Video-based Dynamic Mesh Compression (V-DMC), and adopts an Edgebreaker-based mesh coding scheme to compress the geometry information, connectivity information and attribute information of a 3D mesh. Meanwhile, the standard also adopts the concept of submesh, which allows the input 3D mesh to be divided into multiple submeshes and each submesh can be independently coded. For example, the input 3D mesh is divided into submeshes using a bounding box-based division scheme before coding. Then the connectivity information, geometry information and attribute information of each submesh are independently coded and stored using the Edgebreaker-based method. The connectivity information can be coded using the Edgebreaker algorithm. The coding of the geometry information and attribute information, such as texture coordinates, can use conventional compression methods, i.e., quantization, prediction compression (parallelogram prediction) and entropy coding. Since the tool uses a connection relationship-driven coding method, the coding of the geometry information and attribute information will follow the coding order of the connectivity information. At the decoding end, after decoding each submesh, the information of each submesh is directly added to a new mesh to obtain the final decoded mesh.
[0055] For the current implementation of V-DMC, in the lossless mode, for the coding of a 3D mesh containing multiple submeshes, when merging the submeshes at the decoding end, the final decoded mesh obtained by directly adding each reconstructed submesh to a new mesh does not delete the boundary points of adjacent submeshes that are repeatedly divided, thus reducing the recovery performance of the decoded mesh.
[0056] Taking FIG. 1 as an example, the original mesh includes three independent parts, and the original mesh is divided into submesh 0 to submesh 5. The bolded part in the submesh represents the repeatedly divided information between the submeshes, i.e., the part that needs to be merged when reconstructing the submesh. For the submeshes that need to be merged, such as submesh 0, submesh 1 and submesh 2, and submesh 4 and submesh 5 in FIG. 2, the merging information required when the submeshes are merged can be coded during coding, such as which submesh needs to be merged with the repeatedly divided information, and which submesh needs to be merged with the repeatedly divided information.
[0057] For the sub-grids that need to merge the duplicated information, taking the geometry information as an example, the boundary vertex information can be obtained by judging whether the sub-grids have the same geometry coordinates. However, the boundary vertex is not necessarily the duplicated vertex. Taking FIG. 2 as an example, the duplicated vertex pair 4 and 4' with the same geometry coordinates but different vertex indexes in the original grid are divided into the 0 point in the sub-grid 0 and the 4 point in the sub-grid 1 respectively. For the 0 point in the sub-grid 0 and the 4 point in the sub-grid 1, they are the boundary vertices with the same geometry coordinates in the sub-grid 0 and the sub-grid 1 respectively, but they are not the duplicated vertices. Therefore, whether the boundary vertex is the duplicated vertex can be distinguished by encoding the identification information indicating whether the boundary vertex is the duplicated vertex.
[0058] In some cases, some special cases also need to be considered, for example, the case that the duplicated vertex in the original grid exists on the boundary of the sub-grid. Taking FIG. 3 and FIG. 4 as an example. Taking the geometry information as an example, the 0 point and the 0' point in the original grid shown in FIG. 3 and FIG. 4, the 0 point and the 0' point in the sub-grid 0 in FIG. 3 and FIG. 4, and the 2 point and the 2' point in the sub-grid 1 in FIG. 3 are duplicated vertex pairs with the same geometry coordinates but different vertex indexes, the thick annotations in the sub-grids are the duplicated information in the original grid, and the dashed annotations in FIG. 4 are the duplicated information in the original grid existing on the boundary of the sub-grid that needs to be preserved when the sub-grids are merged. After the sub-grid 1 and the sub-grid 2 are independently losslessly encoded respectively, the reconstructed sub-grid 0 and the reconstructed sub-grid 1 need to be merged at the decoding end, and the duplicated information in the sub-grid 0 and the sub-grid 1 needs to be merged. At this time, it needs to be judged whether the boundary vertex is the duplicated vertex that needs to be merged (such as the 0' point of the sub-grid 0 or the 2' point of the sub-grid 1 in FIG. 3), or the vertex that needs to be preserved (such as the 0' point in the sub-grid 0 in FIG. 4). For the duplicated vertex that is not duplicated, the corresponding relationship can be directly judged by the vertices with the same geometry coordinates between the sub-grids; and for the duplicated vertex that is duplicated, a separate judgment needs to be performed. Therefore, whether the duplicated vertex is the case can be distinguished by encoding the identification information indicating whether the duplicated vertex is the duplicated vertex in the original grid, and for the duplicated vertex that is duplicated on the boundary, the corresponding vertex information in the sub-grid that needs to be merged with the duplicated vertex, such as the target vertex index, can also be encoded.
[0059] Therefore, the embodiment of the present application provides a coding scheme, the encoding end can obtain the merging information in the reconstructed sub-grid, and encode the merging information into a code stream and send it to the decoding end, so that the decoding end can decode the code stream to obtain the merging information, and then perform merging processing on the reconstructed sub-grid according to the merging information, so that a high-quality decoded grid can be recovered.
[0060] The encoding method and the decoding method provided by the embodiments of the present application are described below by some embodiments and application scenarios thereof in combination with the accompanying drawings. The encoding method can be performed by an encoding end, and the decoding method can be performed by a decoding end. The encoding end and the decoding end can be implemented by software, hardware or a combination thereof. When the encoding end and the decoding end are implemented by hardware, the encoding end can be referred to as an encoding end device, and the decoding end can be referred to as a decoding end device.
[0061] FIG. 5 is a schematic flowchart of an encoding method provided by an embodiment of the present application. As shown in FIG. 5, the encoding method 100 includes at least the following steps:
[0062] S101, the encoding end encodes a plurality of sub-grids of a three-dimensional grid to obtain a first code stream.
[0063] It should be understood that the present application does not limit the source of the three-dimensional grid. For example, the three-dimensional grid can come from a three-dimensional scanning device, or from a three-dimensional modeling software, etc. Optionally, the three-dimensional grid can be a three-dimensional grid corresponding to a video frame.
[0064] In the embodiments of the present application, the three-dimensional grid or the original grid, or the original three-dimensional grid.
[0065] In some embodiments, the method 100 further includes:
[0066] The encoding end divides the three-dimensional grid into a plurality of sub-grids.
[0067] For example, before encoding the three-dimensional grid, the encoding end first divides the three-dimensional grid into a plurality of sub-grids, and then encodes the plurality of sub-grids respectively to obtain a first code stream, which is also referred to as a sub-grid code stream.
[0068] It should be noted that the present application does not limit the division manner of the sub-grids. For example, the bounding box-based division manner, the Octree-based division manner, the K-D tree-based division manner, etc. can be used. Hereinafter, the bounding box-based sub-grid division manner is taken as an example to describe the specific implementation of the sub-grid division.
[0069] In some embodiments, the three-dimensional mesh includes topology information, geometry information, and attribute information. Optionally, the three-dimensional mesh can also include a texture map. The topology information or connection relationship information describes the layout, structure, and connection relationship of points, lines, and surfaces in the three-dimensional mesh. The geometry information describes the position, shape, and size of each element in the three-dimensional mesh, such as the three-dimensional coordinates of all vertices in the three-dimensional mesh, the length and direction of edges, the shape and size of surfaces, and the like. The attribute information describes other information attached to the three-dimensional mesh, such as normal vectors, texture coordinates, color information, material information, and the like.
[0070] In some embodiments, the encoding end performs sub-mesh division on the three-dimensional mesh to obtain a plurality of sub-meshes, including:
[0071] According to the geometry coordinates of the three-dimensional mesh, a bounding box range in a three-dimensional space where the three-dimensional mesh is located is obtained;
[0072] Based on the coordinate range of the bounding box range on a specific axis (such as the x-axis or the y-axis or the z-axis), a plurality of sub-mesh bounding box ranges are divided, for example, the coordinate range is equally divided to obtain a plurality of sub-mesh bounding box ranges. Optionally, the number of equal divisions can be pre-set, or determined according to the number of sub-meshes required by the input;
[0073] According to the bounding box range of each sub-mesh, all surfaces in the three-dimensional mesh are traversed, and vertices meeting the bounding box range are divided into corresponding sub-meshes in units of surfaces. After traversing the bounding box range of each sub-mesh, a plurality of divided sub-meshes can be obtained.
[0074] In some embodiments, the encoding end encodes a plurality of sub-meshes of the three-dimensional mesh to obtain a first code stream, including:
[0075] The encoding end encodes the connection information in each sub-mesh of the three-dimensional mesh to obtain a connection information code stream;
[0076] The encoding end encodes the geometry information in each sub-mesh of the three-dimensional mesh to obtain a geometry information code stream;
[0077] The encoding end encodes the attribute information in each sub-mesh of the three-dimensional mesh to obtain an attribute information code stream;
[0078] The connection information code stream, the geometry information code stream, and the attribute information code stream are mixed to obtain a first code stream.
[0079] It should be understood that the embodiments of the present application do not specifically limit the encoding method of the encoding end to the sub-grid. For example, the encoding end can use an EdgeBreaker-based encoding method, or an octree-based encoding method, a quadtree-based encoding method, a feature-based encoding method, etc. The following will take the EdgeBreaker-based encoding method as an example to describe the encoding method of the sub-grid.
[0080] In some embodiments, the encoding end encodes a plurality of sub-grids of a three-dimensional grid to obtain a first code stream, including:
[0081] The encoding end splits a non-manifold structure in the plurality of sub-grids to obtain a manifold structure;
[0082] Then, the manifold grid is encoded in connection information, geometry information, and attribute information to obtain a connection information code stream, a geometry information code stream, and an attribute information code stream;
[0083] The connection information code stream, the geometry information code stream, and the attribute information code stream are mixed to obtain the first code stream.
[0084] Optionally, for connection information encoding, the encoding end can use the Edgebreaker encoding method, and the present application does not limit the specific encoding algorithm. For example, a CornerTable is established to represent the connection relationship of the three-dimensional grid, and all triangles in the three-dimensional grid are traversed by using the CornerTable to generate an Edgebreaker CLERS mode string. Then, the CLERS mode string can be encoded in an entropy encoding manner to obtain the connection information code stream.
[0085] Optionally, for geometry information encoding, the encoding end can use a conventional encoding algorithm, such as a difference prediction encoding algorithm, a parallelogram prediction encoding algorithm, etc. For example, the encoding end can encode the geometry information in a plurality of encoding algorithms such as the difference prediction encoding algorithm, the parallelogram prediction encoding algorithm, etc. according to the encoding order of the connection information to obtain the geometry information code stream, and the present application does not limit the specific encoding algorithm.
[0086] Optionally, the attribute information of the three-dimensional grid generally includes texture coordinates, normal vectors, etc. Taking the texture coordinates as an example. For the texture coordinates, the encoding end can use a conventional encoding algorithm, such as a difference prediction encoding algorithm, a parallelogram prediction encoding algorithm, a similar triangle prediction encoding algorithm, etc. For example, the encoding end can encode the attribute information in a plurality of encoding algorithms such as the difference prediction encoding algorithm, the parallelogram prediction encoding algorithm, and the similar triangle prediction encoding algorithm, etc. according to the encoding order of the connection information to obtain the attribute information code stream, and the present application does not limit the specific encoding algorithm.
[0087] S102, the encoding end decodes the first code stream to obtain a plurality of reconstructed sub-grids.
[0088] The decoding method used by the encoding end to decode the first code stream corresponds to the encoding method used by the encoding end to obtain the first code stream, the decoding method used by the encoding end to decode the first code stream is the same as the decoding method used by the decoding end to decode the first code stream, and the specific decoding method is described in detail in the decoding end.
[0089] S103, the encoding end obtains target merging information according to the plurality of reconstructed sub-grids and the three-dimensional grid, the target merging information includes at least one of sub-grid related merging information and vertex related merging information corresponding to the plurality of reconstructed sub-grids.
[0090] S104, the encoding end encodes the target merging information to obtain a second code stream.
[0091] S105, the encoding end generates a target code stream based on the first code stream and the second code stream.
[0092] It should be noted that the encoding end reconstructs the grid by using the first code stream, and then obtains the target merging information based on the reconstructed sub-grid, which can ensure the accuracy of the obtained merging information, and further ensure the accuracy of the merging information obtained by the decoding end, and ensure the reconstruction quality of the decoded grid.
[0093] In some embodiments, the merging information can also be referred to as repeated information, that is, information that is repeatedly divided when the sub-grid is divided, or information that is divided into at least two sub-grids.
[0094] In some embodiments, the sub-grid related merging information is used to indicate a target sub-grid in the plurality of reconstructed sub-grids and / or a merging sub-grid that is merged with the target sub-grid, and the target sub-grid is a sub-grid in the plurality of reconstructed sub-grids that needs to be merged.
[0095] In some embodiments, the sub-grid related merging information includes at least one of:
[0096] The first indication information corresponding to each reconstructed sub-grid in the plurality of reconstructed sub-grids is used to indicate whether the reconstructed sub-grid is a target sub-grid, and the target sub-grid is a reconstructed sub-grid that needs to be merged;
[0097] The second indication information corresponding to the target sub-grid is used to indicate a merging sub-grid that needs to be merged with the target sub-grid.
[0098] Optionally, the encoding end can adopt binary representation for the first indication information, for example, 1 bit indication can be adopted, the 1 bit is set to 0 to indicate that the reconstructed sub-grid does not need to be merged with other reconstructed sub-grids, in other words, the merging and repetition information operation does not need to be performed on the reconstructed sub-grid, and the 1 bit is set to 1 to indicate that the reconstructed sub-grid needs to be merged with other reconstructed sub-grids, in other words, the merging and repetition information operation needs to be performed on the reconstructed sub-grid.
[0099] It should be understood that the present application does not limit the encoding manner of the first indication information, for example but not limited to, 1 bit fixed length encoding manner can be adopted to encode the first indication information.
[0100] Optionally, the second indication information can be used to indicate the sub-grid index corresponding to the merging sub-grid to be merged with the target sub-grid, optionally, the number of bits occupied by the second indication information can be determined according to the number of bits occupied by the maximum index value of the sub-grid, for example, when the maximum index value is 8, the second indication information can occupy 3 bits, and for example, when the maximum index value is 10, the second indication information can occupy 4 bits, and the like.
[0101] It should be understood that the present application does not limit the encoding of the second indication information, for example, fixed length encoding manner can be adopted according to the maximum index value of the sub-grid, or 8 bit group unsigned integer encoding manner with variable byte number can be adopted, or difference value encoding manner can be used, and the present application is not limited thereto. Taking the difference value encoding manner as an example, the index value indicated by the second indication information corresponding to the first target sub-grid is encoded into the code stream, and the index value indicated by the second indication information corresponding to other target sub-grids is encoded by using the difference value between the index value and an index value (for example, the first index value, or the last index value).
[0102] For example, in the scenario shown in FIG. 1, the sub-grids that need to be merged include sub-grid 0, sub-grid 1 and sub-grid 2, and sub-grid 4 and sub-grid 5. Therefore, the first indication information corresponding to these sub-grids can be set to 1, indicating that the sub-grids are target sub-grids that need to be merged. The first indication information corresponding to sub-grid 3 can be set to 0, indicating that sub-grid 3 is a sub-grid that does not need to be merged. The sub-grids that need to be merged with sub-grid 0 include sub-grid 1 and sub-grid 2. Therefore, the second indication information corresponding to sub-grid 0 can indicate the grid indices corresponding to sub-grid 1 and sub-grid 2. The sub-grids that need to be merged with sub-grid 1 include sub-grid 0 and sub-grid 2. Therefore, the second indication information corresponding to sub-grid 1 can indicate the grid indices corresponding to sub-grid 0 and sub-grid 2. The sub-grids that need to be merged with sub-grid 2 include sub-grid 0 and sub-grid 1. Therefore, the second indication information corresponding to sub-grid 2 can indicate the grid indices corresponding to sub-grid 0 and sub-grid 1. The sub-grids that need to be merged with sub-grid 4 include sub-grid 5. Therefore, the second indication information corresponding to sub-grid 4 can indicate the grid index corresponding to sub-grid 5. The sub-grids that need to be merged with sub-grid 5 include sub-grid 4. Therefore, the second indication information corresponding to sub-grid 5 can indicate the grid index corresponding to sub-grid 4.
[0103] In some embodiments, the vertex-related merging information is used to indicate target vertices that need to be merged in the reconstructed sub-grids and / or merging vertices corresponding to the target vertices.
[0104] In some embodiments, the target merging information includes vertex-related merging information corresponding to at least one reconstructed sub-grid, wherein the at least one reconstructed sub-grid includes reconstructed sub-grids other than a first reconstructed sub-grid in the plurality of reconstructed sub-grids, and the first reconstructed sub-grid is a sub-grid of the initial merging grid; or the at least one reconstructed sub-grid includes reconstructed sub-grids that need to be merged in the plurality of reconstructed sub-grids.
[0105] Optionally, the vertex-related merging information includes at least one of the following:
[0106] a number of boundary vertices in the reconstructed sub-grid;
[0107] a first identifier corresponding to the boundary vertex, used to identify whether the boundary vertex is a first type of vertex in the three-dimensional grid, the first type of vertex being a vertex in the three-dimensional grid that is divided into at least two sub-grids;
[0108] a number of the first type of vertex in the reconstructed sub-grid;
[0109] a byte size of an encoding sequence obtained by encoding the first identifier corresponding to the boundary vertex.
[0110] reconstructing a second identifier corresponding to the first type of vertex in the sub-grid, the second identifier being used to identify whether the first type of vertex is a second type of vertex in the three-dimensional mesh, wherein the second type of vertex is at least two vertices in the three-dimensional mesh having the same vertex information but different vertex indices;
[0111] encoding the second identifier corresponding to the first type of vertex to obtain a byte size of an encoded sequence of the second identifier;
[0112] reconstructing a target vertex index corresponding to a specific vertex in the sub-grid, the target vertex index being used to indicate a vertex index corresponding to a merged vertex to which the specific vertex is merged in the merged mesh, the specific vertex being a first type of vertex in the three-dimensional mesh, and the specific vertex being a second type of vertex in the three-dimensional mesh;
[0113] reconstructing a number of specific vertices in the sub-grid, wherein the specific vertices are first type of vertices in the three-dimensional mesh, and the specific vertices are second type of vertices in the three-dimensional mesh;
[0114] reconstructing a number of divided attribute information in the vertex information in the sub-grid.
[0115] In some embodiments, the vertex-related merging information can include vertex-related merging information for geometry information, and optionally, vertex-related merging information for at least one attribute information, or a group of vertex-related merging information without distinguishing between geometry information and attribute information.
[0116] Optionally, the geometry information can include, but is not limited to, geometry coordinates, and the at least one attribute information can include, but is not limited to, texture coordinates, normal vectors, etc. The following is described by taking geometry information as geometry coordinates as an example, but the present application is not limited thereto.
[0117] In embodiments of the present application, the first type of vertex or the repeatedly divided vertex, i.e., the vertex divided into at least two sub-grids, the second type of vertex or the repeated vertex, if there are at least two vertices with the same vertex information, the at least two vertices are considered as repeated vertices, the first identifier or the repeated division identifier, the second identifier or the repeated vertex identifier, the above names are only examples, and the present application does not limit the above naming.
[0118] Optionally, the first identifier can adopt a 1-bit identifier, and different values of the 1-bit are used to indicate whether the boundary vertex is the first type of vertex, for example, a value of 1 indicates that it is the first type of vertex, and a value of 0 indicates that it is not the first type of vertex.
[0119] Optionally, the second identifier can be a 1-bit identifier, and different values of the 1-bit identifier are used to indicate whether the first type of vertex is the second type of vertex. For example, a value of 1 indicates that the vertex is the second type of vertex, and a value of 0 indicates that the vertex is not the second type of vertex.
[0120] In combination with the specific examples of the vertices in FIGS. 2 to 4, the specific implementation of the vertex-related merging information is described.
[0121] For example, vertex 1 in sub-grid 0 and vertex 5 in sub-grid 1 in FIG. 2 are boundary vertices that are repeatedly divided, and therefore the first identifiers corresponding to the vertices 1 and 5 can be set to 1. Vertex 0 in sub-grid 0 and vertex 4 in sub-grid 1 are boundary vertices, and are repeated vertices but not repeatedly divided vertices, and therefore the first identifiers corresponding to the vertices 0 and 4 can be set to 0, but no second identifier is marked for the vertices.
[0122] For another example, in FIG. 3, vertex 3 in sub-grid 0 and vertex 4 in sub-grid 1 are boundary vertices that are repeatedly divided, and therefore the first identifiers corresponding to the vertices 3 and 4 can be set to 1. Vertex 2 in sub-grid 0 and vertex 3 in sub-grid 1 are boundary vertices that are repeatedly divided, and therefore the first identifiers corresponding to the vertices 2 and 3 can be set to 1. Vertex 0 in sub-grid 0 and vertex 2 in sub-grid 1 are boundary vertices that are repeatedly divided, and therefore the first identifiers corresponding to the vertices 0 and 2 can be set to 1. Vertex 0' in sub-grid 0 and vertex 2' in sub-grid 1 are boundary vertices that are repeatedly divided, and therefore the first identifiers corresponding to the vertices 0' and 2' can be set to 1. Meanwhile, vertex 0 in sub-grid 0 and vertex 0' have the same vertex information but correspond to different vertex indexes, and therefore the vertices 0 and 0' are repeated vertices, and the second identifiers corresponding to the vertices 0 and 0' can be set to 1. Similarly, vertex 2 in sub-grid 0 and vertex 2' are repeated vertices, and the second identifiers corresponding to the vertices 2 and 2' can be set to 1. That is, vertex 0 and 0' in sub-grid 0 are specific vertices, and for the specific vertices, the corresponding target vertex indexes can be recorded. For vertex 0 in sub-grid 0, the corresponding target vertex index is vertex 2 in sub-grid 1, and for vertex 0' in sub-grid 0, the corresponding target vertex index is the vertex index of vertex 2' in sub-grid 1. Similarly, vertex 2 and 2' in sub-grid 1 are also specific vertices, and the corresponding target vertex indexes of the vertices 2 and 2' are the vertex indexes of vertex 0 and 0' in sub-grid 0, respectively.
[0123] For example, the vertex 0, the vertex 1 and the vertex 2 in the sub-grid 0 and the vertex 1, the vertex 2 and the vertex 3 in the sub-grid 1 in FIG. 4 are the boundary vertices which are repeatedly divided, and the first identifiers corresponding to these vertices can be set as 1. Meanwhile, the vertex 0 in the sub-grid 0 is also a repeated vertex, and the second identifier corresponding to the vertex 0 can be set as 1. The boundary vertex 0' in the sub-grid 0 is a repeated vertex, but not a repeatedly divided vertex, and thus the first identifier of the vertex 0' is set as 0, but no second identifier is marked.
[0124] For the above examples, if one of the sub-grids is an initial reconstruction sub-grid or a merged grid, the boundary vertices of the other sub-grid can be marked with the corresponding identifiers.
[0125] It should be understood that the present application does not limit the encoding mode of the first identifier, the second identifier and the target vertex index, for example, the first identifier or the second identifier can be encoded by using the context adaptive arithmetic entropy encoding mode, but the present application is not limited thereto. For the target vertex index corresponding to a specific vertex, the difference value encoding mode can be used to encode each index, i.e., the difference value between the current index and the previous index is encoded, and the present application does not limit this.
[0126] In the following, specific embodiments are described to illustrate the acquisition mode of the target merging information.
[0127] In some embodiments of the present application, the encoding end acquires the target merging information according to the plurality of reconstruction sub-grids and the three-dimensional grid, and the method comprises the following steps.
[0128] The first mapping relationship corresponding to the three-dimensional grid is acquired according to the three-dimensional grid, and the first mapping relationship is used to describe the mapping relationship related to the vertices and / or triangles in the three-dimensional grid.
[0129] The second mapping relationship corresponding to each reconstruction sub-grid in the plurality of reconstruction sub-grids is acquired based on the first mapping relationship and the plurality of reconstruction sub-grids, and the second mapping relationship is used to indicate the mapping relationship between the reconstruction sub-grid and the vertices in the three-dimensional grid.
[0130] The target merging information is acquired according to the first mapping relationship, the plurality of reconstruction sub-grids and the second mapping relationship corresponding to each reconstruction sub-grid.
[0131] In some embodiments, the first mapping relationship comprises at least one of the following:
[0132] The mapping relationship between the vertex information and the vertex index in the three-dimensional grid is denoted as a first sub-mapping relationship.
[0133] The mapping relationship between the vertex information of the three vertices of the triangle in the three-dimensional mesh and the triangle index is denoted as a second sub-mapping relationship.
[0134] The mapping relationship between the triangle index in the three-dimensional mesh and the vertex index of the triangle is denoted as a third sub-mapping relationship.
[0135] In some embodiments, the vertex information of the three vertices of the triangle can represent the direction of the triangle, or in other words, the arrangement order of the three vertices of the triangle in the triangle, or in other words, the rotation direction of the three vertices of the triangle.
[0136] In some embodiments, the vertex information only includes the geometric coordinates, or includes the geometric coordinates and at least one attribute information, which can include but is not limited to the texture coordinates, the normal vector, etc. Hereinafter, the vertex information including the geometric coordinates is taken as an example for description, but the present application is not limited thereto. Correspondingly, the vertex index can be the vertex index corresponding to the geometric vertex (referred to as the geometric vertex index), and the vertex index of the triangle can be the vertex index of the geometric triangle. For the vertex information including the attribute information, the vertex index can be the vertex index corresponding to the attribute vertex, and the vertex index of the triangle can be the vertex index of the attribute triangle.
[0137] In some embodiments, the vertex information includes the geometric coordinates, the first sub-mapping relationship can be the mapping relationship between the geometric coordinates in the three-dimensional mesh and the vertex index (or in other words, the geometric vertex index), and the second sub-mapping relationship can be the mapping relationship between the geometric coordinates of the three vertices of the triangle in the three-dimensional mesh and the triangle index.
[0138] In some embodiments, the vertex information includes the geometric coordinates and the texture coordinates, and the second sub-mapping relationship can be the mapping relationship between the geometric coordinates and the texture coordinates of the three vertices of the triangle in the three-dimensional mesh and the triangle index.
[0139] In some embodiments, the second mapping relationship can be represented by the mapping relationship between the vertex index in the reconstructed sub-mesh and the vertex index in the three-dimensional mesh, or other representation manners, which are not limited by the present application.
[0140] In some embodiments, the first mapping relationship corresponding to the three-dimensional mesh is obtained according to the three-dimensional mesh, including at least one of the following:
[0141] All vertices in the three-dimensional mesh are traversed to construct the mapping relationship between the vertex information in the three-dimensional mesh and the vertex index.
[0142] The vertex information and the triangle index in the three-dimensional mesh are mapped by traversing the triangles in the three-dimensional mesh, obtaining vertex information of three vertices of the triangle and a triangle index corresponding to the vertex information of the three vertices, and constructing a mapping relationship between the vertex information and the triangle index in the three-dimensional mesh and a mapping relationship between the triangle index and a vertex index of the triangle in the three-dimensional mesh based on the vertex information of the three vertices of the triangle and the triangle index corresponding to the vertex information of the three vertices.
[0143] For the mapping relationship between the vertex information and the vertex index in the three-dimensional mesh, taking the geometric coordinates as an example of the vertex information, the construction manner of the mapping relationship is explained. For other vertex information, such as the texture coordinates, the normal vector, and the like in the attribute information, the construction manner is similar, which will not be repeated here. Specifically, all the vertices in the original mesh are traversed, and in this process, the mapping relationship between the geometric coordinates and the geometric vertex index in the three-dimensional mesh is constructed.
[0144] For the mapping relationship between the vertex information and the triangle index in the three-dimensional mesh, the vertex information includes the geometric coordinates, or the vertex information can include the geometric coordinates and at least one attribute information, such as the texture coordinates, the normal vector, and the like. Taking the vertex information including the geometric coordinates + the texture coordinates as an example to explain the construction manner of the mapping relationship between the vertex information and the triangle index in the three-dimensional mesh. For other vertex information, the construction manner is similar, which will not be repeated here. Specifically, the triangles in the three-dimensional mesh are traversed, the geometric coordinates and the texture coordinates corresponding to the three vertices of each triangle are recorded, and the triangle index corresponding to the vertex information of the three vertices of each triangle is recorded, thereby constructing the mapping relationship between the vertex information and the triangle index in the three-dimensional mesh and the mapping relationship between the triangle index and the vertex index of the triangle. Optionally, the vertex index of the triangle in the mapping relationship between the triangle index and the vertex index of the triangle can refer to the vertex index of the geometric triangle or the vertex index of the attribute triangle.
[0145] In some embodiments, the obtaining, based on the first mapping relationship and the plurality of reconstructed sub-meshes, a second mapping relationship corresponding to each of the plurality of reconstructed sub-meshes, comprises:
[0146] traversing each of the plurality of reconstructed sub-meshes;
[0147] for a current reconstructed sub-mesh traversed, traversing a triangle in the current reconstructed sub-mesh, obtaining vertex indices of three vertices of the triangle and vertex information of the three vertices of the triangle;
[0148] determining an arrangement order of the vertex indices of the three vertices of the triangle in the triangle according to the vertex indices of the three vertices of the triangle and the vertex information of the three vertices of the triangle;
[0149] determine the triangle index corresponding to the target triangle pair to which the triangle in the three-dimensional mesh matches according to the vertex information of the three vertices of the triangle, the arrangement order of the vertex indexes of the three vertices of the triangle in the triangle, and the mapping relationship between the vertex information of the three vertices of the triangle and the triangle index in the first mapping relationship;
[0150] obtain the vertex indexes of the three vertices of the target triangle and the arrangement order of the vertex indexes of the three vertices of the target triangle in the target triangle according to the triangle index corresponding to the target triangle, the mapping relationship between the triangle index and the vertex index of the triangle in the first mapping relationship, and the mapping relationship between the vertex information of the three vertices of the triangle and the vertex index of the triangle in the first mapping relationship;
[0151] construct the mapping relationship between the vertex index in the current reconstructed sub-mesh and the vertex index in the three-dimensional mesh according to the vertex indexes of the three vertices of the triangle, the arrangement order of the vertex indexes of the three vertices of the triangle in the triangle, the vertex indexes of the three vertices of the target triangle, and the arrangement order of the vertex indexes of the three vertices of the target triangle in the target triangle.
[0152] The second mapping relationship is taken as the mapping relationship between the vertex index of the reconstructed sub-mesh and the vertex index of the three-dimensional mesh, and the construction manner of the second mapping relationship is illustrated by taking the vertex index as the geometric vertex index as an example, but the application is not limited thereto.
[0153] Specifically, the mapping relationship between the geometric vertex index of the reconstruction sub-grid and the geometric vertex index of the three-dimensional grid is constructed by traversing the reconstruction sub-grid. For the current reconstruction sub-grid traversed, the three vertices of the current triangle are traversed, and the vertex information (such as geometric coordinates + texture coordinates) of the three vertices and the geometric vertex index of the three vertices are recorded. According to the geometric vertex index of the three vertices of the triangle and the vertex information of the three vertices of the triangle, the arrangement order of the geometric vertex index of the three vertices of the triangle in the triangle is determined. Then, according to the vertex information of the three vertices of the triangle, the mapping relationship between the vertex information of the three vertices of the triangle and the triangle index in the first mapping relationship, and the arrangement order of the geometric vertex index of the three vertices of the triangle, the triangle index corresponding to the target triangle matched by the current triangle in the three-dimensional grid is determined. Then, according to the triangle index corresponding to the target triangle and the mapping relationship between the triangle index and the geometric vertex index of the triangle in the first mapping relationship, the geometric vertex index of the three vertices of the target triangle is obtained, and according to the geometric vertex index of the three vertices of the target triangle and the mapping relationship between the vertex information and the geometric vertex index in the first mapping relationship, the arrangement order of the geometric vertex index of the three vertices of the target triangle in the target triangle is determined. The mapping relationship between the geometric vertex index of the reconstruction sub-grid and the geometric vertex index of the three-dimensional grid is constructed according to the vertex index of the three vertices of the triangle, the vertex index of the three vertices of the target triangle, the arrangement order of the vertex index of the three vertices of the triangle in the triangle, and the arrangement order of the vertex index of the three vertices of the target triangle in the target triangle.
[0154] It should be understood that the construction method of the mapping relationship between the other vertex information (such as the texture coordinates and the normal vector in the attribute information) of the reconstruction sub-grid and the three-dimensional grid is similar, which will not be repeated here.
[0155] In some embodiments of the present application, the target merging information is obtained according to the first mapping relationship, the plurality of reconstruction sub-grids and the second mapping relationship corresponding to each reconstruction sub-grid, including at least one of:
[0156] A first reconstruction sub-grid is selected from the plurality of reconstruction sub-grids as a current merging grid;
[0157] A third mapping relationship corresponding to the current merging grid is constructed, wherein the third mapping relationship is used to indicate the mapping relationship between the vertex information and the vertex index in the current merging grid;
[0158] construct a fourth mapping relationship corresponding to the current merged mesh according to a second mapping relationship corresponding to the first reconstructed sub-mesh, the fourth mapping relationship being used to indicate a mapping relationship between a vertex index in the current merged mesh and a vertex index in the three-dimensional mesh;
[0159] traverse the reconstructed sub-meshes other than the first reconstructed sub-mesh in the plurality of reconstructed sub-meshes, and determine at least one of the first type of vertex and the second type of vertex in the reconstructed sub-mesh according to the first mapping relationship, a second mapping relationship corresponding to the reconstructed sub-mesh, a third mapping relationship corresponding to the current merged mesh, and a fourth mapping relationship;
[0160] obtain the target merging information according to at least one of the first type of vertex and the second type of vertex in the reconstructed sub-mesh.
[0161] In some embodiments, the vertex information includes geometry coordinates, and the third mapping relationship can be a mapping relationship between geometry coordinates in the current merged mesh and vertex indexes.
[0162] It should be noted that in the embodiments of the present application, the encoding end and the decoding end have consistent understanding of the selected initial reconstructed sub-mesh, for example, the encoding end can inform the decoding end of the information of the initial reconstructed sub-mesh selected by the decoding end when merging the reconstructed sub-mesh by transmitting initial sub-mesh indication information to the decoding end, or the encoding end and the decoding end can also adopt a consistent initial reconstructed sub-mesh selection manner, for example, both select the first reconstructed sub-mesh traversed as the initial merged mesh, or both select the reconstructed sub-mesh with the smallest number as the initial merged mesh. Then traverse the remaining reconstructed sub-meshes, and perform a merging operation on the merged mesh and the current reconstructed sub-mesh traversed, for example, the sub-meshes that do not need to perform the merging and duplicate information operation can be directly added to the merged mesh in the merging process, and the sub-meshes that need to perform the merging and duplicate information operation are merged into the merged mesh, and the target merging information is obtained.
[0163] Optionally, the vertex information is geometry coordinates, the third mapping relationship can be a mapping relationship between geometry coordinates in the current merged mesh and geometry vertex indexes, and the fourth mapping relationship can be a mapping relationship between geometry vertex indexes in the current merged mesh and geometry vertex indexes in the three-dimensional mesh.
[0164] In some embodiments of the present application, the determination of at least one of the first type of vertex and the second type of vertex in the reconstructed sub-mesh according to the first mapping relationship, the second mapping relationship corresponding to the reconstructed sub-mesh, the third mapping relationship corresponding to the current merged mesh, and the fourth mapping relationship includes at least one of the following:
[0165] traversing all vertices in the reconstructed sub-mesh, determining whether a current vertex exists in the current merged mesh according to a third mapping relationship corresponding to the current merged mesh;
[0166] if the current vertex does not exist in the current merged mesh, determining that the current vertex is not the first type of vertex, and determining the current vertex as a vertex to be added; or
[0167] if the current vertex exists in the current merged mesh, determining whether the current vertex is a second type of vertex according to a mapping relationship between vertex information and vertex indexes in the first mapping relationship;
[0168] in a case where the current vertex is not the second type of vertex, setting a first identifier of the current vertex as an identifier for identifying that the current vertex is the first type of vertex, setting a second identifier of the current vertex as an identifier for identifying that the vertex is not the second type of vertex, and updating a vertex index of the current vertex in a triangle to a vertex index corresponding to a merged vertex in the current merged mesh, wherein vertex information of the merged vertex and the current vertex is same;
[0169] in a case where the current vertex is the second type of vertex, determining whether the current vertex is the first type of vertex according to the second mapping relationship corresponding to the reconstructed sub-mesh, the third mapping relationship corresponding to the current merged mesh, and a fourth mapping relationship;
[0170] in a case where the current vertex is not the first type of vertex, setting the first identifier of the current vertex as an identifier for identifying that the current vertex is not the first type of vertex, and determining the current vertex as the vertex to be added;
[0171] in a case where the current vertex is the first type of vertex, setting the first identifier of the current vertex as an identifier for identifying that the current vertex is the first type of vertex, setting the second identifier of the current vertex as an identifier for identifying that the current vertex is the second type of vertex, updating the vertex index of the current vertex in the triangle to the vertex index corresponding to the merged vertex in the current merged mesh, and taking the vertex index corresponding to the merged vertex as a target vertex index corresponding to the current vertex, wherein the vertex information of the merged vertex and the current vertex is same;
[0172] in a case where all vertices in the reconstructed sub-mesh are traversed, adding all the vertices to be added obtained to the current merged mesh, updating the vertex index of the vertices to be added in the current merged mesh, and updating the third mapping relationship and the fourth mapping relationship corresponding to the current merged mesh.
[0173] In summary, the encoding end can determine the non-boundary vertex in the reconstructed sub-grid as a vertex to be added; determine the vertex in the reconstructed sub-grid which is not repeatedly divided as a vertex to be added; set the first identifier of the first non-repeated vertex which is repeatedly divided in the reconstructed sub-grid as 1 and the second identifier as 0; set the first identifier of the repeated vertex which is repeatedly divided in the reconstructed sub-grid as 1 and the second identifier as 1; add the vertex to be added in the reconstructed sub-grid to the current merged grid, and number the vertex index corresponding to the vertex to be added according to the numbering order of the vertex index in the current merged grid; update the vertex index corresponding to the non-repeated vertex which is repeatedly divided in the reconstructed sub-grid in a triangle to the vertex index of the vertex with the same geometric coordinates in the current merged grid; and update the vertex index corresponding to the repeated vertex which is repeatedly divided in the reconstructed sub-grid in a triangle to the target vertex index of the merged vertex in the current merged grid, wherein the geometric coordinates of the repeated vertex which is repeatedly divided and the merged vertex are the same, and the corresponding vertex indices in the three-dimensional grid are the same.
[0174] In some embodiments of the present application, the determining whether the current vertex is a second type of vertex according to the mapping relationship between the vertex information and the vertex index in the first mapping relationship comprises:
[0175] determining, according to the vertex information of the current vertex and the first mapping relationship, whether there are at least two vertices in the three-dimensional grid whose vertex information is the same as the vertex information of the current vertex but whose corresponding vertex indices are different;
[0176] if there are at least two vertices in the three-dimensional grid whose vertex information is the same as the vertex information of the current vertex but whose corresponding vertex indices are different, determining that the current vertex is the second type of vertex.
[0177] That is, if there are at least two vertices in the three-dimensional grid whose vertex information is the same but whose corresponding vertex indices are different, it is considered that the at least two vertices are the second type of vertex, and if the current vertex is included in the at least two vertices, the current vertex is the second type of vertex.
[0178] In some embodiments of the present application, the determining whether the current vertex is a first type of vertex according to the second mapping relationship corresponding to the reconstructed sub-grid and the third mapping relationship and the fourth mapping relationship corresponding to the current merged grid comprises:
[0179] determining, according to the second mapping relationship corresponding to the reconstructed sub-grid and the third mapping relationship and the fourth mapping relationship corresponding to the current merged grid, whether there is at least one vertex in the current merged grid whose vertex information is the same as the vertex information of the current vertex, and the corresponding vertex index of the at least one vertex information in the three-dimensional grid is the same as the corresponding vertex index of the current vertex in the three-dimensional grid;
[0180] If the current vertex exists, it is determined that the current vertex is a first type vertex; or, if the current vertex does not exist, it is determined that the current vertex is not a first type vertex.
[0181] That is, if there is at least one vertex in the three-dimensional mesh whose vertex information and index are the same as those of the current vertex, the current vertex is considered to be a first type vertex.
[0182] In some embodiments of the present application, the method 100 further comprises:
[0183] According to the first type vertex in the reconstructed sub-mesh, it is determined whether a triangle in the reconstructed sub-mesh is a to-be-added triangle or a first type triangle, the first type triangle being a triangle in the three-dimensional mesh that is split into at least two sub-meshes;
[0184] The to-be-added triangle is added to the current merged mesh, or the first type triangle is not added to the current merged mesh.
[0185] In some embodiments of the present application, the determination of whether the triangle in the reconstructed sub-mesh is the to-be-added triangle or the first type triangle according to the first type vertex in the reconstructed sub-mesh comprises:
[0186] According to whether the three vertices of the triangle in the reconstructed sub-mesh are first type vertices and whether the triangle in which the three vertices are located exists in the current merged mesh, it is determined whether the triangle is a to-be-added triangle or a first type triangle;
[0187] If the three vertices of the triangle are all first type vertices, and the triangle in which the three vertices are located exists in the current merged mesh, it is determined that the triangle is the first type triangle; or
[0188] If there is a vertex in the three vertices of the triangle that is not a first type vertex, or the triangle in which the three vertices are located does not exist in the current merged mesh, it is determined that the triangle is the to-be-added triangle.
[0189] In some embodiments, the first type triangle or the repeatedly divided triangle is a triangle that is split into at least two sub-meshes.
[0190] Specifically, after the traversal of all the vertices in the current reconstructed sub-mesh is completed, the encoder adds the recorded vertices to be added into the current merged mesh, and updates the vertex indexes of these vertices in the triangles in the current sub-mesh. Meanwhile, the encoder can also update the mapping relationship between the geometry coordinates and the vertex indexes in the merged mesh, and update the mapping relationship between the vertex indexes in the current merged mesh and the vertex indexes in the three-dimensional mesh according to the mapping relationship between the vertex indexes in the current sub-mesh and the vertex indexes in the three-dimensional mesh. The encoder can also add the triangles in the updated current sub-mesh to the current merged mesh. For example, the encoder can first determine whether a triangle is a repeatedly divided triangle according to whether the three vertices in the triangle are repeatedly divided points and whether the triangle exists in the current merged mesh. For example, the encoder can determine whether the triangle exists in the current merged mesh when the three vertices in the triangle are repeatedly divided points, so as to determine whether the triangle is a repeatedly divided triangle. For example, if the three vertices in the triangle are repeatedly divided vertices, and the triangle exists in the current merged mesh, it can be determined that the triangle is a repeatedly divided triangle. Otherwise, if one of the three vertices in the triangle is not a repeatedly divided vertex, or the triangle does not exist in the current merged mesh, it can be determined that the triangle is not a repeatedly divided triangle.
[0191] For the repeatedly divided triangle, the encoder does not add the triangle to the current merged mesh. For the triangle that is not repeatedly divided, the encoder adds the triangle to the current merged mesh to obtain an updated merged mesh. The encoder can update the mapping relationship in the current merged mesh according to the updated current merged mesh, and obtain the vertex-related merged information corresponding to the current reconstructed sub-mesh. The mapping relationship of the current merged mesh includes the mapping relationship between the geometry coordinates and the vertex indexes in the current merged mesh, the mapping relationship between the vertex indexes in the current merged mesh and the vertex indexes in the original mesh, and the like.
[0192] In some embodiments, the encoder can determine whether a triangle exists in the current merged mesh according to the direction of the triangle. For example, according to the vertex information of the three vertices in the triangle and the arrangement order of the three vertices in the triangle, the encoder can determine whether there exists a triangle in the current merged mesh, which has the same vertex information as the three vertices in the triangle and has the same arrangement order as the triangle according to the counterclockwise or clockwise arrangement of the vertex information. If there exists, the triangle exists in the current merged mesh. Otherwise, the triangle does not exist in the current merged mesh.
[0193] After the traversal of all the vertices in the current reconstructed sub-mesh is completed, the encoding end can obtain the sub-mesh related merging information, for example, which reconstructed sub-mesh needs to perform the merging and repeating information operation. For example, if a reconstructed sub-mesh does not include a vertex that is repeatedly divided, the reconstructed sub-mesh does not need to perform the merging and repeating information operation, and the first indication information corresponding to the reconstructed sub-mesh can be set to 0. When the reconstructed sub-mesh is merged, the operation of adding a vertex to the current merged mesh, updating the connection relationship of a triangle, and adding a triangle to the current merged mesh can be performed, and at the same time, the judgment step of the repeatedly divided triangle can be skipped when the triangle is added. Alternatively, if there is at least one repeatedly divided vertex in a reconstructed sub-mesh, it can be determined that the reconstructed sub-mesh needs to perform the merging and repeating information operation, and the first indication information corresponding to the reconstructed sub-mesh can be set to 1. Then, the operation of adding a vertex to the current merged mesh, updating the connection relationship of a triangle, and adding a triangle to the current merged mesh is performed in the manner as described above.
[0194] After the traversal of all the reconstructed sub-meshes is completed, the sub-mesh related merging information and the vertex related merging information corresponding to the sub-mesh can be obtained, so that the target merging information can be obtained.
[0195] It should be noted that when the vertex information includes geometric coordinates, the encoding end can obtain the merging information related to the geometric coordinates. When the vertex information further includes attribute information, the encoding end can further obtain the merging information related to the attribute information, for example, by a separate process or by obtaining the merging information corresponding to the attribute information in the process of obtaining the merging information related to the geometric coordinates.
[0196] In some embodiments of the present application, the encoding end generates a target code stream based on the first code stream and the second code stream, which includes:
[0197] The encoding end mixes the first code stream and the second code stream to generate a target code stream.
[0198] Optionally, if the three-dimensional mesh further includes a texture map, the method 100 further includes:
[0199] The encoding end encodes the texture map to obtain a third code stream.
[0200] Further, the encoding end generates a target code stream based on the first code stream and the second code stream, which can include:
[0201] The encoding end generates a code stream based on the first code stream, the second code stream, and the third code stream.
[0202] For example, the first code stream, the second code stream, and the third code stream are mixed to generate a target code stream.
[0203] FIG. 6 shows an encoding framework provided by an embodiment of the present application, and the encoding end can perform the encoding process in FIG. 5. The encoding framework can include a sub-mesh encoding process, a target merging information encoding process, and optionally, a texture map encoding process. In the sub-mesh encoding process, a plurality of sub-meshes of the three-dimensional mesh can be encoded to obtain a sub-mesh code stream (i.e., a first code stream). In the target merging information encoding process, the target merging information can be encoded to obtain a target merging information code stream (i.e., a second code stream). In the texture map encoding process, the texture map of the three-dimensional mesh can be encoded to obtain a texture map code stream (i.e., a third code stream).
[0204] For the sub-mesh encoding process, the encoding end performs the following process:
[0205] 1. Sub-mesh division: The input of this process is a three-dimensional mesh, and the output is a plurality of divided sub-meshes.
[0206] For example, the three-dimensional mesh can be divided into a plurality of sub-meshes based on the bounding box division method. For details, refer to the related description of the foregoing embodiments, which will not be repeated here. Alternatively, other division methods can also be used, which are not limited in the present application.
[0207] 2. Sub-mesh compression: This process can include a sub-mesh encoding part and a sub-mesh decoding part. Here, the sub-mesh encoding process is described, and the sub-mesh decoding process is the same as the sub-mesh decoding process of the decoding end. For details, refer to the decoding end sub-mesh decoding process.
[0208] The input of the sub-mesh encoding process is the plurality of divided sub-meshes, and the output is a sub-mesh code stream. For example, in this process, the encoding end can encode the connection information, the geometry information, and the attribute information respectively to obtain a connection information code stream, a geometry information code stream, and an attribute information code stream, and further mix the connection information code stream, the geometry information code stream, and the attribute information code stream to obtain a sub-mesh code stream.
[0209] Alternatively, the encoding end can encode the sub-mesh based on the Edgebeaker encoding method to obtain a sub-mesh code stream. For example, the encoding end can first preprocess the input sub-mesh, such as de-duplicating the geometric duplicate vertices (optional), splitting the non-manifold structure as necessary, and the like. Then, the processed mesh is encoded for connection information, geometry information, and attribute information, as well as information generated by preprocessing, such as non-manifold structure information.
[0210] For connection relationship coding, the encoding end can use the Edgebreaker method to encode the connection relationship of the three-dimensional mesh. For example, the connection relationship of the mesh is represented by establishing a CornerTable, and all triangles in the mesh are traversed using the CornerTable to generate the CLERS mode string of Edgebreaker. Then the CLERS mode string can be encoded in an entropy encoding manner to obtain the connection relationship code stream.
[0211] For geometry information coding, the encoding end can use a conventional encoding algorithm, such as a difference prediction encoding algorithm, a parallelogram prediction encoding algorithm, etc. For example, the encoding end can encode the geometry information using multiple encoding algorithms such as a difference prediction encoding algorithm, a parallelogram prediction encoding algorithm, etc. in the encoding order of the connection information to obtain the geometry information code stream.
[0212] Optionally, the attribute information of the three-dimensional mesh generally includes texture coordinates, normal vectors, etc. Taking the texture coordinates as an example. For the texture coordinates, the encoding end can use a conventional encoding algorithm, such as a difference prediction encoding algorithm, a parallelogram prediction encoding algorithm, a similar triangle prediction encoding algorithm, etc. For example, the encoding end can encode the attribute information using multiple encoding algorithms such as a difference prediction encoding algorithm, a parallelogram prediction encoding algorithm, and a similar triangle prediction encoding algorithm, etc. in the encoding order of the connection information to obtain the attribute information code stream.
[0213] For non-manifold structure information coding, the encoding end can use an entropy encoding manner in the geometry coding order and / or the attribute coding order.
[0214] The sub-mesh decoding process inputs the sub-mesh code stream and outputs multiple reconstructed sub-meshes. After the encoding end obtains the reconstructed sub-mesh, the encoding end can optionally perform a step of comparing the reconstructed sub-mesh with the original sub-mesh to obtain the final reconstructed sub-mesh and mesh difference information, and encode the mesh difference information to obtain the mesh difference information code stream.
[0215] For the target merging information coding process, the encoding end performs the following process:
[0216] 1. Obtain the mapping relationship in the original mesh (i.e., the first mapping relationship)
[0217] The input of this process is the original mesh, and the output is the first mapping relationship.
[0218] Optionally, the first mapping relationship includes, but is not limited to, at least one of a mapping relationship between vertex information and vertex indexes, a mapping relationship between vertex information and triangle indexes, and a mapping relationship between triangle indexes and vertex indexes of a triangle. The first mapping relationship is constructed in the manner described above with reference to the embodiments, and thus will not be described again here for brevity.
[0219] 2. Reconstructing a second mapping relationship corresponding to the reconstructed sub-mesh
[0220] The input of the process can be the reconstructed sub-mesh and the first mapping relationship, and the output is a second mapping relationship corresponding to the reconstructed sub-mesh. The second mapping relationship is constructed in the manner described above with reference to the embodiments, and thus will not be described again here for brevity.
[0221] 3. Obtaining target merging information
[0222] The input of the process is the reconstructed sub-mesh, the first mapping relationship, and the second mapping relationship corresponding to the reconstructed sub-mesh, and the output is the target merging information.
[0223] Take a mapping relationship between vertex indexes of a reconstructed sub-mesh and vertex indexes of an original mesh as an example. The process can obtain the target merging information by using a merging operation on the reconstructed sub-mesh. FIG. 7 shows a merging process of a reconstructed sub-mesh, in which a merging operation is performed on two input reconstructed sub-meshes, and a merged mesh is constantly updated until a final reconstructed mesh is obtained, and the target merging information is obtained in the process. The following takes a merging process of geometric vertices as an example to illustrate a specific merging manner.
[0224] First, select one of the output reconstructed sub-meshes as an initial merged mesh, and construct a mapping relationship in the current merged mesh. The selection of the initial reconstructed sub-mesh is described above with reference to the embodiments, and thus will not be described again here for brevity. For example, a mapping relationship between geometric coordinates and geometric vertex indexes in the current merged mesh is constructed, and a mapping relationship between vertex indexes in the current merged mesh and vertex indexes in the original mesh is constructed according to a mapping relationship between vertex indexes in the reconstructed sub-mesh and vertex indexes in the original mesh.
[0225] FIG. 8 shows an execution flow of a merging operation on a sub-mesh and a current merged mesh. In the following examples, take geometric coordinates as an example of vertex information, but the application is not limited thereto. For example, the following steps can be included:
[0226] Traverse the vertices in the current reconstructed sub-mesh, for example, a vertex with a vertex index of vldx, if the vertices in the current reconstructed sub-mesh are not traversed (i.e., vldx < cur_submesh.points.size()), the current vertex is subjected to the judgment in step a.
[0227] Step a, determine whether the current vertex exists in the current merged mesh.
[0228] For example, the encoder can determine whether the geometric coordinates of the current vertex exist in the current merged mesh through the mapping relationship between the geometric coordinates and the vertex index in the current merged mesh (i.e., the first sub-mapping relationship). If the geometric coordinates of the current vertex do not exist in the current merged mesh, it indicates that the current vertex is not a boundary vertex of the current reconstructed sub-mesh, that is, the current vertex is not a vertex that needs to be merged when merging the sub-mesh, and at this time, the current vertex is recorded as a to-be-added vertex; if the geometric coordinates of the current vertex exist in the current merged mesh, it indicates that the current vertex is a boundary vertex of the current reconstructed sub-mesh, and step b is performed.
[0229] Step b, determine whether the current vertex is a repeated vertex in the original mesh.
[0230] For example, the encoder can determine whether the current vertex is a repeated vertex in the original mesh according to the mapping relationship between the geometric coordinates and the vertex index in the first mapping relationship (i.e., the first sub-mapping relationship). If it is determined according to the geometric coordinates of the current vertex and the mapping relationship between the geometric coordinates and the vertex index in the first mapping relationship that there are at least two vertices in the original mesh whose geometric coordinates are the same as the geometric coordinates of the current vertex, but the corresponding vertex indexes are different, it is determined that the current vertex is a repeated vertex in the original mesh, otherwise, the current vertex is a non-repeated vertex that needs to be merged and is repeatedly divided. If the current vertex is a non-repeated vertex that needs to be merged and is repeatedly divided, the first identifier of the current vertex is set to 1, and the second identifier of the current vertex is set to 0, and the encoder can update the vertex index corresponding to the current vertex in the triangle in which the current vertex is located to the vertex index of the merged vertex in the current merged mesh, wherein the merged vertex and the current vertex have the same geometric coordinates, and the merged vertex and the current vertex have the same vertex index corresponding to the original mesh. When the current vertex is a repeated vertex in the original mesh, step c is further performed.
[0231] Step c, determine whether the current vertex is a repeatedly divided vertex in the original mesh.
[0232] For example, the encoding end can determine whether the current vertex is a vertex repeatedly divided in the original mesh according to the mapping relationship between the vertex index of the current reconstructed sub-mesh and the vertex index of the original mesh (i.e., the second mapping relationship corresponding to the current reconstructed sub-mesh), the mapping relationship between the geometric coordinates and the vertex index in the current merged mesh (i.e., the third mapping relationship corresponding to the current merged mesh), and the mapping relationship between the vertex index of the current merged mesh and the vertex index of the original mesh (i.e., the fourth mapping relationship corresponding to the current merged mesh). For example, if there is a vertex in the current merged mesh with the same geometric coordinates as the current vertex, and the vertex index of the vertex in the original mesh is the same as the vertex index of the current vertex in the original mesh, it is determined that the current vertex is a repeatedly divided vertex, the vertex is the merged vertex corresponding to the current vertex in the current merged mesh, the vertex index of the merged vertex is the target vertex index corresponding to the current vertex, or if the current merged mesh does not have a vertex satisfying the above conditions, the current vertex is not a repeatedly divided vertex. If the current vertex is not a repeatedly divided vertex, the current vertex is not a vertex that needs to be merged with repeated information when the sub-mesh is reconstructed, the first identifier of the current vertex is set to 0, and the current point is recorded as a vertex to be added; if the current vertex is a repeatedly divided vertex, step d is performed.
[0233] Step d, setting the first identifier of the current vertex to 1, setting the second identifier of the current vertex to 1, recording the target vertex index corresponding to the current vertex in the current merged mesh, and then updating the vertex index in the triangle where the current vertex is located to the target vertex index corresponding to the current vertex in the current merged mesh.
[0234] After the traversal of all the vertices in the current reconstructed sub-mesh is completed, the recorded vertices to be added are added into the current merged mesh, and the vertex indexes of these vertices in the triangles in the current sub-mesh are updated. Meanwhile, the encoding end can also update the mapping relationship between the geometry coordinates and the vertex indexes in the current merged mesh, and update the mapping relationship between the vertex indexes in the current merged mesh and the vertex indexes in the original mesh according to the mapping relationship between the vertex indexes in the current sub-mesh and the vertex indexes in the original mesh. The encoding end can also add the triangles in the updated current sub-mesh into the current merged mesh, for example, first determine whether the triangle is a repeatedly divided triangle, for example, whether the three vertices in the triangle are repeatedly divided points and whether the triangle exists in the current merged mesh can be used to determine whether the triangle is a repeatedly divided triangle. For example, if the three vertices of the triangle are all repeatedly divided vertices, and the triangle exists in the current merged mesh, it can be determined that the triangle is a repeatedly divided triangle, otherwise, the triangle is not a repeatedly divided triangle. The specific determination method is described in the foregoing embodiments, and is not repeated here for brevity. For the repeatedly divided triangle, the triangle is not added to the current merged mesh, and for the triangle that is not repeatedly divided, the triangle is added to the current merged mesh to obtain an updated merged mesh. The encoding end can update the mapping relationship in the current merged mesh according to the updated current merged mesh, and obtain the vertex-related merged information corresponding to the current reconstructed sub-mesh. The mapping relationship of the current merged mesh includes the mapping relationship between the geometry coordinates and the vertex indexes in the current merged mesh, the mapping relationship between the vertex indexes in the current merged mesh and the vertex indexes in the original mesh, and the like.
[0235] 4. Target merged information encoding
[0236] The input of the process is target merged information, and the output is a target merged information bitstream.
[0237] In some embodiments, the target merged information includes sub-mesh-related merged information and / or vertex-related merged information in the plurality of reconstructed sub-meshes.
[0238] The encoding method of the specific information in the sub-mesh-related merged information and the vertex-related merged information is described in the foregoing embodiments, and is not repeated here for brevity.
[0239] In summary, in the embodiment of the present application, the encoding end can encode a plurality of sub-grids in the original grid to obtain a first code stream, reconstruct the grid based on the first code stream (sub-grid code stream) to obtain a plurality of reconstructed sub-grids, then obtain target merging information based on the plurality of reconstructed sub-grids and the original grid, encode the target merging information to obtain a second code stream, and generate a target code stream based on the first code stream and the second code stream and send it to the decoding end, so that the decoding end can obtain the plurality of reconstructed sub-grids and the target merging information by decoding the target code stream, and then merge the plurality of reconstructed sub-grids based on the target merging information to improve the recovery performance of the decoded grid.
[0240] FIG. 9 is a schematic flowchart of a decoding method according to an embodiment of the present application. As shown in FIG. 9, the decoding method 500 includes at least some of the following steps:
[0241] S501, the decoding end obtains a target code stream corresponding to a three-dimensional grid, wherein the three-dimensional grid includes a plurality of sub-grids;
[0242] S502, the decoding end decodes the target code stream to obtain a plurality of reconstructed sub-grids and target merging information, wherein the target merging information includes at least one of sub-grid related merging information and vertex related merging information in the plurality of reconstructed sub-grids;
[0243] S503, the decoding end merges the plurality of reconstructed sub-grids according to the target merging information.
[0244] It should be understood that in the embodiment of the present application, the decoding behavior of the decoding end and the encoding behavior of the encoding end correspond to each other, and similar descriptions can refer to the related description of the encoding end.
[0245] In some embodiments, the decoding end obtaining a target code stream corresponding to a three-dimensional grid can include:
[0246] The decoding end obtains a target code stream corresponding to a three-dimensional grid from the encoding end.
[0247] In some embodiments, the decoding end decoding the target code stream to obtain a plurality of reconstructed sub-grids and target merging information includes:
[0248] The decoding end decodes the target code stream to obtain a first code stream and a second code stream;
[0249] The decoding end decodes the first code stream to obtain the plurality of reconstructed sub-grids;
[0250] The decoding end decodes the second code stream to obtain the target merging information.
[0251] In some embodiments, the decoding end decodes the first code stream to obtain the plurality of reconstructed sub-meshes, including:
[0252] streaming the first code stream to obtain a connection information code stream, a geometry information code stream and an attribute information code stream;
[0253] decoding the connection information code stream to obtain connection information;
[0254] decoding the geometry information code stream to obtain geometry information;
[0255] decoding the attribute information code stream to obtain attribute information.
[0256] Optionally, for connection information decoding, the decoding end can first decode the connection information code stream to obtain a mode string, and then traverse the mode string in a specific order (e.g., forward order or reverse order) to reconstruct the connection relationship according to the mode corresponding to the mode string. Optionally, the decoding end can also input the decoding order of the connection information to the geometry information and attribute information decoding modules.
[0257] Optionally, for geometry information decoding, the decoding end can decode the geometry information code stream according to the decoding order of the connection information to obtain the geometry information, for example, by using the decoding method corresponding to the encoding end.
[0258] Optionally, for attribute information decoding, the decoding end can decode the attribute information code stream according to the decoding order of the connection information to obtain the attribute information, for example, by using the decoding method corresponding to the encoding end.
[0259] Further, the decoding end can reconstruct the manifold mesh according to the decoded connection information, geometry information and attribute information to obtain the plurality of reconstructed sub-meshes.
[0260] It should be understood that in the embodiments of the present application, the encoding end and the decoding end have the same implementation manner for obtaining the plurality of reconstructed sub-meshes based on the first code stream, that is, the encoding end can use the same decoding manner as the decoding end to reconstruct the mesh, and then the encoding end can obtain the target merging information based on the reconstructed sub-meshes and the original mesh, which can ensure the accuracy of the obtained merging information, and further ensure the accuracy of the merging information obtained by the decoding end, and ensure the reconstruction quality of the decoded mesh.
[0261] In some embodiments, the sub-mesh related merging information is used to indicate a target sub-mesh in the plurality of reconstructed sub-meshes and / or a merging sub-mesh merged with the target sub-mesh, and the target sub-mesh is a sub-mesh in the plurality of reconstructed sub-meshes that needs to be merged.
[0262] In some embodiments, the sub-grid related merging information comprises at least one of:
[0263] the first indication information corresponding to each of the plurality of reconstructed sub-grids, used to indicate whether the reconstructed sub-grid is a target sub-grid, the target sub-grid being a reconstructed sub-grid that needs to be merged;
[0264] the second indication information corresponding to the target sub-grid, used to indicate a merging sub-grid that needs to be merged with the target sub-grid.
[0265] In some embodiments, the vertex related merging information is used to indicate a target vertex in a reconstructed sub-grid that needs to be merged and / or a merging vertex corresponding to the target vertex.
[0266] In some embodiments, the vertex related merging information comprises at least one of:
[0267] a number of boundary vertices in a reconstructed sub-grid;
[0268] a first identifier corresponding to a boundary vertex in a reconstructed sub-grid, used to identify whether the boundary vertex is a first type of vertex in the three-dimensional mesh, the first type of vertex being a vertex in the three-dimensional mesh that is divided into at least two sub-grids;
[0269] a number of the first type of vertex in a reconstructed sub-grid;
[0270] a byte size of an encoded sequence obtained by encoding the first identifier corresponding to the boundary vertex;
[0271] a second identifier corresponding to the first type of vertex in a reconstructed sub-grid, used to identify whether the first type of vertex is a second type of vertex in the three-dimensional mesh, wherein the second type of vertex is at least two vertices in the three-dimensional mesh that have the same vertex information but different vertex indices;
[0272] a byte size of an encoded sequence obtained by encoding the second identifier corresponding to the first type of vertex;
[0273] a target vertex index corresponding to a specific vertex in a reconstructed sub-grid, the target vertex index being used to indicate a vertex index corresponding to a merging vertex that merges with the specific vertex in a merged mesh, the specific vertex being the first type of vertex in the three-dimensional mesh, and the specific vertex being the second type of vertex in the three-dimensional mesh;
[0274] a number of specific vertices in a reconstructed sub-grid, wherein the specific vertices are the first type of vertex in the three-dimensional mesh, and the specific vertices are the second type of vertex in the three-dimensional mesh.
[0275] In some embodiments, the target merging information comprises vertex-related merging information corresponding to at least one reconstructed submesh, wherein the at least one reconstructed submesh comprises a reconstructed submesh other than a first reconstructed submesh in the plurality of reconstructed submeshes, and the first reconstructed submesh is a submesh of the initial merging mesh; or the at least one reconstructed submesh comprises a reconstructed submesh that needs to be merged in the plurality of reconstructed submeshes.
[0276] The specific implementation of the submesh-related merging information and the vertex-related merging information can refer to the related description of the encoding end. For brevity, details are not described herein.
[0277] In some embodiments, the decoding end performs merging processing on the plurality of reconstructed submeshes according to the target merging information, comprising at least one of the following:
[0278] selecting a first reconstructed submesh in the plurality of reconstructed submeshes as a current merging mesh;
[0279] constructing a third mapping relationship corresponding to the current merging mesh, wherein the third mapping relationship is used to indicate a mapping relationship between vertex information and vertex indexes in the current merging mesh;
[0280] traversing a reconstructed submesh other than the first reconstructed submesh in the plurality of reconstructed submeshes, and determining at least one of a boundary vertex and a non-boundary vertex in the reconstructed submesh according to the third mapping relationship corresponding to the current merging mesh;
[0281] determining the non-boundary vertex in the reconstructed submesh as a vertex to be added;
[0282] determining at least one of a vertex to be added, a first type of vertex and a second type of vertex in the boundary vertex according to the target merging information, wherein the first type of vertex is a vertex in the three-dimensional mesh that is divided into at least two submeshes, and the second type of vertex is at least two vertices in the three-dimensional mesh that have the same vertex information but different vertex indexes;
[0283] performing merging processing on the reconstructed submesh and the current merging mesh according to at least one of the determined vertex to be added, the first type of vertex and the second type of vertex in the reconstructed submesh.
[0284] It should be understood that the sub-grid merging process at the decoding end is similar to the process of obtaining the target merging information at the encoding end. For example, the way of selecting the first reconstructed sub-grid at the decoding end is the same as the way of selecting the first reconstructed sub-grid at the encoding end, and the decoding end can traverse the reconstructed sub-grid in a traversal manner corresponding to the process of obtaining the target merging information at the encoding end, merge the input reconstructed sub-grid into the current merging network according to the target merging information, and constantly update the merging network until the final decoding network is obtained.
[0285] In some embodiments of the present application, the determining, according to the target merging information, at least one of the to-be-added vertex, the first type vertex, and the second type vertex in the boundary vertex includes at least one of the following:
[0286] determining, according to the first identifier corresponding to the boundary vertex, whether the boundary vertex is a first type vertex;
[0287] in a case where the boundary vertex is not a first type vertex, determining the boundary vertex as a to-be-added vertex;
[0288] in a case where the boundary vertex is a first type vertex, determining, according to the second identifier corresponding to the first type vertex, whether the boundary vertex is also a second type vertex;
[0289] in a case where the boundary vertex is not a second type vertex, determining a vertex in the current merging network having the same vertex information as the boundary vertex as a merging vertex of the boundary vertex;
[0290] in a case where the boundary vertex is also a second type vertex, the boundary vertex being a specific vertex in the reconstructed sub-grid, determining a merging vertex for merging with the boundary vertex according to a target vertex index corresponding to the specific vertex.
[0291] In some embodiments of the present application, the merging processing of the reconstructed sub-grid and the current merging network according to at least one of the to-be-added vertex, the first type vertex, and the second type vertex in the reconstructed sub-grid includes at least one of the following:
[0292] adding the to-be-added vertex to the current merging network and updating a vertex index corresponding to the to-be-added vertex in the current merging network;
[0293] merge the first boundary vertex in the reconstructed sub-mesh and a first merged vertex in the current merged mesh, and update a vertex index of the first boundary vertex in a triangle to a vertex index of the first merged vertex in the current merged mesh, wherein the first merged vertex and the first boundary vertex correspond to same vertex information, and the first boundary vertex is a boundary vertex which is a first type vertex but not a second type vertex in the reconstructed sub-mesh;
[0294] merge the second boundary vertex in the reconstructed sub-mesh and a second merged vertex, and update a vertex index of the second boundary vertex in a triangle to a vertex index of the second merged vertex in the current merged mesh, wherein the second merged vertex is a vertex indicated by a target vertex index corresponding to the second boundary vertex, and the second boundary vertex is a boundary vertex which is a first type vertex and a second type vertex in the reconstructed sub-mesh.
[0295] In some embodiments of the present application, the method 500 further comprises:
[0296] determining, according to a first type vertex in the reconstructed sub-mesh, whether a triangle in the reconstructed sub-mesh is an added triangle or a first type triangle, the first type triangle being a triangle in the three-dimensional mesh which is split into at least two sub-meshes;
[0297] adding the added triangle to the current merged mesh, or not adding the first type triangle to the current merged mesh.
[0298] In some embodiments of the present application, the determining, according to a first type vertex in the reconstructed sub-mesh, whether a triangle in the reconstructed sub-mesh is an added triangle or a first type triangle, comprises:
[0299] determining, according to whether three vertices of the triangle in the reconstructed sub-mesh are first type vertices and whether a triangle in which the three vertices are located exists in the current merged mesh, whether the triangle is an added triangle or a first type triangle;
[0300] wherein, if the three vertices of the triangle are all first type vertices, and the triangle in which the three vertices are located exists in the current merged mesh, it is determined that the triangle is the first type triangle; or
[0301] if there is a vertex which is not a first type vertex among the three vertices of the triangle, or the triangle in which the three vertices are located does not exist in the current merged mesh, it is determined that the triangle is the added triangle.
[0302] The decoding end determines whether the triangle in the reconstructed sub-grid is a triangle to be added or a first type of triangle according to the description of the encoding end. For brevity, the specific implementation is not described herein again.
[0303] FIG. 10 shows a decoding framework provided by an embodiment of the present application, and the decoding end can perform the decoding process in FIG. 9. The decoding framework can include a sub-grid decoding process, a target merging information decoding process, a sub-grid merging process, and optionally, a texture map decoding process. In the sub-grid decoding process, the sub-grid code stream (i.e., the first code stream) can be decoded to obtain a plurality of reconstructed sub-grids. In the target merging information decoding process, the target merging information code stream (i.e., the second code stream) can be decoded to obtain target merging information. In the texture map decoding process, the texture map code stream (i.e., the third code stream) can be decoded to obtain a texture map of the three-dimensional mesh. In the sub-grid merging process, the plurality of reconstructed sub-grids can be merged based on the decoded target merging information to obtain a decoded mesh.
[0304] For the sub-grid decoding process, the decoding end performs the following process:
[0305] The input of this process is the sub-grid code stream, and the output is the reconstructed sub-grid. Optionally, the decoding of the sub-grid can include connection relationship decoding, geometry information decoding, attribute information decoding, non-manifold structure information decoding, and optionally, mesh difference information decoding. The decoding end can use a decoding method corresponding to the encoding method used by the encoding end to decode each information. The following describes the decoding method based on Edgebreaker in detail.
[0306] For the connection relationship decoding, the decoding end first decodes the mode string. The mode string is traversed in a certain order (forward order or reverse order), and the connection relationship is reconstructed according to the corresponding mode in the string. In addition, the traversal order of the vertex is output to the geometry information decoding, attribute information decoding, and non-manifold structure information decoding modules.
[0307] For the geometry information decoding, the decoding method corresponding to the encoding end can be used to decode the geometry information according to the decoding order of the connection relationship.
[0308] For the attribute information decoding, the decoding method corresponding to the encoding end can be used to decode the attribute information according to the decoding order of the connection relationship.
[0309] For the non-manifold structure information decoding, the decoding method corresponding to the encoding end can be used to decode the non-manifold structure information according to the decoding order of the connection relationship.
[0310] For the decoding of the mesh difference information, the decoding end can decode the mesh difference information by using a decoding method corresponding to the encoding end. Further, the decoding end can obtain the reconstructed sub-mesh according to the decoded connection relationship, geometry information, attribute information, and non-manifold structure information. Then, the decoding end can perform the steps of possibly recovering the duplicate points, adjusting the reconstructed mesh according to the mesh difference information, and the like, to obtain the final reconstructed sub-mesh.
[0311] For the decoding of the target merging information, the decoding end performs the following procedure:
[0312] For this procedure, the decoding end can decode the target merging information by using a decoding method corresponding to the encoding end, such as decoding the sub-mesh related merging information and decoding the vertex related merging information.
[0313] For the first indication information in the sub-mesh related merging information, the decoding end can decode the first indication information corresponding to each sub-mesh by using 1-bit fixed-length decoding.
[0314] For the second indication information in the sub-mesh related merging information, the decoding end can decode the second indication information of the sub-mesh that needs to perform the merging and duplicate information operation according to the decoded first indication information. For example, the decoding can be performed by using fixed-length decoding, or by using an 8-bit unsigned integer decoding method with a variable number of bytes, or by using difference decoding. The present application does not limit the decoding method of the first indication information and the second indication information, as long as it corresponds to the encoding end.
[0315] For the vertex related merging information corresponding to the sub-mesh, the decoding end can decode the vertex related merging information of the remaining sub-meshes except for the sub-mesh that is the initial merging mesh, or can only decode the vertex related merging information corresponding to the sub-mesh that needs to perform the merging and duplicate information operation, as long as it corresponds to the behavior of the encoding end.
[0316] For the first identification of the boundary vertex and the second identification of the first type of vertex, the decoding end can use context adaptive arithmetic entropy decoding, and the present application does not limit the decoding method, as long as it corresponds to the behavior of the decoding end.
[0317] For the target vertex index corresponding to a certain vertex pair, the decoding end can decode it in a manner such as difference decoding, for example, reading the target vertex index from the position corresponding to the code stream, decoding the difference between each index and the previous index except for the first index which is the original index value, and performing corresponding accumulation operation to obtain each target index value. It should be understood that the decoding manner of the vertex-related merging information in the present application is not limited, as long as it corresponds to the encoding end.
[0318] For the sub-grid merging process, the decoding end performs the following process:
[0319] The input of this process is multiple reconstructed sub-grids and target merging information, and the output is the decoded grid.
[0320] In this process, the sub-grid merging process of the decoding end is similar to the process of obtaining target merging information by the encoding end. For example, the decoding end can select the initial merging network in the same way as the encoding end, and the decoding end can traverse the reconstructed sub-grids in the same way as the encoding end in the process of obtaining target merging information, perform two-by-two merging operation according to the target merging information by traversing the input reconstructed sub-grids, and constantly update the merging grid until the final decoded grid is obtained. The following takes the merging of geometric vertices as an example to illustrate the specific merging process.
[0321] Firstly, the decoding end initializes the merging grid according to the initialized reconstructed sub-grid indicated by the decoded initial sub-grid indication information, or initializes the merging grid using the selection method of the initial reconstructed sub-grid corresponding to the encoding end, and constructs the third mapping relationship corresponding to the current merging grid, such as the mapping relationship between geometric coordinates and vertex indexes. Then, the remaining reconstructed sub-grids are traversed, and the sub-grid merging operation is performed according to the target merging information. The sub-grid merging process is similar to the process of obtaining target merging information by the encoding end. Specifically, when traversing the remaining reconstructed sub-grids to perform merging operation between the reconstructed sub-grids and the current merging grid, the decoding end can perform the subsequent judgment process according to the decoded sub-grid-related merging information and the vertex-related merging information corresponding to the reconstructed sub-grid, or only according to the vertex-related merging information corresponding to the reconstructed sub-grid. The specific execution manner corresponds to the encoding information.
[0322] For example, if the first indication information indicates that the current reconstructed sub-mesh is a sub-mesh that does not need to perform the merging and repeating information operation, the decoding end can skip the judgment operation of traversing all vertices of the reconstructed sub-mesh in the subsequent process, directly record all vertices in the current reconstructed sub-mesh as to-be-added vertices, and then perform the subsequent operation of adding vertices to the current merged mesh, updating the connection relationship of triangles, and adding triangles to the current merged mesh. At the same time, the judgment step of the repeatedly divided triangle can be skipped when adding the triangle. Or, if the first indication information indicates that the current reconstructed sub-mesh is a reconstructed sub-mesh that needs to perform the merging and repeating information operation, the sub-mesh merging operation is performed according to the steps in FIG. 11.
[0323] For the manner of performing the sub-mesh merging operation only according to the vertex-related merging information of the sub-mesh, the decoding end directly performs the sub-mesh merging operation according to the following steps. This manner directly adds the sub-mesh that does not need to perform the merging and repeating information operation into the merged mesh through the following judgment operation, and the sub-mesh that needs to perform the merging and repeating information operation can also perform the corresponding merging and repeating information operation and be merged into the merged mesh through the following judgment.
[0324] FIG. 11 shows a specific process of merging the reconstructed sub-mesh with the current merged mesh.
[0325] Specifically, taking the geometric vertex as an example, the vertices in the current reconstructed sub-mesh are traversed, for example, the vertex index is vIdx, and the vertices in the current reconstructed sub-mesh are not traversed (i.e., vIdx
[0326] Step 1, determine whether the current vertex exists in the current merged mesh.
[0327] For example, the decoding end can determine whether the geometric coordinates of the current vertex exist in the current merged mesh through the mapping relationship between the geometric coordinates and the vertex index in the current merged mesh. If the geometric coordinates of the current vertex do not exist in the current merged mesh, it indicates that the current vertex is not a boundary vertex of the current reconstructed sub-mesh, that is, the current vertex is not a vertex that needs to be merged when merging the sub-mesh, and at this time, the current vertex is recorded as a to-be-added vertex; if the geometric coordinates of the current vertex exist in the current merged mesh, it indicates that the current vertex is a boundary vertex of the current reconstructed sub-mesh, and step 2 is performed.
[0328] Step 2, determine whether the current vertex is a repeatedly divided vertex.
[0329] For example, the decoding end can determine whether the current vertex is a repeatedly divided vertex in the original mesh according to the first identifier corresponding to the boundary vertex obtained by decoding. If the current vertex is not a repeatedly divided vertex, the current vertex is not a vertex that needs to be subjected to the repeated information operation when the mesh is merged, and in this case, the current vertex is recorded as a vertex to be added. Alternatively, if the current vertex is a repeatedly divided boundary vertex, step 3 is performed.
[0330] Step 3: Determine whether the current vertex is a repeated vertex.
[0331] For example, the decoding end can determine whether the current vertex is a repeated vertex in the original mesh according to the second identifier corresponding to the first type of vertex obtained by the decoding end. If the current vertex is not a repeated vertex in the original mesh, the vertex in the current merged mesh that has the same geometric coordinates as the current vertex can be taken as a merged vertex, and the vertex index in the triangle in which the current vertex is located can be updated to the vertex index of the merged vertex. Alternatively, if the current vertex is a repeated vertex in the original mesh, the current vertex is a specific vertex in the original mesh, and the current vertex can be determined in the merged mesh according to the target vertex index corresponding to the specific vertex obtained by decoding, and the vertex index in the triangle in which the current point is located can be updated to the vertex index of the merged vertex.
[0332] After the traversal of all the vertices in the current reconstructed sub-mesh is completed, the decoding end can add the recorded vertices to be added to the current merged mesh, and update the vertex index of the vertices in the triangle in the current sub-mesh to the vertex index after the vertices are added to the merged mesh. The decoding end can also update the mapping relationship between the geometric coordinates and the vertex index in the current merged mesh, and then add the triangle in the updated current reconstructed sub-mesh to the current merged mesh. For example, the decoding end can first determine whether the triangle in the current reconstructed sub-mesh is a repeatedly divided triangle, for example, whether the three vertices in the triangle are repeatedly divided vertices and whether the three vertices exist in the current merged mesh can be used to determine whether the triangle is a repeatedly divided triangle, and the specific determination method is described in detail by the encoding end. For the repeatedly divided triangle, the decoding end can not perform the addition operation thereon. For the triangle that is not repeatedly divided, the decoding end can perform the addition operation thereon, so as to obtain the updated current merged mesh. Then, the third mapping relationship corresponding to the current merged mesh, such as the mapping relationship between the geometric coordinates and the vertex index, can be updated according to the updated current merged mesh.
[0333] Iterate the above process until all the reconstructed sub-meshes are traversed to obtain the final decoded mesh.
[0334] It should be noted that the above is described by taking the merging information corresponding to the geometric coordinates as an example, and the decoding end can also execute the above process based on the merging information corresponding to other vertex information, or the decoding end can also execute the above process based on the merging information corresponding to other vertex information in the process of merging the reconstructed sub-mesh based on the merging information corresponding to the geometric coordinates. The specific execution process is not limited in the present application.
[0335] In the embodiments of the present application, the syntax structure of the stitching supplemental enhancement information (SEI) information syntax is also designed.
[0336] For example, at least one of the following variables is added:
[0337] zp_number_of_geo_border_verts[k][p];
[0338] zp_coded_is_geo_dup_divided_sizes[k][p];
[0339] zp_geo_dup_divided_flags[k][p][j];
[0340] zp_number_of_geo_dup_dup_verts[k][p];
[0341] zp_number_of_geo_dup_divided_verts[k][p];
[0342] zp_coded_is_geo_dup_dup_sizes[k][p];
[0343] zp_geo_dup_dup_flags[k][p][j];
[0344] zp_target_geo_merged_vert_idx_delta;
[0345] zp_mesh_attribute_count[k];
[0346] zp_number_of_attr_border_verts[k][p][attrIdx];
[0347] zp_coded_is_attr_dup_divided_sizes[k][p][attrldx] ;
[0348] zp_attr_dup_divided_flags[k][p][attrldx][j] ;
[0349] zp_number_of_attr_dup_dup_verts[k][p][attrldx] ;
[0350] zp_number_of_attr_dup_divided_verts[k][p][attrldx] ;
[0351] zp_coded_is_attr_dup_dup_sizes[k][p][attrldx] ; zp_attr_dup_dup_flags[k][p][attrldx][j] ;
[0352] zp_target_attr_merged_vert_idx_delta[k][p][attrldx][j].
[0353] In some embodiments, the syntax structure of the SEI information can be as follows:
[0354] wherein zp_instances_updated represents the number of zippering instances that will be updated in the current zippering SEI information.
[0355] wherein zp_instance_index[i] represents the i-th zippering instance index in the array ZipperingMethod, which will be updated by the current SEI information.
[0356] wherein zp_instance_cancel_flag[k] equal to 1 indicates that the value of ZipperingMethod[k] and all parameters related to the zippering instance with index k should be set to 0 and their default values, respectively.
[0357] wherein zp_method_type[k] represents the zippering method, i.e. ZipperingMethod[k], used to process the three-dimensional mesh of the current frame. Table 1 outputs the corresponding relationship between the value of zp_method_type[k] and its interpretation
[0358] Table 1
[0359] Optionally, the stitching method that can be implemented by the coding method provided by the embodiments of the present application can be referred to as a lossless stitching method, which can be indicated by a reserved value of zp_method_type[k], for example, 3.
[0360] Values of zp_method_type[k] greater than 3 are reserved for future use by ISO / IEC. Bitstreams conforming to this version of the document do not contain such zp_method_type[k] values, which is a requirement for bitstream conformance. Decoders shall ignore stitching SEI messages containing reserved values of zp_method_type[k]. The default value of zp_method_type[k] is 0.
[0361] zp_number_of_submeshes_minus1[k] plus 1 specifies the number of submeshes that are stitched by the current SEI message. The value of zp_number_of_submeshes_minus1[k] is in the range of 0 to MaxNumSubmeshes[frameIdx] – 1. The default value of zp_number_of_submeshes_minus1[k] is 0.
[0362] zp_number_of_geo_border_verts[k][p] specifies the number of geometric border vertices in the submesh with index p for the stitching instance with index k in the three-dimensional mesh of the current frame.
[0363] zp_coded_is_geo_dup_divided_sizes[k][p] specifies the size in bytes of the arithmetic coding sequence for the first flag zp_geo_dup_divided_flags[k][p][j], including the final byte alignment.
[0364] zp_geo_dup_divided_flags[k][p][j] equal to 1 specifies that the j-th decoded geometric border vertex in the submesh with index p for the stitching instance with index k in the three-dimensional mesh of the current frame is a duplicated divided geometry vertex. zp_geo_dup_divided_flags[k][p][j] equal to 0 specifies that the j-th decoded geometric border vertex in the submesh with index p for the stitching instance with index k in the three-dimensional mesh of the current frame is not a duplicated divided geometry vertex.
[0365] zp_number_of_geo_dup_dup_verts[k][p] indicates the number of duplicated geometry vertices in the original mesh for the duplicated divided geometry vertex in the submesh with index p for the stitching instance with index k in the three-dimensional mesh of the current frame.
[0366] zp_number_of_geo_dup_divided_verts[k][p] indicates the number of duplicated divided geometry vertices in the submesh with index p for the stitching instance with index k in the three-dimensional mesh of the current frame.
[0367] zp_coded_is_geo_dup_dup_sizes[k][p] indicates the byte size of the arithmetic coding sequence of the second flag zp_geo_dup_dup_flags[k][p][j], including the final byte alignment.
[0368] zp_geo_dup_dup_flags[k][p][j] equal to 1 indicates that the jth duplicated divided geometry vertex of the submesh with index p for the stitching instance with index k in the three-dimensional mesh of the current frame is a duplicated geometry vertex in the original mesh. zp_geo_dup_dup_flags[k][p][j] equal to 0 indicates that the jth duplicated divided geometry vertex of the submesh with index p for the stitching instance with index k in the three-dimensional mesh of the current frame is not a duplicated geometry vertex in the original mesh.
[0369] zp_target_geo_merged_vert_idx_delta[k][p][j] indicates the difference between the target vertex index of the jth duplicated divided duplicated geometry vertex and the target vertex index of the (j-1)th duplicated divided duplicated geometry vertex when j is greater than 0. zp_target_geo_merged_vert_idx_delta[k][p][j] indicates the target vertex index of the 1st duplicated geometry vertex in the duplicated divided geometry vertex when j is equal to 0. Wherein, p indicates the submesh with index p, and k indicates the stitching instance with index k in the three-dimensional mesh of the current frame.
[0370] zp_mesh_attribute_count[k] indicates the number of divided attributes for the stitching instance with index k in the three-dimensional mesh of the current frame.
[0371] zp_number_of_attr_border_verts[k][p][attrldx] indicates the number of border vertices for the ath attribute in the submesh with index p for the stitching instance with index k in the three-dimensional mesh of the current frame.
[0372] zp_coded_is_attr_dup_divided_sizes[k][p][attrldx] indicates the byte size of the arithmetic coding sequence for the first flag zp_attr_dup_divided_flags[k][p][attrldx][j], including the final byte alignment.
[0373] zp_attr_dup_divided_flags[k][p][attrldx][j] equal to 1 indicates that the jth decoded border vertex of the ath attribute in the submesh with index p for the stitching instance with index k in the three-dimensional mesh of the current frame is a duplicated divided attribute vertex. zp_attr_dup_divided_flags[k][p][j] equal to 0 indicates that the jth decoded border vertex of the ath attribute in the submesh with index p for the stitching instance with index k in the three-dimensional mesh of the current frame is not a duplicated divided attribute vertex.
[0374] zp_number_of_attr_dup_dup_verts[k][p][attrldx] indicates the number of duplicated vertices in the original mesh in the duplicated divided vertices of the ath attribute in the submesh with index p for the stitching instance with index k in the three-dimensional mesh of the current frame.
[0375] zp_number_ofattr_dup_divided_verts[k][p][attrldx] indicates the number of duplicated divided vertices of the ath attribute in the submesh with index p for the stitching instance with index k in the three-dimensional mesh of the current frame.
[0376] zp_coded_is_attr_dup_dup_sizes[k][p][attrldx] indicates the byte size of the arithmetic coding sequence for the binary duplication indication information zp_attr_dup_dup_flags[k][p][attrldx][j], including the final byte alignment.
[0377] zp_attr_dup_dup_flags[k][p][attrIdx][j] equals to 1 indicates that the jth duplicated vertex of the attrIdxth attribute of the submesh indexed by p for the stitching instance indexed by k in the three-dimensional mesh of the current frame is a duplicated attribute vertex in the original mesh. zp_attr_dup_dup_flags[k][p][attrIdx][j] equals to 0 indicates that the jth duplicated vertex of the attrIdxth attribute of the submesh indexed by p for the stitching instance indexed by k in the three-dimensional mesh of the current frame is not a duplicated attribute vertex in the original mesh.
[0378] zp_target_attr_merged_vert_idx_delta[k][p][attrIdx][j] represents the difference between the target vertex index of the jth duplicated vertex of the attrIdxth attribute and the target vertex index of the (j-1)th duplicated vertex of the attrIdxth attribute when j is greater than 0. zp_target_attr_merged_vert_idx_delta[k][p][attrIdx][j] represents the target vertex index of the 1st duplicated vertex of the attrIdxth attribute when j equals to 0. p represents the submesh indexed by p, and k represents the stitching instance indexed by k in the three-dimensional mesh of the current frame.
[0379] In summary, in the embodiments of the present application, the encoding end can encode a plurality of submeshes in the original mesh to obtain a first code stream, reconstruct the mesh based on the first code stream (submesh code stream) to obtain a plurality of reconstructed submeshes, then obtain target merging information based on the plurality of reconstructed submeshes and the original mesh, encode the target merging information to obtain a second code stream, generate a target code stream based on the first code stream and the second code stream, and send the target code stream to the decoding end, so that the decoding end can obtain the plurality of reconstructed submeshes and the target merging information by decoding the target code stream, then perform merging processing on the plurality of reconstructed submeshes based on the target merging information, and improve the recovery performance of the decoded mesh.
[0380] The encoding method provided in the embodiments of the present application can be executed by an encoding device. In the embodiments of the present application, the encoding method is executed by an encoding device as an example to illustrate the encoding device provided in the embodiments of the present application.
[0381] FIG. 12 shows a schematic block diagram of an encoding device 600 according to the embodiments of the present application. As shown in FIG. 12, the encoding device 600 includes:
[0382] The first encoding module 610 is configured to encode a plurality of sub-grids of a three-dimensional grid to obtain a first code stream.
[0383] The decoding module 620 is configured to decode the first code stream to obtain a plurality of reconstructed sub-grids.
[0384] The obtaining module 630 is configured to obtain target merging information according to the plurality of reconstructed sub-grids and the three-dimensional grid, the target merging information including at least one of sub-grid related merging information and vertex related merging information in the plurality of reconstructed sub-grids.
[0385] The second encoding module 640 is configured to encode the target merging information to obtain a second code stream.
[0386] The generating module 650 is configured to generate a target code stream based on the first code stream and the second code stream.
[0387] In some embodiments, the sub-grid related merging information is used to indicate a target sub-grid in the plurality of reconstructed sub-grids and / or a merging sub-grid to be merged with the target sub-grid, the target sub-grid being a sub-grid in the plurality of reconstructed sub-grids that needs to be merged.
[0388] In some embodiments, the sub-grid related merging information includes at least one of:
[0389] first indication information corresponding to each reconstructed sub-grid in the plurality of reconstructed sub-grids, used to indicate whether the reconstructed sub-grid is a target sub-grid, the target sub-grid being a reconstructed sub-grid that needs to be merged;
[0390] second indication information corresponding to the target sub-grid, used to indicate a merging sub-grid to be merged with the target sub-grid.
[0391] In some embodiments, the vertex related merging information is used to indicate a target vertex in a reconstructed sub-grid that needs to be merged and / or a merging vertex corresponding to the target vertex.
[0392] In some embodiments, the vertex related merging information includes at least one of:
[0393] a number of boundary vertices in a reconstructed sub-grid;
[0394] first identification corresponding to a boundary vertex in a reconstructed sub-grid, used to identify whether the boundary vertex is a first type of vertex in the three-dimensional grid, the first type of vertex being a vertex in the three-dimensional grid that is divided into at least two sub-grids;
[0395] a number of first type of vertices in a reconstructed sub-grid;
[0396] a byte size of an encoded sequence obtained by encoding the first identifier corresponding to the boundary vertex pair;
[0397] reconstructing a second identifier corresponding to a first type of vertex in a sub-grid, the second identifier being used to identify whether the first type of vertex is a second type of vertex in the three-dimensional mesh, wherein the second type of vertex is at least two vertices in the three-dimensional mesh having the same vertex information but different vertex indexes;
[0398] a byte size of an encoded sequence obtained by encoding the second identifier corresponding to the first type of vertex;
[0399] reconstructing a target vertex index corresponding to a specific vertex in a sub-grid, the target vertex index being used to indicate a vertex index corresponding to a merged vertex to which the specific vertex is merged in a merged mesh, the specific vertex being a first type of vertex in the three-dimensional mesh, and the specific vertex being a second type of vertex in the three-dimensional mesh;
[0400] reconstructing a number of specific vertices in a sub-grid, wherein the specific vertices are a first type of vertex in the three-dimensional mesh, and the specific vertices are a second type of vertex in the three-dimensional mesh.
[0401] In some embodiments, the target merging information includes vertex-related merging information corresponding to at least one reconstructed sub-grid, wherein the at least one reconstructed sub-grid includes reconstructed sub-grids in the plurality of reconstructed sub-grids except for a first reconstructed sub-grid, the first reconstructed sub-grid being a sub-grid of an initial merged mesh; or the at least one reconstructed sub-grid includes reconstructed sub-grids in the plurality of reconstructed sub-grids that need to be merged.
[0402] In some embodiments, the obtaining module 630 is further configured to:
[0403] obtaining a first mapping relationship corresponding to the three-dimensional mesh according to the three-dimensional mesh, the first mapping relationship being used to describe a mapping relationship related to vertices and / or triangles in the three-dimensional mesh;
[0404] based on the first mapping relationship and the plurality of reconstructed sub-grids, obtaining a second mapping relationship corresponding to each reconstructed sub-grid in the plurality of reconstructed sub-grids, the second mapping relationship being used to indicate a mapping relationship between the reconstructed sub-grid and vertices in the three-dimensional mesh;
[0405] obtaining the target merging information according to the first mapping relationship, the plurality of reconstructed sub-grids, and the second mapping relationship corresponding to each reconstructed sub-grid.
[0406] In some embodiments, the first mapping relationship includes at least one of the following:
[0407] a mapping relationship between vertex information and vertex indexes in the three-dimensional mesh;
[0408] a mapping relationship between vertex information of three vertices of a triangle in the three-dimensional mesh and a triangle index;
[0409] a mapping relationship between a triangle index and vertex indexes of a triangle in the three-dimensional mesh.
[0410] In some embodiments, the second mapping relationship comprises a mapping relationship between vertex indexes in the reconstructed sub-mesh and vertex indexes in the three-dimensional mesh.
[0411] In some embodiments, the obtaining module 630 is further configured to perform at least one of the following:
[0412] traversing all vertices in the three-dimensional mesh to construct a mapping relationship between vertex information and vertex indexes in the three-dimensional mesh;
[0413] traversing triangles in the three-dimensional mesh, obtaining vertex information of three vertices of a triangle and triangle indexes corresponding to the vertex information of the three vertices, and constructing a mapping relationship between vertex information and triangle indexes in the three-dimensional mesh and a mapping relationship between a triangle index and vertex indexes of a triangle in the three-dimensional mesh based on the vertex information of the three vertices of the triangle and the triangle indexes corresponding to the vertex information of the three vertices.
[0414] In some embodiments, the obtaining module 630 is further configured to:
[0415] traversing each of the plurality of reconstructed sub-meshes;
[0416] for a current reconstructed sub-mesh traversed, traversing triangles in the current reconstructed sub-mesh, obtaining vertex indexes of three vertices of a triangle and vertex information of the three vertices of the triangle;
[0417] determining an arrangement order of the vertex indexes of the three vertices of the triangle in the triangle according to the vertex indexes of the three vertices of the triangle and the vertex information of the three vertices of the triangle;
[0418] determining a triangle index corresponding to a target triangle matching the triangle in the three-dimensional mesh according to the vertex information of the three vertices of the triangle, the arrangement order of the vertex indexes of the three vertices of the triangle in the triangle, and the mapping relationship between vertex information of three vertices of a triangle and a triangle index in the first mapping relationship;
[0419] According to the triangle index corresponding to the target triangle, the mapping relationship between the triangle index and the vertex index of the triangle in the first mapping relationship, and the mapping relationship between the vertex information of the three vertices of the triangle and the vertex index of the triangle in the first mapping relationship, the vertex index of the three vertices of the target triangle and the arrangement order of the vertex index of the three vertices of the target triangle in the target triangle are obtained;
[0420] According to the vertex index of the three vertices of the triangle, the arrangement order of the vertex index of the three vertices of the triangle, the vertex index of the three vertices of the target triangle, and the arrangement order of the vertex index of the three vertices of the target triangle, a mapping relationship between the vertex index in the current reconstruction sub-grid and the vertex index in the three-dimensional grid is constructed.
[0421] In some embodiments, the obtaining module 630 is further configured to perform at least one of the following:
[0422] selecting a first reconstruction sub-grid as a current merged grid from the plurality of reconstruction sub-grids;
[0423] constructing a third mapping relationship corresponding to the current merged grid, wherein the third mapping relationship is used to indicate a mapping relationship between vertex information and a vertex index in the current merged grid;
[0424] constructing a fourth mapping relationship corresponding to the current merged grid according to the second mapping relationship corresponding to the first reconstruction sub-grid, wherein the fourth mapping relationship is used to indicate a mapping relationship between a vertex index in the current merged grid and a vertex index in the three-dimensional grid;
[0425] traversing reconstruction sub-grids other than the first reconstruction sub-grid in the plurality of reconstruction sub-grids, and determining at least one of the first type of vertex and the second type of vertex in the reconstruction sub-grid according to the first mapping relationship, the second mapping relationship corresponding to the reconstruction sub-grid, the third mapping relationship corresponding to the current merged grid, and the fourth mapping relationship;
[0426] obtaining the target merged information according to the at least one of the first type of vertex and the second type of vertex in the reconstruction sub-grid.
[0427] In some embodiments, the apparatus further comprises a processing module configured to perform at least one of the following:
[0428] traversing all vertices in the reconstruction sub-grid, and determining whether a current vertex exists in the current merged grid according to the third mapping relationship corresponding to the current merged grid;
[0429] if the current vertex is not in the current merged mesh, determining that the current vertex is not the first type of vertex, determining the current vertex as a vertex to be added; or
[0430] if the current vertex is in the current merged mesh, determining whether the current vertex is a second type of vertex according to a mapping relationship between vertex information and vertex indexes in the first mapping relationship;
[0431] in a case where the current vertex is not the second type of vertex, setting a first identifier of the current vertex as an identifier for identifying that the current vertex is the first type of vertex, setting a second identifier of the current vertex as an identifier for identifying that the vertex is not the second type of vertex, and updating a vertex index of the current vertex in a triangle to a vertex index corresponding to a merged vertex in the current merged mesh, wherein the merged vertex and the current vertex have the same vertex information;
[0432] in a case where the current vertex is the second type of vertex, determining whether the current vertex is the first type of vertex according to a second mapping relationship corresponding to the reconstructed sub-mesh, a third mapping relationship corresponding to the current merged mesh, and a fourth mapping relationship;
[0433] in a case where the current vertex is not the first type of vertex, setting a first identifier of the current vertex as an identifier for identifying that the current vertex is not the first type of vertex, and determining the current vertex as a vertex to be added;
[0434] in a case where the current vertex is the first type of vertex, setting a first identifier of the current vertex as an identifier for identifying that the current vertex is the first type of vertex, setting a second identifier of the current vertex as an identifier for identifying that the current vertex is the second type of vertex, updating a vertex index of the current vertex in a triangle to a vertex index corresponding to a merged vertex in the current merged mesh, and taking the vertex index corresponding to the merged vertex as a target vertex index corresponding to the current vertex, wherein the merged vertex and the current vertex have the same vertex information, and the merged vertex and the current vertex have the same vertex index corresponding to a vertex in the three-dimensional mesh;
[0435] in a case where all the vertices in the reconstructed sub-mesh are traversed, adding all the vertices to be added obtained to the current merged mesh, updating vertex indexes of the vertices to be added in the current merged mesh, and updating a third mapping relationship and a fourth mapping relationship corresponding to the current merged mesh.
[0436] In some embodiments, the processing module is further configured to:
[0437] determining, according to the vertex information of the current vertex and the first mapping relationship, whether there are at least two vertices in the three-dimensional mesh whose vertex information is the same as the vertex information of the current vertex but corresponding vertex indexes are different;
[0438] If there are at least two vertices in the three-dimensional mesh whose vertex information is the same as the vertex information of the current vertex but corresponding vertex indexes are different, it is determined that the current vertex is the second type of vertex.
[0439] In some embodiments, the processing module is further configured to:
[0440] determining, according to the second mapping relationship corresponding to the reconstructed sub-mesh, the third mapping relationship corresponding to the current merged mesh, and a fourth mapping relationship, whether there is at least one vertex in the current merged mesh whose vertex information is the same as the vertex information of the current vertex, and the corresponding vertex index of the at least one vertex information in the three-dimensional mesh is the same as the corresponding vertex index of the current vertex in the three-dimensional mesh;
[0441] If there is, it is determined that the current vertex is the first type of vertex; or, if there is not, it is determined that the current vertex is not the first type of vertex.
[0442] In some embodiments, the apparatus further comprises:
[0443] The processing module is configured to determine, according to the first type of vertex in the reconstructed sub-mesh, whether a triangle in the reconstructed sub-mesh is a to-be-added triangle or a first type of triangle, the first type of triangle being a triangle in the three-dimensional mesh that is split into at least two sub-meshes;
[0444] adding the to-be-added triangle to the current merged mesh, or not adding the first type of triangle to the current merged mesh.
[0445] In some embodiments, the processing module is further configured to:
[0446] determining, according to whether the three vertices of the triangle in the reconstructed sub-mesh are the first type of vertex and whether the triangle in which the three vertices are located exists in the current merged mesh, whether the triangle is the to-be-added triangle or the first type of triangle;
[0447] If the three vertices of the triangle are the first type of vertex and the triangle in which the three vertices are located exists in the current merged mesh, it is determined that the triangle is the first type of triangle; or
[0448] If there is a vertex that is not a first type vertex among the three vertices of the triangle, or the triangle in which the three vertices are located does not exist in the current merged mesh, it is determined that the triangle is the to-be-added triangle.
[0449] The decoding method provided in the embodiments of the present application can be executed by a decoding device. The decoding device is taken as an example to illustrate the decoding device provided in the embodiments of the present application.
[0450] FIG. 13 shows a schematic block diagram of a decoding device 700 according to an embodiment of the present application. As shown in FIG. 13, the decoding device 700 includes:
[0451] The acquisition module 710 is configured to acquire a target code stream corresponding to a three-dimensional mesh, wherein the three-dimensional mesh includes a plurality of sub-meshes.
[0452] The decoding module 720 is configured to decode the target code stream to obtain a plurality of reconstructed sub-meshes and target merging information, wherein the target merging information includes at least one of sub-mesh related merging information and vertex related merging information in the plurality of reconstructed sub-meshes.
[0453] The merging processing module 730 is configured to perform merging processing on the plurality of reconstructed sub-meshes according to the target merging information.
[0454] In some embodiments, the sub-mesh related merging information is used to indicate a target sub-mesh in the plurality of reconstructed sub-meshes and / or a merging sub-mesh that is merged with the target sub-mesh, and the target sub-mesh is a sub-mesh that needs to be merged in the plurality of reconstructed sub-meshes.
[0455] In some embodiments, the sub-mesh related merging information includes at least one of the following:
[0456] First indication information corresponding to each of the plurality of reconstructed sub-meshes, used to indicate whether the reconstructed sub-mesh is a target sub-mesh, and the target sub-mesh is a reconstructed sub-mesh that needs to be merged;
[0457] Second indication information corresponding to the target sub-mesh, used to indicate a merging sub-mesh that needs to be merged with the target sub-mesh.
[0458] In some embodiments, the vertex related merging information is used to indicate a target vertex in a reconstructed sub-mesh that needs to be merged and / or a merging vertex corresponding to the target vertex.
[0459] In some embodiments, the vertex related merging information includes at least one of the following:
[0460] The number of boundary vertices in the reconstructed sub-mesh;
[0461] reconstructing first identifiers corresponding to boundary vertices in the sub-grid, the first identifiers being used to identify whether the boundary vertices are first type vertices in the three-dimensional mesh, the first type vertices being vertices in the three-dimensional mesh that are divided into at least two sub-grids;
[0462] reconstructing a number of the first type vertices in the sub-grid;
[0463] a byte size of an encoded sequence obtained by encoding the first identifiers corresponding to the boundary vertices;
[0464] reconstructing second identifiers corresponding to the first type vertices in the sub-grid, the second identifiers being used to identify whether the first type vertices are second type vertices in the three-dimensional mesh, wherein the second type vertices are at least two vertices in the three-dimensional mesh that have the same vertex information but different vertex indices;
[0465] a byte size of an encoded sequence obtained by encoding the second identifiers corresponding to the first type vertices;
[0466] reconstructing a target vertex index corresponding to a specific vertex in the sub-grid, the target vertex index being used to indicate a vertex index corresponding to a merged vertex to which the specific vertex is merged in the merged mesh, the specific vertex being a first type vertex in the three-dimensional mesh, and the specific vertex being a second type vertex in the three-dimensional mesh;
[0467] reconstructing a number of the specific vertices in the sub-grid, wherein the specific vertices are the first type vertices in the three-dimensional mesh, and the specific vertices are the second type vertices in the three-dimensional mesh.
[0468] In some embodiments, the target merging information includes vertex-related merging information corresponding to at least one reconstructed sub-grid, wherein the at least one reconstructed sub-grid includes reconstructed sub-grids in the plurality of reconstructed sub-grids other than a first reconstructed sub-grid, the first reconstructed sub-grid being a sub-grid of an initial merged mesh; or the at least one reconstructed sub-grid includes reconstructed sub-grids in the plurality of reconstructed sub-grids that need to be merged.
[0469] In some embodiments, the merging processing module 730 is further configured to perform at least one of the following:
[0470] selecting a first reconstructed sub-grid in the plurality of reconstructed sub-grids as a current merged mesh;
[0471] constructing a third mapping relationship corresponding to the current merged mesh, wherein the third mapping relationship is used to indicate a mapping relationship between vertex information and vertex indices in the current merged mesh;
[0472] determining, according to a third mapping relationship corresponding to the current merged mesh, at least one of a boundary vertex and a non-boundary vertex in the reconstruction sub-mesh;
[0473] determining the non-boundary vertex in the reconstruction sub-mesh as a to-be-added vertex;
[0474] determining, according to the target merging information, at least one of a to-be-added vertex, a first type vertex and a second type vertex in the boundary vertex, wherein the first type vertex is a vertex in the three-dimensional mesh divided into at least two sub-meshes, and the second type vertex is at least two vertices in the three-dimensional mesh having the same vertex information but different vertex indexes;
[0475] performing merging processing on the reconstruction sub-mesh and the current merged mesh according to the determined at least one of the to-be-added vertex, the first type vertex and the second type vertex in the reconstruction sub-mesh.
[0476] In some embodiments, the merging processing module 730 is further configured to perform at least one of the following:
[0477] determining whether the boundary vertex is a first type vertex according to a first identifier corresponding to the boundary vertex obtained by decoding;
[0478] in a case where the boundary vertex is not the first type vertex, determining the boundary vertex as a to-be-added vertex;
[0479] in a case where the boundary vertex is the first type vertex, determining whether the boundary vertex is a second type vertex according to a second identifier corresponding to the first type vertex;
[0480] in a case where the boundary vertex is not the second type vertex, determining a vertex having the same vertex information as the boundary vertex in the current merged mesh as a merged vertex of the boundary vertex;
[0481] in a case where the boundary vertex is the second type vertex, the boundary vertex is a specific vertex in the reconstruction sub-mesh, and a merged vertex merged with the boundary vertex is determined according to a target vertex index corresponding to the specific vertex.
[0482] In some embodiments, the merging processing on the reconstruction sub-mesh and the current merged mesh according to the determined at least one of the to-be-added vertex, the first type vertex and the second type vertex in the reconstruction sub-mesh includes at least one of the following:
[0483] adding the to-be-added vertex to the current merged mesh and updating a vertex index corresponding to the to-be-added vertex in the current merged mesh;
[0484] merge the first boundary vertex in the reconstructed sub-mesh and a first merged vertex in the current merged mesh, and update a vertex index of the first boundary vertex in a triangle to a vertex index of the first merged vertex in the current merged mesh, wherein the first merged vertex and the first boundary vertex correspond to same vertex information, and wherein the first boundary vertex is a boundary vertex in the reconstructed sub-mesh that is a first type vertex but not a second type vertex;
[0485] merge the second boundary vertex in the reconstructed sub-mesh and a second merged vertex, and update a vertex index of the second boundary vertex in a triangle to a vertex index of the second merged vertex in the current merged mesh, wherein the second merged vertex is a vertex indicated by a target vertex index corresponding to the second boundary vertex, and wherein the second boundary vertex is a boundary vertex in the reconstructed sub-mesh that is a first type vertex and a second type vertex.
[0486] In some embodiments, the merging processing module 730 is further configured to perform at least one of the following:
[0487] determine, according to a first type vertex in the reconstructed sub-mesh, whether a triangle in the reconstructed sub-mesh is an added triangle or a first type triangle, the first type triangle being a triangle in the three-dimensional mesh that is split into at least two sub-meshes;
[0488] add the added triangle to the current merged mesh, or not add the first type triangle to the current merged mesh.
[0489] In some embodiments, the merging processing module 730 is further configured to perform at least one of the following:
[0490] determine, according to whether three vertices of the triangle in the reconstructed sub-mesh are first type vertices and whether a triangle in which the three vertices are located exists in the current merged mesh, whether the triangle is an added triangle or a first type triangle;
[0491] wherein, if the three vertices of the triangle are all first type vertices, and the triangle in which the three vertices are located exists in the current merged mesh, it is determined that the triangle is the first type triangle; or
[0492] if there is a vertex that is not a first type vertex among the three vertices of the triangle, or the triangle in which the three vertices are located does not exist in the current merged mesh, it is determined that the triangle is the added triangle.
[0493] The encoding device and the decoding device provided by the embodiments of the present application can implement the various processes implemented by the method embodiments of FIGS. 5 to 11 and achieve the same technical effects. To avoid repetition, the details are not described herein.
[0494] As shown in FIG. 14, the embodiments of the present application further provide an electronic device 800, which includes a processor 801 and a memory 802. The memory 802 stores programs or instructions executable on the processor 801. For example, when the electronic device 800 is an encoding end device, the programs or instructions are executed by the processor 801 to implement the various steps of the above-mentioned encoding method embodiments and achieve the same technical effects. When the electronic device 800 is a decoding end device, the programs or instructions are executed by the processor 801 to implement the various steps of the above-mentioned decoding method embodiments and achieve the same technical effects. To avoid repetition, the details are not described herein.
[0495] Optionally, the memory 802 can include any of various distributed or locally accessed data storage media such as hard drives, Blu-ray discs, Digital Versatile Discs (DVDs), Compact Disc Read-Only Memories (CD-ROMs), flash memories, volatile or non-volatile memories, or any other suitable digital storage media for storing three-dimensional mesh data.
[0496] Optionally, the processor 801 can implement the functions of the encoding end or the decoding end in the embodiments shown in FIGS. 5 to 11.
[0497] The embodiments of the present application further provide an electronic device, which includes a memory configured to store three-dimensional mesh data and a processing circuit configured to implement the various steps of the above-mentioned encoding method and decoding method embodiments.
[0498] The embodiments of the present application further provide an electronic device, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is configured to run programs or instructions to implement the steps in the method embodiments shown in FIGS. 5 to 11. The device embodiments correspond to the above-mentioned method embodiments. The various implementation processes and implementation manners of the above-mentioned method embodiments can be applied to the terminal embodiments and achieve the same technical effects.
[0499] The above-mentioned electronic device can be a terminal or other devices other than terminals, such as servers, Network Attached Storage (NAS), and the like.
[0500] The terminal can be a mobile phone, a tablet personal computer, a laptop computer, a notebook computer, a personal digital assistant, a palm computer, a netbook, an ultra-mobile personal computer (UMPC), a mobile internet device (MID), an augmented reality (AR) device, a virtual reality (VR) device, a mixed reality (MR) device, a robot, a wearable device, a flight vehicle, a vehicle user equipment (VUE), a shipboard device, a pedestrian user equipment (PUE), a smart home (a home device with a wireless communication function, such as a refrigerator, a television, a washing machine, or furniture), a game console, a personal computer (PC), a teller machine, or a self-service machine, and the like. The wearable device includes a smart watch, a smart bracelet, a smart earphone, smart glasses, smart jewelry (a smart bracelet, a smart necklace, a smart ring, a smart necklace, a smart ankle bracelet, a smart ankle chain, and the like), a smart wristband, smart clothing, and the like. The vehicle-mounted device can also be referred to as a vehicle-mounted terminal, a vehicle-mounted controller, a vehicle-mounted module, a vehicle-mounted component, a vehicle-mounted chip, or a vehicle-mounted unit, and the like. It should be noted that the specific type of the terminal is not limited in the embodiments of the present application.
[0501] The server can be a standalone physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server. The cloud server can provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), or cloud computing services based on big data and artificial intelligence platforms.
[0502] Taking an electronic device as an example, FIG. 15 is a schematic diagram of a hardware structure of a terminal according to an embodiment of the present application.
[0503] The terminal 900 includes, but is not limited to, at least part of components such as a radio frequency unit 901, a network module 902, an audio output unit 903, an input unit 904, a sensor 905, a display unit 906, a user input unit 907, an interface unit 908, a memory 909, and a processor 910.
[0504] Those skilled in the art can understand that the terminal 900 can further include a power supply (such as a battery) for supplying power to each component, and the power supply can be logically connected to the processor 910 through a power management system, so as to realize functions such as management of charging, discharging, and power consumption management through the power management system. The terminal structure shown in FIG. 15 does not constitute a limitation on the terminal, and the terminal can include more or fewer components than those shown, or combine certain components, or different component arrangements, which are not described here.
[0505] It should be understood that in the embodiments of the present application, the input unit 904 can include a graphics processing unit (GPU) 9041 and a microphone 9042. The graphics processor 9041 processes image data of a still picture or a video obtained by an image acquisition device (such as a camera) in a video acquisition mode or an image acquisition mode, or can process obtained point cloud data or three-dimensional mesh data. The display unit 906 can include a display panel 9061, which can be configured in the form of a liquid crystal display, an organic light-emitting diode, etc. The user input unit 907 includes at least one of a touch panel 9071 and other input devices 9072. The touch panel 9071 is also called a touch screen. The touch panel 9071 can include two parts of a touch detection device and a touch controller. The other input devices 9072 can include, but are not limited to, a physical keyboard, function keys (such as volume control keys, on-off keys, etc.), trackballs, mice, joysticks, which are not described here.
[0506] In the embodiments of the present application, the radio frequency unit 901 can transmit downlink data from the network side device to the processor 910 for processing after receiving the downlink data. In addition, the radio frequency unit 901 can send uplink data to the network side device. Generally, the radio frequency unit 901 includes, but is not limited to, an antenna, an amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, etc.
[0507] The memory 909 can be used to store software programs or instructions and various data. The memory 909 can mainly include a first storage area storing programs or instructions and a second storage area storing data, wherein the first storage area can store an operating system, application programs or instructions required by at least one function (such as a sound playing function, an image playing function, etc.), and the like. In addition, the memory 909 can include a volatile memory or a non-volatile memory. The non-volatile memory can be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically EPROM (EEPROM), or a flash memory. The volatile memory can be a Random Access Memory (RAM), a Static RAM (SRAM), a Dynamic RAM (DRAM), a Synchronous DRAM (SDRAM), a Double Data Rate SDRAM (DDR SDRAM), an Enhanced SDRAM (ESDRAM), a Synch link DRAM (SLDRAM), and a Direct Rambus RAM (DRRAM). The memory 909 in the embodiments of the present application includes but is not limited to these and any other suitable types of memory.
[0508] The processor 910 can include one or more processing units; optionally, the processor 910 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and an application program, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 910.
[0509] In some implementations, the processor 910 is configured to:
[0510] The encoding end encodes a plurality of sub-grids of the three-dimensional grid to obtain a first code stream;
[0511] The encoding end decodes the first code stream to obtain a plurality of reconstructed sub-grids;
[0512] The encoding end obtains target merging information according to the plurality of reconstructed sub-meshes and the three-dimensional mesh, and the target merging information includes at least one of sub-mesh related merging information and vertex related merging information in the plurality of reconstructed sub-meshes.
[0513] The encoding end encodes the target merging information to obtain a second code stream.
[0514] The encoding end generates a target code stream based on the first code stream and the second code stream.
[0515] It can be understood that the implementation process of each implementation manner mentioned in the embodiment can refer to the related description of the encoding method embodiment and achieve the same or corresponding technical effects. To avoid repetition, it will not be repeated here.
[0516] In some other implementation manners, the processor 910 is configured to:
[0517] The decoding end obtains a target code stream corresponding to a three-dimensional mesh, and the three-dimensional mesh includes a plurality of sub-meshes.
[0518] The decoding end decodes the target code stream to obtain a plurality of reconstructed sub-meshes and target merging information, and the target merging information includes at least one of sub-mesh related merging information and vertex related merging information in the plurality of reconstructed sub-meshes.
[0519] The decoding end performs merging processing on the plurality of reconstructed sub-meshes according to the target merging information.
[0520] It can be understood that the implementation process of each implementation manner mentioned in the embodiment can refer to the related description of the decoding method embodiment and achieve the same or corresponding technical effects. To avoid repetition, it will not be repeated here.
[0521] The embodiment of the application further provides a readable storage medium, and the readable storage medium stores a program or instructions, the program or instructions are executed by a processor to implement each process of the method embodiments of FIG. 5 to FIG. 11, and the same technical effects can be achieved. To avoid repetition, it will not be repeated here.
[0522] The processor is the processor in the terminal in the above embodiments. The readable storage medium includes a computer readable storage medium, such as a ROM, a RAM, a magnetic disk, or an optical disk. In some examples, the readable storage medium can be a non-transitory readable storage medium.
[0523] The chip provided by the embodiment of the present application includes a processor and a communication interface, the communication interface is coupled with the processor, the processor is used to run programs or instructions, realizes the processes of the method embodiments of the above-mentioned figures 5 to 11, and can achieve the same technical effects. To avoid repetition, here is no longer described.
[0524] It should be understood that the chip mentioned in the embodiment of the present application can include a system-on-chip (also known as system chip, chip system or system-on-chip chip), and can also include a separate display chip and the like.
[0525] The embodiment of the present application further provides a computer program / program product stored in a storage medium, which is executed by at least one processor to realize the processes of the above-mentioned method embodiments of figures 5 to 11, and can achieve the same technical effects. To avoid repetition, here is no longer described.
[0526] The embodiment of the present application further provides a codec system, including: an encoding end device and a decoding end device, the encoding end device can be used to execute the steps of the encoding method as described above, and the decoding end device can be used to execute the steps of the decoding method as described above.
[0527] It should be noted that in this paper, the term "including", "containing" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the statement "including a…" does not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the method and device in the present application is not limited to the order of functions shown or discussed, but also includes the execution of functions in a substantially simultaneous manner or in a reverse order according to the functions involved, for example, the described method can be executed in a different order from the described order, and various steps can also be added, omitted or combined. In addition, the features described with reference to certain examples can be combined in other examples.
[0528] From the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment method can be realized by means of computer software product and general hardware platform, of course, it can also be realized by hardware. The computer software product is stored in a storage medium (such as ROM, RAM, magnetic disc, optical disc, etc.), including a plurality of instructions, used to make the terminal or network side device execute the method described in each embodiment of the present application.
[0529] The embodiments of the present application are described above with reference to the accompanying drawings, but the present application is not limited to the above-described specific embodiments, and the above-described specific embodiments are merely illustrative, but not restrictive, and a person of ordinary skill in the art can make many forms of embodiments under the inspiration of the present application without departing from the purpose of the present application and the scope protected by the claims, and these embodiments all belong to the protection of the present application.
Claims
1. An encoding method, comprising: The encoding end encodes multiple sub-grids of the 3D mesh to obtain the first bitstream; The encoding end decodes the first bitstream to obtain multiple reconstructed subgrids; The encoding end obtains target merging information based on the plurality of reconstructed sub-mesh and the 3D mesh, wherein the target merging information includes at least one of sub-mesh-related merging information and vertex-related merging information in the plurality of reconstructed sub-mesh; The encoding end encodes the target merging information to obtain the second bitstream; The encoding end generates the target bitstream based on the first bitstream and the second bitstream.
2. The method according to claim 1, wherein, The sub-mesh related merging information is used to indicate the target sub-mesh and / or the merged sub-mesh that is merged with the target sub-mesh in the plurality of reconstructed sub-mesh, wherein the target sub-mesh is the sub-mesh that needs to be merged in the plurality of reconstructed sub-mesh.
3. The method according to claim 1 or 2, wherein, The sub-grid related merging information includes at least one of the following: The first indication information corresponding to each of the plurality of reconstructed subgrids is used to indicate whether the reconstructed subgrid is a target subgrid, and the target subgrid is a reconstructed subgrid that needs to be merged; The second indication information corresponding to the target sub-grid is used to indicate the merged sub-grid that needs to be merged with the target sub-grid.
4. The method according to any one of claims 1-3, wherein, The vertex-related merging information is used to indicate the target vertices that need to be merged in the reconstructed submesh and / or the merging vertices corresponding to the target vertices.
5. The method according to any one of claims 1-4, wherein, The vertex-related merging information includes at least one of the following: Reconstruct the number of boundary vertices in the submesh; The first identifier corresponding to the boundary vertex in the reconstructed submesh is used to identify whether the boundary vertex is a first type of vertex in the three-dimensional mesh, where the first type of vertex is a vertex in the three-dimensional mesh that has been divided into at least two submesh. The size of the encoded sequence in bytes obtained by encoding the first identifier corresponding to the boundary vertex; The number of first-class vertices in the reconstructed submesh, wherein the first-class vertices are the vertices in the 3D mesh that are divided into at least two submesh; The second identifier corresponding to the first type of vertex in the reconstructed submesh is used to identify whether the first type of vertex is a second type of vertex in the 3D mesh, wherein the second type of vertex is at least two vertices in the 3D mesh that have the same vertex information but different vertex indices; The size of the encoded sequence in bytes obtained by encoding the second identifier corresponding to the first type of vertex; The target vertex index corresponding to a specific vertex in the reconstructed submesh is used to indicate the vertex index corresponding to the merged vertex that is merged with the specific vertex in the merged mesh. The specific vertex is a first type of vertex in the 3D mesh and the specific vertex is a second type of vertex in the 3D mesh. The number of specific vertices in the reconstructed submesh, wherein the specific vertices are first-class vertices in the 3D mesh and second-class vertices in the 3D mesh.
6. The method according to any one of claims 1-5, wherein, The target merging information includes vertex-related merging information corresponding to at least one reconstructed submesh, wherein the at least one reconstructed submesh includes reconstructed submesh other than the first reconstructed submesh among the plurality of reconstructed submesh, and the first reconstructed submesh is a submesh that serves as the initial merging mesh; or, the at least one reconstructed submesh includes reconstructed submesh that needs to be merged among the plurality of reconstructed submesh.
7. The method according to any one of claims 1-6, wherein, The encoding end obtains target merging information based on the multiple reconstructed sub-mesh and the 3D mesh, including: Based on the three-dimensional mesh, a first mapping relationship corresponding to the three-dimensional mesh is obtained. The first mapping relationship is used to describe the mapping relationship related to vertices and / or triangles in the three-dimensional mesh. Based on the first mapping relationship and the plurality of reconstructed sub-mesh, a second mapping relationship is obtained for each of the plurality of reconstructed sub-mesh, the second mapping relationship being used to indicate the mapping relationship between the reconstructed sub-mesh and the vertices in the 3D mesh; The target merging information is obtained based on the first mapping relationship, the plurality of reconstructed sub-grids, and the second mapping relationship corresponding to each reconstructed sub-grid.
8. The method according to claim 7, wherein, The first mapping relationship includes at least one of the following: The mapping relationship between vertex information and vertex indexes in the three-dimensional mesh; The mapping relationship between the vertex information of the three vertices of the triangle in the three-dimensional mesh and the triangle index; The mapping relationship between the triangle indices and the vertex indices of the triangles in the 3D mesh.
9. The method according to claim 7 or 8, wherein, The second mapping relationship includes the mapping relationship between the vertex indices in the reconstructed sub-mesh and the vertex indices in the 3D mesh.
10. The method according to any one of claims 7-9, wherein, The step of obtaining the first mapping relationship corresponding to the three-dimensional mesh based on the three-dimensional mesh includes at least one of the following: Traverse all vertices in the 3D mesh and construct a mapping relationship between vertex information and vertex indices in the 3D mesh; Traverse the triangles in the 3D mesh, obtain the vertex information of the three vertices of the triangle and the triangle index corresponding to the vertex information of the three vertices, and construct the mapping relationship between the vertex information and the triangle index in the 3D mesh and the mapping relationship between the triangle index and the vertex index of the triangle in the 3D mesh based on the vertex information of the three vertices and the triangle index corresponding to the vertex information of the triangle.
11. The method according to any one of claims 7-10, wherein, The step of obtaining a second mapping relationship corresponding to each of the plurality of reconstructed sub-grids based on the first mapping relationship and the plurality of reconstructed sub-grids includes: Traverse each of the multiple reconstructed subgrids; For the current reconstructed submesh, traverse the triangles in the current reconstructed submesh, and obtain the vertex indices of the three vertices of the triangle and the vertex information of the three vertices of the triangle; Based on the vertex indices and vertex information of the three vertices of the triangle, determine the order of the vertex indices of the three vertices in the triangle. Based on the vertex information of the three vertices of the triangle, the arrangement order of the vertex indices of the three vertices of the triangle in the triangle, and the mapping relationship between the vertex information and triangle index of the three vertices of the triangle in the first mapping relationship, the triangle index corresponding to the target triangle matched by the triangle in the three-dimensional mesh is determined. Based on the mapping relationship between the triangle index corresponding to the target triangle, the triangle index in the first mapping relationship, and the vertex index of the triangle, as well as the mapping relationship between the vertex information of the three vertices of the triangle in the first mapping relationship and the vertex index of the triangle, the vertex indexes of the three vertices of the target triangle and the arrangement order of the vertex indexes of the three vertices of the target triangle in the target triangle are obtained. Based on the vertex indices of the three vertices of the triangle, the order of the vertex indices of the three vertices of the triangle in the triangle, the vertex indices of the three vertices of the target triangle, and the order of the vertex indices of the three vertices of the target triangle in the target triangle, a mapping relationship is constructed between the vertex indices in the current reconstructed sub-mesh and the vertex indices in the 3D mesh.
12. The method according to any one of claims 7-11, wherein, The step of obtaining the target merging information based on the first mapping relationship, the plurality of reconstructed sub-grids, and the second mapping relationship corresponding to each reconstructed sub-grid includes at least one of the following: Select the first reconstructed subgrid as the current merged grid from the plurality of reconstructed subgrids; Construct a third mapping relationship corresponding to the current merged mesh, wherein the third mapping relationship is used to indicate the mapping relationship between vertex information and vertex index in the current merged mesh; Based on the second mapping relationship corresponding to the first reconstructed sub-mesh, a fourth mapping relationship is constructed for the current merged mesh. The fourth mapping relationship is used to indicate the mapping relationship between the vertex indices in the current merged mesh and the vertex indices in the 3D mesh. Traverse the reconstructed sub-mesh except the first reconstructed sub-mesh among the plurality of reconstructed sub-mesh, and determine at least one of the first type of vertex and the second type of vertex in the reconstructed sub-mesh according to the first mapping relationship, the second mapping relationship corresponding to the reconstructed sub-mesh, the third mapping relationship corresponding to the currently merged mesh and the fourth mapping relationship; The target merging information is obtained based on at least one of the first type of vertices and the second type of vertices in the reconstructed submesh.
13. The method according to claim 12, wherein, The step of determining at least one of the first type of vertices and the second type of vertices in the reconstructed sub-mesh based on the first mapping relationship, the second mapping relationship corresponding to the reconstructed sub-mesh, the third mapping relationship corresponding to the currently merged mesh, and the fourth mapping relationship includes at least one of the following: Traverse all vertices in the reconstructed sub-mesh, and determine whether the current vertex exists in the current merged mesh based on the third mapping relationship corresponding to the current merged mesh; If the current vertex is not in the current merged mesh, it is determined that the current vertex is not the first type of vertex, and the current vertex is determined as a vertex to be added; or If the current vertex is in the current merged mesh, determine whether the current vertex is a second type vertex based on the mapping relationship between the vertex information and vertex index in the first mapping relationship; If the current vertex is not a second type vertex, the first identifier of the current vertex is set to identify that the current vertex is a first type vertex, the second identifier of the current vertex is set to identify that the vertex is not a second type vertex, and the vertex index of the current vertex in the triangle is updated to the vertex index corresponding to the merged vertex in the current merged mesh, wherein the vertex information of the merged vertex and the current vertex is the same; If the current vertex is a second type vertex, determine whether the current vertex is a first type vertex based on the second mapping relationship corresponding to the reconstructed sub-mesh, the third mapping relationship corresponding to the current merged mesh, and the fourth mapping relationship. If the current vertex is not a first type of vertex, the first identifier of the current vertex is set to identify that the current vertex is not a first type of vertex, and the current vertex is determined as a vertex to be added; If the current vertex is a first-type vertex, the first identifier of the current vertex is set to identify that the current vertex is a first-type vertex, the second identifier of the current vertex is set to identify that the current vertex is a second-type vertex, the vertex index of the current vertex in the triangle is updated to the vertex index corresponding to the merged vertex in the current merged mesh, and the vertex index corresponding to the merged vertex is used as the target vertex index corresponding to the current vertex. The vertex information of the merged vertex and the current vertex are the same, and the vertex index corresponding to the merged vertex and the current vertex in the 3D mesh are the same. After traversing all vertices in the reconstructed sub-mesh, all the vertices to be added are added to the current merged mesh, the vertex indices of the vertices to be added in the current merged mesh are updated, and the third and fourth mapping relationships corresponding to the current merged mesh are updated.
14. The method according to claim 13, wherein, Determining whether the current vertex is a second type vertex based on the mapping relationship between vertex information and vertex index in the first mapping relationship includes: Based on the vertex information of the current vertex and the first mapping relationship, determine whether there are at least two vertices in the 3D mesh whose vertex information is the same as that of the current vertex, but whose corresponding vertex indices are different; If there are at least two vertices whose vertex information is the same as that of the current vertex but whose corresponding vertex indices are different, then the current vertex is determined to be a vertex of the second type.
15. The method according to claim 13 or 14, wherein, The step of determining whether the current vertex is a first-type vertex based on the second mapping relationship corresponding to the reconstructed sub-mesh and the third and fourth mapping relationships corresponding to the currently merged mesh includes: Based on the second mapping relationship corresponding to the reconstructed sub-mesh, the third mapping relationship corresponding to the current merged mesh, and the fourth mapping relationship, it is determined whether there exists at least one vertex in the current merged mesh whose vertex information is the same as the vertex information of the current vertex, and the vertex index corresponding to the at least one vertex in the 3D mesh is the same as the vertex index corresponding to the current vertex in the 3D mesh; If it exists, determine that the current vertex is a first-type vertex; or, if it does not exist, determine that the current vertex is not a first-type vertex.
16. The method according to any one of claims 12-15, wherein, The method further includes: Based on the first type of vertices in the reconstructed sub-mesh, determine whether the triangles in the reconstructed sub-mesh are triangles to be added or first type triangles, where the first type triangles are triangles in the 3D mesh that have been split into at least two sub-meshes; The triangle to be added is added to the current merged mesh, or the first type of triangle is not added to the current merged mesh.
17. The method according to claim 16, wherein, The step of determining whether a triangle in the reconstructed sub-mesh is a triangle to be added or a first-type triangle based on the first-type vertices in the reconstructed sub-mesh includes: Based on whether the three vertices of the triangle in the reconstructed sub-mesh are first-type vertices and whether the triangle containing the three vertices exists in the current merged mesh, it is determined whether the triangle is a triangle to be added or a first-type triangle; Wherein, if all three vertices of the triangle are of the first type, and the triangle containing the three vertices exists in the current merged mesh, then the triangle is determined to be a first type triangle; or If any of the three vertices of the triangle is not a first-type vertex, or if the triangle containing the three vertices does not exist in the current merged mesh, then the triangle is determined to be the triangle to be added.
18. A decoding method, comprising: The decoding end acquires the target bitstream corresponding to the three-dimensional grid, wherein the three-dimensional grid includes multiple sub-grids; The decoding end decodes the target bitstream to obtain multiple reconstructed subgrids and target merging information, wherein the target merging information includes at least one of subgrid-related merging information and vertex-related merging information in the multiple reconstructed subgrids; The decoding end performs merging processing on the multiple reconstructed sub-grids according to the target merging information.
19. The method according to claim 18, wherein, The sub-mesh related merging information is used to indicate the target sub-mesh and / or the merged sub-mesh that is merged with the target sub-mesh in the plurality of reconstructed sub-mesh, wherein the target sub-mesh is the sub-mesh that needs to be merged in the plurality of reconstructed sub-mesh.
20. The method according to claim 18 or 19, wherein, The sub-grid related merging information includes at least one of the following: The first indication information corresponding to each of the plurality of reconstructed subgrids is used to indicate whether the reconstructed subgrid is a target subgrid, and the target subgrid is a reconstructed subgrid that needs to be merged; The second indication information corresponding to the target sub-grid is used to indicate the merged sub-grid that needs to be merged with the target sub-grid.
21. The method according to any one of claims 18-20, wherein, The vertex-related merging information is used to indicate the target vertices that need to be merged in the reconstructed submesh and / or the merging vertices corresponding to the target vertices.
22. The method according to any one of claims 18-21, wherein, The vertex-related merging information includes at least one of the following: Reconstruct the number of boundary vertices in the submesh; The first identifier corresponding to the boundary vertex in the reconstructed submesh is used to identify whether the boundary vertex is a first type of vertex in the three-dimensional mesh, where the first type of vertex is a vertex in the three-dimensional mesh that has been divided into at least two submesh. Reconstruct the number of first-class vertices in the submesh; The size of the encoded sequence in bytes obtained by encoding the first identifier corresponding to the boundary vertex; The second identifier corresponding to the first type of vertex in the reconstructed submesh is used to identify whether the first type of vertex is a second type of vertex in the 3D mesh, wherein the second type of vertex is at least two vertices in the 3D mesh that have the same vertex information but different vertex indices; The size of the encoded sequence in bytes obtained by encoding the second identifier corresponding to the first type of vertex; The target vertex index corresponding to a specific vertex in the reconstructed submesh is used to indicate the vertex index corresponding to the merged vertex that is merged with the specific vertex in the merged mesh. The specific vertex is a first type of vertex in the 3D mesh and the specific vertex is a second type of vertex in the 3D mesh. The number of specific vertices in the reconstructed submesh, wherein the specific vertices are first-class vertices in the 3D mesh and second-class vertices in the 3D mesh.
23. The method according to any one of claims 18-22, wherein, The target merging information includes vertex-related merging information corresponding to at least one reconstructed submesh, wherein the at least one reconstructed submesh includes reconstructed submesh other than the first reconstructed submesh among the plurality of reconstructed submesh, and the first reconstructed submesh is a submesh that serves as the initial merging mesh; or, the at least one reconstructed submesh includes reconstructed submesh that needs to be merged among the plurality of reconstructed submesh.
24. The method according to any one of claims 18-23, wherein, The decoding end performs merging processing on the multiple reconstructed sub-grids according to the target merging information, including at least one of the following: Select the first reconstructed subgrid as the current merged grid from the plurality of reconstructed subgrids; Construct a third mapping relationship corresponding to the current merged mesh, wherein the third mapping relationship is used to indicate the mapping relationship between vertex information and vertex index in the current merged mesh; Traverse the reconstructed sub-mesh of the plurality of reconstructed sub-mesh except for the first reconstructed sub-mesh, and determine at least one of the boundary vertices and non-boundary vertices in the reconstructed sub-mesh according to the third mapping relationship corresponding to the current merged mesh; The non-boundary vertices in the reconstructed sub-mesh are identified as vertices to be added. Based on the target merging information, at least one of the following is determined among the boundary vertices: the vertex to be added, the first type of vertex, and the second type of vertex. The first type of vertex is a vertex in the 3D mesh that is divided into at least two sub-meshes, and the second type of vertex is at least two vertices in the 3D mesh that have the same vertex information but different vertex indices. The reconstructed submesh and the currently merged mesh are merged based on at least one of the vertices to be added, first-class vertices, and second-class vertices in the determined reconstructed submesh.
25. The method according to claim 24, wherein, The step of determining at least one of the following from the boundary vertices: the vertex to be added, the first type of vertex, and the second type of vertex, based on the target merging information: Determine whether the boundary vertex is a first-type vertex based on the first identifier corresponding to the decoded boundary vertex; If the boundary vertex is not a first-type vertex, the boundary vertex is determined as a vertex to be added; If the boundary vertex is a first-type vertex, determine whether the boundary vertex is still a second-type vertex based on the second identifier corresponding to the first-type vertex. If the boundary vertex is not a second type of vertex, the vertices with the same vertex information in the current merged mesh are determined as the merged vertices of the boundary vertex; If the boundary vertex is still a second type of vertex, the boundary vertex is a specific vertex in the reconstructed submesh, and the merging vertex to be merged with the boundary vertex is determined according to the target vertex index corresponding to the specific vertex.
26. The method according to claim 24 or 25, wherein, The step of merging the reconstructed sub-mesh and the current merged mesh based on at least one of the vertices to be added, first-type vertices, and second-type vertices in the determined reconstructed sub-mesh includes at least one of the following: Add the vertex to be added to the current merged mesh, and update the vertex index corresponding to the vertex to be added in the current merged mesh; The first boundary vertex in the reconstructed sub-mesh and the first merged vertex in the current merged mesh are merged, and the vertex index of the first boundary vertex in the triangle is updated to the vertex index of the first merged vertex in the current merged mesh. The first merged vertex and the first boundary vertex correspond to the same vertex information. The first boundary vertex is a boundary vertex in the reconstructed sub-mesh that is a first type of vertex but not a second type of vertex. The second boundary vertex in the reconstructed submesh is merged with the second merged vertex, and the vertex index of the second boundary vertex in the triangle is updated to the vertex index of the second merged vertex in the current merged mesh, wherein the second merged vertex is the vertex indicated by the target vertex index corresponding to the second boundary vertex, and the second boundary vertex is a boundary vertex in the reconstructed submesh that is a first type vertex and a second type vertex.
27. The method according to any one of claims 24-26, wherein, The method further includes: Based on the first type of vertices in the reconstructed sub-mesh, determine whether the triangles in the reconstructed sub-mesh are triangles to be added or first type triangles, where the first type triangles are triangles in the 3D mesh that have been split into at least two sub-meshes; The triangle to be added is added to the current merged mesh, or the first type of triangle is not added to the current merged mesh.
28. The method according to claim 27, wherein, The step of determining whether a triangle in the reconstructed sub-mesh is a triangle to be added or a first-type triangle based on the first-type vertices in the reconstructed sub-mesh includes: Based on whether the three vertices of the triangle in the reconstructed sub-mesh are first-type vertices and whether the triangle containing the three vertices exists in the current merged mesh, it is determined whether the triangle is a triangle to be added or a first-type triangle; Wherein, if all three vertices of the triangle are of the first type, and the triangle containing the three vertices exists in the current merged mesh, then the triangle is determined to be a first type triangle; or If any of the three vertices of the triangle is not a first-type vertex, or if the triangle containing the three vertices does not exist in the current merged mesh, then the triangle is determined to be the triangle to be added.
29. An encoding device, comprising: The first encoding module is used to encode multiple sub-grids of the 3D mesh to obtain the first bitstream; The decoding module is used to decode the first bitstream and obtain multiple reconstructed subgrids; The acquisition module is used to acquire target merging information based on the plurality of reconstructed sub-mesh and the 3D mesh, wherein the target merging information includes at least one of sub-mesh-related merging information and vertex-related merging information in the plurality of reconstructed sub-mesh; The second encoding module is used to encode the target merging information to obtain the second bitstream; The generation module is used to generate a target bitstream based on the first bitstream and the second bitstream.
30. The apparatus according to claim 29, wherein, The sub-mesh related merging information is used to indicate the target sub-mesh and / or the merged sub-mesh that is merged with the target sub-mesh in the plurality of reconstructed sub-mesh, wherein the target sub-mesh is the sub-mesh that needs to be merged in the plurality of reconstructed sub-mesh.
31. The apparatus according to claim 29 or 30, wherein, The sub-grid related merging information includes at least one of the following: The first indication information corresponding to each of the plurality of reconstructed subgrids is used to indicate whether the reconstructed subgrid is a target subgrid, and the target subgrid is a reconstructed subgrid that needs to be merged; The second indication information corresponding to the target sub-grid is used to indicate the merged sub-grid that needs to be merged with the target sub-grid.
32. The apparatus according to any one of claims 29-31, wherein, The vertex-related merging information is used to indicate the target vertices that need to be merged in the reconstructed submesh and / or the merging vertices corresponding to the target vertices.
33. The apparatus according to any one of claims 29-32, wherein, The vertex-related merging information includes at least one of the following: Reconstruct the number of boundary vertices in the submesh; The first identifier corresponding to the boundary vertex in the reconstructed submesh is used to identify whether the boundary vertex is a first type of vertex in the three-dimensional mesh, where the first type of vertex is a vertex in the three-dimensional mesh that has been divided into at least two submesh. Reconstruct the number of first-class vertices in the submesh; The size of the encoded sequence in bytes obtained by encoding the first identifier corresponding to the boundary vertex; The second identifier corresponding to the first type of vertex in the reconstructed submesh is used to identify whether the first type of vertex is a second type of vertex in the 3D mesh, wherein the second type of vertex is at least two vertices in the 3D mesh that have the same vertex information but different vertex indices; The size of the encoded sequence in bytes obtained by encoding the second identifier corresponding to the first type of vertex; The target vertex index corresponding to a specific vertex in the reconstructed submesh is used to indicate the vertex index corresponding to the merged vertex that is merged with the specific vertex in the merged mesh. The specific vertex is a first type of vertex in the 3D mesh and the specific vertex is a second type of vertex in the 3D mesh. The number of specific vertices in the reconstructed submesh, wherein the specific vertices are first-class vertices in the 3D mesh and second-class vertices in the 3D mesh.
34. The apparatus according to any one of claims 29-33, wherein, The acquisition module is also used for: Based on the three-dimensional mesh, a first mapping relationship corresponding to the three-dimensional mesh is obtained. The first mapping relationship is used to describe the mapping relationship related to vertices and / or triangles in the three-dimensional mesh. Based on the first mapping relationship and the plurality of reconstructed sub-mesh, a second mapping relationship is obtained for each of the plurality of reconstructed sub-mesh, the second mapping relationship being used to indicate the mapping relationship between the reconstructed sub-mesh and the vertices in the 3D mesh; The target merging information is obtained based on the first mapping relationship, the plurality of reconstructed sub-grids, and the second mapping relationship corresponding to each reconstructed sub-grid.
35. The apparatus according to claim 34, wherein, The acquisition module is also configured to perform at least one of the following: Select the first reconstructed subgrid as the current merged grid from the plurality of reconstructed subgrids; Construct a third mapping relationship corresponding to the current merged mesh, wherein the third mapping relationship is used to indicate the mapping relationship between vertex information and vertex index in the current merged mesh; Based on the second mapping relationship corresponding to the first reconstructed sub-mesh, a fourth mapping relationship is constructed for the current merged mesh. The fourth mapping relationship is used to indicate the mapping relationship between the vertex indices in the current merged mesh and the vertex indices in the 3D mesh. Traverse the reconstructed sub-mesh except the first reconstructed sub-mesh among the plurality of reconstructed sub-mesh, and determine at least one of the first type of vertex and the second type of vertex in the reconstructed sub-mesh according to the first mapping relationship, the second mapping relationship corresponding to the reconstructed sub-mesh, the third mapping relationship corresponding to the currently merged mesh and the fourth mapping relationship; The target merging information is obtained based on at least one of the first type of vertices and the second type of vertices in the reconstructed submesh.
36. A decoding device, comprising: An acquisition module is used to acquire the target bitstream corresponding to a three-dimensional mesh, wherein the three-dimensional mesh includes multiple sub-mesh; The decoding module is used to decode the target bitstream to obtain multiple reconstructed subgrids and target merging information, wherein the target merging information includes at least one of subgrid-related merging information and vertex-related merging information in the multiple reconstructed subgrids; The merging processing module is used to merge the multiple reconstructed sub-grids according to the target merging information.
37. The apparatus according to claim 36, wherein, The sub-mesh related merging information is used to indicate the target sub-mesh and / or the merged sub-mesh that is merged with the target sub-mesh in the plurality of reconstructed sub-mesh, wherein the target sub-mesh is the sub-mesh that needs to be merged in the plurality of reconstructed sub-mesh.
38. The apparatus according to claim 36 or 37, wherein, The sub-grid related merging information includes at least one of the following: The first indication information corresponding to each of the plurality of reconstructed subgrids is used to indicate whether the reconstructed subgrid is a target subgrid, and the target subgrid is a reconstructed subgrid that needs to be merged; The second indication information corresponding to the target sub-grid is used to indicate the merged sub-grid that needs to be merged with the target sub-grid.
39. The apparatus according to any one of claims 36-38, wherein, The vertex-related merging information is used to indicate the target vertices that need to be merged in the reconstructed submesh and / or the merging vertices corresponding to the target vertices.
40. The apparatus according to any one of claims 36-39, wherein, The vertex-related merging information includes at least one of the following: Reconstruct the number of boundary vertices in the submesh; The first identifier corresponding to the boundary vertex in the reconstructed submesh is used to identify whether the boundary vertex is a first type of vertex in the three-dimensional mesh, where the first type of vertex is a vertex in the three-dimensional mesh that has been divided into at least two submesh. Reconstruct the number of first-class vertices in the submesh; The size of the encoded sequence in bytes obtained by encoding the first identifier corresponding to the boundary vertex; The second identifier corresponding to the first type of vertex in the reconstructed submesh is used to identify whether the first type of vertex is a second type of vertex in the 3D mesh, wherein the second type of vertex is at least two vertices in the 3D mesh that have the same vertex information but different vertex indices; The size of the encoded sequence in bytes obtained by encoding the second identifier corresponding to the first type of vertex; The target vertex index corresponding to a specific vertex in the reconstructed submesh is used to indicate the vertex index corresponding to the merged vertex that is merged with the specific vertex in the merged mesh. The specific vertex is a first type of vertex in the 3D mesh and the specific vertex is a second type of vertex in the 3D mesh. The number of specific vertices in the reconstructed submesh, wherein the specific vertices are first-class vertices in the 3D mesh and second-class vertices in the 3D mesh.
41. The apparatus according to any one of claims 36-40, wherein, The merging processing module is also configured to perform at least one of the following: Select the first reconstructed subgrid as the current merged grid from the plurality of reconstructed subgrids; Construct a third mapping relationship corresponding to the current merged mesh, wherein the third mapping relationship is used to indicate the mapping relationship between vertex information and vertex index in the current merged mesh; Traverse the reconstructed sub-mesh of the plurality of reconstructed sub-mesh except for the first reconstructed sub-mesh, and determine at least one of the boundary vertices and non-boundary vertices in the reconstructed sub-mesh according to the third mapping relationship corresponding to the current merged mesh; The non-boundary vertices in the reconstructed sub-mesh are identified as vertices to be added. Based on the target merging information, at least one of the following is determined among the boundary vertices: the vertex to be added, the first type of vertex, and the second type of vertex. The first type of vertex is a vertex in the 3D mesh that is divided into at least two sub-meshes, and the second type of vertex is at least two vertices in the 3D mesh that have the same vertex information but different vertex indices. The reconstructed submesh and the current merged mesh are merged based on at least one of the vertices to be added, the first type of vertices, and the second type of vertices in the determined reconstructed submesh.
42. An electronic device comprising a processor and a memory, the memory storing a program or instructions executable on the processor, the program or instructions, when executed by the processor, implementing the steps of the encoding method as claimed in any one of claims 1 to 17, or implementing the steps of the decoding method as claimed in claims 18 to 28.
43. A readable storage medium storing a program or instructions that, when executed by a processor, implement the steps of the encoding method as claimed in any one of claims 1 to 17, or the steps of the decoding method as claimed in claims 18 to 28.
44. A chip comprising a processor and a communication interface coupled to the processor, the processor being configured to run a program or instructions to implement the steps of the encoding method as described in any one of claims 1 to 17, or the steps of the decoding method as described in claims 18 to 28.
Citation Information
Patent Citations
Lossless coding method, lossless decoding method, apparatus and device
CN117333633A
Lossless coding method, lossless decoding method, apparatus and device
CN117372648A
Repeating vertex merging in mesh compression
CN118202386A
Easily fixed compass
KR1020250054014A
Methods and apparatus for extended merge mode with adaptive grid size in video coding
WO2019236291A1