EP-4738260-A1 - ENCODING METHOD, DECODING METHOD, APPARATUS, AND DEVICE
Abstract
This application discloses an encoding method and apparatus, a decoding method and apparatus, and a device. The method of embodiments of this application includes: determining, by an encoding end, first indication information, where the first indication information is used to indicate whether geometric vertices and attribute vertices in an original mesh have a same connection relationship; determining one or two groups of non-manifold structure information based on the first indication information, where each group of non-manifold structure information includes non-manifold identification information of a target vertex and index information of a target duplicate vertex; the target vertex includes a geometric vertex and an attribute vertex in a manifold mesh, and the non-manifold identification information is used for indicating whether the target vertex is a duplicate vertex generated by performing splitting processing on the non-manifold structure; and the target duplicate vertex is a duplicate vertex generated by performing splitting processing on the non-manifold structure in the original mesh, and the target duplicate vertex includes a geometric duplicate vertex and an attribute duplicate vertex; and encoding the first indication information and the one or two groups of non-manifold structure information 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: determining, by an encoding end, first indication information, wherein the first indication information is used to indicate whether geometric vertices and attribute vertices in an original mesh have a same connection relationship; determining, by the encoding end, one or two groups of non-manifold structure information based on the first indication information, wherein each group of non-manifold structure information comprises non-manifold identification information of a target vertex and index information of a target duplicate vertex; the target vertex comprises a geometric vertex and an attribute vertex in a manifold mesh, wherein the manifold mesh is obtained by performing splitting processing on a non-manifold structure in the original mesh, and the non-manifold identification information is used for indicating whether the target vertex is a duplicate vertex generated by performing splitting processing on the non-manifold structure; and the target duplicate vertex is a duplicate vertex generated by performing splitting processing by the encoding end on the non-manifold structure in the original mesh, and the target duplicate vertex comprises a geometric duplicate vertex and an attribute duplicate vertex; and encoding, by the encoding end, the first indication information and the one or two groups of non-manifold structure information to obtain a first bitstream.
- The method according to claim 1, wherein the first bitstream further comprises encoding information of second indication information, and the second 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 determining, by the encoding end, one or two groups of non-manifold structure information based on the first indication information comprises at least one of the following: in a case that the first indication information indicates that the geometric vertices and the attribute vertices in the original mesh have the same connection relationship, determining, by the encoding end, one group of non-manifold structure information, wherein the geometric vertices and the attribute vertices in the manifold mesh share non-manifold identification information in the one group of non-manifold structure information, and the geometric duplicate vertices and the attribute duplicate vertices in the manifold mesh share index information in the one group of non-manifold structure information; or in a case that the first indication information indicates that the geometric vertices and the attribute vertices in the original mesh have different connection relationships, determining, by the encoding end, two groups of non-manifold structure information, wherein the geometric vertices and the geometric duplicate vertices in the manifold mesh correspond to one group of non-manifold structure information in the two groups of non-manifold structure information, and the attribute vertices and the attribute duplicate vertices in the manifold mesh correspond to another group of non-manifold structure information in the two groups of non-manifold structure information.
- The method according to any one of claims 1 to 3, wherein the method further comprises: encoding, by the encoding end, the manifold mesh to obtain a second bitstream, wherein the manifold mesh is obtained by performing splitting processing on the non-manifold structure in the original mesh by the encoding end; 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 4, wherein the encoding, by the encoding end, the manifold mesh to obtain a second bitstream comprises: encoding, by the encoding end, target information of the manifold mesh to obtain the second bitstream; wherein the target information comprises a connection relationship, geometric information, and attribute information.
- A decoding method, comprising: decoding, by a decoding end, a first bitstream to obtain decoding information, wherein the decoding information comprises first indication information and one or two groups of non-manifold structure information, and each group of non-manifold structure information comprises non-manifold identification information of a target vertex and index information of a target duplicate vertex; the target vertex comprises a geometric vertex and an attribute vertex in a manifold mesh, wherein the manifold mesh is obtained 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 target vertex is a duplicate vertex generated by performing splitting processing on the non-manifold structure; the target duplicate vertex is a duplicate vertex generated by performing splitting processing on the non-manifold structure in the original mesh by the encoding end, and the target duplicate vertex comprises a geometric duplicate vertex and an attribute duplicate vertex; and the first indication information is used to indicate whether geometric vertices and attribute vertices in the original mesh have a same connection relationship; and restoring, by the decoding end, the non-manifold structure in the original mesh based on the decoding information.
- The method according to claim 6, wherein the decoding information further comprises second indication information, and the second 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 second 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 first indication information and the one or two groups of non-manifold structure information.
- The method according to claim 6 or 7, wherein the decoding, by a decoding end, a first bitstream to obtain decoding information comprises: decoding, by the decoding end, the first bitstream to obtain first indication information and second indication information; and in a case that the first indication information indicates that the geometric vertices and the attribute vertices in the original mesh have the same connection relationship, obtaining one group of non-manifold structure information by decoding the first bitstream, wherein the geometric vertices and the attribute vertices in the manifold mesh share non-manifold identification information in the one group of non-manifold structure information, and the geometric duplicate vertices and the attribute duplicate vertices in the manifold mesh share index information in the one group of non-manifold structure information; or in a case that the first indication information indicates that the geometric vertices and the attribute vertices in the original mesh have different connection relationships, obtaining two groups of non-manifold structure information by decoding the first bitstream, wherein the geometric vertices and the geometric duplicate vertices in the manifold mesh correspond to one group of non-manifold structure information in the two groups of non-manifold structure information, and the attribute vertices and the attribute duplicate vertices in the manifold mesh correspond to another group of non-manifold structure information in the two groups of non-manifold structure information.
- The method according to claim 7, wherein the restoring, by the decoding end, the non-manifold structure in the original mesh based on the first indication information and the one or two groups of non-manifold structure information comprises: decoding, by the decoding end, a second bitstream to obtain target information of the manifold mesh, wherein the target information comprises a connection relationship, geometric information, and attribute information; reconstructing a manifold mesh based on the target information of the manifold mesh; and restoring the non-manifold structure in the original mesh based on the reconstructed manifold mesh, the first indication information, and the one or two groups of non-manifold structure information.
- An encoding apparatus comprising: a first determining module, configured to determine first indication information, wherein the first indication information is used to indicate whether geometric vertices and attribute vertices in an original mesh have a same connection relationship; a second determining module, configured to determine one or two groups of non-manifold structure information based on the first indication information, wherein each group of non-manifold structure information comprises non-manifold identification information of a target vertex and index information of a target duplicate vertex; the target vertex comprises a geometric vertex and an attribute vertex in a manifold mesh, wherein the manifold mesh is obtained by performing splitting processing on a non-manifold structure in the original mesh, and the non-manifold identification information is used for indicating whether the target vertex is a duplicate vertex generated by performing splitting processing on the non-manifold structure; and the target duplicate vertex is a duplicate vertex generated by performing splitting processing by the encoding end on the non-manifold structure in the original mesh, and the target duplicate vertex comprises a geometric duplicate vertex and an attribute duplicate vertex; and a first obtaining module, configured to encode the first indication information and the one or two groups of non-manifold structure information to obtain a first bitstream.
- The apparatus according to claim 10, wherein the first bitstream further comprises encoding information of second indication information, and the second indication information is used to indicate whether a non-manifold structure is present in the original mesh.
- The apparatus according to claim 10 or 11, wherein the second determining module is configured to perform at least one of the following: in a case that the first indication information indicates that the geometric vertices and the attribute vertices in the original mesh have the same connection relationship, determining one group of non-manifold structure information, wherein the geometric vertices and the attribute vertices in the manifold mesh share non-manifold identification information in the one group of non-manifold structure information, and the geometric duplicate vertices and the attribute duplicate vertices in the manifold mesh share index information in the one group of non-manifold structure information; or in a case that the first indication information indicates that the geometric vertices and the attribute vertices in the original mesh have different connection relationships, determining two groups of non-manifold structure information, wherein the geometric vertices and the geometric duplicate vertices in the manifold mesh correspond to one group of non-manifold structure information in the two groups of non-manifold structure information, and the attribute vertices and the attribute duplicate vertices in the manifold mesh correspond to another group of non-manifold structure information in the two groups of non-manifold structure information.
- The apparatus according to any one of claims 10 to 12, further comprising: a second obtaining module, configured to encode the manifold mesh to obtain a second bitstream, wherein the manifold mesh is obtained by performing splitting processing on the non-manifold structure in the original mesh by the encoding end; and a third obtaining module, configured to obtain a total bitstream of the original mesh based on the first bitstream and the second bitstream.
- The apparatus according to claim 13, wherein the second obtaining module is configured to encode target information of the manifold mesh to obtain the second bitstream; wherein the target information comprises a connection relationship, geometric information, and attribute information.
- A decoding apparatus, comprising: a fourth obtaining module, configured to decode a first bitstream to obtain decoding information, wherein the decoding information comprises first indication information and one or two groups of non-manifold structure information, and each group of non-manifold structure information comprises non-manifold identification information of a target vertex and index information of a target duplicate vertex; the target vertex comprises a geometric vertex and an attribute vertex in a manifold mesh, wherein the manifold mesh is obtained 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 target vertex is a duplicate vertex generated by performing splitting processing on the non-manifold structure; the target duplicate vertex is a duplicate vertex generated by performing splitting processing on the non-manifold structure in the original mesh by the encoding end, and the target duplicate vertex comprises a geometric duplicate vertex and an attribute duplicate vertex; and the first indication information is used to indicate whether geometric vertices and attribute vertices in the original mesh have a same connection relationship; and a restoration module, configured to restore the non-manifold structure in the original mesh based on the decoding information.
- The apparatus according to claim 15, wherein the decoding information further comprises second indication information, and the second indication information is used to indicate whether a non-manifold structure is present in the original mesh; and the restoration module is configured to: in a case that the second indication information indicates that a non-manifold structure is present in the original mesh, restore the non-manifold structure in the original mesh based on the first indication information and the one or two groups of non-manifold structure information.
- The apparatus according to claim 15 or 16, wherein the fourth obtaining module comprises: a first obtaining submodule, configured to decode the first bitstream to obtain first indication information and second indication information; and a second obtaining submodule, configured to: in a case that the first indication information indicates that the geometric vertices and the attribute vertices in the original mesh have the same connection relationship, obtain one group of non-manifold structure information by decoding the first bitstream, wherein the geometric vertices and the attribute vertices in the manifold mesh share non-manifold identification information in the one group of non-manifold structure information, and the geometric duplicate vertices and the attribute duplicate vertices in the manifold mesh share index information in the one group of non-manifold structure information; or a third obtaining submodule, configured to: in a case that the first indication information indicates that the geometric vertices and the attribute vertices in the original mesh have different connection relationships, obtain two groups of non-manifold structure information by decoding the first bitstream, wherein the geometric vertices and the geometric duplicate vertices in the manifold mesh correspond to one group of non-manifold structure information in the two groups of non-manifold structure information, and the attribute vertices and the attribute duplicate vertices in the manifold mesh correspond to another group of non-manifold structure information in the two groups of non-manifold structure information.
- The apparatus according to claim 16, wherein the restoration module comprises: a fourth obtaining submodule, configured to decode a second bitstream to obtain target information of the manifold mesh, wherein the target information comprises a connection relationship, geometric information, and attribute information; a reconstruction submodule, configured to reconstruct a manifold mesh based on the target information of the manifold mesh; and a restoration submodule, configured to restore the non-manifold structure in the original mesh based on the reconstructed manifold mesh, the first indication information, the second indication information, and the one or two groups of non-manifold structure 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 5 are implemented; or the steps of the decoding method according to any one of claims 6 to 9 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 5 or the steps of the decoding method according to according to any one of claims 6 to 9 are implemented.
Description
CROSS-REFERENCE TO RELATED APPLICATIONS This application claims priority to Chinese Patent Application No. 202310802666.8, 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 coding 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 the three-dimensional mesh data. In the related art, during encoding of a three-dimensional mesh containing a non-manifold structure, one identifier is set for a geometric vertex in a manifold mesh corresponding to the three-dimensional mesh, so as to determine whether the vertex is a point generated by splitting the non-manifold structure. However, lossless decoding of a three-dimensional mesh containing a non-manifold structure cannot be completely implemented at a decoding end based on identifiers of geometric vertices. SUMMARY Embodiments of this application provide an encoding method and apparatus, a decoding method and apparatus, and a device, which can resolve the problem that lossless decoding of a three-dimensional mesh containing a non-manifold structure cannot be completely implemented at a decoding end based on non-manifold identifiers of geometric vertices. According to a first aspect, an encoding method is provided, including: determining, by an encoding end, first indication information, where the first indication information is used to indicate whether geometric vertices and attribute vertices in an original mesh have a same connection relationship;determining, by the encoding end, one or two groups of non-manifold structure information based on the first indication information, where each group of non-manifold structure information includes non-manifold identification information of a target vertex and index information of a target duplicate vertex; the target vertex includes a geometric vertex and an attribute vertex in a manifold mesh, where the manifold mesh is obtained by performing splitting processing on a non-manifold structure in the original mesh, and the non-manifold identification information is used for indicating whether the target vertex is a duplicate vertex generated by performing splitting processing on the non-manifold structure; and the target duplicate vertex is a duplicate vertex generated by performing splitting processing by the encoding end on the non-manifold structure in the original mesh, and the target duplicate vertex includes a geometric duplicate vertex and an attribute duplicate vertex; andencoding, by the encoding end, the first indication information and the one or two groups of non-manifold structure information to obtain a first bitstream. 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 first indication information and one or two groups of non-manifold structure information, and each group of non-manifold structure information includes non-manifold identification information of a target vertex and index information of a target duplicate vertex; the target vertex includes a geometric vertex and an attribute vertex in a manifold mesh, where the manifold mesh is obtained 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 target vertex is a duplicate vertex generated by performing splitting processing on the non-manifold structure; the target duplicate vertex is a duplicate vertex generated by performing splitting processing on the non-manifold structure in the original mesh by the encoding end, and the target duplicate vertex includes a geometric duplicate vertex and an attribute duplicate vertex; and the first indication information is used to indicate whether geometric vertices and attribute vertices in the original mesh have a same connection relationship; 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 determining module, configured to determine first indication information, where the first indication information is used to indicate whether geometric vertices and attribute vertices in an original mesh have a same connection relat