WO2025002017A1 - 三维网格编码方法、三维网格解码方法、装置及设备 - Google Patents
三维网格编码方法、三维网格解码方法、装置及设备 Download PDFInfo
- Publication number
- WO2025002017A1 WO2025002017A1 PCT/CN2024/100833 CN2024100833W WO2025002017A1 WO 2025002017 A1 WO2025002017 A1 WO 2025002017A1 CN 2024100833 W CN2024100833 W CN 2024100833W WO 2025002017 A1 WO2025002017 A1 WO 2025002017A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- color space
- space format
- format
- texture
- mesh
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T17/00—Three-dimensional [3D] modelling for computer graphics
- G06T17/20—Finite element generation, e.g. wire-frame surface description, tesselation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T9/00—Image coding
Definitions
- the present application belongs to the field of coding and decoding technology, and specifically relates to a three-dimensional grid coding method, a three-dimensional grid decoding method, a device and equipment.
- 3D models have become a new generation of digital media after audio, images, and videos.
- 3D mesh and point cloud are two commonly used ways to represent 3D models.
- 3D mesh models Compared with traditional multimedia such as images and videos, 3D mesh models have stronger interactivity and realism, and are widely used.
- the texture map in a blue-green-red (BGR) 444 format is directly encoded, which has poor flexibility in encoding the texture map of the three-dimensional mesh.
- the embodiments of the present application provide a three-dimensional mesh encoding method, a three-dimensional mesh decoding method, an apparatus and a device, which can solve the problem of poor flexibility in encoding the texture map of the three-dimensional mesh.
- a three-dimensional grid encoding method which is performed by an encoding end and includes:
- the texture image in the second color space format is encoded to obtain a first texture image code stream.
- a three-dimensional mesh decoding method which is executed by a decoding end and includes:
- a mesh reconstruction process is performed based on the texture map in the first color space format to obtain a reconstructed three-dimensional mesh.
- a three-dimensional grid encoding device comprising:
- a conversion module used for performing color space format conversion on a texture image of a three-dimensional grid in a first color space format to obtain a texture image in a second color space format;
- the first encoding module is used to encode the texture image in the second color space format to obtain a first texture image code stream.
- a three-dimensional grid decoding device comprising:
- a first decoding module is used to decode a first texture image bitstream in a bitstream corresponding to the three-dimensional grid to obtain a texture image in a second color space format
- a conversion module used for performing color space format conversion on the texture image in the second color space format to obtain the texture image in the first color space format
- a reconstruction module is used to perform mesh reconstruction processing based on the texture map in the first color space format to obtain a reconstructed three-dimensional mesh.
- an electronic device which terminal includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect; or, the program or instruction, when executed by the processor, implements the steps of the method described in the second aspect.
- an electronic device comprising a processor and a communication interface, wherein the processor is used to: convert a texture image in a first color space format of a three-dimensional grid to obtain a texture image in a second color space format; and encode the texture image in the second color space format to obtain a first texture image code stream.
- an electronic device comprising a processor and a communication interface, wherein the processor is used to: decode a first texture map code stream in a code stream corresponding to a three-dimensional mesh to obtain a texture map in a second color space format; perform color space format conversion on the texture map in the second color space format to obtain a texture map in a first color space format; perform mesh reconstruction based on the texture map in the first color space format to obtain a reconstructed three-dimensional mesh.
- a readable storage medium on which a program or instruction is stored.
- the steps of the three-dimensional mesh encoding method as described in the first aspect are implemented; or, when the program or instruction is executed by a processor, the steps of the three-dimensional mesh decoding method as described in the second aspect are implemented.
- a chip comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instructions to implement the steps of the method described in the first aspect, or to implement the steps of the method described in the second aspect.
- a computer program/program product is provided, wherein the computer program/program product is stored in a non-volatile storage medium, and the program/program product is executed by at least one processor to implement the steps of the method described in the first aspect, or to implement the steps of the method described in the second aspect.
- a texture map in a first color space format of a three-dimensional mesh is converted into a color space format to obtain a texture map in a second color space format; and the texture map in the second color space format is encoded to obtain a first texture map code stream.
- FIG1 is a schematic diagram of five modes of Edgebreaker in the related art
- FIG2 is a schematic diagram of a vertex traversal process and an operation mode string in Edgebreaker in the related art
- FIG3 is a flow chart of a three-dimensional grid coding method provided in an embodiment of the present application.
- FIG4 is a flow chart of a three-dimensional grid decoding method provided in an embodiment of the present application.
- FIG5 is a schematic diagram of a three-dimensional grid coding framework provided in an embodiment of the present application.
- FIG6 is a schematic diagram of a three-dimensional grid decoding framework provided in an embodiment of the present application.
- FIG7 is a schematic diagram of a manifold grid provided in an embodiment of the present application.
- FIG8 is a schematic diagram of a Corner relationship provided in an embodiment of the present application.
- FIG9 is a schematic diagram of a grid traversal provided in an embodiment of the present application.
- FIG10 is a schematic diagram of a three-dimensional grid provided in an embodiment of the present application.
- FIG11 is a schematic diagram of UV coordinate prediction based on three-dimensional to two-dimensional projection provided by an embodiment of the present application.
- FIG12 is a schematic diagram of the structure of a three-dimensional grid encoding device provided in an embodiment of the present application.
- FIG13 is a schematic diagram of the structure of a three-dimensional grid decoding device provided in an embodiment of the present application.
- FIG14 is a schematic diagram of the structure of a communication device provided in an embodiment of the present application.
- FIG. 15 is a schematic diagram of the structure of a terminal provided in an embodiment of the present application.
- first, second, etc. of 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 are interchangeable where appropriate, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by “first” and “second” are generally of one type, and the number of objects is not limited, for example, the first object can be one or more.
- “or” in the present application represents at least one of the connected objects.
- “A or B” covers three schemes, namely, Scheme 1: including A but not including B; Scheme 2: including B but not including A; Scheme 3: including both A and B.
- the character "/" generally indicates that the objects associated with each other are in an "or” relationship.
- indication in this application can be a direct indication (or explicit indication) or an indirect indication (or implicit indication).
- a direct indication can be understood as the sender explicitly informing the receiver of specific information, operations to be performed, or request results in the sent indication;
- an indirect indication can be understood as the receiver determining the corresponding information according to the indication sent by the sender, or making a judgment and determining the operation to be performed or the request result according to the judgment result.
- the encoding and decoding end corresponding to the encoding and decoding method in the embodiment of the present application can be a terminal, which can also be called a terminal device or a user terminal (User Equipment, UE).
- the terminal can be a mobile phone, a tablet computer (Tablet Personal Computer), a laptop computer (Laptop Computer) or a notebook computer, a personal digital assistant (Personal Digital Assistant, PDA), a palm computer, a netbook, an ultra-mobile personal computer (ultra-mobile personal computer, Terminal side devices include computer, UMPC, mobile Internet device (MID), augmented reality (AR)/virtual reality (VR) equipment, robot, wearable device (Wearable Device) or vehicle-mounted equipment (Vehicle User Equipment, VUE), pedestrian terminal (Pedestrian User Equipment, PUE) and other terminal side devices, wearable devices include: smart watches, bracelets, headphones, glasses, etc. It should be noted that the specific type of the terminal is not limited in the embodiments of the present application.
- Three-dimensional models have become a new generation of digital media after audio, images, and videos.
- Three-dimensional grids and point clouds are two commonly used ways to represent three-dimensional models.
- three-dimensional grid models Compared with traditional multimedia such as images and videos, three-dimensional grid models have stronger interactivity and realism, making them more and more widely used in various fields such as commerce, manufacturing, construction, education, medicine, entertainment, art, and military.
- a 3D mesh often contains three main types of information: topological information, geometric information, and attribute information.
- Topological information also known as connectivity information, is used to describe the connection between elements such as vertices and facets in the mesh; geometric information is the 3D coordinates of all vertices in the mesh; attribute information records other information attached to the mesh, such as normal vectors, texture coordinates, and colors.
- the compression of 3D mesh data is often based on the compression of these three types of information according to their data characteristics.
- the texture maps need to be compressed.
- Draco is a library for compressing and decompressing three-dimensional (3D) geometric meshes and point clouds. It aims to improve the storage and transmission of 3D graphics and greatly accelerate the encoding, transmission and decoding of 3D data. Draco supports the compression of 3D mesh geometry information, connection information and attribute information. Draco supports lossy mode and near-lossless mode. In addition, the Edgebreaker method used by Draco to encode connection relationships is currently one of the most efficient methods for encoding 3D mesh connection information.
- Edgebreaker requires the mesh to be encoded to be a manifold structure.
- Draco must split them into manifold structures to encode them correctly.
- Draco does not merge the split structures at the decoding end, which makes the mesh output by the decoding end have more split points than the original mesh input by the encoding end. This will cause Draco to be unable to losslessly encode such meshes with non-manifold structures.
- the Moving Picture Expert Group (MPEG), an international standards organization in the video image field, is developing a new dynamic 3D mesh compression standard, Video-based dynamic mesh coding (V-DMC or VDMC).
- V-DMC Video-based dynamic mesh coding
- MPEG is also trying to implement the Edgebreaker-based 3D mesh codec provided by MPEG to achieve compression of 3D mesh geometry information, connection information, and attribute information. Since Edgebreaker requires the mesh to be encoded to be a manifold structure, there will be problems in the currently proposed solution.
- the 3D mesh of non-manifold structure is split into manifold structure and then encoded.
- the 3D mesh codec based on Edgebreaker provided by MPEG will record and encode the duplicate point information generated by splitting the non-manifold, and add an identifier to each vertex of the split manifold mesh to determine whether it is a duplicate point generated by splitting the non-manifold, so as to restore the non-manifold structure of the original 3D mesh at the decoding end based on the identifier and the duplicate point information generated by splitting the non-manifold to achieve lossless encoding of the 3D mesh.
- the Edgebreaker-based 3D mesh compression tool currently provided by MPEG encodes and stores the connection information, geometric information and attribute information (e.g., UV coordinates) of the 3D mesh separately.
- UV coordinates are two-dimensional coordinates, with U in the horizontal direction and V in the vertical direction.
- the core module i.e., the module for encoding the connection information, uses the Edgebreaker algorithm.
- the encoding of the geometric information and UV coordinates adopts conventional compression methods, i.e., quantization, predictive compression (e.g., parallelogram prediction) and entropy coding of the data.
- the encoding of the geometric information and UV coordinates will follow the encoding order of the connection information.
- the vertex order of the connection relationship encoding is implicitly included in the vertex order of the geometric information to avoid the separate transmission of the vertex order of the connection relationship encoding, thereby saving this part of the bit overhead.
- the Edgebreaker (EB) method is a 3D mesh connection relationship encoding method with good compression performance, easy implementation, and the ability to provide an upper limit for compression ratio.
- the Edgebreaker method itself only describes the compression method for 3D mesh connection information, and the compression of 3D meshes can only be achieved through geometric information compression and entropy coding.
- Edgebreaker encoding technology can compress triangular meshes that are homeomorphic to the sphere to 2 bits or less per triangle.
- the encoding algorithm uses five different modes (called C, L, E, R, and S) to access each triangle of the mesh in depth-first order. Each triangle is marked according to the mode it is in, and a CLERS string is generated to obtain a compact representation of the mesh connectivity.
- the five modes of the Edgebreaker method are shown in Figure 1.
- the Edgebreaker method divides the mesh into a traversed part and an untraversed part, and the boundary between the two parts is called the active boundary.
- the triangle to be traversed is accessed through the active edge on the active boundary, and the mode to be used is selected according to the relationship between the active edge and the triangle in which it is located.
- the other vertex in the triangle where the active edge is located is called the third vertex. If the third vertex is not on the active boundary, the current triangle is marked as C mode. If the third vertex is on the active boundary and is the next vertex of the current active edge in counterclockwise order, the current triangle is marked as R mode.
- the current triangle is marked as L mode. If the third vertex is on the active boundary and is both the previous vertex of the current active edge vertex and the next vertex of the current active edge in counterclockwise order, the current triangle is marked as E mode. If the third vertex is on the active boundary, but in counterclockwise order, it is neither the previous vertex of the current active edge vertex nor the next vertex of the current active edge, then the current triangle is marked as S mode.
- the active boundary is updated and the next active edge is selected according to certain rules. After traversing all triangles, the obtained CLERS string is entropy encoded to obtain higher compression efficiency.
- Figure 2 shows a schematic diagram of a two-dimensional grid using EB coding.
- the final entropy coded mode codeword is CCRRSLCRSERRELCRRRCRRRE.
- the mesh Since the five modes of the Edgebreaker method cannot process non-manifold meshes, the mesh must be converted into a manifold mesh before using the Edgebreaker method.
- the texture map in the BGR444 format is directly encoded, resulting in low encoding and decoding efficiency of the three-dimensional mesh.
- FIG. 3 is a flow chart of a three-dimensional grid coding method provided in an embodiment of the present application, which can be applied to a coding end. As shown in FIG. 3 , the three-dimensional grid coding method includes the following steps:
- Step 101 Perform color space format conversion on a texture image of a three-dimensional grid in a first color space format to obtain a texture image in a second color space format.
- the first color space format can be the original color space format of the texture map of the three-dimensional grid.
- the first color space format can be an RGB color space format.
- the first color space format can be BGR444, BGR555, RGB555, or RGB 565, etc.; or, the first color space format can be a YUV color space format; or, the first color space format can be a CMY color space format; or, the first color space format can be a CMYK color space format; or, the first color space format can be an HSV color space format; etc., this embodiment does not limit the first color space format.
- RGB refers to red, green, and blue.
- CMY refers to cyan, magenta, and yellow. In YUV, Y represents luminance, and UV represents chrominance and concentration, respectively.
- CMYK refers to cyan, magenta, yellow, and black.
- HSV refers to hue-saturation-value.
- the second color space format may be a color space format after color space format conversion.
- the second color space format and the first color space format are different color space formats.
- the second color space format may be a YUV color space format.
- the second color space format may be YUV444, YUV420, or YUV422, etc.; or, the second color space format may be an RGB color space format; the second color space format may also be an HSV color space format; or the second color space format may also be a CMY color space format; or the second color space format may also be a Lab color space format; etc.
- This embodiment does not limit the second color space format.
- L is brightness
- a and b are two color channels.
- the second color space format and the first color space format are color space formats of different color spaces; or, the second color space format and the first color space format are different formats of the same color space.
- the amount of relevant information of the color space of the texture image in the second color space format can be less than the amount of relevant information of the texture image in the first color space format.
- the texture image in the second color space format is a texture image obtained by removing certain redundant information from the texture image in the first color space format; or, the texture image in the second color space format is a texture image obtained by removing the correlation between color components from the texture image in the first color space format.
- the color space format conversion of the texture image in the first color space format of the three-dimensional grid to obtain the texture image in the second color space format may be a lossless color space format conversion of the texture image in the first color space format of the three-dimensional grid to obtain the texture image in the second color space format.
- Step 102 Encode the texture image in the second color space format to obtain a first texture image code stream.
- a texture map in a first color space format of a three-dimensional mesh is converted into a color space format to obtain a texture map in a second color space format; and the texture map in the second color space format is encoded to obtain a first texture map code stream.
- performing color space format conversion on the texture image of the three-dimensional grid in the first color space format to obtain the texture image in the second color space format includes:
- the texture map of the first color space format of the three-dimensional grid is converted into a color space format to obtain a texture map of the second color space format.
- the encoding end may determine whether to perform color space format conversion on the texture map of the three-dimensional mesh.
- the encoding end may determine whether to perform color space format conversion on the texture map of the three-dimensional mesh based on different encoding requirements. For example, when higher encoding and decoding efficiency is required, it may be determined to perform color space format conversion on the texture map of the three-dimensional mesh.
- the color space format conversion is performed on the texture map of the first color space format of the three-dimensional mesh to obtain the texture map of the second color space format.
- the encoding end can be supported to selectively convert the color space format of the texture map, thereby improving the flexibility of encoding the texture map during the three-dimensional mesh encoding process.
- the method further comprises:
- the texture map in the first color space format is encoded to obtain a second texture map code stream.
- the encoding end may determine whether to perform color space format conversion on the texture map of the three-dimensional mesh.
- the encoding end may determine whether to perform color space format conversion on the texture map of the three-dimensional mesh based on different encoding requirements. For example, in a scenario where the encoding and decoding efficiency is not required, it may be determined not to perform color space format conversion on the texture map of the three-dimensional mesh.
- the texture map in the first color space format is encoded to obtain a second texture map code stream.
- the encoding end can be supported to selectively not perform color space format conversion on the texture map, which can further improve the flexibility of encoding the texture map during the three-dimensional grid encoding process.
- the code stream corresponding to the three-dimensional mesh includes an encoding result of first indication information, where the first indication information is used to indicate whether the encoding end performs color space format conversion on the texture map of the three-dimensional mesh;
- the bitstream corresponding to the three-dimensional mesh also includes the first texture map bitstream
- the bitstream corresponding to the three-dimensional mesh also includes a second texture map bitstream.
- the first indication information instructs the encoder not to perform color space format conversion on the texture image of the three-dimensional mesh; otherwise, the first indication information instructs the encoder to perform color space format conversion on the texture image of the three-dimensional mesh.
- the first indication information when the first indication information indicates that the color space format conversion of the texture map of the three-dimensional mesh is to be performed, the first indication information can also be used to indicate the conversion type of the texture map of the three-dimensional mesh from the first color space format to the second color space format; thereby, the decoding end can determine what type of color space format conversion the encoding end has performed based on the first indication information, so that the decoding end can perform the inverse conversion of the corresponding color space format to restore the original texture map.
- the code stream corresponding to the three-dimensional mesh includes the first texture map code stream or the second texture map code stream, and the code stream corresponding to the three-dimensional mesh also includes the encoding result of the first indication information, and the first indication information is used to indicate whether the encoding end performs color space format conversion on the texture map of the three-dimensional mesh.
- the encoding end is indicated by the first indication information whether to perform color space format conversion on the texture map of the three-dimensional mesh.
- the decoding end can determine whether to perform color space format conversion on the decoded texture map through the first indication information, which facilitates the decoding end to reconstruct the three-dimensional mesh.
- the first indication information when the first indication information indicates to perform color space format conversion on the texture image of the three-dimensional mesh, the first indication information is also used to indicate the conversion type of the texture image of the three-dimensional mesh from the first color space format to the second color space format.
- the first indication information may be used to indicate that the texture map of the three-dimensional grid is converted from the first color space format to the second color space format at the encoding end.
- the first indication information may be a value in a preset list, and different values in the preset list represent different types of conversion of color space formats.
- the first indication information is "0", it indicates that the encoding end does not perform color space format conversion on the texture map of the three-dimensional grid; if the first indication information is "1", it indicates that the texture map of the three-dimensional grid at the encoding end is converted from the BGR444 format of the RGB color space to the YUV444 format of the YUV color space; if the first indication information is "2", it indicates that the texture map of the three-dimensional grid at the encoding end is converted from the BGR444 format of the RGB color space to the RGB444 format of the RGB color space; if the first indication information is "3", it indicates that the texture map of the three-dimensional grid at the encoding end is converted from the BGR444 format of the RGB color space to the YUV420 format of the YUV color space; if the first indication information is "4", it indicates that the texture map of the three-dimensional grid at the encoding end is converted from the BGR444 format of the RGB color space to the YUV color space;
- the first indication information when the first indication information indicates that the color space format conversion of the texture map of the three-dimensional mesh is to be performed, the first indication information is also used to indicate the conversion type of the texture map of the three-dimensional mesh from the first color space format to the second color space format, so that the decoding end can determine what type of color space format conversion the encoding end has performed through the first indication information, so that the decoding end can perform an inverse conversion of the corresponding color space format to restore the original texture map.
- the amount of relevant information about the color space of the texture image in the second color space format is less than that of the first color space format.
- the amount of information about the color space of the texture image in the spatial format is less than that of the first color space format.
- the texture image in the second color space format may be a texture image obtained by removing certain redundant information from the texture image in the first color space format; or, the texture image in the second color space format may be a texture image obtained by removing the correlation between color components from the texture image in the first color space format.
- the texture map in the BGR444 format is directly encoded. Since the decoding efficiency of the decoding end for decoding videos in different color space formats is different, and the decoding end is less efficient in decoding videos in the BGR444 format, the encoding and decoding efficiency of the three-dimensional grid is low.
- the texture map of the three-dimensional grid is converted into a texture map in a color space format with higher encoding and decoding efficiency by performing a color space format conversion on the texture map of the three-dimensional grid, thereby improving the encoding and decoding efficiency of the three-dimensional grid.
- the second color space format and the first color space format are color space formats of different color spaces; or, the second color space format and the first color space format are different color space formats of the same color space.
- the first color space format is an RGB color space format
- the second color space format is a YUV color space format.
- the first color space format is an RGB color space format
- the second color space format is a YUV color space format, so that when encoding the texture map of the three-dimensional mesh, the texture map of the RGB color space is converted into a texture map of the YUV color space for encoding. Since the efficiency of the decoding end in decoding the video of the YUV color space is higher than the efficiency of the decoding end in decoding the video of the RGB color space, the encoding and decoding efficiency of the three-dimensional mesh can be improved through color space format conversion.
- the present application also provides a three-dimensional grid coding method, the method comprising:
- the texture map in the first color space format is encoded to obtain a second texture map code stream.
- the code stream corresponding to the three-dimensional mesh includes the encoding result of the second texture map code stream and first indication information, and the first indication information instructs the encoding end not to perform color space format conversion on the texture map of the three-dimensional mesh.
- FIG. 4 is a flow chart of a three-dimensional grid decoding method provided in an embodiment of the present application, which can be applied to a decoding end device. As shown in FIG. 4 , the three-dimensional grid decoding method includes the following steps:
- Step 201 Decode a first texture image bitstream in a bitstream corresponding to a three-dimensional grid to obtain a texture image in a second color space format;
- Step 202 performing color space format conversion on the texture image in the second color space format to obtain a texture image in the first color space format
- Step 203 Perform mesh reconstruction processing based on the texture map in the first color space format to obtain a reconstructed three-dimensional mesh.
- the method further comprises:
- the decoding process of the first texture image bitstream in the bitstream corresponding to the three-dimensional grid to obtain the texture image in the second color space format includes:
- the first texture map bitstream in the bitstream corresponding to the three-dimensional grid is decoded to obtain the texture map in the second color space format.
- performing color space format conversion on the texture image in the second color space format to obtain the texture image in the first color space format includes:
- the texture image in the second color space format is converted from the second color space format to the first color space format to obtain the texture image in the first color space format.
- the method further comprises:
- a second texture map bitstream in the bitstream corresponding to the three-dimensional grid is decoded to obtain a texture map in the first color space format.
- the amount of relevant information about the color space of the texture image in the second color space format is less than the amount of relevant information about the color space of the texture image in the first color space format.
- the second color space format and the first color space format are color space formats of different color spaces; or, the second color space format and the first color space format are different color space formats of the same color space.
- the first color space format is an RGB color space format
- the second color space format is a YUV color space format.
- this embodiment is an implementation of the decoding side corresponding to the embodiment shown in Figure 3. Its specific implementation can refer to the relevant description of the embodiment shown in Figure 3. In order to avoid repeated description, this embodiment will not be repeated, and the same beneficial effects can be achieved.
- the present application also provides a three-dimensional grid decoding method, the method comprising:
- a mesh reconstruction process is performed based on the texture map in the first color space format to obtain a reconstructed three-dimensional mesh.
- the embodiment of the present application also proposes a three-dimensional mesh texture map lossless encoding and decoding framework and method based on Edgebreaker.
- the encoding framework mainly includes a preprocessing module (including a non-manifold structure splitting module), a connection relationship encoding module, a geometric information encoding module, an attribute information encoding module, a texture map lossless color space format conversion, and a texture map encoding module.
- Edgebreaker can be used to perform lossless encoding on the three-dimensional mesh.
- the process of the encoding end encoding the three-dimensional mesh is as follows:
- the information indicating whether the geometric coordinates and the UV coordinates in the grid have the same connection relationship can be represented by, for example, setting an identifier indicating whether the geometric coordinates and the UV coordinates in the grid have the same connection relationship.
- the representation method is not limited here.
- the representation method of the duplicate point index information generated by splitting the non-manifold structure can be the target vertex index that needs to be merged when restoring the non-manifold, or it can be the duplicate point group index: points with the same index belong to the same duplicate point group, that is, they have the same vertex information, and its representation method is not restricted here.
- Encode information indicating whether the geometric coordinates and UV coordinates have the same connection relationship Use the Edgebreaker method to encode the connection relationship to obtain a CLERS pattern string that can concisely represent the connection relationship. Use entropy coding to compress the pattern string to obtain a sub-code stream of the connection relationship. Use methods such as parallelogram prediction to encode the geometric information of the mesh to obtain a geometric information sub-code stream. If the mesh has attribute information such as UV coordinates, use methods such as similar triangle prediction to encode the UV coordinates of the mesh to obtain an attribute information sub-code stream.
- an indication information i.e., the first indication information
- the texture image is converted from the RGB color space format (i.e., the first color space format) to the YUV color space format (i.e., the second color space format), and the texture image in the YUV format is encoded using a video encoder to obtain a texture image sub-stream.
- the texture image in the RGB color space can be in the BGR444 format or the RGB444 format.
- the video encoder is directly used to losslessly encode the video in the RGB color space.
- the encoding of non-manifold structure information includes three parts of information to be encoded: information indicating whether there is a non-manifold structure in the mesh, identification information of whether the vertex is a duplicate point generated by splitting the non-manifold, and index information of duplicate points generated by splitting the non-manifold structure.
- the information indicating whether there is a non-manifold structure in the mesh can be represented by setting an identification of whether there is a non-manifold structure in the mesh, or it can be represented by the number of duplicate points generated by splitting the non-manifold structure in the mesh.
- the representation method is not limited here.
- the non-manifold structure information When encoding the non-manifold structure information, first encode the information indicating whether there is a non-manifold structure in the mesh. If there is a non-manifold structure in the mesh, it is divided into two cases: if the geometric coordinates and the UV coordinates have the same connection relationship, then each vertex is set with an identification to indicate whether it is a duplicate point generated by splitting the non-manifold, and the information and the index information of the duplicate points generated by splitting the non-manifold are encoded; if the geometric coordinates and the UV coordinates have different connection relationships, then each geometric vertex and each UV vertex are respectively set with an identification to indicate whether it is a geometric duplicate point or a UV duplicate point generated by splitting the non-manifold, and the non-manifold of the geometric vertex is encoded respectively. Shape identification information and index information of geometric duplicate points generated by dismantling non-manifolds, non-manifold identification information of UV vertices and index information of UV duplicate points generated by dis
- the process of the decoding end performing three-dimensional mesh decoding is as follows:
- the non-manifold identification information of the vertex and the index information of the duplicate points generated by the non-manifold removal are further decoded to obtain the duplicate points generated by the non-manifold removal, and the duplicate points generated by the non-manifold removal are merged, and the connection relationship is adjusted to restore the non-manifold structure in the mesh.
- the indication information (such as the first indication information) of whether to perform lossless color space format conversion, and use the video decoder to decode the texture map. If the color space format of the texture map is converted to a lossless color space format at the encoding end, the decoded texture map is in the YUV format. According to the indication information, the texture map is converted to a lossless color space format at the decoding end, and the texture map is converted from the YUV color space format (i.e., the second color space format) to the RGB color space format (i.e., the first color space format), thereby realizing lossless encoding and decoding of the texture map.
- the indication information such as the first indication information
- the texture map can be in the BGR444 format or the RGB444 format in the RGB color space. If the color space format of the texture map is not converted to a lossless color space format at the encoding end, the decoded texture map is in the RGB format. In this case, there is no need to perform color space format conversion at the decoding end.
- the three-dimensional grid coding framework of an embodiment of the present application is shown in Figure 5.
- the first color space format is RGB color space format
- the second color space format is YUV color space format
- the attribute information is UV coordinates (which can also be described as texture coordinates, or simply referred to as UV or texture) as an example for explanation.
- the preprocessing step first determine whether the geometric coordinates and the UV coordinates have the same connection relationship, then split the input grid with non-manifold structure to obtain a manifold grid, and record the duplicate point information generated by splitting the non-manifold. It should be noted that this step can also include other preprocessing modules required for encoding, such as filtering out duplicate points and adding virtual points. For ease of explanation, FIG5 only lists the modules for splitting non-manifold structures targeted by the embodiment of the present application.
- An indication information can be encoded to indicate whether to perform lossless color space format conversion on the texture image. If the texture image is to be converted to a lossless color space format, the texture image is converted from the RGB color space format (i.e., the first color space format) to the YUV color space format (i.e., the second color space format) in the lossless color space format conversion module, and the texture image in the YUV format is encoded using a video encoder to obtain a texture image sub-stream. If the texture image is not to be converted to a color space format, the video encoder is directly used to losslessly encode the video in the RGB color space format. Finally, the multiple bitstreams are mixed to obtain the final output bitstream.
- the RGB color space format i.e., the first color space format
- YUV color space format i.e., the second color space format
- connection relationship of the three-dimensional mesh and the vertex information is not emphasized.
- the geometric information, attribute information and non-manifold structure information can be encoded at the same time as the connection relationship is encoded; or the geometric information, attribute information and non-manifold structure information can be encoded in the order of encoding the connection relationship after the connection relationship is encoded.
- the geometric information and attribute information of the vertices can be skipped, that is, only encoded once, or can not be skipped. It is not emphasized here whether to skip the encoding of the geometric information and attribute information of the repeated points generated by the non-manifold splitting.
- the three-dimensional grid decoding framework of an embodiment of the present application is shown in Figure 6.
- the first color space format is RGB color space format
- the second color space format is YUV color space format
- the attribute information is UV coordinates (which can also be described as texture coordinates, or simply referred to as UV or texture) as an example for explanation.
- the duplicate points generated by removing the non-manifold are merged, and the connection relationship is adjusted to restore the non-manifold structure in the mesh.
- the lossless encoding and decoding of the mesh containing the non-manifold structure is completed.
- the post-processing step may also include post-processing modules required for correct decoding, such as restoring the filtered duplicate points and deleting the added virtual vertices.
- FIG6 only lists the modules for restoring the non-manifold structure targeted by the embodiment of the present application.
- the decoded texture map is a YUV format texture map.
- the texture map is converted to a lossless color space format at the decoding end, and the texture map is converted from the YUV color space format (i.e., the second color space format) to the RGB color space format (i.e., the first color space format), thereby realizing lossless encoding and decoding of the texture map.
- the decoded texture map is a RGB format texture map, and in this case, there is no need to perform color space format conversion at the decoding end.
- the three-dimensional mesh lossless coding framework is mainly divided into five parts: splitting non-manifold structure in preprocessing, connection relationship coding, geometric information coding, attribute information coding and non-manifold structure information coding.
- the first color space format is RGB color space format
- the second color space format is YUV color space format
- the attribute information is UV coordinates (which can also be described as texture coordinates, or simply referred to as UV or texture) as an example, and each part is introduced separately:
- Output information indicating whether the geometric coordinates and UV coordinates in the mesh have the same connection relationship, manifold mesh, and duplicate point information generated by decomposing non-manifolds.
- the geometric coordinates and UV coordinates Before dismantling the non-manifold structure, first determine whether the geometric coordinates and UV coordinates have the same connection relationship. You can first determine whether the number of geometric vertices is consistent with the number of UV vertices. If they are consistent, then determine whether the geometric triangles are consistent with the UV triangles, that is, whether the geometric connection relationship is consistent with the UV connection relationship. If the geometric triangles are inconsistent with the UV triangles, the geometric coordinates and UV coordinates have different connection relationships; if the number of geometric vertices is inconsistent with the number of UV vertices, but the number of geometric triangles is consistent with the number of UV triangles, then the geometric coordinates and UV coordinates also have different connection relationships. It can also be determined in other ways, and the determination method is not limited here.
- Splitting non-manifold structures is mainly divided into two parts: splitting non-manifold edges and splitting non-manifold points.
- the first step in splitting non-manifold edges is to find them.
- the criterion for determining a non-manifold edge is that an edge exists in three or more triangles at the same time.
- the specific implementation method is: either establish a data structure to store the triangles where each edge is located, and find the non-manifold edge by querying the number of triangles corresponding to the edge; or construct a corner table (CornerTable) to establish the correspondence between angles and edges in the grid, and then find the non-manifold edge.
- CornerTable corner table
- angle a and angle d are opposite to edge bc, and angle a and angle d are opposite angles; for non-manifold edges, there will be three or more opposite angles. Therefore, through The correspondence between angles and edges can also be used to find non-manifold edges.
- the second step of splitting non-manifold edges is to add vertices and modify the connection relationship. After finding the non-manifold edge, create duplicate vertices for the two vertices of the non-manifold edge, select a triangle t where the non-manifold edge is located, make the third vertex in the triangle and the two newly added vertices form a new triangle t', replace the original triangle t with t', and iterate this process until the non-manifold edge is converted into a manifold edge.
- the above process is executed once, and a set of duplicate point information generated by the process is recorded; if the geometric coordinates and UV coordinates have different connection relationships, the above process is executed once for the geometry and UV respectively: the CornerTable of the geometry and UV is constructed respectively, and the non-manifold edges of the geometry and the non-manifold points of the geometry, the non-manifold edges of the UV and the non-manifold points of the UV are split respectively, and the geometric duplicate point information and UV duplicate point information generated by the process are recorded respectively.
- Input The connectivity of the manifold mesh, which indicates whether the geometric coordinates and UV coordinates in the mesh have the same connectivity.
- Output Encoded connection relationship sub-code stream and vertex encoding order.
- This embodiment uses the Edgebreaker method to encode the connection relationship of the three-dimensional mesh, establishes a CornerTable to represent the connection relationship of the mesh, and uses the CornerTable to traverse all triangles in the mesh to generate the CLERS pattern string of Edgebreaker.
- c is the index of the current angle
- fi is the serial number of the triangle where the current angle c is located
- "*" is multiplication
- % is modulo operation.
- c p (f i *3)+(c+1)%3 (3)
- c is the index of the current angle
- fi is the serial number of the triangle where the current angle c is located
- "*" is multiplication
- "%” is modulo operation.
- CornerTable consists of four parts: V, O, U, and M.
- the V table stores the vertex index corresponding to each corner
- the O table stores the diagonal index of each corner
- the U table stores the flag of whether each triangle has been traversed during the traversal process
- the M table stores the flag of whether each vertex has been traversed during the traversal process.
- CornerTable can be used to construct the relationship shown in Figure 8, where c represents the current corner, c.p represents the previous corner of the current corner c (counterclockwise), and c.n represents the next corner of the current corner c. c.o is the opposite angle of the current corner c, which can be obtained by querying the O table.
- c.t is the serial number of the triangle where c is located, which can be calculated by formula 1.
- c.v represents the vertex of the current corner, which can be obtained by querying the V table.
- c.l represents the corner to the left of the current corner c, which is obtained by querying the opposite angle of c.p in the O table;
- c.r represents the corner to the right of the current corner c, which is obtained by querying the opposite angle of c.n in the O table.
- the mesh can be traversed in a spiral order to obtain the CLERS pattern string of Edgebreaker that represents the mesh connection relationship.
- the judgment conditions and traversal rules of the five patterns are shown in Figure 9.
- the current traversed angle is x.
- the current triangle is in C mode, and the next triangle to be traversed is the triangle where x.r is located; otherwise, if the triangle where x.l is located has been visited, the current triangle is in L mode, and the next triangle to be traversed is the triangle where x.r is located; if the triangle where x.r is located has been visited, the current triangle is in R mode, and the next triangle to be traversed is the triangle where x.l is located; if the vertex x.v has been visited, and the triangles where x.l and x.r are located have not been visited, then the current triangle is in S mode. At this time, the traversal path will produce two branches.
- the first triangle traversed is the triangle where x.r is located, and the triangle where x.l is located is stored in the stack.
- the triangle where x.l is located is traversed again; if the triangles where x.l and x.r are located have been visited, then the mode of the current triangle is E, and the traversal has reached the end of the current traversal path branch.
- Randomly select an initial triangle in the mesh traverse the triangles in the mesh according to the above rules, and generate a CLERS pattern string.
- the traversal path ends, but there are still untraversed triangles in the mesh randomly select an untraversed triangle and start the next traversal until all triangles in the mesh have been traversed.
- Entropy coding is used to compress the CLERS pattern string to obtain the final connection information code stream.
- the above process only needs to be performed once; if the geometric coordinates and UV coordinates have different connection relationships, since the number of geometric triangles and texture triangles is consistent and corresponding, but the corresponding geometric coordinate index and UV coordinate index are not one-to-one corresponding, it is only necessary to build and encode the CLERS pattern string once according to the CornerTable of the geometry.
- the TC table stores the UV vertex index corresponding to each corner in the texture triangle
- the OTC table stores each diagonal index in the texture triangle.
- Input The geometric information and connection relationship encoding order of the manifold mesh
- Output geometry information sub-code stream and geometry information encoding order.
- the geometric information of points a, b, and c has been encoded, and the geometric information of point d is to be encoded.
- the difference coding method is used to encode geometric information, that is, the coordinate values of adjacent encoded vertices are used as the predicted values of the current vertex coordinates to calculate and predict the residual.
- Input attribute information and connection relationship encoding order of manifold mesh
- the three-dimensional mesh attribute information generally includes UV coordinates, normal vectors, etc. Taking UV coordinates as an example, there are many encoding methods that can be used for UV coordinates, including difference prediction encoding, parallelogram prediction encoding, and similar triangle prediction encoding. The specific encoding method is not emphasized here. The similar triangle prediction algorithm is described below.
- the vectors with G as the subscript are all vector representations of the geometric coordinates between the corresponding points; similarly, The vector representations with UV as the subscript are all vector representations of the UV coordinates between the corresponding points.
- Use formula (8) to calculate the vector Rotated() means flipping the vector 90 degrees:
- Input information indicating whether the geometric coordinates and UV coordinates in the mesh have the same connection relationship, information indicating whether there is a non-manifold structure in the mesh, non-manifold identifiers of vertices, index information of duplicate points generated by removing non-manifolds, encoding order of geometric information, and encoding order of attribute information;
- encode information indicating whether there is a non-manifold structure in the grid Take setting the flag of whether there is a non-manifold structure as an example: if there is no non-manifold structure in the grid, that is, the number of duplicate points generated by removing the non-manifold is 0, set the flag to 0, and there is no need to encode the non-manifold flag of the vertex and the index information of the duplicate points generated by removing the non-manifold; if there is a non-manifold structure in the grid, that is, the number of duplicate points generated by removing the non-manifold is greater than 0, set the flag to 1, and then encode the non-manifold flag of the vertex and the index information of the duplicate points generated by removing the non-manifold.
- the duplicate points generated by removing non-manifolds include two parts: geometric duplicate points and UV duplicate points.
- the non-manifold identification of the encoded vertex and the index information of the duplicate points generated by removing the non-manifold are divided into two cases: the first case is that the geometric coordinates and UV coordinates in the mesh have the same connection relationship, that is, the geometric coordinates and UV coordinates are in a one-to-one correspondence, then a group of vertices' non-manifold identification and the index information of the duplicate points generated by removing the non-manifold are directly encoded, and the index information can be obtained according to the encoding order of the geometric coordinates and UV coordinates at the encoding end; the second case is that the geometric coordinates and UV coordinates in the mesh have different connection relationships, that is, the geometric coordinates and UV coordinates are not in a one-to-one correspondence, then the non-manifold identification of the geometric vertices
- the specific implementation is: if the geometric coordinates and UV coordinates in the mesh have the same connection relationship, then a flag is set for each vertex in the manifold mesh to indicate whether the point at the current position is a duplicate point generated by the removal of the non-manifold, and the duplicate point index information generated by the removal of the non-manifold is encoded; if the geometric coordinates and UV coordinates in the mesh have different connection relationships, then a flag is set for each geometric vertex and each UV vertex in the manifold mesh to indicate whether the geometric vertex and UV vertex at the current position are duplicate points generated by the removal of the non-manifold, and the geometric duplicate point index information and UV duplicate point index information generated by the removal of the non-manifold are encoded respectively. Then, the flag bit binary string sequence arranged in the corresponding coding order and the duplicate point index information generated by the removal of the non-manifold are entropy encoded to obtain the non-manifold structure information code stream.
- non-manifold structure information bitstream in the total bitstream: one is to store the non-manifold structure information bitstream as a separate sub-bitstream; another is to store the geometric non-manifold structure information bitstream in the geometric information sub-bitstream, and store the UV non-manifold structure information bitstream in the attribute information sub-bitstream; the geometric non-manifold structure information bitstream and the UV non-manifold structure information bitstream can also be stored as two sub-bitstreams in the total bitstream.
- the storage method of the non-manifold structure information bitstream in the total bitstream is not emphasized here.
- An indication information can be encoded to indicate whether to perform lossless color space format conversion on the texture map. If the texture map is subjected to lossless color space format conversion, the texture map in the input RGB color space format (i.e., the first color space format) is subjected to lossless color space format conversion to obtain a texture map in the YUV color space format (i.e., the second color space format).
- the color space format conversion method shown in equations (15)-(17) may be used to convert the texture image from the RGB color space format to the YUV color space format.
- U RG (16)
- V BG (17)
- round() represents the round-down function.
- a video encoder is used to losslessly encode the video in the YUV color space format. If the texture image is not converted to a color space format, a video encoder is used to losslessly encode the video in the RGB color space format.
- the video encoder used is not limited here.
- the three-dimensional mesh lossless decoding framework of the embodiment of the present application is mainly divided into six parts: connection relationship decoding, geometric information decoding, attribute information decoding, non-manifold structure information decoding, reconstruction of manifold mesh, and recovery of non-manifold structure in post-processing.
- the first color space format is RGB color space format
- the second color space format is YUV color space format
- the attribute information is UV coordinates (which can also be described as texture coordinates, or simply referred to as UV or texture) as an example, and each part is introduced separately:
- connection relationship sub-code stream to be decoded indicating whether the geometric coordinates and UV coordinates have the same connection relationship
- Output connectivity of the manifold mesh and the decoded vertex order.
- connection relationship sub-code stream decodes the connection relationship sub-code stream to obtain the pattern string. Traverse the pattern string in a certain order (forward or reverse order), and reconstruct the connection relationship according to the corresponding pattern in the string. Consistent with the encoding end, if the geometric coordinates and UV coordinates have the same connection relationship, only one set of connection relationships needs to be reconstructed; if the geometric coordinates and UV coordinates have different connection relationships, first reconstruct the geometric connection relationship based on the decoded string, and then traverse the corners in the currently decoded connected area and the difference information between the UV connection relationship and the geometric connection relationship in the currently decoded connected area to reconstruct the connection relationship of the UV coordinates. In addition, the traversal order of the vertices is output to the geometric information and attribute information decoding module.
- Output Geometric information of the manifold mesh.
- the decoding process of the mesh geometric coordinates is the inverse process of the encoding process: first, entropy decode the coordinate prediction residual. Then, based on the decoded triangle, predict the predicted coordinates of the point to be decoded according to the parallelogram rule. The predicted coordinates plus the residual value obtained by entropy decoding can get the geometric coordinate position to be decoded.
- the vertex traversal order here is the same as the vertex order of the encoded geometric information. It should be noted that the geometric coordinates of the initial triangle do not use predictive coding, but directly encode their geometric coordinate values. After the geometric coordinates of the triangle are decoded at the decoding end, the geometric coordinates of the vertices of other triangles are traversed and decoded as the initial triangle. In addition, other decoding methods may also be used here. The specific decoding method is not emphasized, as long as it corresponds to the encoding end.
- UV coordinates As an example, the decoding of UV coordinates adopts the decoding method corresponding to the encoding end, and the specific decoding method is not emphasized here.
- the decoding process using the similar triangle prediction algorithm is described below.
- non-manifold structure information sub-code stream information indicating whether the geometric coordinates and UV coordinates in the grid have the same connection relationship, geometric information decoding order, and attribute information decoding order;
- Output Information indicating whether there is a non-manifold structure in the mesh, the non-manifold identification of the vertex, and the index information of duplicate points generated by removing the non-manifold.
- decode the information indicating whether there is a non-manifold structure in the grid Take the information as an example of whether there is a non-manifold flag: if the flag is 0, there is no need to decode the non-manifold flag of the vertex and the duplicate point index information generated by removing the non-manifold, and skip the subsequent module for recovering the non-manifold structure; if the flag is 1, decode the non-manifold flag of the vertex and the duplicate point index information generated by removing the non-manifold.
- the decoding of the non-manifold identification of vertices and the repeated point index information generated by removing the non-manifold adopts the method corresponding to the encoding end, and is divided into two cases according to whether the geometric coordinates and UV coordinates have the same connection relationship: if the geometric coordinates and UV coordinates have the same connection relationship, entropy decoding is used to obtain a set of non-manifold identifications of vertices and repeated point index information generated by removing the non-manifold; if the geometric coordinates and UV coordinates have different connection relationships, the non-manifold identification of geometric vertices and geometric repeated point index information generated by removing the non-manifold, and the non-manifold identification of UV vertices and UV repeated point index information generated by removing the non-manifold are respectively decoded. This information is recorded and output to the non-manifold structure recovery module.
- the manifold mesh can be directly reconstructed by using the connection relationship, geometric information, and attribute information of the manifold mesh.
- Input manifold mesh, non-manifold identifiers of vertices, duplicate point index information generated by removing non-manifolds, and information indicating whether the geometric coordinates and UV coordinates in the mesh have the same connection relationship;
- the recovery process of non-manifold edges and non-manifold points is the same.
- the duplicate point index information generated by removing the non-manifold as the duplicate point group index as an example, we can first traverse all vertices in the decoding order of the vertices and establish a duplicate point group index based on the non-manifold identifier of the vertex.
- a hash table the key of the hash table is the index of the duplicate point group generated by splitting the non-manifold, and the value is the index of the target vertex to be merged.
- the current vertex corresponds to the index of the current vertex, that is, its index is not updated; if the current vertex is a duplicate point generated by splitting the non-manifold and is the target vertex to be merged into the duplicate point group, the current vertex corresponds to the index of the current vertex, that is, its index is not updated, and the duplicate point group index of the current vertex and the index of the current vertex in the reconstructed manifold mesh are added to the hash table; if the current vertex is a duplicate point generated by splitting the non-manifold, but is not the target vertex to be merged into the duplicate point group, then the index of the target vertex to be merged in the reconstructed manifold mesh is searched in the hash table according to the duplicate point group index of the current point, so as to merge the duplicate points generated by splitting the non-manifold, that is, update the index of the current vertex to the index of the corresponding target
- the above process is executed once to obtain a non-manifold mesh with the same connection relationship between the reconstructed geometric coordinates and UV coordinates; if the geometric coordinates and UV coordinates have different connection relationships, the geometric vertices and UV vertices are traversed in the decoding order of the geometric vertices and UV vertices respectively, and a geometric hash table and a UV hash table are established according to the non-manifold identifiers of the geometric vertices and UV vertices respectively, and the index information of the geometric duplicate points generated by splitting the non-manifold and the index of the geometric target vertex to be merged in the reconstructed manifold mesh, the index information of the UV duplicate points generated by splitting the non-manifold and the index of the UV target vertex to be merged in the reconstructed manifold mesh are stored respectively, and the above judgment and merging operations of the duplicate points generated by splitting the non-manifold are performed respectively, and the geometric
- the texture image in the input YUV color space format i.e., the second color space format
- the texture image in the RGB color space format i.e., the first color space format.
- this embodiment does not limit the specific implementation method of the lossless color space format conversion.
- round() represents the round-down function.
- the texture map in the BGR444 format is directly encoded using a video encoder, resulting in low efficiency in lossless coding of the texture map.
- the embodiment of the present application proposes a lossless coding and decoding method for a three-dimensional mesh texture map based on Edgebreaker. Taking the first color space format as the RGB color space format and the second color space format as the YUV color space format as an example, the decoding end decodes to obtain indication information indicating whether to perform lossless color space format conversion.
- the texture map in the YUV format is obtained by decoding using a video decoder.
- the texture map is converted to a lossless color space format, and the texture map is converted from the YUV color space format (i.e., the second color space format) to the RGB color space format (i.e., the first color space format), thereby realizing lossless coding and decoding of the texture map.
- this embodiment converts the texture map from the YUV color space format to the RGB color space format without limiting the specific format of the texture map.
- the texture map in the RGB color space format can be in the BGR444 format or the RGB444 format.
- a video in RGB color space format is obtained by decoding with a video decoder.
- the embodiment of the present application can improve the encoding and decoding efficiency of a three-dimensional grid.
- the 3D mesh coding method provided in the embodiment of the present application can be executed by a 3D mesh coding device, or a control module in the 3D mesh coding device for executing the 3D mesh coding method.
- the 3D mesh coding device executing the mesh coding method is taken as an example to illustrate the 3D mesh coding device provided in the embodiment of the present application.
- FIG. 12 is a structural diagram of a three-dimensional grid encoding device provided in an embodiment of the present application.
- the three-dimensional grid encoding device 300 includes:
- the conversion module 301 is used to convert the texture image of the three-dimensional grid in the first color space format into a color space format to obtain the texture image in the second color space format;
- the first encoding module 302 is used to encode the texture image in the second color space format to obtain a first texture image code stream.
- the conversion module is specifically used to:
- the texture map of the first color space format of the three-dimensional grid is converted into a color space format to obtain a texture map of the second color space format.
- the device further comprises:
- the second encoding module is used for, when it is determined that the color space format conversion is not performed on the texture image of the three-dimensional grid,
- the texture image in the first color space format is encoded to obtain a second texture image code stream.
- the code stream corresponding to the three-dimensional mesh includes an encoding result of first indication information, where the first indication information is used to indicate whether the encoding end performs color space format conversion on the texture map of the three-dimensional mesh;
- the bitstream corresponding to the three-dimensional mesh also includes the first texture map bitstream
- the bitstream corresponding to the three-dimensional mesh also includes a second texture map bitstream.
- the first indication information when the first indication information indicates to perform color space format conversion on the texture image of the three-dimensional mesh, the first indication information is also used to indicate the conversion type of the texture image of the three-dimensional mesh from the first color space format to the second color space format.
- the amount of relevant information about the color space of the texture image in the second color space format is less than the amount of relevant information about the color space of the texture image in the first color space format.
- the second color space format and the first color space format are color space formats of different color spaces; or, the second color space format and the first color space format are different color space formats of the same color space.
- the first color space format is an RGB color space format
- the second color space format is a YUV color space format.
- the three-dimensional grid coding device in the embodiment of the present application can be a device, a device or electronic device with an operating system, or a component, integrated circuit, or chip in a terminal.
- the device or electronic device can be a mobile terminal or a non-mobile terminal.
- the mobile terminal can include but is not limited to the types of terminals listed above, and the non-mobile terminal can be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
- the three-dimensional grid coding device provided in the embodiment of the present application can implement each process implemented by the method embodiment of Figure 3 and achieve the same technical effect. To avoid repetition, it will not be repeated here.
- the 3D mesh decoding method provided in the embodiment of the present application can be executed by a 3D mesh decoding device, or a control module in the 3D mesh decoding device for executing the 3D mesh decoding method.
- the 3D mesh decoding device executing the mesh decoding method is taken as an example to illustrate the 3D mesh decoding device provided in the embodiment of the present application.
- FIG. 13 is a structural diagram of a three-dimensional grid decoding device provided in an embodiment of the present application.
- the three-dimensional grid decoding device 400 includes:
- a first decoding module 401 is used to decode a first texture image bitstream in a bitstream corresponding to a three-dimensional grid to obtain a texture image in a second color space format;
- a conversion module 402 configured to perform color space format conversion on the texture image in the second color space format to obtain a texture image in the first color space format
- the reconstruction module 403 is used to perform mesh reconstruction processing based on the texture map in the first color space format to obtain a reconstructed three-dimensional mesh.
- the device further comprises:
- a second decoding module configured to decode the encoding result of the first indication information in the code stream corresponding to the three-dimensional grid to obtain the first indication information
- the first decoding module is specifically used for:
- the first texture map bitstream in the bitstream corresponding to the three-dimensional grid is decoded to obtain the texture map in the second color space format.
- the first decoding module is specifically used to:
- the texture image in the second color space format is converted from the second color space format to the first color space format to obtain the texture image in the first color space format.
- the device further comprises:
- the third decoding module is used to decode the second texture map bitstream in the bitstream corresponding to the three-dimensional grid to obtain the texture map in the first color space format when it is determined based on the first indication information that the texture map is not to be converted into a color space format.
- the amount of relevant information about the color space of the texture image in the second color space format is less than the amount of relevant information about the color space of the texture image in the first color space format.
- the second color space format and the first color space format are color space formats of different color spaces; or, the second color space format and the first color space format are different color space formats of the same color space.
- the first color space format is an RGB color space format
- the second color space format is a YUV color space format.
- the three-dimensional grid decoding device in the embodiment of the present application can be a device, a device or electronic device with an operating system, or a component, integrated circuit, or chip in a terminal.
- the device or electronic device can be a mobile terminal or a non-mobile terminal.
- the mobile terminal can include but is not limited to the types of terminals listed above, and the non-mobile terminal can be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
- the three-dimensional grid decoding device provided in the embodiment of the present application can implement each process implemented by the method embodiment of Figure 4 and achieve the same technical effect. To avoid repetition, it will not be repeated here.
- the embodiment of the present application further provides a communication device 500, including a processor 501 and a memory 502, wherein the memory 502 stores a program or instruction that can be run on the processor 501.
- the communication device 500 is an encoding end device
- the program or instruction is executed by the processor 501 to implement each step of the above-mentioned three-dimensional grid encoding method embodiment, and can achieve the same technical effect.
- the communication device 500 is a decoding end device
- the program or instruction is executed by the processor 501 to implement each step of the above-mentioned three-dimensional grid encoding method embodiment.
- the program or instruction is executed by the processor 501, each step of the above-mentioned three-dimensional grid decoding method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
- the embodiment of the present application also provides an electronic device, including a processor and a communication interface, wherein the processor is used to: perform color space format conversion on a texture image of a first color space format of a three-dimensional grid to obtain a texture image of a second color space format; and perform encoding processing on the texture image of the second color space format to obtain a first texture image code stream.
- the electronic device embodiment corresponds to the above-mentioned three-dimensional grid encoding method embodiment, and each implementation process and implementation method of the above-mentioned three-dimensional grid encoding method embodiment can be applied to the electronic device embodiment and can achieve the same technical effect.
- the embodiment of the present application also provides an electronic device, including a processor and a communication interface, wherein the processor is used to: decode a first texture image code stream in a code stream corresponding to a three-dimensional mesh to obtain a texture image in a second color space format; perform color space format conversion on the texture image in the second color space format to obtain a texture image in a first color space format; perform mesh reconstruction based on the texture image in the first color space format to obtain a reconstructed three-dimensional mesh.
- This electronic device embodiment corresponds to the above-mentioned three-dimensional mesh decoding method embodiment, and each implementation process and implementation method of the above-mentioned three-dimensional mesh decoding method embodiment can be applied to this electronic device embodiment and can achieve the same technical effect.
- the electronic device may be a terminal.
- Fig. 15 is a schematic diagram of the hardware structure of a terminal implementing an embodiment of the present application.
- the terminal 600 includes but is not limited to: a radio frequency unit 601, a network module 602, an audio output unit 603, an input unit 604, a sensor 605, a display unit 606, a user input unit 607, an interface unit 608, a memory 609 and at least some of the components of a processor 610.
- the terminal 600 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 610 through a power management system, so as to implement functions such as charging, discharging, and power consumption management through the power management system.
- a power source such as a battery
- the terminal structure shown in FIG15 does not constitute a limitation on the terminal, and the terminal may include more or fewer components than shown in the figure, or combine certain components, or arrange components differently, which will not be described in detail here.
- the input unit 604 may include a graphics processing unit (GPU) 6041 and a microphone 6042, and the GPU 6041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode.
- the display unit 606 may include a display panel 6061, and the display panel 6061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc.
- the user input unit 607 includes a touch panel 6071 and at least one of other input devices 6072.
- the touch panel 6071 is also called a touch screen.
- the touch panel 6071 may include two parts: a touch detection device and a touch controller.
- Other input devices 6072 may include, but are not limited to, a physical keyboard, function keys (such as a volume control key, a switch key, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
- the RF unit 601 after receiving downlink data from the network side device, can transmit the data to the processor 610 for processing; in addition, the RF unit 601 can send uplink data to the network side device.
- the RF unit 601 includes but is not limited to an antenna, an amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, etc.
- the memory 609 can be used to store software programs or instructions and various data.
- the memory 609 can mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area can store an operating system,
- the memory 609 may include a volatile memory or a non-volatile memory, or the memory 609 may include both volatile and non-volatile memory.
- the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory.
- the volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM).
- RAM random access memory
- SRAM static random access memory
- DRAM dynamic random access memory
- SDRAM synchronous dynamic random access memory
- DDRSDRAM double data rate synchronous dynamic random access memory
- ESDRAM enhanced synchronous dynamic random access memory
- SLDRAM synchronous link dynamic random access memory
- DRRAM direct memory bus random access memory
- the processor 610 may include one or more processing units; optionally, the processor 610 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 610.
- the processor 610 is configured to:
- the texture image in the second color space format is encoded to obtain a first texture image code stream.
- the processor 610 is specifically configured to:
- the texture map of the three-dimensional grid in the first color space format is converted into the color space format to obtain the texture map in the second color space format.
- processor 610 is further configured to:
- the texture map in the first color space format is encoded to obtain a second texture map code stream.
- the code stream corresponding to the three-dimensional mesh includes an encoding result of first indication information, where the first indication information is used to indicate whether the encoding end performs color space format conversion on the texture map of the three-dimensional mesh;
- the bitstream corresponding to the three-dimensional mesh also includes the first texture map bitstream
- the bitstream corresponding to the three-dimensional mesh also includes a second texture map bitstream.
- the first indication information indicates that the color space format of the texture image of the three-dimensional mesh is converted
- the first indication information is further used to instruct the texture image of the three-dimensional mesh to be converted from the first color space format to The conversion type of the second color space format.
- the amount of relevant information about the color space of the texture image in the second color space format is less than the amount of relevant information about the color space of the texture image in the first color space format.
- the second color space format and the first color space format are color space formats of different color spaces; or, the second color space format and the first color space format are different color space formats of the same color space.
- the first color space format is an RGB color space format
- the second color space format is a YUV color space format.
- the processor 610 is configured to:
- a mesh reconstruction process is performed based on the texture map in the first color space format to obtain a reconstructed three-dimensional mesh.
- processor 610 is further configured to:
- the processor 610 is specifically configured to:
- the first texture map bitstream in the bitstream corresponding to the three-dimensional grid is decoded to obtain the texture map in the second color space format.
- processor 610 is further configured to:
- the texture image in the second color space format is converted from the second color space format to the first color space format to obtain the texture image in the first color space format.
- processor 610 is further configured to:
- a second texture map bitstream in the bitstream corresponding to the three-dimensional grid is decoded to obtain a texture map in the first color space format.
- the amount of relevant information about the color space of the texture image in the second color space format is less than the amount of relevant information about the color space of the texture image in the first color space format.
- the second color space format and the first color space format are color space formats of different color spaces; or, the second color space format and the first color space format are different color space formats of the same color space.
- the first color space format is an RGB color space format
- the second color space format is a YUV color space format.
- the terminal of the embodiment of the present application also includes: instructions or programs stored in the memory 609 and executable on the processor 610.
- the processor 610 calls the instructions or programs in the memory 609 to execute the methods executed by the modules shown in Figure 12 or Figure 13, and achieves the same technical effect. To avoid repetition, it will not be repeated here.
- An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored.
- a program or instruction is stored.
- the various processes of the above-mentioned three-dimensional mesh encoding method embodiment are implemented, or when the program or instruction is executed by a processor, the various processes of the above-mentioned three-dimensional mesh decoding method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
- the processor is the processor in the terminal described in the above embodiment.
- the readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
- An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned three-dimensional mesh encoding method embodiment, or to implement the various processes of the above-mentioned three-dimensional mesh decoding method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
- the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
- the technical solution of the present application can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
- a storage medium such as ROM/RAM, magnetic disk, optical disk
- a terminal which can be a mobile phone, computer, server, air conditioner, or network device, etc.
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Computer Graphics (AREA)
- Geometry (AREA)
- Software Systems (AREA)
- Image Generation (AREA)
Abstract
一种三维网格编码方法、三维网格解码方法、装置及设备,三维网格编码方法包括:对三维网格的第一颜色空间格式的纹理图进行颜色空间格式转换,得到第二颜色空间格式的纹理图(101);对所述第二颜色空间格式的纹理图进行编码处理,得到第一纹理图码流(102)。支持将三维网格的纹理图转换为其他颜色空间格式的纹理图进行编码,能够提高三维网格的纹理图编码的灵活性。
Description
相关申请的交叉引用
本申请主张在2023年6月30日在中国提交的中国专利申请No.202310795676.3的优先权,其全部内容通过引用包含于此。
本申请属于编解码技术领域,具体涉及一种三维网格编码方法、三维网格解码方法、装置及设备。
随着多媒体技术的迅速发展,三维模型成为继音频、图像、视频之后的新一代数字化媒体。三维网格和点云是两种常用的三维模型表示方式。三维网格模型与传统的图像、视频等多媒体相比具有更强的交互性和逼真性的特点,应用范围较为广泛。
相关技术中,在对三维网格的纹理图进行编码时,直接对蓝绿红(Blue-Green-Red,BGR)444格式的纹理图进行编码,对三维网格的纹理图进行编码的灵活性较差。
发明内容
本申请实施例提供一种三维网格编码方法、三维网格解码方法、装置及设备,能够解决对三维网格的纹理图进行编码的灵活性较差的问题。
第一方面,提供了一种三维网格编码方法,由编码端执行,包括:
对三维网格的第一颜色空间格式的纹理图进行颜色空间格式转换,得到第二颜色空间格式的纹理图;
对所述第二颜色空间格式的纹理图进行编码处理,得到第一纹理图码流。
第二方面,提供了一种三维网格解码方法,由解码端执行,包括:
对三维网格对应的码流中的第一纹理图码流进行解码处理,得到第二颜色空间格式的纹理图;
对所述第二颜色空间格式的纹理图进行颜色空间格式转换,得到第一颜色空间格式的纹理图;
基于所述第一颜色空间格式的纹理图进行网格重建处理,得到重建的三维网格。
第三方面,提供了一种三维网格编码装置,所述装置包括:
转换模块,用于对三维网格的第一颜色空间格式的纹理图进行颜色空间格式转换,得到第二颜色空间格式的纹理图;
第一编码模块,用于对所述第二颜色空间格式的纹理图进行编码处理,得到第一纹理图码流。
第四方面,提供了一种三维网格解码装置,所述装置包括:
第一解码模块,用于对三维网格对应的码流中的第一纹理图码流进行解码处理,得到第二颜色空间格式的纹理图;
转换模块,用于对所述第二颜色空间格式的纹理图进行颜色空间格式转换,得到第一颜色空间格式的纹理图;
重建模块,用于基于所述第一颜色空间格式的纹理图进行网格重建处理,得到重建的三维网格。
第五方面,提供了一种电子设备,该终端包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第一方面所述的方法的步骤;或者,所述程序或指令被所述处理器执行时实现如第二方面所述的方法的步骤。
第六方面,提供了一种电子设备,包括处理器及通信接口,其中,所述处理器用于:对三维网格的第一颜色空间格式的纹理图进行颜色空间格式转换,得到第二颜色空间格式的纹理图;对所述第二颜色空间格式的纹理图进行编码处理,得到第一纹理图码流。
第七方面,提供了一种电子设备,包括处理器及通信接口,其中,所述处理器用于:对三维网格对应的码流中的第一纹理图码流进行解码处理,得到第二颜色空间格式的纹理图;对所述第二颜色空间格式的纹理图进行颜色空间格式转换,得到第一颜色空间格式的纹理图;基于所述第一颜色空间格式的纹理图进行网格重建处理,得到重建的三维网格。
第八方面,提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面所述的三维网格编码方法的步骤,或者,所述程序或指令被处理器执行时实现如第二方面所述的三维网格解码方法的步骤。
第九方面,提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面所述的方法的步骤,或者,实现如第二方面所述的方法的步骤。
第十方面,提供了一种计算机程序/程序产品,所述计算机程序/程序产品被存储在非易失的存储介质中,所述程序/程序产品被至少一个处理器执行以实现如第一方面所述的方法的步骤,或者,实现如第二方面所述的方法的步骤。
在本申请实施例中,对三维网格的第一颜色空间格式的纹理图进行颜色空间格式转换,得到第二颜色空间格式的纹理图;对所述第二颜色空间格式的纹理图进行编码处理,得到第一纹理图码流。这样,在三维网格编码过程中通过对三维网格的纹理图进行颜色空间格式转换,支持将三维网格的纹理图转换为其他颜色空间格式的纹理图进行编码,能够提高三维网格的纹理图编码的灵活性。
图1是相关技术中Edgebreaker的五种模式的示意图;
图2是相关技术中Edgebreaker中顶点遍历过程及操作模式字符串的示意图;
图3是本申请实施例提供的一种三维网格编码方法的流程图;
图4是本申请实施例提供的一种三维网格解码方法的流程图;
图5是本申请实施例提供的一种三维网格编码框架示意图;
图6是本申请实施例提供的一种三维网格解码框架示意图;
图7是本申请实施例提供的一种流形网格示意图;
图8是本申请实施例提供的一种Corner关系示意图;
图9是本申请实施例提供的一种网格遍历示意图;
图10是本申请实施例提供的一种三维网格示意图;
图11是本申请实施例提供的一种基于三维到二维投影的UV坐标预测示意图;
图12是本申请实施例提供的一种三维网格编码装置的结构示意图;
图13是本申请实施例提供的一种三维网格解码装置的结构示意图;
图14是本申请实施例提供的一种通信设备的结构示意图;
图15是本申请实施例提供的一种终端的结构示意图。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员所获得的所有其他实施例,都属于本申请保护的范围。
本申请的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的术语在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”所区别的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,本申请中的“或”表示所连接对象的至少其中之一。例如“A或B”涵盖三种方案,即,方案一:包括A且不包括B;方案二:包括B且不包括A;方案三:既包括A又包括B。字符“/”一般表示前后关联对象是一种“或”的关系。
本申请的术语“指示”既可以是一个直接的指示(或者说显式的指示),也可以是一个间接的指示(或者说隐含的指示)。其中,直接的指示可以理解为,发送方在发送的指示中明确告知了接收方具体的信息、需要执行的操作或请求结果等内容;间接的指示可以理解为,接收方根据发送方发送的指示确定对应的信息,或者进行判断并根据判断结果确定需要执行的操作或请求结果等。
本申请实施例中的编解码方法对应的编解码端可以为终端,该终端也可以称作终端设备或者用户终端(User Equipment,UE),终端可以是手机、平板电脑(Tablet Personal Computer)、膝上型电脑(Laptop Computer)或称为笔记本电脑、个人数字助理(Personal Digital Assistant,PDA)、掌上电脑、上网本、超级移动个人计算机(ultra-mobile personal
computer,UMPC)、移动上网装置(Mobile Internet Device,MID)、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、机器人、可穿戴式设备(Wearable Device)或车载设备(Vehicle User Equipment,VUE)、行人终端(Pedestrian User Equipment,PUE)等终端侧设备,可穿戴式设备包括:智能手表、手环、耳机、眼镜等。需要说明的是,在本申请实施例并不限定终端的具体类型。
为了方便理解,以下对本申请实施例涉及的一些内容进行说明:
1、三维网格
近年来,随着多媒体技术的迅速发展,相关研究成果迅速产业化,并成为人们生活中不可或缺的重要组成部分。三维模型成为继音频、图像、视频之后的新一代数字化媒体。三维网格和点云是两种常用的三维模型表示方式。三维网格模型与传统的图像、视频等多媒体相比具有更强的交互性和逼真性的特点,使其在商业、制造业、建筑业、教育、医学、娱乐、艺术、军事等各个领域都得到了越来越广泛的应用。
而随着人们对三维网格模型在视觉效果上越来越高的需求,以及许多更加成熟的三维扫描技术和三维建模软件的涌现,通过三维扫描设备或三维建模软件获取的三维网格模型的数据规模和复杂度也在急剧地增长着。因此,如何高效压缩三维网格数据是实现三维网格数据方便地传输、存储和处理的关键。
一个三维网格往往同时包含了拓扑信息、几何信息及属性信息三种主要信息。拓扑信息,也叫做连接性关系信息,用于描述网格中顶点和面片等元素之间的连接关系;几何信息是网格中所有顶点的三维坐标;属性信息则记录了附着在网格上的其它信息,比如法向量、纹理坐标以及颜色等。对三维网格数据的压缩往往就是针对这三种信息分别按照其数据特性进行压缩。另外,对于带有纹理图的三维网格,需对纹理图进行压缩。
Draco是用于压缩和解压缩三维(3Dimension,3D)几何网格和点云的库,旨在改善3D图形的存储和传输,大幅加速3D数据的编码、传输和解码。Draco支持对三维网格几何信息、连接信息以及属性信息的压缩。Draco支持有损模式和近无损模式。此外,Draco编码连接关系时使用的Edgebreaker方法是目前编码三维网格连接信息最高效的方法之一。
但是Edgebreaker要求待编码网格为流形结构,对于存在非流形结构的网格,Draco必须要将其拆分成流形结构才能正确地编码。然而,Draco在解码端不会对拆分出的结构进行合并,这就使得解码端输出的网格相比于编码端输入的原始网格会多出拆分出的点。这会导致Draco不能无损编码这类存在非流形结构的网格。
视频图像邻域的国际标准组织运动图像专家组(Moving Picture Expert Group,MPEG)正在制定新的动态三维网格压缩标准基于视频的动态三维网格压缩(Video-based dynamic mesh coding,V-DMC或VDMC),目前在编码静态三维网格时也选择采用基于Edgebreaker的方案且暂时复用了Draco编解码器。同时MPEG也在尝试实现由MPEG提供的基于Edgebreaker的三维网格编解码器,以实现对三维网格几何信息、连接信息以及属性信息的压缩。由于Edgebreaker要求待编码网格为流形结构,因此在目前提出的方案中会存在
将非流形结构的三维网格拆分成流形结构再进行编码。因此在无损模式下,MPEG提供的基于Edgebreaker的三维网格编解码器实现会记录并编码由于拆非流形而产生的重复点信息,并对拆开后的流形网格的每个顶点添加一个标识来判断其是否是由于拆非流形而产生的重复点,从而依据该标识和由于拆分非流形而产生的重复点信息在解码端恢复原始三维网格的非流形结构以实现三维网格的无损编码。
MPEG目前提供的基于Edgebreaker的三维网格压缩工具将三维网格的连接信息、几何信息和属性信息(例如,UV坐标)分别进行编码并进行存储。UV坐标是二维坐标,水平方向是U,垂直方向是V。其中的核心模块,即编码连接信息的模块使用了Edgebreaker算法。以属性信息为UV坐标为例,对几何信息和UV坐标的编码则采用了常规的压缩方法,即对数据进行量化、预测压缩(例如,平行四边形预测)和熵编码。由于该工具采用了连接关系驱动的编码方法,对几何信息和UV坐标的编码将遵循连接信息的编码顺序。通过这种方式将连接关系编码的顶点顺序隐含在几何信息的顶点顺序中来避免单独传输连接关系编码的顶点顺序,从而节省了这部分的比特开销。
2、Edgebreaker
Edgebreaker(可简称为EB)方法是具有压缩性能好、便于实现、可以给出压缩比上限等优点的一种三维网格连接关系编码方法。Edgebreaker方法本身只描述了三维网格连接信息的压缩方法,还要通过几何信息压缩和熵编码等才能实现对三维网格的压缩。
Edgebreaker编码技术对与球体同胚的三角形网格的压缩效率能够达到每个三角形2位或更少。编码算法使用五种不同的模式(称为C、L、E、R和S)以深度优先顺序访问网格的每个三角形。根据每个三角形所处的模式,对其进行标记,生成CLERS字符串,得到对网格连接关系的紧凑表示。
Edgebreaker方法的五种模式,如图1所示。Edgebreaker方法将网格分为已遍历部分和未遍历部分,两部分的边界被称为活动边界。在Edgebreaker的编码过程中,通过活动边界上的活动边访问待遍历的三角形,并根据活动边与其所处三角形的关系来选择使用哪种模式。将活动边所在三角形中的另一个顶点称为第三个顶点。如果第三个顶点不处于活动边界上,那么当前三角形标记为C模式。如果第三个顶点处于活动边界上,并且按照逆时针顺序,处于当前活动边顶点的下一个,那么当前三角形标记为R模式。如果第三个顶点处于活动边界上,并且按照逆时针顺序,处于当前活动边顶点的上一个,那么当前三角形标记为L模式。如果第三个顶点处于活动边界上,并且按照逆时针顺序,既是当前活动边顶点的上一个顶点,又是当前活动边的下一个顶点,那么当前三角形标记为E模式。如果第三个顶点处于活动边界上,但是按照逆时针顺序,既不是当前活动边顶点的上一个顶点,又不是当前活动边的下一个顶点,那么当前三角形标记为S模式。
在每次标记一个三角形之后,都会更新活动边界,并按照一定规则选择下一个活动边。当遍历完所有的三角形之后,对得到的CLERS字符串进行熵编码,可以得到更高的压缩效率。
图2给出了一个使用EB编码二维网格的示意图。根据EB的编码规则,最终熵编码的模式码字为CCRRSLCRSERRELCRRRCRRRE。
由于Edgebreaker方法的五种模式不能处理非流形网格,因此使用Edgebreaker方法前须将网格转化成流形网格。
相关技术中,在对三维网格的纹理图进行编码时,直接对BGR444格式的纹理图进行编码,导致三维网格的编解码效率较低。
下面结合附图,通过一些实施例及其应用场景对本申请实施例提供的三维网格编码方法、三维网格解码方法、装置及设备进行详细地说明。
参见图3,图3是本申请实施例提供的一种三维网格编码方法的流程图,可以应用于编码端,如图3所示,三维网格编码方法包括以下步骤:
步骤101、对三维网格的第一颜色空间格式的纹理图进行颜色空间格式转换,得到第二颜色空间格式的纹理图。
其中,第一颜色空间格式可以为三维网格的纹理图的原始颜色空间格式。第一颜色空间格式可以为RGB颜色空间格式,示例地,第一颜色空间格式可以为BGR444,BGR555,RGB555,或RGB 565等等;或者,第一颜色空间格式可以为YUV颜色空间格式;或者,第一颜色空间格式可以为CMY颜色空间格式;或者,第一颜色空间格式可以为CMYK颜色空间格式;或者,第一颜色空间格式可以为HSV颜色空间格式;等等,本实施例对第一颜色空间格式不进行限定。RGB是指红(red)、绿(green)和蓝(blue)。CMY是指青(Cyan)、洋红(Magenta)和黄(Yellow)。YUV中Y表示亮度(Luminance),UV分别表示色度(Chrominance)和浓度(Chroma)。CMYK是指青(Cyan)、洋红(Magenta)、黄(Yellow)和黑色(black)。HSV是指色度-饱和度-数值(hue-saturation-value)。
另外,第二颜色空间格式可以为进行颜色空间格式转换后的颜色空间格式。第二颜色空间格式和第一颜色空间格式为不同的颜色空间格式。第二颜色空间格式可以为YUV颜色空间格式,示例地,第二颜色空间格式可以为YUV444,YUV420,或YUV422等等;或者,第二颜色空间格式可以为RGB颜色空间格式;第二颜色空间格式还可以为HSV颜色空间格式;或第二颜色空间格式还可以为CMY颜色空间格式;或第二颜色空间格式还可以为Lab颜色空间格式;等等,本实施例对第二颜色空间格式不进行限定。其中,Lab中L是亮度,a和b是两个颜色通道。
一种实施方式中,第二颜色空间格式与第一颜色空间格式为不同颜色空间的颜色空间格式;或,第二颜色空间格式与第一颜色空间格式为相同颜色空间的不同格式。
需要说明的是,可以针对不同的应用场景进行不同的颜色空间格式转换。为提高编解码效率,第二颜色空间格式的纹理图的颜色空间的相关信息量可以小于第一颜色空间格式的纹理图的相关信息量。例如,第二颜色空间格式的纹理图为第一颜色空间格式的纹理图去除了一定的冗余信息后得到的纹理图;或,第二颜色空间格式的纹理图为第一颜色空间格式的纹理图去除了颜色分量间的相关性后得到的纹理图。
需要说明的是,所述对三维网格的第一颜色空间格式的纹理图进行颜色空间格式转换,得到第二颜色空间格式的纹理图,可以是,对三维网格的第一颜色空间格式的纹理图进行无损颜色空间格式转换,得到第二颜色空间格式的纹理图。
步骤102、对所述第二颜色空间格式的纹理图进行编码处理,得到第一纹理图码流。
在本申请实施例中,对三维网格的第一颜色空间格式的纹理图进行颜色空间格式转换,得到第二颜色空间格式的纹理图;对所述第二颜色空间格式的纹理图进行编码处理,得到第一纹理图码流。这样,在三维网格编码过程中通过对三维网格的纹理图进行颜色空间格式转换,支持将三维网格的纹理图转换为其他颜色空间格式的纹理图进行编码,能够提高三维网格的纹理图编码的灵活性。
可选地,所述对三维网格的第一颜色空间格式的纹理图进行颜色空间格式转换,得到第二颜色空间格式的纹理图,包括:
在确定对三维网格的纹理图进行颜色空间格式转换的情况下,对三维网格的第一颜色空间格式的纹理图进行颜色空间格式转换,得到第二颜色空间格式的纹理图。
其中,编码端可以确定是否对三维网格的纹理图进行颜色空间格式转换。编码端可以基于不同的编码需求确定是否对三维网格的纹理图进行颜色空间格式转换。示例地,在要求较高的编解码效率的情况下,可以确定对三维网格的纹理图进行颜色空间格式转换。
该实施方式中,在确定对三维网格的纹理图进行颜色空间格式转换的情况下,对三维网格的第一颜色空间格式的纹理图进行颜色空间格式转换,得到第二颜色空间格式的纹理图,这样,通过判断是否对三维网格的纹理图进行颜色空间格式转换,可支持编码端选择性地对纹理图进行颜色空间格式转换,能够提高三维网格编码过程中对纹理图进行编码的灵活性。
可选地,所述方法还包括:
在确定不对三维网格的纹理图进行颜色空间格式转换的情况下,对所述第一颜色空间格式的纹理图进行编码处理,得到第二纹理图码流。
其中,编码端可以确定是否对三维网格的纹理图进行颜色空间格式转换。编码端可以基于不同的编码需求确定是否对三维网格的纹理图进行颜色空间格式转换。示例地,在对编解码效率要求不高的场景,可以确定不对三维网格的纹理图进行颜色空间格式转换。
该实施方式中,在确定不对三维网格的纹理图进行颜色空间格式转换的情况下,对所述第一颜色空间格式的纹理图进行编码处理,得到第二纹理图码流,这样,通过判断是否对三维网格的纹理图进行颜色空间格式转换,可支持编码端选择性地不对纹理图进行颜色空间格式转换,能够进一步提高三维网格编码过程中对纹理图进行编码的灵活性。
可选地,所述三维网格对应的码流包括第一指示信息的编码结果,所述第一指示信息用于指示编码端是否对三维网格的纹理图进行颜色空间格式转换;
其中,在所述第一指示信息指示编码端对三维网格的纹理图进行颜色空间格式转换的情况下,所述三维网格对应的码流还包括所述第一纹理图码流;或
在所述第一指示信息指示编码端不对三维网格的纹理图进行颜色空间格式转换的情况下,所述三维网格对应的码流还包括第二纹理图码流。
示例地,第一指示信息为“0”,则指示编码端不对三维网格的纹理图进行颜色空间格式转换;否则,第一指示信息指示编码端对三维网格的纹理图进行颜色空间格式转换。
需要说明的是,在所述第一指示信息指示对三维网格的纹理图进行颜色空间格式转换的情况下,所述第一指示信息还可以用于指示所述三维网格的纹理图由所述第一颜色空间格式转换至所述第二颜色空间格式的转换类型;从而解码端可以依据第一指示信息确定编码端进行了何种类型的颜色空间格式转换,便于解码端执行相应颜色空间格式的逆转换以恢复原始的纹理图。
该实施方式中,所述三维网格对应的码流包括所述第一纹理图码流或第二纹理图码流,所述三维网格对应的码流还包括第一指示信息的编码结果,所述第一指示信息用于指示编码端是否对三维网格的纹理图进行颜色空间格式转换,这样,通过第一指示信息指示编码端是否对三维网格的纹理图进行颜色空间格式转换,解码端能够通过该第一指示信息确定是否对解码的纹理图进行颜色空间格式转换,便于解码端重建三维网格。
可选地,在所述第一指示信息指示对三维网格的纹理图进行颜色空间格式转换的情况下,所述第一指示信息还用于指示所述三维网格的纹理图由所述第一颜色空间格式转换至所述第二颜色空间格式的转换类型。
其中,所述第一指示信息可以用于指示在编码端将所述三维网格的纹理图由所述第一颜色空间格式转换至所述第二颜色空间格式。一种实施方式中,第一指示信息可以为预设列表中的值,该预设列表中不同的值表示不同的颜色空间格式的转换类型。示例地,第一指示信息为“0”,则指示编码端不对三维网格的纹理图进行颜色空间格式转换;第一指示信息为“1”,则指示在编码端所述三维网格的纹理图由RGB颜色空间的BGR444格式转换至YUV颜色空间的YUV444格式;第一指示信息为“2”,则指示在编码端所述三维网格的纹理图由RGB颜色空间的BGR444格式转换至RGB颜色空间的RGB444格式;第一指示信息为“3”,则指示在编码端所述三维网格的纹理图由RGB颜色空间的BGR444格式转换至YUV颜色空间的YUV420格式;第一指示信息为“4”,则指示在编码端所述三维网格的纹理图由RGB颜色空间的BGR444格式转换至YUV颜色空间的YUV422格式;第一指示信息为“5”,则指示在编码端所述三维网格的纹理图由RGB颜色空间的BGR555格式转换至YUV颜色空间的YUV444格式;等等。
该实施方式中,在所述第一指示信息指示对三维网格的纹理图进行颜色空间格式转换的情况下,所述第一指示信息还用于指示所述三维网格的纹理图由所述第一颜色空间格式转换至所述第二颜色空间格式的转换类型,从而解码端能够通过该第一指示信息确定编码端进行了何种类型的颜色空间格式转换,便于解码端执行相应颜色空间格式的逆转换以恢复原始的纹理图。
可选地,所述第二颜色空间格式的纹理图的颜色空间的相关信息量小于所述第一颜色
空间格式的纹理图的颜色空间的相关信息量。
其中,第二颜色空间格式的纹理图可以为第一颜色空间格式的纹理图去除了一定的冗余信息后得到的纹理图;或,第二颜色空间格式的纹理图可以为第一颜色空间格式的纹理图去除了颜色分量间的相关性后得到的纹理图。
相关技术中,在对三维网格的纹理图进行编码时,直接对BGR444格式的纹理图进行编码。由于解码端对不同颜色空间格式的视频进行解码的效率不同,而解码端对BGR444格式的视频进行解码的效率较低,导致三维网格的编解码效率较低。在该实施方式中,在三维网格编码过程中通过对三维网格的纹理图进行颜色空间格式转换,将三维网格的纹理图转换为编解码效率较高的颜色空间格式的纹理图,能够提高三维网格的编解码效率。
可选地,所述第二颜色空间格式与所述第一颜色空间格式为不同颜色空间的颜色空间格式;或,所述第二颜色空间格式与所述第一颜色空间格式为相同颜色空间的不同颜色空间格式。
可选地,所述第一颜色空间格式为RGB颜色空间格式,所述第二颜色空间格式为YUV颜色空间格式。
该实施方式中,所述第一颜色空间格式为RGB颜色空间格式,所述第二颜色空间格式为YUV颜色空间格式,从而在对三维网格的纹理图进行编码时将RGB颜色空间的纹理图转换为YUV颜色空间的纹理图进行编码,由于解码端解码YUV颜色空间的视频的效率高于解码端解码RGB颜色空间的视频的效率,通过颜色空间格式转换能够提高三维网格的编解码效率。
本申请实施例还提供一种三维网格编码方法,所述方法包括:
在确定不对三维网格的纹理图进行颜色空间格式转换的情况下,对所述第一颜色空间格式的纹理图进行编码处理,得到第二纹理图码流。
可选地,所述三维网格对应的码流包括所述第二纹理图码流和第一指示信息的编码结果,所述第一指示信息指示编码端不对三维网格的纹理图进行颜色空间格式转换。
参见图4,图4是本申请实施例提供的一种三维网格解码方法的流程图,可以应用于解码端设备,如图4所示,三维网格解码方法包括以下步骤:
步骤201、对三维网格对应的码流中的第一纹理图码流进行解码处理,得到第二颜色空间格式的纹理图;
步骤202、对所述第二颜色空间格式的纹理图进行颜色空间格式转换,得到第一颜色空间格式的纹理图;
步骤203、基于所述第一颜色空间格式的纹理图进行网格重建处理,得到重建的三维网格。
可选地,所述方法还包括:
对所述三维网格对应的码流中的第一指示信息的编码结果进行解码,得到所述第一指示信息;
所述对三维网格对应的码流中的第一纹理图码流进行解码处理,得到第二颜色空间格式的纹理图,包括:
在基于所述第一指示信息确定对纹理图进行颜色空间格式转换的情况下,对三维网格对应的码流中的第一纹理图码流进行解码处理,得到第二颜色空间格式的纹理图。
可选地,所述对所述第二颜色空间格式的纹理图进行颜色空间格式转换,得到第一颜色空间格式的纹理图,包括:
在基于所述第一指示信息确定将纹理图由第二颜色空间格式转换至第一颜色空间格式的情况下,将所述第二颜色空间格式的纹理图由所述第二颜色空间格式转换至第一颜色空间格式,得到所述第一颜色空间格式的纹理图。
可选地,所述方法还包括:
在基于所述第一指示信息确定对纹理图不进行颜色空间格式转换的情况下,对三维网格对应的码流中的第二纹理图码流进行解码处理,得到第一颜色空间格式的纹理图。
可选地,所述第二颜色空间格式的纹理图的颜色空间的相关信息量小于所述第一颜色空间格式的纹理图的颜色空间的相关信息量。
可选地,所述第二颜色空间格式与所述第一颜色空间格式为不同颜色空间的颜色空间格式;或,所述第二颜色空间格式与所述第一颜色空间格式为相同颜色空间的不同颜色空间格式。
可选地,所述第一颜色空间格式为RGB颜色空间格式,所述第二颜色空间格式为YUV颜色空间格式。
需要说明的是,本实施例作为与图3所示的实施例中对应的解码侧的实施方式,其具体的实施方式可以参见图3所示的实施例的相关说明,为了避免重复说明,本实施例不再赘述,且还可以达到相同有益效果。
本申请实施例还提供一种三维网格解码方法,所述方法包括:
对三维网格对应的码流中的第一指示信息的编码结果进行解码,得到所述第一指示信息;
在所述第一指示信息指示对纹理图不进行颜色空间格式转换的情况下,对三维网格对应的码流中的第二纹理图码流进行解码处理,得到第一颜色空间格式的纹理图;
基于所述第一颜色空间格式的纹理图进行网格重建处理,得到重建的三维网格。
本申请实施例还提出了一种基于Edgebreaker的三维网格纹理图无损编解码框架及方法。如图5所示,该编码框架主要包括预处理模块(包含拆分非流形结构模块)、连接关系编码模块、几何信息编码模块、属性信息编码模块、纹理图无损颜色空间格式转换以及纹理图编码模块等。在编码三维网格时能够使用Edgebreaker对三维网格进行无损编码。
以第一颜色空间格式为RGB颜色空间格式,第二颜色空间格式为YUV颜色空间格式,属性信息为UV坐标(也可描述为纹理坐标,也可简称为UV或纹理)为例,编码端进行三维网格编码的过程如下:
(1)在编码端判断几何坐标和UV坐标是否具有相同的连接关系并记录该信息。对于表示网格中几何坐标和UV坐标是否具有相同的连接关系的信息,例如:可以通过设置一个网格中几何坐标和UV坐标是否具有相同的连接关系的标识来表示,此处不限制其表示方法。
(2)拆分网格中可能存在的非流形点和非流形边,将网格转化为流形网格。拆分非流形结构是通过增加具有相同几何信息和属性信息的重复点实现的。在拆分非流形时,若几何坐标和UV坐标具有相同的连接关系即几何坐标和UV坐标是一一对应的关系,则只需记录一组由于拆非流形结构产生的重复点索引信息;若几何坐标和UV坐标具有不同的连接关系比如一个几何坐标顶点对应多个纹理坐标顶点,则需分别记录由于拆非流形结构产生的几何重复点索引信息和UV重复点索引信息。对于由于拆非流形结构产生的重复点索引信息的表示方式,可以是恢复非流形时需要合并到的目标顶点索引,也可以是重复点组索引:具有相同索引的点属于同一个重复点组即具有相同的顶点信息,此处不限制其表示方式。
(3)编码指示几何坐标和UV坐标是否具有相同连接关系的信息。使用Edgebreaker方法编码连接关系,得到可以简洁表示连接关系的CLERS模式字符串,使用熵编码对模式字符串进行压缩,得到连接关系的子码流。使用如平行四边形预测等方法编码网格的几何信息,得几何信息子码流。如果网格存在UV坐标等属性信息,使用如相似三角形预测等方法编码网格的UV坐标,得到属性信息子码流。
(4)编码一个指示信息(即第一指示信息)来指示是否对纹理图进行无损颜色空间格式转换。如对纹理图进行无损颜色空间格式转换,则将纹理图由RGB颜色空间格式(即第一颜色空间格式)转换成YUV颜色空间格式(即第二颜色空间格式),使用视频编码器编码YUV格式的纹理图,得到纹理图子码流。此处只强调由RGB颜色空间格式转换到YUV颜色空间,不限制纹理图的具体格式,例如纹理图在RGB颜色空间可以是BGR444格式,也可以是RGB444格式。如果不对纹理图进行颜色空间格式转换,则直接使用视频编码器无损编码RGB颜色空间的视频。
(5)对于非流形结构信息的编码,包含三部分需编码的信息:指示网格中是否存在非流形结构的信息、顶点是否是拆非流形而产生的重复点的标识信息和由于拆非流形结构产生的重复点索引信息。其中,对于指示网格中是否存在非流形结构的信息,可以通过设置一个网格中是否存在非流形结构的标识来表示,也可以使用网格中由于拆非流形结构而产生的重复点的数量表示,此处不限制其表示方法。在编码非流形结构信息时,首先编码表示网格中是否存在非流形结构的信息。如果网格中存在非流形结构,则分为两种情况:若几何坐标和UV坐标具有相同的连接关系,则每个顶点设置一个标识表示其是否是拆非流形而产生的重复点,并编码该信息以及因拆分非流形而产生的重复点索引信息;若几何坐标和UV坐标具有不同的连接关系,则分别为每个几何顶点和每个UV顶点设置一个标识表示其是否是拆非流形而产生的几何重复点或UV重复点,并分别编码几何顶点的非流
形标识信息和拆非流形而产生的几何重复点的索引信息、UV顶点的非流形标识信息和拆非流形而产生的UV重复点的索引信息。
以第一颜色空间格式为RGB颜色空间格式,第二颜色空间格式为YUV颜色空间格式,属性信息为UV坐标(也可描述为纹理坐标,也可简称为UV或纹理)为例,如图6所示,解码端进行三维网格解码的过程如下:
(1)在解码端,解码得到表示网格中几何坐标和UV坐标是否具有相同连接关系的信息。熵解码得到CLERS模式字符串,使用模式字符串重建几何坐标和UV坐标的连接关系。使用平行四边形反预测等方法解码网格的几何信息,使用相似三角形反预测等方法解码网格的UV坐标。在解码非流形结构信息时,首先解码网格中是否存在非流形结构的指示信息。如果网格中存在非流形结构,则进一步解码得到顶点的非流形标识信息和拆非流形而产生的重复点索引信息,将由于拆非流形而产生的的重复点合并,并调整连接关系,进而恢复网格中的非流形结构。
(2)解码是否进行无损颜色空间格式转换的指示信息(如第一指示信息),并使用视频解码器解码纹理图,如果在编码端对纹理图的颜色空间格式进行了无损颜色空间格式转换,则解码得到的是YUV格式的纹理图,根据指示信息在解码端对纹理图进行无损颜色空间格式转换,将纹理图由YUV颜色空间格式(即第二颜色空间格式)转换到RGB颜色空间格式(即第一颜色空间格式),从而实现纹理图的无损编解码。此处只强调由YUV颜色空间格式转换到RGB颜色空间格式,不限制纹理图的具体格式,例如纹理图在RGB颜色空间可以是BGR444格式,也可以是RGB444格式。如果在编码端未对纹理图的颜色空间格式进行无损颜色空间格式转换,则解码得到的是RGB格式的纹理图,此时在解码端无需进行颜色空间格式转换。
通过本申请实施例的编解码框架,能够完成三维网格的无损编解码。
本申请实施例的三维网格编码框架如图5所示,在该实施例中以第一颜色空间格式为RGB颜色空间格式,第二颜色空间格式为YUV颜色空间格式,属性信息为UV坐标(也可描述为纹理坐标,也可简称为UV或纹理)为例进行说明。
(1)在预处理步骤中,首先判断几何坐标和UV坐标是否具有相同的连接关系,然后对存在非流形结构的输入网格进行拆分以得到流形网格,并记录因拆分非流形而产生的重复点信息。需要说明的是,该步骤也可以包含滤除重复点,添加虚拟点等其它编码所需的预处理模块。为方便说明,图5中仅列出了本申请实施例针对的拆分非流形结构的模块。
(2)编码表示网格中几何坐标和UV坐标是否具有相同的连接关系的信息;对流形网格,使用Edgebreaker方法编码连接信息,得到模式字符串,并对其进行熵编码;编码流形网格的几何信息,例如可以使用平行四边形预测编码方法,此处不限制几何信息的编码方法;如果网格存在UV坐标等属性信息,可以使用如相似三角形预测编码等方法进行编码,此处不限制属性信息的编码方法;编码非流形结构信息时,首先编码网格中是否存在非流形的表示信息。如果网格中存在非流形结构,则根据网格中几何坐标和UV坐标是
否具有相同的连接关系分为两种情况:如果网格中几何坐标和UV坐标具有相同的连接关系即几何坐标和UV坐标是一一对应的关系时,按照相同的编码顺序编码一组顶点的非流形标识信息和拆非流形而产生的重复点索引信息;如果网格中几何坐标和UV坐标具有不同的连接关系即几何坐标和UV坐标不是一一对应的关系时,则分别按照几何坐标和UV坐标的编码顺序编码几何顶点的非流形标识信息和拆非流形而产生的几何重复点索引信息、UV顶点的非流形标识信息和拆非流形而产生的UV重复点索引信息。此处关于顶点的非流形标识信息,是通过为拆分后的流形网格中的每个顶点编码一个标志位,来标识该顶点是否是拆非流形而产生的重复点。
(3)可以编码一个指示信息来指示是否对纹理图进行无损颜色空间格式转换。如对纹理图进行无损颜色空间格式转换,则在无损颜色空间格式转换模块,将纹理图由RGB颜色空间格式(即第一颜色空间格式)转换到YUV颜色空间格式(即第二颜色空间格式),使用视频编码器编码YUV格式的纹理图,得到纹理图子码流。如果不对纹理图进行颜色空间格式转换,则直接使用视频编码器无损编码RGB颜色空间格式的视频。最后,将多路码流进行混流,得到最终输出码流。
需要说明的是,不强调三维网格连接关系编码和顶点信息编码的先后顺序,可以是在编码连接关系的同时,编码几何信息、属性信息和非流形结构信息;也可以是在编码完连接关系后,再依次根据连接关系的编码顺序编码几何信息、属性信息和非流形结构信息。在编码顶点的几何信息和属性信息时,拆非流形产生的重复点的几何信息和属性信息可以跳过编码即只编码一次,也可以不跳过编码,此处不强调是否跳过拆非流形产生的重复点的几何信息和属性信息的编码。
本申请实施例的三维网格解码框架如图6所示,在该实施例中以第一颜色空间格式为RGB颜色空间格式,第二颜色空间格式为YUV颜色空间格式,属性信息为UV坐标(也可描述为纹理坐标,也可简称为UV或纹理)为例进行说明。
(1)首先,将码流分解得到各路子码流。然后解码表示网格中几何坐标和UV坐标是否具有相同的连接关系的信息;熵解码连接关系子码流,得到模式字符串,若几何坐标和UV坐标具有相同的连接关系,则只需重建一套连接关系;若几何坐标和UV坐标具有不同的连接关系,则需分别重建几何坐标的连接关系和UV坐标的连接关系;使用与编码端相对应的解码方法解码网格的几何信息;使用与编码端相对应的解码方法解码网格的属性信息;在解码非流形结构信息时,首先解码网格中是否存在非流形的信息,如果网格中存在非流形结构,则依据网格中几何坐标和UV坐标是否具有相同的连接关系分为两种情况:如果网格中几何坐标和UV坐标具有相同的连接关系即几何坐标和UV坐标是一一对应的关系时,进一步解码得到一组顶点的非流形标识信息和拆非流形而产生的重复点索引信息;如果网格中几何坐标和UV坐标具有不同的连接关系即几何坐标和UV坐标不是一一对应的关系时,则分别解码出几何顶点的非流形标识信息和拆非流形而产生的几何重复点索引信息、UV顶点的非流形标识信息和拆非流形而产生的UV重复点索引信息。在后
处理步骤中,将由于拆非流形而产生的重复点进行合并,并调整连接关系,恢复网格中的非流形结构。完成含有非流形结构网格的无损编解码。需要说明的是,后处理步骤中也可以包含恢复滤除的重复点、删除添加的虚拟顶点等正确解码所需的后处理模块。为方便说明,图6中仅列出了本申请实施例针对的恢复非流形结构的模块。
(2)解码是否进行无损颜色空间格式转换的指示信息(如第一指示信息),并使用视频解码器解码纹理图,如果在编码端对纹理图的颜色空间格式进行了无损颜色空间格式转换,则解码得到的是YUV格式的纹理图,根据指示信息在解码端对纹理图进行无损颜色空间格式转换,将纹理图由YUV颜色空间格式(即第二颜色空间格式)转换到RGB颜色空间格式(即第一颜色空间格式),从而实现纹理图的无损编解码。如果在编码端未对纹理图的颜色空间格式进行无损颜色空间格式转换,则解码得到的是RGB格式的纹理图,此时在解码端无需进行颜色空间格式转换。
下面通过一个具体的实施例对三维网格编解码方法进行说明:
编码端:
如图5所示,三维网格无损编码框架主要分为五部分:预处理中的拆分非流形结构、连接关系编码、几何信息编码、属性信息编码以及非流形结构信息编码。在该实施例中以第一颜色空间格式为RGB颜色空间格式,第二颜色空间格式为YUV颜色空间格式,属性信息为UV坐标(也可描述为纹理坐标,也可简称为UV或纹理)为例,对各部分分别进行介绍:
(1)预处理
输入:原始网格;
输出:表示网格中几何坐标和UV坐标是否具有相同连接关系的信息、流形网格、拆非流形产生的重复点信息。
在拆除非流形结构前,首先判断几何坐标和UV坐标是否具有相同的连接关系。可以首先判断出几何顶点数量与UV顶点数量是否一致,若一致则再根据几何三角形与UV三角形即几何连接关系和UV连接关系是否一致来判断,若几何三角形与UV三角形不一致则几何坐标和UV坐标具有不同的连接关系;若几何顶点的数量和UV顶点的数量不一致,但几何三角形的数量与UV三角形的数量一致,则几何坐标和UV坐标也具有不同的连接关系。也可以用其他方式判断,此处不限制其判断方法。
拆分非流形结构主要分为两部分:拆分非流形边和拆分非流形点。
拆分非流形边的第一步是找到非流形边。非流形边的判断条件是一条边同时存在于三个或更多的三角形中。具体实现的方法:可以是,建立一个数据结构来存储每条边所在的三角形,通过查询该边对应的三角形数量找出非流形边;也可以是,通过构造转角台(CornerTable)来建立网格中角和边之间的对应关系,进而找出非流形边。具体地,对于流形网格,每条边最多与两个角相对,相对的两个角称为对角。如图7所示,角a与角d与边bc相对,角a与角d为对角;而对于非流形边,会有三个或更多的对角。因此,通
过角与边的对应关系也可以找出非流形边。
拆分非流形边的第二步是添加顶点,并修改连接关系。在找到非流形边后,为非流形边的两个顶点分别创建重复顶点,选择非流形边所在的一个三角形t,使该三角形中的第三个顶点与新添加的两个顶点构成新的三角形t’,用t’替换原三角形t,迭代此过程直到非流形边转化成流形边。
拆分非流形点首先需要构建CornerTable,建立每个顶点和该顶点的角之间的对应关系。对于每一个顶点执行两步操作。第一步,从顶点的某一个角开始,依次遍历与该角相邻且构成一个扇形的所有角,将顶点和遍历到的角标记为已遍历。如果在执行完上述过程后,有顶点仍存在未遍历过角,则说明该顶点为非流形点。第二步,对于每个非流形点,创建一个重复点,并修改连接关系,将第一步中未遍历到的角连接到新添加的重复点,将非流形点拆分为两个流形顶点。重复这一过程,直到所有的顶点都转换成流形点为止。
若几何坐标和UV坐标具有相同的连接关系,则执行一次上述过程,并记录一组该过程产生的重复点信息;若几何坐标和UV坐标具有不同的连接关系,则几何和UV分别执行一次上述过程:分别构建几何和UV的CornerTable,并分别拆分几何的非流形边和几何的非流形点、拆分UV的非流形边和UV的非流形点,并分别记录该过程产生的几何重复点信息和UV重复点信息。
(2)连接关系编码
输入:流形网格的连接关系,表示网格中几何坐标和UV坐标是否具有相同连接关系的信息;
输出:编码后的连接关系子码流和顶点编码顺序。
本实施例使用Edgebreaker方法编码三维网格的连接关系,通过建立CornerTable来表示网格的连接关系,并利用CornerTable遍历网格中的所有三角形,生成Edgebreaker的CLERS模式字符串。
CornerTable用于表示网格中的角与顶点以及三角形之间的关系。在构建CornerTable之前首先需要对角进行编号,按照网格中三角形面片的顺序遍历三角形,对于每个三角形按照逆时针顺序为角进行编号,如果网格有f个三角形面片,那么网格会有3f个角。这样编号的好处是,通过角的序号,可以计算出当前角所在的三角形序号,如式(1)所示;还可以计算出按照逆时针方向,当前角c的前一个角cp和后一个角cn的序号,如式(2)和式(3)所示。
fi=c/ 3 (1)
fi=c/ 3 (1)
其中,c为当前角的索引,fi为当前角c所在三角形的序号,“/”为整数除法,对所得结果向下取整。
cp=(fi*3)+(c-1)%3 (2)
cp=(fi*3)+(c-1)%3 (2)
其中,c为当前角的索引,fi为当前角c所在三角形的序号,“*”为乘法,“%”为取模运算。
cp=(fi*3)+(c+1)%3 (3)
cp=(fi*3)+(c+1)%3 (3)
其中,c为当前角的索引,fi为当前角c所在三角形的序号,“*”为乘法,“%”为取模运算。
CornerTable包含四部分:分别是V表、O表、U表以及M表。其中,V表存储每个角对应的顶点索引,O表存储每个角的对角索引,U表存储在遍历过程中每个三角形是否被遍历过的标识,M表存储在遍历过程中每个顶点是否被遍历过的标识。
利用CornerTable可以构造如图8所示的关系,其中c表示当前角,c.p表示当前角c的前一个角(按逆时针方向),c.n表示当前角c的下一个角。c.o为当前角c的对角,可以查询O表得到。c.t为c所在三角形的序号,可以由式1计算得到。c.v表示当前角的顶点,可以查询V表得到。c.l表示当前角c左边的角,通过查询O表中c.p的对角得到;c.r表示当前角c右边的角,通过查询O表中c.n的对角得到。
利用CornerTable构建起角与顶点及三角形之间的关系后,可以按照螺旋形顺序遍历网格,得到表示网格连接关系的Edgebreaker的CLERS模式字符串。此时,五种模式的判断条件以及遍历规则如图9所示。当前遍历的角为x,如果x所对应的顶点x.v没有被访问过,那么当前的三角形为C模式,并且下一个待遍历的三角形为x.r所在的三角形;否则,如果x.l所在的三角形被访问过,那么当前的三角形为L模式,并且下一个待遍历的三角形为x.r所在的三角形;如果x.r所在的三角形被访问过,那么当前的三角形为R模式,并且下一个待遍历的三角形为x.l所在的三角形;如果顶点x.v被访问过,而x.l与x.r所在的三角形都没有被访问过,那么当前三角形为S模式,此时遍历路径会产生两个分支,采用深度优先遍历的原则,首先遍历的三角形为x.r所在的三角形,并且要将x.l所在的三角形存入堆栈,等待x.r所在的分支遍历完成后,再遍历x.l所在的三角形;如果x.l与x.r所在的三角形都被访问过,那么当前三角形的模式为E,此时遍历到了当前遍历路径分支的终点。
在网格中随机选择一个初始三角形,按照上述规则遍历网格中的三角形,并生成CLERS模式字符串。当遍历路径终结,但网格仍存在为遍历到的三角形时,随机选择一个未遍历的三角形,开始下一次遍历,直到网格中所有的三角形都被遍历过为止。
使用熵编码对CLERS模式字符串进行压缩,得到最终的连接信息码流。
若几何坐标和UV坐标具有相同的连接关系,则执行一次上述过程即可;若几何坐标和UV坐标具有不同的连接关系,由于几何三角形和纹理三角形数量一致且对应,只是对应的几何坐标索引和UV坐标索引不是一一对应的关系,因此只需根据几何的CornerTable构建一次CLERS模式字符串并编码。而在该情况下对于UV,则在几何的每个连通区域的模式字符串编码完成后,遍历已经遍历过的角,根据UV的TC表和OTC表记录并编码UV连接关系与几何连接关系的差异信息。其中,TC表存储纹理三角形中的每个角对应的UV顶点索引,OTC表存储纹理三角形中的每个对角索引。
(3)几何信息编码
输入:流形网格的几何信息和连接关系编码顺序;
输出:几何信息子码流以及几何信息编码顺序。
编码几何信息可以采用多种方法,如差值预测编码算法、平行四边形预测编码算法、多平行四边形预测编码算法等,此处不强调具体的编码方法。以平行四边形预测编码算法为例:设有a、b、c、d四个顶点,构成如图10所示的网格中相邻的两个三角形。
其中,a、b、c点的几何信息已编码,d点的几何信息待编码,可以使用式(4)计算出d点几何坐标的预测值d’。
d′(x,y,z)=b(x,y,z)+c(x,y,z)-a(x,y,z) (4)
d′(x,y,z)=b(x,y,z)+c(x,y,z)-a(x,y,z) (4)
得到d’后,计算d’与d点三维坐标的差值,如式(5)所示:
Δd(x,y,z)=d(x,y,z)-d′(x,y,z) (5)
Δd(x,y,z)=d(x,y,z)-d′(x,y,z) (5)
对Δd进行熵编码得到几何信息的码流。
对于无法使用平行四边形预测的三角形,比如处于网格边界的三角形,使用差值编码方法编码几何信息。即使用相邻已编码顶点的坐标值,作为当前顶点坐标的预测值,计算并预测残差。
(4)属性信息编码
输入:流形网格的属性信息和连接关系编码顺序;
输出:属性信息子码流以及属性信息的编码顺序。
三维网格属性信息一般包括UV坐标、法向量等,以UV坐标为例。UV坐标可以采用的编码方法有很多种,包括差值预测编码、平行四边形预测编码以及相似三角形预测编码等,此处不强调具体的编码方法。下面描述相似三角形预测算法。
首先选取一个三维网格中的三角形作为初始三角形,对初始三角形的三个顶点不进行预测直接编码UV坐标,并且把初始三角形的边存入边集合中,这个集合可以是满足一定存取准则的数据结构。之后取出一个集合中的边τ,预测下一个新三角形中τ的对顶点UV坐标。并且将新三角形中除τ之外的两边放入集合内。记待预测点为点C,边τ两端点分别为N,P,通过τ与新三角形相邻的三角形对顶点为O,C在τ上的投影点X。如图11所示,由于点N,P,O三点的UV坐标都先于C点编码,因此可以利用这三点预测C点的UV坐标。具体计算流程如下:
设Cuv,Xuv,Nuv,Puv,Ouv分别为各点的UV坐标,CG,XG,NG,PG,OG为各点的几何坐标。首先使用式(6)及式(7)计算点X的UV坐标:
其中,等以G为下标的向量表示均为相应各点间的几何坐标的向量表示;同理,等以UV为下标的向量表示均为相应各点间的UV坐标的向量表示。
使用式(8)计算向量Rotated()表示对向量进行90度翻转:
最后使用式(9)、式(10)及式(11)计算C点预测UV坐标PredC:
其中,和均表示C点和O点间UV坐标的向量,但为不同计算方式/取值的表示形式。
得到UV坐标预测值之后,再与原始UV坐标相减得到残差值。
编码UV坐标步骤如下:
(a)从连接性关系中选取一个初始三角形,不进行预测直接编码初始三角形三个顶点的UV坐标。将初始三角形边存入边集合中。
(b)按照存取准则从集合中选取边τ,编码与τ组成的新三角形对顶点的UV坐标。利用三角形三维到二维的投影关系,依据以上所述的UV坐标预测值计算过程计算待编码点的预测值。将UV坐标原始值减去预测值得到残差。
(c)将新三角形的两条边加入边集合中,移除集合顶部的边τ。从集合中取出下一条边,继续编码该边邻接三角形的对顶点UV坐标,返回步骤3,直到所有顶点的UV坐标编码完成。
(d)熵编码UV坐标残差,输出UV坐标码流。
(5)非流形结构信息编码
输入:表示网格中几何坐标和UV坐标是否具有相同连接关系的信息、表示网格中是否存在非流形结构的信息、顶点的非流形标识、拆非流形而产生的重复点索引信息、几何信息编码顺序、属性信息编码顺序;
输出:非流形结构信息子码流。
首先,编码指示网格中是否存在非流形结构的信息。以设置是否存在非流形结构的标识为例:如果网格中不存在非流形结构,即因拆非流形而产生的重复点数量为0,将标识置0,不需要再编码顶点的非流形标识和拆非流形而产生的重复点索引信息;如果网格中存在非流形结构,即因拆非流形而产生的重复点数量大于0,将标识置1,然后编码顶点的非流形标识和拆非流形而产生的重复点索引信息。
因拆非流形而产生的重复点包括几何重复点和UV重复点两部分。依据网格中几何坐标和UV坐标是否具有相同的连接关系,将编码顶点的非流形标识和拆非流形而产生的重复点索引信息分为两种情况:第一种情况是网格中几何坐标和UV坐标具有相同的连接关系即几何坐标和UV坐标是一一对应的关系时,则直接编码一组顶点的非流形标识和拆非流形而产生的重复点索引信息,索引信息可以根据编码端几何坐标和UV坐标的编码顺序得到;第二种情况是网格中几何坐标和UV坐标具有不同的连接关系即几何坐标和UV坐标不是一一对应的关系时,则分别编码几何顶点的非流形标识和拆非流形而产生的几何重复点索引信息、UV顶点的非流形标识和拆非流形而产生的UV重复点索引信息,索引信
息可以分别根据编码端的几何坐标编码顺序和UV坐标编码顺序得到。
具体实现是:若网格中几何坐标和UV坐标具有相同的连接关系,则对流形网格中的每个顶点设置一个标志位,用于表示当前位置的点是否是由于拆非流形而产生的重复点,并编码由于拆非流形而产生的重复点索引信息;若网格中几何坐标和UV坐标具有不同的连接关系,则分别对流形网格中的每个几何顶点和每个UV顶点设置一个标志位,分别用于表示当前位置的几何顶点和UV顶点是否是由于拆非流形而产生的重复点,并分别编码由于拆非流形而产生的几何重复点索引信息和UV重复点索引信息。然后对按照相应的编码顺序排列的标志位二进制字符串序列和拆非流形而产生的重复点索引信息进行熵编码,得到非流形结构信息码流。
非流形结构信息码流在总码流中可以有多种存放方式:一种是将非流形结构信息码流作为单独的一路子码流;另一种是将几何非流形结构信息的码流存放到几何信息子码流中,将UV非流形结构信息的码流存放到属性信息子码流中;还可以将几何非流形结构信息的码流和UV非流形结构信息的码流作为两路子码流存放到总码流中。此处不强调非流形结构信息码流在总码流中的存放方式。
(6)无损颜色空间格式转换模块
输入:BGR444格式的纹理图(此处以BGR444格式为例说明);
输出:YUV444格式的纹理图。
可以编码一个指示信息来指示是否对纹理图进行无损颜色空间格式转换。如对纹理图进行无损颜色空间格式转换,则对输入的RGB颜色空间格式(即第一颜色空间格式)的纹理图进行无损的颜色空间格式转换,得到YUV颜色空间格式(即第二颜色空间格式)的纹理图。此处无损颜色空间格式转换可以有多种实现方式,本申请实施例不限制无损颜色空间格式转换的具体实现方式。例如,可以使用如式(12)-式(14)所示的颜色空间格式转换方法,将纹理图由RGB颜色空间格式转换到YUV颜色空间格式。
V=R-G (13)
V=R-G (13)
或者,可以使用如式(15)-(17)所示的颜色空间格式转换方法,将纹理图由RGB颜色空间格式转换到YUV颜色空间格式。
U=R-G (16)
V=B-G (17)
U=R-G (16)
V=B-G (17)
其中,round()代表向下取整函数。
(7)纹理图编码模块
如果对纹理图进行无损颜色空间格式转换,则使用视频编码器无损编码YUV颜色空间格式的视频。如果不对纹理图进行颜色空间格式转换,则使用视频编码器无损编码RGB颜色空间格式的视频。此处不限定使用的视频编码器。
解码端:
如图6所示,本申请实施例的三维网格无损解码框架主要分为六部分:连接关系解码、几何信息解码、属性信息解码、非流形结构信息解码、重建流形网格以及后处理中的恢复非流形结构。在该实施例中以第一颜色空间格式为RGB颜色空间格式,第二颜色空间格式为YUV颜色空间格式,属性信息为UV坐标(也可描述为纹理坐标,也可简称为UV或纹理)为例,对各部分分别进行介绍:
(1)连接关系解码
输入:待解码的连接关系子码流,表示几何坐标和UV坐标是否具有相同的连接关系的信息;
输出:流形网格的连接关系和解码的顶点顺序。
先对连接关系子码流进行解码得到模式字符串。按照某种顺序(正序或逆序)遍历模式字符串,根据字符串中相对应的模式来重建连接关系。与编码端一致,若几何坐标和UV坐标具有相同的连接关系,则只需重建一套连接关系;若几何坐标和UV坐标具有不同的连接关系,则先根据解码出来的字符串重建几何的连接关系,然后再遍历当前已经解码出来的连通区域中的角以及当前已经解码出来的连通区域中的UV连接关系与几何连接关系的差异信息,重建UV坐标的连接关系。此外,将顶点的遍历顺序输出至几何信息和属性信息解码模块。
(2)几何信息解码
输入:几何信息子码流、连接关系的解码顺序;
输出:流形网格的几何信息。
网格几何坐标的解码过程是编码过程的逆过程:先熵解码出坐标预测残差。再根据已解码三角形按照平行四边法则预测出待解码点的预测坐标。将预测坐标加上熵解码出的残差值即可得到待解码的几何坐标位置。这里的顶点遍历顺序与编码几何信息的顶点顺序相同。需要说明的是,初始三角形的几何坐标不使用预测编码,而是直接编码它们的几何坐标值。在解码端解码出该三角形的几何坐标后作为初始三角形开始遍历解码其他三角形顶点的几何坐标。另外,此处还可能使用其他解码方法,不强调具体的解码方法,只要与编码端对应即可。
(3)属性信息解码
输入:待解码的属性信息码流、连接关系的解码顺序;
输出:流形网格重建的属性信息。
以UV坐标为例,对UV坐标解码采用与编码端对应的解码方法,此处不强调具体的解码方法。下面描述使用相似三角形预测算法的解码过程。
解码UV坐标步骤如下:
a、熵解码UV坐标码流。
b、解码初始三角形三个顶点的UV坐标,这里不计算预测值,初始三角形是直接编码其UV坐标而不是编码残差。将初始三角形边存入边集合中。
c、按照存取准则从集合中选取边τ,解码与τ组成的新三角形对顶点的UV坐标。先利用三角形三维到二维的映射关系,与编码端一致的计算方式计算待解码点的UV坐标预测值。再将预测值与与熵解码的残差相加,得到重建UV坐标。
d、将新三角形的两条边加入边集合中,移除集合顶部的边τ。从集合中取出下一条边,继续解码该边邻接三角形的对顶点UV坐标,返回步骤c,直到所有顶点的UV坐标解码完成。
(4)非流形结构信息解码
输入:非流形结构信息子码流、表示网格中几何坐标和UV坐标是否具有相同连接关系的信息、几何信息解码顺序和属性信息解码顺序;
输出:指示网格中是否存在非流形结构的信息、顶点的非流形标识、拆非流形而产生的重复点索引信息。
首先,解码得到网格中指示是否存在非流形结构的信息。以该信息为是否存在非流形的标识为例:如果标识为0,则不需要解码顶点的非流形标识和拆非流形而产生的重复点索引信息,并跳过后续恢复非流形结构的模块;如果标识为1,则解码顶点的非流形标识和拆非流形而产生的重复点索引信息。
顶点的非流形标识和拆非流形而产生的重复点索引信息解码采用与编码端相对应的方法,根据几何坐标和UV坐标是否具有相同的连接关系分为两种情况:若几何坐标和UV坐标具有相同的连接关系,则熵解码得到一组顶点的非流形标识和拆非流形而产生的重复点索引信息;若几何坐标和UV坐标具有不同的连接关系,则分别解码得到几何顶点的非流形标识和拆非流形而产生的几何重复点索引信息、UV顶点的非流形标识和拆非流形而产生的UV重复点索引信息。记录这些信息并将其输出到恢复非流形结构模块。
(5)重建流形网格
输入:流形网格的连接关系、流形网格的几何信息、流形网格的属性信息;
输出:流形网格。
利用流形网格的连接关系、几何信息、属性信息,可以直接重建得到流形网格。
(6)后处理中的恢复非流形结构
输入:流形网格、顶点的非流形标识、拆非流形而产生的重复点索引信息、表示网格中几何坐标和UV坐标是否具有相同连接关系的信息;
输出:重建非流形网格。
非流形边与非流形点的恢复过程是相同的。以拆非流形而产生的重复点索引信息为重复点组索引为例,可以首先按顶点的解码顺序遍历所有顶点,依据顶点的非流形标识建立
一个哈希表,哈希表的键为拆非流形而产生的重复点组索引,值为要合并到的目标顶点的索引。若当前顶点不是拆非流形而产生的重复点,则当前顶点与当前顶点的索引对应,即不更新其索引;若当前顶点是拆非流形产生的重复点,且是其所在重复点组要合并到的目标顶点,则当前顶点与当前顶点的索引对应,即不更新其索引,在哈希表中添加当前顶点的重复点组索引和当前顶点在重建流形网格中的索引;若当前顶点是拆非流形产生的重复点,但不是其所在重复点组要合并到的目标顶点,则依据当前点的重复点组索引在哈希表中进行搜索得其要合并到的目标顶点在重建流形网格中的索引,以进行合并拆非流形而产生的重复点的操作,即更新当前顶点索引为其对应的要合并到的目标顶点的索引。最后,更新几何坐标列表和UV坐标列表,并更新连接关系中的几何顶点和UV顶点的索引,得到重建的非流形网格。
若几何坐标和UV坐标具有相同的连接关系,则执行一次上述过程,得到重建的几何坐标和UV坐标具有相同连接关系的非流形网格;若几何坐标和UV坐标具有不同的连接关系,则分别按照几何顶点和UV顶点的解码顺序遍历几何顶点和UV顶点,并分别依据几何顶点和UV顶点的非流形标识建立几何哈希表和UV哈希表,分别存储拆非流形而产生的几何重复点索引信息和要合并到的几何目标顶点在重建流形网格中的索引、拆非流形而产生的UV重复点索引信息和要合并到的UV目标顶点在重建流形网格中的索引,分别执行上述判断和合并拆非流形而产生的重复点的操作,并更新几何坐标列表和UV坐标列表,更新连接关系中的几何顶点索引和UV顶点索引,得到重建的几何坐标和UV坐标具有不同连接关系的非流形网格。
(8)纹理图解码模块
解码是否进行无损颜色空间格式转换的指示信息(如第一指示信息),并使用视频解码器解码纹理图,如果在编码端对颜色空间格式进行了无损颜色空间格式转换,则解码得到的是YUV格式的纹理图;如果在编码端未对颜色空间格式进行无损颜色空间格式转换,则解码得到的是RGB格式的纹理图。
(9)无损颜色空间格式转换模块
输入:YUV 444格式的纹理图;
输出:BGR444格式的纹理图(此处以BGR444格式为例)。
如果对颜色空间格式进行无损变换,对输入的YUV颜色空间格式(即第二颜色空间格式)的纹理图进行无损的颜色空间格式转换,得到RGB颜色空间格式(即第一颜色空间格式)的纹理图。此处无损颜色空间格式转换可以有多种实现方式,本实施例不限制无损颜色空间格式转换的具体实现方式。例如,与式(12)-式(14)所示的颜色空间格式转换方法相对应的逆转换方法如(18)-(20)所示。
R=V+G (19)
R=V+G (19)
与式(15)-式(17)所示的颜色空间格式转换方法相对应的逆转换方法如(21)-(23)所示。
R=U+G (22)
B=V+G (23)
R=U+G (22)
B=V+G (23)
其中,round()代表向下取整函数。
相关技术中,针对三维网格的纹理图的无损编码,直接使用视频编码器编码BGR444格式的纹理图,导致纹理图无损编码效率较低。本申请实施例提出一种基于Edgebreaker的三维网格纹理图无损编解码方法。以第一颜色空间格式为RGB颜色空间格式,第二颜色空间格式为YUV颜色空间格式为例,在解码端解码得到指示是否进行无损颜色空间格式转换的指示信息,如果在编码端对纹理图的颜色空间格式进行了无损颜色空间格式转换,则使用视频解码器解码得到的是YUV格式的纹理图,对纹理图进行无损颜色空间格式转换,将纹理图由YUV颜色空间格式(即第二颜色空间格式)转换到RGB颜色空间格式(即第一颜色空间格式),从而实现纹理图的无损编解码。需要说明的是,此实施例将纹理图由YUV颜色空间格式转换到RGB颜色空间格式,而不限制纹理图的具体格式,例如纹理图在RGB颜色空间格式可以是BGR444格式,也可以是RGB444格式。如果在编码端未对纹理图的颜色空间格式进行无损颜色空间格式转换,则使用视频解码器解码得到的是RGB颜色空间格式的视频。本申请实施例能够提高三维网格的编解码效率。
需要说明的是,本申请实施例提供的三维网格编码方法,执行主体可以为三维网格编码装置,或者,该三维网格编码装置中的用于执行三维网格编码的方法的控制模块。本申请实施例中以三维网格编码装置执行网格编码的方法为例,说明本申请实施例提供的三维网格编码装置。
请参见图12,图12是本申请实施例提供的一种三维网格编码装置的结构图,如图12所示,三维网格编码装置300包括:
转换模块301,用于对三维网格的第一颜色空间格式的纹理图进行颜色空间格式转换,得到第二颜色空间格式的纹理图;
第一编码模块302,用于对所述第二颜色空间格式的纹理图进行编码处理,得到第一纹理图码流。
可选地,所述转换模块具体用于:
在确定对三维网格的纹理图进行颜色空间格式转换的情况下,对三维网格的第一颜色空间格式的纹理图进行颜色空间格式转换,得到第二颜色空间格式的纹理图。
可选地,所述装置还包括:
第二编码模块,用于在确定不对三维网格的纹理图进行颜色空间格式转换的情况下,
对所述第一颜色空间格式的纹理图进行编码处理,得到第二纹理图码流。
可选地,所述三维网格对应的码流包括第一指示信息的编码结果,所述第一指示信息用于指示编码端是否对三维网格的纹理图进行颜色空间格式转换;
其中,在所述第一指示信息指示编码端对三维网格的纹理图进行颜色空间格式转换的情况下,所述三维网格对应的码流还包括所述第一纹理图码流;或
在所述第一指示信息指示编码端不对三维网格的纹理图进行颜色空间格式转换的情况下,所述三维网格对应的码流还包括第二纹理图码流。
可选地,在所述第一指示信息指示对三维网格的纹理图进行颜色空间格式转换的情况下,所述第一指示信息还用于指示所述三维网格的纹理图由所述第一颜色空间格式转换至所述第二颜色空间格式的转换类型。
可选地,所述第二颜色空间格式的纹理图的颜色空间的相关信息量小于所述第一颜色空间格式的纹理图的颜色空间的相关信息量。
可选地,所述第二颜色空间格式与所述第一颜色空间格式为不同颜色空间的颜色空间格式;或,所述第二颜色空间格式与所述第一颜色空间格式为相同颜色空间的不同颜色空间格式。
可选地,所述第一颜色空间格式为RGB颜色空间格式,所述第二颜色空间格式为YUV颜色空间格式。
本申请实施例中的三维网格编码装置可以是装置,具有操作系统的装置或电子设备,也可以是终端中的部件、集成电路、或芯片。该装置或电子设备可以是移动终端,也可以为非移动终端。示例性的,移动终端可以包括但不限于上述所列举的终端的类型,非移动终端可以为服务器、网络附属存储器(Network Attached Storage,NAS)、个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。
本申请实施例提供的三维网格编码装置能够实现图3的方法实施例实现的各个过程,并达到相同的技术效果,为避免重复,这里不再赘述。
需要说明的是,本申请实施例提供的三维网格解码方法,执行主体可以为三维网格解码装置,或者,该三维网格解码装置中的用于执行三维网格解码的方法的控制模块。本申请实施例中以三维网格解码装置执行网格解码的方法为例,说明本申请实施例提供的三维网格解码装置。
请参见图13,图13是本申请实施例提供的一种三维网格解码装置的结构图,如图13所示,三维网格解码装置400包括:
第一解码模块401,用于对三维网格对应的码流中的第一纹理图码流进行解码处理,得到第二颜色空间格式的纹理图;
转换模块402,用于对所述第二颜色空间格式的纹理图进行颜色空间格式转换,得到第一颜色空间格式的纹理图;
重建模块403,用于基于所述第一颜色空间格式的纹理图进行网格重建处理,得到重建的三维网格。
可选地,所述装置还包括:
第二解码模块,用于对所述三维网格对应的码流中的第一指示信息的编码结果进行解码,得到所述第一指示信息;
所述第一解码模块具体用于:
在基于所述第一指示信息确定对纹理图进行颜色空间格式转换的情况下,对三维网格对应的码流中的第一纹理图码流进行解码处理,得到第二颜色空间格式的纹理图。
可选地,所述第一解码模块具体用于:
在基于所述第一指示信息确定将纹理图由第二颜色空间格式转换至第一颜色空间格式的情况下,将所述第二颜色空间格式的纹理图由所述第二颜色空间格式转换至第一颜色空间格式,得到所述第一颜色空间格式的纹理图。
可选地,所述装置还包括:
第三解码模块,用于在基于所述第一指示信息确定对纹理图不进行颜色空间格式转换的情况下,对三维网格对应的码流中的第二纹理图码流进行解码处理,得到第一颜色空间格式的纹理图。
可选地,所述第二颜色空间格式的纹理图的颜色空间的相关信息量小于所述第一颜色空间格式的纹理图的颜色空间的相关信息量。
可选地,所述第二颜色空间格式与所述第一颜色空间格式为不同颜色空间的颜色空间格式;或,所述第二颜色空间格式与所述第一颜色空间格式为相同颜色空间的不同颜色空间格式。
可选地,所述第一颜色空间格式为RGB颜色空间格式,所述第二颜色空间格式为YUV颜色空间格式。
本申请实施例中的三维网格解码装置可以是装置,具有操作系统的装置或电子设备,也可以是终端中的部件、集成电路、或芯片。该装置或电子设备可以是移动终端,也可以为非移动终端。示例性的,移动终端可以包括但不限于上述所列举的终端的类型,非移动终端可以为服务器、网络附属存储器(Network Attached Storage,NAS)、个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。
本申请实施例提供的三维网格解码装置能够实现图4的方法实施例实现的各个过程,并达到相同的技术效果,为避免重复,这里不再赘述。
可选地,如图14所示,本申请实施例还提供一种通信设备500,包括处理器501和存储器502,存储器502上存储有可在所述处理器501上运行的程序或指令,例如,该通信设备500为编码端设备时,该程序或指令被处理器501执行时实现上述三维网格编码方法实施例的各个步骤,且能达到相同的技术效果。该通信设备500为解码端设备时,该程
序或指令被处理器501执行时实现上述三维网格解码方法实施例的各个步骤,且能达到相同的技术效果,为避免重复,这里不再赘述。
本申请实施例还提供一种电子设备,包括处理器及通信接口,所述处理器用于:对三维网格的第一颜色空间格式的纹理图进行颜色空间格式转换,得到第二颜色空间格式的纹理图;对所述第二颜色空间格式的纹理图进行编码处理,得到第一纹理图码流。该电子设备实施例与上述三维网格编码方法实施例对应,上述三维网格编码方法实施例的各个实施过程和实现方式均可适用于该电子设备实施例中,且能达到相同的技术效果。
本申请实施例还提供一种电子设备,包括处理器及通信接口,所述处理器用于:对三维网格对应的码流中的第一纹理图码流进行解码处理,得到第二颜色空间格式的纹理图;对所述第二颜色空间格式的纹理图进行颜色空间格式转换,得到第一颜色空间格式的纹理图;基于所述第一颜色空间格式的纹理图进行网格重建处理,得到重建的三维网格。该电子设备实施例与上述三维网格解码方法实施例对应,上述三维网格解码方法实施例的各个实施过程和实现方式均可适用于该电子设备实施例中,且能达到相同的技术效果。
具体地,所述电子设备可以为终端。图15为实现本申请实施例的一种终端的硬件结构示意图。
该终端600包括但不限于:射频单元601、网络模块602、音频输出单元603、输入单元604、传感器605、显示单元606、用户输入单元607、接口单元608、存储器609以及处理器610等中的至少部分部件。
本领域技术人员可以理解,终端600还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器610逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图15中示出的终端结构并不构成对终端的限定,终端可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。
应理解的是,本申请实施例中,输入单元604可以包括图形处理器(Graphics Processing Unit,GPU)6041和麦克风6042,GPU 6041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元606可包括显示面板6061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板6061。用户输入单元607包括触控面板6071以及其他输入设备6072中的至少一种。触控面板6 071,也称为触摸屏。触控面板6071可包括触摸检测装置和触摸控制器两个部分。其他输入设备6072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。
本申请实施例中,射频单元601接收来自网络侧设备的下行数据后,可以传输给处理器610进行处理;另外,射频单元601可以向网络侧设备发送上行数据。通常,射频单元601包括但不限于天线、放大器、收发信机、耦合器、低噪声放大器、双工器等。
存储器609可用于存储软件程序或指令以及各种数据。存储器609可主要包括存储程序或指令的第一存储区和存储数据的第二存储区,其中,第一存储区可存储操作系统、至
少一个功能所需的应用程序或指令(比如声音播放功能、图像播放功能等)等。此外,存储器609可以包括易失性存储器或非易失性存储器,或者,存储器609可以包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synch link DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本申请实施例中的存储器609包括但不限于这些和任意其它适合类型的存储器。
处理器610可包括一个或多个处理单元;可选的,处理器610集成应用处理器和调制解调处理器,其中,应用处理器主要处理涉及操作系统、用户界面和应用程序等的操作,调制解调处理器主要处理无线通信信号,如基带处理器。可以理解的是,上述调制解调处理器也可以不集成到处理器610中。
其中,在所述终端为编码端设备的情况下:
所述处理器610用于:
对三维网格的第一颜色空间格式的纹理图进行颜色空间格式转换,得到第二颜色空间格式的纹理图;
对所述第二颜色空间格式的纹理图进行编码处理,得到第一纹理图码流。
可选地,所述处理器610具体用于:
在确定对三维网格的纹理图进行颜色空间格式转换的情况下,对三维网格的第一颜色空间格式的纹理图进行颜色空间格式转换,得到第二颜色空间格式的纹理图。
可选地,所述处理器610还用于:
在确定不对三维网格的纹理图进行颜色空间格式转换的情况下,对所述第一颜色空间格式的纹理图进行编码处理,得到第二纹理图码流。
可选地,所述三维网格对应的码流包括第一指示信息的编码结果,所述第一指示信息用于指示编码端是否对三维网格的纹理图进行颜色空间格式转换;
其中,在所述第一指示信息指示编码端对三维网格的纹理图进行颜色空间格式转换的情况下,所述三维网格对应的码流还包括所述第一纹理图码流;或
在所述第一指示信息指示编码端不对三维网格的纹理图进行颜色空间格式转换的情况下,所述三维网格对应的码流还包括第二纹理图码流。
可选地,在所述第一指示信息指示对三维网格的纹理图进行颜色空间格式转换的情况下,所述第一指示信息还用于指示所述三维网格的纹理图由所述第一颜色空间格式转换至
所述第二颜色空间格式的转换类型。
可选地,所述第二颜色空间格式的纹理图的颜色空间的相关信息量小于所述第一颜色空间格式的纹理图的颜色空间的相关信息量。
可选地,所述第二颜色空间格式与所述第一颜色空间格式为不同颜色空间的颜色空间格式;或,所述第二颜色空间格式与所述第一颜色空间格式为相同颜色空间的不同颜色空间格式。
可选地,所述第一颜色空间格式为RGB颜色空间格式,所述第二颜色空间格式为YUV颜色空间格式。
其中,在所述终端为解码端设备的情况下:
所述处理器610用于:
对三维网格对应的码流中的第一纹理图码流进行解码处理,得到第二颜色空间格式的纹理图;
对所述第二颜色空间格式的纹理图进行颜色空间格式转换,得到第一颜色空间格式的纹理图;
基于所述第一颜色空间格式的纹理图进行网格重建处理,得到重建的三维网格。
可选地,所述处理器610还用于:
对所述三维网格对应的码流中的第一指示信息的编码结果进行解码,得到所述第一指示信息;
所述处理器610具体用于:
在基于所述第一指示信息确定对纹理图进行颜色空间格式转换的情况下,对三维网格对应的码流中的第一纹理图码流进行解码处理,得到第二颜色空间格式的纹理图。
可选地,所述处理器610具体还用于:
在基于所述第一指示信息确定将纹理图由第二颜色空间格式转换至第一颜色空间格式的情况下,将所述第二颜色空间格式的纹理图由所述第二颜色空间格式转换至第一颜色空间格式,得到所述第一颜色空间格式的纹理图。
可选地,所述处理器610还用于:
在基于所述第一指示信息确定对纹理图不进行颜色空间格式转换的情况下,对三维网格对应的码流中的第二纹理图码流进行解码处理,得到第一颜色空间格式的纹理图。
可选地,所述第二颜色空间格式的纹理图的颜色空间的相关信息量小于所述第一颜色空间格式的纹理图的颜色空间的相关信息量。
可选地,所述第二颜色空间格式与所述第一颜色空间格式为不同颜色空间的颜色空间格式;或,所述第二颜色空间格式与所述第一颜色空间格式为相同颜色空间的不同颜色空间格式。
可选地,所述第一颜色空间格式为RGB颜色空间格式,所述第二颜色空间格式为YUV颜色空间格式。
具体地,本申请实施例的终端还包括:存储在存储器609上并可在处理器610上运行的指令或程序,处理器610调用存储器609中的指令或程序执行图12或图13所示各模块执行的方法,并达到相同的技术效果,为避免重复,故不在此赘述。
本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述三维网格编码方法实施例的各个过程,或者,该程序或指令被处理器执行时实现上述三维网格解码方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
其中,所述处理器为上述实施例中所述的终端中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。
本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述三维网格编码方法实施例的各个过程,或者,实现上述三维网格解码方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
应理解,本申请实施例提到的芯片还可以称为系统级芯片,系统芯片,芯片系统或片上系统芯片等。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对相关技术做出贡献的部分可以以计算机软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。
Claims (20)
- 一种三维网格编码方法,由编码端执行,包括:对三维网格的第一颜色空间格式的纹理图进行颜色空间格式转换,得到第二颜色空间格式的纹理图;对所述第二颜色空间格式的纹理图进行编码处理,得到第一纹理图码流。
- 根据权利要求1所述的方法,其中,所述对三维网格的第一颜色空间格式的纹理图进行颜色空间格式转换,得到第二颜色空间格式的纹理图,包括:在确定对三维网格的纹理图进行颜色空间格式转换的情况下,对三维网格的第一颜色空间格式的纹理图进行颜色空间格式转换,得到第二颜色空间格式的纹理图。
- 根据权利要求2所述的方法,其中,所述方法还包括:在确定不对三维网格的纹理图进行颜色空间格式转换的情况下,对所述第一颜色空间格式的纹理图进行编码处理,得到第二纹理图码流。
- 根据权利要求1-3中任一项所述的方法,其中,所述三维网格对应的码流包括第一指示信息的编码结果,所述第一指示信息用于指示编码端是否对三维网格的纹理图进行颜色空间格式转换;其中,在所述第一指示信息指示编码端对三维网格的纹理图进行颜色空间格式转换的情况下,所述三维网格对应的码流还包括所述第一纹理图码流;或在所述第一指示信息指示编码端不对三维网格的纹理图进行颜色空间格式转换的情况下,所述三维网格对应的码流还包括第二纹理图码流。
- 根据权利要求4所述的方法,其中,在所述第一指示信息指示对三维网格的纹理图进行颜色空间格式转换的情况下,所述第一指示信息还用于指示所述三维网格的纹理图由所述第一颜色空间格式转换至所述第二颜色空间格式的转换类型。
- 根据权利要求1-5中任一项所述的方法,其中,所述第二颜色空间格式的纹理图的颜色空间的相关信息量小于所述第一颜色空间格式的纹理图的颜色空间的相关信息量。
- 根据权利要求1-6中任一项所述的方法,其中,所述第二颜色空间格式与所述第一颜色空间格式为不同颜色空间的颜色空间格式;或,所述第二颜色空间格式与所述第一颜色空间格式为相同颜色空间的不同颜色空间格式。
- 根据权利要求1-7中任一项所述的方法,其中,所述第一颜色空间格式为RGB颜色空间格式,所述第二颜色空间格式为YUV颜色空间格式。
- 一种三维网格解码方法,由解码端执行,包括:对三维网格对应的码流中的第一纹理图码流进行解码处理,得到第二颜色空间格式的纹理图;对所述第二颜色空间格式的纹理图进行颜色空间格式转换,得到第一颜色空间格式的 纹理图;基于所述第一颜色空间格式的纹理图进行网格重建处理,得到重建的三维网格。
- 根据权利要求9所述的方法,其中,所述方法还包括:对所述三维网格对应的码流中的第一指示信息的编码结果进行解码,得到所述第一指示信息;所述对三维网格对应的码流中的第一纹理图码流进行解码处理,得到第二颜色空间格式的纹理图,包括:在基于所述第一指示信息确定对纹理图进行颜色空间格式转换的情况下,对三维网格对应的码流中的第一纹理图码流进行解码处理,得到第二颜色空间格式的纹理图。
- 根据权利要求10所述的方法,其中,所述对所述第二颜色空间格式的纹理图进行颜色空间格式转换,得到第一颜色空间格式的纹理图,包括:在基于所述第一指示信息确定将纹理图由第二颜色空间格式转换至第一颜色空间格式的情况下,将所述第二颜色空间格式的纹理图由所述第二颜色空间格式转换至第一颜色空间格式,得到所述第一颜色空间格式的纹理图。
- 根据权利要求10或11所述的方法,其中,所述方法还包括:在基于所述第一指示信息确定对纹理图不进行颜色空间格式转换的情况下,对三维网格对应的码流中的第二纹理图码流进行解码处理,得到第一颜色空间格式的纹理图。
- 根据权利要求9-12中任一项所述的方法,其中,所述第二颜色空间格式的纹理图的颜色空间的相关信息量小于所述第一颜色空间格式的纹理图的颜色空间的相关信息量。
- 根据权利要求9-13中任一项所述的方法,其中,所述第二颜色空间格式与所述第一颜色空间格式为不同颜色空间的颜色空间格式;或,所述第二颜色空间格式与所述第一颜色空间格式为相同颜色空间的不同颜色空间格式。
- 根据权利要求9-14中任一项所述的方法,其中,所述第一颜色空间格式为RGB颜色空间格式,所述第二颜色空间格式为YUV颜色空间格式。
- 一种三维网格编码装置,所述装置包括:转换模块,用于对三维网格的第一颜色空间格式的纹理图进行颜色空间格式转换,得到第二颜色空间格式的纹理图;第一编码模块,用于对所述第二颜色空间格式的纹理图进行编码处理,得到第一纹理图码流。
- 一种三维网格解码装置,所述装置包括:第一解码模块,用于对三维网格对应的码流中的第一纹理图码流进行解码处理,得到第二颜色空间格式的纹理图;转换模块,用于对所述第二颜色空间格式的纹理图进行颜色空间格式转换,得到第一颜色空间格式的纹理图;重建模块,用于基于所述第一颜色空间格式的纹理图进行网格重建处理,得到重建的 三维网格。
- 一种电子设备,包括处理器,存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如权利要求1至8任一项所述的三维网格编码方法的步骤;或者,所述程序或指令被所述处理器执行时实现如权利要求9至15任一项所述的三维网格解码方法的步骤。
- 一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如权利要求1至8任一项所述的三维网格编码方法的步骤,或者,实现如权利要求9至15任一项所述的三维网格解码方法的步骤。
- 一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如权利要求1至8任一项所述的三维网格编码方法的步骤,或者,所述程序或指令被处理器执行时实现如权利要求9至15任一项所述的三维网格解码方法的步骤。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310795676.3 | 2023-06-30 | ||
| CN202310795676.3A CN119229054A (zh) | 2023-06-30 | 2023-06-30 | 三维网格编码方法、三维网格解码方法、装置及设备 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2025002017A1 true WO2025002017A1 (zh) | 2025-01-02 |
Family
ID=93937639
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2024/100833 Ceased WO2025002017A1 (zh) | 2023-06-30 | 2024-06-24 | 三维网格编码方法、三维网格解码方法、装置及设备 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN119229054A (zh) |
| WO (1) | WO2025002017A1 (zh) |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103563376A (zh) * | 2011-04-08 | 2014-02-05 | 皇家飞利浦有限公司 | 视频编码和解码 |
| CN104054338A (zh) * | 2011-03-10 | 2014-09-17 | 杜比实验室特许公司 | 位深和颜色可伸缩视频编码 |
| US20170339430A1 (en) * | 2014-12-09 | 2017-11-23 | Gurulogic Microsystems Oy | Encoder, decoder, method of encoding data, method of decoding data, utilizing data format transformations |
| US20190156518A1 (en) * | 2017-11-22 | 2019-05-23 | Apple Inc. | Point cloud compression with closed-loop color conversion |
| US20210090301A1 (en) * | 2019-09-24 | 2021-03-25 | Apple Inc. | Three-Dimensional Mesh Compression Using a Video Encoder |
| CN116109798A (zh) * | 2023-04-04 | 2023-05-12 | 腾讯科技(深圳)有限公司 | 图像数据处理方法、装置、设备及介质 |
-
2023
- 2023-06-30 CN CN202310795676.3A patent/CN119229054A/zh active Pending
-
2024
- 2024-06-24 WO PCT/CN2024/100833 patent/WO2025002017A1/zh not_active Ceased
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104054338A (zh) * | 2011-03-10 | 2014-09-17 | 杜比实验室特许公司 | 位深和颜色可伸缩视频编码 |
| CN103563376A (zh) * | 2011-04-08 | 2014-02-05 | 皇家飞利浦有限公司 | 视频编码和解码 |
| US20170339430A1 (en) * | 2014-12-09 | 2017-11-23 | Gurulogic Microsystems Oy | Encoder, decoder, method of encoding data, method of decoding data, utilizing data format transformations |
| US20190156518A1 (en) * | 2017-11-22 | 2019-05-23 | Apple Inc. | Point cloud compression with closed-loop color conversion |
| US20210090301A1 (en) * | 2019-09-24 | 2021-03-25 | Apple Inc. | Three-Dimensional Mesh Compression Using a Video Encoder |
| CN116109798A (zh) * | 2023-04-04 | 2023-05-12 | 腾讯科技(深圳)有限公司 | 图像数据处理方法、装置、设备及介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN119229054A (zh) | 2024-12-31 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR102071764B1 (ko) | 영상 부호화, 복호화 방법 및 장치 | |
| US20170155899A1 (en) | Image compression method and apparatus using matching | |
| CN104378644A (zh) | 定宽度变长度像素样值串匹配增强的图像压缩方法和装置 | |
| JP6360969B2 (ja) | 画像符号化、復号化方法、及び装置 | |
| RU2767771C1 (ru) | Способ и оборудование для кодирования/декодирования облака точек, представляющего трехмерный объект | |
| CN104754362B (zh) | 使用精细划分块匹配的图像压缩方法 | |
| CN104780379A (zh) | 一种屏幕图像集合的压缩方法 | |
| CN104581177A (zh) | 一种结合块匹配和串匹配的图像压缩方法和装置 | |
| CN115668919A (zh) | 点云数据发送装置、点云数据发送方法、点云数据接收装置和点云数据接收方法 | |
| CN111246208B (zh) | 视频处理方法、装置及电子设备 | |
| US20260094304A1 (en) | Encoding method and apparatus, decoding method and apparatus, and device | |
| WO2024083039A1 (zh) | 网格编码方法、网格解码方法及相关设备 | |
| US20250029283A1 (en) | Coding Point Cloud Attributes | |
| CN111225214B (zh) | 视频处理方法、装置及电子设备 | |
| WO2025002017A1 (zh) | 三维网格编码方法、三维网格解码方法、装置及设备 | |
| WO2024083043A1 (zh) | 网格编码方法、装置、通信设备及可读存储介质 | |
| US20240121439A1 (en) | Point cloud attribute information encoding method and apparatus, point cloud attribute information decoding method and apparatus, and related device | |
| WO2024193487A1 (zh) | 三维网格位移信息编码方法、解码方法、装置及终端 | |
| WO2023024842A1 (zh) | 点云编解码方法、装置、设备及存储介质 | |
| WO2025002025A1 (zh) | 编码方法、解码方法、装置及设备 | |
| US20260004465A1 (en) | Point cloud encoding processing method, point cloud decoding processing method, and related device | |
| US20260113450A1 (en) | Coding Region Adaptive Hierarchical Transform (RAHT) Prediction Mode | |
| WO2025223305A1 (zh) | 三维网格编码方法、三维网格解码方法及相关设备 | |
| WO2024260291A1 (zh) | 网格编码方法、网格解码方法及相关设备 | |
| KR20260052061A (ko) | 점군 속성 코딩 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 24830662 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |