Methods and apparatus for encoding and decoding displacement information of three-dimensional grid, and terminal

By encoding only part of the displacement vector in the three-dimensional grid displacement data encoding method, the problem of low encoding efficiency of three-dimensional grid displacement data is solved, and the amount of data is reduced and the encoding efficiency is improved.

WO2024193487A1PCT designated stage expired Publication Date: 2024-09-26VIVO MOBILE COMM CO LTD

Patent Information

Application Number
PCT/CN2024/082081
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-23
Filing Date
2024-03-18
Publication Date
2024-09-26

AI Technical Summary

Technical Problem

The encoding of 3D mesh displacement data is inefficient, complicating processing, storage, and transmission.

Method used

A three-dimensional grid displacement information encoding method is proposed, which encodes partial displacement vectors in the displacement data to be encoded, generates a displacement code stream, and restores the complete displacement data at the decoding end, reducing the amount of encoded data and improving encoding efficiency.

Benefits of technology

It effectively reduces the amount of encoding data of displacement data, improves the encoding efficiency of three-dimensional grid displacement data, and simplifies the processing, storage and transmission process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024082081_26092024_PF_FP
    Figure CN2024082081_26092024_PF_FP
Patent Text Reader

Abstract

The present application relates to the technical field of computers, and discloses methods and apparatus for encoding and decoding displacement information of a three-dimensional grid, and a terminal. The method for encoding displacement information of a three-dimensional grid in an embodiment of the present application comprises: an encoding end acquires displacement data of a three-dimensional grid to be encoded, the displacement data comprising M displacement vectors; the encoding end acquires N displacement vectors among the M displacement vectors, and obtains target displacement data comprising the N displacement vectors, both M and N being positive integers, and N being less than M; and the encoding end encodes the target displacement data, and obtains a displacement code stream.
Need to check novelty before this filing date? Find Prior Art

Description

Three-dimensional grid displacement information encoding method, decoding method, device and terminal

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to Chinese Patent Application No. 202310292532.6 filed in China on March 23, 2023, the entire contents of which are incorporated herein by reference. Technical Field

[0003] The present application belongs to the field of computer technology, and specifically relates to a three-dimensional grid displacement information encoding method, decoding method, device and terminal. Background Art

[0004] In recent years, with the rapid development of multimedia technology, 3D models have become a new generation of digital media, following audio, images, and video. 3D meshes are a commonly used representation method for 3D models. In nearly all applications using 3D meshes, the demand for higher visual quality is increasing, leading to increasingly complex and precise models. Consequently, the amount of data required to represent 3D meshes is also increasing, making the processing, visualization, transmission, and storage of 3D meshes increasingly complex. 3D mesh compression can reduce the size of model data, facilitating the processing, storage, and transmission of 3D meshes.

[0005] Displacement is a crucial component of the dynamic mesh encoding and decoding process. It stores the position information of the vertices of the subdivided meshes, along the normal direction, to their nearest neighbor in the original input mesh. However, the encoding bitrate of displacement data is high and contains redundancy, resulting in inefficient encoding and decoding of 3D mesh displacement data.

[0006] Summary of the Invention

[0007] The embodiments of the present application provide a three-dimensional grid displacement information encoding method, decoding method, device and terminal, which can solve the problem of low efficiency of three-dimensional grid displacement data encoding in related technologies.

[0008] In a first aspect, a method for encoding three-dimensional grid displacement information is provided, which is performed by an encoding end and includes:

[0009] The encoding end obtains displacement data of the three-dimensional grid to be encoded, where the displacement data includes M displacement vectors;

[0010] The encoding end obtains N displacement vectors from the M displacement vectors to obtain target displacement data including the N displacement vectors, where M and N are both positive integers and N is less than M;

[0011] The encoding end encodes the target displacement data to obtain a displacement code stream.

[0012] In a second aspect, a method for decoding three-dimensional grid displacement information is provided, which is executed by a decoding end and includes:

[0013] The decoding end obtains the displacement code stream;

[0014] The decoding end decodes the displacement code stream to obtain target displacement data, where the target displacement data includes N displacement vectors;

[0015] The decoding end restores the N displacement vectors into M displacement vectors to obtain displacement data, wherein the displacement data includes the M displacement vectors, M and N are both positive integers, and N is less than M.

[0016] In a third aspect, a three-dimensional grid displacement information encoding device is provided, comprising:

[0017] A first acquisition module is used to acquire displacement data of a three-dimensional grid to be encoded, wherein the displacement data includes M displacement vectors;

[0018] a second acquisition module, configured to acquire N displacement vectors from the M displacement vectors to obtain target displacement data including the N displacement vectors, wherein both M and N are positive integers, and N is less than M;

[0019] The encoding module is used to encode the target displacement data to obtain a displacement code stream.

[0020] In a fourth aspect, a three-dimensional grid displacement information decoding device is provided, comprising:

[0021] A third acquisition module is used to obtain a displacement code stream;

[0022] A decoding module, configured to decode the displacement code stream to obtain target displacement data, wherein the target displacement data includes N displacement vectors;

[0023] A recovery module is used to restore the N displacement vectors in the target displacement data into M displacement vectors to obtain displacement data, wherein the displacement data includes the M displacement vectors, M and N are both positive integers, and N is less than M.

[0024] In a fifth aspect, a terminal is provided, comprising a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the method described in the first aspect or the second aspect are implemented.

[0025] In a sixth aspect, a readable storage medium is provided, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented, or the steps of the method described in the second aspect are implemented.

[0026] In the seventh aspect, a chip is provided, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the method described in the first aspect, or to implement the method described in the second aspect.

[0027] In an eighth aspect, a computer program / program product is provided, wherein the computer program / program product is stored in a storage medium, and the program / program product is executed by at least one processor to implement the steps of the method described in the first aspect, or to implement the steps of the method described in the second aspect.

[0028] In an embodiment of the present application, after obtaining the displacement data of the three-dimensional grid to be encoded, which includes M displacement vectors, the encoding end obtains N displacement vectors in the displacement data and encodes the N displacement vectors. N is less than M, that is, the encoding end only encodes part of the displacement vectors in the displacement data, thereby effectively reducing the amount of encoded data of the displacement data, thereby improving the encoding efficiency of the displacement data. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] FIG1a is a flowchart of encoding performed by an encoder using a video-based dynamic mesh coding (VDMC) method in the related art;

[0030] FIG1b is a flowchart of decoding by a decoding end in a VDMC manner in the related art;

[0031] FIG2 is a flowchart of a method for encoding three-dimensional grid displacement information according to an embodiment of the present application;

[0032] FIG3 is a flowchart of a method for decoding three-dimensional grid displacement information according to an embodiment of the present application;

[0033] FIG4a is a second flowchart of a method for encoding three-dimensional grid displacement information provided by an embodiment of the present application;

[0034] FIG4 b is a second flowchart of a method for decoding three-dimensional grid displacement information provided by an embodiment of the present application;

[0035] FIG4c is a third flowchart of a method for decoding three-dimensional grid displacement information provided by an embodiment of the present application;

[0036] FIG5a is a third flowchart of a method for encoding three-dimensional grid displacement information provided by an embodiment of the present application;

[0037] FIG5 b is a fourth flowchart of a method for decoding three-dimensional grid displacement information provided by an embodiment of the present application;

[0038] FIG6a is a fourth flowchart of a method for encoding three-dimensional grid displacement information provided by an embodiment of the present application;

[0039] FIG6 b is a schematic diagram of grid merging in a three-dimensional grid displacement information encoding method provided by an embodiment of the present application;

[0040] FIG6 c is a fifth flowchart of a three-dimensional grid displacement information decoding method provided in an embodiment of the present application;

[0041] FIG7 is a structural diagram of a three-dimensional grid displacement information encoding device provided in an embodiment of the present application;

[0042] FIG8 is a structural diagram of a three-dimensional grid displacement information decoding device provided in an embodiment of the present application;

[0043] FIG9 is a structural diagram of an electronic device provided in an embodiment of the present application;

[0044] FIG10 is a structural diagram of a terminal provided in an embodiment of the present application. DETAILED DESCRIPTION

[0045] The following will be combined with the accompanying drawings in the embodiments of this application to clearly describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field are within the scope of protection of this application.

[0046] The terms "first", "second", etc. in this application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable where appropriate, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first" and "second" are generally of the same type, and do not limit the number of objects, for example, the first object can be one or more. In addition, "or" in this application represents at least one of the connected objects. For example, "A or B" covers three options, namely, Option 1: including A but not including B; Option 2: including B but not including A; Option 3: including both A and B. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.

[0047] The term "indication" in this application can be either a direct indication (or explicit indication) or an indirect indication (or implicit indication). A direct indication can be understood as the sender explicitly informing the receiver of specific information, the operation to be performed, or the requested result, etc. in the instruction sent; an indirect indication can be understood as the receiver determining the corresponding information based on the instruction sent by the sender, or making a judgment and determining the operation to be performed or the requested result, etc. based on the judgment result.

[0048] For better understanding, the following explains relevant concepts that may be involved in the embodiments of this application.

[0049] 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 the next generation of digital media, following audio, images, and video. Three-dimensional meshes are a commonly used representation method for 3D models. Compared to traditional multimedia such as images and videos, 3D mesh models offer greater interactivity and realism, leading to their increasing application in various fields, including commerce, manufacturing, construction, education, medicine, entertainment, art, and the military.

[0050] While there are many ways to represent 3D meshes, triangular meshes remain the most common. 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, defining a position in 3D space. Edges are line segments connecting two vertices in the mesh. Faces can be considered polygons formed by closed paths of edges. For a triangular mesh, each face is a triangle.

[0051] 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 the elements in the mesh, that is, the connection relationship between vertices. Attribute information is optional, and it can associate attributes with 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.

[0052] In nearly all application fields using 3D meshes (such as computational simulation, entertainment, medical imaging, digitized artifacts, computer design, and e-commerce), the demand for visually appealing 3D mesh models is increasing, leading to increasingly complex models and higher precision. Consequently, the amount of data required to represent the 3D mesh is also increasing. These issues have led to increasing complexity in the processing, visualization, transmission, and storage of 3D meshes. 3D mesh compression can be considered a solution to these problems. It reduces the size of model data and facilitates the processing, storage, and transmission of 3D meshes. Therefore, it is necessary to propose an efficient and universal 3D mesh compression algorithm.

[0053] Recently, the Moving Pictures Experts Group (MPEG), an international organization for standardization in the field of audio and video coding and compression, has begun developing a compression standard for 3D meshes called Video-based Dynamic Mesh Coding (VDMC). This standard is based on the existing Visual Volumetric Video-based Coding (V3C) standard, which provides a general method for compressing 3D models, which can be represented by point clouds, meshes, or panoramic videos. Compatibility of 3D mesh compression methods with this standard will facilitate the method's widespread adoption and applicability. Therefore, optimizing the 3D mesh encoding and decoding methods in VDMC and integrating these optimizations with the V3C standard is of great significance. One possible optimization approach is to optimize displacement coding. In existing frameworks, displacements are calculated by calculating the distances between the vertices of the reconstructed mesh and the original mesh, aiming to improve mesh quality. In existing frameworks, displacements are encoded using a video encoder. Providing multiple options for displacement encoding can help improve coding performance.

[0054] V3C standard:

[0055] The V3C standard provides a method for encoding and decoding various 3D media using video or image coding techniques. Specifically, prior to encoding, 3D media content is converted from a 3D representation into multiple 2D representations (called V3C components) through methods such as projection. These 2D representations are then encoded using existing video or image coding techniques. V3C components primarily include occupancy, geometry, and attribute components. The occupancy component indicates which areas of the 2D representation are associated with the 3D data; the geometry component indicates information related to the spatial position of the 3D data; and the attribute component provides vertex attribute information, such as material and texture. Furthermore, the components contain information on how to reconstruct a 3D model from these components, known as atlas information. Atlas information is used to link all components, and additional information for 3D reconstruction from 2D is also included in the atlas components. An atlas consists of multiple basic units, called patches. Each patch represents an area within the available 2D components and contains the information needed to project that area back into 3D space.

[0056] VDMC:

[0057] VDMC is a standard developed by MPEG for compressing three-dimensional meshes. Its main idea is to compress three-dimensional meshes by leveraging the existing V3C standard. Since three-dimensional meshes contain connection information that needs to be encoded, its specific encoding process is slightly different from V3C. The syntax, semantics, and decoding operations of the V3C standard decoding end need to be expanded to support the decoding and reconstruction of three-dimensional meshes.

[0058] The overall encoding framework is shown in Figure 1a. The input mesh is first simplified by the simplification module. Mesh parameterization is then used to generate new texture coordinates for the mesh. The parameterized mesh is then subdivided and deformed. This involves inserting new vertices according to a specific subdivision method and calculating the distances between the subdivided mesh vertices and their nearest neighbors on the input mesh, known as displacement information. The pre-subdivided mesh, known as the base mesh, is then fed into the base mesh encoding module, where it is compressed using an existing mesh encoder. In inter-frame mode, motion vectors are also generated for each vertex of the base mesh based on a reference frame. The base mesh module only compresses the motion vectors. After encoding, the base mesh is reconstructed, and the displacement order is adjusted based on the vertex order of the reconstructed base mesh. The reordered vertex displacement information is then first subjected to a wavelet transform, and the transformed coefficients are quantized. These quantized coefficients are then arranged into a two-dimensional image according to a specific scan order. This 2D image is then encoded using a video encoder. The reconstructed displacement information is then applied to the subdivided base mesh to produce a reconstructed, subdivided, deformed mesh. This mesh, along with the original input mesh and its corresponding texture map, is fed into the corresponding texture map conversion module to produce a texture map corresponding to the reconstructed mesh. This texture map is also encoded using the video encoder. Parameters used in the encoding process, such as the type of video encoder used, the type of grid encoder, transform parameters, quantization parameters, etc., are passed to the decoding end through auxiliary information.

[0059] The overall framework of the decoding end is shown in Figure 1b. For the received code stream, the decoding end first demultiplexes the various code streams to obtain the basic grid code stream, displacement video code stream, texture map video code stream and auxiliary information code stream respectively. For the basic grid code stream, the grid decoder indicated by the auxiliary information is used to decode the basic grid. The displacement video code stream and the texture map video code stream are decoded by the video decoder. For the displacement part, after the video is decoded, the displacement needs to be extracted from the image through the displacement decoding module, and dequantization, inverse transformation and other steps are performed. It is then applied to the subdivided basic grid to obtain the deformed grid reconstructed by the decoding end. After decoding, the texture map is the texture map corresponding to the reconstructed deformed grid. The subsequent application or rendering module processes the reconstructed deformed grid and the decoded texture map as input.

[0060] Displacement is an important component of the dynamic mesh encoding and decoding process. It stores the distance information from the vertices of the subdivided mesh to the nearest neighbor point in the original input mesh along the normal direction. The encoding bit rate of displacement data is high and there is redundancy, resulting in low efficiency of three-dimensional mesh encoding. To address the above problems, the embodiments of the present application propose a method for encoding and decoding three-dimensional mesh displacement information.

[0061] The following, in conjunction with the accompanying drawings, describes in detail the three-dimensional grid displacement information encoding method, decoding method and related equipment provided by the embodiments of the present application through some embodiments and their application scenarios.

[0062] Please refer to FIG2 , which is a flowchart of a method for encoding three-dimensional grid displacement information provided by an embodiment of the present application. The method is applied to an encoding end. As shown in FIG2 , the method includes the following steps:

[0063] Step 201: The encoding end obtains displacement data of a three-dimensional grid to be encoded, where the displacement data includes M displacement vectors.

[0064] It should be noted that the encoding end and decoding end in the embodiments of the present application include but are not limited to electronic devices such as mobile phones, tablet computers, and computers, and will not be repeated in subsequent embodiments.

[0065] It is understandable that displacement is an important component of the dynamic mesh encoding and decoding process. After the encoder obtains the 3D mesh to be encoded, it further obtains the displacement data (or displacement information) of the 3D mesh to be encoded. The displacement data includes multiple displacement vectors, that is, the displacement data can be represented by displacement vectors.

[0066] Optionally, after obtaining the displacement data of the three-dimensional grid to be encoded, the encoding end may perform a series of pre-processing operations on the displacement data, such as transformation and quantization.

[0067] Step 202: The encoding end obtains N displacement vectors from the M displacement vectors to obtain target displacement data including the N displacement vectors, where M and N are both positive integers, and N is less than M.

[0068] In an embodiment of the present application, after obtaining the displacement data of the three-dimensional grid to be encoded, the encoding end can select N displacement vectors from the displacement data to obtain target displacement data composed of the N displacement vectors, that is, the target displacement data is part of the displacement data.

[0069] Optionally, the encoder may perform preprocessing operations such as transformation and quantization on the displacement data, and then obtain N displacement vectors from the preprocessed displacement data, thereby obtaining target displacement data composed of the N displacement vectors. Alternatively, the encoder may intercept the displacement data to obtain target displacement data including the N displacement vectors. The encoder may intercept the displacement data based on a certain rule, such as based on the proportion of non-zero values ​​in the displacement data.

[0070] Optionally, the encoding end can obtain N displacement vectors in the displacement data based on certain rules, for example, it can obtain N displacement vectors located at a specific position, or randomly obtain N displacement vectors, or obtain the first N displacement vectors, or obtain N displacement vectors located before a certain position, and so on.

[0071] Optionally, the N displacement vectors are the first N displacement vectors of the M displacement vectors. For example, after obtaining the displacement data of the M displacement vectors, the encoder selects the first N displacement vectors as the target displacement data.

[0072] Step 203: The encoding end encodes the target displacement data to obtain a displacement code stream.

[0073] It should be noted that after obtaining target displacement data including N displacement vectors (e.g., the first N displacement vectors), the encoder encodes the target displacement data to obtain a displacement code stream. The target displacement data is a portion of the displacement data obtained from the displacement data. Therefore, only a portion of the displacement data needs to be encoded, and not all of the displacement data. This effectively reduces the encoding bit rate at the encoder, avoids encoding redundancy of the displacement data, and thus improves the encoding efficiency of the encoder.

[0074] In an embodiment of the present application, after obtaining the displacement data of the three-dimensional grid to be encoded, the encoding end obtains N displacement vectors out of the M displacement vectors of the displacement data, and only encodes the N displacement vectors of the displacement data, that is, discards part of the vectors of the displacement data, thereby effectively reducing the amount of encoded data of the displacement data, thereby improving the encoding efficiency of the displacement data.

[0075] Optionally, in the embodiment of the present application, step 202 may include:

[0076] The encoding end determines a selection position of the target displacement data according to a preset threshold;

[0077] The encoding end obtains N displacement vectors among the M displacement vectors according to the selected position, and obtains target displacement data including the N displacement vectors.

[0078] In an embodiment of the present application, after obtaining displacement data of a 3D mesh to be encoded, the encoder needs to select N displacement vectors from the displacement data to obtain target displacement data. The selection positions of the N displacement vectors can be determined based on a certain selection rule. For example, the encoder determines the selection position based on a preset threshold. For example, if the proportion of non-zero values ​​in the target displacement data selected by the encoder satisfies the preset threshold, the selection position is determined, and the N displacement vectors are selected based on the selected position.

[0079] Optionally, the proportion of non-zero values ​​in the remaining displacement vectors is less than or equal to the preset threshold, and the remaining displacement vectors are displacement vectors in the displacement data except the first N displacement vectors.

[0080] Exemplarily, the encoding end determines the selection position of the target displacement data based on a preset threshold value, and the preset threshold value means that after the encoding end selects N displacement vectors (for example, the first N displacement vectors) from the displacement data, the proportion of non-zero values ​​in the remaining displacement vectors is less than or equal to the preset threshold value. It should be noted that the preset threshold value can be a pre-set threshold value, and then the encoding end determines the selection position based on the preset threshold value, and obtains the N displacement vectors of the displacement data based on the selection position. For example, the displacement vector can be truncated at the selection position based on the selection position, and the N displacement vectors before the selection position are determined as the target displacement vector, and the displacement vectors at and after the selection position are the remaining displacement vectors, and the proportion of non-zero values ​​in the remaining displacement vectors is less than or equal to the preset threshold value.

[0081] In the embodiment of the present application, the encoding end only encodes the target displacement data, that is, only encodes the N displacement vectors preceding the selected position, thereby effectively improving the encoding efficiency of the encoding end. By setting a preset threshold, the encoding end determines the selected position, thereby obtaining target displacement data including the N displacement vectors preceding the selected position. This allows the encoding end to better determine which target displacement data to obtain, which is more conducive to the encoding end determining the target displacement data.

[0082] Optionally, the method further includes:

[0083] The encoding end determines a mark of the selected position and sends the mark to the decoding end.

[0084] Exemplarily, the encoding end may mark the selected position and send the mark to the decoding end, thereby enabling the decoding end to clarify which of the displacement data the target displacement data encoded by the encoding end is based on the mark, thereby ensuring that after the decoding end obtains the displacement code stream, it can purposefully extract the target displacement data from the decoded displacement code stream based on the received mark, and supplement the decoded target displacement data to restore the displacement data of full length.

[0085] Optionally, the tag is related to the value of N.

[0086] For example, the encoding end may send the value of N as a mark of the selected position to the decoding end, that is, tell the decoding end the length of the target displacement data, so that the decoding end can know the length of the target displacement data according to the mark, and after decoding the target displacement data, it can also be clear how many displacement vectors need to be supplemented according to the length of the target displacement data to obtain the displacement data of the complete length.

[0087] Alternatively, the encoding end may use the difference between the total number of displacement vectors included in the displacement data and N as the mark of the selected position, and send the mark to the decoding end. For example, if the total number of displacement vectors included in the displacement data is M (M>N), the length of the displacement data after the selected position, i.e., MN, may be sent to the decoding end as the mark of the selected position. In this case, after obtaining the mark, the decoding end may calculate the length of the target displacement data, i.e., N, based on the mark, which in turn helps the decoding end decode and fill in the displacement data to obtain the full length.

[0088] It should be noted that the encoding end may transmit the mark of the selected position and the displacement code stream to the decoding end together when sending the displacement code stream, or may transmit them separately.

[0089] In the embodiment of the present application, the encoding end encodes the target displacement data to obtain a displacement code stream, including any one of the following:

[0090] The encoding end arranges the target displacement data into a YUV image (where Y represents luminance, and UV represents chrominance and chroma, respectively) according to a preset rule, performs a padding operation on the YUV image with the target displacement data arranged therein based on a preset padding value, and encodes the padded YUV image through a video encoder to obtain a displacement code stream;

[0091] The encoding end performs entropy encoding on the target displacement data to obtain a displacement code stream.

[0092] In the embodiment of the present application, the encoding end may perform displacement encoding by using a video encoding method or an entropy encoding method.

[0093] For example, the encoding end may be displacement encoding using video encoding. In this case, after obtaining target displacement data including N displacement vectors (e.g., the first N displacement vectors), the encoding end arranges the target displacement data into a YUV image according to a preset rule, for example, the arrangement may be performed according to a preset rule of video encoding. During the video arrangement process, in order to ensure that the resolution of each frame in the YUV image is the same and that the pixel data can be arranged into a rectangle, it is necessary to perform a padding operation on the YUV image. The padding operation may be performed on the YUV image in which the target displacement data is arranged based on a preset padding value agreed upon by the codec end, and the padded YUV image is encoded by the video encoder to obtain a displacement code stream, which is then sent to the decoding end.

[0094] Alternatively, the encoding end may also use entropy coding to entropy encode the target displacement data including the first N displacement vectors to obtain a displacement code stream, and send the displacement code stream to the decoding end. The video encoding method and entropy encoding method in the embodiments of the present application will be described in detail through specific embodiments later, and will not be elaborated on here.

[0095] In an embodiment of the present application, the encoding end may also perform displacement encoding based on a VDMC method. Optionally, when the encoding end performs encoding using VDMC, the displacement vector is represented by a quantized wavelet transform coefficient, and the target displacement data is represented by a target wavelet transform coefficient, wherein the target wavelet transform coefficient includes the first N quantized wavelet transform coefficients.

[0096] It should be noted that when encoding is performed using the VDMC method, the encoder, after obtaining the 3D mesh to be encoded, performs a mesh simplification operation on the 3D mesh to be encoded, obtaining a base mesh with a relatively small number of points and faces, while maintaining the shape of the original mesh as much as possible. After the mesh simplification operation, mesh parameterization, subdivision deformation, base mesh compression, and base mesh reconstruction are sequentially performed. The vertex displacement order of the reconstructed base mesh is adjusted, and the displacements are then subjected to wavelet transform and quantized to obtain quantized wavelet transform coefficients. In the VDMC encoding method, the quantized wavelet transform coefficients are also the displacement vectors in the aforementioned displacement data. In this encoding method, after obtaining the quantized wavelet transform coefficients, the encoder may select the first N of the quantized wavelet transform coefficients to obtain target wavelet transform coefficients including the first N quantized wavelet transform coefficients. The encoder then encodes the target wavelet transform coefficients to obtain a displacement code stream. Furthermore, when encoding is performed based on the VDMC method at the encoding end, only the first N quantized wavelet transform coefficients need to be encoded to obtain the displacement code stream, so there is no need to encode all the quantized wavelet transform coefficients, which can effectively reduce the encoding bit rate at the encoding end and improve the encoding efficiency at the encoding end.

[0097] Optionally, when the encoding end performs encoding based on the VDMC method, the encoding end encodes the target displacement data to obtain a displacement code stream, including:

[0098] The encoding end arranges the target wavelet transform coefficients on a two-dimensional image, fills the two-dimensional image with the arranged target wavelet transform coefficients based on a preset filling value, and encodes the filled two-dimensional image through a video encoder to obtain a displacement code stream.

[0099] In the embodiment of the present application, after obtaining the target wavelet transform coefficients including the first N quantized wavelet transform coefficients, the encoder arranges the target wavelet transform coefficients into a two-dimensional image, ultimately forming a YUV video. The video encoder then encodes the YUV video to obtain a bitstream. In this way, the encoder only needs to encode the first N quantized wavelet transform coefficients, thereby improving the encoding efficiency of the encoder.

[0100] It should be noted that the specific implementation process of encoding based on the VDMC method by the encoding end in the embodiment of the present application will be specifically described in subsequent embodiments and will not be elaborated here.

[0101] Optionally, after the encoding end encodes the target displacement data to obtain a displacement code stream, the method further includes:

[0102] The encoding end extracts pixel point data from the padded two-dimensional image to obtain pixel point data, and removes the pixel point data according to the preset padding value to obtain the target wavelet transform coefficient;

[0103] The encoder performs a zero-padding operation on the target wavelet transform coefficient according to the number of mesh vertices after the reconstructed base mesh is subdivided to obtain M quantized wavelet transform coefficients, where the number of the quantized wavelet transform coefficients is the same as the number of mesh vertices after the reconstructed base mesh is subdivided, and the displacement data is represented by the M quantized wavelet transform coefficients;

[0104] The encoding end performs attribute map conversion and compression based on the grid obtained by subdividing the reconstructed basic grid, the three-dimensional grid to be encoded, and the original attribute map to obtain an attribute map code stream.

[0105] It should be noted that in the VDMC encoding method, the encoding end needs to obtain the reconstructed displacement vector value during encoding, and reconstruct the subdivided deformed grid based on the reconstructed displacement vector value, and then implement attribute map encoding based on the grid subdivided based on the reconstructed basic grid, the original three-dimensional grid to be encoded and the original attribute map to obtain the attribute map code stream.

[0106] Optionally, when the encoding end obtains the quantized wavelet transform coefficients, the pixels in the padded two-dimensional image are extracted in an arrangement manner. It can be considered that one pixel corresponds to one target wavelet transform coefficient. The extracted pixel data contains two values: one is the selected wavelet transform coefficient, that is, the target wavelet transform coefficient, and the other is a preset fill value in the two-dimensional arrangement process, which is pre-agreed by the encoding and decoding end. After obtaining the extracted pixel data, the preset fill value in the pixel data can be removed according to the preset fill value, thereby obtaining the target wavelet transform coefficient including N quantized wavelet transform coefficients. Afterwards, the selected target wavelet transform coefficients are padded with zeros according to the number of vertices after the reconstruction of the basic mesh subdivision until the number of quantized wavelet transform coefficients is the same as the number of vertices after the reconstruction of the basic mesh subdivision, thereby obtaining M quantized wavelet transform coefficients, that is, the displacement data.

[0107] Furthermore, the M quantized wavelet transform coefficients (i.e., displacement data) are subjected to inverse quantization and inverse transformation operations to obtain a displacement vector consistent with the decoding end, i.e., a reconstructed geometric displacement vector. The subdivided reconstructed basic grid is converted into a deformed grid of the reconstructed basic grid according to the reconstructed geometric displacement vector (i.e., the M quantized wavelet transform coefficients). The encoding end performs attribute graph conversion and compression based on the deformed grid of the reconstructed basic grid, the original three-dimensional grid to be encoded, and the original attribute graph, thereby obtaining an attribute graph code stream, and sending the attribute graph code stream to the decoding end, so that the decoding end can decode the attribute graph code stream.

[0108] It should be noted that in the VDMC encoding method, the encoding end sends a mixed stream obtained by mixing the displacement code stream, the attribute map code stream, the basic grid code stream and the auxiliary information to the decoding end, so that the decoding end decodes these code streams to obtain three-dimensional grid information. The specific implementation method can be referred to the description in the subsequent embodiments.

[0109] It should be noted that, when the encoding end determines the selection position of the target displacement data according to a preset threshold, determines a mark of the selection position, and sends the mark to the decoding end, the encoding end extracts the pixel point data in the padded two-dimensional image to obtain pixel point data, and removes the pixel point data according to the preset padding value to obtain the target wavelet transform coefficient, including:

[0110] The encoding end determines the selected position according to the mark, and extracts pixel point data according to the selected position from the filled two-dimensional image to obtain the target wavelet transform coefficient.

[0111] In an embodiment of the present application, if the encoding end determines the target wavelet transform coefficient based on a preset threshold when determining the target wavelet transform coefficient, and sends the mark of the selected position to the decoding end, then when the encoding end obtains the quantized wavelet transform coefficient, it directly takes out the pixel point data from the two-dimensional image according to the selected position corresponding to the mark, and then fills the end of the extracted pixel point data with zeros according to the number of grid vertices after the reconstructed basic grid is subdivided, so that the number of pixels in the zero-filled pixel point data is the same as the number of grid vertices after the reconstructed basic grid is subdivided, thereby obtaining M quantized wavelet transform coefficients, that is, the displacement data. In this embodiment, based on the mark corresponding to the selected position, it can be determined that the encoding end has truncated the quantized wavelet transform coefficients to obtain the target wavelet transform coefficients. Then, after the encoding end extracts the pixel data from the two-dimensional image, it can be clear that the number of pixels is less than or equal to the number of grid vertices after the reconstructed basic grid is subdivided. Then, the encoding end directly performs a zero-padding operation on the end of the pixel data to obtain pixel data with the same number of grid vertices as the reconstructed basic grid after subdivision, thereby obtaining M quantized wavelet transform coefficients.

[0112] The encoding method of three-dimensional grid displacement information provided in the embodiment of the present application only needs to encode the first N displacement vectors in the three-dimensional grid displacement data to be encoded, thereby effectively reducing the amount of encoded displacement data and improving encoding efficiency.

[0113] Please refer to Figure 3, which is a flow chart of a method for decoding three-dimensional grid displacement information provided by an embodiment of the present application. The method is applied to a decoding end. As shown in Figure 3, the method includes the following steps:

[0114] Step 301: The decoding end obtains the bit-shifted code stream.

[0115] It can be understood that after encoding to obtain the bit-shifted code stream, the encoding end sends the bit-shifted code stream to the decoding end.

[0116] Step 302: The decoding end decodes the displacement code stream to obtain target displacement data, where the target displacement data includes N displacement vectors.

[0117] It should be noted that after obtaining the displacement bitstream, the decoding end decodes the displacement bitstream according to the decoding method corresponding to the encoding end to obtain target displacement data including N displacement vectors. For example, if the encoding end encodes the displacement bitstream using a video encoding method, the decoding end decodes the displacement bitstream using a video decoding method; if the encoding end encodes the displacement bitstream using an entropy encoding method, the decoding end decodes the displacement bitstream using an entropy decoding method; if the encoding end encodes the displacement bitstream using a VDMC method, the decoding end decodes the displacement bitstream using a VDMC method.

[0118] Step 303: The decoding end restores the N displacement vectors into M displacement vectors to obtain displacement data, wherein the displacement data includes the M displacement vectors, M and N are both positive integers, and N is less than M.

[0119] It should be noted that after the decoding end decodes the displacement code stream to obtain target displacement data including N displacement vectors, the decoding end recovers M displacement vectors based on the N displacement vectors in the target displacement data, and then recovers the displacement data. For example, the target displacement data may be padded with zeros so that the number of displacement vectors included in the displacement data obtained after zero padding is the same as the number of vertices of the mesh after the decoded mesh is subdivided. Among them, after the encoding end subdivides the encoding mesh, it will send the number of subdivisions and the number of vertices of the mesh after subdivision to the decoding end, and the decoding end needs to keep the number of vertices of the mesh after subdivision of the decoded mesh the same as the number of vertices of the mesh after subdivision of the encoding end, and then the decoding end can also determine the number of vertices of the mesh after subdivision of the decoded mesh, and thus can also determine the number of displacement vectors in the displacement data. Optionally, the number of vertices of the mesh after subdivision of the decoded mesh can be obtained in other modules of the dynamic mesh decoding framework. For example, the VDMC framework can obtain it by performing a subdivision operation on the decoded basic mesh.

[0120] In an embodiment of the present application, after obtaining the displacement code stream, the decoding end decodes the displacement code stream to obtain target displacement data including N displacement vectors. The decoding end recovers the displacement data of M displacement vectors based on the N displacement vectors in the target displacement data. N is less than M, that is, the target displacement data is part of the displacement data, and then the decoding end can also recover the original displacement data, and the encoding end only needs to encode part of the displacement data, which effectively reduces the amount of encoded data, improves encoding efficiency, and also reduces and improves the transmission pressure between the encoding end and the decoding end.

[0121] Optionally, after the decoding end recovers the displacement data of M displacement vectors based on N displacement vectors in the target displacement data, it can perform inverse quantization, inverse transformation and other operations on the displacement data to obtain the original displacement data, for example, the same displacement data as the three-dimensional grid displacement data to be encoded by the encoding end.

[0122] Optionally, in an embodiment of the present application, the value of M is the same as the number of vertices of the mesh after the decoded mesh is subdivided, and the decoding end restores the N displacement vectors to M displacement vectors, including:

[0123] The decoding end performs a zero-padding operation on the N displacement vectors to restore M displacement vectors.

[0124] In an embodiment of the present application, after the decoding end decodes the displacement code stream and obtains the target displacement data including N displacement vectors, it can perform a zero-padding operation at the end of the N displacement vectors according to the number of vertices of the grid after the decoded grid is subdivided, until the number of displacement vectors is the same as the number of vertices of the grid after the decoded grid is subdivided, that is, M displacement vectors are obtained, and then the encoding end can recover the displacement data including M displacement vectors.

[0125] Optionally, in the above method, the decoding end may decode the displacement code stream through a video decoding method, an entropy decoding method or a VDMC method; wherein, when the decoding end decodes the displacement code stream through the VDMC method, the displacement vector is represented by a quantized wavelet transform coefficient, and the target displacement data is represented by a target wavelet transform coefficient, and the target wavelet transform coefficient includes N of the quantized wavelet transform coefficients.

[0126] It should be noted that the decoding process at the decoding end is opposite to the encoding process at the encoding end. The relevant concepts and principles involved in this embodiment can be referred to the description in the above-mentioned encoding end embodiment and will not be repeated here.

[0127] Optionally, the decoding end decodes the displacement code stream to obtain target displacement data, including any one of the following:

[0128] The decoding end decodes the displacement code stream in a video decoding manner to obtain a YUV image, extracts pixel data from the YUV image, and removes the pixel data based on a preset padding value to obtain target displacement data including N displacement vectors;

[0129] The decoding end decodes the displacement code stream in a VDMC manner to obtain a two-dimensional image, extracts pixel point data in the two-dimensional image, and removes the pixel point data based on a preset filling value to obtain target wavelet transform coefficients including N quantized wavelet transform coefficients.

[0130] For example, when the decoding end decodes the displacement code stream by video decoding, the decoding end decodes and obtains a YUV image. First, all pixel data are extracted in the order in which the encoder arranges the displacement data into the YUV image. The extracted pixel data contains two parts of data: one is the N displacement vectors selected by the encoder, and the other is the preset filling value when the encoder performs the filling operation. The preset filling value is a value agreed upon between the encoder and the decoder. After extracting the pixel data, the decoder can remove the filling part of the pixel data according to the preset filling value agreed upon with the encoder, thereby obtaining the N displacement vectors selected by the encoder, and further obtaining the target displacement data.

[0131] Alternatively, when the decoder decodes the displacement code stream using the VDMC method, the decoder decodes to obtain a two-dimensional image and extracts all pixels from the two-dimensional image. The pixel data also includes two parts: one is the N wavelet transform coefficients selected by the encoder, and the other is a preset padding value when the encoder performs a padding operation. The preset padding value is a value agreed upon between the encoder and the decoder. Based on the preset padding value, the decoder removes the padding portion from the pixel data, thereby obtaining the N quantized wavelet transform coefficients selected by the encoder, i.e., the target displacement data.

[0132] Optionally, the method further includes:

[0133] The decoding end obtains the mark sent by the encoding end, where the mark is related to the positions of the N displacement vectors of the target displacement data in the displacement data.

[0134] For example, after acquiring the displacement data, the encoder determines the selected position of the target displacement data based on a preset threshold, and selects the first N displacement vectors of the displacement data based on the selected position, thereby obtaining the target displacement data including the first N displacement vectors. In this case, the encoder can send a marker of the selected position to the decoder, and the decoder can then determine the position of the target displacement data in the displacement data based on the marker, that is, it can determine that the target displacement data is obtained based on the first N displacement vectors of the displacement data, which further helps the decoder obtain the target displacement data. For example, the decoder can extract N pixel data from the pixel data in a targeted manner based on the marker to obtain the target displacement data.

[0135] Optionally, when the decoding end obtains the mark, if the decoding end decodes the displacement code stream in a video decoding manner, the decoding end decodes the displacement code stream to obtain target displacement data, which may include:

[0136] The decoding end decodes the displacement code stream to obtain a YUV image, and extracts N pixel point data from the YUV image according to the mark;

[0137] The decoding end obtains the target displacement data according to the N pixel point data, and the N pixel point data are used to represent the N displacement vectors in the target displacement data.

[0138] It can be understood that if the decoding end performs decoding based on a video decoding method, after obtaining the displacement code stream, the decoding end decodes the displacement code stream based on the video decoding method to obtain a YUV image, and can extract the pixel data according to the order in which the target displacement data is arranged in the YUV image by the encoding end according to the obtained mark. It should be noted that if the encoding end uses the length N of the selected displacement data as the mark of the selected position, then when extracting the pixel data, the decoding end only needs to extract the first N pixel data in order; if the encoding end uses the length MN of the data after the selected position as the mark of the selected position, it is necessary to first obtain the length N of the selected displacement data by subtracting (MN) from the number of vertices after the decoding grid subdivision (this number is equal to M), and then extract the pixel data based on N. The decoding end obtains the target displacement data based on the extracted N pixel data, for example, the target displacement data is also composed of the N pixel data. In this case, the N pixel data is also used to represent the N displacement vectors in the target displacement data.

[0139] In the embodiment of the present application, when the decoding end decodes the displacement code stream, it can obtain the target displacement data according to the acquired mark of the selected position, thereby ensuring that the decoding end can obtain the target displacement data more accurately.

[0140] Optionally, when the decoding end decodes the displacement code stream in a VDMC manner, the decoding end decodes the displacement code stream to obtain target displacement data, including:

[0141] The decoding end decodes the displacement code stream to obtain a two-dimensional image, and extracts N wavelet transform coefficients from the two-dimensional image according to the mark;

[0142] The decoding end obtains the target displacement data according to the N wavelet transform coefficients, and the N displacement vectors in the target displacement data are represented by the N wavelet transform coefficients.

[0143] In an embodiment of the present application, if the decoder performs decoding based on the VDMC method and obtains a displacement code stream and also obtains a selection position marker sent by the encoder, the decoder decodes the displacement code stream based on the VDMC method to obtain a two-dimensional image, arranges the wavelet transform coefficients in the two-dimensional image according to the arrangement scheme used by the encoder, and extracts N wavelet transform coefficients, for example, the first N wavelet transform coefficients, from the two-dimensional image according to the arrangement scheme based on the selection position corresponding to the marker. These first N wavelet transform coefficients are also the target displacement data. Furthermore, the decoder pads the ends of the extracted target displacement data with zeros based on the number of vertices in the mesh after mesh subdivision, until the number of wavelet transform coefficients in the target displacement data is equal to the number of vertices, thereby obtaining M quantized wavelet transform coefficients, i.e., the displacement data. In this way, the decoder can purposefully extract pixel data based on the obtained selection position marker, thereby accurately obtaining the target displacement data.

[0144] In the embodiments of the present application, decoding is performed at the decoding end based on an entropy decoding method, or decoding is performed based on a video decoding method, and a mark of a selected position is obtained, or decoding is performed based on a VDMC method, and a mark of a selected position is obtained. After the decoding end decodes the displacement code stream to obtain target displacement data, the decoding end performs a zero-padding operation at the end of the target displacement data until the number of displacement vectors in the target displacement data after the zero-padding operation is the same as the number of vertices of the grid after the decoding grid is subdivided, thereby obtaining the displacement data.

[0145] For better understanding, the encoding method and decoding method provided in the embodiments of the present application are described in detail below through video encoding and decoding, entropy encoding and decoding, and VDMC encoding and decoding.

[0146] Implementation method 1: video codec-based

[0147] Encoding side:

[0148] When displacement encoding is selected as the video encoding method, the displacement encoding process is shown in Figure 4a. First, the encoder inputs the displacement data into the pre-processing module, which performs a series of pre-processing operations on the raw displacement data, such as transformation and quantization. The pre-processed displacement data is then input into the data selection module. This module uses a set threshold (which represents the percentage of non-zero values ​​in the data) to find a selected position in the data such that the proportion of non-zero values ​​in the displacement data after the selected position is less than or equal to the threshold. The displacement data is then truncated at the selected position, and only the data before the selected position is encoded. The selected position can also be marked and transmitted to the decoder. For example, the length n of the selected data can be used as the marker for the selected position for encoding and transmission; the length Nn (n≤N, where N is the total number of displacement data) of the data after the selected position can also be used as the marker for encoding and transmission. Alternatively, the selected position can be left unmarked, and the decoder can simply pad the displacement information based on the number of vertices in the decoded mesh. After data selection, the selected data can be arranged into a YUV image according to a predetermined rule to obtain a YUV video. During the video arrangement process, to ensure that the resolution of each frame in the YUV video is the same and the pixel data can be arranged into a rectangular shape, the YUV video needs to be padded. The preset padding value of the video is a value agreed upon by the codec. Further, the encoder uses a video encoder to encode and obtain a displacement bitstream.

[0149] Decoding end:

[0150] Depending on whether the encoder marks the selected position, there are different implementation methods for the displacement decoding solution based on video decoding. The following will describe two possible solutions in detail.

[0151] (1) Implementation scheme without marking the selected position:

[0152] The displacement decoding flow chart for unmarked selected positions is shown in Figure 4b. The decoder decodes the acquired displacement bitstream based on the video decoding method. For the YUV video obtained by video decoding, all pixels are first extracted in the order in which the encoder arranged the displacement data in the video. The extracted pixels contain two parts of data: the N displacement data selected by the encoder; and the preset padding value for the video padding on the encoder, which is a value agreed upon between the encoder and decoder. After obtaining the pixel displacement data, the video padding is removed from the pixel data according to the preset padding value agreed upon with the encoder, resulting in the displacement data consisting of the N displacement vectors selected by the encoder. The displacement data is then padded with zeros based on the number of vertices in the decoded mesh after subdivision until the displacement data matches the number of vertices in the subdivided mesh. At this point, the recovered complete displacement data is obtained. (The number of vertices in the subdivided mesh can be obtained in other modules of the dynamic mesh decoding framework, such as the V-DMC framework, by subdividing the decoded base mesh.) The restored complete displacement data is then input into the post-processing module to obtain the original displacement data and complete the displacement decoding. The operation of the post-processing module is the reverse implementation of the operation of the pre-processing module at the encoding end, such as inverse quantization and inverse transformation.

[0153] (2) Implementation of marking the selected position:

[0154] Figure 4c is a flow chart for displacement decoding that marks the selected position. The decoder decodes the acquired displacement bitstream based on a video decoding method. For the YUV video obtained by video decoding, the decoder first extracts the selected displacement data based on the obtained selected position markers and the order in which the displacement data was arranged in the video by the encoder. For example, if the encoder uses the length n of the selected data as the marker for the selected position, then when extracting pixel data, it only needs to extract the first M pixels in the image in the order in which they were arranged. If the encoder uses the length MN (N ≤ M, where M is the total number of displacement data) of the data after the selected position as the marker for the selected position, it first subtracts (MN) from the number of vertices after the decoded mesh subdivision (which is equal to M) to obtain the selected data length N. Pixel data is then extracted based on N. After obtaining the selected displacement data (i.e., pixel data), the data is padded with zeros based on the number of vertices in the decoded mesh subdivision until the data number matches the number of vertices. The padded complete displacement data is then input into the post-processing module to obtain the original displacement data, completing the displacement decoding. The operations of the post-processing module are the reverse implementation of the operations of the pre-processing module at the encoding end, such as inverse quantization and inverse transformation.

[0155] Implementation method 2: Entropy-based encoding and decoding

[0156] Encoding side:

[0157] When entropy coding is selected as displacement coding, the displacement coding process is shown in Figure 5a. First, the displacement data is input into the pre-processing module, which performs a series of pre-processing operations on the original displacement data, such as transformation, quantization, etc.; then the pre-processed displacement data is input into the displacement data selection module, which sets a reasonable threshold (this value represents the percentage of non-zero values ​​in the selected data) so that the proportion of non-zero values ​​in the displacement data after the selected position is less than or equal to the threshold, and then the displacement data is truncated at the selected position, and only the data before the truncation position is encoded. After the data is truncate, the truncated data can be directly entropy coded. The specific entropy coding method is not limited here. For example, context-adaptive variable-length coding (CAVLC) and context-adaptive binary arithmatic coding (CABAC) can be used.

[0158] Decoding end:

[0159] Figure 5b is a flow chart for displacement decoding based on entropy decoding. For the received displacement code stream, the decoder first performs entropy decoding on the displacement code stream to obtain the selected displacement data. It then pads the data with zeros based on the number of vertices in the decoded mesh after subdivision until the data reaches the same number of vertices as the mesh. (The number of vertices in the decoded mesh after subdivision can be obtained in other modules of the dynamic mesh decoding framework, such as the V-DMC framework, by subdividing the decoded base mesh.) The recovered complete displacement data is then input into the post-processing module to obtain the original displacement data, completing the displacement decoding. The post-processing module's operations are the inverse of the encoder's pre-processing module's operations, such as dequantization and inverse transform.

[0160] Implementation method 3: VDMC-based encoding and decoding method

[0161] Encoding side:

[0162] The application of the three-dimensional grid displacement information encoding method proposed in this application at the encoding end is shown in FIG6a . The entire application process is described in detail below:

[0163] (1) Mesh simplification

[0164] Mesh simplification involves reducing the input mesh to a base mesh with relatively few points and faces, while preserving the original mesh's shape as much as possible. The key to mesh simplification lies in the simplification operation and the corresponding error metric. A possible mesh simplification operation, shown in Figure 6b, merges the vertices at both ends of an edge into a single vertex and deletes the connection between them. This process is repeated throughout the mesh according to a specific rule to reduce the number of faces and vertices to the target value.

[0165] During the simplification process, a specific error metric can be selected to optimize the simplified result. For example, the error metric for a vertex can be the sum of the coefficients of the equations of all adjacent faces. The error metric for an edge can be the sum of the error metrics of the two vertices on the edge. In other words, the error resulting from merging an edge is the sum of the distances from the merged vertex to all adjacent faces of the original two vertices on the edge.

[0166] After determining the simplification operation and the corresponding error metric, the mesh simplification process begins iteratively. First, the vertex errors of the initial mesh are calculated to obtain the error for each edge. Edges are then sorted from smallest to largest error, and the edge with the smallest error is merged each time. Simultaneously, the positions of the merged vertices are calculated, and the errors of all edges associated with the merged vertices are updated. This means that the order of edge arrangement is updated to ensure that each iteration is based on a global error metric. Through iteration, the mesh faces are simplified to the number required for lossy encoding.

[0167] (2) Mesh parameterization

[0168] Texture coordinates may be regenerated based on the reconstructed base mesh of the current frame. This step requires generating texture coordinates for each attribute map of the input mesh. If multiple attribute maps have similar characteristics, they can share the same texture coordinates. Texture coordinate generation can be done by mesh parameterization, among other methods. Numerous algorithms exist for mesh parameterization, such as the Isocharts algorithm, which uses spectral analysis to implement stretch-driven 3D mesh parameterization. The 3D mesh is then UV-unwrapped, tiled, and packed into a 2D texture domain.

[0169] (3) Subdivision deformation

[0170] The subdivision deformation module is an optional module that can improve the quality of the mesh reconstructed by the decoder. It can be omitted when the base mesh quality can meet the application requirements.

[0171] The subdivision deformation module is applied to the input three-dimensional (3D) mesh to generate displacement vector information. Specifically, the input two-dimensional (2D) curve (represented by a 2D polyline), called the "original" curve, is first downsampled to generate a basic curve / polyline, called the "simplified" curve. The subdivision scheme is then applied to the simplified polyline to generate the "subdivision" curve. The subdivided polyline is then deformed to obtain a better approximation of the original curve. That is, a geometric displacement vector is calculated for each vertex of the subdivided mesh so that the shape of the subdivided curve is as close as possible to the shape of the original curve. These geometric displacement vectors are the geometric displacement vector information (vertex displacement) output by the module. The same deformation process is also applied to the attribute information corresponding to the vertex to obtain the corresponding attribute displacement vector.

[0172] (3) Basic mesh compression

[0173] The base mesh compression module is used to compress the base mesh information output by the subdivision deformation module. There are two main modes for base mesh compression: intra-frame mode and inter-frame mode. In intra-frame mode, the input of the base mesh compression module is a three-dimensional mesh containing geometric coordinates, connection relationships, and attribute information associated with vertices. In inter-frame mode, the input of the base mesh compression module is motion vectors and their identifiers, as well as possible intra-frame sub-meshes. After encoding, the encoded mesh needs to be reconstructed and provided to subsequent modules for processing. The following is a brief introduction to the encoding of the two modes:

[0174] ①Intra-frame mode

[0175] Intra-mode trellis coding can use existing trellis encoders to encode the input base trellis, such as Draco. The trellis encoder type is encoded with auxiliary information and passed to the decoding end.

[0176] ②Interframe mode

[0177] In inter-frame mode, motion vectors and identifiers must be encoded. The motion vector identifier is an array of numbers greater than or equal to 0. The array size is equal to the number of vertices in the base mesh of the reference frame corresponding to the temporal motion vector identifier. This array can be directly encoded using existing entropy coding algorithms, such as Context-based Adaptive Binary Arithmetic Coding (CABAC).

[0178] (5) Reconstruct the base mesh

[0179] After the base grid is encoded, it is necessary to reconstruct the base grid. For grids encoded in intra-frame mode, the reconstructed grid can be obtained by decoding the encoded grid.

[0180] For the basic grid information encoded in the inter-frame mode, it is necessary to reconstruct the inter-frame sub-grid based on the motion vector and the identifier. If there is an intra-frame sub-grid in the inter-frame mode, it is also necessary to merge the reconstructed inter-frame sub-grid with the intra-frame sub-grid to obtain the reconstructed basic grid.

[0181] (6) Encoding of vertex displacement

[0182] To encode vertex displacements, the order of vertex displacements must first be adjusted based on the reconstructed base mesh. Wavelet transform and quantization are then performed on the displacements to obtain quantized wavelet transform coefficients. The quantized wavelet transform coefficients are then input into the data truncation module. Finally, the wavelet transform coefficients of the current frame are arranged into a two-dimensional image, ultimately forming a YUV video that is then encoded using a video encoder to obtain a bitstream of the displacements. Each process will be described in detail below:

[0183] ①Adjust the displacement order

[0184] This process primarily adjusts the order of vertex displacements based on the reconstructed base mesh. The detailed process involves first subdividing the reconstructed base mesh, then adjusting the displacement order to match the subdivided base mesh's vertex order. This process also optionally converts the vertex displacement coordinates from a Cartesian coordinate system to a local coordinate system.

[0185] ② Wavelet transform

[0186] A transformation can be applied to the displacement vector to reduce the correlation between its data. An optional transformation is linear wavelet transform, and its prediction process is defined as shown in formula (1):

[0187] Where v is the newly inserted midpoint on the edge (v1, v2), Signal(v), Signal(v1), and Signal(v2) are the displacement vectors corresponding to vertices v, v1, and v2, respectively. The displacement vector of vertex v is predicted and then updated. The update process is defined as shown in Equation (2):

[0188] Among them, v * is the set of all adjacent vertices of vertex v. The transformed displacement vector is called wavelet coefficient.

[0189] ③ Coefficient quantization

[0190] The transformed displacement vector, i.e., the wavelet coefficient, can be quantized. There are many ways to quantize it. One method is shown in equations (3) and (4): disp[v].d[k] = floor(disp[v].d[k] * scale[k])#(3)

[0191] Where disp[v] represents the transformed value of the displacement vector at the vth vertex, d[k] represents the kth value of the displacement vector, and floor indicates rounding down. bitDepthPosition represents the bit depth of the current mesh vertex's geometric position, and qp[k] represents the quantization parameter for the kth coefficient. As mentioned earlier, after transforming the coordinate system of the displacement vector, its normal component has a more significant impact on quality than its tangential component, so a larger quantization parameter can be used for the tangential component.

[0192] 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 (5): scale[k] = scale[k] * lodScale[k] # (5)

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

[0194] ④Data selection

[0195] For the quantized wavelet transform coefficients, a data selection operation is required before they are arranged into a two-dimensional image. This operation can find a data selection position in the data by setting a threshold (this value represents the percentage of non-zero values ​​in the data), so that the proportion of non-zero values ​​in the wavelet transform coefficients after the selection position is less than or equal to the threshold. The wavelet transform coefficients are then truncated at the selection position, and only the data before the selection position is arranged into the two-dimensional image. At the same time, the selection position can be marked and stored in auxiliary information to be transmitted to the decoding end; or the selection position can be left unmarked, and the displacement information can be filled in at the decoding end according to the number of vertices after the decoding base grid is subdivided.

[0196] ⑤ Two-dimensional arrangement

[0197] After data truncation, the data can be arranged on a two-dimensional image as follows:

[0198] (a) Traverse the wavelet coefficients in order from low frequency to high frequency;

[0199] (b) For each coefficient, determine the index of the NxM pixel block (e.g., N=M=16) where it should be stored in the raster scan order of the block;

[0200] (c) Calculate the position of the corresponding NxM pixel block on the image according to the Morton order.

[0201] The arrangement method is not limited here; other arrangements can also be used, such as zigzag order and raster order. The encoder can explicitly specify the corresponding arrangement in the bitstream. This process requires video padding to ensure that the resolution of each frame of the generated YUV video is consistent and the number of pixels can be arranged in a rectangular shape. The preset padding value of the video is a known agreed value between the codec.

[0202] ⑥Video compression

[0203] After arranging the wavelet coefficients on a two-dimensional image, they can be directly encoded using a video encoder to obtain a shifted code stream.

[0204] (7) Reconstruction of deformed mesh

[0205] The displacement vector encoding module needs to obtain the reconstructed displacement vector value during encoding. There are two ways to obtain the quantized wavelet transform coefficients from the reconstructed two-dimensional image, depending on whether the selected position is marked when the data is selected:

[0206] ① Unmarked selected location

[0207] For unmarked selection locations, when obtaining the quantized wavelet transform coefficients, all pixel data in the two-dimensional image is first extracted according to the arrangement scheme. The extracted pixel data contains two values: one is the quantized wavelet transform coefficient selected by the data selection module, and the other is the preset fill value for the video fill during the two-dimensional arrangement process. After obtaining the pixel data, the video fill portion of the pixel data is removed according to the preset fill value to obtain the quantized wavelet transform coefficient selected by the data selection module. The selected quantized wavelet transform coefficients are then padded with zeros based on the number of vertices after the reconstructed base mesh is subdivided. This is done until the number of selected quantized wavelet transform coefficients matches the number of vertices after the reconstructed base mesh is subdivided. This results in the quantized wavelet transform coefficients.

[0208] ②Mark the selected location

[0209] For the case where the selection position is marked, when obtaining the quantized wavelet transform coefficients, the selected data is first taken out from the two-dimensional image according to the arrangement scheme based on the marked selection position; then, zero padding operation is performed at the end of the taken out data according to the number of vertices of the subdivided reconstructed basic grid until the number of data is the same as the number of vertices, and the quantized wavelet transform coefficients can be obtained.

[0210] The quantized wavelet transform coefficients are dequantized and inversely transformed to obtain the displacement vector consistent with the decoding end. After obtaining the reconstructed geometric displacement vector, the subdivided reconstructed base mesh is reconstructed according to the corresponding geometric displacement vector to obtain the reconstructed subdivided deformed mesh, which is passed to the attribute graph conversion module.

[0211] (8) Attribute Graph Conversion

[0212] The attribute graph conversion module performs attribute graph conversion based on the input original mesh, the input original attribute graph, and the reconstructed deformed mesh.

[0213] The steps for attribute graph conversion are as follows:

[0214] 1. Calculate the texture coordinates of each pixel on the attribute map to be generated. For example, the texture coordinates corresponding to pixel A(i,j) are P(u,v);

[0215] 2. Determine whether the texture coordinates are within a certain triangle face after the parameterization of the subdivided deformed mesh;

[0216] 3. If the texture coordinate does not belong to any triangle, mark the pixel as an empty pixel and then fill it with a filling algorithm;

[0217] 4. If the texture coordinate belongs to a triangle, then

[0218] a. Mark the pixel as filled;

[0219] b. Calculate the center of gravity coordinates of the texture in the current triangle according to the texture coordinates;

[0220] c. Based on the barycentric coordinates and the corresponding triangular face, the two-dimensional texture coordinates are mapped to three-dimensional geometric coordinates, that is, mapped to the points on the subdivided deformed mesh corresponding to the texture coordinates.

[0221] d. Find the point closest to the 3D coordinate on the input original grid.

[0222] e. Calculate the barycentric coordinates of the three-dimensional coordinates based on the triangle surface they are on and map them to two dimensions to calculate their texture coordinates.

[0223] f. Sample the input original attribute map using the texture coordinate to obtain the value of the corresponding pixel position.

[0224] Assign this value to the corresponding pixel on the attribute map to be generated.

[0225] (9) Attribute Graph Compression

[0226] After obtaining the converted attribute map, the empty pixels therein can be filled using existing filling algorithms (such as the Push-Pull algorithm). Then, existing video encoders such as H.264 / AVC, H.265 / HEVC, and H.266 / VVC can be used to encode the empty pixels to obtain the bitstream of the output attribute map. In addition, operations such as color space conversion and chroma subsampling can be selectively applied to achieve better rate-distortion performance in video encoding, such as color space conversion from RGB 444 to YUV420. In the case of multiple attribute maps, the texture coordinates corresponding to each attribute map need to be identified through auxiliary information during encoding.

[0227] (10) Auxiliary information

[0228] During the encoding process, various modules can employ alternative schemes, such as the type of grid encoder, the type of video encoder, the grid subdivision scheme, and the spatial displacement vector transform scheme. The proposed framework allows for the use of different schemes. Therefore, the selected scheme needs to be communicated to the decoder to guide correct decoding.

[0229] Auxiliary information includes the type of static grid encoder, the type of video encoder, grid subdivision scheme, number of grid iterations, geometric displacement vector transformation scheme, coefficient arrangement scheme, displacement truncation mark, color conversion scheme, etc. For the grid part encoded using the inter-frame coding mode, it also includes the corresponding reference frame list, etc.

[0230] After all modules are encoded, the basic grid part stream, texture coordinate part stream, displacement vector video stream, attribute map video stream and auxiliary information stream are mixed to obtain the final encoded stream output by the encoding end.

[0231] Decoding end:

[0232] The application of the three-dimensional grid displacement information decoding method proposed in this application at the decoding end is shown in FIG6c . The entire application process is described in detail below:

[0233] (1) Auxiliary information decoding

[0234] Auxiliary information includes the static grid encoder type, video encoder type, grid subdivision scheme, grid iteration count, geometric displacement vector transformation scheme, coefficient permutation scheme, displacement truncation flag, and color conversion scheme. For grids encoded using inter-frame coding mode, the corresponding reference frame list is also included. This information guides the decoder to perform correct decoding. After decoding, this information is represented by corresponding syntax parameters.

[0235] (2) Basic grid decoding

[0236] Decoding of the base mesh can be divided into intra-frame mode and inter-frame mode. In intra-frame mode, this module decodes the input base mesh bitstream using the decoder corresponding to the static mesh encoder indicated by the auxiliary information. The decoded output is a 3D mesh containing geometric information, connectivity relationships, and texture coordinate information. In inter-frame mode, this module is responsible for decoding the motion vectors corresponding to the vertices and then reconstructing the base mesh of the current frame based on the reference frame.

[0237] (3) Segmentation

[0238] The subdivision module operates in the same way as the encoding end subdivision operation, and uses auxiliary information to indicate the number of subdivision iterations in different areas of the current basic grid.

[0239] (4) Displacement vector video decoding

[0240] The displacement vector video code stream is decoded according to the video decoder type indicated in the auxiliary information. Note that this includes geometric displacement vector video and displacement vector video with different attributes.

[0241] (5) Displacement vector decoding

[0242] Depending on whether the data selection position is marked, there are two ways to decode the displacement vector:

[0243] ① Unmarked selected location

[0244] For unmarked selection locations, when obtaining quantized wavelet transform coefficients, all pixel data in the two-dimensional image is first extracted according to the arrangement scheme. The extracted pixel data contains two values: the quantized wavelet transform coefficients selected by the encoder's data selection module; and the preset padding value for video padding during the encoder's two-dimensional arrangement, which is a value agreed upon between the encoder and decoder. After obtaining the pixel data, the video padding portion of the pixel data is removed according to the preset padding value agreed upon with the encoder, obtaining the quantized wavelet transform coefficients selected by the encoder's data selection module. The selected quantized wavelet transform coefficients are then padded with zeros based on the number of vertices in the reconstructed base mesh. This is done until the number of selected quantized wavelet transform coefficients matches the number of vertices in the reconstructed base mesh. The quantized wavelet transform coefficients are then dequantized and inverse transformed to recover the corresponding displacement vector.

[0245] ②Mark the selected location

[0246] When obtaining quantized wavelet transform coefficients based on marked selection positions, the selected data is first extracted from the two-dimensional image according to the arrangement scheme based on the marked selection positions. Zero padding is then performed at the end of the extracted data based on the number of vertices in the subdivided reconstructed base mesh until the number of data and vertices are the same. The quantized wavelet transform coefficients are then obtained. Dequantization and inverse transformation operations are then performed on the quantized wavelet transform coefficients to recover the corresponding displacement vector.

[0247] (6) Reconstruct the deformed mesh

[0248] After the base mesh and displacement vectors are decoded and reconstructed, the deformed mesh is reconstructed based on these two parts. The corresponding displacement vector is added to each vertex of the subdivided mesh, as shown in formula (6): deformedmesh[i].v[k] = subdivmesh[i].v[k] + displacement[k]#(6)

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

[0250] The attribute displacement vector is applied to the corresponding attribute value in the same way, taking texture coordinates as an example, as shown in formula (7). deformedmesh[i].vt[k] = subdivmesh[i].vt[k] + attdisplacement[k] # (7)

[0251] Among them, subdivmesh[i].vt[k] represents the k-th texture coordinate after the base mesh of the current frame is subdivided, attdisplacement[k] represents the k-th value of the attribute displacement vector, and deformedmesh[i].vt[k] represents the value of the k-th texture coordinate after the subdivision and deformation of the current frame.

[0252] (7) Attribute Graph Decoding

[0253] The attribute map decoder is responsible for decoding the attribute map bitstream using the video decoder indicated in the auxiliary information. An optional color space conversion is performed to obtain an image format consistent with the input attribute map from the encoder, resulting in the final decoded attribute map output. For multiple attribute map bitstreams, each attribute map is mapped to its corresponding texture coordinates according to its identifier after decoding.

[0254] After each module is processed, the decoder finally obtains the reconstructed deformed mesh and the corresponding attribute map. Subsequent applications use the reconstructed deformed mesh and attribute map as input for processing.

[0255] The 3D mesh displacement information encoding method provided in the embodiments of the present application can be executed by a 3D mesh displacement information encoding device. In the embodiments of the present application, the 3D mesh displacement information encoding method performed by the 3D mesh displacement information encoding device is used as an example to illustrate the 3D mesh displacement information encoding device provided in the embodiments of the present application.

[0256] Referring to FIG. 7 , an embodiment of the present application further provides a three-dimensional grid displacement information encoding device. As shown in FIG. 7 , the three-dimensional grid displacement information encoding device 700 includes:

[0257] A first acquisition module 701 is configured to acquire displacement data of a three-dimensional grid to be encoded, wherein the displacement data includes M displacement vectors;

[0258] A second acquisition module 702 is configured to acquire N displacement vectors from the M displacement vectors to obtain target displacement data including the N displacement vectors, where both M and N are positive integers and N is smaller than M.

[0259] The encoding module 703 is configured to encode the target displacement data to obtain a displacement code stream.

[0260] Optionally, the second obtaining module 702 is further configured to:

[0261] Determining a selection position of the target displacement data according to a preset threshold;

[0262] N displacement vectors among the M displacement vectors are acquired according to the selected position, and target displacement data including the N displacement vectors are obtained.

[0263] Optionally, the proportion of non-zero values ​​in the remaining displacement vectors is less than or equal to the preset threshold, and the remaining displacement vectors are displacement vectors in the displacement data other than the N displacement vectors.

[0264] Optionally, the device further comprises:

[0265] The sending module is used to determine the mark of the selected position and send the mark to the decoding end.

[0266] Optionally, the tag is related to the value of N.

[0267] Optionally, the N displacement vectors are the first N displacement vectors among the M displacement vectors.

[0268] Optionally, the encoding module 703 is further configured to perform any one of the following:

[0269] Arranging the target displacement data into a YUV image according to a preset rule, performing a padding operation on the YUV image arranged with the target displacement data based on a preset padding value, and encoding the padded YUV image through a video encoder to obtain a displacement code stream;

[0270] The target displacement data is entropy-encoded to obtain a displacement code stream.

[0271] Optionally, when the device is encoded using video-based dynamic grid compression (VDMC), the displacement vector is represented by a quantized wavelet transform coefficient, and the target displacement data is represented by a target wavelet transform coefficient, and the target wavelet transform coefficient includes N of the quantized wavelet transform coefficients.

[0272] Optionally, the encoding module 703 is further configured to:

[0273] The target wavelet transform coefficients are arranged on a two-dimensional image, the two-dimensional image on which the target wavelet transform coefficients are arranged is filled based on a preset filling value, and the filled two-dimensional image is encoded by a video encoder to obtain a displacement code stream.

[0274] Optionally, the device further includes an execution module, configured to:

[0275] Extracting pixel data from the padded two-dimensional image to obtain pixel data, and performing a removal operation on the pixel data according to the preset filling value to obtain the target wavelet transform coefficient;

[0276] performing a zero-padding operation on the target wavelet transform coefficients according to the number of mesh vertices after the reconstructed base mesh is subdivided to obtain M quantized wavelet transform coefficients, where the value of M is the same as the number of mesh vertices after the reconstructed base mesh is subdivided, and the displacement data is represented by the M quantized wavelet transform coefficients;

[0277] Attribute map conversion and compression are performed based on the grid obtained by subdividing the reconstructed basic grid, the three-dimensional grid to be encoded, and the original attribute map to obtain an attribute map code stream.

[0278] Optionally, when the device determines the selected position of the target displacement data according to a preset threshold, determines a mark of the selected position, and sends the mark to the decoding end, the execution module is further configured to:

[0279] The selected position is determined according to the mark, and pixel data is taken from the filled two-dimensional image according to the selected position to obtain the target wavelet transform coefficient.

[0280] In an embodiment of the present application, after obtaining the displacement data of the three-dimensional grid to be encoded, the device obtains the first N displacement vectors of the displacement data and only encodes the first N displacement vectors of the displacement data, that is, discards part of the vectors of the displacement data, thereby effectively reducing the amount of encoded data of the displacement data, thereby improving the encoding efficiency of the displacement data.

[0281] The three-dimensional grid displacement information encoding device in the embodiments of the present application can be an electronic device, such as an electronic device with an operating system, or a component in an electronic device, such as an integrated circuit or chip. The electronic device can be a terminal, or it can be other devices other than a terminal. For example, the terminal can include but is not limited to the types of terminals listed above, and other devices can be servers, network attached storage (NAS), etc., which are not specifically limited in the embodiments of the present application.

[0282] The three-dimensional grid displacement information encoding device provided in the embodiment of the present application can implement each process implemented by the encoding end in the above-mentioned three-dimensional grid displacement information encoding method embodiment and achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0283] The 3D mesh displacement information decoding method provided in the embodiments of the present application can be executed by a 3D mesh displacement information decoding device. In the embodiments of the present application, the 3D mesh displacement information decoding device executing the 3D mesh displacement information decoding method is used as an example to illustrate the 3D mesh displacement information decoding device provided in the embodiments of the present application.

[0284] Referring to FIG. 8 , an embodiment of the present application further provides a three-dimensional grid displacement information decoding device. As shown in FIG. 8 , the three-dimensional grid displacement information decoding device 800 includes:

[0285] The third acquisition module 801 is used to obtain a displacement code stream;

[0286] A decoding module 802 is configured to decode the displacement code stream to obtain target displacement data, where the target displacement data includes N displacement vectors;

[0287] The recovery module 803 is configured to recover the N displacement vectors into M displacement vectors to obtain displacement data, wherein the displacement data includes the M displacement vectors, and both M and N are positive integers, and N is less than M.

[0288] Optionally, the value of M is the same as the number of vertices of the mesh after the decoded mesh is subdivided, and the recovery module 803 is further used to:

[0289] A zero-padding operation is performed on the N displacement vectors to restore M displacement vectors.

[0290] Optionally, the device decodes the displacement code stream by a video decoding method or a VDMC method;

[0291] Wherein, when the device decodes the displacement code stream by VDMC method, the displacement vector is represented by the quantized wavelet transform coefficient, the target displacement data is represented by the target wavelet transform coefficient, and the target wavelet transform coefficient includes N quantized wavelet transform coefficients.

[0292] Optionally, the decoding module 802 is further configured to perform any one of the following:

[0293] Decoding the displacement code stream in a video decoding manner to obtain a YUV image, extracting pixel data from the YUV image, and performing a removal operation on the pixel data based on a preset padding value to obtain target displacement data including N displacement vectors;

[0294] The displacement code stream is decoded by VDMC to obtain a two-dimensional image, pixel point data in the two-dimensional image is extracted, and the pixel point data is removed based on a preset filling value to obtain target wavelet transform coefficients including N quantized wavelet transform coefficients.

[0295] Optionally, the device further comprises:

[0296] The fourth acquisition module is used to acquire a mark sent by the encoding end, where the mark is related to the positions of the N displacement vectors of the target displacement data in the displacement data.

[0297] Optionally, when the apparatus decodes the displacement code stream by video decoding, the decoding module 802 is further configured to:

[0298] Decoding the bitstream to obtain a YUV image, and extracting N pixel data from the YUV image according to the mark;

[0299] The target displacement data is obtained according to the N pixel point data, and the N pixel point data are used to represent the N displacement vectors in the target displacement data.

[0300] Optionally, when the device decodes the bit-shifted code stream in a VDMC manner, the decoding module 802 is further configured to:

[0301] Decoding the bitstream to obtain a two-dimensional image, and extracting N wavelet transform coefficients from the two-dimensional image according to the marker;

[0302] The target displacement data is obtained according to the N wavelet transform coefficients, and the N displacement vectors in the target displacement data are represented by the N wavelet transform coefficients.

[0303] The three-dimensional mesh displacement information decoding device in the embodiments of the present application can be an electronic device, such as an electronic device with an operating system, or a component of an electronic device, such as an integrated circuit or chip. The electronic device can be a terminal or other device other than a terminal. For example, the terminal can include, but is not limited to, the types of terminals listed above. Other devices can include servers, network attached storage (NAS), and the like, and are not specifically limited in the embodiments of the present application.

[0304] The three-dimensional grid displacement information decoding device provided in the embodiment of the present application can implement the various processes implemented by the decoding end in the above-mentioned three-dimensional grid displacement information decoding method embodiment and achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0305] As shown in Figure 9, an embodiment of the present application further provides an electronic device 900, comprising a processor 901 and a memory 902. The memory 902 stores a program or instruction that can be executed on the processor 901. For example, when the electronic device 900 is an encoding end, the program or instruction, when executed by the processor 901, implements the various steps of the above-mentioned embodiment of the three-dimensional mesh displacement information encoding method and can achieve the same technical effect. When the electronic device 900 is a decoding end, the program or instruction, when executed by the processor 901, implements the various steps of the above-mentioned embodiment of the three-dimensional mesh displacement information decoding method and can achieve the same technical effect. To avoid repetition, they are not further described here.

[0306] The present application also provides a terminal comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is configured to execute a program or instruction to implement the steps of the method embodiment shown in Figures 2 or 3. This terminal embodiment corresponds to the above-described method embodiment, and each implementation process and implementation method of the above-described method embodiment can be applied to this terminal embodiment and achieve the same technical effect. Specifically, Figure 10 is a schematic diagram of the hardware structure of a terminal implementing an embodiment of the present application.

[0307] The terminal 1000 includes but is not limited to: a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1008, a memory 1009 and at least some of the components of the processor 1010.

[0308] Those skilled in the art will appreciate that the terminal 1000 may also include a power supply (such as a battery) to power various components. The power supply may be logically connected to the processor 1010 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. The terminal structure shown in FIG10 does not limit the terminal. The terminal may include more or fewer components than shown, or may combine certain components, or have different component arrangements, which will not be described in detail here.

[0309] It should be understood that in an embodiment of the present application, the input unit 1004 may include a graphics processing unit (GPU) 10041 and a microphone 10042, and the graphics processor 10041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 1006 may include a display panel 10061, and the display panel 10061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1007 includes a touch panel 10071 and at least one of other input devices 10072. The touch panel 10071 is also called a touch screen. The touch panel 10071 may include two parts: a touch detection device and a touch controller. Other input devices 10072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and an operating stick, which will not be repeated here.

[0310] In the embodiment of the present application, after receiving downlink data from a network-side device, the RF unit 1001 may transmit the data to the processor 1010 for processing. Furthermore, the RF unit 1001 may send uplink data to the network-side device. Typically, the RF unit 1001 includes, but is not limited to, an antenna, an amplifier, a transceiver, a coupler, a low-noise amplifier, a duplexer, and the like.

[0311] The memory 1009 can be used to store software programs or instructions and various data. The memory 1009 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, applications or instructions required for at least one function (such as a sound playback function, an image playback function, etc.). In addition, the memory 1009 may include a volatile memory or a non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM), and a direct memory bus random access memory (DRRAM). The memory 1009 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

[0312] Processor 1010 may include one or more processing units. Optionally, processor 1010 integrates an application processor and a modem processor. The application processor primarily handles operations related to the operating system, user interface, and application programs, while the modem processor primarily processes wireless communication signals, such as a baseband processor. It is understood that the modem processor may not be integrated into processor 1010.

[0313] In which case, when the terminal 1000 is an encoding end, the processor 1010 is configured to:

[0314] Obtaining displacement data of a three-dimensional grid to be encoded, wherein the displacement data includes M displacement vectors;

[0315] Obtaining N displacement vectors from the M displacement vectors to obtain target displacement data including the N displacement vectors, where both M and N are positive integers and N is less than M;

[0316] The target displacement data is encoded to obtain a displacement code stream.

[0317] Alternatively, when the terminal 1000 is a decoding end, the processor 1010 is configured to:

[0318] Get the displacement code stream;

[0319] Decoding the displacement code stream to obtain target displacement data, wherein the target displacement data includes N displacement vectors;

[0320] The N displacement vectors are restored to M displacement vectors to obtain displacement data, wherein the displacement data includes the M displacement vectors, M and N are both positive integers, and N is less than M.

[0321] In an embodiment of the present application, after obtaining the displacement data of the three-dimensional grid to be encoded, the terminal obtains N displacement vectors of the displacement data and only encodes the N displacement vectors of the displacement data, that is, discards part of the vectors of the displacement data, thereby effectively reducing the amount of encoded data of the displacement data, thereby improving the encoding efficiency of the displacement data.

[0322] It can be understood that the implementation process of each implementation method mentioned in this embodiment can refer to the relevant description of the above-mentioned method embodiment and achieve the same or corresponding technical effects. To avoid repetition, it will not be repeated here.

[0323] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned three-dimensional grid displacement information encoding method or decoding method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0324] The processor is the processor in the terminal described in the above embodiment. The readable storage medium includes a computer-readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk. In some examples, the readable storage medium may be a non-transitory readable storage medium.

[0325] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned three-dimensional grid displacement information encoding method or decoding method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0326] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0327] An embodiment of the present application further provides a computer program / program product, which is stored in a storage medium. The computer program / program product is executed by at least one processor to implement the various processes of the above-mentioned three-dimensional grid displacement information encoding method or decoding method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0328] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in the opposite order according to the functions involved. For example, the described method may be performed in an order different from that described, and various steps may also be added, omitted or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0329] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of a computer software product plus a necessary general-purpose hardware platform, or of course, by hardware. The computer software product is stored in a storage medium (such as ROM, RAM, magnetic disk, optical disk, etc.) and includes a number of instructions for enabling a terminal or network-side device to execute the methods described in each embodiment of the present application.

[0330] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of this application, ordinary technicians in this field can also make many forms of implementation methods without departing from the purpose of this application and the scope of protection of the claims. These implementation methods are all within the protection of this application.

Claims

1. A method for encoding three-dimensional grid displacement information, comprising: The encoding end obtains displacement data of the three-dimensional grid to be encoded, where the displacement data includes M displacement vectors; The encoding end obtains N displacement vectors among the M displacement vectors to obtain target displacement data including the N displacement vectors, where both M and N are positive integers and N is less than M; The encoding end encodes the target displacement data to obtain a displacement code stream.

2. The method according to claim 1, wherein: The encoding end obtains N displacement vectors among the M displacement vectors, and obtains target displacement data including the N displacement vectors, including: The encoding end determines the selection position of the target displacement data according to a preset threshold; The encoding end obtains N displacement vectors among the M displacement vectors according to the selected position, and obtains target displacement data including the N displacement vectors.

3. The method according to claim 1, wherein: The proportion of non-zero values ​​in the remaining displacement vectors is less than or equal to a preset threshold, and the remaining displacement vectors are displacement vectors in the displacement data except the N displacement vectors.

4. The method according to claim 2, wherein: The method further comprises: The encoding end determines a mark of the selected position and sends the mark to the decoding end.

5. The method according to claim 4, wherein: The flag is related to the value of N.

6. The method according to any one of claims 1 to 5, wherein: The N displacement vectors are the first N displacement vectors among the M displacement vectors.

7. The method according to any one of claims 1 to 5, wherein: The encoding end encodes the target displacement data to obtain a displacement code stream, including any one of the following: The encoding end arranges the target displacement data into a YUV image according to a preset rule, performs a filling operation on the YUV image arranged with the target displacement data based on a preset filling value, and encodes the filled YUV image through a video encoder to obtain a displacement code stream; The encoding end performs entropy encoding on the target displacement data to obtain a displacement code stream.

8. The method according to claim 1 or 2, wherein: When encoding is performed by video-based dynamic grid compression (VDMC) at the encoding end, the displacement vector is represented by a quantized wavelet transform coefficient, and the target displacement data is represented by a target wavelet transform coefficient, and the target wavelet transform coefficient includes N of the quantized wavelet transform coefficients.

9. The method according to claim 8, wherein: The encoding end encodes the target displacement data to obtain a displacement code stream, including: The encoding end arranges the target wavelet transform coefficients on a two-dimensional image, fills the two-dimensional image on which the target wavelet transform coefficients are arranged based on a preset filling value, and encodes the filled two-dimensional image through a video encoder to obtain a displacement code stream.

10. The method according to claim 9, wherein: After the encoding end encodes the target displacement data to obtain a displacement code stream, the method further includes: The encoding end extracts pixel point data from the padded two-dimensional image to obtain pixel point data, and removes the pixel point data according to the preset padding value to obtain the target wavelet transform coefficient; The encoder performs a zero padding operation on the target wavelet transform coefficient according to the number of mesh vertices after the reconstruction of the base mesh is subdivided, so as to obtain M quantized wavelet transform coefficients, wherein the value of M is the same as the number of mesh vertices after the reconstruction of the base mesh is subdivided, and the displacement data is characterized by the M quantized wavelet transform coefficients; The encoding end performs attribute map conversion and compression according to the grid obtained by subdividing the reconstructed basic grid, the three-dimensional grid to be encoded, and the original attribute map to obtain an attribute map code stream.

11. The method according to claim 10, wherein: When the encoding end determines the selected position of the target displacement data according to a preset threshold value, determines a mark of the selected position, and sends the mark to the decoding end, the encoding end takes out the pixel point data in the filled two-dimensional image to obtain the pixel point data, and removes the pixel point data according to the preset filling value to obtain the target wavelet transform coefficient, including: The encoding end determines the selected position according to the mark, and extracts pixel point data from the filled two-dimensional image according to the selected position to obtain the target wavelet transform coefficient.

12. A method for decoding three-dimensional grid displacement information, comprising: The decoding end obtains the displacement code stream; The decoding end decodes the displacement code stream to obtain target displacement data, wherein the target displacement data includes N displacement vectors; The decoding end restores the N displacement vectors into M displacement vectors to obtain displacement data, wherein the displacement data includes the M displacement vectors, M and N are both positive integers, and N is less than M.

13. The method according to claim 12, wherein: The value of M is the same as the number of vertices of the mesh after the decoded mesh is subdivided, and the decoding end restores the N displacement vectors to M displacement vectors, including: The decoding end performs a zero-padding operation on the N displacement vectors to restore M displacement vectors.

14. The method according to claim 12, wherein: The decoding end decodes the displacement code stream by a video decoding method or a VDMC method; Among them, when the decoding end decodes the displacement code stream through the VDMC method, the displacement vector is represented by the quantized wavelet transform coefficient, the target displacement data is represented by the target wavelet transform coefficient, and the target wavelet transform coefficient includes N quantized wavelet transform coefficients.

15. The method according to claim 14, wherein: The decoding end decodes the displacement code stream to obtain target displacement data, including any one of the following: The decoding end decodes the displacement code stream by video decoding to obtain a YUV image, extracts pixel point data in the YUV image, and removes the pixel point data based on a preset padding value to obtain target displacement data including N displacement vectors; The decoding end decodes the displacement code stream in a VDMC manner to obtain a two-dimensional image, extracts pixel point data in the two-dimensional image, and removes the pixel point data based on a preset filling value to obtain a pixel point data including N The target wavelet transform coefficients are quantized wavelet transform coefficients.

16. The method according to claim 12, wherein: The method further comprises: The decoding end obtains a mark sent by the encoding end, where the mark is related to positions of the N displacement vectors of the target displacement data in the displacement data.

17. The method according to claim 16, wherein: In the case where the decoding end decodes the displacement code stream by video decoding, the decoding end decodes the displacement code stream to obtain target displacement data, including: The decoding end decodes the displacement code stream to obtain a YUV image, and extracts N pixel point data from the YUV image according to the mark; The decoding end obtains the target displacement data according to the N pixel point data, and the N pixel point data are used to represent the N displacement vectors in the target displacement data.

18. The method according to claim 16, wherein: In the case where the decoding end decodes the displacement code stream in a VDMC manner, the decoding end decodes the displacement code stream to obtain target displacement data, including: The decoding end decodes the displacement code stream to obtain a two-dimensional image, and extracts N wavelet transform coefficients from the two-dimensional image according to the mark; The decoding end obtains the target displacement data according to the N wavelet transform coefficients, and the N displacement vectors in the target displacement data are represented by the N wavelet transform coefficients.

19. A three-dimensional grid displacement information encoding device, comprising: A first acquisition module, used to acquire displacement data of a three-dimensional grid to be encoded, wherein the displacement data includes M displacement vectors; A second acquisition module is used to acquire N displacement vectors among the M displacement vectors to obtain target displacement data including the N displacement vectors, wherein both M and N are positive integers, and N is less than M; The encoding module is used to encode the target displacement data to obtain a displacement code stream.

20. A three-dimensional grid displacement information decoding device, comprising: A third acquisition module is used to acquire a displacement code stream; A decoding module, used for decoding the displacement code stream to obtain target displacement data, wherein the target displacement data includes N displacement vectors; A recovery module is used to restore the N displacement vectors in the target displacement data into M displacement vectors to obtain displacement data, wherein the displacement data includes the M displacement vectors, M and N are both positive integers, and N is less than M.

21. A terminal comprising a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the three-dimensional mesh displacement information encoding method described in any one of claims 1 to 11 are implemented, or the steps of the three-dimensional mesh displacement information decoding method described in any one of claims 12 to 18 are implemented.

22. A readable storage medium storing a program or instruction, wherein the program or instruction, when executed by a processor, implements the steps of the three-dimensional mesh displacement information encoding method as described in any one of claims 1 to 11, or implements the steps of the three-dimensional mesh displacement information decoding method as described in any one of claims 12 to 18.

23. A chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the steps of the three-dimensional mesh displacement information encoding method as described in any one of claims 1 to 11, or to implement the steps of the three-dimensional mesh displacement information decoding method as described in any one of claims 12 to 18.

Citation Information

Patent Citations

  • Image processing method and device

    CN114693538A

  • Spatial position coding method and device

    CN115391476A

  • Video processing method and device and computer readable storage medium

    CN115497029A

  • Mesh compression

    CN1526122A

  • Displaced Micro-meshes for Ray and Path Tracing

    US20230078932A1

Cited By

  • Three-dimensional mesh decoding method, three-dimensional mesh encoding method, encoder, decoder, and medium

    WO2026076682A1