WO2023193709A1 - Coding method and apparatus, decoding method and apparatus, and device - Google Patents

Coding method and apparatus, decoding method and apparatus, and device Download PDF

Info

Publication number
WO2023193709A1
WO2023193709A1 PCT/CN2023/086202 CN2023086202W WO2023193709A1 WO 2023193709 A1 WO2023193709 A1 WO 2023193709A1 CN 2023086202 W CN2023086202 W CN 2023086202W WO 2023193709 A1 WO2023193709 A1 WO 2023193709A1
Authority
WO
WIPO (PCT)
Prior art keywords
vertex
repeated
information
vertices
connection relationship
Prior art date
Application number
PCT/CN2023/086202
Other languages
French (fr)
Chinese (zh)
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 WO2023193709A1 publication Critical patent/WO2023193709A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • G06T9/001Model-based coding, e.g. wire frame
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • G06T9/20Contour coding, e.g. using detection of edges
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties

Definitions

  • This application belongs to the field of coding and decoding technology, and specifically relates to a coding and decoding method, device and equipment.
  • the vertices and point clouds of a three-dimensional grid are both a set of discrete points randomly distributed in space, they have similar characteristics. Therefore, the geometric information in the three-dimensional mesh can also be compressed using video-based point cloud compression standards.
  • the vertices of the three-dimensional grid have the characteristics of sparser and more uneven spatial distribution, and the compression efficiency of directly using video-based point cloud compression methods is low.
  • the video-based point cloud compression standard does not involve the compression of mesh vertex connection relationships, mesh texture (Ultraviolet, UV) coordinate attributes and texture maps. Due to the generation mechanism of the three-dimensional mesh, there will be some geometric repeating points. These geometric repeating points have the same geometric coordinates but different UV coordinates. The geometric repeating points will cause the discontinuity problem of the three-dimensional mesh, and there will be single triangles with many sides adjacent to each other. Side cases, and unilateral needs to consume redundant codewords to identify, thus reducing the coding efficiency of connectivity relationships.
  • the embodiments of the present application provide an encoding and decoding method, device and equipment, which can solve the problem that the three-dimensional mesh generation mechanism of the existing technology will cause some geometric repeating points. These geometric repeating points will cause the three-dimensional mesh to be discontinuous, resulting in the reduction of the three-dimensional network.
  • the first aspect provides an encoding method, including:
  • the encoding end decodes and reconstructs the geometric information of the encoded target three-dimensional grid, and obtains the reconstructed first geometric information
  • the encoding end performs repeated vertex screening on the first geometric information to obtain repeated vertex information.
  • the repeated vertices are vertices other than the first vertex among multiple vertices with the same position coordinates, and the first vertex is the position coordinate.
  • the encoding end reorders the first connection relationships of the target three-dimensional grid based on the repeated vertex information, and obtains the reordered second connection relationships;
  • the encoding end encodes the second connection relationship.
  • an encoding device including:
  • the first acquisition module is used to decode and reconstruct the geometric information of the encoded target three-dimensional grid, and obtain the reconstructed first geometric information
  • the second acquisition module is used to filter the repeated vertices of the first geometric information and obtain the repeated vertex information.
  • the repeated vertices are vertices other than the first vertex among multiple vertices with the same position coordinates.
  • the first vertex Is one of the vertices among multiple vertices with the same position coordinates;
  • a third acquisition module configured to reorder the first connection relationships of the target three-dimensional mesh according to the repeated vertex information, and obtain the reordered second connection relationships
  • the first encoding module is used to encode the second connection relationship.
  • the third aspect provides a decoding method, including:
  • the decoding end decodes and reconstructs the first geometric information according to the obtained code stream corresponding to the target three-dimensional grid
  • the decoding end performs repeated vertex screening on the first geometric information to obtain repeated vertex information.
  • the repeated vertices are vertices other than the first vertex among multiple vertices with the same position coordinates, and the first vertex is the position coordinate.
  • the decoding end decodes the first connection relationship code stream of the target three-dimensional grid according to the repeated vertex information.
  • a decoding device including:
  • the reconstruction module is used to decode and reconstruct the first geometric information according to the obtained code stream corresponding to the target three-dimensional grid;
  • the fifth acquisition module is used to perform repeated vertex screening on the first geometric information and obtain repeated vertex information.
  • the repeated vertices are vertices other than the first vertex among multiple vertices with the same position coordinates.
  • the first vertex Is one of the vertices among multiple vertices with the same position coordinates;
  • the first decoding module is used to decode the connection relationship code stream of the target three-dimensional grid according to the repeated vertex information.
  • a coding device including a processor and a memory.
  • the memory stores programs or instructions that can be run on the processor. When the program or instructions are executed by the processor, the first The steps of the method described in this aspect.
  • an encoding device including a processor and a communication interface, wherein the processor is used to decode and reconstruct the geometric information of the encoded target three-dimensional grid, and obtain the reconstructed first geometric information;
  • the first geometric information is filtered for repeated vertices to obtain repeated vertex information.
  • the repeated vertices are vertices other than the first vertex among multiple vertices with the same position coordinates.
  • the first vertex is a plurality of vertices with the same position coordinates. one of the vertices in; reorder the first connection relationships of the target three-dimensional mesh according to the repeated vertex information, and obtain the reordered second connection relationship; and encode the second connection relationship.
  • a decoding device including 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 third process is implemented. The steps of the method described in this aspect.
  • a decoding device including a processor and a communication interface, wherein the processor is used to root Decode and reconstruct the first geometric information according to the obtained code stream corresponding to the target three-dimensional mesh; perform repeated vertex screening on the first geometric information to obtain repeated vertex information, and the repeated vertices are multiple vertices with the same position coordinates except Vertices other than the first vertex, the first vertex being one of multiple vertices with the same position coordinates; decoding the connection relationship code stream of the target three-dimensional grid according to the repeated vertex information.
  • a communication system including: an encoding device and a decoding device.
  • the encoding device can be used to perform the steps of the method described in the first aspect
  • the decoding device can be used to perform the steps of the method described in the third aspect. steps of the method.
  • 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 third aspect.
  • a chip in an eleventh 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. method, or implement a method as described in the third 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 as described in the first aspect
  • the reconstructed first geometric information is obtained, and the first geometric information is subjected to repeated vertex screening to obtain repeated vertex information.
  • the repeated vertex information is used to reorder the first connection relationship of the target three-dimensional mesh, obtain the reordered second connection relationship, and encode the second connection relationship; the above solution uses the reconstructed geometry
  • the information is screened for repeated vertices, and then the connection relationships are reordered and encoded based on the repeated vertex information. This can avoid the discontinuity problem of the three-dimensional grid caused by repeated vertices and improve the coding efficiency of the connectivity relationships of the three-dimensional grid. .
  • Figure 1 is a schematic flow chart of the encoding method according to 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 raw patch
  • Figure 7 is one of the schematic diagrams of coding connection relationships in the embodiment of the present application.
  • Figure 8 is the second schematic diagram of the coding connection relationship in the embodiment of the present application.
  • Figure 9 is a geometric diagram of the prediction principle
  • Figure 10 is a schematic diagram of the coding framework of a three-dimensional grid based on video
  • Figure 11 is a schematic module diagram of an encoding device according to an embodiment of the present application.
  • Figure 12 is a schematic structural diagram of an encoding device according to an embodiment of the present application.
  • Figure 13 is a schematic flow chart of the decoding method according to the embodiment of the present application.
  • Figure 14 is a block diagram of geometric information reconstruction
  • Figure 15 is a schematic diagram of the decoding framework based on the three-dimensional grid of video
  • Figure 16 is a schematic module diagram of a decoding device according to an embodiment of the present application.
  • Figure 17 is a schematic structural diagram of a communication device according to 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.
  • LTE Long Term Evolution
  • LTE-Advanced, LTE-A Long Term Evolution
  • LTE-A Long Term Evolution
  • CDMA Code Division Multiple Access
  • TDMA Time Division Multiple Access
  • FDMA Frequency Division Multiple Access
  • OFDMA Orthogonal Frequency Division Multiple Access
  • SC-FDMA Single-carrier Frequency Division Multiple Access
  • NR New Radio
  • this embodiment of the present application provides an encoding method, including:
  • Step 101 The encoding end decodes and reconstructs the geometric information of the encoded target three-dimensional grid, and obtains the reconstructed first geometric information;
  • the target three-dimensional grid mentioned in this application can be understood as the three-dimensional grid corresponding to any video frame.
  • the geometric information of the target three-dimensional grid can be understood as the coordinates of the vertices in the three-dimensional grid. These coordinates are usually Refers to three-dimensional coordinates.
  • Step 102 The encoding end performs repeated vertex screening on the first geometric information to obtain repeated vertex information
  • the information of the repeated vertices can be obtained, and at the same time, the second geometric information can be obtained.
  • the second geometric information is the mesh geometric information excluding the repeated vertices.
  • the repeated vertices are Vertices other than the first vertex among the plurality of vertices with the same position coordinates, and the first vertex is one of the plurality of vertices with the same position coordinates.
  • Step 103 The encoding end reorders the first connection relationships of the target three-dimensional grid based on the repeated vertex information, and obtains the reordered second connection relationships;
  • connection relationship mentioned in the embodiment of this application is used to describe the connection relationship between elements such as vertices and patches in the three-dimensional mesh, and may also be called a connectivity relationship.
  • Step 104 The encoding end encodes the second connection relationship.
  • the embodiment of the present application removes repeated vertices from the reconstructed geometric information, then reorders the connection relationships, and then encodes the reordered connection relationships, thereby avoiding the three-dimensional distortion caused by repeated vertices.
  • the problem of grid discontinuity improves the coding efficiency of the connectivity relationship of the three-dimensional grid.
  • the specific method of encoding the geometric information of the three-dimensional grid may include the following process:
  • Step S21 Before encoding geometric information, the target three-dimensional grid can be simplified first to obtain a simplified grid;
  • the encoding end simplifies the target three-dimensional grid based on quantization parameters to obtain a simplified grid.
  • quantization parameters mentioned in this application mainly include quantization parameters in the three components of X direction, Y direction and Z direction.
  • the target three-dimensional grid is simplified.
  • the specific implementation method of obtaining the simplified grid is:
  • the encoding end When merging vertices in the target three-dimensional grid, the encoding end adjusts the position coordinate values of some or all of the merged vertices in the target three-dimensional grid to multiples of quantization parameters to obtain a simplified 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, which will reduce the amount of data consumed by high-precision geometric information.
  • mesh simplification is performed first.
  • 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. For example, you can select the directions of all adjacent faces of a vertex The sum of the process coefficients is used 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.
  • 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.
  • Step S22 Quantify the geometric information of the simplified grid to obtain the first information
  • the geometric information of the simplified mesh can be understood as the coordinates of the vertices in the three-dimensional mesh, and these coordinates usually refer to three-dimensional coordinates.
  • the 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.
  • the coordinate positions overlap.
  • 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.
  • step S22 is:
  • the encoding end quantizes each vertex in the simplified grid according to the quantization parameter of each component to obtain first precision geometric information.
  • quantization parameters of each component can be flexibly set according to usage requirements.
  • step S22 should also include:
  • 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 17 to Formula 19 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 are all 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.
  • step S22 should also include:
  • the encoding end determines the information of the supplementary point based on the geometric information of the simplified 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.
  • the first information is encoded as mentioned in the embodiment of the present application.
  • the specific implementation process of encoding information includes:
  • Step S221 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;
  • Step S222 The encoding end encodes the second information.
  • step S221 will be described below from the perspective of different information. The process is explained below.
  • the first information includes first precision geometric information
  • step S221 includes:
  • Step S2211 the encoding end divides the first precision geometric information into three-dimensional slices
  • 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 plane normal vector and the vertex The candidate projection plane with the smallest angle between the point normal vectors is used as the projection plane of the vertex; then, the vertices are initially divided according to the projection plane, 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 Similar results are obtained to obtain the final three-dimensional 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 S301 Divide the (x, y, z) geometric coordinate space into voxels.
  • Step S302 Find filled voxels.
  • Filled voxels refer to voxels that contain at least one point in the grid.
  • Step S303 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 S304 use KD-Tree partitioning to find neighboring filled voxels, recorded 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 S305 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 S306 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 S307 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 S308 Use the scores in step 307 to cluster the vertices to obtain finely divided patches.
  • Step S2212 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 (2D patch).
  • Step S2213 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, and then the patch information can be encoded to obtain the patch information sub-stream.
  • 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.
  • Step S2214 The encoding end obtains a first-precision placeholder map and a first-precision geometric map based on the two-dimensional image information;
  • the process of obtaining the placeholder map is mainly: 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
  • step S221 includes:
  • Step S2215 the encoding end obtains the arrangement order of the vertices contained in the first precision geometric information
  • Step S2216 The encoding end arranges the second-precision geometric information corresponding to the vertices contained 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.
  • the raw patch is a rectangular patch formed by arranging the three-dimensional coordinates of the vertices row by row as shown in Figure 6. 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
  • step S221 includes:
  • Step S2217 the encoding end arranges the third precision geometric information of the supplementary points into the first original slice
  • Step S2218 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;
  • Step S2219 The encoding end compresses the first original slice and the second original slice to obtain a geometric map of 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 using 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 low-precision raw patch to the blank area of the low-precision geometric map.
  • Point high-precision raw patches are added to the blank areas in the high-precision geometric map to obtain a geometric map that supplements the points.
  • the geometric information can be reconstructed to obtain the reconstructed first geometric information, and then the first geometric information can be filtered for repeated vertices to obtain repeated vertex information.
  • the method of obtaining repeated vertex information includes:
  • the encoding end obtains the repeated vertices in the first geometric information, and records the index of the repeated vertices to form repeated vertex information;
  • the repeated vertex information includes the index of the repeated vertex and the texture coordinate index of the first vertex and the repeated vertex.
  • step 103 optional implementation methods of step 103 include:
  • Step 1031 The encoding end rearranges the vertex texture coordinates of the target three-dimensional grid according to the index of the repeated vertex, and obtains the reordered texture coordinate information;
  • the specific implementation of this step is: the encoding end sequentially moves the texture coordinates corresponding to the repeated vertices to the end of the list corresponding to the texture coordinates according to the order in which the repeated vertices appear in the first geometric information. , forming the reordered texture coordinate information.
  • the texture coordinates of 10 vertices (vertex 1 to vertex 10) from front to back are: coordinate 1, coordinate 2, coordinate 3, coordinate 4, coordinate 5, coordinate 6, coordinate 7, coordinate 8, coordinate 9, coordinate 10 , and vertex 1 and vertex 6 are repeated, then after reordering, the texture coordinates of the 10 vertices from front to back are: coordinate 1, coordinate 2, coordinate 3, coordinate 4, coordinate 5, coordinate 7, coordinate 8, coordinate 9, Coordinate 10, coordinate 6.
  • Step 1032 The encoding end adjusts the first connection relationship of the target three-dimensional grid according to the reordered texture coordinate information and the repeated vertex information, and obtains the second connection relationship after the reordering;
  • connection relationships do not contain information about repeated vertices. This can avoid the problem of discontinuity in the three-dimensional mesh caused by repeated vertices when encoding the connection relationships, and improve the three-dimensional Encoding efficiency of grid connectivity relations.
  • connection relationship is composed of a texture coordinate index part and a geometry index part, when adjusting the connection relationship, these two parts need to be adjusted separately.
  • specific implementation process of step 1032 is:
  • Step 10321 The encoding end modifies the texture coordinate index part of the first connection relationship of the target three-dimensional grid according to the texture coordinate information after reordering;
  • Step 10322 The encoding end traverses the geometric index part of the first connection relationship of the target three-dimensional grid, and replaces the index of the repeated vertex of the first connection relationship of the target three-dimensional grid with the second one according to the repeated vertex information. one The index of the vertex, obtains the second connection relationship after reordering.
  • connection relationship between 10 vertices (vertex 1 to vertex 10) from front to back is: (1,1), (2,2), (3,3), (4,4), (5,5 ), (6,6), (7,7), (8,8), (9,9), (10,10), where the first value in the brackets represents the geometric index of the vertex, and the last value Texture coordinate index. Since vertex 1 and vertex 6 are repeated, the reordered connection relationship representation from front to back is: (1,1), (2,2), (3,3), (4,4), (5,5), (1,10), (6,6), (7,7), (8,8), (9,9).
  • Step S31 The encoding end determines the vertices to be sorted within the first spatial range based on the spatial angle between adjacent triangle patches in the three-dimensional grid.
  • the first spatial range is the target vertex of the triangle to be encoded in the three-dimensional grid.
  • the spatial range where the vertex to be sorted includes the target vertex.
  • connection relationship encoding in the embodiment of the present application is a connection relationship encoding method driven by geometric information, where the reconstructed geometric information includes index information of vertices in the three-dimensional grid.
  • 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.
  • Step S32 The encoding end sorts the vertices to be sorted to obtain the sorting information of the target vertices.
  • the vertices to be sorted are sorted according to a preset sorting criterion.
  • the sorting criterion can be sorting according to the distance between the vertex and the midpoint of the first side of the triangle to be encoded, or the sorting criterion can also be sorted according to the distance between the vertex and the first side of the triangle to be encoded. 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.
  • Step S33 The encoding end obtains the encoding information of the triangle to be encoded based on the encoding information corresponding to the sorting information of the target vertex.
  • the encoding end encodes the sorting information of the target vertex to obtain the encoding information; when the target condition is not met, the encoding end encodes the index of the target vertex to obtain the above Encoded 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.
  • Encoding the sorting information of the target vertices can effectively reduce the number of encoding bits. For situations where the number of vertices to be sorted is large or the sorting sequence number of the target vertex is large, encoding the index of the target vertex can effectively reduce the number of encoding bits compared to encoding the sorting information.
  • 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 encoding end determines the first spatial range, it also includes:
  • the encoding end selects the first edge from the edge set corresponding to the three-dimensional grid, wherein the edge set is a set of at least one edge of the encoded triangle in the three-dimensional 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.
  • the encoding end determines the vertices to be sorted within the first spatial range based on the spatial angle between adjacent triangular patches in the three-dimensional grid, including:
  • the encoding end determines the vertices to be sorted within the first spatial range based on the spatial angle between adjacent triangle patches in the three-dimensional grid.
  • 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 in the embodiment of this application 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.
  • the method further includes:
  • 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 all triangles in the three-dimensional grid obtain encoding information;
  • 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. side.
  • the encoding end determines the vertices to be sorted within the first spatial range based on the spatial angle between adjacent triangular patches in the three-dimensional grid, including:
  • 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 coded triangle is less than the angle threshold, and one side of the first target triangle is the same as the first side of the triangle to be coded.
  • 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 spatial range based on the pre-agreed angle threshold.
  • the encoding end does not need to encode the angle threshold.
  • the method of the embodiment of the present application further includes: encoding the target vertex information of the triangle to be encoded in a second spatial range to obtain the encoding information of the triangle to be encoded, and the second spatial range is the The range in the three-dimensional grid other than the first spatial 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 mesh is divided into one or more slices at the encoding end, and an initial triangle is selected in each slice.
  • 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 connection 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 has changes in the connection relationship of the target three-dimensional mesh based on the reconstructed first geometric information. Adjustment is made, the second connection relationship after reordering is performed based on the adjusted connection relationship, and then the second connection relationship is encoded.
  • the encoding end queries the three vertices of each triangular patch to see whether there are repeated vertices based on the repeated vertex information;
  • the encoding end identifies the duplicate vertex
  • the encoding end After completing the encoding of the second connection relationship, the encoding end performs encoding according to the identifier of the repeated vertex, and obtains the code stream of the repeated vertex identifier.
  • connection relationship of the three-dimensional mesh for the three vertices of each triangular patch, based on the repeated vertex information, query whether there are repeated vertices; if there are repeated vertices, perform a query on the repeated vertices.
  • Identification after completing the encoding of the connection relationship, use the entropy encoder to encode the repeated vertex identification into a repeated point identification code stream.
  • UV coordinates are information that describes the texture of the vertices of a three-dimensional grid.
  • the three-dimensional grid first projects the surface texture into two dimensions. , forming a two-dimensional texture map.
  • the UV coordinates represent the position of the three-dimensional vertex texture in the two-dimensional texture map, and correspond to the geometric information one-to-one.
  • the implementation process of UV coordinate encoding in an embodiment of the present application is as follows :
  • the encoding end restores the second geometric information and the repeated vertices in the second connection relationship according to the order of the repeated vertices in the reordered texture coordinate information
  • the encoding end traverses the second connection relationship of the restored repeated vertices and records the traversal order
  • the encoding end encodes the texture coordinates of the vertices according to the traversal order.
  • connection relationship is processed to remove duplicate vertices, and the texture coordinate encoding is based on the connection relationship and geometric information containing repeated vertices. Therefore, the second connection relationship needs to be restored first. and repeated vertices in geometric information to ensure the accuracy of texture coordinate encoding.
  • the texture coordinate information after reordering is used to restore the third geometric information obtained by restoring the repeated vertices in the second geometric information and the second connection relationship (after performing repeated vertex restoration on the second geometric information)
  • Corresponding geometric information) and the third connection relationship that is, the corresponding connection relationship after repeated vertex restoration of the second connection relationship
  • the specific implementation process includes:
  • Step S41 the encoding end determines a target triangle according to the third connection relationship, and the target triangle is composed of the first side and the vertex to be encoded;
  • the optional implementation method of this step is:
  • the encoding end selects a first edge from an edge set, which is a set of edges of a triangle constructed by a third connection relationship; the encoding end determines a target triangle based on the first edge.
  • the encoding end selects the first edge in the edge set, it also includes:
  • the encoding end selects an initial triangle according to the third connection relationship; the encoding end encodes the texture coordinates of the three vertices of the initial triangle, and adds the three edges of the initial triangle to the edge set.
  • this initial triangle is the first triangle in the connection.
  • the vertices are not predicted, but the texture coordinates are directly encoded, and the texture coordinates of each vertex of the initial triangle are encoded (it should be noted that the texture coordinates refer to the target three-dimensional mesh through the After directly obtaining the original texture coordinates), each edge of the initial triangle is added to the edge set to form an initial edge set, and then the subsequent vertices are predicted based on the initial edge set.
  • Step S42 The encoding end performs texture coordinate prediction on the vertices to be encoded based on the reconstructed geometric information corresponding to the three vertices of the target triangle and the real texture coordinates of the vertices on the first side, and obtains the to-be-encoded vertices.
  • Step S43 The encoding end encodes the texture coordinates of the vertex to be encoded based on the difference between the real texture coordinates of the vertex to be encoded and the predicted texture coordinates.
  • the difference between the predicted texture coordinates and the real texture coordinates can be obtained, and then encoding is performed based on the difference.
  • the difference can be encoded directly.
  • the difference value described in the embodiment of the present application can be obtained by subtracting the predicted texture coordinates from the real texture coordinates, or by subtracting the predicted texture coordinates from the predicted texture coordinates.
  • the specific method is as long as The encoding end and the decoding end only need to have the same understanding.
  • the difference in the embodiment of this application may also be called a residual.
  • the encoding end performs coding on the vertices to be encoded based on the reconstructed geometric information corresponding to the three vertices of the target triangle and the real texture coordinates of the vertices on the first side.
  • Texture coordinate prediction the implementation method of obtaining the predicted texture coordinates of the vertex to be encoded, includes:
  • Step S51 The encoding end obtains the texture coordinates of the projection point of the vertex to be encoded on the first side based on the geometric information corresponding to each vertex of the target triangle and the real texture coordinates of the vertex on the first side. ;
  • edge NP is an edge selected from the edge set, which can be regarded as the first edge mentioned above.
  • Vertex N and vertex P are respectively the two vertices of the first edge.
  • C is the vertex to be encoded.
  • Vertex N, vertex P and vertex C form the above target triangle.
  • Point X is the projection of vertex C on the NP edge.
  • Vertex O is the encoded point, and vertex O, vertex N and vertex
  • the triangle formed by P shares NP sides with the triangle formed by vertex N, vertex P and vertex C.
  • Step S52 The encoding end obtains the predicted texture coordinates of the vertex to be encoded based on the texture coordinates of the projection point;
  • the predicted texture coordinates of the vertices to be encoded include:
  • Pred C is the predicted texture coordinate of the vertex C to be encoded
  • Pred C is the first vector value of the vector of the texture coordinates of the vertex C to be encoded and the first side corresponding to the first vertex O
  • O uv is the first vertex corresponding to the first side of the target triangle.
  • the first vertex O is the opposite vertex of the first side of the first triangle (that is, the vertex in the first triangle opposite to the first side), the first triangle and the target triangle have a common first side; is a vector from the projection point X of the vertex C to be encoded on the first edge to the texture coordinates of the vertex C to be encoded; The second vector value is the vector of the texture coordinates of the vertex C to be encoded and the first edge corresponding to the first vertex O.
  • the predicted texture coordinates of the point to be encoded are obtained, and based on the predicted texture coordinates, the encoding point to be encoded can be implemented; optionally, the encoding point to be encoded is based on an edge in the edge set
  • the encoding end adds the second edge in the target triangle to the edge set and deletes the first edge from the edge set. The second edge is not included in the target triangle. on the edges in the edge set, in order to achieve Updates to edge collections.
  • the residuals of the vertices to be encoded can be obtained while encoding, or all the residuals can be obtained first, and then the residuals can be encoded uniformly.
  • the encoding end needs to adjust the values and arrangement order of some texture coordinates based on the reconstructed first geometric information.
  • an embodiment of the present application also includes encoding of texture maps, specifically: for texture maps, a video encoder can usually be used directly to encode frame-by-frame texture maps, such as using high-efficiency video coding ( Encoders such as High Efficiency Video Coding (HEVC) and Versatile Video Coding (VVC) form texture image sub-streams.
  • Encoders such as High Efficiency Video Coding (HEVC) and Versatile Video Coding (VVC) form texture image sub-streams.
  • HEVC High Efficiency Video Coding
  • VVC Versatile Video Coding
  • the sub-streams are mixed to form an output trellis-encoded code stream.
  • quantization may obtain low-precision geometric information, high-precision geometric information and supplementary point information.
  • low-precision geometric information is the three-dimensional coordinates after quantization
  • high-precision geometric information is the geometric information lost by the low-precision grid after quantization
  • supplementary points refer to points generated during the quantization process that need to be processed separately, such as overlapping coordinate positions. Repeat point and so on.
  • a projection method similar to V-PCC is used to project it to a two-dimensional plane, and then perform video compression.
  • High-precision geometric information and supplementary points can be encoded using the special point processing method in V-PCC, such as using the raw patch method for compression.
  • the obtained sub-code stream is mixed, and is prepared to be further mixed with the connection relationship code stream and other code streams to obtain the final output code stream.
  • the representation and encoding of information of different precisions and supplementary points here take into account both lossless and lossy modes. In particular, lossless compression can be guaranteed while reducing encoding bit overhead.
  • the encoding method can use predictive coding, that is, predicting the position of the UV coordinates to be encoded and then encoding the residual between the predicted coordinates and the real coordinates to save bit overhead (the number of bits in the residual is smaller than the number of bits in the original UV coordinates).
  • the coding framework of the video-based three-dimensional grid in the embodiment of the present application is shown in Figure 10.
  • the overall coding process is: first, before quantization, you can choose whether to perform sampling simplification on the three-dimensional grid; then, perform sampling on the three-dimensional grid.
  • Quantification which may produce three parts: low-precision geometric information, high-precision geometric information and supplementary point information; for low-precision geometric information, projection is used to divide patches and arrange patches to generate patch sequence compression information (patch division information) , placeholder map and low-precision geometric map; for possible high-precision geometric information, raw patch arrangement can be used to generate high-precision geometric map; for possible supplementary points, the geometric information of supplementary points can be divided into low-precision For the partial and high-precision parts, the raw patches are arranged separately and separately encoded into a code stream, or the raw patches are added to the geometric diagram; then, the patch sequence compression information, placeholder map, and geometric diagram are encoded.
  • the encoded geometric information code stream is decoded to reconstruct the geometric information as auxiliary information for connection relationship encoding.
  • the updated connection information is encoded to obtain the connection relationship sub-stream.
  • the reconstructed geometric information and UV coordinate information are used to reconstruct the UV coordinates, and the UV coordinates are encoded to form a UV coordinate sub-stream.
  • the texture map can be directly video-encoded to form a texture map sub-stream. Finally, multiple sub-streams are mixed to obtain the final output stream.
  • the embodiment of the present application provides a coding framework based on a three-dimensional grid of video.
  • it only needs to be decoded according to the inverse process of the encoding end; in the implementation of the present application, it is particularly targeted at the video containing repeated geometric information.
  • the grid of vertices is individually and concisely marked and coded. In the process of coding connection relationships, because the coding of repeated vertices is removed, the coding of the three-dimensional grid can be made more efficient.
  • 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.
  • this embodiment of the present application provides an encoding device 1100, which includes:
  • the first acquisition module 1101 is used to decode and reconstruct the geometric information of the encoded target three-dimensional grid, and obtain the reconstructed first geometric information;
  • the second acquisition module 1102 is used to filter repeated vertices on the first geometric information and obtain repeated vertex information.
  • the repeated vertices are vertices other than the first vertex among multiple vertices with the same position coordinates.
  • the first vertex is The vertex is one of multiple vertices with the same position coordinates;
  • the third acquisition module 1103 is configured to reorder the first connection relationships of the target three-dimensional mesh according to the repeated vertex information, and obtain the reordered second connection relationships;
  • the first encoding module 1104 is used to encode the second connection relationship.
  • the method of obtaining repeated vertex information includes:
  • the repeated vertex information includes the index of the repeated vertex and the texture coordinate index of the first vertex and the repeated vertex.
  • the third acquisition module 1103 includes:
  • the first acquisition unit is used to re-acquire the vertex texture coordinates of the target three-dimensional mesh according to the index of the repeated vertex. Arrange to obtain the texture coordinate information after reordering;
  • the second acquisition unit is configured to adjust the first connection relationship of the target three-dimensional mesh according to the reordered texture coordinate information and the repeated vertex information, and obtain the second connection relationship after the reordering.
  • the first acquisition unit is used for:
  • the texture coordinates corresponding to the repeated vertices are sequentially moved to the end of the list corresponding to the texture coordinates to form reordered texture coordinate information.
  • the second acquisition unit is used for:
  • the device also includes:
  • a first query module configured to query whether there are duplicate vertices based on the duplicate vertex information for the three vertices of each triangular patch during the process of encoding the second connection relationship;
  • An identification module used to identify duplicate vertices when they exist
  • the fourth acquisition module is used to perform encoding according to the identifier of the repeated vertex after completing the encoding of the second connection relationship, and obtain the code stream of the repeated vertex identifier.
  • the first acquisition module 1101 decodes and reconstructs the encoded geometric information of the target three-dimensional mesh and obtains the reconstructed first geometric information, it also includes:
  • An adjustment module configured to adjust the values and arrangement order of some texture coordinates according to the reconstructed first geometric information.
  • the device also includes:
  • a first recovery module configured to restore the second geometric information and the repeated vertices in the second connection relationship according to the order of the repeated vertices in the reordered texture coordinate information, where the second geometric information does not include repeated vertices.
  • the first recording module is used to traverse the second connection relationship to restore repeated vertices and record the traversal order
  • the second encoding module is used to encode the texture coordinates of the vertices according to the traversal order.
  • the third acquisition module 1103 before the third acquisition module 1103 reorders the first connection relationships of the target three-dimensional mesh according to the repeated vertex information and obtains the reordered second connection relationship, it also includes:
  • An adjustment module configured to adjust the portion where the first connection relationship of the target three-dimensional grid changes according to the reconstructed first geometric information.
  • This device embodiment corresponds to the above-mentioned encoding method embodiment.
  • Each implementation process and implementation manner of the above-mentioned method embodiment can be applied to this device embodiment, and can achieve the same technical effect.
  • Embodiments of the present application also provide an encoding device, including a processor and a communication interface, wherein the processor is used to decode and reconstruct the geometric information of the encoded target three-dimensional grid, and obtain the reconstructed first geometric information; Right Perform repeated vertex screening on the first geometric information to obtain repeated vertex information.
  • the repeated vertices are vertices other than the first vertex among multiple vertices with the same position coordinates.
  • the first vertex is among the multiple vertices with the same position coordinates. one of the vertices; perform reordering of the first connection relationships of the target three-dimensional mesh according to the repeated vertex information, and obtain the reordered second connection relationship; and encode the second connection relationship.
  • the processor is used for:
  • the repeated vertex information includes the index of the repeated vertex and the texture coordinate index of the first vertex and the repeated vertex.
  • the processor is used for:
  • the encoding end rearranges the vertex texture coordinates of the target three-dimensional grid according to the index of the repeated vertex, and obtains the reordered texture coordinate information
  • the encoding end adjusts the first connection relationship of the target three-dimensional mesh according to the reordered texture coordinate information and the repeated vertex information, and obtains the second connection relationship after the reordering.
  • the processor is used for:
  • the encoding end sequentially moves the texture coordinates corresponding to the repeated vertices to the end of the list corresponding to the texture coordinates according to the order in which the repeated vertices appear in the first geometric information, to form reordered texture coordinate information.
  • the processor is used for:
  • the encoding end modifies the texture coordinate index part of the first connection relationship of the target three-dimensional grid according to the texture coordinate information after reordering;
  • the encoding end traverses the geometric index part of the first connection relationship of the target three-dimensional grid, and replaces the index of the repeated vertex of the first connection relationship of the target three-dimensional grid with the index of the first vertex according to the repeated vertex information. Index to obtain the second connection relationship after reordering.
  • the processor is also used to:
  • the encoding end queries the three vertices of each triangular patch to see whether there are repeated vertices based on the repeated vertex information;
  • the encoding end identifies the duplicate vertex
  • the encoding end After completing the encoding of the second connection relationship, the encoding end performs encoding according to the identifier of the repeated vertex, and obtains the code stream of the repeated vertex identifier.
  • the processor is also used to:
  • the encoding end adjusts the values and arrangement order of some texture coordinates according to the reconstructed first geometric information.
  • the processor is also used to:
  • the encoding end restores the second geometric information and the repeated vertices in the second connection relationship according to the order of the repeated vertices in the reordered texture coordinate information, and the second geometric information is a mesh geometry that does not include repeated vertices. information;
  • the encoding end traverses the second connection relationship of the restored repeated vertices and records the traversal order
  • the encoding end encodes the texture coordinates of the vertices according to the traversal order.
  • the processor is also used to:
  • the encoding end adjusts the changed portion of the first connection relationship of the target three-dimensional grid according to the reconstructed first geometric information.
  • the encoding device 1200 includes: a processor 1201, a network interface 1202, and a memory 1203.
  • the network interface 1202 is, for example, a common public radio interface (CPRI).
  • CPRI common public radio interface
  • the encoding device 1200 in the embodiment of the present application also includes: instructions or programs stored in the memory 1203 and executable on the processor 1201.
  • the processor 1201 calls the instructions or programs in the memory 1203 to execute the modules shown in Figure 11
  • the implementation method and achieve the same technical effect will not be repeated here to avoid repetition.
  • embodiments of the present application also provide a decoding method, including:
  • Step 1301 The decoder decodes and reconstructs the first geometric information according to the obtained code stream corresponding to the target three-dimensional grid;
  • Step 1302 The decoder performs repeated vertex screening on the first geometric information to obtain repeated vertex information.
  • the repeated vertices are vertices other than the first vertex among multiple vertices with the same position coordinates.
  • the first vertex Is one of the vertices among multiple vertices with the same position coordinates;
  • Step 1303 The decoding end decodes the connection relationship code stream of the target three-dimensional grid according to the repeated vertex information.
  • the method of obtaining repeated vertex information includes:
  • the decoding end obtains the repeated vertices in the first geometric information, and records the index of the repeated vertices to form repeated vertex information;
  • the repeated vertex information includes the index of the repeated vertex and the texture coordinate index of the first vertex and the repeated vertex.
  • the method also includes:
  • the decoding end queries whether there are duplicate vertices for each triangle patch based on the duplicate vertex information
  • the decoding end decodes the index of the duplicate vertex from the duplicate identification code stream.
  • the method also includes:
  • the decoding end restores the repeated vertices according to the second geometric information and the decoded connection relationship according to the index of the repeated vertex, where the second geometric information is mesh geometry information excluding repeated vertices;
  • the decoding end traverses the connection relationship of the restored repeated vertices and records the traversal order
  • the decoding end decodes the texture coordinate code stream of the vertex according to the traversal order.
  • the video-based three-dimensional grid geometric information decoding process in the embodiment of this application includes: decomposing the code stream into a patch information sub-stream, a placeholder image code stream, and a geometric image code stream; and then decoding these three sub-streams respectively.
  • Code stream obtain patch information, placeholder map and geometric map; finally, use patch information, placeholder map and geometric map to reconstruct geometric information.
  • Figure 14 the most critical thing is the specific process of geometric information reconstruction:
  • Step S111 obtain the 2D patch
  • obtaining a 2D patch refers to using the patch information to segment the placeholder information and depth information of the 2D patch from the placeholder map and geometric map.
  • the patch information contains the position and size of each 2D patch's bounding box in the placeholder map and low-precision geometric map.
  • the placeholder information and the 2D patch's placeholder information can be directly obtained using the patch information, placeholder map, and low-precision geometric map.
  • Low precision geometric information For high-precision geometric information, the vertex distribution of the low-precision geometric graph is used to correspond the high-precision geometric information arrangement values in the high-precision geometric information area to the vertices of the low-precision geometric graph, and then xyz is separated from them according to the preset arrangement rules used by the encoding end.
  • the low-precision geometric information and high-precision geometric information of supplementary points can be obtained by directly decoding the low-precision raw patch and high-precision raw patch of supplementary points.
  • Step S112 reconstruct the 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 S113 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 S114 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 38 to Formula 40:
  • 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 41 to Formula 43:
  • connection relationship when decoding the connection relationship in the embodiment of the present application, it is necessary to first find the repeated vertices in the reconstructed geometric information, remove the repeated vertices, and record the vertex index of the repeated points to form repeated vertex information.
  • the process of decoding the connection 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 current repeated vertex index is decoded from the repeated identification code stream. Specifically, first decode the repeated vertex identifier and put it into an array. Then based on the repeated vertex information, if the current vertex is a repeated vertex, the repeated vertex identifier is removed from the array to form a repeated vertex index.
  • the decoding process of the UV coordinates of the three-dimensional grid is the inverse process of the encoding process.
  • the coordinate prediction residual is first entropy decoded. Then restore the repeated vertices in the geometric information and connectivity relationship, iterate the connection relationship and record the connection order of the points, and predict the UV coordinates of the vertices based on this order.
  • the prediction process uses the projection mapping relationship between the three-dimensional and two-dimensional triangles, and predicts the current point based on the UV coordinates of the decoded point according to the encoding-side prediction rules to obtain the predicted UV coordinates. Add the predicted coordinates to the residual value decoded by entropy to obtain the UV coordinate position to be decoded.
  • UV coordinates of the initial triangle do not use predictive encoding, but directly encode their The UV coordinate value, after the decoder decodes the UV coordinates of the triangle, is used as the initial triangle to start traversing and decoding the UV coordinates of other triangle vertices.
  • a video decoder is directly used to decode the texture map, and a frame-by-frame texture map can be obtained.
  • the file format of the texture map is not emphasized here.
  • the format can be jpg, png. wait.
  • the three-dimensional grid decoding process can be divided into:
  • decode each sub-stream After destreaming, decode each sub-stream. Among them, use the video decoder to decode the occupancy map, geometry map, and texture map. Use the decoder corresponding to the encoding method of the encoding end to use the connection relationship and UV coordinate sub-stream. to decode.
  • connection relationship decode the connection relationship sub-stream and reconstruct the connection relationship.
  • texture map decode the texture map sub-stream to obtain frame-by-frame texture maps.
  • the decoding process in the embodiment of the present application is the inverse process of encoding.
  • the decoding block diagram is shown in Figure 15.
  • the code stream is decomposed into a patch information sub-stream, a placeholder map sub-stream, and a geometric map sub-stream.
  • Stream connect the relationship sub-stream, UV coordinate sub-stream, and texture map sub-stream and decode them respectively; use placeholder map and low-precision geometric map to reconstruct the geometric information of low-precision mesh, use placeholder map, low-precision geometric map
  • Geometric diagrams and high-precision geometric diagrams can reconstruct the geometric information of high-precision meshes; use the connection relationship sub-stream to decode the connection relationship of the grid; decode the UV coordinates of the grid from the UV coordinate sub-stream; and decode the UV coordinates of the grid from the texture map sub-stream.
  • the frame-by-frame texture map is decoded from the code stream; finally, the three-dimensional grid is reconstructed using the reconstructed geometric information, connection information, UV coordinate information, texture map and other information.
  • the embodiment of the present application is a method embodiment of the opposite end corresponding to the embodiment of the above encoding method.
  • the decoding process is the inverse process of encoding. All the above implementation methods on the encoding side are applicable to the embodiment of the decoding end. The same technical effect can also be achieved, which will not be described again here.
  • this embodiment of the present application also provides a decoding device 1600, which includes:
  • the reconstruction module 1601 is used to decode and reconstruct the first geometric information according to the obtained code stream corresponding to the target three-dimensional grid;
  • the fifth acquisition module 1602 is used to perform repeated vertex screening on the first geometric information and obtain repeated vertex information.
  • the repeated vertices are vertices other than the first vertex among multiple vertices with the same position coordinates.
  • the first vertex is The vertex is one of multiple vertices with the same position coordinates;
  • the decoding module 1603 is configured to decode the connection relationship code stream of the target three-dimensional grid according to the repeated vertex information.
  • the method of obtaining repeated vertex information includes:
  • the repeated vertex information includes the index of the repeated vertex and the texture coordinate index of the first vertex and the repeated vertex.
  • the device also includes:
  • the second query module is used to query whether there are duplicate vertices for each triangle patch based on the duplicate vertex information during the process of decoding the connection relationship code stream;
  • the second decoding module is used for the decoding end to decode the index of the repeated vertex from the repeated identification code stream when there is a repeated vertex.
  • the device also includes:
  • a second recovery module configured to recover the second geometric information and the decoded connection relationship according to the index of the repeated vertex, where the second geometric information is mesh geometry information excluding repeated vertices;
  • the second recording module is used to traverse the connection relationships of restored duplicate vertices and record the traversal order
  • the third decoding module is used to decode the texture coordinate code stream of the vertices according to the traversal order.
  • this device embodiment is a device corresponding to the above-mentioned method. All implementation methods in the above-mentioned method embodiment are applicable to this device embodiment and can achieve the same technical effect, which will not be described again here.
  • the embodiment of the present application also provides a decoding device, including a processor, a memory, and a program or instruction stored in the memory and executable on the processor.
  • a decoding device including a processor, a memory, and a program or instruction stored in the memory and executable on the processor.
  • the program or instruction is executed by the processor, the above-mentioned decoding device is implemented.
  • Each process of the decoding method embodiment can achieve the same technical effect. To avoid repetition, it will not be described again here.
  • Embodiments of the present application also provide a readable storage medium.
  • Programs or instructions are stored on the computer-readable storage medium.
  • the program or instructions are executed by a processor, each process of the above-mentioned decoding method embodiment is implemented, and the same process can be achieved. To avoid repetition, the technical effects will not be repeated here.
  • the computer-readable storage medium is such as read-only memory (ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk, etc.
  • An embodiment of the present application also provides a decoding device, including a processor and a communication interface, wherein the processor is used to decode and reconstruct the first geometric information according to the obtained code stream corresponding to the target three-dimensional grid;
  • the geometric information is filtered for repeated vertices to obtain repeated vertex information.
  • the repeated vertices are vertices other than the first vertex among multiple vertices with the same position coordinates.
  • the first vertex is one of the multiple vertices with the same position coordinates.
  • Vertex decode the connection relationship code stream of the target three-dimensional grid according to the repeated vertex information.
  • the processor is used for:
  • the repeated vertex information includes the index of the repeated vertex and the texture coordinate index of the first vertex and the repeated vertex.
  • the processor is used for:
  • connection relationship code stream for each triangle patch, based on the repeated vertex information, query whether there are repeated vertices;
  • the index of the duplicate vertex is decoded from the duplicate identification code stream.
  • the processor is used for:
  • the texture coordinate code stream of the vertex is decoded.
  • This decoding device embodiment corresponds to the above-mentioned decoding method embodiment.
  • Each implementation process and implementation manner of the above-mentioned method embodiment can be applied to this decoding device embodiment, and can achieve the same technical effect.
  • the embodiment of the present application also provides a decoding device.
  • the structure of the decoding device is shown in Figure 12, which will not be described again here.
  • the decoding device in the embodiment of the present application also includes: instructions or programs stored in the memory and executable on the processor.
  • the processor calls the instructions or programs in the memory to execute the method executed by each module shown in Figure 16, and To achieve the same technical effect, to avoid repetition, we will not repeat them here.
  • 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 decoding method embodiment is implemented, and the same process can be achieved. To avoid repetition, the technical effects will not be repeated here.
  • the processor is the processor in the decoding device 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.
  • this embodiment of the present application also provides a communication device 1700, including a processor 1701 and a memory 1702.
  • the memory 1702 stores programs or instructions that can be run on the processor 1701, for example , when the communication device 1700 is a coding device, when the program or instruction is executed by the processor 1701, each step of the above coding method embodiment is implemented, and the same technical effect can be achieved.
  • the communication device 1700 is a decoding device, when the program or instruction is executed by the processor 1701, each step of the above decoding method embodiment is implemented, and the same technical effect can be achieved. To avoid duplication, the details are not repeated here.
  • 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 the above encoding method or decoding method.
  • Each process in the example can achieve the same technical effect. To avoid repetition, we will not repeat it 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 or decoding method.
  • Each process of the embodiment can achieve the same technical effect, so to avoid repetition, it will not be described again here.
  • Embodiments of the present application also provide a communication system, which at least includes: an encoding device and a decoding device.
  • the encoding device can be used to perform the steps of the encoding method as described above.
  • the decoding device can be used to perform the decoding method as described above. A step of. And can achieve the same technical effect. To avoid repetition, they 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 the existing technology.
  • 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)
  • Multimedia (AREA)
  • Computer Graphics (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Signal Processing (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The present application relates to the technical field of coding and decoding. Disclosed are a coding method and apparatus, a decoding method and apparatus, and a device. The coding method comprises: a coding end performing decoding and reconstruction on geometric information of a coded target three-dimensional grid, so as to acquire reconstructed first geometric information; the coding end performing repeated vertex screening on the first geometric information, so as to acquire information of repeated vertexes, wherein the repeated vertexes are vertexes among a plurality of vertexes having the same position coordinates other than a first vertex, and the first vertex is one of the plurality of vertexes having the same position coordinates; the coding end re-sorting a first connection relationship of the target three-dimensional grid according to the information of the repeated vertexes, so as to acquire a re-sorted second connection relationship; and the coding end coding the second connection relationship.

Description

编码、解码方法、装置及设备Encoding and decoding methods, devices and equipment
相关申请的交叉引用Cross-references to related applications
本申请主张在2022年04月08日在中国提交的中国专利申请No.202210370125.8的优先权,其全部内容通过引用包含于此。This application claims priority to Chinese Patent Application No. 202210370125.8 filed in China on April 8, 2022, the entire content of which is incorporated herein by reference.
技术领域Technical field
本申请属于编解码技术领域,具体涉及一种编码、解码方法、装置及设备。This application belongs to the field of coding and decoding technology, and specifically relates to a coding and decoding method, device and equipment.
背景技术Background technique
考虑到三维网格的顶点与点云都是空间中一组无规则分布的离散点集,具有相似的特点。所以三维网格中几何信息也可以使用基于视频的点云压缩标准进行压缩。但三维网格的顶点具有空间分布更加稀疏,更加不均匀的特点,直接使用基于视频的点云压缩方法的压缩效率较低。此外,基于视频的点云压缩标准中并不涉及对网格顶点连接关系、网格纹理(Ultraviolet,UV)坐标属性和纹理图的压缩。由于三维网格的生成机制,会存在部分几何重复点,这些几何重复点几何坐标相同,UV坐标不同,几何重复点会引起三维网格不连续的问题,出现许多边只相邻一个三角形的单边情况,而单边又需要耗费多余的码字去标识,因此降低了连接性关系的编码效率。Considering that the vertices and point clouds of a three-dimensional grid are both a set of discrete points randomly distributed in space, they have similar characteristics. Therefore, the geometric information in the three-dimensional mesh can also be compressed using video-based point cloud compression standards. However, the vertices of the three-dimensional grid have the characteristics of sparser and more uneven spatial distribution, and the compression efficiency of directly using video-based point cloud compression methods is low. In addition, the video-based point cloud compression standard does not involve the compression of mesh vertex connection relationships, mesh texture (Ultraviolet, UV) coordinate attributes and texture maps. Due to the generation mechanism of the three-dimensional mesh, there will be some geometric repeating points. These geometric repeating points have the same geometric coordinates but different UV coordinates. The geometric repeating points will cause the discontinuity problem of the three-dimensional mesh, and there will be single triangles with many sides adjacent to each other. Side cases, and unilateral needs to consume redundant codewords to identify, thus reducing the coding efficiency of connectivity relationships.
发明内容Contents of the invention
本申请实施例提供一种编码、解码方法、装置及设备,能够解决现有技术的三维网格生成机制会造成部分几何重复点,这些几何重复点会引起三维网格不连续,造成降低三维网格的连接性关系的编码效率的问题。The embodiments of the present application provide an encoding and decoding method, device and equipment, which can solve the problem that the three-dimensional mesh generation mechanism of the existing technology will cause some geometric repeating points. These geometric repeating points will cause the three-dimensional mesh to be discontinuous, resulting in the reduction of the three-dimensional network. The issue of encoding efficiency of lattice connectivity relationships.
第一方面,提供了一种编码方法,包括:The first aspect provides an encoding method, including:
编码端对编码后的目标三维网格的几何信息进行解码重建,获取重建后的第一几何信息;The encoding end decodes and reconstructs the geometric information of the encoded target three-dimensional grid, and obtains the reconstructed first geometric information;
所述编码端对所述第一几何信息进行重复顶点筛选,获取重复顶点信息,所述重复顶点为位置坐标相同的多个顶点中除第一顶点以外的顶点,所述第一顶点为位置坐标相同的多个顶点中的其中一个顶点;The encoding end performs repeated vertex screening on the first geometric information to obtain repeated vertex information. The repeated vertices are vertices other than the first vertex among multiple vertices with the same position coordinates, and the first vertex is the position coordinate. One of the same vertices;
所述编码端根据所述重复顶点信息,进行所述目标三维网格的第一连接关系的重排序,获取重排序后的第二连接关系;The encoding end reorders the first connection relationships of the target three-dimensional grid based on the repeated vertex information, and obtains the reordered second connection relationships;
所述编码端对所述第二连接关系进行编码。The encoding end encodes the second connection relationship.
第二方面,提供了一种编码装置,包括: In a second aspect, an encoding device is provided, including:
第一获取模块,用于对编码后的目标三维网格的几何信息进行解码重建,获取重建后的第一几何信息;The first acquisition module is used to decode and reconstruct the geometric information of the encoded target three-dimensional grid, and obtain the reconstructed first geometric information;
第二获取模块,用于对所述第一几何信息进行重复顶点筛选,获取重复顶点信息,所述重复顶点为位置坐标相同的多个顶点中除第一顶点以外的顶点,所述第一顶点为位置坐标相同的多个顶点中的其中一个顶点;The second acquisition module is used to filter the repeated vertices of the first geometric information and obtain the repeated vertex information. The repeated vertices are vertices other than the first vertex among multiple vertices with the same position coordinates. The first vertex Is one of the vertices among multiple vertices with the same position coordinates;
第三获取模块,用于根据所述重复顶点信息,进行所述目标三维网格的第一连接关系的重排序,获取重排序后的第二连接关系;A third acquisition module, configured to reorder the first connection relationships of the target three-dimensional mesh according to the repeated vertex information, and obtain the reordered second connection relationships;
第一编码模块,用于对所述第二连接关系进行编码。The first encoding module is used to encode the second connection relationship.
第三方面,提供了一种解码方法,包括:The third aspect provides a decoding method, including:
解码端根据获取的目标三维网格对应的码流,解码重建第一几何信息;The decoding end decodes and reconstructs the first geometric information according to the obtained code stream corresponding to the target three-dimensional grid;
所述解码端对所述第一几何信息进行重复顶点筛选,获取重复顶点信息,所述重复顶点为位置坐标相同的多个顶点中除第一顶点以外的顶点,所述第一顶点为位置坐标相同的多个顶点中的其中一个顶点;The decoding end performs repeated vertex screening on the first geometric information to obtain repeated vertex information. The repeated vertices are vertices other than the first vertex among multiple vertices with the same position coordinates, and the first vertex is the position coordinate. One of the same vertices;
所述解码端根据所述重复顶点信息,对所述目标三维网格的第一连接关系码流进行解码。The decoding end decodes the first connection relationship code stream of the target three-dimensional grid according to the repeated vertex information.
第四方面,提供了一种解码装置,包括:In the fourth aspect, a decoding device is provided, including:
重建模块,用于根据获取的目标三维网格对应的码流,解码重建第一几何信息;The reconstruction module is used to decode and reconstruct the first geometric information according to the obtained code stream corresponding to the target three-dimensional grid;
第五获取模块,用于对所述第一几何信息进行重复顶点筛选,获取重复顶点信息,所述重复顶点为位置坐标相同的多个顶点中除第一顶点以外的顶点,所述第一顶点为位置坐标相同的多个顶点中的其中一个顶点;The fifth acquisition module is used to perform repeated vertex screening on the first geometric information and obtain repeated vertex information. The repeated vertices are vertices other than the first vertex among multiple vertices with the same position coordinates. The first vertex Is one of the vertices among multiple vertices with the same position coordinates;
第一解码模块,用于根据所述重复顶点信息,对所述目标三维网格的连接关系码流进行解码。The first decoding module is used to decode the connection relationship code stream of the target three-dimensional grid according to the repeated vertex information.
第五方面,提供了一种编码设备,包括处理器和存储器,所述存储器存储可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第一方面所述的方法的步骤。In a fifth aspect, a coding device is provided, including a processor and a memory. The memory stores programs or instructions that can be run on the processor. When the program or instructions are executed by the processor, the first The steps of the method described in this aspect.
第六方面,提供了一种编码设备,包括处理器及通信接口,其中,所述处理器用于对编码后的目标三维网格的几何信息进行解码重建,获取重建后的第一几何信息;对所述第一几何信息进行重复顶点筛选,获取重复顶点信息,所述重复顶点为位置坐标相同的多个顶点中除第一顶点以外的顶点,所述第一顶点为位置坐标相同的多个顶点中的其中一个顶点;根据所述重复顶点信息,进行所述目标三维网格的第一连接关系的重排序,获取重排序后的第二连接关系;对所述第二连接关系进行编码。In a sixth aspect, an encoding device is provided, including a processor and a communication interface, wherein the processor is used to decode and reconstruct the geometric information of the encoded target three-dimensional grid, and obtain the reconstructed first geometric information; The first geometric information is filtered for repeated vertices to obtain repeated vertex information. The repeated vertices are vertices other than the first vertex among multiple vertices with the same position coordinates. The first vertex is a plurality of vertices with the same position coordinates. one of the vertices in; reorder the first connection relationships of the target three-dimensional mesh according to the repeated vertex information, and obtain the reordered second connection relationship; and encode the second connection relationship.
第七方面,提供了一种解码设备,包括处理器和存储器,所述存储器存储可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第三方面所述的方法的步骤。In a seventh aspect, a decoding device is provided, including a processor and a memory. The memory stores programs or instructions that can be run on the processor. When the program or instructions are executed by the processor, the third process is implemented. The steps of the method described in this aspect.
第八方面,提供了一种解码设备,包括处理器及通信接口,其中,所述处理器用于根 据获取的目标三维网格对应的码流,解码重建第一几何信息;对所述第一几何信息进行重复顶点筛选,获取重复顶点信息,所述重复顶点为位置坐标相同的多个顶点中除第一顶点以外的顶点,所述第一顶点为位置坐标相同的多个顶点中的其中一个顶点;根据所述重复顶点信息,对所述目标三维网格的连接关系码流进行解码。In an eighth aspect, a decoding device is provided, including a processor and a communication interface, wherein the processor is used to root Decode and reconstruct the first geometric information according to the obtained code stream corresponding to the target three-dimensional mesh; perform repeated vertex screening on the first geometric information to obtain repeated vertex information, and the repeated vertices are multiple vertices with the same position coordinates except Vertices other than the first vertex, the first vertex being one of multiple vertices with the same position coordinates; decoding the connection relationship code stream of the target three-dimensional grid according to the repeated vertex information.
第九方面,提供了一种通信系统,包括:编码设备和解码设备,所述编码设备可用于执行如第一方面所述的方法的步骤,所述解码设备可用于执行如第三方面所述的方法的步骤。In a ninth aspect, a communication system is provided, including: an encoding device and a decoding device. The encoding device can be used to perform the steps of the method described in the first aspect, and the decoding device can be used to perform the steps of the method described in the third aspect. steps of the method.
第十方面,提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面所述的方法的步骤,或者实现如第三方面所述的方法的步骤。In a tenth 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 third aspect.
第十一方面,提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面所述的方法,或实现如第三方面所述的方法。In an eleventh aspect, a chip is provided. 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 the method described in the first aspect. method, or implement a method as described in the third aspect.
第十二方面,提供了一种计算机程序/程序产品,所述计算机程序/程序产品被存储在存储介质中,所述计算机程序/程序产品被至少一个处理器执行以实现如第一方面所述的方法的步骤,或者实现如第三方面所述的方法的步骤。In a twelfth 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 as described in the first aspect The steps of the method, or the steps of implementing the method as described in the third aspect.
在本申请实施例中,通过对编码后的目标三维网格的几何信息进行解码重建,获取重建后的第一几何信息,对所述第一几何信息进行重复顶点筛选,获取重复顶点信息,根据所述重复顶点信息,进行所述目标三维网格的第一连接关系的重排序,获取重排序后的第二连接关系,对所述第二连接关系进行编码;上述方案,通过利用重建的几何信息进行重复顶点的筛选,然后基于重复顶点信息进行连接关系的重排序,并进行编码,以此能够避免重复顶点造成的三维网格不连续的问题,提升三维网格的连接性关系的编码效率。In the embodiment of the present application, by decoding and reconstructing the geometric information of the encoded target three-dimensional mesh, the reconstructed first geometric information is obtained, and the first geometric information is subjected to repeated vertex screening to obtain repeated vertex information. According to The repeated vertex information is used to reorder the first connection relationship of the target three-dimensional mesh, obtain the reordered second connection relationship, and encode the second connection relationship; the above solution uses the reconstructed geometry The information is screened for repeated vertices, and then the connection relationships are reordered and encoded based on the repeated vertex information. This can avoid the discontinuity problem of the three-dimensional grid caused by repeated vertices and improve the coding efficiency of the connectivity relationships of the three-dimensional grid. .
附图说明Description of the drawings
图1是本申请实施例的编码方法的流程示意图;Figure 1 is a schematic flow chart of the encoding method according to the embodiment of the present application;
图2是网格简化中合并顶点过程的示意图;Figure 2 is a schematic diagram of the process of merging vertices in mesh simplification;
图3是基于网格的精细划分过程示意图;Figure 3 is a schematic diagram of the fine division process based on grid;
图4是Patch排列的八种方向示意图;Figure 4 is a schematic diagram of the eight directions of patch arrangement;
图5是高精度几何信息的编码过程示意图;Figure 5 is a schematic diagram of the encoding process of high-precision geometric information;
图6是raw patch示意图;Figure 6 is a schematic diagram of raw patch;
图7是本申请实施例中编码连接关系的示意图之一;Figure 7 is one of the schematic diagrams of coding connection relationships in the embodiment of the present application;
图8是本申请实施例中编码连接关系的示意图之二;Figure 8 is the second schematic diagram of the coding connection relationship in the embodiment of the present application;
图9是是预测原理的几何示意图;Figure 9 is a geometric diagram of the prediction principle;
图10是基于视频的三维网格的编码框架示意图;Figure 10 is a schematic diagram of the coding framework of a three-dimensional grid based on video;
图11是本申请实施例的编码装置的模块示意图; Figure 11 is a schematic module diagram of an encoding device according to an embodiment of the present application;
图12是本申请实施例的编码设备的结构示意图;Figure 12 is a schematic structural diagram of an encoding device according to an embodiment of the present application;
图13是本申请实施例的解码方法的流程示意图;Figure 13 is a schematic flow chart of the decoding method according to the embodiment of the present application;
图14是几何信息重建框图;Figure 14 is a block diagram of geometric information reconstruction;
图15是基于视频的三维网格的解码框架示意图;Figure 15 is a schematic diagram of the decoding framework based on the three-dimensional grid of video;
图16是本申请实施例的解码装置的模块示意图;Figure 16 is a schematic module diagram of a decoding device according to an embodiment of the present application;
图17是本申请实施例的通信设备的结构示意图。Figure 17 is a schematic structural diagram of a communication device according to an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art fall within the scope of protection of this application.
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的术语在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”所区别的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”一般表示前后关联对象是一种“或”的关系。The terms "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. For example, the first object can be one or multiple. In addition, "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.
值得指出的是,本申请实施例所描述的技术不限于长期演进型(Long Term Evolution,LTE)/LTE的演进(LTE-Advanced,LTE-A)系统,还可用于其他无线通信系统,诸如码分多址(Code Division Multiple Access,CDMA)、时分多址(Time Division Multiple Access,TDMA)、频分多址(Frequency Division Multiple Access,FDMA)、正交频分多址(Orthogonal Frequency Division Multiple Access,OFDMA)、单载波频分多址(Single-carrier Frequency Division Multiple Access,SC-FDMA)和其他系统。本申请实施例中的术语“系统”和“网络”常被可互换地使用,所描述的技术既可用于以上提及的系统和无线电技术,也可用于其他系统和无线电技术。以下描述出于示例目的描述了新空口(New Radio,NR)系统,并且在以下大部分描述中使用NR术语,但是这些技术也可应用于NR系统应用以外的应用,如第6代(6th Generation,6G)通信系统。It is worth pointing out that the technology described in the embodiments of this application is not limited to Long Term Evolution (LTE)/LTE Evolution (LTE-Advanced, LTE-A) systems, and can also be used in other wireless communication systems, such as code Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), Frequency Division Multiple Access (FDMA), Orthogonal Frequency Division Multiple Access, OFDMA), Single-carrier Frequency Division Multiple Access (SC-FDMA) and other systems. The terms "system" and "network" in the embodiments of this application are often used interchangeably, and the described technology can be used not only for the above-mentioned systems and radio technologies, but also for other systems and radio technologies. The following description describes a New Radio (NR) system for example purposes, and NR terminology is used in much of the following description, but these techniques can also be applied to applications other than NR system applications, such as 6th generation Generation, 6G) communication system.
下面结合附图,通过一些实施例及其应用场景对本申请实施例提供的编码、解码方法、装置及设备进行详细地说明。The encoding and decoding methods, devices and equipment provided by the embodiments of the present application will be described in detail below with reference to the accompanying drawings through some embodiments and their application scenarios.
如图1所示,本申请实施例提供一种编码方法,包括:As shown in Figure 1, this embodiment of the present application provides an encoding method, including:
步骤101,编码端对编码后的目标三维网格的几何信息进行解码重建,获取重建后的第一几何信息;Step 101: The encoding end decodes and reconstructs the geometric information of the encoded target three-dimensional grid, and obtains the reconstructed first geometric information;
需要说明的是,本申请中所说的目标三维网格可以理解为任意视频帧对应的三维网格,该目标三维网格的几何信息可以理解为是三维网格中顶点的坐标,该坐标通常指的是三维坐标。 It should be noted that the target three-dimensional grid mentioned in this application can be understood as the three-dimensional grid corresponding to any video frame. The geometric information of the target three-dimensional grid can be understood as the coordinates of the vertices in the three-dimensional grid. These coordinates are usually Refers to three-dimensional coordinates.
步骤102,所述编码端对所述第一几何信息进行重复顶点筛选,获取重复顶点信息;Step 102: The encoding end performs repeated vertex screening on the first geometric information to obtain repeated vertex information;
需要说明的是,通过对重复顶点的筛选,可以得到重复顶点的信息,同时也可以得到第二几何信息,所述第二几何信息为不包括重复顶点的网格几何信息,所述重复顶点为位置坐标相同的多个顶点中除第一顶点以外的顶点,所述第一顶点为位置坐标相同的多个顶点中的其中一个顶点。It should be noted that by filtering the repeated vertices, the information of the repeated vertices can be obtained, and at the same time, the second geometric information can be obtained. The second geometric information is the mesh geometric information excluding the repeated vertices. The repeated vertices are Vertices other than the first vertex among the plurality of vertices with the same position coordinates, and the first vertex is one of the plurality of vertices with the same position coordinates.
步骤103,所述编码端根据所述重复顶点信息,进行所述目标三维网格的第一连接关系的重排序,获取重排序后的第二连接关系;Step 103: The encoding end reorders the first connection relationships of the target three-dimensional grid based on the repeated vertex information, and obtains the reordered second connection relationships;
需要说明的是,本申请实施例中所说的连接关系用于描述三维网格中顶点和面片等元素之间的连接关系,也可以称为连接性关系。It should be noted that the connection relationship mentioned in the embodiment of this application is used to describe the connection relationship between elements such as vertices and patches in the three-dimensional mesh, and may also be called a connectivity relationship.
步骤104,所述编码端对所述第二连接关系进行编码。Step 104: The encoding end encodes the second connection relationship.
需要说明的是,本申请实施例通过对重建的几何信息进行重复顶点的去除,然后再进行连接关系的重排序,进而对重排序后的连接关系进行编码,以此可以避免重复顶点造成的三维网格不连续的问题,提升三维网格的连接性关系的编码效率。It should be noted that the embodiment of the present application removes repeated vertices from the reconstructed geometric information, then reorders the connection relationships, and then encodes the reordered connection relationships, thereby avoiding the three-dimensional distortion caused by repeated vertices. The problem of grid discontinuity improves the coding efficiency of the connectivity relationship of the three-dimensional grid.
需要说明的是,为了获取重建的几何信息,首先需要进行几何信息的编码,本申请的一实施例中,对三维网格的几何信息进行编码的具体方式可以包括如下过程:It should be noted that in order to obtain the reconstructed geometric information, the geometric information needs to be encoded first. In an embodiment of the present application, the specific method of encoding the geometric information of the three-dimensional grid may include the following process:
步骤S21、在进行几何信息编码之前,可以先对目标三维网格进行简化处理,获取简化网格;Step S21: Before encoding geometric information, the target three-dimensional grid can be simplified first to obtain a simplified grid;
需要说明的是,该过程为可选的步骤。It should be noted that this process is an optional step.
具体的,所述编码端在进行简化时是基于量化参数,对所述目标三维网格进行简化处理,获取简化网格。Specifically, when performing simplification, the encoding end simplifies the target three-dimensional grid based on quantization parameters to obtain a simplified grid.
需要说明的是,本申请中所说的量化参数主要包括X向、Y向和Z向三个分量上的量化参数。It should be noted that the quantization parameters mentioned in this application mainly include quantization parameters in the three components of X direction, Y direction and Z direction.
可选地,基于量化参数,对所述目标三维网格进行简化处理,获取简化网格的具体实现方式为:Optionally, based on the quantified parameters, the target three-dimensional grid is simplified. The specific implementation method of obtaining the simplified grid is:
所述编码端在进行所述目标三维网格中的顶点合并时,将所述目标三维网格中顶点合并后的部分或全部顶点的位置坐标值调整为量化参数的倍数,获取简化网格。When merging vertices in the target three-dimensional grid, the encoding end adjusts the position coordinate values of some or all of the merged vertices in the target three-dimensional grid to multiples of quantization parameters to obtain a simplified grid.
需要说明的是,通过在设置合并后的点的位置时,考虑量化参数,将其设置为量化参数的倍数,该倍数可以为符合使需求的任意值,以此能够确保在反量化时不需要额外的信息便可恢复原始位置,将减少高精度的几何信息所消耗的数据量。It should be noted that by considering the quantization parameter when setting the position of the merged point, and setting it as a multiple of the quantization parameter, 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, which will reduce the amount of data consumed by high-precision geometric information.
下面对简化处理的具体实现方式说明如下。The specific implementation of the simplification process is described below.
对于输入的原始网格,首先进行网格简化的操作。网格简化的重点在于简化的操作以及对应的误差度量。这里的网格简化操作可以为基于边的简化。如图2所示,可以通过合并一条边的两个顶点来达到减少面片数和顶点数的目的。此外,还可通过基于点等网格简化方式对网格进行简化。For the input original mesh, mesh simplification is performed first. 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. In addition, the mesh can also be simplified through point-based mesh simplification methods.
在网格简化的过程中需要定义简化的误差度量。例如,可以选取顶点所有相邻面的方 程系数之和作为该顶点的误差度量,相应的边的误差度量即为边上两顶点的误差度量之和。在确定好简化操作的方式以及误差度量后就可以开始对网格进行简化。例如,可以将网格分为一片或多片局部网格,先计算片中初始网格的顶点误差来得到每条边的误差。然后将片内的所有边按误差按照某规则,如按照从小到大的规则进行排列。每次简化可以按照某种规则对边进行合并,如选取误差最小的边进行合并,同时计算合并后的顶点位置并更新所有与合并后顶点相关的边的误差,更新边排列的顺序。通过迭代将网格的面简化到某一预期数量。During the mesh simplification process it is necessary to define a simplified error measure. For example, you can select the directions of all adjacent faces of a vertex The sum of the process coefficients is used 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. After determining the method of simplification operation and the error measure, you can start to simplify the mesh. For example, 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. At the same time, 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:
1、顶点误差的计算1. Calculation of vertex error
顶点误差可以定义为顶点所有相邻面的方程的系数之和。例如,每个相邻面都定义了一个平面,可以用公式一表示: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:
公式一:D2=(nTv+d)2=vT(nnT)v+2dnTv+d2Formula 1: D 2 =(n T v+d) 2 =v T (nn T )v+2dn T v+d 2 ;
其中,D为任意顶点到平面的距离,n为平面的单位法向量,v为顶点的位置向量,d为常数。用二次曲面的形式表示为公式二:Q=(A,b,c)=(nnT,dn,d2);Among them, 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, and d is a constant. It is expressed as Formula 2 in the form of a quadratic surface: Q=(A,b,c)=(nn T ,dn,d 2 );
其中,Q为顶点误差,A,b,c为表示公式一中相应符号的系数。Among them, Q is the vertex error, A, b, c are the coefficients representing the corresponding symbols in Formula 1.
从公式二进而得到公式三:Q(v)=vTAv+2bTv+c;From formula 2, formula 3 is obtained: Q(v)=v T Av+2b T v+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为各自相对应的系数。当然,若存在多个相邻面则可向公式四中继续添加相应的平面误差方程。Since the vertex error is the sum of equation coefficients of all adjacent faces of the vertex, formula 4 can be made: Q 1 (v) + Q 2 (v) = (Q 1 + Q 2 ) (v) = (A 1 +A 2 ,b 1 +b 2 ,c 1 +c 2 )(v). Among them, 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. Of course, if there are multiple adjacent surfaces, the corresponding plane error equation can be added to Formula 4.
2、合并顶点2. Merge vertices
合并顶点过程的一个主要步骤为确定合并后顶点的位置。根据误差公式三,可以选择能让误差尽可能小的顶点位置。例对通过对公式三求偏导数,可以得到,公式四: A major step in the process of merging vertices is determining the location of the merged vertices. According to the error formula three, 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:
公式五: Formula five:
由上式可知,只有在矩阵A可逆的情况下,才能求得使误差最小的点。因此,此处对于合并后的顶点位置可以有多种取法。如果考虑网格简化的质量,在矩阵A可逆的情况下,选取使误差最小的顶点位置;在矩阵A不可逆的情况下,可以选择边上包括两端点的其中一个使误差最小的点。如果考虑网格简化的复杂度,可以直接选取边的中点或者两端点的其中一个作为合并后的顶点的位置。如果考虑网格简化后量化的效率,还需要调整合并后的顶点位置。由于量化后对于高精度信息需要单独编码,因此,将一部分合并后的顶点位置调整为相应量化参数的倍数,确保在反量化时不需要额外的信息便可恢复原始位置,将减少高精度的几何信息所消耗的数据量。It can be seen from the above formula that only when the matrix A is invertible, the point that minimizes the error can be found. Therefore, there are many ways to obtain the merged vertex positions here. If you consider the quality of mesh simplification, if matrix A is reversible, select the vertex position that minimizes the error; if matrix A is irreversible, you can select one of the two endpoints on the edge that minimizes the error. If you consider the complexity of mesh simplification, you can directly select the midpoint of the edge or one of the two endpoints as the position of the merged vertex. If the efficiency of quantization after mesh simplification is considered, the merged vertex positions also need to be adjusted. Since high-precision information needs to be encoded separately after quantization, a part of the merged vertex positions are adjusted to multiples of the corresponding quantization parameters to ensure that the original positions can be restored without additional information during inverse quantization, which will reduce the number of high-precision geometries. The amount of data consumed by the message.
确定了如何选取合并后的顶点位置后,便可以开始合并顶点的过程。例如,可以先计算初始网格中所有的边的误差,将其按误差按照某规格,如从小到大的顺序进行排列。每 次迭代,选取误差满足某规则的边,如误差最小的边。从网格顶点中移除边的两个端点并添加合并后的顶点到网格顶点的集合中。将合并前的两个顶点的所有或部分相邻顶点作为合并后的顶点的相邻顶点,然后更新与该合并顶点相连接的所有点的误差度量,从而得到新产生的边的误差。然后从片的全局来更新边的排列顺序。循环上述过程,直到达到满足有损编码所需要的面数。Once you have determined how to select the merged vertex positions, you can begin the process of merging vertices. For example, you can first calculate the errors of all edges in the initial grid and arrange them according to a certain specification, such as from small to large. Every Iterations, select the edge whose error satisfies a certain rule, such as the edge with the smallest error. Removes the two endpoints of an edge from the mesh vertices and adds the merged vertices to the collection of mesh vertices. Use all or part of the adjacent vertices of the two vertices before merging as adjacent vertices of the merged vertex, and then update the error metric of all points connected to the merged vertex to obtain the error of the newly generated edge. Then update the edge order from the global perspective of the slice. The above process is repeated until the number of faces required to meet the lossy encoding is reached.
3、更新连接关系3. Update the connection relationship
在合并顶点之后,由于顶点集中删除了一部分顶点,同时又添加了许多新的顶点,因此需要更新顶点之间的连接关系。例如,在合并顶点过程中可以确定合并后的顶点对应的合并之前的两个顶点。只需要用合并后的顶点的索引替换所有在面中出现的合并之前的两个顶点的索引,然后删除具有重复索引的面,就可以达到更新连接关系的目的。After merging vertices, since some vertices are deleted from the vertex set and many new vertices are added, 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.
以上即为网格简化的主要过程。同时,三维网格还可能会携带有属性信息,对属性信息也可能需简化。对于带有属性信息的网格,如纹理坐标,颜色,法向量等,可以将顶点坐标扩展到更高的维度从而计算带有属性信息的顶点误差。以纹理坐标为例,设顶点坐标为(x,y,z),纹理坐标为(u,v),则扩展后的顶点为(x,y,z,u,v)。设扩展后的三角形T=(p,q,r),为了确定高维空间上的误差度量,首先计算两个标准正交向量,即:The above is the main process of mesh simplification. At the same time, the three-dimensional grid may also carry attribute information, and the attribute information may also need to be simplified. For meshes with 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. Taking texture coordinates as an example, assuming the vertex coordinates are (x, y, z) and the texture coordinates are (u, v), then the expanded vertices are (x, y, z, u, v). Assume the expanded triangle T = (p, q, r). In order to determine the error measure in the high-dimensional space, first calculate two standard orthogonal vectors, namely:
公式六: Formula six:
公式七: Formula 7:
其中,e1,e2为T所在平面上的两个向量,q为,e2为,此处"·"代表向量的点乘,它定义了该高维平面上的一个坐标轴,以p为原点。考虑一个任意点v,另u=p-v,由公式八:‖u‖2=(u·e1)2+...+(μ·en)2Among them, 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. Consider an arbitrary point v, and u=pv, according to formula 8: ‖u‖ 2 = (u·e 1 ) 2 +...+(μ·e n ) 2 ;
即公式九:(u·e3)2+...+(u·en)2=‖μ‖2-(μ·e1)2-(u·e2)2That is Formula 9: (u·e 3 ) 2 +...+(u·e n ) 2 =‖μ‖ 2 -(μ·e 1 ) 2 -(u·e 2 ) 2 .
由于e1,e2为T所在平面上的两个向量,则公式九左边项即为顶点到T所在平面的距离的平方,即公式十:D2=‖μ‖2-(μ·e1)2-(u·e2)2Since e 1 and e 2 are two vectors on the plane where T is located, the left-hand term of Formula 9 is the square of the distance from the vertex to the plane where T is located, that is, Formula 10: D 2 =‖μ‖ 2 -(μ·e 1 ) 2 -(u·e 2 ) 2 ;
对其进行展开并合并后可得到与公式三类似的方程,其中:After expanding and merging them, an equation similar to Formula 3 can be obtained, where:
公式十一: Formula 11:
公式十二:b=(p·e1)e1+(p·e2)e2-p;Formula 12: b=(p·e 1 )e 1 +(p·e 2 )e 2 -p;
公式十三:c=p·p-(p·e1)2-(p·e2)2Formula 13: c=p·p-(p·e 1 ) 2 -(p·e 2 ) 2 .
得到上述误差度量后,则可以进行与之前三维信息一样的后续步骤,从而实现了对于带有属性信息的网格的简化。After obtaining the above error metric, the same subsequent steps as the previous three-dimensional information can be carried out, thereby achieving the simplification of the grid with attribute information.
通常来说,图像的边缘部分更能吸引人们的注意力,从而影响人们对于该图像的质量评价。三维网格也是如此,人们往往更容易注意到边界部分。因此,是否保持边界也是网格简化中影响质量的一个因素。网格的边界一般为几何形状的边界以及纹理的边界。当一条边只属于一个面时,该边即为一个几何边界。当同一个顶点具有两个或多个纹理坐标时,该顶点即为纹理坐标的边界。在网格简化时,以上边界均不应被合并。因此,在每次简化时可以先判断该边上的顶点是否为边界点,若为边界点则跳过,直接进行下一次迭代。 Generally speaking, 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.
步骤S22、对所述简化网格的几何信息进行量化,获取第一信息;Step S22: Quantify the geometric information of the simplified grid to obtain the first information;
需要说明的是,该简化网格的几何信息可以理解为是三维网格中顶点的坐标,该坐标通常指的是三维坐标。It should be noted that the geometric information of the simplified mesh can be understood as the coordinates of the vertices in the three-dimensional mesh, and these coordinates usually refer to three-dimensional coordinates.
具体地,所述第一信息包括以下至少一项:Specifically, the first information includes at least one of the following:
A11、第一精度几何信息;A11, first precision geometric information;
需要说明的是,该第一精度几何信息可以理解为低精度几何信息,即低精度几何信息指的是目标三维网格量化后的几何信息,即量化后的目标三维网格包括的各顶点三维坐标信息。It should be noted that 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.
A12、第二精度几何信息;A12, second precision geometric information;
需要说明的是,该第二精度几何信息可以理解为高精度几何信息,高精度几何信息可以看作是量化过程中丢失的几何信息,即丢失的三维坐标信息。It should be noted that 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.
A13、补充点的信息;A13. Supplementary point information;
需要说明的是,补充点的信息是指量化过程中产生的需要额外处理的点的信息,也就是说,所述补充点为量化过程中产生的需要额外处理的点,例如,坐标位置出现重叠的重复点等,通过对重复点进行处理,可以使得在量化中坐标位置重叠的顶点在反量化后恢复到原来的位置。It should be noted that 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. By processing the repeated points, the vertices whose coordinate positions overlap during quantization can be restored to their original positions after dequantization.
可选地,该补充点的信息,包括以下至少一项:Optionally, the supplementary point information includes at least one of the following:
A131、补充点对应的第一精度几何信息中顶点的索引;A131. Supplement the index of the vertex in the first precision geometric information corresponding to the point;
需要说明的是,通过标识索引,便可知道量化后的网格中,哪些点标识的是量化前的三维网格中的多个点,即量化前的三维网格中的多个点在量化后重合到了一起,通过顶点的索引便可确定补充点的低精度几何信息。It should be noted that by identifying the index, you can know which points in the quantized grid identify multiple points in the three-dimensional grid before quantification, that is, multiple points in the three-dimensional grid before quantization are After they are coincident together, the low-precision geometric information of the supplementary points can be determined through the index of the vertices.
A132、补充点的第三精度几何信息;A132. Supplement the third precision geometric information of the point;
需要说明的是,该第三精度几何信息可以理解为补充点的低精度几何信息,即补充点被量化后的三维坐标信息。It should be noted that 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.
A133、补充点的第四精度几何信息;A133. Supplement the fourth precision geometric information of the point;
需要说明的是,该第四精度几何信息可以理解为补充点的高精度几何信息,即补充点在被量化过程中丢失的三维坐标信息。It should be noted that 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.
这里需要说明的是,在具体使用时,通过A131和A133或者通过A132和A133便可确定得到量化后隐藏的点有哪些。What needs to be noted here is that in specific use, the hidden points after quantization can be determined through A131 and A133 or A132 and A133.
可选地,本申请的一实施例中,步骤S22的具体实现方式为:Optionally, in an embodiment of the present application, the specific implementation of step S22 is:
所述编码端根据每一分量的量化参数,对所述简化网格中的每一顶点进行量化,获取第一精度几何信息。The encoding end quantizes each vertex in the simplified grid according to the quantization parameter of each component to obtain first precision geometric information.
需要说明的是,每一分量的量化参数可以根据使用需求灵活设置。It should be noted that the quantization parameters of each component can be flexibly set according to usage requirements.
通常情况下,对于精度要求不高的量化,在量化后可以只保留低精度几何信息;而对于精度要求较高的量化,在量化时不仅要记录低精度几何信息,也需要记录高精度几何信 息,以此在解码时能够实现精准的网格恢复,也就是说,上述的步骤S22的具体实现方式还应当包括:Normally, for quantization that does not require high precision, only low-precision geometric information can be retained after quantization; while for quantization that requires higher precision, not only low-precision geometric information must be recorded during quantization, but also high-precision geometric information must be recorded. Information, so that accurate grid recovery can be achieved during decoding. That is to say, the specific implementation of the above step S22 should also include:
所述编码端根据所述第一精度几何信息以及所述每一分量的量化参数,获取第二精度几何信息。The encoding end obtains second precision geometric information based on the first precision geometric information and the quantization parameter of each component.
例如,假设某顶点的三维坐标为(x,y,z),量化参数为(QPx,QPy,QPz),低精度几何信息(xl,yl,zl)和高精度几何信息(xh,yh,zh)的计算过程如公式十四至公式十九所示:For example, assume that the three-dimensional coordinates of a vertex are (x, y, z), the quantization parameters are (QP x , QP y , QP z ), low-precision geometric information (x l , y l , z l ) and high-precision geometric information The calculation process of (x h ,y h ,z h ) is as shown in Formula 14 to Formula 19:
公式十四:xl=f1(x,QPx);Formula 14: x l =f 1 (x,QP x );
公式十五:yl=f1(y,QPy);Formula 15: y l =f 1 (y,QP y );
公式十六:zl=f1(z,QPz);Formula 16: z l =f 1 (z,QP z );
公式十七:xh=f2(x,xl,QPx);Formula 17: x h = f 2 (x, x l , QP x );
公式十八:yh=f2(y,yl,QPy);Formula 18: y h = f 2 (y, y l ,QP y );
公式十九:zh=f2(z,zl,QPz);Formula 19: z h = f 2 (z,z l ,QP z );
其中,公式十四至公式十六中的f1函数是量化函数,量化函数的输入为某一维度的坐标和该维度的量化参数,输出为量化后的坐标值;公式十七至公式十九中的f2函数输入为原始坐标值、量化后的坐标值以及该维度的量化参数,输出为高精度的坐标值。Among them, 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.
f1函数可以有多种计算方式,比较通用的一种计算方式如公式二十至公式二十二所示,使用每个维度的原始坐标除以该维度的量化参数来计算。其中,/为除法运算符,对除法运算的结果可以采用不同的方式进行舍入,如四舍五入、向下取整、向上取整等。f2函数也存在多种计算方式,与公式十七至公式十九相对应的实现方式如公式二十三至公式二十五所示,其中,*为乘法运算符。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. There are also multiple calculation methods for the f 2 function. The implementation methods corresponding to Formula 17 to Formula 19 are as shown in Formula 23 to Formula 25, where * is the multiplication operator.
公式二十:xl=x/QPxFormula 20: x l =x/QP x ;
公式二十一:yl=y/QPyFormula 21: y l =y/QP y ;
公式二十二:zl=z/QPzFormula 22: z l =z/QP z ;
公式二十三:xh=x-xl*QPxFormula 23: x h =xx l *QP x ;
公式二十四:yh=y-yl*QPyFormula 24: y h =yy l *QP y ;
公式二十五:zh=z-zl*QPzFormula 25: z h =zz l *QP z ;
当量化参数为2的整数次幂时,f1函数和f2函数可以使用位运算实现,如公式二十六至公式三十一:When the quantization parameter is an integer power of 2, the f 1 function and f 2 function can be implemented using bit operations, such as Formula 26 to Formula 31:
公式二十六:xl=x>>log2QPxFormula 26: x l =x>>log 2 QP x ;
公式二十七:yl=y>>log2QPyFormula 27: y l =y>>log 2 QP y ;
公式二十八:zl=z>>log2QPzFormula 28: z l =z>>log 2 QP z ;
公式二十九:xh=x&(QPx-1);Formula 29: x h =x&(QP x -1);
公式三十:yh=y&(QPy-1);Formula 30: y h =y&(QP y -1);
公式三十一:zh=z&(QPz-1);Formula 31: z h =z&(QP z -1);
值得注意的是,无论f1函数和f2函数采用哪种计算方式,量化参数QPx、QPy和QPz都 可以灵活设置。首先,不同分量的量化参数并不一定相等,可以利用不同分量的量化参数的相关性,建立QPx、QPy和QPz之间的关系,为不同分量设置不同的量化参数;其次,不同空间区域的量化参数也不一定相等,可以根据局部区域顶点分布的稀疏程度自适应的设置量化参数。It is worth noting that no matter which calculation method is used for the f 1 function and f 2 function, the quantization parameters QP x , QP y and QP z are all Can be set flexibly. First, 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.
需要说明的是,高精度几何信息包含的是三维网格的轮廓的细节信息。为了进一步提高压缩效率,可以对高精度几何信息(xh,yh,zh)进一步处理。在三维网格模型中,不同区域的顶点高精度几何信息的重要程度是不同的。对于顶点分布稀疏的区域,高精度几何信息的失真并不会对三维网格的视觉效果产生较大影响。这时为了提高压缩效率,可以选择对高精度几何信息进一步量化,或者只保留部分点的高精度几何信息。It should be noted that the high-precision geometric information contains detailed information of the outline of the three-dimensional mesh. In order to further improve the compression efficiency, the high-precision geometric information (x h , y h , z h ) can be further processed. In a three-dimensional mesh model, 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. At this time, in order to improve the compression efficiency, you can choose to further quantify the high-precision geometric information, or only retain the high-precision geometric information of some points.
可选地,在进行量化的过程中,可能会存在多个点量化完重合到同一个位置,也就是说,此种情况下,上述的步骤S22的具体实现方式还应当包括:Optionally, during the quantization process, there may be multiple quantized points that completely coincide with the same position. That is to say, in this case, the specific implementation of the above step S22 should also include:
所述编码端根据所述简化网格的几何信息和所述第一精度几何信息,确定补充点的信息。The encoding end determines the information of the supplementary point based on the geometric information of the simplified grid and the first precision geometric information.
也就是说,在得到所有顶点的低精度几何信息后,将低精度几何信息重复的点作为补充点,单独进行编码。补充点的几何信息同样可以分为低精度几何信息和高精度几何信息两部分,根据应用对压缩失真的要求,可以选择保留所有补充点或者只保留其中一部分补充点。对补充点的高精度几何信息,也可以进行进一步量化,或者只保留部分点的高精度几何信息。That is to say, after obtaining the low-precision geometric information of all vertices, 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.
需要说明的是,在对目标三维网格的几何信息进行量化得到第一信息之后,需要对第一信息进行编码得到最终的码流,可选地,本申请实施例中所说的对第一信息进行编码的具体实现过程包括:It should be noted that after quantizing the geometric information of the target three-dimensional grid to obtain the first information, the first information needs to be encoded to obtain the final code stream. Optionally, the first information is encoded as mentioned in the embodiment of the present application. The specific implementation process of encoding information includes:
步骤S221,所述编码端对所述第一信息进行处理,获取第二信息,所述第二信息包括占位图和几何图中的至少一项;Step S221, 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;
步骤S222,所述编码端对所述第二信息进行编码。Step S222: The encoding end encodes the second information.
需要说明的是,因第一信息中包含的信息的种类不同,在对第一信息进行处理时,会分别对不同类的信息进行单独处理,下面分别从不同信息的角度,对步骤S221的实现过程说明如下。It should be noted that because the types of information contained in the first information are different, when processing the first information, different types of information will be processed separately. The implementation of step S221 will be described below from the perspective of different information. The process is explained below.
一、所述第一信息包括第一精度几何信息1. The first information includes first precision geometric information
可选地,此种情况下,步骤S221的具体实现过程,包括:Optionally, in this case, the specific implementation process of step S221 includes:
步骤S2211,所述编码端对所述第一精度几何信息进行三维片划分;Step S2211, the encoding end divides the first precision geometric information into three-dimensional slices;
需要说明的是,此种情况下,主要是将低精度几何信息进行片(Patch)划分,得到多个三维片;此步骤的具体实现方式为:编码端确定第一精度几何信息中包含的每个顶点的投影平面;编码端根据所述投影平面对所述第一精度几何信息中所包含的顶点进行片划分;编码端对所述第一精度几何信息中所包含的顶点进行聚类,得到划分后的每一片。也就是说,对于Patch划分的过程主要包括:首先估计每个顶点的法向量,选择平面法向量与顶 点法向量之间的夹角最小的候选投影平面作为该顶点的投影平面;然后,根据投影平面对顶点进行初始划分,将投影平面相同且连通的顶点组成patch;最后,使用精细划分算法优化聚类结果,得到最终的三维片(3D patch)。It should be noted that in this case, 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. In other words, the process of patch division mainly includes: first estimating the normal vector of each vertex, selecting the plane normal vector and the vertex The candidate projection plane with the smallest angle between the point normal vectors is used as the projection plane of the vertex; then, the vertices are initially divided according to the projection plane, 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 Similar results are obtained to obtain the final three-dimensional patch (3D patch).
下面对由第一精度几何信息得到三维片的过程的具体实现进行详细说明如下。The specific implementation of the process of obtaining the three-dimensional slice from the first-precision geometric information is described in detail below.
首先估计每个点的法向量。切线平面和它对应的法线是根据每个点的最近的邻居顶点m在一个预定义的搜索距离定义的。K-D树用于分离数据,并在点pi附近找到相邻点,该集合的重心用于定义法线。重心c的计算方法如下:First estimate the normal vector of each point. The tangent plane and its corresponding normal are defined based on each point's nearest neighbor vertex m at a predefined search distance. KD tree is used to separate data and find adjacent points near point p i , the center of gravity of the set Used to define normals. The calculation method of the center of gravity c is as follows:
公式三十二: Formula thirty-two:
使用特征分解法估计顶点法向量,计算过程公式三十三所示:Use the eigendecomposition method to estimate the vertex normal vector, and the calculation process is shown in Formula 33:
公式三十三: Formula thirty-three:
在初始划分阶段,初步选择每个顶点的投影平面。设顶点法向量的估计值为候选投影平面的法向量为选择法向量方向与顶点法向量方向最接近的平面作为该顶点的投影平面,平面选择的计算过程如公式三十四所示:In the initial partitioning stage, the projection plane of each vertex is initially selected. Let the estimated value of the vertex normal vector be 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:
公式三十四: Formula thirty-four:
精细划分过程可以采用基于网格的算法来降低算法的时间复杂度,基于网格的精细划分算法流程如图3所示,具体包括: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:
先设置循环次数(numlter)为0,判断循环次数是否小于最大循环次数(需要说明的是,该最大循环次数可以根据使用需求设置),若小于则执行下述过程:First set the number of cycles (numlter) to 0 and determine whether the number of cycles is less than the maximum number of cycles (it should be noted that the maximum number of cycles can be set according to usage requirements). If it is less than the maximum number of cycles, perform the following process:
步骤S301,将(x,y,z)几何坐标空间划分为体素。Step S301: Divide the (x, y, z) geometric coordinate space into voxels.
需要说明的是,此处的几何坐标空间指的是由量化得到的第一精度几何信息所构成的几何坐标空间。例如,对于使用体素大小为8的10位Mesh,每个坐标上的体素数量将是1024/8=128,此坐标空间中的体素总数将是128×128×128。It should be noted that the geometric coordinate space here refers to the geometric coordinate space composed of the first-precision geometric information obtained by quantization. For example, for a 10-bit mesh using a voxel size of 8, the number of voxels at each coordinate would be 1024/8 = 128, and the total number of voxels in this coordinate space would be 128×128×128.
步骤S302,查找填充体素,填充体素是指网格中包含至少有一个点的体素。Step S302: Find filled voxels. Filled voxels refer to voxels that contain at least one point in the grid.
步骤S303,计算每个填充体素在每个投影平面上的平滑分数,记为voxScoreSmooth,体素在某投影平面的体素平滑分数是通过初始分割过程聚集到该投影平面的点的数量。Step S303, 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.
步骤S304,使用KD-Tree分区查找近邻填充体素,记为nnFilledVoxels,即每个填充体素(在搜索半径内和/或限制到最大数量的相邻体素)的最近的填充体素。Step S304, use KD-Tree partitioning to find neighboring filled voxels, recorded 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).
步骤S305,使用近邻填充体素在每个投影平面的体素平滑分数,计算每个填充体素的平滑分数(scoreSmooth),计算过程如公式三十五所示:Step S305, 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:
公式三十五: Formula thirty-five:
其中,p是投影平面的索引,v是近邻填充体素的索引。一个体素中所有点的scoreSmooth是相同的。where p is the index of the projection plane and v is the index of the nearest neighbor filling voxel. The scoreSmooth of all points in a voxel is the same.
步骤S306,使用顶点的法向量与候选投影平面的法向量计算法向分数,记为scoreNormal,计算过程如公式三十六所示: Step S306: 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:
公式三十六:scoreNormal[i][p]=normal[i]·orientation[p];Formula 36: scoreNormal[i][p]=normal[i]·orientation[p];
其中,p是投影平面的索引,i是顶点的索引。where p is the index of the projection plane and i is the index of the vertex.
步骤S307,使用scoreSmooth和scoreNormal计算每个体素在各个投影平面上的最终分数,计算过程如公式三十七所示:Step S307, 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:
公式三十七:
Formula thirty-seven:
其中,i为顶点索引,p为投影平面的索引,v是顶点i所在的体素索引。Among them, i is the vertex index, p is the index of the projection plane, and v is the voxel index where vertex i is located.
步骤S308,使用步骤307中的分数对顶点进行聚类,得到精细划分的patch。Step S308: Use the scores in step 307 to cluster the vertices to obtain finely divided patches.
多次迭代上述过程,直到得到较为准确的patch。Iterate the above process multiple times until a more accurate patch is obtained.
步骤S2212,所述编码端将划分的三维片进行二维投影,获取二维片;Step S2212: The encoding end performs two-dimensional projection on the divided three-dimensional slice to obtain the two-dimensional slice;
需要说的是,此过程是将3D patch投影到二维平面得到二维片(2D patch)。What needs to be said is that this process is to project the 3D patch onto a two-dimensional plane to obtain a two-dimensional patch (2D patch).
步骤S2213,所述编码端将所述二维片进行打包,获取二维图像信息;Step S2213, the encoding end packages the two-dimensional slices to obtain two-dimensional image information;
需要说明的是,此步骤实现的是片打包(Patch packing),Patch packing的目的是将2D patch排列在一张二维图像上,Patch packing的基本原则是将patch不重叠的排列在二维图像上或者将patch的无像素部分进行部分重叠的排列在二维图像上,通过优先级排列、时域一致排列等算法,使patch排列的更加紧密,且具有时域一致性,提高编码性能。It should be noted that 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. Through priority arrangement, time domain consistent arrangement and other algorithms, the patches are arranged more closely and have time domain consistency to improve coding performance.
假设,二维图像的分辨率为WxH,定义patch排列的最小块大小为T,它指定了放置在这个2D网格上的不同补丁之间的最小距离。Assume that the resolution of the 2D image is WxH, and the minimum block size that defines the patch arrangement is T, which specifies the minimum distance between different patches placed on this 2D grid.
首先,patch按照不重叠的原则插入放置在2D网格上。每个patch占用由整数个TxT块组成的区域。此外,相邻patch之间要求至少有一个TxT块的距离。当没有足够的空间放置下一个patch时,图像的高度将变成原来的2倍,然后继续放置patch。First, 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. In addition, there is a requirement of at least one TxT block between adjacent patches. When there is not enough space to place the next patch, the height of the image will be doubled and the patch will continue to be placed.
为了使patch排列的更加紧密,patch可以选择多种不同的排列方向。例如,可以采用八种不同的排列方向,如图4所示,包括0度、180度、90度、270度以及前四种方向的镜像。In order to arrange the patches more closely, 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.
为了获得更好的适应视频编码器帧间预测的特性,采用一种具有时域一致性的Patch排列方法。在一个组帧(Group of frame,GOF)中,第一帧的所有patch按照从大到小的顺序依次排列。对于GOF中的其他帧,使用时域一致性算法调整patch的排列顺序。In order to obtain better adaptability to inter-frame prediction characteristics of video encoders, a patch arrangement method with temporal consistency is adopted. In a Group of frame (GOF), all patches of the first frame are arranged in order from largest to smallest. For other frames in the GOF, the temporal consistency algorithm is used to adjust the order of patches.
这里还需要说明的是,在得到二维图像信息后便能根据获取二维图像信息过程中的信息得到patch信息,之后便可以进行片信息的编码,获取片信息子码流。It should also be noted here that after obtaining the two-dimensional image information, the patch information can be obtained based on the information in the process of obtaining the two-dimensional image information, and then the patch information can be encoded to obtain the patch information sub-stream.
这里需要说明的是,在进行二维图像信息过程中需要记录patch划分的信息、patch投影平面的信息以及patch packing位置的信息,所以patch信息记录的是获取二维图像过程中各步骤操作的信息,即patch信息包括:patch划分的信息、patch投影平面的信息以及patch packing位置的信息。What needs to be explained here is that in the process of obtaining two-dimensional image information, it is necessary to record the information of patch division, the information of patch projection plane and the information of patch packing position, so the patch information records the information of each step operation in the process of obtaining two-dimensional image. , that is, the patch information includes: patch division information, patch projection plane information, and patch packing position information.
步骤S2214,所述编码端根据所述二维图像信息,获取第一精度的占位图和第一精度的几何图; Step S2214: The encoding end obtains a first-precision placeholder map and a first-precision geometric map based on the two-dimensional image information;
需要说的是,对于获取占位图的过程,主要为:利用patch packing得到的patch排列信息,将二维图像中存在顶点的位置设为1,其余位置设为0,得到占位图。对于获取几何图的过程,主要为:在通过投影得到2D patch的过程中,保存了每个顶点到投影平面的距离,这个距离称为深度,低精度几何图压缩部分就是将2D patch中每个顶点的深度值,排列到该顶点在占位图中的位置上,得到低精度几何图。What needs to be said is that the process of obtaining the placeholder map is mainly: 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. For the process of obtaining the geometric 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.
二、所述第一信息包括第二精度几何信息2. The first information includes second precision geometric information
可选地,此种情况下,步骤S221的具体实现过程,包括:Optionally, in this case, the specific implementation process of step S221 includes:
步骤S2215,所述编码端获取第一精度几何信息中所包含的顶点的排列顺序;Step S2215, the encoding end obtains the arrangement order of the vertices contained in the first precision geometric information;
步骤S2216,所述编码端将第一精度几何信息中所包含的顶点对应的第二精度几何信息排列在二维图像中,生成第二精度的几何图。Step S2216: The encoding end arranges the second-precision geometric information corresponding to the vertices contained in the first-precision geometric information in the two-dimensional image to generate a second-precision geometric map.
需要说明的是,高精度几何信息采用原始片(raw patch)的排列方式,将低精度几何图中的顶点对应的高精度几何信息排列在二维图像中,得到raw patch,以此便生成高精度几何图。主要分为三步,如图5所示,包括:It should be noted that 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:
步骤501,获取顶点排列顺序,逐行从左向右扫描低精度几何图,将每个顶点的扫描顺序作为raw patch中顶点的排列顺序。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.
步骤502,生成raw patch。Step 502, generate raw patch.
需要说明的是,raw patch是将顶点的三维坐标按照如图6所示的方式逐行排列,形成的矩形patch。按照第一步中得到的顶点排列顺序,将顶点的高精度几何信息依次排列,得到高精度几何信息raw patch。It should be noted that the raw patch is a rectangular patch formed by arranging the three-dimensional coordinates of the vertices row by row as shown in Figure 6. 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.
步骤503,将高精度几何信息放置在一张二维图像中,生成高精度几何图。Step 503: Place the high-precision geometric information in a two-dimensional image to generate a high-precision geometric map.
需要说明的是,在编码得到几何图子码流时,编码端是将对第一精度的几何图和第二精度的几何图进行编码,获取几何图子码流。It should be noted that when encoding to obtain the geometric figure sub-stream, the encoding end will encode the first-precision geometric figure and the second-precision geometric figure to obtain the geometric figure sub-stream.
三、所述第一信息包括补充点的信息3. The first information includes information on supplementary points
可选地,此种情况下,步骤S221的具体实现过程,包括:Optionally, in this case, the specific implementation process of step S221 includes:
步骤S2217,所述编码端将所述补充点的第三精度几何信息排列成第一原始片;Step S2217, the encoding end arranges the third precision geometric information of the supplementary points into the first original slice;
步骤S2218,所述编码端按照与所述第一原始片相同的排列顺序,将所述补充点的第四精度几何信息排列成第二原始片;Step S2218: 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;
步骤S2219,所述编码端对所述第一原始片和所述第二原始片进行压缩,获取补充点的几何图。Step S2219: The encoding end compresses the first original slice and the second original slice to obtain a geometric map of supplementary points.
需要说明的是,本申请实施例中对于补充点的几何信息分为的低精度部分和高精度部分分别进行编码。首先,按照任意顺序将补充点的低精度几何信息排列成补充点低精度raw patch;然后,按照与补充点低精度raw patch相同的顺序将高精度几何信息排列成补充点高精度raw patch;最后,对补充点低精度raw patch和高精度raw patch进行压缩,可以采用多种压缩方法。其中,一种方法是对raw patch中的值进行游程编码、熵编码等方式编码,另一种方法是,将补充点低精度raw patch加入低精度几何图中的空白区域,将补充 点高精度raw patch加入高精度几何图中的空白区域,得到补充点的几何图。It should be noted that in the embodiment of the present application, the low-precision part and the high-precision part of the geometric information of the supplementary points are encoded separately. First, 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 using 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 low-precision raw patch to the blank area of the low-precision geometric map. Point high-precision raw patches are added to the blank areas in the high-precision geometric map to obtain a geometric map that supplements the points.
需要说明的是,在获取到编码后的几何信息后,便可以进行几何信息的重建,获取重建后的第一几何信息,然后对第一几何信息进行重复顶点筛选,获取重复顶点信息,可选地,本申请的一实施例中,所述重复顶点信息的获取方式,包括:It should be noted that after obtaining the encoded geometric information, the geometric information can be reconstructed to obtain the reconstructed first geometric information, and then the first geometric information can be filtered for repeated vertices to obtain repeated vertex information. Optional In one embodiment of the present application, the method of obtaining repeated vertex information includes:
所述编码端获取所述第一几何信息中的重复顶点,记录下重复顶点的索引形成重复顶点信息;The encoding end obtains the repeated vertices in the first geometric information, and records the index of the repeated vertices to form repeated vertex information;
其中,所述重复顶点信息中包括重复顶点的索引和第一顶点与重复顶点的纹理坐标索引。Wherein, the repeated vertex information includes the index of the repeated vertex and the texture coordinate index of the first vertex and the repeated vertex.
需要说明的是,通过逐一的进行重复顶点的获取,并记录下其索引,能够保证获取较为准确的重复顶点的信息。It should be noted that by obtaining repeated vertices one by one and recording their indexes, it is possible to ensure that more accurate information about repeated vertices is obtained.
可选地,步骤103的可选实现方式包括:Optionally, optional implementation methods of step 103 include:
步骤1031,所述编码端根据重复顶点的索引对所述目标三维网格的顶点纹理坐标进行重排,获取重排序之后的纹理坐标信息;Step 1031: The encoding end rearranges the vertex texture coordinates of the target three-dimensional grid according to the index of the repeated vertex, and obtains the reordered texture coordinate information;
可选地,该步骤的具体实现方式为:所述编码端根据重复顶点在第一几何信息中出现的顺序,将所述重复顶点对应的纹理坐标依次移至所述纹理坐标对应的列表的尾部,形成重排序后的纹理坐标信息。Optionally, the specific implementation of this step is: the encoding end sequentially moves the texture coordinates corresponding to the repeated vertices to the end of the list corresponding to the texture coordinates according to the order in which the repeated vertices appear in the first geometric information. , forming the reordered texture coordinate information.
例如,10个顶点(顶点1至顶点10)的纹理坐标从前至后依次为:坐标1、坐标2、坐标3、坐标4、坐标5、坐标6、坐标7、坐标8、坐标9、坐标10,而顶点1和顶点6重复,则经过重排序,10个顶点的纹理坐标从前至后依次为:坐标1、坐标2、坐标3、坐标4、坐标5、坐标7、坐标8、坐标9、坐标10、坐标6。For example, the texture coordinates of 10 vertices (vertex 1 to vertex 10) from front to back are: coordinate 1, coordinate 2, coordinate 3, coordinate 4, coordinate 5, coordinate 6, coordinate 7, coordinate 8, coordinate 9, coordinate 10 , and vertex 1 and vertex 6 are repeated, then after reordering, the texture coordinates of the 10 vertices from front to back are: coordinate 1, coordinate 2, coordinate 3, coordinate 4, coordinate 5, coordinate 7, coordinate 8, coordinate 9, Coordinate 10, coordinate 6.
需要说明的是,通过利用重复顶点在第一几何信息中的顺序,对纹理坐标信息进行重排序,以此能够保证重排序的纹理坐标信息中除尾部之外的其他部分没有重复顶点的纹理坐标信息,便于对后续连接关系的调整。It should be noted that by using the order of repeated vertices in the first geometric information to reorder the texture coordinate information, it can be ensured that there are no texture coordinates of repeated vertices in other parts of the reordered texture coordinate information except the tail. Information to facilitate subsequent adjustments to the connection relationship.
步骤1032,所述编码端根据重排序之后的纹理坐标信息和所述重复顶点信息,对所述目标三维网格的第一连接关系进行调整,获取重排序之后的第二连接关系;Step 1032: The encoding end adjusts the first connection relationship of the target three-dimensional grid according to the reordered texture coordinate information and the repeated vertex information, and obtains the second connection relationship after the reordering;
需要说明的是,通过对连接关系进行重排序,使得处理后的连接关系不包含重复顶点的信息,以此能够在连接关系编码时,避免重复顶点造成的三维网格不连续的问题,提升三维网格的连接性关系的编码效率。It should be noted that by reordering the connection relationships, the processed connection relationships do not contain information about repeated vertices. This can avoid the problem of discontinuity in the three-dimensional mesh caused by repeated vertices when encoding the connection relationships, and improve the three-dimensional Encoding efficiency of grid connectivity relations.
需要说明的是,因连接关系是由纹理坐标索引部分和几何索引部分组成的,因此在进行连接关系调整时,需要对这两部分分别进行调整。可选地,本申请的一实施例中,该步骤1032的具体实现过程为:It should be noted that since the connection relationship is composed of a texture coordinate index part and a geometry index part, when adjusting the connection relationship, these two parts need to be adjusted separately. Optionally, in an embodiment of the present application, the specific implementation process of step 1032 is:
步骤10321,所述编码端对所述目标三维网格的第一连接关系的纹理坐标索引部分按照重排序之后的纹理坐标信息进行修改;Step 10321: The encoding end modifies the texture coordinate index part of the first connection relationship of the target three-dimensional grid according to the texture coordinate information after reordering;
步骤10322,所述编码端对所述目标三维网格的第一连接关系的几何索引部分进行遍历,根据重复顶点信息将所述目标三维网格的第一连接关系的重复顶点的索引替换为第一 顶点的索引,获取重排序之后的第二连接关系。Step 10322: The encoding end traverses the geometric index part of the first connection relationship of the target three-dimensional grid, and replaces the index of the repeated vertex of the first connection relationship of the target three-dimensional grid with the second one according to the repeated vertex information. one The index of the vertex, obtains the second connection relationship after reordering.
例如,10个顶点(顶点1至顶点10)的连接关系表示从前至后依次为:(1,1)、(2,2)、(3,3)、(4,4)、(5,5)、(6,6)、(7,7)、(8,8)、(9,9)、(10,10),其中,括号中前面的一个数值代表顶点的几何索引,后面的一个数值纹理坐标索引,因顶点1和顶点6重复,则重排序后的连接关系表示从前至后依次为:(1,1)、(2,2)、(3,3)、(4,4)、(5,5)、(1,10)、(6,6)、(7,7)、(8,8)、(9,9)。For example, the connection relationship between 10 vertices (vertex 1 to vertex 10) from front to back is: (1,1), (2,2), (3,3), (4,4), (5,5 ), (6,6), (7,7), (8,8), (9,9), (10,10), where the first value in the brackets represents the geometric index of the vertex, and the last value Texture coordinate index. Since vertex 1 and vertex 6 are repeated, the reordered connection relationship representation from front to back is: (1,1), (2,2), (3,3), (4,4), (5,5), (1,10), (6,6), (7,7), (8,8), (9,9).
需要说明的是,本申请实施例中对所述第二连接关系进行编码的具体实现过程为:It should be noted that the specific implementation process of encoding the second connection relationship in the embodiment of this application is:
步骤S31、编码端根据三维网格中相邻三角面片的空间夹角,确定第一空间范围内的待排序顶点,所述第一空间范围为所述三维网格中待编码三角形的目标顶点所在的空间范围,且所述待排序顶点包括所述目标顶点。Step S31: The encoding end determines the vertices to be sorted within the first spatial range based on the spatial angle between adjacent triangle patches in the three-dimensional grid. The first spatial range is the target vertex of the triangle to be encoded in the three-dimensional grid. The spatial range where the vertex to be sorted includes the target vertex.
本申请实施例的连接关系编码是基于几何信息驱动的连接关系编码方式,这里重建后的几何信息包括三维网格中顶点的索引信息。The connection relationship encoding in the embodiment of the present application is a connection relationship encoding method driven by geometric information, where the reconstructed geometric information includes index information of vertices in the three-dimensional grid.
本申请实施例中,上述三维网络可划分为至少一个三角面片,每个三角面片中包含至少一个三角形。In this embodiment of the present application, the above three-dimensional network can be divided into at least one triangular patch, and each triangular patch contains at least one triangle.
本步骤中,基于三维网格中相邻三角面片的空间夹角,可以筛除第一空间范围内的部分顶点,并将剩余的部分顶点作为待排序顶点。In this step, based on the spatial angle between adjacent triangular patches in the three-dimensional grid, some vertices in the first spatial range can be filtered out, and the remaining vertices can be used as vertices to be sorted.
可选地,所述第一空间范围包括:Optionally, the first spatial range includes:
第一球体和第二球体之间的空间范围;the spatial range between the first sphere and the second sphere;
其中,所述第一球体和第二球体的球心相同,所述第一球体的半径和所述第二球体的半径不同,所述球心为所述待编码三角形的第一边中的目标位置,如球心为待编码三角形的第一边的中点。Wherein, 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.
步骤S32、所述编码端对所述待排序顶点进行排序,得到所述目标顶点的排序信息。Step S32: The encoding end sorts the vertices to be sorted to obtain the sorting information of the target vertices.
本步骤中,按照预设排序准则对待排序顶点进行排序,例如该排序准则可以是按照顶点与待编码三角形的第一边的中点的距离进行排序,或者,该排序准则还可以是根据顶点与第一边形成的三角形外接圆的半径的大小进行排序。当然,该排序准则也可以是其他准则,此处不做具体限定。In this step, the vertices to be sorted are sorted according to a preset sorting criterion. For example, the sorting criterion can be sorting according to the distance between the vertex and the midpoint of the first side of the triangle to be encoded, or the sorting criterion can also be sorted according to the distance between the vertex and the first side of the triangle to be encoded. Sort by the size of the radius of the circumcircle of the triangle formed by the first side. Of course, the sorting criterion can also be other criteria, which are not specifically limited here.
这里,通过相邻三角面片的空间夹角,进一步删除第一空间范围内的顶点,减少了待排序顶点的数量,即可以减小目标顶点的排序信息所使用的比特信息,Here, through the spatial angle between adjacent triangular patches, 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.
步骤S33、所述编码端根据所述目标顶点的排序信息对应的编码信息,得到所述待编码三角形的编码信息。Step S33: The encoding end obtains the encoding information of the triangle to be encoded based on the encoding information corresponding to the sorting information of the target vertex.
可选地,所述编码端在满足目标条件的情况下,对目标顶点的排序信息进行编码,得到所述编码信息,在不满足目标条件的情况下,对目标顶点的索引进行编码,得到上述编码信息。例如,该目标条件为所述第一空间范围内的待排序顶点的数量小于预设阈值,和/或,目标顶点的排序序号小于预设数值。由于在第一空间范围内的待排序顶点的数量较小或目标顶点的排序序号较小时,排序信息所对应的编码信息会占用较小的比特数,此时 对目标顶点的排序信息进行编码,能够有效减小编码比特数。而对于待排序顶点的数量较大或目的顶点的排序序号较大的情况,对目标顶点的索引进行编码相比于对排序信息进行编码,能够有效地减小编码比特数。Optionally, when the target condition is met, the encoding end encodes the sorting information of the target vertex to obtain the encoding information; when the target condition is not met, the encoding end encodes the index of the target vertex to obtain the above Encoded information. For example, 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. At this time Encoding the sorting information of the target vertices can effectively reduce the number of encoding bits. For situations where the number of vertices to be sorted is large or the sorting sequence number of the target vertex is large, encoding the index of the target vertex can effectively reduce the number of encoding bits compared to encoding the sorting information.
本申请实施例中,根据三维网格中相邻三角面片的空间夹角,在第一空间范围内排除了部分顶点,并基于排除后的顶点确定待排序顶点,即减少了待排序顶点的数量,这样,在对目标顶点的排序信息进行编码时,能够进一步减少该编码信息所占用的比特数,进而有效提高编码效率。In the embodiment of the present application, 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.
可选地,所述编码端确定第一空间范围之前,还包括:Optionally, before the encoding end determines the first spatial range, it also includes:
所述编码端在三维网格对应的边集合中选取第一边,其中,所述边集合为所述三维网格中已编码三角形的至少一条边的集合;The encoding end selects the first edge from the edge set corresponding to the three-dimensional grid, wherein the edge set is a set of at least one edge of the encoded triangle in the three-dimensional 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.
可选地,所述编码端根据三维网格中相邻三角面片的空间夹角,确定第一空间范围内的待排序顶点,包括:Optionally, the encoding end determines the vertices to be sorted within the first spatial range based on the spatial angle between adjacent triangular patches in the three-dimensional grid, including:
所述编码端在待编码三角形为预设类别三角形之外的三角形的情况下,根据三维网格中相邻三角面片的空间夹角,确定第一空间范围内的待排序顶点。When the triangle to be encoded is a triangle outside the preset category of triangles, the encoding end determines the vertices to be sorted within the first spatial range based on the spatial angle between adjacent triangle patches in the three-dimensional grid.
可选地,所述预设类别三角形包括以下至少一项:Optionally, the preset category triangle includes at least one of the following:
与已编码三角形之间的角度小于预设角度的三角形;A triangle whose angle to the encoded triangle is smaller than the preset angle;
两个顶点重合或三个顶点共线的三角形。具体的,是指一个三角形中的两个顶点重合或三个顶点共线。A triangle with two vertices coincident or three vertices collinear. Specifically, it means that two vertices in a triangle coincide or three vertices are collinear.
可选地,本申请实施例的方法,还包括:Optionally, the method in the embodiment of this application also includes:
所述编码端在所述待编码三角形为上述预设类别三角形的情况下,根据所述待编码三角形的目标顶点信息对应的编码信息,得到所述待编码三角形的编码信息。When the triangle to be encoded is the above-mentioned preset category triangle, 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.
例如,在上述待编码三角形为上述预设类别三角形的情况下,对待编码三角形的目标顶点的索引直接进行编码,并根据该目标顶点的索引对应的编码信息,得到上述待编码三角形的编码信息。For example, when the triangle to be encoded is the triangle of the preset category, 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.
本申请实施例中,在对顶点的索引进行编码时,可以直接使用二进制表示或使用如哈夫曼等编码算法进行编码,此处对编码方法不做具体限定。In the embodiment of the present application, 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. The encoding method is not specifically limited here.
可选地,所述得到所述待编码三角形的编码信息之后,所述方法还包括:Optionally, after obtaining the encoding information of the triangle to be encoded, the method further includes:
所述编码端按照第一预设规则,更新所述边集合;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 all triangles in the three-dimensional grid obtain encoding information;
其中,所述第一预设规则包括:将所述待编码三角形除所述第一边之外的两条边加入至所述边集合中,并在所述边集合中移除所述第一边。 Wherein, 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. side.
可选地,所述编码端根据三维网格中相邻三角面片的空间夹角,确定第一空间范围内的待排序顶点,包括:Optionally, the encoding end determines the vertices to be sorted within the first spatial range based on the spatial angle between adjacent triangular patches in the three-dimensional grid, including:
所述编码端在所述第一空间范围内的顶点中排除第一目标三角形的所有顶点,得到剩余顶点;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;
其中,所述第一目标三角形为与邻接的已编码三角形的夹角小于所述夹角阈值的三角形,且所述第一目标三角形的一条边与所述待编码三角形的第一边相同。Wherein, the first target triangle is a triangle whose angle with an adjacent coded triangle is less than the angle threshold, and one side of the first target triangle is the same as the first side of the triangle to be coded.
可选地,所述待编码三角形的编码信息还包括:所述夹角阈值的编码信息。Optionally, the encoding information of the triangle to be encoded also includes: encoding information of the angle threshold.
这里,通过对夹角阈值进行编码,使得解码端根据该编码信息可以获取该夹角阈值,并基于该夹角阈值确定第一空间范围内的待排序顶点,该方式中,编码端可以灵活地设置该夹角阈值。Here, by encoding 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.
当然,也可以预先约定固定的夹角阈值,编码端和解码端基于预先约定的夹角阈值,确定第一空间范围内的待排序顶点,编码端无需对该夹角阈值进行编码。Of course, 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 spatial range based on the pre-agreed angle threshold. The encoding end does not need to encode the angle threshold.
可选地,本申请实施例的方法,还包括:对第二空间范围内的待编码三角形的目标顶点信息进行编码,得到所述待编码三角形的编码信息,所述第二空间范围为所述三维网格中除第一空间范围之外的范围。Optionally, the method of the embodiment of the present application further includes: encoding the target vertex information of the triangle to be encoded in a second spatial range to obtain the encoding information of the triangle to be encoded, and the second spatial range is the The range in the three-dimensional grid other than the first spatial range.
可选地,所述待编码三角形的编码信息还包括所述第一空间范围的编码信息。Optionally, the encoding information of the triangle to be encoded also includes encoding information of the first spatial range.
例如,对上述第一球体和第二球体的半径进行编码,该实现方式中可以灵活地设置第一空间范围。For example, by encoding the radii of the above-mentioned first sphere and the second sphere, the first spatial range can be flexibly set in this implementation.
当然,编码端和解码端也可预先预定第一空间范围的大小,则该方式中,编码端无需对该第一空间范围进行编码。Of course, 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.
在本申请的一具体实施例中,在编码端将输入三维网格分为一个或多个片,在每个片中选取初始三角形。编码该初始三角形的顶点索引并把该初始三角形的边放入边的集合(即边集合)中。选取边集合中的某个边并确定它的对顶点,该边和对顶点组成的三角形即为待编码三角形。例如,可将每次迭代选取的边记为τ,它的对顶点记为v,编码该边相邻的待编码三角形。如图7和图8所示,编码连接关系的过程可具体包括:In a specific embodiment of the present application, the input three-dimensional mesh is divided into one or more slices at the encoding end, and an initial triangle is selected in each slice. Encode the vertex index of the initial triangle and put the edges of the initial triangle into the edge set (ie, the edge set). Select an edge in the edge set and determine its pair of vertices. The triangle formed by the edge and the pair of vertices is the triangle to be encoded. For example, the edge selected in each iteration can be recorded as τ, its opposite vertex is recorded as v, and the triangle to be encoded adjacent to the edge can be encoded. As shown in Figures 7 and 8, the process of encoding connection relationships may specifically include:
(1)在满足预设条件的情况下,可以直接编码该三角形的顶点索引,也可以对该三角形进行其他方式的编码。该预设条件可以是待编码三角形属于若干种特殊三角形,如属于退化面(有两点重合或三点共线)或该三角形与已编码三角形的夹角小于某角度时,或者,该预设条件为第一空间范围内的顶点的数量大于预设数量,或者,该预设条件为目标顶点位于第二空间范围之外,如位于第二空间范围内,或者,该预设条件内目标顶点在第一空间范围内的顶点中的排序序号大于预设或等于预设数值,该预设条件可以根据需求灵活地进行设置。将该待编码三角形除去边τ外的两条边加入边集合中,并从集合中移除边τ。然后从边集合中按照一定的准则取出该待编码三角形的另一条边(除边τ之外的边),继续编码该边邻接的三角形,例如可以采用存取的顺序来选择下一条边τ。 (1) When the preset conditions are met, 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.
(2)在不满足上述预设条件的情况下,确定其对顶点v所处的空间范围(即上述第一空间范围)并编码该空间范围。遍历片内该空间范围内的所有顶点,筛除与边τ形成的与已编码邻接三角形夹角小于某角度的新三角形所有顶点,并编码该角度值。(2) If the above preset conditions are not met, determine the spatial range where the vertex v is located (ie, the above-mentioned first spatial range) and encode the spatial range. Traverse all vertices within the space range in the slice, filter out all vertices of the new triangle formed by edge τ and have an angle smaller than a certain angle with the encoded adjacent triangle, and encode the angle value.
该空间范围可以利用相邻三角面片的几何特性、空间夹角或其他准则确定。例如,空间范围可以采用以边τ的中点为球心,以最小半径Rmin和最大半径Rmax组合{Rmin,Rmax}的两个同心球间的部分,编码的是{Rmin,Rmax}组。The spatial range can be determined using the geometric properties of adjacent triangular patches, spatial angles, or other criteria. For example, 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.
可选地,还可对上述角度值进行编码。Optionally, the above angle values can also be encoded.
(3)遍历空间范围内的所有顶点,并按照一定的排序准则进行排序。例如该排序准测可以是顶点v到边τ的中点的距离;或者是与边τ形成的三角形的外接圆的半径。编码对顶点v在排序中的序号。(3) Traverse all vertices within the space range and sort them according to certain sorting criteria. For example, 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.
(4)将上述新编码三角形除去边τ外的两条边加入边集合中,并从边集合中移除边τ。然后从集合中按照一定的准则取出新编码三角形的另一条边,继续编码该边邻接的三角形。(4) Add the two edges of the new coded triangle except the edge τ to the edge set, and remove the edge τ from the edge set. Then take out the other side of the newly encoded triangle from the set according to certain criteria, and continue to encode the triangles adjacent to this side.
对三维网格的每一个片迭代该编码过程,直到每个片中的三角形都完成编码。若边集合为空但存在尚未编码三角形,则从剩余未编码三角形中选取初始三角形,循环该编码过程。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.
还需要说明的是,为了保证连接关系的一致性,本申请的一实施例中所述编码端根据所述重建后的第一几何信息,对所述目标三维网格的连接关系存在变化的部分进行调整,基于调整后的连接关系在进行重排序后的第二连接关系,然后进行第二连接关系的编码。It should also be noted that, in order to ensure the consistency of the connection relationship, in one embodiment of the present application, the encoding end has changes in the connection relationship of the target three-dimensional mesh based on the reconstructed first geometric information. Adjustment is made, the second connection relationship after reordering is performed based on the adjusted connection relationship, and then the second connection relationship is encoded.
需要说明的是,本申请实施例还包括对重复顶点的编码,具体实现方式为:It should be noted that the embodiments of this application also include encoding of repeated vertices. The specific implementation method is:
所述编码端在对所述第二连接关系编码的过程中,对于每一个三角面片的三个顶点,根据重复顶点信息,查询是否存在重复顶点;In the process of encoding the second connection relationship, the encoding end queries the three vertices of each triangular patch to see whether there are repeated vertices based on the repeated vertex information;
所述编码端在存在重复顶点的情况下,对所述重复顶点进行标识;When a duplicate vertex exists, the encoding end identifies the duplicate vertex;
所述编码端在完成第二连接关系的编码后,根据重复顶点的标识进行编码,获取重复顶点标识码流。After completing the encoding of the second connection relationship, the encoding end performs encoding according to the identifier of the repeated vertex, and obtains the code stream of the repeated vertex identifier.
需要说明的是,通过基于重复顶点信息对连接关系中的重复顶点进行标记,然后再利用标记进行编码,能够保证重复顶点编码的准确性。It should be noted that by marking the repeated vertices in the connection relationship based on the repeated vertex information, and then using the marks for encoding, the accuracy of the repeated vertex encoding can be ensured.
也就是说,在对三维网格的连接关系编码的过程中,对于每一个三角面片的三个顶点,根据重复顶点信息,查询是否存在重复顶点;若存在重复顶点,则对该重复顶点进行标识,在完成连接关系的编码后,使用熵编码器将重复顶点标识编码为重复点标识码流。That is to say, in the process of encoding the connection relationship of the three-dimensional mesh, for the three vertices of each triangular patch, based on the repeated vertex information, query whether there are repeated vertices; if there are repeated vertices, perform a query on the repeated vertices. Identification, after completing the encoding of the connection relationship, use the entropy encoder to encode the repeated vertex identification into a repeated point identification code stream.
还需要说明的是,本申请还需要进行纹理坐标(UV坐标)的编码,需要说明的是,UV坐标是一种描述三维网格顶点纹理的信息,三维网格先将表面纹理进行二维投影,形成一张二维的纹理图,UV坐标表示三维的顶点纹理所处二维纹理图中位置,且与几何信息一一对应,可选地,本申请一实施例中的UV坐标编码的实现过程为:It should also be noted that this application also needs to encode texture coordinates (UV coordinates). It should be noted that UV coordinates are information that describes the texture of the vertices of a three-dimensional grid. The three-dimensional grid first projects the surface texture into two dimensions. , forming a two-dimensional texture map. The UV coordinates represent the position of the three-dimensional vertex texture in the two-dimensional texture map, and correspond to the geometric information one-to-one. Optionally, the implementation process of UV coordinate encoding in an embodiment of the present application is as follows :
所述编码端按照重复顶点在重排序之后的纹理坐标信息中的顺序恢复第二几何信息与所述第二连接关系中的重复顶点; The encoding end restores the second geometric information and the repeated vertices in the second connection relationship according to the order of the repeated vertices in the reordered texture coordinate information;
所述编码端对恢复重复顶点的第二连接关系进行遍历,记录遍历顺序;The encoding end traverses the second connection relationship of the restored repeated vertices and records the traversal order;
所述编码端根据所述遍历顺序,对顶点的纹理坐标进行编码。The encoding end encodes the texture coordinates of the vertices according to the traversal order.
需要说明的是,因在上述过程中对连接关系进行了去除重复顶点的处理,而对纹理坐标编码时是基于包含重复顶点的连接关系以及几何信息进行的,因此,需要先恢复第二连接关系以及几何信息中的重复顶点,以保证纹理坐标编码的准确性。It should be noted that in the above process, the connection relationship is processed to remove duplicate vertices, and the texture coordinate encoding is based on the connection relationship and geometric information containing repeated vertices. Therefore, the second connection relationship needs to be restored first. and repeated vertices in geometric information to ensure the accuracy of texture coordinate encoding.
需要说明的是,本申请实施例中采用重排序之后的纹理坐标信息对第二几何信息与第二连接关系中的重复顶点恢复得到的第三几何信息(对第二几何信息进行重复顶点恢复后对应的几何信息)以及第三连接关系(即对第二连接关系进行重复顶点恢复后对应的连接关系),对顶点的纹理坐标进行编码。It should be noted that in the embodiment of the present application, the texture coordinate information after reordering is used to restore the third geometric information obtained by restoring the repeated vertices in the second geometric information and the second connection relationship (after performing repeated vertex restoration on the second geometric information) Corresponding geometric information) and the third connection relationship (that is, the corresponding connection relationship after repeated vertex restoration of the second connection relationship), encode the texture coordinates of the vertices.
具体实现过程包括:The specific implementation process includes:
步骤S41,所述编码端根据第三连接关系,确定目标三角形,所述目标三角形由第一边和待编码顶点构成;Step S41, the encoding end determines a target triangle according to the third connection relationship, and the target triangle is composed of the first side and the vertex to be encoded;
可选地,本申请实施例中,该步骤的可选实现方式为:Optionally, in the embodiment of this application, the optional implementation method of this step is:
所述编码端在边集合中选择第一边,所述边集合为第三连接关系构建的三角形的边所组成的集合;所述编码端根据所述第一边,确定目标三角形。The encoding end selects a first edge from an edge set, which is a set of edges of a triangle constructed by a third connection relationship; the encoding end determines a target triangle based on the first edge.
可选地,在编码端在边集合中选择第一边之前,还包括:Optionally, before the encoding end selects the first edge in the edge set, it also includes:
所述编码端根据第三连接关系,选取一个初始三角形;所述编码端对所述初始三角形的三个顶点的纹理坐标进行编码,并将所述初始三角形的三条边加入边集合。The encoding end selects an initial triangle according to the third connection relationship; the encoding end encodes the texture coordinates of the three vertices of the initial triangle, and adds the three edges of the initial triangle to the edge set.
通常来说,该初始三角形是连接关系中的第一个三角形。对于初始三角形,本申请实施例中不对其进行顶点的预测,而是直接编码纹理坐标,在编码初始三角形的各顶点的纹理坐标(需要说明的是,该纹理坐标指的是通过目标三维网格直接获取的原始的纹理坐标)之后,便将该初始三角形的各个边加入边集合,形成初始的边集合,然后基于该初始的边集合对后面的顶点进行预测。Typically, this initial triangle is the first triangle in the connection. For the initial triangle, in the embodiment of this application, the vertices are not predicted, but the texture coordinates are directly encoded, and the texture coordinates of each vertex of the initial triangle are encoded (it should be noted that the texture coordinates refer to the target three-dimensional mesh through the After directly obtaining the original texture coordinates), each edge of the initial triangle is added to the edge set to form an initial edge set, and then the subsequent vertices are predicted based on the initial edge set.
步骤S42,所述编码端根据所述目标三角形的三个顶点对应的重建后的几何信息以及所述第一边上的顶点的真实纹理坐标,对待编码顶点进行纹理坐标预测,获取所述待编码顶点的预测纹理坐标;Step S42: The encoding end performs texture coordinate prediction on the vertices to be encoded based on the reconstructed geometric information corresponding to the three vertices of the target triangle and the real texture coordinates of the vertices on the first side, and obtains the to-be-encoded vertices. The predicted texture coordinates of the vertex;
步骤S43,所述编码端根据所述待编码顶点的真实纹理坐标和所述预测纹理坐标的差值进行待编码顶点的纹理坐标的编码。Step S43: The encoding end encodes the texture coordinates of the vertex to be encoded based on the difference between the real texture coordinates of the vertex to be encoded and the predicted texture coordinates.
需要说明的是,在得到待编码顶点的预测纹理坐标之后,便可以获取该预测纹理坐标以及真实纹理坐标的差值,然后基于该差值进行编码,可选地,可以直接对差值进行编码,也可以先对差值进行处理,然后再对处理后的差值进行编码,例如,该处理可以为归一化处理;通过基于差值进行编码以此实现对待编码顶点的编码,能够减少纹理坐标编码的比特数。It should be noted that after obtaining the predicted texture coordinates of the vertex to be encoded, the difference between the predicted texture coordinates and the real texture coordinates can be obtained, and then encoding is performed based on the difference. Optionally, the difference can be encoded directly. , you can also process the difference first, and then encode the processed difference. For example, this processing can be normalization processing; by encoding based on the difference, the encoding of the vertices to be encoded can be achieved, which can reduce the texture The number of bits to encode the coordinates.
需要说明的是,本申请实施例中所述差值的获取方式可以是真实纹理坐标减去预测纹理坐标得到,也可以是预测纹理坐标减去真实纹理坐标得到,具体的采用何种方式,只要 编码端与解码端理解一致即可。本申请实施例中的差值也可以称为残差。It should be noted that the difference value described in the embodiment of the present application can be obtained by subtracting the predicted texture coordinates from the real texture coordinates, or by subtracting the predicted texture coordinates from the predicted texture coordinates. The specific method is as long as The encoding end and the decoding end only need to have the same understanding. The difference in the embodiment of this application may also be called a residual.
可选地,本申请的一实施例中,所述编码端根据所述目标三角形的三个顶点对应的重建后的几何信息以及所述第一边上的顶点的真实纹理坐标,对待编码顶点进行纹理坐标预测,获取所述待编码顶点的预测纹理坐标的实现方式,包括:Optionally, in an embodiment of the present application, the encoding end performs coding on the vertices to be encoded based on the reconstructed geometric information corresponding to the three vertices of the target triangle and the real texture coordinates of the vertices on the first side. Texture coordinate prediction, the implementation method of obtaining the predicted texture coordinates of the vertex to be encoded, includes:
步骤S51、所述编码端根据所述目标三角形的各个顶点对应的几何信息以及所述第一边上的顶点的真实纹理坐标,获取所述待编码顶点在第一边上的投影点的纹理坐标;Step S51: The encoding end obtains the texture coordinates of the projection point of the vertex to be encoded on the first side based on the geometric information corresponding to each vertex of the target triangle and the real texture coordinates of the vertex on the first side. ;
需要说明的是,如图9所示,边NP为在边集合中选出的一条边,可以看作是上述的第一边,顶点N和顶点P分别为第一边的两个顶点,顶点C为待编码的顶点,顶点N、顶点P和顶点C便构成了上述的目标三角形,点X为顶点C在NP边上的投影,顶点O为已编码点,且顶点O、顶点N和顶点P构成的三角形与顶点N、顶点P和顶点C构成的三角形共NP边。基于上图9,可选地,本申请实施例中所说的对顶点在第一边上的投影点的纹理坐标的具体获取方式为:It should be noted that, as shown in Figure 9, edge NP is an edge selected from the edge set, which can be regarded as the first edge mentioned above. Vertex N and vertex P are respectively the two vertices of the first edge. C is the vertex to be encoded. Vertex N, vertex P and vertex C form the above target triangle. Point X is the projection of vertex C on the NP edge. Vertex O is the encoded point, and vertex O, vertex N and vertex The triangle formed by P shares NP sides with the triangle formed by vertex N, vertex P and vertex C. Based on Figure 9 above, optionally, the specific method of obtaining the texture coordinates of the projection point of the vertex on the first side mentioned in the embodiment of this application is:
根据公式:获取对顶点在第一边上的投影点的纹理坐标;According to the formula: Get the texture coordinates of the projection point of the vertex on the first edge;
其中,Xuv为所述待编码顶点C在所述第一边上的投影点的纹理坐标,Nuv为所述目标三角形的所述第一边上的顶点N的真实纹理坐标,为所述目标三角形的所述第一边上的顶点N至所述待编码顶点C在所述第一边上的投影点X的纹理坐标的向量; 为所述第一边上的顶点N和顶点P对应的重建后的几何信息的向量;为所述第一边上的顶点N至待编码顶点C对应的重建后的几何信息的向量;为所述第一边上的顶点N至待编码顶点C在第一边上的投影点X对应的重建后的几何信息的向量。 Wherein , is a vector from the texture coordinates of the vertex N on the first side of the target triangle to the projection point X of the vertex C to be encoded on the first side; is a vector of reconstructed geometric information corresponding to vertex N and vertex P on the first edge; is the vector of reconstructed geometric information corresponding to the vertex N on the first edge to the vertex C to be encoded; is a vector of reconstructed geometric information corresponding to the vertex N on the first edge to the projection point X of the vertex C to be encoded on the first edge.
步骤S52、所述编码端根据所述投影点的纹理坐标,获取所述待编码顶点的预测纹理坐标;Step S52: The encoding end obtains the predicted texture coordinates of the vertex to be encoded based on the texture coordinates of the projection point;
可选地,所述待编码顶点的预测纹理坐标,包括:Optionally, the predicted texture coordinates of the vertices to be encoded include:
根据公式:获取待编码顶点的预测纹理坐标;According to the formula: Get the predicted texture coordinates of the vertex to be encoded;
其中,PredC为所述待编码顶点C的预测纹理坐标, 为所述待编码顶点C和所述第一边对应第一顶点O的纹理坐标的向量的第一种向量取值,Ouv为所述目标三角形的所述第一边对应的第一顶点的纹理坐标,所述第一顶点O为第一三角形的第一边的对顶点(即第一三角形中与第一边相对的顶点),所述第一三角形与所述目标三角形具有公共的第一边;为所述待编码顶点C在所述第一边上的投影点X至待编码顶点C的纹理坐标的向量; 为所述待编码顶点C和所述第一边对应第一顶点O的纹理坐标的向量的第二种向量取值。Where, Pred C is the predicted texture coordinate of the vertex C to be encoded, is the first vector value of the vector of the texture coordinates of the vertex C to be encoded and the first side corresponding to the first vertex O, and O uv is the first vertex corresponding to the first side of the target triangle. Texture coordinates, the first vertex O is the opposite vertex of the first side of the first triangle (that is, the vertex in the first triangle opposite to the first side), the first triangle and the target triangle have a common first side; is a vector from the projection point X of the vertex C to be encoded on the first edge to the texture coordinates of the vertex C to be encoded; The second vector value is the vector of the texture coordinates of the vertex C to be encoded and the first edge corresponding to the first vertex O.
需要说明的是,基于上述的过程,便得到了待编码点的预测纹理坐标,基于该预测纹理坐标便可以实现对待编码点的编码;可选地,在基于边集合中的一条边对待编码点进行编码之后,所述编码端将所述目标三角形中的第二边加入所述边集合以及从所述边集合中删除所述第一边,所述第二边为所述目标三角形中未包含于所述边集合中的边,以此实现 边集合的更新。It should be noted that based on the above process, the predicted texture coordinates of the point to be encoded are obtained, and based on the predicted texture coordinates, the encoding point to be encoded can be implemented; optionally, the encoding point to be encoded is based on an edge in the edge set After encoding, the encoding end adds the second edge in the target triangle to the edge set and deletes the first edge from the edge set. The second edge is not included in the target triangle. on the edges in the edge set, in order to achieve Updates to edge collections.
需要说明的是,本申请实施例中,可以一边进行待编码顶点的残差的获取一边进行编码,也可以是先获取到所有残差,再统一进行残差的编码。It should be noted that in the embodiment of the present application, the residuals of the vertices to be encoded can be obtained while encoding, or all the residuals can be obtained first, and then the residuals can be encoded uniformly.
还需要说明的是,为了保证纹理坐标的一致性,本申请的一实施例中所述编码端需要根据重建的第一几何信息来调整部分纹理坐标的取值和排列顺序。It should also be noted that, in order to ensure the consistency of texture coordinates, in one embodiment of the present application, the encoding end needs to adjust the values and arrangement order of some texture coordinates based on the reconstructed first geometric information.
需要说明的是,本申请的一实施例中还包括对纹理图的编码,具体为:对于纹理图,通常可以直接使用视频编码器对逐帧的纹理图有进行编码,如使用高效视频编码(High Efficiency Video Coding,HEVC)、多功能编解码器(Versatile Video Coding,VVC)等编码器,形成纹理图子码流。此处的视频编码器可以选用任意的视频编码器。It should be noted that an embodiment of the present application also includes encoding of texture maps, specifically: for texture maps, a video encoder can usually be used directly to encode frame-by-frame texture maps, such as using high-efficiency video coding ( Encoders such as High Efficiency Video Coding (HEVC) and Versatile Video Coding (VVC) form texture image sub-streams. The video encoder here can choose any video encoder.
需要说明的是,在得到各路子码流会后,将各路子码流进行混流后形成输出的网格编码码流。It should be noted that after obtaining the sub-streams of each channel, the sub-streams are mixed to form an output trellis-encoded code stream.
综上可知,对于编码端而言,分别针对网格的几何信息、连接关系、UV坐标和纹理图进行编码。主要实现如下过程:In summary, it can be seen that for the encoding end, the geometric information, connection relationships, UV coordinates and texture maps of the mesh are encoded respectively. The main process is as follows:
1)在有损模式中,对三维网格进行可选的简化操作,即在尽量保持网格结构的情况下减少网格顶点和边的数量,进而减少三维网格的数据量。1) In lossy mode, perform optional simplification operations on the three-dimensional mesh, that is, reduce the number of mesh vertices and edges while maintaining the mesh structure as much as possible, thereby reducing the data volume of the three-dimensional mesh.
2)对于简化后的网格,将其几何信息进行量化以减少顶点的间距,利于后续基于视频的几何信息压缩。2) For the simplified mesh, its geometric information is quantified to reduce the distance between vertices, which is beneficial to subsequent video-based geometric information compression.
需要说明的是,由量化可能会得到低精度的几何信息、高精度的几何信息以及补充点的信息。其中,低精度几何信息是量化后的三维坐标;高精度几何信息是量化后低精度网格丢失的几何信息;补充点是指量化过程中产生的需要另外处理的点,如坐标位置出现重叠的重复点等。对于量化产生的低精度几何信息,采用类似于V-PCC的投影方法投影到二维平面,然后进行视频压缩。而高精度几何信息和补充点等可以采用V-PCC中对特殊点的处理方法进行编码,如利用raw patch方法进行压缩。将得到的子码流进行混流,准备将其与连接关系码流及其他码流进行进一步混流得到最终的输出码流。此处对不同精度信息和补充点的表示和编码兼顾了无损和有损模式,特别是能够在降低编码比特开销的同时保证了无损压缩。It should be noted that quantization may obtain low-precision geometric information, high-precision geometric information and supplementary point information. Among them, low-precision geometric information is the three-dimensional coordinates after quantization; high-precision geometric information is the geometric information lost by the low-precision grid after quantization; supplementary points refer to points generated during the quantization process that need to be processed separately, such as overlapping coordinate positions. Repeat point and so on. For the low-precision geometric information generated by quantization, a projection method similar to V-PCC is used to project it to a two-dimensional plane, and then perform video compression. High-precision geometric information and supplementary points can be encoded using the special point processing method in V-PCC, such as using the raw patch method for compression. The obtained sub-code stream is mixed, and is prepared to be further mixed with the connection relationship code stream and other code streams to obtain the final output code stream. The representation and encoding of information of different precisions and supplementary points here take into account both lossless and lossy modes. In particular, lossless compression can be guaranteed while reducing encoding bit overhead.
3)将编码后的几何信息码流进行解码重建出几何信息来作为连接关系编码的辅助信息,在更新原始网格的连接关系后再对更新后的连接信息进行编码。在最后将得到的连接关系码流与几何信息和其他需要编码的属性信息码流进行混流。3) Decode the encoded geometric information code stream to reconstruct the geometric information as auxiliary information for connection relationship encoding, and then encode the updated connection information after updating the connection relationship of the original grid. Finally, the obtained connection relationship code stream is mixed with the code stream of geometric information and other attribute information that needs to be encoded.
4)用重建后的几何信息与UV坐标信息进行UV坐标的重建,并对UV坐标进行编码形成UV坐标子码流。这里的编码方法可以使用预测编码,即预测待编码UV坐标位置后编码预测坐标与真实坐标间的残差来节省比特开销(残差的比特位数小于原UV坐标的比特位数)。4) Use the reconstructed geometric information and UV coordinate information to reconstruct the UV coordinates, and encode the UV coordinates to form a UV coordinate sub-stream. The encoding method here can use predictive coding, that is, predicting the position of the UV coordinates to be encoded and then encoding the residual between the predicted coordinates and the real coordinates to save bit overhead (the number of bits in the residual is smaller than the number of bits in the original UV coordinates).
5)对纹理图进行视频编码形成纹理图子码流。5) Video encode the texture map to form a texture map sub-stream.
6)把得到的各路子码流混流成为编码器的输出码流。 6) Mix the obtained sub-streams into the output code stream of the encoder.
例如,本申请实施例的基于视频的三维网格的编码框架如图10所示,总体编码流程为:首先,在量化之前可以选择是否对三维网格进行抽样简化;然后,对三维网格进行量化,由此可能会产生低精度几何信息、高精度几何信息和补充点信息三部分;对于低精度几何信息,采用投影的方式进行patch划分、patch排列生成patch序列压缩信息(patch的划分信息)、占位图和低精度几何图;对于可能存在的高精度几何信息可以采用raw patch的排列方式,生成高精度几何图;对于可能存在的补充点,可以将补充点的几何信息分为低精度部分和高精度部分,分别进行raw patch排列,单独编码成一路码流,或者将raw patch加入几何图中;而后,编码patch序列压缩信息、占位图、几何图。对于连接关系,将编码后的几何信息码流进行解码重建出几何信息来作为连接关系编码的辅助信息。在更新原始网格的连接关系后再对更新后的连接信息进行编码,得到连接关系子码流。对于UV坐标,使用重建后的几何信息与UV坐标信息进行UV坐标的重建,并对UV坐标进行编码形成UV坐标子码流。在某些情况下,如纹理图分片较为琐碎时,可以选择重新生成分片较为完整的UV坐标并对其进行编码。对于纹理图,可以直接对纹理图进行视频编码形成纹理图子码流。最后,将多路子码流混流,得到最终输出码流。For example, the coding framework of the video-based three-dimensional grid in the embodiment of the present application is shown in Figure 10. The overall coding process is: first, before quantization, you can choose whether to perform sampling simplification on the three-dimensional grid; then, perform sampling on the three-dimensional grid. Quantification, which may produce three parts: low-precision geometric information, high-precision geometric information and supplementary point information; for low-precision geometric information, projection is used to divide patches and arrange patches to generate patch sequence compression information (patch division information) , placeholder map and low-precision geometric map; for possible high-precision geometric information, raw patch arrangement can be used to generate high-precision geometric map; for possible supplementary points, the geometric information of supplementary points can be divided into low-precision For the partial and high-precision parts, the raw patches are arranged separately and separately encoded into a code stream, or the raw patches are added to the geometric diagram; then, the patch sequence compression information, placeholder map, and geometric diagram are encoded. For the connection relationship, the encoded geometric information code stream is decoded to reconstruct the geometric information as auxiliary information for connection relationship encoding. After updating the connection relationship of the original grid, the updated connection information is encoded to obtain the connection relationship sub-stream. For UV coordinates, the reconstructed geometric information and UV coordinate information are used to reconstruct the UV coordinates, and the UV coordinates are encoded to form a UV coordinate sub-stream. In some cases, such as when the texture map fragmentation is relatively trivial, you can choose to regenerate the UV coordinates with more complete fragmentation and encode them. For texture maps, the texture map can be directly video-encoded to form a texture map sub-stream. Finally, multiple sub-streams are mixed to obtain the final output stream.
需要说明的是,本申请实施例给出了一种基于视频的三维网格的编码框架,对于解码端,只需要按照编码端的逆过程进行解码即可;本申请实施中特别针对含有几何信息重复顶点的网格,进行了单独的简洁标识和编码,在编码连接关系过程中,因为去除了重复顶点的编码,可以使三维网格的编码更加高效。It should be noted that the embodiment of the present application provides a coding framework based on a three-dimensional grid of video. For the decoding end, it only needs to be decoded according to the inverse process of the encoding end; in the implementation of the present application, it is particularly targeted at the video containing repeated geometric information. The grid of vertices is individually and concisely marked and coded. In the process of coding connection relationships, because the coding of repeated vertices is removed, the coding of the three-dimensional grid can be made more efficient.
本申请实施例提供的编码方法,执行主体可以为编码装置。本申请实施例中以编码装置执行编码方法为例,说明本申请实施例提供的编码装置。For the encoding method provided by the embodiment of the present application, the execution subject may be an encoding device. In the embodiment of the present application, 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.
如图11所示,本申请实施例提供一种编码装置1100,包括:As shown in Figure 11, this embodiment of the present application provides an encoding device 1100, which includes:
第一获取模块1101,用于对编码后的目标三维网格的几何信息进行解码重建,获取重建后的第一几何信息;The first acquisition module 1101 is used to decode and reconstruct the geometric information of the encoded target three-dimensional grid, and obtain the reconstructed first geometric information;
第二获取模块1102,用于对所述第一几何信息进行重复顶点筛选,获取重复顶点信息,所述重复顶点为位置坐标相同的多个顶点中除第一顶点以外的顶点,所述第一顶点为位置坐标相同的多个顶点中的其中一个顶点;The second acquisition module 1102 is used to filter repeated vertices on the first geometric information and obtain repeated vertex information. The repeated vertices are vertices other than the first vertex among multiple vertices with the same position coordinates. The first vertex is The vertex is one of multiple vertices with the same position coordinates;
第三获取模块1103,用于根据所述重复顶点信息,进行所述目标三维网格的第一连接关系的重排序,获取重排序后的第二连接关系;The third acquisition module 1103 is configured to reorder the first connection relationships of the target three-dimensional mesh according to the repeated vertex information, and obtain the reordered second connection relationships;
第一编码模块1104,用于对所述第二连接关系进行编码。The first encoding module 1104 is used to encode the second connection relationship.
可选地,所述重复顶点信息的获取方式,包括:Optionally, the method of obtaining repeated vertex information includes:
获取所述第一几何信息中的重复顶点,记录下重复顶点的索引形成重复顶点信息;Obtain the repeated vertex in the first geometric information, record the index of the repeated vertex to form the repeated vertex information;
其中,所述重复顶点信息中包括重复顶点的索引和第一顶点与重复顶点的纹理坐标索引。Wherein, the repeated vertex information includes the index of the repeated vertex and the texture coordinate index of the first vertex and the repeated vertex.
可选地,所述第三获取模块1103,包括:Optionally, the third acquisition module 1103 includes:
第一获取单元,用于根据重复顶点的索引对所述目标三维网格的顶点纹理坐标进行重 排,获取重排序之后的纹理坐标信息;The first acquisition unit is used to re-acquire the vertex texture coordinates of the target three-dimensional mesh according to the index of the repeated vertex. Arrange to obtain the texture coordinate information after reordering;
第二获取单元,用于根据重排序之后的纹理坐标信息和所述重复顶点信息,对所述目标三维网格的第一连接关系进行调整,获取重排序之后的第二连接关系。The second acquisition unit is configured to adjust the first connection relationship of the target three-dimensional mesh according to the reordered texture coordinate information and the repeated vertex information, and obtain the second connection relationship after the reordering.
可选地,所述第一获取单元,用于:Optionally, the first acquisition unit is used for:
根据重复顶点在第一几何信息中出现的顺序,将所述重复顶点对应的纹理坐标依次移至所述纹理坐标对应的列表的尾部,形成重排序后的纹理坐标信息。According to the order in which the repeated vertices appear in the first geometric information, the texture coordinates corresponding to the repeated vertices are sequentially moved to the end of the list corresponding to the texture coordinates to form reordered texture coordinate information.
可选地,所述第二获取单元,用于:Optionally, the second acquisition unit is used for:
对所述目标三维网格的第一连接关系的纹理坐标索引部分按照重排序之后的纹理坐标信息进行修改;Modify the texture coordinate index part of the first connection relationship of the target three-dimensional grid according to the texture coordinate information after reordering;
对所述目标三维网格的第一连接关系的几何索引部分进行遍历,根据重复顶点信息将所述目标三维网格的第一连接关系的重复顶点的索引替换为第一顶点的索引,获取重排序之后的第二连接关系。Traverse the geometric index part of the first connection relationship of the target three-dimensional grid, replace the index of the repeated vertex of the first connection relationship of the target three-dimensional grid with the index of the first vertex according to the repeated vertex information, and obtain the repeated vertex index. The second connection relationship after sorting.
可选地,所述装置,还包括:Optionally, the device also includes:
第一查询模块,用于在对所述第二连接关系编码的过程中,对于每一个三角面片的三个顶点,根据重复顶点信息,查询是否存在重复顶点;A first query module, configured to query whether there are duplicate vertices based on the duplicate vertex information for the three vertices of each triangular patch during the process of encoding the second connection relationship;
标识模块,用于在存在重复顶点的情况下,对所述重复顶点进行标识;An identification module, used to identify duplicate vertices when they exist;
第四获取模块,用于在完成第二连接关系的编码后,根据重复顶点的标识进行编码,获取重复顶点标识码流。The fourth acquisition module is used to perform encoding according to the identifier of the repeated vertex after completing the encoding of the second connection relationship, and obtain the code stream of the repeated vertex identifier.
可选地,在所述第一获取模块1101对编码后的目标三维网格的几何信息进行解码重建,获取重建后的第一几何信息之后,还包括:Optionally, after the first acquisition module 1101 decodes and reconstructs the encoded geometric information of the target three-dimensional mesh and obtains the reconstructed first geometric information, it also includes:
调整模块,用于根据重建的第一几何信息来调整部分纹理坐标的取值和排列顺序。An adjustment module, configured to adjust the values and arrangement order of some texture coordinates according to the reconstructed first geometric information.
可选地,所述装置,还包括:Optionally, the device also includes:
第一恢复模块,用于按照重复顶点在重排序之后的纹理坐标信息中的顺序恢复第二几何信息与所述第二连接关系中的重复顶点,所述第二几何信息为不包括重复顶点的网格几何信息;A first recovery module, configured to restore the second geometric information and the repeated vertices in the second connection relationship according to the order of the repeated vertices in the reordered texture coordinate information, where the second geometric information does not include repeated vertices. Mesh geometry information;
第一记录模块,用于对恢复重复顶点的第二连接关系进行遍历,记录遍历顺序;The first recording module is used to traverse the second connection relationship to restore repeated vertices and record the traversal order;
第二编码模块,用于根据所述遍历顺序,对顶点的纹理坐标进行编码。The second encoding module is used to encode the texture coordinates of the vertices according to the traversal order.
可选地,在所述第三获取模块1103根据所述重复顶点信息,进行所述目标三维网格的第一连接关系的重排序,获取重排序后的第二连接关系之前,还包括:Optionally, before the third acquisition module 1103 reorders the first connection relationships of the target three-dimensional mesh according to the repeated vertex information and obtains the reordered second connection relationship, it also includes:
调整模块,用于根据所述重建后的第一几何信息,对所述目标三维网格的第一连接关系存在变化的部分进行调整。An adjustment module, configured to adjust the portion where the first connection relationship of the target three-dimensional grid changes according to the reconstructed first geometric information.
该装置实施例与上述编码方法实施例对应,上述方法实施例的各个实施过程和实现方式均可适用于该装置实施例中,且能达到相同的技术效果。This device embodiment corresponds to the above-mentioned encoding method embodiment. Each implementation process and implementation manner of the above-mentioned method embodiment can be applied to this device embodiment, and can achieve the same technical effect.
本申请实施例还提供了一种编码设备,包括处理器及通信接口,其中,所述处理器用于对编码后的目标三维网格的几何信息进行解码重建,获取重建后的第一几何信息;对所 述第一几何信息进行重复顶点筛选,获取重复顶点信息,所述重复顶点为位置坐标相同的多个顶点中除第一顶点以外的顶点,所述第一顶点为位置坐标相同的多个顶点中的其中一个顶点;根据所述重复顶点信息,进行所述目标三维网格的第一连接关系的重排序,获取重排序后的第二连接关系;对所述第二连接关系进行编码。Embodiments of the present application also provide an encoding device, including a processor and a communication interface, wherein the processor is used to decode and reconstruct the geometric information of the encoded target three-dimensional grid, and obtain the reconstructed first geometric information; Right Perform repeated vertex screening on the first geometric information to obtain repeated vertex information. The repeated vertices are vertices other than the first vertex among multiple vertices with the same position coordinates. The first vertex is among the multiple vertices with the same position coordinates. one of the vertices; perform reordering of the first connection relationships of the target three-dimensional mesh according to the repeated vertex information, and obtain the reordered second connection relationship; and encode the second connection relationship.
可选地,所述处理器用于:Optionally, the processor is used for:
获取所述第一几何信息中的重复顶点,记录下重复顶点的索引形成重复顶点信息;Obtain the repeated vertex in the first geometric information, record the index of the repeated vertex to form the repeated vertex information;
其中,所述重复顶点信息中包括重复顶点的索引和第一顶点与重复顶点的纹理坐标索引。Wherein, the repeated vertex information includes the index of the repeated vertex and the texture coordinate index of the first vertex and the repeated vertex.
可选地,所述处理器用于:Optionally, the processor is used for:
所述编码端根据重复顶点的索引对所述目标三维网格的顶点纹理坐标进行重排,获取重排序之后的纹理坐标信息;The encoding end rearranges the vertex texture coordinates of the target three-dimensional grid according to the index of the repeated vertex, and obtains the reordered texture coordinate information;
所述编码端根据重排序之后的纹理坐标信息和所述重复顶点信息,对所述目标三维网格的第一连接关系进行调整,获取重排序之后的第二连接关系。The encoding end adjusts the first connection relationship of the target three-dimensional mesh according to the reordered texture coordinate information and the repeated vertex information, and obtains the second connection relationship after the reordering.
可选地,所述处理器用于:Optionally, the processor is used for:
所述编码端根据重复顶点在第一几何信息中出现的顺序,将所述重复顶点对应的纹理坐标依次移至所述纹理坐标对应的列表的尾部,形成重排序后的纹理坐标信息。The encoding end sequentially moves the texture coordinates corresponding to the repeated vertices to the end of the list corresponding to the texture coordinates according to the order in which the repeated vertices appear in the first geometric information, to form reordered texture coordinate information.
可选地,所述处理器用于:Optionally, the processor is used for:
所述编码端对所述目标三维网格的第一连接关系的纹理坐标索引部分按照重排序之后的纹理坐标信息进行修改;The encoding end modifies the texture coordinate index part of the first connection relationship of the target three-dimensional grid according to the texture coordinate information after reordering;
所述编码端对所述目标三维网格的第一连接关系的几何索引部分进行遍历,根据重复顶点信息将所述目标三维网格的第一连接关系的重复顶点的索引替换为第一顶点的索引,获取重排序之后的第二连接关系。The encoding end traverses the geometric index part of the first connection relationship of the target three-dimensional grid, and replaces the index of the repeated vertex of the first connection relationship of the target three-dimensional grid with the index of the first vertex according to the repeated vertex information. Index to obtain the second connection relationship after reordering.
可选地,所述处理器还用于:Optionally, the processor is also used to:
所述编码端在对所述第二连接关系编码的过程中,对于每一个三角面片的三个顶点,根据重复顶点信息,查询是否存在重复顶点;In the process of encoding the second connection relationship, the encoding end queries the three vertices of each triangular patch to see whether there are repeated vertices based on the repeated vertex information;
所述编码端在存在重复顶点的情况下,对所述重复顶点进行标识;When a duplicate vertex exists, the encoding end identifies the duplicate vertex;
所述编码端在完成第二连接关系的编码后,根据重复顶点的标识进行编码,获取重复顶点标识码流。After completing the encoding of the second connection relationship, the encoding end performs encoding according to the identifier of the repeated vertex, and obtains the code stream of the repeated vertex identifier.
可选地,所述处理器还用于:Optionally, the processor is also used to:
所述编码端根据重建的第一几何信息来调整部分纹理坐标的取值和排列顺序。The encoding end adjusts the values and arrangement order of some texture coordinates according to the reconstructed first geometric information.
可选地,所述处理器还用于:Optionally, the processor is also used to:
所述编码端按照重复顶点在重排序之后的纹理坐标信息中的顺序恢复第二几何信息与所述第二连接关系中的重复顶点,所述第二几何信息为不包括重复顶点的网格几何信息;The encoding end restores the second geometric information and the repeated vertices in the second connection relationship according to the order of the repeated vertices in the reordered texture coordinate information, and the second geometric information is a mesh geometry that does not include repeated vertices. information;
所述编码端对恢复重复顶点的第二连接关系进行遍历,记录遍历顺序;The encoding end traverses the second connection relationship of the restored repeated vertices and records the traversal order;
所述编码端根据所述遍历顺序,对顶点的纹理坐标进行编码。 The encoding end encodes the texture coordinates of the vertices according to the traversal order.
可选地,所述处理器还用于:Optionally, the processor is also used to:
所述编码端根据所述重建后的第一几何信息,对所述目标三维网格的第一连接关系存在变化的部分进行调整。The encoding end adjusts the changed portion of the first connection relationship of the target three-dimensional grid according to the reconstructed first geometric information.
具体地,本申请实施例还提供了一种编码设备,如图12所示,该编码设备1200包括:处理器1201、网络接口1202和存储器1203。其中,网络接口1202例如为通用公共无线接口(common public radio interface,CPRI)。Specifically, this embodiment of the present application also provides an encoding device. As shown in Figure 12, the encoding device 1200 includes: a processor 1201, a network interface 1202, and a memory 1203. The network interface 1202 is, for example, a common public radio interface (CPRI).
具体地,本申请实施例的编码设备1200还包括:存储在存储器1203上并可在处理器1201上运行的指令或程序,处理器1201调用存储器1203中的指令或程序执行图11所示各模块执行的方法,并达到相同的技术效果,为避免重复,故不在此赘述。Specifically, the encoding device 1200 in the embodiment of the present application also includes: instructions or programs stored in the memory 1203 and executable on the processor 1201. The processor 1201 calls the instructions or programs in the memory 1203 to execute the modules shown in Figure 11 The implementation method and achieve the same technical effect will not be repeated here to avoid repetition.
对应于编码端的实现过程,如图13所示,本申请实施例还提供一种解码方法,包括:Corresponding to the implementation process of the encoding end, as shown in Figure 13, embodiments of the present application also provide a decoding method, including:
步骤1301,解码端根据获取的目标三维网格对应的码流,解码重建第一几何信息;Step 1301: The decoder decodes and reconstructs the first geometric information according to the obtained code stream corresponding to the target three-dimensional grid;
步骤1302,所述解码端对所述第一几何信息进行重复顶点筛选,获取重复顶点信息,所述重复顶点为位置坐标相同的多个顶点中除第一顶点以外的顶点,所述第一顶点为位置坐标相同的多个顶点中的其中一个顶点;Step 1302: The decoder performs repeated vertex screening on the first geometric information to obtain repeated vertex information. The repeated vertices are vertices other than the first vertex among multiple vertices with the same position coordinates. The first vertex Is one of the vertices among multiple vertices with the same position coordinates;
步骤1303,所述解码端根据所述重复顶点信息,对所述目标三维网格的连接关系码流进行解码。Step 1303: The decoding end decodes the connection relationship code stream of the target three-dimensional grid according to the repeated vertex information.
可选地,所述重复顶点信息的获取方式,包括:Optionally, the method of obtaining repeated vertex information includes:
所述解码端获取所述第一几何信息中的重复顶点,记录下重复顶点的索引形成重复顶点信息;The decoding end obtains the repeated vertices in the first geometric information, and records the index of the repeated vertices to form repeated vertex information;
其中,所述重复顶点信息中包括重复顶点的索引和第一顶点与重复顶点的纹理坐标索引。Wherein, the repeated vertex information includes the index of the repeated vertex and the texture coordinate index of the first vertex and the repeated vertex.
可选地,所述方法,还包括:Optionally, the method also includes:
所述解码端在解码连接关系码流的过程中,对于每一个三角面片,根据重复顶点信息,查询是否存在重复顶点;During the process of decoding the connection relationship code stream, the decoding end queries whether there are duplicate vertices for each triangle patch based on the duplicate vertex information;
所述解码端在存在重复顶点的情况下,从重复标识码流中解码重复顶点的索引。When a duplicate vertex exists, the decoding end decodes the index of the duplicate vertex from the duplicate identification code stream.
可选地,所述方法,还包括:Optionally, the method also includes:
所述解码端根据重复顶点的索引对第二几何信息以及解码得到的连接关系进行重复顶点的恢复,所述第二几何信息为不包括重复顶点的网格几何信息;The decoding end restores the repeated vertices according to the second geometric information and the decoded connection relationship according to the index of the repeated vertex, where the second geometric information is mesh geometry information excluding repeated vertices;
所述解码端对恢复重复顶点的连接关系进行遍历,记录遍历顺序;The decoding end traverses the connection relationship of the restored repeated vertices and records the traversal order;
所述解码端根据所述遍历顺序,对顶点的纹理坐标码流进行解码。The decoding end decodes the texture coordinate code stream of the vertex according to the traversal order.
可选地,本申请实施例中基于视频的三维网格几何信息解码过程包括:将码流分解为patch信息子码流、占位图码流和几何图码流;然后,分别解码这三路子码流,得到patch信息、占位图和几何图;最后,使用patch信息、占位图和几何图重建几何信息。具体地,如图14所示,最关键的是几何信息重建的具体过程为:Optionally, the video-based three-dimensional grid geometric information decoding process in the embodiment of this application includes: decomposing the code stream into a patch information sub-stream, a placeholder image code stream, and a geometric image code stream; and then decoding these three sub-streams respectively. Code stream, obtain patch information, placeholder map and geometric map; finally, use patch information, placeholder map and geometric map to reconstruct geometric information. Specifically, as shown in Figure 14, the most critical thing is the specific process of geometric information reconstruction:
步骤S111、获取2D patch; Step S111, obtain the 2D patch;
需要说明的是,获取2D patch是指利用patch信息从占位图和几何图中分割出2D patch的占位信息和深度信息。Patch信息中包含了每个2D patch的包围盒在占位图和低精度几何图中的位置和大小,利用patch信息、占位图和低精度几何图可以直接获取到2D patch的占位信息和低精度几何信息。对于高精度几何信息,利用低精度几何图的顶点分布,将高精度几何信息区域中高精度几何信息排列值与低精度几何图顶点进行对应,再从中按照编码端使用的预设排列规则分离出xyz三维几何信息,从而得到高精度几何信息。对于补充点的几何信息,直接解码补充点的低精度raw patch和高精度raw patch即可获得补充点的低精度几何信息和高精度几何信息。It should be noted that obtaining a 2D patch refers to using the patch information to segment the placeholder information and depth information of the 2D patch from the placeholder map and geometric map. The patch information contains the position and size of each 2D patch's bounding box in the placeholder map and low-precision geometric map. The placeholder information and the 2D patch's placeholder information can be directly obtained using the patch information, placeholder map, and low-precision geometric map. Low precision geometric information. For high-precision geometric information, the vertex distribution of the low-precision geometric graph is used to correspond the high-precision geometric information arrangement values in the high-precision geometric information area to the vertices of the low-precision geometric graph, and then xyz is separated from them according to the preset arrangement rules used by the encoding end. Three-dimensional geometric information, thereby obtaining high-precision geometric information. For the geometric information of supplementary points, the low-precision geometric information and high-precision geometric information of supplementary points can be obtained by directly decoding the low-precision raw patch and high-precision raw patch of supplementary points.
步骤S112,重建3D patch;Step S112, reconstruct the 3D patch;
需要说明的是,重建3D patch是指利用2D patch中的占位信息和低精度几何信息,将2D patch中的顶点重建为低精度3D patch。2D patch的占位信息中包含了顶点在patch投影平面局部坐标系中相对于坐标原点的位置,深度信息包含了顶点在投影平面法线方向上的深度值。因此,利用占位信息和深度信息可以在局部坐标系中将2D patch重建为低精度3D patch。It should be noted that 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.
步骤S113,重建低精度几何模型;Step S113, reconstruct the low-precision geometric model;
需要说明的是,重建低精度几何模型是指利用重建的低精度3D patch,重建整个低精度三维几何模型。Patch信息中包含了3D patch由局部坐标系转换成三维几何模型全局坐标系的转换关系,利用坐标转换关系将所有的3D patch转换到全局坐标系下,就得到了低精度三维几何模型。此外,对于补充点,直接利用低精度raw patch中的几何信息,得到补充点在全局坐标系下的低精度坐标值,从而得到完整的低精度三维几何模型。It should be noted that 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. In addition, for the supplementary points, 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.
步骤S114,重建高精度几何模型;Step S114, reconstruct the high-precision geometric model;
需要说明的是,重建高精度几何模型是指在低精度几何模型的基础上,利用高精度几何信息,重建高精度几何模型的过程。在获取2D patch的过程中,将高精度几何信息与低精度几何信息进行了对应,根据顶点的高精度几何信息和低精度几何信息可以重建出顶点的高精度三维坐标。根据应用的要求,可以选择重建全部顶点的高精度三维坐标,也可以重建部分顶点的高精度三维坐标。高精度三维坐标(xr,yr,zr)的计算过程,如公式三十八至公式四十所示:It should be noted that 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. In the process of obtaining the 2D patch, 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. According to the requirements of the application, you can choose to reconstruct the high-precision three-dimensional coordinates of all vertices or reconstruct the high-precision three-dimensional coordinates of some vertices. The calculation process of high-precision three-dimensional coordinates (x r , y r , z r ) is as shown in Formula 38 to Formula 40:
公式三十八:xr=f3(xl,xh,QPx);Formula 38: x r =f 3 (x l ,x h ,QP x );
公式三十九:yr=f3(yl,yh,QPy);Formula 39: y r =f 3 (y l ,y h ,QP y );
公式四十:zr=f3(zl,zh,QPz);Formula 40: z r = f 3 (z l ,z h ,QP z );
f3函数是重建函数,重建函数的计算过程与编码端量化函数的计算过程相对应,有多种实现方式。如果f1函数采用式公式二十至公式二十五的实现方式,则重建函数的实现方式如公式四十一至公式四十三所示: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 41 to Formula 43:
公式四十一:xr=xl*QPx+xhFormula 41: x r =x l *QP x +x h ;
公式四十二:yr=yl*QPy+yhFormula 42: y r =y l *QP y +y h ;
公式四十三:zr=zl*QPz+zhFormula 43: z r =z l *QP z +z h ;
如果f1函数采用公式二十六至公式三十一的实现方式,则重建函数的实现方式如公式四十四至公式四十六所示:If the f 1 function adopts the implementation method of Formula 26 to Formula 31, then the reconstruction function is implemented as shown in Formula 44 to Formula 46:
公式四十四:xr=(xl<<log2QPx)|xhFormula 44: x r = (x l <<log 2 QP x )|x h ;
公式四十五:yr=(yl<<log2QPy)|yhFormula 45: y r = (y l <<log 2 QP y )|y h ;
公式四十六:zr=(zl<<log2QPz)|zhFormula 46: z r = (z l <<log 2 QP z )|z h .
需要说明的是,本申请实施例中对连接关系解码时,需先对重建的几何信息,找到其中的重复顶点,去除重复顶点,并且记录重复点顶点索引,形成重复顶点信息。具体地,解码连接关系的过程可具体包括:It should be noted that when decoding the connection relationship in the embodiment of the present application, it is necessary to first find the repeated vertices in the reconstructed geometric information, remove the repeated vertices, and record the vertex index of the repeated points to form repeated vertex information. Specifically, the process of decoding the connection relationship may specifically include:
(1)解码初始三角形的顶点,并将初始三角形的边存入边集合中。按照编码器中使用的准则从边集合中取出边τ。若待解码的码字为顶点索引,则直接解码该顶点并将其作为对顶点v。以该顶点v和边τ形成新解码出的三角形,并将该三角形除去边τ外的两条边加入边集合中,以某种规则移除集合中的边τ,如按照队列顶端的准则移除边τ。按某规则取出下一个边并继续解码该边邻接三角形,例如可以取出队列顶部的边作为该规则。(1) Decode the vertices of the initial triangle and store the edges of the initial triangle into the edge set. 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.
(2)若待解码的码字不为顶点索引,则解码并且确定对顶点v的空间范围。例如解码τ中点的两个同心球半径{Rmin,Rmax},遍历同心球间范围内的所有顶点,筛除与边τ形成的与已解码三角形的夹角小于某角度的新三角形的所有顶点。(2) If the codeword to be decoded is not a vertex index, decode and determine the spatial range of the vertex v. For example, to decode the radii of two concentric spheres {R min , R max } at the midpoint of τ, traverse all the vertices within the range between the concentric spheres, and filter out the new triangles formed with the side τ that have an angle smaller than a certain angle with the decoded triangle. All vertices.
(3)对于对顶点v所在空间范围内的剩余顶点,按照与编码端相同的排序准则对顶点进行排序。解码待解码三角形中的对顶点v对应的序号,并查表得到对顶点v,构建解码三角形。将新解码三角形除去边τ外的两条边加入边集合中,以某种规则移除集合中的边τ,如按照队列顶端的准则移除边τ。按某规则取出下一个边并继续解码该边邻接三角形,例如可以取出队列顶部的边作为该规则。(3) For the remaining vertices within the space range where vertex v is located, sort the vertices according to the same sorting criteria as the encoding end. Decode the sequence number corresponding to the pair of vertices v in the triangle to be decoded, and look up the table to obtain the pair of vertices v, and construct the decoding triangle. Add the two edges of the new decoded triangle except the edge τ to the edge set, and remove the edge τ in the set according to a certain rule, such as removing the edge τ according to the criterion at the top of the queue. 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.
需要说明的是,在解码连接关系的过程中,对于每一个三角面片,根据重复点对照表,如果当前三角面片存在顶点为重复顶点,则从重复标识码流中解码当前重复顶点索引。具体地,先把这个重复顶点标识解码出来放到一个数组里。然后再根据重复顶点信息,如果当前顶点是重复顶点的话就从数组里去除重复顶点标识来形成重复顶点索引。It should be noted that during the process of decoding the connection relationship, for each triangular patch, according to the repeated point comparison table, if the vertex of the current triangular patch is a repeated vertex, the current repeated vertex index is decoded from the repeated identification code stream. Specifically, first decode the repeated vertex identifier and put it into an array. Then based on the repeated vertex information, if the current vertex is a repeated vertex, the repeated vertex identifier is removed from the array to form a repeated vertex index.
需要说明的是,三维网格的UV坐标的解码过程是编码过程的逆过程,本申请的一具体实施例中,先熵解码出坐标预测残差。再恢复几何信息与连接性关系中的重复顶点,迭代连接关系并记录点的连接顺序,依据该顺序对顶点的UV坐标进行预测。该预测过程利用三角形三维到二维的投影映射关系,依据已解码点UV坐标按照编码端预测规则对当前点进行预测,得到预测UV坐标。将预测坐标加上熵解码出的残差值即可得到待解码的UV坐标位置。It should be noted that the decoding process of the UV coordinates of the three-dimensional grid is the inverse process of the encoding process. In a specific embodiment of the present application, the coordinate prediction residual is first entropy decoded. Then restore the repeated vertices in the geometric information and connectivity relationship, iterate the connection relationship and record the connection order of the points, and predict the UV coordinates of the vertices based on this order. The prediction process uses the projection mapping relationship between the three-dimensional and two-dimensional triangles, and predicts the current point based on the UV coordinates of the decoded point according to the encoding-side prediction rules to obtain the predicted UV coordinates. Add the predicted coordinates to the residual value decoded by entropy to obtain the UV coordinate position to be decoded.
这里需要说明的是,初始三角形的UV坐标不使用预测编码,而是直接编码它们的 UV坐标值,在解码端解码出该三角形的UV坐标后作为初始三角形开始遍历解码其他三角形顶点的UV坐标。It should be noted here that the UV coordinates of the initial triangle do not use predictive encoding, but directly encode their The UV coordinate value, after the decoder decodes the UV coordinates of the triangle, is used as the initial triangle to start traversing and decoding the UV coordinates of other triangle vertices.
对于纹理图的解码,本申请的一具体实施例中,直接使用视频解码器对纹理图进行解码,可以得到逐帧的纹理图,此处不强调纹理图的文件格式,格式可以为jpg、png等。For the decoding of the texture map, in a specific embodiment of the present application, a video decoder is directly used to decode the texture map, and a frame-by-frame texture map can be obtained. The file format of the texture map is not emphasized here. The format can be jpg, png. wait.
综上可知,三维网格解码过程可以分为:In summary, it can be seen that the three-dimensional grid decoding process can be divided into:
1、解流后对各路子码流进行解码,其中,对占用图、几何图、纹理图使用视频解码器进行解码,对连接关系和UV坐标子码流使用与编码端编码方法对应的解码器进行解码。1. After destreaming, decode each sub-stream. Among them, use the video decoder to decode the occupancy map, geometry map, and texture map. Use the decoder corresponding to the encoding method of the encoding end to use the connection relationship and UV coordinate sub-stream. to decode.
2、对于几何信息,首先将码流分解为patch信息子码流、占位图码流和几何图码流;然后,分别解码这三路子码流,得到patch信息、占位图和几何图;最后,使用patch信息、占位图和几何图重建几何信息。2. For geometric information, first decompose the code stream into patch information sub-stream, placeholder image code stream and geometric image code stream; then, decode these three sub-code streams respectively to obtain patch information, placeholder image and geometric image; Finally, the patch information, placeholder map and geometry map are used to reconstruct the geometric information.
3、对于连接关系,解码连接关系子码流,进行连接关系重建。3. For the connection relationship, decode the connection relationship sub-stream and reconstruct the connection relationship.
4、对于UV坐标,解码连接关系子码流,进行UV坐标重建。4. For UV coordinates, decode the connection relationship sub-stream and reconstruct the UV coordinates.
5、对于纹理图,解码纹理图子码流,得到逐帧的纹理图。5. For the texture map, decode the texture map sub-stream to obtain frame-by-frame texture maps.
需要说明的是,本申请实施例的解码过程是编码的逆过程,解码框图如图15所示,首先,将码流分解成patch信息子码流、占位图子码流、几何图子码流,连接关系子码流、UV坐标子码流、纹理图子码流并分别进行解码;使用占位图、低精度几何图可以重建低精度网格的几何信息,使用占位图、低精度几何图以及高精度几何图可以重建高精度网格的几何信息;使用连接关系子码流解码出网格的连接关系;从UV坐标子码流中解码出网格的UV坐标;从纹理图子码流中解码出逐帧的纹理图;最终,使用重建的几何信息、连接信息、UV坐标信息以及纹理图等信息重建出三维网格。It should be noted that the decoding process in the embodiment of the present application is the inverse process of encoding. The decoding block diagram is shown in Figure 15. First, the code stream is decomposed into a patch information sub-stream, a placeholder map sub-stream, and a geometric map sub-stream. Stream, connect the relationship sub-stream, UV coordinate sub-stream, and texture map sub-stream and decode them respectively; use placeholder map and low-precision geometric map to reconstruct the geometric information of low-precision mesh, use placeholder map, low-precision geometric map Geometric diagrams and high-precision geometric diagrams can reconstruct the geometric information of high-precision meshes; use the connection relationship sub-stream to decode the connection relationship of the grid; decode the UV coordinates of the grid from the UV coordinate sub-stream; and decode the UV coordinates of the grid from the texture map sub-stream. The frame-by-frame texture map is decoded from the code stream; finally, the three-dimensional grid is reconstructed using the reconstructed geometric information, connection information, UV coordinate information, texture map and other information.
需要说明的是,本申请实施例是与上述编码方法的实施例对应的对端的方法实施例,解码过程为编码的反过程,上述编码侧的所有实现方式均适用于该解码端的实施例中,也能达到与之相同的技术效果,在此不再赘述。It should be noted that the embodiment of the present application is a method embodiment of the opposite end corresponding to the embodiment of the above encoding method. The decoding process is the inverse process of encoding. All the above implementation methods on the encoding side are applicable to the embodiment of the decoding end. The same technical effect can also be achieved, which will not be described again here.
如图16所示,本申请实施例还提供一种解码装置1600,包括:As shown in Figure 16, this embodiment of the present application also provides a decoding device 1600, which includes:
重建模块1601,用于根据获取的目标三维网格对应的码流,解码重建第一几何信息;The reconstruction module 1601 is used to decode and reconstruct the first geometric information according to the obtained code stream corresponding to the target three-dimensional grid;
第五获取模块1602,用于对所述第一几何信息进行重复顶点筛选,获取重复顶点信息,所述重复顶点为位置坐标相同的多个顶点中除第一顶点以外的顶点,所述第一顶点为位置坐标相同的多个顶点中的其中一个顶点;The fifth acquisition module 1602 is used to perform repeated vertex screening on the first geometric information and obtain repeated vertex information. The repeated vertices are vertices other than the first vertex among multiple vertices with the same position coordinates. The first vertex is The vertex is one of multiple vertices with the same position coordinates;
解码模块1603,用于根据所述重复顶点信息,对所述目标三维网格的连接关系码流进行解码。The decoding module 1603 is configured to decode the connection relationship code stream of the target three-dimensional grid according to the repeated vertex information.
可选地,所述重复顶点信息的获取方式,包括:Optionally, the method of obtaining repeated vertex information includes:
获取所述第一几何信息中的重复顶点,记录下重复顶点的索引形成重复顶点信息;Obtain the repeated vertex in the first geometric information, record the index of the repeated vertex to form the repeated vertex information;
其中,所述重复顶点信息中包括重复顶点的索引和第一顶点与重复顶点的纹理坐标索引。Wherein, the repeated vertex information includes the index of the repeated vertex and the texture coordinate index of the first vertex and the repeated vertex.
可选地,所述装置,还包括: Optionally, the device also includes:
第二查询模块,用于在解码连接关系码流的过程中,对于每一个三角面片,根据重复顶点信息,查询是否存在重复顶点;The second query module is used to query whether there are duplicate vertices for each triangle patch based on the duplicate vertex information during the process of decoding the connection relationship code stream;
第二解码模块,用于所述解码端在存在重复顶点的情况下,从重复标识码流中解码重复顶点的索引。The second decoding module is used for the decoding end to decode the index of the repeated vertex from the repeated identification code stream when there is a repeated vertex.
可选地,所述装置,还包括:Optionally, the device also includes:
第二恢复模块,用于根据重复顶点的索引对第二几何信息以及解码得到的连接关系进行重复顶点的恢复,所述第二几何信息为不包括重复顶点的网格几何信息;A second recovery module, configured to recover the second geometric information and the decoded connection relationship according to the index of the repeated vertex, where the second geometric information is mesh geometry information excluding repeated vertices;
第二记录模块,用于对恢复重复顶点的连接关系进行遍历,记录遍历顺序;The second recording module is used to traverse the connection relationships of restored duplicate vertices and record the traversal order;
第三解码模块,用于根据所述遍历顺序,对顶点的纹理坐标码流进行解码。The third decoding module is used to decode the texture coordinate code stream of the vertices according to the traversal order.
需要说明的是,该装置实施例是与上述方法对应的装置,上述方法实施例中的所有实现方式均适用于该装置实施例中,也能达到相同的技术效果,在此不再赘述。It should be noted that this device embodiment is a device corresponding to the above-mentioned method. All implementation methods in the above-mentioned method embodiment are applicable to this device embodiment and can achieve the same technical effect, which will not be described again here.
优选的,本申请实施例还提供一种解码设备,包括处理器,存储器,存储在存储器上并可在所述处理器上运行的程序或指令,该程序或指令被处理器执行时实现上述的解码方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Preferably, the embodiment of the present application also provides a decoding device, including a processor, a memory, and a program or instruction stored in the memory and executable on the processor. When the program or instruction is executed by the processor, the above-mentioned decoding device is implemented. Each process of the decoding method embodiment can achieve the same technical effect. To avoid repetition, it will not be described again here.
本申请实施例还提供一种可读存储介质,计算机可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述的解码方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Embodiments of the present application also provide a readable storage medium. Programs or instructions are stored on the computer-readable storage medium. When the program or instructions are executed by a processor, each process of the above-mentioned decoding method embodiment is implemented, and the same process can be achieved. To avoid repetition, the technical effects will not be repeated here.
其中,所述的计算机可读存储介质,如只读存储器(Read-Only Memory,简称ROM)、随机存取存储器(Random Access Memory,简称RAM)、磁碟或者光盘等。Among them, the computer-readable storage medium is such as read-only memory (ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk, etc.
本申请实施例还提供了一种解码设备,包括处理器及通信接口,其中,所述处理器用于根据获取的目标三维网格对应的码流,解码重建第一几何信息;对所述第一几何信息进行重复顶点筛选,获取重复顶点信息,所述重复顶点为位置坐标相同的多个顶点中除第一顶点以外的顶点,所述第一顶点为位置坐标相同的多个顶点中的其中一个顶点;根据所述重复顶点信息,对所述目标三维网格的连接关系码流进行解码。An embodiment of the present application also provides a decoding device, including a processor and a communication interface, wherein the processor is used to decode and reconstruct the first geometric information according to the obtained code stream corresponding to the target three-dimensional grid; The geometric information is filtered for repeated vertices to obtain repeated vertex information. The repeated vertices are vertices other than the first vertex among multiple vertices with the same position coordinates. The first vertex is one of the multiple vertices with the same position coordinates. Vertex: decode the connection relationship code stream of the target three-dimensional grid according to the repeated vertex information.
可选地,所述处理器,用于:Optionally, the processor is used for:
获取所述第一几何信息中的重复顶点,记录下重复顶点的索引形成重复顶点信息;Obtain the repeated vertex in the first geometric information, record the index of the repeated vertex to form the repeated vertex information;
其中,所述重复顶点信息中包括重复顶点的索引和第一顶点与重复顶点的纹理坐标索引。Wherein, the repeated vertex information includes the index of the repeated vertex and the texture coordinate index of the first vertex and the repeated vertex.
可选地,所述处理器,用于:Optionally, the processor is used for:
在解码连接关系码流的过程中,对于每一个三角面片,根据重复顶点信息,查询是否存在重复顶点;In the process of decoding the connection relationship code stream, for each triangle patch, based on the repeated vertex information, query whether there are repeated vertices;
在存在重复顶点的情况下,从重复标识码流中解码重复顶点的索引。In the case where duplicate vertices exist, the index of the duplicate vertex is decoded from the duplicate identification code stream.
可选地,所述处理器,用于:Optionally, the processor is used for:
根据重复顶点的索引对第二几何信息以及解码得到的连接关系进行重复顶点的恢复,所述第二几何信息为不包括重复顶点的网格几何信息; Restoring the repeated vertices according to the second geometric information and the decoded connection relationship according to the index of the repeated vertices, where the second geometric information is mesh geometry information excluding repeated vertices;
对恢复重复顶点的连接关系进行遍历,记录遍历顺序;Traverse the connection relationships of restored duplicate vertices and record the traversal order;
根据所述遍历顺序,对顶点的纹理坐标码流进行解码。According to the traversal order, the texture coordinate code stream of the vertex is decoded.
该解码设备实施例是与上述解码方法实施例对应的,上述方法实施例的各个实施过程和实现方式均可适用于该解码设备实施例中,且能达到相同的技术效果。This decoding device embodiment corresponds to the above-mentioned decoding method embodiment. Each implementation process and implementation manner of the above-mentioned method embodiment can be applied to this decoding device embodiment, and can achieve the same technical effect.
具体地,本申请实施例还提供了一种解码设备。具体地,该解码设备的结构如图12所示,在此不再赘述。具体地,本申请实施例的解码设备还包括:存储在存储器上并可在处理器上运行的指令或程序,处理器调用存储器中的指令或程序执行图16所示各模块执行的方法,并达到相同的技术效果,为避免重复,故不在此赘述。Specifically, the embodiment of the present application also provides a decoding device. Specifically, the structure of the decoding device is shown in Figure 12, which will not be described again here. Specifically, the decoding device in the embodiment of the present application also includes: instructions or programs stored in the memory and executable on the processor. The processor calls the instructions or programs in the memory to execute the method executed by each module shown in Figure 16, and To achieve the same technical effect, to avoid repetition, we will not repeat them here.
本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述解码方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Embodiments of the present application also provide a readable storage medium. Programs or instructions are stored on the readable storage medium. When the program or instructions are executed by a processor, each process of the above decoding method embodiment is implemented, and the same process can be achieved. To avoid repetition, the technical effects will not be repeated here.
其中,所述处理器为上述实施例中所述的解码设备中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器ROM、随机存取存储器RAM、磁碟或者光盘等。Wherein, the processor is the processor in the decoding device 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.
可选地,如图17所示,本申请实施例还提供一种通信设备1700,包括处理器1701和存储器1702,存储器1702上存储有可在所述处理器1701上运行的程序或指令,例如,该通信设备1700为编码设备时,该程序或指令被处理器1701执行时实现上述编码方法实施例的各个步骤,且能达到相同的技术效果。该通信设备1700为解码设备时,该程序或指令被处理器1701执行时实现上述解码方法实施例的各个步骤,且能达到相同的技术效果,为避免重复,这里不再赘述。Optionally, as shown in Figure 17, this embodiment of the present application also provides a communication device 1700, including a processor 1701 and a memory 1702. The memory 1702 stores programs or instructions that can be run on the processor 1701, for example , when the communication device 1700 is a coding device, when the program or instruction is executed by the processor 1701, each step of the above coding method embodiment is implemented, and the same technical effect can be achieved. When the communication device 1700 is a decoding device, when the program or instruction is executed by the processor 1701, each step of the above decoding method embodiment is implemented, and the same technical effect can be achieved. To avoid duplication, the details are not repeated here.
本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述编码方法或解码方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。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 the above encoding method or decoding method. Each process in the example can achieve the same technical effect. To avoid repetition, we will not repeat it here.
应理解,本申请实施例提到的芯片还可以称为系统级芯片,系统芯片,芯片系统或片上系统芯片等。It should be understood that the 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 or decoding method. Each process of the embodiment can achieve the same technical effect, so to avoid repetition, it will not be described again here.
本申请实施例还提供了一种通信系统,至少包括:编码设备和解码设备,所述编码设备可用于执行如上所述的编码方法的步骤,所述解码设备可用于执行如上所述的解码方法的步骤。且能达到相同的技术效果,为避免重复,这里不再赘述。Embodiments of the present application also provide a communication system, which at least includes: an encoding device and a decoding device. The encoding device can be used to perform the steps of the encoding method as described above. The decoding device can be used to perform the decoding method as described above. A step of. And can achieve the same technical effect. To avoid repetition, they will not be described again here.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除 在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。It should be noted that, in this document, the terms "comprising", "comprises" or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article or device that includes a series of elements not only includes those elements, It also includes other elements not expressly listed or inherent in the process, method, article or apparatus. Without further limitation, an element qualified by the statement "includes a..." does not exclude There are also other identical elements in a process, method, article, or device that includes that element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, but may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved. Functions may be performed, for example, the methods described may be performed in an order different from that described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以计算机软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。Through the above description of the embodiments, those skilled in the art can clearly understand that 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. Based on this understanding, the technical solution of the present application can be embodied in the form of a computer software product that is essentially or contributes to the existing technology. 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.
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。 The embodiments of the present application have been described above in conjunction with the accompanying drawings. However, the present application is not limited to the above-mentioned specific implementations. The above-mentioned specific implementations are only illustrative and not restrictive. Those of ordinary skill in the art will Inspired by this application, many forms can be made without departing from the purpose of this application and the scope protected by the claims, all of which fall within the protection of this application.

Claims (26)

  1. 一种编码方法,包括:A coding method that includes:
    编码端对编码后的目标三维网格的几何信息进行解码重建,获取重建后的第一几何信息;The encoding end decodes and reconstructs the geometric information of the encoded target three-dimensional grid, and obtains the reconstructed first geometric information;
    所述编码端对所述第一几何信息进行重复顶点筛选,获取重复顶点信息,所述重复顶点为位置坐标相同的多个顶点中除第一顶点以外的顶点,所述第一顶点为位置坐标相同的多个顶点中的其中一个顶点;The encoding end performs repeated vertex screening on the first geometric information to obtain repeated vertex information. The repeated vertices are vertices other than the first vertex among multiple vertices with the same position coordinates, and the first vertex is the position coordinate. One of the same vertices;
    所述编码端根据所述重复顶点信息,进行所述目标三维网格的第一连接关系的重排序,获取重排序后的第二连接关系;The encoding end reorders the first connection relationships of the target three-dimensional grid based on the repeated vertex information, and obtains the reordered second connection relationships;
    所述编码端对所述第二连接关系进行编码。The encoding end encodes the second connection relationship.
  2. 根据权利要求1所述的方法,其中,所述重复顶点信息的获取方式,包括:The method according to claim 1, wherein the method of obtaining repeated vertex information includes:
    所述编码端获取所述第一几何信息中的重复顶点,记录下重复顶点的索引形成重复顶点信息;The encoding end obtains the repeated vertices in the first geometric information, and records the index of the repeated vertices to form repeated vertex information;
    其中,所述重复顶点信息中包括重复顶点的索引和第一顶点与重复顶点的纹理坐标索引。Wherein, the repeated vertex information includes the index of the repeated vertex and the texture coordinate index of the first vertex and the repeated vertex.
  3. 根据权利要求1所述的方法,其中,所述编码端根据所述重复顶点信息,进行所述目标三维网格的第一连接关系的重排序,获取重排序后的第二连接关系,包括:The method according to claim 1, wherein the encoding end reorders the first connection relationships of the target three-dimensional mesh according to the repeated vertex information, and obtains the reordered second connection relationship, including:
    所述编码端根据重复顶点的索引对所述目标三维网格的顶点纹理坐标进行重排,获取重排序之后的纹理坐标信息;The encoding end rearranges the vertex texture coordinates of the target three-dimensional grid according to the index of the repeated vertex, and obtains the reordered texture coordinate information;
    所述编码端根据重排序之后的纹理坐标信息和所述重复顶点信息,对所述目标三维网格的第一连接关系进行调整,获取重排序之后的第二连接关系。The encoding end adjusts the first connection relationship of the target three-dimensional mesh according to the reordered texture coordinate information and the repeated vertex information, and obtains the second connection relationship after the reordering.
  4. 根据权利要求3所述的方法,其中,所述编码端根据重复顶点的索引对所述目标三维网格的顶点纹理坐标进行重排,获取重排序之后的纹理坐标信息,包括:The method according to claim 3, wherein the encoding end rearranges the vertex texture coordinates of the target three-dimensional grid according to the index of the repeated vertex, and obtains the texture coordinate information after the reordering, including:
    所述编码端根据重复顶点在第一几何信息中出现的顺序,将所述重复顶点对应的纹理坐标依次移至所述纹理坐标对应的列表的尾部,形成重排序后的纹理坐标信息。The encoding end sequentially moves the texture coordinates corresponding to the repeated vertices to the end of the list corresponding to the texture coordinates according to the order in which the repeated vertices appear in the first geometric information, to form reordered texture coordinate information.
  5. 根据权利要求3所述的方法,其中,所述编码端根据重排序之后的纹理坐标信息和所述重复顶点信息,对所述目标三维网格的第一连接关系进行调整,获取重排序之后的第二连接关系,包括:The method according to claim 3, wherein the encoding end adjusts the first connection relationship of the target three-dimensional mesh according to the reordered texture coordinate information and the repeated vertex information, and obtains the reordered texture coordinate information. The second connection relationship includes:
    所述编码端对所述目标三维网格的第一连接关系的纹理坐标索引部分按照重排序之后的纹理坐标信息进行修改;The encoding end modifies the texture coordinate index part of the first connection relationship of the target three-dimensional grid according to the texture coordinate information after reordering;
    所述编码端对所述目标三维网格的第一连接关系的几何索引部分进行遍历,根据重复顶点信息将所述目标三维网格的第一连接关系的重复顶点的索引替换为第一顶点的索引,获取重排序之后的第二连接关系。The encoding end traverses the geometric index part of the first connection relationship of the target three-dimensional grid, and replaces the index of the repeated vertex of the first connection relationship of the target three-dimensional grid with the index of the first vertex according to the repeated vertex information. Index to obtain the second connection relationship after reordering.
  6. 根据权利要求1所述的方法,其中,还包括: The method of claim 1, further comprising:
    所述编码端在对所述第二连接关系编码的过程中,对于每一个三角面片的三个顶点,根据重复顶点信息,查询是否存在重复顶点;In the process of encoding the second connection relationship, the encoding end queries the three vertices of each triangular patch to see whether there are repeated vertices based on the repeated vertex information;
    所述编码端在存在重复顶点的情况下,对所述重复顶点进行标识;When a duplicate vertex exists, the encoding end identifies the duplicate vertex;
    所述编码端在完成第二连接关系的编码后,根据重复顶点的标识进行编码,获取重复顶点标识码流。After completing the encoding of the second connection relationship, the encoding end performs encoding according to the identifier of the repeated vertex, and obtains the code stream of the repeated vertex identifier.
  7. 根据权利要求1所述的方法,其中,在所述编码端对编码后的目标三维网格的几何信息进行解码重建,获取重建后的第一几何信息之后,还包括:The method according to claim 1, wherein, at the encoding end, the geometric information of the encoded target three-dimensional grid is decoded and reconstructed, and after the reconstructed first geometric information is obtained, the method further includes:
    所述编码端根据重建的第一几何信息来调整部分纹理坐标的取值和排列顺序。The encoding end adjusts the values and arrangement order of some texture coordinates according to the reconstructed first geometric information.
  8. 根据权利要求3所述的方法,其中,还包括:The method of claim 3, further comprising:
    所述编码端按照重复顶点在重排序之后的纹理坐标信息中的顺序恢复第二几何信息与所述第二连接关系中的重复顶点,所述第二几何信息为不包括重复顶点的网格几何信息;The encoding end restores the second geometric information and the repeated vertices in the second connection relationship according to the order of the repeated vertices in the reordered texture coordinate information, and the second geometric information is a mesh geometry that does not include repeated vertices. information;
    所述编码端对恢复重复顶点的第二连接关系进行遍历,记录遍历顺序;The encoding end traverses the second connection relationship of the restored repeated vertices and records the traversal order;
    所述编码端根据所述遍历顺序,对顶点的纹理坐标进行编码。The encoding end encodes the texture coordinates of the vertices according to the traversal order.
  9. 根据权利要求1所述的方法,其中,在所述编码端根据所述重复顶点信息,进行所述目标三维网格的第一连接关系的重排序,获取重排序后的第二连接关系之前,还包括:The method according to claim 1, wherein before the encoding end reorders the first connection relationships of the target three-dimensional mesh according to the repeated vertex information and obtains the reordered second connection relationship, Also includes:
    所述编码端根据所述重建后的第一几何信息,对所述目标三维网格的第一连接关系存在变化的部分进行调整。The encoding end adjusts the changed portion of the first connection relationship of the target three-dimensional grid according to the reconstructed first geometric information.
  10. 一种解码方法,包括:A decoding method including:
    解码端根据获取的目标三维网格对应的码流,解码重建第一几何信息;The decoding end decodes and reconstructs the first geometric information according to the obtained code stream corresponding to the target three-dimensional grid;
    所述解码端对所述第一几何信息进行重复顶点筛选,获取重复顶点信息,所述重复顶点为位置坐标相同的多个顶点中除第一顶点以外的顶点,所述第一顶点为位置坐标相同的多个顶点中的其中一个顶点;The decoding end performs repeated vertex screening on the first geometric information to obtain repeated vertex information. The repeated vertices are vertices other than the first vertex among multiple vertices with the same position coordinates, and the first vertex is the position coordinate. One of the same vertices;
    所述解码端根据所述重复顶点信息,对所述目标三维网格的连接关系码流进行解码。The decoding end decodes the connection relationship code stream of the target three-dimensional grid according to the repeated vertex information.
  11. 根据权利要求10所述的方法,其中,所述重复顶点信息的获取方式,包括:The method according to claim 10, wherein the method of obtaining repeated vertex information includes:
    所述解码端获取所述第一几何信息中的重复顶点,记录下重复顶点的索引形成重复顶点信息;The decoding end obtains the repeated vertices in the first geometric information, and records the index of the repeated vertices to form repeated vertex information;
    其中,所述重复顶点信息中包括重复顶点的索引和第一顶点与重复顶点的纹理坐标索引。Wherein, the repeated vertex information includes the index of the repeated vertex and the texture coordinate index of the first vertex and the repeated vertex.
  12. 根据权利要求10所述的方法,其中,还包括:The method of claim 10, further comprising:
    所述解码端在解码连接关系码流的过程中,对于每一个三角面片,根据重复顶点信息,查询是否存在重复顶点;During the process of decoding the connection relationship code stream, the decoding end queries whether there are duplicate vertices for each triangle patch based on the duplicate vertex information;
    所述解码端在存在重复顶点的情况下,从重复标识码流中解码重复顶点的索引。When a duplicate vertex exists, the decoding end decodes the index of the duplicate vertex from the duplicate identification code stream.
  13. 根据权利要求10所述的方法,其中,还包括:The method of claim 10, further comprising:
    所述解码端根据重复顶点的索引对第二几何信息以及解码得到的连接关系进行重复顶点的恢复,所述第二几何信息为不包括重复顶点的网格几何信息; The decoding end restores the repeated vertices according to the second geometric information and the decoded connection relationship according to the index of the repeated vertex, where the second geometric information is mesh geometry information excluding repeated vertices;
    所述解码端对恢复重复顶点的连接关系进行遍历,记录遍历顺序;The decoding end traverses the connection relationship of the restored repeated vertices and records the traversal order;
    所述解码端根据所述遍历顺序,对顶点的纹理坐标码流进行解码。The decoding end decodes the texture coordinate code stream of the vertex according to the traversal order.
  14. 一种编码装置,包括:An encoding device comprising:
    第一获取模块,用于对编码后的目标三维网格的几何信息进行解码重建,获取重建后的第一几何信息;The first acquisition module is used to decode and reconstruct the geometric information of the encoded target three-dimensional grid, and obtain the reconstructed first geometric information;
    第二获取模块,用于对所述第一几何信息进行重复顶点筛选,获取重复顶点信息,所述重复顶点为位置坐标相同的多个顶点中除第一顶点以外的顶点,所述第一顶点为位置坐标相同的多个顶点中的其中一个顶点;The second acquisition module is used to filter the repeated vertices of the first geometric information and obtain the repeated vertex information. The repeated vertices are vertices other than the first vertex among multiple vertices with the same position coordinates. The first vertex Is one of the vertices among multiple vertices with the same position coordinates;
    第三获取模块,用于根据所述重复顶点信息,进行所述目标三维网格的第一连接关系的重排序,获取重排序后的第二连接关系;A third acquisition module, configured to reorder the first connection relationships of the target three-dimensional mesh according to the repeated vertex information, and obtain the reordered second connection relationships;
    第一编码模块,用于对所述第二连接关系进行编码。The first encoding module is used to encode the second connection relationship.
  15. 根据权利要求14所述的装置,其中,所述重复顶点信息的获取方式,包括:The device according to claim 14, wherein the method of obtaining repeated vertex information includes:
    获取所述第一几何信息中的重复顶点,记录下重复顶点的索引形成重复顶点信息;Obtain the repeated vertex in the first geometric information, record the index of the repeated vertex to form the repeated vertex information;
    其中,所述重复顶点信息中包括重复顶点的索引和第一顶点与重复顶点的纹理坐标索引。Wherein, the repeated vertex information includes the index of the repeated vertex and the texture coordinate index of the first vertex and the repeated vertex.
  16. 根据权利要求14所述的装置,其中,所述第三获取模块,包括:The device according to claim 14, wherein the third acquisition module includes:
    第一获取单元,用于根据重复顶点的索引对所述目标三维网格的顶点纹理坐标进行重排,获取重排序之后的纹理坐标信息;The first acquisition unit is used to rearrange the vertex texture coordinates of the target three-dimensional grid according to the index of the repeated vertex, and acquire the texture coordinate information after the reordering;
    第二获取单元,用于根据重排序之后的纹理坐标信息和所述重复顶点信息,对所述目标三维网格的第一连接关系进行调整,获取重排序之后的第二连接关系。The second acquisition unit is configured to adjust the first connection relationship of the target three-dimensional mesh according to the reordered texture coordinate information and the repeated vertex information, and obtain the second connection relationship after the reordering.
  17. 根据权利要求16所述的装置,其中,所述第一获取单元,用于:The device according to claim 16, wherein the first acquisition unit is used for:
    根据重复顶点在第一几何信息中出现的顺序,将所述重复顶点对应的纹理坐标依次移至所述纹理坐标对应的列表的尾部,形成重排序后的纹理坐标信息。According to the order in which the repeated vertices appear in the first geometric information, the texture coordinates corresponding to the repeated vertices are sequentially moved to the end of the list corresponding to the texture coordinates to form reordered texture coordinate information.
  18. 根据权利要求16所述的装置,其中,所述第二获取单元,用于:The device according to claim 16, wherein the second acquisition unit is used for:
    对所述目标三维网格的第一连接关系的纹理坐标索引部分按照重排序之后的纹理坐标信息进行修改;Modify the texture coordinate index part of the first connection relationship of the target three-dimensional grid according to the texture coordinate information after reordering;
    对所述目标三维网格的第一连接关系的几何索引部分进行遍历,根据重复顶点信息将所述目标三维网格的第一连接关系的重复顶点的索引替换为第一顶点的索引,获取重排序之后的第二连接关系。Traverse the geometric index part of the first connection relationship of the target three-dimensional grid, replace the index of the repeated vertex of the first connection relationship of the target three-dimensional grid with the index of the first vertex according to the repeated vertex information, and obtain the repeated vertex index. The second connection relationship after sorting.
  19. 根据权利要求14所述的装置,其中,还包括:The device of claim 14, further comprising:
    第一查询模块,用于在对所述第二连接关系编码的过程中,对于每一个三角面片的三个顶点,根据重复顶点信息,查询是否存在重复顶点;A first query module, configured to query whether there are duplicate vertices based on the duplicate vertex information for the three vertices of each triangular patch during the process of encoding the second connection relationship;
    标识模块,用于在存在重复顶点的情况下,对所述重复顶点进行标识;An identification module, used to identify duplicate vertices when they exist;
    第四获取模块,用于在完成第二连接关系的编码后,根据重复顶点的标识进行编码,获取重复顶点标识码流。 The fourth acquisition module is used to perform encoding according to the identifier of the repeated vertex after completing the encoding of the second connection relationship, and obtain the code stream of the repeated vertex identifier.
  20. 根据权利要求14所述的装置,其中,在所述第一获取模块对编码后的目标三维网格的几何信息进行解码重建,获取重建后的第一几何信息之后,还包括:The device according to claim 14, wherein after the first acquisition module decodes and reconstructs the geometric information of the encoded target three-dimensional grid and obtains the reconstructed first geometric information, it further includes:
    调整模块,用于根据重建的第一几何信息来调整部分纹理坐标的取值和排列顺序。An adjustment module, configured to adjust the values and arrangement order of some texture coordinates according to the reconstructed first geometric information.
  21. 根据权利要求16所述的装置,其中,还包括:The device of claim 16, further comprising:
    第一恢复模块,用于按照重复顶点在重排序之后的纹理坐标信息中的顺序恢复第二几何信息与所述第二连接关系中的重复顶点,所述第二几何信息为不包括重复顶点的网格几何信息;A first recovery module, configured to restore the second geometric information and the repeated vertices in the second connection relationship according to the order of the repeated vertices in the reordered texture coordinate information, where the second geometric information does not include repeated vertices. Mesh geometry information;
    第一记录模块,用于对恢复重复顶点的第二连接关系进行遍历,记录遍历顺序;The first recording module is used to traverse the second connection relationship to restore repeated vertices and record the traversal order;
    第二编码模块,用于根据所述遍历顺序,对顶点的纹理坐标进行编码。The second encoding module is used to encode the texture coordinates of the vertices according to the traversal order.
  22. 根据权利要求14所述的装置,其中,在所述第三获取模块根据所述重复顶点信息,进行所述目标三维网格的第一连接关系的重排序,获取重排序后的第二连接关系之前,还包括:The device according to claim 14, wherein the third acquisition module reorders the first connection relationships of the target three-dimensional mesh according to the repeated vertex information, and obtains the reordered second connection relationships. Previously, this also included:
    调整模块,用于根据所述重建后的第一几何信息,对所述目标三维网格的第一连接关系存在变化的部分进行调整。An adjustment module, configured to adjust the portion where the first connection relationship of the target three-dimensional grid changes according to the reconstructed first geometric information.
  23. 一种编码设备,包括处理器和存储器,所述存储器存储可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如权利要求1至9任一项所述的编码方法的步骤。A coding device, including a processor and a memory, the memory stores a program or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the implementation of any one of claims 1 to 9 is achieved. The steps of the encoding method.
  24. 一种解码装置,包括:A decoding device including:
    重建模块,用于根据获取的目标三维网格对应的码流,解码重建第一几何信息;The reconstruction module is used to decode and reconstruct the first geometric information according to the obtained code stream corresponding to the target three-dimensional grid;
    第五获取模块,用于对所述第一几何信息进行重复顶点筛选,获取重复顶点信息,所述重复顶点为位置坐标相同的多个顶点中除第一顶点以外的顶点,所述第一顶点为位置坐标相同的多个顶点中的其中一个顶点;The fifth acquisition module is used to perform repeated vertex screening on the first geometric information and obtain repeated vertex information. The repeated vertices are vertices other than the first vertex among multiple vertices with the same position coordinates. The first vertex Is one of the vertices among multiple vertices with the same position coordinates;
    第一解码模块,用于根据所述重复顶点信息,对所述目标三维网格的连接关系码流进行解码。The first decoding module is used to decode the connection relationship code stream of the target three-dimensional grid according to the repeated vertex information.
  25. 一种解码设备,包括处理器和存储器,所述存储器存储可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如权利要求10至13任一项所述的解码方法的步骤。A decoding device, including a processor and a memory, the memory stores a program or instructions that can be run on the processor, and when the program or instructions are executed by the processor, any one of claims 10 to 13 is implemented. The steps of the decoding method.
  26. 一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如权利要求1至9任一项所述的编码方法的步骤或如权利要求10至13任一项所述的解码方法的步骤。 A readable storage medium on which programs or instructions are stored. When the programs or instructions are executed by a processor, the steps of the encoding method as claimed in any one of claims 1 to 9 are implemented or as claimed in the claims. The steps of the decoding method described in any one of 10 to 13.
PCT/CN2023/086202 2022-04-08 2023-04-04 Coding method and apparatus, decoding method and apparatus, and device WO2023193709A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210370125.8A CN116934880A (en) 2022-04-08 2022-04-08 Encoding and decoding methods, devices and equipment
CN202210370125.8 2022-04-08

Publications (1)

Publication Number Publication Date
WO2023193709A1 true WO2023193709A1 (en) 2023-10-12

Family

ID=88244060

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/086202 WO2023193709A1 (en) 2022-04-08 2023-04-04 Coding method and apparatus, decoding method and apparatus, and device

Country Status (2)

Country Link
CN (1) CN116934880A (en)
WO (1) WO2023193709A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101447084A (en) * 2008-12-19 2009-06-03 北京师范大学 Compressing encode/decode method for three-dimensional model texture based on Quardtree
CN104243958A (en) * 2014-09-29 2014-12-24 联想(北京)有限公司 Coding method, decoding method, coding device and decoding device for three-dimensional grid data
GB201612934D0 (en) * 2016-07-26 2016-09-07 Canon Kk Mesh partitioning and merging methods
US20180253867A1 (en) * 2017-03-06 2018-09-06 Canon Kabushiki Kaisha Encoding and decoding of texture mapping data in textured 3d mesh models
US20190197739A1 (en) * 2017-12-22 2019-06-27 Samsung Electronics Co., Ltd. Handling duplicate points in point cloud compression
US20210090301A1 (en) * 2019-09-24 2021-03-25 Apple Inc. Three-Dimensional Mesh Compression Using a Video Encoder

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101447084A (en) * 2008-12-19 2009-06-03 北京师范大学 Compressing encode/decode method for three-dimensional model texture based on Quardtree
CN104243958A (en) * 2014-09-29 2014-12-24 联想(北京)有限公司 Coding method, decoding method, coding device and decoding device for three-dimensional grid data
GB201612934D0 (en) * 2016-07-26 2016-09-07 Canon Kk Mesh partitioning and merging methods
US20180253867A1 (en) * 2017-03-06 2018-09-06 Canon Kabushiki Kaisha Encoding and decoding of texture mapping data in textured 3d mesh models
US20190197739A1 (en) * 2017-12-22 2019-06-27 Samsung Electronics Co., Ltd. Handling duplicate points in point cloud compression
US20210090301A1 (en) * 2019-09-24 2021-03-25 Apple Inc. Three-Dimensional Mesh Compression Using a Video Encoder

Also Published As

Publication number Publication date
CN116934880A (en) 2023-10-24

Similar Documents

Publication Publication Date Title
Golla et al. Real-time point cloud compression
WO2021000658A1 (en) Point cloud encoding and decoding method, encoder, decoder, and computer storage medium
Huang et al. Octree-Based Progressive Geometry Coding of Point Clouds.
CN113615181A (en) Implicit quadtree or binary tree geometry segmentation for point cloud coding
KR102499355B1 (en) A shape-adaptive model-based codec for lossy and lossless image compression
WO2020072665A1 (en) Hierarchical tree attribute coding in point cloud coding
WO2011044713A1 (en) Method and apparatus for encoding a mesh model, encoded mesh model, and method and apparatus for decoding a mesh model
WO2013067674A1 (en) Predictive position encoding
KR20140089426A (en) Predictive position decoding
WO2022121649A1 (en) Point cloud data encoding and decoding method, point cloud data processing method and apparatus, electronic device, computer program product, and computer readable storage medium
CN113632142A (en) Method and device for point cloud compression
US20220180567A1 (en) Method and apparatus for point cloud coding
Bhatia et al. AMM: Adaptive multilinear meshes
WO2023193709A1 (en) Coding method and apparatus, decoding method and apparatus, and device
WO2021062771A1 (en) Color component prediction method, encoder, decoder, and computer storage medium
Wei et al. Enhanced intra prediction scheme in point cloud attribute compression
WO2023155778A1 (en) Encoding method and apparatus, and device
WO2023179705A1 (en) Encoding and decoding methods and apparatuses, and devices
WO2023155794A1 (en) Coding method, decoding method, apparatus, and device
WO2023174337A1 (en) Coding method, decoding method, apparatus and device
WO2023179706A1 (en) Encoding method, decoding method, and terminal
WO2023197990A1 (en) Coding method, decoding method and terminal
WO2023231872A1 (en) Coding method and apparatus, decoding method and apparatus, and device
WO2023179710A1 (en) Coding method and terminal
US11611775B2 (en) Method and apparatus for point cloud coding

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: 23784272

Country of ref document: EP

Kind code of ref document: A1