Three-dimensional mesh decoding and coding methods, coder, decoder, and medium
By performing targeted quantization and dequantization based on vertex connectivity in 3D mesh compression technology, the problems of high encoding rate and low efficiency in existing technologies are solved, achieving efficient 3D mesh reconstruction and encoding/decoding.
Patent Information
- Application Number
- PCT/CN2024/103347
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-07-03
- Publication Date
- 2026-01-08
Smart Images

Figure CN2024103347_08012026_PF_FP_ABST
Abstract
Description
Three-dimensional mesh decoding, encoding method, codec and medium TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of dynamic mesh coding and decoding, and particularly relate to a three-dimensional mesh decoding, encoding method, codec and medium. BACKGROUND
[0002] Dynamic mesh coding (DMC) is a high-efficiency compression technology for dynamic mesh sequences. A dynamic mesh sequence refers to a three-dimensional mesh sequence with time-varying geometry and topology.
[0003] In the three-dimensional mesh compression technology involved in the related art, a base mesh and a displacement value are generated by preprocessing at an encoding end. The encoding end generates a base mesh with a greatly reduced number of vertices by downsampling an original mesh, and then subdivides the base mesh to obtain a subdivided mesh by an algorithm. For each vertex in the subdivided mesh, the encoder finds a vertex in the original mesh closest to the vertex, and determines a vector between the vertex in the subdivided mesh and the closest vertex in the original mesh as the displacement value.
[0004] SUMMARY
[0005] Embodiments of the present application provide a three-dimensional mesh decoding, encoding method, codec and medium. The technical solution is as follows:
[0006] In one aspect, the present application provides a three-dimensional mesh decoding method, which comprises:
[0007] parsing a code stream to obtain displacement values of vertices in a subdivided mesh;
[0008] based on a connection relationship between the vertices in the subdivided mesh, dequantizing the displacement values of the vertices;
[0009] based on the dequantized displacement values, reconstructing a mesh to obtain a reconstructed mesh.
[0010] In another aspect, the present application provides a three-dimensional mesh encoding method, which comprises:
[0011] determining displacement values of vertices in a subdivided mesh;
[0012] based on a connection relationship between the vertices in the subdivided mesh, quantizing the displacement values of the vertices;
[0013] encoding the quantized displacement values.
[0014] In another aspect, an embodiment of the present application provides a three-dimensional mesh decoding apparatus, the apparatus comprising:
[0015] a decoding unit configured to parse a bitstream to obtain shift coefficients of vertices in a subdivision mesh;
[0016] the decoding unit is configured to perform dequantization on the shift coefficients of the vertices based on a connection relationship between the vertices in the subdivision mesh;
[0017] the decoding unit is configured to perform mesh reconstruction based on the dequantized shift coefficients to obtain a reconstructed mesh.
[0018] In another aspect, an embodiment of the present application provides a three-dimensional mesh encoding apparatus, the apparatus comprising:
[0019] an encoding unit configured to determine shift coefficients of vertices in a subdivision mesh;
[0020] the encoding unit is configured to perform quantization on the shift coefficients of the vertices based on a connection relationship between the vertices in the subdivision mesh;
[0021] the encoding unit is configured to encode the quantized shift coefficients.
[0022] In another aspect, an embodiment of the present application provides a decoder, the decoder comprising a memory and a processor, the memory configured to store a computer program running on the processor; the processor configured to execute, when the computer program is running, a three-dimensional mesh decoding method according to any one of the preceding aspects.
[0023] In another aspect, an embodiment of the present application provides an encoder, the encoder comprising a memory and a processor, the memory configured to store a computer program running on the processor; the processor configured to execute, when the computer program is running, a three-dimensional mesh encoding method according to any one of the preceding aspects.
[0024] In another aspect, an embodiment of the present application provides a non-volatile computer readable storage medium storing a bitstream, the bitstream being generated by using a three-dimensional mesh encoding method of an encoder, or the bitstream being decoded by using a three-dimensional mesh decoding method of a decoder, wherein the three-dimensional mesh encoding method comprises a three-dimensional mesh decoding method according to any one of the preceding aspects, or the three-dimensional mesh decoding method comprises a three-dimensional mesh encoding method according to any one of the preceding aspects.
[0025] In another aspect, an embodiment of the present application provides a computer program product, which comprises computer instructions stored in a computer readable storage medium, and a processor acquires the computer instructions from the computer readable storage medium, and executes the computer instructions to implement the three-dimensional mesh decoding method or the three-dimensional mesh encoding method according to the above aspect.
[0026] Since each vertex in the subdivision mesh has different importance in space, when the shift coefficients of the vertices of the subdivision mesh are encoded and decoded, the shift coefficients are quantized and dequantized based on the connection relationship between the vertices, the vertices with high importance are quantized with high precision, the reconstruction quality of the subsequent three-dimensional mesh is improved, the vertices with low importance are quantized with low precision, the encoding and decoding efficiency of the three-dimensional mesh is improved, and the encoding code rate is reduced. BRIEF DESCRIPTION OF DRAWINGS
[0027] FIG. 1 is an implementation schematic diagram of a shift coefficient determination process according to an example embodiment;
[0028] FIG. 2 is a schematic diagram of a subdivision mesh corresponding to a LOD structure according to an example embodiment;
[0029] FIG. 3 is a flowchart of a three-dimensional mesh encoding method according to an example embodiment of the present application;
[0030] FIG. 4 is a flowchart of a weight coefficient determination process according to an example embodiment of the present application;
[0031] FIG. 5 is a schematic diagram of different vertices in the same LOD layer according to an example embodiment of the present application;
[0032] FIG. 6 is a flowchart of a transform quantization process according to an example embodiment of the present application;
[0033] FIG. 7 is a schematic diagram of a prediction and update process in the transform process according to an example embodiment of the present application;
[0034] FIG. 8 is a flowchart of a three-dimensional mesh decoding method according to an example embodiment of the present application;
[0035] FIG. 9 is a schematic diagram of mesh reconstruction according to a subdivision mesh and shift coefficients according to an example embodiment of the present application;
[0036] FIG. 10 is a flowchart of a weight coefficient determination process according to an example embodiment of the present application;
[0037] FIG. 11 is a flowchart of an inverse transform and reconstruction process according to an example embodiment of the present application;
[0038] FIG. 12 shows a structural block diagram of a three-dimensional mesh encoding device according to an example embodiment of the present application;
[0039] FIG. 13 shows a structural block diagram of a three-dimensional mesh decoding device according to an example embodiment of the present application;
[0040] FIG. 14 shows a structural block diagram of an encoder according to an example embodiment of the present application;
[0041] FIG. 15 shows a structural block diagram of a decoder according to an example embodiment of the present application. DETAILED DESCRIPTION
[0042] For the purpose, technical solutions and advantages of the present application to be clearer, the embodiments of the present application will be described in further detail below with reference to the drawings.
[0043] “Multiple” mentioned herein refers to two or more. “And / or” describes the association between the associated objects, which means that there can be three relationships, for example, A and / or B can represent the following three cases: A exists alone, A and B exist together, and B exists alone. The character “ / ” generally represents that the associated objects before and after it are in an “or” relationship.
[0044] A three-dimensional mesh is a three-dimensional object surface composed of multiple polygons in space, and a polygon is composed of vertices and edges. A two-dimensional image has information expression and distribution rules at each pixel point, so it does not need to record its position information additionally. However, the distribution of vertices in a three-dimensional mesh in a three-dimensional space has randomness and irregularity, and the composition of polygons needs to be additionally specified, so the position of each vertex in space and the connection information of each polygon need to be recorded to completely express the three-dimensional mesh.
[0045] At the encoding end, a base mesh and a shift coefficient are first generated through preprocessing. As shown in FIG. 1, the base mesh 102 is a mesh with a greatly reduced number of vertices obtained by down-sampling the original mesh 101. After obtaining the base mesh 102, the base mesh is subdivided through a subdivision algorithm, new vertices are inserted on the edges of the base mesh 102 to obtain a subdivided mesh 103. For each vertex in the subdivided mesh 103, the vertex closest to it in the original mesh 101 is found, and the vector between the vertex in the subdivided mesh 103 and the closest vertex in the original mesh 101 is determined as the shift coefficient 104.
[0046] Since the subdivided mesh can be automatically generated at the encoding and decoding ends after the subdivision algorithm and the number of subdivision iterations are determined, after preprocessing, the original mesh only needs to be represented as a simple base mesh and a series of shift coefficients, which greatly reduces the amount of data to be transmitted without affecting the reconstruction at the decoding end.
[0047] The DMC encoding mainly includes geometry position information encoding and attribute information encoding. The content of the geometry position information encoding includes geometry position information (x, y, z), connection relationship of the geometry position information triangular face, texture coordinate (u, v) and connection relationship of the texture coordinate. The content of the attribute information encoding includes texture attribute information. In the DMC encoder, the geometry position information is jointly encoded by DRACO (or other 3D graphics compression library) and traditional video encoding technology (such as AVC, HEVC or VVC, etc.); and the texture information is directly encoded by using the traditional video encoding technology.
[0048] In the three-dimensional mesh coding process based on intra-frame, at the encoding end, the preprocessed base mesh after quantization is encoded by using the DRACO encoder, and the shift coefficient after wavelet transform, quantization and two-dimensional mapping is encoded by using HEVC. At the decoding end, the base mesh code stream is decoded by using the DRACO decoder to generate the decoded base mesh, and the shift coefficient is generated after HEVC decoding, inverse two-dimensional mapping, inverse quantization and inverse transform, so as to reconstruct the three-dimensional mesh based on the decoded base mesh and the shift coefficient.
[0049] In the three-dimensional mesh coding process based on inter-frame, at the encoding end, since the inter-frame mode is used, the connection information between the vertices of the base mesh part is no longer needed to be encoded, only the motion vector between the vertex coordinates of the current base mesh and the vertex coordinates of the reference base mesh needs to be encoded; and the shift coefficient is still encoded by using HEVC after wavelet transform, quantization and two-dimensional mapping. At the decoding end, the motion vector is decoded from the base mesh code stream, and the current base mesh can be reconstructed by combining the connection information of the vertex of the reference base mesh; and the shift coefficient is still generated after HEVC decoding, inverse two-dimensional mapping, inverse quantization and inverse transform to generate the decoded shift coefficient, so as to reconstruct the three-dimensional mesh based on the decoded base mesh and the shift coefficient.
[0050] When the base mesh is subdivided to obtain the subdivided mesh, the geometry position information of the subdivided vertex is usually obtained by using the linear interpolation of the vertex on the boundary. According to the number of iterations of the division, the shift coefficient of the vertex obtained by the division is divided by LOD (Levels Of Detail), and the LOD structure can be obtained.
[0051] As shown in FIG. 2, when the base mesh 21 (triangle mesh) is iteratively subdivided three times (corresponding to level1, level2 and level3 respectively), a LOD structure 22 can be obtained. In the LOD structure 22, the vertices of the base mesh 21 are contained in level0, the vertices obtained by first subdividing the base mesh 21 are contained in level1, the vertices obtained by second subdividing the base mesh 21 are contained in level2, and the vertices obtained by third subdividing the base mesh 21 are contained in level3.
[0052] In the related art, when quantizing the shift coefficients of the vertices based on the LOD structure, the same quantization parameter is used for the shift coefficients of all the vertices in the same LOD layer.
[0053] In the embodiments of the present application, considering that the importance of each vertex in the subdivided mesh in space is different, when encoding the shift coefficients of the vertices of the subdivided mesh, a uniform quantization coefficient is not used, but the shift coefficients are quantized based on the connection relationship between the vertices. For example, the vertices with high importance can be quantized with high precision to improve the reconstruction quality of the subsequent three-dimensional mesh; the vertices with low importance can be quantized with low precision to improve the coding efficiency of the three-dimensional mesh and reduce the coding rate.
[0054] Please refer to FIG. 3, which shows a flowchart of a three-dimensional mesh coding method provided by an exemplary embodiment of the present application. The method is used for an encoder, and the method can include the following steps:
[0055] Step 301, determining the shift coefficients of the vertices in the subdivided mesh.
[0056] In some embodiments, the encoder simplifies the original mesh to obtain the base mesh, and subdivides the base mesh to obtain the subdivided mesh. The difference between each vertex in the subdivided mesh and the vertex in the original mesh is the shift coefficient of the vertex.
[0057] In some embodiments, the base mesh is subdivided three times to obtain the subdivided mesh. The number of subdivisions is limited in the embodiments of the present application.
[0058] In some embodiments, for a vertex in the subdivided mesh, the shift coefficient of the vertex can be expressed as: d[i]=org[i]-subdiv[i]
[0059] Wherein, subdiv[i] is the vertex with index i in the subdivided mesh, and org[i] is the nearest vertex found in the original mesh along the discovery direction of the vertex with index i in the subdivided mesh.
[0060] At step 302, the shift coefficients of the vertices are quantized based on the connection relationship between the vertices in the subdivision mesh.
[0061] In the embodiments of the present application, the encoder does not quantize the shift coefficients of the vertices by using uniform quantization coefficients, but quantizes the shift coefficients of the vertices according to the importance of the vertices in the space.
[0062] As to the way of measuring the importance of the vertices, for two vertices in the same LOD layer, the more times the vertex participates in the neighborhood prediction, the higher the importance of the vertex; otherwise, the less times the vertex participates in the neighborhood prediction, the lower the importance of the vertex.
[0063] Therefore, in a possible implementation, for a vertex in the subdivision mesh, the encoder determines the connection relationship between the vertex and other vertices, and determines the importance of the vertex in the space based on the connection relationship.
[0064] Optionally, the connection relationship can include the connection relationship between the vertex and other vertices in the same LOD layer, and the connection relationship between the vertex and vertices in other LOD layers.
[0065] In some embodiments, based on the connection relationship of the vertex, the encoder determines the number of adjacent vertices of each vertex.
[0066] Optionally, the encoder quantizes the shift coefficients of the vertices in each LOD layer based on the connection relationship between the vertices in the subdivision mesh. Alternatively, the encoder quantizes the shift coefficients of the vertices in a specified LOD layer based on the connection relationship between the vertices in the subdivision mesh.
[0067] In some embodiments, the specified LOD layer can be a lower LOD layer in the LOD structure. For example, the shift coefficients of the vertices in LOD layers level2 and level3 are quantized based on the connection relationship between the vertices in the subdivision mesh.
[0068] In some embodiments, the encoder uses different quantization precisions when quantizing the shift coefficients of the vertices with different importance.
[0069] Optionally, the quantization precision of the shift coefficients is positively correlated with the importance of the vertex, that is, the higher the importance of the vertex, the higher the quantization precision of the shift coefficients of the vertex (to ensure the accuracy after quantization); the lower the importance of the vertex, the lower the quantization precision of the shift coefficients of the vertex (to improve the compression rate after quantization).
[0070] It should be noted that before quantizing the shift coefficients, the encoder also needs to transform the shift coefficients (for example, wavelet transform, to transform the shift coefficients from the spatial domain to the frequency domain), and then quantize the transformed shift coefficients, which will be described in detail in the following embodiments.
[0071] Step 303, encode the quantized shift coefficients.
[0072] In a possible implementation, after the quantization of the shift coefficients, the encoder performs two-dimensional mapping (coefficient reorganization) based on the quantized shift coefficients to obtain a two-dimensional image, and then encodes the two-dimensional image through a video image encoding technology.
[0073] In a possible implementation, the encoder performs coefficient reorganization based on blocks, and each block has a size of 16x16. The shift coefficients in each block are arranged according to the Morden code to obtain a two-dimensional image.
[0074] It should be noted that, in addition to the encoding of the shift coefficients, the encoder also needs to encode the geometric information of the base mesh and the attribute information of the three-dimensional mesh, which is not described herein.
[0075] To sum up, in the embodiments of the present application, because the importance of each vertex in the subdivision mesh in space is different, when the shift coefficients of the vertices of the subdivision mesh are encoded and decoded, the shift coefficients are quantized and dequantized based on the connection relationship between the vertices, the vertices with high importance are quantized with high precision, the reconstruction quality of the subsequent three-dimensional mesh is improved, the vertices with low importance are quantized with low precision, the encoding and decoding efficiency of the three-dimensional mesh is improved, and the encoding code rate is reduced.
[0076] In a possible manner, when the same quantization coefficient is used for the vertices in the same LOD layer, the quantization process of the shift coefficients of the vertices can be represented as:
[0077] wherein Res i is the shift coefficient before quantization, QRes i为 is the shift coefficient after quantization, bitDepth is the effective bit depth of the shift coefficient, and QP Lvl is the quantization coefficient of the current LOD layer.
[0078] When the scheme provided in the embodiments of the present application is used, in a possible implementation, the encoder determines the weight coefficient of the vertex based on the connection relationship between the vertices in the subdivision mesh, and quantizes the shift coefficient of the vertex based on the weight coefficient.
[0079] The greater the weight coefficient, the higher the importance of the vertex, and the smaller the weight coefficient, the lower the importance of the vertex.
[0080] In some embodiments, the weight coefficient scales the quantization result of the shift coefficient.
[0081] Illustratively, the process can be represented as:
[0082] wherein weight i is the weight coefficient of the vertex with index i.
[0083] In some other embodiments, the weight coefficient is used to adjust the quantization coefficient of the LOD layer to which the current vertex belongs.
[0084] In one possible implementation, the encoder can determine the quantization coefficient adjustment amount (which can be positive, negative or 0) of a vertex based on the weight coefficient of the vertex, from the correspondence between the weight coefficient and the quantization coefficient adjustment amount, so as to adjust the quantization coefficient of the LOD layer to which the current vertex belongs based on the quantization coefficient adjustment amount, and then quantize the shift coefficient of the current vertex based on the adjusted quantization coefficient, which is not limited in the present embodiment.
[0085] Regarding the determination process of the weight coefficient, as shown in FIG. 4, the process can include the following steps.
[0086] Step 401: Determine the number of adjacent vertices of a vertex based on the connection relationship between the vertices in the subdivision mesh.
[0087] As shown in FIG. 5, P1, P2 and P3 are three vertices located in the same LOD layer. Among them, P1 participates in the neighborhood prediction for 6 times, P2 participates in the neighborhood prediction for 6 times, and P3 participates in the neighborhood prediction for 5 times. Obviously, since P1 and P2 participate in the neighborhood prediction more times than P3, the importance of the three vertices is P1=P2>P3. Therefore, in one possible implementation, the encoder can determine the number of adjacent vertices of each vertex based on the connection relationship between the vertices, so as to determine the importance of the vertex based on the number of adjacent vertices, and then determine the weight coefficient of the vertex.
[0088] Regarding the manner of determining the number of adjacent vertices, in one possible implementation, the encoder traverses the triangular patches (composed of three vertices) of the subdivision mesh to obtain the index of the triangular patch to which each vertex belongs, so as to determine the number of non-repeated edges in which each vertex is located based on the index, which is the number of adjacent vertices of the vertex, i.e., numOfNeighbors i .
[0089] Step 402: Determine the weight coefficient of a vertex based on the number of adjacent vertices of the vertex, and the weight coefficient is positively correlated with the number of adjacent vertices.
[0090] The more the number of adjacent vertices of a vertex, the more the vertex is located in a dense vertex distribution area, and the more the vertex participates in neighborhood prediction, and the greater the influence on the mesh reconstruction quality. Conversely, the fewer the number of adjacent vertices of a vertex, the more the vertex is located in a sparse vertex distribution area, and the fewer the vertex participates in neighborhood prediction, and the smaller the influence on the mesh reconstruction quality. Therefore, the weight coefficient of a vertex is positively correlated with the number of adjacent vertices of the vertex, that is, the more the number of adjacent vertices of a vertex, the greater the weight coefficient of the vertex, and the fewer the number of adjacent vertices of a vertex, the smaller the weight coefficient of the vertex.
[0091] Since the overall vertex distribution of different subdivision meshes is different, for example, the overall vertex distribution of some subdivision meshes is dense, and the overall vertex distribution of some subdivision meshes is sparse, when determining the weight coefficient of a vertex, a hyperparameter suitable for the current subdivision mesh needs to be determined, so as to determine the weight coefficient of the vertex based on the number of adjacent vertices of the vertex and the hyperparameter.
[0092] In a possible implementation, the encoder determines the hyperparameter based on the number of adjacent vertices of each vertex in the subdivision mesh. That is, the hyperparameter can reflect the overall connection of the vertices in the subdivision mesh.
[0093] In some embodiments, the hyperparameter can be determined in the following manner.
[0094] Manner 1: The hyperparameter is the number of adjacent vertices with the highest occurrence frequency.
[0095] In a possible implementation, the encoder counts the occurrence frequency of different numbers of adjacent vertices, and determines the number of adjacent vertices with the highest occurrence frequency as the hyperparameter.
[0096] In an illustrative example, when the number of adjacent vertices 6 has the highest occurrence frequency, the encoder determines the hyperparameter as 6.
[0097] Manner 2: The hyperparameter is the maximum value of the number of adjacent vertices of each vertex.
[0098] In a possible implementation, the encoder sorts the number of adjacent vertices of each vertex, and determines the maximum number of adjacent vertices as the hyperparameter.
[0099] Manner 3: The hyperparameter is the average value of the number of adjacent vertices of each vertex.
[0100] In a possible implementation, the encoder calculates the average value of the number of adjacent vertices of each vertex, and determines the average number of adjacent vertices as the hyperparameter.
[0101] Manner 4: The hyperparameter is the median value of the number of adjacent vertices of each vertex.
[0102] In a possible implementation, the encoder ranks the number of neighboring vertices of each vertex, and determines the median number of neighboring vertices as the hyperparameter.
[0103] Of course, in addition to determining the hyperparameter in the above manner, in other possible implementations, the encoder can also determine the hyperparameter based on the number of neighboring vertices of part of the vertices, or determine the hyperparameter by weighted averaging the number of neighboring vertices of vertices of different LOD layers, and the specific manner of determining the hyperparameter is not limited in the embodiments of the present application.
[0104] In a possible implementation, the encoder determines the ratio of the number of neighboring vertices to the hyperparameter as the hyperparameter. The determination process of the weight coefficient of a vertex can be represented as: weight i =numOfNeighbors i / hyperParameter
[0105] wherein, numOfNeighbors i is the number of neighboring vertices of the vertex with index i, and hyperParameter is the hyperparameter.
[0106] In some embodiments, in the case where the hyperparameter is the most frequently occurring number of neighboring vertices, if the number of neighboring vertices of the current vertex is greater than the hyperparameter, it indicates that the importance of the vertex is higher than that of most vertices, and the weight coefficient of the current vertex is greater than 1; if the number of neighboring vertices of the current vertex is less than the hyperparameter, it indicates that the importance of the vertex is lower than that of most vertices, and the weight coefficient of the current vertex is less than 1.
[0107] In order to ensure the consistency of the weight coefficients determined by the encoding and decoding ends, in a possible implementation, the encoding and decoding ends determine the hyperparameter by using the same hyperparameter determination rule.
[0108] In another possible implementation, the encoder writes the hyperparameter into the bitstream for the encoding end to obtain by parsing.
[0109] Optionally, the hyperparameter is a frame-level parameter, that is, the encoder determines the hyperparameter corresponding to each frame, and writes the hyperparameter into the bitstream of the corresponding frame.
[0110] In an illustrative example, in the case where the hyperparameter is increased, the set of frame-level syntax elements of the V-DMC can be as shown in Table 1.
[0111] Table 1
[0112] The newly-added syntax element afve_quantization_parameters_enable_flag indicates whether the hyper-parameters are used, and the newly-added syntax element afve_quantization_hyper_parameter indicates the value of the hyper-parameters.
[0113] In the above embodiment, the encoder determines the weight coefficient of the vertex based on the number of adjacent vertices of the vertex, so that the important vertex with more adjacent vertices has a larger weight coefficient, thereby realizing fine quantization of the important vertex and ensuring the quantization accuracy of the important vertex; and the unimportant vertex with fewer adjacent vertices has a smaller weight coefficient, thereby realizing coarse quantization of the unimportant vertex and improving the compression rate of the shift coefficient of the unimportant vertex.
[0114] In a possible implementation, as shown in FIG. 6, quantizing the shift coefficient based on the weight coefficient can include the following steps.
[0115] In step 601, the shift coefficient of the vertex is transformed based on the LOD structure of the vertex in the subdivision mesh, to obtain the transformed shift coefficient.
[0116] In a possible implementation, the encoder performs lifting transform on the shift coefficient of the vertex based on the LOD structure of the vertex in the subdivision mesh, to transform the shift coefficient of the vertex from the spatial domain to the frequency domain, so as to improve the compression rate of the shift coefficient.
[0117] As shown in FIG. 7, the prediction of the shift coefficient refers to predicting the shift coefficient of the vertex in the lower LOD based on the shift coefficient of the vertex in the upper LOD; and the update of the shift coefficient refers to updating the shift coefficient of the vertex in the upper LOD based on the prediction residual of the shift coefficient of the vertex in the lower LOD.
[0118] Optionally, the step includes the following substep:
[0119] In substep 1, for a current vertex in a current LOD layer, the shift coefficient of the current vertex is predicted based on the adjacent vertices of the current vertex in an upper LOD.
[0120] Since in the LOD structure, the vertex in the lower LOD is determined by the vertex in the upper LOD through linear interpolation, that is, the geometric position coordinates of the vertices in the upper LOD and the lower LOD are correlated, the encoder can predict the shift coefficient of the vertex in the lower LOD based on the shift coefficient of the vertex in the upper LOD.
[0121] Optionally, the upper LOD can be an upper adjacent LOD of the current LOD layer, for example, the current LOD layer is level 3, and the upper LOD can be level 2. Alternatively, the upper LOD can be any upper LOD of the current LOD layer in the LOD structure, for example, the current LOD layer is level 3, and the upper LOD can be level 2, level 1 or level 0.
[0122] In a possible implementation, the encoder determines two adjacent vertices co-linear with the current vertex from the upper LOD, and obtains the predicted value of the shift coefficient of the current vertex based on the shift coefficients corresponding to the adjacent vertices and the prediction weight.
[0123] In some embodiments, the encoder predicts the shift coefficient of the current vertex based on the adjacent vertices of the current vertex in the upper LOD and a preset prediction weight.
[0124] For example, the prediction of the shift coefficient of the current vertex can be represented as: signal = predWeight × (Neigh1 + Neigh2)
[0125] Wherein, signal is the predicted shift coefficient of the current vertex, predWeight is a preset prediction weight (for example, 1 / 2), and Neigh1 and Neigh2 are the shift coefficients of the two adjacent vertices co-linear with the current vertex in the upper LOD.
[0126] In some embodiments, after predicting the shift coefficient of the current vertex, the encoder calculates the prediction residual between the predicted shift coefficient and the original shift coefficient of the current vertex, which is used for subsequent update process.
[0127] For example, the prediction residual of the shift coefficient of the current vertex can be represented as: signal- = predWeight × (Neigh1 + Neigh2)
[0128] Wherein, signal- represents the difference operation between the shift coefficient of the current vertex and the predicted shift coefficient.
[0129] Sub-step 2, in the case that the shift coefficients of all the vertices in the current LOD layer are predicted, the shift coefficients of the vertices in the upper LOD are updated based on the prediction residual of the shift coefficients of the vertices in the current LOD layer.
[0130] The encoder performs prediction and update layer by layer from bottom to top (for example, in the order of level 3, level 2 and level 1) according to the LOD structure. In the case that the shift coefficients of all the vertices in the current layer are predicted, the encoder updates the shift coefficients of the vertices in the upper LOD of the current layer based on the prediction residual.
[0131] Optionally, the encoder updates the shift coefficients of the vertices of the adjacent upper LOD layer of the current LOD layer based on the prediction residual.
[0132] In a possible implementation, for a vertex in the upper LOD layer, the encoder determines, from the current LOD, a predicted vertex that is predicted using the vertex, and updates the shift coefficients of the vertex in the upper LOD based on the prediction residual of the predicted vertex and the update weight.
[0133] For example, the vertex A in level 2 is used for the prediction of the vertices BCDE in level 3, and the encoder updates the shift coefficients of the vertex A based on the respective prediction residual of the vertices BCDE. For another example, the vertex F in level 2 is used for the prediction of the vertices GHI in level 3, and the encoder updates the shift coefficients of the vertex F based on the respective prediction residual of the vertices GHI.
[0134] In some embodiments, the encoder updates the shift coefficients of the vertices in the upper LOD based on the prediction residual of the shift coefficients of the vertices in the current LOD layer and a preset update weight.
[0135] Illustratively, the updating of the shift coefficients of the vertices in the upper LOD can be represented as:
[0136] wherein signal+ represents the addition operation of the shift coefficients of the vertices in the upper LOD and the prediction residual, updateWeight is the preset update weight (for example, 1 / 8), P is the set of predicted vertices, and signal i is the prediction residual of the i-th predicted vertex.
[0137] At step 602, after the transformation of the shift coefficients of all the vertices in the subdivision mesh is completed, the transformed shift coefficients are quantized based on the weight coefficients.
[0138] The encoder performs the above transformation process on each LOD layer in the LOD structure, and after the transformation of the shift coefficients of all the vertices in each LOD layer is completed, the transformed shift coefficients of the vertices in each LOD layer are quantized.
[0139] In some embodiments, for the LOD structure shown in FIG. 2, the encoder transforms the shift coefficients to obtain the prediction residual of the shift coefficients of each vertex in level 3 to level 1 and the updated shift coefficients of each vertex in level 0, and then quantizes the prediction residual and the updated shift coefficients.
[0140] In a possible implementation, each LOD layer in the LOD structure has a respective initial quantization coefficient, and for a current LOD layer in the LOD structure, the encoder quantizes the transformed shift coefficients of the vertices in the current LOD layer based on the weight coefficients and the initial quantization coefficient corresponding to the current LOD layer.
[0141] Illustratively, the process can be represented as:
[0142] wherein Res i is the shift coefficient before quantization, QRes i is the shift coefficient after quantization, bitDepth is the effective bit depth of the shift coefficient, QP Lvl is the quantization coefficient of the current LOD layer, and weight i is the weight coefficient of the vertex with index i in the current LOD layer.
[0143] In a possible implementation, the quantization parameter corresponding to the current LOD layer is determined based on an initial quantization parameter and a scaling parameter of the quantization parameters between the LOD layers.
[0144] wherein the initial quantization parameter is the quantization coefficient of the topmost LOD layer (level 0) in the LOD structure. Accordingly, the quantization parameter of each LOD layer can be represented as: QP Lvl = liftingQP x Scale Lvl-1
[0145] wherein liftingQP is the initial quantization coefficient, and Scale is the scaling parameter of the quantization parameters between the LOD layers.
[0146] For example, when the scaling parameter is 0.5, it means that the quantization coefficient of each LOD layer is multiplied by 0.5 based on the previous LOD layer.
[0147] In another possible implementation, the quantization parameter corresponding to the current LOD layer is determined based on an initial quantization parameter and a quantization parameter difference value between the LOD layers.
[0148] Optionally, the quantization parameter difference value between different LOD layers can be the same or different.
[0149] In the case where the quantization parameter difference value between different LOD layers is the same, the quantization parameter of each LOD layer can be represented as: QP Lvl = liftingQP - deltaQP * (Lvl - 1)
[0150] wherein liftingQP is the initial quantization coefficient, and deltaQP is the quantization parameter difference value between the LOD layers.
[0151] In the above embodiments, the weight coefficients of the vertex only affect the quantization process. In order to further improve the coding efficiency, the encoder can also apply the weight coefficients of the vertex to the transform process of the shift coefficients.
[0152] Optionally, applying the weight coefficients to the transform process of the shift coefficients can include at least one of the following manners.
[0153] Manner 1: predicting the shift coefficients of the current vertex based on the neighboring vertices of the current vertex in the upper LOD and the weight coefficients of the neighboring vertices.
[0154] Unlike predicting the shift coefficients of the current vertex by using the preset prediction weight, in the present embodiment, the encoder determines the dynamic prediction weights of the neighboring vertices based on the weight coefficients of the neighboring vertices. Wherein, the greater the weight coefficient of the neighboring vertex, the greater the corresponding dynamic prediction weight; on the contrary, the smaller the weight coefficient of the neighboring vertex, the smaller the corresponding dynamic prediction weight.
[0155] In a possible implementation, the encoder determines the weight coefficients of the neighboring vertices as the dynamic prediction weights, and determines the fusion weight (sumWeight) based on the weight coefficients, so as to predict the shift coefficients of the current vertex based on the shift coefficients of the neighboring vertices, the dynamic prediction weights and the fusion weight.
[0156] Illustratively, the dynamic prediction weights of the two neighboring vertices can be represented as: predWeight1 = weight1 predWeight2 = weight2
[0157] Wherein, weight1 and weight2 are the weight coefficients corresponding to the neighboring vertices respectively.
[0158] The prediction of the shift coefficients of the current vertex can be represented as:
[0159] Wherein, Neigh1 and Neigh2 are the shift coefficients of the two neighboring vertices in the upper LOD which are collinear with the current vertex, and sumWeight = predWeight1 + predWeight2.
[0160] Manner 2: updating the shift coefficients of the vertex in the upper LOD based on the prediction residual of the shift coefficients of the vertex in the current LOD layer and the weight coefficients of the vertex in the current LOD layer.
[0161] Different from updating the shift coefficients of the vertices in the upper LOD layer by using the preset update weight, in the embodiment, the encoder determines the dynamic update weight of each vertex based on the weight coefficient of the vertex. The greater the weight coefficient of the vertex is, the greater the corresponding dynamic update weight is; otherwise, the smaller the weight coefficient of the adjacent vertex is, the smaller the corresponding dynamic update weight is.
[0162] In a possible implementation, the encoder determines the weight coefficient of the vertex as the dynamic update weight, and determines the fusion weight (sumWeight) based on the weight coefficient, so as to update the shift coefficient of the vertex in the upper LOD layer based on the shift coefficient of the vertex, the dynamic update weight, and the fusion weight.
[0163] The update of the shift coefficient of the vertex in the upper LOD can be represented as:
[0164] Wherein, signal+ represents the addition operation of the shift coefficient of the vertex in the upper LOD and the prediction residual, updateWeight is a preset update weight (for example, 1 / 8), P is a set of predicted vertices, signal i predWeight1+predWeight2.
[0165] In the above embodiment, the weight coefficient is applied to the prediction and / or update process of the shift coefficient, which helps to improve the prediction accuracy in the transformation process and the accuracy of the updated shift coefficient, further improves the coding efficiency, and improves the reconstruction quality of the subsequent three-dimensional mesh.
[0166] Please refer to FIG. 8, which shows the flow chart of the three-dimensional mesh decoding method provided by an example embodiment of the present application. The method is used for a decoder, and the method can include the following steps:
[0167] Step 801: parsing the code stream to obtain the shift coefficient of the vertex in the subdivision mesh.
[0168] In a possible implementation, the decoder obtains the two-dimensional image obtained by two-dimensional mapping (coefficient reorganization) of the quantized shift coefficient by decoding the code stream. The inverse two-dimensional mapping (inverse coefficient reorganization) is performed on the two-dimensional image, and the quantized shift coefficient of the vertex is obtained.
[0169] In a possible implementation, the decoder performs inverse coefficient reorganization on the two-dimensional image based on the block, and obtains the quantized shift coefficient according to the inverse Morton code.
[0170] It should be noted that the decoder parses the code stream to obtain the shift coefficients of the vertices in the subdivision mesh, the geometry information of the base mesh, and the attribute information of the three-dimensional mesh, which are not described herein.
[0171] At step 802, the shift coefficients of the vertices are dequantized based on the connection relationship between the vertices in the subdivision mesh.
[0172] In the embodiments of the present application, the decoder does not dequantize the shift coefficients using uniform quantization coefficients, but dequantizes the shift coefficients of the vertices according to the importance of the vertices in the space.
[0173] As to the measurement of the importance of the vertices, for two vertices in the same LOD layer, the more times the vertex participates in the neighborhood prediction, the higher the importance of the vertex; otherwise, the less times the vertex participates in the neighborhood prediction, the lower the importance of the vertex.
[0174] Therefore, in a possible implementation, for a vertex in the subdivision mesh, the decoder determines the connection relationship between the vertex and other vertices, and determines the importance of the vertex in the space based on the connection relationship.
[0175] Optionally, the connection relationship can include the connection relationship between the vertex and other vertices in the same LOD layer, and the connection relationship between the vertex and vertices in other LOD layers.
[0176] In some embodiments, based on the connection relationship of the vertex, the decoder determines the number of adjacent vertices of each vertex.
[0177] Optionally, the decoder dequantizes the shift coefficients of the vertices in each LOD layer based on the connection relationship between the vertices in the subdivision mesh. Alternatively, the decoder dequantizes the shift coefficients of the vertices in a specified LOD layer based on the connection relationship between the vertices in the subdivision mesh.
[0178] In some embodiments, the specified LOD layer can be a lower LOD layer in the LOD structure. For example, the shift coefficients of the vertices in LOD layers level2 and level3 are dequantized based on the connection relationship between the vertices in the subdivision mesh.
[0179] In some embodiments, the encoder adopts different dequantization precisions when dequantizing the shift coefficients of the vertices according to different importance of the vertices.
[0180] Optionally, the inverse quantization precision of the shift coefficient is positively correlated with the importance of the vertex, that is, the higher the importance of the vertex, the higher the inverse quantization precision of the shift coefficient of the vertex (the smaller the precision loss after quantization and inverse quantization), and the lower the importance of the vertex, the lower the inverse quantization precision of the shift coefficient of the vertex (the higher the precision loss after quantization and inverse quantization, but the higher the compression rate).
[0181] In step 803, the grid is reconstructed based on the inverse quantized shift coefficient to obtain a reconstructed grid.
[0182] After the inverse quantization of the shift coefficient of each vertex is completed, the decoder further performs inverse transform processing on the inverse quantized shift coefficient (transforms the shift coefficient from the frequency domain to the spatial domain) to obtain the inverse transformed shift coefficient (i.e., the reconstructed shift coefficient).
[0183] Further, the decoder performs three-dimensional grid reconstruction based on the reconstructed shift coefficient and the geometric information of the base grid to obtain a reconstructed grid.
[0184] In a possible implementation, the decoder reconstructs the base grid based on the geometric information of the base grid, and then subdivides the base grid to obtain the geometric information of each vertex in the subdivided grid. Based on the geometric information of the vertex in the subdivided grid and the shift coefficient, the decoder performs grid reconstruction to obtain a reconstructed grid.
[0185] Illustratively, as shown in FIG. 9, the decoder adds the geometric position of the vertex in the reconstructed subdivided grid 91 in the same LOD layer to the shift coefficient of the same vertex in the shift coefficient 92, that is, the reconstructed geometric information of the vertex is obtained, and after the reconstruction of each vertex in the LOD structure is completed, the reconstructed grid 93 is obtained.
[0186] In summary, in the embodiments of the present application, because the importance of each vertex in the subdivided grid in space is different, when the shift coefficient of the vertex of the subdivided grid is encoded and decoded, the shift coefficient is quantized and inverse quantized based on the connection relationship between the vertices, the high importance vertices are high-precision quantized, the reconstruction quality of the subsequent three-dimensional grid is improved, the low importance vertices are low-precision quantized, the encoding and decoding efficiency of the three-dimensional grid is improved, and the encoding code rate is reduced.
[0187] In a possible way, when the same quantization coefficient is used for the vertices in the same LOD layer, the inverse quantization process of the shift coefficient of the vertex can be represented as:
[0188] where Res i is the shift coefficient before inverse quantization, InvRes i is the shift coefficient after inverse quantization, bitDepth is the effective bit depth of the shift coefficient, QP Lvlquantization coefficients of the current LOD layer.
[0189] However, when the scheme provided in the embodiments of the present application is adopted, in a possible implementation, the decoder determines the weight coefficient of the vertex based on the connection relationship between the vertices in the subdivision mesh, and then dequantizes the shift coefficient of the vertex based on the weight coefficient.
[0190] The greater the weight coefficient, the higher the importance of the vertex, and the smaller the weight coefficient, the lower the importance of the vertex.
[0191] In some embodiments, the weight coefficient scales the dequantization result of the scaled shift coefficient.
[0192] Illustratively, the process can be represented as:
[0193] weight = numofneighbors i weight is the weight coefficient of the vertex with index i.
[0194] In some other embodiments, the weight coefficient is used to adjust the quantization coefficient of the LOD layer to which the current vertex belongs.
[0195] In a possible implementation, the encoder can determine the quantization coefficient adjustment amount (which can be positive, negative or 0) of the vertex based on the weight coefficient of the vertex and the corresponding relationship between the weight coefficient and the quantization coefficient adjustment amount, adjust the quantization coefficient of the LOD layer to which the current vertex belongs based on the quantization coefficient adjustment amount, and then dequantize the shift coefficient of the current vertex based on the adjusted quantization coefficient. The present embodiment is not limited in this regard.
[0196] Regarding the determination process of the weight coefficient, as shown in FIG. 10, the process can include the following steps.
[0197] Step 1001: Determine the number of adjacent vertices of the vertex based on the connection relationship between the vertices in the subdivision mesh.
[0198] Regarding the manner of determining the number of adjacent vertices, in a possible implementation, the decoder traverses the triangular patches (composed of three vertices) of the subdivision mesh to obtain the index of the triangular patch to which each vertex belongs, and then determines the number of non-repeated edges in which each vertex is located based on the index, which is the number of adjacent vertices of the vertex, numofneighbors i .
[0199] Step 1002: Determine the weight coefficient of the vertex based on the number of adjacent vertices of the vertex, and the weight coefficient is positively correlated with the number of adjacent vertices.
[0200] The more the number of adjacent vertices of a vertex, the more the vertex is located in a dense vertex distribution area, and the more the vertex participates in neighborhood prediction, and the greater the influence on the mesh reconstruction quality. Conversely, the fewer the number of adjacent vertices of a vertex, the more the vertex is located in a sparse vertex distribution area, and the fewer the vertex participates in neighborhood prediction, and the smaller the influence on the mesh reconstruction quality. Therefore, the weight coefficient of a vertex is positively correlated with the number of adjacent vertices of the vertex, that is, the more the number of adjacent vertices of a vertex, the greater the weight coefficient of the vertex, and the fewer the number of adjacent vertices of a vertex, the smaller the weight coefficient of the vertex.
[0201] Because the overall vertex distribution of different subdivision meshes is different, for example, the overall vertex distribution of some subdivision meshes is dense, and the overall vertex distribution of some subdivision meshes is sparse, when determining the weight coefficient of a vertex, a hyperparameter suitable for the current subdivision mesh needs to be determined, so as to determine the weight coefficient of the vertex based on the number of adjacent vertices of the vertex and the hyperparameter.
[0202] In some embodiments, the decoder can acquire the hyperparameter in how way.
[0203] Method one, parsing a code stream to obtain the hyperparameter.
[0204] In a possible implementation, the hyperparameter is a frame-level parameter, that is, the encoder determines the hyperparameter corresponding to each frame, and writes the hyperparameter into the code stream of the corresponding frame. Correspondingly, the decoder parses the hyperparameter corresponding to each frame from the code stream.
[0205] In some embodiments, the decoder parses a newly-added syntax element afve_quantization_parameters_enable_flag in the code stream, and if the value of afve_quantization_parameters_enable_flag is 1, it indicates that the hyperparameter is used, and further parses a newly-added syntax element afve_quantization_hyper_parameter in the code stream, and determines the value of afve_quantization_hyper_parameter as the hyperparameter.
[0206] Method two, determining the hyperparameter based on the number of adjacent vertices of each vertex in the subdivision mesh.
[0207] Because the encoding end and the decoding end can both acquire the number of adjacent vertices of each vertex in the subdivision mesh, in a possible implementation, the encoding and decoding ends adaptively determine the hyperparameter based on the same hyperparameter determination rule, that is, the encoding end does not need to write the determined hyperparameter into the code stream.
[0208] In some embodiments, the decoder can determine the hyper parameter adaptively based on the number of neighboring vertices in the following ways.
[0209] Way 1, the hyper parameter is the number of neighboring vertices with the highest occurrence frequency.
[0210] In a possible implementation, the decoder counts the occurrence frequency of different numbers of neighboring vertices, and determines the number of neighboring vertices with the highest occurrence frequency as the hyper parameter.
[0211] In an illustrative example, when the number of neighboring vertices 6 has the highest occurrence frequency, the encoder determines the hyper parameter as 6.
[0212] Way 2, the hyper parameter is the maximum number of neighboring vertices of all vertices.
[0213] In a possible implementation, the decoder sorts the number of neighboring vertices of all vertices, and determines the maximum number of neighboring vertices as the hyper parameter.
[0214] Way 3, the hyper parameter is the average number of neighboring vertices of all vertices.
[0215] In a possible implementation, the decoder calculates the average number of neighboring vertices of all vertices, and determines the average number of neighboring vertices as the hyper parameter.
[0216] Way 4, the hyper parameter is the median number of neighboring vertices of all vertices.
[0217] In a possible implementation, the decoder sorts the number of neighboring vertices of all vertices, and determines the median number of neighboring vertices as the hyper parameter.
[0218] Of course, in addition to determining the hyper parameter in the above ways, in other possible implementations, the decoder can determine the hyper parameter based on the number of neighboring vertices of part of the vertices, or determine the hyper parameter by weighted average of the number of neighboring vertices of vertices in different LOD layers, and the embodiments of the present application do not limit the specific determination way of the hyper parameter.
[0219] In a possible implementation, the decoder determines the ratio of the number of neighboring vertices to the hyper parameter as the hyper parameter. The determination process of the weight coefficient of a vertex can be represented as: weight i = numOfNeighbors i / hyperParameter
[0220] wherein, numOfNeighbors i is the number of neighboring vertices of a vertex with index i, and hyperParameter is the hyper parameter.
[0221] In some embodiments, in the case that the hyperparameter is the number of adjacent vertices with the highest occurrence frequency, if the number of adjacent vertices of the current vertex is greater than the hyperparameter, it indicates that the importance of the vertex is higher than that of most vertices, and the weight coefficient of the current vertex is greater than 1; if the number of adjacent vertices of the current vertex is less than the hyperparameter, it indicates that the importance of the vertex is lower than that of most vertices, and the weight coefficient of the current vertex is less than 1.
[0222] In the above embodiments, the weight coefficient of the vertex is determined based on the number of adjacent vertices of the vertex, so that the important vertex with more adjacent vertices has a larger weight coefficient, thereby realizing fine quantization of the important vertex, ensuring the quantization accuracy of the important vertex, and reducing the accuracy loss of the shift coefficient before and after quantization; and the non-important vertex with fewer adjacent vertices has a smaller weight coefficient, thereby realizing coarse quantization of the non-important vertex and improving the compression rate of the shift coefficient of the non-important vertex.
[0223] After the weight coefficient of the vertex is determined through the above steps, in a possible implementation, the decoder determines the LOD structure of the vertices in the subdivision mesh, and performs dequantization on the shift coefficient of the vertex in the current LOD layer based on the quantization coefficient corresponding to the current LOD layer and the weight coefficient.
[0224] In a possible implementation, the quantization parameter corresponding to the current LOD layer is determined based on the initial quantization parameter and the scaling parameter of the quantization parameter between LOD layers.
[0225] The initial quantization parameter is the quantization coefficient of the topmost LOD layer (level 0) in the LOD structure. Correspondingly, the quantization parameter of each LOD layer can be represented as: QP Lvl = liftingQP x Scale Lvl-1
[0226] The liftingQP is the initial quantization coefficient, and the Scale is the scaling parameter of the quantization parameter between LOD layers.
[0227] For example, when the scaling parameter is 0.5, it indicates that the quantization coefficient of each LOD layer is multiplied by 0.5 based on the previous layer.
[0228] In another possible implementation, the quantization parameter corresponding to the current LOD layer is determined based on the initial quantization parameter and the difference value of the quantization parameter between LOD layers.
[0229] Optionally, the difference value of the quantization parameter between different LOD layers can be the same or different.
[0230] In the case that the difference value of the quantization parameter between different LOD layers is the same, the quantization parameter of each LOD layer can be represented as: QP LvlliftingQP-deltaQP*(Lvl-1)
[0231] wherein liftingQP is the initial quantized coefficient, and deltaQP is the quantization parameter difference between the LOD layers.
[0232] In some embodiments, since the effective bit depth of the shifted coefficient can be obtained before the shifted coefficient is dequantized, the decoder can clip the dequantized shifted coefficient based on the effective bit depth of the shifted coefficient after the shifted coefficient is dequantized, so as to improve the reconstruction quality of the three-dimensional mesh geometry information. The effective bit depth of the shifted coefficient is bitDepth.
[0233] In a possible implementation, as shown in FIG. 11, the mesh reconstruction based on the dequantized shifted coefficient can include the following steps.
[0234] Step 1101, based on the LOD structure of the vertices in the subdivision mesh, inverse transform the dequantized shifted coefficient of the vertices to obtain the inverse transformed shifted coefficient.
[0235] In contrast to the encoding end that first transforms the shifted coefficient and then quantizes the transformed shifted coefficient, after the decoder completes the dequantization of the shifted coefficient, the dequantized shifted coefficient needs to be further inverse transformed (from the frequency domain to the spatial domain) to obtain the inverse transformed shifted coefficient.
[0236] In a possible implementation, the decoder inverse transforms the dequantized shifted coefficient based on the LOD structure of the vertices in the subdivision mesh, and transforms the dequantized shifted data from the frequency domain to the spatial domain.
[0237] In contrast to the transformation process that first predicts and then updates, the inverse transformation process first updates and then predicts. In the updating process, the decoder updates the shifted coefficient of the vertex in the upper LOD layer based on the prediction residual of the shifted coefficient of the vertex in the lower LOD layer. In the prediction process, the decoder predicts the shifted coefficient of the vertex in the lower LOD layer based on the shifted coefficient of the vertex in the upper LOD layer.
[0238] Optionally, this step includes the following substep:
[0239] Substep 1, for the current vertex in the current LOD layer, update the shifted coefficient of the current vertex based on the prediction residual of the shifted coefficient of the vertex in the lower LOD layer.
[0240] The decoder updates the shifted coefficient of the vertex in the LOD layer from top to bottom (for example, in the order of level0, level1, level2) according to the LOD structure.
[0241] In some embodiments, the decoder obtains, through inverse quantization, the prediction residual of the vertex in the highest LOD layer in the LOD structure and the prediction residual of the shift coefficient of the vertex in the rest LOD layers. For a current vertex in a current LOD layer, the decoder determines, from a lower LOD layer, a predicted vertex that is predicted by the current vertex, and updates the shift coefficient of the current vertex based on the prediction residual of the predicted vertex and an update weight.
[0242] Optionally, the lower LOD layer can be an adjacent lower LOD layer of the current LOD layer. For example, the current LOD layer is level 0, and the lower LOD layer can be level 1. Alternatively, the lower LOD layer can be any lower LOD layer of the current LOD layer in the LOD structure. For example, the current LOD layer is level 3, and the lower LOD layer can be level 1, level 2 or level 3.
[0243] For example, the current LOD layer is level 0, and the vertex A in level 0 is used for the prediction of the vertices BCDE in level 1. The decoder updates the shift coefficient of the vertex A based on the respective prediction residual of the vertices BCDE. For another example, the vertex F in level 0 is used for the prediction of the vertices GHI in level 1. The decoder updates the shift coefficient of the vertex F based on the respective prediction residual of the vertices GHI.
[0244] In some embodiments, the decoder updates the shift coefficient of the current vertex based on the prediction residual of the shift coefficient of the vertex in the lower LOD layer and a preset update weight.
[0245] Illustratively, the update of the shift coefficient of the vertex in the current LOD layer can be represented as:
[0246] wherein signal- represents the subtraction operation of the shift coefficient of the vertex in the current LOD layer and the prediction residual, updateWeight is the preset update weight (e.g., 1 / 8), P is the set of predicted vertices, and signal i is the prediction residual of the i-th predicted vertex.
[0247] Sub-step 2. When the shift coefficient of the vertex in the current LOD layer is updated, the shift coefficient of the vertex in the lower LOD layer is predicted based on the updated shift coefficient of the vertex in the current LOD layer.
[0248] Since in the LOD structure, the vertices in the lower LOD are determined by the vertices in the upper LOD through linear interpolation, i.e., the geometric position coordinates of the vertices in the upper LOD and the lower LOD are associated, the decoder can predict the shift coefficients of the vertices in the lower LOD based on the shift coefficients of the vertices in the upper LOD.
[0249] After the decoder updates the shift coefficients of the vertices in the current LOD layer through the above sub-step 1, the decoder predicts the shift coefficients of the vertices in the lower LOD based on the updated shift coefficients of the vertices in the current LOD layer.
[0250] Optionally, the lower LOD can be an adjacent lower LOD of the current LOD layer. For example, the current LOD layer is level 0, and the lower LOD can be level 1. Alternatively, the lower LOD can be any lower LOD of the current LOD layer in the LOD structure. For example, the current LOD layer is level 3, and the lower LOD can be level 1, level 2, or level 3.
[0251] In a possible implementation, for a vertex in the lower LOD, the decoder determines two adjacent vertices in the current LOD layer that are collinear with the vertex, and thus obtains a predicted value of the shift coefficient of the vertex based on the shift coefficients of the adjacent vertices and a prediction weight.
[0252] In some embodiments, the decoder predicts the shift coefficients of the vertices in the lower LOD based on the updated shift coefficients of the vertices in the current LOD layer and a preset prediction weight.
[0253] Illustratively, the predicted shift coefficient of the vertex can be expressed as: signal = predWeight × (Neigh1 + Neigh2)
[0254] where signal is the predicted shift coefficient of the vertex in the lower LOD, predWeight is a preset prediction weight (e.g., 1 / 2), and Neigh1 and Neigh2 are the shift coefficients of the two adjacent vertices in the current LOD layer that are collinear with the vertex in the lower LOD.
[0255] In a subsequent process, the decoder updates the predicted shift coefficient based on a prediction residual of the shift coefficient of the vertex in the lower LOD.
[0256] In step 1102, the decoder reconstructs the mesh based on the inverse-transformed shift coefficients and the geometric information of the base mesh, to obtain a reconstructed mesh.
[0257] The decoder performs the above inverse transform process on each LOD layer in the LOD structure. When the inverse transform is completed on the vertices in each LOD layer, the decoder performs three-dimensional mesh reconstruction based on the inverse-transformed shift coefficients and the base mesh to obtain a reconstructed mesh. The specific process of reconstructing the three-dimensional mesh can refer to step 803, and will not be described here in this embodiment.
[0258] In the above embodiments, the weight coefficient of the vertex only affects the dequantization process. To further improve the coding efficiency, the encoder can apply the weight coefficient to the transform process of the shift coefficient, and correspondingly, the decoder applies the weight coefficient of the vertex to the inverse transform process of the shift coefficient.
[0259] Optionally, applying the weight coefficient to the inverse transform process of the shift coefficient can include at least one of the following modes.
[0260] In mode 1, the shift coefficient of the current vertex is updated based on the predicted residual of the shift coefficient of the vertex in the lower LOD and the weight coefficient of the vertex in the lower LOD.
[0261] Unlike using a preset update weight to update the shift coefficient of the vertex in the current LOD layer, in this embodiment, the decoder determines the dynamic update weight of each vertex based on the weight coefficient of the vertex. The greater the weight coefficient of the vertex, the greater the corresponding dynamic update weight; otherwise, the smaller the weight coefficient of the adjacent vertex, the smaller the corresponding dynamic update weight.
[0262] Optionally, when the encoder applies the weight coefficient to the update stage of the transform process, the decoder needs to apply the weight coefficient to the update stage of the inverse transform process.
[0263] In a possible implementation, the decoder determines the weight coefficient of the vertex in the lower LOD as the dynamic update weight, and determines the fusion weight (sumWeight) based on the weight coefficient, so as to update the shift coefficient of the vertex in the current LOD layer based on the shift coefficient of the vertex, the dynamic update weight, and the fusion weight.
[0264] The update of the shift coefficient of the vertex in the current LOD layer can be represented as:
[0265] Wherein, signal- represents the subtraction operation of the shift coefficient of the vertex in the current LOD layer and the predicted residual, updateWeight is a preset update weight (for example, the value is 1 / 8), P set is a set of predicted vertices, signal i predWeight1+predWeight2.
[0266] In application mode 2, the shift coefficient of a vertex in a lower LOD layer is predicted based on the updated shift coefficient of a vertex in a current LOD layer and the weight coefficient of the vertex in the current LOD layer.
[0267] Unlike the shift coefficient of a current vertex being predicted by using a preset prediction weight, in the embodiment, the decoder determines the dynamic prediction weight of each of the neighboring vertices based on the weight coefficient of the neighboring vertices. In this case, the greater the weight coefficient of a neighboring vertex, the greater the dynamic prediction weight corresponding to the neighboring vertex; and vice versa.
[0268] Optionally, when the weight coefficient is applied to the prediction stage of the transformation process at the encoding end, the decoder needs to apply the weight coefficient to the prediction stage of the inverse transformation process.
[0269] In a possible implementation, the decoder determines the weight coefficient of a vertex in a current LOD layer as a dynamic prediction weight, and determines a fusion weight (sumWeight) based on the weight coefficient, so as to predict the shift coefficient of a vertex in a lower LOD layer based on the shift coefficient of the vertex in the current LOD layer, the dynamic prediction weight and the fusion weight.
[0270] Illustratively, the dynamic prediction weights of two vertices in a current LOD layer can be represented as: predWeight1=numOfNeighbors1 predWeight2=numOfNeighbors2
[0271] In this case, weight1 and weight2 are the weight coefficients respectively corresponding to the two vertices in the current LOD layer.
[0272] The shift coefficient of a vertex in a lower LOD layer can be represented as:
[0273] In this case, Neigh1 and Neigh2 are the shift coefficients of two vertices in a current LOD layer that are collinear with the vertex in a lower LOD layer, and sumWeight=predWeight1+predWeight2.
[0274] In the above embodiment, the weight coefficient is applied to the prediction and / or updating process of the shift coefficient, which helps to improve the prediction accuracy in the inverse transformation process and the accuracy of the updated shift coefficient, and further improves the reconstruction quality of the three-dimensional mesh.
[0275] Please refer to FIG. 12, which shows the structural block diagram of a three-dimensional mesh encoding device provided by an exemplary embodiment of the present application. The device comprises:
[0276] The encoding unit 1201 is configured to determine the shift coefficient of a vertex in a subdivided mesh.
[0277] The encoding unit 1201 is configured to quantize the shift coefficient of the vertex based on the connection relationship between the vertices in the subdivision mesh.
[0278] The encoding unit 1201 is configured to encode the quantized shift coefficient.
[0279] Optionally, the encoding unit 1201 is configured to:
[0280] determine a weight coefficient of the vertex based on the connection relationship between the vertices in the subdivision mesh.
[0281] quantize the shift coefficient of the vertex based on the weight coefficient.
[0282] Optionally, the encoding unit 1201 is configured to:
[0283] determine a number of adjacent vertices of the vertex based on the connection relationship between the vertices in the subdivision mesh.
[0284] determine the weight coefficient of the vertex based on the number of adjacent vertices of the vertex, the weight coefficient being positively correlated with the number of adjacent vertices.
[0285] Optionally, the encoding unit 1201 is configured to:
[0286] determine a hyperparameter based on the number of adjacent vertices of each vertex in the subdivision mesh.
[0287] determine the weight coefficient of the vertex based on the number of adjacent vertices and the hyperparameter.
[0288] Optionally, the hyperparameter is the number of adjacent vertices with the highest occurrence frequency.
[0289] or,
[0290] the hyperparameter is a maximum value of the number of adjacent vertices of each vertex.
[0291] or,
[0292] the hyperparameter is an average value of the number of adjacent vertices of each vertex.
[0293] or,
[0294] the hyperparameter is a median value of the number of adjacent vertices of each vertex.
[0295] Optionally, the weight coefficient is a ratio of the number of adjacent vertices to the hyperparameter.
[0296] Optionally, the encoding unit 1201 is configured to:
[0297] write the super parameter into a bitstream.
[0298] Optionally, the encoding unit 1201 is configured to:
[0299] transform the shift coefficient of the vertex based on the LOD structure of the vertex in the subdivision mesh, to obtain a transformed shift coefficient of the vertex;
[0300] quantize the transformed shift coefficient of the vertex based on the weight coefficient, in a case that the transformation of each vertex in the subdivision mesh is completed.
[0301] Optionally, the encoding unit 1201 is configured to:
[0302] predict the shift coefficient of a current vertex in a current LOD layer based on neighboring vertices of the current vertex in an upper LOD layer;
[0303] update the shift coefficient of the vertex in the upper LOD layer based on a prediction residual of the shift coefficient of the vertex in the current LOD layer, in a case that the shift coefficient prediction of the vertex in the current LOD layer is completed.
[0304] Optionally, the encoding unit 1201 is configured to:
[0305] predict the shift coefficient of the current vertex based on the neighboring vertices of the current vertex in the upper LOD layer and a preset prediction weight;
[0306] or,
[0307] predict the shift coefficient of the current vertex based on the neighboring vertices of the current vertex in the upper LOD layer and the weight coefficient of the neighboring vertices.
[0308] Optionally, the encoding unit 1201 is configured to:
[0309] update the shift coefficient of the vertex in the upper LOD layer based on a prediction residual of the shift coefficient of the vertex in the current LOD layer and a preset update weight;
[0310] or,
[0311] update the shift coefficient of the vertex in the upper LOD layer based on the prediction residual of the shift coefficient of the vertex in the current LOD layer and the weight coefficient of the vertex in the current LOD layer.
[0312] Optionally, the encoding unit 1201 is configured to:
[0313] quantize the transformed shift coefficient of a vertex in the current LOD layer based on a quantization coefficient corresponding to the current LOD layer and the weight coefficient.
[0314] Optionally, the quantization parameter corresponding to the current LOD layer is determined based on an initial quantization parameter and a scaling parameter of the quantization parameter between LOD layers.
[0315] Or,
[0316] The quantization parameter corresponding to the current LOD layer is determined based on an initial quantization parameter and a quantization parameter difference between LOD layers.
[0317] Please refer to FIG. 13, which shows a structural block diagram of a three-dimensional mesh decoding apparatus provided by an example embodiment of the present application. The apparatus includes:
[0318] The decoding unit 1301 is configured to parse a code stream to obtain a shift coefficient of a vertex in a subdivision mesh.
[0319] The decoding unit 1301 is configured to perform inverse quantization on the shift coefficient of the vertex based on a connection relationship between the vertices in the subdivision mesh.
[0320] The decoding unit 1301 is configured to perform mesh reconstruction based on the inverse quantized shift coefficient to obtain a reconstructed mesh.
[0321] Optionally, the decoding unit 1301 is configured to:
[0322] determine a weight coefficient of the vertex based on the connection relationship between the vertices in the subdivision mesh.
[0323] perform inverse quantization on the shift coefficient of the vertex based on the weight coefficient.
[0324] Optionally, the decoding unit 1301 is configured to:
[0325] determine a number of adjacent vertices of the vertex based on the connection relationship between the vertices in the subdivision mesh.
[0326] determine the weight coefficient of the vertex based on the number of adjacent vertices of the vertex, the weight coefficient being positively correlated with the number of adjacent vertices.
[0327] Optionally, the decoding unit 1301 is configured to:
[0328] parse the code stream to obtain a hyperparameter.
[0329] determine the weight coefficient of the vertex based on the number of adjacent vertices and the hyperparameter.
[0330] Optionally, the decoding unit 1301 is configured to:
[0331] determine a hyper-parameter based on the number of adjacent vertices of each vertex in the subdivision mesh;
[0332] determine the weight coefficient of the vertex based on the number of adjacent vertices and the hyper-parameter.
[0333] Optionally, the hyper-parameter is the number of adjacent vertices with the highest frequency of occurrence.
[0334] Or,
[0335] the hyper-parameter is the maximum value of the number of adjacent vertices of each vertex.
[0336] Or,
[0337] the hyper-parameter is the average value of the number of adjacent vertices of each vertex.
[0338] Or,
[0339] the hyper-parameter is the median value of the number of adjacent vertices of each vertex.
[0340] Optionally, the weight coefficient is the ratio of the number of adjacent vertices to the hyper-parameter.
[0341] Optionally, the decoding unit 1301 is configured to:
[0342] determine the LOD structure of the vertex in the subdivision mesh;
[0343] dequantize the shift coefficient of the vertex in the current LOD layer based on the quantization coefficient corresponding to the current LOD layer and the weight coefficient.
[0344] Optionally, the quantization parameter corresponding to the current LOD layer is determined based on an initial quantization parameter and a scaling parameter of the quantization parameter between LOD layers.
[0345] Or,
[0346] the quantization parameter corresponding to the current LOD layer is determined based on an initial quantization parameter and a difference value of the quantization parameter between LOD layers.
[0347] Optionally, the decoding unit 1301 is configured to:
[0348] perform inverse transformation on the dequantized shift coefficient of the vertex based on the LOD structure of the vertex in the subdivision mesh, to obtain the inverse-transformed shift coefficient;
[0349] perform mesh reconstruction based on the inverse-transformed shift coefficient and the geometric information of the base mesh, to obtain the reconstructed mesh.
[0350] Optionally, the decoding unit 1301 is configured to:
[0351] update the shift coefficient of the current vertex based on a predicted residual of the shift coefficient of the vertex in the lower LOD and a preset update weight;
[0352] update the shift coefficient of the vertex in the lower LOD based on the updated shift coefficient of the vertex in the current LOD.
[0353] Optionally, the decoding unit 1301 is configured to:
[0354] update the shift coefficient of the current vertex based on a predicted residual of the shift coefficient of the vertex in the lower LOD and a preset update weight;
[0355] or,
[0356] update the shift coefficient of the current vertex based on a predicted residual of the shift coefficient of the vertex in the lower LOD and the weight coefficient of the vertex in the lower LOD.
[0357] Optionally, the decoding unit 1301 is configured to:
[0358] update the shift coefficient of the vertex in the lower LOD based on the updated shift coefficient of the vertex in the current LOD and a preset prediction weight;
[0359] or,
[0360] update the shift coefficient of the vertex in the lower LOD based on the updated shift coefficient of the vertex in the current LOD and the weight coefficient of the vertex in the current LOD.
[0361] Optionally, the decoding unit 1301 is configured to:
[0362] perform clipping processing on the dequantized shift coefficient based on a shift coefficient effective bit depth.
[0363] It should be noted that the process of the decoding unit implementing mesh decoding can refer to the above-mentioned three-dimensional mesh decoding method embodiments, and the process of the encoding unit implementing mesh encoding can refer to the above-mentioned three-dimensional mesh encoding method embodiments, which will not be described here in detail.
[0364] Referring to FIG. 14, a structural block diagram of an encoder is shown according to an example embodiment of the present application. The encoder can include one or more of the following components: a processor 1401, a memory 1402. The various components are coupled together by a bus system, which can include a data bus, a power bus, a control bus, and a state signal bus. It will be appreciated that the bus system is configured to permit data and control signals to be communicated between components of the encoder.
[0365] The memory 1402 is configured to store computer programs capable of running on the processor 1401; and the processor 1401 is configured to execute the following steps when running the computer programs:
[0366] determining a shift coefficient of a vertex in a subdivision mesh;
[0367] quantizing the shift coefficient of the vertex based on a connection relationship between the vertices in the subdivision mesh;
[0368] encoding the quantized shift coefficient.
[0369] It can be understood that the memory 1402 in the embodiments of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. The non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically EPROM (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM) used as an external cache. By way of example, and not limitation, many forms of RAM can be used, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and direct Rambus RAM (DRRAM). The description of the memory 1402 herein is intended to include, but not be limited to, these and any other suitable types of memory.
[0370] The processor 1401 can be an integrated circuit chip having a processing capability for signals. In implementation, each step of the three-dimensional grid encoding method described above can be completed by integrated logic circuits of hardware in the processor 1401 or instructions in the form of software. The processor 1401 described above can be a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as a hardware code processor to complete, or be executed by a combination of hardware and software modules in the code processor. The software module can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register or other mature storage medium in the art. The storage medium is located in the memory 1402, and the processor 1401 reads the information in the memory 1402 and completes the steps of the method in combination with the hardware. It can be understood that the embodiments described in the present application can be realized by hardware, software, firmware, middleware, microcode or their combination. For hardware implementation, the processing unit can be realized in one or more ASICs, DSPs, digital signal processing devices (DSPDs), programmable logic devices (PLDs), FPGAs, general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for executing functions described in the present application or their combination. For software implementation, the technology described in the present application can be realized by modules (such as processes, functions, etc.) for executing functions described in the present application. The software code can be stored in the memory and executed by the processor. The memory can be implemented in the processor or outside the processor. Alternatively, as another embodiment, the processor 1401 is also configured to execute the three-dimensional grid encoding method described in any one of the preceding embodiments when running the computer program.
[0371] Referring to FIG. 15, a structural block diagram of a decoder is shown according to an example embodiment of the present application. The decoder can include one or more of the following components: a processor 1501, a memory 1502. The various components are coupled together by a bus system, which can include a data bus, a power bus, a control bus, and a state signal bus. It will be appreciated by those skilled in the art that the bus system is configured to enable communications in each of the directions.
[0372] The memory 1502 is configured to store computer programs capable of running on the processor 1501; and the processor 1501 is configured to execute the following when running the computer programs:
[0373] parsing a bitstream to obtain shift coefficients of vertices in a subdivision mesh;
[0374] performing dequantization on the shift coefficients of the vertices based on a connection relationship between the vertices in the subdivision mesh;
[0375] performing mesh reconstruction based on the dequantized shift coefficients to obtain a reconstructed mesh.
[0376] It can be understood that the memory 1502 in the embodiments of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. The non-volatile memory can be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically EPROM (EEPROM), or a flash memory. The volatile memory can be a Random Access Memory (RAM) used as an external cache. By way of example, and not limitation, many forms of RAM can be used, such as a Static RAM (SRAM), a Dynamic RAM (DRAM), a Synchronous DRAM (SDRAM), a Double Data Rate SDRAM (DDR SDRAM), an Enhanced SDRAM (ESDRAM), a Synchlink DRAM (SLDRAM), and a Direct Rambus RAM (DRRAM). The description of the memory 1502 herein is intended to include, but not be limited to, these and any other suitable types of memory.
[0377] The processor 1501 can be an integrated circuit chip having a processing capability of signals. In the implementation process, each step of the three-dimensional trellis decoding method described above can be completed by the integrated logic circuit of hardware in the processor 1501 or the instruction in the form of software. The processor 1501 described above can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. The disclosed methods, steps and logic block diagrams in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as a hardware decoding processor for execution, or executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a random access memory, a flash memory, a read only memory, a programmable read only memory or an electrically erasable programmable memory, a register or other mature storage medium in the art. The storage medium is located in the memory 1502, and the processor 1501 reads the information in the memory 1502, and combines the hardware to complete the steps of the method described above. It can be understood that the embodiments described in the present application can be realized by hardware, software, firmware, middleware, microcode or their combination. For hardware implementation, the processing unit can be realized in one or more ASIC, DSP, digital signal processing device (DSP Device, DSPD), programmable logic device (Programmable Logic Device, PLD), FPGA, general processor, controller, microcontroller, microprocessor, other electronic units for executing the functions described in the present application or their combination. For software implementation, the technology described in the present application can be realized by modules (such as processes, functions, etc.) for executing the functions described in the present application. The software code can be stored in the memory and executed by the processor. The memory can be implemented in the processor or outside the processor. Alternatively, as another embodiment, the processor 1501 is also configured to execute the three-dimensional trellis decoding method described in any one of the preceding embodiments when running the computer program.
[0378] The embodiment of the present application further provides a nonvolatile computer readable storage medium for storing a code stream, the code stream being generated by using a three-dimensional grid encoding method of an encoder, or the code stream being decoded by using a three-dimensional grid decoding method of a decoder, wherein the three-dimensional grid encoding method is the three-dimensional grid encoding method described in the above embodiments, and the three-dimensional grid decoding method is the three-dimensional grid decoding method described in the above embodiments.
[0379] The embodiment of the present application further provides a computer program product, which comprises computer instructions stored in a computer readable storage medium, and a processor acquires the computer instructions from the computer readable storage medium, and executes the computer instructions to implement the three-dimensional grid encoding method or the three-dimensional grid decoding method described in the above embodiments.
[0380] Those skilled in the art can realize that, in one or more examples described above, the functions described in the embodiments of the present application can be implemented by hardware, software, firmware or any combination thereof. When implemented by software, the functions can be stored in a computer readable medium or transmitted as one or more instructions or codes on a computer readable medium. The computer readable medium includes a computer storage medium and a communication medium, wherein the communication medium includes any medium that facilitates the transmission of computer programs from one place to another. The storage medium can be any available medium accessible by a general or special purpose computer.
[0381] The above description is only optional embodiments of the present application, and does not limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A three-dimensional trellis decoding method characterized by comprising: The method comprises: parsing a code stream to obtain shift coefficients of vertices in a subdivision mesh; based on a connection relationship between the vertices in the subdivision mesh, dequantizing the shift coefficients of the vertices; based on the dequantized shift coefficients, performing mesh reconstruction to obtain a reconstructed mesh.
2. The method of claim 1, wherein, The dequantizing the shift coefficients of the vertices based on the connection relationship between the vertices in the subdivision mesh comprises: based on the connection relationship between the vertices in the subdivision mesh, determining weight coefficients of the vertices; based on the weight coefficients, dequantizing the shift coefficients of the vertices.
3. The method of claim 2, wherein, The determining the weight coefficients of the vertices based on the connection relationship between the vertices in the subdivision mesh comprises: based on the connection relationship between the vertices in the subdivision mesh, determining a number of adjacent vertices of the vertices; based on the number of adjacent vertices of the vertices, determining the weight coefficients of the vertices, the weight coefficients being positively correlated with the number of adjacent vertices.
4. The method of claim 3, wherein, The method further comprises: parsing the code stream to obtain a hyperparameter; The determining the weight coefficients of the vertices based on the number of adjacent vertices of the vertices comprises: based on the number of adjacent vertices and the hyperparameter, determining the weight coefficients of the vertices.
5. The method of claim 3, wherein, The determining the weight coefficients of the vertices based on the number of adjacent vertices of the vertices comprises: based on the number of adjacent vertices of each vertex in the subdivision mesh, determining a hyperparameter; based on the number of adjacent vertices and the hyperparameter, determining the weight coefficients of the vertices.
6. The method of claim 5, wherein: the hyperparameter is a number of adjacent vertices with the highest occurrence frequency; or, the hyperparameter is a maximum value of the number of adjacent vertices of each vertex; or, the hyperparameter is an average value of the number of adjacent vertices of each vertex; or, the hyperparameter is a median value of the number of adjacent vertices of each vertex.
7. The method according to claim 4 or 5, characterized in that, the weight coefficient is a ratio of the number of adjacent vertices to the hyperparameter.
8. The method of claim 2, wherein, The dequantizing the shift coefficients of the vertices based on the weight coefficients comprises: determining a LOD structure of the vertices in the subdivision mesh; based on a quantization coefficient corresponding to a current LOD layer and the weight coefficient, dequantizing the shift coefficients of vertices in the current LOD layer.
9. The method of claim 8, wherein: the quantization parameter corresponding to the current LOD layer is determined based on an initial quantization parameter and a scaling parameter of an inter-LOD quantization parameter; or, the quantization parameter corresponding to the current LOD layer is determined based on an initial quantization parameter and a difference value of an inter-LOD quantization parameter. The performing mesh reconstruction based on the dequantized shift coefficients to obtain a reconstructed mesh comprises:
10. The method of claim 1, wherein, based on the LOD structure of the vertices in the subdivision mesh, performing inverse transformation on the dequantized shift coefficients of the vertices to obtain inverse-transformed shift coefficients; based on the inverse-transformed shift coefficients and geometric information of a base mesh, performing mesh reconstruction to obtain the reconstructed mesh. 11. The method of claim 10, wherein, The inverse transformation of the dequantized shift coefficient of the vertex based on the LOD structure of the vertex in the subdivision mesh, to obtain the inverse transformed shift coefficient, comprises: For a current vertex in a current LOD layer, updating the shift coefficient of the current vertex based on a prediction residual of the shift coefficient of a vertex in a lower LOD layer; In a case where the shift coefficient updating of the vertex in the current LOD layer is completed, predicting the shift coefficient of a vertex in a lower LOD layer based on the updated shift coefficient of the vertex in the current LOD layer.
12. The method of claim 11, wherein, The updating of the shift coefficient of the current vertex based on the prediction residual of the shift coefficient of the vertex in the lower LOD layer, comprises: Updating the shift coefficient of the current vertex based on the prediction residual of the shift coefficient of the vertex in the lower LOD layer and a preset update weight; Or, Updating the shift coefficient of the current vertex based on the prediction residual of the shift coefficient of the vertex in the lower LOD layer and the weight coefficient of the vertex in the lower LOD layer.
13. The method of claim 11, wherein, The predicting of the shift coefficient of the vertex in the lower LOD layer based on the updated shift coefficient of the vertex in the current LOD layer, comprises: Predicting the shift coefficient of the vertex in the lower LOD layer based on the updated shift coefficient of the vertex in the current LOD layer and a preset prediction weight; Or, Predicting the shift coefficient of the vertex in the lower LOD layer based on the updated shift coefficient of the vertex in the current LOD layer and the weight coefficient of the vertex in the current LOD layer.
14. The method of claim 1, wherein, The method further comprises: Based on the shift coefficient effective bit depth, performing clipping processing on the dequantized shift coefficient.
15. A three-dimensional trellis encoding method characterized by comprising: The method comprises: Determining the shift coefficient of a vertex in a subdivision mesh; Quantizing the shift coefficient of the vertex based on a connection relationship between the vertices in the subdivision mesh; Encoding the quantized shift coefficient.
16. The method of claim 15, wherein, The quantizing of the shift coefficient of the vertex based on the connection relationship between the vertices in the subdivision mesh, comprises: Determining a weight coefficient of the vertex based on the connection relationship between the vertices in the subdivision mesh; Quantizing the shift coefficient of the vertex based on the weight coefficient.
17. The method of claim 16, wherein, The determining of the weight coefficient of the vertex based on the connection relationship between the vertices in the subdivision mesh, comprises: Determining a number of adjacent vertices of the vertex based on the connection relationship between the vertices in the subdivision mesh; Determining the weight coefficient of the vertex based on the number of adjacent vertices of the vertex, the weight coefficient being positively correlated with the number of adjacent vertices.
18. The method of claim 17, wherein, The determining of the weight coefficient of the vertex based on the number of adjacent vertices of the vertex, comprises: Determining a hyperparameter based on the number of adjacent vertices of each vertex in the subdivision mesh; Determining the weight coefficient of the vertex based on the number of adjacent vertices and the hyperparameter.
19. The method of claim 18, wherein: the hyperparameter is the number of adjacent vertices with the highest frequency of occurrence; or, the hyperparameter is the number of adjacent vertices with the highest frequency of occurrence. The hyper-parameter is a maximum value of the number of adjacent vertices of each vertex; or The hyper-parameter is an average value of the number of adjacent vertices of each vertex; or The hyper-parameter is a median value of the number of adjacent vertices of each vertex.
20. The method of claim 18, wherein, The weight coefficient is a ratio of the number of adjacent vertices to the hyper-parameter.
21. The method of claim 18, wherein, The method further includes: writing the hyper-parameter into a bitstream.
22. The method of claim 16, wherein, The method further includes: transforming the shift coefficient of the vertex based on the LOD structure of the vertex in the subdivision mesh, to obtain a transformed shift coefficient; The quantizing the shift coefficient of the vertex based on the weight coefficient includes: in a case where each vertex in the subdivision mesh is transformed, quantizing the transformed shift coefficient based on the weight coefficient.
23. The method of claim 22, wherein, The transforming the shift coefficient of the vertex based on the LOD structure of the vertex in the subdivision mesh, to obtain a transformed shift coefficient, includes: for a current vertex in a current LOD layer, predicting the shift coefficient of the current vertex based on adjacent vertices of the current vertex in an upper LOD layer; in a case where the shift coefficient of each vertex in the current LOD layer is predicted, updating the shift coefficient of the vertex in the upper LOD layer based on a prediction residual of the shift coefficient of the vertex in the current LOD layer. The predicting the shift coefficient of the current vertex based on the adjacent vertices of the current vertex in the upper LOD layer includes:
24. The method of claim 23, wherein, predicting the shift coefficient of the current vertex based on the adjacent vertices of the current vertex in the upper LOD layer and a preset prediction weight; or predicting the shift coefficient of the current vertex based on the adjacent vertices of the current vertex in the upper LOD layer and the weight coefficient of the adjacent vertices. The updating the shift coefficient of the vertex in the upper LOD layer based on the prediction residual of the shift coefficient of the vertex in the current LOD layer includes: updating the shift coefficient of the vertex in the upper LOD layer based on the prediction residual of the shift coefficient of the vertex in the current LOD layer and a preset update weight; or 25. The method of claim 23, wherein, updating the shift coefficient of the vertex in the upper LOD layer based on the prediction residual of the shift coefficient of the vertex in the current LOD layer and the weight coefficient of the vertex in the current LOD layer. The quantizing the transformed shift coefficient based on the weight coefficient includes: quantizing the transformed shift coefficient of the vertex in the current LOD layer based on a quantization coefficient corresponding to the current LOD layer and the weight coefficient.
27. The method of claim 26, wherein 26. The method of claim 22, wherein, the quantization parameter corresponding to the current LOD layer is determined based on an initial quantization parameter and a scaling parameter of an inter-LOD quantization parameter; or the quantization parameter corresponding to the current LOD layer is determined based on an initial quantization parameter and a difference value of an inter-LOD quantization parameter. The apparatus includes: a decoding unit, configured to parse a bitstream to obtain a shift coefficient of a vertex in a subdivision mesh; 28. A three-dimensional trellis decoding apparatus characterized by comprising: The decoding unit is configured to perform inverse quantization on the shift coefficients of the vertices based on a connection relationship between the vertices in the subdivision mesh. The decoding unit is configured to perform mesh reconstruction based on the inverse quantized shift coefficients to obtain a reconstructed mesh.
29. A three-dimensional trellis encoding apparatus characterized by comprising: The apparatus comprises: An encoding unit configured to determine shift coefficients of vertices in a subdivision mesh. The encoding unit is configured to perform quantization on the shift coefficients of the vertices based on a connection relationship between the vertices in the subdivision mesh. The encoding unit is configured to encode the quantized shift coefficients.
30. A decoder, comprising: The decoder comprises a memory and a processor, the memory is configured to store a computer program running on the processor, and the processor is configured to execute the three-dimensional mesh decoding method according to any one of claims 1 to 14 when running the computer program.
31. An encoder comprising: The encoder comprises a memory and a processor, the memory is configured to store a computer program running on the processor, and the processor is configured to execute the three-dimensional mesh encoding method according to any one of claims 15 to 27 when running the computer program.
32. A non-transitory computer readable storage medium storing a bitstream, wherein The bitstream is generated by using the three-dimensional mesh encoding method of the encoder, or the bitstream is decoded by using the three-dimensional mesh decoding method of the decoder, wherein the three-dimensional mesh decoding method comprises the three-dimensional mesh decoding method according to any one of claims 1 to 14, or the three-dimensional mesh encoding method comprises the three-dimensional mesh encoding method according to any one of claims 15 to 27.
33. A computer program product, characterised in that, The computer program product comprises computer instructions stored in a computer readable storage medium, and a processor acquires the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to implement the three-dimensional mesh decoding method according to any one of claims 1 to 14, or the three-dimensional mesh encoding method according to any one of claims 15 to 27.
Citation Information
Patent Citations
Method and device for encoding three-dimensional grid with quality scalability based on graded quantification
CN102510497A
Coding method, decoding method and terminal
CN116843771A
Coding and decoding method, device and equipment
CN117478901A
Point cloud data transmission device, point cloud data transmission method, point cloud data reception device, and point cloud data reception method
WO2024014935A1
Encoding method, decoding method, code stream, encoder, decoder and storage medium
WO2024021089A1