EP-4738259-A1 - CODING METHOD, DECODING METHOD, APPARATUS, AND DEVICE
Abstract
This application discloses an encoding method and apparatus, a decoding method and apparatus, and a device, pertaining to the field of encoding and decoding technologies. The encoding method of embodiments of this application includes: performing, by an encoding end, splitting processing on a non-manifold structure in an original mesh to obtain a manifold mesh; adding, by the encoding end, non-manifold identification information to duplicate vertices in the manifold mesh, and determining index information of a first duplicate vertex in the duplicate vertices, where the non-manifold identification information is used to indicate whether the duplicate vertex is a duplicate vertex generated by performing splitting processing on the non-manifold structure, and the first duplicate vertex is a duplicate vertex generated by performing splitting processing on the non-manifold structure; and encoding, by the encoding end, the non-manifold identification information and the index information of the first duplicate vertex to obtain a first bitstream.
Inventors
- ZOU, Wenjie
- ZHANG, WEI
- YANG, FUZHENG
- LV, Zhuoyi
Assignees
- Vivo Mobile Communication Co., Ltd.
Dates
- Publication Date
- 20260506
- Application Date
- 20240624
Claims (20)
- An encoding method, comprising: performing, by an encoding end, splitting processing on a non-manifold structure in an original mesh to obtain a manifold mesh; adding, by the encoding end, non-manifold identification information to duplicate vertices in the manifold mesh, and determining index information of a first duplicate vertex in the duplicate vertices, wherein the non-manifold identification information is used to indicate whether the duplicate vertex is a duplicate vertex generated by performing splitting processing on the non-manifold structure, and the first duplicate vertex is a duplicate vertex generated by performing splitting processing on the non-manifold structure; and encoding, by the encoding end, the non-manifold identification information and the index information of the first duplicate vertex to obtain a first bitstream.
- The method according to claim 1, wherein the first bitstream further comprises encoding information of first indication information, and the first indication information is used to indicate whether a non-manifold structure is present in the original mesh.
- The method according to claim 1 or 2, wherein the method further comprises: encoding, by the encoding end, the manifold mesh to obtain a second bitstream; and obtaining, by the encoding end, a total bitstream of the original mesh based on the first bitstream and the second bitstream.
- The method according to claim 3, wherein the encoding, by the encoding end, the manifold mesh to obtain a second bitstream comprises: encoding, by the encoding end, second target information of the manifold mesh to obtain the second bitstream; wherein the second target information comprises a connection relationship, geometric information, and attribute information.
- The method according to any one of claims 1 to 4, wherein the first duplicate vertex comprises a geometric duplicate vertex and an attribute duplicate vertex; in a case that geometric vertices and attribute vertices in the manifold mesh have a same connection relationship, the geometric duplicate vertices and the attribute duplicate vertices share one group of non-manifold structure information, and the non-manifold structure information comprises non-manifold identification information and index information; or in a case that the geometric vertices and the attribute vertices in the manifold mesh have different connection relationships, the geometric duplicate vertices correspond to a first group of non-manifold structure information, the attribute duplicate vertices correspond to a second group of non-manifold structure information, and both the first group of non-manifold structure information and the second group of non-manifold structure information comprise non-manifold identification information and index information.
- The method according to claim 5, wherein the total bitstream of the original mesh further comprises: a third bitstream, wherein the third bitstream is obtained by encoding second indication information, and the second indication information is used to indicate whether the geometric vertices and the attribute vertices in the manifold mesh have a same connection relationship.
- The method according to any one of claims 1 to 6, wherein the total bitstream of the original mesh further comprises: a fourth bitstream, wherein the fourth bitstream is obtained by encoding third indication information of the duplicate vertices in the manifold mesh, and the third indication information is used to indicate whether geometric information and attribute information of the duplicate vertices are repeatedly encoded.
- The method according to claim 4, wherein in a case that the encoding end simultaneously encodes the connection relationship, the geometric information, and the attribute information, the total bitstream of the original mesh further comprises: a fifth bitstream, wherein the fifth bitstream is obtained by encoding fourth indication information of vertices in the manifold mesh, wherein the fourth indication information is used to indicate whether the vertices are duplicate vertices.
- A decoding method, comprising: decoding, by a decoding end, a first bitstream to obtain decoding information, wherein the decoding information comprises non-manifold identification information and index information of a first duplicate vertex, the first duplicate vertex is a duplicate vertex generated by performing splitting processing on a non-manifold structure in an original mesh, and the non-manifold identification information is used for indicating whether the duplicate vertex is a duplicate vertex generated by performing splitting processing on the non-manifold structure; and restoring, by the decoding end, the non-manifold structure in the original mesh based on the decoding information.
- The method according to claim 9, wherein the decoding information further comprises first indication information, and the first indication information is used to indicate whether a non-manifold structure is present in the original mesh; and the restoring, by the decoding end, the non-manifold structure in the original mesh based on the decoding information comprises: in a case that the first indication information indicates that a non-manifold structure is present in the original mesh, restoring the non-manifold structure in the original mesh based on the index information of the first duplicate vertex and the non-manifold identification information.
- The method according to claim 9 or 10, wherein the restoring the non-manifold structure in the original mesh based on the index information of the first duplicate vertex and the non-manifold identification information comprises: reconstructing a manifold mesh based on second target information of the manifold mesh, wherein the second target information is obtained by decoding a second bitstream, and the second target information comprises a connection relationship, geometric information, and attribute information; and restoring the non-manifold structure in the original mesh based on the reconstructed manifold mesh, the index information of the first duplicate vertex, and the non-manifold identification information.
- The method according to claim 11, wherein the restoring the non-manifold structure in the original mesh based on the reconstructed manifold mesh, the index information of the first duplicate vertex, and the non-manifold identification information comprises: restoring the non-manifold structure in the original mesh based on the reconstructed manifold mesh, the index information of the first duplicate vertex, the non-manifold identification information, and fourth indication information; wherein the fourth indication information is obtained by decoding a fifth bitstream, and the fourth indication information is used to indicate whether vertices in the manifold mesh are duplicate vertices.
- The method according to claim 11 or 12, further comprising: decoding, by the decoding end, the second bitstream to obtain the second target information of the manifold mesh.
- The method according to claim 13, wherein the decoding, by the decoding end, the second bitstream to obtain the second target information of the manifold mesh comprises: decoding the second bitstream based on third indication information of the duplicate vertices in the manifold mesh to obtain geometric information and attribute information of the manifold mesh; wherein the third indication information is obtained by decoding a fourth bitstream, and the third indication information is used to indicate whether geometric information and attribute information of the duplicate vertices are repeatedly encoded.
- The method according to any one of claims 9 to 14, wherein the first duplicate vertex comprises a geometric duplicate vertex and an attribute duplicate vertex; in a case that geometric vertices and attribute vertices in the manifold mesh have a same connection relationship, the geometric duplicate vertices and the attribute duplicate vertices share one group of non-manifold structure information, and the non-manifold structure information comprises non-manifold identification information and index information; or in a case that the geometric vertices and the attribute vertices in the manifold mesh have different connection relationships, the geometric duplicate vertices correspond to a first group of non-manifold structure information, the attribute duplicate vertices correspond to a second group of non-manifold structure information, and both the first group of non-manifold structure information and the second group of non-manifold structure information comprise non-manifold identification information and index information.
- The method according to claim 15, further comprising: decoding a third bitstream to obtain second indication information, wherein the second indication information is used to indicate whether the geometric vertices and the attribute vertices in the manifold mesh have a same connection relationship; and determining, based on the second indication information, whether the geometric vertices and the attribute vertices in the manifold mesh have a same connection relationship.
- An encoding apparatus, comprising: a first obtaining module, configured to perform splitting processing on a non-manifold structure in an original mesh to obtain a manifold mesh; a first processing module, configured to add non-manifold identification information to duplicate vertices in the manifold mesh, and determine index information of a first duplicate vertex in the duplicate vertices, wherein the non-manifold identification information is used to indicate whether the duplicate vertex is a duplicate vertex generated by performing splitting processing on the non-manifold structure, and the first duplicate vertex is a duplicate vertex generated by performing splitting processing on the non-manifold structure; and a second obtaining module, configured to encode the non-manifold identification information and the index information of the first duplicate vertex to obtain a first bitstream.
- A decoding apparatus, comprising: a fifth obtaining module, configured to decode a first bitstream to obtain decoding information, wherein the decoding information comprises non-manifold identification information and index information of a first duplicate vertex, the first duplicate vertex is a duplicate vertex generated by performing splitting processing on a non-manifold structure in an original mesh, and the non-manifold identification information is used for indicating whether the duplicate vertex is a duplicate vertex generated by performing splitting processing on the non-manifold structure; and a second processing module, configured to restore the non-manifold structure in the original mesh based on the decoding information.
- An electronic device, comprising a processor and a memory, wherein a program or instructions capable of running on the processor are stored in the memory, and when the program or instructions are executed by the processor, the steps of the encoding method according to any one of claims 1 to 8 are implemented; or the steps of the decoding method according to any one of claims 9 to 16 are implemented.
- A readable storage medium, wherein the readable storage medium stores a program or instructions, and when the program or instructions are executed by a processor, the steps of the encoding method according to any one of claims 1 to 8 or the steps of the decoding method according to according to any one of claims 9 to 16 are implemented.
Description
CROSS-REFERENCE TO RELATED APPLICATIONS This application claims priority to Chinese Patent Application No. 202310802552.3, filed in China on June 30, 2023, which is incorporated herein by reference in its entirety. TECHNICAL FIELD This application pertains to the field of encoding and decoding technologies, and specifically relates to an encoding method and apparatus, a decoding method and apparatus, and a device. BACKGROUND With the increasing demand for visual effects of three-dimensional mesh models, and emergence of many more advanced three-dimensional scanning technologies and three-dimensional modeling software, the data scale and complexity of three-dimensional mesh models obtained by three-dimensional scanning devices or three-dimensional modeling software are also rapidly growing. Therefore, how to efficiently encode three-dimensional mesh data is the key to implement convenient transmission, storage and processing of three-dimensional mesh data. In the related art, to achieve lossless encoding of three-dimensional meshes, when encoding a three-dimensional mesh containing a non-manifold structure, it is necessary to set one identifier to each vertex in a manifold mesh obtained by splitting the non-manifold structures to determine whether it is a point generated by splitting the non-manifold structures. When the number of vertices in the manifold mesh is large, this encoding method results in significant bit overheads, which is not conducive to efficiently achieving lossless encoding of three-dimensional meshes. SUMMARY Embodiments of this application provide an encoding method and apparatus, a decoding method and apparatus, and a device, which can resolve the problem of how to efficiently implement lossless encoding of a three-dimensional mesh. According to a first aspect, an encoding method is provided, including: performing, by an encoding end, splitting processing on a non-manifold structure in an original mesh to obtain a manifold mesh;adding, by the encoding end, non-manifold identification information to duplicate vertices in the manifold mesh, and determining index information of a first duplicate vertex in the duplicate vertices, where the non-manifold identification information is used to indicate whether the duplicate vertex is a duplicate vertex generated by performing splitting processing on the non-manifold structure, and the first duplicate vertex is a duplicate vertex generated by performing splitting processing on the non-manifold structure; andencoding, by the encoding end, the non-manifold identification information and the index information of the first duplicate vertex to obtain a first bitstream, where the first indication information is used to indicate whether a non-manifold structure is present in the original mesh. According to a second aspect, a decoding method is provided, including: decoding, by a decoding end, a first bitstream to obtain decoding information, where the decoding information includes non-manifold identification information and index information of a first duplicate vertex, the first duplicate vertex is a duplicate vertex generated by performing splitting processing on a non-manifold structure in an original mesh, and the non-manifold identification information is used for indicating whether the duplicate vertex is a duplicate vertex generated by performing splitting processing on the non-manifold structure; andrestoring, by the decoding end, the non-manifold structure in the original mesh based on the decoding information. According to a third aspect, an encoding apparatus is provided, including: a first obtaining module, configured to perform splitting processing on a non-manifold structure in an original mesh to obtain a manifold mesh;a first processing module, configured to add non-manifold identification information to duplicate vertices in the manifold mesh, and determine index information of a first duplicate vertex in the duplicate vertices, where the non-manifold identification information is used to indicate whether the duplicate vertex is a duplicate vertex generated by performing splitting processing on the non-manifold structure, and the first duplicate vertex is a duplicate vertex generated by performing splitting processing on the non-manifold structure; anda second obtaining module, configured to encode the non-manifold identification information and the index information of the first duplicate vertex to obtain a first bitstream. According to a fourth aspect, a decoding apparatus is provided, including: a fifth obtaining module, configured to decode a first bitstream to obtain decoding information, where the decoding information includes non-manifold identification information and index information of a first duplicate vertex, the first duplicate vertex is a duplicate vertex generated by performing splitting processing on a non-manifold structure in an original mesh, and the non-manifold identification information is used for indicating whe