Three-dimensional grid sequence encoding and decoding method and device

By performing inter-frame matching and code merging on dynamic three-dimensional grid sequences, the problem of dynamic grid sequence compression is solved, and efficient data compression and simplified processing are achieved.

CN118803256APending Publication Date: 2024-10-18XIAN LIGHT CONE VISION TECHNOLOGY CO LTD
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202310405929.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-04-14
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

Existing technologies are difficult to effectively compress dynamic three-dimensional mesh sequences, resulting in large amounts of data, complex processing, storage, and transmission. Existing static mesh compression methods cannot meet the needs of dynamic meshes.

Method used

A three-dimensional grid sequence encoding and decoding method is proposed. By performing inter-frame matching between the reference frame grid and the current frame grid, motion vectors and texture coordinate information are obtained, and coding is merged to form multiple code streams to reduce grids. Information redundancy.

Benefits of technology

It achieves efficient compression of dynamic grid sequences, reduces the bit rate of the code stream, and simplifies the processing, storage and transmission process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118803256A_ABST
    Figure CN118803256A_ABST
Patent Text Reader

Abstract

The invention relates to a three-dimensional grid sequence encoding and decoding method and device, and the encoding method comprises the steps: carrying out the processing of an input reference frame grid and a current frame grid carrying a first attribute graph, and obtaining first information, second information, third information, fourth information and fifth information; at least encoding the first information, the fourth information and the fifth information to form a plurality of code streams including a first code stream, a fourth code stream and a fifth code stream; and combining the plurality of code streams into a bit stream. The decoding method comprises the following steps: demultiplexing coded bit streams of a three-dimensional grid to obtain various code streams including a first code stream, a fourth code stream and a fifth code stream; and decoding and reconstructing each obtained code stream to obtain a decoding and reconstructing grid and a decoding and reconstructing attribute graph. The coding and decoding scheme is used for compressing and coding the dynamic grid sequence with attribute information, grid information redundancy can be reduced, and therefore the bit rate of code streams is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of coding and decoding, and in particular relates to a three-dimensional grid sequence coding and decoding method and device. Background Art

[0002] In recent years, with the rapid development of multimedia technology, related research results have been rapidly industrialized and have become an indispensable part of people's lives. Three-dimensional models have become a new generation of digital media after audio, images, and videos. Three-dimensional grids are a commonly used way to represent three-dimensional models. Compared with traditional multimedia such as images and videos, three-dimensional grid models have stronger interactivity and realism, making them more and more widely used in various fields such as commerce, manufacturing, construction, education, medicine, entertainment, art, and military.

[0003] Although there are many ways to represent 3D meshes, triangular meshes are still the most common representation method. A 3D mesh can be considered to be composed of three basic elements: vertices, edges, and faces. Vertices are the most basic elements in a mesh, and they define a position in a 3D space. Edges are line segments connecting two vertices in a mesh. Faces can be considered as polygons formed by closed paths of edges. For a triangular mesh, each face is a triangle.

[0004] The information contained in the mesh is usually divided into three categories: geometric information, connection information, and attribute information. Geometric information refers to the position of each vertex of the mesh in three-dimensional space. Connection information describes the association between elements in the mesh, that is, the connection relationship between vertices. Attribute information is optional, and it can associate attributes to corresponding mesh elements (such as vertex color, normal vector, etc. can be associated with mesh vertices). Mesh parameterization can also be used to map the mesh from three-dimensional space to a two-dimensional plane area. This mapping relationship is usually described by a set of parameter coordinates, called UV coordinates or texture coordinates, which are associated with mesh vertices. This two-dimensional mapping can be used to represent high-resolution attribute information, such as textures, normal vectors, etc.

[0005] In almost all application fields that use 3D meshes, such as computational simulation, entertainment, medical imaging, digital cultural relics, computer design, e-commerce, etc., as people's demand for the visual effects of 3D mesh models is getting higher and higher, the models are becoming more and more complex, and the accuracy of the models is getting higher and higher. Therefore, the amount of data required to represent the 3D mesh is also increasing accordingly. The above problems have led to the increasing complexity of the processing, visualization, transmission and storage of 3D meshes. 3D mesh compression can be regarded as a way to solve the above problems. It reduces the size of model data and is conducive to the processing, storage and transmission of 3D meshes.

[0006] A dynamic mesh is a mesh sequence composed of multiple static mesh frames, which contains a large amount of information that changes over time. Therefore, efficient compression coding technology is needed to store and transmit this information. There are many mesh compression coding methods, most of which only focus on the compression coding of static meshes. Therefore, it is necessary to propose a new compression coding method to compress dynamic mesh sequences in order to reduce the amount of data. Summary of the invention

[0007] In order to solve the above problems existing in the prior art, the present invention provides a three-dimensional grid sequence encoding and decoding method and device. The technical problem to be solved by the present invention is achieved through the following technical solutions:

[0008] In a first aspect, the present invention provides a three-dimensional grid sequence encoding method, comprising:

[0009] Processing the input reference frame grid and the current frame grid carrying the first attribute map to obtain first information, second information, third information, fourth information and fifth information; wherein the reference frame grid is a grid that has been encoded and reconstructed; the current frame grid is a grid to be encoded; and the fifth information is used for the association and correspondence between the various parts of information and to characterize the encoding scheme;

[0010] Encode at least the first information, the fourth information, and the fifth information to form a plurality of code streams including a first code stream, a fourth code stream, and a fifth code stream;

[0011] The multiple code streams are combined into a bit stream.

[0012] In one embodiment of the present invention, processing an input reference frame mesh and a current frame mesh carrying a first attribute map includes:

[0013] Performing inter-frame matching on the reference frame grid and the current frame grid according to a predetermined matching method to obtain the first information; the first information includes a reference frame list, a temporal motion vector and a motion vector identifier corresponding to each reference frame; and when there is an intra-frame sub-grid in the inter-frame matching, the first information also includes the intra-frame sub-grid;

[0014] The fifth information includes an indication mark of the predetermined matching method.

[0015] In one embodiment of the present invention, when obtaining the first information by using inter-frame matching, after a mismatching area is detected, the motion vector of each vertex in the mismatching area is adjusted so that the vertices in the mismatching area are merged with the matching vertices. The corresponding first information includes a reference frame list, the time domain motion vector corresponding to each reference frame, and the intra-frame sub-grid.

[0016] In one embodiment of the present invention, when performing inter-frame matching, the reference frame mesh vertices are sorted according to a predetermined sorting method to determine the traversal order of the reference frame mesh vertices, wherein the fifth information includes an indication of the predetermined sorting method.

[0017] In one embodiment of the present invention, when there is an intra-frame sub-grid in inter-frame matching, grid simplification processing is performed on the intra-frame sub-grid, and the simplified grid is used as the first intra-frame sub-grid.

[0018] In one embodiment of the present invention, the first information is encoded to form the first code stream; wherein the time domain motion vector is encoded by time domain motion vector to form a first sub-code stream, the motion vector identifier is encoded by motion vector identifier to form a second sub-code stream, and the intra-frame sub-grid or the first intra-frame sub-grid is encoded by intra-frame sub-grid to form a third sub-code stream.

[0019] In one embodiment of the present invention, the second information includes texture coordinates, and the process of obtaining the texture coordinates includes:

[0020] Decoding the first code stream and reconstructing a grid to obtain a first reconstructed grid;

[0021] For each attribute map in the first reconstructed mesh, corresponding texture coordinates are generated by mesh parameterization, and the first reconstructed mesh is updated to obtain a parameterized first reconstructed mesh, wherein the texture coordinates corresponding to each attribute map are specified by the added corresponding identifier.

[0022] In one embodiment of the present invention, if the first reconstructed grid includes: a first reconstructed sub-grid obtained by reconstructing an inter-frame sub-grid, and a second reconstructed sub-grid obtained by reconstructing an intra-frame sub-grid, the first reconstructed sub-grid and the second reconstructed sub-grid are grid-merged to generate corresponding texture coordinates; or, the texture coordinates corresponding to the first reconstructed sub-grid and the second reconstructed sub-grid are respectively obtained; wherein the fifth information includes an identifier for indicating whether the grids are merged.

[0023] In one embodiment of the present invention, the three-dimensional grid sequence encoding method further includes:

[0024] The second information is texture-coordinate encoded to form a second code stream, and is merged with the remaining code streams; wherein, when there are multiple attribute maps, the correspondence between the attribute maps and the texture coordinates is identified; wherein the identification is also used as the content of the fifth information, and the fifth information also includes an identification for indicating whether to perform texture coordinate encoding.

[0025] In one embodiment of the present invention, the third information includes spatial displacement. Accordingly, the three-dimensional grid sequence encoding method further includes:

[0026] Performing mesh subdivision deformation on the parameterized first reconstructed mesh to obtain a subdivision-deformed basic mesh and a spatial displacement of each vertex of the subdivision-deformed basic mesh;

[0027] The spatial displacement or the residual between the spatial displacement and the spatial displacement of the reference frame grid matching point is encoded according to a predetermined encoding method to form a third code stream, and combined with the remaining code streams;

[0028] The fifth information includes an indication mark of a predetermined encoding method of the third code stream.

[0029] In one embodiment of the present invention, the fourth information includes a property graph, and a process of obtaining the property graph includes:

[0030] Decoding and reconstructing the third code stream to obtain a reconstructed spatial domain displacement;

[0031] Reconstructing a subdivided deformed grid using the subdivided basic grid and the reconstructed spatial domain displacement to obtain a second reconstructed grid;

[0032] Utilize the second reconstructed grid, the first attribute graph and the current frame grid to perform attribute graph conversion to obtain a second attribute graph; wherein the second attribute graph is attribute graph encoded to form the fourth bitstream.

[0033] In a second aspect, the present invention provides a three-dimensional grid sequence encoding device, comprising:

[0034] A coding information acquisition module is used to process the input reference frame grid and the current frame grid carrying the first attribute map to obtain first information, second information, third information, fourth information and fifth information; wherein the reference frame grid is a grid that has been encoded and reconstructed; the current frame grid is a grid to be encoded; and the fifth information is used for the association and correspondence between the various parts of information and to characterize the coding scheme;

[0035] an encoding module, configured to encode at least the first information, the fourth information and the fifth information to form a plurality of code streams including a first code stream, a fourth code stream and a fifth code stream;

[0036] The code stream merging module is used to merge the multiple code streams into a bit stream.

[0037] In a third aspect, the present invention provides a three-dimensional grid sequence decoding method, comprising:

[0038] Demultiplexing the bit stream of the three-dimensional grid that has been encoded to obtain multiple code streams including a first code stream, a third code stream, a fourth code stream and a fifth code stream, and decoding each of the obtained code streams;

[0039] The decoded reconstruction grid and the decoded reconstruction attribute map are reconstructed using the second information and the decoded first information, third information, fourth information and fifth information; wherein the fifth information is used for the association correspondence between the various parts of information and to characterize the coding scheme.

[0040] In one embodiment of the present invention, the first information is obtained by decoding the first code stream using fifth information, including:

[0041] When the fifth information indicates that the current frame grid has a time domain motion vector identifier, the first bitstream is decoded using the fifth information to obtain first information including a reference frame list, a time domain motion vector, and a motion vector identifier;

[0042] When the fifth information indicates that the current frame grid does not have a time domain motion vector identifier, the first bitstream is decoded using the fifth information to obtain first information including a reference frame list and a time domain motion vector;

[0043] Furthermore, when there is an intra-frame sub-grid, the first code stream is decoded using the static grid decoder indicated by the fifth information to obtain a second reconstructed sub-grid, and the second reconstructed sub-grid is also used as the content of the first information output by the decoding.

[0044] In one embodiment of the present invention, the second information is texture coordinates. If the fifth information indicates that the encoding end does not perform texture coordinate encoding, the process of obtaining the texture coordinates includes:

[0045] Reconstructing a basic grid using the fifth information and the first information to obtain a first reconstructed grid;

[0046] For each attribute map in the first reconstructed mesh, corresponding texture coordinates are generated by mesh parameterization, and the first reconstructed mesh is updated to obtain a parameterized first reconstructed mesh; wherein the texture coordinates corresponding to each attribute map are specified by adding corresponding identifiers.

[0047] In one embodiment of the present invention, if the first reconstructed grid includes: a first reconstructed sub-grid obtained by reconstructing an inter-frame sub-grid, and a second reconstructed sub-grid obtained by reconstructing an intra-frame sub-grid, according to an identifier in the fifth information used to indicate whether the grids are merged, the first reconstructed sub-grid and the second reconstructed sub-grid are merged or processed separately to obtain corresponding texture coordinates.

[0048] In one embodiment of the present invention, if the fifth information instructs the encoding end to perform texture coordinate encoding, the process of obtaining the texture coordinates includes:

[0049] Demultiplexing the bit stream of the three-dimensional grid that has been encoded to obtain a second bit stream;

[0050] The texture coordinates of the second code stream are decoded by using the fifth information and the first information to obtain texture coordinates for mesh reconstruction in conjunction with the first information.

[0051] In one embodiment of the present invention, when there are multiple attribute maps, the texture coordinates are made to correspond to the attribute maps according to the correspondence between the attribute maps and the texture coordinates identified in the fifth information.

[0052] In one embodiment of the present invention, the third information includes a spatial displacement, and a process of obtaining the spatial displacement includes:

[0053] Decoding the third code stream according to the encoding mode of the third code stream indicated in the fifth information to obtain the spatial domain displacement;

[0054] If the encoding method of the third code stream is video encoding, the third code stream is decoded according to the video decoder type indicated in the fifth information to obtain a two-dimensional image; the vertices are restored from the two-dimensional image in a corresponding order using the predetermined vertex sorting method indicated in the fifth information, and the corresponding spatial displacement of the vertices is reconstructed;

[0055] If the encoding method of the third code stream is entropy encoding, the third code stream is entropy decoded according to the entropy encoding method indicated in the fifth information to reconstruct the spatial displacement corresponding to the vertex.

[0056] In one embodiment of the present invention, if the fifth information indicates that the third code stream encoding process uses a reference frame mesh as a reference, the decoding result is the residual of the spatial displacement of the current frame mesh vertices relative to the reference frame mesh matching points, and the spatial displacement of the vertices of the current frame is restored through the vertices of the second reconstructed mesh of the reference frame and the residual.

[0057] In one embodiment of the present invention, the process of obtaining the decoded reconstructed grid includes:

[0058] Subdividing the first reconstructed grid of the current frame to obtain a subdivided grid;

[0059] The subdivided grid and the spatial domain displacement are used to perform subdivided deformed grid reconstruction to obtain a second reconstructed grid as a decoded reconstructed grid.

[0060] In one embodiment of the present invention, the process of obtaining the decoded and reconstructed attribute graph includes:

[0061] The fourth bitstream is subjected to attribute map decoding by using the fifth information to obtain fourth information including a plurality of attribute maps as a decoded and reconstructed attribute map.

[0062] In one embodiment of the present invention, using the fifth information to perform attribute graph decoding on the fourth bitstream includes:

[0063] The video decoder indicated in the fifth information is used to perform attribute map decoding on the fourth bit stream; wherein, for multiple types of attribute maps, after obtaining the fourth information, each attribute map is matched with the corresponding texture coordinates according to the identifier.

[0064] In one embodiment of the present invention, after the fourth bit stream is decoded by the attribute map, the attribute map is converted into a color space according to the color space conversion identifier indicated in the fifth information to obtain a color space corresponding to the first attribute map. Figure 1 consistent image format.

[0065] In a fourth aspect, the present invention provides a three-dimensional grid sequence decoding device, comprising:

[0066] A decoding module, used for demultiplexing the bit stream of the three-dimensional grid that has been encoded, obtaining multiple code streams including a first code stream, a third code stream, a fourth code stream and a fifth code stream, and decoding each of the obtained code streams;

[0067] A reconstruction module is used to reconstruct a decoded reconstruction grid and a decoded reconstruction attribute map using the second information and the decoded first information, third information, fourth information and fifth information; wherein the fifth information is used for the association correspondence between the various parts of information and to characterize the coding scheme.

[0068] Compared with the prior art, the present invention has the following beneficial effects:

[0069] The embodiment of the present invention proposes a three-dimensional mesh sequence encoding and decoding scheme. In the encoding scheme, the input reference frame mesh and the current frame mesh carrying the original attribute map are processed to obtain basic mesh information, texture coordinates, spatial displacement, attribute map and auxiliary information; at least the basic mesh information, attribute map and auxiliary information are encoded to form multiple code streams; the multiple code streams are combined into a bit stream output to complete the encoding. In the decoding scheme, the bit stream of the three-dimensional mesh that has been encoded is demultiplexed to obtain multiple code streams including auxiliary information code stream, basic mesh code stream, spatial displacement sub-code stream and attribute map sub-code stream; each obtained code stream is decoded, and the texture coordinates and the decoded auxiliary information, basic mesh information, spatial displacement and attribute map are used to reconstruct the decoded reconstructed mesh and the decoded reconstructed attribute map. The encoding and decoding scheme of the present invention is used for compressing and encoding a dynamic mesh sequence with attribute information, and can make full use of the spatiotemporal correlation between the encoded mesh and the mesh to be encoded to reduce mesh information redundancy, thereby reducing the bit rate of the code stream.

[0070] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the following specifically cites a preferred embodiment and describes it in detail with the accompanying drawings as follows. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] Figure 1 It is a schematic diagram of the Draco coding framework in the prior art;

[0072] Figure 2 This is a schematic diagram of the Corner Table structure used in the Draco coding grid;

[0073] Figure 3 This is a diagram of the five modes of Edgebreaker;

[0074] Figure 4 It is a schematic diagram of various parallelogram prediction methods;

[0075] Figure 5 It is a schematic diagram of the FAMC coding framework in the prior art;

[0076] Figure 6 It is a flowchart of a three-dimensional grid sequence encoding method provided by an embodiment of the present invention;

[0077] Figure 7 It is an overall encoding flow chart of a three-dimensional grid sequence encoding method provided by an embodiment of the present invention;

[0078] Figure 8 This is an example of inter-frame matching provided by an embodiment of the present invention;

[0079] Fig. 9 This is an example of adjusting a single mismatched vertex provided by an embodiment of the present invention;

[0080] Fig.10 is an example of grid simplification provided by an embodiment of the present invention;

[0081] Fig.11 is an example of motion vector prediction provided by an embodiment of the present invention;

[0082] Fig.12 is a schematic diagram of an operation flow of a basic grid coding provided by an embodiment of the present invention;

[0083] Fig.13 This is an example of a connection relationship traversal generating symbol provided by an embodiment of the present invention;

[0084] Fig.14 is a schematic diagram of a parallelogram prediction method provided by an embodiment of the present invention;

[0085] Fig.15 It is a schematic diagram of a sub-grid decoding process within a frame provided by an embodiment of the present invention;

[0086] Fig.16 This is an example of a merging operation provided by an embodiment of the present invention;

[0087] Fig.17 It is a schematic diagram of prediction of a parallelogram in a logical coordinate provided by an embodiment of the present invention;

[0088] Fig.18 is a schematic diagram of a spatial displacement calculation method provided by an embodiment of the present invention;

[0089] Fig.19 It is a subdivision schematic diagram provided by an embodiment of the present invention;

[0090] Fig. 20 It is a schematic diagram of attribute graph conversion provided by an embodiment of the present invention;

[0091] Fig.21 is an overall encoding flow chart of another three-dimensional grid sequence encoding method provided by an embodiment of the present invention;

[0092] Fig. 22 is a schematic structural diagram of a three-dimensional grid sequence encoding device provided by an embodiment of the present invention;

[0093] Fig.23 It is a flowchart of a three-dimensional grid sequence decoding method provided by an embodiment of the present invention;

[0094] Fig.24 is an overall decoding flow chart of a three-dimensional grid sequence decoding method provided by an embodiment of the present invention;

[0095] Fig.25 This is an overall decoding flow chart of another three-dimensional grid sequence decoding method provided by an embodiment of the present invention.

[0096] Fig.26 It is a schematic diagram of a sub-grid decoding process within a coding end frame provided by an embodiment of the present invention.

[0097] Fig. 27 It is a structural schematic diagram of a three-dimensional grid sequence decoding device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0098] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined purpose of the invention, a three-dimensional grid sequence encoding and decoding method and device proposed in accordance with the present invention are described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0099] The above and other technical contents, features and effects of the present invention are clearly presented in the following detailed description of the specific implementation modes in conjunction with the accompanying drawings. Through the description of the specific implementation modes, the technical means and effects adopted by the present invention to achieve the predetermined purpose can be more deeply and specifically understood. However, the attached drawings are only for reference and explanation purposes and are not used to limit the technical solutions of the present invention.

[0100] The following first introduces the inventive concept of the embodiments of the present invention and the related technologies involved.

[0101] 1. Existing Grid Compression Technology

[0102] The compression algorithm of 3D meshes is currently mainly focused on the compression of static meshes. There are many mature algorithms for static mesh compression, such as Google's open source Draco. MPEG has also developed standards for 3D mesh compression, such as FAMC, which supports the encoding of dynamic meshes, but it only supports dynamic meshes with constant connection relationships, and does not take into account the attribute mapping information and connection information that changes over time.

[0103] 1.1Draco

[0104] The main idea of ​​Draco to compress static meshes is to compress meshes driven by connection relationships. It traverses all faces of the mesh in a specific way, marks each face according to specific rules, and encodes the marks of all faces obtained through traversal, that is, it encodes the mesh connection relationship. Then, it encodes all vertex coordinates and attribute information associated with the vertices in the order of traversing the connection relationship. Its encoding framework is as follows: Figure 1 shown.

[0105] The main process of Draco encoding meshes includes: first, for the input mesh, a connection relationship is generated based on its geometric information, that is, the connection relationship of vertices in three-dimensional space. The Corner Table data structure is used to establish the connection relationship, such as Figure 2 shown.

[0106] In this structure, c is used to represent the current corner traversed (corner is the angle. Figure 2 Indicated by a circle), ct represents the triangle where the current corner is located, cv represents the vertex corresponding to the current corner, cn represents the next corner corresponding to the current ct in counterclockwise order, cp represents the previous corner corresponding to the current ct in counterclockwise order, co represents the corner opposite to the current corner, cr represents cno, and cl represents cpo. Figure 2 In order to distinguish, each triangle face is indicated in a different color, and this is the grayscale effect.

[0107] After building the connection relationship of the surface according to the above structure, select the initial surface to start traversing all the surfaces of the current mesh, that is, traversing and generating symbols. The Edgebreaker algorithm is used here to traverse and generate symbols. The algorithm divides it into five modes according to the state of the triangle surface when traversing to the current corner, such as Figure 3 As shown. Similarly, Figure 3 This is a grayscale diagram.

[0108] The five modes also define the direction of traversing the next face after traversing the current face. According to the above traversal method, corresponding symbols are generated for each face defined by the current mesh geometry information, and then these symbols are entropy encoded to obtain the code stream of the connection relationship defined by the current mesh geometry information. At the same time, traversing each face also obtains the order of traversing the corresponding vertices, which is passed to the geometry information encoder, rearranged in the order of traversal, and quantized according to the predetermined quantization parameter, and then predicted. The prediction adopts the parallelogram prediction method, such as Figure 4 The image is displayed in grayscale. The prediction methods include single parallelogram prediction ( Figure 4 (a) in Figure ), multi-parallelogram prediction ( Figure 4 (b) in Figure ) and weighted parallelogram prediction ( Figure 4 (c) in Figure 1), with Figure 4 For example, for the gray vertex to be predicted, the adjacent triangles of the triangle where the vertex is located are used to construct a parallelogram to predict the black vertex, and the position of the gray vertex to be predicted is subtracted from the position of the predicted black vertex to obtain the prediction residual. Finally, the predicted geometric coordinate residual is entropy coded.

[0109] For attribute information, there is also a connection relationship. After constructing it according to the same connection relationship as the geometric information, the difference between the connection relationship of the attribute information and the connection relationship of the geometric information is compared, and the difference between the two, also known as the boundary information, is encoded. Similar to the encoding of geometric information, after obtaining the order of attribute information traversal, the attribute information is quantized, predicted, and entropy encoded in the same way to obtain the attribute information encoding stream. Finally, the various partial streams are mixed to obtain the final encoding stream.

[0110] 1.2FAMC

[0111] FAMC is a dynamic mesh compression technology developed by MPEG. FAMC stands for Frame-based Animated

[0112] Mesh Compression, frame-based animation mesh compression. The core of this method is a skin model, which is used for compression purposes within the framework of motion compensation strategy. FAMC encoding framework is as follows Figure 5 shown.

[0113] First, the mesh vertices are grouped and optimized so that the motion vectors of all vertices in each group can be accurately described by a 3D affine transformation. By utilizing the skinning technique in animation, the motion of each vertex can be represented as a weighted linear combination of the motion vectors of the vertex group.

[0114] The motion vector of the affine transformation is always expressed relative to the first frame of the sequence, which facilitates random access to a single animation frame and can effectively manage packet loss in the transmission context in a lossy environment. The reference frame can be encoded using a static mesh encoder, and the current frame estimates the skin model based on the reference frame, so that the current frame can correspond to the reference frame according to the skin model, thereby calculating the corresponding vertex motion vector. For the estimated skin model, the generated prediction residual and affine transformation are transformed, quantized, and entropy encoded. The transformation technology can use DCT transformation, and the entropy coding algorithm can use CABAC entropy coding algorithm. At the same time, the necessary auxiliary information needs to be CABAC encoded, including animation weights and partition information.

[0115] Based on the above, the embodiment of the present invention proposes a three-dimensional mesh sequence encoding method and encoding device, a three-dimensional mesh sequence decoding method and decoding device, which are used for compressing and encoding a dynamic mesh sequence with attribute information.

[0116] It should be noted that, in order to facilitate the distinction between the reference numerals of the encoding and decoding parts, the reference numerals of the methods and devices corresponding to the encoding process are marked with C as the first letter, meaning "code", and the reference numerals of the methods and devices corresponding to the decoding process are marked with D as the first letter, meaning "decode". The following is a detailed introduction.

[0117] In the first aspect, the embodiment of the present invention provides a three-dimensional grid sequence encoding method, see Figure 6 As shown, the encoding method may include steps C1 to C3:

[0118] C1, processing the input reference frame grid and the current frame grid carrying the first attribute map to obtain first information, second information, third information, fourth information and fifth information;

[0119] Among them, the reference frame grid is the grid that has been encoded and reconstructed; the current frame grid is the grid to be encoded; and the fifth information is used for the association and correspondence between the various parts of information and to characterize the encoding scheme.

[0120] C2, encoding at least the first information, the fourth information and the fifth information to form a plurality of code streams including a first code stream, a fourth code stream and a fifth code stream;

[0121] C3, combines multiple code streams into a bit stream.

[0122] In the embodiment of the present invention, for the convenience of description, the execution subject of the three-dimensional grid sequence encoding method is named as the encoding end, and the execution subject of receiving the bit stream of the encoding output end for decoding processing is named as the decoding end. The input current frame grid carries its own attribute map, that is, the original attribute map. For the convenience of distinction, the original attribute map carried by the current frame grid is named as the first attribute map.

[0123] The three-dimensional mesh sequence encoding scheme of the embodiment of the present invention is used for compressing and encoding a dynamic mesh sequence with attribute information. The scheme can make full use of the spatiotemporal correlation between the encoded mesh and the mesh to be encoded to reduce mesh information redundancy, thereby reducing the bit rate of the code stream. Specifically, the scheme uses different modes to represent, process and encode areas with high and low prediction quality according to the prediction quality of mesh vertices or faces in the time domain. The mesh that has been encoded and reconstructed is called the reference frame mesh, and the mesh that is being encoded is called the current frame mesh.

[0124] In an embodiment of the present invention, the first information is the basic grid information, which is a simplified representation of the input grid. The purpose is to encode a small amount of key information to transmit a basic grid with less information, thereby reducing the amount of data compression, alleviating the pressure of data transmission and improving the efficiency of data transmission. The second information is the texture coordinates, which represent the texture coordinates corresponding to the vertices of the basic grid, and are used for the correspondence between the three-dimensional grid and the attribute map, so that a complete three-dimensional grid with an attribute map can be accurately reconstructed. The third information is the spatial displacement, which represents the displacement of each vertex of the grid after the basic grid is subdivided and deformed. The fourth information is the attribute map, which represents the texture or material information of the three-dimensional grid surface, and is also one of the essential information for the three-dimensional grid with a complete visual effect. The fifth information is auxiliary information, which is used for the association and correspondence between the various parts of information and characterizes the encoding scheme. The embodiment of the present invention uses the fifth information to associate the above-mentioned main information, correspond and record the information of each part to each other, so as to guide the three-dimensional reconstruction process in the decoding process to obtain the reconstructed three-dimensional grid.

[0125] The following combination Figure 7 The overall process diagram of the three-dimensional grid sequence encoding method shown in the figure explains the specific encoding process of the encoding method through the acquisition and encoding process of the above-mentioned parts of information.

[0126] (1) First information (basic grid information)

[0127] In an optional implementation, inter-frame matching is performed on the reference frame grid and the current frame grid according to a predetermined matching method to obtain first information; the first information includes a reference frame list, a temporal motion vector and a motion vector identifier corresponding to each reference frame; and when there is an intra-frame sub-grid in the inter-frame matching, the first information also includes the intra-frame sub-grid. The fifth information includes an indication identifier of the predetermined matching method.

[0128] Optionally, the predetermined matching method is to match in units of points or in units of surfaces.

[0129] In an optional embodiment, when obtaining the first information by using inter-frame matching, after a mismatching area is detected, the motion vector of each vertex in the mismatching area is adjusted so that the vertices in the mismatching area are merged with the matching vertices, and the corresponding first information includes a reference frame list, the time domain motion vector corresponding to each reference frame, and the intra-frame sub-grid.

[0130] It should be noted that, when performing inter-frame matching, the reference frame mesh vertices are sorted according to a predetermined sorting method to determine the traversal order of the reference frame mesh vertices, wherein the fifth information includes an indication of the predetermined sorting method.

[0131] Optionally, the vertices can be sorted by the size of their geometric coordinate values.

[0132] In an optional implementation, when there is an intra-frame sub-grid in the inter-frame matching, grid simplification processing is performed on the intra-frame sub-grid, and the simplified grid is used as the first intra-frame sub-grid.

[0133] Among them, inter-frame matching is achieved by matching the vertices or faces of the current frame mesh with the vertices or faces with the closest geometric information and attribute information of the reference frame mesh. First, the two points or faces that can be matched in the current frame mesh and the reference frame mesh are taken as a set of initial matching points or initial matching faces, and then the vertices or faces are traversed in a specific order to construct an inter-frame matching initial mesh that matches the reference frame mesh for the current frame mesh. Next, by comparing the differences in geometric information and attribute information of the nearest neighbor points or nearest neighbor faces between the inter-frame matching initial mesh and the current frame mesh, the matching area and the non-matching area are divided in combination with the set threshold. Specifically, the vertices or faces on the current frame inter-frame matching initial mesh whose difference value is less than the threshold are called matching vertices or matching faces, and the maximum connected area formed by the matching vertices or faces is called the matching area. On the contrary, the remaining area of ​​the current frame inter-frame matching initial mesh is called the non-matching area, and the vertices or faces in this area and the corresponding vertices or faces of the reference frame mesh are called non-matching vertices or non-matching faces. The non-matching area needs to be adjusted. The adjusted mismatched area is called an intra-frame sub-grid, and the grid of the matched area is called an inter-frame sub-grid. Different encoding modes are used to encode the inter-frame sub-grid and the intra-frame sub-grid respectively. The decoding end can decode and construct the current frame grid using different modes.

[0134] The current frame grid is matched with the reference frame grid. The current frame grid can be matched according to the grid structure of the reference frame grid, and the current frame is divided into a matching area and a non-matching area. The matching area is called an inter-frame sub-grid, which is constructed by the generated temporal motion vector and an optional motion vector identifier. Multiple reference frame grids can be used to calculate the temporal motion vector. The reference frame grid can select a reconstructed basic grid (i.e., the first reconstructed grid) or a reconstructed subdivided and deformed grid (i.e., the second reconstructed grid). Each reference frame generates a corresponding temporal motion vector and an optional motion vector identifier, and the motion vector identifier corresponds to each point or all points in a region in the reference frame. The temporal motion vector represents the distance from the current vertex on the reference frame grid to the corresponding matching point on the inter-frame sub-grid; the motion vector identifier identifies whether each vertex or a region of the reference frame grid has a matching point or a matching surface on the current frame grid. The index corresponding to the reference frame can be encoded into the bitstream through the reference frame list. For the non-matching area, the non-matching area is replaced with the corresponding area of ​​the current frame, and the replaced non-matching area is called an intra-frame sub-grid. The intra-frame sub-grid is mesh simplified to be represented using less information. If only intra-frame sub-grids exist after the current frame grid matches the reference frame grid, that is, there is no matching area or the current frame grid has no available reference frame, the entire current frame grid is processed as an intra-frame sub-grid. On the contrary, if the current frame grid completely matches the reference frame grid, the entire current frame grid is processed as an inter-frame sub-grid. After the inter-frame matching is completed, the reference frame list, the temporal motion vector corresponding to each reference frame and the possible motion vector identifier, as well as the intra-frame sub-grid are subsequently encoded as a basic grid.

[0135] The specific process of inter-frame matching and grid simplification is described in detail below.

[0136] 1) Inter-frame matching

[0137] The inter-frame matching step is responsible for matching the reference frame grid with the current frame grid, such as Figure 8 As shown in the figure, the reference frame mesh is recorded as basemesh[j] (j is the reference frame index), and the vertex on the reference frame mesh is recorded as basemesh[j].v[k]. The inter-frame matching step searches for the nearest neighbor of the reference frame vertex on the current frame mesh inputmesh[i] (i is the current frame index), and selects the point closest to basemesh[j].v[k] on the adjacent surface of the nearest neighbor, recorded as inputmesh[i].v[k′]. The temporal motion vector corresponding to the current vertex of the reference frame is recorded as motion[k]. The calculation process is shown in formula (1):

[0138] motion[k]=inputmesh[i].v[k′]-basemesh[j].v[k] (1);

[0139] Here we take one reference frame as an example. The operation of multiple reference frames is similar to that of a single reference frame. You only need to pass the reference frame list. As mentioned above, frame matching can be performed in units of points or surfaces. The matching method can be passed to the decoder through the fifth information code. The following introduces the two parts separately:

[0140] ① Matching in points:

[0141] The point-based matching method needs to traverse each vertex of the reference frame mesh in a fixed order. First, the vertex order of the reference frame mesh needs to be determined, that is, this step sorts the reference frame mesh vertices used. There are many ways to sort, such as sorting by the size of the vertex geometric coordinate values. Other ways to determine the sorting can also be used. The sorting method is encoded through the fifth information and transmitted to the decoding end.

[0142] After determining the order of the reference frame mesh vertices, it is necessary to select an initial point and determine the order of vertex traversal. The initial point can be the first point or other point after the vertices are sorted. The selected initial point can be encoded through the fifth information and transmitted to the decoding end. There can also be multiple ways to traverse the order. For example, traversing the vertices in the order of traversing the connection relationship can determine the vertex order according to the way of traversing the connection relationship in Draco. Other ways to determine the vertex order can also be used and encoded through the fifth information and transmitted to the decoding end.

[0143] For each vertex of the reference frame mesh, uniform sampling is performed on the area formed by all adjacent faces of the vertex, that is, a block of size N×N is sampled with the vertex as the center, where N is an odd number, such as 31, 63, etc. The pixel value of each sampling point is the pixel value corresponding to it on the attribute map. For example, uniform sampling is performed on the adjacent face of the current vertex basemesh[j].v[n] of the reference frame mesh. Let the triangle face where the current sampling point is located be (A, B, C), and uniform sampling is performed on the current face according to the equidistant interval. Let one of the sampling points be basemesh[j].v[n1], and its barycentric coordinates in the current triangle face be (α, β, γ). Then the texture coordinates corresponding to the point on the two-dimensional plane are the texture coordinates of the three vertices of the current triangle face on the two-dimensional plane multiplied by the corresponding barycentric coordinates, recorded as basemesh[j].vt[n1]. Sampling is performed on the reference frame texture map using the texture coordinates, and the pixel value of the corresponding position is used as the pixel value of the sampling point. The above sampling method obtains a block of size N×N with basemesh[j].v[n] as the center. Similarly, the adjacent area of ​​the nearest neighbor inputmesh[i].v[n′] of basemesh[j].v[n] in the current frame is also uniformly sampled, and the size of the sampling area is guaranteed to be 1.5-2 times the area of ​​the corresponding vertex in the reference frame, and a block of size M×M is obtained. After obtaining two blocks, the inter-frame motion search in the video coding technology is applied to find the nearest matching block in the block where inputmesh[i].v[n′] is located corresponding to the block where basemesh[j].v[n] is located. The center point of the best matching block is used as the best matching point of basemesh[j].v[n], and the corresponding time domain motion vector is calculated.

[0144] After obtaining the best matching point of basemesh[j].v[n], traverse the next point according to the connection relationship of the current point and set it as basemesh[j].v[m]. Use the temporal motion vector motion[n] corresponding to basemesh[j].v[n] as the initial temporal motion vector of the current point, and use the position after basemesh[j].v[m]+motion[n] as the position of basemesh[j].v[m] to perform the nearest neighbor search on the current frame.

[0145] After traversing all vertices on the reference frame base grid and obtaining the motion of each point, a temporal motion vector flag can be generated for each point, denoted as motionflag and set to 1.

[0146] ② Matching by face:

[0147] The steps for matching in units of faces are similar to those for matching in units of points. During the matching process, it is also necessary to first determine the order of the reference frame mesh vertices, which can be sorted in the same way as in the steps for matching in units of points. After determining the order of the reference frame mesh vertices, select the initial face of the traversal, that is, the starting point of the traversal. The selected initial face can be encoded through the fifth information and passed to the decoding end. After determining the initial face, it is necessary to determine the method of traversing the face. You can refer to the traversal method for matching in units of points, or you can specify other traversal methods, which are encoded through the fifth information and passed to the decoding end.

[0148] After determining the initial face and the traversal order, for each traversed face, the three vertices on the face are matched in turn in a point-based matching manner, where the initial point can be selected arbitrarily, encoded through the fifth information and transmitted to the decoding end, and the traversal order of the three vertices can be matched in a clockwise or counterclockwise order, and the corresponding method is encoded through the fifth information and transmitted to the decoding end.

[0149] 2) Find the mismatched area

[0150] In the previous inter-frame matching process, a time domain motion vector is generated for each point of the reference frame basic mesh, so the initial basic mesh of the current frame can be constructed through the reference frame and the time domain motion vector. That is, the initial basic mesh of the current frame is obtained by changing the geometric positions of the vertices of the reference frame basic mesh, and the connection relationship of each vertex is exactly the same as the vertex of the corresponding reference frame basic mesh. After obtaining the initial basic mesh of the current frame, all vertices are traversed to find the nearest neighbor of each vertex on the current frame input mesh, and it is determined whether the normal vector angle of the two points is greater than the set threshold. If it is greater than the threshold, the matching point is considered inaccurate, and the point or the surface where the point is located is marked as an unmatched point or unmatched surface, that is, the motion vector corresponding to the point is set to 0.

[0151] 3) Adjust the mismatched areas

[0152] In the case of point-based matching, the adjacent faces of the vertices marked as unmatched on the initial matching mesh are marked as unmatched faces. In the case of face-based matching, the faces with motion vectors marked as 0 are marked as unmatched faces.

[0153] For all the mismatched faces, find the largest connected domain of the mismatched faces and calculate the bounding box of the largest connected domain. Use the bounding box to obtain the partial grid that fills the mismatched area on the current frame grid. For the points in the boundary part, the current frame grid needs to be resampled to make the current frame grid that fills the mismatched area coincide with the boundary points of the matching area grid constructed according to the reference frame. Each partial grid that fills the mismatched area is called an intra-frame sub-grid. The whole formed by these intra-frame sub-grids can also be called an intra-frame sub-grid. For the intra-frame sub-grid, a simplified operation similar to intra-frame coding preprocessing can be performed on it.

[0154] In addition to the above methods, when matching in point units, there is another optional processing method for the case where there is only one vertex in the connected domain of the mismatched area. That is, after determining the intra-frame sub-grid that fills the mismatched area where the vertex is located, identify all the boundary points. Then use a newly inserted vertex to construct the connection relationship with these boundary vertices in turn, and use this newly inserted vertex as the original mismatched point, such as Fig. 9 The example shown is to adjust a single unmatched vertex. The gray vertex in the middle is the newly inserted vertex, the black vertex is the boundary vertex, the black edge is the boundary edge, and the thick gray edge is the newly connected edge. The newly inserted vertex is regarded as the original unmatched vertex and the position of the vertex is adjusted to meet the matching requirements, that is, the angle between the normal vector of the vertex and the normal vector of its nearest neighbor on the input mesh of the current frame is less than the given threshold. The adjustment process can be regarded as an iterative optimization process.

[0155] Then, the time domain motion vector corresponding to the vertex is updated according to the adjusted position of the vertex. The motion vector identifier corresponding to the vertex is set to a number greater than 1, and the motion vector identifier of the boundary vertex connected to the vertex is set to the motion identifier of the vertex plus 1, thereby indicating the boundary vertex corresponding to the vertex. For the case where there is only one vertex in the next mismatching area, after adjusting the vertex, the motion vector identifier of the vertex is set to the motion vector identifier of the previous mismatching vertex in the same situation plus 2. For example, for the first traversed mismatching area containing only one vertex, the motion vector identifier of its vertex is set to 2, and the motion vector identifier of its corresponding boundary vertex is set to 3. Then the motion vector identifier of the vertex in the next mismatching area containing only one vertex should be set to 4, and the motion vector identifier of its corresponding boundary vertex should be set to 5, and so on.

[0156] The above schemes all use motion vector identifiers to indicate reference frame vertices to indicate which vertices are matching vertices. In addition to the method of using motion vector identifiers, after detecting mismatched areas, the motion vectors of each vertex in the mismatched areas can be adjusted to merge these vertices with matching vertices, and then the current frame area can be used to fill these mismatched areas. In this case, the subsequent encoding of the motion vector identifier of each vertex can be omitted.

[0157] 4) Intra-frame sub-grid simplification

[0158] Mesh simplification is to simplify the current input mesh to a basic mesh with relatively fewer points and faces, and to keep the shape of the original mesh as much as possible. The focus of mesh simplification is the simplification operation and the corresponding error measurement. An example of a mesh simplification operation is Fig.10 As shown, the number of faces and vertices can be reduced by iteratively merging two vertices of an edge.

[0159] For the error metric, the sum of the coefficients of the equations of all adjacent faces of a vertex can be selected as the error metric of the vertex, and the error metric of the corresponding edge is the sum of the error metrics of the two vertices on the edge. In other words, the error caused by merging an edge is the sum of the distances of all adjacent planes from the merged vertex to the original two vertices of the edge.

[0160] After determining the simplification operation and the corresponding error metric, the mesh simplification is iterated. First, the vertex error of the initial mesh is calculated to obtain the error of each edge. Then each edge is arranged from small to large error, and the edge with the smallest error is selected for merging each time. At the same time, the position of the merged vertex is calculated, and the error of all edges related to the merged vertex is updated. That is, the order of edge arrangement is updated to ensure that each iteration is based on the global error metric. The mesh surface is simplified to the number required to meet the lossy coding through iteration. The details of the mesh simplification are as follows:

[0161] ①Calculation of vertex error

[0162] The vertex error is defined as the sum of the coefficients of the equations of all adjacent faces of the vertex. Each adjacent face defines a plane, which can be expressed as (2):

[0163] D 2 =(n T v+d) 2 =v T (nn T ) v +2dn T v+d 2 (2);

[0164] Where n is the unit normal vector of the plane, v is the vertex position vector, and d is a constant. All vectors here are column vectors. Formula (3) can be expressed in the form of a quadratic surface, that is:

[0165] Right now:

[0166] Q=(A,b,c)=(nn T ,dn,d 2 ) (3);

[0167] but:

[0168] Q(v)=v T Av+2b T v+c (4);

[0169] Let Q1(v)+Q2(v)=(Q1+Q2)(v)=(A1+A2,b,+b2,c1+c2)(v), then The error caused by the merging can be obtained as

[0170] ②Merge vertices

[0171] A major step in the vertex merging process is to determine the position of the merged vertex. According to the error formula (4), the vertex position that can minimize the error is selected under the conditions permitted. Taking the partial derivative of formula (4), we can obtain:

[0172]

[0173]

[0174] It can be seen from the above two equations that only when matrix A is reversible can the point with the minimum error be obtained. It is worth noting that there are many ways to take the position of the merged vertices here. If the quality of mesh simplification is considered, when matrix A is reversible, the vertex position with the minimum error is selected; when matrix A is not reversible, a point on the edge including the two endpoints that minimizes the error can be selected. If the complexity of mesh simplification is considered, the midpoint of the edge or one of the two endpoints can be directly selected as the position of the merged vertex. If the efficiency of quantization after mesh simplification is considered, the position of the merged vertex also needs to be adjusted. Since high-precision information needs to be encoded separately after quantization, some of the merged vertex positions are adjusted to multiples of the corresponding quantization coefficients to ensure that the original position can be restored without additional information during inverse quantization, which will reduce the amount of data consumed by high-precision information.

[0175] After determining how to select the position of the merged vertex, the process of merging vertices can begin. First, calculate the errors of all the edges in the initial mesh and arrange them in order from small to large errors. In each iteration, select the edge with the smallest error, remove the two endpoints of the edge from the mesh vertices, and add the merged vertex to the mesh vertex set. All adjacent vertices of the two vertices before the merge are used as adjacent vertices of the merged vertex, and then update the error metrics of all points connected to the merged vertex to obtain the error of the newly generated edge, and then update the order of the edges globally. The above process is repeated until the number of faces required for lossy encoding is reached.

[0176] ③Update connection relationship

[0177] After merging vertices, because some vertices are deleted and many new vertices are added to the vertex set, the connection relationship between the vertices needs to be updated. In the process of merging vertices, the two vertices before the merge can be determined to correspond to the merged vertex. Therefore, it is only necessary to replace the index of the two vertices before the merge that appear in all faces with the index of the merged vertex, and then delete the faces with duplicate indexes to achieve the purpose of updating the connection relationship.

[0178] The above three steps are the detailed steps of mesh simplification. Generally speaking, the edge of an image can attract people's attention, thus affecting people's evaluation of the quality of the image. The same is true for three-dimensional meshes. People tend to pay more attention to the boundary part. Therefore, whether the boundary is maintained during mesh simplification is also a factor that affects the quality of the simplification result. The boundary of a mesh is generally a geometric boundary. When an edge belongs to only one face, the edge is a geometric boundary. When the mesh is simplified, such boundaries should not be merged. Therefore, each time you simplify, you can first determine whether the vertex on the edge is a boundary point. If it is a boundary point, skip it and proceed directly to the next iteration.

[0179] It should be noted that this simplification operation only considers the geometric characteristics of the input mesh and ignores the attribute information of the input mesh, namely the texture coordinates. The mesh output by this simplification operation only contains geometric coordinates and connection relationships.

[0180] (2) First information coding (basic grid information coding)

[0181] In an optional implementation, the first information is encoded to form a first code stream; wherein, the time domain motion vector is encoded to form a first sub-code stream, the motion vector identifier is encoded to form a second sub-code stream, and the intra-frame sub-grid or the first intra-frame sub-grid is encoded to form a third sub-code stream.

[0182] After the inter-frame matching processing stage generates the information required to establish the current frame grid, subsequent encoding operations are performed. This information can be divided into information for constructing inter-frame sub-grids and information for constructing intra-frame sub-grids. The information for constructing inter-frame sub-grids includes a reference frame list (indices of reference frames used), time domain motion vectors corresponding to the current reference frame grid, and possible motion vector identifiers. The information for constructing intra-frame sub-grids is the intra-frame sub-grid that fills in the mismatched areas. The time domain motion vector, the optional motion vector identifier, and the intra-frame sub-grid are encoded separately to obtain a first sub-code stream, a second sub-code stream, and a third sub-code stream (corresponding to Figure 7 The first code stream (including the time domain motion vector sub-code stream, the motion vector identifier sub-code stream and the intra-frame sub-grid sub-code stream) is responsible for reconstructing the first reconstructed grid (ie, the basic grid of the current frame) and regenerating the texture coordinates of the first reconstructed grid.

[0183] The following is a detailed description of the motion vector identifier, the time domain motion vector, and the encoding process of the sub-grid within the frame.

[0184] 1) Motion vector identification coding

[0185] The motion vector identifier is an array of 0 / 1 numbers corresponding to each vertex of the reference frame. A value of 1 indicates that the vertex is used for matching and has a motion vector. The array can be directly encoded using an existing entropy coding algorithm, such as CABAC. For multiple reference frame grids, each reference frame grid corresponds to a temporal motion vector identifier array, which is encoded in the order of the reference frame index in the reference frame list.

[0186] It should be noted that this step is optional. As described above, when the non-matching area is adjusted by modifying the motion vectors of the vertices in the non-matching area during the inter-frame matching process, the motion vector identification of the vertices of the reference frame mesh can be omitted, that is, it is not necessary to indicate which vertices of the reference frame mesh are available. In addition, if the time domain motion vector is used, it can also be described in units of regions, that is, the time domain motion vector identification of all points in the current region is the same, then a motion vector identification can be used to represent the motion vector identification of all vertices in the current region. Among them, the division information of the region can be indicated by the fifth information, and the information on whether to use the motion vector identification can also be indicated by the fifth information.

[0187] 2) Temporal motion vector coding

[0188] The temporal motion vector is an array consisting of the distance between the reference frame mesh vertex and the current frame mesh best matching point, and each element is a three-dimensional vector. The temporal motion vector can be encoded using quantization, prediction, and entropy coding methods.

[0189] See also Fig.11An example of motion vector prediction provided by an embodiment of the present invention is shown, wherein the gray solid arrow corresponding to the gray vertex is the motion vector of the current vertex to be encoded. The black arrow is the motion vector of the encoded vertex. The gray dashed arrow is the motion vector predicted based on the motion vector of the encoded vertex adjacent to the gray vertex. The brown thin arrow is the predicted residual. The residual of the obtained motion vector of the current vertex is subsequently entropy encoded.

[0190] The inter-frame matching stage generates a temporal motion vector for each vertex of the reference frame grid, but there are many cases where the temporal motion vector is not available. Therefore, during encoding, no motion vector is encoded for the vertex whose temporal motion vector is 0. For multiple reference frame grids, each reference frame grid corresponds to a temporal motion vector array, which is encoded in the order of the reference frame index in the reference frame list.

[0191] The prediction part can be done before quantization to improve the prediction accuracy, and the decoding end needs to perform inverse quantization and inverse prediction in the same order. The order of quantization and prediction can be indicated by the fifth information.

[0192] 3) Intra-frame sub-grid encoding and decoding

[0193] The intra-frame sub-mesh is the mesh adjusted for the mismatched area of ​​the current frame. The intra-frame sub-meshes of multiple mismatched areas can be regarded as a complete mesh, which only contains vertex coordinates and connection relationships. In particular, if the inter-frame matching of the current frame mesh is completely inaccurate, the intra-frame sub-mesh is the current frame mesh, and the first intra-frame sub-mesh is the simplified mesh of the current frame mesh, which may also include attribute information. It can be encoded using a static mesh encoder.

[0194] It should be noted that since the mesh encoder may be lossy and may change the vertex order, in order to be consistent with the decoding end, the encoding end needs to decode the third sub-stream and reconstruct the corresponding intra-frame sub-mesh to obtain the second reconstructed sub-mesh.

[0195] The following is a detailed description of the encoding and decoding process of the sub-grid within a frame.

[0196] ① Intra-frame sub-grid coding

[0197] In this embodiment, the encoding process of the sub-grid within the frame is as follows: Fig.12 As shown, the static mesh encoder first quantizes the geometric information and possible attribute information of the input mesh, specifically, the geometric coordinates of the input mesh and possible texture coordinates. The quantization process of the geometric information, i.e., vertex coordinates, is shown in equations (7) and (8):

[0198]

[0199] mesh.point(v)= Round(mesh.point(v)*scalePosition) (8);

[0200] Where qpPosition is a predefined quantization parameter, bitDepthPosition is the bit depth of the geometric position, mesh.point(v) is the geometric coordinate of the vth vertex of the current input mesh, and Round indicates rounding. Suppose the geometric coordinates of mesh.point(v) are (x, y, z), equation (8) can also be expressed as:

[0201] mesh.point(v).x= Round(mesh.point(v).x*scalePosition) (9);

[0202] mesh.point(v).y= Round(mesh.point(v).y*scalePosition) (10);

[0203] mesh.point(v).z= Round(mesh.point(v).z*scalePosition) (11);

[0204] The quantization of attribute information is similar to the above process. After the geometric information and possible attribute information are quantified, their respective connection relationships are constructed, and the algorithm for encoding the connection relationship adopts the Edgebreaker algorithm. Figure 3 As shown in the figure, the algorithm defines five modes for traversing a surface, which are L, C, R, S, and E. The algorithm starts from an arbitrarily selected initial surface, determines which mode it belongs to based on the state of the traversed surface, and determines the direction of the next surface to be traversed based on the surface mode.

[0205] See also Fig.13 An example of a connection relationship traversal generating symbol is shown, here is the grayscale effect. First, randomly select an initial face and an initial point (the vertex marked as a gray circle in the figure), then visit the vertex relative to the initial vertex in the default traversal order, determine whether the vertex has been traversed, and then determine the pattern of the face where the vertex is located, and traverse the next face and the corresponding vertex in the order corresponding to the pattern. Finally, the pattern of all faces of the current mesh and the order of traversing vertices are obtained. The generated pattern symbol sequence is entropy encoded to obtain a connection relationship sub-code stream. At the same time, the order of traversing vertices is passed to the geometric information encoding module to guide the predictive encoding of geometric information.

[0206] The geometric information and possible attribute information can be predicted using parallelograms and then the predicted residuals can be encoded. In this embodiment, the parallelogram prediction method used is as follows: Fig.14 As shown in the figure, the three vertices of the triangle represented by the thick black edge have been encoded. A parallelogram can be constructed from the triangle to obtain the black predicted vertex in the figure. Then the distance between the current vertex to be encoded and the predicted vertex is calculated to obtain the prediction residual of the current vertex. Finally, the residual is sent to the entropy coding module for entropy coding to obtain the geometric information sub-code stream.

[0207] In addition, for the vertices of the sub-mesh in the frame, the vertices of the encoded sub-mesh can be used for parallelogram prediction. That is, for the current point to be encoded, if its vertex that can be used for parallelogram prediction is not in the current sub-mesh, it is determined whether the sub-mesh where the vertex is located has been encoded. If it has been encoded, the value reconstructed after the vertex is encoded is used for parallelogram prediction. Whether to use the information of the encoded sub-mesh vertex is indicated in the auxiliary information.

[0208] Similar to motion vector coding, the prediction of geometry and attribute information can be done before quantization to improve the prediction accuracy. The decoding end needs to perform inverse quantization and inverse prediction in the same order. The order of quantization and prediction can be identified by the fifth information.

[0209] It should be noted that, for all intra-frame sub-grids and inter-frame sub-grids, the encoding order corresponding to each sub-grid, ie, the grid sequence number, needs to be indicated in the corresponding grid header information.

[0210] ② Intra-frame sub-grid decoding

[0211] In this embodiment, the decoding process of the sub-grid within the frame is as follows: Fig.15 As shown in FIG. 1 , similar to encoding, after decoding each part of the information through entropy decoding, the connection relationship of the grid is first reconstructed, that is, the corresponding connection relationship is restored according to the symbols decoded by entropy. The process of restoring the connection relationship is similar to the process of generating symbols by encoding, and decoding is to infer the corresponding connection relationship according to the symbols.

[0212] After decoding the connection relationship, the decoded geometric information residual and possible attribute information residual are deprecated according to the order of connection relationship traversal to obtain geometric information and attribute information. Then the grid is reconstructed based on this information, and the reconstructed grid is dequantized according to the encoded quantization parameter to obtain the reconstructed intra-frame sub-grid (i.e., the second reconstructed sub-grid). The process of geometric information dequantization is shown in equations (12) and (13):

[0213] iscalePosition=1.0 / scalePosition (12);

[0214] mesh.point(v)= mesh.point(v)*iscalePosition (13);

[0215] Among them, scalePosition is the quantization coefficient corresponding to the geometric information of the encoding end, and mesh.point(v) is the geometric coordinate of the vth vertex of the current input mesh. The process of attribute information dequantization is similar to the above formula.

[0216] (3) Second information (texture coordinates)

[0217] In an optional implementation, the process of acquiring texture coordinates may include the following two steps:

[0218] 1) decoding the first bitstream and reconstructing the grid to obtain a first reconstructed grid;

[0219] 2) For each attribute map in the first reconstructed mesh, corresponding texture coordinates are generated by mesh parameterization, and the first reconstructed mesh is updated to obtain a parameterized first reconstructed mesh, wherein the texture coordinates corresponding to each attribute map are specified by the added corresponding identifier.

[0220] In this embodiment, the reconstructed time domain motion vector and the reconstructed motion vector identifier are obtained by decoding and reconstructing the sub-code stream encoded with the time domain motion vector and the motion vector identifier, and the reference frame list and the reference frame grid are used to realize inter-frame sub-grid reconstruction to obtain the first reconstructed sub-grid.

[0221] If there is an intra-frame sub-grid during inter-frame matching, the intra-frame sub-grid is encoded as described above and then decoded and reconstructed to obtain a second reconstructed sub-grid.

[0222] In an optional embodiment, if the first reconstructed grid includes: a first reconstructed sub-grid obtained by reconstructing an inter-frame sub-grid, and a second reconstructed sub-grid obtained by reconstructing an intra-frame sub-grid, the grids are merged to generate corresponding texture coordinates; or, the texture coordinates corresponding to the first reconstructed sub-grid and the second reconstructed sub-grid are obtained respectively; wherein the fifth information includes an identifier for indicating whether the grids are merged.

[0223] The following is a detailed description of the inter-frame sub-grid reconstruction and grid parameterization process. Please understand the intra-frame sub-grid reconstruction process in conjunction with the above related technologies, which will not be repeated here.

[0224] 1) Reconstruct the inter-frame sub-grid

[0225] To keep consistent with the decoding end, it is necessary to reconstruct the inter-frame sub-grid part at the encoding end. According to the reference frame list, the corresponding temporal motion vector, and the possible motion vector identifier, the partial grid that matches the reference frame grid is restored. In this process, the corresponding reference frame index is first obtained. If there is a motion vector identifier, the available vertices or faces are determined by the motion vector identifier; if there is no motion vector identifier, each vertex of the reference frame grid uses its corresponding motion vector. The reference frame grid is traversed in a specific traversal order. For the traversed vertices or faces, the available temporal motion vectors are applied to the vertices corresponding to the reference frame grid in the vertex order, as shown in formula (14):

[0226] basemesh[i].v[n]=basemesh[j].v[k]+motion[k] (14);

[0227] Among them, basemesh[i].v[n] is the nth vertex of the base mesh of the current frame, basemesh[j].v[k] is the kth vertex of the base mesh of the reference frame, and motion[k] is the temporal motion vector corresponding to the vertex.

[0228] 2) The reconstructed intra-frame sub-grid is merged with the inter-frame sub-grid

[0229] The reconstructed inter-frame sub-grid and the decoded intra-frame sub-grid need to be merged to generate the first reconstructed grid. In inter-frame matching, the boundary vertices of the inter-frame sub-grid and the intra-frame sub-grid are forced to coincide. Therefore, merging the two parts of the grid only requires removing the duplicate points at the boundary. Fig.16 As shown in the figure, the geometric coordinates of the vertices at the boundary are the same, so after merging the meshes, it is only necessary to deduplicate the mesh vertices.

[0230] It should be noted that the mesh merging step can be skipped, and the reconstructed intra-frame sub-grid and inter-frame sub-grid can be processed independently. For example, for subsequent mesh subdivision deformation, different subdivision levels can be performed on the two mesh parts. Whether the mesh is merged can be identified by the fifth information.

[0231] 3) Mesh parameterization

[0232] It will be appreciated by those skilled in the art that, compared to the original input mesh, the reconstructed base mesh may have missing information, and the texture coordinates may be regenerated based on the first reconstructed mesh (i.e., the reconstructed base mesh of the current frame). The texture coordinates may be regenerated for the merged first reconstructed mesh or the independent first reconstructed sub-mesh and the second reconstructed sub-mesh. If the current frame mesh completely matches the reference frame mesh, i.e., there is no intra-frame sub-mesh, the texture coordinates of the vertices of the current frame mesh may be directly equal to the texture coordinates of the corresponding matching points of the reference frame mesh. In this case, the mesh parameterization and subsequent texture coordinate compression steps may be skipped.

[0233] It should be noted that since the original mesh may have multiple attribute maps, this step needs to generate corresponding texture coordinates for each attribute map. When the attribute maps have similar characteristics, multiple attribute maps can share the same texture coordinates, that is, the number of texture coordinate maps can be less than the number of texture maps.

[0234] There are many algorithms for parameterizing meshes, such as the Isocharts algorithm, which uses spectral analysis to implement stretch-driven 3D mesh parameterization, UV-unwrapping, slicing, and packing the 3D mesh into a 2D texture domain. Set a stretch threshold, and the algorithm is outlined as follows:

[0235] a) Compute surface spectral analysis to provide an initial parameterization

[0236] b) Perform stretch optimization iterations

[0237] c) If the stretch of this derived parameterization is less than a threshold, stop

[0238] d) Perform surface spectral clustering to divide the surface into charts

[0239] e) Use graph cut algorithm to optimize chart boundaries

[0240] f) Iterate the splitting of charts until the stretching criteria are met

[0241] The following will introduce the four main parts of surface spectrum analysis, stretching optimization, surface spectrum clustering, and boundary optimization.

[0242] ①Surface spectrum analysis

[0243] Surface spectral analysis is parameterized based on the IsoMap (isometric feature mapping) dimensionality reduction method. Given a set of high-dimensional points, IsoMap calculates the geodesic distance along the manifold as a sequence of jumps between adjacent points. Then the MDS (multidimensional scaling) algorithm is applied to these geodesic distances to find a set of points embedded in a low-dimensional space with similar pairwise distances. For a surface with N points, the calculation process is as follows:

[0244] a) Calculate the symmetric matrix D of the squared geodesic distances between surface points N ;

[0245] b) Double-center and normalize D N to obtain B N , and its calculation process is shown in Equation (15):

[0246]

[0247] where I is the N-dimensional identity matrix and 1 is the unit vector of length N.

[0248] c) Calculate the eigenvalues λ N of B i and the corresponding eigenvectors

[0249] d) For each point i of the original surface, its embedding in the new space is the N-dimensional vector and the calculation process of its j-th element is shown in Equation (16):

[0250]

[0251] The eigenvalues λ N of B i and the corresponding eigenvectors constitute the spectral decomposition of the surface shape. The eigenvectors corresponding to large eigenvalues represent the global low-frequency features on the surface, and the eigenvectors corresponding to small eigenvalues represent the high-frequency details. The high-energy and low-frequency components are used as the basis for chartification and parameterization.

[0252] Although N eigenvalues are required to fully represent a surface with N vertices, a small fraction of them usually occupies most of the energy. Therefore, only n << N of the largest eigenvalues and the corresponding eigenvectors are calculated to generate an n-dimensional embedding of all points.

[0253] Since the mapping from high-dimensional space to low-dimensional space is not isometric, this parameterization will lead to distortion. The distortion of this n-dimensional embedding can be calculated as the sum of the geodesic distance distortions on all vertices. For each vertex i, its geodesic distance distortion (GDD) under embedding is defined as shown in formula (17):

[0254]

[0255] in, is the n-dimensional embedding coordinate of vertex i, d geo (i,j) is the geodesic distance between points i and j.

[0256] When n = 2, surface spectral analysis produces a surface parameterization that minimizes the sum of the squared GDDs of all vertices.

[0257] It should be noted that although the Isomap algorithm calculates the geodesic distance along the manifold, if there are some non-manifolds in the input 3D grid, this solution will perform corresponding preprocessing to eliminate the existence of these non-manifolds.

[0258] ②Stretching optimization

[0259] Since 3D space is not isometric to 2D space, parameterization introduces distortion. Distortion can be measured in many ways, including preservation of angles or areas, or how much a parameter distance is stretched or shrunk on the surface. In this algorithm, we focus on distance distortion, specifically the definition of geometric stretch, which defines the average stretch L of local distances on the surface. 2 and the worst case stretch L ∞ Two measures. Suppose a triangle T with 2D texture coordinates p1, p2, p3, where p i =(s i ,t i ), the corresponding three-dimensional coordinates are expressed as q1, q2, q3, and the calculation process of the affine mapping S(p) = S(s, t) = q is shown in formula (18):

[0260] S(p)=(<p,p2,p3> q1+<p,p3,p1> q2+<p,p1,p2> q3) / <p1,p2,p3> (18);

[0261] in,<a,b,c> represents the area of ​​triangle abc. Since the mapping is affine, its partial derivative is a constant on (s, t), and its calculation process is shown in equations (19) and (20):

[0262]

[0263]

[0264] Where A=<p1,p2,p3> =((s2-s1)(t3-t1)-(s3-s1)(t2-t1)) / 2

[0265] Then the Jacobian matrix [S S ,S t The calculation process is shown in equations (21) and (22):

[0266]

[0267]

[0268] Where a = S s ·S s ,b=S s ·S t ,c=S t ·S t . Singular value γ max , γ min It represents the maximum and minimum lengths obtained when a unit length vector is mapped from a two-dimensional texture domain to a three-dimensional surface, that is, the maximum and minimum local "stretching". The two stretching measures on triangle T are defined as shown in equations (23) and (24):

[0269]

[0270] L ∞ (T) = γ max (twenty four);

[0271] In the entire three-dimensional grid M={T i The definition of the stretching measure on} is shown in equations (25) and (26):

[0272]

[0273]

[0274] Among them, A ′ (T i ) is a triangle T i The surface area in three dimensions.

[0275] Due to L ∞ The L∞ stretch is difficult to control for any method that relies only on a worst-case point in the domain, but after several L 2 Iterations of stretch minimization can significantly improve the results.

[0276] ③Surface spectral clustering

[0277] If the parameterization generated by spectral analysis fails to meet the stretching threshold, it will be divided into smaller charts. Since the global features of the model correspond to larger eigenvalues, they are used for division. The results of spectral analysis are used to calculate several representative vertices, and then charts are grown around these representative points at the same time. This method is called surface spectral clustering. The specific algorithm process is as follows:

[0278] a) Sort the eigenvalues ​​and corresponding eigenvectors from spectral analysis from large to small, i.e. λ1≥λ2≥...≥λ N .

[0279] b) Get λ n / λ n+1 Maximize the first n eigenvalues ​​and eigenvectors (n ≤ 10).

[0280] c) For each vertex i in the 3D mesh, calculate its n-dimensional embedding coordinates

[0281] d) For each of the n embedded coordinates, find the two points with the largest and smallest coordinates and set them as 2n representative points.

[0282] e) Remove those representative points that are too close to each other, generating m ≤ 2n representative points (using a distance threshold of 10 times the average edge length of the input grid).

[0283] f) Using the geodesic distances calculated in the surface spectrum analysis, the 3D mesh is divided into m parts by simultaneously growing charts around the representative points. Each triangle is assigned to the chart with the closest representative point to the triangle (the geodesic distance from the triangle to the representative point is calculated as the average of the geodesic distances from the three vertices of the triangle to the representative vertex).

[0284] ④Boundary optimization

[0285] After splitting the charts, the graph cut algorithm is used to optimize the boundaries between them. Chart boundaries should meet two goals: 1) they should pass through high curvature areas without being too jagged, and 2) they should minimize the embedding distortion of their bordering charts. This algorithm formulates the optimal boundary problem as a grap cutting problem. For simplicity, the binary case of splitting the surface in two is discussed below. When subdividing into more than two charts, each pair of adjacent charts is considered in turn.

[0286] Assume that we are looking for an optimal boundary between chart A and chart B. The initial partition is generated using surface spectral clustering. Then an intermediate region C is generated by extending a region to both sides of the initial partition boundary. The size of the intermediate region is proportional to the total area of ​​the unpeeled patches. Now we use the extension of the method in the graph cut algorithm to construct an undirected flow network graph from C. Here, two adjacent triangles f in the graph cut algorithm are i and f j The definition of “capacity” between is modified as shown in formula (27):

[0287] c(f i ,f j )=αc ang (f i ,f j )+(1-α)c distort (f i ,f j ) (27);

[0288] The first term in equation (27) corresponds to the first goal of non-ragged cutting along edges with high dihedral angles, and the calculation process is shown in equation (28):

[0289]

[0290] Among them, d ang (f i ,f j )=1-cosα ij , α ij is a triangle f i and f j The angle between the normals, avg(d ang ) is the average angular distance between adjacent triangles.

[0291] The second term in (27) measures the embedding distortion, which is calculated as shown in (28) and (29)

[0292]

[0293] d distort (f i ,f j )=|GDD A (f i )-GDD B (f i )|+|GDD A (f j )-GDD B (f j )| (29);

[0294] Among them, GDD A (f i ) and GDD B (f i ) are triangles f i Embedded GDD induced by chart A or chart B, avg(d distort ) is the d on all pairs of adjacent triangles distort (f i ,f j ) average. distort (f i ,f j ) prefers that its neighboring triangles balance the border edges of the GDD between the embeddings determined by chart A and chart B. In other words, the cut should avoid placing triangles on the wrong side, which would produce unnecessary deformation.

[0295] The weight parameter α in formula (27) is a trade-off between the above two objectives.

[0296] The simple implementation of this stretch-driven chartification and parameterization algorithm is very expensive, especially as the number of model vertices increases. Therefore, in order to speed up the calculation, in practical applications, the Iso-charts algorithm uses the extension algorithm of Isomap, landmark Isomap. At the same time, the landmark Isomap algorithm is also used to calculate the embedding coordinates of the vertices in the middle area during boundary optimization to further reduce the embedding distortion.

[0297] Finally, the chart packing algorithm used in the MCGIM algorithm is used to pack the charts generated by the above process into the two-dimensional texture domain. Finally, a three-dimensional mesh with regenerated UV coordinates can be obtained.

[0298] (4) Second information encoding (texture coordinate encoding)

[0299] Optionally, there are multiple encoding methods for the second information according to different application scenarios. The first encoding method is that the texture coordinate information can be encoded according to the connection relationship of the first reconstructed grid. The second encoding method is that the second information can also be selected not to be encoded, and the second information is regenerated at the decoding end using the same grid parameterization method as the encoding process, which can save the encoding link of the second information. Restoring texture coordinates at the decoding end will increase the complexity of the decoding end. Therefore, for some hardware or software that has high requirements for decoding complexity, the complexity of the decoding end can be reduced by encoding texture coordinates. For some codecs that focus on compression performance, the texture coordinates can be regenerated at the decoding end.

[0300] It should be noted that since the mesh parameterization step may generate duplicate geometric vertices, after the mesh parameterization generates the texture coordinates, the duplicate geometric vertices need to be removed to keep consistent with the base mesh reconstructed by the decoder. If you choose not to encode the texture coordinates and generate the texture coordinates at the decoder using the same method as the encoder, this step of removing duplicate geometric vertices can be skipped.

[0301] Regarding the first encoding method of the second information, in an optional implementation manner, the three-dimensional grid sequence encoding method may further include:

[0302] The second information is texture-coordinate encoded to form a second bitstream, and then merged with the remaining bitstreams. Figure 7 The texture coordinate encoding is shown in the dotted lines and dotted boxes.

[0303] When there are multiple attribute maps, the corresponding relationship between the attribute maps and the texture coordinates is identified; wherein the identification is also used as the content of the fifth information, and the fifth information also includes an identification for indicating whether to perform texture coordinate encoding.

[0304] For the second encoding method of the second information, that is, the second information is not encoded, the second information is regenerated using the same grid parameterization method as the encoding process in the decoding end. The specific process is similar to the above encoding end and will not be repeated here. It should be noted that when the decoding end uses the grid parameterization to obtain the second information, the grid parameterization method and the corresponding parameters of the encoding end need to be encoded as the content of the fifth information and transmitted to the decoding end. The overall encoding process is as follows: Fig.21 shown.

[0305] The specific process of texture coordinate encoding is described below.

[0306] Texture coordinate encoding can be done in a similar way to encoding geometric information in static mesh encoders. The texture coordinates generated after mesh parameterization contain not only the values ​​of the texture coordinates, but also the connection relationship of the texture coordinates. Texture coordinate encoding requires compressing the above two parts of information.

[0307] For the connection relationship of the texture coordinates, the connection relationship of the geometric information of the first reconstructed mesh can be referred to, and the difference between the connection relationship of the texture coordinates and the connection relationship of the geometric coordinates can be encoded using the same method as Draco.

[0308] The compression steps of texture coordinates can be divided into quantization, prediction and entropy coding. The process of texture coordinate quantization is similar to the process of geometric coordinate quantization in the intra-frame sub-grid coding module, as shown in equations (30) and (31):

[0309] scaleTexCoord=2^qpTexCoord-1.0 (30);

[0310] mesh.texCoord(v)= Round(mesh.texCoord(v)*scaleTexCoord) (31);

[0311] Where qpTexCoord is the predefined quantization parameter of the texture coordinates, and Round indicates rounding. mesh.texCoord(v) represents the texture coordinates of the vth vertex of the current input mesh. Assuming the texture coordinates of mesh.texCoord(v) are (u, v), then equation (31) can also be expressed as:

[0312] mesh.texCoord(v).u= Round(mesh.texCoord(v).u*scaleTexCoord) (32);

[0313] mesh.texCoord(v).v= Round(mesh.texCoord(v).v*scaleTexCoord) (33);

[0314] The prediction of texture coordinates can also use the parallelogram prediction method, such as Fig.17 As shown in the figure: the triangle with the black solid line as its two sides is the triangle whose texture coordinates have been encoded. Similar to the traversal method of the encoding connection relationship, one side is selected as the side currently being traversed, and the triangle formed by connecting the other encoded vertex is used as half of the parallelogram to predict the texture coordinates of the vertex to be encoded corresponding to the current side, that is, the black vertex connected to the dotted line in the figure. At this time, the coordinate difference between the predicted vertex and the real vertex (the gray vertex to the lower left of the black vertex) is calculated and encoded using entropy coding to form the second bitstream ( Figure 7 The texture coordinate substream in .

[0315] It should be noted that the second information may also be encoded using two or three flat quadrilaterals to predict the UV coordinates to be encoded, and the specific encoding method is not limited here.

[0316] It should be noted that when there are multiple types of texture coordinates, an identifier (or index) can be specified for each texture coordinate to indicate the attribute map to obtain the corresponding texture coordinates, or the corresponding texture coordinates can be specified for each attribute map in the order of decoding by default. The identifier indicating the correspondence between the attribute map and the texture coordinates, the identifier indicating whether to encode the texture coordinates, and the encoding method and related parameters used in the encoding process of the second information are also encoded as the content of the fifth information and transmitted to the decoding end.

[0317] (5) Third Information (Spatial Displacement) and Third Information Coding

[0318] In an optional implementation manner, the three-dimensional grid sequence encoding method further includes:

[0319] Performing mesh subdivision deformation on the parameterized first reconstructed mesh to obtain a subdivision-deformed basic mesh and a spatial displacement of each vertex of the subdivision-deformed basic mesh;

[0320] The spatial displacement or the residual between the spatial displacement and the spatial displacement of the reference frame grid matching point is encoded according to a predetermined encoding method to form a third code stream, and is merged with the remaining code streams; wherein the fifth information includes an indication of the predetermined encoding method of the third code stream.

[0321] Optionally, the predetermined encoding method is video encoding or entropy encoding.

[0322] In this embodiment, in order to improve the quality of the reconstructed mesh, the third information is obtained by performing mesh subdivision deformation on the parameterized first reconstructed mesh and the third information is encoded to obtain a third bitstream. It should be noted that if the quality of the first reconstructed mesh obtained using the first bitstream can meet the requirements, this step can be skipped, and the fifth information includes an identifier for indicating whether to perform subdivision deformation.

[0323] The subdivision deformation and the third information encoding process are described in detail below.

[0324] 1) Subdivision deformation

[0325] First, the basic idea of ​​the subdivision deformation process is explained. Fig.18 As shown in , the same concept is applied to the input 3D mesh to generate spatial displacements. Fig.18 In , the input 2D curve (represented by a 2D polyline), called the "original" curve, is first downsampled to generate a base curve / polyline, called the "simplified" curve. The subdivision scheme is then applied to the simplified polyline to generate the "subdivided" curve. The subdivided polyline is then deformed to obtain a better approximation of the original curve. That is, the spatial displacement vector ( Fig.18 The shape of the spatial displacement curve is as close to the shape of the original curve as possible (as shown by the red arrow in the figure). These spatial displacement vectors are the spatial displacement information output by this module.

[0326] The subdivision deformation step takes the parameterized first reconstructed mesh as input. The input mesh is first subdivided. The subdivision scheme can be arbitrarily selected. One possible scheme is the midpoint subdivision scheme, which subdivides each triangle into four sub-triangles in each subdivision iteration, such as Fig.19As shown in Figure 2, a new vertex is introduced in the middle of each edge, and the subdivision of geometric information and attribute information is performed independently because the connection relationship between geometric information and attribute information is usually different.

[0327] This scheme calculates the midpoint v of the newly introduced edge (v1, v2) 12 The position Pos(v 12 ) is shown in formula (34):

[0328]

[0329] Among them, Pos(v1) and Pos(v2) are the geometric coordinates of vertices v1 and v2 respectively. For texture coordinates, the same calculation steps are used.

[0330] For the subdivided mesh, find the nearest neighbor of each point on the original input mesh (including the points on the original mesh surface), which can be accelerated by data structures such as kdTree. The spatial displacement of the geometric coordinates of each vertex of the subdivided mesh is obtained by calculating the distance between each vertex on the subdivided mesh and its nearest neighbor on the original input mesh. The subdivided and deformed mesh is passed to the attribute graph encoding part, and the spatial displacement is passed to the spatial displacement encoder.

[0331] 2) Spatial displacement coding

[0332] There are many ways to encode spatial displacement: one way is to consider converting the coordinate system of the spatial displacement, that is, converting the coordinate system of the spatial displacement of each vertex into a coordinate system constructed by the normal vector of the vertex corresponding to the spatial displacement and the two components tangent to the normal vector. Then the spatial displacement is transformed, such as wavelet transform. The transformed coefficients are quantized and arranged in the image in the order of scanning, and video encoding is applied to the image. In addition, the generated or processed spatial displacement can also be directly encoded using entropy coding.

[0333] Furthermore, after the current frame grid is subdivided and deformed, the residual information of the spatial displacement of the current frame can be obtained according to the second reconstructed grid of the reference frame (ie, the reconstructed subdivided and deformed grid), and the residual information can be encoded using the same encoding process as the spatial displacement.

[0334] ①Video encoding method

[0335] ●Coordinate system conversion:

[0336] The generated spatial displacement is in the same global coordinate system as the input mesh. A possible optimization method is to transform it into a local coordinate system, where the local coordinate system of each vertex is defined by the normal vector of the vertex on the subdivided mesh. The advantage of this method is that the normal component of the spatial displacement has a more significant impact on the quality of the reconstructed mesh than the two tangential components, so a larger quantization parameter can be set for the tangential component.

[0337] Wavelet transform:

[0338] For the quantized spatial displacement, a wavelet transform can be applied to it. A possible wavelet transform such as a linear wavelet transform is shown below:

[0339] The prediction process is defined as shown in formula (35):

[0340]

[0341] Among them, v is the newly inserted midpoint on the edge (v1, v2), Signal(v), Signal(v1) and Signal(v2) are the spatial displacements corresponding to vertices v, v1 and v2 respectively.

[0342] The update process is defined as shown in formula (36):

[0343]

[0344] where v * is the set of all vertices adjacent to vertex v.

[0345] Wavelet coefficient quantization:

[0346] There are many ways to quantize wavelet coefficients. One method is shown in equations (37) and (38):

[0347] disp[v].d[k]=floor(disp[v].d[k]*scale[k]) (37);

[0348]

[0349] Where disp[v] represents the wavelet coefficient of the spatial displacement of the vth vertex, d[k] represents the kth coefficient of its spatial displacement, and floor represents rounding down. bitDepthPosition represents the bit depth of the current grid position, and qp[k] represents the quantization parameter of the kth coefficient. As mentioned above, after the spatial displacement is converted into a coordinate system, its normal component has a more significant effect on the quality than the tangential component, so a larger quantization parameter can be used for the tangential component.

[0350] At the same time, according to the characteristics of wavelet transform, different quantization parameters can be used for the newly generated vertices and the original vertices. That is, for the subdivided vertices, the quantization parameter update is shown in formula (39):

[0351] scale[k]=scale[k]*lodScale[k] (39);

[0352] Among them, lodScale[k] represents the coefficient of the quantization parameter of the current subdivision level.

[0353] ●Wavelet coefficient arrangement:

[0354] For the wavelet coefficients generated after wavelet transform, arrange them on a two-dimensional image as follows:

[0355] ■Traverse the wavelet coefficients in order from low frequency to high frequency.

[0356] ■ For each coefficient, determine the index of the NxM pixel block (eg N=M=16) where it lies, where it should be stored in the raster scan order of the block.

[0357] ■Calculate the position of the corresponding NxM pixel block on the image according to the Morton order.

[0358] The arrangement is not limited here, and other arrangement schemes may also be used, such as zigzag order, raster order, etc. The encoder may explicitly specify the corresponding arrangement scheme in the bit stream.

[0359] ●Video encoding:

[0360] After arranging the wavelet coefficients on a two-dimensional image, they can be directly encoded using a video encoder. The proposed scheme is independent of the video encoding technology used, and the type of video encoder can be explicitly specified in the bitstream. At the same time, if quantization is applied before video encoding, the video encoding here can use a lossless method, and there is no need to reconstruct the spatial displacement at the encoding end.

[0361] ② Entropy coding method

[0362] The generated spatial displacement can be directly compressed using an existing entropy coding algorithm, such as CABAC. Entropy coding can also be directly applied to the coefficients after wavelet transformation. Corresponding quantization can be performed before entropy coding.

[0363] ③Time domain reference

[0364] The residual of the spatial domain displacement of the current frame can also be obtained based on the subdivided and deformed grid of the reference frame. Specifically, for the subdivided and deformed grid of the current frame, the points inside its matching area correspond one-to-one to the corresponding vertices of the reference frame. Therefore, the difference (i.e., residual) of the spatial domain displacement of the corresponding points in the current frame grid and the reference frame grid can be calculated, and the residual is encoded to form a third bitstream.

[0365] (6) Fourth Information (Attribute Map) and Fourth Information Coding

[0366] In an optional implementation, the process of obtaining the property graph may include:

[0367] Decoding and reconstructing the third code stream to obtain a reconstructed spatial domain displacement;

[0368] Reconstructing the subdivided deformed grid using the subdivided basic grid and the reconstructed spatial domain displacement to obtain a second reconstructed grid;

[0369] The second reconstructed grid, the first attribute graph and the current frame grid are used to perform attribute graph conversion to obtain a second attribute graph; wherein the second attribute graph is attribute graph encoded to form a fourth bit stream.

[0370] Since the spatial displacement coding stage quantization and other processes cause certain losses in the spatial displacement, it is necessary to reconstruct the spatial displacement at the encoding end to keep it consistent with the decoding end. After obtaining the reconstructed spatial displacement, the first reconstructed grid is subdivided and the second reconstructed grid is obtained according to the corresponding spatial displacement, that is, the reconstructed subdivided and deformed grid, and it is passed to the attribute map encoding part.

[0371] The following is a detailed description of the attribute graph conversion and attribute graph encoding process.

[0372] 1) Property graph conversion

[0373] First, attribute map conversion is performed according to the input current frame grid, the input first attribute map and the second reconstructed grid, such as Fig.21 The steps of attribute graph conversion are as follows:

[0374] Calculate the texture coordinates of each pixel on the attribute map to be generated, such as the texture coordinates corresponding to pixel A(i,j) is P(u,v).

[0375] Determine whether the texture coordinate is within a certain triangle face after the subdivision deformation mesh is parameterized.

[0376] If the texture coordinate does not belong to any triangle, the pixel is marked as an empty pixel and can be filled with a filling algorithm later.

[0377] If the texture coordinate belongs to a triangle, then

[0378] ■Mark the pixel as filled.

[0379] ■Calculate the center of gravity coordinates of the texture in the current triangle surface based on the texture coordinates.

[0380] ■ According to the barycentric coordinates and the corresponding triangular faces, the two-dimensional texture coordinates are mapped to three-dimensional geometric coordinates, that is, mapped to the points on the subdivided deformation grid corresponding to the texture coordinates, as shown by M(x, y, z) in the figure.

[0381] ■Find the point on the input original grid that is closest to the three-dimensional coordinate, as shown in the figure as M′(x,y,z).

[0382] ■Calculate the centroid coordinates of the three-dimensional coordinates according to the triangle surface they are on and map them to two dimensions to calculate their texture coordinates, i.e. P′(u′,v′).

[0383] ■Sampling is performed on the input original attribute map through the texture coordinates to obtain the value A′(i′,j′) of the corresponding pixel position.

[0384] ■Assign this value to the corresponding pixel A(i,j) on the attribute map to be generated.

[0385] For empty pixels, existing filling algorithms (such as Push-Pull algorithm) may be used to fill these empty pixels.

[0386] 2) Attribute Graph Encoding

[0387] After the attribute graph is regenerated, it can be encoded using an existing video encoder, such as H.264 / AVC, H.265 / HEVC, H.266 / VVC, etc. to obtain an output fourth bitstream (ie, Figure 7 In addition, for color attribute maps, color space conversion and chroma subsampling can be selectively applied to enable video encoding to obtain better rate-distortion performance, such as color space conversion from RGB 444 to YUV420. When color space conversion is applied, the color conversion scheme is also used as the content of the fifth information. In the case where there are multiple attribute maps, the corresponding relationship between each attribute map and the texture coordinates needs to be identified through the fifth information during encoding.

[0388] (7) Fifth information (auxiliary information)

[0389] In the encoding process, there are some alternative solutions in each processing link, such as the type of grid encoder, the type of video encoder, the grid subdivision solution, the spatial displacement transformation solution, etc. This embodiment allows the use of different solutions. Therefore, it is necessary to transmit the selected solution to the decoding end to guide correct decoding.

[0390] Optionally, the auxiliary information includes an optional reference frame list, which identifies the index list of reference frames used by the current frame; an intra-frame coding flag can also be used to identify that the current frame has no reference frame or the current frame does not match the reference frame at all, and the flag is also passed to the decoding end as auxiliary information. When the intra-frame coding flag is valid, the current frame does not have information for constructing an inter-frame sub-grid, and the current frame reconstruction grid is constructed based on the intra-frame sub-grid; the subdivision flag indicates whether the reconstructed basic grid of the current frame needs to be subdivided and deformed, that is, whether it contains spatial displacement information; the grid merge flag indicates whether the reconstructed intra-frame sub-grid and inter-frame sub-grid are processed independently. Auxiliary information can also include the type of static grid encoder, the type of video encoder, the grid subdivision scheme, the spatial displacement transformation scheme, the coefficient arrangement scheme, and the color conversion scheme, etc.

[0391] In summary, after the above encoding is completed, the code streams corresponding to each information are mixed to obtain the encoded code stream finally output by the encoding end. The three-dimensional mesh sequence encoding and decoding scheme of the embodiment of the present invention, in the encoding scheme, the input reference frame mesh and the current frame mesh carrying the original attribute map are processed to obtain basic mesh information, texture coordinates, spatial displacement, attribute map and auxiliary information; at least the basic mesh information, attribute map and auxiliary information are encoded to form multiple code streams; the encoding can be completed by merging the multiple code streams into a bit stream output. The encoding scheme of the embodiment of the present invention is used for compressing and encoding a dynamic mesh sequence with attribute information, and can make full use of the spatiotemporal correlation between the encoded mesh and the mesh to be encoded to reduce mesh information redundancy, thereby reducing the bit rate of the code stream.

[0392] In a second aspect, corresponding to the encoding method of the three-dimensional grid sequence proposed in the first aspect, an embodiment of the present invention provides an encoding device for a three-dimensional grid sequence, see Fig.19 , the encoding device comprises:

[0393] The coding information obtaining module C01 is used to process the input reference frame grid and the current frame grid carrying the first attribute map to obtain first information, second information, third information, fourth information and fifth information; wherein the reference frame grid is a grid that has been encoded and reconstructed; the current frame grid is a grid to be encoded; and the fifth information is used for the association and correspondence between the various parts of information and to characterize the coding scheme;

[0394] The encoding module C02 is used to encode at least the first information, the fourth information and the fifth information to form a plurality of code streams including a first code stream, a fourth code stream and a fifth code stream;

[0395] The code stream merging module C03 is used to merge multiple code streams into a bit stream.

[0396] For the specific content of the decoding device and the corresponding beneficial effects, please refer to the relevant content of the three-dimensional grid sequence encoding method provided in the first aspect, which will not be elaborated here.

[0397] In a third aspect, in response to the three-dimensional mesh sequence encoding method proposed in the first aspect, an embodiment of the present invention provides a three-dimensional mesh sequence decoding method, see Fig. 20 , may include the following steps D1 to D2:

[0398] D1, demultiplexing the bit stream of the three-dimensional grid that has been encoded to obtain multiple code streams including a first code stream, a third code stream, a fourth code stream and a fifth code stream, and decoding each of the obtained code streams;

[0399] D2, using the second information and the decoded first information, third information, fourth information and fifth information, reconstruct a decoded reconstruction grid and a decoded reconstruction attribute map; wherein the fifth information is used for the association correspondence between the various parts of information and to characterize the coding scheme.

[0400] Please refer to the above decoding process Fig.24 The overall decoding process diagram of the decoding method of the three-dimensional grid shown in the figure is understood, and the figure is a grayscale effect. Fig.24 , the specific process of the decoding method is explained by explaining the process of obtaining the above-mentioned information. Fig.24 and Fig.24 In the figure, the dotted lines indicate optional steps.

[0401] (1) Fifth information (auxiliary information)

[0402] The decoding end first determines the decoding scheme based on the auxiliary information, which mainly includes the intra-frame coding flag, which indicates whether the current frame needs to be constructed according to the reference frame grid; the reference frame list, which indicates the index of the reference frame required for the current frame, and the reference frame list is used for the subsequent basic grid reconstruction step; the motion vector identification information, which indicates whether the current frame grid has a motion vector identification. If it exists, the reference frame determines the matching point of the reference frame according to the identification information decoded from the motion vector identification sub-stream, so as to apply the corresponding motion vector. If it does not exist, the corresponding motion vector is applied to each vertex of the reference frame; the subdivision flag, which indicates whether the reconstructed basic grid needs to be subjected to subsequent subdivision deformation operations; the grid merge flag, which indicates whether the decoding end processes the reconstructed intra-frame sub-grid and inter-frame sub-grid independently; the static grid encoder type, which guides the decoding end to use the corresponding static grid decoder; the video encoder type, which guides the decoding end to use the corresponding video decoder; the subdivision scheme, that is, the scheme for subdividing the basic grid in the reconstructed deformed grid, and the subdivision scheme of the codec end should remain consistent; there are also optional spatial displacement transformation schemes, coefficient arrangement schemes, etc.

[0403] It should be noted that the auxiliary information described here includes auxiliary information that is transmitted independently and header information that may be included in other code stream parts.

[0404] (2) First information (basic grid information)

[0405] In an optional implementation manner, the first information is obtained by decoding the first code stream using the fifth information, including:

[0406] When the fifth information indicates that the current frame grid has a time domain motion vector identifier, the first bitstream is decoded using the fifth information to obtain first information including a reference frame list, a time domain motion vector, and a motion vector identifier;

[0407] When the fifth information indicates that the current frame grid does not have a time domain motion vector identifier, the first bitstream is decoded using the fifth information to obtain first information including a reference frame list and a time domain motion vector;

[0408] Furthermore, when there is an intra-frame sub-grid, the first code stream is decoded using the static grid decoder indicated by the fifth information to obtain a second reconstructed sub-grid, and the second reconstructed sub-grid is also used as the content of the first information output by the decoding.

[0409] The first code stream decoding process is described in detail below.

[0410] 1) Motion vector identification decoding

[0411] If the auxiliary information indicates that the current frame grid has a temporal motion vector identifier, the corresponding temporal motion vector identifier bitstream is obtained for decoding. The decoded motion vector identifier may be for each vertex of the reference frame, or for all vertices of an area of ​​the reference frame, and this information is indicated by the auxiliary information.

[0412] The motion vector identifier is an array of 0 / 1 numbers. It is entropy decoded according to the entropy coding algorithm corresponding to the encoder. The motion vector identifier here includes the motion vector identifiers of all reference frames. After decoding the motion vector identifier, it is necessary to restore the motion vector identifier corresponding to each reference frame based on the index of the reference frame in the reference frame list and the number of vertices or faces of the reference frame.

[0413] 2) Temporal motion vector decoding

[0414] The decoding process of the temporal motion vector is opposite to that of the encoding end, and is divided into entropy decoding, inverse prediction, and inverse quantization. The inverse prediction and inverse quantization steps are performed according to the order of prediction and quantization indicated by the auxiliary information. The inverse prediction process is similar to the prediction process. By obtaining the motion vector of the decoded vertex, the predicted motion vector of the current vertex is obtained through weighted prediction, and then the residual obtained by entropy decoding of the current vertex is added to the predicted motion vector to obtain the motion vector of the current vertex.

[0415] The dequantization process is as follows:

[0416]

[0417] mesh.Mv(v)=mesh.Mv(v)*iscaleMv (41);

[0418] Among them, scaleMv represents the quantization parameter of the motion vector, and mesh.Mv(v) represents the motion vector of the current vertex.

[0419] The temporal motion vector is similar to the motion vector identifier and also contains the temporal motion vectors of all reference frames. After the bitstream is entropy decoded and deprecated to obtain the temporal motion vector, the temporal motion vector corresponding to each reference frame is restored based on the index of the reference frame in the reference frame list and the number of vertices of the reference frame.

[0420] 3) Intra-frame sub-grid decoding

[0421] The intra-frame sub-grid code stream is encoded by a static grid encoder, which can be regarded as a complete grid sub-code stream. The intra-frame sub-grid can be obtained by decoding it with the corresponding static grid decoder. Fig.26 As shown:

[0422] Similar to the encoding end, after decoding each part of the information through entropy decoding, the connection relationship of the grid is first reconstructed, that is, the corresponding connection relationship is restored according to the symbols decoded by entropy. The process of restoring the connection relationship is similar to the process of generating symbols at the encoding end. Decoding is to infer the corresponding connection relationship based on the symbols.

[0423] After decoding the connection relationship, the inverse prediction and inverse quantization steps are performed according to the order of prediction and quantization indicated by the auxiliary information. For example, the decoded geometric information residual and possible attribute information residual can be inversely predicted according to the order of traversal of the connection relationship to obtain geometric information and attribute information. Then, the grid is reconstructed based on this information, and the reconstructed grid is inversely quantized according to the quantization parameters of the encoding end to obtain the reconstructed basic grid. The process of geometric information inverse quantization is shown in equations (42) and (43):

[0424] iscalePosition=1.0 / scalePosition (42);

[0425] mesh.point(v)=mesh.point(v)*iscalePosition (43);

[0426] Among them, scalePosition is the quantization coefficient corresponding to the geometric information of the encoding end, and mesh.point(v) is the geometric coordinate of the vth vertex of the current input mesh. The process of attribute information dequantization is similar to the above formula.

[0427] (3) Second information (texture coordinates)

[0428] In an optional implementation manner, if the fifth information indicates that the encoding end does not perform texture coordinate encoding, the process of obtaining the texture coordinates includes:

[0429] Reconstructing the basic grid using the fifth information and the first information to obtain a first reconstructed grid;

[0430] For each attribute map in the first reconstructed mesh, corresponding texture coordinates are generated by mesh parameterization, and the first reconstructed mesh is updated to obtain a parameterized first reconstructed mesh; wherein the texture coordinates corresponding to each attribute map are specified by adding corresponding identifiers.

[0431] Optionally, when there are multiple attribute maps, the texture coordinates are made to correspond to the attribute maps according to the correspondence between the attribute maps and the texture coordinates identified in the fifth information.

[0432] In this embodiment, as described in inter-frame coding, after the base mesh is reconstructed at the encoding end, mesh parameterization is performed to regenerate the texture coordinates of the base mesh. This process can also be performed at the decoding end to omit the encoding of the texture coordinates. Specifically, the base mesh reconstructed by the base mesh information only contains geometric information and connection relationships. Then, the reconstructed base mesh is subjected to a parameterization process consistent with that at the encoding end to generate texture coordinates for each vertex, and then the subsequent operation of reconstructing the subdivided mesh is performed on the parameterized mesh to obtain the mesh finally output by the decoding end, and the attribute graph is still decoded in the original manner to obtain the attribute graph finally output. The decoding process is as follows Fig.25 shown.

[0433] Among them, if the first reconstructed grid includes: a first reconstructed sub-grid obtained by reconstructing the inter-frame sub-grid, and a second reconstructed sub-grid obtained by reconstructing the intra-frame sub-grid, according to the identifier in the fifth information used to indicate whether the grids are merged, the first reconstructed sub-grid and the second reconstructed sub-grid are merged or processed separately to obtain the corresponding texture coordinates.

[0434] The reconstruction of the basic grid at the decoding end is basically the same as that at the encoding end, that is, the first reconstructed sub-grid obtained by reconstructing the inter-frame sub-grid and the second reconstructed sub-grid obtained by reconstructing the intra-frame sub-grid are merged to obtain the first reconstructed grid (that is, the basic grid reconstructed by decoding the current frame).

[0435] First, the inter-frame sub-grid is reconstructed according to the reference frame list, the corresponding temporal motion vector, and the possible motion vector identifier. In this process, the reference frame vertices are first sorted according to the reference frame list and the sorting method indicated in the default or auxiliary information, and then according to the traversal method indicated by the auxiliary information, the vertices or faces traversed and the corresponding temporal motion vector identifier are used to determine which vertices or faces of the corresponding reference frame are available; if there is no motion vector identifier, each vertex of the reference frame uses its corresponding motion vector. The reference frame is traversed in a specific traversal order, and for the traversed vertices or faces, the available temporal motion vectors are applied to the vertices corresponding to the reference frame in the order of the vertices, as shown in equation (44):

[0436] basemesh[i].v[n]=basemesh[j].v[k]+motion[k] (44);

[0437] Among them, basemesh[i].v[n] is the nth vertex of the base mesh of the current frame, basemesh[j].v[k] is the kth vertex of the base mesh of the reference frame, and motion[k] is the temporal motion vector corresponding to the vertex.

[0438] After reconstructing the inter-frame sub-grid to obtain the first reconstructed sub-grid, if there are vertices whose geometric positions overlap after using the motion vector, the repeated vertices in the grid and the degenerate surfaces (surfaces with an area of ​​0) generated by the repeated vertices are removed.

[0439] Then, based on the auxiliary information, determine whether to merge the decoded intra-frame sub-grid with the inter-frame sub-grid, filter out duplicate points at the boundary, and obtain the first reconstructed grid. Then, apply the decoded texture coordinates to each vertex on the first reconstructed grid in vertex order to obtain the final decoded and reconstructed base grid.

[0440] If the auxiliary information indicates that the intra-frame sub-grid and the inter-frame sub-grid at the encoding end are processed independently, the first reconstructed sub-grid and the second reconstructed sub-grid are subsequently processed independently.

[0441] If the auxiliary information indicates that the current frame grid has no reference frame, the current frame basic grid is constructed only by the second reconstructed sub-grid, that is, there is no inter-frame sub-grid.

[0442] In an optional implementation manner, if the fifth information instructs the encoding end to perform texture coordinate encoding, the process of obtaining the texture coordinates includes:

[0443] Demultiplexing the bit stream of the three-dimensional grid that has been encoded to obtain a second bit stream;

[0444] The texture coordinates of the second code stream are decoded by using the fifth information and the first information to obtain the texture coordinates for mesh reconstruction in conjunction with the first information.

[0445] Specifically, the texture coordinate bitstream can be divided into a texture coordinate connection relationship bitstream and a texture coordinate value bitstream. For the texture coordinate connection relationship bitstream, the difference between the texture coordinate connection relationship and the geometric connection relationship is obtained after entropy decoding. The connection relationship of its geometric information is obtained according to the basic grid information obtained by the basic grid decoding module, and then the connection relationship of the texture coordinates is restored through the difference in the connection relationship.

[0446] The texture coordinate value part bitstream is entropy decoded to obtain the residual information of the texture coordinates, and then the texture coordinate residual is deprecated and dequantized according to the connection relationship of the restored texture coordinates to obtain the restored texture coordinates.

[0447] For texture coordinates of multiple attributes, the same decoding steps are used to obtain the connection relationship and texture coordinates of each type of attribute texture coordinates. After decoding, an identifier is added to each texture coordinate according to the instructions in the auxiliary information to indicate that the attribute map obtains the corresponding texture coordinates, or an identifier is added to each texture coordinate according to the decoding order by default.

[0448] (4) Third information (spatial displacement)

[0449] In an optional implementation manner, the process of obtaining the spatial displacement includes:

[0450] Decoding the third code stream according to the encoding mode of the third code stream indicated in the fifth information to obtain a spatial domain displacement;

[0451] If the encoding method of the third code stream is video encoding, the third code stream is decoded according to the video decoder type indicated in the fifth information to obtain a two-dimensional image; the vertices are restored from the two-dimensional image in a corresponding order using the predetermined vertex sorting method indicated in the fifth information, and the corresponding spatial displacement of the vertices is reconstructed;

[0452] If the encoding method of the third code stream is entropy encoding, the third code stream is entropy decoded according to the entropy encoding method indicated in the fifth information to reconstruct the spatial displacement corresponding to the vertex.

[0453] Optionally, if the fifth information indicates that the third code stream encoding process uses a reference frame mesh as a reference, the decoded result is the residual of the spatial displacement of the current frame mesh vertices relative to the reference frame mesh matching points, and the spatial displacement of the vertices of the current frame is restored through the vertices of the second reconstructed mesh of the reference frame and the residual.

[0454] Specifically, the spatial displacement code stream is decoded by a spatial displacement decoder. If the encoding end compresses the spatial displacement by video encoding, the decoding end decodes it by a corresponding video decoder and restores it from the two-dimensional image in the corresponding order according to the arrangement scheme. Then, inverse transformation, inverse quantization and other operations are performed on it to restore the spatial displacement consistent with the encoding end. If entropy encoding is used, entropy decoding can be directly performed on it.

[0455] For the spatial displacement obtained by decoding, it is determined based on the auxiliary information whether it is obtained based on the subdivided deformed mesh reconstructed according to the reference frame. If the spatial domain is obtained through inter-frame coding, the spatial displacement of the current vertex is the residual information obtained by decoding plus the spatial displacement of the corresponding vertex of the reference frame.

[0456] In an optional implementation manner, the process of obtaining the decoding and reconstruction grid includes:

[0457] Subdividing the first reconstructed grid of the current frame to obtain a subdivided grid;

[0458] The subdivided grid and the spatial domain displacement are used to perform subdivided deformed grid reconstruction to obtain a second reconstructed grid as a decoded reconstructed grid.

[0459] After the first reconstructed mesh (i.e., the base mesh) and the spatial displacement decoding reconstruction are completed, the second reconstructed mesh is obtained based on the two parts of the reconstructed subdivided deformed mesh as the decoded reconstructed mesh. If the auxiliary information indicates that the spatial displacement encoding process uses a reference frame as a reference, that is, the spatial displacement of the vertices in the area matching the reference frame in the decoded spatial displacement is the residual of the spatial displacement of the current frame vertices relative to the reference frame vertices, then the spatial displacement of the vertices in the matching area of ​​the current frame is first restored through the vertices of the subdivided deformed mesh reconstructed by the reference frame and the residual, and then the subsequent reconstruction steps are performed. That is, the reconstructed base mesh is subdivided, which is consistent with the subdivision method of the encoding end. The corresponding spatial displacement is added to each vertex of the subdivided mesh, as shown in formula (45):

[0460] deformedmesh[i].v[k]=subdivmesh[i].v[k]+displacement[k] (45)

[0461] Among them, subdivmesh[i].v[k] is the geometric coordinates of the kth vertex after the base mesh is subdivided in the current frame (index is i), displacement[k] is the spatial displacement corresponding to the kth vertex, and deformedmesh[i].v[k] is the geometric coordinates of the kth vertex after subdivision and deformation in the current frame.

[0462] (5) Fourth information (attribute map)

[0463] In an optional implementation, the process of obtaining the decoded reconstructed attribute map includes:

[0464] Using the fifth information, the fourth bitstream is decoded with a property map to obtain fourth information including a plurality of property maps as a decoded and reconstructed property map. Using the fifth information, the fourth bitstream is decoded with a property map, including:

[0465] The video decoder indicated in the fifth information is used to decode the attribute map of the fourth bit stream; wherein, for multiple types of attribute maps, each attribute map is matched with the corresponding texture coordinates according to the identifier after obtaining the fourth information.

[0466] In an optional implementation manner, after the fourth bit stream is decoded with the attribute map, the attribute map is converted into a color space according to the color space conversion identifier indicated in the fifth information to obtain a color space corresponding to the first attribute map. Figure 1 consistent image format.

[0467] In this embodiment, the attribute graph is decoded by a video decoder. An optional color space conversion is performed on it to obtain the attribute graph that is input to the encoding end. Figure 1 The consistent image format is obtained to obtain the attribute map of the final decoded output.

[0468] In summary, after the above decoding process, the deformed mesh reconstructed by the decoding end and the corresponding attribute map are finally obtained.

[0469] The three-dimensional mesh sequence decoding method of the embodiment of the present invention demultiplexes the bit stream of the three-dimensional mesh that has been encoded to obtain multiple code streams including an auxiliary information code stream, a basic mesh code stream, a spatial displacement sub-code stream and an attribute map sub-code stream; decodes each of the obtained code streams, and reconstructs a decoded reconstructed mesh and a decoded reconstructed attribute map using texture coordinates and the decoded auxiliary information, basic mesh information, spatial displacement and attribute map. The method of the present invention can make full use of the spatiotemporal correlation between the encoded mesh and the mesh to be encoded to reduce mesh information redundancy, thereby reducing the bit rate of the code stream.

[0470] In a fourth aspect, corresponding to the three-dimensional grid sequence decoding method proposed in the third aspect, an embodiment of the present invention provides a three-dimensional grid sequence decoding device, see Fig. 27 , the decoding device comprises:

[0471] The decoding module D01 is used to demultiplex the bit stream encoded by the three-dimensional grid to obtain multiple code streams including the first code stream, the third code stream, the fourth code stream and the fifth code stream, and decode each of the obtained code streams;

[0472] The reconstruction module D02 is used to reconstruct a decoded reconstruction grid and a decoded reconstruction attribute map using the second information and the decoded first information, third information, fourth information and fifth information; wherein the fifth information is used for the association correspondence between the various parts of information and to characterize the coding scheme.

[0473] For the specific content of the decoding device and the corresponding beneficial effects, please refer to the relevant content of the three-dimensional grid sequence decoding method provided in the third aspect, which will not be elaborated here.

[0474] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants are intended to cover non-exclusive inclusion, so that an article or device including a series of elements includes not only those elements, but also other elements that are not explicitly listed. In the absence of further restrictions, the elements defined by the statement "including one..." do not exclude the existence of other identical elements in the article or device including the elements. Similar words such as "connect" or "connected" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect.

[0475] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.

Claims

1. A three-dimensional grid sequence encoding method, characterized in that: include: Processing the input reference frame grid and the current frame grid carrying the first attribute map to obtain first information, second information, third information, fourth information and fifth information; wherein the reference frame grid is a grid that has been encoded and reconstructed; the current frame grid is a grid to be encoded; and the fifth information is used for the association and correspondence between the various parts of information and to characterize the encoding scheme; Encode at least the first information, the fourth information, and the fifth information to form a plurality of code streams including a first code stream, a fourth code stream, and a fifth code stream; The multiple code streams are combined into a bit stream.

2. The three-dimensional grid sequence encoding method according to claim 1, characterized in that: Processing the input reference frame mesh and the current frame mesh carrying the first attribute map includes: Performing inter-frame matching on the reference frame grid and the current frame grid according to a predetermined matching method to obtain the first information; the first information includes a reference frame list, a temporal motion vector and a motion vector identifier corresponding to each reference frame; and when there is an intra-frame sub-grid in the inter-frame matching, the first information also includes the intra-frame sub-grid; The fifth information includes an indication mark of the predetermined matching method.

3. The three-dimensional grid sequence encoding method according to claim 1, characterized in that: When obtaining the first information by using inter-frame matching, if a mismatching area is detected, the motion vector of each vertex in the mismatching area is adjusted so that the vertices in the mismatching area are merged with the matching vertices. The corresponding first information includes a reference frame list, the time domain motion vector corresponding to each reference frame, and the intra-frame sub-grid.

4. The three-dimensional grid sequence encoding method according to claim 2 or 3, characterized in that: When performing inter-frame matching, the reference frame mesh vertices are sorted according to a predetermined sorting method to determine the traversal order of the reference frame mesh vertices, wherein the fifth information includes an indication of the predetermined sorting method.

5. The three-dimensional grid sequence encoding method according to claim 2 or 3, characterized in that: When there is an intra-frame sub-grid in the inter-frame matching, a grid simplification process is performed on the intra-frame sub-grid, and the simplified grid is used as the first intra-frame sub-grid.

6. The three-dimensional grid sequence encoding method according to claim 5, characterized in that: The first information is encoded to form the first code stream; wherein the time domain motion vector is encoded by time domain motion vector to form a first sub-code stream, the motion vector identifier is encoded by motion vector identifier to form a second sub-code stream, and the intra-frame sub-grid or the first intra-frame sub-grid is encoded by intra-frame sub-grid to form a third sub-code stream.

7. The three-dimensional grid sequence encoding method according to claim 1, characterized in that: The second information includes texture coordinates, and the process of obtaining the texture coordinates includes: Decoding the first code stream and reconstructing a grid to obtain a first reconstructed grid; For each attribute map in the first reconstructed mesh, corresponding texture coordinates are generated by mesh parameterization, and the first reconstructed mesh is updated to obtain a parameterized first reconstructed mesh, wherein the texture coordinates corresponding to each attribute map are specified by the added corresponding identifier.

8. The three-dimensional grid sequence encoding method according to claim 7, characterized in that: If the first reconstructed grid includes: a first reconstructed sub-grid obtained by reconstructing an inter-frame sub-grid, and a second reconstructed sub-grid obtained by reconstructing an intra-frame sub-grid, the first reconstructed sub-grid and the second reconstructed sub-grid are meshed together to generate corresponding texture coordinates; or, texture coordinates corresponding to the first reconstructed sub-grid and the second reconstructed sub-grid are obtained respectively; wherein the fifth information includes an identifier for indicating whether the grids are merged.

9. The three-dimensional grid sequence encoding method according to claim 1, characterized in that: The three-dimensional grid sequence encoding method further includes: The second information is texture-coordinate encoded to form a second code stream, and is merged with the remaining code streams; wherein, when there are multiple attribute maps, the correspondence between the attribute maps and the texture coordinates is identified; wherein the identification is also used as the content of the fifth information, and the fifth information also includes an identification for indicating whether to perform texture coordinate encoding.

10. The three-dimensional grid sequence encoding method according to claim 7, characterized in that: The third information includes spatial displacement. Accordingly, the three-dimensional grid sequence encoding method further includes: Performing mesh subdivision deformation on the parameterized first reconstructed mesh to obtain a subdivision-deformed basic mesh and a spatial displacement of each vertex of the subdivision-deformed basic mesh; The spatial displacement or the residual between the spatial displacement and the spatial displacement of the reference frame grid matching point is encoded according to a predetermined encoding method to form a third code stream, and combined with the remaining code streams; The fifth information includes an indication mark of a predetermined encoding method of the third code stream.

11. The three-dimensional grid sequence encoding method according to claim 10, characterized in that: The fourth information includes a property graph, and a process of obtaining the property graph includes: Decoding and reconstructing the third code stream to obtain a reconstructed spatial domain displacement; Reconstructing a subdivided deformed grid using the subdivided basic grid and the reconstructed spatial displacement to obtain a second reconstructed grid; Utilize the second reconstructed grid, the first attribute graph and the current frame grid to perform attribute graph conversion to obtain a second attribute graph; wherein the second attribute graph is attribute graph encoded to form the fourth bitstream.

12. A three-dimensional grid sequence encoding device, characterized in that: include: A coding information acquisition module is used to process the input reference frame grid and the current frame grid carrying the first attribute map to obtain first information, second information, third information, fourth information and fifth information; wherein the reference frame grid is a grid that has been encoded and reconstructed; the current frame grid is a grid to be encoded; and the fifth information is used for the association and correspondence between the various parts of information and to characterize the coding scheme; an encoding module, configured to encode at least the first information, the fourth information and the fifth information to form a plurality of code streams including a first code stream, a fourth code stream and a fifth code stream; The code stream merging module is used to merge the multiple code streams into a bit stream.

13. A three-dimensional grid sequence decoding method, characterized in that: include: Demultiplexing the bit stream of the three-dimensional grid that has been encoded to obtain multiple code streams including a first code stream, a third code stream, a fourth code stream and a fifth code stream, and decoding each of the obtained code streams; The decoded reconstruction grid and the decoded reconstruction attribute map are reconstructed using the second information and the decoded first information, third information, fourth information and fifth information; wherein the fifth information is used for the association correspondence between the various parts of information and to characterize the coding scheme.

14. The three-dimensional grid sequence decoding method according to claim 13, characterized in that: The first information is obtained by decoding the first code stream using fifth information, including: When the fifth information indicates that the current frame grid has a time domain motion vector identifier, the first bitstream is decoded using the fifth information to obtain first information including a reference frame list, a time domain motion vector, and a motion vector identifier; When the fifth information indicates that the current frame grid does not have a time domain motion vector identifier, the first bitstream is decoded using the fifth information to obtain first information including a reference frame list and a time domain motion vector; Furthermore, when there is an intra-frame sub-grid, the first code stream is decoded using the static grid decoder indicated by the fifth information to obtain a second reconstructed sub-grid, and the second reconstructed sub-grid is also used as the content of the first information output by the decoding.

15. The three-dimensional grid sequence decoding method according to claim 13, characterized in that: The second information is a texture coordinate. If the fifth information indicates that the encoder does not encode the texture coordinate, the process of obtaining the texture coordinate includes: Reconstructing a basic grid using the fifth information and the first information to obtain a first reconstructed grid; For each attribute map in the first reconstructed mesh, corresponding texture coordinates are generated by mesh parameterization, and the first reconstructed mesh is updated to obtain a parameterized first reconstructed mesh; wherein the texture coordinates corresponding to each attribute map are specified by adding corresponding identifiers.

16. The three-dimensional grid sequence decoding method according to claim 15, characterized in that: If the first reconstructed grid includes: a first reconstructed sub-grid obtained by reconstructing an inter-frame sub-grid, and a second reconstructed sub-grid obtained by reconstructing an intra-frame sub-grid, according to an identifier in the fifth information indicating whether grids are merged, the first reconstructed sub-grid and the second reconstructed sub-grid are merged or processed separately to obtain corresponding texture coordinates.

17. The three-dimensional grid sequence decoding method according to claim 15, characterized in that: If the fifth information instructs the encoding end to perform texture coordinate encoding, the process of obtaining the texture coordinates includes: Demultiplexing the bit stream of the three-dimensional grid that has been encoded to obtain a second bit stream; The texture coordinates of the second code stream are decoded by using the fifth information and the first information to obtain texture coordinates for mesh reconstruction in conjunction with the first information.

18. The three-dimensional grid sequence decoding method according to claim 16 or 17, characterized in that: When there are multiple attribute maps, the texture coordinates are made to correspond to the attribute maps according to the correspondence between the attribute maps and the texture coordinates identified in the fifth information.

19. The three-dimensional grid sequence decoding method according to claim 13, characterized in that: The third information includes a spatial displacement, and a process of obtaining the spatial displacement includes: Decoding the third code stream according to the encoding mode of the third code stream indicated in the fifth information to obtain the spatial domain displacement; If the encoding method of the third code stream is video encoding, the third code stream is decoded according to the video decoder type indicated in the fifth information to obtain a two-dimensional image; the vertices are restored from the two-dimensional image in a corresponding order using the predetermined vertex sorting method indicated in the fifth information, and the corresponding spatial displacement of the vertices is reconstructed; If the encoding method of the third code stream is entropy encoding, the third code stream is entropy decoded according to the entropy encoding method indicated in the fifth information to reconstruct the spatial displacement corresponding to the vertex.

20. The three-dimensional grid sequence decoding method according to claim 19, characterized in that: If the fifth information indicates that the third code stream encoding process uses the reference frame mesh as a reference, the decoding result is the residual of the spatial displacement of the current frame mesh vertices relative to the reference frame mesh matching points, and the spatial displacement of the vertices of the current frame is restored through the vertices of the second reconstructed mesh of the reference frame and the residual.

21. The three-dimensional grid sequence decoding method according to claim 19, characterized in that: The process of obtaining the decoding and reconstruction grid includes: Subdividing the first reconstructed grid of the current frame to obtain a subdivided grid; The subdivided grid and the spatial domain displacement are used to perform subdivided deformed grid reconstruction to obtain a second reconstructed grid as a decoded reconstructed grid.

22. The three-dimensional grid sequence decoding method according to claim 13, characterized in that: The process of obtaining the decoded and reconstructed attribute graph includes: The fourth bitstream is subjected to attribute map decoding by using the fifth information to obtain fourth information including a plurality of attribute maps as a decoded and reconstructed attribute map.

23. The three-dimensional grid sequence decoding method according to claim 22, characterized in that: Using the fifth information, performing attribute graph decoding on the fourth code stream includes: The video decoder indicated in the fifth information is used to perform attribute map decoding on the fourth bit stream; wherein, for multiple types of attribute maps, after obtaining the fourth information, each attribute map is matched with the corresponding texture coordinates according to the identifier.

24. The three-dimensional grid sequence decoding method according to claim 22, characterized in that: After the fourth bit stream is decoded by the attribute map, the attribute map is converted into a color space according to the color space conversion identifier indicated in the fifth information to obtain an image format consistent with the first attribute map.

25. A three-dimensional grid sequence decoding device, characterized in that: include: A decoding module, used for demultiplexing the bit stream of the three-dimensional grid that has been encoded, obtaining multiple code streams including a first code stream, a third code stream, a fourth code stream and a fifth code stream, and decoding each of the obtained code streams; A reconstruction module is used to reconstruct a decoded reconstruction grid and a decoded reconstruction attribute map using the second information and the decoded first information, third information, fourth information and fifth information; wherein the fifth information is used for the association correspondence between the various parts of information and to characterize the coding scheme.

Citation Information

Cited By

  • Model compression method and device, electronic equipment and computer readable medium

    CN119832137A

  • Method and device for patch unit mesh coding

    US12744936B2

  • Method and device for patch unit mesh coding

    US20250324090A1

  • Three-dimensional mesh encoding method and apparatus, and three-dimensional mesh decoding method and apparatus

    WO2025152607A1