WO2023197990A1 - 编码方法、解码方法及终端 - Google Patents

编码方法、解码方法及终端 Download PDF

Info

Publication number
WO2023197990A1
WO2023197990A1 PCT/CN2023/087281 CN2023087281W WO2023197990A1 WO 2023197990 A1 WO2023197990 A1 WO 2023197990A1 CN 2023087281 W CN2023087281 W CN 2023087281W WO 2023197990 A1 WO2023197990 A1 WO 2023197990A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
target
encoding
code stream
dimensional grid
Prior art date
Application number
PCT/CN2023/087281
Other languages
English (en)
French (fr)
Inventor
邹文杰
张伟
杨付正
吕卓逸
Original Assignee
维沃移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 维沃移动通信有限公司 filed Critical 维沃移动通信有限公司
Publication of WO2023197990A1 publication Critical patent/WO2023197990A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/20Finite element generation, e.g. wire-frame surface description, tesselation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/20Finite element generation, e.g. wire-frame surface description, tesselation
    • G06T17/205Re-meshing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding

Definitions

  • This application belongs to the field of coding and decoding technology, and specifically relates to an encoding method, a decoding method and a terminal.
  • Three-dimensional mesh can be considered the most popular representation method of three-dimensional models in the past many years, and it plays an important role in many applications. Its expression is simple, so it is widely integrated into the graphics processing units of computers, tablets and smartphones with hardware algorithms, specifically used to render three-dimensional meshes.
  • the most important information in a three-dimensional mesh is geometric information, because it describes the shape of a three-dimensional object.
  • video-based point cloud compression standards can be used for compression.
  • the model does not need to be restored to the original accuracy, so lossy compression is mostly used.
  • the texture map also needs to be compressed.
  • Embodiments of the present application provide an encoding method, a decoding method, and a terminal, which can solve the problem that encoding and decoding may fail easily when geometric information is subjected to lossy compression.
  • the first aspect provides an encoding method, which includes:
  • the encoding end encodes the first information corresponding to the target three-dimensional grid to obtain the first code stream; the first information is determined based on the geometric information corresponding to the target three-dimensional grid;
  • the encoding end determines the second code stream based on the connection information corresponding to the first reconstructed grid, and the first reconstructed grid is determined based on the first information and the target three-dimensional grid;
  • the encoding end determines the third code stream according to the target information and the attribute encoding method.
  • the target information includes the attribute information corresponding to the first reconstructed grid, or includes the target three-dimensional grid and the corresponding target three-dimensional grid.
  • the encoding end generates a target code stream based on the first code stream, the second code stream and the third code stream.
  • the second aspect provides a decoding method, including:
  • the decoding end decomposes the acquired target code stream to obtain the first information, decoding information, attribute encoding method and third code stream;
  • the decoding end obtains geometric information corresponding to the target three-dimensional grid based on the first information
  • the decoding end determines the connection information corresponding to the target three-dimensional grid based on the decoding information
  • the decoding end determines the attribute information corresponding to the target three-dimensional grid according to the third code stream and the attribute encoding method.
  • an encoding device including:
  • An encoding module configured to encode the first information corresponding to the target three-dimensional grid and obtain the first code stream; the first information is determined based on the geometric information corresponding to the target three-dimensional grid;
  • a first determination module configured to determine the second code stream according to the connection information corresponding to the first reconstruction grid, which is determined based on the first information and the target three-dimensional grid;
  • the second determination module is used to determine the third code stream according to the target information and the attribute encoding method.
  • the target information includes the attribute information corresponding to the first reconstructed grid, or includes the target three-dimensional grid and the target three-dimensional grid.
  • Generating module configured to generate based on the first code stream, the second code stream and the third code stream. into the target code stream.
  • a decoding device including:
  • the decomposition module is used to decompose the acquired target code stream to obtain the first information, decoding information, attribute encoding method and third code stream;
  • An acquisition module configured to acquire geometric information corresponding to the target three-dimensional grid according to the first information
  • a third determination module configured to determine the connection information corresponding to the target three-dimensional grid according to the decoding information
  • the fourth determination module is used to determine the attribute information corresponding to the target three-dimensional grid according to the third code stream and the attribute encoding method.
  • a terminal in a fifth aspect, includes a processor and a memory.
  • the memory stores programs or instructions that can be run on the processor.
  • the program or instructions are executed by the processor, the following implementations are implemented: The steps of the method described in one aspect, or the steps of implementing the method described in the second aspect.
  • a readable storage medium is provided. Programs or instructions are stored on the readable storage medium. When the programs or instructions are executed by a processor, the steps of the method described in the first aspect are implemented, or the steps of the method are implemented as described in the first aspect. The steps of the method described in the second aspect.
  • a chip in a seventh aspect, includes a processor and a communication interface.
  • the communication interface is coupled to the processor.
  • the processor is used to run programs or instructions to implement the method described in the first aspect. , or implement the method described in the second aspect.
  • a computer program/program product is provided, the computer program/program product is stored in a storage medium, and the computer program/program product is executed by at least one processor to implement the method described in the first aspect The steps of a method, or steps of implementing a method as described in the second aspect.
  • the first information corresponding to the target three-dimensional grid is encoded to obtain the first code stream; the second code stream is determined according to the connection information corresponding to the first reconstructed grid, where the first reconstructed grid.
  • the third code stream is determined based on the first information and the target three-dimensional grid; the third code stream is determined based on the target information and the attribute encoding method, where the target information includes attribute information corresponding to the first reconstructed grid, or includes the target three-dimensional grid and the target three-dimensional grid.
  • the corresponding target texture map is then generated based on the first code stream, the second code stream and the third code stream.
  • the attribute information corresponding to the first reconstructed grid is encoded according to the attribute encoding method to obtain the third code stream; or, according to the attribute
  • the encoding method uses the target three-dimensional grid and the target texture map to obtain the third code stream. In this way, after lossy compression of the geometric information of the target three-dimensional grid, the attribute information code stream can be obtained through the above method to avoid encoding failure. .
  • Figure 1 is a flow chart of the encoding method provided by the embodiment of the present application.
  • Figure 2 is a schematic diagram of the process of merging vertices in mesh simplification
  • Figure 3 is a schematic diagram of the fine division process based on grid
  • Figure 4 is a schematic diagram of the eight directions of patch arrangement
  • Figure 5 is a schematic diagram of the encoding process of high-precision geometric information
  • Figure 6 is a schematic diagram of the original patch
  • Figure 7 is one of the schematic diagrams of encoding connectivity relationships in the embodiment of the present application.
  • Figure 8 is the second schematic diagram of the coding connectivity relationship in the embodiment of the present application.
  • Figure 9 is a schematic diagram of attribute information encoding in an embodiment of the present application.
  • Figure 10(a) is an image representing the target three-dimensional grid in the embodiment of the present application.
  • Figure 10(b) is a rendering of the target texture map in the embodiment of the present application.
  • Figure 10(c) is a rendering of the reconstructed texture map in the embodiment of the present application.
  • Figure 11 is a flow chart of the decoding method provided by the embodiment of the present application.
  • Figure 12 is a block diagram of geometric information reconstruction
  • Figure 13 is a structural diagram of an encoding device provided by an embodiment of the present application.
  • Figure 14 is a structural diagram of a decoding device provided by an embodiment of the present application.
  • Figure 15 is a structural diagram of a communication device provided by an embodiment of the present application.
  • Figure 16 is a schematic diagram of the hardware structure of a terminal provided by an embodiment of the present application.
  • first, second, etc. in the description and claims of this application are used to distinguish similar objects and are not used to describe a specific order or sequence. It is to be understood that the terms so used are interchangeable under appropriate circumstances so that the embodiments of the present application can be practiced in sequences other than those illustrated or described herein, and that "first" and “second” are distinguished objects It is usually one type, and the number of objects is not limited.
  • the first object can be one or multiple.
  • “and/or” in the description and claims indicates at least one of the connected objects, and the character “/" generally indicates that the related objects are in an "or” relationship.
  • the predictive coding device corresponding to the predictive coding method and the predictive decoding device corresponding to the predictive decoding method in the embodiment of the present application can both be a terminal.
  • the terminal can also be called a terminal device or a user terminal (User Equipment, UE).
  • the terminal can be a mobile phone.
  • wearable devices include: smart watches, smart bracelets, smart headphones, smart glasses, smart jewelry (smart bracelets, smart bracelets, smart rings, smart necklaces, smart anklets, smart anklets, etc.) , smart wristbands, smart clothing, etc. It should be noted that the embodiments of this application do not limit the specific type of
  • Figure 1 is a flow chart of the encoding method provided by this application.
  • the encoding method provided in this embodiment includes the following steps:
  • the encoding end encodes the first information corresponding to the target three-dimensional grid and obtains the first code stream.
  • the above-mentioned target three-dimensional grid can be a three-dimensional grid corresponding to any video frame.
  • the target three-dimensional grid can be determined based on the geometric information corresponding to the target three-dimensional grid.
  • the corresponding first information is then encoded to obtain the first code stream.
  • the encoding end determines the second code stream based on the connection information corresponding to the first reconstructed grid.
  • the encoding end can perform geometric reconstruction based on the encoding information of the first information.
  • the geometric reconstruction here refers to the acquisition of three-dimensional coordinates through encoded information.
  • the encoding end performs grid reconstruction based on the reconstructed geometric information and the target three-dimensional grid to obtain the first reconstructed grid; and obtains the connection information corresponding to the first reconstructed grid based on the first reconstructed grid.
  • the above connection information represents the connection relationship between vertices in the grid.
  • connection information is relatively accurate.
  • the encoding end after obtaining the first reconstructed grid, the encoding end obtains the connection information of the first reconstructed grid, and then encodes the connection information to obtain the code stream corresponding to the connection information, that is, the second code stream .
  • the encoding end determines the third code stream according to the target information and attribute encoding method.
  • the status identifier in subsequent embodiments can be used to characterize the attribute encoding method.
  • the above target information includes attribute information corresponding to the first reconstructed mesh, or includes the target three-dimensional mesh and the target texture map corresponding to the target three-dimensional mesh.
  • An optional implementation method is to obtain the attribute information corresponding to the first reconstructed mesh after obtaining the first reconstructed mesh, and the encoding end encodes the attribute information to obtain the code stream corresponding to the attribute information, that is, the third code stream.
  • the above attribute information includes but is not limited to grid UV coordinate attributes and texture maps.
  • Another optional implementation method is to use the target three-dimensional grid and the target texture map corresponding to the target three-dimensional grid to generate reconstructed texture coordinate information and reconstructed texture map, and encode the above-mentioned reconstructed texture coordinate information and reconstructed texture map. Obtain the code stream corresponding to the attribute information, that is, the third code stream.
  • Another optional implementation method is to use the target three-dimensional grid to generate reconstructed texture coordinate information, use the above-mentioned reconstructed texture coordinate information, the target three-dimensional grid, and the target texture map corresponding to the target three-dimensional grid to generate a reconstructed texture map, and perform the above reconstruction
  • the code stream corresponding to the attribute information can be obtained, that is, the third code stream.
  • S104 The encoding end generates a target code stream based on the first code stream, the second code stream, and the third code stream.
  • the first code stream, the second code stream and the third code stream are mixed to generate a target code stream.
  • the first information corresponding to the target three-dimensional grid is encoded to obtain the first code stream; the second code stream is determined according to the connection information corresponding to the first reconstructed grid, where the first reconstructed grid Determine based on the first information and the target three-dimensional grid; determine the third code stream according to the target information and the attribute encoding method, where the target information includes attribute information corresponding to the first reconstructed grid, or includes the target three-dimensional grid and the target three-dimensional network
  • the target texture map corresponding to the grid is generated; and then the target code stream is generated based on the first code stream, the second code stream and the third code stream.
  • the attribute information corresponding to the first reconstructed grid is encoded according to the attribute encoding method to obtain the third code stream; or according to the attribute encoding method, the target three-dimensional grid and the target texture map are used to obtain the third code stream.
  • Code stream with this, after lossy compression of the geometric information of the target three-dimensional mesh, the attribute information code stream can be obtained through the above method to avoid encoding failure.
  • the method before encoding the first information corresponding to the target three-dimensional grid, the method includes:
  • the three-dimensional grid to be encoded is simplified to obtain the target three-dimensional grid
  • the three-dimensional grid to be encoded is determined as the target three-dimensional grid.
  • the three-dimensional grid to be encoded is simplified, and the simplified three-dimensional grid is determined as the target three-dimensional grid.
  • the three-dimensional grid to be encoded can be directly determined as the target three-dimensional grid.
  • the three-dimensional grid to be encoded is simplified to obtain the target three-dimensional grid including:
  • the encoding end simplifies the three-dimensional grid to be encoded based on the quantization parameters to obtain the target three-dimensional grid.
  • the quantitative parameters mentioned in this application mainly include the X-direction, Y-direction and Z-direction. Quantization parameters on components.
  • simplifying the target three-dimensional grid to obtain the target three-dimensional grid includes:
  • the position coordinates of at least part of the vertices in the three-dimensional mesh to be encoded are adjusted to multiples of the quantization parameters to obtain the target 3D grid.
  • the multiple can be any value that meets the requirements, thereby ensuring that no quantization is required during inverse quantization.
  • the additional information can restore the original position of the vertex, which will reduce the amount of data consumed by high-precision geometric information.
  • the grid simplification operation is first performed.
  • the focus of mesh simplification lies in the simplified operations and the corresponding error measures.
  • the mesh simplification operation here can be edge-based simplification. As shown in Figure 2, the number of patches and vertices can be reduced by merging two vertices of an edge.
  • the mesh can also be simplified through point-based mesh simplification methods.
  • the mesh simplification process it is necessary to define a simplified error measure.
  • the sum of the equation coefficients of all adjacent faces of a vertex can be selected as the error measure of the vertex, and the error measure of the corresponding edge is the sum of the error measures of the two vertices on the edge.
  • the mesh can be divided into one or more local meshes, and the vertex error of the initial mesh in the slice is first calculated to obtain the error of each edge. Then all the edges in the piece are arranged according to a certain rule according to the error, such as from small to large.
  • Each simplification can merge edges according to certain rules, such as selecting the edge with the smallest error for merging.
  • the merged vertex position is calculated and the errors of all edges related to the merged vertex are updated, and the order of edge arrangement is updated. Iteratively simplify the mesh's faces to some desired number.
  • the specific process includes:
  • the vertex error can be defined as the sum of the coefficients of the equations of all adjacent faces of the vertex. For example, each adjacent face defines a plane, which can be expressed by Formula 1:
  • D is the distance from any vertex to the plane
  • n is the unit normal vector of the plane
  • v is the position vector of the vertex
  • Q is the vertex error
  • A, b, c are the coefficients representing the corresponding symbols in Formula 1.
  • Q(v) is the vertex error
  • v is the corresponding vertex
  • Q 1 (v) is the equation of v's adjacent plane 1
  • Q 2 (v) is the equation of v's adjacent plane 2
  • a 1 , A 2 , b 1 , b 2 , c 1 , c 2 are their corresponding coefficients.
  • the corresponding plane error equation can be added to Formula 4.
  • a major step in the process of merging vertices is determining the location of the merged vertices.
  • the vertex position can be selected to make the error as small as possible. For example, by taking the partial derivative of formula 3, we can get formula 4:
  • the connection relationship between the vertices needs to be updated. For example, during the process of merging vertices, it is possible to determine that the merged vertex corresponds to the two vertices before merging. You only need to replace all the indexes of the two vertices before merging that appear in the face with the index of the merged vertex, and then delete the face with duplicate indexes to achieve the purpose of updating the connection relationship.
  • the three-dimensional grid may also carry attribute information, and the attribute information may also need to be simplified.
  • attribute information such as texture coordinates, colors, normal vectors, etc.
  • the vertex coordinates can be extended to higher dimensions to calculate the vertex error with attribute information.
  • the vertex coordinates are (x, y, z) and the texture coordinates are (u, v)
  • the expanded vertices are (x, y, z, u, v).
  • T (p, q, r).
  • e 1 and e 2 are two vectors on the plane where T is located, q is, e 2 is, where " ⁇ " represents the dot product of the vectors, which defines a coordinate axis on the high-dimensional plane, with p as the origin.
  • the edge part of an image can attract people's attention more, thus affecting people's evaluation of the quality of the image.
  • the same is true for three-dimensional meshes. People tend to notice the boundaries more easily. Therefore, whether boundaries are maintained is also a factor that affects the quality of mesh simplification.
  • the boundaries of the mesh are generally the boundaries of geometric shapes and textures. When an edge belongs to only one face, the edge is a geometric boundary. When the same vertex has two or more texture coordinates, the vertex is the boundary of the texture coordinates. None of the above boundaries should be merged during mesh simplification. Therefore, during each simplification, you can first determine whether the vertex on the edge is a boundary point. If it is a boundary point, skip it and proceed directly to the next iteration.
  • encoding the first information corresponding to the target three-dimensional grid and obtaining the first code stream includes:
  • the encoding end quantifies the geometric information of the target three-dimensional grid to obtain the first information
  • the encoding end encodes the first information to obtain a first code stream.
  • the above geometric information can be understood as the coordinates of the vertices in the target three-dimensional grid, and these coordinates usually refer to three-dimensional coordinates.
  • the above-mentioned first information includes at least one of the following:
  • the first precision geometric information can be understood as low-precision geometric information, that is, the low-precision geometric information refers to the quantized geometric information of the target three-dimensional grid, that is, the three-dimensional coordinates of each vertex included in the quantized target three-dimensional grid. coordinate information.
  • the second precision geometric information can be understood as high-precision geometric information, and the high-precision geometric information can be regarded as geometric information lost in the quantization process, that is, lost three-dimensional coordinate information.
  • the information of supplementary points refers to the information of points that require additional processing generated during the quantification process. That is to say, the supplementary points are points that require additional processing generated during the quantification process. For example, the coordinate positions overlap. Repeating points, etc., can be restored to their original positions after inverse quantization by processing the repeating points.
  • the supplementary point information includes at least one of the following:
  • the low-precision geometric information of the supplementary points can be determined through the index of the vertices.
  • the third-precision geometric information can be understood as low-precision geometric information of the supplementary points, that is, the quantized three-dimensional coordinate information of the supplementary points.
  • the fourth precision geometric information can be understood as the high-precision geometric information of the supplementary point, that is, the three-dimensional coordinate information of the supplementary point that is lost during the quantization process.
  • the hidden points after quantization can be determined through A131 and A133 or A132 and A133.
  • the first information can be encoded, and the encoded code stream is determined as the first code stream.
  • the quantizing the geometric information of the target three-dimensional grid to obtain the first information includes:
  • the encoding end quantizes each vertex in the target three-dimensional grid according to the quantization parameter of each component to obtain first precision geometric information.
  • the quantization parameters of each component can be flexibly set according to usage requirements; the quantization parameters mainly include quantization parameters on the three components of X, Y and Z.
  • quantizing the geometric information of the target three-dimensional grid to obtain the first information includes:
  • the encoding end obtains second precision geometric information based on the first precision geometric information and the quantization parameter of each component.
  • the f 1 function in Formula 14 to Formula 16 is a quantization function.
  • the input of the quantization function is the coordinate of a certain dimension and the quantization parameter of that dimension, and the output is the quantized coordinate value;
  • Formula 17 to Formula 19 The input of the f 2 function in is the original coordinate value, the quantized coordinate value and the quantized parameter of this dimension, and the output is a high-precision coordinate value.
  • the f 1 function can be calculated in many ways.
  • a more common calculation method is as shown in Formula 20 to Formula 22. It is calculated by dividing the original coordinates of each dimension by the quantized parameter of that dimension. Among them, / is the division operator, and the result of the division operation can be rounded in different ways, such as rounding, rounding down, rounding up, etc.
  • the implementation methods corresponding to Formula 20 to Formula 22 are as shown in Formula 23 to Formula 25, where * is the multiplication operator.
  • the f 1 function and f 2 function can be implemented using bit operations, such as Formula 26 to Formula 31:
  • the quantization parameters QP x , QP y and QP z can be set flexibly.
  • the quantization parameters of different components are not necessarily equal. You can use the correlation of the quantization parameters of different components to establish the relationship between QP x , QP y and QP z , and set different quantization parameters for different components; secondly, different spaces
  • the quantization parameters of the regions are not necessarily equal.
  • the quantization parameters can be adaptively set according to the sparsity of the vertex distribution in the local region.
  • the high-precision geometric information contains detailed information of the outline of the three-dimensional mesh.
  • the high-precision geometric information (x h , y h , z h ) can be further processed.
  • the importance of high-precision geometric information of vertices in different areas is different. For areas where vertices are sparsely distributed, the distortion of high-precision geometric information will not have a major impact on the visual effect of the three-dimensional mesh.
  • quantizing the geometric information of the target three-dimensional grid to obtain the first information includes:
  • the encoding end determines the information of the supplementary point based on the geometric information of the target three-dimensional grid and the first precision geometric information.
  • the points with repeated low-precision geometric information are used as supplementary points and encoded separately.
  • the geometric information of supplementary points can also be divided into two parts: low-precision geometric information and high-precision geometric information. According to the application's requirements for compression distortion, you can choose to retain all supplementary points or only a part of them.
  • the high-precision geometric information of the supplementary points can also be further quantified, or the high-precision geometric information of only some points can be retained.
  • the first information needs to be encoded to obtain the final code stream.
  • encoding the first information and obtaining the first code stream includes:
  • the encoding end processes the first information to obtain second information, where the second information includes at least one of a placeholder map and a geometric map;
  • the first information includes first precision geometric information
  • processing the first information to obtain the second information includes:
  • the encoding end divides the first precision geometric information into three-dimensional slices
  • the encoding end performs two-dimensional projection on the divided three-dimensional slice to obtain the two-dimensional slice;
  • the encoding end packages the two-dimensional slices to obtain two-dimensional image information
  • the encoding end obtains a first-precision placeholder map and a first-precision geometric map based on the two-dimensional image information.
  • the main step is to divide the low-precision geometric information into patches to obtain multiple three-dimensional patches;
  • the specific implementation method of this step is: the encoding end determines each element contained in the first-precision geometric information.
  • the projection plane of the vertices; the coding end performs slice division on the vertices contained in the first precision geometric information according to the projection plane; the coding end clusters the vertices contained in the first precision geometric information, and obtains Each piece after division.
  • the process of patch division mainly includes: first estimating the normal vector of each vertex, selecting the candidate projection plane with the smallest angle between the plane normal vector and the vertex normal vector as the projection plane of the vertex; then, according to the projection
  • the plane initially divides the vertices, and the vertices with the same and connected projection planes are composed into patches; finally, the fine division algorithm is used to optimize the clustering results to obtain the final three-dimensional patch (3-dimension patch, 3D patch).
  • the projection plane of each vertex is initially selected.
  • the normal vector of the candidate projection plane is Select the plane whose normal vector direction is closest to the vertex normal vector direction as the projection plane of the vertex.
  • the calculation process of plane selection is as shown in Equation 34:
  • the fine division process can use a grid-based algorithm to reduce the time complexity of the algorithm.
  • the grid-based fine division algorithm flow is shown in Figure 3, which specifically includes:
  • Step 301 Divide the (x, y, z) geometric coordinate space into voxels.
  • Step 302 Find filled voxels.
  • Filled voxels refer to voxels that contain at least one point in the grid.
  • Step 303 Calculate the smoothing score of each filled voxel on each projection plane, recorded as voxScoreSmooth.
  • the voxel smoothing score of the voxel on a certain projection plane is the number of points gathered to the projection plane through the initial segmentation process.
  • Step 304 Use KD-Tree partitioning to find nearest filled voxels, denoted as nnFilledVoxels, that is, the nearest filled voxels of each filled voxel (within the search radius and/or limited to the maximum number of adjacent voxels).
  • Step 305 Use the voxel smoothing score of the nearest neighbor filled voxel in each projection plane to calculate the smoothing score (scoreSmooth) of each filled voxel.
  • the calculation process is as shown in Formula 35:
  • Step 306 Calculate the normal score using the normal vector of the vertex and the normal vector of the candidate projection plane, recorded as scoreNormal.
  • the calculation process is as shown in Formula 36:
  • p is the index of the projection plane and i is the index of the vertex.
  • Step 307 Use scoreSmooth and scoreNormal to calculate the final score of each voxel on each projection plane.
  • the calculation process is as shown in Equation 37:
  • i is the vertex index
  • p is the index of the projection plane
  • v is the voxel index where vertex i is located.
  • Step 308 Use the scores in step 307 to cluster the vertices to obtain finely divided patches.
  • the encoding end performs two-dimensional projection on the divided three-dimensional slice to obtain the two-dimensional slice.
  • this process is to project the 3D patch onto a two-dimensional plane to obtain a two-dimensional patch (2-dimension patch, 2D patch).
  • the encoding end packages the two-dimensional slices to obtain two-dimensional image information.
  • this step implements patch packing.
  • the purpose of patch packing is to arrange 2D patches on a two-dimensional image.
  • the basic principle of patch packing is to arrange patches on a two-dimensional image without overlapping or The pixel-free parts of the patch are partially overlapped and arranged on the two-dimensional image.
  • the patches are arranged more closely and have time domain consistency to improve coding performance.
  • the resolution of the 2D image is WxH
  • the minimum block size that defines the patch arrangement is T, which specifies the minimum distance between different patches placed on this 2D grid.
  • patches are inserted and placed on the 2D grid according to the non-overlapping principle.
  • Each patch occupies an area consisting of an integer number of TxT blocks.
  • the patches can choose a variety of different arrangement directions. For example, eight different arrangement directions can be adopted, as shown in Figure 4, including 0 degrees, 180 degrees, 90 degrees, 270 degrees, and mirror images of the first four directions.
  • a patch arrangement method with temporal consistency is adopted.
  • a Group of frame all patches of the first frame are arranged in order from largest to smallest.
  • the temporal consistency algorithm is used to adjust the order of patches.
  • the patch information can be obtained based on the information in the process of obtaining the two-dimensional image information. After that, the patch information can be encoded and the patch information sub-stream can be obtained;
  • the patch information records the information of each step operation in the process of obtaining two-dimensional image.
  • the patch information includes: patch division information, patch projection plane information, and patch packing position information.
  • the process of obtaining the placeholder map is mainly as follows: using the patch arrangement information obtained by patch packing, setting the position of the vertex in the two-dimensional image to 1 and setting the remaining positions to 0 to obtain the placeholder map.
  • the main process is: in the process of obtaining the 2D patch through projection, the distance from each vertex to the projection plane is saved. This distance is called the depth.
  • the low-precision geometric map compression part is to compress each 2D patch in the 2D patch.
  • the depth value of the vertex is arranged to the position of the vertex in the placeholder map to obtain a low-precision geometric map.
  • the first information includes second precision geometric information
  • processing the first information to obtain the second information includes:
  • the encoding end obtains the arrangement order of the vertices contained in the first precision geometric information
  • the encoding end arranges the second-precision geometric information corresponding to the vertices included in the first-precision geometric information in the two-dimensional image to generate a second-precision geometric map.
  • the high-precision geometric information is arranged in the original patch (raw patch), and the high-precision geometric information corresponding to the vertices in the low-precision geometric map is arranged in a two-dimensional image to obtain the raw patch, thereby generating a high-precision Accurate geometric drawings. It is mainly divided into three steps, as shown in Figure 5, including:
  • Step 501 Obtain the arrangement order of vertices, scan the low-precision geometric map line by line from left to right, and use the scanning order of each vertex as the order of vertices in the raw patch.
  • Step 502 Generate raw patch.
  • a raw patch is a rectangular patch formed by arranging the three-dimensional coordinates of the vertices row by row as shown in Figure 4. According to the vertex arrangement order obtained in the first step, the high-precision geometric information of the vertices is arranged in order to obtain the high-precision geometric information raw patch.
  • Step 503 Place the high-precision geometric information in a two-dimensional image to generate a high-precision geometric map.
  • the encoding end will encode the first-precision geometric figure and the second-precision geometric figure to obtain the geometric figure sub-stream.
  • the first information includes information on supplementary points
  • processing the first information to obtain the second information includes:
  • the encoding end arranges the third precision geometric information of the supplementary points into a first original slice
  • the encoding end arranges the fourth precision geometric information of the supplementary points into a second original slice in the same order as the first original slice;
  • the encoding end compresses the first original slice and the second original slice to obtain a geometric map of the supplementary points.
  • the low-precision part and the high-precision part of the geometric information of the supplementary points are encoded separately.
  • the low-precision geometric information of the supplementary points is arranged into a supplementary point low-precision raw patch in any order; then, the high-precision geometric information is arranged into a supplementary point high-precision raw patch in the same order as the supplementary point low-precision raw patch; finally , to compress supplementary point low-precision raw patches and high-precision raw patches, a variety of compression methods can be used. Among them, one method is to encode the values in the raw patch by run-length coding, entropy coding, etc.
  • the other method is to add the supplementary point low-precision raw patch to the blank area in the low-precision geometric map, and add the supplementary point high-precision
  • the raw patch adds the blank areas in the high-precision geometric map to obtain the geometric map of supplementary points.
  • determining the second code stream according to the connection information corresponding to the first reconstructed grid includes:
  • the encoding end determines the vertices to be sorted in a first spatial range based on the spatial angle between adjacent triangle patches in the first reconstructed grid, and the first spatial range is the triangles to be encoded in the first reconstructed grid.
  • the spatial range where the target vertex is located, and the vertices to be sorted include the target vertex;
  • the encoding end sorts the vertices to be sorted to obtain the sorting information of the target vertices
  • the encoding end obtains the to-be-used encoding information based on the encoding information corresponding to the sorting information of the target vertex.
  • the encoding end updates the edge set according to the first preset rule
  • the encoding end re-determines the triangles to be encoded based on the updated edge set until the encoding information of all triangles to be encoded in the first reconstructed grid is obtained;
  • the encoding end encodes the encoding information of all triangles to be encoded to obtain the second code stream;
  • the first preset rule includes: adding two sides of the triangle to be encoded except the first side to the side set, and removing the first side from the side set.
  • the encoding end first encodes the geometric information based on the target three-dimensional mesh, then reconstructs the geometric information, uses the encoded information of the reconstructed geometric information to perform mesh reconstruction, and then obtains the connection information based on the first reconstructed mesh. This ensures that the obtained connection information is more accurate.
  • the reconstructed geometric information here includes the index information of the vertices in the target three-dimensional mesh.
  • the above three-dimensional network can be divided into at least one triangular patch, and each triangular patch contains at least one triangle.
  • some vertices in the first spatial range can be filtered out, and the remaining vertices can be used as vertices to be sorted.
  • the first spatial range includes:
  • the center of the first sphere and the second sphere are the same, the radius of the first sphere and the radius of the second sphere are different, and the center of the sphere is the target in the first side of the triangle to be encoded.
  • Position, for example, the center of the sphere is the midpoint of the first side of the triangle to be encoded.
  • the vertices to be sorted are sorted according to a preset sorting criterion.
  • the sorting criterion may be to sort according to the distance between the vertices and the midpoint of the first side of the triangle to be encoded, or the sorting criterion may also be to sort according to the vertices. Sort by the size of the radius of the circumcircle of the triangle formed by the first side.
  • the sorting criterion can also be other criteria, which are not specifically limited here.
  • the vertices in the first spatial range are further deleted, reducing the number of vertices to be sorted, that is, the bit information used in the sorting information of the target vertices can be reduced.
  • the encoding end sorts the sorting information of the target vertices. Encoding is performed to obtain the encoding information. If the target condition is not met, the index of the target vertex is encoded to obtain the encoding information.
  • the target condition is that the number of vertices to be sorted in the first spatial range is less than a preset threshold, and/or the sorting number of the target vertex is less than a preset value. Since the number of vertices to be sorted in the first space range is small or the sorting sequence number of the target vertex is small, the encoding information corresponding to the sorting information will occupy a smaller number of bits.
  • the sorting information of the target vertex is encoded, It can effectively reduce the number of encoding bits.
  • encoding the index of the target vertex can effectively reduce the number of encoding bits compared to encoding the sorting information.
  • the encoding end after obtaining the encoding information of the encoding triangle, the encoding end updates the edge set according to the first preset rule; the encoding end re-determines the triangle to be encoded based on the updated edge set until the triangles in the three-dimensional grid are all Get coded information. Encode the coding information of all triangles in the first reconstructed grid to obtain the second code stream.
  • the first preset rule includes: adding two sides of the triangle to be encoded except the first side to the side set, and removing the first side from the side set.
  • some vertices are excluded in the first spatial range according to the spatial angle between adjacent triangular patches in the three-dimensional grid, and the vertices to be sorted are determined based on the excluded vertices, that is, the number of vertices to be sorted is reduced. In this way, when encoding the sorting information of the target vertex, the number of bits occupied by the encoding information can be further reduced, thereby effectively improving the encoding efficiency.
  • the method before determining the vertices to be sorted within the first spatial range based on the spatial angle between adjacent triangular patches in the first reconstructed grid, the method includes:
  • the encoding end selects a first edge from an edge set corresponding to the first reconstructed grid, where the edge set is a set of at least one edge of an encoded triangle in the first reconstructed grid;
  • the encoding end determines the triangle to be encoded based on the first side and the vertex corresponding to the first side, wherein the target vertex of the triangle to be encoded is the vertex corresponding to the first side divided by the third A vertex other than the two vertices connected by one side, the target vertex can also be described as the opposite vertex of the first side.
  • determining the vertices to be sorted within the first spatial range based on the spatial angle between adjacent triangular patches in the first reconstructed grid includes:
  • the vertices to be sorted within the first spatial range are determined.
  • the preset category triangle includes at least one of the following:
  • a triangle with two vertices coincident or three vertices collinear means that two vertices in a triangle coincide or three vertices are collinear.
  • the method also includes:
  • the encoding end obtains the encoding information of the triangle to be encoded based on the encoding information corresponding to the target vertex information of the triangle to be encoded.
  • the index of the target vertex of the triangle to be encoded is directly encoded, and the encoding information of the triangle to be encoded is obtained based on the encoding information corresponding to the index of the target vertex.
  • binary representation when encoding the index of a vertex, binary representation can be directly used or a coding algorithm such as Huffman can be used for encoding.
  • a coding algorithm such as Huffman can be used for encoding.
  • the encoding method is not specifically limited here.
  • determining the vertices to be sorted within the first spatial range based on the spatial angle between adjacent triangular patches in the first reconstructed grid includes:
  • the encoding end excludes all vertices of the first target triangle from the vertices within the first space range to obtain remaining vertices;
  • the encoding end determines the vertices to be sorted within the first spatial range based on the remaining vertices
  • the first target triangle is a triangle whose angle with an adjacent encoded triangle is less than an angle threshold, and one side of the first target triangle is the same as the first side of the triangle to be encoded.
  • the encoding information of the triangle to be encoded also includes: encoding information of the angle threshold.
  • the decoding end can obtain the angle threshold based on the encoding information, and determine the vertices to be sorted in the first spatial range based on the angle threshold. In this way, the encoding end can flexibly Set the angle threshold.
  • a fixed angle threshold can also be pre-agreed.
  • the encoding end and the decoding end determine the vertices to be sorted in the first space range based on the pre-agreed angle threshold.
  • the encoding end does not need to set the angle threshold. Encode.
  • the method also includes:
  • the encoding end encodes the target vertex information of the triangle to be encoded in a second spatial range, and obtains the encoding information of the triangle to be encoded.
  • the second spatial range is the first space in the first reconstructed grid except the first space. outside the range.
  • the encoding information of the triangle to be encoded also includes encoding information of the first spatial range.
  • the first spatial range can be flexibly set in this implementation.
  • the encoding end and the decoding end can also predetermine the size of the first spatial range. In this method, the encoding end does not need to encode the first spatial range.
  • the input three-dimensional grid is divided into one or more slices, and an initial triangle is selected in each slice.
  • the above-mentioned three-dimensional mesh is the first reconstructed mesh.
  • Encode the vertex index of the initial triangle and put the edges of the initial triangle into the edge set (ie, the edge set).
  • the triangle formed by the edge and the pair of vertices is the triangle to be encoded.
  • the edge selected in each iteration can be recorded as ⁇
  • its opposite vertex is recorded as v
  • the triangle to be encoded adjacent to the edge can be encoded.
  • the process of encoding connectivity relationships may specifically include:
  • the vertex index of the triangle can be directly encoded, or the triangle can be encoded in other ways.
  • the preset condition may be that the triangle to be encoded belongs to several special triangles, such as a degenerate surface (two points coincide or three points are collinear) or the angle between the triangle and the encoded triangle is less than a certain angle, or the preset condition
  • the condition is that the number of vertices in the first space range is greater than the preset number, or the preset condition is that the target vertex is outside the second space range, such as within the second space range, or the target vertex is within the preset condition
  • the sorting numbers of the vertices in the first space range are greater than or equal to the preset value.
  • This preset condition can be flexibly set according to requirements. Add the two sides of the triangle to be encoded except side ⁇ to the edge set, and remove edge ⁇ from the set. Then take out the other side of the triangle to be encoded (the side other than side ⁇ ) from the side set according to certain criteria, and continue to encode the triangle adjacent to this side. For example, the next side ⁇ can be selected in the order of access.
  • the spatial range can be determined using the geometric properties of adjacent triangular patches, spatial angles, or other criteria.
  • the spatial range can be the part between two concentric spheres with the midpoint of side ⁇ as the center of the sphere and the minimum radius R min and the maximum radius R max combining ⁇ R min , R max ⁇ .
  • the code is ⁇ R min , R max ⁇ group.
  • the above angle values can also be encoded.
  • the sorting criterion can be the distance from the vertex v to the midpoint of the side ⁇ ; or the radius of the circumscribed circle of the triangle formed by the side ⁇ . Encodes the sequence number of vertex v in the sorting.
  • This encoding process is iterated for each patch of the three-dimensional mesh until all triangles in each patch are encoded. If the edge set is empty but there are unencoded triangles, an initial triangle is selected from the remaining unencoded triangles and the encoding process is cycled.
  • the encoding end determines the third code stream according to the target information and attribute encoding method, including:
  • the encoding end determines the third code stream based on the attribute information corresponding to the first reconstructed grid;
  • the encoding end determines the third code based on the target three-dimensional grid and the target texture map corresponding to the target three-dimensional grid. flow.
  • the state identifier can be used to represent the attribute encoding method, and the state identifier can be understood as a customized switch identifier. It should be understood that the above-mentioned first reconstructed mesh is a three-dimensional mesh obtained by performing lossy compression on the geometric information of the target three-dimensional mesh, and then reconstructing the lossy-compressed geometric information.
  • the status identifier When the status identifier is used to characterize the first attribute encoding method, it indicates that in the process of lossy compression of the geometric information of the target three-dimensional grid, the texture coordinates corresponding to each vertex in the target three-dimensional grid are equal to If there is no deviation in the correspondence between the positions of each vertex in the texture map corresponding to the target three-dimensional grid, the attribute information corresponding to the first reconstructed grid is encoded to obtain a third code stream.
  • the status identifier When the status identifier is used to characterize the second attribute encoding method, it means that the texture coordinates corresponding to each vertex in the target 3D mesh resulting from the process of lossy compression of the geometric information of the target 3D mesh are different from the texture coordinates of each vertex in the target 3D mesh. There may be large deviations in the correspondence between positions in the texture map corresponding to the grid. In this way, the third code stream can be determined according to the target three-dimensional grid and the target texture map corresponding to the target three-dimensional grid.
  • the third code stream includes the first sub-code stream and the second sub-code stream, wherein the above-mentioned first code stream
  • the sub-code stream is a sub-code stream obtained by encoding the reconstructed texture coordinate information in the attribute information
  • the above-mentioned second sub-code stream is a sub-code stream obtained by encoding the reconstructed texture map in the attribute information.
  • the status identifier When the status identifier is used to characterize the third attribute encoding method, it means that the texture coordinates corresponding to each vertex in the target 3D mesh resulting from the process of lossy compression of the geometric information of the target 3D mesh are different from the texture coordinates of each vertex in the target 3D mesh. There may be large deviations in the correspondence between positions in the texture map corresponding to the grid. In this way, the third code stream can be determined based on the target three-dimensional grid and the target texture map corresponding to the target three-dimensional grid, and in the above encoding method, only the reconstructed texture map is encoded, and the reconstructed texture coordinate information is not encoded. to save code rate.
  • the reconstructed texture coordinate information in the above embodiments and subsequent embodiments refers to the regenerated texture coordinate information
  • the reconstructed texture map refers to the regenerated texture map
  • the state identifier is pre-defined and set, and then the attribute information corresponding to the target three-dimensional grid is encoded according to the attribute encoding method represented by the state identifier, so as to achieve the purpose of saving coding bit rate.
  • the attribute information includes texture coordinate information and a texture map.
  • the texture coordinate information is used to characterize the texture coordinates corresponding to each vertex in the target three-dimensional grid.
  • the corresponding texture coordinates according to the first reconstructed grid The attribute information determines that the third code stream includes:
  • the encoding end performs entropy coding on the first target coordinate difference to obtain a first sub-code stream; the first target coordinate difference is obtained based on the texture coordinate information;
  • the encoding end uses a video encoder to encode the texture map to obtain a second sub-stream;
  • the encoding end combines the first sub-code stream and the second sub-code stream to obtain a third code stream.
  • the attribute information includes texture coordinate information and texture maps.
  • the above texture coordinate information includes the texture coordinates corresponding to each vertex, that is, UV coordinates.
  • the above UV coordinates are used to characterize the corresponding vertex.
  • the texture color value is used to characterize the corresponding vertex.
  • the encoded geometric information is reconstructed, and after the first reconstructed mesh is obtained based on the reconstructed geometric information and the simplified mesh, it is determined whether the UV coordinates corresponding to each vertex in the first reconstructed mesh are consistent with the simplified mesh. Check whether the UV coordinates corresponding to the vertices in the grid are consistent. If they are inconsistent, adjust the order of the UV coordinates in the simplified grid to be consistent with the order of reconstructing the first grid.
  • the UV coordinate sub-stream is also called a first sub-stream.
  • the video encoder can be directly used to encode the texture map to form a texture map sub-stream.
  • the above-mentioned texture map sub-stream is also called the second sub-stream. code stream.
  • the above-mentioned video encoders include but are not limited to High Efficiency Video Coding (HEVC) encoders and Versatile Video Coding (VVC) encoders.
  • HEVC High Efficiency Video Coding
  • VVC Versatile Video Coding
  • the first sub-code stream and the second sub-code stream are mixed to form a third code stream.
  • a third code stream is formed to achieve effective compression of attribute information, thereby reducing the amount of data.
  • the method before performing entropy coding on the first target coordinate difference to obtain the first sub-code stream, the method includes:
  • the encoding end selects a second edge from an edge set corresponding to the first reconstructed grid, where the edge set is a set of at least one edge of the encoded triangle represented by the texture coordinate information;
  • the encoding end determines a prediction triangle based on the second side and the vertex corresponding to the second side;
  • the encoding end determines the vertices of the second side, other than the two vertices connected to the second side, among the vertices corresponding to the prediction triangle, as prediction vertices;
  • the encoding end determines the coordinate difference between the predicted vertex and the real vertex as the first target coordinate difference; the real vertex is the vertex corresponding to the triangle to be encoded divided by The second edge connects two vertices other than the vertex.
  • ⁇ 1 represents the above-mentioned second side
  • A1 represents the vertex corresponding to the second side above.
  • the triangle S1 can be determined based on the second side and the vertices corresponding to the second side, and the parallelogram prediction method is used for the triangle S1 to determine the predicted triangle S2. Further, among the vertices corresponding to the predicted triangle on the second side, the vertices other than the two vertices connected to the second side are determined as predicted vertices, that is, point A2 shown in FIG. 9 .
  • the real vertices are the vertices of the second side in the vertices corresponding to the triangle to be encoded except the two vertices connected to the second side.
  • the above triangle to be encoded is as shown in Figure 9 In S3, the above-mentioned real vertex is point A3 shown in Figure 9.
  • the coordinate difference between the predicted vertex and the real vertex is calculated, and the above-mentioned coordinate difference is determined as the first target coordinate difference.
  • the encoding end determines that the third code stream includes: based on the target three-dimensional grid and the target texture map corresponding to the target three-dimensional grid:
  • the encoding end performs surface spectrum processing on the target three-dimensional grid to obtain reconstructed texture coordinate information
  • the encoding end uses the target three-dimensional grid, the target texture map and the reconstructed texture coordinate information to perform polishing processing on the target texture map to obtain a reconstructed texture map;
  • the encoding end performs entropy coding on the second target coordinate difference to obtain the first sub-code stream; the second target coordinate difference is obtained based on the reconstructed texture coordinate information;
  • the encoding end uses a video encoder to encode the reconstructed texture map to obtain a second sub-stream;
  • the encoding end obtains a third code stream based on the first sub-code stream and the second sub-code stream.
  • the isometric charts (ISO-charts) algorithm can be used to obtain the reconstructed texture coordinate information.
  • the specific implementation method of performing surface spectrum processing on the target three-dimensional mesh is explained in detail below:
  • I is an N-dimensional identity matrix
  • 1 is a unit vector of length N.
  • the eigenvalue ⁇ i of B N and the corresponding eigenvector constitutes the spectral decomposition of the surface shape.
  • GDD geodesic distance distortion
  • d geo (i,j) is the geodesic distance between point i and point j.
  • ⁇ a,b,c> represents the area of triangle abc. Since the mapping is affine, its partial derivative is constant on (s, t), and its calculation process is as follows:
  • ⁇ max and ⁇ min represent the maximum length and minimum length obtained when the unit length vector is mapped from the two-dimensional texture domain to the three-dimensional surface, that is, the maximum and minimum Local "stretching".
  • the two stretch measures on triangle T are defined as follows:
  • A'(T i ) is the surface area of triangle T i in three-dimensional space.
  • the target three-dimensional mesh after stretching optimization is divided into multiple charts (charts) through surface spectrum clustering.
  • the specific algorithm process is as follows:
  • the distance threshold is 10 times the average edge length of the target three-dimensional grid.
  • d ang (f i , f j ) 1-cos ⁇ ij , ⁇ ij is the angle between the normals of triangles fi and fj, and avg (d ang ) is the average angular distance between adjacent triangles.
  • GDD A (f i ) and GDD B (f i ) are the GDDs of triangle f i induced by chart A or chart B respectively, and avg(d distort ) is the d distort (d on all adjacent triangle pairs).
  • the average of f i , f j ), ⁇ is the weight parameter.
  • the above-mentioned pixel position is the position of three pixel points.
  • the pull push filling algorithm can be used to fill the reconstructed texture map to save code flow.
  • Figure 10(a) is an image representing the target three-dimensional grid.
  • Figure 10(b) is the rendering of the target texture map.
  • Figure 10(c) A rendering of the reconstructed texture map.
  • the target three-dimensional grid After obtaining the reconstructed texture coordinate information, it is determined whether the UV coordinates corresponding to each vertex in the target three-dimensional grid are consistent with the reconstructed UV coordinates corresponding to the vertex represented by the reconstructed texture coordinate information. If they are inconsistent, the target three-dimensional grid can be adjusted. The UV coordinates corresponding to each vertex in the mesh are consistent with the reconstructed UV coordinates corresponding to the vertex.
  • entropy coding is performed on the second target coordinate difference to form a UV coordinate sub-stream.
  • the UV coordinate sub-stream is also called a first sub-stream.
  • a video encoder can be directly used to encode the reconstructed texture map to form a texture map sub-stream.
  • the texture map sub-stream is also called a second sub-stream.
  • the first sub-code stream and the second sub-code stream are mixed to form a third code stream.
  • the encoding end determines that the third code stream includes: based on the target three-dimensional grid and the target texture map corresponding to the target three-dimensional grid:
  • the encoding end performs surface spectrum processing on the target three-dimensional grid to obtain reconstructed texture coordinate information
  • the encoding end uses the target three-dimensional grid, the target texture map and the reconstructed texture coordinate information to perform matte processing on the target texture map to obtain a reconstructed texture map;
  • the encoding end uses a video encoder to encode the reconstructed texture map to obtain a third code stream.
  • the state identifier represents the third attribute encoding method
  • only the reconstructed texture map is encoded to generate the third code stream.
  • the target three The surface spectrum processing is performed on the dimensional grid to obtain the reconstructed texture coordinate information. It should be understood that the specific implementation manner of performing surface spectrum processing on the target three-dimensional mesh is consistent with the specific implementation manner of surface spectrum processing mentioned in the above embodiments, and will not be repeated here.
  • the target three-dimensional grid, the target texture map and the reconstructed texture coordinate information are used to smooth the target texture map to obtain the reconstructed texture map. It should be understood that the specific implementation manner of polishing the target texture map is consistent with the specific implementation manner of the polishing process mentioned in the above embodiment, and will not be repeated here.
  • the status identifier represents the third attribute encoding method
  • only the reconstructed texture map is encoded using the video encoder to obtain the third code stream, thereby saving the encoding rate.
  • FIG 11 is a flow chart of the decoding method provided by this application.
  • the decoding method provided in this embodiment includes the following steps:
  • the decoding end decomposes the acquired target code stream to obtain the first information, decoding information, attribute encoding method and third code stream.
  • the target code stream may be a code stream obtained by encoding the above-mentioned target three-dimensional grid at the encoding end.
  • the decoding end first decodes the geometric information, and then decodes the connectivity relationship based on the geometric information.
  • the definitions of the first information and the third code stream are respectively the same as the first information and the third code stream in the above embodiment, and will not be repeated here.
  • the state identifier can be used to characterize the attribute encoding method.
  • the decoder obtains geometric information corresponding to the target three-dimensional grid based on the first information.
  • the decoding end performs an inverse quantization operation on the first information to obtain the target three-dimensional grid.
  • an inverse quantization operation on the first information to obtain the target three-dimensional grid.
  • the decoding end determines the connection information corresponding to the target three-dimensional grid based on the decoding information.
  • the decoder determines each triangle in the target three-dimensional grid based on the decoded information, thereby obtaining the connection information corresponding to the target three-dimensional grid.
  • the decoder determines each triangle in the target three-dimensional grid based on the decoded information, thereby obtaining the connection information corresponding to the target three-dimensional grid.
  • S1104 The decoder determines the attribute information corresponding to the target three-dimensional grid according to the third code stream and the attribute encoding method.
  • the decoder determines the attribute information corresponding to the target three-dimensional grid based on the third code stream and the attribute encoding method.
  • the attribute information includes but is not limited to the grid UV coordinate attributes and texture map.
  • the acquired target code stream is decomposed to obtain the first information, decoding information, attribute encoding method and third code stream; according to the first information, the geometric information corresponding to the target three-dimensional grid is obtained; according to the decoding information , determine the connection information corresponding to the target three-dimensional grid; determine the attribute information corresponding to the target three-dimensional grid according to the third code stream and attribute encoding method.
  • the decoding method for the third code stream is determined based on the above attribute encoding method to obtain correct attribute information and avoid decoding failure.
  • the decoding end obtains a target sub-code stream according to the acquired target code stream.
  • the target sub-code stream includes: a slice information sub-stream, a placeholder map sub-stream and a geometric map sub-stream;
  • the decoding end obtains second information according to the target sub-code stream, and the second information includes: at least one of a placeholder map and a geometric map;
  • the decoding end obtains the first information based on the second information.
  • obtaining the first information according to the second information includes:
  • the decoder acquires two-dimensional image information based on the first-precision placeholder map and the first-precision geometric map;
  • the decoding end obtains a two-dimensional slice according to the two-dimensional image information
  • the decoding end performs three-dimensional back-projection on the two-dimensional slice according to the slice information corresponding to the slice information sub-stream to obtain the three-dimensional slice;
  • the decoder acquires first precision geometric information based on the three-dimensional slice.
  • obtaining the first information according to the second information includes:
  • the decoder obtains second-precision geometric information based on the second-precision geometric map.
  • obtaining the first information based on the second information includes:
  • the decoding end determines the first original slice corresponding to the third precision geometric information of the supplementary point and the second original slice corresponding to the fourth precision geometric information of the supplementary point according to the geometric map of the supplementary point;
  • the decoding end determines the information of the supplementary point based on the first original slice and the second original slice.
  • the geometric information of the supplementary points is divided into low-precision parts and high-precision parts and is decoded separately.
  • the geometric map of the supplementary points is decompressed.
  • Various decompression methods can be used. Among them, one method is to decode the geometric map through run-length decoding, entropy decoding, etc.
  • the other method is to take the low-precision raw patch of supplementary points from the low-precision geometric map, and take the high-precision raw patch of supplementary points from the high-precision geometric map. extracted from the geometric diagram.
  • the low-precision geometric information of the supplementary points is obtained from the low-precision raw patch of the supplementary points in a specific order
  • the high-precision geometric information of the supplementary points is obtained from the high-precision raw patch of the supplementary points in a specific order; it should be noted here that the specific order is decoding
  • the end obtains it by parsing the code stream, that is, the encoding end uses which order to generate the supplementary point low-precision raw patch and the supplementary point high-precision raw patch to inform the decoder through the code stream.
  • obtaining the geometric information corresponding to the target three-dimensional mesh according to the first information includes:
  • the decoder determines the coordinates of each vertex in the first precision geometry information based on the first precision geometry information and the quantization parameter of each component;
  • the decoder determines the geometric information corresponding to the target three-dimensional grid based on the coordinates of each vertex in the target three-dimensional grid and the second precision geometric information.
  • the geometric information reconstruction process in the embodiment of the present application is a process of reconstructing a three-dimensional geometric model using information such as patch information, placeholder maps, low-precision geometric maps, and high-precision geometric maps.
  • the specific process is shown in Figure 12, which mainly includes the following four steps:
  • Step 1201 obtain 2D patch
  • obtaining the 2D patch refers to using the patch information to segment the occupancy information and depth information of the 2D patch from the occupancy map and geometric map.
  • the patch information contains the position and size of the bounding box of each 2D patch in the placeholder map and low-precision geometric map.
  • the placeholder information and the placeholder information of the 2D patch can be directly obtained by using the patch information, placeholder map and low-precision geometric map.
  • Low precision geometric information For high-precision geometric information, the vertex scanning order of the low-precision geometric map is used to convert the high-precision raw patch into The high-precision geometric information in the map corresponds to the vertices of the low-precision geometric map, thereby obtaining the high-precision geometric information of the 2D patch.
  • the low-precision geometric information and high-precision geometric information of the supplementary points can be obtained by directly decoding the low-precision raw patch and the high-precision raw patch of the supplementary points.
  • Step 1202 reconstruct 3D patch
  • reconstructing a 3D patch refers to using the placeholder information and low-precision geometric information in the 2D patch to reconstruct the vertices in the 2D patch into a low-precision 3D patch.
  • the placeholder information of a 2D patch contains the position of the vertex relative to the coordinate origin in the local coordinate system of the patch projection plane, and the depth information contains the depth value of the vertex in the normal direction of the projection plane. Therefore, the 2D patch can be reconstructed into a low-precision 3D patch in the local coordinate system using the occupancy information and depth information.
  • Step 1203 reconstruct the low-precision geometric model
  • reconstructing a low-precision geometric model refers to using the reconstructed low-precision 3D patch to reconstruct the entire low-precision three-dimensional geometric model.
  • the patch information contains the conversion relationship of the 3D patch from the local coordinate system to the global coordinate system of the three-dimensional geometric model. Using the coordinate conversion relationship to convert all 3D patches to the global coordinate system, a low-precision three-dimensional geometric model is obtained.
  • the geometric information in the low-precision raw patch is directly used to obtain the low-precision coordinate values of the supplementary points in the global coordinate system, thereby obtaining a complete low-precision three-dimensional geometric model.
  • Step 1204 reconstruct the high-precision geometric model
  • Reconstructing a high-precision geometric model refers to the process of using high-precision geometric information to reconstruct a high-precision geometric model based on a low-precision geometric model.
  • high-precision geometric information and low-precision geometric information are mapped, and the high-precision three-dimensional coordinates of the vertex can be reconstructed based on the high-precision geometric information and low-precision geometric information of the vertex.
  • the calculation process of high-precision three-dimensional coordinates (x r , y r , z r ) is as shown in Formula 54 to Formula 56:
  • the f 3 function is a reconstruction function.
  • the calculation process of the reconstruction function corresponds to the calculation process of the quantization function at the encoding end, and there are many ways to implement it. If the f 1 function adopts the implementation method of Formula 20 to Formula 25, then the reconstruction function is implemented as shown in Formula 57 to Formula 59:
  • obtaining geometric information corresponding to the target three-dimensional mesh according to the first information further includes:
  • the decoding end will supplement the point information and the coordinates of each vertex in the first precision geometric information to determine the geometric information corresponding to the target three-dimensional grid.
  • the information on the supplementary points includes at least one of the following:
  • Third-precision geometric information of the supplementary point where the third-precision geometric information is the quantified three-dimensional coordinate information of the supplementary point;
  • the fourth precision geometric information of the supplementary point is the three-dimensional coordinate information lost during the quantization process of the supplementary point.
  • determining the connection information corresponding to the target three-dimensional grid according to the decoding information includes:
  • the decoding end determines the vertices to be sorted within the first spatial range based on the spatial angles of adjacent triangular patches in the target three-dimensional grid, and performs the sorting on the vertices to be sorted.
  • the vertices are sorted; wherein the sorting information is the sequence number of the target vertex among the vertices to be sorted within a first spatial range, and the first spatial range is the space where the target vertex of the triangle to be decoded is located in the target three-dimensional grid. scope;
  • the decoding end determines the target vertex of the triangle to be decoded among the vertices to be sorted based on the sorting result of the vertex to be sorted and the sorting information of the target vertex;
  • the decoding end determines the target vertex and the first side of the triangle to be decoded.
  • Triangle to be decoded
  • the decoding end updates the edge set according to the second preset rule
  • the decoding end re-determines the first edge according to the updated edge set until each triangle to be decoded in the target three-dimensional grid is determined;
  • the second preset rule includes: adding two sides of the triangle to be decoded except the first side to the side set, and removing the first side from the side set. side.
  • the above vertex information may be the index of the vertex.
  • the vertices to be sorted are sorted according to a preset sorting criterion.
  • the sorting criterion may be to sort according to the distance between the vertices and the midpoint of the first side of the triangle to be encoded, or the sorting criterion may also be to sort according to the vertices. Sort by the size of the radius of the circumcircle of the triangle formed by the first side.
  • the sorting criterion can also be other criteria, which are not specifically limited here.
  • the method also includes:
  • the decoding end determines the target vertex of the triangle to be decoded based on the vertex information.
  • the method also includes:
  • the decoding end obtains the target vertex information of the triangle to be decoded in a second spatial range according to the decoding information, and the second spatial range is a range in the target three-dimensional grid other than the first spatial range;
  • the decoding end determines the target vertex of the triangle to be decoded based on the target vertex information.
  • determining the vertices to be sorted within the first spatial range based on the spatial angle between adjacent triangular patches in the target three-dimensional grid includes:
  • the decoding end excludes all vertices of the second target triangle from the vertices within the first space range to obtain the remaining vertices;
  • the decoding end determines the vertices to be sorted within the first spatial range based on the remaining vertices
  • the second target triangle is a triangle whose angle with an adjacent decoded triangle is less than an angle threshold, and one side of the second target triangle is the same as the first side of the triangle to be decoded.
  • the method also includes:
  • the decoding end obtains the information of the angle threshold according to the decoding information.
  • the method also includes:
  • the decoding end obtains the information of the first spatial range according to the decoding information.
  • the radius information of the two spheres is obtained.
  • the decoding end first decodes the geometric information, and then decodes the connectivity relationship based on the geometric information.
  • the process of decoding the connectivity relationship may specifically include:
  • Edge ⁇ is taken from the edge set according to the criteria used in the encoder. If the codeword to be decoded is a vertex index, the vertex is directly decoded and used as the pair vertex v. Use the vertex v and the side ⁇ to form a newly decoded triangle, and add the two sides of the triangle except the side ⁇ to the edge set, and remove the edge ⁇ from the set according to a certain rule, such as moving according to the criteria at the top of the queue. Remove edge ⁇ . Take out the next edge according to a certain rule and continue to decode the triangle adjacent to this edge. For example, you can take out the edge at the top of the queue as the rule.
  • the decoding process is iterated for each slice's code stream until all triangles in each slice are decoded. Finally the pieces are merged into a complete mesh.
  • the third code stream includes a first sub-code stream and a second sub-code stream
  • the attribute information includes texture coordinate information and a texture map
  • the texture coordinate information is used to characterize the target three-dimensional grid. The texture coordinates corresponding to each vertex
  • Determining the attribute information corresponding to the target three-dimensional grid according to the third code stream and the attribute encoding method includes:
  • the decoding end is based on the Determine the texture coordinates corresponding to each vertex in the target three-dimensional grid according to the first sub-code stream;
  • the decoding end uses a video decoder to decode the second sub-stream to obtain a texture map corresponding to the target three-dimensional grid.
  • the third code stream includes the first sub-code stream and the second sub-code stream
  • the attribute information includes texture coordinate information and texture map
  • the above third code stream is decomposed to obtain a first sub-code stream and a second sub-code stream.
  • the texture coordinates corresponding to each vertex are determined.
  • a video decoder can be directly used to encode the texture map to obtain a texture map corresponding to the target three-dimensional grid.
  • the file format of the texture map can be jpg, png, or other formats.
  • the above-mentioned video decoders include but are not limited to HEVC decoders and VVC decoders.
  • determining the texture coordinates corresponding to each vertex in the target three-dimensional grid based on the first sub-code stream includes:
  • the decoding end performs entropy decoding on the first sub-code stream to obtain the prediction residual corresponding to each decoded triangle;
  • the decoding end selects a second edge from an edge set corresponding to the target three-dimensional grid for any decoded triangle, where the edge set is a set of at least one edge of the decoded triangle in the target three-dimensional grid;
  • the decoding end determines a prediction triangle based on the second side and the vertex corresponding to the second side;
  • the decoding end determines the vertices of the second side, other than the two vertices connected to the second side, among the vertices corresponding to the prediction triangle, as prediction vertices;
  • the decoder determines the real vertex corresponding to the decoded triangle based on the predicted vertex and the prediction residual, and the coordinates of the real vertex in the target three-dimensional grid are texture coordinates.
  • the decoding end performs entropy decoding on the first sub-code stream to obtain the prediction residual corresponding to each decoded triangle.
  • the coordinates of the predicted vertex corresponding to each triangle are added to the corresponding prediction residual to obtain the true vertex corresponding to the triangle.
  • the process of determining the predicted vertex corresponding to the triangle is the inverse process of determining the predicted vertex described above: select the second edge from the edge set corresponding to the target three-dimensional mesh; use the parallelogram rule based on the second edge and the vertex corresponding to the second edge. Determine the prediction triangle; place the second side at the corresponding top of the prediction triangle Vertices among the points other than the two vertices connected to the second edge are determined as predicted vertices.
  • the above-mentioned edge set is a set of at least one edge of the decoded triangle in the target three-dimensional mesh.
  • determining the attribute information corresponding to the target three-dimensional grid according to the third code stream and the attribute encoding method includes:
  • the decoder determines the reconstructed texture coordinates corresponding to each vertex in the target three-dimensional grid based on the first sub-code stream;
  • the decoding end uses a video decoder to decode the second sub-stream to obtain a reconstructed texture map corresponding to the target three-dimensional grid.
  • the attribute encoding method when the attribute encoding method is the second attribute encoding method, it means that the third code stream includes the first sub-code stream and the second sub-code stream.
  • the first sub-code stream is a pair of reconstructed textures.
  • the code stream after encoding the coordinate information; the second sub-code stream is the code stream after encoding the reconstructed texture map.
  • the decoder determines the reconstructed texture coordinates corresponding to each vertex in the target three-dimensional grid based on the first sub-stream; it uses the video decoder to decode the second sub-stream to obtain the reconstructed texture coordinates corresponding to the target three-dimensional grid. Texture map.
  • determining the attribute information corresponding to the target three-dimensional grid according to the third code stream and the attribute encoding method includes:
  • the decoder determines the reconstructed texture coordinates corresponding to each vertex in the target three-dimensional grid based on the third code stream;
  • the decoding end uses a video decoder to decode the third code stream to obtain a reconstructed texture map corresponding to the target three-dimensional grid.
  • the attribute encoding method when the attribute encoding method is the third attribute encoding method, it means that the third code stream includes the second sub-code stream.
  • the second sub-code stream is the code after encoding the reconstructed texture map. flow.
  • the decoder uses a video decoder to decode the second sub-stream to obtain a reconstructed texture map corresponding to the target three-dimensional grid.
  • the attribute encoding method when the attribute encoding method is the third attribute encoding method, it means that the third code stream includes the second sub-code stream that encodes the reconstructed texture map.
  • the video decoder use the video decoder to decode the second sub-stream to obtain the reconstructed texture map corresponding to the target three-dimensional grid; the decoder decodes to obtain the residual value corresponding to the reconstructed texture coordinate value of each vertex, and uses the decoded
  • the geometric information of each vertex is used to obtain the predicted texture coordinate value, and then the above reconstructed texture coordinate value and predicted texture coordinate value are used
  • the scalar value determines the target texture coordinate value, that is, the target texture coordinate information.
  • the execution subject may be an encoding device.
  • the encoding device performing the encoding method is taken as an example to illustrate the encoding device provided by the embodiment of the present application.
  • the encoding device 1300 includes:
  • the encoding module 1301 is used to encode the first information corresponding to the target three-dimensional grid and obtain the first code stream;
  • the first determination module 1302 is used to determine the second code stream according to the connection information corresponding to the first reconstructed grid
  • the second determination module 1303 is used to determine the third code stream according to the target information and attribute encoding method
  • Generating module 1304 configured to generate a target code stream based on the first code stream, the second code stream, and the third code stream.
  • the encoding device 1300 also includes:
  • the simplification module is used to simplify the three-dimensional grid to be encoded in the lossy coding mode to obtain the target three-dimensional grid;
  • the determination module is used to determine the three-dimensional grid to be encoded as the target three-dimensional grid when the coding mode is lossless.
  • the simplified module is specifically used for:
  • the three-dimensional grid to be encoded is simplified to obtain the target three-dimensional grid.
  • the simplified module is also specifically used for:
  • the position coordinates of at least some of the vertices in the three-dimensional mesh to be encoded are adjusted to multiples of quantization parameters to obtain the target three-dimensional mesh.
  • the encoding module 1301 is specifically used for:
  • the encoding module 1301 is also specifically used for:
  • each vertex in the target three-dimensional grid is quantized to obtain first precision geometric information.
  • the encoding module 1301 is also specifically used for:
  • the second precision geometric information is obtained.
  • the encoding module 1301 is also specifically used for:
  • Information on supplementary points is determined based on the geometric information of the target three-dimensional grid and the first precision geometric information.
  • the encoding module 1301 is also specifically used for:
  • the encoding module 1301 is also specifically used for:
  • a first-precision placeholder map and a first-precision geometric map are obtained.
  • the encoding module 1301 is also specifically used for:
  • the slice information is encoded to obtain a slice information sub-stream.
  • the encoding module 1301 is also specifically used for:
  • Second-precision geometric information corresponding to the vertices contained in the first-precision geometric information is arranged in a two-dimensional image to generate a second-precision geometric map.
  • the encoding module 1301 is also specifically used for:
  • the first-precision geometric figure and the second-precision geometric figure are encoded to obtain the geometric figure sub-stream.
  • the encoding module 1301 is also specifically used for:
  • the first original slice and the second original slice are compressed to obtain a geometric map of the supplementary points.
  • the first determination module 1302 is specifically used to:
  • the encoding end sorts the vertices to be sorted to obtain the sorting information of the target vertices
  • the updated edge set re-determine the triangles to be encoded until the encoding information of all the triangles to be encoded in the first reconstructed grid is obtained;
  • the first determination module 1302 is also specifically used to:
  • a triangle to be encoded is determined according to the first side and the vertex corresponding to the first side.
  • the first determination module 1302 is also specifically used to:
  • the vertices to be sorted within the first spatial range are determined according to the spatial angle between the adjacent triangle patches.
  • the first determination module 1302 is also specifically used to:
  • the encoding information of the triangle to be encoded is obtained according to the encoding information corresponding to the target vertex information of the triangle to be encoded.
  • the first determination module 1302 is also specifically used to:
  • the first determination module 1302 is also specifically used to:
  • the target vertex information of the triangle to be encoded in the second spatial range is encoded to obtain the encoding information of the triangle to be encoded.
  • the second determination module 1303 is specifically used to:
  • the attribute encoding method is the first attribute encoding method, determine the third code stream according to the attribute information corresponding to the first reconstructed grid;
  • the root A third code stream is determined based on the target three-dimensional grid and the target texture map corresponding to the target three-dimensional grid.
  • the second determination module 1303 is also specifically used to:
  • the encoding end uses a video encoder to encode the texture map to obtain a second sub-stream;
  • the encoding end combines the first sub-code stream and the second sub-code stream to obtain a third code stream.
  • the second determination module 1303 is also specifically used to:
  • the coordinate difference between the predicted vertex and the real vertex is determined as the first target coordinate difference.
  • the second determination module 1303 is also specifically used to:
  • the attribute encoding method is the second attribute encoding method, perform surface spectrum processing on the target three-dimensional grid to obtain reconstructed texture coordinate information;
  • the target texture map and the reconstructed texture coordinate information perform smoothing processing on the target texture map to obtain a reconstructed texture map
  • a third code stream is obtained.
  • the second determination module 1303 is also specifically used to:
  • the attribute encoding method is the third attribute encoding method, perform surface spectrum processing on the target three-dimensional grid to obtain reconstructed texture coordinate information;
  • the target texture map and the reconstructed texture coordinate information perform smoothing processing on the target texture map to obtain a reconstructed texture map
  • the reconstructed texture map is encoded using a video encoder to obtain a third code stream.
  • the first information corresponding to the target three-dimensional grid is encoded to obtain the first code stream; the second code stream is determined according to the connection information corresponding to the first reconstructed grid, wherein the first code stream is The grid construction is determined based on the first information and the target three-dimensional grid; the third code stream is determined based on the target information and attribute encoding method, where the target information includes attribute information corresponding to the first reconstructed grid, or includes the target three-dimensional grid and the target The target texture map corresponding to the three-dimensional grid; and then generate the target code stream based on the first code stream, the second code stream and the third code stream.
  • the attribute information corresponding to the first reconstructed grid is encoded according to the attribute encoding method to obtain the third code stream; or according to the attribute encoding method, the target three-dimensional grid and the target texture map are used to obtain the third code stream.
  • Code stream with this, after lossy compression of the geometric information of the target three-dimensional mesh, the attribute information code stream can be obtained through the above method to avoid encoding failure.
  • the encoding device provided by the embodiment of the present application can implement each process implemented by the encoding method embodiment in Figure 1 and achieve the same technical effect. To avoid duplication, details will not be described here.
  • the execution subject may be a decoding device.
  • the decoding device performing the decoding method is taken as an example to illustrate the decoding device provided by the embodiment of the present application.
  • the decoding device 1400 includes:
  • the decomposition module 1401 is used to decompose the acquired target code stream to obtain the first information, decoding information, attribute encoding method, and third code stream;
  • the acquisition module 1402 is used to acquire the geometric information corresponding to the target three-dimensional grid according to the first information
  • the third determination module 1403 is used to determine the connection information corresponding to the target three-dimensional grid according to the decoding information
  • the fourth determination module 1404 is used to determine the attribute information corresponding to the target three-dimensional grid according to the third code stream and the attribute encoding method.
  • the decomposition module 1401 is specifically used for:
  • the first information is obtained.
  • the decomposition module 1401 is also specifically used to:
  • the decomposition module 1401 is also specifically used to:
  • the decomposition module 1401 is also specifically used to:
  • the geometric map of the supplementary point determine the first original slice corresponding to the third precision geometric information of the supplementary point and the second original slice corresponding to the fourth precision geometric information of the supplementary point;
  • Information of supplementary points is determined based on the first original slice and the second original slice.
  • the acquisition module 1402 is specifically used to:
  • Geometric information corresponding to the target three-dimensional grid is determined according to the coordinates of each vertex in the target three-dimensional grid and the second precision geometric information.
  • the acquisition module 1402 is also specifically used to:
  • the geometric information corresponding to the target three-dimensional grid is determined by supplementing the point information and the coordinates of each vertex in the first precision geometric information.
  • the third determination module 1403 is specifically used for:
  • the decoded information includes sorting information of the target vertices
  • the first edge is re-determined until each triangle to be decoded in the target three-dimensional grid is determined.
  • the third determination module 1403 is also specifically used to:
  • the decoded information includes vertex information of the target vertex
  • the vertex determines the target vertex of the triangle to be decoded.
  • the third determination module 1403 is also specifically used to:
  • the decoding information obtain the target vertex information of the triangle to be decoded in the second spatial range
  • the target vertex of the triangle to be decoded is determined.
  • the third determination module 1403 is also specifically used to:
  • vertices to be sorted within the first spatial range are determined.
  • the third determination module 1403 is also specifically used to:
  • the information of the angle threshold is obtained.
  • the third determination module 1403 is also specifically used to:
  • the information of the first spatial range is obtained.
  • the fourth determination module 1404 is specifically used for:
  • the attribute encoding method is the first attribute encoding method, determine the texture coordinates corresponding to each vertex in the target three-dimensional grid based on the first sub-code stream;
  • the fourth determination module 1404 is also specifically used to:
  • the real vertex corresponding to the decoded triangle is determined.
  • the fourth determination module 1404 is also specifically used to:
  • the attribute encoding method is the second attribute encoding method, based on the first subcode Stream, determine the reconstructed texture coordinates corresponding to each vertex in the target three-dimensional grid;
  • the fourth determination module 1404 is also specifically used to:
  • the decoder determines the reconstructed texture coordinates corresponding to each vertex in the target three-dimensional grid based on the third code stream;
  • the decoding end uses a video decoder to decode the third code stream to obtain a reconstructed texture map corresponding to the target three-dimensional grid.
  • the acquired target code stream is decomposed to obtain the first information, attribute encoding method, decoding information and the third code stream; according to the first information, the geometric information corresponding to the target three-dimensional grid is obtained; according to the decoding information , determine the connection information corresponding to the target three-dimensional grid; determine the attribute information corresponding to the target three-dimensional grid according to the third code stream and attribute encoding method.
  • the decoding method for the third code stream is determined based on the above attribute encoding method to obtain correct attribute information and avoid decoding failure.
  • the encoding device and the decoding device in the embodiment of the present application may be electronic equipment, such as an electronic equipment with an operating system, or may be components in the electronic equipment, such as integrated circuits or chips.
  • the electronic device may be a terminal or other devices other than the terminal.
  • terminals may include but are not limited to the types of terminals 11 listed above, and other devices may be servers, network attached storage (Network Attached Storage, NAS), etc., which are not specifically limited in the embodiment of this application.
  • the decoding device provided by the embodiment of the present application can implement each process implemented by the method embodiment in Figure 11 and achieve the same technical effect. To avoid duplication, details will not be described here.
  • this embodiment of the present application also provides a communication device 1500, which includes a processor 1501 and a memory 1502.
  • the memory 1502 stores programs or instructions that can be run on the processor 1501, such as , when the communication device 1500 is a terminal, when the program or instruction is executed by the processor 1501, the steps of the above encoding method embodiment can be realized and the same technical effect can be achieved, or the steps of the above decoding method embodiment can be realized, and can achieve the same technical effect.
  • This embodiment of the present application also provides a terminal, including a processor and a communication interface.
  • the processor 1501 is configured to perform the following operations:
  • a target code stream is generated based on the first code stream, the second code stream and the third code stream.
  • processor 1501 is configured to perform the following operations:
  • the first information obtain geometric information corresponding to the target three-dimensional grid
  • connection information corresponding to the target three-dimensional grid
  • attribute information corresponding to the target three-dimensional grid is determined.
  • FIG. 16 is a schematic diagram of the hardware structure of a terminal that implements an embodiment of the present application.
  • the terminal 1600 includes but is not limited to: radio frequency unit 1601, network module 1602, audio output unit 1603, input unit 1604, sensor 1605, display unit 1606, user input unit 1607, interface unit 1607, memory 1609, processor 1610 and other components .
  • the terminal 1600 may also include a power supply (such as a battery) that supplies power to various components.
  • the power supply may be logically connected to the processor 1610 through a power management system, thereby managing charging, discharging, and power consumption through the power management system. Management and other functions.
  • the terminal structure shown in FIG. 16 does not constitute a limitation on the terminal.
  • the terminal may include more or fewer components than shown in the figure, or some components may be combined or arranged differently, which will not be described again here.
  • the input unit 1604 may include a graphics processor (Graphics Processing Unit, GPU) 16041 and a microphone 16042.
  • the graphics processor 16041 is responsible for the image capture device (GPU) in the video capture mode or the image capture mode. Process the image data of still pictures or videos obtained by cameras (such as cameras).
  • the display unit 1606 may include a display panel 16061, and the display panel 16071 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like.
  • the user input unit 1607 includes a touch panel 16071 and at least one of other input devices 16072. Touch panel 16071, also known as touch screen.
  • the touch panel 16071 may include two parts: a touch detection device and a touch controller.
  • Other input devices 16072 may include, but are not limited to, physical keyboards, functional keys (such as volume control buttons, switch buttons, etc.), trackball, mouse, and joystick, which will not be described in detail here.
  • the radio frequency unit 1601 after receiving downlink data from the network side device, the radio frequency unit 1601 can transmit it to the processor 1610 for processing; the radio frequency unit 1601 can send uplink data to the network side device.
  • the radio frequency unit 701 includes, but is not limited to, an antenna, amplifier, transceiver, coupler, low noise amplifier, duplexer, etc.
  • Memory 1609 may be used to store software programs or instructions as well as various data.
  • the memory 1609 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 instructions required for at least one function (such as a sound playback function, Image playback function, etc.) etc.
  • memory 1609 may include volatile memory or nonvolatile memory, or memory 1609 may include both volatile and nonvolatile memory.
  • non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), electrically removable memory.
  • Volatile memory can be random access memory (Random Access Memory, RAM), static random access memory (Static RAM, SRAM), dynamic random access memory (Dynamic RAM, DRAM), synchronous dynamic random access memory (Synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (Double Data Rate SDRAM, DDRSDRAM), enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (Synch link DRAM) , SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DRRAM).
  • RAM Random Access Memory
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • synchronous dynamic random access memory Synchronous DRAM, SDRAM
  • Double data rate synchronous dynamic random access memory Double Data Rate SDRAM, DDRSDRAM
  • Enhanced SDRAM, ESDRAM synchronous link dynamic random access memory
  • Synch link DRAM synchronous link dynamic random access memory
  • SLDRAM direct memory bus random access memory
  • the processor 1610 may include one or more processing units; optionally, the processor 1610 integrates an application processor and a modem processor, where the application processor mainly handles operations related to the operating system, user interface, application programs, etc., Modem processors mainly process wireless communication signals, such as baseband processors. It can be understood that the above modem processor may not be integrated into the processor 1610.
  • the processor 1610 is used to perform the following operations:
  • a target code stream is generated based on the first code stream, the second code stream and the third code stream.
  • processor 1601 is configured to perform the following operations:
  • the first information obtain geometric information corresponding to the target three-dimensional grid
  • connection information corresponding to the target three-dimensional grid
  • attribute information corresponding to the target three-dimensional grid is determined.
  • Embodiments of the present application also provide a readable storage medium.
  • Programs or instructions are stored on the readable storage medium.
  • the program or instructions are executed by a processor, each process of the above encoding method embodiment is implemented, or the above decoding method is implemented.
  • Each process of the embodiment can achieve the same technical effect, so to avoid repetition, it will not be described again here.
  • the processor is the processor in the terminal described in the above embodiment.
  • the readable storage medium includes computer readable storage media, such as computer read-only memory ROM, random access memory RAM, magnetic disk or optical disk, etc.
  • An embodiment of the present application further provides a chip.
  • the chip includes a processor and a communication interface.
  • the communication interface is coupled to the processor.
  • the processor is used to run programs or instructions to implement each of the above encoding method embodiments.
  • the process, or each process of implementing the above decoding method embodiment, can achieve the same technical effect. To avoid repetition, it will not be described again here.
  • chips mentioned in the embodiments of this application may also be called system-on-chip, system-on-a-chip, system-on-chip or system-on-chip, etc.
  • Embodiments of the present application further provide a computer program/program product.
  • the computer program/program product is stored in a storage medium.
  • the computer program/program product is executed by at least one processor to implement the above encoding method embodiment.
  • Each process, or each process that implements the above decoding method embodiment, can achieve the same technical effect. To avoid duplication, it will not be described again here.
  • the methods of the above embodiments can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is better. implementation.
  • the technical solution of the present application can be embodied in the form of a computer software product that is essentially or contributes to related technologies.
  • the computer software product is stored in a storage medium (such as ROM/RAM, disk, CD), including several instructions to cause a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in various embodiments of this application.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Graphics (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Multimedia (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

本申请公开了一种编码方法、解码方法及终端,属于编解码技术领域,本申请实施例的编码方法包括:编码端对目标三维网格对应的第一信息进行编码,获取第一码流;第一信息基于目标三维网格对应的几何信息确定;编码端根据第一重建网格对应的连接信息,确定第二码流,第一重建网格基于第一信息和目标三维网格确定;编码端根据目标信息和属性编码方式确定第三码流,目标信息包括第一重建网格对应的属性信息,或者包括目标三维网格以及目标三维网格对应的目标纹理图;编码端基于第一码流、第二码流和第三码流,生成目标码流。

Description

编码方法、解码方法及终端
相关申请的交叉引用
本申请主张在2022年04月12日在中国提交的中国专利申请No.202210378876.4的优先权,其全部内容通过引用包含于此。
技术领域
本申请属于编解码技术领域,具体涉及一种编码方法、解码方法及终端。
背景技术
三维网格(Mesh)可以被认为是过去多年来最流行的三维模型的表示方法,其在许多应用程序中扮演着重要的角色。它的表示简便,因此被大量以硬件算法集成到电脑、平板电脑和智能手机的图形处理单元中,专门用于渲染三维网格。
在所有使用三维网格的应用领域中,如计算模拟、娱乐、医学成像、数字化文物、计算机设计、电子商务等,对网格精度的要求一直在提高,所需要的数据量也快速增长,且当前大量的三维模型都需要通过互联网来访问。以上问题导致了三维网格的处理、可视化、传输和存储都越来越复杂。而三维网格压缩是解决上述问题的一个重要途径。它极大地减少了数据量的大小,有利于三维网格的处理、存储和传输。
通常来说,三维网格中最重要的信息也就是几何信息,因为它描述了三维物体的形状,对于几何信息的压缩可以使用基于视频的点云压缩标准进行压缩,同时,对于一些应用来说,不需要模型恢复到原始的精度,因此大多采用有损压缩,对于带有纹理图的三维网格,还需要对纹理图进行压缩。然而,在对三维网格的几何信息进行有损压缩之后,三维网格中各顶点对应的纹理坐标,与各顶点在该三维网格对应的纹理图中的位置之间的对应关系可能存在较大偏差,这导致在对几何信息进行重建之后,不能按照重建网格对纹理坐标进行正确的调整,进而导致编解码失败。
发明内容
本申请实施例提供一种编码方法、解码方法及终端,能够解决在对几何信息进行有损压缩的情况下,容易导致编解码失败的问题。
第一方面,提供了一种编码方法,该方法包括:
编码端对目标三维网格对应的第一信息进行编码,获取第一码流;所述第一信息基于所述目标三维网格对应的几何信息确定;
所述编码端根据第一重建网格对应的连接信息,确定第二码流,所述第一重建网格基于所述第一信息和所述目标三维网格确定;
所述编码端根据目标信息和属性编码方式确定第三码流,所述目标信息包括所述第一重建网格对应的属性信息,或者包括所述目标三维网格以及所述目标三维网格对应的目标纹理图;
所述编码端基于所述第一码流、所述第二码流和所述第三码流,生成目标码流。
第二方面,提供了一种解码方法,包括:
解码端对获取的目标码流进行分解,得到第一信息、解码信息、属性编码方式和第三码流;
所述解码端根据所述第一信息,获取目标三维网格对应的几何信息;
所述解码端根据所述解码信息,确定所述目标三维网格对应的连接信息;
所述解码端根据所述第三码流和所述属性编码方式,确定所述目标三维网格对应的属性信息。
第三方面,提供了一种编码装置,包括:
编码模块,用于对目标三维网格对应的第一信息进行编码,获取第一码流;所述第一信息基于所述目标三维网格对应的几何信息确定;
第一确定模块,用于根据第一重建网格对应的连接信息,确定第二码流,所述第一重建网格基于所述第一信息和所述目标三维网格确定;
第二确定模块,用于根据目标信息和属性编码方式确定第三码流,所述目标信息包括所述第一重建网格对应的属性信息,或者包括所述目标三维网格以及所述目标三维网格对应的目标纹理图;
生成模块,用于基于所述第一码流、所述第二码流和所述第三码流,生 成目标码流。
第四方面,提供了一种解码装置,包括:
分解模块,用于对获取的目标码流进行分解,得到第一信息、解码信息、属性编码方式和第三码流;
获取模块,用于根据所述第一信息,获取目标三维网格对应的几何信息;
第三确定模块,用于根据所述解码信息,确定所述目标三维网格对应的连接信息;
第四确定模块,用于根据所述第三码流和所述属性编码方式,确定所述目标三维网格对应的属性信息。
第五方面,提供了一种终端,该终端包括处理器和存储器,所述存储器存储可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第一方面所述的方法的步骤,或者实现如第二方面所述的方法的步骤。
第六方面,提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面所述的方法的步骤,或者实现如第二方面所述的方法的步骤。
第七方面,提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面所述的方法,或者实现如第二方面所述的方法。
第八方面,提供了一种计算机程序/程序产品,所述计算机程序/程序产品被存储在存储介质中,所述计算机程序/程序产品被至少一个处理器执行以实现如第一方面所述的方法的步骤,或者实现如第二方面所述的方法的步骤。
在本申请实施例中,对目标三维网格对应的第一信息进行编码,获取第一码流;根据第一重建网格对应的连接信息,确定第二码流,其中,第一重建网格基于第一信息和目标三维网格确定;根据目标信息和属性编码方式确定第三码流,其中,目标信息包括第一重建网格对应的属性信息,或者包括目标三维网格以及目标三维网格对应的目标纹理图;进而基于第一码流、第二码流和第三码流,生成目标码流。在上述技术方案中,根据属性编码方式,对第一重建网格对应的属性信息进行编码,得到第三码流;或者,根据属性 编码方式,使用目标三维网格以及目标纹理图,得到第三码流,以此,在对目标三维网格的几何信息进行有损压缩之后,可以通过上述方式得到属性信息码流,避免编码失败。
附图说明
图1是本申请实施例提供的编码方法的流程图;
图2是网格简化中合并顶点过程的示意图;
图3是基于网格的精细划分过程示意图;
图4是片(Patch)排列的八种方向示意图;
图5是高精度几何信息的编码过程示意图;
图6是原始片(raw patch)示意图;
图7是本申请实施例中编码连接性关系的示意图之一;
图8是本申请实施例中编码连接性关系的示意图之二;
图9是本申请实施例中属性信息编码的示意图;
图10(a)是本申请实施例中目标三维网格表征的图像;
图10(b)是本申请实施例中目标纹理图的效果图;
图10(c)是本申请实施例中重建纹理图的效果图;
图11是本申请实施例提供的解码方法的流程图;
图12是几何信息重建框图;
图13是本申请实施例提供的编码装置的结构图;
图14是本申请实施例提供的解码装置的结构图;
图15是本申请实施例提供的通信设备的结构图;
图16是本申请实施例提供的终端的硬件结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员所获得的所有其他实施例,都属于本申请保护的范围。
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的术语在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”所区别的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”一般表示前后关联对象是一种“或”的关系。
本申请实施例中的预测编码方法对应的预测编码装置和预测解码方法对应的预测解码装置均可以为终端,该终端也可以称作终端设备或者用户终端(User Equipment,UE),终端可以是手机、平板电脑(Tablet Personal Computer)、膝上型电脑(Laptop Computer)或称为笔记本电脑、个人数字助理(Personal Digital Assistant,PDA)、掌上电脑、上网本、超级移动个人计算机(ultra-mobile personal computer,UMPC)、移动上网装置(Mobile Internet Device,MID)、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、机器人、可穿戴式设备(Wearable Device)或车载设备(Vehicle User Equipment,VUE)、行人终端(Pedestrian User Equipment,PUE)、智能家居(具有无线通信功能的家居设备,如冰箱、电视、洗衣机或者家具等)、游戏机、个人计算机(personal computer,PC)、柜员机或者自助机等终端侧设备,可穿戴式设备包括:智能手表、智能手环、智能耳机、智能眼镜、智能首饰(智能手镯、智能手链、智能戒指、智能项链、智能脚镯、智能脚链等)、智能腕带、智能服装等。需要说明的是,在本申请实施例并不限定终端的具体类型。
下面结合附图,通过一些实施例及其应用场景对本申请实施例提供的编码方法进行详细地说明。
请参阅图1,图1是本申请提供的编码方法的流程图。本实施例提供的编码方法包括以下步骤:
S101,编码端对目标三维网格对应的第一信息进行编码,获取第一码流。
上述目标三维网格可以是任意视频帧对应的三维网格。
本步骤中,可以基于目标三维网格对应的几何信息,确定目标三维网格 对应的第一信息,进而对上述第一信息进行编码获取第一码流。有关于第一信息的具体定义,以及如何获取第一信息的具体技术方案,请参阅后续实施例。
S102,所述编码端根据第一重建网格对应的连接信息,确定第二码流。
本步骤中,编码端可以根据第一信息的编码信息进行几何重建。需要说明的是,此处的几何重建指的是通过编码信息进行三维坐标的获取。进一步的,编码端根据重建后的几何信息以及目标三维网格,进行网格重建,获取第一重建网格;根据第一重建网格,获取第一重建网格对应的连接信息。上述连接信息表征网格中顶点之间的连接关系。
需要说明的是,通过利用几何信息的编码信息进行网格重建,然后再基于第一重建网格进行连接信息的获取,能够保证获取的连接信息较为准确。
还需要说明的是,在获取到第一重建网格之后,编码端获取第一重建网格的连接信息,然后对连接信息进行编码,便可得到连接信息对应的码流,即第二码流。
S103,所述编码端根据目标信息和属性编码方式确定第三码流。
应理解,后续实施例中的状态标识可以用于表征该属性编码方式,上述目标信息包括第一重建网格对应的属性信息,或者包括目标三维网格以及目标三维网格对应的目标纹理图。
一种可选地实施方式为,在得到第一重建网格之后,获取第一重建网格对应的属性信息,编码端对属性信息进行编码,便可得到属性信息对应的码流,即第三码流。其中,上述属性信息包括但不限于网格UV坐标属性和纹理图。
另一种可选地实施方式为,使用目标三维网格以及目标三维网格对应的目标纹理图生成重建纹理坐标信息和重建纹理图,对上述重建纹理坐标信息和重建纹理图进行编码,便可得到属性信息对应的码流,即第三码流。
另一种可选地实施方式为,使用目标三维网格生成重建纹理坐标信息,使用上述重建纹理坐标信息、目标三维网格以及目标三维网格对应的目标纹理图生成重建纹理图,对上述重建纹理图进行编码,便可得到属性信息对应的码流,即第三码流。
S104,所述编码端基于所述第一码流、所述第二码流和所述第三码流,生成目标码流。
本步骤中,在得到第一码流、第二码流和第三码流之后,对上述第一码流、第二码流和第三码流进行混流,生成目标码流。
在本申请实施例中,对目标三维网格对应的第一信息进行编码,获取第一码流;根据第一重建网格对应的连接信息,确定第二码流,其中,第一重建网格基于第一信息和目标三维网格确定;根据目标信息和属性编码方式,确定第三码流,其中,目标信息包括第一重建网格对应的属性信息,或者包括目标三维网格以及目标三维网格对应的目标纹理图;进而基于第一码流、第二码流和第三码流,生成目标码流。在上述技术方案中,根据属性编码方式,对第一重建网格对应的属性信息进行编码,得到第三码流;或者,根据属性编码方式,使用目标三维网格以及目标纹理图,得到第三码流,以此,在对目标三维网格的几何信息进行有损压缩之后,可以通过上述方式得到属性信息码流,避免编码失败。
可选地,所述对目标三维网格对应的第一信息进行编码之前,包括:
在处于有损编码模式的情况下,对待编码的三维网格进行简化处理,得到目标三维网格;
在处于无损编码模式的情况下,将待编码的三维网格,确定为目标三维网格。
本步骤中,若对视频的编码模式为有损编码模式,则待编码的三维网格进行简化处理,将简化处理后的三维网格确定为目标三维网格,通过对三维网格进行简化处理,提高三维网格几何信息的压缩效率,有效减少数据量。
若对视频的编码模式为无损编码模式,则可以直接将待编码的三维网格,确定为目标三维网格。
可选地,所述对待编码的三维网格进行简化处理,得到目标三维网格包括:
所述编码端基于量化参数,对所述待编码的三维网格进行简化处理,获取目标三维网格。
需要说明的是,本申请中所说的量化参数主要包括X向、Y向和Z向三 个分量上的量化参数。
可选地,所述基于量化参数,对所述目标三维网格进行简化处理,获取目标三维网格,包括:
所述编码端在进行所述待编码的三维网格中的顶点合并时,将所述待编码的三维网格中的顶点合并后的至少部分顶点的位置坐标调整为量化参数的倍数,获取目标三维网格。
需要说明的是,通过在设置合并后的顶点的位置坐标时,考虑量化参数,将其设置为量化参数的倍数,该倍数可以为符合需求的任意值,以此能够确保在反量化时不需要额外的信息便可恢复顶点的原始位置,将减少高精度的几何信息所消耗的数据量。
下面对简化处理的具体实现方式说明如下。
对于输入的原始网格,即待编码的三维网格,首先进行网格简化的操作。网格简化的重点在于简化的操作以及对应的误差度量。这里的网格简化操作可以为基于边的简化。如图2所示,可以通过合并一条边的两个顶点来达到减少面片数和顶点数的目的。此外,还可通过基于点等网格简化方式对网格进行简化。
在网格简化的过程中需要定义简化的误差度量。例如,可以选取顶点所有相邻面的方程系数之和作为该顶点的误差度量,相应的边的误差度量即为边上两顶点的误差度量之和。在确定好简化操作的方式以及误差度量后就可以开始对网格进行简化。例如,可以将网格分为一片或多片局部网格,先计算片中初始网格的顶点误差来得到每条边的误差。然后将片内的所有边按误差按照某规则,如按照从小到大的规则进行排列。每次简化可以按照某种规则对边进行合并,如选取误差最小的边进行合并,同时计算合并后的顶点位置并更新所有与合并后顶点相关的边的误差,更新边排列的顺序。通过迭代将网格的面简化到某一预期数量。
具体过程包括:
1、顶点误差的计算
顶点误差可以定义为顶点所有相邻面的方程的系数之和。例如,每个相邻面都定义了一个平面,可以用公式一表示:
公式一:D2=(nTv+d)2=vT(nnT)v+2dnTv+d2
其中,D为任意顶点到平面的距离,n为平面的单位法向量,v为顶点的位置向量,d为常数。用二次曲面的形式表示为公式二:Q=(A,b,c)=(nnT,dn,d2);
其中,Q为顶点误差,A,b,c为表示公式一中相应符号的系数。
从公式二进而得到公式三:Q(v)=vTAv+2bTv+c;
由顶点误差为该顶点所有相邻面的方程系数之和,则可令公式四:Q1(v)+Q2(v)=(Q1+Q2)(v)=(A1+A2,b1+b2,c1+c2)(v)。其中,Q(v)为顶点误差,v为对应的顶点,Q1(v)为v相邻平面1的方程,Q2(v)为v相邻平面2的方程,A1,A2,b1,b2,c1,c2为各自相对应的系数。当然,若存在多个相邻面则可向公式四中继续添加相应的平面误差方程。
2、合并顶点
合并顶点过程的一个主要步骤为确定合并后顶点的位置。根据误差公式三,可以选择能让误差尽可能小的顶点位置。例对通过对公式三求偏导数,可以得到,公式四:
公式五:
由上式可知,只有在矩阵A可逆的情况下,才能求得使误差最小的点。因此,此处对于合并后的顶点位置可以有多种取法。如果考虑网格简化的质量,在矩阵A可逆的情况下,选取使误差最小的顶点位置;在矩阵A不可逆的情况下,可以选择边上包括两端点的其中一个使误差最小的点。如果考虑网格简化的复杂度,可以直接选取边的中点或者两端点的其中一个作为合并后的顶点的位置。如果考虑网格简化后量化的效率,还需要调整合并后的顶点位置。由于量化后对于高精度信息需要单独编码,因此,将一部分合并后的顶点位置调整为相应量化参数的倍数,确保在反量化时不需要额外的信息便可恢复原始位置,将减少高精度的几何信息所消耗的数据量。
确定了如何选取合并后的顶点位置后,便可以开始合并顶点的过程。例如,可以先计算初始网格中所有的边的误差,将其按误差按照某规格,如从小到大的顺序进行排列。每次迭代,选取误差满足某规则的边,如误差最小的边。从网格顶点中移除边的两个端点并添加合并后的顶点到网格顶点的集 合中。将合并前的两个顶点的所有或部分相邻顶点作为合并后的顶点的相邻顶点,然后更新与该合并顶点相连接的所有点的误差度量,从而得到新产生的边的误差。然后从片的全局来更新边的排列顺序。循环上述过程,直到达到满足有损编码所需要的面数。
3、更新连接关系
在合并顶点之后,由于顶点集中删除了一部分顶点,同时又添加了许多新的顶点,因此需要更新顶点之间的连接关系。例如,在合并顶点过程中可以确定合并后的顶点对应的合并之前的两个顶点。只需要用合并后的顶点的索引替换所有在面中出现的合并之前的两个顶点的索引,然后删除具有重复索引的面,就可以达到更新连接关系的目的。
以上即为网格简化的主要过程。同时,三维网格还可能会携带有属性信息,对属性信息也可能需简化。对于带有属性信息的网格,如纹理坐标,颜色,法向量等,可以将顶点坐标扩展到更高的维度从而计算带有属性信息的顶点误差。以纹理坐标为例,设顶点坐标为(x,y,z),纹理坐标为(u,v),则扩展后的顶点为(x,y,z,u,v)。设扩展后的三角形T=(p,q,r),为了确定高维空间上的误差度量,首先计算两个标准正交向量,即:
公式六:
公式七:
其中,e1,e2为T所在平面上的两个向量,q为,e2为,此处"·"代表向量的点乘,它定义了该高维平面上的一个坐标轴,以p为原点。考虑一个任意点v,另u=p-v,由公式八:‖u‖2=(u·e1)2+…+(μ·en)2
即公式九:(u·e3)2+…+(u·en)2=‖μ‖2-(μ·e1)2-(u·e2)2
由于e1,e2为T所在平面上的两个向量,则公式九左边项即为顶点到T所在平面的距离的平方,即公式十:D2=‖μ‖2-(μ·e1)2-(u·e2)2
对其进行展开并合并后可得到与公式三类似的方程,其中:
公式十一:
公式十二:b=(p·e1)e1+(p·e2)e2-p;
公式十三:c=p·p-(p·e1)2-(p·e2)2
得到上述误差度量后,则可以进行与之前三维信息一样的后续步骤,从 而实现了对于带有属性信息的网格的简化。
通常来说,图像的边缘部分更能吸引人们的注意力,从而影响人们对于该图像的质量评价。三维网格也是如此,人们往往更容易注意到边界部分。因此,是否保持边界也是网格简化中影响质量的一个因素。网格的边界一般为几何形状的边界以及纹理的边界。当一条边只属于一个面时,该边即为一个几何边界。当同一个顶点具有两个或多个纹理坐标时,该顶点即为纹理坐标的边界。在网格简化时,以上边界均不应被合并。因此,在每次简化时可以先判断该边上的顶点是否为边界点,若为边界点则跳过,直接进行下一次迭代。
可选地,所述对目标三维网格对应的第一信息进行编码,获取第一码流包括:
所述编码端对所述目标三维网格的几何信息进行量化,获取第一信息;
所述编码端对所述第一信息进行编码,获取第一码流。
上述几何信息可以理解为是目标三维网格中顶点的坐标,该坐标通常指的是三维坐标。
其中,上述第一信息包括以下至少一项:
A11、第一精度几何信息;
需要说明的是,该第一精度几何信息可以理解为低精度几何信息,即低精度几何信息指的是目标三维网格量化后的几何信息,即量化后的目标三维网格包括的各顶点三维坐标信息。
A12、第二精度几何信息;
需要说明的是,该第二精度几何信息可以理解为高精度几何信息,高精度几何信息可以看作是量化过程中丢失的几何信息,即丢失的三维坐标信息。
A13、补充点的信息;
需要说明的是,补充点的信息是指量化过程中产生的需要额外处理的点的信息,也就是说,所述补充点为量化过程中产生的需要额外处理的点,例如,坐标位置出现重叠的重复点等,通过对重复点进行处理,可以使得在反量化后恢复到原来的位置。
可选地,该补充点的信息,包括以下至少一项:
A131、补充点对应的第一精度几何信息中顶点的索引;
需要说明的是,通过标识索引,便可知道量化后的网格中,哪些点标识的是量化前的三维网格中的多个点,即量化前的三维网格中的多个点在量化后重合到了一起,通过顶点的索引便可确定补充点的低精度几何信息。
A132、补充点的第三精度几何信息;
需要说明的是,该第三精度几何信息可以理解为补充点的低精度几何信息,即补充点被量化后的三维坐标信息。
A133、补充点的第四精度几何信息;
需要说明的是,该第四精度几何信息可以理解为补充点的高精度几何信息,即补充点在被量化过程中丢失的三维坐标信息。
这里需要说明的是,在具体使用时,通过A131和A133或者通过A132和A133便可确定得到量化后隐藏的点有哪些。
需要说明的是,在得到第一信息后,便可以对这些第一信息进行编码,将编码得到的码流确定为第一码流。
可选地,所述对所述目标三维网格的几何信息进行量化,获取第一信息,包括:
所述编码端根据每一分量的量化参数,对所述目标三维网格中的每一顶点进行量化,获取第一精度几何信息。
需要说明的是,每一分量的量化参数可以根据使用需求灵活设置;量化参数主要包括X向、Y向和Z向三个分量上的量化参数。
通常情况下,对于精度要求不高的量化,在量化后可以只保留低精度几何信息;而对于精度要求较高的量化,在量化时不仅要记录低精度几何信息,也需要记录高精度几何信息,以此在解码时能够实现精准的网格恢复。
在上述情况下,可选地,所述对所述目标三维网格的几何信息进行量化,获取第一信息,包括:
所述编码端根据所述第一精度几何信息以及每一分量的量化参数,获取第二精度几何信息。
例如,假设某顶点的三维坐标为(x,y,z),量化参数为(QPx,QPy,QPz),低精度几何信息(xl,yl,zl)和高精度几何信息(xh,yh,zh)的计算过程如公式十 四至公式十九所示:
公式十四:xl=f1(x,QPx);
公式十五:yl=f1(y,QPy);
公式十六:zl=f1(z,QPz);
公式十七:xh=f2(x,xl,QPx);
公式十八:yh=f2(y,yl,QPy);
公式十九:zh=f2(z,zl,QPz);
其中,公式十四至公式十六中的f1函数是量化函数,量化函数的输入为某一维度的坐标和该维度的量化参数,输出为量化后的坐标值;公式十七至公式十九中的f2函数输入为原始坐标值、量化后的坐标值以及该维度的量化参数,输出为高精度的坐标值。
f1函数可以有多种计算方式,比较通用的一种计算方式如公式二十至公式二十二所示,使用每个维度的原始坐标除以该维度的量化参数来计算。其中,/为除法运算符,对除法运算的结果可以采用不同的方式进行舍入,如四舍五入、向下取整、向上取整等。f2函数也存在多种计算方式,与公式二十至公式二十二相对应的实现方式如公式二十三至公式二十五所示,其中,*为乘法运算符。
公式二十:xl=x/QPx
公式二十一:yl=y/QPy
公式二十二:zl=z/QPz
公式二十三:xh=x-xl*QPx
公式二十四:yh=y-yl*QPy
公式二十五:zh=z-zl*QPz
当量化参数为2的整数次幂时,f1函数和f2函数可以使用位运算实现,如公式二十六至公式三十一:
公式二十六:xl=x>>log2QPx
公式二十七:yl=y>>log2QPy
公式二十八:zl=z>>log2QPz
公式二十九:xh=x&(QPx-1);
公式三十:yh=y&(QPy-1);
公式三十一:zh=z&(QPz-1);
值得注意的是,无论f1函数和f2函数采用哪种计算方式,量化参数QPx、QPy和QPz都可以灵活设置。首先,不同分量的量化参数并不一定相等,可以利用不同分量的量化参数的相关性,建立QPx、QPy和QPz之间的关系,为不同分量设置不同的量化参数;其次,不同空间区域的量化参数也不一定相等,可以根据局部区域顶点分布的稀疏程度自适应的设置量化参数。
需要说明的是,高精度几何信息包含的是三维网格的轮廓的细节信息。为了进一步提高压缩效率,可以对高精度几何信息(xh,yh,zh)进一步处理。在三维网格模型中,不同区域的顶点高精度几何信息的重要程度是不同的。对于顶点分布稀疏的区域,高精度几何信息的失真并不会对三维网格的视觉效果产生较大影响。这时为了提高压缩效率,可以选择对高精度几何信息进一步量化,或者只保留部分点的高精度几何信息。
在进行量化的过程中,可能会存在多个点量化完重合到同一个位置。
在上述情况下,可选地,所述对所述目标三维网格的几何信息进行量化,获取第一信息,包括:
所述编码端根据所述目标三维网格的几何信息和所述第一精度几何信息,确定补充点的信息。
也就是说,在得到所有顶点的低精度几何信息后,将低精度几何信息重复的点作为补充点,单独进行编码。补充点的几何信息同样可以分为低精度几何信息和高精度几何信息两部分,根据应用对压缩失真的要求,可以选择保留所有补充点或者只保留其中一部分补充点。对补充点的高精度几何信息,也可以进行进一步量化,或者只保留部分点的高精度几何信息。
需要说明的是,在对目标三维网格的几何信息进行量化得到第一信息之后,需要对第一信息进行编码得到最终的码流。
可选地,所述对所述第一信息进行编码,获取第一码流包括:
所述编码端对所述第一信息进行处理,获取第二信息,所述第二信息包括占位图和几何图中的至少一项;
对所述第二信息进行编码,获取第一码流。
需要说明的是,因第一信息中包含的信息的种类不同,在对第一信息进行处理时,会分别对不同类的信息进行单独处理,下面分别从不同信息的角度,对获取第一码流的实现过程说明如下。
一、所述第一信息包括第一精度几何信息
可选地,在所述第一信息包括第一精度几何信息的情况下,所述对所述第一信息进行处理,获取第二信息,包括:
所述编码端对所述第一精度几何信息进行三维片划分;
所述编码端将划分的三维片进行二维投影,获取二维片;
所述编码端将所述二维片进行打包,获取二维图像信息;
所述编码端根据所述二维图像信息,获取第一精度的占位图和第一精度的几何图。
需要说明的是,此种情况下,主要是将低精度几何信息进行片(Patch)划分,得到多个三维片;此步骤的具体实现方式为:编码端确定第一精度几何信息中包含的每个顶点的投影平面;编码端根据所述投影平面对所述第一精度几何信息中所包含的顶点进行片划分;编码端对所述第一精度几何信息中所包含的顶点进行聚类,得到划分后的每一片。也就是说,对于Patch划分的过程主要包括:首先估计每个顶点的法向量,选择平面法向量与顶点法向量之间的夹角最小的候选投影平面作为该顶点的投影平面;然后,根据投影平面对顶点进行初始划分,将投影平面相同且连通的顶点组成patch;最后,使用精细划分算法优化聚类结果,得到最终的三维片(3-dimension patch,3D patch)。
下面对由第一精度几何信息得到三维片的过程的具体实现进行详细说明如下。
首先估计每个点的法向量。切线平面和它对应的法线是根据每个点的最近的邻居顶点m在一个预定义的搜索距离定义的。K-D树用于分离数据,并在点pi附近找到相邻点,该集合的重心用于定义法线。重心c的计算方法如下:
公式三十二:
使用特征分解法估计顶点法向量,计算过程公式三十三所示:
公式三十三:
在初始划分阶段,初步选择每个顶点的投影平面。设顶点法向量的估计值为候选投影平面的法向量为选择法向量方向与顶点法向量方向最接近的平面作为该顶点的投影平面,平面选择的计算过程如公式三十四所示:
公式三十四:
精细划分过程可以采用基于网格的算法来降低算法的时间复杂度,基于网格的精细划分算法流程如图3所示,具体包括:
先设置循环次数(numlteraions)为0,判断循环次数是否小于最大循环次数(需要说明的是,该最大循环次数可以根据使用需求设置),若小于则执行下述过程:
步骤301,将(x,y,z)几何坐标空间划分为体素。
需要说明的是,此处的几何坐标空间指的是由量化得到的第一精度几何信息所构成的几何坐标空间。例如,对于使用体素大小为8的10位Mesh,每个坐标上的体素数量将是1024/8=128,此坐标空间中的体素总数将是128×128×128。
步骤302,查找填充体素,填充体素是指网格中包含至少有一个点的体素。
步骤303,计算每个填充体素在每个投影平面上的平滑分数,记为voxScoreSmooth,体素在某投影平面的体素平滑分数是通过初始分割过程聚集到该投影平面的点的数量。
步骤304,使用KD-Tree分区查找近邻填充体素,记为nnFilledVoxels,即每个填充体素(在搜索半径内和/或限制到最大数量的相邻体素)的最近的填充体素。
步骤305,使用近邻填充体素在每个投影平面的体素平滑分数,计算每个填充体素的平滑分数(scoreSmooth),计算过程如公式三十五所示:
公式三十五:
其中,p是投影平面的索引,v是近邻填充体素的索引。一个体素中所有点的scoreSmooth是相同的。
步骤306,使用顶点的法向量与候选投影平面的法向量计算法向分数,记为scoreNormal,计算过程如公式三十六所示:
公式三十六:scoreNormal[i][p]=normal[i]·orientation[p];
其中,p是投影平面的索引,i是顶点的索引。
步骤307,使用scoreSmooth和scoreNormal计算每个体素在各个投影平面上的最终分数,计算过程如公式三十七所示:
公式三十七:
其中,i为顶点索引,p为投影平面的索引,v是顶点i所在的体素索引。
步骤308,使用步骤307中的分数对顶点进行聚类,得到精细划分的patch。
多次迭代上述过程,直到得到较为准确的patch。
进一步的,编码端将划分的三维片进行二维投影,获取二维片。
需要说的是,此过程是将3D patch投影到二维平面得到二维片(2-dimension patch,2D patch)。
编码端将所述二维片进行打包,获取二维图像信息。
需要说明的是,此步骤实现的是片打包(Patch packing),Patch packing的目的是将2D patch排列在一张二维图像上,Patch packing的基本原则是将patch不重叠的排列在二维图像上或者将patch的无像素部分进行部分重叠的排列在二维图像上,通过优先级排列、时域一致排列等算法,使patch排列的更加紧密,且具有时域一致性,提高编码性能。
假设,二维图像的分辨率为WxH,定义patch排列的最小块大小为T,它指定了放置在这个2D网格上的不同补丁之间的最小距离。
首先,patch按照不重叠的原则插入放置在2D网格上。每个patch占用由整数个TxT块组成的区域。此外,相邻patch之间要求至少有一个TxT块的距离。当没有足够的空间放置下一个patch时,图像的高度将变成原来的2倍,然后继续放置patch。
为了使patch排列的更加紧密,patch可以选择多种不同的排列方向。例如,可以采用八种不同的排列方向,如图4所示,包括0度、180度、90度、270度以及前四种方向的镜像。
为了获得更好的适应视频编码器帧间预测的特性,采用一种具有时域一致性的Patch排列方法。在一个框架组(Group of frame,GOF)中,第一帧的所有patch按照从大到小的顺序依次排列。对于GOF中的其他帧,使用时域一致性算法调整patch的排列顺序。
这里还需要说明的是,在得到二维图像信息后便能根据获取二维图像信息过程中的信息得到patch信息,之后便可以进行片信息的编码,获取片信息子码流;
这里需要说明的是,在进行二维图像信息过程中需要记录patch划分的信息、patch投影平面的信息以及patch packing位置的信息,所以patch信息记录的是获取二维图像过程中各步骤操作的信息,即patch信息包括:patch划分的信息、patch投影平面的信息以及patch packing位置的信息。
需要说明的是,对于获取占位图的过程,主要为:利用patch packing得到的patch排列信息,将二维图像中存在顶点的位置设为1,其余位置设为0,得到占位图。对于获取几何图的过程,主要为:在通过投影得到2D patch的过程中,保存了每个顶点到投影平面的距离,这个距离称为深度,低精度几何图压缩部分就是将2D patch中每个顶点的深度值,排列到该顶点在占位图中的位置上,得到低精度几何图。
二、第一信息包括第二精度几何信息
可选地,在所述第一信息包括第二精度几何信息的情况下,所述对所述第一信息进行处理,获取第二信息,包括:
所述编码端获取第一精度几何信息中所包含的顶点的排列顺序;
所述编码端将第一精度几何信息中所包含的顶点对应的第二精度几何信息排列在二维图像中,生成第二精度的几何图。
需要说明的是,高精度几何信息采用原始片(raw patch)的排列方式,将低精度几何图中的顶点对应的高精度几何信息排列在二维图像中,得到raw patch,以此便生成高精度几何图。主要分为三步,如图5所示,包括:
步骤501,获取顶点排列顺序,逐行从左向右扫描低精度几何图,将每个顶点的扫描顺序作为raw patch中顶点的排列顺序。
步骤502,生成raw patch。
需要说明的是,raw patch是将顶点的三维坐标按照如图4所示的方式逐行排列,形成的矩形patch。按照第一步中得到的顶点排列顺序,将顶点的高精度几何信息依次排列,得到高精度几何信息raw patch。
步骤503,将高精度几何信息放置在一张二维图像中,生成高精度几何图。
需要说明的是,在编码得到几何图子码流时,编码端是将对第一精度的几何图和第二精度的几何图进行编码,获取几何图子码流。
三、第一信息包括补充点的信息
可选地,在所述第一信息包括补充点的信息的情况下,所述对所述第一信息进行处理,获取第二信息,包括:
所述编码端将所述补充点的第三精度几何信息排列成第一原始片;
所述编码端按照与所述第一原始片相同的排列顺序,将所述补充点的第四精度几何信息排列成第二原始片;
所述编码端对所述第一原始片和所述第二原始片进行压缩,获取补充点的几何图。
需要说明的是,本申请实施例中对于补充点的几何信息分为的低精度部分和高精度部分分别进行编码。首先,按照任意顺序将补充点的低精度几何信息排列成补充点低精度raw patch;然后,按照与补充点低精度raw patch相同的顺序将高精度几何信息排列成补充点高精度raw patch;最后,对补充点低精度raw patch和高精度raw patch进行压缩,可以采用多种压缩方法。其中,一种方法是对raw patch中的值进行游程编码、熵编码等方式编码,另一种方法是,将补充点低精度raw patch加入低精度几何图中的空白区域,将补充点高精度raw patch加入高精度几何图中的空白区域,得到补充点的几何图。
可选地,所述根据第一重建网格对应的连接信息,确定第二码流包括:
所述编码端根据第一重建网格中相邻三角面片的空间夹角,确定第一空间范围内的待排序顶点,所述第一空间范围为所述第一重建网格中待编码三角形的目标顶点所在的空间范围,且所述待排序顶点包括所述目标顶点;
所述编码端对所述待排序顶点进行排序,得到所述目标顶点的排序信息;
所述编码端根据所述目标顶点的排序信息对应的编码信息,得到所述待 编码三角形的编码信息;
所述编码端按照第一预设规则,更新边集合;
所述编码端根据更新后的边集合,重新确定待编码三角形,直至得到所述第一重建网格中全部待编码三角形的编码信息;
所述编码端对所述全部待编码三角形的编码信息进行编码,得到所述第二码流;
其中,所述第一预设规则包括:将所述待编码三角形除第一边之外的两条边加入至所述边集合中,并在所述边集合中移除所述第一边。
本实施例中,编码端先基于目标三维网格对几何信息编码,然后重建几何信息,利用重建的几何信息的编码信息进行网格重建,然后再基于第一重建网格进行连接信息的获取,能够保证获取的连接信息较为准确。
这里重建后的几何信息包括目标三维网格中顶点的索引信息。
本申请实施例中,上述三维网络可划分为至少一个三角面片,每个三角面片中包含至少一个三角形。
基于三维网格中相邻三角面片的空间夹角,可以筛除第一空间范围内的部分顶点,并将剩余的部分顶点作为待排序顶点。
可选地,所述第一空间范围包括:
第一球体和第二球体之间的空间范围;
其中,所述第一球体和第二球体的球心相同,所述第一球体的半径和所述第二球体的半径不同,所述球心为所述待编码三角形的第一边中的目标位置,如球心为待编码三角形的第一边的中点。
本实施例中,按照预设排序准则对待排序顶点进行排序,例如该排序准则可以是按照顶点与待编码三角形的第一边的中点的距离进行排序,或者,该排序准则还可以是根据顶点与第一边形成的三角形外接圆的半径的大小进行排序。当然,该排序准则也可以是其他准则,此处不做具体限定。
这里,通过相邻三角面片的空间夹角,进一步删除第一空间范围内的顶点,减少了待排序顶点的数量,即可以减小目标顶点的排序信息所使用的比特信息,
可选地,所述编码端在满足目标条件的情况下,对目标顶点的排序信息 进行编码,得到所述编码信息,在不满足目标条件的情况下,对目标顶点的索引进行编码,得到上述编码信息。例如,该目标条件为所述第一空间范围内的待排序顶点的数量小于预设阈值,和/或,目标顶点的排序序号小于预设数值。由于在第一空间范围内的待排序顶点的数量较小或目标顶点的排序序号较小时,排序信息所对应的编码信息会占用较小的比特数,此时对目标顶点的排序信息进行编码,能够有效减小编码比特数。而对于待排序顶点的数量较大或目的顶点的排序序号较大的情况,对目标顶点的索引进行编码相比于对排序信息进行编码,能够有效地减小编码比特数。
本实施例中,在获得编码三角形的编码信息之后,编码端按照第一预设规则,更新边集合;编码端根据更新后的边集合,重新确定待编码三角形,直至三维网格中的三角形均得到编码信息。对第一重建网格中全部三角形的编码信息进行编码,得到第二码流。
其中,第一预设规则包括:将待编码三角形除第一边之外的两条边加入至边集合中,并在边集合中移除所述第一边。
本申请实施例中,根据三维网格中相邻三角面片的空间夹角,在第一空间范围内排除了部分顶点,并基于排除后的顶点确定待排序顶点,即减少了待排序顶点的数量,这样,在对目标顶点的排序信息进行编码时,能够进一步减少该编码信息所占用的比特数,进而有效提高编码效率。
可选地,所述根据第一重建网格中相邻三角面片的空间夹角,确定第一空间范围内的待排序顶点之前,所述方法包括:
所述编码端在第一重建网格对应的边集合中选取第一边,其中,所述边集合为所述第一重建网格中已编码三角形的至少一条边的集合;
所述编码端根据所述第一边和所述第一边对应的顶点,确定待编码三角形,其中,所述待编码三角形的目标顶点为所述第一边对应的顶点中除与所述第一边连接的两个顶点之外的顶点,所述目标顶点也可描述为所述第一边的对顶点。
可选地,所述根据第一重建网格中相邻三角面片的空间夹角,确定第一空间范围内的待排序顶点,包括:
所述编码端在待编码三角形为预设类别三角形之外的三角形的情况下, 根据所述相邻三角面片的空间夹角,确定第一空间范围内的待排序顶点。
可选地,所述预设类别三角形包括以下至少一项:
与已编码三角形之间的角度小于预设角度的三角形;
两个顶点重合或三个顶点共线的三角形。具体的,是指一个三角形中的两个顶点重合或三个顶点共线。
可选地,所述方法还包括:
所述编码端在所述待编码三角形为预设类别三角形的情况下,根据所述待编码三角形的目标顶点信息对应的编码信息,得到所述待编码三角形的编码信息。
例如,在上述待编码三角形为上述预设类别三角形的情况下,对待编码三角形的目标顶点的索引直接进行编码,并根据该目标顶点的索引对应的编码信息,得到上述待编码三角形的编码信息。
本申请实施例中,在对顶点的索引进行编码时,可以直接使用二进制表示或使用如哈夫曼等编码算法进行编码,此处对编码方法不做具体限定。
可选地,所述根据第一重建网格中相邻三角面片的空间夹角,确定第一空间范围内的待排序顶点,包括:
所述编码端在所述第一空间范围内的顶点中排除第一目标三角形的所有顶点,得到剩余顶点;
所述编码端根据所述剩余顶点,确定所述第一空间范围内的待排序顶点;
其中,所述第一目标三角形为与邻接的已编码三角形的夹角小于夹角阈值的三角形,且所述第一目标三角形的一条边与所述待编码三角形的第一边相同。
可选地,所述待编码三角形的编码信息还包括:所述夹角阈值的编码信息。
这里,通过对夹角阈值进行编码,使得解码端根据该编码信息可以获取该夹角阈值,并基于该夹角阈值确定第一空间范围内的待排序顶点,该方式中,编码端可以灵活地设置该夹角阈值。
当然,也可以预先约定固定的夹角阈值,编码端和解码端基于预先约定的夹角阈值,确定第一空间范围内的待排序顶点,编码端无需对该夹角阈值 进行编码。
可选地,所述方法还包括:
所述编码端对第二空间范围内的待编码三角形的目标顶点信息进行编码,得到所述待编码三角形的编码信息,所述第二空间范围为所述第一重建网格中除第一空间范围之外的范围。
可选地,所述待编码三角形的编码信息还包括所述第一空间范围的编码信息。
例如,对上述第一球体和第二球体的半径进行编码,该实现方式中可以灵活地设置第一空间范围。
当然,编码端和解码端也可预先预定第一空间范围的大小,则该方式中,编码端无需对该第一空间范围进行编码。
在本申请的一具体实施例中,在编码端将输入三维网格分为一个或多个片,在每个片中选取初始三角形,上述三维网格即第一重建网格。编码该初始三角形的顶点索引并把该初始三角形的边放入边的集合(即边集合)中。选取边集合中的某个边并确定它的对顶点,该边和对顶点组成的三角形即为待编码三角形。例如,可将每次迭代选取的边记为τ,它的对顶点记为v,编码该边相邻的待编码三角形。如图7和图8所示,编码连接性关系的过程可具体包括:
(1)在满足预设条件的情况下,可以直接编码该三角形的顶点索引,也可以对该三角形进行其他方式的编码。该预设条件可以是待编码三角形属于若干种特殊三角形,如属于退化面(有两点重合或三点共线)或该三角形与已编码三角形的夹角小于某角度时,或者,该预设条件为第一空间范围内的顶点的数量大于预设数量,或者,该预设条件为目标顶点位于第二空间范围之外,如位于第二空间范围内,或者,该预设条件内目标顶点在第一空间范围内的顶点中的排序序号大于预设或等于预设数值,该预设条件可以根据需求灵活地进行设置。将该待编码三角形除去边τ外的两条边加入边集合中,并从集合中移除边τ。然后从边集合中按照一定的准则取出该待编码三角形的另一条边(除边τ之外的边),继续编码该边邻接的三角形,例如可以采用存取的顺序来选择下一条边τ。
(2)在不满足上述预设条件的情况下,确定其对顶点v所处的空间范围(即上述第一空间范围)并编码该空间范围。遍历片内该空间范围内的所有顶点,筛除与边τ形成的与已编码邻接三角形夹角小于某角度的新三角形所有顶点,并编码该角度值。
该空间范围可以利用相邻三角面片的几何特性、空间夹角或其他准则确定。例如,空间范围可以采用以边τ的中点为球心,以最小半径Rmin和最大半径Rmax组合{Rmin,Rmax}的两个同心球间的部分,编码的是{Rmin,Rmax}组。
可选地,还可对上述角度值进行编码。
(3)遍历空间范围内的所有顶点,并按照一定的排序准则进行排序。例如该排序准测可以是顶点v到边τ的中点的距离;或者是与边τ形成的三角形的外接圆的半径。编码对顶点v在排序中的序号。
(4)将上述新编码三角形除去边τ外的两条边加入边集合中,并从边集合中移除边τ。然后从集合中按照一定的准则取出新编码三角形的另一条边,继续编码该边邻接的三角形。
对三维网格的每一个片迭代该编码过程,直到每个片中的三角形都完成编码。若边集合为空但存在尚未编码三角形,则从剩余未编码三角形中选取初始三角形,循环该编码过程。
可选地,所述编码端根据目标信息和属性编码方式确定第三码流包括:
在所述属性编码方式为第一属性编码方式的情况下,所述编码端根据所述第一重建网格对应的属性信息,确定第三码流;
在所述属性编码方式为第二属性编码方式或第三属性编码方式的情况下,所述编码端根据所述目标三维网格以及所述目标三维网格对应的目标纹理图,确定第三码流。
本实施例中,如上所述,可以用状态标识表征属性编码方式,该状态标识可以理解为一个自定义的开关标识。应理解,上述第一重建网格为对目标三维网格的几何信息进行有损压缩,再对有损压缩后的几何信息进行重建得到的三维网格。
当状态标识用于表征第一属性编码方式时,表示在对目标三维网格的几何信息进行有损压缩的过程中,目标三维网格中各顶点对应的纹理坐标,与 各顶点在目标三维网格对应的纹理图中的位置之间的对应关系未产生偏差,则对该第一重建网格对应的属性信息进行编码,得到第三码流。
当状态标识用于表征第二属性编码方式时,表示在对目标三维网格的几何信息进行有损压缩的过程中导致目标三维网格中各顶点对应的纹理坐标,与各顶点在目标三维网格对应的纹理图中的位置之间的对应关系可能存在较大偏差。这样,可以根据目标三维网格以及所述目标三维网格对应的目标纹理图,确定第三码流,上述第三码流包括第一子码流和第二子码流,其中,上述第一子码流为对属性信息中的重建纹理坐标信息进行编码后得到的子码流,上述第二子码流为对属性信息中的重建纹理图进行编码后得到的子码流。
当状态标识用于表征第三属性编码方式时,表示在对目标三维网格的几何信息进行有损压缩的过程中导致目标三维网格中各顶点对应的纹理坐标,与各顶点在目标三维网格对应的纹理图中的位置之间的对应关系可能存在较大偏差。这样,可以根据目标三维网格以及所述目标三维网格对应的目标纹理图,确定第三码流,且在上述编码方式中,只对重建纹理图进行编码,不对重建纹理坐标信息进行编码,以节省码率。
应理解,上述实施例和后续实施例中的重建纹理坐标信息是指重新生成的纹理坐标信息,重建纹理图是指重新生成的纹理图。
本实施例中,通过预先自定义设置状态标识,进而根据状态标识表征属性编码方式,对目标三维网格对应的属性信息进行编码,达到节省编码码率的目的。
可选地,所述属性信息包括纹理坐标信息和纹理图,所述纹理坐标信息用于表征所述目标三维网格中每个顶点对应的纹理坐标,所述根据所述第一重建网格对应的属性信息,确定第三码流包括:
所述编码端对第一目标坐标差值进行熵编码,得到第一子码流;所述第一目标坐标差值基于所述纹理坐标信息得到;
所述编码端对所述纹理图使用视频编码器进行编码,得到第二子码流;
所述编码端合并所述第一子码流和所述第二子码流,得到第三码流。
应理解,属性信息包括纹理坐标信息和纹理图,上述纹理坐标信息包括每个顶点对应的纹理坐标,即UV坐标,上述UV坐标用于表征对应的顶点 的纹理颜色值。
本实施例中,对编码后的几何信息进行重建,并基于重建后的几何信息和简化网格得到第一重建网格后,判断第一重建网格中各顶点对应的UV坐标是否与简化网格中该顶点对应的UV坐标是否一致,若不一致,则调整简化网格中的UV坐标的顺序使其与重建第一网格的顺序一致。
具体的如何确定坐标差值的技术方案,请参阅后续实施例。
在确定第一目标坐标差值之后,对该第一目标坐标差值进行熵编码,形成UV坐标子码流,上述UV坐标子码流又称为第一子码流。
本实施例中,在获取到第一重建网格对应的纹理图之后,可以直接使用视频编码器对纹理图进行编码,形成纹理图子码流,上述纹理图子码流又称为第二子码流。其中上述视频编码器包括但不限于高效视频编码(High Efficiency Video Coding,HEVC)编码器和多功能视频编码(Versatile Video Coding,VVC)编码器。
在得到第一子码流和第二子码流之后,对上述第一子码流和第二子码流进行混流,形成第三码流。
本实施例中,通过对第一目标坐标差值进行熵编码以及对纹理图使用视频编码器进行编码,形成第三码流,实现对属性信息的有效压缩,以此减少数据量。
可选地,所述对第一目标坐标差值进行熵编码,得到第一子码流之前,所述方法包括:
所述编码端在第一重建网格对应的边集合中选取第二边,所述边集合为所述纹理坐标信息表征的已编码三角形的至少一条边的集合;
所述编码端根据所述第二边和所述第二边对应的顶点,确定预测三角形;
所述编码端将所述第二边在所述预测三角形对应的顶点中除与所述第二边连接的两个顶点之外的顶点,确定为预测顶点;
所述编码端将所述预测顶点与真实顶点之间的坐标差值,确定为所述第一目标坐标差值;所述真实顶点为所述第二边在待编码三角形对应的顶点中除与所述第二边连接的两个顶点之外的顶点。
为便于理解,请参阅图9,在图9示出的场景中,τ1表示上述第二边, A1表示上述第二边对应的顶点。可以基于上述第二边和第二边对应的顶点确定三角形S1,对上述三角形S1使用平行四边形预测法,确定预测三角形S2。进一步的,将第二边在预测三角形对应的顶点中除与第二边连接的两个顶点之外的顶点,确定为预测顶点,即图9示出的A2点。
获取第一重建网格中的真实顶点,该真实顶点为第二边在待编码三角形对应的顶点中除与第二边连接的两个顶点之外的顶点,上述待编码三角形即图9中示出的S3,上述真实顶点即图9中示出的A3点,计算预测顶点与真实顶点之间的坐标差值,将上述坐标差值确定为第一目标坐标差值。
可选地,所述编码端根据所述目标三维网格以及所述目标三维网格对应的目标纹理图,确定第三码流包括:
在所述属性编码方式为第二属性编码方式的情况下,所述编码端对所述目标三维网格执行表面谱处理,得到重建纹理坐标信息;
所述编码端使用所述目标三维网格和所述目标纹理图和所述重建纹理坐标信息,对所述目标纹理图进行光珊化处理,得到重建纹理图;
所述编码端对第二目标坐标差值进行熵编码,得到第一子码流;所述第二目标坐标差值基于所述重建纹理坐标信息得到;
所述编码端对所述重建纹理图使用视频编码器进行编码,得到第二子码流;
所述编码端基于所述第一子码流和所述第二子码流,得到第三码流。
可选地,可以使用等距表格(isometric charts,ISO-charts)算法得到重建纹理坐标信息,以下,详细阐述对目标三维网格执行表面谱处理的具体实施方式:
1、表面谱分析
表面谱分析基于等距特征映射(isometric feature mapping,IsoMap)降维方法对目标三维网格进行参数化。具体而言,包括以下步骤:
a)计算表面点之间的测地距离平方的对称矩阵DN
b)对DN进行双中心化和归一化得BN,其计算过程如下所示:
公式三十八:
其中,I是N维单位矩阵,1是长度为N的单位向量。
c)计算BN的特征值λi及相应的特征向量
d)对于原始表面的每个点i,它在新空间中的嵌入为N维向量它的第j个元素的计算过程如下所示:
公式三十九:
BN的特征值λi和相应的特征向量构成了表面形状的谱分解。
此外,由于高维空间到低维空间的映射不是等距的,该参数化会导致畸变失真。对于每个顶点i,其在嵌入下的测地距离畸变失真(Geodesic Distance Distortion,GDD)定义如下所示:
公式四十:
其中,是顶点i的n维嵌入坐标,dgeo(i,j)是点i和点j之间的测地距离。
当n=2时,表面谱分析产生一个所有顶点的GDD平方和最小的表面参数化。
2、拉伸优化
由于三维空间到二维空间不是等距的,参数化会导致畸变失真,为了消除失真现象,需要进行拉伸优化处理。
假设一个带有二维纹理坐标p1,p2,p3的三角形T,其中pi=(si,ti),相应的三维坐标表示为q1,q2,q3,仿射映射S(p)=S(s,t)=q的计算过程如下所示:
公式四十一:S(p)=((p,p2,p3>q1+<p,p3,p1>q2+<p,p1,p2>q3)/<p1,p2,p3>
其中,<a,b,c>表示三角形abc的面积。由于该映射是仿射的,所以它的偏导数在(s,t)上是常数,其计算过程如下所示:
公式四十二:
公式四十三:
其中,A=<p1,p2,p3>=((s2-s1)(t3-t1)-(s3-s1)(t2-t1))/2
然后计算得矩阵[SS,St]的较大和较小奇异值,计算过程如下所示:
公式四十四:
公式四十五:
其中,a=Ss·Ss,b=Ss·St,c=St·St。奇异值γmax,γmin表示单位长度向量从二维纹理域映射到三维表面时获得的最大长度和最小长度,即最大和最小的 局部“拉伸”。在三角形T上的两个拉伸测度定义如下所示:
公式四十六:
公式四十七:L(T)=γmax
在整个三维网格M={Ti}上拉伸测度的定义如下所示:
公式四十八:
公式四十九:
其中,A′(Ti)是三角形Ti在三维空间中的表面面积。
使用上述公式四十八和公式四十九对目标三维网格进行拉伸优化处理。
3、表面谱聚类
通过表面谱聚类将拉伸优化处理后的目标三维网格划分为多个图表(charts),具体的算法过程如下:
a)将来自谱分析的特征值和相应的特征向量进行从大到小排序,即λ1≥λ2≥...≥λN
b)得到使λnn+1最大化的前n个特征值和特征向量(n≤10)。
c)对目标三维网格中的每个顶点i,计算它的n维嵌入坐标(j=1,2,,...,n)。
d)对n个嵌入坐标的每一个,找到坐标最大和最小的两个点,并把它们设置为2n个代表点。
e)移走那些距离小于距离阈值的代表点,产生m≤2n个代表点,可选地,距离阈值为目标三维网格平均边缘长度的10倍。
f)在代表点周围同时进行聚类处理,将三维网格划分为m个charts。
4、边界优化
在得到多个charts后,使用graph cut算法对各个charts之间的边界进行优化。具体而言,定义相邻的charts中的一个charts为chartA,另一个charts为chartB,这两个charts之间存在一个中间区域C,计算中间区域C中的两个相邻三角形fi和fj之间的容量(capacity),随后使用maximum flow算法和/或minimum cut算法根据上述capacity找到边界边,确定相邻三角形fi和fj划分至chartA还是chartB,从而产生了chart A和chart B之间新的边界。
上述capacity的定义如下所述:
公式五十:c(fi,fj)=αcang(fi,fj)+(1-α)cdistort(fi,fj)
以下,具体阐述公式五十的计算过程:
公式五十一:
其中,dang(fi,fj)=1-cosαij,αij是三角形fi和fj法线之间的角度,avg(dang)是相邻三角形之间的平均角距离。
公式五十二:
公式五十三:ddistort(fi,fj)=|GDDA(fi)-GDDB(fi)|+|GDDA(fj)-GDDB(fj)|
其中,GDDA(fi)和GDDB(fi)分别是三角形fi在chart A或chart B诱导下嵌入的GDD,avg(ddistort)是所有相邻三角形对上的上的ddistort(fi,fj)的平均,α为权重参数。
最后,利用chart packing的算法把上述过程生成的charts打包到二维纹理域上,生成重建纹理坐标信息。
以下,详细阐述对目标纹理图进行光珊化处理的具体实施方式:
a)首先计算目标三维网格对应的包围盒(bounding box)大小,获得最大搜索距离。
b)计算第二重建网格在纹理空间中的边界边。
c)将目标三维网格中的面划分为均匀的子网格(grid)。
d)遍历第二重建网格中的所有面,对目标纹理图进行光珊化处理,得到重建纹理图。
以下具体阐述针对第二重建网格中的一个面,对目标纹理图进行光珊化处理的过程:
计算当前面(第二重建网格中的任意一个表面)在纹理空间中的包围盒大小,在该包围盒范围内采样出各个像素的中心点,得到当前面在目标纹理图中的像素位置,可选地,上述像素位置为三个像素点的位置。
在最大搜索距离内搜索目标三维网格中距离上述三个像素点最近的三个像素点,以此得到目标三维网格中与该当前面对应的表面,将该表面称为最近面。
计算最近面的三个像素点在目标纹理图中对应的像素位置,以及每个像素位置对应的RGBA值;其中,上述RGBA值是指像素点对应的红色(Red) 绿色(Green)蓝色(Blue)和阿尔法(Alpha)的色彩空间。将上述RGBA值赋值给重建纹理图中该三个像素点对应的像素位置。
可选地,可以将边界边上像素点的Alpha值转化为255来平滑边界。可选地,可以使用拉推(pull push)填充算法对重建纹理图进行填充,以节省码流。
为便于理解,请参阅图10(a)至图10(c),图10(a)为目标三维网格表征的图像,图10(b)为目标纹理图的效果图,图10(c)为重建纹理图的效果图。
本实施例中,在得到重建纹理坐标信息之后,判断目标三维网格中各顶点对应的UV坐标与重建纹理坐标信息表征的该顶点对应的重建UV坐标是否一致,若不一致,则可以调整目标三维网格中各顶点对应的UV坐标,使其与该顶点对应的重建UV坐标一致。
具体的确定第二坐标差值的实施方式与确定第一坐标差值的实施方式相同,在此不做重复阐述。
在确定第二目标坐标差值之后,对该第二目标坐标差值进行熵编码,形成UV坐标子码流,上述UV坐标子码流又称为第一子码流。本实施例中,在获取到重建纹理图之后,可以直接使用视频编码器对重建纹理图进行编码,形成纹理图子码流,上述纹理图子码流又称为第二子码流。对上述第一子码流和第二子码流进行混流,形成第三码流。
可选地,所述编码端根据所述目标三维网格以及所述目标三维网格对应的目标纹理图,确定第三码流包括:
在所述属性编码方式为第三属性编码方式的情况下,所述编码端对所述目标三维网格执行表面谱处理,得到重建纹理坐标信息;
所述编码端使用所述目标三维网格、所述目标纹理图和所述重建纹理坐标信息,对所述目标纹理图进行光珊化处理,得到重建纹理图;
所述编码端对所述重建纹理图使用视频编码器进行编码,得到第三码流。
如上所述,在状态标识表征第三属性编码方式的情况下,只对重建纹理图进行编码以生成第三码流。
本实施例中,在属性编码方式为第三属性编码方式的情况下,对目标三 维网格执行表面谱处理,得到重建纹理坐标信息。应理解,对目标三维网格执行表面谱处理的具体实施方式与上述实施例中提及的表面谱处理的具体实施方式一致,在此不做重复阐述。
在得到重建纹理坐标信息之后,使用目标三维网格、目标纹理图和重建纹理坐标信息,对目标纹理图进行光珊化处理,得到重建纹理图。应理解,对目标纹理图进行光珊化处理的具体实施方式与上述实施例中提及的光珊化处理的具体实施方式一致,在此不做重复阐述。
本实施例中,由于状态标识表征第三属性编码方式,因此只对重建纹理图使用视频编码器进行编码,得到第三码流,以此节省了编码码率。
下面结合附图,通过一些实施例及其应用场景对本申请实施例提供的解码方法进行详细地说明。
请参阅图11,图11是本申请提供的解码方法的流程图。本实施例提供的解码方法包括以下步骤:
S1101,解码端对获取的目标码流进行分解,得到第一信息、解码信息、属性编码方式和第三码流。
该目标码流可以是编码端对上述目标三维网格进行编码后的码流。解码端在进行解码时,先解码几何信息,再根据几何信息解码连接性关系。
该第一信息和第三码流分别与上述实施例中的第一信息和第三码流定义相同,在此不做重复阐述。
如上所述,可以用状态标识表征属性编码方式。
S1102,所述解码端根据所述第一信息,获取目标三维网格对应的几何信息。
解码端对第一信息执行反量化操作,得到目标三维网格,具体的如何获取目标三维网格的技术方案,请参阅后续实施例。
S1103,所述解码端根据所述解码信息,确定所述目标三维网格对应的连接信息。
解码端根据解码信息,确定目标三维网格中的每个三角形,以此获得目标三维网格对应的连接信息。具体如何根据解码信息,确定目标三维网格中的每个三角形的技术方案,请参阅后续实施例。
S1104,所述解码端根据所述第三码流和所述属性编码方式,确定所述目标三维网格对应的属性信息。
解码端根据第三码流和属性编码方式,确定目标三维网格对应的属性信息,如上所述,属性信息包括但不限于网格UV坐标属性和纹理图。具体的如何根据第三码流和属性编码方式确定目标三维网格对应的属性信息的技术方案,请参阅后续实施例。
本申请实施例中,对获取的目标码流进行分解,得到第一信息、解码信息、属性编码方式和第三码流;根据第一信息,获取目标三维网格对应的几何信息;根据解码信息,确定目标三维网格对应的连接信息;根据第三码流和属性编码方式,确定目标三维网格对应的属性信息。在上述技术方案中,根据上述属性编码方式确定对第三码流的解码方式,得到正确的属性信息,避免解码失败。
对获取的目标码流进行分解,得到第一信息包括:
所述解码端根据获取的目标码流,获取目标子码流,所述目标子码流包括:片信息子码流、占位图子码流和几何图子码流;
所述解码端根据所述目标子码流,获取第二信息,所述第二信息包括:占位图和几何图中的至少一项;
所述解码端根据所述第二信息,获取所述第一信息。
可选地,在所述第一信息包括第一精度几何信息的情况下,所述根据所述第二信息,获取第一信息,包括:
所述解码端根据第一精度的占位图和第一精度的几何图,获取二维图像信息;
所述解码端根据所述二维图像信息,获取二维片;
所述解码端根据所述片信息子码流对应的片信息对所述二维片进行三维逆投影,获取三维片;
所述解码端根据所述三维片,获取第一精度几何信息。
可选地,在所述第一信息包括第二精度几何信息的情况下,所述根据所述第二信息,获取第一信息,包括:
所述解码端根据第二精度的几何图,获取第二精度几何信息。
可选地,在所述第一信息包括补充点的信息的情况下,所述根据所述第二信息,获取第一信息,包括:
所述解码端根据补充点的几何图,确定所述补充点的第三精度几何信息对应的第一原始片以及所述补充点的第四精度几何信息对应的第二原始片;
所述解码端根据所述第一原始片和所述第二原始片,确定补充点的信息。
需要说明的是,本申请实施例中对于补充点的几何信息分为的低精度部分和高精度部分分别进行解码。首先,对补充点的几何图进行解压缩,可以采用多种解压缩方法。其中,一种方法是对几何图进行游程解码、熵解码等方式解码,另一种方法是,将补充点低精度raw patch从低精度几何图中取出,将补充点高精度raw patch从高精度几何图中取出。然后,按照特定顺序从补充点低精度raw patch中获取补充点的低精度几何信息,按照特定顺序从补充点高精度raw patch中获取高精度几何信息;这里需要说明的是,该特定顺序是解码端通过解析码流得到的,即编码端采用何种顺序生成补充点低精度raw patch和补充点高精度raw patch通过码流告知解码端。
可选地,所述根据所述第一信息,获取目标三维网格对应的几何信息包括:
所述解码端根据第一精度几何信息以及每一分量的量化参数,确定所述第一精度几何信息中的每一顶点的坐标;
所述解码端根据所述目标三维网格中的每一顶点的坐标以及第二精度几何信息,确定所述目标三维网格对应的几何信息。
需要说明的是,本申请实施例中的几何信息重建过程是利用patch信息、占位图、低精度几何图和高精度几何图等信息,重建三维几何模型的过程。具体过程如图12所示,主要包括以下四步:
步骤1201,获取2D patch;
需要说明的是,获取2D patch是指利用patch信息从占位图和几何图中分割出2D patch的占位信息和深度信息。Patch信息中包含了每个2D patch的包围盒在占位图和低精度几何图中的位置和大小,利用patch信息、占位图和低精度几何图可以直接获取到2D patch的占位信息和低精度几何信息。对于高精度几何信息,利用低精度几何图的顶点扫描顺序,将高精度raw patch 中的高精度几何信息与低精度几何图顶点进行对应,从而得到2D patch的高精度几何信息。对于补充点的几何信息,直接解码补充点的低精度raw patch和高精度raw patch即可获得补充点的低精度几何信息和高精度几何信息。
步骤1202,重建3D patch;
需要说明的是,重建3D patch是指利用2D patch中的占位信息和低精度几何信息,将2D patch中的顶点重建为低精度3D patch。2D patch的占位信息中包含了顶点在patch投影平面局部坐标系中相对于坐标原点的位置,深度信息包含了顶点在投影平面法线方向上的深度值。因此,利用占位信息和深度信息可以在局部坐标系中将2D patch重建为低精度3D patch。
步骤1203,重建低精度几何模型;
需要说明的是,重建低精度几何模型是指利用重建的低精度3D patch,重建整个低精度三维几何模型。Patch信息中包含了3D patch由局部坐标系转换成三维几何模型全局坐标系的转换关系,利用坐标转换关系将所有的3D patch转换到全局坐标系下,就得到了低精度三维几何模型。此外,对于补充点,直接利用低精度raw patch中的几何信息,得到补充点在全局坐标系下的低精度坐标值,从而得到完整的低精度三维几何模型。
步骤1204,重建高精度几何模型;
重建高精度几何模型是指在低精度几何模型的基础上,利用高精度几何信息,重建高精度几何模型的过程。在获取2D patch的过程中,将高精度几何信息与低精度几何信息进行了对应,根据顶点的高精度几何信息和低精度几何信息可以重建出顶点的高精度三维坐标。根据应用的要求,可以选择重建全部顶点的高精度三维坐标,也可以重建部分顶点的高精度三维坐标。高精度三维坐标(xr,yr,zr)的计算过程,如公式五十四至公式五十六所示:
公式五十四:xr=f3(xl,xh,QPx);
公式五十五:yr=f3(yl,yh,QPy);
公式五十六:zr=f3(zl,zh,QPz);
f3函数是重建函数,重建函数的计算过程与编码端量化函数的计算过程相对应,有多种实现方式。如果f1函数采用式公式二十至公式二十五的实现方式,则重建函数的实现方式如公式五十七至公式五十九所示:
公式五十七:xr=xl*QPx+xh
公式五十八:yr=yl*QPy+yh
公式五十九:zr=zl*QPz+zh
如果f1函数采用公式二十六至公式三十一的实现方式,则重建函数的实现方式如公式六十至公式六十二所示:
公式六十:xr=(xl<<log2QPx)|xh
公式六十二:yr=(yl<<log2QPy)|yh
公式六十一:zr=(zl<<log2QPz)|zh
可选地,所述根据所述第一信息,获取目标三维网格对应的几何信息,还包括:
所述解码端将补充点的信息以及所述第一精度几何信息中的每一顶点的坐标,确定所述目标三维网格对应的几何信息。
可选地,
所述补充点的信息,包括以下至少一项:
补充点对应的第一精度几何信息中顶点的索引;
补充点的第三精度几何信息,所述第三精度几何信息为补充点被量化后的三维坐标信息;
补充点的第四精度几何信息,所述第四精度几何信息为补充点在被量化过程中丢失的三维坐标信息。
可选地,所述根据所述解码信息,确定所述目标三维网格对应的连接信息包括:
在解码信息包括目标顶点的排序信息的情况下,所述解码端根据目标三维网格中相邻三角面片的空间夹角,确定第一空间范围内的待排序顶点,并对所述待排序顶点进行排序;其中,所述排序信息为所述目标顶点在第一空间范围内的待排序顶点中的序号,所述第一空间范围为目标三维网格中待解码三角形的目标顶点所在的空间范围;
所述解码端根据所述待排序顶点的排序结果和所述目标顶点的排序信息,在所述待排序顶点中确定所述待解码三角形的目标顶点;
所述解码端根据所述目标顶点和所述待解码三角形的第一边,确定所述 待解码三角形;
所述解码端按照第二预设规则,更新边集合;
所述解码端根据更新后的边集合,重新确定第一边,直至确定所述目标三维网格中的每个待解码三角形;
其中,所述第二预设规则包括:将所述待解码三角形除所述第一边之外的两条边加入至所述边集合中,并在所述边集合中移除所述第一边。
上述顶点信息可以为顶点的索引。
本实施例中,按照预设排序准则对待排序顶点进行排序,例如该排序准则可以是按照顶点与待编码三角形的第一边的中点的距离进行排序,或者,该排序准则还可以是根据顶点与第一边形成的三角形外接圆的半径的大小进行排序。当然,该排序准则也可以是其他准则,此处不做具体限定。
可选地,所述方法还包括:
在所述解码信息包括所述目标顶点的顶点信息的情况下,所述解码端根据所述顶点信息确定所述待解码三角形的目标顶点。
可选地,所述方法还包括:
所述解码端根据所述解码信息,获取第二空间范围内的待解码三角形的目标顶点信息,所述第二空间范围为所述目标三维网格中除第一空间范围之外的范围;
所述解码端根据所述目标顶点信息,确定所述待解码三角形的目标顶点。
可选地,所述根据目标三维网格中相邻三角面片的空间夹角,确定第一空间范围内的待排序顶点包括:
所述解码端在所述第一空间范围内的顶点中排除第二目标三角形的所有顶点,得到剩余顶点;
所述解码端根据所述剩余顶点,确定所述第一空间范围内的待排序顶点;
其中,所述第二目标三角形为与邻接的已解码三角形的夹角小于夹角阈值的三角形,且所述第二目标三角形的一条边与所述待解码三角形的第一边相同。
可选地,所述方法还包括:
所述解码端根据所述解码信息,获取所述夹角阈值的信息。
可选地,所述方法还包括:
所述解码端根据所述解码信息,获取所述第一空间范围的信息。
例如,根据该解码信息,获取上述两个球体的半径信息。
在本申请的一具体实施例中,在解码端先解码几何信息,再根据几何信息解码连接性关系,解码连接性关系的过程可具体包括:
(1)解码初始三角形的顶点,并将初始三角形的边存入边集合中。按照编码器中使用的准则从边集合中取出边τ。若待解码的码字为顶点索引,则直接解码该顶点并将其作为对顶点v。以该顶点v和边τ形成新解码出的三角形,并将该三角形除去边τ外的两条边加入边集合中,以某种规则移除集合中的边τ,如按照队列顶端的准则移除边τ。按某规则取出下一个边并继续解码该边邻接三角形,例如可以取出队列顶部的边作为该规则。
(2)若待解码的码字不为顶点索引,则解码并且确定对顶点v的空间范围。例如解码τ中点的两个同心球半径{Rmin,Rmax},遍历同心球间范围内的所有顶点,筛除与边τ形成的与已解码三角形的夹角小于某角度的新三角形的所有顶点。
(3)对于对顶点v所在空间范围内的剩余顶点,按照与编码端相同的排序准则对顶点进行排序。解码待解码三角形中的对顶点v对应的序号,并查表得到对顶点v,构建解码三角形。将新解码三角形除去边τ外的两条边加入边集合中,以某种规则移除集合中的边τ,如按照队列顶端的准则移除边τ。按某规则取出下一个边并继续解码该边邻接三角形,例如可以取出队列顶部的边作为该规则。
对每一个片的码流迭代该解码过程,直到每个片中的三角形都完成解码。最终将片合并为一个完整的网格。
可选地,所述第三码流包括第一子码流和第二子码流,所述属性信息包括纹理坐标信息和纹理图,所述纹理坐标信息用于表征所述目标三维网格中每个顶点对应的纹理坐标;
所述根据所述第三码流和所述属性编码方式,确定所述目标三维网格对应的属性信息包括:
在所述属性编码方式为第一属性编码方式的情况下,所述解码端基于所 述第一子码流,确定所述目标三维网格中每个顶点对应的纹理坐标;
所述解码端对所述第二子码流使用视频解码器进行解码,得到所述目标三维网格对应的纹理图。
应理解,第三码流包括第一子码流和第二子码流,属性信息包括纹理坐标信息以及纹理图。
本实施例中,对上述第三码流进行分解,得到第一子码流和第二子码流。根据该第一子码流,确定每个顶点对应的纹理坐标。具体的如何确定每个顶点对应的纹理坐标的技术方案,请参阅后续实施例。
本实施例中,可以直接使用视频解码器对纹理图进行编码,得到目标三维网格对应的纹理图,上述纹理图的文件格式可以是jpg、png等格式。其中上述视频解码器包括但不限于HEVC解码器和VVC解码器。
可选地,所述基于所述第一子码流,确定所述目标三维网格中每个顶点对应的纹理坐标包括:
所述解码端对所述第一子码流进行熵解码,获得每个已解码三角形对应的预测残差;
所述解码端对于任意一个已解码三角形,在目标三维网格对应的边集合中选取第二边,所述边集合为所述目标三维网格中已解码三角形的至少一条边的集合;
所述解码端根据所述第二边和所述第二边对应的顶点,确定预测三角形;
所述解码端将所述第二边在所述预测三角形对应的顶点中除与所述第二边连接的两个顶点之外的顶点,确定为预测顶点;
所述解码端根据所述预测顶点和所述预测残差,确定所述已解码三角形对应的真实顶点,所述真实顶点在所述目标三维网格中的坐标为纹理坐标。
解码端对第一子码流进行熵解码,获得每个已解码三角形对应的预测残差。将每个三角形对应的预测顶点的坐标与对应的预测残差进行加法运算,得到该三角形对应的真实顶点。
确定三角形对应的预测顶点的过程是上述确定预测顶点的逆过程:在目标三维网格对应的边集合中选取第二边;根据第二边和所述第二边对应的顶点,使用平行四边形法则确定预测三角形;将第二边在预测三角形对应的顶 点中除与第二边连接的两个顶点之外的顶点,确定为预测顶点。其中,上述边集合为目标三维网格中已解码三角形的至少一条边的集合。
可选地,所述根据所述第三码流和所述属性编码方式,确定所述目标三维网格对应的属性信息包括:
在所述属性编码方式为第二属性编码方式的情况下,所述解码端基于所述第一子码流,确定所述目标三维网格中每个顶点对应的重建纹理坐标;
所述解码端对所述第二子码流使用视频解码器进行解码,得到所述目标三维网格对应的重建纹理图。
本实施例中,在属性编码方式为第二属性编码方式的情况下,表示第三码流包括第一子码流和第二子码流,如上所述,第一子码流为对重建纹理坐标信息进行编码后的码流;第二子码流为对重建纹理图进行编码后的码流。这种情况下,解码端基于第一子码流,确定目标三维网格中每个顶点对应的重建纹理坐标;对第二子码流使用视频解码器进行解码,得到目标三维网格对应的重建纹理图。
可选地,所述根据所述第三码流和所述属性编码方式,确定所述目标三维网格对应的属性信息包括:
在所述属性编码方式为第三属性编码方式的情况下,所述解码端基于所述第三码流,确定所述目标三维网格中每个顶点对应的重建纹理坐标;
所述解码端对所述第三码流使用视频解码器进行解码,得到所述目标三维网格对应的重建纹理图。
本实施例中,在属性编码方式为第三属性编码方式的情况下,表示第三码流包括第二子码流,如上所述,第二子码流为对重建纹理图进行编码后的码流。这种情况下,解码端对第二子码流使用视频解码器进行解码,得到目标三维网格对应的重建纹理图。
本实施例中,在属性编码方式为第三属性编码方式的情况下,表示第三码流包括对重建纹理图进行编码后的第二子码流。这种情况下,对第二子码流使用视频解码器进行解码,得到目标三维网格对应的重建纹理图;解码端解码得到每个顶点的重建纹理坐标值对应的残差值,利用解码后的几何信息得到每个顶点的预测纹理坐标值,再使用上述重建纹理坐标值和预测纹理坐 标值,确定目标纹理坐标值,即目标纹理坐标信息。
本申请实施例提供的编码方法,执行主体可以为编码装置。本申请实施例中以编码装置执行编码方法为例,说明本申请实施例提供的编码装置。
如图13所示,编码装置1300包括:
编码模块1301,用于对目标三维网格对应的第一信息进行编码,获取第一码流;
第一确定模块1302,用于根据第一重建网格对应的连接信息,确定第二码流;
第二确定模块1303,用于根据目标信息和属性编码方式确定第三码流;
生成模块1304,用于基于所述第一码流、所述第二码流和所述第三码流,生成目标码流。
可选地,所述编码装置1300还包括:
简化模块,用于在处于有损编码模式的情况下,对待编码的三维网格进行简化处理,得到目标三维网格;
确定模块,用于在处于无损编码模式的情况下,将待编码的三维网格,确定为目标三维网格。
可选地,所述简化模块,具体用于:
基于量化参数,对所述待编码的三维网格进行简化处理,获取目标三维网格。
可选地,所述简化模块,还具体用于:
在进行所述待编码的三维网格中的顶点合并时,将所述待编码的三维网格中的顶点合并后的至少部分顶点的位置坐标调整为量化参数的倍数,获取目标三维网格。
可选地,所述编码模块1301,具体用于:
对所述目标三维网格的几何信息进行量化,获取第一信息;
对所述第一信息进行编码,获取第一码流。
可选地,所述编码模块1301,还具体用于:
根据每一分量的量化参数,对所述目标三维网格中的每一顶点进行量化,获取第一精度几何信息。
可选地,所述编码模块1301,还具体用于:
根据所述第一精度几何信息以及每一分量的量化参数,获取第二精度几何信息。
可选地,所述编码模块1301,还具体用于:
根据所述目标三维网格的几何信息和所述第一精度几何信息,确定补充点的信息。
可选地,所述编码模块1301,还具体用于:
对所述第一信息进行处理,获取第二信息;
对所述第二信息进行编码,获取第一码流。
可选地,所述编码模块1301,还具体用于:
对第一精度几何信息进行三维片划分;
将划分的三维片进行二维投影,获取二维片;
将所述二维片进行打包,获取二维图像信息;
根据所述二维图像信息,获取第一精度的占位图和第一精度的几何图。
可选地,所述编码模块1301,还具体用于:
根据获取二维图像信息过程中的信息,获取片信息;
对所述片信息进行编码,获取片信息子码流。
可选地,所述编码模块1301,还具体用于:
获取第一精度几何信息中所包含的顶点的排列顺序;
将第一精度几何信息中所包含的顶点对应的第二精度几何信息排列在二维图像中,生成第二精度的几何图。
可选地,所述编码模块1301,还具体用于:
对第一精度的几何图和第二精度的几何图进行编码,获取几何图子码流。
可选地,所述编码模块1301,还具体用于:
将所述补充点的第三精度几何信息排列成第一原始片;
按照与所述第一原始片相同的排列顺序,将所述补充点的第四精度几何信息排列成第二原始片;
对所述第一原始片和所述第二原始片进行压缩,获取补充点的几何图。
可选地,所述第一确定模块1302,具体用于:
根据第一重建网格中相邻三角面片的空间夹角,确定第一空间范围内的待排序顶点;
所述编码端对所述待排序顶点进行排序,得到所述目标顶点的排序信息;
根据所述目标顶点的排序信息对应的编码信息,得到所述待编码三角形的编码信息;
按照第一预设规则,更新边集合;
根据更新后的边集合,重新确定待编码三角形,直至得到所述第一重建网格中全部待编码三角形的编码信息;
对所述全部待编码三角形的编码信息进行编码,得到所述第二码流。
可选地,所述第一确定模块1302,还具体用于:
在第一重建网格对应的边集合中选取第一边;
根据所述第一边和所述第一边对应的顶点,确定待编码三角形。
可选地,所述第一确定模块1302,还具体用于:
在待编码三角形为预设类别三角形之外的三角形的情况下,根据所述相邻三角面片的空间夹角,确定第一空间范围内的待排序顶点。
可选地,所述第一确定模块1302,还具体用于:
在所述待编码三角形为预设类别三角形的情况下,根据所述待编码三角形的目标顶点信息对应的编码信息,得到所述待编码三角形的编码信息。
可选地,所述第一确定模块1302,还具体用于:
在所述第一空间范围内的顶点中排除第一目标三角形的所有顶点,得到剩余顶点;
根据所述剩余顶点,确定所述第一空间范围内的待排序顶点;
可选地,所述第一确定模块1302,还具体用于:
对第二空间范围内的待编码三角形的目标顶点信息进行编码,得到所述待编码三角形的编码信息。
可选地,所述第二确定模块1303,具体用于:
在属性编码方式为第一属性编码方式的情况下,根据所述第一重建网格对应的属性信息,确定第三码流;
在属性编码方式为第二属性编码方式或第三属性编码方式的情况下,根 据所述目标三维网格以及所述目标三维网格对应的目标纹理图,确定第三码流。
可选地,所述第二确定模块1303,还具体用于:
对第一目标坐标差值进行熵编码,得到第一子码流;
所述编码端对所述纹理图使用视频编码器进行编码,得到第二子码流;
所述编码端合并所述第一子码流和所述第二子码流,得到第三码流。
可选地,所述第二确定模块1303,还具体用于:
在第一重建网格对应的边集合中选取第二边;
根据所述第二边和所述第二边对应的顶点,确定预测三角形;
将所述第二边在所述预测三角形对应的顶点中除与所述第二边连接的两个顶点之外的顶点,确定为预测顶点;
将所述预测顶点与真实顶点之间的坐标差值,确定为所述第一目标坐标差值。
可选地,所述第二确定模块1303,还具体用于:
在属性编码方式为第二属性编码方式的情况下,对所述目标三维网格执行表面谱处理,得到重建纹理坐标信息;
使用所述目标三维网格、所述目标纹理图和所述重建纹理坐标信息,对所述目标纹理图进行光珊化处理,得到重建纹理图;
对第二目标坐标差值进行熵编码,得到第一子码流;
对所述重建纹理图使用视频编码器进行编码,得到第二子码流;
基于所述第一子码流和所述第二子码流,得到第三码流。
可选地,所述第二确定模块1303,还具体用于:
在属性编码方式为第三属性编码方式的情况下,对所述目标三维网格执行表面谱处理,得到重建纹理坐标信息;
使用所述目标三维网格、所述目标纹理图和所述重建纹理坐标信息,对所述目标纹理图进行光珊化处理,得到重建纹理图;
对所述重建纹理图使用视频编码器进行编码,得到第三码流。
在本申请实施例中,对目标三维网格对应的第一信息进行编码,获取第一码流;根据第一重建网格对应的连接信息,确定第二码流,其中,第一重 建网格基于第一信息和目标三维网格确定;根据目标信息和属性编码方式确定第三码流,其中,目标信息包括第一重建网格对应的属性信息,或者包括目标三维网格以及目标三维网格对应的目标纹理图;进而基于第一码流、第二码流和第三码流,生成目标码流。在上述技术方案中,根据属性编码方式,对第一重建网格对应的属性信息进行编码,得到第三码流;或者,根据属性编码方式,使用目标三维网格以及目标纹理图,得到第三码流,以此,在对目标三维网格的几何信息进行有损压缩之后,可以通过上述方式得到属性信息码流,避免编码失败。
本申请实施例提供的编码装置能够实现图1的编码方法实施例实现的各个过程,并达到相同的技术效果,为避免重复,这里不再赘述。
本申请实施例提供的解码方法,执行主体可以为解码装置。本申请实施例中以解码装置执行解码方法为例,说明本申请实施例提供的解码装置。
如图14所示,解码装置1400包括:
分解模块1401,用于对获取的目标码流进行分解,得到第一信息、解码信息、属性编码方式,和第三码流;
获取模块1402,用于根据所述第一信息,获取目标三维网格对应的几何信息;
第三确定模块1403,用于根据所述解码信息,确定所述目标三维网格对应的连接信息;
第四确定模块1404,用于根据所述第三码流和所述属性编码方式,确定所述目标三维网格对应的属性信息。
可选地,所述分解模块1401,具体用于:
根据获取的目标码流,获取目标子码流;
根据所述目标子码流,获取第二信息;
根据所述第二信息,获取所述第一信息。
可选地,所述分解模块1401,还具体用于:
根据第一精度的占位图和第一精度的几何图,获取二维图像信息;
根据所述二维图像信息,获取二维片;
根据所述片信息子码流对应的片信息对所述二维片进行三维逆投影,获 取三维片;
根据所述三维片,获取第一精度几何信息。
可选地,所述分解模块1401,还具体用于:
根据第二精度的几何图,获取第二精度几何信息。
可选地,所述分解模块1401,还具体用于:
根据补充点的几何图,确定所述补充点的第三精度几何信息对应的第一原始片以及所述补充点的第四精度几何信息对应的第二原始片;
根据所述第一原始片和所述第二原始片,确定补充点的信息。
可选地,所述获取模块1402,具体用于:
根据第一精度几何信息以及每一分量的量化参数,确定所述第一精度几何信息中的每一顶点的坐标;
根据所述目标三维网格中的每一顶点的坐标以及第二精度几何信息,确定所述目标三维网格对应的几何信息。
可选地,所述获取模块1402,还具体用于:
将补充点的信息以及所述第一精度几何信息中的每一顶点的坐标,确定所述目标三维网格对应的几何信息。
可选地,第三确定模块1403,具体用于:
在解码信息包括目标顶点的排序信息的情况下,根据目标三维网格中相邻三角面片的空间夹角,确定第一空间范围内的待排序顶点,并对所述待排序顶点进行排序;
根据所述待排序顶点的排序结果和所述目标顶点的排序信息,在所述待排序顶点中确定所述待解码三角形的目标顶点;
根据所述目标顶点和所述待解码三角形的第一边,确定所述待解码三角形;
按照第二预设规则,更新边集合;
根据更新后的边集合,重新确定第一边,直至确定所述目标三维网格中的每个待解码三角形。
可选地,所述第三确定模块1403,还具体用于:
在所述解码信息包括所述目标顶点的顶点信息的情况下,根据所述顶点 信息确定所述待解码三角形的目标顶点。
可选地,所述第三确定模块1403,还具体用于:
根据所述解码信息,获取第二空间范围内的待解码三角形的目标顶点信息;
根据所述目标顶点信息,确定所述待解码三角形的目标顶点。
可选地,所述第三确定模块1403,还具体用于:
在所述第一空间范围内的顶点中排除第二目标三角形的所有顶点,得到剩余顶点;
根据所述剩余顶点,确定所述第一空间范围内的待排序顶点。
可选地,所述第三确定模块1403,还具体用于:
根据所述解码信息,获取所述夹角阈值的信息。
可选地,所述第三确定模块1403,还具体用于:
根据所述解码信息,获取所述第一空间范围的信息。
可选地,第四确定模块1404,具体用于:
在所述属性编码方式为第一属性编码方式的情况下,基于所述第一子码流,确定所述目标三维网格中每个顶点对应的纹理坐标;
对所述第二子码流使用视频解码器进行解码,得到所述目标三维网格对应的纹理图。
可选地,第四确定模块1404,还具体用于:
对所述第一子码流进行熵解码,获得每个已解码三角形对应的预测残差;
对于任意一个已解码三角形,在目标三维网格对应的边集合中选取第二边;
根据所述第二边和所述第二边对应的顶点,确定预测三角形;
将所述第二边在所述预测三角形对应的顶点中除与所述第二边连接的两个顶点之外的顶点,确定为预测顶点;
根据所述预测顶点和所述预测残差,确定所述已解码三角形对应的真实顶点。
可选地,第四确定模块1404,还具体用于:
在所述属性编码方式为第二属性编码方式的情况下,基于所述第一子码 流,确定所述目标三维网格中每个顶点对应的重建纹理坐标;
对所述第二子码流使用视频解码器进行解码,得到所述目标三维网格对应的重建纹理图。
可选地,第四确定模块1404,还具体用于:
在所述属性编码方式为第三属性编码方式的情况下,所述解码端基于所述第三码流,确定所述目标三维网格中每个顶点对应的重建纹理坐标;
所述解码端对所述第三码流使用视频解码器进行解码,得到所述目标三维网格对应的重建纹理图。
本申请实施例中,对获取的目标码流进行分解,得到第一信息、属性编码方式、解码信息和第三码流;根据第一信息,获取目标三维网格对应的几何信息;根据解码信息,确定目标三维网格对应的连接信息;根据第三码流和属性编码方式,确定目标三维网格对应的属性信息。在上述技术方案中,根据上述属性编码方式确定对第三码流的解码方式,得到正确的属性信息,避免解码失败。
本申请实施例中的编码装置和解码装置可以是电子设备,例如具有操作系统的电子设备,也可以是电子设备中的部件、例如集成电路或芯片。该电子设备可以是终端,也可以为除终端之外的其他设备。示例性的,终端可以包括但不限于上述所列举的终端11的类型,其他设备可以为服务器、网络附属存储器(Network Attached Storage,NAS)等,本申请实施例不作具体限定。
本申请实施例提供的解码装置能够实现图11的方法实施例实现的各个过程,并达到相同的技术效果,为避免重复,这里不再赘述。
可选地,如图15所示,本申请实施例还提供一种通信设备1500,包括处理器1501和存储器1502,存储器1502上存储有可在所述处理器1501上运行的程序或指令,例如,该通信设备1500为终端时,该程序或指令被处理器1501执行时实现上述编码方法实施例的各个步骤,且能达到相同的技术效果,或实现上述解码方法实施例的各个步骤,且能达到相同的技术效果。
本申请实施例还提供一种终端,包括处理器和通信接口,处理器1501用于执行以下操作:
对目标三维网格对应的第一信息进行编码,获取第一码流;
根据第一重建网格对应的连接信息,确定第二码流;
根据目标信息和属性编码方式确定第三码流;
基于所述第一码流、所述第二码流和所述第三码流,生成目标码流。
或者,处理器1501用于执行以下操作:
对获取的目标码流进行分解,得到第一信息、解码信息、属性编码方式和第三码流;
根据所述第一信息,获取目标三维网格对应的几何信息;
根据所述解码信息,确定所述目标三维网格对应的连接信息;
根据所述第三码流和所述属性编码方式,确定所述目标三维网格对应的属性信息。
该终端实施例与上述终端侧方法实施例对应,上述方法实施例的各个实施过程和实现方式均可适用于该终端实施例中,且能达到相同的技术效果。具体地,图16为实现本申请实施例的一种终端的硬件结构示意图。
该终端1600包括但不限于:射频单元1601、网络模块1602、音频输出单元1603、输入单元1604、传感器1605、显示单元1606、用户输入单元1607、接口单元1607、存储器1609、以及处理器1610等部件。
本领域技术人员可以理解,终端1600还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器1610逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图16中示出的终端结构并不构成对终端的限定,终端可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。
应理解的是,本申请实施例中,输入单元1604可以包括图形处理器(Graphics Processing Unit,GPU)16041和麦克风16042,图形处理器16041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元1606可包括显示面板16061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板16071。用户输入单元1607包括触控面板16071以及其他输入设备16072中的至少一种。触控面板16071,也称为触摸屏。触控面板16071可包括触摸检测装置和触摸控制器两个部分。其他输入设备16072可以包括但不限于物理键盘、功能 键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。
本申请实施例中,射频单元1601接收来自网络侧设备的下行数据后,可以传输给处理器1610进行处理;射频单元1601可以向网络侧设备发送上行数据。通常,射频单元701包括但不限于天线、放大器、收发信机、耦合器、低噪声放大器、双工器等。
存储器1609可用于存储软件程序或指令以及各种数据。存储器1609可主要包括存储程序或指令的第一存储区和存储数据的第二存储区,其中,第一存储区可存储操作系统、至少一个功能所需的应用程序或指令(比如声音播放功能、图像播放功能等)等。此外,存储器1609可以包括易失性存储器或非易失性存储器,或者,存储器1609可以包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synch link DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本申请实施例中的存储器1609包括但不限于这些和任意其它适合类型的存储器。
处理器1610可包括一个或多个处理单元;可选的,处理器1610集成应用处理器和调制解调处理器,其中,应用处理器主要处理涉及操作系统、用户界面和应用程序等的操作,调制解调处理器主要处理无线通信信号,如基带处理器。可以理解的是,上述调制解调处理器也可以不集成到处理器1610中。
其中,处理器1610用于执行以下操作:
对目标三维网格对应的第一信息进行编码,获取第一码流;
根据第一重建网格对应的连接信息,确定第二码流;
根据目标信息和属性编码方式确定第三码流;
基于所述第一码流、所述第二码流和所述第三码流,生成目标码流。
或者,处理器1601用于执行以下操作:
对获取的目标码流进行分解,得到第一信息、解码信息、属性编码方式和第三码流;
根据所述第一信息,获取目标三维网格对应的几何信息;
根据所述解码信息,确定所述目标三维网格对应的连接信息;
根据所述第三码流和所述属性编码方式,确定所述目标三维网格对应的属性信息。
本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述编码方法实施例的各个过程,或实现上述解码方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
其中,所述处理器为上述实施例中所述的终端中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器ROM、随机存取存储器RAM、磁碟或者光盘等。
本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述编码方法实施例的各个过程,或实现上述解码方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
应理解,本申请实施例提到的芯片还可以称为系统级芯片,系统芯片,芯片系统或片上系统芯片等。
本申请实施例另提供了一种计算机程序/程序产品,所述计算机程序/程序产品被存储在存储介质中,所述计算机程序/程序产品被至少一个处理器执行以实现上述编码方法实施例的各个过程,或实现上述解码方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或 者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对相关技术做出贡献的部分可以以计算机软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。

Claims (46)

  1. 一种编码方法,包括:
    编码端对目标三维网格对应的第一信息进行编码,获取第一码流;所述第一信息基于所述目标三维网格对应的几何信息确定;
    所述编码端根据第一重建网格对应的连接信息,确定第二码流,所述第一重建网格基于所述第一信息和所述目标三维网格确定;
    所述编码端根据目标信息和属性编码方式确定第三码流,所述目标信息包括所述第一重建网格对应的属性信息,或者包括所述目标三维网格以及所述目标三维网格对应的目标纹理图;
    所述编码端基于所述第一码流、所述第二码流和所述第三码流,生成目标码流。
  2. 根据权利要求1所述的方法,其中,所述对目标三维网格对应的第一信息进行编码之前,包括:
    在处于有损编码模式的情况下,对待编码的三维网格进行简化处理,得到目标三维网格;
    在处于无损编码模式的情况下,将待编码的三维网格,确定为目标三维网格。
  3. 根据权利要求2所述的方法,其中,所述对待编码的三维网格进行简化处理,得到目标三维网格包括:
    所述编码端基于量化参数,对所述待编码的三维网格进行简化处理,获取目标三维网格。
  4. 根据权利要求3所述的方法,其中,所述基于量化参数,对所述目标三维网格进行简化处理,获取目标三维网格,包括:
    所述编码端在进行所述待编码的三维网格中的顶点合并时,将所述待编码的三维网格中的顶点合并后的至少部分顶点的位置坐标调整为量化参数的倍数,获取目标三维网格。
  5. 根据权利要求1所述的方法,其中,所述对目标三维网格对应的第一信息进行编码,获取第一码流包括:
    所述编码端对所述目标三维网格的几何信息进行量化,获取第一信息,所述第一信息包括以下至少一项:第一精度几何信息、第二精度几何信息、补充点的信息;
    所述编码端对所述第一信息进行编码,获取第一码流;
    其中,所述第一精度几何信息为所述目标三维网格量化后的几何信息,所述第二精度几何信息为所述目标三维网格量化过程中丢失的几何信息,所述补充点的信息为量化过程中产生的需要额外处理的点的信息。
  6. 根据权利要求5所述的方法,其中,所述对所述目标三维网格的几何信息进行量化,获取第一信息,包括:
    所述编码端根据每一分量的量化参数,对所述目标三维网格中的每一顶点进行量化,获取第一精度几何信息。
  7. 根据权利要求5所述的方法,其中,所述对所述目标三维网格的几何信息进行量化,获取第一信息,包括:
    所述编码端根据所述第一精度几何信息以及每一分量的量化参数,获取第二精度几何信息。
  8. 根据权利要求5所述的方法,其中,所述对所述目标三维网格的几何信息进行量化,获取第一信息,包括:
    所述编码端根据所述目标三维网格的几何信息和所述第一精度几何信息,确定补充点的信息。
  9. 根据权利要求5所述的方法,其中,所述对所述第一信息进行编码,获取第一码流包括:
    所述编码端对所述第一信息进行处理,获取第二信息,所述第二信息包括占位图和几何图中的至少一项;
    对所述第二信息进行编码,获取第一码流。
  10. 根据权利要求9所述的方法,其中,在所述第一信息包括第一精度几何信息的情况下,所述对所述第一信息进行处理,获取第二信息,包括:
    所述编码端对所述第一精度几何信息进行三维片划分;
    所述编码端将划分的三维片进行二维投影,获取二维片;
    所述编码端将所述二维片进行打包,获取二维图像信息;
    所述编码端根据所述二维图像信息,获取第一精度的占位图和第一精度的几何图。
  11. 根据权利要求10所述的方法,其中,所述将所述二维片进行打包,获取二维图像信息之后,所述方法包括:
    所述编码端根据获取二维图像信息过程中的信息,获取片信息;
    所述编码端对所述片信息进行编码,获取片信息子码流。
  12. 根据权利要求9所述的方法,其中,在所述第一信息包括第二精度几何信息的情况下,所述对所述第一信息进行处理,获取第二信息,包括:
    所述编码端获取第一精度几何信息中所包含的顶点的排列顺序;
    所述编码端将第一精度几何信息中所包含的顶点对应的第二精度几何信息排列在二维图像中,生成第二精度的几何图。
  13. 根据权利要求9所述的方法,其中,所述对所述第二信息进行编码,包括:
    所述编码端对第一精度的几何图和第二精度的几何图进行编码,获取几何图子码流。
  14. 根据权利要求9所述的方法,其中,在所述第一信息包括补充点的信息的情况下,所述对所述第一信息进行处理,获取第二信息,包括:
    所述编码端将所述补充点的第三精度几何信息排列成第一原始片;
    所述编码端按照与所述第一原始片相同的排列顺序,将所述补充点的第四精度几何信息排列成第二原始片;
    所述编码端对所述第一原始片和所述第二原始片进行压缩,获取补充点的几何图。
  15. 根据权利要求1所述的方法,其中,所述根据第一重建网格对应的连接信息,确定第二码流包括:
    所述编码端根据第一重建网格中相邻三角面片的空间夹角,确定第一空间范围内的待排序顶点,所述第一空间范围为所述第一重建网格中待编码三角形的目标顶点所在的空间范围,且所述待排序顶点包括所述目标顶点;
    所述编码端对所述待排序顶点进行排序,得到所述目标顶点的排序信息;
    所述编码端根据所述目标顶点的排序信息对应的编码信息,得到所述待 编码三角形的编码信息;
    所述编码端按照第一预设规则,更新边集合;
    所述编码端根据更新后的边集合,重新确定待编码三角形,直至得到所述第一重建网格中全部待编码三角形的编码信息;
    所述编码端对所述全部待编码三角形的编码信息进行编码,得到所述第二码流;
    其中,所述第一预设规则包括:将所述待编码三角形除第一边之外的两条边加入至所述边集合中,并在所述边集合中移除所述第一边。
  16. 根据权利要求15所述的方法,其中,所述根据第一重建网格中相邻三角面片的空间夹角,确定第一空间范围内的待排序顶点之前,所述方法包括:
    所述编码端在第一重建网格对应的边集合中选取第一边,其中,所述边集合为所述第一重建网格中已编码三角形的至少一条边的集合;
    所述编码端根据所述第一边和所述第一边对应的顶点,确定待编码三角形,其中,所述待编码三角形的目标顶点为所述第一边对应的顶点中除与所述第一边连接的两个顶点之外的顶点。
  17. 根据权利要求16所述的方法,其中,所述根据第一重建网格中相邻三角面片的空间夹角,确定第一空间范围内的待排序顶点,包括:
    所述编码端在待编码三角形为预设类别三角形之外的三角形的情况下,根据所述相邻三角面片的空间夹角,确定第一空间范围内的待排序顶点。
  18. 根据权利要求16所述的方法,其中,所述方法还包括:
    所述编码端在所述待编码三角形为预设类别三角形的情况下,根据所述待编码三角形的目标顶点信息对应的编码信息,得到所述待编码三角形的编码信息。
  19. 根据权利要求15所述的方法,其中,所述根据第一重建网格中相邻三角面片的空间夹角,确定第一空间范围内的待排序顶点,包括:
    所述编码端在所述第一空间范围内的顶点中排除第一目标三角形的所有顶点,得到剩余顶点;
    所述编码端根据所述剩余顶点,确定所述第一空间范围内的待排序顶点;
    其中,所述第一目标三角形为与邻接的已编码三角形的夹角小于夹角阈值的三角形,且所述第一目标三角形的一条边与所述待编码三角形的第一边相同。
  20. 根据权利要求15所述的方法,其中,所述方法还包括:
    所述编码端对第二空间范围内的待编码三角形的目标顶点信息进行编码,得到所述待编码三角形的编码信息,所述第二空间范围为所述第一重建网格中除第一空间范围之外的范围。
  21. 根据权利要求1所述的方法,其中,所述编码端根据目标信息和属性编码方式确定第三码流包括:
    在所述属性编码方式为第一属性编码方式的情况下,所述编码端根据所述第一重建网格对应的属性信息,确定第三码流;所述第一属性编码方式表征对所述第一重建网格对应的属性信息进行编码;
    在所述属性编码方式为第二属性编码方式或第三属性编码方式的情况下,所述编码端根据所述目标三维网格以及所述目标三维网格对应的目标纹理图,确定第三码流,所述第二属性编码方式用于表征对重建纹理坐标信息和重建纹理图进行编码,所述第三属性编码方式用于表征对重建纹理图进行编码,所述重建纹理坐标信息和所述重建纹理图基于所述目标三维网格和所述目标纹理图确定。
  22. 根据权利要求21所述的方法,其中,所述属性信息包括纹理坐标信息和纹理图,所述纹理坐标信息用于表征所述目标三维网格中每个顶点对应的纹理坐标,所述根据所述第一重建网格对应的属性信息,确定第三码流包括:
    所述编码端对第一目标坐标差值进行熵编码,得到第一子码流;所述第一目标坐标差值基于所述纹理坐标信息得到;
    所述编码端对所述纹理图使用视频编码器进行编码,得到第二子码流;
    所述编码端基于所述第一子码流和所述第二子码流,得到第三码流。
  23. 根据权利要求22所述的方法,其中,所述对第一目标坐标差值进行熵编码,得到第一子码流之前,所述方法包括:
    所述编码端在第一重建网格对应的边集合中选取第二边,所述边集合为 所述纹理坐标信息表征的已编码三角形的至少一条边的集合;
    所述编码端根据所述第二边和所述第二边对应的顶点,确定预测三角形;
    所述编码端将所述第二边在所述预测三角形对应的顶点中除与所述第二边连接的两个顶点之外的顶点,确定为预测顶点;
    所述编码端将所述预测顶点与真实顶点之间的坐标差值,确定为所述目标坐标差值;所述真实顶点为所述第二边在待编码三角形对应的顶点中除与所述第二边连接的两个顶点之外的顶点。
  24. 根据权利要求21所述的方法,其中,所述编码端根据所述目标三维网格以及所述目标三维网格对应的目标纹理图,确定第三码流包括:
    在所述属性编码方式为第二属性编码方式的情况下,所述编码端对所述目标三维网格执行表面谱处理,得到重建纹理坐标信息;
    所述编码端使用所述目标三维网格、所述目标纹理图和所述重建纹理坐标信息,对所述目标纹理图进行光珊化处理,得到重建纹理图;
    所述编码端对第二目标坐标差值进行熵编码,得到第一子码流;所述第二目标坐标差值基于所述重建纹理坐标信息得到;
    所述编码端对所述重建纹理图使用视频编码器进行编码,得到第二子码流;
    所述编码端基于所述第一子码流和所述第二子码流,得到第三码流。
  25. 根据权利要求21所述的方法,其中,所述编码端根据所述目标三维网格以及所述目标三维网格对应的目标纹理图,确定第三码流包括:
    在所述属性编码方式为第三属性编码方式的情况下,所述编码端对所述目标三维网格执行表面谱处理,得到重建纹理坐标信息;
    所述编码端使用所述目标三维网格、所述目标纹理图和所述重建纹理坐标信息,对所述目标纹理图进行光珊化处理,得到重建纹理图;
    所述编码端对所述重建纹理图使用视频编码器进行编码,得到第三码流。
  26. 一种解码方法,包括:
    解码端对获取的目标码流进行分解,得到第一信息、解码信息、属性编码方式和第三码流;
    所述解码端根据所述第一信息,获取目标三维网格对应的几何信息;
    所述解码端根据所述解码信息,确定所述目标三维网格对应的连接信息;
    所述解码端根据所述第三码流和所述属性编码方式,确定所述目标三维网格对应的属性信息。
  27. 根据权利要求26所述的方法,其中,所述第一信息包括以下至少一项:第一精度几何信息、第二精度几何信息、补充点的信息;所述第一精度几何信息为所述目标三维网格量化后的几何信息,所述第二精度几何信息为所述目标三维网格量化过程中丢失的几何信息,所述补充点的信息为量化过程中产生的需要额外处理的点的信息;
    对获取的目标码流进行分解,得到第一信息包括:
    所述解码端根据获取的目标码流,获取目标子码流,所述目标子码流包括:片信息子码流、占位图子码流和几何图子码流;
    所述解码端根据所述目标子码流,获取第二信息,所述第二信息包括:占位图和几何图中的至少一项;
    所述解码端根据所述第二信息,获取所述第一信息。
  28. 根据权利要求27所述的方法,其中,在所述第一信息包括第一精度几何信息的情况下,所述根据所述第二信息,获取第一信息,包括:
    所述解码端根据第一精度的占位图和第一精度的几何图,获取二维图像信息;
    所述解码端根据所述二维图像信息,获取二维片;
    所述解码端根据所述片信息子码流对应的片信息对所述二维片进行三维逆投影,获取三维片;
    所述解码端根据所述三维片,获取第一精度几何信息。
  29. 根据权利要求27所述的方法,其中,在所述第一信息包括第二精度几何信息的情况下,所述根据所述第二信息,获取第一信息,包括:
    所述解码端根据第二精度的几何图,获取第二精度几何信息。
  30. 根据权利要求27所述的方法,其中,在所述第一信息包括补充点的信息的情况下,所述根据所述第二信息,获取第一信息,包括:
    所述解码端根据补充点的几何图,确定所述补充点的第三精度几何信息对应的第一原始片以及所述补充点的第四精度几何信息对应的第二原始片;
    所述解码端根据所述第一原始片和所述第二原始片,确定补充点的信息。
  31. 根据权利要求26所述的方法,其中,所述根据所述第一信息,获取目标三维网格对应的几何信息包括:
    所述解码端根据第一精度几何信息以及每一分量的量化参数,确定所述第一精度几何信息中的每一顶点的坐标;
    所述解码端根据所述目标三维网格中的每一顶点的坐标以及第二精度几何信息,确定所述目标三维网格对应的几何信息。
  32. 根据权利要求31所述的方法,其中,所述根据所述第一信息,获取目标三维网格对应的几何信息,还包括:
    所述解码端将补充点的信息以及所述第一精度几何信息中的每一顶点的坐标,确定所述目标三维网格对应的几何信息。
  33. 根据权利要求26所述的方法,其中,所述根据所述解码信息,确定所述目标三维网格对应的连接信息包括:
    在解码信息包括目标顶点的排序信息的情况下,所述解码端根据目标三维网格中相邻三角面片的空间夹角,确定第一空间范围内的待排序顶点,并对所述待排序顶点进行排序;其中,所述排序信息为所述目标顶点在第一空间范围内的待排序顶点中的序号,所述第一空间范围为目标三维网格中待解码三角形的目标顶点所在的空间范围;
    所述解码端根据所述待排序顶点的排序结果和所述目标顶点的排序信息,在所述待排序顶点中确定所述待解码三角形的目标顶点;
    所述解码端根据所述目标顶点和所述待解码三角形的第一边,确定所述待解码三角形;
    所述解码端按照第二预设规则,更新边集合;
    所述解码端根据更新后的边集合,重新确定第一边,直至确定所述目标三维网格中的每个待解码三角形;
    其中,所述第二预设规则包括:将所述待解码三角形除所述第一边之外的两条边加入至所述边集合中,并在所述边集合中移除所述第一边。
  34. 根据权利要求33所述的方法,其中,所述方法还包括:
    在所述解码信息包括所述目标顶点的顶点信息的情况下,所述解码端根 据所述顶点信息确定所述待解码三角形的目标顶点。
  35. 根据权利要求33所述的方法,其中,所述方法还包括:
    所述解码端根据所述解码信息,获取第二空间范围内的待解码三角形的目标顶点信息,所述第二空间范围为所述目标三维网格中除第一空间范围之外的范围;
    所述解码端根据所述目标顶点信息,确定所述待解码三角形的目标顶点。
  36. 根据权利要求33所述的方法,其中,所述根据目标三维网格中相邻三角面片的空间夹角,确定第一空间范围内的待排序顶点包括:
    所述解码端在所述第一空间范围内的顶点中排除第二目标三角形的所有顶点,得到剩余顶点;
    所述解码端根据所述剩余顶点,确定所述第一空间范围内的待排序顶点;
    其中,所述第二目标三角形为与邻接的已解码三角形的夹角小于夹角阈值的三角形,且所述第二目标三角形的一条边与所述待解码三角形的第一边相同。
  37. 根据权利要求36所述的方法,其中,所述方法还包括:
    所述解码端根据所述解码信息,获取所述夹角阈值的信息。
  38. 根据权利要求33所述的方法,其中,所述方法还包括:
    所述解码端根据所述解码信息,获取所述第一空间范围的信息。
  39. 根据权利要求26所述的方法,其中,所述第三码流包括第一子码流和第二子码流,所述属性信息包括纹理坐标信息和纹理图,所述纹理坐标信息用于表征所述目标三维网格中每个顶点对应的纹理坐标;
    所述根据所述第三码流和所述属性编码方式,确定所述目标三维网格对应的属性信息包括:
    在所述属性编码方式为第一属性编码方式的情况下,所述解码端基于所述第一子码流,确定所述目标三维网格中每个顶点对应的纹理坐标;
    所述解码端对所述第二子码流使用视频解码器进行解码,得到所述目标三维网格对应的纹理图。
  40. 根据权利要求39所述的方法,其中,所述基于所述第一子码流,确定所述目标三维网格中每个顶点对应的纹理坐标包括:
    所述解码端对所述第一子码流进行熵解码,获得每个已解码三角形对应的预测残差;
    所述解码端对于任意一个已解码三角形,在目标三维网格对应的边集合中选取第二边,所述边集合为所述目标三维网格中已解码三角形的至少一条边的集合;
    所述解码端根据所述第二边和所述第二边对应的顶点,确定预测三角形;
    所述解码端将所述第二边在所述预测三角形对应的顶点中除与所述第二边连接的两个顶点之外的顶点,确定为预测顶点;
    所述解码端根据所述预测顶点和所述预测残差,确定所述已解码三角形对应的真实顶点,所述真实顶点在所述目标三维网格中的坐标为纹理坐标。
  41. 根据权利要求26所述的方法,其中,所述第三码流包括第一子码流和第二子码流,所述属性信息包括重建纹理坐标信息和重建纹理图,所述重建纹理坐标信息用于表征所述目标三维网格中每个顶点对应的重建纹理坐标;
    所述根据所述第三码流和所述属性编码方式,确定所述目标三维网格对应的属性信息包括:
    在所述属性编码方式为第二属性编码方式的情况下,所述解码端基于所述第一子码流,确定所述目标三维网格中每个顶点对应的重建纹理坐标;
    所述解码端对所述第二子码流使用视频解码器进行解码,得到所述目标三维网格对应的重建纹理图。
  42. 根据权利要求26所述的方法,其中,所述属性信息包括重建纹理坐标信息和重建纹理图;
    所述根据所述第三码流和所述属性编码方式,确定所述目标三维网格对应的属性信息包括:
    在所述属性编码方式为第三属性编码方式的情况下,所述解码端基于所述第三码流,确定所述目标三维网格中每个顶点对应的重建纹理坐标;
    所述解码端对所述第三码流使用视频解码器进行解码,得到所述目标三维网格对应的重建纹理图。
  43. 一种编码装置,包括:
    编码模块,用于对目标三维网格对应的第一信息进行编码,获取第一码 流;所述第一信息基于所述目标三维网格对应的几何信息确定;
    第一确定模块,用于根据第一重建网格对应的连接信息,确定第二码流,所述第一重建网格基于所述第一信息和所述目标三维网格确定;
    第二确定模块,用于根据目标信息和属性编码方式确定第三码流,所述目标信息包括所述第一重建网格对应的属性信息,或者包括所述目标三维网格以及所述目标三维网格对应的目标纹理图;
    生成模块,用于基于所述第一码流、所述第二码流和所述第三码流,生成目标码流。
  44. 一种解码装置,包括:
    分解模块,用于对获取的目标码流进行分解,得到第一信息、解码信息、属性编码方式和第三码流;
    获取模块,用于根据所述第一信息,获取目标三维网格对应的几何信息;
    第三确定模块,用于根据所述解码信息,确定所述目标三维网格对应的连接信息;
    第四确定模块,用于根据所述第三码流和所述属性编码方式,确定所述目标三维网格对应的属性信息。
  45. 一种终端,包括处理器和存储器,所述存储器存储可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如权利要求1-25任一项所述的编码方法的步骤,或者实现如权利要求26-42任一项所述的解码方法的步骤。
  46. 一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如权利要求1-25任一项所述的编码方法的步骤,或者实现如权利要求26-42任一项所述的解码方法的步骤。
PCT/CN2023/087281 2022-04-12 2023-04-10 编码方法、解码方法及终端 WO2023197990A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210378876.4 2022-04-12
CN202210378876.4A CN116958283A (zh) 2022-04-12 2022-04-12 编码方法、解码方法及终端

Publications (1)

Publication Number Publication Date
WO2023197990A1 true WO2023197990A1 (zh) 2023-10-19

Family

ID=88329044

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/087281 WO2023197990A1 (zh) 2022-04-12 2023-04-10 编码方法、解码方法及终端

Country Status (2)

Country Link
CN (1) CN116958283A (zh)
WO (1) WO2023197990A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080063064A (ko) * 2006-12-28 2008-07-03 한국전자통신연구원 텍스쳐 영상의 효율적 압축을 위한 패치기반 텍스쳐영상의 전처리 방법 및 장치
CN101354788A (zh) * 2008-08-20 2009-01-28 大连民族学院 三维网格模型的一维化无损几何压缩方法
CN102625126A (zh) * 2012-03-22 2012-08-01 北京工业大学 一种基于预测的三维网格编码方法
US20210090301A1 (en) * 2019-09-24 2021-03-25 Apple Inc. Three-Dimensional Mesh Compression Using a Video Encoder
CN113938666A (zh) * 2021-10-25 2022-01-14 深圳普罗米修斯视觉技术有限公司 基于关键帧的视频数据传输方法、装置及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080063064A (ko) * 2006-12-28 2008-07-03 한국전자통신연구원 텍스쳐 영상의 효율적 압축을 위한 패치기반 텍스쳐영상의 전처리 방법 및 장치
CN101354788A (zh) * 2008-08-20 2009-01-28 大连民族学院 三维网格模型的一维化无损几何压缩方法
CN102625126A (zh) * 2012-03-22 2012-08-01 北京工业大学 一种基于预测的三维网格编码方法
US20210090301A1 (en) * 2019-09-24 2021-03-25 Apple Inc. Three-Dimensional Mesh Compression Using a Video Encoder
CN113938666A (zh) * 2021-10-25 2022-01-14 深圳普罗米修斯视觉技术有限公司 基于关键帧的视频数据传输方法、装置及存储介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
XIAOJUN WU, XU GUANGYI: "Texture Image Compression Algorithm Based on 3D Geometric Information", JOURNAL OF COMPUTER-AIDED DESIGN & COMPUTER GRAPHICS, vol. 28, no. 3, 15 March 2016 (2016-03-15), pages 471 - 479, XP093098732 *

Also Published As

Publication number Publication date
CN116958283A (zh) 2023-10-27

Similar Documents

Publication Publication Date Title
CN110996098B (zh) 处理点云数据的方法和装置
Maglo et al. 3d mesh compression: Survey, comparisons, and emerging trends
Alexiou et al. A comprehensive study of the rate-distortion performance in MPEG point cloud compression
CN113766228A (zh) 点云压缩方法、编码器、解码器及存储介质
US20130114910A1 (en) Method for compressing/decompressing a three-dimensional mesh
EP2777018A1 (en) Predictive position encoding
KR20140089426A (ko) 예측성 위치 디코딩
Caillaud et al. Progressive compression of arbitrary textured meshes
WO2022131948A1 (en) Devices and methods for sequential coding for point cloud compression
WO2023197990A1 (zh) 编码方法、解码方法及终端
WO2023179706A1 (zh) 编码方法、解码方法及终端
CN116940965A (zh) 用于网格压缩的片时间对齐解码
WO2023179710A1 (zh) 编码方法及终端
Marras et al. Perception-driven adaptive compression of static triangle meshes
Marvie et al. Coding of dynamic 3D meshes
WO2023155778A1 (zh) 编码方法、装置及设备
CN116843771A (zh) 编码方法、解码方法及终端
WO2023179705A1 (zh) 编码、解码方法、装置及设备
WO2023174337A1 (zh) 编码、解码方法、装置及设备
WO2023193709A1 (zh) 编码、解码方法、装置及设备
WO2023155794A1 (zh) 编码、解码方法、装置及设备
WO2023123284A1 (zh) 一种解码方法、编码方法、解码器、编码器及存储介质
US20240185467A1 (en) Point cloud data transmission device, point cloud data transmission method, point cloud data reception device, and point cloud data reception method
Ramanathan et al. Impact of vertex clustering on registration-based 3D dynamic mesh coding
WO2022170521A1 (zh) 几何重构方法、解码器以及计算机存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23787634

Country of ref document: EP

Kind code of ref document: A1