WO2024001953A1 - 无损编码方法、无损解码方法、装置及设备 - Google Patents

无损编码方法、无损解码方法、装置及设备 Download PDF

Info

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

Links

Classifications

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

Definitions

  • This application belongs to the field of coding and decoding technology, and specifically relates to a lossless encoding method, lossless decoding method, device and equipment.
  • Three-dimensional mesh can be considered the most popular representation method of three-dimensional models in the past many years, and it plays an important role in many applications. Its expression is simple, so it is widely integrated into the graphics processing units of computers, tablets and smartphones with hardware algorithms, specifically used to render three-dimensional meshes.
  • Embodiments of the present application provide a lossless encoding method, lossless decoding method, device and equipment, which can solve the problem in the existing solution that each repeated point is encoded multiple times, thereby reducing the encoding efficiency.
  • the first aspect provides a lossless coding method, including:
  • the encoding end traverses the target grid and obtains the geometric coordinates of each vertex in the target grid;
  • the encoding end determines vertices with the same geometric coordinates as repeated vertices
  • the encoding end merges the repeated vertices in the target grid to obtain the first grid
  • the encoding end performs lossless encoding on the first grid to generate a target code stream.
  • the second aspect provides a lossless decoding method, including:
  • the decoding end performs lossless decoding on the target code stream to obtain the first grid
  • the decoding end restores the repeated vertices in the first grid to obtain the target grid
  • the repeated vertices are vertices with the same corresponding geometric coordinates in the target grid.
  • a lossless encoding device including:
  • An acquisition module used to traverse the target grid and obtain the geometric coordinates of each vertex in the target grid
  • Determination module used to determine vertices with the same geometric coordinates as repeated vertices
  • a merging module used to merge the repeated vertices in the target mesh to obtain the first mesh
  • An encoding module used to perform lossless encoding on the first grid and generate a target code stream.
  • a lossless decoding device including:
  • the decoding module is used to perform lossless decoding of the target code stream to obtain the first grid
  • a recovery module used to recover repeated vertices in the first grid to obtain the target grid
  • the repeated vertices are vertices with the same corresponding geometric coordinates in the target grid.
  • a terminal in a fifth aspect, includes a processor and a memory.
  • the memory stores programs or instructions that can be run on the processor.
  • the program or instructions are executed by the processor, the following implementations are implemented: The steps of the method described in one aspect, or the steps of implementing the method described in the second aspect.
  • a readable storage medium is provided. Programs or instructions are stored on the readable storage medium. When the programs or instructions are executed by a processor, the steps of the method described in the first aspect are implemented, or the steps of the method are implemented as described in the first aspect. The steps of the method described in the second aspect.
  • a chip in a seventh aspect, includes a processor and a communication interface.
  • the communication interface is coupled to the processor.
  • the processor is used to run programs or instructions to implement the method described in the first aspect. , or implement the method described in the second aspect.
  • a computer program/program product is provided, the computer program/program product is stored in a storage medium, and the computer program/program product is executed by at least one processor to implement the method described in the first aspect The steps of a method, or steps of implementing a method as described in the second aspect.
  • a system in a ninth aspect, includes an encoding end and a decoding end.
  • the encoding end performs the steps of the method described in the first aspect.
  • the decoding end performs the steps of the method described in the second aspect. step.
  • the target grid is traversed to obtain the geometric coordinates of each vertex in the target grid; vertices with the same geometric coordinates are determined as repeated vertices; the repeated vertices in the target grid are merged to obtain the first grid , and then in the subsequent lossless coding process of the first grid, each repeated vertex will not be coded multiple times, thus improving the coding efficiency.
  • Figure 1 is a schematic flow chart of a lossless encoding method in an embodiment of the present application
  • Figure 2 is a schematic diagram of the manifold grid in the embodiment of the present application.
  • Figure 3 is a schematic diagram of CornerTable in the embodiment of the present application.
  • Figure 4 is a schematic diagram of the five operating modes defined in EB in the embodiment of the present application.
  • Figure 5 is a schematic diagram of the prediction of the geometric coordinate parallelogram in the embodiment of the present application.
  • Figure 6 is a schematic diagram of prediction of similar triangles with texture coordinates in the embodiment of the present application.
  • Figure 7 is a schematic flow chart of the lossless decoding method in the embodiment of the present application.
  • Figure 8 is a structural diagram of a lossless encoding device provided by an embodiment of the present application.
  • Figure 9 is a structural diagram of a lossless decoding device provided by an embodiment of the present application.
  • Figure 10 is a structural diagram of a communication device provided by an embodiment of the present application.
  • Figure 11 is a schematic diagram of the hardware structure of a terminal provided by an embodiment of the present application.
  • first, second, etc. in the description and claims of this application are used to distinguish similar objects and are not used to describe a specific order or sequence. It is to be understood that the terms so used are interchangeable under appropriate circumstances so that the embodiments of the present application can be practiced in sequences other than those illustrated or described herein, and that "first" and “second” are distinguished objects It is usually one type, and the number of objects is not limited.
  • the first object can be one or multiple.
  • “and/or” in the description and claims indicates at least one of the connected objects, and the character “/" generally indicates that the related objects are in an "or” relationship.
  • 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
  • FIG. 1 is a flow chart of a lossless encoding method in an embodiment of the present application.
  • the lossless coding method provided in this embodiment includes the following steps:
  • the above target mesh is a three-dimensional mesh including repeated vertices.
  • the target grid is first traversed, and the corresponding relationship between each geometric vertex index in the target grid and the geometric coordinates of the geometric vertex is established.
  • the vertices corresponding to these geometric vertex indices are repeated vertices.
  • the above repeated vertices are merged into one vertex to obtain the first mesh.
  • the process of repeating the merging of vertices refers to merging multiple vertices with the same corresponding geometric coordinates into one vertex.
  • the process of repeating the merging of vertices refers to merging multiple vertices with the same corresponding geometric coordinates into one vertex.
  • An optional implementation method is to merge some of the repeated vertices in the target mesh to obtain the first mesh; another optional implementation method is to merge all the repeated vertices in the target mesh to obtain the first mesh without duplicates.
  • the first mesh of vertices is to merge some of the repeated vertices in the target mesh to obtain the first mesh; another optional implementation method is to merge all the repeated vertices in the target mesh to obtain the first mesh without duplicates. The first mesh of vertices.
  • S104 Perform lossless encoding on the first grid to generate a target code stream.
  • different lossless encoding methods are selected to perform lossless encoding on the first mesh according to whether the first mesh is a three-dimensional network including a non-manifold structure, and a target code stream is generated.
  • the target grid is traversed to obtain the geometric coordinates of each vertex in the target grid; vertices with the same geometric coordinates are determined as repeated vertices; the first grid is obtained, ensuring that the first grid does not include repeated vertices, Furthermore, in the subsequent lossless encoding process of the first mesh, each repeated vertex will not be encoded multiple times, thereby improving the encoding efficiency.
  • merging the repeated vertices in the target mesh to obtain the first mesh includes:
  • the repeated vertices with the same geometric coordinates in the target grid are merged into one vertex without changing the texture of the repeated vertices. coordinates to obtain the first grid.
  • the repeated vertices with the same geometric coordinates in the target grid are merged into one vertex without changing the coordinates of the repeated vertices. Texture coordinates, which preserve the texture coordinates of duplicate vertices. Further, at the decoding end, the repeated vertices are restored based on the retained texture coordinates of the repeated vertices.
  • merging the repeated vertices in the target mesh to obtain the first mesh includes:
  • the first identifier corresponding to each vertex in the first grid is encoded to generate an identifier code stream, and the first identifier is used to represent the number of repetitions of the corresponding vertex.
  • a first identifier is assigned to each vertex according to the number of repetitions of each vertex, and the first identifier corresponding to each vertex is encoded to generate an identification code stream.
  • performing lossless encoding on the first grid to generate a target code stream includes:
  • the first grid is a three-dimensional network including a non-manifold structure, splitting the first grid into a second grid;
  • the target code stream is generated according to the first code stream and the second code stream.
  • the above-mentioned first grid is a three-dimensional network including a non-manifold structure
  • the second grid is a three-dimensional grid including a manifold structure.
  • the process of splitting the first grid into the second grid can be divided into two parts, splitting non-manifold edges and splitting non-manifold points.
  • the first step in splitting non-manifold edges is to find the non-manifold edges.
  • one edge of the non-manifold edge exists in at least three triangles at the same time.
  • An optional implementation manner is, Establish a data structure, such as a mapping table or hash table, use this data structure to store the triangles where each edge in the first grid is located, and determine the non-manifold edges by querying the number of triangles where each edge is located.
  • Another optional implementation is to establish a correspondence between each edge and a diagonal corner by constructing a CornerTable, and determine the edges corresponding to at least three diagonal corners as non-manifold edges.
  • the second step in splitting non-manifold edges is to add new vertices and modify the corresponding connection relationships of the first mesh.
  • the first step in splitting non-manifold points is to find the non-manifold points.
  • the second step in splitting non-manifold points is to split the non-manifold points.
  • the grid information corresponding to the second grid is encoded to obtain the first code stream, where the grid information includes but is not limited to connection relationships, geometric information and attribute information. Encode the vertex information of the first vertex to obtain the second code stream.
  • the above-mentioned first vertex is a newly added vertex of the second grid relative to the first grid, where the first vertex includes a newly added vertex after dividing the geometric coordinates of each vertex of the first grid, and a new vertex of the first grid.
  • the texture coordinates of each vertex are divided into new vertices.
  • the first code stream and the second code stream are mixed to generate a target code stream.
  • the splitting the first grid into a second grid includes:
  • the non-manifold structure represented by the second identifier in the first grid is split to obtain the second grid.
  • a second identifier is assigned to the non-manifold structure produced by merging the repeated vertices. It should be understood that the second identifier is used to represent non-manifold points or non-manifold edges. In the process of splitting the first grid into the second grid, the non-manifold structure represented by the second identifier is split to obtain the second grid.
  • encoding the vertex information of the first vertex and obtaining the second code stream corresponding to the vertex information of the first vertex includes:
  • the target identifier is used to indicate that the first grid includes a non-manifold structure.
  • a target identifier is generated.
  • an identifier that is associated with whether the first mesh includes a non-manifold structure.
  • the identifier is set. If set to 1, the above identifier can be understood as the target identifier. In the case where the first mesh only contains manifold structures, that is, the number of first vertices is equal to 0, set this flag to 0.
  • the vertex information of the first vertex includes the corresponding index of the first vertex in the first grid.
  • a preset threshold is set. When the number of first vertices is less than or equal to the preset threshold, which means that the number of first vertices is small, entropy coding can be performed on the index corresponding to the first vertex, Obtain the first sub-code stream, thereby reducing the code rate of the first sub-code stream. Further, the above target identifier and the first sub-code stream are combined to generate a second code stream.
  • encoding the vertex information of the first vertex and obtaining the second code stream corresponding to the vertex information of the first vertex includes:
  • the target identifier is used to indicate that the first grid includes a non-manifold structure.
  • a target identifier is generated.
  • the vertex information of the first vertex may also be a flag bit corresponding to each vertex, and the flag bit is used to indicate whether the corresponding vertex is the first vertex. For example, if a vertex is the first vertex newly added due to splitting the first grid, the flag corresponding to the vertex is 1; if a vertex is not the first new vertex added due to splitting the first grid. vertex, the flag corresponding to the vertex is 0.
  • a preset threshold is set. When the number of first vertices is greater than the preset threshold, it means that the number of first vertices is greater, and the flag bit corresponding to each vertex is processed. Entropy coding is performed to obtain the second sub-stream. Further, the above target identifier and the second sub-code stream are combined to generate a second code stream.
  • the second code stream can be stored in the target code stream in various ways.
  • An optional implementation manner is to use the second code stream as a separate sub-code stream.
  • Another optional implementation method is to store the code stream corresponding to the newly added attribute vertex into the sub-code stream corresponding to the attribute information, and store the code stream corresponding to the newly added geometric vertex into the sub-code stream corresponding to the geometry information. in the code stream.
  • Another optional implementation is to use the code stream corresponding to the newly added attribute vertex and the code stream corresponding to the newly added geometric vertex as two separate sub-code streams.
  • encoding the grid information corresponding to the second grid and obtaining the first code stream corresponding to the grid information includes:
  • the attribute information corresponding to the second grid is encoded to generate the fifth sub-stream.
  • the grid information includes connection relationships, geometric information and attribute information.
  • the first code stream in this embodiment includes the third sub-code stream corresponding to the connection relationship, the fourth sub-code stream corresponding to the geometric information and the corresponding attribute information.
  • the fifth sub-stream includes the third sub-code stream corresponding to the connection relationship, the fourth sub-code stream corresponding to the geometric information and the corresponding attribute information.
  • connection relationship corresponding to the second grid is encoded to generate the third sub-code stream; the geometric information corresponding to the second grid is geometrically coded to generate the fourth sub-code stream; the corresponding The attribute information is attribute encoded to generate the fifth sub-code stream.
  • encoding the connection relationship corresponding to the second grid and generating the third sub-code stream includes:
  • Entropy encoding is performed on the target character string to generate the third sub-code stream.
  • a compression coding technology may be used to encode the connection relationship of the second grid, wherein the compression coding technology may be an Edgebreaker (EB) algorithm.
  • EB Edgebreaker
  • the specific implementation method is: number each corner of each triangle patch in the second grid in counterclockwise order to obtain the index of each corner. If the second mesh includes f triangle patches, then the second mesh includes 3f corners.
  • formula 1 can be used to calculate the sequence number of the triangle where the current angle is located.
  • c is the index of the current corner
  • fi is the sequence number of the triangle where the current corner is located.
  • the index of the previous angle of the current angle can be calculated through Formula 2.
  • c is the index of the current angle
  • fi is the serial number of the triangle where the current angle is located
  • c p is the index of the previous angle of the current angle
  • the % symbol represents the modulo operation
  • the index of the next corner of the current corner can be calculated through Formula 3.
  • c is the index of the current angle
  • fi is the serial number of the triangle where the current angle is located
  • c p is the index of the next angle after the current angle
  • the % symbol represents the modulo operation
  • the CornerTable includes a V table, an O table, a U table, and an M table.
  • the V table stores the index of the vertex corresponding to each corner
  • the O table stores the index of the diagonal corner corresponding to each corner
  • the U table stores the identification of whether each triangle has been traversed
  • the M table stores each vertex. Identification of whether it has been traversed.
  • c in Figure 3 represents the current corner
  • cp represents the previous corner of current corner c
  • cn represents the next corner of current corner c.
  • co is the opposite angle of the current angle c
  • ct is the serial number of the triangle where c is located, which can be calculated by union one.
  • cv represents the vertex of the current angle, which can be obtained by querying the V table.
  • cl represents the angle to the left of the current angle c, which is obtained by querying the opposite angle of cp in the O table.
  • cr represents the angle to the right of the current angle c, which is obtained by querying the opposite angle of cn in the O table.
  • the currently traversed angle is x. If the vertex v corresponding to x has not been traversed, determine that the current triangle is in C mode, and determine that the next triangle to be traversed is the triangle where r is located. If the vertex v corresponding to x has not been traversed, and the triangle where l is located has been traversed, determine that the current triangle is in L mode, and determine that the next triangle to be traversed is the triangle where r is located. If the vertex v corresponding to x has not been traversed, and the triangle where r is located has been traversed, determine that the current triangle is in R mode, and determine that the next triangle to be traversed is the triangle where l is located.
  • the vertex v corresponding to The triangle where l is located is stored in the stack, and after the triangle where r is located is traversed, the triangle where l is located is traversed again. If the vertex v corresponding to x has been traversed, and the triangle where l is located and the triangle where r is located have both been traversed, it is determined that the mode of the current triangle is E, and the end point of the current traversal path branch is reached at this time.
  • encoding the geometric information corresponding to the second grid and generating the fourth sub-code stream includes:
  • Entropy coding is performed on the geometric prediction residual corresponding to each vertex to generate the fourth sub-code stream.
  • a parallelogram predictive coding algorithm is used to perform geometric coding on the second grid. It should be understood that in other implementations, a difference predictive coding algorithm, a multi-parallelogram predictive coding algorithm, etc. may also be used to perform geometric coding. There are no specific limitations here.
  • the second grid includes four vertices a, b, c, and d. These four vertices form two triangles as shown in Figure 5.
  • d ′ (x, y, z) is the predicted geometric coordinate corresponding to point d
  • a (x, y, z) is the real geometric coordinate corresponding to point a
  • b(x,y,z) is the real geometric coordinate corresponding to point b
  • c(x,y,z) is the real geometric coordinate corresponding to point c.
  • the geometric information of point d is encoded to obtain the true geometric coordinates of point d, and the geometric prediction residual corresponding to point d is calculated through Formula 5.
  • ⁇ d(x,y,z) is the geometric prediction residual corresponding to point d
  • d′(x,y,z) is the predicted geometric coordinate corresponding to point d
  • d(x,y,z) is the predicted geometric coordinate of point d.
  • encoding the attribute information corresponding to the second grid and generating the fifth sub-code stream includes:
  • Entropy encoding is performed on the attribute prediction residual corresponding to each vertex in the second grid to generate the first target sub-code stream; the attribute prediction residual corresponding to each vertex is based on the Carry out attribute prediction coding determination;
  • the texture map of the second grid is encoded to generate the second target sub-stream.
  • the attribute information includes texture coordinates and texture maps
  • the fifth sub-stream includes a first target sub-stream corresponding to the texture coordinates and a second target sub-stream corresponding to the texture map.
  • determining the attribute prediction residual corresponding to each vertex based on performing attribute prediction coding on each vertex in the second grid, determining the attribute prediction residual corresponding to each vertex, performing entropy coding on the attribute prediction residual corresponding to each vertex, and generating the first target sub- code stream.
  • For specific implementation methods on how to generate the first target sub-stream please refer to subsequent embodiments.
  • the texture map of the second grid is encoded to generate the second target sub-stream.
  • the first target sub-stream and the second target sub-stream are mixed to obtain the fifth sub-stream.
  • the attribute information does not include texture maps.
  • the fifth sub-stream can be generated by entropy coding only the attribute prediction residual corresponding to each vertex.
  • encoding the attribute information corresponding to the second grid and generating the first target sub-code stream includes:
  • attribute prediction coding is used to obtain the predicted texture coordinates corresponding to each vertex
  • Entropy coding is performed on the attribute prediction residual corresponding to each vertex to generate the first target sub-code stream.
  • the initial edge set is obtained as follows:
  • an initial triangle is selected, the texture coordinates of the three vertices of the initial triangle are encoded, and the three edges of the initial triangle are stored in the edge set.
  • the vertices are not predicted, but the texture coordinates are directly encoded. After encoding the texture coordinates of each vertex of the initial triangle, each edge of the initial triangle is stored. Set to form an initial set of edges, and then predict subsequent vertices based on this initial set of edges.
  • the residual of the vertex to be encoded can be obtained based on the predicted texture coordinates and the real texture coordinates, and the encoding of the vertex to be encoded is achieved by encoding the residual.
  • the residual can be the difference between the real texture coordinates of the vertex to be encoded and the predicted texture coordinates of the vertex of the target triangle. It can be the real texture coordinates of the vertex to be encoded minus the predicted texture of the vertex of the target triangle.
  • the coordinates can also be obtained by subtracting the predicted texture coordinates of the vertices of the target triangle from the real texture coordinates of the vertices to be encoded.
  • the implementation method of obtaining the predicted texture coordinates of the vertices of the target triangle corresponding to the first side may be:
  • the encoding end obtains the texture coordinates of the projection point of the vertex on the first side based on the geometric coordinates of each vertex of the target triangle;
  • 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.
  • 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:
  • X uv is the texture coordinate of the projection point of the pair of vertices on the first side
  • N uv is the texture coordinate of the vertex N on the first side of the target triangle
  • X of the vertex on the first side is the vector of the geometric coordinates of vertex N and vertex P on the first edge
  • vertex N on the first edge is the vector from vertex N on the first edge to the geometric coordinates of the opposite vertex
  • the encoding end obtains the predicted texture coordinates of the vertex based on the texture coordinates of the projection point;
  • Pred C is the predicted texture coordinate of the vertex, is the first vector value for the vector of the texture coordinates of the vertex and the first side corresponding to the first vertex O, O uv is the texture coordinate of the first vertex corresponding to the first side of the target triangle, and the first vertex O is the first The opposite vertex of the first side of the triangle, the first triangle and the target triangle have a common first side; is the vector from the projection point X of the vertex on the first edge to the texture coordinates of the vertex; It is the second type of vector value for the vector of the texture coordinates of the vertex 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 conduct
  • the encoding end stores the second edge in the target triangle into the edge set and deletes the first edge from the edge set. The second edge is not included in the target triangle.
  • the edges in the edge set are used to update the edge set.
  • 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.
  • UV coordinates texture coordinates
  • Step S1 Select an initial triangle from the reconstructed connection relationship, directly encode the UV coordinates of the three vertices of the initial triangle without prediction, and then store the edges of the initial triangle into the edge set.
  • Step S2 Select edge ⁇ from the edge set according to the access criteria, encode the UV coordinates of the vertices of the new triangle formed by ⁇ , and use the projection relationship of the triangle from three dimensions to two dimensions to calculate the predicted UV coordinates of the point to be encoded according to the above method. , subtract the predicted UV coordinate from the original value of the UV coordinate of the point to be encoded (that is, the real UV coordinate) to obtain the residual.
  • Step S3 Add the two edges of the new triangle to the edge set, remove the edge ⁇ at the top of the edge set; then take the next edge from the edge set, continue to encode the predicted UV coordinates of the vertices of the triangle adjacent to the edge, and obtain the residual difference, return to step S3, and execute step S3 in a loop until the residuals of all vertices are obtained.
  • Step S4 Entropy encode the UV coordinate residual and output the UV coordinate code stream.
  • performing lossless encoding on the first grid to generate a target code stream includes:
  • the first grid is a three-dimensional network including a manifold structure, encoding the connection relationship corresponding to the first grid to generate a third code stream;
  • the target code stream is generated according to the third code stream, the fourth code stream and the fifth code stream.
  • the first grid when the first grid is a three-dimensional network including a manifold structure, it means that the first grid does not need to be split. In this case, you can directly encode the connection relationship corresponding to the first grid to generate the third code stream; encode the geometric information corresponding to the first grid to generate the fourth code stream; encode the attribute information corresponding to the first grid to generate The fifth code stream: mix the above-mentioned third code stream, fourth code stream and fifth code stream to generate a target code stream.
  • FIG. 7 is a flow chart of a lossless decoding method in an embodiment of the present application.
  • the lossless decoding method provided in this embodiment includes the following steps:
  • S701 Losslessly decode the target code stream to obtain the first grid.
  • the decoder performs lossless decoding on the target code stream to obtain the first grid.
  • lossless decoding methods please refer to subsequent embodiments.
  • the above repeated vertices are vertices with the same corresponding geometric coordinates in the target mesh. After obtaining the first mesh, the repeated vertices in the first mesh are restored to obtain the target mesh. For the specific implementation of restoring the repeated vertices, please refer to subsequent embodiments.
  • restoring the repeated vertices in the first mesh to obtain the target mesh includes:
  • the texture coordinates of each vertex in the first grid can be obtained.
  • the encoding end traverses the first grid and determines the texture coordinates of the vertices and Correspondence between geometric vertices. If there are geometric vertices corresponding to multiple texture coordinate vertices, the above geometric vertices are determined as target vertices.
  • restoring the repeated vertices in the first mesh to obtain the target mesh includes:
  • the identification code stream is decoded to obtain a first identification corresponding to each vertex in the first grid, where the first identification is used to represent the repetition of the corresponding vertex. frequency. Further, based on the first identifier corresponding to each vertex, duplicate vertices corresponding to the vertex are created to obtain the target mesh.
  • the repeated vertex corresponding to the vertex is not created; if the first identifier corresponding to a vertex is used to represent the number of repetitions of the vertex is 1, then it is created A vertex with the same geometric coordinates as this vertex.
  • the target code stream is losslessly decoded to obtain the first grid including:
  • the decoding end decomposes the target code stream to obtain the sixth code stream and the seventh code stream.
  • the above-mentioned second vertex is obtained based on splitting the first grid into a second grid.
  • the above-mentioned second vertex is a new vertex of the second grid relative to the first grid, wherein the second vertex includes a new vertex of the first grid. Vertices are added after dividing the geometric coordinates of each vertex, and new vertices are added after dividing the texture coordinates of each vertex of the first mesh.
  • grid information includes connection relationships, geometric information and attribute information.
  • connection relationship geometric information and attribute information of the second grid
  • the second grid can be directly reconstructed.
  • decoding the seventh code stream and obtaining the vertex information of the second vertex corresponding to the seventh code stream includes:
  • the sixth sub-code stream is decoded to obtain the vertex information of the second vertex.
  • the seventh code stream includes a target identifier and a sixth sub-code stream.
  • the target identifier is used to represent the first grid as a three-dimensional grid including a non-manifold structure
  • the sixth sub-code stream is decoded to obtain the third Vertex information of two vertices.
  • the target identifier is 1, it indicates that the first grid is a three-dimensional grid including a non-manifold structure. In this case, the sixth sub-code stream is decoded. If the target identifier is 0, it indicates that the first grid is a three-dimensional grid including only a manifold structure, and the sixth sub-stream does not need to be decoded.
  • merging the second vertices in the second grid according to the vertex information of the second vertex to obtain the first grid includes:
  • connection relationship corresponding to the second grid is updated to obtain the first grid.
  • the vertex information of the second vertex is parsed to determine the second vertex, where the second vertex can be understood as a new vertex obtained by splitting the first grid into a second grid. It should be understood that the vertices in the second grid other than the second vertex may be referred to as non-new vertices.
  • mapping table can be obtained based on the decoding results.
  • the mapping table stores the mapping relationship between the geometric coordinates corresponding to each vertex and the index corresponding to each vertex.
  • the mapping table can be a hash table.
  • the current vertex is a newly added second vertex
  • query the geometric coordinates of the second vertex in the mapping table to obtain the target vertex, where the geometric coordinates corresponding to the target vertex are the same as the geometric coordinates corresponding to the second vertex; and the The index corresponding to the second vertex is updated to the index corresponding to the target vertex. If it is found through querying the mapping table that there are multiple vertices with the same geometric coordinates as the second vertex, then one vertex may be randomly determined as the target vertex from the plurality of vertices. In this embodiment, the second vertex is merged by updating the index of the second vertex.
  • the index corresponding to the current vertex will not be updated.
  • the corresponding connection relationship of the second grid is updated, the geometric information list and the texture coordinate list are updated, and the first grid is obtained.
  • decoding the sixth code stream and obtaining grid information corresponding to the sixth code stream includes:
  • grid information includes connection relationships, geometric information and attribute information.
  • the sixth code stream includes a seventh sub-code stream corresponding to the connection relationship, an eighth sub-code stream corresponding to the geometric information, and a ninth sub-code stream corresponding to the attribute information.
  • decoding the seventh sub-stream to obtain the connection relationship corresponding to the second grid includes:
  • the decoding end uses a decoding method corresponding to the way the encoding end encodes the connection relationship to decode the seventh sub-code stream to obtain the target string, which will not be repeated here.
  • decoding the eighth sub-stream to obtain geometric information corresponding to the second grid includes:
  • the real geometric coordinates corresponding to each vertex are obtained.
  • the decoding end decodes the eighth sub-code stream using a decoding method corresponding to the way the encoding end encodes the geometric information, and obtains the geometric information corresponding to the second grid, which will not be repeated here.
  • decoding the ninth sub-stream to obtain attribute information corresponding to the second grid includes:
  • the real texture coordinates corresponding to each vertex are obtained; the attribute prediction residual corresponding to each vertex is based on decoding the third target sub-code flow determined;
  • the attribute information includes texture coordinates and texture maps
  • the ninth sub-stream includes a third target sub-stream corresponding to the texture coordinates and a fourth target sub-stream corresponding to the texture map.
  • the third target sub-stream is decoded to determine the attribute prediction residual corresponding to each vertex, and then based on the attribute prediction residual corresponding to each vertex, the real texture coordinates corresponding to each vertex are obtained.
  • the ninth sub-stream does not include the fourth target sub-stream, that is, the attribute information does not include the texture map.
  • the attribute information does not include the texture map.
  • only the third target sub-stream is decoded to obtain the attribute information corresponding to the second grid.
  • obtaining the real texture coordinates corresponding to each vertex based on the attribute prediction residuals corresponding to each vertex in the second grid includes:
  • the real texture coordinates corresponding to each vertex are obtained.
  • the decoding end uses a decoding method corresponding to the way the encoding end encodes texture information to encode the third
  • the target sub-stream is decoded to obtain the real texture coordinates corresponding to each vertex, which will not be repeated here.
  • the target code stream is losslessly decoded to obtain the first grid including:
  • the decoding end decomposes the target code stream to obtain a sixth code stream, a seventh code stream and an eighth code stream;
  • the decoding end decodes the sixth code stream to obtain the connection relationship corresponding to the first grid
  • the decoding end decodes the seventh code stream to obtain geometric information corresponding to the first grid
  • the decoding end decodes the eighth code stream to obtain attribute information corresponding to the first grid
  • the decoding end generates a first grid based on the connection relationship, the geometric information and the attribute information.
  • the target code stream when the first grid is a three-dimensional network including a manifold structure, can be directly decomposed to obtain the sixth code stream, the seventh code stream and the eighth code stream, and the sixth code stream can be obtained respectively.
  • the code stream, the seventh code stream and the eighth code stream are decoded to obtain the connection relationship, geometric information and attribute information corresponding to the first grid. Based on the above connection relationship, geometric information and attribute information, the first grid is reconstructed and generated.
  • the execution subject may be a lossless encoding device.
  • the lossless encoding device provided by the embodiment of the present application is explained by taking the encoding method performed by the lossless encoding device as an example.
  • this embodiment of the present application also provides a lossless encoding device 800, which includes:
  • the acquisition module 801 is used to traverse the target grid and obtain the geometric coordinates of each vertex in the target grid;
  • Determining module 802 used to determine vertices with the same geometric coordinates as repeated vertices
  • Merge module 803 used to merge the repeated vertices in the target mesh to obtain the first mesh
  • the encoding module 804 is used to perform lossless encoding on the first grid to generate a target code stream.
  • the merging module 803 is specifically used to:
  • the repeated vertices with the same geometric coordinates in the target grid are merged into one vertex without changing the texture of the repeated vertices. coordinates to obtain the first grid.
  • the merging module 803 is also specifically used to:
  • the first identifier corresponding to each vertex in the first grid is encoded to generate an identifier code stream, and the first identifier is used to represent the number of repetitions of the corresponding vertex.
  • the encoding module 804 is specifically used for:
  • the first grid is a three-dimensional network including a non-manifold structure, split the first grid into a second grid;
  • a target code stream is generated according to the first code stream and the second code stream.
  • the encoding module 804 is specifically used for:
  • the non-manifold structure represented by the second identifier in the first grid is split to obtain the second grid.
  • the encoding module 802 is specifically used for:
  • the encoding module 802 is also specifically used for:
  • the encoding module 802 is also specifically used for:
  • the attribute information corresponding to the second grid is encoded to generate the fifth sub-stream.
  • the encoding module 802 is also specifically used for:
  • the first grid is a three-dimensional network including a manifold structure, encoding the connection relationship corresponding to the first grid to generate a third code stream;
  • the encoding end encodes the geometric information corresponding to the first grid to generate a fourth code stream
  • the encoding end encodes the attribute information corresponding to the first grid to generate a fifth code stream
  • the encoding end generates the target code stream according to the third code stream, the fourth code stream and the fifth code stream.
  • the target grid is traversed to obtain the geometric coordinates of each vertex in the target grid; vertices with the same geometric coordinates are determined as repeated vertices; the repeated vertices in the target grid are merged to obtain the first grid , and then in the subsequent lossless coding process of the first grid, each repeated vertex will not be coded multiple times, thus improving the coding efficiency.
  • This device embodiment corresponds to the above-mentioned lossless encoding method embodiment shown in Figure 1.
  • Each implementation process and implementation method on the coding end in the above-mentioned method embodiment can be applied to this device embodiment, and can achieve the same technical effect.
  • the execution subject may be a lossless decoding device.
  • a lossless decoding device performing a lossless decoding method is used as an example to illustrate the lossless decoding device provided by the embodiment of the present application.
  • this embodiment of the present application also provides a lossless decoding device 900, which includes:
  • Decoding module 901 is used to perform lossless decoding on the target code stream to obtain the first grid
  • Restoration module 902 is used to restore repeated vertices in the first mesh to obtain the target mesh.
  • the recovery module 902 is specifically used to:
  • the recovery module 902 is also specifically used to:
  • the decoding module 901 is specifically used for:
  • the decoding module 901 is also specifically used to:
  • the sixth sub-code stream is decoded to obtain the vertex information of the second vertex.
  • the decoding module 901 is specifically used for:
  • connection relationship corresponding to the second grid is updated to obtain the first grid.
  • the third code stream includes a seventh sub-code stream, an eighth sub-code stream and a ninth sub-code stream;
  • the decoding module 901 is also specifically used for:
  • the decoding module 901 is also specifically used to:
  • a first grid is generated.
  • the lossless encoding device and the lossless decoding device in the embodiment of the present application may be electronic equipment, such as an electronic equipment with an operating system, or may be components in the electronic equipment, such as integrated circuits or chips.
  • the electronic device may be a terminal or other devices other than the terminal.
  • terminals may include but are not limited to the types of terminals listed above, and other devices may be servers, network attached storage (Network Attached Storage, NAS), etc., which are not specifically limited in the embodiments of this application.
  • the lossless decoding device provided by the embodiment of the present application can implement each process implemented by the method embodiment in Figure 7 and achieve the same technical effect. To avoid duplication, the details will not be described here.
  • this embodiment of the present application also provides a communication device 1000, including a processor 1001 and memory 1002.
  • the memory 1002 stores programs or instructions that can be run on the processor 1001.
  • the communication device 1000 is a terminal
  • the program or instructions are executed by the processor 1001, the above embodiment of the lossless encoding method is implemented.
  • Each step of the above lossless decoding method embodiment and can achieve the same technical effect, or implement each step of the above lossless decoding method embodiment, and can achieve the same technical effect.
  • An embodiment of the present application also provides a terminal, including a processor 1001 and a communication interface.
  • the processor 1001 is configured to perform the following operations:
  • Vertices with the same geometric coordinates are determined as duplicate vertices
  • processor 1001 is configured to perform the following operations:
  • FIG. 11 is a schematic diagram of the hardware structure of a terminal that implements an embodiment of the present application.
  • the terminal 1100 includes but is not limited to: a radio frequency unit 1101, a network module 1102, an audio output unit 1103, an input unit 1104, a sensor 1105, a display unit 1106, a user input unit 1107, an interface unit 1108, a memory 1109, a processor 1110 and other components. .
  • the terminal 1100 may also include a power supply (such as a battery) that supplies power to various components.
  • the power supply may be logically connected to the processor 1110 through a power management system, thereby managing charging, discharging, and power consumption through the power management system. Management and other functions.
  • the terminal structure shown in FIG. 11 does not constitute a limitation on the terminal.
  • the terminal may include more or fewer components than shown in the figure, or some components may be combined or arranged differently, which will not be described again here.
  • the input unit 1104 may include a graphics processor (Graphics Processing Unit, GPU) 11041 and a microphone 11042.
  • the graphics processor 11041 is responsible for the image capture device (GPU) in the video capture mode or the image capture mode. Process the image data of still pictures or videos obtained by cameras (such as cameras).
  • the display unit 1106 may include a display panel 11061, which may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like.
  • the user input unit 1107 includes at least one of a touch panel 11071 and other input devices 11072 .
  • Touch panel 11071 also called touch screen.
  • the touch panel 11071 may include two parts: a touch detection device and a touch controller.
  • Other input devices 11072 may include but are not limited to physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which will not be described again here.
  • the radio frequency unit 1101 after receiving downlink data from the network side device, the radio frequency unit 1101 can transmit it to the processor 1110 for processing; the radio frequency unit 1101 can send uplink data to the network side device.
  • the radio frequency unit 1101 includes, but is not limited to, an antenna, amplifier, transceiver, coupler, low noise amplifier, duplexer, etc.
  • Memory 1109 may be used to store software programs or instructions as well as various data.
  • the memory 1109 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, Image playback function, etc.) etc.
  • memory 1109 may include volatile memory or nonvolatile memory, or memory 1109 may include both volatile and nonvolatile memory.
  • non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), electrically removable memory.
  • Volatile memory can be random access memory (Random Access Memory, RAM), static random access memory (Static RAM, SRAM), dynamic random access memory (Dynamic RAM, DRAM), synchronous dynamic random access memory (Synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (Double Data Rate SDRAM, DDRSDRAM), enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (Synch link DRAM) , SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DRRAM).
  • RAM Random Access Memory
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • synchronous dynamic random access memory Synchronous DRAM, SDRAM
  • Double data rate synchronous dynamic random access memory Double Data Rate SDRAM, DDRSDRAM
  • Enhanced SDRAM, ESDRAM synchronous link dynamic random access memory
  • Synch link DRAM synchronous link dynamic random access memory
  • SLDRAM direct memory bus random access memory
  • the processor 1110 may include one or more processing units; optionally, the processor 1110 integrates an application processor and a modem processor, where the application processor mainly handles operations related to the operating system, user interface, application programs, etc., Modem processors mainly process wireless communication signals, such as baseband processors. It can be understood that the above modem processor may not be integrated into the processor 1110.
  • the processor 1110 is used to perform the following operations:
  • Vertices with the same geometric coordinates are determined as duplicate vertices
  • processor 1110 is configured to perform the following operations:
  • 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 lossless encoding method embodiment is implemented, or the above lossless encoding method 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.
  • the processor is the processor in the terminal described in the above embodiment.
  • the readable storage medium includes computer readable storage media, such as computer read-only memory ROM, random access memory RAM, magnetic disk or optical disk, etc.
  • An embodiment of the present application further provides a chip.
  • the chip includes a processor and a communication interface.
  • the communication interface is coupled to the processor.
  • the processor is used to run programs or instructions to implement the above lossless encoding method embodiment.
  • 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 lossless encoding method embodiment.
  • Each process, or each process of implementing the above lossless decoding method embodiment can achieve the same technical effect. To avoid duplication, it will not be described again here.
  • An embodiment of the present application further provides a system.
  • the system includes an encoding end and a decoding end.
  • the encoding end performs each process of the above lossless encoding method embodiment.
  • the encoding end performs each process of the above lossless decoding method embodiment. , and can achieve the same technical effect, so 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)
  • Computer Graphics (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Multimedia (AREA)
  • Image Generation (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

一种无损编码方法、无损解码方法、装置及设备,属于编解码技术领域,一种无损编码方法包括:编码端遍历目标网格,获取目标网格中每个顶点的几何坐标;编码端将几何坐标相同的顶点确定为重复顶点;编码端合并目标网格中的重复顶点,得到第一网格;编码端对第一网格进行无损编码,生成目标码流。

Description

无损编码方法、无损解码方法、装置及设备
相关申请的交叉引用
本申请主张在2022年6月30日在中国提交的中国专利申请No.202210772455.X的优先权,其全部内容通过引用包含于此。
技术领域
本申请属于编解码技术领域,具体涉及一种无损编码方法、无损解码方法、装置及设备。
背景技术
三维网格(Mesh)可以被认为是过去多年来最流行的三维模型的表示方法,其在许多应用程序中扮演着重要的角色。它的表示简便,因此被大量以硬件算法集成到电脑、平板电脑和智能手机的图形处理单元中,专门用于渲染三维网格。
相关技术中,在对三维网格进行无损编码时,三维网格中可能存在重复点,这导致在编码过程中对每个重复点编码了多次,进而降低了编码效率。
发明内容
本申请实施例提供一种无损编码方法、无损解码方法、装置及设备,能够解决现有方案中对每个重复点编码了多次,进而降低了编码效率的问题。
第一方面,提供了一种无损编码方法,包括:
编码端遍历目标网格,获取所述目标网格中每个顶点的几何坐标;
所述编码端将几何坐标相同的顶点确定为重复顶点;
所述编码端合并所述目标网格中的所述重复顶点,得到第一网格;
所述编码端对所述第一网格进行无损编码,生成目标码流。
第二方面,提供一种无损解码方法,包括:
解码端对目标码流进行无损解码,得到第一网格;
所述解码端恢复所述第一网格中的重复顶点,得到目标网格;
其中,所述重复顶点为目标网格中对应几何坐标相同的顶点。
第三方面,提供了一种无损编码装置,包括:
获取模块,用于遍历目标网格,获取所述目标网格中每个顶点的几何坐标;
确定模块,用于将几何坐标相同的顶点确定为重复顶点;
合并模块,用于合并所述目标网格中的所述重复顶点,得到第一网格;
编码模块,用于对所述第一网格进行无损编码,生成目标码流。
第四方面,提供了一种无损解码装置,包括:
解码模块,用于对目标码流进行无损解码,得到第一网格;
恢复模块,用于恢复所述第一网格中的重复顶点,得到目标网格;
其中,所述重复顶点为目标网格中对应几何坐标相同的顶点。
第五方面,提供了一种终端,该终端包括处理器和存储器,所述存储器存储可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第一方面所述的方法的步骤,或者实现如第二方面所述的方法的步骤。
第六方面,提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面所述的方法的步骤,或者实现如第二方面所述的方法的步骤。
第七方面,提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面所述的方法,或者实现如第二方面所述的方法。
第八方面,提供了一种计算机程序/程序产品,所述计算机程序/程序产品被存储在存储介质中,所述计算机程序/程序产品被至少一个处理器执行以实现如第一方面所述的方法的步骤,或者实现如第二方面所述的方法的步骤。
第九方面,提供了一种系统,所述系统包括编码端和解码端,所述编码端执行如第一方面所述的方法的步骤,所述解码端执行如第二方面所述的方法的步骤。
本申请实施例中,遍历目标网格,获取目标网格中每个顶点的几何坐标;将几何坐标相同的顶点确定为重复顶点;对目标网格中的重复顶点进行合并,得到第一网格,进而在后续对第一网格进行无损编码的过程中不会对每个重复顶点多次编码,以此提高了编码效率。
附图说明
图1是本申请实施例中无损编码方法的流程示意图;
图2是本申请实施例中流形网格的示意图;
图3是本申请实施例中CornerTable的示意图;
图4是本申请实施例中EB中定义的五种操作模式的示意图;
图5是本申请实施例中几何坐标平行四边形的预测示意图;
图6是本申请实施例中纹理坐标相似三角形的预测示意图;
图7是本申请实施例中无损解码方法的流程示意图;
图8是本申请实施例提供的无损编码装置的结构图;
图9是本申请实施例提供的无损解码装置的结构图;
图10是本申请实施例提供的通信设备的结构图;
图11是本申请实施例提供的终端的硬件结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员所获得的所有其他实施例,都属于本申请保护的范围。
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的术语在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”所区别的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”一般表示前后关联对象是一种“或”的关系。
值得指出的是,本申请实施例所描述的技术不限于长期演进型(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)通信系统。
下面结合附图,通过一些实施例及其应用场景对本申请实施例提供的无损编码方法进行详细地说明。
请参阅图1,图1是本申请实施例中无损编码方法的流程图。本实施例提供的无损编码方法包括以下步骤:
S101,遍历目标网格,获取所述目标网格中每个顶点的几何坐标。
S102,将几何坐标相同的顶点确定为重复顶点。
上述目标网格为包括重复顶点的三维网格。上述步骤中,首先遍历目标网格,建立目标网格中每个几何顶点索引与该几何顶点的几何坐标之间的对应关系,当上述对应关系中存在对应几何坐标相同的几何顶点索引时,表示这些几何顶点索引对应的顶点为重复顶点。
S103,合并所述目标网格中的所述重复顶点,得到第一网格。
本步骤中,在确定目标网格中的重复顶点后,对上述重复顶点合并为一个顶点,得到第一网格。应理解,重复顶点的合并过程是指将对应几何坐标相同的多个顶点合并为一个 顶点。具体的合并目标网格中的重复顶点的实施方式,请参阅后续实施例。
一种可选地实施方式为,可以合并目标网格中的部分重复顶点,得到第一网格;另一种可选地实施方式为,合并目标网格中的所有重复顶点,得到不包括重复顶点的第一网格。
S104,对所述第一网格进行无损编码,生成目标码流。
本步骤中,在得到第一网格后,根据第一网格是否为包括非流形结构的三维网络,选择不同的无损编码方式对第一网格进行无损编码,生成目标码流。
本申请实施例中,遍历目标网格,获取目标网格中每个顶点的几何坐标;将几何坐标相同的顶点确定为重复顶点;得到第一网格,确保第一网格未包括重复顶点,进而在后续对第一网格进行无损编码的过程中不会对每个重复顶点多次编码,以此提高了编码效率。
可选地,所述合并所述目标网格中的所述重复顶点,得到第一网格包括:
在所述目标网格中每个顶点的几何坐标与纹理坐标一一对应的情况下,将所述目标网格中几何坐标相同的重复顶点合并为一个顶点,并不更改所述重复顶点的纹理坐标,得到所述第一网格。
本实施例中,在目标网格中每个顶点的几何坐标与纹理坐标一一对应的情况下,将目标网格中几何坐标相同的重复顶点合并为一个顶点,并不更改所述重复顶点的纹理坐标,即保留重复顶点的纹理坐标。进一步的,在解码端根据保留的重复顶点的纹理坐标,恢复重复顶点。
可选地,所述合并所述目标网格中的所述重复顶点,得到第一网格包括:
将所述目标网格中几何坐标相同的重复顶点合并为一个顶点,得到所述第一网格;
对所述第一网格中每个顶点对应的第一标识进行编码,生成标识码流,所述第一标识用于表征对应的顶点的重复次数。
本实施例中,在将重复顶点合并为一个顶点后,根据每个顶点的重复次数为每个顶点赋予第一标识,并对每个顶点对应的第一标识进行编码,生成标识码流。
可选地,所述对所述第一网格进行无损编码,生成目标码流包括:
在所述第一网格为包括非流形结构的三维网络的情况下,将所述第一网格拆分为第二网格;
分别编码所述第二网格对应的网格信息和第一顶点的顶点信息,获得所述网格信息对应的第一码流和所述第一顶点的顶点信息对应的第二码流;
根据所述第一码流和所述第二码流,生成所述目标码流。
上述第一网格为包括非流形结构的三维网络,第二网格为包括流形结构的三维网格。本步骤中,将第一网格拆分为第二网格的流程可以分为两部分,拆分非流形边和拆分非流形点。
1、拆分非流形边
拆分非流形边的第一步是找到非流形边。
应理解,非流形边的一条边同时存在于至少三个三角形中,一种可选地实施方式为, 建立一个数据结构,例如映射表或哈希表,使用该数据结构存储第一网格中每条边所在的三角形,通过查询每条边所在的三角形的数量,确定非流形边。
另一种可选地实施方式为,通过构建CornerTable来建立每条边和对角之间的对应关系,将与至少三个对角对应的边确定为非流形边。
为便于理解边与对角之间的对应关系,请参阅图2,如图2所述,角a与边bc相对,角b也与边bc相对,边bc的对角为角a和角d。
拆分非流形边的第二步是新增顶点,并修改第一网格对应的连接关系。
在找到非流形边后,为非流形边的两个顶点分别创建重复顶点,选择非流形边所在的一个三角形t,使该三角形中除上述两个顶点之外的第三个顶点与创建的重复顶点构成新的三角形t’,使用新的三级三角形t’替换原三角形t。对所有非流形边执行上述操作,以将非流形边转化成流形边。同时记录下此过程中创建的重复顶点的索引。
2、拆分非流形点
拆分非流形点的第一步是找到非流形点。
从第一网格中任一顶点对应的某一个角开始,依次遍历与该角相邻且构成一个扇形的所有角,将顶点和遍历到的角标记为已遍历。直至遍历完第一网格中的所有顶点,将与标记为未遍历过的角对应的顶点,确定为非流形点。
拆分非流形点的第二步是拆分非流形点。
对于每个非流形点,创建一个重复顶点,并第一网格对应的连接关系,将第一步中未遍历到的角连接到创建的重复顶点,以此将非流形点拆分为两个流形顶点。重复这一过程,直到所有的顶点都转换成流形点。
在得到第二网格之后,对第二网格对应的网格信息进行编码,得到第一码流,其中,网格信息包括但不限于连接关系、几何信息和属性信息。对第一顶点的顶点信息进行编码,得到第二码流。上述第一顶点为第二网格相对于第一网格新增的顶点,其中,第一顶点包括对第一网格各顶点的几何坐标进行分后新增的顶点,以及对第一网格各顶点的纹理坐标进行分后新增的顶点。
具体的如何获得第一码流和第二码流的具体实施方式,请参阅后续实施例。
在得到第一码流和第二码流后,对第一码流和第二码流进行混流,生成目标码流。
可选地,所述将所述第一网格拆分为第二网格包括:
对所述第一网格中第二标识表征的非流形结构进行拆分,得到所述第二网格。
应理解,如果在合并重复顶点而产生了非流形结构,需要对新产生的非流形结构进行标记,以使得编码端可以进行无损编码。
本实施例中,在合并重复顶点的过程中,对因合并重复顶点而产生了非流形结构赋予第二标识,应理解,该第二标识用于表征非流形点或非流形边。在将第一网格拆分为第二网格的过程中,对第二标识表征的非流形结构进行拆分,得到第二网格。
可选地,在合并重复顶点的过程中,若合并一组重复顶点可能产生非流形结构,则可 以不对这组重复顶点进行合并。
可选地,编码所述第一顶点的顶点信息,获得所述第一顶点的顶点信息对应的第二码流包括:
根据所述第一网格包括的非流形结构,生成目标标识;
对所述第一顶点对应的索引进行熵编码,获得第一子码流;
根据所述目标标识和所述第一子码流,生成第二码流。
目标标识用于表征第一网格包括非流形结构。本实施例中,在第一网格包括非流形结构的情况下,生成目标标识。
可选地,设置一个标识,该标识与第一网格是否包括非流形结构相关联,在第一网格包括非流形结构的情况下,即第一顶点的数量大于0,将该标识置1,则上述标识可以理解为目标标识。在第一网格仅包括流形结构的情况下,即第一顶点的数量等于0,将该标识置0。
上述第一顶点的顶点信息包括第一顶点在第一网格中对应的索引。可选地,设置有一个预设阈值,在第一顶点的数量小于或等于该预设阈值的情况下,表示第一顶点的数量较少,则可以对第一顶点对应的索引进行熵编码,得到第一子码流,以此减少第一子码流的码率。进一步的,合并上述目标标识和第一子码流,生成第二码流。
可选地,编码第一顶点的顶点信息,获得所述第一顶点的顶点信息对应的第二码流包括:
根据所述第一网格包括的非流形结构,生成目标标识;
对所述第二网格中每个顶点对应的标志位进行熵编码,获得第二子码流;
根据所述目标标识和所述第二子码流,生成第二码流。
目标标识用于表征第一网格包括非流形结构。本实施例中,在第一网格包括非流形结构的情况下,生成目标标识。
上述第一顶点的顶点信息还可以是每个顶点对应的标志位,上述标志位用于表征对应的顶点是否为第一顶点。示例性的,若一顶点为因拆分第一网格而新增的第一顶点,则该顶点对应的标志位为1;若一顶点不是因拆分第一网格而新增的第一顶点,则该顶点对应的标志位为0。本实施例中,可选地,设置有一个预设阈值,在第一顶点的数量大于该预设阈值的情况下,表示第一顶点的数量较多,则对每个顶点对应的标志位进行熵编码,获得第二子码流。进一步的,合并上述目标标识和第二子码流,生成第二码流。
应理解,第二码流在目标码流中有多种存放方式。一种可选地实施方式为,将第二码流作为单独的一路子码流。另一种可选地实施方式为,将新增的属性顶点对应的码流存放到与属性信息对应的子码流中,将新增的几何顶点对应的码流存放到与几何信息对应的子码流中。另一种可选地实施方式为,将新增的属性顶点对应的码流和新增的几何顶点对应的码流,作为单独的两路子码流。
可选地,编码所述第二网格对应的网格信息,获得所述网格信息对应的第一码流包括:
编码所述第二网格对应的连接关系,生成所述第三子码流;
编码所述第二网格对应的几何信息,生成所述第四子码流;
编码所述第二网格对应的属性信息,生成所述第五子码流。
如上所述,网格信息包括连接关系、几何信息和属性信息,本实施例中的第一码流包括连接关系对应的第三子码流、几何信息对应的第四子码流以及属性信息对应的第五子码流。
本实施例中,对第二网格对应的连接关系进行编码,生成第三子码流;对第二网格对应的几何信息进行几何编码,生成第四子码流;对第二网格对应的属性信息进行属性编码,生成第五子码流。具体的如何生成第三子码流,第四子码流和第五子码流的实施方式,请参阅后续实施例。
以下,具体阐述如何编码第二网格对应的连接关系:
可选地,所述编码所述第二网格对应的连接关系,生成所述第三子码流包括:
遍历所述第二网格中的每个网格,生成目标字符串;
对所述目标字符串进行熵编码,生成所述第三子码流。
本实施例中,可以使用压缩编码技术编码第二网格的连接关系,其中,上述压缩编码技术可以是Edgebreaker(EB)算法。
具体的实施方式为:对第二网格中每个三角形面片的每个角按照逆时针顺序进行编号,得到每个角的索引。如果第二网格包括f个三角形面片,那么第二网格包括3f个角。
可选地,可以通过公式一,计算出当前角所在的三角形的序号。
公式一:fi=c/3
其中,c为当前角的索引,fi为当前角所在的三角形的序号。
可选地,可以通过公式二,计算出当前角的前一个角的索引。
公式二:cp=(fi*3)+(c-1)%3
其中,c为当前角的索引,fi为当前角所在的三角形的序号,cp为当前角的前一个角的索引,%符号表征取模运算。
可选地,可以通过公式三,计算出当前角的后一个角的索引。
公式三:cp=(fi*3)+(c+1)%3
其中,c为当前角的索引,fi为当前角所在的三角形的序号,cp为当前角的后一个角的索引,%符号表征取模运算。
在对每个角进行编号以及确定每个三角形的序号后,可以建立CornerTable,上述CornerTable包括V表、O表、U表以及M表。其中,V表存储有每个角对应的顶点的索引,O表存储有每个角对应的对角的索引,U表存储有每个三角形是否被遍历过的标识,M表存储有每个顶点是否被遍历过的标识。
为便于理解CornerTable的使用方式,请参阅图3,图3中的c表示当前角,c.p表示当前角c的前一个角,c.n表示当前角c的下一个角。c.o为当前角c的对角,可以查询O 表得到。c.t为c所在三角形的序号,可以由工会一计算得到。c.v表示当前角的顶点,可以查询V表得到。c.l表示当前角c左边的角,通过查询O表中c.p的对角得到。c.r表示当前角c右边的角,通过查询O表中c.n的对角得到。
建立CornerTable之后,可以在第二网格中随机选择一个初始三角形,按照EB中定义的五种操作模式遍历第二网格中的三角形,并生成目标字符串,其中,上述目标字符串为CLERS模式字符串。当遍历路径终结,但第二网格仍存在未遍历到的三角形时,随机选择一个未遍历的三角形,开始下一次遍历,直到网格中所有的三角形都被遍历过为止。进一步的,使用熵编码对CLERS模式字符串进行压缩,生成第三子码流。
为便于理解EB中定义的五种操作模式,请参阅图4。
当前遍历的角为x,如果x对应的顶点v没有被遍历过,确定当前的三角形为C模式,并确定下一个待遍历的三角形为r所在的三角形。如果x对应的顶点v没有被遍历过,且l所在的三角形被遍历过,确定当前的三角形为L模式,并确定下一个待遍历的三角形为r所在的三角形。如果x对应的顶点v没有被遍历过,且r所在的三角形被遍历过,确定当前的三角形为R模式,并确定下一个待遍历的三角形为l所在的三角形。
如果x对应的顶点v被遍历过,且l所在的三角形和r所在的三角形均没有被遍历过,确定当前三角形为S模式,在S模式下,遍历路径会产生两个分支,首先遍历r所在的三角形,并且将l所在的三角形存入堆栈,等待r所在的三角形遍历完成后,再遍历l所在的三角形。如果x对应的顶点v被遍历过,且l所在的三角形和r所在的三角形均被遍历过,确定当前三角形的模式为E,此时遍历到了当前遍历路径分支的终点。
以下,具体阐述如何编码第二网格对应的几何信息:
可选地,所述编码所述第二网格对应的几何信息,生成所述第四子码流包括:
对于所述第二网格中的每个顶点,使用几何预测编码,得到所述每个顶点对应的预测几何坐标;
根据所述每个顶点对应的预测几何坐标和所述每个顶点对应的真实几何坐标,得到所述每个顶点对应的几何预测残差;
对所述每个顶点对应的几何预测残差进行熵编码,生成所述第四子码流。
本实施例中,采用平行四边形预测编码算法对第二网格进行几何编码,应理解,在其他实施方式中,也可以使用差值预测编码算法、多平行四边形预测编码算法等方式进行几何编码,在此不做具体限定。
为便于理解,请参阅图5,如图5所示,第二网格中包括a、b、c、d四个顶点,这四个顶点构成如图5所示的两个三角形。
其中,a点、b点和c点的几何信息已编码,d点的几何信息待编码,那么可以通过公式四计算得到d点对应的预测几何坐标。
公式四:d(x,y,z)=b(x,y,z)+c(x,y,z)-a(x,y,z)
其中,d(x,y,z)为d点对应的预测几何坐标,a(x,y,z)为a点对应的真实几何坐标, b(x,y,z)为b点对应的真实几何坐标,c(x,y,z)为c点对应的真实几何坐标。
进一步的,对d点的几何信息进行编码,得到d点的真实几何坐标,通公式五计算得到d点对应的几何预测残差。
公式五:Δd(x,y,z)=d(x,y,z)-d′(x,y,z)
其中,Δd(x,y,z)为d点对应的几何预测残差,d′(x,y,z)为d点对应的预测几何坐标,d(x,y,z)为d点的真实几何坐标。
这样,在得到每个顶点对应的几何预测残差后,对每个顶点对应的几何预测残差进行熵编码,生成第四子码流。
以下,具体阐述如何编码第二网格对应的属性信息:
可选地,所述编码所述第二网格对应的属性信息,生成所述第五子码流包括:
对所述第二网格中的每个顶点对应的属性预测残差进行熵编码,生成所述第一目标子码流;所述每个顶点对应的属性预测残差基于对所述每个顶点进行属性预测编码确定;
对所述第二网格的纹理图进行编码,生成所述第二目标子码流。
本实施例中,属性信息包括纹理坐标和纹理图,第五子码流包括纹理坐标对应的第一目标子码流和纹理图对应的第二目标子码流。本实施例中,基于对第二网格中每个顶点进行属性预测编码,确定每个顶点对应的属性预测残差,对每个顶点对应的属性预测残差进行熵编码,生成第一目标子码流。具体的如何生成第一目标子码流的实施方式,请参阅后续实施例。
本实施例中,对第二网格的纹理图进行编码,生成第二目标子码流。
可选地,将第一目标子码流和第二目标子码流进行混流,得到第五子码流。
一种可能存在的情况为属性信息不包括纹理图,这种情况下,只需对每个顶点对应的属性预测残差进行熵编码,即可生成第五子码流。
可选地,所述编码所述第二网格对应的属性信息,生成所述第一目标子码流包括:
对于所述第二网格中的每个顶点,采用属性预测编码,得到所述每个顶点对应的预测纹理坐标;
根据所述每个顶点对应的预测纹理坐标和所述每个顶点对应的真实纹理坐标,得到所述每个顶点对应的属性预测残差;
对所述每个顶点对应的属性预测残差进行熵编码,生成所述第一目标子码流。
以下,具体阐述如何对每个顶点进行属性预测编码:
首先,获取初始的边集合,具体的,初始的边集合的获取方式为:
根据重建的几何信息以及连接关系,选取一个初始三角形,对初始三角形的三个顶点的纹理坐标进行编码,并将初始三角形的三条边存入边集合。
需要说明的是,对于初始三角形,本申请实施例中不对其进行顶点的预测,而是直接编码纹理坐标,在编码初始三角形的各顶点的纹理坐标之后,便将该初始三角形的各个边存储边集合,形成初始的边集合,然后基于该初始的边集合对后面的顶点进行预测。
编码待编码顶点的真实纹理坐标和目标三角形的对顶点的预测纹理坐标的残差。
需要说明的是,在得到待编码顶点的预测纹理坐标之后,便可以根据该预测纹理坐标以及真实纹理坐标获取待编码顶点的残差,通过对残差进行编码实现对待编码顶点的编码,以此能够减少纹理坐标编码的比特数。
需要说明的是,该残差可以为待编码顶点的真实纹理坐标与目标三角形的对顶点的预测纹理坐标的差值,可以是待编码顶点的真实纹理坐标减去目标三角形的对顶点的预测纹理坐标得到,也可以是目标三角形的对顶点的预测纹理坐标减去待编码顶点的真实纹理坐标得到。
可选地,本申请的一实施例中,获取所述第一边对应的目标三角形的对顶点的预测纹理坐标的实现方式可以是:
编码端根据目标三角形的各个顶点的几何坐标,获取对顶点在第一边上的投影点的纹理坐标;
需要说明的是,如图6所示,边NP为在边集合中选出的一条边,可以看作是上述的第一边,顶点N和顶点P分别为第一边的两个顶点,顶点C为待编码的顶点,顶点N、顶点P和顶点C便构成了上述的目标三角形,点X为顶点C在NP边上的投影,顶点O为已编码点,且顶点O、顶点N和顶点P构成的三角形与顶点N、顶点P和顶点C构成的三角形共NP边。基于上图6,可选地,本申请实施例中所说的对顶点在第一边上的投影点的纹理坐标的具体获取方式为:
根据公式六:获取对顶点在第一边上的投影点的纹理坐标;
其中,Xuv为所述对顶点在第一边上的投影点的纹理坐标,Nuv为所述目标三角形的第一边上的顶点N的纹理坐标,为目标三角形的第一边上的顶点N至对顶点在第一边上的投影点X的纹理坐标的向量;其中,为第一边上的顶点N和顶点P的几何坐标的向量;为第一边上的顶点N至对顶点的几何坐标的向量;为第一边上的顶点N至顶点P的纹理坐标的向量。
编码端根据投影点的纹理坐标,获取对顶点的预测纹理坐标;
根据公式七:获取对顶点的纹理坐标;
其中,PredC为对顶点的预测纹理坐标,为对顶点和第一边对应第一顶点O的纹理坐标的向量的第一种向量取值,Ouv为目标三角形的第一边对应的第一顶点的纹理坐标,第一顶点O为第一三角形的第一边的对顶点,第一三角形与目标三角形具有公共的第一边;为对顶点在第一边上的投影点X至对顶点的纹理坐标的向量;为对顶点和第一边对应第一顶点O的纹理坐标的向量的第二种向量取值。
需要说明的是,基于上述的过程,便得到了待编码点的预测纹理坐标,基于该预测纹理坐标便可以实现对待编码点的编码;可选地,在基于边集合中的一条边对待编码点进行 编码之后,所述编码端将所述目标三角形中的第二边存入所述边集合以及从所述边集合中删除所述第一边,所述第二边为所述目标三角形中未包含于所述边集合中的边,以此实现边集合的更新。
需要说明的是,本申请实施例中,可以一边进行待编码顶点的残差的获取一边进行编码,也可以是先获取到所有残差,再统一进行残差的编码。
综上可知,本申请实施例中进行纹理坐标(下面简称UV坐标)编码的具体实现过程如下:
步骤S1、从重建后的连接关系中选取一个初始三角形,不进行预测直接编码初始三角形三个顶点的UV坐标,然后将初始三角形的边存入边集合中。
步骤S2、按照存取准则从边集合中选取边τ,编码与τ组成的新三角形对顶点的UV坐标,利用三角形三维到二维的投影关系,依据上述的方式计算待编码点的预测UV坐标,将待编码点的UV坐标的原始值(即真实UV坐标)减去预测UV坐标得到残差。
步骤S3、将新三角形的两条边加入边集合中,移除边集合顶部的边τ;然后从边集合中取出下一条边,继续编码该边邻接三角形的对顶点的预测UV坐标,获取残差,返回步骤S3,循环执行步骤S3,直到获取所有顶点的残差。
步骤S4、熵编码UV坐标残差,输出UV坐标码流。
可选地,所述对所述第一网格进行无损编码,生成目标码流包括:
在所述第一网格为包括流形结构的三维网络的情况下,编码所述第一网格对应的连接关系,生成第三码流;
编码所述第一网格对应的几何信息,生成第四码流;
编码所述第一网格对应的属性信息,生成第五码流;
根据所述第三码流、所述第四码流和所述第五码流,生成所述目标码流。
本实施例中,在第一网格为包括流形结构的三维网络的情况下,表示不需要对第一网格进行拆分。这种情况下,可以直接编码第一网格对应的连接关系,生成第三码流;编码第一网格对应的几何信息,生成第四码流;编码第一网格对应的属性信息,生成第五码流;对上述第三码流、第四码流和第五码流进行混流,生成目标码流。
请参阅图7,图7是本申请实施例中无损解码方法的流程图。本实施例提供的无损解码方法包括以下步骤:
S701,对目标码流进行无损解码,得到第一网格。
本步骤中,解码端对标码流进行无损解码,得到第一网格,具体的无损解码方式,请参阅后续实施例。
S702,恢复所述第一网格中的重复顶点,得到目标网格;
需要说明的是,上述重复顶点为目标网格中对应几何坐标相同的顶点。在得到第一网格后,恢复第一网格中的重复顶点,得到目标网格,具体的恢复重复顶点的实施方式,请参阅后续实施例。
可选地,所述恢复所述第一网格中的重复顶点,得到目标网格包括:
在解码所述第一网格的属性信息的情况下,遍历所述第一网格,将与多个纹理坐标顶点对应的几何顶点确定为目标顶点;
创建与所述目标顶点的几何坐标相同的重复顶点,并根据所述重复顶点的纹理坐标对应的连接关系,更新所述第一网格对应的连接关系,得到所述目标网格。
本实施例中,在解码第一网格的属性信息的情况下,可以得到第一网格中每个顶点的纹理坐标,这种情况下,编码端遍历第一网格,确定纹理坐标顶点与几何顶点之间的对应关系,若存在与多个纹理坐标顶点对应的几何顶点,则将上述几何顶点确定为目标顶点。
创建与目标顶点的几何坐标相同的重复顶点,并根据重复顶点的纹理坐标对应的连接关系,更新第一网格对应的连接关系,使得几何顶点与纹理坐标顶点一一对应,以此得到目标网格。
可选地,所述恢复所述第一网格中的重复顶点,得到目标网格包括:
解码所述标识码流,得到所述第一网格中每个顶点对应的第一标识;
基于所述每个顶点对应的第一标识,创建重复顶点,得到所述目标网格。
本实施例中,在目标码流包括标识码流的情况下,解码标识码流,得到第一网格中每个顶点对应的第一标识,其中,第一标识用于表征对应的顶点的重复次数。进一步的,基于每个顶点对应的第一标识,创建该顶点对应的重复顶点,得到目标网格。
例如,若一顶点对应的第一标识用于表征顶点的重复次数为0,则不创建该顶点对应的重复顶点;若一顶点对应的第一标识用于表征顶点的重复次数为1,则创建与该顶点的几何坐标相同的顶点。
可选地,所述对目标码流进行无损解码,得到第一网格包括:
对目标码流进行分解,得到第六码流和第七码流;
分别解码所述第六码流和所述第七码流,获得所述第六码流对应的网格信息和所述第七码流对应的第二顶点的顶点信息;
根据所述网格信息,重建第二网格;
根据所述第二顶点的顶点信息,对所述第二网格中的第二顶点进行合并,得到第一网格。
解码端在获得目标码流后,对目标码流进行分解,得到第六码流和第七码流,
对第六码流进行解码,得到网格信息;对第七码流进行解码,得到第二顶点的顶点信息。上述第二顶点基于将第一网格拆分为第二网格得到,上述第二顶点为第二网格相对于第一网格新增的顶点,其中,第二顶点包括对第一网格各顶点的几何坐标进行分后新增的顶点,以及对第一网格各顶点的纹理坐标进行分后新增的顶点。
如上所述,网格信息包括连接关系、几何信息和属性信息。利用第二网格的连接关系、几何信息和属性信息,可以直接重建得到第二网格。
可选地,解码所述第七码流,获得第七码流对应的第二顶点的顶点信息包括:
在所述目标标识用于表征所述第一网格为包括非流形结构的三维网格的情况下,解码所述第六子码流,得到所述第二顶点的顶点信息。
应理解,第七码流包括目标标识和第六子码流,在目标标识用于表征第一网格为包括非流形结构的三维网格的情况下,解码第六子码流,得到第二顶点的顶点信息。
可选地,若目标标识为1,表示第一网格为包括非流形结构的三维网格,这种情况下,对第六子码流进行解码。若目标标识为0,表示第一网格为仅包括流形结构的三维网格,则不需要对第六子码流进行解码。
可选地,所述根据所述第二顶点的顶点信息,对所述第二网格中的第二顶点进行合并,得到第一网格包括:
解析所述第二顶点的顶点信息,确定所述第二网格中的第二顶点;
在映射表对所述第二顶点的几何坐标进行查询,得到目标顶点;
将所述第二顶点对应的索引更新为所述目标顶点对应的索引;
基于所述第二网格中每个顶点对应的索引,更新所述第二网格对应的连接关系,得到所述第一网格。
本实施例中,首先,解析第二顶点的顶点信息,确定第二顶点,其中,第二顶点可以理解为将第一网格拆分为第二网格得到的新增顶点。应理解,可以将第二网格中除第二顶点之外的顶点称为非新增顶点。
应理解,在对第六码流和第七码流解码之后,可以基于解码结果得到映射表,该映射表存储有每个顶点对应的几何坐标与每个顶点对应的索引之间的映射关系,可选地,该映射表可以是哈希表。
如果当前顶点是新增的第二顶点,则在映射表对第二顶点的几何坐标进行查询,得到目标顶点,其中,目标顶点对应的几何坐标与第二顶点对应的几何坐标相同;并将该第二顶点对应的索引更新为目标顶点对应的索引。若通过查询映射表发现存在与第二顶点的几何坐标相同的多个顶点,则可以从上述多个顶点中随机确定一个顶点为目标顶点。本实施例中,通过对第二顶点的索引进行更新,实现第二顶点的合并。
如果当前顶点不是新增的第二顶点,则不更新当前顶点对应的索引。
进一步的,在对第二网格中的每个顶点进行遍历之后,更新第二网格对应的连接关系,更新几何信息列表和纹理坐标列表,得到第一网格。
可选地,解码所述第六码流,获得所述第六码流对应的网格信息包括:
解码所述第七子码流,获得所述第二网格对应的连接关系;
解码所述第八子码流,获得所述第二网格对应的几何信息;
解码所述第九子码流,获得所述第二网格对应的属性信息。
如上所述,网格信息包括连接关系、几何信息和属性信息。第六码流包括连接关系对应的第七子码流、几何信息对应的第八子码流和属性信息对应的第九子码流。
对第七子码流进行解码,得到第二网格对应的连接关系;对第八子码流进行解码,得 到第二网格对应的几何信息;对第九子码流进行解码,得到第二网格对应的属性信息。
可选地,所述解码所述第七子码流,获得所述第二网格对应的连接关系包括:
解码所述第七子码流,得到目标字符串;
对所述目标字符串进行解码,重建所述第二网格对应的连接关系。
应理解,上述目标字符串用于表征第二网格对应的连接关系。
解码端使用与编码端对连接关系进行编码的方式对应的解码方式对第七子码流进行解码,得到目标字符串,在此不做重复阐述。
可选地,所述解码所述第八子码流,获得所述第二网格对应的几何信息包括:
对所述第八子码流进行熵解码,得到所述第二网格中每个顶点对应的几何预测残差;
对所述每个顶点采用几何预测解码,得到所述每个顶点对应的预测几何坐标;
基于所述每个顶点对应的几何预测残差和预测几何坐标,得到所述每个顶点对应的真实几何坐标。
应理解,上述每个顶点对应的真实几何坐标用于表征第二网格对应的几何信息。
解码端使用与编码端对几何信息进行编码的方式对应的解码方式对第八子码流进行解码,得到第二网格对应的几何信息,在此不做重复阐述。
可选地,所述解码所述第九子码流,获得所述第二网格对应的属性信息包括:
分解所述第九子码流,得到所述第三目标子码流和所述第四目标子码流;
基于所述第二网格中每个顶点对应的属性预测残差,得到所述每个顶点对应的真实纹理坐标;所述每个顶点对应的属性预测残差基于解码所述第三目标子码流确定;
解码所述第四目标子码流,得到所述第二网格的纹理图。
本实施例中,属性信息包括纹理坐标和纹理图,第九子码流包括纹理坐标对应的第三目标子码流和纹理图对应的第四目标子码流。
本实施例中,对第三目标子码流进行解码,确定每个顶点对应的属性预测残差,进而基于每个顶点对应的属性预测残差,得到每个顶点对应的真实纹理坐标。
对第四目标子码流进行解码,得到第二网格的纹理图。
一种可能存在的情况为,第九子码流不包括第四目标子码流,即属性信息不包括纹理图。这种情况下,只需对第三目标子码流进行解码,即可获得第二网格对应的属性信息。
可选地,所述基于所述第二网格中每个顶点对应的属性预测残差,得到所述每个顶点对应的真实纹理坐标包括:
对所述第三目标子码流进行熵解码,得到所述第二网格中每个顶点对应的属性预测残差;
对所述每个顶点采用属性预测解码,得到所述每个顶点对应的预测纹理坐标;
基于所述每个顶点对应的属性预测残差和预测纹理坐标,得到所述每个顶点对应的真实纹理坐标。
本实施例中,解码端使用与编码端对纹理信息进行编码的方式对应的解码方式对第三 目标子码流进行解码,得到每个顶点对应的真实纹理坐标,在此不做重复阐述。
可选地,所述对目标码流进行无损解码,得到第一网格包括:
所述解码端分解所述目标码流,得到第六码流、第七码流和第八码流;
所述解码端解码所述第六码流,得到所述第一网格对应的连接关系;
所述解码端解码所述第七码流,得到所述第一网格对应的几何信息;
所述解码端解码所述第八码流,得到所述第一网格对应的属性信息;
所述解码端基于所述连接关系、所述几何信息和所述属性信息,生成第一网格。
本实施例中,在第一网格为包括流形结构的三维网络的情况下,可以直接分解目标码流,得到第六码流、第七码流和第八码流,并分别对第六码流、第七码流和第八码流进行解码,得到第一网格对应的连接关系、几何信息和属性信息,基于上述连接关系、几何信息和属性信息,重建生成第一网格。
本申请实施例提供的无损编码方法,执行主体可以为无损编码装置。本申请实施例中以无损编码装置执行编码方法为例,说明本申请实施例提供的无损编码装置。
如图8所示,本申请实施例还提供了一种无损编码装置800,包括:
获取模块801,用于遍历目标网格,获取所述目标网格中每个顶点的几何坐标;
确定模块802,用于将几何坐标相同的顶点确定为重复顶点;
合并模块803,用于合并所述目标网格中的所述重复顶点,得到第一网格;
编码模块804,用于对所述第一网格进行无损编码,生成目标码流。
可选地,所述合并模块803,具体用于:
在所述目标网格中每个顶点的几何坐标与纹理坐标一一对应的情况下,将所述目标网格中几何坐标相同的重复顶点合并为一个顶点,并不更改所述重复顶点的纹理坐标,得到所述第一网格。
可选地,所述合并模块803,还具体用于:
将所述目标网格中几何坐标相同的重复顶点合并为一个顶点,得到所述第一网格;
对所述第一网格中每个顶点对应的第一标识进行编码,生成标识码流,所述第一标识用于表征对应的顶点的重复次数。
可选地,所述编码模块804,具体用于:
在所述第一网格为包括非流形结构的三维网络的情况下,将第一网格拆分为第二网格;
分别编码所述第二网格对应的网格信息和第一顶点的顶点信息,获得所述网格信息对应的第一码流和所述第一顶点的顶点信息对应的第二码流;
根据所述第一码流和所述第二码流,生成目标码流。
可选地,所述编码模块804,具体用于:
对所述第一网格中第二标识表征的非流形结构进行拆分,得到所述第二网格。
可选地,所述编码模块802,具体用于:
根据所述第一网格包括的非流形结构,生成目标标识;
对所述第一顶点对应的索引进行熵编码,获得第一子码流;
根据所述目标标识和所述第一子码流,生成第二码流。
可选地,所述编码模块802,还具体用于:
根据所述第一网格包括的非流形结构,生成目标标识;
对所述第二网格中每个顶点对应的标志位进行熵编码,获得第二子码流;
根据所述目标标识和所述第二子码流,生成第二码流。
可选地,所述编码模块802,还具体用于:
编码所述第二网格对应的连接关系,生成所述第三子码流;
编码所述第二网格对应的几何信息,生成所述第四子码流;
编码所述第二网格对应的属性信息,生成所述第五子码流。
可选地,所述编码模块802,还具体用于:
在所述第一网格为包括流形结构的三维网络的情况下,编码所述第一网格对应的连接关系,生成第三码流;
所述编码端编码所述第一网格对应的几何信息,生成第四码流;
所述编码端编码所述第一网格对应的属性信息,生成第五码流;
所述编码端根据所述第三码流、所述第四码流和所述第五码流,生成所述目标码流。
本申请实施例中,遍历目标网格,获取目标网格中每个顶点的几何坐标;将几何坐标相同的顶点确定为重复顶点;对目标网格中的重复顶点进行合并,得到第一网格,进而在后续对第一网格进行无损编码的过程中不会对每个重复顶点多次编码,以此提高了编码效率。
该装置实施例与上述图1所示的无损编码方法实施例对应,上述方法实施例中关于编码端的各个实施过程和实现方式均可适用于该装置实施例中,且能达到相同的技术效果。
本申请实施例提供的无损解码方法,执行主体可以为无损解码装置。本申请实施例中以无损解码装置执行无损解码方法为例,说明本申请实施例提供的无损解码装置。
如图9所示,本申请实施例还提供了一种无损解码装置900,包括:
解码模块901,用于对目标码流进行无损解码,得到第一网格;
恢复模块902,用于恢复所述第一网格中的重复顶点,得到目标网格。
可选地,所述恢复模块902,具体用于:
在解码所述第一网格的属性信息的的情况下,遍历所述第一网格,将与多个纹理坐标顶点对应的几何顶点确定为目标顶点;
创建与所述目标顶点的几何坐标相同的重复顶点,并根据所述重复顶点的纹理坐标对应的连接关系,更新所述第一网格对应的连接关系,得到所述目标网格。
可选地,所述恢复模块902,还具体用于:
解码所述标识码流,得到所述第一网格中每个顶点对应的第一标识;
基于所述每个顶点对应的第一标识,创建重复顶点,得到所述目标网格。
可选地,所述解码模块901,具体用于:
对目标码流进行分解,得到第六码流和第七码流;
分别解码所述第六码流和所述第七码流,获得所述第六码流对应的网格信息和所述第七码流对应的第二顶点的顶点信息;
根据所述网格信息,重建第二网格;
根据所述第二顶点的顶点信息,对所述第二网格中的第二顶点进行合并,得到第一网格。
可选地,所述解码模块901,还具体用于:
在所述目标标识用于表征所述第一网格为包括非流形结构的三维网格的情况下,解码所述第六子码流,得到所述第二顶点的顶点信息。
可选地,所述解码模块901,具体用于:
解析所述第二顶点的顶点信息,确定所述第二网格中的第二顶点;
在映射表对所述第二顶点的几何坐标进行查询,得到目标顶点;
将所述第二顶点对应的索引更新为所述目标顶点对应的索引;
基于所述第二网格中每个顶点对应的索引,更新所述第二网格对应的连接关系,得到所述第一网格。
可选地,所述第三码流包括第七子码流、第八子码流和第九子码流;
所述解码模块901,还具体用于:
解码所述第七子码流,获得所述第二网格对应的连接关系;
解码所述第八子码流,获得所述第二网格对应的几何信息;
解码所述第九子码流,获得所述第二网格对应的属性信息。
可选地,所述解码模块901,还具体用于:
分解所述目标码流,得到第六码流、第七码流和第八码流;
解码所述第六码流,得到所述第一网格对应的连接关系;
解码所述第七码流,得到所述第一网格对应的几何信息;
解码所述第八码流,得到所述第一网格对应的属性信息;
基于所述连接关系、所述几何信息和所述属性信息,生成第一网格。
本申请实施例中的无损编码装置和无损解码装置可以是电子设备,例如具有操作系统的电子设备,也可以是电子设备中的部件、例如集成电路或芯片。该电子设备可以是终端,也可以为除终端之外的其他设备。示例性的,终端可以包括但不限于上述所列举的终端的类型,其他设备可以为服务器、网络附属存储器(Network Attached Storage,NAS)等,本申请实施例不作具体限定。
本申请实施例提供的无损解码装置能够实现图7的方法实施例实现的各个过程,并达到相同的技术效果,为避免重复,这里不再赘述。
可选地,如图10所示,本申请实施例还提供一种通信设备1000,包括处理器1001 和存储器1002,存储器1002上存储有可在所述处理器1001上运行的程序或指令,例如,该通信设备1000为终端时,该程序或指令被处理器1001执行时实现上述无损编码方法实施例的各个步骤,且能达到相同的技术效果,或实现上述无损解码方法实施例的各个步骤,且能达到相同的技术效果。
本申请实施例还提供一种终端,包括处理器1001和通信接口,处理器1001用于执行以下操作:
遍历目标网格,获取所述目标网格中每个顶点的几何坐标;
将几何坐标相同的顶点确定为重复顶点;
合并所述目标网格中的所述重复顶点,得到第一网格;
对所述第一网格进行无损编码,生成目标码流。
或者,处理器1001用于执行以下操作:
对目标码流进行无损解码,得到第一网格;
恢复所述第一网格中的重复顶点,得到目标网格;
该终端实施例与上述终端侧方法实施例对应,上述方法实施例的各个实施过程和实现方式均可适用于该终端实施例中,且能达到相同的技术效果。具体地,图11为实现本申请实施例的一种终端的硬件结构示意图。
该终端1100包括但不限于:射频单元1101、网络模块1102、音频输出单元1103、输入单元1104、传感器1105、显示单元1106、用户输入单元1107、接口单元1108、存储器1109、以及处理器1110等部件。
本领域技术人员可以理解,终端1100还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器1110逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图11中示出的终端结构并不构成对终端的限定,终端可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。
应理解的是,本申请实施例中,输入单元1104可以包括图形处理器(Graphics Processing Unit,GPU)11041和麦克风11042,图形处理器11041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元1106可包括显示面板11061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板11061。用户输入单元1107包括触控面板11071以及其他输入设备11072中的至少一种。触控面板11071,也称为触摸屏。触控面板11071可包括触摸检测装置和触摸控制器两个部分。其他输入设备11072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。
本申请实施例中,射频单元1101接收来自网络侧设备的下行数据后,可以传输给处理器1110进行处理;射频单元1101可以向网络侧设备发送上行数据。通常,射频单元1101包括但不限于天线、放大器、收发信机、耦合器、低噪声放大器、双工器等。
存储器1109可用于存储软件程序或指令以及各种数据。存储器1109可主要包括存储程序或指令的第一存储区和存储数据的第二存储区,其中,第一存储区可存储操作系统、至少一个功能所需的应用程序或指令(比如声音播放功能、图像播放功能等)等。此外,存储器1109可以包括易失性存储器或非易失性存储器,或者,存储器1109可以包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synch link DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本申请实施例中的存储器1109包括但不限于这些和任意其它适合类型的存储器。
处理器1110可包括一个或多个处理单元;可选的,处理器1110集成应用处理器和调制解调处理器,其中,应用处理器主要处理涉及操作系统、用户界面和应用程序等的操作,调制解调处理器主要处理无线通信信号,如基带处理器。可以理解的是,上述调制解调处理器也可以不集成到处理器1110中。
其中,处理器1110用于执行以下操作:
遍历目标网格,获取所述目标网格中每个顶点的几何坐标;
将几何坐标相同的顶点确定为重复顶点;
合并所述目标网格中的所述重复顶点,得到第一网格;
对所述第一网格进行无损编码,生成目标码流。
或者,处理器1110用于执行以下操作:
对目标码流进行无损解码,得到第一网格;
恢复所述第一网格中的重复顶点,得到目标网格;
本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述无损编码方法实施例的各个过程,或实现上述无损解码方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
其中,所述处理器为上述实施例中所述的终端中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器ROM、随机存取存储器RAM、磁碟或者光盘等。
本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述无损编码方法实施例的各个过程,或实现上述无损解码方法实施例的各个过程,且能达到相同的技术效果,为避免重 复,这里不再赘述。
应理解,本申请实施例提到的芯片还可以称为系统级芯片,系统芯片,芯片系统或片上系统芯片等。
本申请实施例另提供了一种计算机程序/程序产品,所述计算机程序/程序产品被存储在存储介质中,所述计算机程序/程序产品被至少一个处理器执行以实现上述无损编码方法实施例的各个过程,或实现上述无损解码方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
本申请实施例另提供了一种系统,所述系统包括编码端和解码端,所述编码端执行上述无损编码方法实施例的各个过程,所述编码端执行上述无损解码方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以计算机软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。

Claims (22)

  1. 一种无损编码方法,包括:
    编码端遍历目标网格,获取所述目标网格中每个顶点的几何坐标;
    所述编码端将几何坐标相同的顶点确定为重复顶点;
    所述编码端合并所述目标网格中的所述重复顶点,得到第一网格;
    所述编码端对所述第一网格进行无损编码,生成目标码流。
  2. 根据权利要求1所述的方法,其中,所述合并所述目标网格中的所述重复顶点,得到第一网格包括:
    所述编码端在所述目标网格中每个顶点的几何坐标与纹理坐标一一对应的情况下,将所述目标网格中几何坐标相同的重复顶点合并为一个顶点,并不更改所述重复顶点的纹理坐标,得到所述第一网格。
  3. 根据权利要求1所述的方法,其中,所述合并所述目标网格中的所述重复顶点,得到第一网格包括:
    所述编码端将所述目标网格中几何坐标相同的重复顶点合并为一个顶点,得到所述第一网格;
    所述编码端对所述第一网格中每个顶点对应的第一标识进行编码,生成标识码流,所述第一标识用于表征对应的顶点的重复次数。
  4. 根据权利要求1所述的方法,其中,所述对所述第一网格进行无损编码,生成目标码流包括:
    所述编码端在所述第一网格为包括非流形结构的三维网络的情况下,将所述第一网格拆分为第二网格;所述第二网格为包括流形结构的三维网格;
    所述编码端分别编码所述第二网格对应的网格信息和第一顶点的顶点信息,获得所述网格信息对应的第一码流和所述第一顶点的顶点信息对应的第二码流,所述第一顶点为所述第二网格相对于所述第一网格新增的顶点;
    所述编码端根据所述第一码流和所述第二码流,生成所述目标码流。
  5. 根据权利要求4所述的方法,其中,所述将所述第一网格拆分为第二网格包括:
    所述编码端对所述第一网格中第二标识表征的非流形结构进行拆分,得到所述第二网格;
    其中,所述第二标识用于表征所述第一网格中合并所述重复顶点产生的非流形结构。
  6. 根据权利要求4所述的方法,其中,编码第一顶点的顶点信息,获得所述第一顶点的顶点信息对应的第二码流包括:
    所述编码端根据所述第一网格包括的非流形结构,生成目标标识;
    所述编码端对所述第一顶点对应的索引进行熵编码,获得第一子码流;
    所述编码端根据所述目标标识和所述第一子码流,生成第二码流。
  7. 根据权利要求4所述的方法,其中,编码第一顶点的顶点信息,获得所述第一顶点的顶点信息对应的第二码流包括:
    所述编码端根据所述第一网格包括的非流形结构,生成目标标识;
    所述编码端对所述第二网格中每个顶点对应的标志位进行熵编码,获得第二子码流;所述标志位用于表征对应的顶点是否为第一顶点;
    所述编码端根据所述目标标识和所述第二子码流,生成第二码流。
  8. 根据权利要求4所述的方法,其中,所述第一码流包括第三子码流、第四子码流和第五子码流,所述网格信息包括连接关系、几何信息和属性信息;
    编码所述第二网格对应的网格信息,获得所述网格信息对应的第一码流包括:
    所述编码端编码所述第二网格对应的连接关系,生成所述第三子码流;
    所述编码端编码所述第二网格对应的几何信息,生成所述第四子码流;
    所述编码端编码所述第二网格对应的属性信息,生成所述第五子码流。
  9. 根据权利要求1所述的方法,其中,所述对所述第一网格进行无损编码,生成目标码流包括:
    所述编码端在所述第一网格为包括流形结构的三维网络的情况下,编码所述第一网格对应的连接关系,生成第三码流;
    所述编码端编码所述第一网格对应的几何信息,生成第四码流;
    所述编码端编码所述第一网格对应的属性信息,生成第五码流;
    所述编码端根据所述第三码流、所述第四码流和所述第五码流,生成所述目标码流。
  10. 一种无损解码方法,包括:
    解码端对目标码流进行无损解码,得到第一网格;
    所述解码端恢复所述第一网格中的重复顶点,得到目标网格;
    其中,所述重复顶点为目标网格中对应几何坐标相同的顶点。
  11. 根据权利要求10所述的方法,其中,所述恢复所述第一网格中的重复顶点,得到目标网格包括:
    所述解码端在解码所述第一网格的属性信息的情况下,遍历所述第一网格,将与多个纹理坐标顶点对应的几何顶点确定为目标顶点;
    所述解码端创建与所述目标顶点的几何坐标相同的重复顶点,并根据所述重复顶点的纹理坐标对应的连接关系,更新所述第一网格对应的连接关系,得到所述目标网格。
  12. 根据权利要求10所述的方法,其中,所述目标码流包括标识码流,所述恢复所述第一网格中的重复顶点,得到目标网格包括:
    所述解码端解码所述标识码流,得到所述第一网格中每个顶点对应的第一标识;所述第一标识用于表征对应的顶点的重复次数;
    所述解码端基于所述每个顶点对应的第一标识,创建重复顶点,得到所述目标网格。
  13. 根据权利要求10所述的方法,其中,所述对目标码流进行无损解码,得到第一网 格包括:
    所述解码端对目标码流进行分解,得到第六码流和第七码流;
    所述解码端分别解码所述第六码流和所述第七码流,获得所述第六码流对应的网格信息和所述第七码流对应的第二顶点的顶点信息;
    所述解码端根据所述网格信息,重建第二网格;
    所述解码端根据所述第二顶点的顶点信息,对所述第二网格中的第二顶点进行合并,得到第一网格;
    其中,所述第一网格为包括非流形结构的三维网格,所述第二网格为包括流形结构的三维网格,所述第二顶点基于将所述第一网格拆分为所述第二网格得到。
  14. 根据权利要求13所述的方法,其中,所述第七码流包括目标标识和第六子码流;
    所述解码端解码所述第七码流,获得第七码流对应的第二顶点的顶点信息包括:
    所述解码端在所述目标标识用于表征所述第一网格为包括非流形结构的三维网格的情况下,解码所述第六子码流,得到所述第二顶点的顶点信息。
  15. 根据权利要求13所述的方法,其中,所述根据所述第二顶点的顶点信息,对所述第二网格中的第二顶点进行合并,得到第一网格包括:
    所述解码端解析所述第二顶点的顶点信息,确定所述第二网格中的第二顶点;
    所述解码端在映射表对所述第二顶点的几何坐标进行查询,得到目标顶点;所述映射表基于解码所述第六码流和所述第七码流得到,所述映射表存储有每个顶点对应的几何坐标与每个顶点对应的索引之间的映射关系,所述目标顶点对应的几何坐标与所述第二顶点对应的几何坐标相同;
    所述解码端将所述第二顶点对应的索引更新为所述目标顶点对应的索引;
    所述解码端基于所述第二网格中每个顶点对应的索引,更新所述第二网格对应的连接关系,得到所述第一网格。
  16. 根据权利要求13所述的方法,其中,所述第六码流包括第七子码流、第八子码流和第九子码流,所述网格信息包括连接关系、几何信息和属性信息;
    解码所述第六码流,获得所述第六码流对应的网格信息包括:
    所述解码端解码所述第七子码流,获得所述第二网格对应的连接关系;
    所述解码端解码所述第八子码流,获得所述第二网格对应的几何信息;
    所述解码端解码所述第九子码流,获得所述第二网格对应的属性信息。
  17. 根据权利要求10所述的方法,其中,所述对目标码流进行无损解码,得到第一网格包括:
    所述解码端分解所述目标码流,得到第六码流、第七码流和第八码流;
    所述解码端解码所述第六码流,得到所述第一网格对应的连接关系;
    所述解码端解码所述第七码流,得到所述第一网格对应的几何信息;
    所述解码端解码所述第八码流,得到所述第一网格对应的属性信息;
    所述解码端基于所述连接关系、所述几何信息和所述属性信息,生成第一网格,所述第一网格为包括流形结构的三维网络。
  18. 一种无损编码装置,包括:
    获取模块,用于遍历目标网格,获取所述目标网格中每个顶点的几何坐标;
    确定模块,用于将几何坐标相同的顶点确定为重复顶点;
    合并模块,用于合并所述目标网格中的所述重复顶点,得到第一网格;
    编码模块,用于对所述第一网格进行无损编码,生成目标码流。
  19. 一种无损解码装置,包括:
    解码模块,用于对目标码流进行无损解码,得到第一网格;
    恢复模块,用于恢复所述第一网格中的重复顶点,得到目标网格;
    其中,所述重复顶点为目标网格中对应几何坐标相同的顶点。
  20. 一种终端,包括处理器和存储器,所述存储器存储可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如权利要求1-9任一项所述的无损编码方法的步骤,或者实现如权利要求10-17任一项所述的无损解码方法的步骤。
  21. 一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如权利要求1-9任一项所述的无损编码方法的步骤,或者实现如权利要求10-17任一项所述的无损解码方法的步骤。
  22. 一种系统,所述系统包括编码端和解码端,所述编码端执行如权利要求1-9任一项所述的无损编码方法的步骤,所述解码端执行如权利要求10-17任一项所述的无损解码方法的步骤。
PCT/CN2023/102104 2022-06-30 2023-06-25 无损编码方法、无损解码方法、装置及设备 WO2024001953A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210772455.X 2022-06-30
CN202210772455.XA CN117372648A (zh) 2022-06-30 2022-06-30 无损编码方法、无损解码方法、装置及设备

Publications (1)

Publication Number Publication Date
WO2024001953A1 true WO2024001953A1 (zh) 2024-01-04

Family

ID=89383233

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/102104 WO2024001953A1 (zh) 2022-06-30 2023-06-25 无损编码方法、无损解码方法、装置及设备

Country Status (2)

Country Link
CN (1) CN117372648A (zh)
WO (1) WO2024001953A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101826126A (zh) * 2010-04-02 2010-09-08 浙江大学 基于任意视线三维草图的服装设计方法
CN104243958A (zh) * 2014-09-29 2014-12-24 联想(北京)有限公司 三维网格数据的编码、解码方法以及编码、解码装置
CN108335367A (zh) * 2018-02-06 2018-07-27 杭州群核信息技术有限公司 一种用于终端展示的三维模型处理方法
US20180253867A1 (en) * 2017-03-06 2018-09-06 Canon Kabushiki Kaisha Encoding and decoding of texture mapping data in textured 3d mesh models
CN114373041A (zh) * 2021-12-15 2022-04-19 聚好看科技股份有限公司 一种三维重建方法及设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101826126A (zh) * 2010-04-02 2010-09-08 浙江大学 基于任意视线三维草图的服装设计方法
CN104243958A (zh) * 2014-09-29 2014-12-24 联想(北京)有限公司 三维网格数据的编码、解码方法以及编码、解码装置
US20180253867A1 (en) * 2017-03-06 2018-09-06 Canon Kabushiki Kaisha Encoding and decoding of texture mapping data in textured 3d mesh models
CN108335367A (zh) * 2018-02-06 2018-07-27 杭州群核信息技术有限公司 一种用于终端展示的三维模型处理方法
CN114373041A (zh) * 2021-12-15 2022-04-19 聚好看科技股份有限公司 一种三维重建方法及设备

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JIE ZHANG, WU JIAZE, ZHENG CHANGWEN, HU XIAOHUI: "Connectivity Compression of Triangle Meshes Based on Hamiltonian Cycle", JOURNAL OF COMPUTER-AIDED DESIGN & COMPUTER GRAPHICS, vol. 25, no. 5, 15 May 2013 (2013-05-15), pages 697 - 707, XP093119249 *

Also Published As

Publication number Publication date
CN117372648A (zh) 2024-01-09

Similar Documents

Publication Publication Date Title
US20200260117A1 (en) Methods and Apparatuses for Coding and Decoding Depth Map
US11394970B2 (en) Image encoding and decoding method and device
BR102018009143A2 (pt) Método e aparelho para codificar e decodificar nuvens de pontos de duas dimensões
US20140204088A1 (en) Surface codec using reprojection onto depth maps
US10692249B2 (en) Octree traversal for anchor point cloud compression
CN108961141A (zh) 矢量地图的双重零水印方法、系统、存储介质及服务器
JP2010516154A (ja) スティチング情報を含む3dメッシュ情報を符号化/復号する方法及び装置
KR20090097057A (ko) 메쉬 모델로 구현된 3차원 데이터의 연결정보를 부호화 및복호화 방법
WO2024001494A1 (zh) 一种数据存储的方法、单节点服务器及设备
WO2022121650A1 (zh) 点云属性的预测方法、编码器、解码器及存储介质
WO2024001953A1 (zh) 无损编码方法、无损解码方法、装置及设备
CN114282071A (zh) 基于图数据库的请求处理方法、装置、设备及存储介质
WO2023246686A1 (zh) 无损编码方法、无损解码方法、装置及设备
US20180365261A1 (en) Fingerprinting data for more aggressive de-duplication
WO2022206302A1 (zh) 基于跨标签页的模型复制方法、装置、终端设备及存储介质
WO2024083043A1 (zh) 网格编码方法、装置、通信设备及可读存储介质
WO2024083039A1 (zh) 网格编码方法、网格解码方法及相关设备
JP2014099848A (ja) イメージ分割システム及びその方法
WO2024007951A1 (zh) 编码、解码方法、装置及设备
WO2024017008A1 (zh) 编码、解码方法、装置及设备
Vieira et al. Stellar mesh simplification using probabilistic optimization
WO2023193707A1 (zh) 编码、解码方法、装置及设备
WO2023155779A1 (zh) 编码方法、解码方法、装置及通信设备
WO2023173238A1 (zh) 编解码方法、码流、编码器、解码器以及存储介质
WO2023098805A1 (zh) 点云编码方法、解码方法、装置及电子设备

Legal Events

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

Ref document number: 23830131

Country of ref document: EP

Kind code of ref document: A1