WO2024083039A1 - 网格编码方法、网格解码方法及相关设备 - Google Patents

网格编码方法、网格解码方法及相关设备 Download PDF

Info

Publication number
WO2024083039A1
WO2024083039A1 PCT/CN2023/124479 CN2023124479W WO2024083039A1 WO 2024083039 A1 WO2024083039 A1 WO 2024083039A1 CN 2023124479 W CN2023124479 W CN 2023124479W WO 2024083039 A1 WO2024083039 A1 WO 2024083039A1
Authority
WO
WIPO (PCT)
Prior art keywords
manifold
information
vertex
grid
code stream
Prior art date
Application number
PCT/CN2023/124479
Other languages
English (en)
French (fr)
Inventor
邹文杰
张伟
杨付正
吕卓逸
Original Assignee
维沃移动通信有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 维沃移动通信有限公司 filed Critical 维沃移动通信有限公司
Publication of WO2024083039A1 publication Critical patent/WO2024083039A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/44Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/91Entropy coding, e.g. variable length coding [VLC] or arithmetic coding

Definitions

  • the present application belongs to the field of computer technology, and specifically relates to a grid encoding method, a grid decoding method and related 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 meshes with non-manifold structures are converted into meshes with manifold structures for encoding, and a mesh with manifold structures is obtained when decoding at the decoding end, resulting in a large difference between the mesh solved by the decoding end and the mesh encoded by the encoding end, resulting in a large quality loss of the mesh information after the encoding and decoding process.
  • the embodiments of the present application provide a grid encoding method, a grid decoding method and related equipment, which can solve the problem of large quality loss of grid information after three-dimensional grid encoding and decoding processing.
  • a grid coding method comprising:
  • the non-manifold structure in the to-be-coded grid is split to obtain non-manifold information and manifold grid;
  • a grid coding result is obtained according to the first sub-code stream and the second sub-code stream.
  • a grid decoding method comprising:
  • the manifold grid is reconstructed based on the non-manifold information to obtain a decoding grid.
  • a grid coding device comprising:
  • a processing module used for splitting the non-manifold structure in the grid to be encoded to obtain non-manifold information and manifold grid;
  • a first encoding module used for encoding the non-manifold information to obtain a first sub-code stream
  • a second encoding module used for encoding the manifold grid to obtain a second sub-code stream
  • An acquisition module is used to acquire a grid coding result according to the first sub-code stream and the second sub-code stream.
  • a grid decoding device comprising:
  • An acquisition module used for acquiring a first sub-code stream and a second sub-code stream according to a grid encoding result of a grid to be decoded
  • a first decoding module used for decoding the first sub-stream to obtain non-manifold information
  • a second decoding module used for decoding the second sub-code stream to obtain a manifold grid
  • a processing module is used to reconstruct the manifold grid based on the non-manifold information to obtain a decoded grid.
  • a terminal which 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.
  • a terminal including a processor and a communication interface, wherein the processor is configured to:
  • the non-manifold structure in the to-be-coded grid is split to obtain non-manifold information and manifold grid;
  • a grid coding result is obtained according to the first sub-code stream and the second sub-code stream.
  • a terminal including a processor and a communication interface, wherein the processor is configured to:
  • the manifold grid is reconstructed based on the non-manifold information to obtain a decoding grid.
  • a readable storage medium on which a program or instruction is stored.
  • the steps of the grid 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 grid 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.
  • the non-manifold structure in the mesh to be coded is split and processed to obtain non-manifold information and manifold mesh; the non-manifold information is encoded to obtain a first sub-code stream; the manifold mesh is encoded to obtain a second sub-code stream; and the mesh coding result is obtained according to the first sub-code stream and the second sub-code stream.
  • the non-manifold structure can be reconstructed through the non-manifold information during decoding, which can reduce or even eliminate the quality loss of the mesh information after the encoding and decoding process, and achieve lossless coding.
  • FIG1 is a schematic diagram of five modes of Edgebreaker in the related art
  • FIG2 is a flow chart of a grid coding method provided in an embodiment of the present application.
  • FIG3 is a flow chart of another grid coding method provided in an embodiment of the present application.
  • FIG4 is one of schematic diagrams of a grid provided in an embodiment of the present application.
  • FIG5 is a schematic diagram of a corner relationship provided in an embodiment of the present application.
  • FIG6 is a schematic diagram of a grid traversal provided in an embodiment of the present application.
  • FIG. 7 is a second schematic diagram of a grid provided in an embodiment of the present application.
  • FIG8 is a third schematic diagram of a grid provided in an embodiment of the present application.
  • FIG9 is a flow chart of a grid decoding method provided in an embodiment of the present application.
  • FIG10 is a flow chart of another grid decoding method provided in an embodiment of the present application.
  • FIG11 is a schematic diagram of the structure of a grid coding device provided in an embodiment of the present application.
  • FIG12 is a schematic diagram of the structure of a grid decoding device provided in an embodiment of the present application.
  • FIG13 is a schematic diagram of the structure of a communication device provided in an embodiment of the present application.
  • FIG. 14 is a schematic diagram of the structure of a terminal provided in an embodiment of the present application.
  • first, second, etc. in the specification and claims 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 under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by “first” and “second” are generally of the same type, and the number of objects is not limited.
  • the first object can be one or more.
  • “and/or” in the specification and claims represents at least one of the connected objects, and the character “/" generally represents that the objects associated with each other are in an "or” relationship.
  • the encoding and decoding end corresponding to the encoding and decoding method in the embodiment of the present application may be a terminal, which may also be referred to as a terminal device or a user terminal (User Equipment, UE).
  • the terminal may 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 handheld computer, a netbook, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a mobile Internet device (Mobile Internet Device, MID), augmented reality (augmented reality, AR)/virtual reality (virtual reality, VR) equipment, a robot, a wearable device (Wearable Device) or a vehicle-mounted device (Vehicle User Equipment, VUE), a 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
  • Draco encodes and stores the connection information, geometric information and UV coordinates of the three-dimensional mesh separately.
  • the core module uses the Edgebreaker algorithm.
  • Conventional compression methods are used to encode the geometric information and UV coordinates, namely, data quantization, predictive compression (parallelogram prediction) and entropy coding. Since Draco uses a connection relationship driven encoding method, the encoding of geometric information and UV coordinates follows the encoding order of the connection information. In this way, 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 method is a three-dimensional mesh connection relationship encoding method with the advantages of good compression performance, easy implementation, and the ability to provide an upper limit on the compression ratio.
  • the Edgebreaker method itself only describes the compression method of the three-dimensional mesh connection information, and the three-dimensional mesh can only be compressed 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 vertex 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 is neither the previous vertex of the current active edge vertex nor the next vertex of the current active edge in counterclockwise order, the current triangle is marked as S mode.
  • the active boundary is updated and the next active edge is selected according to certain rules.
  • the obtained CLERS string is entropy encoded to obtain higher compression efficiency.
  • the final entropy encoded 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.
  • FIG. 2 is a flow chart of a grid coding method provided in an embodiment of the present application, which can be applied to a coding end device.
  • the grid coding method includes the following steps:
  • Step 101 split the non-manifold structure in the grid to be encoded to obtain non-manifold information and a manifold grid.
  • the non-manifold structure may include non-manifold edges and non-manifold points.
  • the non-manifold points can also be described as non-manifold vertices, and the two vertices constituting the non-manifold edge can also be described as non-manifold vertices.
  • a manifold is a space that partially has the properties of a Euclidean space.
  • a general manifold can be formed by bending and sticking many straight pieces together. The condition that a manifold satisfies is that it locally has the properties of a Euclidean space, while a non-manifold can refer to a space that does not satisfy the conditions of a manifold.
  • the condition that a manifold edge satisfies is that the mesh edge is shared by only one or two mesh triangles (edge is incident to only one or two faces); the condition that a manifold point satisfies is that the faces incident to a vertex form a closed or an open fan.
  • a non-manifold edge can refer to a mesh edge that does not satisfy the conditions of a manifold edge, and a non-manifold point can refer to a mesh vertex that does not satisfy the conditions of a manifold point.
  • the method for determining the non-manifold edge in the mesh to be encoded may be to establish a data structure to store the triangles where each edge in the mesh to be encoded is located, and find the non-manifold edge by querying the number of triangles corresponding to each edge, and the number of triangles corresponding to the non-manifold edge is greater than or equal to 3; or it may be to establish a correspondence between corners and edges in the mesh by constructing a corner list (CornerTable), and find the non-manifold edge through the correspondence, and the number of corners corresponding to the non-manifold edge is greater than or equal to 3.
  • CornerTable can be used to represent the relationship between corners, vertices and triangles in the mesh.
  • the method for determining the non-manifold point in the grid to be encoded may be to construct a CornerTable, establish a corresponding relationship between each vertex in the grid to be encoded and the corner of the vertex, start from a certain corner of the vertex, traverse all corners adjacent to the corner and forming a fan in sequence, and mark the vertex and the traversed corner as traversed. If after executing the above process, there are still vertices with untraversed corners, it means that the vertex is a non-manifold point.
  • the non-manifold structure in the to-be-coded mesh is split by creating duplicate vertices for the non-manifold vertices in the to-be-coded mesh, and adjusting the connection relationship to convert the non-manifold structure into a manifold structure, wherein the non-manifold vertices may include vertices constituting non-manifold edges and non-manifold points. Since duplicate vertices are created for the non-manifold vertices, for ease of description, the duplicate vertices may be referred to as newly added vertices, and the non-newly added vertices may be referred to as original non-manifold vertices.
  • Step 102 Encode the non-manifold information to obtain a first sub-code stream.
  • the first sub-code stream can also be described as a non-manifold information code stream.
  • the non-manifold information may include the index information of the original non-manifold vertices and the index information of the newly added vertices.
  • the index information of the newly added vertices and the index information of the original non-manifold vertices can be interlaced and encoded; or, the index information of the newly added vertices and the index information of the original non-manifold vertices can be encoded in two code streams in the same order, and the correspondence between the newly added vertices and the original non-manifold vertices can be maintained through the encoding order.
  • This embodiment does not limit the specific encoding method for encoding non-manifold information.
  • Step 103 Encode the manifold grid to obtain a second sub-code stream.
  • the second sub-code stream may include a geometry information code stream, an attribute information code stream, and a connection relationship information code stream.
  • the geometric information of the manifold mesh may be encoded to obtain a geometric information code stream; the attribute information of the manifold mesh may be encoded to obtain an attribute information code stream; the connection relationship information of the manifold mesh may be encoded to obtain a connection relationship information code stream.
  • Step 104 Obtain a grid coding result according to the first sub-code stream and the second sub-code stream.
  • the grid coding result may include the first sub-code stream and the second sub-code stream.
  • the grid coding result may also include a texture map code stream, which is obtained by encoding the texture map using a video encoder.
  • the mesh to be encoded may be a three-dimensional mesh, as shown in FIG3 , and the process of the mesh encoding method may be as follows: first, if there is a non-manifold structure in the three-dimensional mesh, the non-manifold structure is split to obtain a manifold mesh, and at the same time, the vertex information of the newly added vertices and the vertex information of the original non-manifold vertices due to the splitting of the non-manifold structure are recorded; then, for the manifold mesh, the connection information is encoded using the Edgebreaker method to obtain a pattern string, and entropy encoding is performed on it; after the connection relationship is encoded, the geometric information of the mesh is encoded, for example, a parallelogram prediction encoding method may be used, and the present embodiment does not limit the encoding method of the geometric information; if the mesh has attribute information such as UV coordinates, it may be encoded using methods such as similar triangle prediction encoding, and the present embodiment
  • Edgebreaker requires the mesh to be encoded to be a manifold structure.
  • Draco needs to split them into manifold structures to encode them correctly.
  • Draco does not merge the split structures at the decoding end, so the mesh output by the decoding end has more split points than the original mesh input by the encoding end, which makes Draco unable to losslessly encode such meshes with non-manifold structures.
  • 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 also need to be compressed.
  • the 3D mesh coding framework in the related art mainly includes mesh preprocessing module, basic mesh coding module, video-based displacement information coding module and texture map coding module.
  • the basic mesh coding module uses Draco for coding.
  • Draco is a library for compressing and decompressing 3D geometric meshes and point clouds, which aims to improve the storage and transmission of 3D graphics and greatly accelerate the encoding, transmission and decoding of 3D data.
  • Draco supports the encoding of 3D mesh geometric information
  • connection Draco supports lossy mode and near-lossless mode.
  • the Edgebreaker method used by Draco to encode connection relationships is one of the most efficient methods for encoding 3D mesh connection information.
  • the non-manifold structure in the mesh to be coded is split and processed to obtain non-manifold information and manifold mesh; the non-manifold information is encoded to obtain a first sub-code stream; the manifold mesh is encoded to obtain a second sub-code stream; and the mesh coding result is obtained according to the first sub-code stream and the second sub-code stream.
  • the non-manifold structure can be reconstructed through the non-manifold information during decoding, which can reduce or even eliminate the quality loss of the mesh information after the encoding and decoding process, and achieve lossless coding.
  • the to-be-encoded mesh includes a first manifold mesh and a first non-manifold mesh, the first manifold mesh and the first non-manifold mesh are connected via the non-manifold structure, the non-manifold structure includes a first vertex, and the splitting process of the non-manifold structure in the to-be-encoded mesh includes:
  • the non-manifold information includes index information of the first vertex and index information of the second vertex
  • the manifold mesh includes the first manifold mesh and the second manifold mesh.
  • the first vertex is a non-manifold vertex (also referred to as a proto-non-manifold vertex), the first vertex may be a vertex constituting a non-manifold edge, or may be a non-manifold point.
  • the non-manifold structure may include a non-manifold edge, and the first manifold mesh and the first non-manifold mesh may share the non-manifold edge; or the non-manifold structure may include a non-manifold point, and the first manifold mesh and the first non-manifold mesh may share the non-manifold point.
  • the index information of the first vertex in the connection relationship of the first non-manifold mesh can be updated to the index information of the second vertex, so that the first non-manifold mesh no longer includes the first vertex and the first non-manifold mesh can be converted into a second manifold mesh.
  • a second vertex is established, the second vertex is a duplicate point with the first vertex, and the index information of the second vertex is different from that of the first vertex; the non-manifold structure in the mesh to be encoded is split based on the second vertex to convert the first non-manifold mesh into a second manifold mesh; wherein the non-manifold information includes the index information of the first vertex and the index information of the second vertex, and the manifold mesh includes the first manifold mesh and the second manifold mesh.
  • the non-manifold structure in the mesh to be encoded can be split, the non-manifold structure in the mesh to be encoded can be converted into a manifold structure, and the index information of the newly added vertices can be recorded, so as to facilitate the reconstruction of the non-manifold structure during decoding.
  • the non-manifold information further includes a non-manifold identifier
  • the first sub-code stream includes a code stream corresponding to the non-manifold identifier, a code stream corresponding to the index information of the second vertex, and a code stream corresponding to the index information of the first vertex;
  • the first sub-codestream there is an association relationship between the codestream corresponding to the non-manifold identifier, the codestream corresponding to the index information of the second vertex, and the codestream corresponding to the index information of the first vertex.
  • the non-manifold identifier can be used to identify the non-manifold structure.
  • the non-manifold identifier can be encoded to obtain a code stream corresponding to the non-manifold identifier.
  • the non-manifold identifier can be entropy encoded to obtain a code stream corresponding to the non-manifold identifier.
  • the index information of the second vertex can be encoded to obtain a code stream corresponding to the index information of the second vertex.
  • the index information of the second vertex can be entropy encoded to obtain a code stream corresponding to the index information of the second vertex.
  • the index information of the first vertex can be encoded to obtain a code stream corresponding to the index information of the first vertex.
  • the index information of the first vertex can be entropy encoded to obtain a code stream corresponding to the index information of the first vertex.
  • the correspondence between the non-manifold identifier, the first vertex, and the second vertex can be maintained according to certain rules. Taking maintaining the correspondence between the first vertex and the second vertex as an example, the index information of the second vertex can be interleaved with the index information of the first vertex, so that there is an association between the code stream corresponding to the index information of the first vertex and the code stream corresponding to the index information of the second vertex.
  • the index information of the second vertex and the index information of the first vertex can be encoded in two code streams in the same order, and the encoding order makes it possible to have an association between the code stream corresponding to the index information of the first vertex and the code stream corresponding to the index information of the second vertex.
  • the non-manifold information further includes a non-manifold identifier
  • the first sub-codestream includes a codestream corresponding to the non-manifold identifier, a codestream corresponding to the index information of the second vertex, and a codestream corresponding to the index information of the first vertex; wherein, in the first sub-codestream, the codestream corresponding to the non-manifold identifier, the codestream corresponding to the index information of the second vertex, and the codestream corresponding to the index information of the first vertex are associated with each other, so that during decoding, the index information of the second vertex can be updated to the index information of the first vertex based on the associated relationship, so as to merge the first vertex and the second vertex to reconstruct the non-manifold structure.
  • the index information of any one of the first vertex and the second vertex includes geometric index information and attribute index information, the geometric index information represents the position of the vertex in a geometric information encoding sequence, and the attribute index information represents the position of the vertex in a attribute information encoding sequence;
  • the first sub-code stream includes a code stream corresponding to the geometric index information and a code stream corresponding to the attribute index information.
  • the geometric index information may be encoded to obtain a code stream corresponding to the geometric index information.
  • the geometric index information may be entropy encoded to obtain a code stream corresponding to the geometric index information.
  • the attribute index information may be encoded to obtain a code stream corresponding to the attribute index information.
  • the attribute index information may be entropy encoded to obtain a code stream corresponding to the attribute index information.
  • the index information of any one of the first vertex and the second vertex includes geometric index information and attribute index information
  • the geometric index information represents the position of the vertex in the geometric information coding order
  • the attribute index information represents the position of the vertex in the attribute information coding order
  • the first sub-code stream includes a code stream corresponding to the geometric index information and a code stream corresponding to the attribute index information.
  • the splitting of the non-manifold structure in the to-be-encoded mesh based on the second vertex includes:
  • the index information of the first vertex in the first connection relationship information is updated to the index information of the second vertex, where the first connection relationship information is used to characterize the connection relationship of the vertices of the first non-manifold mesh.
  • a second vertex can be created for each of the two vertices of the non-manifold edge, the second vertex being a repeated vertex of the first vertex, a triangle t where the non-manifold edge is located is selected, the selected triangle is a triangle corresponding to the first non-manifold mesh, the index information of the first vertex in the first connection relationship information is updated to the index information of the second vertex, so that the third vertex in the triangle and the two newly added vertices constitute a new triangle t', the original triangle t is replaced with t', and the non-manifold edge is converted into a manifold edge.
  • a second vertex can be created, a triangle where the non-manifold point is located is selected, the selected triangle is a triangle corresponding to the first non-manifold mesh, the index information of the first vertex in the first connection relationship information is updated to the index information of the second vertex, and the non-manifold point is split into two manifold vertices.
  • the index information of the first vertex in the first connection relationship information is updated to the index information of the second vertex, and the first connection relationship information is used to characterize the connection relationship of the vertices of the first non-manifold mesh, thereby enabling the splitting of the non-manifold structure and converting the non-manifold structure into a manifold structure.
  • encoding the manifold grid to obtain a second sub-code stream includes:
  • connection relationship information code stream Encoding the second connection relationship information of the manifold grid to obtain a connection relationship information code stream
  • the second sub-code stream includes the geometric information code stream, the attribute information code stream and the connection relationship information code stream, the second connection relationship information is used to characterize the connection relationship of the vertices of the manifold mesh, and the second connection relationship information includes the updated first connection relationship information.
  • the geometric information code stream can be obtained by encoding the geometric information of the manifold mesh.
  • the encoded geometric information can adopt a difference prediction coding algorithm, or a parallelogram prediction coding algorithm, or a multi-parallelogram prediction coding algorithm, etc., which is not limited in this embodiment.
  • the attribute information code stream can be obtained by encoding the attribute information of the manifold mesh.
  • the encoded attribute information can adopt a difference prediction coding algorithm, or a parallelogram prediction coding algorithm, or a similar triangle prediction coding algorithm, etc., which is not limited in this embodiment.
  • the connection relationship information code stream can be obtained by encoding the second connection relationship information.
  • the Edgebreaker method can be used to encode the second connection relationship information of the manifold mesh, and the connection relationship of the mesh is represented by establishing a CornerTable, and the CornerTable is used to traverse all triangles in the mesh to generate the CLERS mode string of Edgebreaker.
  • the geometric information of the manifold mesh is encoded to obtain a geometric information code stream; the attribute information of the manifold mesh is encoded to obtain an attribute information code stream; the second connection relationship information of the manifold mesh is encoded to obtain a connection relationship information code stream; wherein the second sub-code stream includes the geometric information code stream, the attribute information code stream and the connection relationship information code stream, the second connection relationship information is used to characterize the connection relationship of the vertices of the manifold mesh, and the second connection relationship information includes the updated first connection relationship information.
  • the grid coding method may be applied to the encoding end, and the grid coding method may include the following process:
  • Use methods such as parallelogram prediction to encode the geometric information of the grid If the grid has attribute information such as UV coordinates, use methods such as similar triangle prediction to encode the UV coordinates of the grid to obtain an attribute information code stream.
  • the grid coding method can be applied to the coding end.
  • the coding end can be divided into five parts: a non-manifold structure splitting module, a connection relationship coding module, a geometric information coding module, an attribute information coding module, and a non-manifold vertex information coding module, wherein the non-manifold vertex information coding module encodes the non-manifold identifier and the non-manifold vertex index information.
  • the split non-manifold structure module can be used to split non-manifold structures.
  • 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 CornerTable to establish the correspondence between angles and edges in the grid, and then find the non-manifold edge.
  • each edge is opposite to at most two angles, and the two opposite angles are called opposite angles.
  • angle a and angle d are opposite to edge bc, and angle a and angle d are opposite angles; for non-manifold edges, there will be three or more opposite angles. Therefore, non-manifold edges can also be found through the correspondence between angles and edges.
  • 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, and make the third vertex in the triangle and the two newly added vertices form a new triangle t', and replace the original triangle t with t'. Iterate this process until the non-manifold edge is converted into a manifold edge. The newly added vertex is the newly added vertex. At the same time, record the index information of the newly added vertex and the index information of the original non-manifold vertex in this process.
  • CornerTable To split non-manifold points, you first need to build CornerTable and establish the correspondence between each vertex and the corner of the vertex. For each vertex, perform two steps. The first step is to start from a corner of the vertex and traverse all the corners adjacent to the corner and forming a fan, and mark the vertex and the traversed corners as traversed. If after executing the above process, If there are vertices that still have untraversed corners, it means that the vertex is a non-manifold point. In the second step, for each non-manifold point, create a duplicate point and modify the connection relationship, connect the corners that were not traversed in the first step to the newly added duplicate point, and split the non-manifold point into two manifold vertices. Repeat this process until all vertices are converted into manifold points. The created point is the newly added vertex. At the same time, record the index information of the newly added vertex and the index information of the original non-manifold vertex in this process.
  • a non-manifold flag is set for meshes with non-manifold structures.
  • the vertex encoding order may also be referred to as the vertex traversal order.
  • the Edgebreaker method may be used to encode the connection relationship of the three-dimensional mesh, by establishing a CornerTable to represent the connection relationship of the mesh, and using the CornerTable to traverse all triangles in the mesh to generate the CLERS pattern string of the 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 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 5, where c represents the current corner, cp represents the previous corner of the current corner c (counterclockwise), and cn represents the next corner of the current corner c.
  • co is the opposite corner of the current corner c, which can be obtained by querying the O table.
  • ct is the serial number of the triangle where c is located, which can be calculated by formula 1.
  • cv represents the vertex of the current corner. Points can be obtained by querying the V table.
  • cl represents the angle to the left of the current angle c, which is obtained by querying the diagonal angle of cp in the O table;
  • cr represents the angle to the right of the current angle c, which is obtained by querying the diagonal angle of cn 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 6.
  • 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 principle of depth-first traversal is adopted.
  • 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 geometric information encoding module can encode geometric information in a variety of ways, such as difference prediction encoding algorithm, parallelogram prediction encoding algorithm, multi-parallelogram prediction encoding algorithm, etc., and the specific encoding method is not emphasized here.
  • the parallelogram prediction encoding algorithm Take the parallelogram prediction encoding algorithm as an example: there are four vertices a, b, c, and d, which constitute two adjacent triangles in the grid shown in Figure 7.
  • 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.
  • the attribute information of the three-dimensional grid generally includes UV coordinates, normal vectors, etc.
  • UV coordinates 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.
  • Input index information of newly added vertices, index information of original non-manifold vertices, encoding order of geometric information, encoding order of attribute information
  • the non-manifold vertex index information includes two parts: the newly added vertex index information and the original non-manifold vertex index information.
  • the index information of the newly added vertices and the index information of the original non-manifold vertices can be interlaced and encoded; or the index information of the newly added vertices and the index information of the original non-manifold vertices can be encoded in the same order into two code streams respectively, and the corresponding relationship between the newly added vertices and the original non-manifold vertices is maintained through the encoding order.
  • This embodiment does not limit the specific implementation of maintaining the correspondence between the newly added vertices and the original non-manifold vertices.
  • the non-manifold vertex index information includes two parts: geometric vertex index information and attribute vertex index information.
  • encoding the non-manifold vertex index information is mainly divided into two steps: the first step is to record the position of the geometric vertex in the geometric information encoding order and the position of the attribute vertex in the attribute information encoding order; the second step is to entropy encode the geometric information position of the geometric vertex and the attribute information position of the attribute vertex to obtain a non-manifold information code stream.
  • an identifier used to characterize whether the vertex is a newly added vertex and an identifier used to characterize whether the vertex is an original non-manifold vertex can also be encoded to indicate the correspondence between the newly added vertex index information and the non-manifold vertex index information.
  • This embodiment does not limit the specific encoding method.
  • the non-manifold information code stream includes non-manifold identification and non-manifold vertex index information.
  • the non-manifold information code stream in the total code stream there are multiple ways to store the non-manifold information code stream in the total code stream: one is to store the non-manifold information code stream as a separate sub-code stream; another is to store the code stream of the index information of the non-manifold geometric vertices in the geometric information code stream, and store the code stream of the index information of the non-manifold attribute vertices in the attribute information code stream; or, the code stream of the index information of the non-manifold geometric vertices and the code stream of the index information of the non-manifold attribute vertices can be stored as two sub-code streams in the total code stream.
  • This embodiment does not limit the storage method of the non-manifold information code stream in the total code stream.
  • FIG. 9 is a flow chart of a grid decoding method provided in an embodiment of the present application, which can be applied to a decoding end device. As shown in FIG. 9 , the grid decoding method includes the following steps:
  • Step 201 Obtain a first sub-stream and a second sub-stream according to a grid coding result of a grid to be decoded;
  • Step 202 Decode the first sub-stream to obtain non-manifold information
  • Step 203 Decode the second sub-code stream to obtain a manifold grid
  • Step 204 reconstruct the manifold grid based on the non-manifold information to obtain a decoded grid.
  • the first sub-stream and the second sub-stream are obtained according to the grid coding result of the grid to be decoded;
  • the first sub-code stream is decoded to obtain non-manifold information;
  • the second sub-code stream is decoded to obtain a manifold grid;
  • the manifold grid is reconstructed based on the non-manifold information to obtain a decoded grid.
  • the manifold grid is reconstructed based on the non-manifold information, and a non-manifold structure can be reconstructed through the non-manifold information, thereby reducing or even eliminating the quality loss of the grid information after the encoding and decoding process, and realizing lossless encoding.
  • the non-manifold information includes index information of a first vertex and index information of a second vertex, and the index information of the second vertex is different from the index information of the first vertex;
  • the reconstructing the manifold grid based on the non-manifold information to obtain a decoded grid includes:
  • the manifold grid includes a first manifold grid and a second manifold grid
  • the grid to be decoded includes the first manifold grid and a first non-manifold grid
  • the first manifold grid and the first non-manifold grid both include a non-manifold structure
  • the non-manifold structure includes the first vertex
  • the first non-manifold grid is obtained by converting the second manifold grid.
  • the manifold mesh is reconstructed based on the index information of the first vertex and the index information of the second vertex to obtain a decoding mesh; wherein the manifold mesh includes a first manifold mesh and a second manifold mesh, the mesh to be decoded includes the first manifold mesh and a first non-manifold mesh, the first manifold mesh and the first non-manifold mesh both include a non-manifold structure, the non-manifold structure includes the first vertex, and the first non-manifold mesh is obtained by converting the second manifold mesh, thereby enabling reconstruction of the non-manifold structure during decoding.
  • the first sub-codestream includes a codestream corresponding to the non-manifold identifier, a codestream corresponding to the index information of the second vertex, and a codestream corresponding to the index information of the first vertex;
  • the non-manifold information further includes a non-manifold identifier.
  • the non-manifold identifier, the index information of the second vertex, and the index information of the first vertex are associated with each other.
  • the first sub-code stream includes a code stream corresponding to the non-manifold identifier, a code stream corresponding to the index information of the second vertex, and a code stream corresponding to the index information of the first vertex;
  • the non-manifold information also includes a non-manifold identifier, and in the non-manifold information, the non-manifold identifier, the index information of the second vertex, and the index information of the first vertex are associated.
  • the index information of the second vertex can be updated to the index information of the first vertex, so as to merge the first vertex and the second vertex and reconstruct the non-manifold structure.
  • the first sub-codestream includes a codestream corresponding to the geometric index information and a codestream corresponding to the attribute index information;
  • the index information of any one of the first vertex and the second vertex includes geometric index information and attribute index information, wherein the geometric index information represents the position of the vertex in the geometric information encoding order, and the attribute index information represents the position of the vertex in the attribute information encoding order.
  • the first sub-code stream includes a code stream corresponding to the geometric index information and a code stream corresponding to the attribute index information;
  • the index information of any one of the first vertex and the second vertex includes geometric index information and attribute index information,
  • the geometric index information represents the position of the vertex in the geometric information coding sequence,
  • the attribute index information represents the position of the vertex in the attribute information coding sequence.
  • the information can be used to decode the code streams corresponding to the index information of the newly added vertices and the original non-manifold vertices in the geometric decoding dimension and the attribute decoding dimension respectively.
  • the second sub-code stream includes a geometry information code stream, an attribute information code stream, and a connection relationship information code stream
  • the geometry information code stream is a code stream corresponding to the geometry information of the manifold mesh
  • the attribute information code stream is a code stream corresponding to the attribute information of the manifold mesh
  • the connection relationship information code stream is a code stream corresponding to second connection relationship information of the manifold mesh, where the second connection relationship information is used to characterize the connection relationship of vertices of the manifold mesh
  • the manifold mesh is obtained by constructing a mesh based on the geometric information of the manifold mesh, the attribute information of the manifold mesh and the second connection relationship information.
  • the second sub-code stream includes a geometry information code stream, an attribute information code stream, and a connection relationship information code stream
  • the geometry information code stream is a code stream corresponding to the geometry information of the manifold mesh
  • the attribute information code stream is a code stream corresponding to the attribute information of the manifold mesh
  • the connection relationship information code stream is a code stream corresponding to the second connection relationship information of the manifold mesh
  • the second connection relationship information is used to characterize the connection relationship of the vertices of the manifold mesh
  • the manifold mesh is obtained by constructing a mesh based on the geometry information of the manifold mesh, the attribute information of the manifold mesh, and the second connection relationship information.
  • the reconstructing the manifold mesh based on the index information of the first vertex and the index information of the second vertex to obtain a decoded mesh includes:
  • the index information of the second vertex in the second connection relationship information is updated to the index information of the first vertex, and the manifold mesh is reconstructed to obtain a decoded mesh.
  • the index information of the second vertex in the second connection relationship information is updated to the index information of the first vertex, and the manifold mesh is reconstructed to obtain a decoded mesh, which can restore the non-manifold structure in the mesh and realize the reconstruction of the non-manifold mesh.
  • this embodiment is an implementation of the decoding side corresponding to the embodiment shown in Figure 2. Its specific implementation can refer to the relevant description of the embodiment shown in Figure 2. In order to avoid repeated description, this embodiment will not be repeated, and the same beneficial effects can be achieved.
  • the grid decoding method can include the following process:
  • connection relationship information code stream obtains the CLERS pattern string, and uses the pattern string to reconstruct the connection relationship.
  • Edgebreaker when encoding a mesh containing a non-manifold structure, Edgebreaker can be used to losslessly encode the non-manifold mesh by splitting the mesh at the encoder and merging the mesh at the decoder.
  • the code stream to be decoded can be decomposed into a geometric information code stream, a connection relationship information code stream, an attribute information code stream, a non-manifold information code stream, and a texture map code stream.
  • These code streams can be decoded separately.
  • the connection relationship information code stream is entropy decoded to obtain a pattern string and reconstruct the connection relationship; then, the geometric information code stream is decoded using a decoding method corresponding to the encoding end; then, the UV coordinates of the mesh are decoded using a decoding method corresponding to the encoding end; then, the non-manifold information code stream is decoded to determine whether the mesh has a non-manifold identifier.
  • the mesh has a non-manifold identifier
  • further decoding is performed to obtain the index information of the newly added vertices and the index information of the original non-manifold vertices corresponding thereto, and the newly added vertices are merged with the original non-manifold vertices, and the connection relationship is adjusted to restore the non-manifold structure in the mesh, completing the lossless encoding and decoding of the mesh containing the non-manifold structure; finally, the texture map code stream is decoded, and the three-dimensional mesh is reconstructed using the decoding information of each channel.
  • the mesh decoding method can be applied to the decoding end.
  • the decoding end can be divided into six parts: a connection relationship decoding module, a geometric information decoding module, an attribute information decoding module, a non-manifold vertex information decoding module, a manifold mesh reconstruction module, and a non-manifold structure recovery module. They are introduced below:
  • connection relationship decoding module first decodes the connection relationship information code stream to obtain a pattern string.
  • the pattern string is traversed in a certain vertex traversal order (forward or reverse order), and the connection relationship is reconstructed according to the corresponding pattern in the pattern string.
  • vertex traversal order is output to the geometric information decoding module and the 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. Add the predicted coordinates to the residual value obtained by entropy decoding to get the geometric coordinate position to be decoded.
  • the vertex traversal order in the decoding process is the same as the vertex traversal order of the encoded geometric information. Note that the geometric coordinates of the initial triangle do not use predictive coding, but directly encode their geometric coordinate values.
  • the geometric coordinates of the triangle After the geometric coordinates of the triangle are decoded at the decoding end, it is used as the initial triangle to start traversing and decoding the geometric coordinates of the vertices of other triangles.
  • other decoding methods can also be used here. The specific decoding method is not emphasized, as long as it corresponds to the encoding end.
  • Output attribute information of the manifold mesh.
  • the decoding method 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 for decoding is described below.
  • (32) Decode the UV coordinates of the three vertices of the initial triangle in the order of vertex traversal. The prediction value is not calculated here.
  • the initial triangle directly encodes its UV coordinates instead of encoding the residual. Store the edges of the initial triangle in the edge set.
  • Input non-manifold information code stream, geometric information decoding order, and attribute information decoding order
  • the non-manifold information code stream is decoded to obtain the non-manifold identifier and non-manifold vertex index information.
  • the non-manifold identifier is used to identify whether there is a non-manifold structure in the mesh. If the non-manifold identifier is 0, there is no need to decode the non-manifold vertex index information, and there is no need to restore the non-manifold structure; if the non-manifold identifier is 1, the non-manifold vertex index information is decoded.
  • the decoding of non-manifold vertex index information adopts the method corresponding to the encoding end.
  • the non-manifold vertex index information is entropy decoded.
  • the position of the non-manifold vertex in the geometric decoding order and attribute decoding order is obtained.
  • the index information of the non-manifold vertex at the decoding end is recorded to obtain the newly added vertex index information and the original non-manifold vertex index information.
  • the newly added vertex index information and the original non-manifold vertex index information are input into the non-manifold structure recovery module.
  • the manifold mesh can be directly reconstructed by utilizing the connection relationship, geometric information, and attribute information of the manifold mesh, and the reconstructed manifold mesh is input into the non-manifold structure recovery module.
  • Input manifold mesh, newly added vertex index information, and original non-manifold vertex index information
  • the recovery process of non-manifold edges and non-manifold points is the same. First, traverse the newly added vertex index information and the corresponding original non-manifold vertex index information, and update the index information of the newly added vertices in the connection relationship to the index information of the original non-manifold vertex. Then, delete the newly added vertices from the vertices of the manifold mesh to obtain the reconstructed non-manifold mesh (i.e., the decoded mesh).
  • the grid coding method provided in the embodiment of the present application can be executed by a grid coding device, or a control module in the grid coding device for executing the grid coding method. Taking the method of performing grid coding by the coding device as an example, the grid coding device provided by the embodiment of the present application is explained.
  • FIG. 11 is a structural diagram of a grid coding device provided in an embodiment of the present application.
  • the grid coding device 300 includes:
  • a processing module 301 is used to split the non-manifold structure in the grid to be encoded to obtain non-manifold information and a manifold grid;
  • a first encoding module 302 configured to encode the non-manifold information to obtain a first sub-code stream
  • a second encoding module 303 configured to encode the manifold grid to obtain a second sub-code stream
  • the acquisition module 304 is configured to acquire a grid coding result according to the first sub-code stream and the second sub-code stream.
  • the to-be-encoded grid includes a first manifold grid and a first non-manifold grid, the first manifold grid and the first non-manifold grid are connected via the non-manifold structure, the non-manifold structure includes a first vertex, and the processing module includes:
  • an establishing unit configured to establish a second vertex, wherein the second vertex and the first vertex are duplicate points, and index information of the second vertex and the first vertex are different;
  • a processing unit configured to split the non-manifold structure in the to-be-encoded mesh based on the second vertices, so as to convert the first non-manifold mesh into a second manifold mesh;
  • the non-manifold information includes index information of the first vertex and index information of the second vertex
  • the manifold mesh includes the first manifold mesh and the second manifold mesh.
  • the non-manifold information further includes a non-manifold identifier
  • the first sub-code stream includes a code stream corresponding to the non-manifold identifier, a code stream corresponding to the index information of the second vertex, and a code stream corresponding to the index information of the first vertex;
  • the first sub-codestream there is an association relationship between the codestream corresponding to the non-manifold identifier, the codestream corresponding to the index information of the second vertex, and the codestream corresponding to the index information of the first vertex.
  • the index information of any one of the first vertex and the second vertex includes geometric index information and attribute index information, the geometric index information represents the position of the vertex in a geometric information encoding sequence, and the attribute index information represents the position of the vertex in a attribute information encoding sequence;
  • the first sub-code stream includes a code stream corresponding to the geometric index information and a code stream corresponding to the attribute index information.
  • processing unit is specifically configured to:
  • the index information of the first vertex in the first connection relationship information is updated to the index information of the second vertex, where the first connection relationship information is used to characterize the connection relationship of the vertices of the first non-manifold mesh.
  • the second encoding module 303 is specifically used to:
  • connection relationship information code stream Encoding the second connection relationship information of the manifold grid to obtain a connection relationship information code stream
  • the second sub-code stream includes the geometric information code stream, the attribute information code stream and the connection relationship information code stream.
  • the second connection relationship information is used to characterize the connection relationship of the vertices of the manifold mesh, and the second connection relationship information includes the updated first connection relationship information.
  • the grid encoding device 300 in the embodiment of the present application can reduce the quality loss of grid information after encoding and decoding processing.
  • the 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, an integrated circuit, or a 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 grid coding device provided in the embodiment of the present application can implement each process implemented by the method embodiment of Figure 2 and achieve the same technical effect. To avoid repetition, it will not be repeated here.
  • the grid decoding method provided in the embodiment of the present application can be executed by a grid decoding device, or a control module in the grid decoding device for executing the grid decoding method.
  • the grid decoding device provided in the embodiment of the present application is described by taking the grid decoding method executed by the grid decoding device as an example.
  • FIG. 12 is a structural diagram of a grid decoding device provided in an embodiment of the present application.
  • the grid decoding device 400 includes:
  • An acquisition module 401 is used to acquire a first sub-code stream and a second sub-code stream according to a grid coding result of a grid to be decoded;
  • a second decoding module 403, configured to decode the second sub-code stream to obtain a manifold grid
  • the processing module 404 is used to reconstruct the manifold grid based on the non-manifold information to obtain a decoded grid.
  • the non-manifold information includes index information of a first vertex and index information of a second vertex, and the index information of the second vertex is different from the index information of the first vertex;
  • the processing module 404 is specifically used for:
  • the manifold grid includes a first manifold grid and a second manifold grid
  • the grid to be decoded includes the first manifold grid and a first non-manifold grid
  • the first manifold grid and the first non-manifold grid both include a non-manifold structure
  • the non-manifold structure includes the first vertex
  • the first non-manifold grid is obtained by converting the second manifold grid.
  • the first sub-codestream includes a codestream corresponding to the non-manifold identifier, a codestream corresponding to the index information of the second vertex, and a codestream corresponding to the index information of the first vertex;
  • the non-manifold information further includes a non-manifold identifier.
  • the non-manifold identifier, the index information of the second vertex, and the index information of the first vertex are associated with each other.
  • the first sub-codestream includes a codestream corresponding to the geometric index information and a codestream corresponding to the attribute index information;
  • the index information of any one of the first vertex and the second vertex includes geometric index information and attribute index information, wherein the geometric index information represents the position of the vertex in the geometric information encoding order, and the attribute index information represents the position of the vertex in the attribute information encoding order.
  • the second sub-code stream includes a geometry information code stream, an attribute information code stream, and a connection relationship information code stream
  • the geometry information code stream is a code stream corresponding to the geometry information of the manifold mesh
  • the attribute information code stream is a code stream corresponding to the attribute information of the manifold mesh
  • the connection relationship information code stream is a code stream corresponding to second connection relationship information of the manifold mesh, where the second connection relationship information is used to characterize the connection relationship of vertices of the manifold mesh
  • the manifold mesh is obtained by constructing a mesh based on the geometric information of the manifold mesh, the attribute information of the manifold mesh and the second connection relationship information.
  • processing module 404 is specifically configured to:
  • the index information of the second vertex in the second connection relationship information is updated to the index information of the first vertex, and the manifold mesh is reconstructed to obtain a decoded mesh.
  • the grid decoding device 400 in the embodiment of the present application can reduce or even eliminate the quality loss of grid information after encoding and decoding processing.
  • the 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, an integrated circuit, or a 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 grid decoding device provided in the embodiment of the present application can implement each process implemented by the method embodiment of Figure 9 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, the memory 502 storing a program or instruction that can be run on the processor 501, for example, when the communication device 500 is an encoding end device, the program or instruction is executed by the processor 501 to implement the various steps of the above-mentioned 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 the various steps of the above-mentioned grid decoding method embodiment, and can achieve the same technical effect, to avoid repetition, it will not be repeated here.
  • An embodiment of the present application also provides a terminal, including a processor and a communication interface, wherein the processor is used to: decompose the non-manifold structure in the grid to be encoded to obtain non-manifold information and a manifold grid; encode the non-manifold information to obtain a first subcode stream; encode the manifold grid to obtain a second subcode stream; and obtain a grid encoding result based on the first subcode stream and the second subcode stream.
  • the processor is used to: obtain a first subcode stream and a second subcode stream based on the grid encoding result of the grid to be decoded; decode the first subcode stream to obtain non-manifold information; decode the second subcode stream to obtain a manifold grid; and reconstruct the manifold grid based on the non-manifold information to obtain a decoded grid.
  • This terminal embodiment corresponds to the above-mentioned grid encoding method or grid decoding method embodiment, Each implementation process and implementation method of the above-mentioned grid coding method or grid decoding method embodiment can be applied to the terminal embodiment and can achieve the same technical effect.
  • Figure 14 is a hardware structure diagram of a terminal implementing the 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 managing charging, discharging, and power consumption management through the power management system.
  • a power source such as a battery
  • the terminal structure shown in FIG14 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 graphics processor 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 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instruction required for at least one function (such as a sound playback function, an image playback function, etc.), etc.
  • the memory 609 may include a volatile memory or a non-volatile memory, or the memory 609 may include both volatile and non-volatile memories.
  • 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).
  • the memory 609 in the embodiment of the present application includes but is not limited to these and any other suitable types of 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 used for:
  • the non-manifold structure in the to-be-coded grid is split to obtain non-manifold information and manifold grid;
  • a grid coding result is obtained according to the first sub-code stream and the second sub-code stream.
  • the to-be-encoded mesh includes a first manifold mesh and a first non-manifold mesh, the first manifold mesh and the first non-manifold mesh are connected via the non-manifold structure, the non-manifold structure includes a first vertex, and the processor 610 is further configured to:
  • the non-manifold information includes index information of the first vertex and index information of the second vertex
  • the manifold mesh includes the first manifold mesh and the second manifold mesh.
  • the non-manifold information further includes a non-manifold identifier
  • the first sub-code stream includes a code stream corresponding to the non-manifold identifier, a code stream corresponding to the index information of the second vertex, and a code stream corresponding to the index information of the first vertex;
  • the first sub-codestream there is an association relationship between the codestream corresponding to the non-manifold identifier, the codestream corresponding to the index information of the second vertex, and the codestream corresponding to the index information of the first vertex.
  • the index information of any one of the first vertex and the second vertex includes geometric index information and attribute index information, the geometric index information represents the position of the vertex in a geometric information encoding sequence, and the attribute index information represents the position of the vertex in a attribute information encoding sequence;
  • the first sub-code stream includes a code stream corresponding to the geometric index information and a code stream corresponding to the attribute index information.
  • the splitting of the non-manifold structure in the to-be-encoded mesh based on the second vertex includes:
  • the index information of the first vertex in the first connection relationship information is updated to the index information of the second vertex, where the first connection relationship information is used to characterize the connection relationship of the vertices of the first non-manifold mesh.
  • processor 610 is further configured to:
  • connection relationship information code stream Encoding the second connection relationship information of the manifold grid to obtain a connection relationship information code stream
  • the second sub-code stream includes the geometric information code stream, the attribute information code stream and the connection relationship information code stream, the second connection relationship information is used to characterize the connection relationship of the vertices of the manifold mesh, and the second connection relationship information includes the updated first connection relationship information.
  • the processor 610 is configured to:
  • the manifold grid is reconstructed based on the non-manifold information to obtain a decoding grid.
  • the non-manifold information includes index information of a first vertex and index information of a second vertex, and the index information of the second vertex is different from the index information of the first vertex;
  • the processor 610 is further configured to:
  • the manifold grid includes a first manifold grid and a second manifold grid
  • the grid to be decoded includes the first manifold grid and a first non-manifold grid
  • the first manifold grid and the first non-manifold grid both include a non-manifold structure
  • the non-manifold structure includes the first vertex
  • the first non-manifold grid is obtained by converting the second manifold grid.
  • the first sub-codestream includes a codestream corresponding to the non-manifold identifier, a codestream corresponding to the index information of the second vertex, and a codestream corresponding to the index information of the first vertex;
  • the non-manifold information further includes a non-manifold identifier.
  • the non-manifold identifier, the index information of the second vertex, and the index information of the first vertex are associated with each other.
  • the first sub-codestream includes a codestream corresponding to the geometric index information and a codestream corresponding to the attribute index information;
  • the index information of any one of the first vertex and the second vertex includes geometric index information and attribute index information, wherein the geometric index information represents the position of the vertex in the geometric information encoding order, and the attribute index information represents the position of the vertex in the attribute information encoding order.
  • the second sub-code stream includes a geometry information code stream, an attribute information code stream, and a connection relationship information code stream
  • the geometry information code stream is a code stream corresponding to the geometry information of the manifold mesh
  • the attribute information code stream is a code stream corresponding to the attribute information of the manifold mesh
  • the connection relationship information code stream is a code stream corresponding to second connection relationship information of the manifold mesh, where the second connection relationship information is used to characterize the connection relationship of vertices of the manifold mesh
  • the manifold mesh is obtained by constructing a mesh based on the geometric information of the manifold mesh, the attribute information of the manifold mesh and the second connection relationship information.
  • processor 610 is further configured to:
  • the manifold grid is reconstructed to obtain a decoding grid.
  • the terminal in the embodiment of the present application can reduce or even eliminate the quality loss of the grid information after encoding and decoding processing.
  • 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 11 and achieve 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 grid encoding method embodiment are implemented, or when the program or instruction is executed by a processor, the various processes of the above-mentioned grid 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, etc.
  • 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 grid encoding method embodiment, or to implement the various processes of the above-mentioned grid 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, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
  • a storage medium such as ROM/RAM, a magnetic disk, or an optical disk
  • a terminal which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

本申请公开了一种网格编码方法、网格解码方法及相关设备,属于计算机技术领域,本申请实施例的网格编码方法包括:对待编码网格中的非流形结构进行拆分处理,得到非流形信息和流形网格;对所述非流形信息进行编码,得到第一子码流;对所述流形网格进行编码,得到第二子码流;依据所述第一子码流和所述第二子码流获取网格编码结果。

Description

网格编码方法、网格解码方法及相关设备
相关申请的交叉引用
本申请主张在2022年10月19日在中国提交的中国专利申请No.202211282835.1的优先权,其全部内容通过引用包含于此。
技术领域
本申请属于计算机技术领域,具体涉及一种网格编码方法、网格解码方法及相关设备。
背景技术
随着多媒体技术的迅速发展,三维模型成为继音频、图像、视频之后的新一代数字化媒体。三维网格和点云是两种常用的三维模型表示方式。三维网格模型与传统的图像、视频等多媒体相比具有更强的交互性和逼真性的特点,应用范围较为广泛。
目前,在编码端对三维网格进行编码时,对于存在非流形结构的网格,将非流形结构的网格转换为流形结构的网格进行编码,在解码端进行解码时获得的是流形结构的网格,从而导致解码端解出的网格与编码端编码的网格存在较大差异,使得编解码处理后网格信息的质量损失较大。
发明内容
本申请实施例提供一种网格编码方法、网格解码方法及相关设备,能够解决三维网格编解码处理后网格信息的质量损失较大的问题。
第一方面,提供了一种网格编码方法,包括:
对待编码网格中的非流形结构进行拆分处理,得到非流形信息和流形网格;
对所述非流形信息进行编码,得到第一子码流;
对所述流形网格进行编码,得到第二子码流;
依据所述第一子码流和所述第二子码流获取网格编码结果。
第二方面,提供了一种网格解码方法,包括:
依据待解码网格的网格编码结果获取第一子码流和第二子码流;
对所述第一子码流进行解码,获得非流形信息;
对所述第二子码流进行解码,获得流形网格;
基于所述非流形信息对所述流形网格进行重建处理,得到解码网格。
第三方面,提供了一种网格编码装置,包括:
处理模块,用于对待编码网格中的非流形结构进行拆分处理,得到非流形信息和流形网格;
第一编码模块,用于对所述非流形信息进行编码,得到第一子码流;
第二编码模块,用于对所述流形网格进行编码,得到第二子码流;
获取模块,用于依据所述第一子码流和所述第二子码流获取网格编码结果。
第四方面,提供了一种网格解码装置,包括:
获取模块,用于依据待解码网格的网格编码结果获取第一子码流和第二子码流;
第一解码模块,用于对所述第一子码流进行解码,获得非流形信息;
第二解码模块,用于对所述第二子码流进行解码,获得流形网格;
处理模块,用于基于所述非流形信息对所述流形网格进行重建处理,得到解码网格。
第五方面,提供了一种终端,该终端包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第一方面所述的方法的步骤;或者,所述程序或指令被所述处理器执行时实现如第二方面所述的方法的步骤。
第六方面,提供了一种终端,包括处理器及通信接口,其中,所述处理器用于:
对待编码网格中的非流形结构进行拆分处理,得到非流形信息和流形网格;
对所述非流形信息进行编码,得到第一子码流;
对所述流形网格进行编码,得到第二子码流;
依据所述第一子码流和所述第二子码流获取网格编码结果。
第七方面,提供了一种终端,包括处理器及通信接口,其中,所述处理器用于:
依据待解码网格的网格编码结果获取第一子码流和第二子码流;
对所述第一子码流进行解码,获得非流形信息;
对所述第二子码流进行解码,获得流形网格;
基于所述非流形信息对所述流形网格进行重建处理,得到解码网格。
第八方面,提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面所述的网格编码方法的步骤,或者,所述程序或指令被处理器执行时实现如第二方面所述的网格解码方法的步骤。
第九方面,提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面所述的方法的步骤,或者,实现如第二方面所述的方法的步骤。
第十方面,提供了一种计算机程序/程序产品,所述计算机程序/程序产品被存储在非易失的存储介质中,所述程序/程序产品被至少一个处理器执行以实现如第一方面所述的方法的步骤,或者,实现如第二方面所述的方法的步骤。
在本申请实施例中,对待编码网格中的非流形结构进行拆分处理,得到非流形信息和流形网格;对所述非流形信息进行编码,得到第一子码流;对所述流形网格进行编码,得到第二子码流;依据所述第一子码流和所述第二子码流获取网格编码结果。这样,通过对拆分非流形结构得到的非流形信息进行编码,从而在解码时能够通过非流形信息重建非流形结构,能够降低甚至消除编解码处理后网格信息的质量损失,实现无损编码。
附图说明
图1是相关技术中的Edgebreaker的五种模式的示意图;
图2是本申请实施例提供的一种网格编码方法的流程图;
图3是本申请实施例提供的另一种网格编码方法的流程图;
图4是本申请实施例提供的一种网格的示意图之一;
图5是本申请实施例提供的一种角(Corner)关系示意图;
图6是本申请实施例提供的一种网格遍历示意图;
图7是本申请实施例提供的一种网格的示意图之二;
图8是本申请实施例提供的一种网格的示意图之三;
图9是本申请实施例提供的一种网格解码方法的流程图;
图10是本申请实施例提供的另一种网格解码方法的流程图;
图11是本申请实施例提供的一种网格编码装置的结构示意图;
图12是本申请实施例提供的一种网格解码装置的结构示意图;
图13是本申请实施例提供的一种通信设备的结构示意图;
图14是本申请实施例提供的一种终端的结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员所获得的所有其他实施例,都属于本申请保护的范围。
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的术语在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”所区别的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”一般表示前后关联对象是一种“或”的关系。
本申请实施例中的编解码方法对应的编解码端可以为终端,该终端也可以称作终端设备或者用户终端(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
Draco将三维网格的连接信息、几何信息和UV坐标分别进行编码并进行存储。其中的核心模块,即编码连接信息的模块使用了Edgebreaker算法。对几何信息和UV坐标的编码则采用了常规的压缩方法,即对数据进行量化、预测压缩(平行四边形预测)和熵编码。由于Draco采用了连接关系驱动的编码方法,对几何信息和UV坐标的编码遵循连接信息的编码顺序。通过这种方式将连接关系编码的顶点顺序隐含在几何信息的顶点顺序中来避免单独传输连接关系编码的顶点顺序,从而节省了这部分的比特开销。
(2)Edgebreaker
Edgebreaker方法是一种三维网格连接关系编码方法,具有压缩性能好、便于实现、可以给出压缩比上限等优点。Edgebreaker方法本身只描述了三维网格连接信息的压缩方法,还要通过几何信息压缩和熵编码等才能实现对三维网格的压缩。
Edgebreaker编码技术对与球体同胚的三角形网格的压缩效率能够达到每个三角形2位或更少。编码算法使用五种不同的模式(称为C、L、E、R和S)以深度优先顺序访问网格的每个三角形。根据每个三角形所处的模式,对其进行标记,生成CLERS字符串,得到对网格连接关系的紧凑表示。
Edgebreaker方法的五种模式,如图1所示。Edgebreaker方法将网格分为已遍历部分和未遍历部分,两部分的边界被称为活动边界。在Edgebreaker的编码过程中,通过活动边界上的活动边访问待遍历的三角形,并根据活动边与其所处三角形的关系来选择使用哪种模式。将活动边所在三角形中的另一个顶点称为第三个顶点。如果第三个顶点不处于活动边界上,那么当前三角形标记为C模式。如果第三个顶点处于活动边界上,并且按照逆时针顺序,处于当前活动边顶点的下一个,那么当前三角形标记为R模式。如果第三个顶点处于活动边界上,并且按照逆时针顺序,处于当前活动边顶点的上一个,那么当前三角形标记为L模式。如果第三个顶点处于活动边界上,并且按照逆时针顺序,既是当前活动边顶点的上一个顶点,又是当前活动边的下一个顶点,那么当前三角形标记为E模式。如果第三个顶点处于活动边界上,但是按照逆时针顺序,既不是当前活动边顶点的上一个顶点,又不是当前活动边的下一个顶点,那么当前三角形标记为S模式。
在每次标记一个三角形之后,都会更新活动边界,并按照一定规则选择下一个活动边。当遍历完所有的三角形之后,对得到的CLERS字符串进行熵编码,可以得到更高的压缩效率示例地,根据EB的编码规则,最终熵编码的模式码字为CCRRSLCRSERRELCRRRCRRRE。
由于Edgebreaker方法的五种模式不能处理非流形网格,因此使用Edgebreaker方法前必须将网格转化成流形网格。
下面结合附图,通过一些实施例及其应用场景对本申请实施例提供的网格编码方法、 网格解码方法及相关设备进行详细地说明。
参见图2,图2是本申请实施例提供的一种网格编码方法的流程图,可以应用于编码端设备,如图2所示,网格编码方法包括以下步骤:
步骤101、对待编码网格中的非流形结构进行拆分处理,得到非流形信息和流形网格。
其中,非流形结构可以包括非流形边和非流形点,非流形点也可以描述为非流形顶点,构成非流形边的两个顶点也可以描述为非流形顶点。
需要说明的是,流形(Manifold)是局部具有欧氏空间性质的空间。一般的流形可以通过把许多平直的片折弯并粘连而成。流形满足的条件为:局部具有欧氏空间性质,而非流形可以是指不满足流形的条件。对于三维网格,流形边满足的条件为:网格边为一个或两个网格三角面片共享(edge is incident to only one or two faces);流形点满足的条件为:网格顶点的一环邻域三角片构成一个闭合或者开放的扇面(the faces incident to a vertex form a closed or an open fan)。非流形边可以是指不满足流形边的条件的网格边,非流形点可以是指不满足流形点的条件的网格顶点。
另外,确定待编码网格中的非流形边的方法可以是,建立一个数据结构来存储待编码网格中的每条边所在的三角形,通过查询每条边对应的三角形数量找出非流形边,非流形边对应的三角形数量大于或等于3;或者可以是,通过构造角列表(CornerTable)来建立网格中角和边之间的对应关系,通过该对应关系找出非流形边,非流形边对应的角的数量大于或等于3。其中,CornerTable可以用于表示网格中的角与顶点以及三角形之间的关系。
另外,确定待编码网格中的非流形点的方法可以是,构建CornerTable,建立待编码网格中的每个顶点和该顶点的角之间的对应关系,从顶点的某一个角开始,依次遍历与该角相邻且构成一个扇形的所有角,将顶点和遍历到的角标记为已遍历。如果在执行完上述过程后,有顶点仍存在未遍历过角,则说明该顶点为非流形点。
另外,对待编码网格中的非流形结构进行拆分处理,可以是为待编码网格中的非流形顶点建立重复顶点,并调整连接关系以将非流形结构转化为流形结构,该非流形顶点可以包括构成非流形边的顶点,以及非流形点。由于对非流形顶点建立了重复顶点,为便于描述,该重复顶点可以称为新增顶点,而非新增顶点可以称为原非流形顶点。
步骤102、对所述非流形信息进行编码,得到第一子码流。
其中,第一子码流也可以描述为非流形信息码流。非流形信息可以包括原非流形顶点的索引信息和新增顶点的索引信息。在编码第一子码流时,可以按照一定规则保持新增顶点与原非流形顶点之间的对应关系。例如,可以将新增顶点的索引信息与原非流形顶点的索引信息交错编码;或者,可以按照相同的顺序将新增顶点的索引信息与原非流形顶点的索引信息分别编码到两路码流,通过编码顺序来保持新增顶点与原非流形顶点之间的对应关系。本实施例对编码非流形信息的具体编码方式不进行限定。
步骤103、对所述流形网格进行编码,得到第二子码流。
其中,第二子码流可以包括几何信息码流、属性信息码流及连接关系信息码流。可以 对所述流形网格的几何信息进行编码,得到几何信息码流;可以对所述流形网格的属性信息进行编码,得到属性信息码流;可以对所述流形网格的连接关系信息进行编码,得到连接关系信息码流。
步骤104、依据所述第一子码流和所述第二子码流获取网格编码结果。
其中,网格编码结果可以包括所述第一子码流和所述第二子码流。所述网格编码结果还可以包括纹理图码流,该纹理图码流为使用视频编码器编码纹理图获得。
需要说明的是,待编码网格可以为三维网格,如图3所示,网格编码方法的过程可以如下:首先,如三维网格中存在非流形结构,则拆分其中的非流形结构,得到流形网格,同时,记录由于拆分非流形结构而新添加的新增顶点的顶点信息和原非流形顶点的顶点信息;然后,对流形网格,使用Edgebreaker方法编码连接信息,得到模式字符串,并对其进行熵编码;连接关系编码完成后编码网格的几何信息,例如可以使用平行四边形预测编码方法,本实施例对几何信息的编码方法不进行限定;如果网格存在UV坐标等属性信息,可以使用如相似三角形预测编码等方法进行编码,本实施例对属性信息的编码方法不进行限定;然后,确定编码网格中是否存在非流形结构,如果网格中存在非流形结构,则分别按照几何信息和属性信息的编码顺序编码新增顶点的索引信息和原非流形顶点的索引信息,可以直接熵编码新增顶点和对应的原非流形顶点的几何索引信息和属性索引信息,本实施例对具体编码方式不进行限定。最后,使用视频编码器对纹理图进行编码,将各路子码流进行混流,得到网格的编码码流。
需要说明的是,Edgebreaker需要待编码网格为流形结构,对于存在非流形结构的网格,需要Draco将其拆分成流形结构才能正确地编码。然而,Draco在解码端不会对拆分出的结构进行合并,使得解码端输出的网格相比于编码端输入的原始网格会多出拆分出的点,导致Draco不能无损编码这类存在非流形结构的网格。
随着人们对三维网格模型在视觉效果上越来越高的需求,以及许多更加成熟的三维扫描技术和三维建模软件的涌现,通过三维扫描设备或三维建模软件获取的三维网格模型的数据规模和复杂度也在急剧地增长着。因此,如何高效压缩三维网格数据是实现三维网格数据方便地传输、存储和处理的关键。
一个三维网格往往同时包含了拓扑信息、几何信息及属性信息三种主要信息。拓扑信息,也叫做连接性关系信息,用于描述网格中顶点和面片等元素之间的连接关系;几何信息是网格中所有顶点的三维坐标;属性信息则记录了附着在网格上的其它信息,比如法向量、纹理坐标以及颜色等。对三维网格数据的压缩往往就是针对这三种信息分别按照其数据特性进行压缩。另外,对于带有纹理图的三维网格,还需要对纹理图进行压缩。
在相关技术中的三维网格编码框架中,主要包括网格预处理模块、基础网格编码模块、基于视频的位移信息编码模块以及纹理图编码模块等。其中,基础网格编码模块采用Draco进行编码。Draco为用于压缩和解压缩3D几何网格和点云的库,旨在改善3D图形的存储和传输,大幅加速3D数据的编码、传输和解码。Draco支持对三维网格几何信息、连接 信息以及属性信息的压缩。Draco支持有损模式和近无损模式。Draco编码连接关系时使用的Edgebreaker方法是编码三维网格连接信息最高效的方法之一。
在本申请实施例中,对待编码网格中的非流形结构进行拆分处理,得到非流形信息和流形网格;对所述非流形信息进行编码,得到第一子码流;对所述流形网格进行编码,得到第二子码流;依据所述第一子码流和所述第二子码流获取网格编码结果。这样,通过对拆分非流形结构得到的非流形信息进行编码,从而在解码时能够通过非流形信息重建非流形结构,能够降低甚至消除编解码处理后网格信息的质量损失,实现无损编码。
可选地,所述待编码网格包括第一流形网格和第一非流形网格,所述第一流形网格和所述第一非流形网格通过所述非流形结构连接,所述非流形结构包括第一顶点,所述对待编码网格中的非流形结构进行拆分处理,包括:
建立第二顶点,所述第二顶点与所述第一顶点为重复点,所述第二顶点与所述第一顶点的索引信息不同;
基于所述第二顶点对待编码网格中的非流形结构进行拆分处理,以将所述第一非流形网格转换为第二流形网格;
其中,所述非流形信息包括所述第一顶点的索引信息及所述第二顶点的索引信息,所述流形网格包括所述第一流形网格和所述第二流形网格。
其中,第一顶点为非流形顶点(也可以称为原非流形顶点),第一顶点可以是构成非流形边的顶点,或者可以是非流形点。非流形结构可以包括非流形边,第一流形网格和第一非流形网格可以共有该非流形边;或者非流形结构可以包括非流形点,第一流形网格和第一非流形网格可以共有该非流形点。
另外,可以将第一非流形网格的连接关系中第一顶点的索引信息,更新为所述第二顶点的索引信息,从而使得第一非流形网格不再包括第一顶点,能够将所述第一非流形网格转换为第二流形网格。
该实施方式中,建立第二顶点,所述第二顶点与所述第一顶点为重复点,所述第二顶点与所述第一顶点的索引信息不同;基于所述第二顶点对待编码网格中的非流形结构进行拆分处理,以将所述第一非流形网格转换为第二流形网格;其中,所述非流形信息包括所述第一顶点的索引信息及所述第二顶点的索引信息,所述流形网格包括所述第一流形网格和所述第二流形网格。这样,能够实现对待编码网格中的非流形结构的拆分,将待编码网格中的非流形结构转化为流形结构,并记录新增顶点的索引信息,便于在解码时重建非流形结构。
可选地,所述非流形信息还包括非流形标识;
所述第一子码流包括所述非流形标识对应的码流、所述第二顶点的索引信息对应的码流及所述第一顶点的索引信息对应的码流;
其中,在所述第一子码流中,所述非流形标识对应的码流、所述第二顶点的索引信息对应的码流及所述第一顶点的索引信息对应的码流存在关联关系。
其中,所述非流形标识可以用于标识所述非流形结构。可以对所述非流形标识进行编码,得到所述非流形标识对应的码流。示例地,可以对所述非流形标识进行熵编码,得到所述非流形标识对应的码流。可以对所述第二顶点的索引信息进行编码,得到所述第二顶点的索引信息对应的码流。示例地,可以对所述第二顶点的索引信息进行熵编码,得到所述第二顶点的索引信息对应的码流。可以对所述第一顶点的索引信息进行编码,得到所述第一顶点的索引信息对应的码流。示例地,可以对所述第一顶点的索引信息进行熵编码,得到所述第一顶点的索引信息对应的码流。
另外,在编码第一子码流时,可以按照一定规则保持非流形标识、第一顶点与第二顶点之间的对应关系。以保持第一顶点与第二顶点之间的对应关系为例,可以将第二顶点的索引信息与第一顶点的索引信息交错编码,使得第一顶点的索引信息对应的码流与第二顶点的索引信息对应的码流之间存在关联关系。或者,可以按照相同的顺序将第二顶点的索引信息与第一顶点的索引信息分别编码到两路码流,通过编码顺序使得第一顶点的索引信息对应的码流与第二顶点的索引信息对应的码流之间存在关联关系。
该实施方式中,所述非流形信息还包括非流形标识;所述第一子码流包括所述非流形标识对应的码流、所述第二顶点的索引信息对应的码流及所述第一顶点的索引信息对应的码流;其中,在所述第一子码流中,所述非流形标识对应的码流、所述第二顶点的索引信息对应的码流及所述第一顶点的索引信息对应的码流存在关联关系,这样,在解码时能够基于该关联关系将第二顶点的索引信息更新为所述第一顶点的索引信息,以将第一顶点和第二顶点进行合并,重建非流形结构。
可选地,所述第一顶点和所述第二顶点中任意一个顶点的索引信息包括几何索引信息和属性索引信息,所述几何索引信息表征所述顶点在几何信息编码顺序中的位置,所述属性索引信息表征所述顶点在属性信息编码顺序中的位置;
其中,所述第一子码流包括所述几何索引信息对应的码流,及所述属性索引信息对应的码流。
其中,可以对所述几何索引信息进行编码,得到所述几何索引信息对应的码流。示例地,可以对所述几何索引信息进行熵编码,得到所述几何索引信息对应的码流。可以对所述属性索引信息进行编码,得到所述属性索引信息对应的码流。示例地,可以对所述属性索引信息进行熵编码,得到所述属性索引信息对应的码流。
该实施方式中,所述第一顶点和所述第二顶点中任意一个顶点的索引信息包括几何索引信息和属性索引信息,所述几何索引信息表征所述顶点在几何信息编码顺序中的位置,所述属性索引信息表征所述顶点在属性信息编码顺序中的位置;其中,所述第一子码流包括所述几何索引信息对应的码流,及所述属性索引信息对应的码流。这样,通过几何索引信息和属性索引信息,能够在几何编码维度和属性编码维度分别对新增顶点和原非流形顶点的索引信息进行编码。
可选地,所述基于所述第二顶点对待编码网格中的非流形结构进行拆分处理,包括:
将第一连接关系信息中的第一顶点的索引信息,更新为所述第二顶点的索引信息,所述第一连接关系信息用于表征所述第一非流形网格的顶点的连接关系。
其中,在第一顶点为构成非流形边的顶点的情况下,可以为非流形边的两个顶点分别创建第二顶点,该第二顶点为第一顶点的重复顶点,选择非流形边所在的一个三角形t,该选择的三角形为第一非流形网格对应的三角形,将第一连接关系信息中第一顶点的索引信息更新为所述第二顶点的索引信息,使该三角形中的第三个顶点与新添加的两个顶点构成新的三角形t’,用t’替换原三角形t,将非流形边转化成流形边。在第一顶点为非流形点的情况下,可以创建第二顶点,选择非流形点所在的一个三角形,该选择的三角形为第一非流形网格对应的三角形,将第一连接关系信息中第一顶点的索引信息更新为所述第二顶点的索引信息,将非流形点拆分为两个流形顶点。
该实施方式中,将第一连接关系信息中的第一顶点的索引信息,更新为所述第二顶点的索引信息,所述第一连接关系信息用于表征所述第一非流形网格的顶点的连接关系,从而能够实现非流形结构的拆分,将非流形结构转化为流形结构。
可选地,所述对所述流形网格进行编码,得到第二子码流,包括:
对所述流形网格的几何信息进行编码,得到几何信息码流;
对所述流形网格的属性信息进行编码,得到属性信息码流;
对所述流形网格的第二连接关系信息进行编码,得到连接关系信息码流;
其中,所述第二子码流包括所述几何信息码流、所述属性信息码流及所述连接关系信息码流,所述第二连接关系信息用于表征所述流形网格的顶点的连接关系,且所述第二连接关系信息包括更新后的所述第一连接关系信息。
其中,几何信息码流可以通过对流形网格的几何信息进行编码获得,编码几何信息可以采用差值预测编码算法、或者平行四边形预测编码算法、或者多平行四边形预测编码算法等等,本实施例对此不进行限定。属性信息码流可以通过对流形网格的属性信息进行编码获得,编码属性信息可以采用差值预测编码算法、或者平行四边形预测编码、或者相似三角形预测编码算法等等,本实施例对此不进行限定。连接关系信息码流可以通过对第二连接关系信息进行编码获得,示例地,可以使用Edgebreaker方法编码流形网格的第二连接关系信息,通过建立CornerTable来表示网格的连接关系,并利用CornerTable遍历网格中的所有三角形,生成Edgebreaker的CLERS模式字符串。
该实施方式中,对所述流形网格的几何信息进行编码,得到几何信息码流;对所述流形网格的属性信息进行编码,得到属性信息码流;对所述流形网格的第二连接关系信息进行编码,得到连接关系信息码流;其中,所述第二子码流包括所述几何信息码流、所述属性信息码流及所述连接关系信息码流,所述第二连接关系信息用于表征所述流形网格的顶点的连接关系,且所述第二连接关系信息包括更新后的所述第一连接关系信息。这样,编码得到的连接关系信息码流中不存在非流形结构的连接关系,便于使用Edgebreaker算法对网格进行编码。
一种实施方式中,网格编码方法可以应用于编码端,网格编码方法可以包括如下过程:
1)拆分网格中可能存在的非流形点和非流形边,将网格转化为多个流形网格,并记录由于拆分非流形结构而新添加的新增顶点以及原非流形顶点。确定编码网格中是否存在非流形结构,如果网格中存在非流形结构,则编码因拆分非流形结构而产生的新增顶点和原非流形顶点之间的对应关系,得到非流形信息码流;
2)使用Edgebreaker方法编码连接关系,得到可以简洁表示连接关系的CLERS模式字符串,使用熵编码对模式字符串进行压缩,得到连接关系信息码流;
3)使用如平行四边形预测等方法编码网格的几何信息,如果网格存在UV坐标等属性信息,使用如相似三角形预测等方法编码网格的UV坐标,得到属性信息码流。
4)使用视频编码器编码纹理图,得到纹理图码流;
5)合并各子码流得到网格的编码码流。
作为一种具体的实施例,网格编码方法可以应用于编码端。编码端可以分为五部分:拆分非流形结构模块、连接关系编码模块、几何信息编码模块、属性信息编码模块以及非流形顶点信息编码模块,其中,非流形顶点信息编码模块对非流形标识进行编码以及对非流形顶点索引信息进行编码。下面分别进行介绍:
(1)拆分非流形结构模块
输入:原始网格
输出:流形网格、原非流形顶点和新增顶点
其中,拆分非流形结构模块可以用于拆分非流形结构。拆分非流形结构主要分为两部分:拆分非流形边和拆分非流形点。
拆分非流形边的第一步是找到非流形边。非流形边的判断条件是一条边同时存在于三个或更多的三角形中。具体实现的方法:可以是,建立一个数据结构来存储每条边所在的三角形,通过查询该边对应的三角形数量找出非流形边;也可以是,通过构造CornerTable来建立网格中角和边之间的对应关系,进而找出非流形边。具体地,对于流形网格,每条边最多与两个角相对,相对的两个角称为对角。如图4所示,角a与角d与边bc相对,角a与角d为对角;而对于非流形边,会有三个或更多的对角。因此,通过角与边的对应关系也可以找出非流形边。
拆分非流形边的第二步是添加顶点,并修改连接关系。在找到非流形边后,为非流形边的两个顶点分别创建重复顶点,选择非流形边所在的一个三角形t,使该三角形中的第三个顶点与新添加的两个顶点构成新的三角形t’,用t’替换原三角形t,迭代此过程直到非流形边转化成流形边。新添加的顶点即为新增顶点,同时,记录下此过程中新增顶点的索引信息和原非流形顶点的索引信息。
拆分非流形点首先需要构建CornerTable,建立每个顶点和该顶点的角之间的对应关系。对于每一个顶点执行两步操作。第一步,从顶点的某一个角开始,依次遍历与该角相邻且构成一个扇形的所有角,将顶点和遍历到的角标记为已遍历。如果在执行完上述过程后, 有顶点仍存在未遍历过角,则说明该顶点为非流形点。第二步,对于每个非流形点,创建一个重复点,并修改连接关系,将第一步中未遍历到的角连接到新添加的重复点,将非流形点拆分为两个流形顶点。重复这一过程,直到所有的顶点都转换成流形点为止。创建的点即为新增顶点,同时,记录下此过程中新增顶点的索引信息和原非流形顶点的索引信息。
另外,为存在非流形结构的网格设置非流形标识。
(2)连接关系编码模块
输入:流形网格的连接关系
输出:连接关系信息码流和顶点编码顺序
其中,顶点编码顺序也可以称为顶点遍历顺序。本实施例可以使用Edgebreaker方法编码三维网格的连接关系,通过建立CornerTable来表示网格的连接关系,并利用CornerTable遍历网格中的所有三角形,生成Edgebreaker的CLERS模式字符串。
CornerTable用于表示网格中的角与顶点以及三角形之间的关系。在构建CornerTable之前首先需要对角进行编号,按照网格中三角形面片的顺序遍历三角形,对于每个三角形按照逆时针顺序为角进行编号,如果网格有f个三角形面片,那么网格会有3f个角。这样编号的好处是,通过角的序号,可以计算出当前角所在的三角形序号,计算方式如下所示;
fi=c/3
其中,c为当前角的索引,fi为当前角c所在三角形的序号,“/”为整数除法,对所得结果向下取整。
另外,还可以计算出按照逆时针方向,当前角c的前一个角cp和后一个角cn的序号,前一个角的计算方式如下所示:
cp=(fi*3)+(c-1)%3
其中,c为当前角的索引,fi为当前角c所在三角形的序号,“*”为乘法,“%”为取模运算。
另外,后一个角的计算方式如下所示:
cn=(fi*3)+(c+1)%3
其中,c为当前角的索引,fi为当前角c所在三角形的序号,“*”为乘法,“%”为取模运算。
CornerTable包含四部分:分别是V表、O表、U表以及M表。其中,V表存储每个角对应的顶点索引,O表存储每个角的对角索引,U表存储在遍历过程中每个三角形是否被遍历过的标识,M表存储在遍历过程中每个顶点是否被遍历过的标识。
利用CornerTable可以构造如图5所示的关系,其中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模式字符串。此时,五种模式的判断条件以及遍历规则如图6所示。当前遍历的角为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模式字符串进行压缩,得到最终的连接信息码流。
(3)几何信息编码模块
输入:流形网格的几何信息和连接关系编码顺序
输出:几何信息码流以及几何信息编码顺序
其中,几何信息编码模块编码几何信息可以采用多种方法,如差值预测编码算法、平行四边形预测编码算法、多平行四边形预测编码算法等,此处不强调具体的编码方法。以平行四边形预测编码算法为例:设有a、b、c、d四个顶点,构成如图7所示的网格中相邻的两个三角形。
其中,a、b、c点的几何信息已编码,d点的几何信息待编码,计算d点几何坐标的预测值d’的公式如下所示:
d′(x,y,z)=b(x,y,z)+c(x,y,z)-a(x,y,z)
得到d’后,计算d’与d点三维坐标的差值:
Δd(x,y,z)=d(x,y,z)-d′(x,y,z)
对Δd进行熵编码得到几何信息的码流。
对于无法使用平行四边形预测的三角形,比如处于网格边界的三角形,使用差值编码方法编码几何信息。即使用相邻已编码顶点的坐标值,作为当前顶点坐标的预测值,计算并预测残差。
(4)属性信息编码模块
输入:流形网格的属性信息和连接关系编码顺序
输出:属性信息码流以及属性信息的编码顺序
其中,三维网格的属性信息一般包括UV坐标、法向量等,以UV坐标为例。UV坐标可以采用的编码方法有很多种,包括差值预测编码、平行四边形预测编码以及相似三角形预测编码等,此处不强调具体的编码方法。下面描述相似三角形预测算法。
首先选取一个三维网格中的三角形作为初始三角形,对初始三角形的三个顶点不进行预测直接编码UV坐标,并且把初始三角形的边存入边集合中,这个集合可以是满足一定存取准则的数据结构。之后取出一个集合中的边τ,预测下一个新三角形中τ的对顶点UV坐标。并且将新三角形中除τ之外的两边放入集合内。记待预测点为点C,边τ两端点分别为N,P,通过τ与新三角形相邻的三角形对顶点为O,C在τ上的投影点为X。如图8所示,由于点N,P,O三点的UV坐标都先于C点编码,因此可以利用这三点预测C点的UV坐标。具体计算流程如下:
设Cuv,Xuv,Nuv,Puv,Ouv分别为各点的UV坐标,CG,XG,NG,PG,OG为各点的几何坐标。首先计算点X的UV坐标:

计算向量Rotated()表示对向量进行90度翻转:
最后计算C点预测UV坐标Predc


得到UV坐标预测值之后,再与原始UV坐标相减得到残差值。
编码UV坐标步骤如下:
(41)从连接性关系中选取一个初始三角形,不进行预测直接编码初始三角形三个顶点的UV坐标。将初始三角形边存入边集合中。
(42)按照存取准则从集合中选取边τ,编码与τ组成的新三角形对顶点的UV坐标。利用三角形三维到二维的投影关系,依据以上所述的UV坐标预测值计算过程计算待编码点的预测值。将UV坐标原始值减去预测值得到残差。
(43)将新三角形的两条边加入边集合中,移除集合顶部的边τ。从集合中取出下一条边,继续编码该边邻接三角形的对顶点UV坐标,返回步骤3,直到所有顶点的UV坐标编码完成。
(44)熵编码UV坐标残差,输出UV坐标码流。
(5)非流形顶点索引编码模块
输入:新增顶点的索引信息、原非流形顶点的索引信息、几何信息的编码顺序、属性信息的编码顺序
输出:非流形信息码流
其中,非流形顶点索引信息包括新增顶点索引信息及原非流形顶点索引信息两部分。
首先,确定编码网格中是否存在非流形结构,例如,如果编码网格中不存在非流形结构,即新增顶点数量为0,将非流形标识置为0,不需要再编码新增顶点信息;如果编码网格中存在非流形结构,即新增顶点数量大于0,将非流形标识置为1,然后编码新增顶点的索引信息和对应的原非流形顶点的索引信息。在编码时,需要按照一定规则保持新增顶点与原非流形顶点之间的对应关系。例如,可以将新增顶点的索引信息与原非流形顶点的索引信息交错编码;也可以按照相同的顺序将新增顶点的索引信息与原非流形顶点的索引信息分别编码到两路码流,通过编码顺序来保持新增顶点与原非流形顶点之间的对应关系。本实施例对保持新增顶点与原非流形顶点之间的对应关系的具体实现不进行限定。
另外,非流形顶点索引信息包括几何顶点索引信息和属性顶点索引信息两部分。可选地,编码非流形顶点索引信息主要分为两步:第一步是记录几何顶点在几何信息编码顺序中的位置和属性顶点在属性信息编码顺序中的位置;第二步是对几何顶点的几何信息位置和属性顶点的属性信息位置进行熵编码,得到非流形信息码流。此处,除了直接熵编码非流形顶点的索引信息外,当新增顶点和原非流形顶点一一对应时,还可以编码用于表征顶点是否是新增顶点的标识和用于表征顶点是否是原非流形顶点的标识,来表示新增顶点索引信息和非流形顶点索引信息之间的对应关系。本实施例对具体的编码方式不进行限定。
其中,非流形信息码流包括非流形标识和非流形顶点索引信息。
另外,非流形信息码流在总码流中可以有多种存放方式:一种是将非流形信息码流作为单独的一路子码流;另一种是将非流形几何顶点的索引信息的码流存放到几何信息码流中,将非流形属性顶点的索引信息的码流存放到属性信息码流中;或者,还可以将非流形几何顶点的索引信息的码流和非流形属性顶点的索引信息的码流作为两路子码流分别存放到总码流中。本实施例对非流形信息码流在总码流中的存放方式不进行限定。
最后,将各路子码流进行混流后形成网格的编码码流。
参见图,图9是本申请实施例提供的一种网格解码方法的流程图,可以应用于解码端设备,如图9所示,网格解码方法包括以下步骤:
步骤201、依据待解码网格的网格编码结果获取第一子码流和第二子码流;
步骤202、对所述第一子码流进行解码,获得非流形信息;
步骤203、对所述第二子码流进行解码,获得流形网格;
步骤204、基于所述非流形信息对所述流形网格进行重建处理,得到解码网格。
在本申请实施例中,依据待解码网格的网格编码结果获取第一子码流和第二子码流; 对所述第一子码流进行解码,获得非流形信息;对所述第二子码流进行解码,获得流形网格;基于所述非流形信息对所述流形网格进行重建处理,得到解码网格。这样,基于所述非流形信息对所述流形网格进行重建处理,能够通过非流形信息重建非流形结构,从而能够降低甚至消除编解码处理后网格信息的质量损失,实现无损编码。
可选地,所述非流形信息包括第一顶点的索引信息及第二顶点的索引信息,所述第二顶点与所述第一顶点的索引信息不同;
所述基于所述非流形信息对所述流形网格进行重建处理,得到解码网格,包括:
基于所述第一顶点的索引信息及第二顶点的索引信息对所述流形网格进行重建处理,得到解码网格;
其中,所述流形网格包括第一流形网格和第二流形网格,所述待解码网格包括所述第一流形网格和第一非流形网格,所述第一流形网格和所述第一非流形网格均包括非流形结构,所述非流形结构包括所述第一顶点,所述第一非流形网格由所述第二流形网格转换获得。
该实施方式中,基于所述第一顶点的索引信息及第二顶点的索引信息对所述流形网格进行重建处理,得到解码网格;其中,所述流形网格包括第一流形网格和第二流形网格,所述待解码网格包括所述第一流形网格和第一非流形网格,所述第一流形网格和所述第一非流形网格均包括非流形结构,所述非流形结构包括所述第一顶点,所述第一非流形网格由所述第二流形网格转换获得,从而能够实现解码时重建非流形结构。
可选地,所述第一子码流包括非流形标识对应的码流、所述第二顶点的索引信息对应的码流及所述第一顶点的索引信息对应的码流;
所述非流形信息还包括非流形标识,在所述非流形信息中,所述非流形标识、所述第二顶点的索引信息及所述第一顶点的索引信息存在关联关系。
该实施方式中,所述第一子码流包括非流形标识对应的码流,所述第二顶点的索引信息对应的码流,及所述第一顶点的索引信息对应的码流;所述非流形信息还包括非流形标识,在所述非流形信息中,所述非流形标识、所述第二顶点的索引信息及所述第一顶点的索引信息存在关联关系。这样,能够基于该关联关系将第二顶点的索引信息更新为所述第一顶点的索引信息,以将第一顶点和第二顶点进行合并,重建非流形结构。
可选地,所述第一子码流包括几何索引信息对应的码流,及属性索引信息对应的码流;
所述第一顶点和所述第二顶点中任意一个顶点的索引信息包括几何索引信息和属性索引信息,所述几何索引信息表征所述顶点在几何信息编码顺序中的位置,所述属性索引信息表征所述顶点在属性信息编码顺序中的位置。
该实施方式中,所述第一子码流包括几何索引信息对应的码流,及属性索引信息对应的码流;所述第一顶点和所述第二顶点中任意一个顶点的索引信息包括几何索引信息和属性索引信息,所述几何索引信息表征所述顶点在几何信息编码顺序中的位置,所述属性索引信息表征所述顶点在属性信息编码顺序中的位置。这样,通过几何索引信息和属性索引 信息,能够在几何解码维度和属性解码维度分别对新增顶点和原非流形顶点的索引信息对应的码流进行解码。
可选地,所述第二子码流包括几何信息码流、属性信息码流及连接关系信息码流,所述几何信息码流为所述流形网格的几何信息对应的码流,所述属性信息码流为所述流形网格的属性信息对应的码流,所述连接关系信息码流为所述流形网格的第二连接关系信息对应的码流,所述第二连接关系信息用于表征所述流形网格的顶点的连接关系;
其中,所述流形网格基于所述流形网格的几何信息、所述流形网格的属性信息及所述第二连接关系信息构建网格获得。
该实施方式中,所述第二子码流包括几何信息码流、属性信息码流及连接关系信息码流,所述几何信息码流为所述流形网格的几何信息对应的码流,所述属性信息码流为所述流形网格的属性信息对应的码流,所述连接关系信息码流为所述流形网格的第二连接关系信息对应的码流,所述第二连接关系信息用于表征所述流形网格的顶点的连接关系;其中,所述流形网格基于所述流形网格的几何信息、所述流形网格的属性信息及所述第二连接关系信息构建网格获得。这样,连接关系信息码流中不存在非流形结构的连接关系,便于使用Edgebreaker算法对网格进行编码。
可选地,所述基于所述第一顶点的索引信息及第二顶点的索引信息对所述流形网格进行重建处理,得到解码网格,包括:
将所述第二连接关系信息中的第二顶点的索引信息,更新为所述第一顶点的索引信息,对所述流形网格进行重建处理,得到解码网格。
该实施方式中,将所述第二连接关系信息中的第二顶点的索引信息,更新为所述第一顶点的索引信息,对所述流形网格进行重建处理,得到解码网格,能够恢复网格中的非流形结构,实现非流形网格的重建。
需要说明的是,本实施例作为与图2所示的实施例中对应的解码侧的实施方式,其具体的实施方式可以参见图2所示的实施例的相关说明,为了避免重复说明,本实施例不再赘述,且还可以达到相同有益效果。
在解码端,可以将待解码码流分解,得到各路子码流。网格解码方法可以包括如下过程:
1)熵解码连接关系信息码流得到CLERS模式字符串,使用模式字符串重建连接关系。
2)解码几何信息码流,使用平行四边形反预测等方法解码网格的几何信息;
3)解码属性信息码流,使用相似三角形反预测等方法解码网格的UV坐标。
4)解码非流形信息码流,确定网格是否存在非流形标识。如果网格中存在非流形结构,如果网格中存在非流形标识,则进一步解码得到新增顶点的索引信息和与其对应的原非流形顶点的索引信息,将新增顶点与原非流形顶点进行合并,并调整连接关系,恢复网格中的非流形结构,完成含有非流形结构网格的无损编解码。
5)解码纹理图码流,得到最终的三维网格。
需要说明的是,在编码含有非流形结构的网格时能够通过编码端进行网格拆分和解码端进行网格合并,来使用Edgebreaker对非流形网格进行无损编码。
需要说明的是,如图10所示,可以将待解码码流分解成几何信息码流、连接关系信息码流、属性信息码流、非流形信息码流和纹理图码流。可以分别对这些码流进行解码。首先熵解码连接关系信息码流,得到模式字符串,并重建连接关系;然后,使用与编码端相对应的解码方法解码几何信息码流;然后,使用与编码端相对应的解码方法解码网格的UV坐标;然后,解码非流形信息码流,确定网格是否存在非流形标识,如果网格中存在非流形标识,则进一步解码得到新增顶点的索引信息和与其对应的原非流形顶点的索引信息,将新增顶点与原非流形顶点进行合并,并调整连接关系,恢复网格中的非流形结构,完成含有非流形结构网格的无损编解码;最后,解码纹理图码流,使用各路解码信息重建出三维网格。
作为一种具体的实施例,网格解码方法可以应用于解码端。解码端可以分为六部分:连接关系解码模块、几何信息解码模块、属性信息解码模块、非流形顶点信息解码模块、重建流形网格模块以及恢复非流形结构模块。下面分别进行介绍:
(1)连接关系解码模块
输入:连接关系信息码流
输出:流形网格的连接关系和解码的顶点遍历顺序
其中,连接关系解码模块先对连接关系信息码流进行解码得到模式字符串。按照某种顶点遍历顺序(正序或逆序)遍历模式字符串,根据模式字符串中相对应的模式来重建连接关系。此外,将顶点遍历顺序输出至几何信息解码模块和属性信息解码模块。
(2)几何信息解码模块
输入:几何信息码流、连接关系的解码顺序
输出:流形网格的几何信息。
网格几何坐标的解码过程是编码过程的逆过程:先熵解码出坐标预测残差。再根据已解码三角形按照平行四边法则预测出待解码点的预测坐标。将预测坐标加上熵解码出的残差值即可得到待解码的几何坐标位置。在解码过程中的顶点遍历顺序与编码几何信息的顶点遍历顺序相同。注意,初始三角形的几何坐标不使用预测编码,而是直接编码它们的几何坐标值。在解码端解码出该三角形的几何坐标后作为初始三角形开始遍历解码其他三角形顶点的几何坐标。另外,此处还可以使用其他解码方法,不强调具体的解码方法,只要与编码端对应即可。
(3)属性信息解码模块
输入:属性信息码流、连接关系的解码顺序
输出:流形网格的属性信息。
以UV坐标为例,解码方法采用与编码端对应的解码方法,此处不强调具体的解码方法。下面描述使用相似三角形预测算法进行解码的解码过程。
解码UV坐标过程如下:
(31)熵解码UV坐标码流。
(32)按照顶点遍历顺序解码初始三角形三个顶点的UV坐标,这里不计算预测值,初始三角形是直接编码其UV坐标而不是编码残差。将初始三角形边存入边集合中。
(33)按照存取准则从集合中选取边τ,解码与边τ组成的新三角形对顶点的UV坐标。先利用三角形三维到二维的映射关系,与编码端一致的计算方式计算待解码点的UV坐标预测值。再将预测值与与熵解码的残差相加,得到重建UV坐标。
(34)将新三角形的两条边加入边集合中,移除集合顶部的边τ。从集合中取出下一条边,继续解码该边邻接三角形的对顶点UV坐标,返回步骤(33),直到所有顶点的UV坐标解码完成。
(4)非流形顶点信息解码模块
输入:非流形信息码流、几何信息解码顺序和属性信息解码顺序
输出:非流形标识、新增顶点索引信息和原非流形顶点索引信息
首先,对非流形信息码流解码得到非流形标识和非流形顶点索引信息。该非流形标识用于标识网格中是否存在非流形结构,如果非流形标识为0,则不需要解码非流形顶点索引信息,且不需要恢复非流形结构;如果非流形标识为1,则解码非流形顶点索引信息。
非流形顶点索引信息解码采用与编码端相对应的方法,首先对非流形顶点索引信息熵解码,基于熵解码结果和几何信息解码顺序和属性信息解码顺序,得到非流形顶点在几何解码顺序和属性解码顺序中的位置,然后记录非流形顶点在解码端的索引信息,得到新增顶点索引信息和原非流形顶点索引信息。将新增顶点索引信息和原非流形顶点索引信息输入至恢复非流形结构模块。
(5)重建流形网格模块
输入:流形网格的连接关系、流形网格的几何信息、流形网格的属性信息
输出:流形网格
其中,利用流形网格的连接关系、几何信息、属性信息,可以直接重建得到流形网格,将重建得到的流形网格输入恢复非流形结构模块。
(6)恢复非流形结构模块
输入:流形网格、新增顶点索引信息和原非流形顶点索引信息
输出:重建的非流形网格
其中,非流形边与非流形点的恢复过程是相同的。首先,遍历新增顶点索引信息和对应的原非流形顶点索引信息,将连接关系中新增顶点的索引信息更新为原非流形顶点的索引信息。然后,在流形网格的顶点中删除新增顶点,可得到重建的非流形网格(即解码网格)。
需要说明的是,本申请实施例提供的网格编码方法,执行主体可以为网格编码装置,或者,该网格编码装置中的用于执行网格编码的方法的控制模块。本申请实施例中以网格 编码装置执行网格编码的方法为例,说明本申请实施例提供的网格编码装置。
请参见图11,图11是本申请实施例提供的一种网格编码装置的结构图,如图11所示,网格编码装置300包括:
处理模块301,用于对待编码网格中的非流形结构进行拆分处理,得到非流形信息和流形网格;
第一编码模块302,用于对所述非流形信息进行编码,得到第一子码流;
第二编码模块303,用于对所述流形网格进行编码,得到第二子码流;
获取模块304,用于依据所述第一子码流和所述第二子码流获取网格编码结果。
可选地,所述待编码网格包括第一流形网格和第一非流形网格,所述第一流形网格和所述第一非流形网格通过所述非流形结构连接,所述非流形结构包括第一顶点,所述处理模块包括:
建立单元,用于建立第二顶点,所述第二顶点与所述第一顶点为重复点,所述第二顶点与所述第一顶点的索引信息不同;
处理单元,用于基于所述第二顶点对待编码网格中的非流形结构进行拆分处理,以将所述第一非流形网格转换为第二流形网格;
其中,所述非流形信息包括所述第一顶点的索引信息及所述第二顶点的索引信息,所述流形网格包括所述第一流形网格和所述第二流形网格。
可选地,所述非流形信息还包括非流形标识;
所述第一子码流包括所述非流形标识对应的码流、所述第二顶点的索引信息对应的码流及所述第一顶点的索引信息对应的码流;
其中,在所述第一子码流中,所述非流形标识对应的码流、所述第二顶点的索引信息对应的码流及所述第一顶点的索引信息对应的码流存在关联关系。
可选地,所述第一顶点和所述第二顶点中任意一个顶点的索引信息包括几何索引信息和属性索引信息,所述几何索引信息表征所述顶点在几何信息编码顺序中的位置,所述属性索引信息表征所述顶点在属性信息编码顺序中的位置;
其中,所述第一子码流包括所述几何索引信息对应的码流,及所述属性索引信息对应的码流。
可选地,所述处理单元具体用于:
将第一连接关系信息中的第一顶点的索引信息,更新为所述第二顶点的索引信息,所述第一连接关系信息用于表征所述第一非流形网格的顶点的连接关系。
可选地,所述第二编码模块303具体用于:
对所述流形网格的几何信息进行编码,得到几何信息码流;
对所述流形网格的属性信息进行编码,得到属性信息码流;
对所述流形网格的第二连接关系信息进行编码,得到连接关系信息码流;
其中,所述第二子码流包括所述几何信息码流、所述属性信息码流及所述连接关系信 息码流,所述第二连接关系信息用于表征所述流形网格的顶点的连接关系,且所述第二连接关系信息包括更新后的所述第一连接关系信息。
本申请实施例中的网格编码装置300能够降低编解码处理后网格信息的质量损失。
本申请实施例中的网格编码装置可以是装置,具有操作系统的装置或电子设备,也可以是终端中的部件、集成电路、或芯片。该装置或电子设备可以是移动终端,也可以为非移动终端。示例性的,移动终端可以包括但不限于上述所列举的终端的类型,非移动终端可以为服务器、网络附属存储器(Network Attached Storage,NAS)、个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。
本申请实施例提供的网格编码装置能够实现图2的方法实施例实现的各个过程,并达到相同的技术效果,为避免重复,这里不再赘述。
需要说明的是,本申请实施例提供的网格解码方法,执行主体可以为网格解码装置,或者,该网格解码装置中的用于执行网格解码的方法的控制模块。本申请实施例中以网格解码装置执行网格解码的方法为例,说明本申请实施例提供的网格解码装置。
请参见图12,图12是本申请实施例提供的一种网格解码装置的结构图,如图12所示,网格解码装置400包括:
获取模块401,用于依据待解码网格的网格编码结果获取第一子码流和第二子码流;
第一解码模块402,用于对所述第一子码流进行解码,获得非流形信息;
第二解码模块403,用于对所述第二子码流进行解码,获得流形网格;
处理模块404,用于基于所述非流形信息对所述流形网格进行重建处理,得到解码网格。
可选地,所述非流形信息包括第一顶点的索引信息及第二顶点的索引信息,所述第二顶点与所述第一顶点的索引信息不同;
所述处理模块404具体用于:
基于所述第一顶点的索引信息及第二顶点的索引信息对所述流形网格进行重建处理,得到解码网格;
其中,所述流形网格包括第一流形网格和第二流形网格,所述待解码网格包括所述第一流形网格和第一非流形网格,所述第一流形网格和所述第一非流形网格均包括非流形结构,所述非流形结构包括所述第一顶点,所述第一非流形网格由所述第二流形网格转换获得。
可选地,所述第一子码流包括非流形标识对应的码流、所述第二顶点的索引信息对应的码流及所述第一顶点的索引信息对应的码流;
所述非流形信息还包括非流形标识,在所述非流形信息中,所述非流形标识、所述第二顶点的索引信息及所述第一顶点的索引信息存在关联关系。
可选地,所述第一子码流包括几何索引信息对应的码流,及属性索引信息对应的码流;
所述第一顶点和所述第二顶点中任意一个顶点的索引信息包括几何索引信息和属性索引信息,所述几何索引信息表征所述顶点在几何信息编码顺序中的位置,所述属性索引信息表征所述顶点在属性信息编码顺序中的位置。
可选地,所述第二子码流包括几何信息码流、属性信息码流及连接关系信息码流,所述几何信息码流为所述流形网格的几何信息对应的码流,所述属性信息码流为所述流形网格的属性信息对应的码流,所述连接关系信息码流为所述流形网格的第二连接关系信息对应的码流,所述第二连接关系信息用于表征所述流形网格的顶点的连接关系;
其中,所述流形网格基于所述流形网格的几何信息、所述流形网格的属性信息及所述第二连接关系信息构建网格获得。
可选地,所述处理模块404具体用于:
将所述第二连接关系信息中的第二顶点的索引信息,更新为所述第一顶点的索引信息,对所述流形网格进行重建处理,得到解码网格。
本申请实施例中的网格解码装置400能够降低甚至消除编解码处理后网格信息的质量损失。
本申请实施例中的网格解码装置可以是装置,具有操作系统的装置或电子设备,也可以是终端中的部件、集成电路、或芯片。该装置或电子设备可以是移动终端,也可以为非移动终端。示例性的,移动终端可以包括但不限于上述所列举的终端的类型,非移动终端可以为服务器、网络附属存储器(Network Attached Storage,NAS)、个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。
本申请实施例提供的网格解码装置能够实现图9的方法实施例实现的各个过程,并达到相同的技术效果,为避免重复,这里不再赘述。
可选地,如图13所示,本申请实施例还提供一种通信设备500,包括处理器501和存储器502,存储器502上存储有可在所述处理器501上运行的程序或指令,例如,该通信设备500为编码端设备时,该程序或指令被处理器501执行时实现上述网格编码方法实施例的各个步骤,且能达到相同的技术效果。该通信设备500为解码端设备时,该程序或指令被处理器501执行时实现上述网格解码方法实施例的各个步骤,且能达到相同的技术效果,为避免重复,这里不再赘述。
本申请实施例还提供一种终端,包括处理器及通信接口,所述处理器用于:对待编码网格中的非流形结构进行拆分处理,得到非流形信息和流形网格;对所述非流形信息进行编码,得到第一子码流;对所述流形网格进行编码,得到第二子码流;依据所述第一子码流和所述第二子码流获取网格编码结果。或者,所述处理器用于:依据待解码网格的网格编码结果获取第一子码流和第二子码流;对所述第一子码流进行解码,获得非流形信息;对所述第二子码流进行解码,获得流形网格;基于所述非流形信息对所述流形网格进行重建处理,得到解码网格。该终端实施例与上述网格编码方法或网格解码方法实施例对应, 上述网格编码方法或网格解码方法实施例的各个实施过程和实现方式均可适用于该终端实施例中,且能达到相同的技术效果。具体地,图14为实现本申请实施例的一种终端的硬件结构示意图。
该终端600包括但不限于:射频单元601、网络模块602、音频输出单元603、输入单元604、传感器605、显示单元606、用户输入单元607、接口单元608、存储器609以及处理器610等中的至少部分部件。
本领域技术人员可以理解,终端600还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器610逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图14中示出的终端结构并不构成对终端的限定,终端可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。
应理解的是,本申请实施例中,输入单元604可以包括图形处理单元(Graphics Processing Unit,GPU)6041和麦克风6042,图形处理器6041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元606可包括显示面板6061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板6061。用户输入单元607包括触控面板6071以及其他输入设备6072中的至少一种。触控面板6071,也称为触摸屏。触控面板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还用于:
对所述流形网格的几何信息进行编码,得到几何信息码流;
对所述流形网格的属性信息进行编码,得到属性信息码流;
对所述流形网格的第二连接关系信息进行编码,得到连接关系信息码流;
其中,所述第二子码流包括所述几何信息码流、所述属性信息码流及所述连接关系信息码流,所述第二连接关系信息用于表征所述流形网格的顶点的连接关系,且所述第二连接关系信息包括更新后的所述第一连接关系信息。
其中,在所述终端为解码端设备的情况下:
所述处理器610用于:
依据待解码网格的网格编码结果获取第一子码流和第二子码流;
对所述第一子码流进行解码,获得非流形信息;
对所述第二子码流进行解码,获得流形网格;
基于所述非流形信息对所述流形网格进行重建处理,得到解码网格。
可选地,所述非流形信息包括第一顶点的索引信息及第二顶点的索引信息,所述第二顶点与所述第一顶点的索引信息不同;
所述处理器610还用于:
基于所述第一顶点的索引信息及第二顶点的索引信息对所述流形网格进行重建处理,得到解码网格;
其中,所述流形网格包括第一流形网格和第二流形网格,所述待解码网格包括所述第一流形网格和第一非流形网格,所述第一流形网格和所述第一非流形网格均包括非流形结构,所述非流形结构包括所述第一顶点,所述第一非流形网格由所述第二流形网格转换获得。
可选地,所述第一子码流包括非流形标识对应的码流、所述第二顶点的索引信息对应的码流及所述第一顶点的索引信息对应的码流;
所述非流形信息还包括非流形标识,在所述非流形信息中,所述非流形标识、所述第二顶点的索引信息及所述第一顶点的索引信息存在关联关系。
可选地,所述第一子码流包括几何索引信息对应的码流,及属性索引信息对应的码流;
所述第一顶点和所述第二顶点中任意一个顶点的索引信息包括几何索引信息和属性索引信息,所述几何索引信息表征所述顶点在几何信息编码顺序中的位置,所述属性索引信息表征所述顶点在属性信息编码顺序中的位置。
可选地,所述第二子码流包括几何信息码流、属性信息码流及连接关系信息码流,所述几何信息码流为所述流形网格的几何信息对应的码流,所述属性信息码流为所述流形网格的属性信息对应的码流,所述连接关系信息码流为所述流形网格的第二连接关系信息对应的码流,所述第二连接关系信息用于表征所述流形网格的顶点的连接关系;
其中,所述流形网格基于所述流形网格的几何信息、所述流形网格的属性信息及所述第二连接关系信息构建网格获得。
可选地,所述处理器610还用于:
将所述第二连接关系信息中的第二顶点的索引信息,更新为所述第一顶点的索引信息, 对所述流形网格进行重建处理,得到解码网格。
本申请实施例中的终端能够降低甚至消除编解码处理后网格信息的质量损失。
具体地,本申请实施例的终端还包括:存储在存储器609上并可在处理器610上运行的指令或程序,处理器610调用存储器609中的指令或程序执行图11所示各模块执行的方法,并达到相同的技术效果,为避免重复,故不在此赘述。
本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述网格编码方法实施例的各个过程,或者,该程序或指令被处理器执行时实现上述网格解码方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
其中,所述处理器为上述实施例中所述的终端中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。
本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述网格编码方法实施例的各个过程,或者,实现上述网格解码方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
应理解,本申请实施例提到的芯片还可以称为系统级芯片,系统芯片,芯片系统或片上系统芯片等。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以计算机软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在 本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。

Claims (18)

  1. 一种网格编码方法,包括:
    对待编码网格中的非流形结构进行拆分处理,得到非流形信息和流形网格;
    对所述非流形信息进行编码,得到第一子码流;
    对所述流形网格进行编码,得到第二子码流;
    依据所述第一子码流和所述第二子码流获取网格编码结果。
  2. 根据权利要求1所述的方法,其中,所述待编码网格包括第一流形网格和第一非流形网格,所述第一流形网格和所述第一非流形网格通过所述非流形结构连接,所述非流形结构包括第一顶点,所述对待编码网格中的非流形结构进行拆分处理,包括:
    建立第二顶点,所述第二顶点与所述第一顶点为重复点,所述第二顶点与所述第一顶点的索引信息不同;
    基于所述第二顶点对待编码网格中的非流形结构进行拆分处理,以将所述第一非流形网格转换为第二流形网格;
    其中,所述非流形信息包括所述第一顶点的索引信息及所述第二顶点的索引信息,所述流形网格包括所述第一流形网格和所述第二流形网格。
  3. 根据权利要求2所述的方法,其中,所述非流形信息还包括非流形标识;
    所述第一子码流包括所述非流形标识对应的码流、所述第二顶点的索引信息对应的码流及所述第一顶点的索引信息对应的码流;
    其中,在所述第一子码流中,所述非流形标识对应的码流、所述第二顶点的索引信息对应的码流及所述第一顶点的索引信息对应的码流存在关联关系。
  4. 根据权利要求2所述的方法,其中,所述第一顶点和所述第二顶点中任意一个顶点的索引信息包括几何索引信息和属性索引信息,所述几何索引信息表征所述顶点在几何信息编码顺序中的位置,所述属性索引信息表征所述顶点在属性信息编码顺序中的位置;
    其中,所述第一子码流包括所述几何索引信息对应的码流,及所述属性索引信息对应的码流。
  5. 根据权利要求2所述的方法,其中,所述基于所述第二顶点对待编码网格中的非流形结构进行拆分处理,包括:
    将第一连接关系信息中的第一顶点的索引信息,更新为所述第二顶点的索引信息,所述第一连接关系信息用于表征所述第一非流形网格的顶点的连接关系。
  6. 根据权利要求5所述的方法,其中,所述对所述流形网格进行编码,得到第二子码流,包括:
    对所述流形网格的几何信息进行编码,得到几何信息码流;
    对所述流形网格的属性信息进行编码,得到属性信息码流;
    对所述流形网格的第二连接关系信息进行编码,得到连接关系信息码流;
    其中,所述第二子码流包括所述几何信息码流、所述属性信息码流及所述连接关系信息码流,所述第二连接关系信息用于表征所述流形网格的顶点的连接关系,且所述第二连接关系信息包括更新后的所述第一连接关系信息。
  7. 一种网格解码方法,包括:
    依据待解码网格的网格编码结果获取第一子码流和第二子码流;
    对所述第一子码流进行解码,获得非流形信息;
    对所述第二子码流进行解码,获得流形网格;
    基于所述非流形信息对所述流形网格进行重建处理,得到解码网格。
  8. 根据权利要求7所述的方法,其中,所述非流形信息包括第一顶点的索引信息及第二顶点的索引信息,所述第二顶点与所述第一顶点的索引信息不同;
    所述基于所述非流形信息对所述流形网格进行重建处理,得到解码网格,包括:
    基于所述第一顶点的索引信息及第二顶点的索引信息对所述流形网格进行重建处理,得到解码网格;
    其中,所述流形网格包括第一流形网格和第二流形网格,所述待解码网格包括所述第一流形网格和第一非流形网格,所述第一流形网格和所述第一非流形网格均包括非流形结构,所述非流形结构包括所述第一顶点,所述第一非流形网格由所述第二流形网格转换获得。
  9. 根据权利要求8所述的方法,其中,所述第一子码流包括非流形标识对应的码流、所述第二顶点的索引信息对应的码流及所述第一顶点的索引信息对应的码流;
    所述非流形信息还包括非流形标识,在所述非流形信息中,所述非流形标识、所述第二顶点的索引信息及所述第一顶点的索引信息存在关联关系。
  10. 根据权利要求8所述的方法,其中,所述第一子码流包括几何索引信息对应的码流,及属性索引信息对应的码流;
    所述第一顶点和所述第二顶点中任意一个顶点的索引信息包括几何索引信息和属性索引信息,所述几何索引信息表征所述顶点在几何信息编码顺序中的位置,所述属性索引信息表征所述顶点在属性信息编码顺序中的位置。
  11. 根据权利要求8所述的方法,其中,所述第二子码流包括几何信息码流、属性信息码流及连接关系信息码流,所述几何信息码流为所述流形网格的几何信息对应的码流,所述属性信息码流为所述流形网格的属性信息对应的码流,所述连接关系信息码流为所述流形网格的第二连接关系信息对应的码流,所述第二连接关系信息用于表征所述流形网格的顶点的连接关系;
    其中,所述流形网格基于所述流形网格的几何信息、所述流形网格的属性信息及所述第二连接关系信息构建网格获得。
  12. 根据权利要求11所述的方法,其中,所述基于所述第一顶点的索引信息及第二顶 点的索引信息对所述流形网格进行重建处理,得到解码网格,包括:
    将所述第二连接关系信息中的第二顶点的索引信息,更新为所述第一顶点的索引信息,对所述流形网格进行重建处理,得到解码网格。
  13. 一种网格编码装置,包括:
    处理模块,用于对待编码网格中的非流形结构进行拆分处理,得到非流形信息和流形网格;
    第一编码模块,用于对所述非流形信息进行编码,得到第一子码流;
    第二编码模块,用于对所述流形网格进行编码,得到第二子码流;
    获取模块,用于依据所述第一子码流和所述第二子码流获取网格编码结果。
  14. 一种网格解码装置,包括:
    获取模块,用于依据待解码网格的网格编码结果获取第一子码流和第二子码流;
    第一解码模块,用于对所述第一子码流进行解码,获得非流形信息;
    第二解码模块,用于对所述第二子码流进行解码,获得流形网格;
    处理模块,用于基于所述非流形信息对所述流形网格进行重建处理,得到解码网格。
  15. 一种终端,包括处理器,存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如权利要求1至6任一项所述的网格编码方法的步骤;或者,所述程序或指令被所述处理器执行时实现如权利要求7至12任一项所述的网格解码方法的步骤。
  16. 一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如权利要求1至6任一项所述的网格编码方法的步骤,或者,所述程序或指令被处理器执行时实现如权利要求7至12任一项所述的网格解码方法的步骤。
  17. 一种芯片,包括处理器和通信接口,其中,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如权利要求1至6任一项所述的网格编码方法的步骤,或者实现如权利要求7至12任一项所述的网格解码方法的步骤。
  18. 一种计算机程序产品,其中,所述程序产品被存储在非易失的存储介质中,所述程序产品被至少一个处理器执行以实现如权利要求1至6任一项所述的网格编码方法的步骤,或者实现如权利要求7至12任一项所述的网格解码方法的步骤。
PCT/CN2023/124479 2022-10-19 2023-10-13 网格编码方法、网格解码方法及相关设备 WO2024083039A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211282835.1 2022-10-19
CN202211282835.1A CN117915105A (zh) 2022-10-19 2022-10-19 网格编码方法、网格解码方法及相关设备

Publications (1)

Publication Number Publication Date
WO2024083039A1 true WO2024083039A1 (zh) 2024-04-25

Family

ID=90684367

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/124479 WO2024083039A1 (zh) 2022-10-19 2023-10-13 网格编码方法、网格解码方法及相关设备

Country Status (2)

Country Link
CN (1) CN117915105A (zh)
WO (1) WO2024083039A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6452596B1 (en) * 1998-10-06 2002-09-17 International Business Machines Corporation Methods and apparatus for the efficient compression of non-manifold polygonal meshes
KR20080066216A (ko) * 2007-01-11 2008-07-16 한국전자통신연구원 스티칭 정보를 포함하는 3차원 메쉬 정보부호화/복호화 방법 및 장치
US20090278844A1 (en) * 2007-01-11 2009-11-12 Eun Young Chang Method and apparatus for encoding/decoding 3d mesh information including stitching information
US20190043252A1 (en) * 2017-08-07 2019-02-07 Personify, Inc. Systems and methods compression, transfer, and reconstruction of three-dimensional (3d) data meshes

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6452596B1 (en) * 1998-10-06 2002-09-17 International Business Machines Corporation Methods and apparatus for the efficient compression of non-manifold polygonal meshes
KR20080066216A (ko) * 2007-01-11 2008-07-16 한국전자통신연구원 스티칭 정보를 포함하는 3차원 메쉬 정보부호화/복호화 방법 및 장치
US20090278844A1 (en) * 2007-01-11 2009-11-12 Eun Young Chang Method and apparatus for encoding/decoding 3d mesh information including stitching information
US20190043252A1 (en) * 2017-08-07 2019-02-07 Personify, Inc. Systems and methods compression, transfer, and reconstruction of three-dimensional (3d) data meshes

Also Published As

Publication number Publication date
CN117915105A (zh) 2024-04-19

Similar Documents

Publication Publication Date Title
CN108810571A (zh) 编码和解码二维点云的方法和设备
US11910017B2 (en) Method for predicting point cloud attribute, encoder, decoder, and storage medium
KR20200140825A (ko) 3d 객체를 나타내는 포인트 클라우드를 인코딩/디코딩하기 위한 방법 및 장치
WO2024124901A1 (zh) 点云处理方法、装置、设备、介质和程序产品
Yang et al. Real-time 3d video compression for tele-immersive environments
US20240121439A1 (en) Point cloud attribute information encoding method and apparatus, point cloud attribute information decoding method and apparatus, and related device
WO2024083039A1 (zh) 网格编码方法、网格解码方法及相关设备
WO2023024840A1 (zh) 点云编解码方法、编码器、解码器及存储介质
WO2024083043A1 (zh) 网格编码方法、装置、通信设备及可读存储介质
Huang et al. Hierarchical bit-wise differential coding (hbdc) of point cloud attributes
WO2024188138A1 (zh) 点云编码处理方法、点云解码处理方法及相关设备
WO2023246686A1 (zh) 无损编码方法、无损解码方法、装置及设备
WO2024193487A1 (zh) 三维网格位移信息编码方法、解码方法、装置及终端
WO2024001953A1 (zh) 无损编码方法、无损解码方法、装置及设备
WO2024120431A1 (zh) 点云编码方法、点云解码方法及相关设备
WO2024174092A1 (zh) 编解码方法、码流、编码器、解码器以及存储介质
WO2024217304A1 (zh) 三维网格位移信息编码方法、解码方法、装置及终端
WO2023155779A1 (zh) 编码方法、解码方法、装置及通信设备
WO2024017008A1 (zh) 编码、解码方法、装置及设备
WO2024212043A1 (zh) 编解码方法、码流、编码器、解码器以及存储介质
WO2024207244A1 (zh) 点云的编解码方法、码流、编码器、解码器以及存储介质
WO2023179706A1 (zh) 编码方法、解码方法及终端
WO2024193374A1 (zh) 编码处理方法、解码处理方法及相关设备
WO2024119420A1 (zh) 编解码方法、码流、编码器、解码器以及存储介质
WO2024120325A1 (zh) 点云编码方法、点云解码方法及终端

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: 23879030

Country of ref document: EP

Kind code of ref document: A1