WO2024083043A1 - 网格编码方法、装置、通信设备及可读存储介质 - Google Patents
网格编码方法、装置、通信设备及可读存储介质 Download PDFInfo
- Publication number
- WO2024083043A1 WO2024083043A1 PCT/CN2023/124488 CN2023124488W WO2024083043A1 WO 2024083043 A1 WO2024083043 A1 WO 2024083043A1 CN 2023124488 W CN2023124488 W CN 2023124488W WO 2024083043 A1 WO2024083043 A1 WO 2024083043A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- manifold
- information
- mesh
- grid
- repeated
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 193
- 238000004891 communication Methods 0.000 title claims abstract description 17
- 238000001914 filtration Methods 0.000 claims abstract description 53
- 230000015654 memory Effects 0.000 claims description 25
- 238000011084 recovery Methods 0.000 claims description 12
- 238000004590 computer program Methods 0.000 claims description 8
- 108091026890 Coding region Proteins 0.000 abstract 4
- 238000010586 diagram Methods 0.000 description 14
- 230000006835 compression Effects 0.000 description 10
- 238000007906 compression Methods 0.000 description 10
- 230000000694 effects Effects 0.000 description 9
- 238000004422 calculation algorithm Methods 0.000 description 8
- 230000006870 function Effects 0.000 description 7
- 238000012545 processing Methods 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 4
- 230000001360 synchronised effect Effects 0.000 description 4
- 241000509579 Draco Species 0.000 description 3
- 239000013598 vector Substances 0.000 description 3
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000002441 reversible effect Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 1
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 1
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 1
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 1
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 1
- 238000005452 bending Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000007599 discharging Methods 0.000 description 1
- 239000011521 glass Substances 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 238000013139 quantization Methods 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/42—Methods 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T9/00—Image coding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/44—Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
- H04N19/593—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/70—Methods 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/85—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/90—Methods 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/91—Entropy coding, e.g. variable length coding [VLC] or arithmetic coding
Definitions
- the present application belongs to the field of video coding and decoding technology, and specifically relates to a grid coding method, device, communication equipment and readable storage medium.
- 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 input grid to be encoded is usually directly encoded, and the decoding end directly decodes the received code stream to obtain the corresponding decoded grid. Since there are usually many repeated points in the grid to be encoded, the encoded code stream is large. Therefore, the existing technology has the problem of large code stream of lossless encoding.
- the embodiments of the present application provide a grid coding method, apparatus, communication equipment and readable storage medium, which can solve the problem of large code stream in lossless coding.
- a grid coding method comprising:
- a target code stream of the first grid is determined based on the repeated point information code stream and the first code stream.
- a grid decoding method comprising:
- the first bitstream is decoded to obtain a second mesh, wherein the first repeated point is a geometric vertex in the second mesh, and the first repeated point is obtained by merging at least two repeated points in the first mesh, and the repeated point information packet Includes the index of the duplicate point and the index of the face where the duplicate point is located;
- the repeated point information code stream includes a first identifier
- the repeated point information code stream is decoded based on a geometric decoding order and a connection relationship decoding order to obtain repeated point information of the first repeated point
- the first identifier being a first identifier indicating that the encoder has performed repeated point filtering
- the geometric decoding order and the connection relationship decoding order are determined based on a decoding process of the second grid
- the first repeated points in the second grid are restored based on the repeated point information of the first repeated points to obtain the first grid.
- a grid coding device comprising:
- a filtering module used to filter duplicate points of a first mesh to be encoded, and obtain duplicate point information of a second mesh and a first duplicate point, wherein the first duplicate point is a geometric vertex in the second mesh, and the first duplicate point is obtained by merging at least two duplicate points in the first mesh, and the duplicate point information includes an index of the duplicate point and an index of a surface where the duplicate point is located;
- a first encoding module used for encoding the second grid to obtain a first code stream
- a second encoding module configured to encode the repeated point information of the first repeated point based on a geometric encoding order and a connection relationship encoding order to obtain a repeated point information code stream, wherein the repeated point information code stream carries a first identifier for indicating that the encoding end has performed repeated point filtering, and the geometric encoding order and the connection relationship encoding order are determined based on an encoding process of the second grid;
- a determination module is used to determine a target code stream of the first grid based on the repeated point information code stream and the first code stream.
- a grid decoding device comprising:
- An acquisition module used for acquiring the first code stream and the repeated point information code stream of the first repeated point according to the target code stream of the first grid;
- a first decoding module configured to decode the first code stream to obtain a second mesh, wherein the first repeated point is a geometric vertex in the second mesh, and the first repeated point is obtained by merging at least two repeated points in the first mesh, and the repeated point information includes an index of the repeated point and an index of a surface where the repeated point is located;
- a second decoding module configured to, when the repeated point information code stream includes a first identifier, decode the repeated point information code stream based on a geometric decoding order and a connection relationship decoding order to obtain repeated point information of the first repeated point, wherein the first identifier is a first identifier indicating that the encoder has performed repeated point filtering, and the geometric decoding order and the connection relationship decoding order are determined based on a decoding process of the second grid;
- a recovery module is used to recover the first repeated points in the second grid based on the repeated point information of the first repeated points to obtain the first grid.
- a terminal which includes a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the method described in the first aspect are implemented, or the steps of the method described in the second aspect are implemented.
- a terminal including a processor and a communication interface, wherein:
- the processor is used to perform duplicate point filtering on a first mesh to be encoded, obtain duplicate point information of a second mesh and a first duplicate point, the first duplicate point is a geometric vertex in the second mesh, and the first duplicate point is obtained by merging at least two duplicate points in the first mesh, and the duplicate point information includes an index of the duplicate point and an index of a surface where the duplicate point is located; encode the second mesh to obtain a first code stream; encode the duplicate point information of the first duplicate point based on a geometric coding order and a connection relationship coding order to obtain a duplicate point information code stream, the duplicate point information code stream carries a first identifier for indicating that the encoding end has performed duplicate point filtering, the geometric coding order and the connection relationship coding order are determined based on an encoding process of the second mesh; determine a target code stream of the first mesh based on the duplicate point information code stream and the first code stream;
- the processor is used to obtain the first code stream and the repeated point information code stream of the first repeated point according to the target code stream of the first grid; decode the first code stream to obtain the second grid, the first repeated point is a geometric vertex in the second grid, and the first repeated point is obtained by merging at least two repeated points in the first grid, and the repeated point information includes an index of the repeated point and an index of a surface where the repeated point is located; when the repeated point information code stream includes a first identifier, decode the repeated point information code stream based on a geometric decoding order and a connection relationship decoding order to obtain the repeated point information of the first repeated point, the first identifier is a first identifier used to indicate that the encoding end has performed repeated point filtering, and the geometric decoding order and the connection relationship decoding order are determined based on the decoding process of the second grid; restore the first repeated point in the second grid based on the repeated point information of the first repeated point to obtain the first grid.
- a video encoding and decoding system including: an encoding end device and a decoding end device, wherein the encoding end device can be used to execute the steps of the grid encoding method as described in the first aspect, and the decoding end device can be used to execute the steps of the grid decoding method as described in the second aspect.
- a readable storage medium on which a program or instruction is stored.
- the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented, or the steps of the method 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 storage medium, and the computer 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 embodiment of the present application obtains duplicate point information of a second mesh and a first duplicate point by filtering duplicate points of a first mesh to be encoded, wherein the first duplicate point is a geometric vertex in the second mesh, and the first duplicate point is obtained by merging at least two duplicate points in the first mesh, and the duplicate point information includes an index of the duplicate point and an index of a surface where the duplicate point is located;
- the second mesh is encoded to obtain a first code stream; based on a geometric coding order and a connection relationship coding order, the duplicate point information of the first duplicate point is encoded to obtain a duplicate point information code stream, wherein the duplicate point information code stream carries a first identifier for indicating that duplicate point filtering has been performed on the encoding end, and the geometric coding order and the connection relationship coding order are
- the sequence is determined based on the encoding process of the second grid;
- the target code stream of the first grid is determined based on the repeated point information code stream and the first code stream. In this way,
- 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 grid encoding and decoding method in the embodiment of the present application can be a terminal, which can also be called a terminal device or a user terminal (User Equipment, UE).
- the terminal can be a mobile phone, a tablet computer (Tablet Personal Computer), a laptop computer (Laptop Computer) or a notebook computer, a personal digital assistant (Personal Digital Assistant, PDA), a handheld computer, a netbook, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a mobile Internet device (Mobile Internet Device, MID), a wearable device (Wearable
- the terminal side devices include: wearable devices such as smart watches, bracelets, headphones, glasses, etc. It should be noted that the specific type of the terminal is not limited in the embodiments of the present application.
- Draco encodes and stores the connection information, geometric information and UV coordinates of the three-dimensional mesh separately.
- the core module that is, the module that encodes the connection information, uses the Edgebreaker algorithm.
- the encoding of geometric information and UV coordinates uses conventional compression methods, that is, data quantization, prediction 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.
- Figure 1 shows a schematic diagram of a two-dimensional grid using EB coding.
- the final entropy coded mode codeword is CCRRSLCRSERRELCRRRCRRRE.
- the mesh Since the five modes of the Edgebreaker method cannot process non-manifold meshes, the mesh must be converted into a manifold mesh before using the Edgebreaker method.
- an embodiment of the present application provides a grid coding method, which is applied to a coding end.
- the grid coding method includes:
- Step 201 performing duplicate point filtering on a first mesh to be encoded, obtaining duplicate point information of a second mesh and a first duplicate point, wherein the first duplicate point is a geometric vertex in the second mesh, and the first duplicate point is obtained by merging at least two duplicate points in the first mesh, and the duplicate point information includes an index of the duplicate point and an index of a surface where the duplicate point is located;
- the first grid can be understood as a three-dimensional grid.
- the corresponding relationship between the geometric vertex index and the coordinate value in the first grid can be established; then all vertices are traversed, and when at least two geometric vertices have the same coordinate value, the at least two geometric vertices can be considered to be duplicate points (or called geometric duplicate points).
- duplicate points or called geometric duplicate points.
- Step 202 encoding the second grid to obtain a first code stream
- the second grid may be encoded based on an Edgebreaker method to obtain a first code stream.
- Step 203 Encode the duplicate point information of the first duplicate point based on a geometric coding order and a connection relationship coding order to obtain a duplicate point information code stream, wherein the duplicate point information code stream carries a first identifier for indicating that the encoding end has performed duplicate point filtering, and the geometric coding order and the connection relationship coding order are determined based on the encoding process of the second grid;
- encoding the repeated point information of the first repeated point based on the geometric coding order and the connection relationship coding order to obtain the repeated point information code stream can be understood as encoding the geometric information and connection relationship information of the repeated point by the index of the repeated point and the index of the surface where the repeated point is located to obtain the repeated point information code stream.
- Step 204 determine a target code stream of the first grid based on the repeated point information code stream and the first code stream.
- the repeated point information bitstream and the first bitstream can be mixed to obtain the target bitstream of the first grid.
- the above-mentioned target bitstream can also include the texture map bitstream obtained based on the encoding process of the texture map.
- the texture map bitstream, the repeated point information bitstream and the first bitstream can be mixed to obtain the bitstream of the grid to be encoded.
- the decoding end may respectively decode the first code stream and the repeated point information code stream, and use the repeated point information of the first repeated point obtained by decoding the repeated point information code stream to perform repeated point recovery on the second grid obtained by decoding the first code stream to obtain the first grid.
- the embodiment of the present application obtains duplicate point information of a second mesh and a first duplicate point by filtering duplicate points of the first mesh to be encoded, wherein the first duplicate point is a geometric vertex in the second mesh, and the first duplicate point is based on the first mesh.
- At least two duplicate points in the first grid are merged, and the duplicate point information includes the index of the duplicate point and the index of the surface where the duplicate point is located; the second grid is encoded to obtain the first code stream; based on the geometric coding order and the connection relationship coding order, the duplicate point information of the first duplicate point is encoded to obtain the duplicate point information code stream, and the duplicate point information code stream carries a first identifier for indicating that the encoding end has performed duplicate point filtering, and the geometric coding order and the connection relationship coding order are determined based on the encoding process of the second grid; based on the duplicate point information code stream and the first code stream, the target code stream of the first grid is determined.
- the data for encoding duplicate points is reduced, thereby reducing the size of the encoded code stream.
- the efficiency of encoding and decoding is improved.
- filtering out duplicate points of the first grid to be encoded to obtain duplicate point information of the second grid and the first duplicate points includes:
- the merging of the N repeated points is canceled, or the N repeated points are merged into the first repeated point, and first information is generated, wherein the first information includes a second identifier, vertex information of the manifold structure before the N repeated points are merged into the first repeated point, and connection relationship information between vertices, and the first information is used to obtain the same manifold structure as before the N repeated points are merged into the first repeated point when splitting the non-manifold structure;
- N is an integer greater than 1.
- the non-manifold structure existing in the above-mentioned first grid before the repeated point merging can be called the old non-manifold structure
- the above-mentioned new non-manifold structure refers to the newly added non-manifold structure due to the repeated point merging, that is, the non-manifold structure other than the old non-manifold structure.
- Solution 1 Avoid generating non-manifold structures during the process of merging duplicate points, that is, when N duplicate points in the first grid are merged to generate a new non-manifold structure, the merging of the N duplicate points is canceled; otherwise, the duplicate points of the vertex are retained. Since the generation of new non-manifold structures is avoided, the difficulty of subsequent encoding is reduced.
- Solution 2 allows the generation of non-manifold structures in the process of merging duplicate points.
- the newly generated non-manifold structure needs to be specially processed, such as marked (marked by the second identifier), and the vertex information of the manifold structure before merging the duplicate points and the connection relationship information between the vertices are recorded, so that the non-manifold structure splitting module can split the newly generated non-manifold structure into the same manifold structure as before merging the duplicate points, so that the encoding end can perform lossless encoding.
- encoding the second grid to obtain a first code stream includes:
- the second grid has a non-manifold structure, splitting the non-manifold structure to obtain non-manifold information and a manifold grid;
- the non-manifold information is encoded based on the geometric coding order and the attribute coding order to obtain a second sub-code stream, wherein the second sub-code stream carries a third identifier for indicating that the encoder has performed the non-manifold structure splitting, and the attribute coding order
- the code order is determined based on the encoding process of the manifold grid
- the first code stream includes the first sub-code stream and the second sub-code stream.
- the non-manifold structure may include non-manifold edges and non-manifold points, the non-manifold points may also be described as non-manifold vertices, and the two vertices constituting the non-manifold edges may also be described as non-manifold vertices.
- the above-mentioned geometric coding order and connection relationship coding order may be understood as being determined based on the coding process of the manifold mesh.
- the method for determining the non-manifold edges 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 edges by querying the number of triangles corresponding to each edge, and the number of triangles corresponding to the non-manifold edges is greater than or equal to 3; or it may be to construct a CornerTable to establish a correspondence between corners and edges in the mesh, and find the non-manifold edges through the correspondence.
- the method for determining the non-manifold point in the mesh to be encoded may be to construct a CornerTable, establish a correspondence between each vertex in the mesh to be encoded and the corner of the vertex, start from a certain corner of the vertex, perform a target traversal operation, sequentially traverse all corners adjacent to the corner and forming a fan, 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 mesh to be encoded is split by establishing duplicate vertices (i.e., new vertices) for the non-manifold vertices in the mesh to be encoded to convert the non-manifold structure into a manifold structure.
- the non-manifold vertices may include vertices that constitute non-manifold edges, as well as non-manifold points.
- the non-manifold information may include index information of non-manifold vertices and index information of newly added vertices.
- the correspondence between the newly added vertices and the non-manifold vertices may be maintained according to certain rules.
- the index information of the newly added vertices and the index information of the non-manifold vertices may be interleaved and encoded; or, the index information of the newly added vertices and the index information of the non-manifold vertices may be encoded in two code streams in the same order, and the correspondence between the newly added vertices and the non-manifold vertices may be maintained through the encoding order.
- the first sub-code stream may include a geometric 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; and the connection relationship information of the manifold mesh may be encoded to obtain a connection relationship information code stream.
- the decoding end can decode the non-manifold information in the second sub-code stream based on the third identifier.
- 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 grid information after the encoding and decoding process, and achieve lossless encoding.
- the non-manifold structure when a non-manifold structure exists in the second grid, the non-manifold structure is split to obtain non-manifold information and a manifold grid; the manifold grid is encoded to obtain a first sub-code stream; the non-manifold information is encoded based on the geometric coding order and the connection relationship coding order to obtain a second sub-code stream, and the second sub-code stream carries a third identifier for indicating that the encoding end has performed the non-manifold structure splitting; wherein the first code stream includes the first sub-code stream and the second sub-code stream.
- a manifold is a space that has local Euclidean space properties.
- a general manifold can be It is formed by bending and sticking many straight pieces.
- the condition satisfied by a manifold is that it has Euclidean space properties locally, while a non-manifold can refer to one that does not satisfy the conditions of a manifold.
- the condition satisfied by a manifold edge is that the mesh edge is shared by one or two mesh triangles (edge is incident to only one or two faces);
- the condition satisfied by a manifold point is that a ring of neighborhood triangles of a mesh vertex forms a closed or open fan (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 second 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
- the splitting process on the non-manifold structure to obtain the non-manifold information and the manifold mesh includes:
- the non-manifold structure in the second mesh is split based on the second vertex to obtain the non-manifold information and the manifold mesh, wherein the manifold mesh includes the first manifold mesh and the second manifold mesh converted from the first non-manifold mesh, and the non-manifold information includes the index information of the first vertex and the index information of the second vertex.
- the first vertex is a 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 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.
- 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 is recorded, so as to facilitate the reconstruction of the non-manifold structure during decoding.
- the index information includes a geometric index and an attribute index.
- the geometric indexes of the first vertex and the second vertex are different, but the attribute indexes are the same. In this way, traversing the geometric indexes and attribute indexes of the vertices can determine that the first vertex and the second vertex are duplicate points.
- the splitting of the non-manifold structure in the second mesh based on the second vertex includes:
- the index of the first vertex in the first connection relationship information is updated to the index 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 corner table (CornerTable) to establish a corresponding relationship between each vertex and the angle of the vertex. Perform two steps for each vertex. In the first step, starting from a certain angle of the vertex, traverse all the angles adjacent to the angle and forming a fan in turn, and mark the vertex and the traversed angles as traversed. If after executing the above process, there are still vertices that have not been traversed, it means that the vertex is a non-manifold point.
- CoreTable corner table
- the second step for each non-manifold point, create a duplicate point, and modify the connection relationship, connect the angle that has not been 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. At the same time, record the index information of the newly added vertices and the index information of the original non-manifold vertices in this process.
- the non-manifold structure is split into the same manifold structure as before filtering out duplicate points based on the recorded vertex information of the manifold structure before filtering out duplicate points and the connection relationship between vertices.
- encoding the manifold grid to obtain a first 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 first sub-code stream includes the geometry information code stream, the attribute information code stream and the connection relationship information code stream, and the second connection relationship information is used to characterize the connection relationship of the vertices of the manifold mesh.
- the second connection relationship information includes the updated first connection relationship information.
- the non-manifold information bitstream, the geometric information bitstream, the attribute information bitstream, the connection relationship information bitstream, the texture map bitstream and the repeated point information bitstream can be mixed to obtain the target bitstream.
- the encoding framework of the encoding end mainly includes a duplicate point filtering module, a non-manifold mesh splitting module, a connection relationship encoding module, a geometric information encoding module, an attribute information encoding module, a non-manifold information encoding module, and a duplicate point information encoding module.
- the encoding framework can achieve lossless compression of three-dimensional meshes, and the specific encoding operation includes the following process:
- Duplicate points refer to geometric vertices with repeated three-dimensional coordinates.
- the index of the duplicate vertices and the index of the face where each duplicate point is located are recorded.
- the non-manifold structure is split to obtain a manifold mesh.
- the vertex information newly added due to the splitting of the non-manifold structure and the original non-manifold vertex information are recorded.
- the Edgebreaker method is used to encode the connection information to obtain a pattern string, which is entropy encoded.
- the geometric information of the mesh is encoded.
- the parallelogram prediction coding method can be used.
- the encoding method of the geometric information is not limited here. If the mesh has attribute information such as UV coordinates, it can be encoded using methods such as similar triangle prediction coding.
- the encoding method of the attribute information is not limited here.
- the index information of the newly added vertex and the index information of the original non-manifold vertex are encoded in the encoding order of the geometric information and the attribute information.
- the geometric and attribute indexes of the newly added vertex and the corresponding non-manifold vertex can be directly entropy encoded, but are not limited to this encoding method.
- the index of the repeated points, the number of faces where the repeated points are located, and the index of the faces where the repeated points are located are encoded.
- the index of the repeated points, the number of faces where the repeated points are located, and the index of the faces where the repeated points are located can be directly entropy encoded, but it is not limited to this encoding method.
- Duplicate point filtering module Its input is the first grid, and its output includes the second grid after filtering out geometric duplicate points,
- the duplicate point information identifier ie, the first identifier
- the index of the first duplicate point ie, the index of the first duplicate point
- the index of the surface where the first duplicate point is located ie, the first identifier
- the duplicate point filtering module can first establish a corresponding relationship between geometric vertex indices and coordinate values. Traverse all vertices, and when the coordinate values of multiple geometric vertices are the same, it means that these vertices are geometric duplicate points. Filtering out duplicate points is to merge the geometric duplicate points into one vertex and adjust the corresponding vertex index in the connection relationship. In this process, the vertex index of each duplicate point after merging is recorded.
- the index of the merged vertex can be referred to as the duplicate point index
- the index of the face where each duplicate point is located is recorded when adjusting the connection relationship.
- the recorded duplicate point index and the index of the face where the duplicate point is located are input as duplicate point information into the duplicate point information encoding module for encoding.
- Solution 1 avoids generating non-manifold structures in the process of merging duplicate points, that is, when N duplicate points in the first grid are merged to generate a new non-manifold structure, cancel the merging of the N duplicate points; otherwise, retain the duplicate points of the vertex.
- Solution 2 allows the generation of non-manifold structures in the process of merging duplicate points.
- the newly generated non-manifold structure needs to be specially processed, such as marked (marked by the second identifier), and the vertex information of the manifold structure before merging the duplicate points and the connection relationship information between the vertices are recorded, so that the non-manifold structure splitting module can split the newly generated non-manifold structure into the same manifold structure as before merging the duplicate points, so that the encoding end can perform lossless encoding.
- splitting non-manifold mesh module Its input is the second mesh, and its output includes the manifold mesh, the original non-manifold vertices, and the vertices added due to splitting (i.e., the second vertices).
- splitting the non-manifold structure is mainly divided into two parts: splitting the non-manifold edges and splitting the 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, make the third vertex in the triangle and the two newly added vertices form a new triangle t', replace the original triangle t with t', and iterate this process until the non-manifold edge is converted into a manifold edge. At the same time, record the index information of the newly added vertices and the index information of the original non-manifold vertices 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. At the same time, record the index information of the newly added vertices and the index information of the original non-manifold vertices in this process.
- the non-manifold structure is split into the same manifold structure as before filtering out duplicate points based on the recorded vertex information of the manifold structure before filtering out duplicate points and the connection relationship between vertices.
- Connection relationship encoding module Its input is the connection relationship of the manifold mesh, and its output includes the encoded connection relationship information code stream and vertex encoding order (i.e., connection relationship encoding order).
- this solution uses the Edgebreaker method to encode the connection relationship of the three-dimensional mesh, establishes a CornerTable to represent the connection relationship of the mesh, and uses the CornerTable to traverse all triangles in the mesh to generate a CLERS pattern string of Edgebreaker.
- 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, c.p represents the previous corner of the current corner c (counterclockwise), and c.n represents the next corner of the current corner c. c.o is the opposite angle of the current corner c, which can be obtained by querying the O table.
- c.t is the serial number of the triangle where c is located, which can be calculated by formula 1.
- c.v represents the vertex of the current corner, which can be obtained by querying the V table.
- c.l represents the corner to the left of the current corner c, which is obtained by querying the opposite angle of c.p in the O table;
- c.r represents the corner to the right of the current corner c, which is obtained by querying the opposite angle of c.n in the O table.
- the mesh can be traversed in spiral order to obtain the CLERS mode string of Edgebreaker that represents the mesh connection relationship.
- the judgment conditions and traversal rules of the five modes are shown in Figure 6.
- the current traversed corner is x.
- the current triangle is in C mode, and the next triangle to be traversed is the triangle where xr is located; otherwise, Then, if the triangle where xl is located has been visited, the current triangle is in L mode, and the next triangle to be traversed is the triangle where xr is located; if the triangle where xr is located has been visited, the current triangle is in R mode, and the next triangle to be traversed is the triangle where xl is located; if the vertex xv has been visited, and the triangles where xl and xr are located have not been visited, then the current triangle is in S mode. At this time, the traversal path will produce two branches.
- the principle of depth-first traversal is adopted.
- the first triangle traversed is the triangle where xr is located, and the triangle where xl is located is stored in the stack.
- the triangle where xl is located is traversed; if the triangles where xl and xr 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.
- Entropy coding is used to compress the CLERS pattern string to obtain the final connection information code stream.
- Geometric information encoding module Its input is the geometric information and connection relationship encoding sequence of the manifold mesh, and its output is the geometric information code stream and the geometric encoding sequence.
- 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.
- Attribute information encoding module Its input is the attribute information and connection relationship encoding order of the manifold grid, and its output is the attribute information code stream and the encoding order of the attribute information.
- 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.
- C uv , X uv , N uv , P uv and O uv be the UV coordinates of each point respectively
- CG , XG , NG , PG and OG be the geometric coordinates of each point respectively.
- Non-manifold information encoding module Its input is the index information of the newly added vertices, the index information of the original non-manifold vertices, the geometric encoding order and the attribute encoding order, and its output is the non-manifold information code stream.
- the non-manifold vertex index information includes two parts: newly added vertex index information and 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 newly added vertices and the original non-manifold vertices can be kept in the order of encoding.
- 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 coding order and the position of the attribute vertex in the attribute coding 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 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.
- Duplicate point information encoding module Its input is the duplicate point index and the index of the surface where it is located, the connection relationship encoding order and the geometric encoding order, and its output is the duplicate point information code stream.
- code streams are mixed to form a grid coded code stream.
- the decoding framework of the decoding end mainly includes 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, a non-manifold structure recovery module, a repeated point information decoding module, and a repeated point recovery module.
- the decoding framework can realize lossless compression of three-dimensional meshes, and the specific decoding operation includes the following process:
- bitstream 1) Decompose the bitstream into a geometry information bitstream, a connection relationship bitstream, an attribute information bitstream and a texture map bitstream, and then decode these sub-bitstreams respectively.
- Connection relationship decoding module Its input is the connection relationship code stream to be decoded, and its output is the connection relationship of the manifold mesh and the decoded vertex order (i.e., the connection relationship decoding order).
- connection relationship sub-code stream is first decoded to obtain a pattern string.
- the pattern string is traversed in a certain order (forward or reverse order), and the connection relationship is reconstructed according to the corresponding pattern in the string.
- the traversal order of the vertices i.e., the connection relationship decoding order
- the geometry information decoding module and the attribute information decoding module.
- Geometric information decoding module Its input is the geometric information code stream and the connection relationship decoding order, and its output is the geometric information of the manifold mesh.
- the decoding process of the mesh geometric coordinates is the inverse process of the encoding process: first, entropy decode the coordinate prediction residual. Then, based on the decoded triangle, predict the predicted coordinates of the point to be decoded according to the parallelogram rule. The predicted coordinates plus the residual value obtained by entropy decoding can obtain the geometric coordinate position to be decoded.
- the vertex traversal order here (that is, the geometric decoding order) is the same as the vertex order of the encoded geometric information. It should be understood 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 are decoded at the decoding end
- the geometric coordinates of the vertices of other triangles are traversed and decoded as the initial triangle.
- other decoding methods may also be used here. The specific decoding method is not emphasized, as long as it corresponds to the encoding end.
- Attribute information decoding module Its input is the attribute information code stream and the connection relationship decoding order, and its output is the attribute information reconstructed by the manifold mesh.
- Non-manifold vertex information decoding module Its input is the non-manifold vertex information code stream, geometry decoding order and attribute decoding order, and its output is the non-manifold identifier, the newly added vertex index and the original non-manifold vertex index.
- the decoding of non-manifold vertex index information adopts the method corresponding to the encoding end. First, entropy decoding is performed to obtain the position of non-manifold vertices in the geometric decoding order and attribute decoding order, and then the index of non-manifold vertices at the decoding end is recorded. The newly added vertex index and the original non-manifold vertex index are output to 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.
- Non-manifold structure recovery module Its input is the manifold mesh, the index of the newly added vertices and the index of the original non-manifold vertices, and its output is the reconstructed non-manifold mesh.
- 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 value of the newly added vertex in the connection relationship to the index value of the original non-manifold vertex. Then, delete the newly added vertex from the vertices of the manifold mesh to obtain the reconstructed non-manifold mesh.
- Duplicate point information decoding module Its input is duplicate point information code stream, geometric decoding order and connection relationship decoding order, and its output is duplicate point index and the index of its surface.
- first decode to obtain an identification of whether there is duplicate point information in the grid. If the identification is 0, there is no need to decode the duplicate point information, and the subsequent module for recovering duplicate points is skipped; if the identification is 1, the duplicate point information is decoded.
- the decoding of duplicate point information adopts the method corresponding to the encoding end. For each duplicate point, first entropy decoding is performed to obtain the position of the duplicate point in the geometric decoding order, and then the index of the duplicate point at the decoding end is recorded. Then, the number of faces where the duplicate point is located is decoded, and the position of each face in the connection relationship decoding order is decoded in turn, and the index of each face at the decoding end is recorded. The index of each duplicate point and the index of the face where it is located are output to the duplicate point recovery module.
- Duplicate point recovery module Its input is the reconstructed non-manifold mesh, the index of duplicate points and the index of the face they are on, and its output is the reconstructed mesh.
- the reconstructed mesh create a new vertex for each duplicate point, and the geometric coordinates of the new vertex are equal to the geometric coordinates of the vertex pointed to by the duplicate point index. Then, adjust the connection relationship, find the face where the duplicate point is located according to the index of the face where the duplicate point is located, and update the duplicate point index in these faces to the index of the new vertex. Traverse all duplicate points and perform the same operation to finally obtain the reconstructed mesh.
- an embodiment of the present application provides a grid decoding method, which is applied to a decoding end.
- the grid decoding method includes:
- Step 1001 obtaining a first code stream and a repeated point information code stream of a first repeated point according to a target code stream of a first grid;
- Step 1002 Decode the first bitstream to obtain a second mesh, wherein the first repeated point is a geometric vertex in the second mesh, and the first repeated point is obtained by merging at least two repeated points in the first mesh, and the repeated point information includes an index of the repeated point and an index of a surface where the repeated point is located;
- Step 1003 In the case where the duplicate point information code stream includes a first identifier, the duplicate point information code stream is decoded based on a geometric decoding order and a connection relationship decoding order to obtain duplicate point information of the first duplicate point, wherein the first identifier is used to indicate that the encoder has performed duplicate point filtering, and the geometric decoding order and the connection relationship decoding order are used to indicate that the encoder has performed duplicate point filtering.
- the decoding order is determined based on the decoding process of the second grid;
- Step 1004 restore the first repeated point in the second grid based on the repeated point information of the first repeated point to obtain the first grid.
- the restoring the first repeated point in the second grid based on the repeated point information of the first repeated point to obtain the first grid includes:
- the first repeated point is added to the second mesh, and the connection relationship between the first repeated point and the geometric vertices in the second mesh is restored to obtain the first mesh.
- decoding the first code stream to obtain a second grid includes:
- the second sub-stream includes a third identifier
- the non-manifold information is used to restore the non-manifold structure in the manifold mesh to obtain the second mesh.
- the manifold mesh includes a first manifold mesh and a second manifold mesh
- the first manifold mesh includes a first vertex
- the second manifold mesh includes a second vertex
- the first vertex and the second vertex are repeated points
- the non-manifold information includes index information of the first vertex and index information of the second vertex
- using the non-manifold information to restore the non-manifold structure in the manifold mesh to obtain the second mesh includes:
- the first vertex and the second vertex are merged based on the index information of the first vertex and the index information of the second vertex, and the connection relationship information of the second manifold mesh is updated to obtain the second mesh, wherein the second mesh includes the first manifold mesh and a first non-manifold mesh converted from the second manifold mesh, and the first manifold mesh and the first non-manifold mesh are connected through the non-manifold structure.
- the index information includes a geometric index and an attribute index.
- decoding the first sub-code stream to obtain a manifold grid includes:
- the first sub-code stream includes a geometry information code stream corresponding to the geometry information, an attribute information code stream corresponding to the attribute information, and a relationship information code stream corresponding to the second connection relationship information, wherein the second connection relationship information is used to characterize the connection relationship of the vertices of the manifold 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.
- the grid coding device provided in the embodiment of the present application is described by taking the grid coding method executed by the grid coding device as an example.
- FIG. 11 is a structural diagram of a grid coding device provided in an embodiment of the present application.
- the grid coding device 1100 includes:
- a filtering module 1101 is used to filter duplicate points of a first mesh to be encoded, and obtain duplicate point information of a second mesh and a first duplicate point, wherein the first duplicate point is a geometric vertex in the second mesh, and the first duplicate point is obtained by merging at least two duplicate points in the first mesh, and the duplicate point information includes an index of the duplicate point and an index of a surface where the duplicate point is located;
- a first encoding module 1102 configured to encode the second grid to obtain a first code stream
- a second encoding module 1103 is configured to encode the repeated point information of the first repeated point based on a geometric encoding order and a connection relationship encoding order to obtain a repeated point information code stream, wherein the repeated point information code stream carries a first identifier for indicating that the encoding end has performed repeated point filtering, and the geometric encoding order and the connection relationship encoding order are determined based on an encoding process of the second grid;
- the determination module 1104 is configured to determine a target code stream of the first grid based on the repeated point information code stream and the first code stream.
- the filtering module is specifically used to perform the following operations:
- the merging of the N repeated points is canceled, or the N repeated points are merged into the first repeated point, and first information is generated, wherein the first information includes a second identifier, vertex information of the manifold structure before the N repeated points are merged into the first repeated point, and connection relationship information between vertices, and the first information is used to obtain the same manifold structure as before the N repeated points are merged into the first repeated point when splitting the non-manifold structure;
- N is an integer greater than 1.
- the first encoding module includes:
- a splitting unit configured to, when the second grid has a non-manifold structure, split the non-manifold structure to obtain non-manifold information and a manifold grid;
- a first encoding unit configured to encode the manifold grid to obtain a first sub-code stream
- a second encoding unit configured to encode the non-manifold information based on the geometric encoding order and the attribute encoding order to obtain a second sub-code stream, wherein the second sub-code stream carries a third identifier indicating that the encoder has performed the non-manifold structure splitting, and the attribute encoding order is determined based on the encoding process of the manifold mesh;
- the first code stream includes the first sub-code stream and the second sub-code stream.
- the second 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
- the splitting unit is specifically used to perform the following operations:
- the non-manifold structure in the second mesh is split and processed to obtain the non-manifold information and a manifold mesh, wherein the manifold mesh includes the first manifold mesh and a second manifold mesh converted from the first non-manifold mesh.
- the index information includes a geometric index and an attribute index.
- the splitting unit is specifically used to update the index of the first vertex in the first connection relationship information to the index 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.
- the first encoding subunit is specifically configured to perform the following operations:
- connection relationship information code stream Encoding the second connection relationship information of the manifold grid to obtain a connection relationship information code stream
- the first sub-code stream includes the geometry information code stream, the attribute information code stream and the connection relationship information code stream, and the second connection relationship information is used to characterize the connection relationship of the vertices of the manifold mesh.
- FIG. 12 is a structural diagram of a grid decoding device provided in an embodiment of the present application.
- the grid decoding device 1200 includes:
- An acquisition module 1201 is used to acquire a first code stream and a repeated point information code stream of a first repeated point according to a target code stream of a first grid;
- a first decoding module 1202 is configured to decode the first bitstream to obtain a second mesh, wherein the first repeated point is a geometric vertex in the second mesh, and the first repeated point is obtained by merging at least two repeated points in the first mesh, and the repeated point information includes an index of the repeated point and an index of a surface where the repeated point is located;
- a second decoding module 1203 is configured to decode the repeated point information code stream based on a geometric decoding order and a connection relationship decoding order to obtain repeated point information of the first repeated point when the repeated point information code stream includes a first identifier, the first identifier being a first identifier indicating that the encoder has performed repeated point filtering, and the geometric decoding order and the connection relationship decoding order being determined based on a decoding process of the second grid;
- the recovery module 1204 is configured to recover the first repeated point in the second grid based on the repeated point information of the first repeated point to obtain the first grid.
- the restoring the first repeated point in the second grid based on the repeated point information of the first repeated point to obtain the first grid includes:
- the first repeated point is added to the second mesh, and the connection relationship between the first repeated point and the geometric vertices in the second mesh is restored to obtain the first mesh.
- the first decoding module 1202 includes:
- a determining unit configured to determine a first sub-stream and a second sub-stream included in the first stream
- a first decoding unit configured to decode the first sub-code stream to obtain a manifold grid
- a second decoding unit configured to decode the second substream based on the geometric decoding order and the connection relationship decoding order to obtain non-manifold information when the second substream includes a third identifier, wherein the third identifier is used to indicate that the encoder has performed the non-manifold structure splitting;
- a restoration unit is used to restore the non-manifold structure in the manifold grid by using the non-manifold information to obtain the second grid.
- the manifold mesh includes a first manifold mesh and a second manifold mesh
- the first manifold mesh includes a first vertex
- the second manifold mesh includes a second vertex
- the first vertex and the second vertex are duplicate points
- the non-manifold information includes index information of the first vertex and index information of the second vertex
- the recovery unit is specifically used to perform the following operations:
- the first vertex and the second vertex are merged based on the index information of the first vertex and the index information of the second vertex, and the connection relationship information of the second manifold mesh is updated to obtain the second mesh, wherein the second mesh includes the first manifold mesh and a first non-manifold mesh converted from the second manifold mesh, and the first manifold mesh and the first non-manifold mesh are connected through the non-manifold structure.
- the index information includes a geometric index and an attribute index.
- the first decoding unit is specifically configured to perform the following operations:
- the first sub-code stream includes a geometry information code stream corresponding to the geometry information, an attribute information code stream corresponding to the attribute information, and a relationship information code stream corresponding to the second connection relationship information, wherein the second connection relationship information is used to characterize the connection relationship of the vertices of the manifold mesh.
- the grid encoding device and grid decoding device in the embodiment of the present application can be an electronic device, such as an electronic device with an operating system, or a component in an electronic device, such as an integrated circuit or a chip.
- the electronic device can be a terminal, or it can be other devices other than a terminal.
- the terminal can include but is not limited to the types of terminals 11 listed above, and other devices can be servers, network attached storage (NAS), etc., which are not specifically limited in the embodiment of the present application.
- the grid encoding device and grid decoding device provided in the embodiments of the present application can implement the various processes implemented by the method embodiments of Figures 2 to 10 and achieve the same technical effects. To avoid repetition, they will not be described here.
- an embodiment of the present application further provides a communication device 1300, including a processor 1301 and a memory 1302, wherein the memory 1302 stores a program or instruction that can be run on the processor 1301.
- the communication device 1300 is an encoding end device
- the program or instruction is executed by the processor 1301 to implement the various steps of the above-mentioned grid encoding method embodiment, and can achieve the same technical effect.
- the communication device 1300 is a decoding end device
- the program or instruction is executed by the processor 1301 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.
- the embodiment of the present application also provides a terminal, including a processor and a communication interface.
- the processor is used to filter out duplicate points of a first mesh to be encoded, obtain duplicate point information of a second mesh and a first duplicate point, wherein the first duplicate point is a geometric vertex in the second mesh, and the first duplicate point is obtained by merging at least two duplicate points in the first mesh, and the duplicate point information includes an index of the duplicate point and an index of a surface where the duplicate point is located; encode the second mesh to obtain a first code stream; based on geometric encoding The geometric coding order and the connection relationship coding order are determined based on the encoding process of the second grid; and a target code stream of the first grid is determined based on the repeated point information code stream and the first code stream;
- the processor is used to obtain the first code stream and the repeated point information code stream of the first repeated point according to the target code stream of the first grid; decode the first code stream to obtain the second grid, the first repeated point is a geometric vertex in the second grid, and the first repeated point is obtained by merging at least two repeated points in the first grid, and the repeated point information includes an index of the repeated point and an index of a surface where the repeated point is located; when the repeated point information code stream includes a first identifier, decode the repeated point information code stream based on a geometric decoding order and a connection relationship decoding order to obtain the repeated point information of the first repeated point, the first identifier is a first identifier used to indicate that the encoding end has performed repeated point filtering, and the geometric decoding order and the connection relationship decoding order are determined based on the decoding process of the second grid; restore the first repeated point in the second grid based on the repeated point information of the first repeated point to obtain the first grid.
- the terminal embodiment corresponds to the above-mentioned terminal side method embodiment, and each implementation process and implementation mode of the above-mentioned method embodiment can be applied to the terminal embodiment and can achieve the same technical effect.
- Figure 14 is a schematic diagram of the hardware structure of a terminal implementing the embodiment of the present application.
- the terminal 1400 includes but is not limited to: a radio frequency unit 1401, a network module 1402, an audio output unit 1403, an input unit 1404, a sensor 1405, a display unit 1406, a user input unit 1407, an interface unit 1408, a memory 1409 and at least some of the components of the processor 1410.
- the terminal 1400 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 1410 through a power management system, so as to manage 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 1404 may include a graphics processing unit (GPU) 14041 and a microphone 14042, and the graphics processor 14041 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 1406 may include a display panel 14061, and the display panel 14061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc.
- the user input unit 1407 includes a touch panel 14071 and at least one of other input devices 14072.
- the touch panel 14071 is also called a touch screen.
- the touch panel 14071 may include two parts: a touch detection device and a touch controller.
- Other input devices 14072 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 radio frequency unit 1401 can transmit the data to the processor 1410 for processing; in addition, the radio frequency unit 1401 can send uplink data to the network side device.
- the radio frequency unit 1401 includes but is not limited to an antenna, an amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, etc.
- the memory 1409 can be used to store software programs or instructions and various data.
- the memory 1409 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 1409 may include a volatile memory or a non-volatile memory, or the memory 1409 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 1409 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
- the processor 1410 may include one or more processing units; optionally, the processor 1410 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 1410.
- the processor 1410 when the terminal is an encoding end, the processor 1410 is used to perform duplicate point filtering on a first mesh to be encoded, obtain duplicate point information of a second mesh and a first duplicate point, the first duplicate point is a geometric vertex in the second mesh, and the first duplicate point is obtained by merging at least two duplicate points in the first mesh, and the duplicate point information includes an index of the duplicate point and an index of a surface where the duplicate point is located; encode the second mesh to obtain a first code stream; encode the duplicate point information of the first duplicate point based on a geometric coding order and a connection relationship coding order to obtain a duplicate point information code stream, the duplicate point information code stream carries a first identifier for indicating that the encoding end has performed duplicate point filtering, the geometric coding order and the connection relationship coding order are determined based on the encoding process of the second mesh; determine a target code stream of the first mesh based on the duplicate point information code stream and the first code stream;
- the processor 1410 is used to obtain the first code stream and the repeated point information code stream of the first repeated point according to the target code stream of the first grid; decode the first code stream to obtain the second grid, the first repeated point is a geometric vertex in the second grid, and the first repeated point is obtained by merging at least two repeated points in the first grid, and the repeated point information includes an index of the repeated point and an index of a surface where the repeated point is located; when the repeated point information code stream includes a first identifier, decode the repeated point information code stream based on a geometric decoding order and a connection relationship decoding order to obtain the repeated point information of the first repeated point, the first identifier is a first identifier used to indicate that the encoding end has performed repeated point filtering, and the geometric decoding order and the connection relationship decoding order are determined based on the decoding process of the second grid; restore the first repeated point in the second grid based on the repeated point information of the first repeated point to obtain the first grid.
- the terminal provided in the embodiment of the present application can implement each process implemented in the method embodiments of Figures 2 to 10 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.
- 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 or 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 embodiments of the present application further provide a computer program/program product, which is stored in a storage medium.
- the computer program/program product is executed by at least one processor to implement the various processes of the above-mentioned grid encoding method or 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 video encoding and decoding system, including: an encoding end device and a decoding end device, wherein the encoding end device is used to execute the various processes as shown in Figure 2 and the various method embodiments of the above-mentioned encoding end device, and the decoding end device is used to execute the various processes as shown in Figure 10 and the various method embodiments above, and can achieve the same technical effect. In order to avoid repetition, it will not be repeated here.
- the above embodiment method can be implemented by means of software plus a necessary general hardware platform, or by hardware, but in many cases the former is a better implementation method.
- the technical solution of the present application, or the part that contributes to the prior art can be embodied in the form of a computer software product, which is stored in a storage medium. (such as ROM/RAM, magnetic disk, optical disk), including several instructions for enabling a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
提供了一种网格编码方法、装置、通信设备及可读存储介质,属于视频编解码技术领域,网格编码方法包括:对待编码的第一网格进行重复点滤除,获得第二网格和第一重复点的重复点信息(201),第一重复点为第二网格中的几何顶点,且第一重复点基于第一网格中至少两个重复点合并得到;对第二网格进行编码得到第一码流(202);基于几何编码顺序和连接关系编码顺序对第一重复点的重复点信息进行编码得到重复点信息码流(203),重复点信息码流中携带有用于表示编码端进行了重复点滤除的第一标识,几何编码顺序和连接关系编码顺序基于第二网格的编码过程确定;基于重复点信息码流和第一码流确定第一网格的目标码流(204)。
Description
相关申请的交叉引用
本申请主张在2022年10月19日在中国提交的中国专利申请No.202211291817.X的优先权,其全部内容通过引用包含于此。
本申请属于视频编解码技术领域,具体涉及一种网格编码方法、装置、通信设备及可读存储介质。
随着多媒体技术的迅速发展,三维模型成为继音频、图像、视频之后的新一代数字化媒体。三维网格和点云是两种常用的三维模型表示方式。三维网格模型与传统的图像、视频等多媒体相比具有更强的交互性和逼真性的特点,应用范围较为广泛。
目前,在编码端对三维网格进行无损编码时,通常直接对输入的待编码网格进行编码,同时解码段直接对接收的码流进行解码处理得到相对应的解码网格,由于待编码的网格中通常存在较多的重复点,从而使得编码后的码流较大。因此,现有技术存在无损编码的码流较大的问题。
发明内容
本申请实施例提供一种网格编码方法、装置、通信设备及可读存储介质,能够解决无损编码的码流较大的问题。
第一方面,提供了一种网格编码方法,包括:
对待编码的第一网格进行重复点滤除,获得第二网格和第一重复点的重复点信息,所述第一重复点为所述第二网格中的几何顶点,且所述第一重复点基于所述第一网格中至少两个重复点合并得到,所述重复点信息包括重复点的索引和重复点所在面的索引;
对所述第二网格进行编码得到第一码流;
基于几何编码顺序和连接关系编码顺序对第一重复点的重复点信息进行编码得到重复点信息码流,所述重复点信息码流中携带有用于表示编码端进行了重复点滤除的第一标识,所述几何编码顺序和所述连接关系编码顺序基于所述第二网格的编码过程确定;
基于所述重复点信息码流和所述第一码流确定所述第一网格的目标码流。
第二方面,提供了一种网格解码方法,包括:
根据第一网格的目标码流获取第一码流和第一重复点的重复点信息码流;
对所述第一码流进行解码获得第二网格,所述第一重复点为所述第二网格中的几何顶点,且所述第一重复点基于所述第一网格中至少两个重复点合并得到,所述重复点信息包
括重复点的索引和重复点所在面的索引;
在所述重复点信息码流包括第一标识的情况下,基于几何解码顺序和连接关系解码顺序对所述重复点信息码流进行解码获得所述第一重复点的重复点信息,所述第一标识用于表示编码端进行了重复点滤除的第一标识,所述几何解码顺序和所述连接关系解码顺序基于所述第二网格的解码过程确定;
基于所述第一重复点的重复点信息对所述第二网格中的所述第一重复点进行恢复,获得所述第一网格。
第三方面,提供了一种网格编码装置,包括:
滤除模块,用于对待编码的第一网格进行重复点滤除,获得第二网格和第一重复点的重复点信息,所述第一重复点为所述第二网格中的几何顶点,且所述第一重复点基于所述第一网格中至少两个重复点合并得到,所述重复点信息包括重复点的索引和重复点所在面的索引;
第一编码模块,用于对所述第二网格进行编码得到第一码流;
第二编码模块,用于基于几何编码顺序和连接关系编码顺序对第一重复点的重复点信息进行编码得到重复点信息码流,所述重复点信息码流中携带有用于表示编码端进行了重复点滤除的第一标识,所述几何编码顺序和所述连接关系编码顺序基于所述第二网格的编码过程确定;
确定模块,用于基于所述重复点信息码流和所述第一码流确定所述第一网格的目标码流。
第四方面,提供了一种网格解码装置,包括:
获取模块,用于根据第一网格的目标码流获取第一码流和第一重复点的重复点信息码流;
第一解码模块,用于对所述第一码流进行解码获得第二网格,所述第一重复点为所述第二网格中的几何顶点,且所述第一重复点基于所述第一网格中至少两个重复点合并得到,所述重复点信息包括重复点的索引和重复点所在面的索引;
第二解码模块,用于在所述重复点信息码流包括第一标识的情况下,基于几何解码顺序和连接关系解码顺序对所述重复点信息码流进行解码获得所述第一重复点的重复点信息,所述第一标识用于表示编码端进行了重复点滤除的第一标识,所述几何解码顺序和所述连接关系解码顺序基于所述第二网格的解码过程确定;
恢复模块,用于基于所述第一重复点的重复点信息对所述第二网格中的所述第一重复点进行恢复,获得所述第一网格。
第五方面,提供了一种终端,该终端包括处理器和存储器,所述存储器存储可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第一方面所述的方法的步骤,或者实现如第二方面所述的方法的步骤。
第六方面,提供了一种终端,包括处理器及通信接口,其中,
在所述终端为编码端时,所述处理器用于对待编码的第一网格进行重复点滤除,获得第二网格和第一重复点的重复点信息,所述第一重复点为所述第二网格中的几何顶点,且所述第一重复点基于所述第一网格中至少两个重复点合并得到,所述重复点信息包括重复点的索引和重复点所在面的索引;对所述第二网格进行编码得到第一码流;基于几何编码顺序和连接关系编码顺序对第一重复点的重复点信息进行编码得到重复点信息码流,所述重复点信息码流中携带有用于表示编码端进行了重复点滤除的第一标识,所述几何编码顺序和所述连接关系编码顺序基于所述第二网格的编码过程确定;基于所述重复点信息码流和所述第一码流确定所述第一网格的目标码流;
或者,在所述终端为解码端时,所述处理器用于根据第一网格的目标码流获取第一码流和第一重复点的重复点信息码流;对所述第一码流进行解码获得第二网格,所述第一重复点为所述第二网格中的几何顶点,且所述第一重复点基于所述第一网格中至少两个重复点合并得到,所述重复点信息包括重复点的索引和重复点所在面的索引;在所述重复点信息码流包括第一标识的情况下,基于几何解码顺序和连接关系解码顺序对所述重复点信息码流进行解码获得所述第一重复点的重复点信息,所述第一标识用于表示编码端进行了重复点滤除的第一标识,所述几何解码顺序和所述连接关系解码顺序基于所述第二网格的解码过程确定;基于所述第一重复点的重复点信息对所述第二网格中的所述第一重复点进行恢复,获得所述第一网格。
第七方面,提供了一种视频编解码系统,包括:编码端设备及解码端设备,所述编码端设备可用于执行如第一方面所述的网格编码方法的步骤,所述解码端设备可用于执行如第二方面所述的网格解码方法的步骤。
第八方面,提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面所述的方法的步骤,或者实现如第二方面所述的方法的步骤。
第九方面,提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面所述的方法的步骤,或实现如第二方面所述的方法的步骤。
第十方面,提供了一种计算机程序/程序产品,所述计算机程序/程序产品被存储在存储介质中,所述计算机程序/程序产品被至少一个处理器执行以实现如第一方面所述的方法的步骤,或实现如第二方面所述的方法的步骤。
本申请实施例通过对待编码的第一网格进行重复点滤除,获得第二网格和第一重复点的重复点信息,所述第一重复点为所述第二网格中的几何顶点,且所述第一重复点基于所述第一网格中至少两个重复点合并得到,所述重复点信息包括重复点的索引和重复点所在面的索引;对所述第二网格进行编码得到第一码流;基于几何编码顺序和连接关系编码顺序对第一重复点的重复点信息进行编码得到重复点信息码流,所述重复点信息码流中携带有用于表示编码端进行了重复点滤除的第一标识,所述几何编码顺序和所述连接关系编码
顺序基于所述第二网格的编码过程确定;基于所述重复点信息码流和所述第一码流确定所述第一网格的目标码流。这样,减少了对重复点编码的数据,从而减小编码码流的大小。与此同时,提高了编解码的效率。
图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)、可穿戴式设备(Wearable
Device)或车载设备(Vehicle User Equipment,VUE)、行人终端(Pedestrian User Equipment,PUE)等终端侧设备,可穿戴式设备包括:智能手表、手环、耳机、眼镜等。需要说明的是,在本申请实施例并不限定终端的具体类型。
为了方便理解,以下对本申请实施例涉及的一些内容进行说明:
(1)开源三维网格压缩工具(Draco)
Draco将三维网格的连接信息、几何信息和UV坐标分别进行编码并进行存储。其中的核心模块,即编码连接信息的模块使用了Edgebreaker算法。对几何信息和UV坐标的编码则采用了常规的压缩方法,即对数据进行量化、预测压缩(平行四边形预测)和熵编码。由于Draco采用了连接关系驱动的编码方法,对几何信息和UV坐标的编码遵循连接信息的编码顺序。通过这种方式将连接关系编码的顶点顺序隐含在几何信息的顶点顺序中来避免单独传输连接关系编码的顶点顺序,从而节省了这部分的比特开销。
(2)Edgebreaker(EB)
Edgebreaker方法是一种三维网格连接关系编码方法,具有压缩性能好、便于实现、可以给出压缩比上限等优点。Edgebreaker方法本身只描述了三维网格连接信息的压缩方法,还要通过几何信息压缩和熵编码等才能实现对三维网格的压缩。
Edgebreaker编码技术对与球体同胚的三角形网格的压缩效率能够达到每个三角形2位或更少。编码算法使用五种不同的模式(称为C、L、E、R和S)以深度优先顺序访问网格的每个三角形。根据每个三角形所处的模式,对其进行标记,生成CLERS字符串,得到对网格连接关系的紧凑表示。
Edgebreaker方法的五种模式,如图1所示。Edgebreaker方法将网格分为已遍历部分和未遍历部分,两部分的边界被称为活动边界。在Edgebreaker的编码过程中,通过活动边界上的活动边访问待遍历的三角形,并根据活动边与其所处三角形的关系来选择使用哪种模式。将活动边所在三角形中的另一个顶点称为第三个顶点。如果第三个顶点不处于活动边界上,那么当前三角形标记为C模式。如果第三个顶点处于活动边界上,并且按照逆时针顺序,处于当前活动边顶点的下一个,那么当前三角形标记为R模式。如果第三个顶点处于活动边界上,并且按照逆时针顺序,处于当前活动边顶点的上一个,那么当前三角形标记为L模式。如果第三个顶点处于活动边界上,并且按照逆时针顺序,既是当前活动边顶点的上一个顶点,又是当前活动边的下一个顶点,那么当前三角形标记为E模式。如果第三个顶点处于活动边界上,但是按照逆时针顺序,既不是当前活动边顶点的上一个顶点,又不是当前活动边的下一个顶点,那么当前三角形标记为S模式。
在每次标记一个三角形之后,都会更新活动边界,并按照一定规则选择下一个活动边。当遍历完所有的三角形之后,对得到的CLERS字符串进行熵编码,可以得到更高的压缩效率。
图1给出了使用EB编码二维网格的示意图。根据EB的编码规则,最终熵编码的模式码字为CCRRSLCRSERRELCRRRCRRRE。
由于Edgebreaker方法的五种模式不能处理非流形网格,因此使用Edgebreaker方法前必须将网格转化成流形网格。
下面结合附图,通过一些实施例及其应用场景对本申请实施例提供的网格编码方法进行详细地说明。
参照图2,本申请实施例提供了一种网格编码方法,应用于编码端,如图2所示,该网格编码方法包括:
步骤201,对待编码的第一网格进行重复点滤除,获得第二网格和第一重复点的重复点信息,所述第一重复点为所述第二网格中的几何顶点,且所述第一重复点基于所述第一网格中至少两个重复点合并得到,所述重复点信息包括重复点的索引和重复点所在面的索引;
本申请实施例中,上述第一网格可以理解为三维网格,首先可以建立第一网格中几何顶点索引和坐标值之间的对应关系;然后遍历所有顶点,当出现至少两个几何顶点的坐标值相同时,可以认为该至少两个几何顶点是重复点(或者称之为几何重复点)。通常的,在第一网格中存在大量的重复点,通过滤除重复点,可以提高编码效率,降低编码码流的大小。
步骤202,对所述第二网格进行编码得到第一码流;
可选地,本申请实施例中,可以基于Edgebreaker方法对第二网格进行编码,得到第一码流。
步骤203,基于几何编码顺序和连接关系编码顺序对第一重复点的重复点信息进行编码得到重复点信息码流,所述重复点信息码流中携带有用于表示编码端进行了重复点滤除的第一标识,所述几何编码顺序和所述连接关系编码顺序基于所述第二网格的编码过程确定;
应理解,基于几何编码顺序和连接关系编码顺序对第一重复点的重复点信息进行编码得到重复点信息码流可以理解为,通过重复点的索引和重复点所在面的索引来编码重复点的几何信息和连接关系信息,得到重复点信息码流。
步骤204,基于所述重复点信息码流和所述第一码流确定所述第一网格的目标码流。
本申请实施例中,可以将重复点信息码流和所述第一码流进行混流获得第一网格的目标码流。需要说明的是,在视频编码过程中,还包括纹理图的编码过程中,上述目标码流还可以包括基于该纹理图的编码过程得到的纹理图码流。也就是说,可以将纹理图码流、重复点信息码流和所述第一码流进行混流得到待编码网格的码流。
可选地,解码端在获得上述目标码流后,可以分别对所述第一码流和重复点信息码流进行解码,并利用重复点信息码流解码获得的第一重复点的重复点信息对第一码流解码获得的第二网格进行重复点恢复,得到第一网格。
本申请实施例通过对待编码的第一网格进行重复点滤除,获得第二网格和第一重复点的重复点信息,所述第一重复点为所述第二网格中的几何顶点,且所述第一重复点基于所
述第一网格中至少两个重复点合并得到,所述重复点信息包括重复点的索引和重复点所在面的索引;对所述第二网格进行编码得到第一码流;基于几何编码顺序和连接关系编码顺序对第一重复点的重复点信息进行编码得到重复点信息码流,所述重复点信息码流中携带有用于表示编码端进行了重复点滤除的第一标识,所述几何编码顺序和所述连接关系编码顺序基于所述第二网格的编码过程确定;基于所述重复点信息码流和所述第一码流确定所述第一网格的目标码流。这样,减少了对重复点编码的数据,从而减小编码码流的大小。与此同时,提高了编解码的效率。
可选地,在一些实施例中,所述对待编码的第一网格进行重复点滤除,获得第二网格和第一重复点的重复点信息包括:
在所述第一网格中的N个重复点进行合并未产生新的非流形结构的情况下,将所述N个重复点合并为所述第一重复点;
在所述第一网格中的N个重复点进行合并产生新的非流形结构的情况下,取消所述N个重复点的合并,或者,将所述N个重复点合并为所述第一重复点,并生成第一信息,所述第一信息包括第二标识、将所述N个重复点合并为所述第一重复点之前的流形结构的顶点信息和顶点之间的连接关系信息,所述第一信息用于进行非流形结构拆分时,得到与将所述N个重复点合并为所述第一重复点之前相同的流形结构;
其中,N为大于1的整数。
需要说明的是,上述第一网格在进行重复点合并之前存在的非流形结构可以称之为旧的非流形结构,上述新的非流形结构是指由于重复点合并导致新增加的非流形结构,即除旧的非流形结构之外的非流形结构。
本申请实施例中,在滤除重复点的过程中需要考虑滤除重复点对非流形结构的影响,主要可以采用两种方案:
方案1,在合并重复点的过程中避免产生非流形结构,即在所述第一网格中的N个重复点进行合并产生新的非流形结构的情况下,取消所述N个重复点的合并;否则,保留该顶点的重复点。由于避免产生新的非流形结构,从而降低了后续编码难度。
方案2,允许在合并重复点的过程中产生非流形结构,这时需要对新产生的非流形结构进行诸如标记(通过第二标识进行标记)等特殊处理,记录下合并重复点之前流形结构的顶点信息和顶点间的连接关系信息,以使得拆分非流形结构模块可以将新产生的非流形结构拆分成与合并重复点之前相同的流形结构,从而使得编码端可以进行无损编码。
可选地,在一些实施例中,对所述第二网格进行编码得到第一码流包括:
在所述第二网格存在非流形结构的情况下,对所述非流形结构进行拆分处理得到非流形信息和流形网格;
对所述流形网格进行编码,获得第一子码流;
基于所述几何编码顺序和属性编码顺序对非流形信息进行编码获得第二子码流,所述第二子码流中携带有用于表示编码端进行了所述非流形结构拆分的第三标识,所述属性编
码顺序基于所述流形网格的编码过程确定;
其中,所述第一码流包括所述第一子码流和所述第二子码流。
本申请实施例中,非流形结构可以包括非流形边和非流形点,非流形点也可以描述为非流形顶点,构成非流形边的两个顶点也可以描述为非流形顶点。上述几何编码顺序和连接关系编码顺序均可以理解为基于所述流形网格的编码过程确定。
可选地,确定待编码网格中的非流形边的方法可以是,建立一个数据结构来存储待编码网格中的每条边所在的三角形,通过查询每条边对应的三角形数量找出非流形边,非流形边对应的三角形数量大于或等于3;或者可以是,通过构造CornerTable来建立网格中角和边之间的对应关系,通过该对应关系找出非流形边。
可选地,确定待编码网格中的非流形点的方法可以是,构建CornerTable,建立待编码网格中的每个顶点和该顶点的角之间的对应关系,从顶点的某一个角开始,执行目标遍历操作,依次遍历与该角相邻且构成一个扇形的所有角,将顶点和遍历到的角标记为已遍历。如果在执行完上述过程后,有顶点仍存在未遍历过角,则说明该顶点为非流形点。
可选地,对待编码网格中的非流形结构进行拆分处理,可以是为待编码网格中的非流形顶点建立重复顶点(即新增顶点),以将非流形结构转化为流形结构,该非流形顶点可以包括构成非流形边的顶点,以及非流形点。
可选地,上述非流形信息可以包括非流形顶点的索引信息和新增顶点的索引信息。在编码第一子码流时,可以按照一定规则保持新增顶点与非流形顶点之间的对应关系。例如,可以将新增顶点的索引信息与非流形顶点的索引信息交错编码;或者,可以按照相同的顺序将新增顶点的索引信息与非流形顶点的索引信息分别编码到两路码流,通过编码顺序来保持新增顶点与非流形顶点之间的对应关系。
可选地,第一子码流可以包括几何信息码流、属性信息码流及连接关系信息码流。可以对所述流形网格的几何信息进行编码,得到几何信息码流;可以对所述流形网格的属性信息进行编码,得到属性信息码流;可以对所述流形网格的连接关系信息进行编码,得到连接关系信息码流。
需要说明的是,由于在第二子码流中携带有第三标识,从而使得解码端可以基于该第三标识对第二子码流中的非流形信息进行解码。这样,通过对拆分非流形结构得到的非流形信息进行编码,从而在解码时能够通过非流形信息重建非流形结构,能够降低甚至消除编解码处理后网格信息的质量损失,实现无损编码。
在本申请实施例中,由于在所述第二网格存在非流形结构的情况下,对所述非流形结构进行拆分处理得到非流形信息和流形网格;对所述流形网格进行编码,获得第一子码流;基于所述几何编码顺序和所述连接关系编码顺序对非流形信息进行编码获得第二子码流,所述第二子码流中携带有用于表示编码端进行了所述非流形结构拆分的第三标识;其中,所述第一码流包括所述第一子码流和所述第二子码流。
需要说明的是,流形(Manifold)是局部具有欧氏空间性质的空间。一般的流形可以
通过把许多平直的片折弯并粘连而成。流形满足的条件为:局部具有欧氏空间性质,而非流形可以是指不满足流形的条件。对于三维网格,流形边满足的条件为:网格边为一个或两个网格三角面片共享(edge is incident to only one or two faces);流形点满足的条件为:网格顶点的一环邻域三角片构成一个闭合或者开放的扇面(the faces incident to a vertex form a closed or an open fan)。非流形边可以是指不满足流形边的条件的网格边,非流形点可以是指不满足流形点的条件的网格顶点。
可选地,在一些实施例中,所述第二网格包括第一流形网格和第一非流形网格,所述第一流形网格和第一非流形网格通过所述非流形结构连接,所述非流形结构包括第一顶点,所述对所述非流形结构进行拆分处理得到非流形信息和流形网格包括:
建立第二顶点,所述第二顶点与所述第一顶点为重复点,所述第二顶点的几何索引与所述第一顶点的几何索引不同;
基于所述第二顶点对所述第二网格中的非流形结构进行拆分处理,获得所述非流形信息和流形网格,所述流形网格包括所述第一流形网格和由所述第一非流形网格转换的第二流形网格,所述非流形信息包括所述第一顶点的索引信息和所述第二顶点的索引信息。
可选地,第一顶点为非流形顶点,第一顶点可以是构成非流形边的顶点,或者可以是非流形点。
本申请实施例中,上基于所述第二顶点对待编码网格中的非流形结构进行拆分处理,以将所述第一非流形网格转换为第二流形网格。这样,通过创建重复点,从而能够实现对待编码网格中的非流形结构的拆分,将待编码网格中的非流形结构转化为流形结构,并记录新增顶点的索引信息,便于在解码时重建非流形结构。
可选地,在一些实施例中,所述索引信息包括几何索引和属性索引。其中,第一顶点和第二顶点的几何索引不同,但属性索引相同。这样,遍历顶点的几何索引和属性索引可以确定第一顶点和第二顶点为重复点。
可选地,在一些实施例中,所述基于所述第二顶点对所述第二网格中的非流形结构进行拆分处理包括:
将第一连接关系信息中的第一顶点的索引,更新为所述第二顶点的索引,所述第一连接关系信息用于表征所述第一非流形网格的顶点的连接关系。
本申请实施例中,拆分非流形点时首先需要构建角表(CornerTable),建立每个顶点和该顶点的角之间的对应关系。对于每一个顶点执行两步操作。第一步,从顶点的某一个角开始,依次遍历与该角相邻且构成一个扇形的所有角,将顶点和遍历到的角标记为已遍历。如果在执行完上述过程后,有顶点仍存在未遍历过角,则说明该顶点为非流形点。第二步,对于每个非流形点,创建一个重复点,并修改连接关系,将第一步中未遍历到的角连接到新添加的重复点,将非流形点拆分为两个流形顶点。重复这一过程,直到所有的顶点都转换成流形点为止。同时,记录下此过程中新添加顶点的索引信息和原非流形顶点的索引信息。
如果在滤除重复点的过程中,采用了上述方案2产生了新的非流形结构,则根据记录的滤除重复点前流形结构的顶点信息和顶点间的连接关系,将非流形结构拆分成与滤除重复点之前相同的流形结构。
可选地,在一些实施例中,所述对所述流形网格进行编码,获得第一子码流包括:
对所述流形网格的几何信息进行编码,得到几何信息码流;
对所述流形网格的属性信息进行编码,得到属性信息码流;
对所述流形网格的第二连接关系信息进行编码,得到连接关系信息码流;
其中,所述第一子码流包括所述几何信息码流、所述属性信息码流及所述连接关系信息码流,所述第二连接关系信息用于表征所述流形网格的顶点的连接关系。
应理解,上述第二连接关系信息包括更新后的第一连接关系信息。其中,在得到各编码码流后,可以将非流形信息码流、几何信息码流、属性信息码流、连接关系信息码流、纹理图码流和重复点信息码流进行混流得到目标码流。
为了更好的理解本申请,以下通过一些实施例对本申请的编解码过程进行详细说明。
在一些实施例中,如图3所示,编码端的编码框架中主要包括滤除重复点模块、拆分非流形网格模块、连接关系编码模块、几何信息编码模块、属性信息编码模块、非流形信息编码模块和重复点信息编码模块等。该编码框架可以实现对三维网格的无损压缩,具体进行的编码操作包括如下过程:
1)滤除网格中的重复点,重复点是指三维坐标重复的几何顶点,在滤除重复顶点的过程中记录重复顶点的索引,以及每一个重复点所在面的索引。
2)如三维网格中存在非流形结构,则拆分其中的非流形结构,得到流形网格。同时,记录由于拆分非流形结构而新添加的顶点信息和原非流形顶点信息。
3)对流形网格,使用Edgebreaker方法编码连接信息,得到模式字符串,并对其进行熵编码;连接关系编码完成后编码网格的几何信息,例如可以使用平行四边形预测编码方法,此处不限制几何信息的编码方法;如果网格存在UV坐标等属性信息,可以使用如相似三角形预测编码等方法进行编码,此处不限制属性信息的编码方法。
4)如果网格中存在非流形结构,则按照几何信息和属性信息的编码顺序编码新添加顶点的索引信息和原非流形顶点的索引信息。此处,可以直接熵编码新添加顶点和对应的非流形顶点的几何和属性的索引,但不限于这种编码方式。
5)如果需要编码重复点信息,则编码重复点的索引、重复点所在面的数量以及重复点所在面的索引。此处,可以直接熵编码重复点的索引、重复点所在面的数量以及重复点所在面的索引,但不限于这种编码方式。
6)使用视频编码器对纹理图进行编码。
7)将各路码流进行混流,得到编码的输出码流(即目标码流)。
以下对上述各模块在编码过程中的处理过程进行详细说明。
1、重复点滤除模块。其输入为第一网格,输出包括滤除几何重复点后的第二网格、
重复点信息标识(即第一标识)、第一重复点的索引和第一重复点所在面的索引。
通常,在三维网格中存在大量几何重复点。因此,滤除几何重复点可以明显提高几何信息的编码效率。可选地,重复点滤除模块可以首先建立几何顶点索引与坐标值之间的对应关系。遍历所有顶点,当出现多个几何顶点的坐标值相同时,说明这些顶点是几何重复点。滤除重复点就是将几何重复点合并为一个顶点,并调整连接关系中对应的顶点索引。在此过程中,记录下每个重复点合并后的顶点索引,本申请中可以将合并后顶点的索引称为重复点索引,并在调整连接关系时记录每一个重复点所在面的索引。将记录的重复点索引及所在面的索引作为重复点信息输入重复点信息编码模块进行编码。
此外,在滤除重复点的过程中需要考虑滤除重复点对非流形结构的影响,主要可以采用两种方案。
方案1,在合并重复点的过程中避免产生非流形结构,即在所述第一网格中的N个重复点进行合并产生新的非流形结构的情况下,取消所述N个重复点的合并;否则,保留该顶点的重复点。
方案2,允许在合并重复点的过程中产生非流形结构,这时需要对新产生的非流形结构进行诸如标记(通过第二标识进行标记)等特殊处理,记录下合并重复点之前流形结构的顶点信息和顶点间的连接关系信息,以使得拆分非流形结构模块可以将新产生的非流形结构拆分成与合并重复点之前相同的流形结构,从而使得编码端可以进行无损编码。
2、拆分非流形网格模块。其输入为第二网格,输出包括流形网格、原非流形顶点和因拆分而新增的顶点(即第二顶点)。
可选地,拆分非流形结构主要分为两部分:拆分非流形边和拆分非流形点。
拆分非流形边的第一步是找到非流形边。非流形边的判断条件是一条边同时存在于三个或更多的三角形中。具体实现的方法:可以是,建立一个数据结构来存储每条边所在的三角形,通过查询该边对应的三角形数量找出非流形边;也可以是,通过构造CornerTable来建立网格中角和边之间的对应关系,进而找出非流形边。具体地,对于流形网格,每条边最多与两个角相对,相对的两个角称为对角。如图4所示,角a与角d与边bc相对,角a与角d为对角;而对于非流形边,会有三个或更多的对角。因此,通过角与边的对应关系也可以找出非流形边。
拆分非流形边的第二步是添加顶点,并修改连接关系。在找到非流形边后,为非流形边的两个顶点分别创建重复顶点,选择非流形边所在的一个三角形t,使该三角形中的第三个顶点与新添加的两个顶点构成新的三角形t’,用t’替换原三角形t,迭代此过程直到非流形边转化成流形边。同时,记录下此过程中新添加顶点的索引信息和原非流形顶点的索引信息。
拆分非流形点首先需要构建CornerTable,建立每个顶点和该顶点的角之间的对应关系。对于每一个顶点执行两步操作。第一步,从顶点的某一个角开始,依次遍历与该角相邻且构成一个扇形的所有角,将顶点和遍历到的角标记为已遍历。如果在执行完上述过程后,
有顶点仍存在未遍历过角,则说明该顶点为非流形点。第二步,对于每个非流形点,创建一个重复点,并修改连接关系,将第一步中未遍历到的角连接到新添加的重复点,将非流形点拆分为两个流形顶点。重复这一过程,直到所有的顶点都转换成流形点为止。同时,记录下此过程中新添加顶点的索引信息和原非流形顶点的索引信息。
如果在滤除重复点的过程中,采用了上述方案2产生了新的非流形结构,则根据记录的滤除重复点前流形结构的顶点信息和顶点间的连接关系,将非流形结构拆分成与滤除重复点之前相同的流形结构。
3、连接关系编码模块。其输入为流形网格的连接关系,输出包括编码后的连接连接关系信息码流和顶点编码顺序(即连接关系编码顺序)。
可选地,本方案使用Edgebreaker方法编码三维网格的连接关系,通过建立CornerTable来表示网格的连接关系,并利用CornerTable遍历网格中的所有三角形,生成Edgebreaker的CLERS模式字符串。
CornerTable用于表示网格中的角与顶点以及三角形之间的关系。在构建CornerTable之前首先需要对角进行编号,按照网格中三角形面片的顺序遍历三角形,对于每个三角形按照逆时针顺序为角进行编号,如果网格有f个三角形面片,那么网格会有3f个角。这样编号的好处是,通过角的序号,可以计算出当前角所在的三角形序号,如式1所示;还可以计算出按照逆时针方向,当前角c的前一个角cp和后一个角cn的序号,如式2所示。
fi=c/3 (1)
fi=c/3 (1)
其中,c为当前角的索引,fi为当前角c所在三角形的序号,“/”为整数除法,对所得结果向下取整。
cp=(fi*3)+(c-1)%3 (2)
cp=(fi*3)+(c-1)%3 (2)
其中,c为当前角的索引,fi为当前角c所在三角形的序号,“/”为整数除法,对所得结果向下取整。
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模式字符串进行压缩,得到最终的连接信息码流。
4、几何信息编码模块。其输入为流形网格的几何信息和连接关系编码顺序,输出为几何信息码流以及几何编码顺序。
其中,几何信息编码模块编码几何信息可以采用多种方法,如差值预测编码算法、平行四边形预测编码算法、多平行四边形预测编码算法等,此处不强调具体的编码方法。以平行四边形预测编码算法为例:设有a、b、c、d四个顶点,构成如图7所示的网格中相邻的两个三角形。
其中,a、b、c点的几何信息已编码,d点的几何信息待编码,计算d点几何坐标的预测值d′的公式4如下所示:
d′(x,y,z)=b(x,y,z)+c(x,y,z)-a(x,y,z) (4)
d′(x,y,z)=b(x,y,z)+c(x,y,z)-a(x,y,z) (4)
得到d′后,计算d′与d点的三维坐标的差值Δd:
Δd(x,y,z)=d(x,y,z)-d'(x,y,z) (5)
Δd(x,y,z)=d(x,y,z)-d'(x,y,z) (5)
对Δd进行熵编码得到几何信息码流。
对于无法使用平行四边形预测的三角形,比如处于网格边界的三角形,使用差值编码方法编码几何信息。即使用相邻已编码顶点的坐标值,作为当前顶点坐标的预测值,计算并预测残差。
5、属性信息编码模块。其输入为流形网格的属性信息和连接关系编码顺序,输出为属性信息码流以及属性信息的编码顺序。
其中,三维网格的属性信息一般包括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分别为各点的几何坐标。
首先基于公式6和公式7计算点X的UV坐标:
计算向量Rotated()表示对向量进行90度翻转:
最后计算C点预测UV坐标PredC。
得到UV坐标预测值之后,再与原始UV坐标相减得到残差值。
编码UV坐标步骤如下:
(41)从连接性关系中选取一个初始三角形,不进行预测直接编码初始三角形三个顶点的UV坐标。将初始三角形边存入边集合中。
(42)按照存取准则从集合中选取边τ,编码与τ组成的新三角形对顶点的UV坐标。利用三角形三维到二维的投影关系,依据以上所述的UV坐标预测值计算过程计算待编码点的预测值。将UV坐标原始值减去预测值得到残差。
(43)将新三角形的两条边加入边集合中,移除集合顶部的边τ。从集合中取出下一条边,继续编码该边邻接三角形的对顶点UV坐标,返回步骤3,直到所有顶点的UV坐标编码完成。
(44)熵编码UV坐标残差,输出UV坐标码流(即属性信息码流)。
6、非流形信息编码模块。其输入为新增顶点的索引信息、原非流形顶点的索引信息、几何编码顺序和属性编码顺序,输出为非流形信息码流。
可选地,非流形顶点索引信息包括新增顶点索引信息及原非流形顶点索引信息两部分。
首先,确定编码网格中是否存在非流形结构,例如,如果编码网格中不存在非流形结构,即新增顶点数量为0,将非流形标识置为0,不需要再编码新增顶点信息;如果编码网格中存在非流形结构,即新增顶点数量大于0,将非流形标识置为1(即上述第三标识),然后编码新增顶点的索引信息和对应的原非流形顶点的索引信息。在编码时,需要按照一定规则保持新增顶点与原非流形顶点之间的对应关系。例如,可以将新增顶点的索引信息与原非流形顶点的索引信息交错编码;也可以按照相同的顺序将新增顶点的索引信息与原非流形顶点的索引信息分别编码到两路码流,通过编码顺序来保持新增顶点与原非流形顶
点之间的对应关系。本实施例对保持新增顶点与原非流形顶点之间的对应关系的具体实现不进行限定。
可选地,非流形顶点索引信息包括几何顶点索引信息和属性顶点索引信息两部分。可选地,编码非流形顶点索引信息主要分为两步:第一步是记录几何顶点在几何编码顺序中的位置和属性顶点在属性编码顺序中的位置;第二步是对几何顶点的几何信息位置和属性顶点的属性信息位置进行熵编码,得到非流形信息码流。此处,除了直接熵编码非流形顶点的索引信息外,当新增顶点和原非流形顶点一一对应时,还可以编码用于表征顶点是否是新增顶点的标识和用于表征顶点是否是原非流形顶点的标识,来表示新增顶点索引信息和非流形顶点索引信息之间的对应关系。本实施例对具体的编码方式不进行限定。
可选地,非流形信息码流在总码流中可以有多种存放方式:一种是将非流形信息码流作为单独的一路子码流;另一种是将非流形几何顶点的索引信息的码流存放到几何信息码流中,将非流形属性顶点的索引信息的码流存放到属性信息码流中;或者,还可以将非流形几何顶点的索引信息的码流和非流形属性顶点的索引信息的码流作为两路子码流分别存放到总码流中。本实施例对非流形信息码流在总码流中的存放方式不进行限定。
7、重复点信息编码模块。其输入为重复点索引及其所在面的索引、连接关系编码顺序和几何编码顺序,输出为重复点信息码流。
首先,编码是否编码重复点信息标识,在无损编码的情况下,将该标识设为1(即上述第一标识),表示需要编码重复点信息。如果需要编码重复点信息,对每一个重复点编码三项信息:编码重复点在几何编码顺序中的序号、编码该重复点所在面的数量、依次编码每一个重复点所在面在连接关系编码顺序中的序号。遍历所有重复点,生成重复点信息码流。
最后,将各路码流进行混流后形成网格的编码码流。
在一些实施例中,如图9所示,解码端的解码框架中主要包括连接关系解码模块、几何信息解码模块、属性信息解码模块、非流形顶点信息解码模块、重建流形网格模块、恢复非流形结构模块、重复点信息解码模块以及恢复重复点模块等。该解码框架可以实现对三维网格的无损压缩,具体进行的解码操作包括如下过程:
1)将码流分解成几何信息码流、连接关系码流,属性信息码流和纹理图码流,然后分别对这些子码流进行解码。
2)熵解码连接关系码流,得到模式字符串。并重建连接关系。
3)解码网格的几何信息,使用与编码端相对应的解码方法。
4)解码网格的UV坐标,使用与编码端相对应的解码方法。
5)解码是否存在非流形结构的标识,若存在,则进一步解码得到的新添加顶点的索引和与其对应的原非流形顶点的索引。将新添加的顶点与原非流形顶点进行合并,并调整连接关系,恢复网格中的非流形结构。
6)解码是否编码重复点信息的标识,若存在,则解码重复点信息,回复重复点和重
复点的连接关系。
7)解码纹理图码流,使用各路解码信息重建三维网格。
以下对上述各模块在编码过程中的处理过程进行详细说明。
1、连接关系解码模块。其输入为待解码的连接关系码流,输出为流形网格的连接关系和解码的顶点顺序(即连接关系解码顺序)。
可选地,先对连接关系子码流进行解码得到模式字符串。按照某种顺序(正序或逆序)遍历模式字符串,根据字符串中相对应的模式来重建连接关系。此外,将顶点的遍历顺序(即连接关系解码顺序)输出至几何信息解码模块和属性信息解码模块。
2、几何信息解码模块。其输入为几何信息码流和连接关系解码顺序,输出为流形网格的几何信息。
网格几何坐标的解码过程是编码过程的逆过程:先熵解码出坐标预测残差。再根据已解码三角形按照平行四边法则预测出待解码点的预测坐标。将预测坐标加上熵解码出的残差值即可得到待解码的几何坐标位置。这里的顶点遍历顺序(即几何解码顺序)与编码几何信息的顶点顺序相同。应理解,初始三角形的几何坐标不使用预测编码,而是直接编码它们的几何坐标值。在解码端解码出该三角形的几何坐标后作为初始三角形开始遍历解码其他三角形顶点的几何坐标。另外,此处还可能使用其他解码方法,不强调具体的解码方法,只要与编码端对应即可。
3、属性信息解码模块。其输入为属性信息码流和连接关系解码顺序,输出为流形网格重建的属性信息。
以UV坐标为例,UV坐标与编码端对应的解码方法,此处不强调具体的解码方法。下面描述使用相似三角形预测算法的解码过程。
解码UV坐标步骤如下:
(1)熵解码UV坐标码流。
(2)解码初始三角形三个顶点的UV坐标,这里不计算预测值,初始三角形是直接编码其UV坐标而不是编码残差。将初始三角形边存入边集合中。
(3)按照存取准则从集合中选取边τ,解码与τ组成的新三角形对顶点的UV坐标。先利用三角形三维到二维的映射关系,与编码端一致的计算方式计算待解码点的UV坐标预测值。再将预测值与熵解码的残差相加,得到重建UV坐标。
(4)将新三角形的两条边加入边集合中,移除集合顶部的边τ。从集合中取出下一条边,继续解码该边邻接三角形的对顶点UV坐标,返回步骤3,直到所有顶点的UV坐标解码完成。
4、非流形顶点信息解码模块。其输入为非流形顶点信息码流、几何解码顺序和属性解码顺序,输出为非流形标识、新增顶点索引和原非流形顶点索引。
首先,解码得到网格中是否存在非流形结构的标识,如果标识为0,则不需要解码非流形顶点索引信息,并跳过后续恢复非流形结构的模块;如果标识为1,则解码非流形顶
点索引信息。
非流形顶点索引信息解码采用与编码端相对应的方法,首先熵解码得到非流形顶点在几何解码顺序和属性解码顺序中的位置,然后记录非流形顶点在解码端的索引。输出新增顶点索引和原非流形顶点索引到恢复非流形结构模块。
5、重建流形网格模块。其输入为流形网格的连接关系、流形网格的几何信息、流形网格的属性信息,输出为流形网格。
其中,利用流形网格的连接关系、几何信息、属性信息,可以直接重建得到流形网格。
6、恢复非流形结构模块。其输入为流形网格、新增顶点的索引和原非流形顶点索引,输出为重建非流型网格。
其中,非流形边与非流形点的恢复过程是相同的。首先,遍历新增顶点索引信息和对应的原非流形顶点索引信息,将连接关系中新增顶点的索引值更新为原非流形顶点的索引值。然后,在流形网格的顶点中删除新增顶点,即可得到重建的非流形网格。
7、重复点信息解码模块。其输入为重复点信息码流、几何解码顺序和连接关系解码顺序,输出为重复点索引及其所在面的索引。
可选地,首先解码得到网格中是否存在重复点信息的标识,如果标识为0,则不需要解码重复点信息,并跳过后续恢复重复点的模块;如果标识为1,则解码重复点信息。
重复点信息解码采用与编码端相对应的方法。对于每一个重复点,首先熵解码得到重复点在几何解码顺序中的位置,然后记录重复点在解码端的索引。然后,解码该重复点所在面的数量,并依次解码每个面片在连接关系解码顺序中的位置,记录每个面片在解码端的索引。输出每一个重复点索引及其所在面的索引到恢复重复点模块。
8、恢复重复点模块。其输入为重建非流形网格、重复点索引及其所在面的索引,输出为重建网格。
可选地,在重建网格中,为每一个重复点创建一个新的顶点,新顶点的几何坐标等于重复点索引所指向顶点的几何坐标。然后,调整连接关系,根据该重复点所在面的索引,查找该重复点所在的面,将这些面中重复点索引更新为新顶点的索引。遍历所有重复点,进行相同的操作,最终得到重建网格。
参照图10,本申请实施例提供了一种网格解码方法,应用于解码端,如图10所示,该网格解码方法包括:
步骤1001,根据第一网格的目标码流获取第一码流和第一重复点的重复点信息码流;
步骤1002,对所述第一码流进行解码获得第二网格,所述第一重复点为所述第二网格中的几何顶点,且所述第一重复点基于所述第一网格中至少两个重复点合并得到,所述重复点信息包括重复点的索引和重复点所在面的索引;
步骤1003,在所述重复点信息码流包括第一标识的情况下,基于几何解码顺序和连接关系解码顺序对所述重复点信息码流进行解码获得所述第一重复点的重复点信息,所述第一标识用于表示编码端进行了重复点滤除的第一标识,所述几何解码顺序和所述连接关
系解码顺序基于所述第二网格的解码过程确定;
步骤1004,基于所述第一重复点的重复点信息对所述第二网格中的所述第一重复点进行恢复,获得所述第一网格。
可选地,所述基于所述第一重复点的重复点信息对所述第二网格中的所述第一重复点进行恢复,获得所述第一网格包括:
基于所述第一重复点的重复点的索引和重复点所在面的索引,在所述第二网格中添加所述第一重复点,并恢复所述第一重复点与第二网格中的几何顶点的连接关系,得到所述第一网格。
可选地,所述对所述第一码流进行解码获得第二网格包括:
确定所述第一码流包含的第一子码流和第二子码流;
对所述第一子码流进行解码获得流形网格;
在所述第二子码流包括第三标识的情况下,基于所述几何解码顺序和所述连接关系解码顺序对所述第二子码流进行解码获得非流形信息,所述第三标识用于表示编码端进行了所述非流形结构拆分;
利用所述非流形信息恢复所述流形网格中的非流形结构,获得所述第二网格。
可选地,所述流形网格包括第一流形网格和第二流形网格,所述第一流形网格包括第一顶点,所述第二流形网格包括第二顶点,所述第一顶点和所述第二顶点为重复点,所述非流形信息包括所述第一顶点的索引信息和所述第二顶点的索引信息,所述利用所述非流形信息恢复所述流形网格中的非流形结构,获得所述第二网格包括:
基于所述第一顶点的索引信息和所述第二顶点的索引信息对所述第一顶点和第二顶点进行合并处理,并更新所述第二流形网格的连接关系信息,得到所述第二网格,所述第二网格包括所述第一流形网格和由所述第二流形网格转换的第一非流形网格,且所述第一流形网格和第一非流形网格通过所述非流形结构连接。
可选地,所述索引信息包括几何索引和属性索引。
可选地,所述对所述第一子码流进行解码获得流形网格包括:
对所述第一子码流进行解码,得到几何信息、属性信息和第二连接关系信息;
基于所述几何信息、属性信息和第二连接关系信息重建所述流形网格;
其中,所述第一子码流包括所述几何信息对应的几何信息码流、所述属性信息对应的属性信息码流和所述第二连接关系信息对应的关系信息码流,所述第二连接关系信息用于表征所述流形网格的顶点的连接关系。
需要说明的是,本申请实施例提供的网格编码方法,执行主体可以为网格编码装置,或者,该网格编码装置中的用于执行网格编码的方法的控制模块。本申请实施例中以网格编码装置执行网格编码的方法为例,说明本申请实施例提供的网格编码装置。
请参见图11,图11是本申请实施例提供的一种网格编码装置的结构图,如图11所示,网格编码装置1100包括:
滤除模块1101,用于对待编码的第一网格进行重复点滤除,获得第二网格和第一重复点的重复点信息,所述第一重复点为所述第二网格中的几何顶点,且所述第一重复点基于所述第一网格中至少两个重复点合并得到,所述重复点信息包括重复点的索引和重复点所在面的索引;
第一编码模块1102,用于对所述第二网格进行编码得到第一码流;
第二编码模块1103,用于基于几何编码顺序和连接关系编码顺序对第一重复点的重复点信息进行编码得到重复点信息码流,所述重复点信息码流中携带有用于表示编码端进行了重复点滤除的第一标识,所述几何编码顺序和所述连接关系编码顺序基于所述第二网格的编码过程确定;
确定模块1104,用于基于所述重复点信息码流和所述第一码流确定所述第一网格的目标码流。
可选地,所述滤除模块具体用于执行以下操作:
在所述第一网格中的N个重复点进行合并未产生新的非流形结构的情况下,将所述N个重复点合并为所述第一重复点;
在所述第一网格中的N个重复点进行合并产生新的非流形结构的情况下,取消所述N个重复点的合并,或者,将所述N个重复点合并为所述第一重复点,并生成第一信息,所述第一信息包括第二标识、将所述N个重复点合并为所述第一重复点之前的流形结构的顶点信息和顶点之间的连接关系信息,所述第一信息用于进行非流形结构拆分时,得到与将所述N个重复点合并为所述第一重复点之前相同的流形结构;
其中,N为大于1的整数。
可选地,所述第一编码模块包括:
拆分单元,用于在所述第二网格存在非流形结构的情况下,对所述非流形结构进行拆分处理得到非流形信息和流形网格;
第一编码单元,用于对所述流形网格进行编码,获得第一子码流;
第二编码单元,用于基于所述几何编码顺序和属性编码顺序对非流形信息进行编码获得第二子码流,所述第二子码流中携带有用于表示编码端进行了所述非流形结构拆分的第三标识,所述属性编码顺序基于所述流形网格的编码过程确定;
其中,所述第一码流包括所述第一子码流和所述第二子码流。
可选地,所述第二网格包括第一流形网格和第一非流形网格,所述第一流形网格和第一非流形网格通过所述非流形结构连接,所述非流形结构包括第一顶点,所述拆分单元具体用于执行以下操作:
建立第二顶点,所述第二顶点与所述第一顶点为重复点,所述第二顶点的几何索引与所述第一顶点的几何索引不同;
基于所述第二顶点对所述第二网格中的非流形结构进行拆分处理,获得所述非流形信息和流形网格,所述流形网格包括所述第一流形网格和由所述第一非流形网格转换的第二
流形网格,所述非流形信息包括所述第一顶点的索引信息和所述第二顶点的索引信息。
可选地,所述索引信息包括几何索引和属性索引。
可选地,所述拆分单元具体用于将第一连接关系信息中的第一顶点的索引,更新为所述第二顶点的索引,所述第一连接关系信息用于表征所述第一非流形网格的顶点的连接关系。
可选地,所述第一编码子单元具体用于执行以下操作:
对所述流形网格的几何信息进行编码,得到几何信息码流;
对所述流形网格的属性信息进行编码,得到属性信息码流;
对所述流形网格的第二连接关系信息进行编码,得到连接关系信息码流;
其中,所述第一子码流包括所述几何信息码流、所述属性信息码流及所述连接关系信息码流,所述第二连接关系信息用于表征所述流形网格的顶点的连接关系。
请参见图12,图12是本申请实施例提供的一种网格解码装置的结构图,如图12所示,网格解码装置1200包括:
获取模块1201,用于根据第一网格的目标码流获取第一码流和第一重复点的重复点信息码流;
第一解码模块1202,用于对所述第一码流进行解码获得第二网格,所述第一重复点为所述第二网格中的几何顶点,且所述第一重复点基于所述第一网格中至少两个重复点合并得到,所述重复点信息包括重复点的索引和重复点所在面的索引;
第二解码模块1203,用于在所述重复点信息码流包括第一标识的情况下,基于几何解码顺序和连接关系解码顺序对所述重复点信息码流进行解码获得所述第一重复点的重复点信息,所述第一标识用于表示编码端进行了重复点滤除的第一标识,所述几何解码顺序和所述连接关系解码顺序基于所述第二网格的解码过程确定;
恢复模块1204,用于基于所述第一重复点的重复点信息对所述第二网格中的所述第一重复点进行恢复,获得所述第一网格。
可选地,所述基于所述第一重复点的重复点信息对所述第二网格中的所述第一重复点进行恢复,获得所述第一网格包括:
基于所述第一重复点的重复点的索引和重复点所在面的索引,在所述第二网格中添加所述第一重复点,并恢复所述第一重复点与第二网格中的几何顶点的连接关系,得到所述第一网格。
可选地,所述第一解码模块1202包括:
确定单元,用于确定所述第一码流包含的第一子码流和第二子码流;
第一解码单元,用于对所述第一子码流进行解码获得流形网格;
第二解码单元,用于在所述第二子码流包括第三标识的情况下,基于所述几何解码顺序和所述连接关系解码顺序对所述第二子码流进行解码获得非流形信息,所述第三标识用于表示编码端进行了所述非流形结构拆分;
恢复单元,用于利用所述非流形信息恢复所述流形网格中的非流形结构,获得所述第二网格。
可选地,所述流形网格包括第一流形网格和第二流形网格,所述第一流形网格包括第一顶点,所述第二流形网格包括第二顶点,所述第一顶点和所述第二顶点为重复点,所述非流形信息包括所述第一顶点的索引信息和所述第二顶点的索引信息,所述恢复单元具体用于执行以下操作:
基于所述第一顶点的索引信息和所述第二顶点的索引信息对所述第一顶点和第二顶点进行合并处理,并更新所述第二流形网格的连接关系信息,得到所述第二网格,所述第二网格包括所述第一流形网格和由所述第二流形网格转换的第一非流形性网格,且所述第一流形网格和第一非流形网格通过所述非流形结构连接。
可选地,所述索引信息包括几何索引和属性索引。
可选地,所述第一解码单元具体用于执行以下操作:
对所述第一子码流进行解码,得到几何信息、属性信息和第二连接关系信息;
基于所述几何信息、属性信息和第二连接关系信息重建所述流形网格;
其中,所述第一子码流包括所述几何信息对应的几何信息码流、所述属性信息对应的属性信息码流和所述第二连接关系信息对应的关系信息码流,所述第二连接关系信息用于表征所述流形网格的顶点的连接关系。
本申请实施例中的网格编码装置和网格解码装置可以是电子设备,例如具有操作系统的电子设备,也可以是电子设备中的部件,例如集成电路或芯片。该电子设备可以是终端,也可以为除终端之外的其他设备。示例性的,终端可以包括但不限于上述所列举的终端11的类型,其他设备可以为服务器、网络附属存储器(Network Attached Storage,NAS)等,本申请实施例不作具体限定。
本申请实施例提供的网格编码装置和网格解码装置能够实现图2至图10的方法实施例实现的各个过程,并达到相同的技术效果,为避免重复,这里不再赘述。
可选地,如图13所示,本申请实施例还提供一种通信设备1300,包括处理器1301和存储器1302,存储器1302上存储有可在所述处理器1301上运行的程序或指令,例如,该通信设备1300为编码端设备时,该程序或指令被处理器1301执行时实现上述网格编码方法实施例的各个步骤,且能达到相同的技术效果。该通信设备1300为解码端设备时,该程序或指令被处理器1301执行时实现上述网格解码方法实施例的各个步骤,且能达到相同的技术效果,为避免重复,这里不再赘述。
本申请实施例还提供一种终端,包括处理器和通信接口,
在所述终端为编码端时,所述处理器用于对待编码的第一网格进行重复点滤除,获得第二网格和第一重复点的重复点信息,所述第一重复点为所述第二网格中的几何顶点,且所述第一重复点基于所述第一网格中至少两个重复点合并得到,所述重复点信息包括重复点的索引和重复点所在面的索引;对所述第二网格进行编码得到第一码流;基于几何编码
顺序和连接关系编码顺序对第一重复点的重复点信息进行编码得到重复点信息码流,所述重复点信息码流中携带有用于表示编码端进行了重复点滤除的第一标识,所述几何编码顺序和所述连接关系编码顺序基于所述第二网格的编码过程确定;基于所述重复点信息码流和所述第一码流确定所述第一网格的目标码流;
或者,在所述终端为解码端时,所述处理器用于根据第一网格的目标码流获取第一码流和第一重复点的重复点信息码流;对所述第一码流进行解码获得第二网格,所述第一重复点为所述第二网格中的几何顶点,且所述第一重复点基于所述第一网格中至少两个重复点合并得到,所述重复点信息包括重复点的索引和重复点所在面的索引;在所述重复点信息码流包括第一标识的情况下,基于几何解码顺序和连接关系解码顺序对所述重复点信息码流进行解码获得所述第一重复点的重复点信息,所述第一标识用于表示编码端进行了重复点滤除的第一标识,所述几何解码顺序和所述连接关系解码顺序基于所述第二网格的解码过程确定;基于所述第一重复点的重复点信息对所述第二网格中的所述第一重复点进行恢复,获得所述第一网格。
该终端实施例与上述终端侧方法实施例对应,上述方法实施例的各个实施过程和实现方式均可适用于该终端实施例中,且能达到相同的技术效果。具体地,图14为实现本申请实施例的一种终端的硬件结构示意图。
该终端1400包括但不限于:射频单元1401、网络模块1402、音频输出单元1403、输入单元1404、传感器1405、显示单元1406、用户输入单元1407、接口单元1408、存储器1409以及处理器1410等中的至少部分部件。
本领域技术人员可以理解,终端1400还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器1410逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图14中示出的终端结构并不构成对终端的限定,终端可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。
应理解的是,本申请实施例中,输入单元1404可以包括图形处理单元(Graphics Processing Unit,GPU)14041和麦克风14042,图形处理器14041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元1406可包括显示面板14061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板14061。用户输入单元1407包括触控面板14071以及其他输入设备14072中的至少一种。触控面板14071,也称为触摸屏。触控面板14071可包括触摸检测装置和触摸控制器两个部分。其他输入设备14072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。
本申请实施例中,射频单元1401接收来自网络侧设备的下行数据后,可以传输给处理器1410进行处理;另外,射频单元1401可以向网络侧设备发送上行数据。通常,射频单元1401包括但不限于天线、放大器、收发信机、耦合器、低噪声放大器、双工器等。
存储器1409可用于存储软件程序或指令以及各种数据。存储器1409可主要包括存储程序或指令的第一存储区和存储数据的第二存储区,其中,第一存储区可存储操作系统、至少一个功能所需的应用程序或指令(比如声音播放功能、图像播放功能等)等。此外,存储器1409可以包括易失性存储器或非易失性存储器,或者,存储器1409可以包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(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)。本申请实施例中的存储器1409包括但不限于这些和任意其它适合类型的存储器。
处理器1410可包括一个或多个处理单元;可选的,处理器1410集成应用处理器和调制解调处理器,其中,应用处理器主要处理涉及操作系统、用户界面和应用程序等的操作,调制解调处理器主要处理无线通信信号,如基带处理器。可以理解的是,上述调制解调处理器也可以不集成到处理器1410中。
其中,在所述终端为编码端时,所述处理器1410用于对待编码的第一网格进行重复点滤除,获得第二网格和第一重复点的重复点信息,所述第一重复点为所述第二网格中的几何顶点,且所述第一重复点基于所述第一网格中至少两个重复点合并得到,所述重复点信息包括重复点的索引和重复点所在面的索引;对所述第二网格进行编码得到第一码流;基于几何编码顺序和连接关系编码顺序对第一重复点的重复点信息进行编码得到重复点信息码流,所述重复点信息码流中携带有用于表示编码端进行了重复点滤除的第一标识,所述几何编码顺序和所述连接关系编码顺序基于所述第二网格的编码过程确定;基于所述重复点信息码流和所述第一码流确定所述第一网格的目标码流;
或者,在所述终端为解码端时,所述处理器1410用于根据第一网格的目标码流获取第一码流和第一重复点的重复点信息码流;对所述第一码流进行解码获得第二网格,所述第一重复点为所述第二网格中的几何顶点,且所述第一重复点基于所述第一网格中至少两个重复点合并得到,所述重复点信息包括重复点的索引和重复点所在面的索引;在所述重复点信息码流包括第一标识的情况下,基于几何解码顺序和连接关系解码顺序对所述重复点信息码流进行解码获得所述第一重复点的重复点信息,所述第一标识用于表示编码端进行了重复点滤除的第一标识,所述几何解码顺序和所述连接关系解码顺序基于所述第二网格的解码过程确定;基于所述第一重复点的重复点信息对所述第二网格中的所述第一重复点进行恢复,获得所述第一网格。
本申请实施例提供的终端能够实现图2至或10的方法实施例实现的各个过程,并达到相同的技术效果,为避免重复,这里不再赘述。
本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述网格编码方法实施例的各个过程,或者,该程序或指令被处理器执行时实现上述网格解码方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
其中,所述处理器为上述实施例中所述的终端中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器ROM、随机存取存储器RAM、磁碟或者光盘等。
本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述网格编码方法或网格解码方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
应理解,本申请实施例提到的芯片还可以称为系统级芯片,系统芯片,芯片系统或片上系统芯片等。
本申请实施例另提供了一种计算机程序/程序产品,所述计算机程序/程序产品被存储在存储介质中,所述计算机程序/程序产品被至少一个处理器执行以实现上述网格编码方法或网格解码方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
本申请实施例还提供了一种视频编解码系统,包括:编码端设备及解码端设备,所述编码端设备用于执行如图2及上述编码端设备各个方法实施例的各个过程,所述解码端设备用于执行如图10及上述各个方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以计算机软件产品的形式体现出来,该计算机软件产品存储在一个存储介质
(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。
Claims (19)
- 一种网格编码方法,包括:对待编码的第一网格进行重复点滤除,获得第二网格和第一重复点的重复点信息,所述第一重复点为所述第二网格中的几何顶点,且所述第一重复点基于所述第一网格中至少两个重复点合并得到,所述重复点信息包括重复点的索引和重复点所在面的索引;对所述第二网格进行编码得到第一码流;基于几何编码顺序和连接关系编码顺序对第一重复点的重复点信息进行编码得到重复点信息码流,所述重复点信息码流中携带有用于表示编码端进行了重复点滤除的第一标识,所述几何编码顺序和所述连接关系编码顺序基于所述第二网格的编码过程确定;基于所述重复点信息码流和所述第一码流确定所述第一网格的目标码流。
- 根据权利要求1所述的方法,其中,所述对待编码的第一网格进行重复点滤除,获得第二网格和第一重复点的重复点信息包括:在所述第一网格中的N个重复点进行合并未产生新的非流形结构的情况下,将所述N个重复点合并为所述第一重复点;在所述第一网格中的N个重复点进行合并产生新的非流形结构的情况下,取消所述N个重复点的合并,或者,将所述N个重复点合并为所述第一重复点,并生成第一信息,所述第一信息包括第二标识、将所述N个重复点合并为所述第一重复点之前的流形结构的顶点信息和顶点之间的连接关系信息,所述第一信息用于进行非流形结构拆分时,得到与将所述N个重复点合并为所述第一重复点之前相同的流形结构;其中,N为大于1的整数。
- 根据权利要求1或2所述的方法,其中,对所述第二网格进行编码得到第一码流包括:在所述第二网格存在非流形结构的情况下,对所述非流形结构进行拆分处理得到非流形信息和流形网格;对所述流形网格进行编码,获得第一子码流;基于所述几何编码顺序和属性编码顺序对非流形信息进行编码获得第二子码流,所述第二子码流中携带有用于表示编码端进行了所述非流形结构拆分的第三标识,所述属性编码顺序基于所述流形网格的编码过程确定;其中,所述第一码流包括所述第一子码流和所述第二子码流。
- 根据权利要求3所述的方法,其中,所述第二网格包括第一流形网格和第一非流形网格,所述第一流形网格和第一非流形网格通过所述非流形结构连接,所述非流形结构包括第一顶点,所述对所述非流形结构进行拆分处理得到非流形信息和流形网格包括:建立第二顶点,所述第二顶点与所述第一顶点为重复点,所述第二顶点的几何索引与所述第一顶点的几何索引不同;基于所述第二顶点对所述第二网格中的非流形结构进行拆分处理,获得所述非流形信息和流形网格,所述流形网格包括所述第一流形网格和由所述第一非流形网格转换的第二流形网格,所述非流形信息包括所述第一顶点的索引信息和所述第二顶点的索引信息。
- 根据权利要求4所述的方法,其中,所述索引信息包括几何索引和属性索引。
- 根据权利要求4所述的方法,其中,所述基于所述第二顶点对所述第二网格中的非流形结构进行拆分处理包括:将第一连接关系信息中的第一顶点的索引,更新为所述第二顶点的索引,所述第一连接关系信息用于表征所述第一非流形网格的顶点的连接关系。
- 根据权利要求3至6任一项所述的方法,其中,所述对所述流形网格进行编码,获得第一子码流包括:对所述流形网格的几何信息进行编码,得到几何信息码流;对所述流形网格的属性信息进行编码,得到属性信息码流;对所述流形网格的第二连接关系信息进行编码,得到连接关系信息码流;其中,所述第一子码流包括所述几何信息码流、所述属性信息码流及所述连接关系信息码流,所述第二连接关系信息用于表征所述流形网格的顶点的连接关系。
- 一种网格解码方法,包括:根据第一网格的目标码流获取第一码流和第一重复点的重复点信息码流;对所述第一码流进行解码获得第二网格,所述第一重复点为所述第二网格中的几何顶点,且所述第一重复点基于所述第一网格中至少两个重复点合并得到,所述重复点信息包括重复点的索引和重复点所在面的索引;在所述重复点信息码流包括第一标识的情况下,基于几何解码顺序和连接关系解码顺序对所述重复点信息码流进行解码获得所述第一重复点的重复点信息,所述第一标识用于表示编码端进行了重复点滤除的第一标识,所述几何解码顺序和所述连接关系解码顺序基于所述第二网格的解码过程确定;基于所述第一重复点的重复点信息对所述第二网格中的所述第一重复点进行恢复,获得所述第一网格。
- 根据权利要求8所述的方法,其中,所述基于所述第一重复点的重复点信息对所述第二网格中的所述第一重复点进行恢复,获得所述第一网格包括:基于所述第一重复点的重复点的索引和重复点所在面的索引,在所述第二网格中添加所述第一重复点,并恢复所述第一重复点与第二网格中的几何顶点的连接关系,得到所述第一网格。
- 根据权利要求8或9所述的方法,其中,所述对所述第一码流进行解码获得第二网格包括:确定所述第一码流包含的第一子码流和第二子码流;对所述第一子码流进行解码获得流形网格;在所述第二子码流包括第三标识的情况下,基于所述几何解码顺序和所述连接关系解码顺序对所述第二子码流进行解码获得非流形信息,所述第三标识用于表示编码端进行了所述非流形结构拆分;利用所述非流形信息恢复所述流形网格中的非流形结构,获得所述第二网格。
- 根据权利要求10所述的方法,其中,所述流形网格包括第一流形网格和第二流形网格,所述第一流形网格包括第一顶点,所述第二流形网格包括第二顶点,所述第一顶点和所述第二顶点为重复点,所述非流形信息包括所述第一顶点的索引信息和所述第二顶点的索引信息,所述利用所述非流形信息恢复所述流形网格中的非流形结构,获得所述第二网格包括:基于所述第一顶点的索引信息和所述第二顶点的索引信息对所述第一顶点和第二顶点进行合并处理,并更新所述第二流形网格的连接关系信息,得到所述第二网格,所述第二网格包括所述第一流形网格和由所述第二流形网格转换的第一非流形性网格,且所述第一流形网格和第一非流形网格通过所述非流形结构连接。
- 根据权利要求11所述的方法,其中,所述索引信息包括几何索引和属性索引。
- 根据权利要求10至12任一项所述的方法,其中,所述对所述第一子码流进行解码获得流形网格包括:对所述第一子码流进行解码,得到几何信息、属性信息和第二连接关系信息;基于所述几何信息、属性信息和第二连接关系信息重建所述流形网格;其中,所述第一子码流包括所述几何信息对应的几何信息码流、所述属性信息对应的属性信息码流和所述第二连接关系信息对应的关系信息码流,所述第二连接关系信息用于表征所述流形网格的顶点的连接关系。
- 一种网格编码装置,包括:滤除模块,用于对待编码的第一网格进行重复点滤除,获得第二网格和第一重复点的重复点信息,所述第一重复点为所述第二网格中的几何顶点,且所述第一重复点基于所述第一网格中至少两个重复点合并得到,所述重复点信息包括重复点的索引和重复点所在面的索引;第一编码模块,用于对所述第二网格进行编码得到第一码流;第二编码模块,用于基于几何编码顺序和连接关系编码顺序对第一重复点的重复点信息进行编码得到重复点信息码流,所述重复点信息码流中携带有用于表示编码端进行了重复点滤除的第一标识,所述几何编码顺序和所述连接关系编码顺序基于所述第二网格的编码过程确定;确定模块,用于基于所述重复点信息码流和所述第一码流确定所述第一网格的目标码流。
- 一种网格解码装置,包括:获取模块,用于根据第一网格的目标码流获取第一码流和第一重复点的重复点信息码 流;第一解码模块,用于对所述第一码流进行解码获得第二网格,所述第一重复点为所述第二网格中的几何顶点,且所述第一重复点基于所述第一网格中至少两个重复点合并得到,所述重复点信息包括重复点的索引和重复点所在面的索引;第二解码模块,用于在所述重复点信息码流包括第一标识的情况下,基于几何解码顺序和连接关系解码顺序对所述重复点信息码流进行解码获得所述第一重复点的重复点信息,所述第一标识用于表示编码端进行了重复点滤除的第一标识,所述几何解码顺序和所述连接关系解码顺序基于所述第二网格的解码过程确定;恢复模块,用于基于所述第一重复点的重复点信息对所述第二网格中的所述第一重复点进行恢复,获得所述第一网格。
- 一种电子设备,包括处理器,存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如权利要求1至7任一项所述的网格编码方法的步骤;或者,所述程序或指令被所述处理器执行时实现如权利要求8至13任一项所述的网格解码方法的步骤。
- 一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如权利要求1至7任一项所述的网格编码方法的步骤,或者,所述程序或指令被处理器执行时实现如权利要求9至13任一项所述的网格解码方法的步骤。
- 一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如权利要求1至7任一项所述的网格编码方法的步骤,或实现如权利要求9至13任一项所述的网格解码方法的步骤。
- 一种计算机程序产品,所述计算机程序产品被存储在存储介质中,所述计算机程序产品被至少一个处理器执行以实现如权利要求1至7任一项所述的网格编码方法的步骤,或实现如权利要求9至13任一项所述的网格解码方法的步骤。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211291817.XA CN117956174A (zh) | 2022-10-19 | 2022-10-19 | 网格编码方法、装置、通信设备及可读存储介质 |
CN202211291817.X | 2022-10-19 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2024083043A1 true WO2024083043A1 (zh) | 2024-04-25 |
Family
ID=90736907
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2023/124488 WO2024083043A1 (zh) | 2022-10-19 | 2023-10-13 | 网格编码方法、装置、通信设备及可读存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN117956174A (zh) |
WO (1) | WO2024083043A1 (zh) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090278844A1 (en) * | 2007-01-11 | 2009-11-12 | Eun Young Chang | Method and apparatus for encoding/decoding 3d mesh information including stitching information |
GB2552510A (en) * | 2016-07-26 | 2018-01-31 | Canon Kk | Mesh partitioning and merging methods |
US20180253867A1 (en) * | 2017-03-06 | 2018-09-06 | Canon Kabushiki Kaisha | Encoding and decoding of texture mapping data in textured 3d mesh models |
CN111512342A (zh) * | 2017-12-22 | 2020-08-07 | 三星电子株式会社 | 在点云压缩中处理重复点的方法和装置 |
-
2022
- 2022-10-19 CN CN202211291817.XA patent/CN117956174A/zh active Pending
-
2023
- 2023-10-13 WO PCT/CN2023/124488 patent/WO2024083043A1/zh unknown
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090278844A1 (en) * | 2007-01-11 | 2009-11-12 | Eun Young Chang | Method and apparatus for encoding/decoding 3d mesh information including stitching information |
GB2552510A (en) * | 2016-07-26 | 2018-01-31 | Canon Kk | Mesh partitioning and merging methods |
US20180253867A1 (en) * | 2017-03-06 | 2018-09-06 | Canon Kabushiki Kaisha | Encoding and decoding of texture mapping data in textured 3d mesh models |
CN111512342A (zh) * | 2017-12-22 | 2020-08-07 | 三星电子株式会社 | 在点云压缩中处理重复点的方法和装置 |
Also Published As
Publication number | Publication date |
---|---|
CN117956174A (zh) | 2024-04-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108810571A (zh) | 编码和解码二维点云的方法和设备 | |
JP2015504545A (ja) | 予測位置符号化 | |
RU2767771C1 (ru) | Способ и оборудование для кодирования/декодирования облака точек, представляющего трехмерный объект | |
CN115471627A (zh) | 点云的几何信息编码处理方法、解码处理方法及相关设备 | |
WO2024140568A1 (zh) | 图像处理方法、装置、电子设备及可读存储介质 | |
US20240121439A1 (en) | Point cloud attribute information encoding method and apparatus, point cloud attribute information decoding method and apparatus, and related device | |
CN115176279A (zh) | 用于点云译码的方法和装置 | |
WO2024083043A1 (zh) | 网格编码方法、装置、通信设备及可读存储介质 | |
WO2023179710A1 (zh) | 编码方法及终端 | |
WO2024083039A1 (zh) | 网格编码方法、网格解码方法及相关设备 | |
WO2024001953A1 (zh) | 无损编码方法、无损解码方法、装置及设备 | |
WO2024017008A1 (zh) | 编码、解码方法、装置及设备 | |
WO2023155779A1 (zh) | 编码方法、解码方法、装置及通信设备 | |
WO2023246686A1 (zh) | 无损编码方法、无损解码方法、装置及设备 | |
WO2024188138A1 (zh) | 点云编码处理方法、点云解码处理方法及相关设备 | |
WO2024120431A1 (zh) | 点云编码方法、点云解码方法及相关设备 | |
WO2024007951A1 (zh) | 编码、解码方法、装置及设备 | |
WO2024193487A1 (zh) | 三维网格位移信息编码方法、解码方法、装置及终端 | |
WO2023173238A1 (zh) | 编解码方法、码流、编码器、解码器以及存储介质 | |
WO2024149141A1 (zh) | 点云编码方法、点云解码方法、装置及通信设备 | |
WO2024217304A1 (zh) | 三维网格位移信息编码方法、解码方法、装置及终端 | |
WO2024021089A1 (zh) | 编解码方法、码流、编码器、解码器以及存储介质 | |
WO2023173237A1 (zh) | 编解码方法、码流、编码器、解码器以及存储介质 | |
WO2023179706A1 (zh) | 编码方法、解码方法及终端 | |
WO2023098805A1 (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: 23879034 Country of ref document: EP Kind code of ref document: A1 |