Three-dimensional grid displacement information coding method and device, three-dimensional grid displacement information decoding method and device and terminal
By encoding and decoding some of the displacement vectors in the three-dimensional grid displacement data, the problem of low coding efficiency of the three-dimensional grid displacement data is solved, and more efficient data processing and transmission are achieved.
Patent Information
- Application Number
- CN202310292532.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-23
- Publication Date
- 2024-09-24
AI Technical Summary
The encoding of 3D mesh displacement data is inefficient, complicating processing, storage, and transmission.
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.
It effectively improves the coding efficiency of three-dimensional grid displacement data, reduces coding redundancy, and simplifies the processing, storage, and transmission processes.
Smart Images

Figure CN118694979A
Abstract
Description
Technical Field
[0001] 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
[0002] In recent years, with the rapid development of multimedia technology, 3D models have become a new generation of digital media after audio, images, and videos. 3D mesh is a commonly used way to represent 3D models. In almost all application fields where 3D meshes are used, as people have higher and higher demands for the visual effects of 3D mesh models, the models are becoming more and more complex, and the accuracy of the models is also increasing. Therefore, the amount of data required to represent 3D meshes is also increasing accordingly, which makes the processing, visualization, transmission, and storage of 3D meshes more and more complicated. 3D mesh compression can reduce the size of model data, which is beneficial to the processing, storage, and transmission of 3D meshes.
[0003] Displacement is an important part of the dynamic mesh encoding and decoding process, storing the position information of the vertices of the subdivided mesh obtained after the base mesh is subdivided along the normal direction to the nearest neighbor point of the original input mesh. However, the encoding bit rate of displacement data is high and there is redundancy, which leads to low efficiency in encoding and decoding of 3D mesh displacement data. Summary of the invention
[0004] 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.
[0005] In a first aspect, a method for encoding displacement information of a three-dimensional grid is provided, which is executed by an encoding end, and the method includes:
[0006] The encoding end obtains displacement data of the three-dimensional grid to be encoded, where the displacement data includes M displacement vectors;
[0007] 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;
[0008] The encoding end encodes the target displacement data to obtain a displacement code stream.
[0009] In a second aspect, a method for decoding three-dimensional grid displacement information is provided, which is executed by a decoding end, and the method includes:
[0010] The decoding end obtains the displacement code stream;
[0011] The decoding end decodes the displacement code stream to obtain target displacement data, wherein the target displacement data includes N displacement vectors;
[0012] 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.
[0013] In a third aspect, a three-dimensional grid displacement information encoding device is provided, comprising:
[0014] 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;
[0015] 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;
[0016] The encoding module is used to encode the target displacement data to obtain a displacement code stream.
[0017] In a fourth aspect, a three-dimensional grid displacement information decoding device is provided, comprising:
[0018] A third acquisition module is used to acquire a displacement code stream;
[0019] A decoding module, used for decoding the displacement code stream to obtain target displacement data, wherein the target displacement data includes N displacement vectors;
[0020] 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.
[0021] 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.
[0022] 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.
[0023] 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 a program or instruction to implement the method described in the first aspect, or to implement the method described in the second aspect.
[0024] 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.
[0025] In an embodiment of the present application, after obtaining the displacement data of the three-dimensional grid to be encoded including M displacement vectors, the encoding end obtains N displacement vectors in the displacement data and encodes the N displacement vectors, where 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
[0026] Figure 1a It is a flow chart of encoding by a VDMC method at an encoding end in the related art;
[0027] Figure 1b It is a flowchart of decoding by a decoding end in a VDMC manner in the related art;
[0028] Figure 2 This is one of the flow charts of a three-dimensional grid displacement information encoding method provided in an embodiment of the present application;
[0029] Figure 3 This is one of the flow charts of a three-dimensional grid displacement information decoding method provided in an embodiment of the present application;
[0030] Figure 4a This is the second flowchart of a three-dimensional grid displacement information encoding method provided in an embodiment of the present application;
[0031] Figure 4b This is the second flowchart of a three-dimensional grid displacement information decoding method provided in an embodiment of the present application;
[0032] Figure 4c This is a flowchart of a three-dimensional grid displacement information decoding method provided in an embodiment of the present application;
[0033] Figure 5a This is the third flowchart of a three-dimensional grid displacement information encoding method provided in an embodiment of the present application;
[0034] Figure 5b This is a fourth flowchart of a three-dimensional grid displacement information decoding method provided in an embodiment of the present application;
[0035] Figure 6a This is a fourth flowchart of a three-dimensional grid displacement information encoding method provided in an embodiment of the present application;
[0036] Figure 6bIt is a schematic diagram of grid merging in a three-dimensional grid displacement information encoding method provided in an embodiment of the present application;
[0037] Figure 6c This is the fifth flowchart of a three-dimensional grid displacement information decoding method provided in an embodiment of the present application;
[0038] Figure 7 is a structural diagram of a three-dimensional grid displacement information encoding device provided in an embodiment of the present application;
[0039] Figure 8 is a structural diagram of a three-dimensional grid displacement information decoding device provided in an embodiment of the present application;
[0040] Fig. 9 is a structural diagram of an electronic device provided in an embodiment of the present application;
[0041] Fig.10 It is a structural diagram of a terminal provided in an embodiment of the present application. DETAILED DESCRIPTION
[0042] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field belong to the scope of protection of this application.
[0043] The terms "first", "second", etc. of the present 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 one type, and the number of objects is not limited, for example, the first object can be one or more. In addition, "or" in the present application represents at least one of the connected objects. For example, "A or B" covers three schemes, namely, Scheme 1: including A but not including B; Scheme 2: including B but not including A; Scheme 3: including both A and B. The character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0044] The term "indication" in this application can be 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, operations to be performed, or request results in the sent indication; an indirect indication can be understood as the receiver determining the corresponding information according to the indication sent by the sender, or making a judgment and determining the operation to be performed or the request result according to the judgment result.
[0045] For better understanding, the related concepts that may be involved in the embodiments of the present application are explained below.
[0046] With the rapid development of multimedia technology, related research results have been rapidly industrialized and have become an indispensable part of people's lives. Three-dimensional models have become a new generation of digital media after audio, images, and videos. Three-dimensional grids are a commonly used way to represent three-dimensional models. Compared with traditional multimedia such as images and videos, three-dimensional grid models have stronger interactivity and realism, making them more and more widely used in various fields such as commerce, manufacturing, construction, education, medicine, entertainment, art, and military.
[0047] Although there are many ways to represent 3D meshes, triangular meshes are still the most common representation method. A 3D mesh can be considered to be composed of three basic elements: vertices, edges, and faces. Vertices are the most basic elements in a mesh, and they define a position in a 3D space. Edges are line segments connecting two vertices in a mesh. Faces can be considered as polygons formed by closed paths of edges. For a triangular mesh, each face is a triangle.
[0048] The information contained in the mesh is usually divided into three categories: geometric information, connection information, and attribute information. Geometric information refers to the position of each vertex of the mesh in three-dimensional space. Connection information describes the association between elements in the mesh, that is, the connection relationship between vertices. Attribute information is optional, and it can associate attributes to corresponding mesh elements (such as vertex color, normal vector, etc. can be associated with mesh vertices). Mesh parameterization can also be used to map the mesh from three-dimensional space to a two-dimensional plane area. This mapping relationship is usually described by a set of parameter coordinates, called UV coordinates or texture coordinates, which are associated with mesh vertices. This two-dimensional mapping can be used to represent high-resolution attribute information, such as textures, normal vectors, etc.
[0049] In almost all application fields that use 3D meshes (such as computational simulation, entertainment, medical imaging, digital cultural relics, computer design, e-commerce, etc.), as people's demand for higher visual effects of 3D mesh models increases, the models are becoming more and more complex, and the accuracy of the models is also increasing. Therefore, the amount of data required to represent the 3D mesh is also increasing accordingly. The above problems have led to the increasing complexity of the processing, visualization, transmission and storage of 3D meshes. 3D mesh compression can be regarded as a way to solve the above problems. It reduces the size of model data and is conducive to the processing, storage and transmission of 3D meshes. Therefore, it is necessary to propose an efficient and general 3D mesh compression algorithm.
[0050] Recently, the Moving Pictures Experts Group (MPEG) of the International Organization for Standardization in the field of audio and video coding compression has begun to develop a compression standard for three-dimensional meshes, Video-based dynamic mesh coding (VDMC). This standard is specified based on the existing Visual Volumetric Video-based Coding (V3C) standard. The V3C standard provides a general method for compressing three-dimensional models, which can be presented in the form of point clouds, meshes or panoramic videos. Making the compression method of three-dimensional mesh models compatible with this standard is conducive to the promotion and applicability of this method. Therefore, it is of great significance to optimize the three-dimensional mesh encoding and decoding method in VDMC and combine the optimization method with the V3C standard. One possible optimization method is to optimize the displacement coding method. In the existing framework, the displacement is obtained by calculating the distance between the reconstructed mesh and the original mesh vertex, and its purpose is to improve the quality of the mesh. In the existing framework, the displacement is encoded using a video encoder, and providing multiple options for the encoding method of the displacement is conducive to improving the encoding performance.
[0051] V3C Standard:
[0052] The V3C standard provides a method for encoding and decoding various three-dimensional media through video or image coding technology. Specifically, it converts the three-dimensional media content from a three-dimensional representation into multiple two-dimensional representations (called V3C components) by projection and other methods before encoding, and then encodes the two-dimensional representation using existing video or image coding technology. V3C components mainly include occupancy components, geometric components, and attribute components. The occupancy component can indicate which areas in the two-dimensional representation are associated with the data of the three-dimensional representation; the geometric component indicates information related to the position of the three-dimensional data in space, and the attribute component can provide attribute information corresponding to the vertex, such as material, texture, etc. In addition, the component also contains information on how to reconstruct a three-dimensional model through these components, which is called atlas information. Atlas information is used to associate all components, and additional information for reconstructing from two-dimensional to three-dimensional is also included in the atlas component. The atlas consists of multiple basic units, which are called patches. Each patch represents an area in the available two-dimensional components and contains the information required to project the area back to three-dimensional space.
[0053] VDMC:
[0054] VDMC is a standard developed by MPEG for compressing three-dimensional meshes. Its main idea is to compress three-dimensional meshes by using the existing V3C standard. Since three-dimensional meshes have connection information that needs to be encoded, its specific encoding process is slightly different from V3C. It is necessary to expand the syntax and semantics of the V3C standard decoding end and the decoding operation to support the decoding and reconstruction of three-dimensional meshes.
[0055] The overall framework of the encoding end is as follows Figure 1a As shown, for the input mesh, it is first simplified by the simplification module, and then the new texture coordinates are generated for the mesh by mesh parameterization. Then, the parameterized mesh is subdivided and deformed, that is, new vertices are inserted on the mesh according to a specific subdivision method and the distance from the vertex of the subdivided mesh to the nearest neighbor of the input mesh is calculated, which is called displacement information. Then, the mesh before subdivision, called the base mesh, is sent to the base mesh encoding module and compressed using the existing mesh encoder. In the inter-frame mode, a motion vector can also be generated for each vertex of the base mesh according to the reference frame. The base mesh module only needs to compress the motion vector. The base mesh is reconstructed after encoding, and then the displacement order is adjusted according to the vertex order of the reconstructed base mesh. Then, the vertex displacement information after the order is adjusted is first subjected to wavelet transformation, and the transformed coefficients are quantized. Then, the quantized coefficients are arranged in a two-dimensional image according to a specific scanning order, and the two-dimensional image is encoded using a video encoder. Then, the reconstructed displacement information is applied to the subdivided base mesh to obtain a reconstructed subdivided and deformed mesh. The mesh, the original input mesh and its corresponding texture map are input into the corresponding texture map conversion module to obtain the texture map corresponding to the reconstructed mesh, and the texture map is also encoded using a video encoder. The 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 transmitted to the decoding end through auxiliary information.
[0056] The overall framework of the decoding end is as follows Figure 1b As shown, for the received code stream, the decoding end first demultiplexes each part of the code stream to obtain the basic grid code stream, the displacement video code stream, the texture map video code stream and the 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 taken out from the image through the displacement decoding module, and the steps such as inverse quantization and inverse transformation are performed, and then it is 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.
[0057] Displacement is an important part of the dynamic mesh encoding and decoding process. It stores the distance information from the vertices of the subdivided mesh obtained after the base mesh is subdivided to the nearest neighbor point of the original input mesh along the normal direction. The encoding bit rate of displacement data is relatively high, and there is redundancy, resulting in low efficiency in three-dimensional mesh encoding. In response to the above problems, the embodiments of the present application propose a three-dimensional mesh displacement information encoding method and decoding method.
[0058] The following, in combination 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.
[0059] Please refer to Figure 2 , Figure 2 1 is a flow chart of a method for encoding three-dimensional grid displacement information provided by an embodiment of the present application, and the method is applied to the encoding end. Figure 2 As shown, the method comprises the following steps:
[0060] Step 201: The encoding end obtains displacement data of a three-dimensional grid to be encoded, where the displacement data includes M displacement vectors.
[0061] 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.
[0062] It can be understood that displacement is an important part of the dynamic mesh encoding and decoding process. After the encoder obtains the three-dimensional mesh to be encoded, it further obtains the displacement data (or displacement information) of the three-dimensional mesh to be encoded. The displacement data includes multiple displacement vectors, that is, the displacement data can be represented by displacement vectors.
[0063] Optionally, after acquiring the displacement data of the three-dimensional grid to be encoded, the encoding end may perform a series of preprocessing operations on the displacement data, such as transformation, quantization, etc.
[0064] Step 202: The encoding end obtains N displacement vectors among 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.
[0065] In an embodiment of the present application, after obtaining the displacement data of the three-dimensional grid to be encoded, the encoding end may 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 a part of the displacement data.
[0066] Optionally, the encoding end may also perform preprocessing operations such as transformation and quantization on the displacement data, obtain N displacement vectors in the preprocessed displacement data, and then obtain target displacement data composed of the N displacement vectors. In other words, the encoding end may intercept the displacement data to obtain target displacement data including N displacement vectors. The encoding end may intercept the displacement data based on certain rules, for example, the displacement data may be intercepted according to the proportion of non-zero values in the displacement data.
[0067] Optionally, the encoding end may obtain N displacement vectors in the displacement data based on certain rules, for example, obtaining N displacement vectors at a specific position, or randomly obtaining N displacement vectors, or obtaining the first N displacement vectors, or obtaining N displacement vectors before a certain position, and so on.
[0068] Optionally, the N displacement vectors are the first N displacement vectors of the M displacement vectors. For example, after acquiring the displacement data of the M displacement vectors, the encoder selects the first N displacement vectors as the target displacement data.
[0069] Step 203: The encoding end encodes the target displacement data to obtain a displacement code stream.
[0070] It should be noted that after the encoding end obtains the target displacement data including N displacement vectors (for example, the first N displacement vectors), the encoding end 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, and thus only a portion of the displacement data needs to be encoded, and all the displacement data does not need to be encoded, thereby effectively reducing the encoding bit rate of the encoding end, avoiding the encoding redundancy of the displacement data, and thus improving the encoding efficiency of the encoding end.
[0071] 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 among 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.
[0072] Optionally, in the embodiment of the present application, step 202 may include:
[0073] The encoding end determines the selection position of the target displacement data according to a preset threshold;
[0074] 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.
[0075] In the embodiment of the present application, after the encoder obtains the displacement data of the three-dimensional grid to be encoded, it is necessary to select N displacement vectors from the displacement data to obtain the target displacement data, and the selection positions of the N displacement vectors can be determined based on certain selection rules. Exemplarily, the encoder determines the selection position based on a preset threshold, for example, the proportion of non-zero values in the target displacement data selected by the encoder satisfies the preset threshold, thereby determining the selection position, and selecting N displacement vectors based on the selection position.
[0076] 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.
[0077] Exemplarily, the encoding end determines the selection position of the target displacement data according to 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 may be a pre-set threshold value, and then the encoding end determines the selection position according to the preset threshold value, and obtains the N displacement vectors of the displacement data based on the selected position. For example, the displacement vector may be truncated at the selected position based on the selected position, and the N displacement vectors before the selected position are determined as the target displacement vector, and the displacement vectors at and after the selected 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.
[0078] In the embodiment of the present application, the encoding end only encodes the target displacement data, that is, only the N displacement vectors before the selected position are encoded, so as to effectively improve the encoding efficiency of the encoding end. The encoding end determines the selected position by setting a preset threshold, so as to obtain the target displacement data including the N displacement vectors before the selected position, so that the encoding end can better understand which target displacement data to be obtained, which is more conducive to the determination of the target displacement data by the encoding end.
[0079] Optionally, the method further comprises:
[0080] The encoding end determines a mark of the selected position and sends the mark to the decoding end.
[0081] Exemplarily, the encoding end may mark the selected position and send the mark to the decoding end, so that the decoding end can 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 complete length.
[0082] Optionally, the mark is related to the value of N.
[0083] 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.
[0084] Alternatively, the encoding end may also 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, that is, 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, that is, N, based on the mark, which in turn helps the decoding end decode and fill in the displacement data of the full length.
[0085] 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.
[0086] 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:
[0087] 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 through a video encoder to obtain a displacement code stream;
[0088] The encoding end performs entropy encoding on the target displacement data to obtain a displacement code stream.
[0089] 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.
[0090] For example, the encoding end may be displacement encoding by video encoding. In this case, after acquiring the target displacement data including N displacement vectors (e.g., the first N displacement vectors), the encoding end arranges the target displacement data into the YUV image according to a preset rule, for example, the arrangement may be performed according to the preset rule of video encoding. In the video arrangement process, in order to ensure that the resolution of each frame in the YUV image is the same and the pixel data can be arranged into a rectangle, it is necessary to perform a filling operation on the YUV image. The filling operation may be performed on the YUV image arranged with the target displacement data based on the preset filling value agreed upon by the codec end, and the filled YUV image is encoded by the video encoder to obtain a displacement code stream, and the displacement code stream is sent to the decoding end.
[0091] Alternatively, the encoding end may also entropy encode the target displacement data including the first N displacement vectors by entropy encoding 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 embodiment of the present application will be described in detail through specific embodiments later, and will not be described in detail here.
[0092] In the embodiment of the present application, the encoding end may also perform displacement encoding based on the VDMC method. Optionally, when the encoding end performs encoding by VDMC, the displacement vector is characterized by a quantized wavelet transform coefficient, the target displacement data is characterized by a target wavelet transform coefficient, and the target wavelet transform coefficient includes the first N of the quantized wavelet transform coefficients.
[0093] It should be noted that when the encoding end is encoded by the VDMC method, after obtaining the three-dimensional mesh to be encoded, the encoding end performs a mesh simplification operation on the three-dimensional mesh to be encoded to obtain a basic mesh with relatively few points and faces, and keeps the shape of the original mesh as much as possible. After the mesh simplification operation, mesh parameterization, subdivision deformation, basic mesh compression and basic mesh reconstruction operations are performed in sequence, and the vertex displacement order of the reconstructed basic mesh is adjusted, and then the displacement is wavelet transformed 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 encoding end can select the first N of the quantized wavelet transform coefficients to obtain the target wavelet transform coefficients including the first N quantized wavelet transform coefficients, and the encoding end encodes the target wavelet transform coefficients to obtain a displacement code stream. Furthermore, when the encoding end performs encoding based on the VDMC method, 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 of the encoding end and improve the encoding efficiency of the encoding end.
[0094] 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:
[0095] 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.
[0096] In the embodiment of the present application, after the encoding end obtains the target wavelet transform coefficients including the first N quantized wavelet transform coefficients, the encoding end arranges the target wavelet transform coefficients into a two-dimensional image, and finally forms a YUV video, and encodes the YUV video through a video encoder to obtain a displacement code stream. In this way, the encoding end only needs to encode the first N quantized wavelet transform coefficients, thereby improving the encoding efficiency of the encoding end.
[0097] 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.
[0098] Optionally, after the encoding end encodes the target displacement data to obtain a displacement code stream, the method further includes:
[0099] 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;
[0100] The encoding end performs a zero padding operation on the target wavelet transform coefficient according to the number of mesh vertices after the reconstruction of the basic mesh subdivision, so as to obtain M quantized wavelet transform coefficients, the number of the quantized wavelet transform coefficients is the same as the number of mesh vertices after the reconstruction of the basic mesh subdivision, and the displacement data is characterized by the M quantized wavelet transform coefficients;
[0101] 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.
[0102] 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.
[0103] Optionally, when the encoding end obtains the quantized wavelet transform coefficients, the pixel points in the filled two-dimensional image are taken out in an arrangement manner. It can be considered that one pixel point corresponds to one target wavelet transform coefficient; the extracted pixel point data contains two values, one is the selected wavelet transform coefficient, that is, the target wavelet transform coefficient, and the other is the preset filling value in the two-dimensional arrangement process, which is pre-agreed by the encoding and decoding end. After obtaining the extracted pixel point data, the preset filling value in the pixel point data can be removed according to the preset filling, and then the target wavelet transform coefficient including N quantized wavelet transform coefficients is obtained. Afterwards, the selected target wavelet transform coefficient is 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, and then M quantized wavelet transform coefficients, that is, the displacement data, are obtained.
[0104] Furthermore, the M quantized wavelet transform coefficients (i.e., displacement data) are inversely quantized and inversely transformed to obtain a displacement vector consistent with the decoding end, i.e., a reconstructed geometric displacement vector, and the subdivided reconstructed basic grid is obtained according to the reconstructed geometric displacement vector (i.e., the M quantized wavelet transform coefficients) to obtain a grid after the subdivision and deformation of the reconstructed basic grid. The encoding end performs attribute map conversion and compression according to the grid after the subdivision and deformation of the reconstructed basic grid, the original three-dimensional grid to be encoded, and the original attribute map, so as to obtain an attribute map code stream, and the attribute map code stream is sent to the decoding end, so that the decoding end can decode the attribute map code stream.
[0105] 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 refer to the description in the subsequent embodiments.
[0106] It should be noted that, 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:
[0107] 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.
[0108] 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 selection position of the target wavelet transform coefficient, and sends the mark of the selection 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 selection 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 implementation, based on the mark corresponding to the selected position, it can be determined that the encoding end has truncated the quantized wavelet transform coefficient to obtain the target wavelet transform coefficient. 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.
[0109] The encoding method of the 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 the encoding efficiency.
[0110] Please refer to Figure 3 , Figure 3 1 is a flowchart of a method for decoding three-dimensional grid displacement information provided by an embodiment of the present application, and the method is applied to a decoding end. Figure 3 As shown, the method comprises the following steps:
[0111] Step 301: The decoding end obtains a displacement code stream.
[0112] It can be understood that after encoding to obtain the displacement code stream, the encoding end sends the displacement code stream to the decoding end.
[0113] Step 302: The decoding end decodes the displacement code stream to obtain target displacement data, where the target displacement data includes N displacement vectors.
[0114] It should be noted that after obtaining the displacement code stream, the decoding end decodes the displacement code stream according to the decoding method corresponding to the encoding end to obtain the target displacement data including N displacement vectors. For example, in the case where the encoding end encodes the displacement code stream by video encoding, the decoding end decodes the displacement code stream by video decoding; in the case where the encoding end encodes the displacement code stream by entropy encoding, the decoding end decodes the displacement code stream by entropy decoding; in the case where the encoding end encodes the displacement code stream by VDMC, the decoding end decodes the displacement code stream by VDMC.
[0115] 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.
[0116] 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 encoded 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 the decoded mesh is subdivided the same as the number of vertices of the mesh after the encoding end is subdivided, and then the decoding end can determine the number of vertices of the mesh after the decoded mesh is subdivided, and thus can determine the number of displacement vectors in the displacement data. Optionally, the number of vertices of the mesh after the decoded mesh is subdivided can be obtained in other modules of the dynamic mesh decoding framework. For example, the VDMC framework can obtain it by subdividing the decoded basic mesh.
[0117] In an embodiment of the present application, after acquiring 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, where N is less than M, that is, the target displacement data is a part of the displacement data. Then, the decoding end can 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 reduces and improves the transmission pressure between the encoding end and the decoding end.
[0118] Optionally, after the decoding end recovers the displacement data of M displacement vectors based on N displacement vectors in the target displacement data, the decoding end may 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.
[0119] 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:
[0120] The decoding end performs a zero-padding operation on the N displacement vectors to restore M displacement vectors.
[0121] 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 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.
[0122] Optionally, in the above method, the decoding end may decode the displacement code stream by video decoding, entropy decoding or VDMC; wherein, when the decoding end decodes the displacement code stream by 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.
[0123] It should be noted that the decoding process of the decoding end is opposite to the encoding process of 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.
[0124] Optionally, the decoding end decodes the displacement code stream to obtain target displacement data, including any one of the following:
[0125] 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 filling value to obtain target displacement data including N displacement vectors;
[0126] The decoding end decodes the displacement code stream by VDMC 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.
[0127] For example, when the decoding end decodes the displacement code stream by video decoding, the decoding end decodes to obtain a YUV image, and first extracts all pixel data 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, and the preset filling value is a value agreed upon between the encoder and the decoding end. After extracting the pixel data, the decoding end can remove the filling part in 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 then obtaining the target displacement data.
[0128] Alternatively, when the decoding end decodes the displacement code stream by VDMC, the decoding end decodes to obtain a two-dimensional image, and extracts all the pixels in the two-dimensional image. The pixel data also includes two parts of data, one is the N wavelet transform coefficients selected by the encoding end, and the other is the preset filling value when the encoding end performs the filling operation. The preset filling value is a value agreed upon between the encoding end and the decoding end. The decoding end can remove the filling part in the pixel data according to the preset filling value, thereby obtaining the N quantized wavelet transform coefficients selected by the encoding end, that is, the target displacement data.
[0129] Optionally, the method further comprises:
[0130] 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.
[0131] For example, after acquiring the displacement data, the encoding end determines the selected position of the target displacement data according to a preset threshold, and selects the first N displacement vectors of the displacement data based on the selected position, so as to obtain the target displacement data including the first N displacement vectors. In this case, the encoding end may send the mark of the selected position to the decoding end, and the decoding end may determine the position of the target displacement data in the displacement data based on the mark, that is, it can be determined that the target displacement data is obtained based on the first N displacement vectors of the displacement data, which is more helpful for the decoding end to obtain the target displacement data. For example, the decoding end can extract N pixel point data from the pixel point data in a targeted manner according to the mark to obtain the target displacement data.
[0132] Optionally, when the decoding end obtains the mark, if the decoding end decodes the displacement code stream by video decoding, the decoding end decodes the displacement code stream to obtain the target displacement data, which may include:
[0133] 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;
[0134] 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.
[0135] It can be understood that if the decoding end decodes based on the 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, 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 data length MN 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 (the number is equal to M), and then extract the pixel data according to 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 characterize the N displacement vectors in the target displacement data.
[0136] 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.
[0137] 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:
[0138] 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;
[0139] 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.
[0140] In the embodiment of the present application, if the decoding end performs decoding based on the VDMC method, the decoding end obtains the displacement code stream, and also obtains the mark of the selected position sent by the encoding end, the decoding end decodes the displacement code stream based on the VDMC method to obtain a two-dimensional image, and arranges the wavelet transform coefficients in the two-dimensional image according to the arrangement scheme of the encoding end, and extracts N wavelet transform coefficients from the two-dimensional image according to the arrangement scheme according to the selected position corresponding to the mark. For example, the first N wavelet transform coefficients, these first N wavelet transform coefficients are also the target displacement data. Further, the decoding end performs a zero padding operation at the end of the extracted target displacement data according to the number of vertices of the mesh after the decoding grid is subdivided, until the number of wavelet transform coefficients in the target displacement data is the same as the number of vertices, and then M quantized wavelet transform coefficients, that is, the displacement data, can be obtained. In this way, the decoding end can also extract the pixel point data purposefully based on the mark of the selected position obtained, so as to accurately obtain the target displacement data.
[0141] 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 mesh after the decoding grid is subdivided, thereby obtaining the displacement data.
[0142] 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.
[0143] Implementation method 1: video encoding and decoding based method
[0144] Encoding side:
[0145] When the video encoding method is selected as the displacement encoding method, the displacement encoding process is as follows Figure 4aAs shown. First, the encoder inputs the displacement data into the pre-processing module, which performs a series of pre-processing operations on the input original displacement data, such as transformation, quantization, etc.; then the pre-processed displacement data is input into the data selection module, which can find a 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 displacement data after the selection 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 selected position is encoded. At the same time, the selected position can be marked and transmitted to the decoding end. For example, the length n of the selected data can be used as the mark of the selected position for encoding and transmission; the length Nn (n≤N, N is the total number of displacement data) of the data after the selected position can also be used as the mark of the selected position for encoding and transmission; it can also be chosen not to mark the selected position, and only the displacement information needs to be filled in at the decoding end according to the number of vertices of 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. In the video arrangement process, in order to ensure that the resolution of each frame in the YUV video is the same and the pixel data can be arranged into a rectangle, the YUV video needs to be filled. The preset filling value of the video filling is an agreed value of the codec end. Further, the encoding end uses the video encoder to encode and obtain a displacement code stream.
[0146] Decoding side:
[0147] Depending on whether the encoder marks the selected position, there are different implementation methods for the displacement decoding solution based on video decoding. Next, two possible solutions will be described in detail.
[0148] (1) Implementation scheme without marking the selected position:
[0149] The displacement decoding flow chart of the unmarked selected position is as follows Figure 4bAs shown in the figure: the decoder decodes the acquired displacement code stream 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 arranges the displacement data into the video. The extracted pixel points contain two parts of data, one is the N displacement data selected by the encoder; the other is the preset filling value of the video filling of the encoder, which is a value agreed upon between the encoder and the decoder. After obtaining the pixel displacement data, the video filling part in the pixel data can be removed according to the preset filling value agreed upon with the encoder, so as to obtain the displacement data including N displacement vectors selected by the encoder. Then, the displacement data is padded with zeros according to the number of vertices after the decoded mesh is subdivided, until the displacement data is the same as the number of vertices of the mesh after the decoded mesh is subdivided, and then the restored complete displacement data can be obtained (the number of vertices of the mesh after the decoded mesh is subdivided can be obtained in other modules of the dynamic mesh decoding framework, such as the V-DMC framework can be obtained by subdividing the decoded basic mesh). Then, the restored complete displacement data is input into the post-processing module to obtain the original displacement data, and the displacement decoding is completed. 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.
[0150] (2) Implementation scheme for marking the selected position:
[0151] Figure 4c The figure is a flow chart of displacement decoding for marking the selected position. The decoder decodes the obtained displacement code stream based on the video decoding method. For the YUV video obtained by video decoding, the selected displacement data is first extracted according to the obtained selected position mark in the order in which the encoder arranges the displacement data into the video. For example, if the encoder uses the length n of the selected data as the mark of the selected position, when extracting the pixel data, it is only necessary to extract the first M pixel data in the image according to the arrangement order; if the encoder uses the data length MN (N≤M, M is the total number of displacement data) after the selected position as the mark of the selected position, it is necessary to first subtract (MN) from the number of vertices after the decoding grid subdivision (the number is equal to M) to obtain the length N of the selected data, and then extract the pixel data according to N. After obtaining the selected displacement data (that is, pixel data), the data end is padded with zeros according to the number of vertices of the mesh after the decoding grid subdivision until the number of data is the same as the number of vertices; then the padded complete displacement data is input into the post-processing module to obtain the original displacement data, and the displacement decoding is completed. 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.
[0152] Implementation method 2: Entropy-based encoding and decoding
[0153] Encoding side:
[0154] When entropy coding is selected as the displacement coding method, the displacement coding process is as follows Figure 5a As shown. 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 encoded. The specific entropy coding method is not limited here, for example, context-adaptive variable-length coding (Context-Adaptive Variablebe-Length Coding, CAVLC), context-adaptive binary coding (Context-Adaptive Binary Arithmatic Coding, CABAC), etc. can be used.
[0155] Decoding side:
[0156] Figure 5b This is a flow chart of displacement decoding based on entropy decoding. For the received displacement code stream, the decoding end first performs entropy decoding on the displacement code stream to obtain the selected displacement data, and then fills the end of the data with zeros according to the number of vertices of the mesh after the decoding mesh is subdivided, until the number of data is the same as the number of vertices (the number of vertices of the mesh after the decoding mesh is subdivided can be obtained in other modules of the dynamic mesh decoding framework, such as the V-DMC framework, which can be obtained by subdividing the decoded basic mesh); then the restored complete displacement data is input into the post-processing module to obtain the original displacement data, completing the decoding of the displacement. The operation of the post-processing module is the reverse implementation of the operation of the pre-processing module on the encoding end, such as inverse quantization and inverse transformation.
[0157] Implementation method 3: VDMC-based encoding and decoding method
[0158] Encoding side:
[0159] The application of the three-dimensional grid displacement information encoding method proposed in this application at the encoding end is as follows Figure 6a As shown, the following is a detailed description of the entire application process:
[0160] (1) Mesh simplification
[0161] Mesh simplification is to simplify the current input mesh to a basic mesh with relatively few points and faces, and keep the shape of the original mesh as much as possible. The key of mesh simplification is the simplification operation and the corresponding error measurement. A feasible mesh simplification operation is Figure 6b As shown in the figure, the vertices at both ends of the edge are merged into one vertex and the connection between the two vertices is deleted. This process is repeated in the entire mesh according to certain rules to reduce the number of faces and vertices of the mesh to the target value.
[0162] During the simplification process, you can select an error metric to optimize the simplified result. For example, you can select the sum of the coefficients of the equations of all adjacent faces of a vertex as the error metric of the vertex, and the error metric of the corresponding edge is the sum of the error metrics of the two vertices on the edge. In other words, the error generated by merging an edge is the sum of the distances of all adjacent planes from the merged vertex to the original two vertices of the edge.
[0163] After determining the simplification operation and the corresponding error metric, the mesh simplification process begins iteratively. First, the vertex error of the initial mesh is calculated to obtain the error of each edge. Then each edge is arranged from small to large error, and the edge with the smallest error is selected for merging each time. At the same time, the position of the merged vertex is calculated, and the error of all edges related to the merged vertex is updated. That is, the order of edge arrangement is updated to ensure that each iteration is based on the global error metric. Through iteration, the mesh faces are simplified to the number required to meet lossy coding.
[0164] (2) Mesh parameterization
[0165] 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. There are many ways to generate texture coordinates, including mesh parameterization. There are many algorithms for parameterizing meshes, such as the Isocharts algorithm, which uses spectral analysis to achieve stretch-driven 3D mesh parameterization, UV-unwrapping, slicing, and packing the 3D mesh into a 2D texture domain.
[0166] (3) Subdivision deformation
[0167] The subdivision deformation module is an optional module that can improve the quality of the mesh reconstructed at the decoding end. This module can be omitted when the quality of the basic mesh can meet the application requirements.
[0168] The subdivision deformation module is applied to the input 3D mesh to generate displacement vector information. Specifically, the input 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 "subdivided" curve. The subdivided polyline is then deformed to obtain a better approximation of the original curve. That is, a geometric displacement vector vector is calculated for each vertex of the subdivided mesh so that the shape of the subdivided curve is as close to the shape of the original curve as possible. These geometric displacement vector vectors are the geometric displacement vector information (vertex displacement) output by this module. The same deformation process is also applied to the attribute information corresponding to the vertex to obtain the corresponding attribute displacement vector.
[0169] (3) Basic mesh compression
[0170] The basic mesh compression module is used to compress the basic mesh information output by the subdivision deformation module. There are two main modes of basic mesh compression, namely intra-frame mode and inter-frame mode. In intra-frame mode, the input of the basic mesh compression module is a three-dimensional mesh, which contains geometric coordinates, connection relationships, and attribute information associated with vertices. In inter-frame mode, the input of the basic mesh compression module is the motion vector and its identifier as well as possible intra-frame sub-meshes. After encoding, the encoded mesh needs to be reconstructed so that it can be provided to subsequent modules for processing. The following is a brief introduction to the encoding of the two modes:
[0171] ①Intra-frame mode
[0172] The grid coding in intra mode can use the existing grid encoder to encode the input base grid, such as Draco, etc. The grid encoder type is encoded with auxiliary information and passed to the decoding end.
[0173] ②Inter-frame mode
[0174] In inter-frame mode, motion vectors and identifiers need to be encoded. The motion vector identifier is an array consisting of numbers greater than or equal to 0. The array size is the same as the number of vertices of the base grid of the reference frame corresponding to the temporal motion vector identifier. The array can be directly encoded using an existing entropy coding algorithm, such as CABAC.
[0175] (5) Reconstruct the base mesh
[0176] After the base grid is encoded, the base grid needs to be reconstructed. For a grid encoded in intra-frame mode, the encoded grid can be decoded to obtain a reconstructed grid.
[0177] 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.
[0178] (6) Encoding of vertex displacement
[0179] To encode vertex displacement, first adjust the order of vertex displacement according to the reconstructed basic mesh; then perform wavelet transform and quantization on the displacement to obtain quantized wavelet transform coefficients; then input the quantized wavelet transform coefficients into the data truncation module; then arrange the wavelet transform coefficients of the current frame into a two-dimensional image, and finally form a YUV video, which is encoded with the help of a video encoder to obtain the displacement code stream. Each process will be introduced in detail below:
[0180] ①Adjust the displacement order
[0181] The main function of this process is to adjust the order of vertex displacement according to the reconstructed base mesh. The detailed process is: first, the reconstructed base mesh is subdivided, and then the order of displacement is adjusted to be the same as the vertex order of the subdivided base mesh. There is also an optional step in this process, which is to convert the coordinate system of vertex displacement from the Cartesian coordinate system to the local coordinate system.
[0182] ② Wavelet transform
[0183] 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):
[0184]
[0185] 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 formula (2):
[0186]
[0187] Among them, v * is the set of all adjacent vertices of vertex v. The transformed displacement vector is called wavelet coefficient.
[0188] ③ Coefficient quantization
[0189] 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):
[0190] disp[v].d[k]=floor(disp[v].d[k]*scale[k])#(3)
[0191]
[0192] Where disp[v] represents the transformed value of the displacement vector of the vth vertex, d[k] represents the kth value of the displacement vector, and floor represents rounding down. bitDepthPosition represents the bit depth of the current mesh vertex geometry, and qp[k] represents the quantization parameter of the kth coefficient. As mentioned above, after the displacement vector is converted to a coordinate system, its normal component has a more significant effect on the quality than the tangential component, so a larger quantization parameter can be used for the tangential component.
[0193] 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):
[0194] scale[k]=scale[k]*lodScale[k]#(5)
[0195] Among them, lodScale[k] represents the coefficient of the quantization parameter of the current subdivision level.
[0196] ④Data selection
[0197] For the quantized wavelet transform coefficients, data selection operations need to be performed 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, and then the wavelet transform coefficients are 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 the auxiliary information and transmitted to the decoding end; or it can be chosen not to mark the selection position, and only the displacement information needs to be filled in at the decoding end according to the number of vertices after the decoding basic grid is subdivided.
[0198] ⑤ Two-dimensional arrangement
[0199] After data truncation, the data can be arranged on a two-dimensional image as follows:
[0200] (a) Traverse the wavelet coefficients in order from low frequency to high frequency;
[0201] (b) for each coefficient, determine the index of the NxM pixel block (e.g., N=M=16) in which it lies, where it should be stored in the raster scan order of the block;
[0202] (c) Calculate the position of the corresponding NxM pixel block on the image according to the Morton order.
[0203] The arrangement method is not limited here, and other arrangement schemes can also be used, such as zigzag order, raster order, etc. The encoder can explicitly specify the corresponding arrangement scheme in the bitstream. In order to ensure that the resolution of each frame of the generated YUV video is the same and the number of pixels can be arranged in a rectangle, the video padding operation is required. The preset padding value of the video padding is a known agreed value on the codec side.
[0204] ⑥Video Compression
[0205] After arranging the wavelet coefficients on a two-dimensional image, they can be directly encoded using a video encoder to obtain a displacement code stream.
[0206] (7) Reconstruction of deformed mesh
[0207] 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:
[0208] ① Unmarked selected location
[0209] For the case where the selected position is not marked, when obtaining the quantized wavelet transform coefficients, firstly, all the pixel data in the two-dimensional image are taken out 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 filling value of the video filling in the two-dimensional arrangement process. After obtaining the pixel data, the video filling part in the pixel data can be removed according to the preset filling value to obtain the quantized wavelet transform coefficient selected by the data selection module. Then, the selected quantized wavelet transform coefficients are filled with zeros according to the number of vertices after the reconstruction of the basic mesh subdivision, until the number of selected quantized wavelet transform coefficients is the same as the number of vertices after the reconstruction of the basic mesh subdivision, and the quantized wavelet transform coefficients can be obtained.
[0210] ②Mark the selected location
[0211] For the case where the selection position is marked, when obtaining the quantized wavelet transform coefficients, first, the selected data is 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.
[0212] 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 basic grid is obtained according to the corresponding geometric displacement vector to obtain the reconstructed subdivided deformed grid, which is passed to the attribute graph conversion module.
[0213] (8) Attribute Graph Conversion
[0214] The attribute map conversion module performs attribute map conversion based on the input original mesh, the input original attribute map, and the reconstructed deformed mesh.
[0215] The steps of property graph conversion are as follows:
[0216] 1. Calculate the texture coordinates of each pixel on the attribute map to be generated, such as the texture coordinates corresponding to pixel A(i,j) is P(u,v);
[0217] 2. Determine whether the texture coordinate is within a certain triangle face after the subdivision deformation mesh parameterization;
[0218] 3. If the texture coordinate does not belong to any triangle, the pixel is marked as an empty pixel, which can be filled with a filling algorithm later;
[0219] 4. If the texture coordinate belongs to a triangle, then
[0220] a. Mark the pixel as filled;
[0221] b. Calculate the center of gravity coordinates of the texture in the current triangle surface according to the texture coordinates;
[0222] c. According to 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 deformation grid corresponding to the texture coordinates.
[0223] d. Find the point on the input original grid that is closest to the three-dimensional coordinate.
[0224] e. Calculate the centroid coordinates of the three-dimensional coordinates according to the triangular face on which they are located and map them to two dimensions to calculate their texture coordinates.
[0225] f. Sample the input original attribute map through the texture coordinate to obtain the value of the corresponding pixel position.
[0226] Assign this value to the corresponding pixel on the attribute map to be generated.
[0227] (9) Attribute Graph Compression
[0228] 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, color space conversion and chroma subsampling operations can be selectively applied to enable video encoding to obtain better rate-distortion performance, 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.
[0229] (10) Auxiliary information
[0230] During the encoding process, there are some alternative schemes in each module, such as the type of grid encoder, the type of video encoder, the grid subdivision scheme, the spatial displacement vector transformation scheme, etc. The proposed framework allows the use of different schemes. Therefore, the selected scheme needs to be passed to the decoding end to guide the correct decoding.
[0231] The auxiliary information includes the type of static grid encoder, the type of video encoder, the grid subdivision scheme, the number of grid iterations, the geometric displacement vector transformation scheme, the coefficient arrangement scheme, the displacement truncation mark, the color conversion scheme, etc. For the grid part encoded using the inter-frame coding mode, it also includes the corresponding reference frame list, etc.
[0232] After all modules are encoded, the basic grid part bitstream, texture coordinate part bitstream, displacement vector video bitstream, attribute map video bitstream and auxiliary information bitstream are mixed to obtain the encoded bitstream finally output by the encoding end.
[0233] Decoding side:
[0234] The application of the three-dimensional grid displacement information decoding method proposed in this application at the decoding end is as follows Figure 6c As shown, the following is a detailed description of the entire application process:
[0235] (1) Auxiliary Information Decoding
[0236] The auxiliary information includes the type of static grid encoder, the type of video encoder, grid subdivision scheme, grid iteration number, geometric displacement vector transformation scheme, coefficient arrangement scheme, displacement truncation mark, and color conversion scheme, etc. For the grid part encoded in inter-frame coding mode, it also includes the corresponding reference frame list, etc. It can guide the decoder to perform correct decoding, and the information is represented by the corresponding syntax parameters after decoding.
[0237] (2) Basic grid decoding
[0238] The decoding of the base mesh can be divided into intra-frame mode and inter-frame mode. For the intra-frame mode, the module decodes the input base mesh code stream through the decoder corresponding to the static mesh encoder indicated by the auxiliary information. The decoded output is a three-dimensional mesh, which contains geometric information, connection relationship, texture coordinate information, etc. For the inter-frame mode, the module is responsible for decoding the motion vector corresponding to the vertex, and then reconstructing the base mesh of the current frame based on the reference frame.
[0239] (3) Segmentation
[0240] The subdivision module operation is the same as the encoding end subdivision operation, and the auxiliary information is used to indicate the number of subdivision iterations of different areas of the current basic grid.
[0241] (4) Displacement vector video decoding
[0242] The displacement vector video bitstream is decoded according to the video decoder type indicated in the auxiliary information. Note that this includes geometric displacement vector video and possible displacement vector video with different attributes.
[0243] (5) Displacement vector decoding
[0244] Depending on whether the data selection position is marked, there are two ways to decode the displacement vector:
[0245] ① Unmarked selected location
[0246] For the case where the selected position is not marked, when obtaining the quantized wavelet transform coefficient, firstly, all the pixel data in the two-dimensional image are taken out 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 of the encoding end; the other is the preset filling value of the video filling in the two-dimensional arrangement process of the encoding end, which is a value agreed upon between the encoding end and the decoding end. After obtaining the pixel data, the video filling part in the pixel data can be removed according to the preset filling value agreed upon with the encoding end, and the quantized wavelet transform coefficient selected by the data selection module of the encoding end is obtained. Then, the selected quantized wavelet transform coefficient is padded with zeros according to the number of vertices after the reconstruction of the basic mesh subdivision, until the number of selected quantized wavelet transform coefficients is the same as the number of vertices after the reconstruction of the basic mesh subdivision, and the quantized wavelet transform coefficient can be obtained. Then, the quantized wavelet transform coefficient is dequantized, detransformed, and other operations are performed on the quantized wavelet transform coefficient to restore the corresponding displacement vector.
[0247] ②Mark the selected location
[0248] For the case where the selected position is marked, when obtaining the quantized wavelet transform coefficients, firstly, the selected data is taken out from the two-dimensional image according to the arrangement scheme based on the marked selected position; then, zero padding 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. Then, the quantized wavelet transform coefficients are dequantized, de-transformed, and other operations are performed to restore the corresponding displacement vector.
[0249] (6) Reconstruct the deformed mesh
[0250] After the base mesh and displacement vector are decoded and reconstructed, the deformed mesh is reconstructed based on the two parts. The corresponding displacement vector is added to each vertex of the subdivided mesh, as shown in formula (6):
[0251] deformedmesh[i].v[k]=subdivmesh[i].v[k]+displacement[k]#(6)
[0252] Among them, subdivmesh[i].v[k] is the geometric coordinates of the kth vertex after the base mesh is subdivided in the current frame (index is i), displacement[k] is the spatial displacement vector corresponding to the kth vertex, and deformedmesh[i].v[k] is the geometric coordinates of the kth vertex after subdivision and deformation in the current frame.
[0253] The attribute displacement vector is applied to the corresponding attribute value in the same way, taking texture coordinates as an example, as shown in equation (7).
[0254] deformedmesh[i].vt[k]=subdivmesh[i].vt[k]+attdisplacement[k]#(7)
[0255] Among them, subdivmesh[i].vt[k] represents the k-th texture coordinate after the base mesh is subdivided in the current frame, 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 subdivision and deformation in the current frame.
[0256] (7) Attribute Graph Decoding
[0257] The attribute map decoder is responsible for decoding the attribute map bitstream. The attribute map is decoded using the video decoder indicated in the auxiliary information. The optional color space conversion is performed to obtain an image format consistent with the input attribute map of the encoder, and the attribute map of the final decoded output is obtained. For multiple attribute map bitstreams, after decoding, each attribute map is matched with the corresponding texture coordinates according to the identifier.
[0258] After each module is processed, the deformed mesh and the corresponding attribute map reconstructed by the decoder are finally obtained. Subsequent applications use the reconstructed deformed mesh and attribute map as input for processing.
[0259] The 3D grid displacement information encoding method provided in the embodiment of the present application can be executed by a 3D grid displacement information encoding device. In the embodiment of the present application, the 3D grid displacement information encoding method is executed by a 3D grid displacement information encoding device as an example to illustrate the 3D grid displacement information encoding device provided in the embodiment of the present application.
[0260] Please refer to Figure 7 , the embodiment of the present application also provides a three-dimensional grid displacement information encoding device, such as Figure 7 As shown, the three-dimensional grid displacement information encoding device 700 includes:
[0261] A first acquisition module 701 is used to acquire displacement data of a three-dimensional grid to be encoded, wherein the displacement data includes M displacement vectors;
[0262] A second acquisition module 702 is used to acquire 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;
[0263] The encoding module 703 is used to encode the target displacement data to obtain a displacement code stream.
[0264] Optionally, the second obtaining module 702 is further used for:
[0265] Determining a selection position of the target displacement data according to a preset threshold;
[0266] According to the selected position, N displacement vectors among the M displacement vectors are acquired to obtain target displacement data including the N displacement vectors.
[0267] Optionally, a 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 N displacement vectors.
[0268] Optionally, the device further comprises:
[0269] The sending module is used to determine the mark of the selected position and send the mark to the decoding end.
[0270] Optionally, the mark is related to the value of N.
[0271] Optionally, the N displacement vectors are first N displacement vectors among the M displacement vectors.
[0272] Optionally, the encoding module 703 is further configured to perform any one of the following:
[0273] Arranging the target displacement data into a YUV image according to a preset rule, performing a filling operation on the YUV image arranged with the target displacement data based on a preset filling value, and encoding the filled YUV image through a video encoder to obtain a displacement code stream;
[0274] The target displacement data is entropy encoded to obtain a displacement code stream.
[0275] Optionally, when the device is encoded by 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.
[0276] Optionally, the encoding module 703 is further used for:
[0277] 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.
[0278] Optionally, the device further includes an execution module, configured to:
[0279] Taking out pixel point data from the filled two-dimensional image to obtain pixel point data, and performing a removal operation on the pixel point data according to the preset filling value to obtain the target wavelet transform coefficient;
[0280] According to the number of mesh vertices after the reconstruction of the basic mesh, the target wavelet transform coefficient is padded with zeros 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 basic mesh, and the displacement data is characterized by the M quantized wavelet transform coefficients;
[0281] Attribute map conversion and compression are performed according to the grid after the subdivision of the reconstructed basic grid, the three-dimensional grid to be encoded and the original attribute map to obtain an attribute map code stream.
[0282] 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 used to:
[0283] The selected position is determined according to the mark, and pixel point data is taken out from the filled two-dimensional image according to the selected position to obtain the target wavelet transform coefficient.
[0284] 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 some 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.
[0285] The three-dimensional grid displacement information encoding device in the embodiment 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 a chip. The electronic device can be a terminal, or it can be other devices other than a terminal. Exemplarily, the terminal can include but is not limited to the types of terminals listed above, and other devices can be servers, network attached storage (Network Attached Storage, NAS), etc., which are not specifically limited in the embodiment of the present application.
[0286] 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.
[0287] The 3D grid displacement information decoding method provided in the embodiment of the present application can be executed by a 3D grid displacement information decoding device. In the embodiment of the present application, the 3D grid displacement information decoding method performed by the 3D grid displacement information decoding device is taken as an example to illustrate the 3D grid displacement information decoding device provided in the embodiment of the present application.
[0288] Please refer to Figure 8 The present application also provides a three-dimensional grid displacement information decoding device, such as Figure 8 As shown, the three-dimensional grid displacement information decoding device 800 includes:
[0289] The third acquisition module 801 is used to acquire a displacement code stream;
[0290] A decoding module 802 is used to decode the displacement code stream to obtain target displacement data, wherein the target displacement data includes N displacement vectors;
[0291] The recovery module 803 is used 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.
[0292] 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 for:
[0293] A zero padding operation is performed on the N displacement vectors to restore M displacement vectors.
[0294] Optionally, the device decodes the displacement code stream by a video decoding method or a VDMC method;
[0295] Wherein, when the device decodes the displacement code stream by VDMC method, the displacement vector is characterized by the quantized wavelet transform coefficient, the target displacement data is characterized by the target wavelet transform coefficient, and the target wavelet transform coefficient includes N quantized wavelet transform coefficients.
[0296] Optionally, the decoding module 802 is further configured to perform any one of the following:
[0297] Decoding the displacement code stream in a video decoding manner to obtain a YUV image, extracting pixel point data in the YUV image, and performing a removal operation on the pixel point data based on a preset filling value to obtain target displacement data including N displacement vectors;
[0298] 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.
[0299] Optionally, the device further comprises:
[0300] 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.
[0301] Optionally, when the device decodes the displacement code stream by video decoding, the decoding module 802 is further used for:
[0302] Decoding the displacement code stream to obtain a YUV image, and extracting N pixel point data from the YUV image according to the mark;
[0303] 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.
[0304] Optionally, when the device decodes the displacement code stream in a VDMC manner, the decoding module 802 is further configured to:
[0305] Decoding the displacement code stream to obtain a two-dimensional image, and extracting N wavelet transform coefficients from the two-dimensional image according to the mark;
[0306] The target displacement data is obtained according to the N wavelet transform coefficients, and the N displacement vectors in the target displacement data are characterized by the N wavelet transform coefficients.
[0307] The three-dimensional grid displacement information decoding device in the embodiment 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 a chip. The electronic device can be a terminal, or it can be other devices other than a terminal. Exemplarily, the terminal can include but is not limited to the types of terminals listed above, and other devices can be servers, network attached storage (Network Attached Storage, NAS), etc., which are not specifically limited in the embodiment of the present application.
[0308] The three-dimensional grid displacement information decoding device provided in the embodiment of the present application can implement each process 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.
[0309] like Fig. 9 As shown, the embodiment of the present application further provides an electronic device 900, including a processor 901 and a memory 902, and the memory 902 stores a program or instruction that can be run on the processor 901. For example, when the electronic device 900 is an encoding end, the program or instruction is executed by the processor 901 to implement the various steps of the above-mentioned three-dimensional grid displacement information encoding method embodiment, and can achieve the same technical effect. When the electronic device 900 is a decoding end, the program or instruction is executed by the processor 901 to implement the various steps of the above-mentioned three-dimensional grid displacement information decoding method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0310] The embodiment of the present application also provides a terminal, including 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 following Figure 2 Or the steps in the method embodiment shown in 3. This terminal embodiment corresponds to the above method embodiment, and each implementation process and implementation method of the above method embodiment can be applied to this terminal embodiment and can achieve the same technical effect. Specifically, Fig.10 A schematic diagram of the hardware structure of a terminal for implementing an embodiment of the present application.
[0311] 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 a processor 1010.
[0312] Those skilled in the art will appreciate that the terminal 1000 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to the processor 1010 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig.10 The terminal structure shown in the figure does not constitute a limitation on the terminal. The terminal may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0313] It should be understood that in the 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 the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the 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 a joystick, which will not be repeated here.
[0314] In the embodiment of the present application, after receiving downlink data from the network side device, the RF unit 1001 can transmit the data to the processor 1010 for processing; in addition, the RF unit 1001 can send uplink data to the network side device. Generally, the RF unit 1001 includes but is not limited to an antenna, an amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, etc.
[0315] 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, an application program or instruction required for at least one function (such as a sound playback function, an image playback function, etc.), 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.
[0316] The processor 1010 may include one or more processing units; optionally, the processor 1010 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 1010.
[0317] Wherein, when the terminal 1000 is a coding end, the processor 1010 is configured to:
[0318] Acquire displacement data of a three-dimensional grid to be encoded, wherein the displacement data includes M displacement vectors;
[0319] 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;
[0320] The target displacement data is encoded to obtain a displacement code stream.
[0321] Alternatively, when the terminal 1000 is a decoding end, the processor 1010 is configured to:
[0322] Get the displacement code stream;
[0323] Decoding the displacement code stream to obtain target displacement data, wherein the target displacement data includes N displacement vectors;
[0324] 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.
[0325] 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.
[0326] 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 effect. To avoid repetition, it will not be repeated here.
[0327] 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.
[0328] 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-transient readable storage medium.
[0329] 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.
[0330] 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.
[0331] The embodiments of the present application further provide 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.
[0332] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including 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 one..." does not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the method and device in the embodiment 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 reverse 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.
[0333] Through the description of the above implementation methods, 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 hardware platform, and of course, can also be implemented by hardware. The computer software product is stored in a storage medium (such as ROM, RAM, disk, CD, etc.), including several instructions to enable a terminal or a network-side device to execute the methods described in each embodiment of the present application.
[0334] 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 the present application, ordinary technicians in this field can also make many forms of implementation methods without departing from the purpose of the present application and the scope of protection of the claims, and these implementation methods are all within the protection of the present application.
Claims
1. A method for encoding displacement information of a three-dimensional grid, characterized in that: include: 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, characterized in that 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, characterized in that 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, characterized in that: 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, characterized in that The tag is related to the value of N.
6. The method according to any one of claims 1 to 5, characterized in that 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, characterized in that 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, characterized in that: 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, characterized in that 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, characterized in that 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, characterized in that 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, characterized in that: include: 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, characterized in that 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, characterized in that 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 characterized by the quantized wavelet transform coefficient, the target displacement data is characterized 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, characterized in that 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 filling value to obtain target displacement data including N displacement vectors; The decoding end decodes the displacement code stream by VDMC 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.
16. The method according to claim 12, characterized in that 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, characterized in that 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, characterized in that 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, characterized in that: include: 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, characterized in that: include: 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, characterized in that: The method comprises 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 as described in any one of claims 1 to 11 are implemented, or the steps of the three-dimensional mesh displacement information decoding method as described in any one of claims 12 to 18 are implemented.
22. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the three-dimensional mesh displacement information encoding method as described in any one of claims 1-11 are implemented, or the steps of the three-dimensional mesh displacement information decoding method as described in any one of claims 12-18 are implemented.
