[go: up one dir, main page]

WO2025152015A1 - Coding method, decoding method, code stream, coder, decoder, and storage medium - Google Patents

Coding method, decoding method, code stream, coder, decoder, and storage medium

Info

Publication number
WO2025152015A1
WO2025152015A1 PCT/CN2024/072416 CN2024072416W WO2025152015A1 WO 2025152015 A1 WO2025152015 A1 WO 2025152015A1 CN 2024072416 W CN2024072416 W CN 2024072416W WO 2025152015 A1 WO2025152015 A1 WO 2025152015A1
Authority
WO
WIPO (PCT)
Prior art keywords
mesh
texture coordinate
texture
reconstructed
coordinate information
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
PCT/CN2024/072416
Other languages
French (fr)
Chinese (zh)
Inventor
杨付正
霍俊彦
马彦卓
李明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to PCT/CN2024/072416 priority Critical patent/WO2025152015A1/en
Publication of WO2025152015A1 publication Critical patent/WO2025152015A1/en
Pending legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/537Motion estimation other than block-based
    • H04N19/543Motion estimation other than block-based using regions

Definitions

  • the present application relates to the field of video coding and decoding technology, and in particular to a coding and decoding method, a bit stream, an encoder, a decoder and a storage medium.
  • VDMC Video-based Dynamic Mesh Coding
  • V3C Visual Volumetric Video-based Coding
  • the present application provides a coding and decoding method, a bit stream, an encoder, a decoder and a storage medium, which can improve decoding accuracy and improve decoding performance.
  • the texture coordinate information of the reconstructed deformed mesh is determined based on the texture coordinate information of the first basic mesh and the reconstructed deformed mesh.
  • an embodiment of the present application provides an encoding method, which is applied to an encoder, and the method includes:
  • the basic grid and the texture coordinate information are encoded, and the obtained encoding bits are written into a bit stream.
  • an embodiment of the present application provides a code stream, which is generated by bit encoding according to information to be encoded; wherein the information to be encoded includes at least one of the following:
  • an encoder comprising
  • the grid information determination part is configured to determine a basic grid corresponding to the current image; and determine texture coordinate information based on the basic grid;
  • the encoding part is configured to encode the basic grid and the texture coordinate information, and write the obtained encoding bits into a bit stream.
  • an encoder including a first memory and a first processor, wherein:
  • a first memory for storing a computer program that can be run on the first processor
  • the first processor is used to execute the method described in the second aspect when running a computer program.
  • an embodiment of the present application provides a decoder, comprising
  • a subdivision and deformation part is configured to perform mesh subdivision and deformation based on the first basic mesh to determine a reconstructed deformed mesh
  • an embodiment of the present application provides a decoder, including a second memory and a second processor, wherein:
  • FIG4 is a schematic diagram of an implementation process of a grid simplification operation provided in an embodiment of the present application.
  • FIG12 is a flowchart diagram 1 of a decoding method provided in an embodiment of the present application.
  • FIG13 is a schematic diagram of a three-dimensional grid decoding framework provided in an embodiment of the present application.
  • FIG14 is a second schematic diagram of a three-dimensional grid decoding framework provided in an embodiment of the present application.
  • FIG15 is a flowchart diagram 1 of a decoding method provided in an embodiment of the present application.
  • FIG17 is an optional schematic diagram of at least one candidate location point provided in an embodiment of the present application.
  • FIG18 is a schematic diagram of an optional search range provided in an embodiment of the present application.
  • FIG19 is a schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application.
  • FIG20 is a schematic diagram of a three-dimensional grid coding framework provided in an embodiment of the present application.
  • FIG21 is a second schematic diagram of a three-dimensional grid coding framework provided in an embodiment of the present application.
  • FIG22 is a schematic diagram of the composition structure of an encoder provided in an embodiment of the present application.
  • FIG23 is a schematic diagram of a specific hardware structure of an encoder provided in an embodiment of the present application.
  • FIG24 is a schematic diagram of the structure of a decoder provided in an embodiment of the present application.
  • FIG25 is a schematic diagram of a specific hardware structure of a decoder provided in an embodiment of the present application.
  • FIG. 26 is a schematic diagram of the composition structure of a coding and decoding system provided in an embodiment of the present application.
  • first ⁇ second ⁇ third involved in the embodiments of the present application are only used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that “first ⁇ second ⁇ third” can be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.
  • different data format bitstreams can be decoded and synthesized in the same video scene.
  • at least image format, point cloud format, and mesh format can be included.
  • real-time immersive video interaction services can be provided for multiple data formats (for example, mesh, point cloud, image, etc.) with different sources.
  • the three-dimensional grid image is usually encoded using an existing two-dimensional image/video encoding method
  • the three-dimensional grid needs to be converted from three-dimensional space to a two-dimensional image, and the UV coordinates define this conversion process.
  • each position in the acquisition process may have corresponding attribute information, usually RGB color values, which reflect the color of the object; for three-dimensional meshes, in addition to color, the attribute information corresponding to each vertex is also commonly the reflectance value, which reflects the surface material of the object.
  • the attribute information of the three-dimensional mesh is stored in a two-dimensional image, and its mapping from two-dimensional to three-dimensional is specified by UV coordinates.
  • the three-dimensional mesh data usually includes three-dimensional geometric coordinate information (x, y, z), geometric connection relationship, UV coordinates, attribute map, etc.
  • FIG. 3 is a schematic diagram of a three-dimensional grid encoding framework
  • FIG. 8 is a schematic diagram of a three-dimensional grid decoding framework.
  • the overall framework of a VDMC encoder is shown in Figure 3.
  • the basic mesh and the corresponding subdivided deformed mesh are first obtained through the basic mesh generation module.
  • the input mesh first obtains a simplified mesh through the simplification module, and then generates new texture coordinates for the simplified mesh through mesh parameterization.
  • the parameterized mesh is subdivided and deformed, that is, new vertices are inserted into the mesh according to a specific subdivision method and the distance from the vertex of the subdivided mesh to the nearest neighbor of the input mesh is calculated, which is called displacement, and the corresponding subdivided deformed mesh is obtained.
  • the parameterized mesh that is, the vertex position of the mesh before subdividing the deformation is adjusted according to the displacement information, and the adjusted mesh is called the basic mesh, which is sent to the basic mesh encoding module and compressed using the existing mesh encoder.
  • the basic mesh In the inter-frame mode, motion vectors can also be generated for each vertex of the basic mesh according to the reference frame, and the basic mesh module only needs to compress the motion vector.
  • the basic mesh generation module includes a mesh simplification module, a mesh parameterization module, and a subdivision deformation module. Each module is introduced below.
  • Mesh simplification is to simplify the current input mesh into a basic mesh with relatively few points and faces, and keep the shape of the original mesh as much as possible.
  • the focus of mesh simplification is the simplification operation and the corresponding merge error energy function.
  • a feasible mesh simplification operation is shown in Figure 4, which merges the vertices at both ends of the edge into one vertex and deletes the connection between the two vertices. Repeat this process in the entire mesh according to certain rules to reduce the number of faces and vertices of the mesh to the target value.
  • the mesh parameterization module is used to generate the corresponding texture coordinates for the mesh.
  • algorithms for parameterizing the mesh such as the Isochart algorithm, the orthogonal projection algorithm, etc.
  • both of the above schemes can be used to parameterize the reconstructed base mesh.
  • the Isochart algorithm uses spectral analysis to achieve stretch-driven 3D mesh parameterization, UV unfolding, slicing and packing the 3D mesh into a 2D texture domain.
  • a stretch threshold is set, and the algorithm is outlined as follows:
  • FIG. 5 The basic idea of the subdivision deformation module is shown in Figure 5, where the same concept is applied to the input 3D mesh to generate displacements.
  • the input 2D curve represented by a 2D polyline
  • the original curve is first downsampled to generate a basic curve/polyline, called the "simplified” curve.
  • the subdivision scheme is then applied to the simplified polyline to generate the "subdivided” curve.
  • the subdivided polyline is then deformed to get a better approximation of the original curve. That is, a displacement vector is calculated for each vertex of the subdivided mesh so that the shape of the displaced curve is as close to the shape of the original curve as possible.
  • These displacement vectors are the displacement information output by the module.
  • the subdivision deformation module takes the parameterized mesh as the input mesh and first subdivides the input mesh.
  • the subdivision scheme can be arbitrarily selected.
  • One possible scheme is the midpoint subdivision scheme, which subdivides each triangle into four subtriangles in each subdivision iteration, as shown in Figure 6. A new vertex is introduced in the middle of each edge.
  • the subdivision of geometric information and attribute information is performed independently because the connection relationship between geometric information and attribute information is usually different.
  • Texture compression module
  • the texture image compression module performs optional color space conversion and other processing on the converted texture image and then encodes it using a video encoder.
  • the basic grid decoding module performs corresponding decoding according to the grid coding format of the input code stream. If it is intra-frame mode, the corresponding static grid decoder indicated by the auxiliary information is used for decoding; if it is inter-frame mode, the corresponding motion vector is decoded and the corresponding basic grid is reconstructed according to the reference image in the grid buffer; if it is skip mode, the corresponding reference image in the grid buffer is directly used as the basic grid of the current image.
  • the texture coordinates generated by the current mesh parameterization do not match the reconstructed deformed mesh, which reduces the decoding accuracy and thus the decoding performance. Therefore, the texture coordinates of the reconstructed deformed mesh need to be adjusted to match the deformed geometric coordinates.
  • the embodiment of the present application provides a coding method that can measure the parametric distortion of the texture coordinates of the vertices in the reconstructed deformed mesh, and reduce the parametric distortion through a compensation algorithm.
  • the parametric quality compensation algorithm proposed in the embodiment of the present application can be applied to a video-based dynamic mesh coding framework to solve the parametric distortion caused by the change in the position of the mesh geometric vertices, thereby improving the quality of the reconstructed deformed mesh, and further improving the decoding accuracy and decoding performance.
  • the embodiment of the present application also provides a grid architecture of a codec system including a decoding method and an encoding method
  • FIG11 is a schematic diagram of a grid architecture of a codec provided by the embodiment of the present application.
  • the grid architecture includes one or more electronic devices 13 to 1N and a communication grid 01, wherein the electronic devices 13 to 1N can perform video interaction through the communication grid 01.
  • the electronic device can be various types of devices with codec functions, for example, the electronic device can include a mobile phone, a tablet computer, a personal computer, a personal digital assistant, a navigator, a digital phone, a video phone, a television, a sensor device, a server, etc., which are not specifically limited here.
  • the bitstream includes a first basic mesh bitstream.
  • the first basic mesh bitstream is determined by encoding the first basic mesh including texture coordinate information.
  • the decoder can directly parse the first basic mesh including texture coordinate information from the bitstream, thereby determining the first basic mesh and the texture coordinate information of the first basic mesh.
  • the decoder demultiplexes the bitstream to determine the bitstream of the basic mesh, and the decoder parses the bitstream of the basic mesh to determine the first basic mesh including texture coordinate information.
  • the displacement code stream is decoded by a displacement decoder, and at the same time, the corresponding level of decoding is performed according to the LoD level required by the decoding end. If the encoding end compresses the displacement by video encoding, the decoding end decodes it by a corresponding video decoder and restores it from the two-dimensional image in the corresponding order according to the arrangement scheme. Then, inverse transformation, inverse quantization and other operations are performed on it to restore the displacement consistent with the encoding end. If entropy encoding is adopted, it can be directly entropy decoded.
  • the code stream includes a second basic grid code stream and a texture coordinate code stream.
  • the second basic network code stream is determined by encoding the second basic grid that does not contain texture coordinate information.
  • the decoder demultiplexes the code stream to determine the second basic grid code stream and the texture coordinate code stream.
  • the decoder parses the second basic grid code stream to determine the second basic grid.
  • the process of parsing the second basic grid is consistent with the above-mentioned process description of parsing the first basic grid, and will not be repeated here.
  • the decoder parses the texture coordinate code stream to determine the texture coordinate information; based on the texture coordinate information, the second basic grid is reconstructed to determine the first basic grid and the texture coordinate information corresponding to the first basic grid.
  • S102 Perform mesh subdivision and deformation based on the first basic mesh to determine a reconstructed deformed mesh.
  • ⁇ a, b, c> represents the area of the triangle formed by the three vertices a, b, and c; for example, ⁇ p, p 2 , p 3 > represents the area of the triangle formed by the three vertices p p, p 2 , and p 3 .
  • the mapping is affine
  • its partial derivative is a constant at the two-dimensional coordinates (s, t) of point p.
  • the first partial derivative can be determined by calculating the partial derivative of S(p) at the coordinate s, as shown in formula (2), as follows.
  • the second partial derivative can be determined as shown in formula (3), as follows.
  • the partial derivative matrix corresponding to the vertex in the triangular patch is determined, such as determining the Jacobian matrix [S s , St ], and the larger singular value ⁇ max and the smaller singular value ⁇ min of the Jacobian matrix are determined by formula (4) and formula (5), which are used as the first singular value and the second singular value, respectively, as follows:
  • ⁇ max is the first singular value, and ⁇ max is used as the first length parameter to represent the maximum length obtained when a unit length vector is mapped from a two-dimensional texture domain to a three-dimensional surface, that is, the maximum local "stretch”.
  • ⁇ min is the second singular value, and ⁇ min is used as the second length parameter to represent the minimum length obtained when a unit length vector is mapped from a two-dimensional texture domain to a three-dimensional surface, that is, the minimum local "stretch”.
  • the first distortion measure L 2 (T) and/or the second distortion measure L ⁇ (T) can measure the parameterized distortion of the current vertex. For the current vertex, its corresponding texture coordinates need to be adjusted to minimize the parameterized distortion of the current vertex.
  • updating the texture coordinates of the current vertex according to the first distortion measure and/or the second distortion measure includes:
  • the texture coordinates of the current vertex are updated by minimizing the texture coordinate error, thereby determining the texture coordinate information of the reconstructed deformed mesh.
  • the triangle corresponding to the current vertex includes: at least one triangle adjacent to the current vertex;
  • the texture coordinate error includes: a first texture coordinate error and/or a second texture coordinate error;
  • the process of determining the initial center position point from at least one candidate position point by determining at least one candidate texture coordinate error corresponding to at least one candidate position point may include: determining at least one candidate texture coordinate error corresponding to at least one candidate position point; and determining an initial center position point according to a minimum value of at least one candidate texture coordinate error and a texture coordinate error corresponding to a current vertex.
  • the decoder uses the initial center position point as the starting point and performs at least one search within the search range to search for a position point with smaller candidate texture coordinates to update the texture coordinates.
  • search algorithms can be used, and the specific selection is based on actual conditions, which is not limited in the embodiments of the present application.
  • N is the search range and vt′ is the position point found each time.
  • the initial center position point is used as the starting point of each search, and the end point of each search is determined within the search range according to the search direction of each search; when the candidate texture coordinate error corresponding to the starting point is less than the candidate texture coordinate error corresponding to the end point, the end point is updated according to the midpoint between the starting point and the end point; when the candidate texture coordinate error corresponding to the starting point is greater than the corresponding candidate texture coordinate error of the end point, the starting point is updated according to the midpoint between the starting point and the end point; the above process is used for at least one update until it is determined that the distance between the updated starting point and the updated end point is less than a preset distance threshold, and the initial target position point corresponding to each search is determined according to the starting point and/or the end point.
  • the distance between the updated starting point and the updated ending point is less than a preset distance threshold at least once in each search, it is determined that the distance between the updated starting point and the updated ending point is less than the preset distance threshold.
  • a direction is randomly selected as the search direction.
  • the direction is selected by random number generation, and the randomly selected direction is more likely to find the optimal solution; the optimal value is gradually approached in the selected direction by bisection. That is, the errors corresponding to the two endpoints are calculated, the center of the circle is recorded as the starting point, and the other end is recorded as the end point. If the error of the starting point is less than the end point, the midpoint of the two end points is used as the end point; if the error of the starting point is greater than the end point, the midpoint of the two end points is used as the starting point, and then the error of the two end points is calculated for comparison.
  • S303 Determine a target position point according to a minimum candidate texture coordinate error corresponding to at least one initial target position point.
  • the initial target position point with the smallest error in the candidate texture coordinates among at least one initial target position point may be used as the determined target position point. It is understandable that the target position point is the position point with the smallest distortion within the search range of the current vertex.
  • the decoder updates the texture coordinates of the current vertex according to the texture coordinates of the target position point. Exemplarily, the texture coordinates of the current vertex are updated to the texture coordinates of the target position point.
  • the texture coordinates of the current vertex are updated according to the texture coordinates of the target position point with less distortion, thereby improving the matching degree between the texture coordinates of the current vertex and the current vertex, thereby improving the quality of reconstructing the deformed mesh, and further improving the decoding accuracy and decoding performance.
  • the current vertex is the vertex with the largest texture coordinate error in the sequence to be optimized.
  • the texture coordinate error corresponding to the current vertex in at least one vertex can be updated according to the target position point, and then the order of the vertices in the sequence to be optimized is updated; the texture coordinates of the vertices at the updated preset sequence positions are updated until the preset iteration target is reached, and the texture coordinate update of the reconstructed deformed mesh is completed.
  • a preset data structure such as a heap data structure
  • a heap data structure can be used to sort at least one vertex according to its texture coordinate error to obtain a sequence to be optimized of the heap data structure.
  • vertices with poor quality are placed at the top of the heap, while vertices with better quality are located at a lower position.
  • the vertex with the largest current texture coordinate error is taken from the top of the heap for optimization.
  • the texture coordinate errors of other vertices adjacent to the vertex are updated, and they are put back into the sequence to be optimized of the heap structure.
  • the number of updates of the sequence to be optimized reaches a preset update number threshold, and/or the texture coordinate error of the vertex at the preset sequence position is less than a preset error threshold, it is determined that the preset iteration target is reached, and the texture coordinate update of at least one vertex to be optimized in the reconstructed deformed mesh is completed.
  • the texture coordinates of the vertices in each layer of the reconstructed deformed mesh in at least one layer of the reconstructed deformed mesh can be updated. That is, the reconstructed deformed mesh processed each time includes: the i-th layer of the reconstructed deformed mesh corresponding to the base mesh; i is greater than 1.
  • FIG 19 shows a schematic flow chart of a coding method provided in an embodiment of the present application. As shown in Figure 19, the method may include:
  • an encoder framework corresponding to the above decoding method can be as described in the current VDMC encoding framework in FIG3. That is, the input mesh is subjected to the basic mesh generation step to obtain the basic mesh and the corresponding subdivided deformed mesh, and the basic mesh is compressed and reconstructed by the basic mesh compression module to obtain the reconstructed basic mesh. Then, according to the deformed mesh obtained in the basic mesh generation stage, the displacements between the corresponding vertices of the subdivided basic mesh and the corresponding subdivided deformed mesh are obtained, and the displacements are processed by coordinate system conversion, wavelet transformation, quantization, etc., and then arranged in the image and encoded by a video encoder or directly entropy encoded.
  • the texture coordinate information and the base grid can be encoded separately, and the bitstream corresponding to the base grid that does not contain the texture coordinate information (the second base grid bitstream corresponding to the decoder) and the bitstream corresponding to the texture coordinate information are determined separately.
  • the second basic mesh parsed from the basic bitstream can be reconstructed in the decoder by parsing the texture coordinate information in the bitstream to determine the first basic mesh, so as to improve the accuracy of the texture coordinates in the first basic mesh, thereby improving the coding and decoding accuracy and the coding and decoding performance.
  • the input mesh first passes through the basic mesh generation step to obtain a basic mesh, and the basic mesh is compressed and reconstructed by the basic mesh compression module to obtain a reconstructed basic mesh.
  • the texture coordinates obtained in the basic mesh generation stage can be restored according to the texture coordinate information of the current image, so this information can be passed to the decoding end to avoid directly encoding the texture coordinates.
  • the mesh is cleaned up, that is, duplicate points and degenerate surfaces are removed. Then, after the subdivision deformation step, the displacement between the corresponding vertices of the subdivided basic mesh and the corresponding subdivided deformed mesh is obtained, and the subsequent processing process is the same as the corresponding encoding process in FIG3.
  • the texture coordinate information can be determined based on the reconstructed base grid, and the texture coordinate information includes: texture coordinate information corresponding to the reconstructed base grid.
  • the encoder can reconstruct based on the coding bits of the base grid to determine the reconstructed base grid; perform mesh parameterization on the reconstructed base grid to determine the texture coordinate information; perform compression coding on the base grid to determine the coding bits corresponding to the base grid; encode the texture coordinate information to determine the coding bits corresponding to the texture coordinate information; and write the coding bits corresponding to the base grid and the coding bits corresponding to the texture coordinate information into the bitstream respectively.
  • the basic mesh is directly compressed to obtain a basic mesh code stream and a reconstructed basic mesh, and the reconstructed basic mesh is mesh parameterized to obtain a reconstructed mesh containing texture coordinates, and the texture coordinate information is also encoded as a basic mesh code stream.
  • the parameterized basic mesh is mesh cleaned to remove its duplicate vertices and degenerate faces, and a subdivision deformation operation is performed to obtain the corresponding displacement, and the subsequent processing process is the same as the corresponding encoding process in FIG3.
  • the encoder 190 may include a grid information determination part 1901 and an encoding part 1902, wherein:
  • the mesh generation part 1901 is configured to determine a base mesh corresponding to the current image; and determine texture coordinate information based on the base mesh;
  • the encoding part 1902 is configured to encode the basic grid and the texture coordinate information, and write the obtained encoding bits into a bit stream.
  • the texture coordinate information includes: texture coordinate information corresponding to the basic mesh; the mesh information determination part 1901 is further configured to perform mesh parameterization based on the basic mesh to determine the texture coordinate information.
  • the texture coordinate information includes: texture coordinate information corresponding to the reconstructed basic grid; the grid information determination part 1901 reconstructs based on the coding bits of the basic grid to determine the reconstructed basic grid; and grid parameterizes the reconstructed basic grid to determine the texture coordinate information.
  • the encoding part 1902 is further configured to encode the basic grid including the texture coordinate information, and write the obtained encoding bits into a bitstream.
  • part can be a part of a circuit, a part of a processor, a part of a program or software, etc., and of course it can also be a module, or it can be non-modular.
  • the components in the present embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional module.
  • the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of this embodiment is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product.
  • the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or grid device, etc.) or a processor to perform all or part of the steps of the method described in this embodiment.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
  • an embodiment of the present application provides a computer-readable storage medium, which is applied to the encoder 190.
  • the computer-readable storage medium stores a computer program, and when the computer program is executed by the first processor, the method described in any one of the aforementioned embodiments is implemented.
  • the encoder 190 may include: a first communication interface 2301, a first memory 2302 and a first processor 2303; each component is coupled together through a first bus system 2304. It can be understood that the first bus system 2304 is used to achieve connection and communication between these components. In addition to the data bus, the first bus system 2304 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, various buses are labeled as the first bus system 2304 in Figure 20. Among them,
  • the first communication interface 2301 is used for receiving and sending signals during the process of sending and receiving information with other external network elements;
  • a first memory 2302 used to store a computer program that can be run on the first processor 2303;
  • the first processor 2303 is configured to execute the encoding method applied to the encoder in the embodiment of the present application when running the computer program.
  • the first memory 2302 in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories.
  • the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory.
  • the volatile memory can be a random access memory (RAM), which is used as an external cache.
  • the first processor 2303 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the first processor 2303.
  • the above-mentioned first processor 2303 can be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field Programmable Gate Array
  • the methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed.
  • the general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
  • the processing unit can be implemented in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processors (Digital Signal Processing, DSP), digital signal processing devices (DSP Device, DSPD), programmable logic devices (Programmable Logic Device, PLD), field programmable gate arrays (Field-Programmable Gate Array, FPGA), general processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in this application or a combination thereof.
  • ASIC Application Specific Integrated Circuits
  • DSP Digital Signal Processing
  • DSP Device digital signal processing devices
  • PLD programmable logic devices
  • FPGA field programmable gate array
  • general processors controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in this application or a combination thereof.
  • the technology described in this application can be implemented by a module (such as a process, function, etc.) that performs the functions described in this application.
  • the software code can be stored in a memory and executed by a processor.
  • the memory can be implemented in the processor or outside the processor.
  • the first processor 2303 is further configured to execute the encoding method applied to the encoder described in any one of the aforementioned embodiments when running the computer program.
  • the decoder 240 may include the parsing part 2401 and the coordinate determination part 2403, wherein:
  • the parsing part 2401 is configured to parse the code stream to determine the first basic grid and the texture coordinate information of the first basic grid;
  • the subdivision and deformation part 2402 is configured to perform mesh subdivision and deformation based on the first basic mesh to determine a reconstructed deformed mesh
  • the coordinate determining part 2403 is configured to determine the texture coordinate information of the reconstructed deformed mesh based on the texture coordinate information of the first base mesh and the reconstructed deformed mesh.
  • the parsing part 2401 is further configured to demultiplex the code stream to determine a first basic grid code stream
  • the first basic grid code stream is parsed to determine the first basic grid including the texture coordinate information, thereby determining the first basic grid and the texture coordinate information of the first basic grid.
  • the parsing part 2401 is further configured to demultiplex the code stream to determine a second basic grid code stream and a texture coordinate code stream; parse the second basic grid code stream to determine a second basic grid; parse the texture coordinate code stream to determine texture coordinate information; reconstruct the second basic grid based on the texture coordinate information to determine the first basic grid and the texture coordinate information of the first basic grid.
  • the decoder 240 also includes a reconstruction part, which is configured to reconstruct the second basic grid according to the texture coordinate information to determine the basic grid containing the texture coordinate information; perform grid cleaning on the basic grid containing the texture coordinate information to determine the first basic grid and the texture coordinate information of the first basic grid.
  • the subdivision deformation part 2402 is further configured to perform grid subdivision based on the first basic grid to determine a basic subdivision grid; and determine the reconstructed deformed grid based on the basic subdivision grid and displacement information parsed from the bitstream.
  • the coordinate determination part 2403 is also configured to determine the initial texture coordinate information of the reconstructed deformed mesh based on the texture coordinate information of the first basic mesh and the basic subdivision mesh; determine a first distortion measure and/or a second distortion measure based on the initial texture coordinate information of the reconstructed deformed mesh; the first distortion measure represents the average stretching of the surface local distance of the triangular facets in the reconstructed deformed mesh from the three-dimensional coordinate space to the texture coordinate space; the second distortion measure represents the worst-case stretching of the triangular facets in the reconstructed deformed mesh from the three-dimensional coordinate space to the texture coordinate space; determine the texture coordinate information of the reconstructed deformed mesh according to the first distortion measure and/or the second distortion measure.
  • the coordinate determination part 2403 is also configured to determine the texture coordinates and three-dimensional coordinates of the triangular facets corresponding to the vertices in the reconstructed deformed mesh based on the initial texture coordinate information of the reconstructed mesh and the three-dimensional coordinate information of the reconstructed mesh; determine the first length parameter and the second length parameter according to the texture coordinates and the three-dimensional coordinates of the triangular facets; the first length parameter represents the minimum length corresponding to the mapping of a unit length vector from the texture coordinate space to the three-dimensional coordinate space; the second length parameter represents the maximum length corresponding to the mapping of a unit length vector from the texture coordinate space to the three-dimensional coordinate space; determine the first distortion measure according to the first length parameter and the second length parameter; and/or determine the second distortion measure according to the second length parameter.
  • the coordinate determination part 2403 is also configured to determine the first partial derivative and the second partial derivative according to the affine mapping between the texture coordinates of the triangular patch and the three-dimensional coordinates; determine the partial derivative matrix corresponding to the vertices in the triangular patch according to the first partial derivative and the second partial derivative; determine the first length parameter according to the first singular value corresponding to the partial derivative matrix; determine the second length parameter according to the second singular value corresponding to the partial derivative matrix; the first singular value is greater than the second singular value.
  • the coordinate determining part 2403 is further configured to determine the first distortion measure based on a first dot product corresponding to the first partial derivative and a second dot product corresponding to the second partial derivative.
  • the coordinate determination part 2403 is also configured to determine the texture coordinate error corresponding to the current vertex in the reconstructed deformed mesh based on the first distortion measure and/or the second distortion measure; and update the texture coordinates of the current vertex by minimizing the texture coordinate error, thereby determining the texture coordinate information of the reconstructed deformed mesh.
  • the triangular face corresponding to the current vertex includes: at least one triangular face adjacent to the current vertex;
  • the texture coordinate error includes: a first texture coordinate error and/or a second texture coordinate error;
  • the coordinate determination part 2403 is further configured to determine the first texture coordinate error according to the sum of the first distortion measure corresponding to the at least one triangular face;
  • the second texture coordinate error is determined according to a maximum second distortion measure corresponding to the at least one triangular patch.
  • the coordinate determination part 2403 is also configured to update the texture coordinates of the current vertex by minimizing the first texture coordinate error; or, to update the texture coordinates of the current vertex by minimizing the second texture coordinate error; or, to update the texture coordinates of the current vertex by minimizing the first texture coordinate error and the second texture coordinate error respectively.
  • the coordinate determination part 2403 is also configured to determine an initial center position point and a search range based on the current vertex; perform at least one search based on the initial center position point and the search range to determine at least one initial target position point; determine a target position point based on a minimum candidate texture coordinate error corresponding to at least one initial target position point; and update the texture coordinates of the current vertex based on the texture coordinates of the target position point.
  • the coordinate determination part 2403 is also configured to determine at least one candidate position point corresponding to the current vertex; determine the initial center position point from the at least one candidate position point by determining at least one candidate texture coordinate error corresponding to the at least one candidate position point; and determine the search range based on the initial center position point.
  • the coordinate determination part 2403 is also configured to determine at least one candidate texture coordinate error corresponding to the at least one candidate position point; and determine the initial center position point based on the minimum value of the at least one candidate texture coordinate error and the texture coordinate error corresponding to the current vertex.
  • the coordinate determination part 2403 is further configured to determine the search range with the initial center position point as the center and the minimum value of at least one distance from the initial center position point to the third edge of at least one adjacent face as the radius. In some embodiments, the coordinate determination part 2403 is further configured to determine the search direction of each search; based on the initial center position point, according to the search direction of each search, a binary search is performed within the search range to determine the initial target position point corresponding to each search, until at least one search is completed to determine the at least one initial target position point.
  • the coordinate determination part 2403 is also configured to determine the starting point as the initial target position point; or, determine the ending point as the initial target position point; or, determine the midpoint between the starting point and the ending point as the initial target position point; or, determine the point between the starting point and the ending point with the smallest error in the candidate texture coordinates as the target position point.
  • the coordinate determination part 2403 is also configured to update the texture coordinate error corresponding to the current vertex in the at least one vertex according to the target position point, and then update the order of the vertices in the sequence to be optimized; update the texture coordinates of the updated vertices at the preset sequence position until the preset iteration target is reached, thereby completing the reconstruction of the texture coordinate information of the deformed mesh.
  • the preset iteration target includes:
  • part can be a part of the circuit, a part of the processor, a part of the program or software, etc., and of course it can also be a module, or it can be non-modular.
  • the components in this embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional modules.
  • the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • this embodiment provides a computer-readable storage medium, which is applied to the decoder 240, and the computer-readable storage medium stores a computer program. When the computer program is executed by the second processor, the method described in any one of the above embodiments is implemented.
  • the decoder 240 may include: a second communication interface 2501, a second memory 2502 and a second processor 2503; each component is coupled together through a second bus system 2504. It can be understood that the second bus system 2504 is used to achieve connection and communication between these components.
  • the second bus system 2504 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, various buses are marked as the second bus system 2504 in Figure 25. Among them,
  • the second communication interface 2501 is used for receiving and sending signals during the process of sending and receiving information with other external network elements;
  • the second processor 2503 is used to execute the decoding method applied to the decoder provided in the embodiment of the present application when running the computer program.
  • the second processor 2503 is further configured to execute any one of the methods described in the foregoing embodiments when running the computer program.
  • a schematic diagram of the composition structure of a coding and decoding system provided in an embodiment of the present application is shown.
  • a coding and decoding system 260 may include an encoder 2601 and a decoder 2602 .
  • the encoder 2601 may be the encoder described in any one of the aforementioned embodiments
  • the decoder 2602 may be the decoder described in any one of the aforementioned embodiments.
  • the distortion of the texture coordinates of the vertices in the reconstructed deformed grid is measured by two measures: the average stretching of the surface local distance of the triangular face from the three-dimensional coordinate space to the texture coordinate space and/or the worst-case stretching of the triangular face from the three-dimensional coordinate space to the texture coordinate space, and the texture coordinates of the vertices are adjusted according to the distortion, the texture coordinates of the vertices are updated, the accuracy of the texture coordinates and the matching degree between the reconstructed deformed grid are improved, thereby improving the quality of the reconstructed deformed grid, and then improving the decoding performance. Furthermore, by separately encoding the texture coordinate information through the encoder and sending it to the decoder, the distortion of the texture coordinate information is reduced, the encoding and decoding accuracy is further improved, and thus the encoding and decoding performance is improved.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Generation (AREA)

Abstract

Disclosed in the embodiments of the present application are a coding method, a decoding method, a code stream, a coder, a decoder, and a storage medium, which can improve decoding accuracy, thereby improving decoding performance. The decoding method comprises: parsing a code stream to determine a first base mesh and texture coordinate information of the first base mesh; on the basis of the first base mesh, performing mesh subdivision and deformation to determine a reconstructed deformed mesh; and on the basis of the texture coordinate information of the first base mesh and the reconstructed deformed mesh, determining texture coordinate information of the reconstructed deformed mesh.

Description

编解码方法、码流、编码器、解码器以及存储介质Coding and decoding method, code stream, encoder, decoder and storage medium 技术领域Technical Field

本申请涉及视频编解码技术领域,尤其涉及一种编解码方法、码流、编码器、解码器以及存储介质。The present application relates to the field of video coding and decoding technology, and in particular to a coding and decoding method, a bit stream, an encoder, a decoder and a storage medium.

背景技术Background Art

基于视频的动态网格编码(Video-based Dynamic Mesh Coding,VDMC)是一种用于压缩三维网格的标准,其主要是通过利用已有的基于视频的视觉体积编码(Visual Volumetric Video-based Coding,V3C)标准对三维网格进行压缩,由于三维网格存在连接信息的编码,因此具体的编码流程与V3C略有不同。Video-based Dynamic Mesh Coding (VDMC) is a standard for compressing three-dimensional meshes. It mainly compresses three-dimensional meshes by leveraging the existing Visual Volumetric Video-based Coding (V3C) standard. Since three-dimensional meshes have encoding of connection information, the specific encoding process is slightly different from V3C.

然而,在三维网格的编解码过程中,网格参数化所生成的纹理坐标与重建变形网格不匹配,从而降低了解码准确性,影响了解码性能。However, during the encoding and decoding process of 3D meshes, the texture coordinates generated by mesh parameterization do not match the reconstructed deformed mesh, which reduces the decoding accuracy and affects the decoding performance.

发明内容Summary of the invention

本申请提供一种编解码方法、码流、编码器、解码器以及存储介质,可以提升解码准确性,提高解码性能。The present application provides a coding and decoding method, a bit stream, an encoder, a decoder and a storage medium, which can improve decoding accuracy and improve decoding performance.

本申请的技术方案可以如下实现:The technical solution of this application can be implemented as follows:

第一方面,本申请实施例提供了一种解码方法,应用于解码器,该方法包括:In a first aspect, an embodiment of the present application provides a decoding method, which is applied to a decoder, and the method includes:

解析码流,确定第一基础网格以及第一基础网格的纹理坐标信息;Parse the code stream to determine the first basic grid and texture coordinate information of the first basic grid;

基于所述第一基础网格进行网格细分与变形,确定重建变形网格;Performing mesh subdivision and deformation based on the first basic mesh to determine a reconstructed deformed mesh;

基于所述第一基础网格的纹理坐标信息与所述重建变形网格,确定所述重建变形网格的纹理坐标信息。The texture coordinate information of the reconstructed deformed mesh is determined based on the texture coordinate information of the first basic mesh and the reconstructed deformed mesh.

第二方面,本申请实施例提供了一种编码方法,应用于编码器,该方法包括:In a second aspect, an embodiment of the present application provides an encoding method, which is applied to an encoder, and the method includes:

确定当前图像对应的基础网格;Determine the base grid corresponding to the current image;

基于所述基础网格,确定纹理坐标信息;Based on the base mesh, determining texture coordinate information;

对所述基础网格以及所述纹理坐标信息进行编码,将得到的编码比特写入码流。The basic grid and the texture coordinate information are encoded, and the obtained encoding bits are written into a bit stream.

第三方面,本申请实施例提供了一种码流,该码流是根据待编码信息进行比特编码生成的;其中,待编码信息包括下述至少一项:In a third aspect, an embodiment of the present application provides a code stream, which is generated by bit encoding according to information to be encoded; wherein the information to be encoded includes at least one of the following:

基础网格与纹理坐标信息。Base mesh and texture coordinate information.

第四方面,本申请实施例提供了一种编码器,包括In a fourth aspect, an embodiment of the present application provides an encoder, comprising

网格信息确定部分,配置为确定当前图像对应的基础网格;基于所述基础网格,确定纹理坐标信息;The grid information determination part is configured to determine a basic grid corresponding to the current image; and determine texture coordinate information based on the basic grid;

编码部分,配置为对所述基础网格以及所述纹理坐标信息进行编码,将得到的编码比特写入码流。The encoding part is configured to encode the basic grid and the texture coordinate information, and write the obtained encoding bits into a bit stream.

第五方面,本申请实施例提供了一种编码器,包括第一存储器和第一处理器,其中:In a fifth aspect, an embodiment of the present application provides an encoder, including a first memory and a first processor, wherein:

第一存储器,用于存储能够在第一处理器上运行的计算机程序;A first memory, for storing a computer program that can be run on the first processor;

第一处理器,用于在运行计算机程序时,执行如第二方面所述的方法。The first processor is used to execute the method described in the second aspect when running a computer program.

第六方面,本申请实施例提供了一种解码器,包括In a sixth aspect, an embodiment of the present application provides a decoder, comprising

解析部分,配置为解析码流,确定第一基础网格以及第一基础网格的纹理坐标信息;A parsing part, configured to parse the code stream to determine the first basic grid and texture coordinate information of the first basic grid;

细分变形部分,配置为基于所述第一基础网格进行网格细分与变形,确定重建变形网格;A subdivision and deformation part is configured to perform mesh subdivision and deformation based on the first basic mesh to determine a reconstructed deformed mesh;

坐标确定部分,配置为基于所述第一基础网格的纹理坐标信息与所述重建变形网格,确定所述重建变形网格的纹理坐标信息。The coordinate determination part is configured to determine the texture coordinate information of the reconstructed deformed mesh based on the texture coordinate information of the first basic mesh and the reconstructed deformed mesh.

第七方面,本申请实施例提供了一种解码器,包括第二存储器和第二处理器,其中:In a seventh aspect, an embodiment of the present application provides a decoder, including a second memory and a second processor, wherein:

第二存储器,用于存储能够在第二处理器上运行的计算机程序;A second memory for storing a computer program that can be run on a second processor;

第二处理器,用于在运行计算机程序时,执行如第一方面所述的方法。The second processor is used to execute the method described in the first aspect when running a computer program.

第八方面,本申请实施例提供了一种计算机可读存储介质,该计算机可读存储介质存储有计算机程序,所述计算机程序被执行时实现如第一方面所述的方法、或者实现如第二方面所述的方法。In an eighth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed, it implements the method as described in the first aspect, or implements the method as described in the second aspect.

本申请实施例提供了一种编解码方法、码流、编码器、解码器以及存储介质,在解码端,解析码流,确定第一基础网格以及第一基础网格的纹理坐标信息;基于第一基础网格进行网格细分与变形,确定重建变形网格;基于第一基础网格的纹理坐标信息与重建变形网格,确定重建变形网格的纹理坐标信息。 如此,基于第一基础网格的纹理坐标信息与细分变形得到的与重建变形网格确定重建变形网格的纹理坐标信息,减少了顶点的纹理坐标的失真,提高了纹理坐标的准确性以及与重建变形网格之间的匹配度,从而提高了重建变形网格的质量,提高了解码性能。The embodiments of the present application provide a coding and decoding method, a bit stream, an encoder, a decoder and a storage medium. At the decoding end, the bit stream is parsed to determine a first basic grid and texture coordinate information of the first basic grid; grid subdivision and deformation are performed based on the first basic grid to determine a reconstructed deformed grid; based on the texture coordinate information of the first basic grid and the reconstructed deformed grid, the texture coordinate information of the reconstructed deformed grid is determined. In this way, the texture coordinate information of the reconstructed deformed mesh is determined based on the texture coordinate information of the first basic mesh and the reconstructed deformed mesh obtained by subdivision deformation, thereby reducing the distortion of the texture coordinates of the vertices and improving the accuracy of the texture coordinates and the matching degree with the reconstructed deformed mesh, thereby improving the quality of the reconstructed deformed mesh and improving the decoding performance.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1A为三维网格图像示意图一;FIG1A is a schematic diagram of a three-dimensional grid image 1;

图1B为三维网格图像的局部放大示意图;FIG1B is a partial enlarged schematic diagram of a three-dimensional grid image;

图2为三维网格的连接方式示意图;FIG2 is a schematic diagram of a connection method of a three-dimensional grid;

图3为一种基于细分变形的三维网格编码框架示意图;FIG3 is a schematic diagram of a three-dimensional mesh coding framework based on subdivision deformation;

图4为本申请实施例提供的一种网格简化操作的实现过程示意图;FIG4 is a schematic diagram of an implementation process of a grid simplification operation provided in an embodiment of the present application;

图5为本申请实施例提供的一种位移矢量计算的实现过程示意图;FIG5 is a schematic diagram of an implementation process of displacement vector calculation provided in an embodiment of the present application;

图6为本申请实施例提供的一种细分操作的实现过程示意图;FIG6 is a schematic diagram of an implementation process of a subdivision operation provided in an embodiment of the present application;

图7为本申请实施例提供的一种纹理图转换的实现过程示意图;FIG7 is a schematic diagram of an implementation process of texture map conversion provided by an embodiment of the present application;

图8为一种基于细分变形的三维网格解码框架示意图;FIG8 is a schematic diagram of a three-dimensional mesh decoding framework based on subdivision deformation;

图9为本申请实施例提供的基础网格顶点位置变化示意图;FIG9 is a schematic diagram of the position change of the base mesh vertices provided in an embodiment of the present application;

图10为本申请实施例提供的一种基础细分网格与重建变形网格之间的网格形状对比示意图;FIG10 is a schematic diagram of a mesh shape comparison between a basic subdivided mesh and a reconstructed deformed mesh provided in an embodiment of the present application;

图11为本申请实施例提供的一种编解码的网格架构示意图;FIG11 is a schematic diagram of a mesh architecture of a codec provided in an embodiment of the present application;

图12为本申请实施例提供的一种解码方法的流程示意图一;FIG12 is a flowchart diagram 1 of a decoding method provided in an embodiment of the present application;

图13为本申请实施例提供的一种三维网格解码框架示意图一;FIG13 is a schematic diagram of a three-dimensional grid decoding framework provided in an embodiment of the present application;

图14为本申请实施例提供的一种三维网格解码框架示意图二;FIG14 is a second schematic diagram of a three-dimensional grid decoding framework provided in an embodiment of the present application;

图15为本申请实施例提供的一种解码方法的流程示意图一;FIG15 is a flowchart diagram 1 of a decoding method provided in an embodiment of the present application;

图16为本申请实施例提供的一种解码方法的流程示意图一;FIG16 is a flowchart diagram 1 of a decoding method provided in an embodiment of the present application;

图17为本申请实施例提供的一种至少一个候选位置点的可选的示意图;FIG17 is an optional schematic diagram of at least one candidate location point provided in an embodiment of the present application;

图18为本申请实施例提供的一种搜索范围的可选的示意图;FIG18 is a schematic diagram of an optional search range provided in an embodiment of the present application;

图19为本申请实施例提供的一种编码方法的流程示意图;FIG19 is a schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application;

图20为本申请实施例提供的一种三维网格编码框架示意图一;FIG20 is a schematic diagram of a three-dimensional grid coding framework provided in an embodiment of the present application;

图21为本申请实施例提供的一种三维网格编码框架示意图二;FIG21 is a second schematic diagram of a three-dimensional grid coding framework provided in an embodiment of the present application;

图22为本申请实施例提供的一种编码器的组成结构示意图;FIG22 is a schematic diagram of the composition structure of an encoder provided in an embodiment of the present application;

图23为本申请实施例提供的一种编码器的具体硬件结构示意图;FIG23 is a schematic diagram of a specific hardware structure of an encoder provided in an embodiment of the present application;

图24为本申请实施例提供的一种解码器的组成结构示意图;FIG24 is a schematic diagram of the structure of a decoder provided in an embodiment of the present application;

图25为本申请实施例提供的一种解码器的具体硬件结构示意图;FIG25 is a schematic diagram of a specific hardware structure of a decoder provided in an embodiment of the present application;

图26为本申请实施例提供的一种编解码系统的组成结构示意图。FIG. 26 is a schematic diagram of the composition structure of a coding and decoding system provided in an embodiment of the present application.

具体实施方式DETAILED DESCRIPTION

为了能够更加详尽地了解本申请实施例的特点与技术内容,下面结合附图对本申请实施例的实现进行详细阐述,所附附图仅供参考说明之用,并非用来限定本申请实施例。In order to enable a more detailed understanding of the features and technical contents of the embodiments of the present application, the implementation of the embodiments of the present application is described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present application.

除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中所使用的术语只是为了描述本申请实施例的目的,不是旨在限制本申请。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

在以下的描述中,涉及到“一些实施例”,其描述了所有可能实施例的子集,但是可以理解,“一些实施例”可以是所有可能实施例的相同子集或不同子集,并且可以在不冲突的情况下相互结合。In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

还需要指出,本申请实施例所涉及的术语“第一\第二\第三”仅是用于区别类似的对象,不代表针对对象的特定排序,可以理解地,“第一\第二\第三”在允许的情况下可以互换特定的顺序或先后次序,以使这里描述的本申请实施例能够以除了在这里图示或描述的以外的顺序实施。It should also be pointed out that the terms "first\second\third" involved in the embodiments of the present application are only used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.

需要说明的是,可以允许在同一视频场景中解码和合成不同的数据格式比特流。其中,至少可以包括图像格式、点云(Point Cloud)格式、网格(Mesh)格式。通过这种方式,可以为具有不同来源的多个数据格式(例如,网格、点云、图像等等)提供实时沉浸式视频交互服务。It should be noted that different data format bitstreams can be decoded and synthesized in the same video scene. Among them, at least image format, point cloud format, and mesh format can be included. In this way, real-time immersive video interaction services can be provided for multiple data formats (for example, mesh, point cloud, image, etc.) with different sources.

在本申请实施例中,基于数据格式的方法可以允许以数据格式的比特流级进行独立性处理。即与视频编码中的瓦片(tiles)或切片(slices)一样,该场景中的不同数据格式可以以独立的方式编码,从而可以基于数据格式进行独立的编码和解码。 In the embodiment of the present application, the data format-based method can allow independent processing at the bitstream level of the data format. That is, like tiles or slices in video encoding, different data formats in the scene can be encoded in an independent manner, so that independent encoding and decoding can be performed based on the data format.

一般而言,三维动画内容采用基于关键帧的表示方法,即每帧是一个静态网格。不同时刻的静态网格具有相同的拓扑结构和不同的几何结构。但是,基于关键帧表示的三维动态网格的数据量特别大,因此如何能够有效的存储、传输和绘制成为三维动态网格发展所面临的问题。另外针对不同的用户终端(电脑、笔记本、便携式设备、手机)需要支持网格的空间可伸缩性;不同的网格带宽(宽带、窄带、无线)需要支持网格的质量可伸缩性。因此,三维动态网格压缩是一个非常关键的问题。其中,“一帧”可以理解为一幅图像。示例性地,关键帧可以理解为三维动画中的一幅关键图像。Generally speaking, 3D animation content uses a keyframe-based representation method, that is, each frame is a static mesh. Static meshes at different times have the same topological structure and different geometric structures. However, the amount of data of the 3D dynamic mesh represented based on keyframes is particularly large, so how to effectively store, transmit and draw it has become a problem faced by the development of 3D dynamic meshes. In addition, the spatial scalability of the mesh needs to be supported for different user terminals (computers, notebooks, portable devices, mobile phones); different mesh bandwidths (broadband, narrowband, wireless) need to support the quality scalability of the mesh. Therefore, 3D dynamic mesh compression is a very critical issue. Among them, "one frame" can be understood as an image. For example, a keyframe can be understood as a key image in a 3D animation.

三维网格是通过空间中的无数个多边形组成的三维物体表面,多边形由顶点和边组成,图1A展示了三维网格图像,图1B展示了三维网格图像的局部放大示意图。根据图1A和图1B可以看到网格表面是由闭合多边形所组成的。A 3D grid is a 3D object surface composed of numerous polygons in space. A polygon consists of vertices and edges. FIG1A shows a 3D grid image, and FIG1B shows a partially enlarged schematic diagram of a 3D grid image. It can be seen from FIG1A and FIG1B that the grid surface is composed of closed polygons.

二维图像在每一个像素点均有信息表达,分布规则,因此不需要额外记录其位置信息;然而网格中的顶点在三维空间中的分布具有随机性和不规则性,以及多边形的构成方式需要进行额外的规定,因此需要记录每一个顶点在空间中的位置,以及每个多边形的连接信息,才能完整地表达一幅网格图像,如图2所示,同样的顶点数目和顶点位置,由于连接方式的不同,所形成的表面也完全不同。A two-dimensional image has information expressed at each pixel point and is distributed regularly, so there is no need to record its position information additionally; however, the distribution of vertices in the mesh in three-dimensional space is random and irregular, and the way polygons are formed requires additional regulations. Therefore, it is necessary to record the position of each vertex in space and the connection information of each polygon in order to fully express a mesh image. As shown in Figure 2, the same number of vertices and vertex positions, due to different connection methods, form completely different surfaces.

除了以上信息之外,由于三维网格图像通常采用已有的二维图像/视频编码方式进行编码,因此需要将三维网格进行从三维空间到二维图像的转化,UV坐标就定义了这一转化过程。In addition to the above information, since the three-dimensional grid image is usually encoded using an existing two-dimensional image/video encoding method, the three-dimensional grid needs to be converted from three-dimensional space to a two-dimensional image, and the UV coordinates define this conversion process.

与二维图像类似,采集过程中每一个位置可能会有对应的属性信息,通常为RGB颜色值,颜色值反映物体的色彩;对于三维网格来说,每一个顶点所对应的属性信息除了颜色以外,还有比较常见的是反射率(reflectance)值,反射率值反映物体的表面材质。三维网格的属性信息通过二维图像进行存储,其从二维到三维的映射由UV坐标规定。其中,三维网格数据通常包括三维几何坐标信息(x,y,z)、几何连接关系、UV坐标以及属性图等等。Similar to two-dimensional images, each position in the acquisition process may have corresponding attribute information, usually RGB color values, which reflect the color of the object; for three-dimensional meshes, in addition to color, the attribute information corresponding to each vertex is also commonly the reflectance value, which reflects the surface material of the object. The attribute information of the three-dimensional mesh is stored in a two-dimensional image, and its mapping from two-dimensional to three-dimensional is specified by UV coordinates. Among them, the three-dimensional mesh data usually includes three-dimensional geometric coordinate information (x, y, z), geometric connection relationship, UV coordinates, attribute map, etc.

还需要说明的是,基于视频的动态网格编码(Video-based Dynamic Mesh Coding,VDMC)是运动图像专家组(Moving Pictures Experts Group,MPEG)制定的用于压缩三维网格的标准,其主要思想是通过利用已有的基于视频的视觉体积编码(Visual Volumetric Video-based Coding,V3C)标准对三维网格进行压缩,由于三维网格存在连接信息需要编码,因此其具体的编码流程与V3C略有不同,需要对V3C标准解码端的语法语义以及解码操作进行扩展以支持三维网格的解码重建。It should also be noted that Video-based Dynamic Mesh Coding (VDMC) is a standard developed by the Moving Pictures Experts Group (MPEG) for compressing three-dimensional meshes. Its main idea is to compress three-dimensional meshes by utilizing the existing Visual Volumetric Video-based Coding (V3C) standard. Since there is connection information in the three-dimensional mesh that needs to be encoded, its specific encoding process is slightly different from V3C. It is necessary to expand the syntax and semantics of the V3C standard decoding end and the decoding operation to support the decoding and reconstruction of three-dimensional meshes.

图3为一种三维网格编码框架示意图,图8为一种三维网格解码框架示意图。FIG. 3 is a schematic diagram of a three-dimensional grid encoding framework, and FIG. 8 is a schematic diagram of a three-dimensional grid decoding framework.

目前,VDMC的一种编码器的整体框架如图3所示,对于输入网格,首先通过基础网格生成模块得到基础网格以及对应的细分变形网格。其中,输入网格首先通过简化模块得到简化后的网格,然后通过网格参数化为简化后的网格生成新的纹理坐标,随后对参数化后的网格进行细分变形,即按照特定的细分方法在网格上插入新的顶点并计算细分后网格顶点到输入网格最近邻点的距离——称为位移,并得到相应的细分变形网格。随后,根据位移信息调整参数化后的网格,即细分变形前的网格的顶点位置,并将调整后的网格称为基础网格,将其送入基础网格编码模块,利用已有的网格编码器对其进行压缩,在帧间模式下,还可以根据参考帧为基础网格每个顶点生成运动向量,基础网格模块仅压缩运动向量即可。At present, the overall framework of a VDMC encoder is shown in Figure 3. For the input mesh, the basic mesh and the corresponding subdivided deformed mesh are first obtained through the basic mesh generation module. Among them, the input mesh first obtains a simplified mesh through the simplification module, and then generates new texture coordinates for the simplified mesh through mesh parameterization. Then, the parameterized mesh is subdivided and deformed, that is, new vertices are inserted into the mesh according to a specific subdivision method and the distance from the vertex of the subdivided mesh to the nearest neighbor of the input mesh is calculated, which is called displacement, and the corresponding subdivided deformed mesh is obtained. Subsequently, the parameterized mesh, that is, the vertex position of the mesh before subdividing the deformation is adjusted according to the displacement information, and the adjusted mesh is called the basic mesh, which is sent to the basic mesh encoding module and compressed using the existing mesh encoder. In the inter-frame mode, motion vectors can also be generated for each vertex of the basic mesh according to the reference frame, and the basic mesh module only needs to compress the motion vector.

基础网格在编码后进行重建,然后根据重建后的基础网格与基础网格生成阶段得到的细分变形网格计算位移。随后,将位移信息进行变换、量化等处理,然后可以将处理后的位移通过视频编码器或熵编码器进行编码。然后,将重建的位移信息应用于细分后的基础网格得到重建的细分变形的网格,将该网格以及原始输入网格及其对应的纹理图输入对应的纹理图转换模块得到重建网格对应的纹理图,将该纹理图同样利用视频编码器进行编码。The base mesh is reconstructed after encoding, and then the displacement is calculated based on the reconstructed base mesh and the subdivided deformed mesh obtained in the base mesh generation stage. Subsequently, the displacement information is transformed, quantized, and the processed displacement can be encoded through a video encoder or an entropy encoder. Then, the reconstructed displacement information is applied to the subdivided base mesh to obtain a reconstructed subdivided deformed mesh, and the mesh, the original input mesh, and its corresponding texture map are input into the corresponding texture map conversion module to obtain the texture map corresponding to the reconstructed mesh, and the texture map is also encoded using a video encoder.

下面,对编码器中的主要模块进行说明。Next, the main modules in the encoder are described.

1、基础网格生成模块:1. Basic mesh generation module:

基础网格生成模块包括网格简化模块、网格参数化模块以及细分变形模块,下面对每个模块进行介绍。The basic mesh generation module includes a mesh simplification module, a mesh parameterization module, and a subdivision deformation module. Each module is introduced below.

(1)网格简化模块:(1) Mesh simplification module:

网格简化是将当前输入的网格简化到一个点数和面数相对较少的基础网格,并且尽可能地保持原始网格的形状。网格简化的重点在于简化的操作以及对应的合并误差能量函数。一种可行的网格简化操作如图4所示,将边两端的顶点合并为一个顶点并删除这两个顶点间的连接。在整个网格中按照一定规则重复这一过程将网格的面数和顶点数减少到目标值。Mesh simplification is to simplify the current input mesh into a basic mesh with relatively few points and faces, and keep the shape of the original mesh as much as possible. The focus of mesh simplification is the simplification operation and the corresponding merge error energy function. A feasible mesh simplification operation is shown in Figure 4, which merges the vertices at both ends of the edge into one vertex and deletes the connection between the two vertices. Repeat this process in the entire mesh according to certain rules to reduce the number of faces and vertices of the mesh to the target value.

(2)网格参数化模块:(2) Grid parameterization module:

网格参数化模块用于为网格生成相应的纹理坐标,目前已有许多算法用来对网格进行参数化,如Isochart算法,正交投影算法等。在该编码框架中,上述两种方案均可以用于对重建的基础网格进行参数化。 The mesh parameterization module is used to generate the corresponding texture coordinates for the mesh. Currently, there are many algorithms for parameterizing the mesh, such as the Isochart algorithm, the orthogonal projection algorithm, etc. In this coding framework, both of the above schemes can be used to parameterize the reconstructed base mesh.

其中,Isochart算法使用谱分析实现拉伸驱动的三维网格参数化,将三维网格进行UV展开、分片并打包到二维纹理域。设定一个拉伸阈值,其算法概述如下:Among them, the Isochart algorithm uses spectral analysis to achieve stretch-driven 3D mesh parameterization, UV unfolding, slicing and packing the 3D mesh into a 2D texture domain. A stretch threshold is set, and the algorithm is outlined as follows:

a)计算表面谱分析,提供一个初始参数化a) Compute surface spectral analysis to provide an initial parameterization

b)执行拉伸优化的迭代b) Perform stretch optimization iterations

c)如果此派生参数化的拉伸小于阈值,则停止c) If the stretch of this derived parameterization is less than a threshold, stop

d)执行表面谱聚类来将表面划分为chartsd) Perform surface spectral clustering to divide the surface into charts

e)使用graph cut算法优化chart边界e) Use graph cut algorithm to optimize chart boundaries

f)迭代分割charts直到满足拉伸准则f) Iterate the splitting of charts until the stretching criteria are met

其中,正交投影算法可以包括orthoAtlas算法,orthoAtlas算法是一种基于投影的网格参数化方法,它通过正交投影为网格生成纹理坐标。它的主要过程包括:Among them, the orthogonal projection algorithm may include the orthoAtlas algorithm, which is a projection-based mesh parameterization method that generates texture coordinates for the mesh through orthogonal projection. Its main process includes:

a)计算网格属性,包括每个面的邻接面以及每个面的面积和法向量;a) Calculate mesh properties, including the neighboring faces of each face and the area and normal vector of each face;

b)根据法向量,确定每个面的投影平面;b) Determine the projection plane of each face based on the normal vector;

c)开始根据投影平面将所有面进行聚类构成一个连通区域,首先选取聚类的起始面;c) Start clustering all faces according to the projection plane to form a connected region, and first select the starting face of the cluster;

d)从起始面开始迭代,确定加入连通区域的面的邻接面是否可以加入连通区域;d) Iterating from the starting face, determining whether the adjacent faces of the face added to the connected region can be added to the connected region;

e)每个连通区域迭代完成后,获得多个连通区域;e) After each connected region is iterated, multiple connected regions are obtained;

f)根据误差度量确定是否合并邻接的连通区域;f) determining whether to merge adjacent connected regions based on the error metric;

g)检测投影时是否存在重叠区域,将重叠的面拆除并重新生成连通区域;g) Detect whether there are overlapping areas during projection, remove the overlapping surfaces and regenerate the connected areas;

h)将投影后的所有区域排列到一张二维图像中。h) Arrange all the projected regions into a two-dimensional image.

(3)细分变形模块:(3) Subdivision deformation module:

细分变形模块的基本思想如图5所示,相同的概念应用于输入3D网格以生成位移。在图5中,输入的2D曲线(由2D折线表示),称为“原始”曲线,首先进行下采样以生成基本曲线/折线,称为“简化”曲线。然后将细分方案应用于简化得到的多段线以生成“细分”曲线。随后对细分的多段线进行变形,以获得更好的原始曲线近似值。即为细分网格的每个顶点计算位移矢量,使位移曲线的形状尽可能接近原始曲线的形状。这些位移矢量就是该模块输出的位移信息。The basic idea of the subdivision deformation module is shown in Figure 5, where the same concept is applied to the input 3D mesh to generate displacements. In Figure 5, the input 2D curve (represented by a 2D polyline), called the "original" curve, is first downsampled to generate a basic curve/polyline, called the "simplified" curve. The subdivision scheme is then applied to the simplified polyline to generate the "subdivided" curve. The subdivided polyline is then deformed to get a better approximation of the original curve. That is, a displacement vector is calculated for each vertex of the subdivided mesh so that the shape of the displaced curve is as close to the shape of the original curve as possible. These displacement vectors are the displacement information output by the module.

细分变形模块将参数化后的网格作为输入网格,首先将输入网格进行细分,细分方案可以任意选取,一种可能的方案为中点细分方案,它在每次细分迭代中将每个三角形细分为四个子三角形,如图6所示。在每条边的中间引入新的顶点,几何信息与属性信息的细分是独立进行的,因为几何信息与属性信息的连接关系通常是不同的。The subdivision deformation module takes the parameterized mesh as the input mesh and first subdivides the input mesh. The subdivision scheme can be arbitrarily selected. One possible scheme is the midpoint subdivision scheme, which subdivides each triangle into four subtriangles in each subdivision iteration, as shown in Figure 6. A new vertex is introduced in the middle of each edge. The subdivision of geometric information and attribute information is performed independently because the connection relationship between geometric information and attribute information is usually different.

对于细分后的网格,寻找其每个点在原始输入网格上的最近邻点(包括原始网格面上的点),可以通过kdTree等数据结构加速查找。通过计算细分网格上的每个顶点和其在原始输入网格上的最近邻点几何坐标之间的距离得到细分网格每个顶点的几何坐标的位移。该模块可以得到基础网格以及对应的细分变形后的网格。For the subdivided mesh, find the nearest neighbor of each point on the original input mesh (including the points on the original mesh surface), which can be accelerated by data structures such as kdTree. The displacement of the geometric coordinates of each vertex of the subdivided mesh is obtained by calculating the distance between each vertex on the subdivided mesh and its nearest neighbor on the original input mesh. This module can obtain the base mesh and the corresponding subdivided deformed mesh.

2、基础网格压缩模块:2. Basic grid compression module:

基础网格压缩有三种不同的压缩模式,分别为帧内模式和帧间模式以及skip(跳过)模式,在帧内模式下,基础网格压缩模块的输入为一个三维网格,包含几何坐标、连接关系以及与顶点关联的属性信息,通过已有的静态网格编码器进行编码。在帧间模式下,基础网格首先通过RDO(率失真权衡)决定是否采用skip模式,若采用skip模式,则直接选取网格缓冲区中的参考网格作为当前图像基础网格。若未采用skip模式,则根据网格缓冲区中的参考图像与当前图像计算顶点的运动向量,并编码相应的运动向量。在编码后,需要对编码的网格进行重建,从而提供给后续的模块进行处理。There are three different compression modes for basic mesh compression, namely intra-frame mode, inter-frame mode and skip mode. In intra-frame mode, the input of the basic mesh compression module is a three-dimensional mesh, which contains geometric coordinates, connection relationships and attribute information associated with vertices, and is encoded through the existing static mesh encoder. In inter-frame mode, the basic mesh first uses RDO (rate-distortion trade-off) to decide whether to use skip mode. If skip mode is used, the reference mesh in the mesh buffer is directly selected as the basic mesh of the current image. If skip mode is not used, the motion vector of the vertex is calculated based on the reference image in the mesh buffer and the current image, and the corresponding motion vector is encoded. After encoding, the encoded mesh needs to be reconstructed so that it can be provided to subsequent modules for processing.

3、位移生成模块及位移编码模块:3. Displacement generation module and displacement encoding module:

基础网格压缩模块对基础网格进行压缩后并进行重建,位移生成模块利用重建的基础网格与细分变形步骤得到的细分变形网格计算得到相应的顶点位移。同时,由于细分变形的存在,位移编码模块可以采用LoD(Level of Detail,细节层级)的方式对位移进行编码,即各个层级独立进行编码,以支持解码端根据所需的层级进行解码。在得到分层的位移系数后,对各个层级的位移系数独立进行编码。The base mesh compression module compresses and reconstructs the base mesh, and the displacement generation module calculates the corresponding vertex displacement using the reconstructed base mesh and the subdivided deformed mesh obtained in the subdivided deformation step. At the same time, due to the existence of subdivided deformation, the displacement encoding module can encode the displacement in the LoD (Level of Detail) manner, that is, each level is encoded independently to support the decoding end to decode according to the required level. After obtaining the layered displacement coefficients, the displacement coefficients of each level are encoded independently.

位移编码的方式可以有多种:一种方式可以考虑转换位移所在的坐标系,即将每个顶点的位移的坐标系转换到以该位移对应的顶点的法向量及与法向量相切的两个分量构建的坐标系中。然后对位移进行变换,如小波变换等。将变换后的系数进行量化,并按照扫描的顺序排列到图像中,对图像应用视频编码。此外,也可以对生成或处理后的位移直接使用熵编码进行编码。There are many ways to encode displacement: one way is to consider converting the coordinate system of the displacement, that is, converting the coordinate system of the displacement of each vertex into a coordinate system constructed by the normal vector of the vertex corresponding to the displacement and the two components tangent to the normal vector. Then transform the displacement, such as wavelet transform. Quantize the transformed coefficients and arrange them in the image in the order of scanning, and apply video encoding to the image. In addition, the generated or processed displacement can also be directly encoded using entropy coding.

4、变形网格重建模块:4. Deformed mesh reconstruction module:

由于位移编码阶段量化等过程使位移产生了一定的损失,因此需要在编码端重建位移从而与解码端保持一致。获取重建的位移后,变形网格重建模块将重建的基础网格进行细分,并根据相应的重建的位移得到重建的细分变形后的网格。 Since the displacement encoding stage quantization and other processes cause a certain loss of displacement, it is necessary to reconstruct the displacement at the encoding end to keep it consistent with the decoding end. After obtaining the reconstructed displacement, the deformed mesh reconstruction module subdivides the reconstructed basic mesh and obtains the reconstructed subdivided deformed mesh according to the corresponding reconstructed displacement.

5、纹理图转换模块:5. Texture map conversion module:

纹理图转换模块首先根据输入的原始网格、输入的原始纹理图以及重建的细分变形后的网格进行纹理图转换,如图7所示。纹理图转换的步骤如下:The texture map conversion module first performs texture map conversion based on the input original mesh, the input original texture map, and the reconstructed subdivided deformed mesh, as shown in Figure 7. The steps of texture map conversion are as follows:

(1)计算待生成纹理图上每个像素的纹理坐标,如像素A(i,j)对应的纹理坐标为P(u,v)。(1) Calculate the texture coordinates of each pixel on the texture map to be generated, such as the texture coordinates corresponding to pixel A(i,j) is P(u,v).

(2)判断该纹理坐标是否在细分变形网格参数化后的某个三角面内。(2) Determine whether the texture coordinate is within a certain triangular face after the subdivision deformation mesh is parameterized.

(3)如果该纹理坐标不属于任何一个三角面,则将该像素标记为空像素,之后可以用填充算法进行填补。(3) If the texture coordinate does not belong to any triangle, the pixel is marked as an empty pixel and can be filled with a filling algorithm.

(4)如果该纹理坐标属于一个三角面,则(4) If the texture coordinate belongs to a triangle, then

a)将该像素标记为已填充。a) Mark the pixel as filled.

b)根据该纹理坐标计算其在当前三角面中的重心坐标。b) Calculate the center of gravity coordinates of the texture in the current triangle surface based on the texture coordinates.

c)根据该重心坐标以及对应的三角面,将二维的纹理坐标映射到三维的几何坐标,即映射到该纹理坐标对应的细分变形网格上的点,如图中的M(x,y,z)所示。c) According to the barycentric coordinates and the corresponding triangular faces, the two-dimensional texture coordinates are mapped to three-dimensional geometric coordinates, that is, mapped to the points on the subdivided deformation grid corresponding to the texture coordinates, as shown by M(x, y, z) in the figure.

d)在输入的原始网格上寻找距该三维坐标最近的点,如图中M'(x,y,z)所示。d) Find the point on the input original grid that is closest to the three-dimensional coordinate, as shown in the figure M'(x,y,z).

e)将该三维坐标根据其所在三角面计算其重心坐标并将其映射到二维,计算其纹理坐标,即P'(u',v')。e) The barycentric coordinates of the three-dimensional coordinates are calculated according to the triangular face on which they are located and mapped to two dimensions to calculate their texture coordinates, namely P'(u',v').

f)通过该纹理坐标在输入的原始纹理图上进行采样,得到对应像素位置的值A'(i',j')。f) Sample the input original texture map using the texture coordinates to obtain the value A'(i',j') of the corresponding pixel position.

g)将该值赋值给要生成的纹理图上的对应像素A(i,j)。g) Assign the value to the corresponding pixel A(i,j) on the texture map to be generated.

对于空像素,可以使用已有的填充算法(如Push-Pull算法)对这些空像素进行填充。For empty pixels, existing filling algorithms (such as Push-Pull algorithm) may be used to fill these empty pixels.

6、纹理图压缩模块:6. Texture compression module:

纹理图压缩模块对转换后的纹理图进行可选的颜色空间转换等处理后,利用视频编码器进行编码。The texture image compression module performs optional color space conversion and other processing on the converted texture image and then encodes it using a video encoder.

目前,VDMC的一种解码器的整体框架如图8所示,对于接收到的码流,解码端首先将各部分码流解复用,分别得到基础网格码流、位移视频码流、纹理图视频码流。对于基础网格码流,通过使用与编码端对应的网格解码器解码得到基础网格。位移视频码流与纹理图视频码流通过视频解码器进行解码。对于位移部分,视频解码后还需要通过位移解码模块将位移从图像中取出,并进行反量化、反变换等步骤,然后将其应用于细分后的基础网格,得到解码端重建的变形网格。纹理图在解码后即为重建的变形网格对应的纹理图。后续应用或渲染模块将重建的变形网格以及解码得到的纹理图作为输入进行处理。At present, the overall framework of a VDMC decoder is shown in Figure 8. For the received code stream, the decoding end first demultiplexes each part of the code stream to obtain the basic grid code stream, the displacement video code stream, and the texture map video code stream. For the basic grid code stream, the basic grid is obtained by decoding using the grid decoder corresponding to the encoding end. The displacement video code stream and the texture map video code stream are decoded by the video decoder. For the displacement part, after the video is decoded, the displacement needs to be taken out from the image through the displacement decoding module, and dequantization, inverse transformation and other steps are performed, and then it is applied to the subdivided basic grid to obtain the deformed grid reconstructed by the decoding end. After decoding, the texture map is the texture map corresponding to the reconstructed deformed grid. The subsequent application or rendering module processes the reconstructed deformed grid and the decoded texture map as input.

下面,对解码器中的主要模块进行说明。Next, the main modules in the decoder are described.

1、基础网格解码模块:1. Basic grid decoding module:

基础网格解码模块根据输入的码流的网格编码格式,进行相应的解码。若为帧内模式,则使用辅助信息指示的对应的静态网格解码器进行解码;若为帧间模式,则解码相应的运动向量,并根据网格缓冲区中的参考图像重建相应的基础网格;若为skip模式,则直接将网格缓冲区中对应的参考图像作为当前图像的基础网格。The basic grid decoding module performs corresponding decoding according to the grid coding format of the input code stream. If it is intra-frame mode, the corresponding static grid decoder indicated by the auxiliary information is used for decoding; if it is inter-frame mode, the corresponding motion vector is decoded and the corresponding basic grid is reconstructed according to the reference image in the grid buffer; if it is skip mode, the corresponding reference image in the grid buffer is directly used as the basic grid of the current image.

2、位移解码模块及位移重建模块。2. Displacement decoding module and displacement reconstruction module.

位移视频码流通过位移解码模块进行解码,同时,根据解码端所需的LoD层级进行对应层级的解码。若编码端通过视频编码的方式压缩位移,则解码端通过相应的视频解码器进行解码,并通过位移重建模块根据排列方案将其从二维图像中按照对应的顺序恢复出来。再对其执行反变换、反量化等操作使其恢复出与编码端一致的位移。如采用熵编码的方式,则直接对其进行熵解码即可。The displacement video code stream is decoded by the displacement decoding module, and at the same time, the corresponding level of decoding is performed according to the LoD level required by the decoding end. If the encoder compresses the displacement by video encoding, the decoder decodes it by the corresponding video decoder, and restores it from the two-dimensional image in the corresponding order according to the arrangement scheme through the displacement reconstruction module. Then perform inverse transformation, inverse quantization and other operations on it to restore the displacement consistent with the encoder. If entropy coding is used, it can be directly entropy decoded.

3、变形网格重建模块:3. Deformed mesh reconstruction module:

在基础网格以及相应层级的位移解码重建完成后,根据该两部分重建细分变形的网格。若辅助信息指示位移编码过程使用了参考图像作为参考,即解码得到的位移中与参考图像匹配的区域中的顶点的位移为当前帧顶点相对于参考图像顶点位移的残差,则首先通过参考图像重建的细分变形网格的顶点以及残差恢复当前图像匹配区域顶点的位移,然后进行后续重建步骤。即对重建的基础网格进行细分,与编码端细分方法保持一致。对细分后的网格的每个顶点加上对应的位移。对于重建网格的纹理坐标,通过与编码端一致的中点细分插值得到。After the basic mesh and the displacement decoding and reconstruction of the corresponding level are completed, the subdivided deformed mesh is reconstructed based on these two parts. If the auxiliary information indicates that the displacement encoding process uses the reference image as a reference, that is, the displacement of the vertices in the area matching the reference image in the decoded displacement is the residual of the displacement of the current frame vertex relative to the reference image vertex, then first restore the displacement of the vertices in the current image matching area through the vertices and residuals of the subdivided deformed mesh reconstructed from the reference image, and then perform subsequent reconstruction steps. That is, the reconstructed basic mesh is subdivided, consistent with the subdivision method of the encoding end. The corresponding displacement is added to each vertex of the subdivided mesh. For the texture coordinates of the reconstructed mesh, it is obtained by midpoint subdivision interpolation consistent with the encoding end.

然而,上述编解码方案,网格参数化用于为简化后的网格生成纹理坐标,而由于参数化后的网格的几何坐标在经过细分变形以及编解码过程中的量化后,顶点几何坐标会发生如图9所示的变化。因此,会导致生成的纹理坐标与重建变形网格不匹配。However, in the above encoding and decoding scheme, mesh parameterization is used to generate texture coordinates for the simplified mesh, and since the geometric coordinates of the parameterized mesh undergo subdivision deformation and quantization during the encoding and decoding process, the vertex geometric coordinates will change as shown in Figure 9. Therefore, the generated texture coordinates will not match the reconstructed deformed mesh.

并且,在后续重建变形网格过程中,由于顶点几何坐标在经过细分后还需要加上位移,有一定程度的变形,而其纹理坐标仅通过固定的细分插值得到,与变形后的几何坐标可能不匹配。图10示出了以细分三次为例,各个层级网格形状的变化。Moreover, in the subsequent process of reconstructing the deformed mesh, since the vertex geometric coordinates need to be displaced after subdivision, there is a certain degree of deformation, and its texture coordinates are only obtained through fixed subdivision interpolation, which may not match the deformed geometric coordinates. Figure 10 shows the changes in the mesh shapes of each level, taking subdivision three times as an example.

综上所述,目前网格参数化所生成的纹理坐标与重建变形网格不匹配,从而降低了解码准确性,进而降低了解码性能。因此,需要对重建的变形网格的纹理坐标进行调整以匹配变形后的几何坐标。 In summary, the texture coordinates generated by the current mesh parameterization do not match the reconstructed deformed mesh, which reduces the decoding accuracy and thus the decoding performance. Therefore, the texture coordinates of the reconstructed deformed mesh need to be adjusted to match the deformed geometric coordinates.

本申请实施例提供了一种编解码方法,能够衡量重建变形网格中顶点的纹理坐标的参数化失真,并通过补偿算法以降低参数化失真。本申请实施例提出的参数化质量补偿算法,可应用于基于视频的动态网格编码框架中,以解决由于网格几何顶点位置变化引起的参数化失真,从而提高重建变形网格的质量,进而提高解码准确性与解码性能。The embodiment of the present application provides a coding method that can measure the parametric distortion of the texture coordinates of the vertices in the reconstructed deformed mesh, and reduce the parametric distortion through a compensation algorithm. The parametric quality compensation algorithm proposed in the embodiment of the present application can be applied to a video-based dynamic mesh coding framework to solve the parametric distortion caused by the change in the position of the mesh geometric vertices, thereby improving the quality of the reconstructed deformed mesh, and further improving the decoding accuracy and decoding performance.

本申请实施例还提供了一种包含解码方法和编码方法的编解码系统的网格架构,图11为本申请实施例提供的一种编解码的网格架构示意图。如图11所示,该网格架构包括一个或多个电子设备13至1N和通信网格01,其中,电子设备13至1N可以通过通信网格01进行视频交互。电子设备在实施的过程中可以为各种类型的具有编解码功能的设备,例如,所述电子设备可以包括手机、平板电脑、个人计算机、个人数字助理、导航仪、数字电话、视频电话、电视机、传感设备、服务器等,这里不作具体限定。The embodiment of the present application also provides a grid architecture of a codec system including a decoding method and an encoding method, and FIG11 is a schematic diagram of a grid architecture of a codec provided by the embodiment of the present application. As shown in FIG11, the grid architecture includes one or more electronic devices 13 to 1N and a communication grid 01, wherein the electronic devices 13 to 1N can perform video interaction through the communication grid 01. During the implementation process, the electronic device can be various types of devices with codec functions, for example, the electronic device can include a mobile phone, a tablet computer, a personal computer, a personal digital assistant, a navigator, a digital phone, a video phone, a television, a sensor device, a server, etc., which are not specifically limited here.

在这里,本申请实施例所述的解码器或编码器就可以为上述电子设备。Here, the decoder or encoder described in the embodiment of the present application may be the above-mentioned electronic device.

下面结合附图对本申请各实施例进行详细说明。The embodiments of the present application are described in detail below with reference to the accompanying drawings.

参见图12,其示出了本申请实施例提供的一种解码方法的流程示意图。如图12所示,该方法可以包括:Referring to Figure 12, it shows a schematic flow chart of a decoding method provided by an embodiment of the present application. As shown in Figure 12, the method may include:

S101、解析码流,确定第一基础网格以及第一基础网格的纹理坐标信息。S101, parsing a bit stream to determine a first basic grid and texture coordinate information of the first basic grid.

对于S101的一种情况,码流中包含第一基础网格码流。其中,第一基础网络码流是通过对包含纹理坐标信息的第一基础网格进行编码确定的。解码器可以从码流中直接解析出包含纹理坐标信息的第一基础网格,从而确定第一基础网格以及第一基础网格的纹理坐标信息。示例性地,解码器对码流进行解复用,确定基础网格的码流,解码器解析基础网格的码流,确定包含纹理坐标信息的第一基础网格。In one case of S101, the bitstream includes a first basic mesh bitstream. The first basic mesh bitstream is determined by encoding the first basic mesh including texture coordinate information. The decoder can directly parse the first basic mesh including texture coordinate information from the bitstream, thereby determining the first basic mesh and the texture coordinate information of the first basic mesh. Exemplarily, the decoder demultiplexes the bitstream to determine the bitstream of the basic mesh, and the decoder parses the bitstream of the basic mesh to determine the first basic mesh including texture coordinate information.

在一些实施例中,通过基础网格解码模块根据输入的码流的网格编码格式,进行相应的解码。若为帧内模式,则使用辅助信息指示的对应的静态网格解码器进行解码;若为帧间模式,则解码相应的运动向量,并根据网格缓冲区中的参考图像重建第一基础网格;若为skip模式,则直接将网格缓冲区中对应的参考图像作为第一基础网格网格。In some embodiments, the basic grid decoding module performs corresponding decoding according to the grid coding format of the input code stream. If it is an intra-frame mode, the corresponding static grid decoder indicated by the auxiliary information is used for decoding; if it is an inter-frame mode, the corresponding motion vector is decoded, and the first basic grid is reconstructed according to the reference image in the grid buffer; if it is a skip mode, the corresponding reference image in the grid buffer is directly used as the first basic grid.

在一些实施例中,位移码流通过位移解码器进行解码,同时,根据解码端所需的LoD层级进行对应层级的解码。若编码端通过视频编码的方式压缩位移,则解码端通过相应的视频解码器进行解码,并根据排列方案将其从二维图像中按照对应的顺序恢复出来。再对其执行反变换、反量化等操作使其恢复出与编码端一致的位移。如采用熵编码的方式,则直接对其进行熵解码即可。In some embodiments, the displacement code stream is decoded by a displacement decoder, and at the same time, the corresponding level of decoding is performed according to the LoD level required by the decoding end. If the encoding end compresses the displacement by video encoding, the decoding end decodes it by a corresponding video decoder and restores it from the two-dimensional image in the corresponding order according to the arrangement scheme. Then, inverse transformation, inverse quantization and other operations are performed on it to restore the displacement consistent with the encoding end. If entropy encoding is adopted, it can be directly entropy decoded.

对于S101的另一种情况,码流中包含第二基础网格码流与纹理坐标码流。其中,第二基础网络码流是通过对不包含纹理坐标信息的第二基础网格进行编码确定的。解码器对码流解复用,确定第二基础网格码流与纹理坐标码流。解码器解析第二基础网格码流,确定第二基础网格,这里,解析第二基础网格的过程与上述解析第一基础网格的过程描述一致,此处不再赘述。解码器解析纹理坐标码流,确定纹理坐标信息;根据纹理坐标信息,对第二基础网格进行重建,确定第一基础网格与第一基础网格对应的纹理坐标信息。For another case of S101, the code stream includes a second basic grid code stream and a texture coordinate code stream. Among them, the second basic network code stream is determined by encoding the second basic grid that does not contain texture coordinate information. The decoder demultiplexes the code stream to determine the second basic grid code stream and the texture coordinate code stream. The decoder parses the second basic grid code stream to determine the second basic grid. Here, the process of parsing the second basic grid is consistent with the above-mentioned process description of parsing the first basic grid, and will not be repeated here. The decoder parses the texture coordinate code stream to determine the texture coordinate information; based on the texture coordinate information, the second basic grid is reconstructed to determine the first basic grid and the texture coordinate information corresponding to the first basic grid.

在一些实施例中,根据纹理坐标信息,对第二基础网格进行重建,确定包含纹理坐标信息的基础网格;对包含纹理坐标信息的基础网格进行网格清理,确定第一基础网格以及第一基础网格的纹理坐标信息。In some embodiments, the second base mesh is reconstructed according to the texture coordinate information to determine the base mesh including the texture coordinate information; the base mesh including the texture coordinate information is cleaned to determine the first base mesh and the texture coordinate information of the first base mesh.

S102、基于第一基础网格进行网格细分与变形,确定重建变形网格。S102: Perform mesh subdivision and deformation based on the first basic mesh to determine a reconstructed deformed mesh.

S103、基于第一基础网格的纹理坐标信息与重建变形网格,确定重建变形网格的纹理坐标信息。S103 . Determine texture coordinate information of a reconstructed deformed mesh based on the texture coordinate information of the first basic mesh and the reconstructed deformed mesh.

S102中,解码器还通过解析码流,确定第一基础网格对应的位移信息。解码器基于第一基础网格进行网格细分与变形,确定基础细分网格与重建变形网格;其中,重建变形网格包括三维坐标信息,也即重建变形网格中顶点的几何坐标。基于第一基础网格的纹理坐标信息与基础细分网格,确定重建变形网格的初始纹理坐标信息;基于重建变形网格的初始纹理坐标信息,确定重建变形网格的纹理坐标信息。In S102, the decoder also determines the displacement information corresponding to the first basic mesh by parsing the bitstream. The decoder performs mesh subdivision and deformation based on the first basic mesh to determine the basic subdivided mesh and the reconstructed deformed mesh; wherein the reconstructed deformed mesh includes three-dimensional coordinate information, that is, the geometric coordinates of the vertices in the reconstructed deformed mesh. Based on the texture coordinate information of the first basic mesh and the basic subdivided mesh, the initial texture coordinate information of the reconstructed deformed mesh is determined; based on the initial texture coordinate information of the reconstructed deformed mesh, the texture coordinate information of the reconstructed deformed mesh is determined.

其中,基础细分网格是对第一基础网格进行网格细分确定的,重建变形网格是通过从码流中解析的位移信息,对基础细分网格中的顶点叠加位移信息确定的。解码器根据第一基础网格对应的基础细分网格,对第一基础网格的纹理坐标信息进行细分插值,作为重建变形网格的初始纹理坐标信息。重建变形网格的纹理坐标信息包括重建变形网格中各个顶点的纹理坐标。The basic subdivided mesh is determined by subdividing the first basic mesh, and the reconstructed deformed mesh is determined by superimposing displacement information on vertices in the basic subdivided mesh using displacement information parsed from the bitstream. The decoder subdivides and interpolates the texture coordinate information of the first basic mesh according to the basic subdivided mesh corresponding to the first basic mesh, as the initial texture coordinate information of the reconstructed deformed mesh. The texture coordinate information of the reconstructed deformed mesh includes the texture coordinates of each vertex in the reconstructed deformed mesh.

在一些实施例中,在第一基础网格以及相应层级的位移解码重建完成后,根据该两部分重建细分变形的网格,也即重建变形网格。若辅助信息指示位移编码过程使用了参考图像作为参考,即解码得到的位移中与参考图像匹配的区域中的顶点的位移为当前图像顶点相对于参考图像顶点位移的残差,则首先通过参考图像重建的细分变形网格的顶点以及残差恢复当前图像匹配区域顶点的位移,然后进行后续重建步骤。即对重建的基础网格进行细分,与编码端细分方法保持一致。对细分后的网格的每个顶点加上对应的位移。对于重建网格的纹理坐标,通过与编码端一致的中点细分插值得到。 In some embodiments, after the first basic mesh and the displacement decoding and reconstruction of the corresponding level are completed, the subdivided deformed mesh is reconstructed based on the two parts, that is, the deformed mesh is reconstructed. If the auxiliary information indicates that the displacement encoding process uses a reference image as a reference, that is, the displacement of the vertices in the area matching the reference image in the decoded displacement is the residual of the displacement of the current image vertex relative to the reference image vertex, then firstly, the displacement of the vertices in the current image matching area is restored through the vertices and residuals of the subdivided deformed mesh reconstructed from the reference image, and then subsequent reconstruction steps are performed. That is, the reconstructed basic mesh is subdivided, which is consistent with the subdivision method of the encoding end. The corresponding displacement is added to each vertex of the subdivided mesh. For the texture coordinates of the reconstructed mesh, it is obtained by midpoint subdivision interpolation consistent with the encoding end.

可以看出,由于在重建相应层级的变形网格中,重建变形网格中顶点的几何位置是通过中点细分插值并加上相应的位移得到的,而对应的纹理坐标仅进行了中点细分插值,与加上位移后的几何位置存在一定的偏差。因此需要对其纹理坐标进行补偿以匹配几何形变之后的重建变形网格。It can be seen that in the reconstruction of the deformed mesh of the corresponding level, the geometric position of the vertices in the reconstructed deformed mesh is obtained by midpoint subdivision interpolation and adding the corresponding displacement, while the corresponding texture coordinates are only midpoint subdivision interpolation, which has a certain deviation from the geometric position after adding the displacement. Therefore, it is necessary to compensate its texture coordinates to match the reconstructed deformed mesh after geometric deformation.

在一些实施例中,基于图8所示的解码器框架,本申请实施例的一种解码器框架可以如图13所示。解码端获取到码流后,首先将各部分码流解复用。基础网格解码模块对基础网格码流进行解码,确定基础网格以及基础网格的纹理坐标信息(也即第一基础网格与第一基础网格的纹理坐标信息)。随后根据解码端需要的细节等级,对所需的位移层级进行解码并重建,然后将重建的位移应用于细分后的基础网格进行变形网格重建得到解码端所需的细节等级的重建变形网格。不同细节等级的重建变形网格可以如图12中L1层级的重建变形网格、L2层级的重建变形网格以及L3层级的重建变形网格所述。针对其中一个层级的重建变形网格的纹理坐标进行纹理坐标补偿,调整当前层级的重建变形网格中顶点的纹理坐标以降低其参数化失真,最终得到解码端输出的变形网格。网格对应的纹理图通过对纹理图码流进行视频解码得到。In some embodiments, based on the decoder framework shown in FIG8 , a decoder framework of an embodiment of the present application can be shown in FIG13 . After the decoding end obtains the code stream, it first demultiplexes each part of the code stream. The basic grid decoding module decodes the basic grid code stream to determine the basic grid and the texture coordinate information of the basic grid (that is, the texture coordinate information of the first basic grid and the first basic grid). Then, according to the detail level required by the decoding end, the required displacement level is decoded and reconstructed, and then the reconstructed displacement is applied to the subdivided basic grid to reconstruct the deformed grid to obtain the reconstructed deformed grid of the detail level required by the decoding end. The reconstructed deformed grids of different detail levels can be described as the reconstructed deformed grid of the L1 level, the reconstructed deformed grid of the L2 level, and the reconstructed deformed grid of the L3 level in FIG12 . Texture coordinate compensation is performed on the texture coordinates of the reconstructed deformed grid of one level, and the texture coordinates of the vertices in the reconstructed deformed grid of the current level are adjusted to reduce its parameterized distortion, and finally the deformed grid output by the decoding end is obtained. The texture map corresponding to the grid is obtained by video decoding the texture map code stream.

在一些实施例中,可以通过多种补偿算法对重建变形网格的纹理坐标进行更新,几何形变之后的重建变形网格。示例性地,可以直接根据解码重建的位移,对重建变形网格的纹理坐标进行更新,以补偿因仅对纹理坐标进行中点细分插值而与加上了位移的重建变形网格的几何坐标之间的偏差。或者,由于三维空间到二维空间不是等距的,参数化的过程会导致畸变失真。畸变失真可以用很多方法来测量,包括角度或区域的保存情况,或者在表面上拉伸或收缩多少参数距离等等。可以根据畸变失真的衡量方法,设计相应的补偿算法对重建变形网格的纹理坐标进行补偿或更新。具体的根据实际情况进行选择,本申请实施例不作限定。In some embodiments, the texture coordinates of the reconstructed deformed mesh can be updated by a variety of compensation algorithms, and the reconstructed deformed mesh after geometric deformation. Exemplarily, the texture coordinates of the reconstructed deformed mesh can be updated directly according to the displacement reconstructed by decoding to compensate for the deviation between the geometric coordinates of the reconstructed deformed mesh with the displacement added due to only midpoint subdivision interpolation of the texture coordinates. Alternatively, since the three-dimensional space to the two-dimensional space is not equidistant, the parameterization process will cause distortion. Distortion can be measured in many ways, including the preservation of angles or areas, or how much parameter distance is stretched or shrunk on the surface, etc. According to the measurement method of distortion, a corresponding compensation algorithm can be designed to compensate or update the texture coordinates of the reconstructed deformed mesh. The specific selection is based on the actual situation, and the embodiments of the present application are not limited.

在一些实施例中,基于图7所示的解码器框架,本申请实施例的另一种解码器框架可以如图14所示。解码端获取到码流后,首先将各部分码流解复用。基础网格解码模块对基础网格码流进行解码。基础网格解码模块对基础网格码流进行解码,确定第二基础网格,随后根据码流中是否包含纹理坐标码流,对第二基础网格进行纹理坐标重建(也即纹理坐标重建是可选的),重建出包含纹理坐标的第二基础网格,对包含纹理坐标的第二基础网格进行网格清理得到第一基础网格,第一基础网格的位移层级对应L0层级。根据解码器需要的细节等级,对对应的位移层级进行解码并重建,然后将重建的位移应用于细分后的第一基础网格,得到解码器所需的细节等级的变形网格,也即重建变形网格。然后,对重建变形网格中顶点的纹理坐标进行调整,根据预设的补偿算法降低其参数化失真,最终得到解码端输出的变形网格。网格对应的纹理图通过对纹理图码流进行视频解码得到。这样,可以利用编码器发送的纹理坐标,进一步提高重建变形网格的质量,提高解码准确性与解码性能。In some embodiments, based on the decoder framework shown in FIG. 7 , another decoder framework of the embodiment of the present application can be shown in FIG. 14 . After the decoding end obtains the code stream, it first demultiplexes each part of the code stream. The basic grid decoding module decodes the basic grid code stream. The basic grid decoding module decodes the basic grid code stream, determines the second basic grid, and then reconstructs the texture coordinates of the second basic grid according to whether the code stream contains the texture coordinate code stream (that is, the texture coordinate reconstruction is optional), reconstructs the second basic grid containing the texture coordinates, and performs grid cleaning on the second basic grid containing the texture coordinates to obtain the first basic grid, and the displacement level of the first basic grid corresponds to the L0 level. According to the level of detail required by the decoder, the corresponding displacement level is decoded and reconstructed, and then the reconstructed displacement is applied to the subdivided first basic grid to obtain the deformed grid of the detail level required by the decoder, that is, the reconstructed deformed grid. Then, the texture coordinates of the vertices in the reconstructed deformed grid are adjusted, and its parameterized distortion is reduced according to the preset compensation algorithm, and finally the deformed grid output by the decoding end is obtained. The texture map corresponding to the grid is obtained by video decoding the texture map code stream. In this way, the texture coordinates sent by the encoder can be used to further improve the quality of the reconstructed deformed mesh and improve the decoding accuracy and decoding performance.

可以理解的是,本申请实施例中,通过对解析码流确定的第一基础网格进行纹理坐标更新,减少了顶点的纹理坐标的失真,提高了纹理坐标的准确性以及与重建变形网格之间的匹配度,从而提高了重建变形的质量,提高了解码性能。It can be understood that in the embodiment of the present application, by updating the texture coordinates of the first basic mesh determined by the parsed code stream, the distortion of the texture coordinates of the vertices is reduced, the accuracy of the texture coordinates and the matching degree with the reconstructed deformed mesh are improved, thereby improving the quality of the reconstructed deformation and improving the decoding performance.

在一些实施例中,本申请实施例提供的上述解码方法中,确定重建网格的纹理坐标信息的过程可以如图15所示,包括:In some embodiments, in the above decoding method provided in the embodiment of the present application, the process of determining the texture coordinate information of the reconstructed mesh may be as shown in FIG. 15, including:

S201、基于第一基础网格的纹理坐标信息与基础细分网格,确定重建变形网格的初始纹理坐标信息。S201. Determine initial texture coordinate information of a reconstructed deformed mesh based on texture coordinate information of a first basic mesh and a basic subdivided mesh.

S202、基于重建变形网格的初始纹理坐标信息,确定第一失真测度和/或第二失真测度。S202: Determine a first distortion measure and/or a second distortion measure based on initial texture coordinate information of the reconstructed deformed mesh.

在一些实施例中,基于重建网格的初始纹理坐标信息,与重建网格的三维坐标信息,确定重建变形网格中顶点对应的三角面片的纹理坐标与三维坐标;根据重建变形网格中当前顶点对应的三角面片的纹理坐标与三维坐标,确定第一失真测度和/或第二失真测度。In some embodiments, based on the initial texture coordinate information of the reconstructed mesh and the three-dimensional coordinate information of the reconstructed mesh, the texture coordinates and three-dimensional coordinates of the triangles corresponding to the vertices in the reconstructed deformed mesh are determined; based on the texture coordinates and three-dimensional coordinates of the triangles corresponding to the current vertex in the reconstructed deformed mesh, the first distortion measure and/or the second distortion measure is determined.

本申请实施例通过表面局部距离的平均拉伸和最坏情况下的拉伸两个测度来衡量单个顶点的畸变失真。其中,第一失真测度表征三角面片从三维坐标空间到纹理坐标空间的表面局部距离的平均拉伸;第二失真测度表征三角面片从三维坐标空间到纹理坐标空间的最坏情况下的拉伸。The embodiment of the present application measures the distortion of a single vertex by two measures: average stretching of the local distance of the surface and stretching in the worst case. The first distortion measure represents the average stretching of the local distance of the surface of the triangular face from the three-dimensional coordinate space to the texture coordinate space; the second distortion measure represents the worst case stretching of the triangular face from the three-dimensional coordinate space to the texture coordinate space.

在一些实施例中,对于至少一个顶点中的当前顶点,根据重建变形网格中当前顶点对应的三角面片的纹理坐标与三维坐标,确定第一失真测度和/或第二失真测度的过程包括:In some embodiments, for a current vertex among the at least one vertex, determining the first distortion measure and/or the second distortion measure according to the texture coordinates and the three-dimensional coordinates of the triangle corresponding to the current vertex in the reconstructed deformed mesh includes:

根据三角面片中顶点的纹理坐标与三维坐标,确定第一长度参数与第二长度参数;根据第一长度参数与第二长度参数;确定第一失真测度;以及/或者,根据第二长度参数,确定第二失真测度。Determine a first length parameter and a second length parameter based on texture coordinates and three-dimensional coordinates of vertices in the triangle patch; determine a first distortion measure based on the first length parameter and the second length parameter; and/or determine a second distortion measure based on the second length parameter.

其中,第一长度参数表征单位长度向量从纹理坐标空间映射到三维坐标空间对应的最小长度;第二长度参数表征单位长度向量从纹理坐标空间映射到三维坐标空间对应的最大长度;The first length parameter represents the minimum length of the unit length vector mapped from the texture coordinate space to the three-dimensional coordinate space; the second length parameter represents the maximum length of the unit length vector mapped from the texture coordinate space to the three-dimensional coordinate space;

在一些实施例中,第一长度参数和第二长度参数可以通过以下方法确定:In some embodiments, the first length parameter and the second length parameter may be determined by:

根据三角面片中的顶点的纹理坐标与三维坐标之间的仿射映射,确定第一偏导数与第二偏导数;Determine a first partial derivative and a second partial derivative according to an affine mapping between texture coordinates of vertices in the triangular patch and three-dimensional coordinates;

根据第一偏导数与第二偏导数,确定三角面片中的顶点对应的偏导矩阵; Determine the partial derivative matrix corresponding to the vertices in the triangular patch according to the first partial derivative and the second partial derivative;

根据偏导矩阵对应的第一奇异值,确定第一长度参数;Determine a first length parameter according to a first singular value corresponding to the partial derivative matrix;

根据偏导矩阵对应的第二奇异值,确定第二长度参数;第一奇异值大于第二奇异值。A second length parameter is determined according to a second singular value corresponding to the partial derivative matrix; the first singular value is greater than the second singular value.

示例性地,当前顶点对应的三角面片T的三个顶点的二维纹理坐标分别为p1,p2,p3,其中pi=(si,ti),i={1,2,3}。三角面片T的三维几何坐标表示为q1,q2,q3。纹理坐标空间(即二维空间)中三角面片T上任意一点p的纹理坐标到三维空间的三角面片上的点仿射映射关系S(p)=S(s,t)=q的计算过程可以如公式(1)所示,如下:
S(p)=(<p,p2,p3>q1+<p,p3,p1>q2+<p,p1,p2>q3)/<p1,p2,p3>    (1)
Exemplarily, the two-dimensional texture coordinates of the three vertices of the triangle patch T corresponding to the current vertex are p 1 , p 2 , p 3 , respectively, where p i =(s i ,t i ), i={1,2,3}. The three-dimensional geometric coordinates of the triangle patch T are expressed as q 1 ,q 2 ,q 3 . The calculation process of the texture coordinate of any point p on the triangle patch T in the texture coordinate space (i.e., two-dimensional space) to the point affine mapping relationship S(p)=S(s,t)=q on the triangle patch in three-dimensional space can be shown as formula (1), as follows:
S(p)=(<p,p 2 ,p 3 >q 1 +<p,p 3 ,p 1 >q 2 +<p,p 1 ,p 2 >q 3 )/<p 1 ,p 2 ,p 3 > (1)

公式(1)中,<a,b,c>表示由a,b,c三个顶点构成的三角形的面积,如<p,p2,p3>表示p p、p2以及p3三个顶点构成的三角形面积。In formula (1), <a, b, c> represents the area of the triangle formed by the three vertices a, b, and c; for example, <p, p 2 , p 3 > represents the area of the triangle formed by the three vertices p p, p 2 , and p 3 .

由于该映射是仿射的,所以它的偏导数在点p的二维坐标(s,t)上是常数,根据上述仿射映射,通过求S(p)在坐标s上的偏导数,可以确定第一偏导数,如公式(2)所示,如下。
Since the mapping is affine, its partial derivative is a constant at the two-dimensional coordinates (s, t) of point p. According to the above affine mapping, the first partial derivative can be determined by calculating the partial derivative of S(p) at the coordinate s, as shown in formula (2), as follows.

根据上述仿射映射,通过求S(p)在坐标t上的偏导数,可以确定第二偏导数,如公式(3)所示,如下。
According to the above affine mapping, by calculating the partial derivative of S(p) at coordinate t, the second partial derivative can be determined as shown in formula (3), as follows.

公式(2)中,Ss为第一偏导数,公式(3)中,St为第二偏导数,公式(2)与公式(3)中,
A=<p1,p2,p3>=((s2-s1)(t3-t1)-(s3-s1)(t2-t1))/2。
In formula (2), S s is the first partial derivative, and in formula (3), S t is the second partial derivative. In formula (2) and formula (3),
A=<p 1 , p 2 , p 3 >=((s 2 -s 1 )(t 3 -t 1 )-(s 3 -s 1 )(t 2 -t 1 ))/2.

根据第一偏导数Ss与第二偏导数St,确定三角面片中的顶点对应的偏导矩阵,如确定雅克比(Jacobian)矩阵[Ss,St],并通过公式(4)和公式(5)确定Jacobian矩阵的较大奇异值γmax和较小奇异值γmin,分别作为第一奇异值与第二奇异值,如下:

According to the first partial derivative S s and the second partial derivative St t , the partial derivative matrix corresponding to the vertex in the triangular patch is determined, such as determining the Jacobian matrix [S s , St ], and the larger singular value γ max and the smaller singular value γ min of the Jacobian matrix are determined by formula (4) and formula (5), which are used as the first singular value and the second singular value, respectively, as follows:

公式(4)和公式(5)中,a=Ss·Ss,b=Ss·St,c=St·St。γmax为第一奇异值,将γmax作为第一长度参数,表示单位长度向量从二维纹理域映射到三维表面时获得的最大长度,即最大的局部“拉伸”。γmin为第二奇异值,将γmin作为第二长度参数,表示单位长度向量从二维纹理域映射到三维表面时获得的最小长度,即最小的局部“拉伸”。In formula (4) and formula (5), a = S s ·S s , b = S s ·S t , c = S t ·S t . γ max is the first singular value, and γ max is used as the first length parameter to represent the maximum length obtained when a unit length vector is mapped from a two-dimensional texture domain to a three-dimensional surface, that is, the maximum local "stretch". γ min is the second singular value, and γ min is used as the second length parameter to represent the minimum length obtained when a unit length vector is mapped from a two-dimensional texture domain to a three-dimensional surface, that is, the minimum local "stretch".

在一些实施例中,可以通过公式(6),根据第一长度参数γmax与第二长度参数γmin;确定第一失真测度L2(T),如下。
In some embodiments, the first distortion measure L 2 (T) may be determined according to the first length parameter γ max and the second length parameter γ min by formula (6), as follows.

在一些实施例中,可以通过公式(7),根据第二长度参数γmin,确定第二失真测度L(T),如下:
L(T)=γmax       (7)
In some embodiments, the second distortion measure L (T) may be determined according to the second length parameter γ min by formula (7), as follows:
L (T) = γ max (7)

在一些实施例中,根据公式(4)、公式(5)和公式(6)整理可得,也就是说,根据第一偏导数Ss对应的第一点积a=Ss·Ss,以及第二偏导数St对应的第二点积c=St·St,确定第一失真测度。In some embodiments, according to formula (4), formula (5) and formula (6), we can get: That is, the first distortion measure is determined according to a first dot product a=S s ·S s corresponding to the first partial derivative S s and a second dot product c=S t ·S t corresponding to the second partial derivative S t.

S203、根据第一失真测度和/或第二失真测度,确定重建变形网格的纹理坐标信息。S203: Determine texture coordinate information of the reconstructed deformed mesh according to the first distortion measure and/or the second distortion measure.

本申请实施例中,通过第一失真测度L2(T)和/或第二失真测度L(T),能够衡量当前顶点的参数化失真。对于当前顶点,需要调整其对应的纹理坐标以使得当前顶点的参数化失真最小化。In the embodiment of the present application, the first distortion measure L 2 (T) and/or the second distortion measure L (T) can measure the parameterized distortion of the current vertex. For the current vertex, its corresponding texture coordinates need to be adjusted to minimize the parameterized distortion of the current vertex.

在一些实施例中,根据第一失真测度和/或第二失真测度,更新当前顶点的纹理坐标包括:In some embodiments, updating the texture coordinates of the current vertex according to the first distortion measure and/or the second distortion measure includes:

根据第一失真测度和/或第二失真测度,确定重建变形网格中当前顶点对应的纹理坐标误差; Determining a texture coordinate error corresponding to a current vertex in the reconstructed deformed mesh according to the first distortion measure and/or the second distortion measure;

通过最小化纹理坐标误差,更新当前顶点的纹理坐标,从而确定所述重建变形网格的纹理坐标信息。The texture coordinates of the current vertex are updated by minimizing the texture coordinate error, thereby determining the texture coordinate information of the reconstructed deformed mesh.

在一些实施例中,当前顶点对应的三角面片包括:当前顶点邻接的至少一个三角面片;纹理坐标误差包括:第一纹理坐标误差和/或第二纹理坐标误差;In some embodiments, the triangle corresponding to the current vertex includes: at least one triangle adjacent to the current vertex; the texture coordinate error includes: a first texture coordinate error and/or a second texture coordinate error;

根据至少一个三角面片对应的第一失真测度之和,确定第一纹理坐标误差;determining a first texture coordinate error according to a sum of first distortion measures corresponding to at least one triangular face;

以及/或者,and/or,

根据至少一个三角面片对应的最大的第二失真测度,确定第二纹理坐标误差。A second texture coordinate error is determined according to a maximum second distortion measure corresponding to at least one triangular facet.

示例性地,第一纹理坐标误差可以通过公式(8)确定,如下:
Exemplarily, the first texture coordinate error may be determined by formula (8), as follows:

公式(8)中,f表示与当前顶点vt邻接的三角面片,也即f∈δvt。可以看出,对当前顶点vt邻接的至少一个三角面片中的每个三角面片计算第一失真测度L2(f),根据至少一个三角面片对应的至少一个第一失真测度之和确定第一纹理坐标误差L2(vt)。In formula (8), f represents the triangle face adjacent to the current vertex vt, that is, f∈δ vt . It can be seen that the first distortion measure L 2 (f) is calculated for each triangle face in at least one triangle face adjacent to the current vertex vt, and the sum of at least one first distortion measure corresponding to at least one triangle face is calculated according to A first texture coordinate error L 2 (vt) is determined.

示例性地,第二纹理坐标误差可以通过公式(9)确定,如下:
Exemplarily, the second texture coordinate error may be determined by formula (9), as follows:

公式(9)中,根据至少一个三角面片对应的最大的第二失真测度确定第二纹理坐标误差L(vt)。In formula (9), according to the maximum second distortion measure corresponding to at least one triangle patch A second texture coordinate error L∞ (vt) is determined.

在一些实施例中,上述通过最小化纹理坐标误差,更新当前顶点的纹理坐标的过程包括:In some embodiments, the process of updating the texture coordinates of the current vertex by minimizing the texture coordinate error includes:

通过最小化第一纹理坐标误差,更新当前顶点的纹理坐标;Update the texture coordinates of the current vertex by minimizing the first texture coordinate error;

或者,or,

通过最小化第二纹理坐标误差,更新当前顶点的纹理坐标;Update the texture coordinate of the current vertex by minimizing the second texture coordinate error;

或者,or,

分别通过最小化第一纹理坐标误差与第二纹理坐标误差,更新当前顶点的纹理坐标。Update the texture coordinates of the current vertex by minimizing the first texture coordinate error and the second texture coordinate error respectively.

需要说明的是,通过最小化第一纹理坐标误差与第二纹理坐标误差的过程包括:通过最小化第一纹理坐标误差更新当前顶点的纹理坐标的过程,以及通过最小化第二纹理坐标误差更新当前顶点的纹理坐标的过程。也就是说,本申请实施例对于第一纹理坐标误差与第二纹理坐标误差是分开优化的。本申请实施例对第一纹理坐标误差与第二纹理坐标误差对应的优化顺序不作限定。并且,通过在后的纹理坐标误差进行纹理坐标更新时,是基于在前的纹理坐标误差更新后的顶点的纹理坐标进行更新的。It should be noted that the process of minimizing the first texture coordinate error and the second texture coordinate error includes: a process of updating the texture coordinates of the current vertex by minimizing the first texture coordinate error, and a process of updating the texture coordinates of the current vertex by minimizing the second texture coordinate error. That is to say, the first texture coordinate error and the second texture coordinate error are optimized separately in the embodiment of the present application. The embodiment of the present application does not limit the optimization order corresponding to the first texture coordinate error and the second texture coordinate error. Moreover, when the texture coordinates are updated by the subsequent texture coordinate error, the texture coordinates of the vertex after the update by the previous texture coordinate error are updated.

可以理解的是,本申请实施例中,通过顶点邻接的三角面片从三维坐标空间到纹理坐标空间的表面局部距离的平均拉伸和/或三角面片从三维坐标空间到纹理坐标空间的最坏情况下的拉伸两个测度,衡量重建变形网格中顶点纹理坐标的失真,并根据其失真对顶点的纹理坐标进行调整,更新顶点的纹理坐标,提高纹理坐标的准确性以及与重建变形网格之间的匹配度,从而提高重建变形网格的质量,提高解码性能。It can be understood that in the embodiments of the present application, the distortion of the texture coordinates of the vertices in the reconstructed deformed mesh is measured by two measures: the average stretching of the surface local distance of the vertex-adjacent triangles from the three-dimensional coordinate space to the texture coordinate space and/or the worst-case stretching of the triangles from the three-dimensional coordinate space to the texture coordinate space. The texture coordinates of the vertices are adjusted according to the distortion, the texture coordinates of the vertices are updated, and the accuracy of the texture coordinates and the matching degree with the reconstructed deformed mesh are improved, thereby improving the quality of the reconstructed deformed mesh and improving the decoding performance.

下面,基于图16,对上述通过最小化纹理坐标误差,更新当前顶点的纹理坐标的过程进行说明。Next, based on FIG. 16 , the process of updating the texture coordinates of the current vertex by minimizing the texture coordinate error is described.

需要说明的是,对于通过最小化第一纹理坐标误差,更新当前顶点的纹理坐标的情况,下述过程中的纹理坐标误差包括第一纹理坐标误差。对于通过最小化第二纹理坐标误差,更新当前顶点的纹理坐标的情况,下述过程中的纹理坐标误差包括第二纹理坐标误差。对于分别通过最小化第一纹理坐标误差与第二纹理坐标误差,更新当前顶点的纹理坐标的情况,在通过最小化第一纹理坐标误差进行纹理坐标更新时,下述过程中的纹理坐标误差包括第一纹理坐标误差;在通过最小化第二纹理坐标误差进行纹理坐标更新时,下述过程中的纹理坐标误差包括第二纹理坐标误差。It should be noted that, in the case of updating the texture coordinates of the current vertex by minimizing the first texture coordinate error, the texture coordinate error in the following process includes the first texture coordinate error. In the case of updating the texture coordinates of the current vertex by minimizing the second texture coordinate error, the texture coordinate error in the following process includes the second texture coordinate error. In the case of updating the texture coordinates of the current vertex by minimizing the first texture coordinate error and the second texture coordinate error respectively, when the texture coordinates are updated by minimizing the first texture coordinate error, the texture coordinate error in the following process includes the first texture coordinate error; when the texture coordinates are updated by minimizing the second texture coordinate error, the texture coordinate error in the following process includes the second texture coordinate error.

S301、基于当前顶点,确定初始中心位置点与搜索范围。S301. Determine the initial center point and search range based on the current vertex.

S301中,解码器可以将当前顶点确定为初始中心位置点;也可以确定当前顶点对应的至少一个候选位置点;通过确定至少一个候选位置点对应的至少一个候选纹理坐标误差,从至少一个候选位置点中确定初始中心位置点。解码器基于初始中心位置点,确定搜索范围。In S301, the decoder may determine the current vertex as the initial center position point; or determine at least one candidate position point corresponding to the current vertex; determine the initial center position point from at least one candidate position point by determining at least one candidate texture coordinate error corresponding to the at least one candidate position point. The decoder determines the search range based on the initial center position point.

在一些实施例中,至少一个候选位置点可以包括:当前顶点的邻接点的平均位置上的点,和/或当前顶点的邻接边的中点。示例性地,当前顶点对应的至少一个候选位置点可以如图17所示,其中,vt为当前顶点,vt1'至vt7'为当前顶点对应的至少一个候选位置点。In some embodiments, at least one candidate position point may include: a point at the average position of the adjacent points of the current vertex, and/or a midpoint of the adjacent edge of the current vertex. Exemplarily, at least one candidate position point corresponding to the current vertex may be as shown in FIG. 17 , where vt is the current vertex, and vt1′ to vt7′ are at least one candidate position point corresponding to the current vertex.

在一些实施例中,上述通过确定至少一个候选位置点对应的至少一个候选纹理坐标误差,从至少一个候选位置点中确定初始中心位置点的过程可以包括:确定至少一个候选位置点对应的至少一个候选纹 理坐标误差;根据至少一个候选纹理坐标误差与当前顶点对应的纹理坐标误差中的最小值,确定初始中心位置点。In some embodiments, the process of determining the initial center position point from at least one candidate position point by determining at least one candidate texture coordinate error corresponding to at least one candidate position point may include: determining at least one candidate texture coordinate error corresponding to at least one candidate position point; and determining an initial center position point according to a minimum value of at least one candidate texture coordinate error and a texture coordinate error corresponding to a current vertex.

示例性地,通过公式(8)和/或公式(9)中确定图17中每个候选位置点对应的纹理坐标误差,作为每个候选位置点对应的候选纹理坐标误差。通过对比至少一个候选纹理坐标误差,确定最小候选纹理坐标误差,若该最小候选纹理坐标误差小于当前顶点对应的纹理坐标误差,将最小候选纹理坐标误差对应的候选位置点作为初始中心位置点。若该最小候选纹理坐标误差大于当前顶点对应的纹理坐标误差,将当前顶点作为初始中心位置点。Exemplarily, the texture coordinate error corresponding to each candidate position point in FIG. 17 is determined by formula (8) and/or formula (9) as the candidate texture coordinate error corresponding to each candidate position point. By comparing at least one candidate texture coordinate error, the minimum candidate texture coordinate error is determined. If the minimum candidate texture coordinate error is smaller than the texture coordinate error corresponding to the current vertex, the candidate position point corresponding to the minimum candidate texture coordinate error is used as the initial center position point. If the minimum candidate texture coordinate error is larger than the texture coordinate error corresponding to the current vertex, the current vertex is used as the initial center position point.

在一些实施例中,解码器以初始中心位置点为中心,以初始中心位置点到其至少一个邻接面的第三条边的至少一个距离中的最小值为半径,确定搜索范围。示例性地,搜索范围可以如图18的虚线圆圈所示,以初始中心位置点为中心,构建一个邻接圆作为搜索范围,该圆的半径为该顶点到其邻接面第三条边距离的最小值。In some embodiments, the decoder determines the search range with the initial center position point as the center and the minimum value of at least one distance from the initial center position point to the third edge of at least one adjacent face as the radius. Exemplarily, the search range can be as shown in the dotted circle of FIG18, with the initial center position point as the center, constructing an adjacent circle as the search range, and the radius of the circle is the minimum value of the distance from the vertex to the third edge of its adjacent face.

S302、基于初始中心位置点与搜索范围进行至少一次搜索,确定至少一个初始目标位置点。S302: Perform at least one search based on the initial center position point and the search range to determine at least one initial target position point.

S302中,解码器以初始中心位置点为起始点,在搜索范围内进行至少一次搜索,以搜索到候选纹理坐标更小的位置点进行纹理坐标更新。这里,可以通过多种搜索算法实现,具体的根据实际情况进行选择,本申请实施例不作限定。In S302, the decoder uses the initial center position point as the starting point and performs at least one search within the search range to search for a position point with smaller candidate texture coordinates to update the texture coordinates. Here, a variety of search algorithms can be used, and the specific selection is based on actual conditions, which is not limited in the embodiments of the present application.

示例性地,基于公式(8)和公式(9)可以确定最小化纹理坐标误差的目标函数可以如公式(10)所示,如下:
For example, based on formula (8) and formula (9), the objective function for minimizing the texture coordinate error can be determined as shown in formula (10), as follows:

其中,N为搜索范围,vt′为每次搜索到的位置点。Where N is the search range and vt′ is the position point found each time.

示例性地,以二分法搜索为例,S202的过程可以包括:Exemplarily, taking binary search as an example, the process of S202 may include:

确定每次搜索的搜索方向;基于初始中心位置点,按照每次搜索的搜索方向,在搜索范围内进行二分法搜索,确定每次搜索对应的初始目标位置点,直至完成至少一次搜索,确定至少一个初始目标位置点。Determine the search direction for each search; based on the initial center position point, perform a binary search within the search range according to the search direction of each search to determine the initial target position point corresponding to each search until at least one search is completed and at least one initial target position point is determined.

对于二分法搜索,在至少一次搜索的每次搜索中,以初始中心位置点为每次搜索的起始点,按照每次搜索的搜索方向,在搜索范围内确定每次搜索的终止点;在起始点对应的候选纹理坐标误差小于终止点对应的候选纹理坐标误差的情况下,根据起始点与终止点之间的中点更新终止点;在起始点对应的候选纹理坐标误差大于终止点的对应候选纹理坐标误差的情况下,根据起始点与终止点之间的中点更新起始点;以上述过程进行至少一次更新,直至确定更新的起始点与更新的终止点之间的距离小于预设距离阈值,根据起始点和/或终止点,确定每次搜索对应的初始目标位置点。For binary search, in each search of at least one search, the initial center position point is used as the starting point of each search, and the end point of each search is determined within the search range according to the search direction of each search; when the candidate texture coordinate error corresponding to the starting point is less than the candidate texture coordinate error corresponding to the end point, the end point is updated according to the midpoint between the starting point and the end point; when the candidate texture coordinate error corresponding to the starting point is greater than the corresponding candidate texture coordinate error of the end point, the starting point is updated according to the midpoint between the starting point and the end point; the above process is used for at least one update until it is determined that the distance between the updated starting point and the updated end point is less than a preset distance threshold, and the initial target position point corresponding to each search is determined according to the starting point and/or the end point.

在一些实施例中,在每次搜索中出现至少一次更新的起始点与更新的终止点之间的距离小于预设距离阈值的情况下,确定更新的起始点与更新的终止点之间的距离小于预设距离阈值。In some embodiments, when the distance between the updated starting point and the updated ending point is less than a preset distance threshold at least once in each search, it is determined that the distance between the updated starting point and the updated ending point is less than the preset distance threshold.

在一些实施例中,在确定更新的起始点与更新的终止点之间的距离小于预设距离阈值的情况下,可以将当前更新得到的起始点确定为初始目标位置点;或者,将当前更新得到的终止点确定为初始目标位置点;或者,将当前更新得到的起始点与当前更新得到的终止点之间的中点,确定为初始目标位置点;或者,将当前更新得到的起始点与当前更新得到的终止点中,候选纹理坐标误差小的点确定为目标位置点。具体的根据实际情况进行选择,本申请实施例不作限定。In some embodiments, when it is determined that the distance between the updated starting point and the updated ending point is less than a preset distance threshold, the starting point obtained by the current update can be determined as the initial target position point; or the ending point obtained by the current update can be determined as the initial target position point; or the midpoint between the starting point obtained by the current update and the ending point obtained by the current update can be determined as the initial target position point; or the point with the smallest error in the candidate texture coordinates between the starting point obtained by the current update and the ending point obtained by the current update can be determined as the target position point. The specific selection is made according to the actual situation, and the embodiments of the present application are not limited thereto.

示例性地,在搜索范围内,随机选择一个方向作为搜索方向。该方向的选择是通过随机数生成的,随机选取方向更有可能寻找到最优解;通过二分法在所选方向上逐步逼近最优值。即计算两个端点对应的误差,将圆心记作起始点,另一端记为终止点,若起始点误差小于终止点,则将两端点中点作为终止点;若起始点误差大于终止点,则将两端点中点作为起始点,然后计算两端点误差进行比较。按照上述方式进行迭代,直到连续两次选取的顶点距离小于预设阈值,完成一次搜索,确定该次搜索对应的初始目标位置点。为了增加搜索的稳定性,多次随机选择方向,重复上述步骤,也即进行至少一个搜索以找到最优的局部解,从至少一个初始目标位置点中确定目标位置点。Exemplarily, within the search range, a direction is randomly selected as the search direction. The direction is selected by random number generation, and the randomly selected direction is more likely to find the optimal solution; the optimal value is gradually approached in the selected direction by bisection. That is, the errors corresponding to the two endpoints are calculated, the center of the circle is recorded as the starting point, and the other end is recorded as the end point. If the error of the starting point is less than the end point, the midpoint of the two end points is used as the end point; if the error of the starting point is greater than the end point, the midpoint of the two end points is used as the starting point, and then the error of the two end points is calculated for comparison. Iterate in the above manner until the distance between the vertices selected twice in a row is less than the preset threshold, complete a search, and determine the initial target position point corresponding to the search. In order to increase the stability of the search, directions are randomly selected multiple times, and the above steps are repeated, that is, at least one search is performed to find the optimal local solution, and the target position point is determined from at least one initial target position point.

S303、根据至少一个初始目标位置点对应的最小候选纹理坐标误差,确定目标位置点。S303: Determine a target position point according to a minimum candidate texture coordinate error corresponding to at least one initial target position point.

S304、根据目标位置点的纹理坐标,更新当前顶点的纹理坐标。S304: Update the texture coordinates of the current vertex according to the texture coordinates of the target position point.

S303-S304中,可以将至少一个初始目标位置点中候选纹理坐标误差最小的初始目标位置点,为确定目标位置点。可理解,目标位置点为当前顶点的搜索范围内失真最小的位置点。解码器根据目标位置点的纹理坐标,更新当前顶点的纹理坐标。示例性地,将当前顶点的纹理坐标更新为目标位置点的纹理坐标。 In S303-S304, the initial target position point with the smallest error in the candidate texture coordinates among at least one initial target position point may be used as the determined target position point. It is understandable that the target position point is the position point with the smallest distortion within the search range of the current vertex. The decoder updates the texture coordinates of the current vertex according to the texture coordinates of the target position point. Exemplarily, the texture coordinates of the current vertex are updated to the texture coordinates of the target position point.

可以理解的是,通过在局部范围(搜索范围)内搜索当前顶点对应的目标位置点,根据失真较小的目标位置点的纹理坐标更新当前顶点的纹理坐标,提高了当前顶点的纹理坐标与当前顶点的匹配度,从而提高了重建变形网格的质量,进而提高了解码准确性与解码性能。It can be understood that by searching for the target position point corresponding to the current vertex within the local range (search range), the texture coordinates of the current vertex are updated according to the texture coordinates of the target position point with less distortion, thereby improving the matching degree between the texture coordinates of the current vertex and the current vertex, thereby improving the quality of reconstructing the deformed mesh, and further improving the decoding accuracy and decoding performance.

在一些实施例中,对于重建变形网格中待优化的至少一个顶点,确定至少一个顶点对应的至少一个纹理坐标误差;根据至少一个纹理坐标误差,将至少一个顶点组织为待优化序列;将待优化序列中预设序列位置对应的顶点,确定为当前顶点;预设序列位置对应至少一个顶点中纹理坐标误差最大的顶点。这里,至少一个顶点可以包括重建变形网格中的部分或全部顶点。In some embodiments, for at least one vertex to be optimized in the reconstructed deformed mesh, at least one texture coordinate error corresponding to the at least one vertex is determined; at least one vertex is organized into a sequence to be optimized according to the at least one texture coordinate error; a vertex corresponding to a preset sequence position in the sequence to be optimized is determined as the current vertex; and the preset sequence position corresponds to a vertex with the largest texture coordinate error among the at least one vertex. Here, the at least one vertex may include some or all of the vertices in the reconstructed deformed mesh.

也就是说,当前顶点为待优化序列中纹理坐标误差最大的顶点。这样,在确定当前顶点对应的目标位置点的情况下,可以根据目标位置点,更新至少一个顶点中当前顶点对应的纹理坐标误差,进而更新待优化序列中顶点的顺序;对更新的预设序列位置上的顶点进行纹理坐标更新,直至达到预设迭代目标,完成对重建变形网格的纹理坐标更新。That is, the current vertex is the vertex with the largest texture coordinate error in the sequence to be optimized. In this way, when the target position point corresponding to the current vertex is determined, the texture coordinate error corresponding to the current vertex in at least one vertex can be updated according to the target position point, and then the order of the vertices in the sequence to be optimized is updated; the texture coordinates of the vertices at the updated preset sequence positions are updated until the preset iteration target is reached, and the texture coordinate update of the reconstructed deformed mesh is completed.

示例性地,对于选取当前顶点进行纹理坐标更新的过程,可以利用预设数据结构,如堆数据结构,将至少一个顶点按照其纹理坐标误差进行排序,得到堆数据结构的待优化序列。示例性地,质量较差的顶点被放置在堆的顶部,而质量较好的顶点则位于较低的位置。在每次迭代中,从堆顶取出当前纹理坐标误差最大的顶点进行优化。通过调整该顶点的纹理坐标,尽可能地减小其纹理坐标误差。然后,更新该顶点邻接的其他顶点的纹理坐标误差,并将它们重新放入堆结构的待优化序列中。可以看出,随着每次优化迭代的进行,堆顶位置的顶点会发生变化,因此需要更新堆结构的待优化序列以反映最新的误差排序。这确保了在后续的迭代中,依然能够选择当前质量最差的顶点进行调整。通过以上策略,整个优化过程更加贴近全局优化的目标。质量差的顶点在迭代中得到了更频繁的调整,从而推动整体参数化向更优的方向演进。从而提高了解码效率与解码准确性。Exemplarily, for the process of selecting the current vertex for updating the texture coordinates, a preset data structure, such as a heap data structure, can be used to sort at least one vertex according to its texture coordinate error to obtain a sequence to be optimized of the heap data structure. Exemplarily, vertices with poor quality are placed at the top of the heap, while vertices with better quality are located at a lower position. In each iteration, the vertex with the largest current texture coordinate error is taken from the top of the heap for optimization. By adjusting the texture coordinates of the vertex, its texture coordinate error is reduced as much as possible. Then, the texture coordinate errors of other vertices adjacent to the vertex are updated, and they are put back into the sequence to be optimized of the heap structure. It can be seen that with each optimization iteration, the vertex at the top of the heap will change, so it is necessary to update the sequence to be optimized of the heap structure to reflect the latest error sorting. This ensures that in subsequent iterations, the vertex with the worst current quality can still be selected for adjustment. Through the above strategy, the entire optimization process is closer to the goal of global optimization. Vertices with poor quality are adjusted more frequently in iterations, thereby driving the overall parameterization to evolve in a better direction. Thereby improving decoding efficiency and decoding accuracy.

在一些实施例中,在待优化序列的更新次数达到预设更新次数阈值,和/或,预设序列位置上的顶点的纹理坐标误差小于预设误差阈值,确定达到预设迭代目标,完成对重建变形网格中至少一个待优化顶点的纹理坐标更新。In some embodiments, when the number of updates of the sequence to be optimized reaches a preset update number threshold, and/or the texture coordinate error of the vertex at the preset sequence position is less than a preset error threshold, it is determined that the preset iteration target is reached, and the texture coordinate update of at least one vertex to be optimized in the reconstructed deformed mesh is completed.

在一些实施例中,基于图13和图14可以看出,可以对至少一层重建变形网格中的每一层重建变形网格中的顶点进行纹理坐标更新。也就是说,每次处理的重建变形网格包括:基础网格对应的第i层重建变形网格;i大于1。在解码器完成对第i层重建变形网格的纹理坐标更新的情况下,可以基于第i层重建变形网格中顶点的纹理坐标进行插值,确定第i+1层重建变形网格中顶点的纹理坐标;i+1小于或等于预设层数;通过确定第i+1层重建变形网格中的顶点对应的三角面片的第一失真测度和/或第二失真测度,更新第i+1层重建变形网格中顶点的纹理坐标。以上述过程对每层重建变形网格中顶点的纹理坐标进行逐层调整,直至完成对至少一层重建变形网格的纹理坐标更新。In some embodiments, based on FIG. 13 and FIG. 14 , it can be seen that the texture coordinates of the vertices in each layer of the reconstructed deformed mesh in at least one layer of the reconstructed deformed mesh can be updated. That is, the reconstructed deformed mesh processed each time includes: the i-th layer of the reconstructed deformed mesh corresponding to the base mesh; i is greater than 1. When the decoder completes the update of the texture coordinates of the i-th layer of the reconstructed deformed mesh, the texture coordinates of the vertices in the i+1-th layer of the reconstructed deformed mesh can be interpolated based on the texture coordinates of the vertices in the i-th layer of the reconstructed deformed mesh; i+1 is less than or equal to the preset number of layers; the texture coordinates of the vertices in the i+1-th layer of the reconstructed deformed mesh are updated by determining the first distortion measure and/or the second distortion measure of the triangle facets corresponding to the vertices in the i+1-th layer of the reconstructed deformed mesh. The texture coordinates of the vertices in each layer of the reconstructed deformed mesh are adjusted layer by layer in the above process until the texture coordinate update of at least one layer of the reconstructed deformed mesh is completed.

示例性地,以图12为例,在解码得到L1层级并进行纹理坐标补偿后,若解码器需要进一步提升细节层级如获取L2层级,则以L1层级纹理坐标中点插值后的位置作为起点,再对L2层级的纹理坐标进行更新,以此类推,直到重建至解码端需求的细节层级。Exemplarily, taking Figure 12 as an example, after decoding to obtain the L1 level and performing texture coordinate compensation, if the decoder needs to further improve the detail level such as obtaining the L2 level, the interpolated position of the midpoint of the L1 level texture coordinate is used as the starting point, and then the texture coordinates of the L2 level are updated, and so on, until the detail level required by the decoding end is reconstructed.

参见图19,其示出了本申请实施例提供的一种编码方法的流程示意图。如图19所示,该方法可以包括:Referring to Figure 19, it shows a schematic flow chart of a coding method provided in an embodiment of the present application. As shown in Figure 19, the method may include:

S401、确定当前图像对应的基础网格。S401, determining a basic grid corresponding to the current image.

S402、基于基础网格,确定纹理坐标信息。S402: Determine texture coordinate information based on the basic mesh.

S403、对基础网格以及纹理坐标信息进行编码,将得到的编码比特写入码流。S403: Encode the basic grid and texture coordinate information, and write the obtained encoding bits into the bit stream.

在一些实施例中,与上述解码方法对应的一种编码器框架可以如图3中目前的VDMC编码框架所述。也即对输入的网格通过基础网格生成步骤,得到基础网格以及对应的细分变形网格,通过基础网格压缩模块对基础网格压缩并重建,得到重建的基础网格。然后根据基础网格生成阶段得到的变形网格,得到细分后的基础网格以及相应的细分变形网格对应顶点之间的位移,对位移进行坐标系转换、小波变换、量化等处理,然后将其排列到图像中利用视频编码器进行编码或直接对其进行熵编码。随后对编码的位移进行重建得到重建的细分变形网格,将该网格以及原始输入网格和纹理图作为输入送到纹理图转换模块,得到当前重建的变形网格对应的纹理图,对该纹理图进行可选的颜色空间转换等处理后利用视频编码器进行编码。In some embodiments, an encoder framework corresponding to the above decoding method can be as described in the current VDMC encoding framework in FIG3. That is, the input mesh is subjected to the basic mesh generation step to obtain the basic mesh and the corresponding subdivided deformed mesh, and the basic mesh is compressed and reconstructed by the basic mesh compression module to obtain the reconstructed basic mesh. Then, according to the deformed mesh obtained in the basic mesh generation stage, the displacements between the corresponding vertices of the subdivided basic mesh and the corresponding subdivided deformed mesh are obtained, and the displacements are processed by coordinate system conversion, wavelet transformation, quantization, etc., and then arranged in the image and encoded by a video encoder or directly entropy encoded. Subsequently, the encoded displacements are reconstructed to obtain a reconstructed subdivided deformed mesh, and the mesh, the original input mesh and the texture map are sent as input to the texture map conversion module to obtain the texture map corresponding to the currently reconstructed deformed mesh, and the texture map is subjected to optional color space conversion and other processing and then encoded by a video encoder.

其中,纹理坐标信息是基于基础网格进行网格参数化确定的。编码器可以对包含纹理坐标信息的基础网格进行编码,将得到的编码比特写入码流。这里的码流对应解码器的第一基础码流。The texture coordinate information is determined by mesh parameterization based on the base mesh. The encoder can encode the base mesh containing the texture coordinate information and write the obtained encoding bits into the bitstream. The bitstream here corresponds to the first basic bitstream of the decoder.

这样,通过解码器,执行上述实施例中的解码方法,以对重建变形网格的纹理坐标进行补偿,纹理坐标与重建变形网格的匹配度,进而提高解码准确性,提高解码性能。 In this way, the decoding method in the above embodiment is executed through the decoder to compensate the texture coordinates of the reconstructed deformed mesh, and the matching degree of the texture coordinates and the reconstructed deformed mesh, thereby improving the decoding accuracy and decoding performance.

在一些实施例中,不同于上述将纹理坐标信息与基础网格合并编码的方式,由于基础网格编码是压缩编码,为了降低纹理坐标信息的失真,可以对纹理坐标信息与基础网格分开编码,分别确定不包含纹理坐标信息的基础网格对应的码流(对应解码器的第二基础网格码流)以及纹理坐标信息对应的码流。In some embodiments, unlike the above-mentioned method of merging the texture coordinate information with the base grid for encoding, since the base grid encoding is a compressed encoding, in order to reduce the distortion of the texture coordinate information, the texture coordinate information and the base grid can be encoded separately, and the bitstream corresponding to the base grid that does not contain the texture coordinate information (the second base grid bitstream corresponding to the decoder) and the bitstream corresponding to the texture coordinate information are determined separately.

在一种实施例中,纹理坐标信息可以在基础网格生成模块的生成基础网格的过程中确定,纹理坐标信息包括:基础网格对应的纹理坐标信息。编码器可以基于基础网格进行网格参数化,确定基础网格对应的纹理坐标信息;对基础网格进行压缩编码,确定基础网格对应的编码比特;对纹理坐标信息进行编码,确定纹理坐标信息对应的编码比特;将基础网格对应的编码比特与纹理坐标信息对应的编码比特分别写入码流。这样,可以在解码器中通过解析码流中的纹理坐标信息,对从基础码流中解析得到的第二基础网格进行网格重建,确定第一基础网格,以提高第一基础网格中纹理坐标的准确性,从而提高编解码准确性,提高编解码性能。In one embodiment, the texture coordinate information can be determined in the process of generating the basic mesh by the basic mesh generation module, and the texture coordinate information includes: texture coordinate information corresponding to the basic mesh. The encoder can perform mesh parameterization based on the basic mesh to determine the texture coordinate information corresponding to the basic mesh; perform compression encoding on the basic mesh to determine the coding bits corresponding to the basic mesh; encode the texture coordinate information to determine the coding bits corresponding to the texture coordinate information; and write the coding bits corresponding to the basic mesh and the coding bits corresponding to the texture coordinate information into the bitstream respectively. In this way, the second basic mesh parsed from the basic bitstream can be reconstructed in the decoder by parsing the texture coordinate information in the bitstream to determine the first basic mesh, so as to improve the accuracy of the texture coordinates in the first basic mesh, thereby improving the coding and decoding accuracy and the coding and decoding performance.

示例性地,如图20所示,输入的网格首先通过基础网格生成步骤,得到基础网格,通过基础网格压缩模块对该基础网格压缩并重建,得到重建的基础网格。其中基础网格生成阶段得到的纹理坐标可以根据当前图像的纹理坐标信息进行恢复,因此可以将这些信息传递到解码端从而避免直接编码纹理坐标,对重建基础网格重新生成纹理坐标后,进行网格清理,即去除重复点以及退化面。然后经过细分变形步骤,得到细分后的基础网格以及相应的细分变形网格对应顶点之间的位移,后续处理过程与图3中相应的编码过程相同。Exemplarily, as shown in FIG20, the input mesh first passes through the basic mesh generation step to obtain a basic mesh, and the basic mesh is compressed and reconstructed by the basic mesh compression module to obtain a reconstructed basic mesh. The texture coordinates obtained in the basic mesh generation stage can be restored according to the texture coordinate information of the current image, so this information can be passed to the decoding end to avoid directly encoding the texture coordinates. After the texture coordinates are regenerated for the reconstructed basic mesh, the mesh is cleaned up, that is, duplicate points and degenerate surfaces are removed. Then, after the subdivision deformation step, the displacement between the corresponding vertices of the subdivided basic mesh and the corresponding subdivided deformed mesh is obtained, and the subsequent processing process is the same as the corresponding encoding process in FIG3.

在另一种实施例中,纹理坐标信息可以基于重建基础网格确定,纹理坐标信息包括:重建基础网格对应的纹理坐标信息。编码器可以基于基础网格的编码比特进行重建,确定重建基础网格;对重建基础网格进行网格参数化,确定纹理坐标信息;对基础网格进行压缩编码,确定基础网格对应的编码比特;对纹理坐标信息进行编码,确定纹理坐标信息对应的编码比特;将基础网格对应的编码比特与纹理坐标信息对应的编码比特分别写入码流。In another embodiment, the texture coordinate information can be determined based on the reconstructed base grid, and the texture coordinate information includes: texture coordinate information corresponding to the reconstructed base grid. The encoder can reconstruct based on the coding bits of the base grid to determine the reconstructed base grid; perform mesh parameterization on the reconstructed base grid to determine the texture coordinate information; perform compression coding on the base grid to determine the coding bits corresponding to the base grid; encode the texture coordinate information to determine the coding bits corresponding to the texture coordinate information; and write the coding bits corresponding to the base grid and the coding bits corresponding to the texture coordinate information into the bitstream respectively.

示例性地,如图21所示,输入网格通过基础网格模块生成后,直接对其进行基础网格压缩,得到基础网格码流以及重建的基础网格,对重建的基础网格进行网格参数化,得到包含纹理坐标的重建网格,将纹理坐标信息也作为基础网格码流进行编码。然后对参数化后的基础网格进行网格清理,去除其重复顶点以及退化面,并进行细分变形操作,得到相应的位移,后续处理过程与与图3中相应的编码过程相同。Exemplarily, as shown in FIG21, after the input mesh is generated by the basic mesh module, the basic mesh is directly compressed to obtain a basic mesh code stream and a reconstructed basic mesh, and the reconstructed basic mesh is mesh parameterized to obtain a reconstructed mesh containing texture coordinates, and the texture coordinate information is also encoded as a basic mesh code stream. Then, the parameterized basic mesh is mesh cleaned to remove its duplicate vertices and degenerate faces, and a subdivision deformation operation is performed to obtain the corresponding displacement, and the subsequent processing process is the same as the corresponding encoding process in FIG3.

可以理解的是,通过单独编码纹理坐标信息发送至解码器,降低了纹理坐标信息的失真,进一步提高了编解码准确性,进而提高了编解码性能。It can be understood that by separately encoding the texture coordinate information and sending it to the decoder, the distortion of the texture coordinate information is reduced, the encoding and decoding accuracy is further improved, and thus the encoding and decoding performance is improved.

在本申请的再一实施例中,基于前述实施例相同的发明构思,参见图22,其示出了本申请实施例提供的一种编码器的组成结构示意图。如图22所示,该编码器190可以包括网格信息确定部分1901与编码部分1902,其中:In another embodiment of the present application, based on the same inventive concept as the above-mentioned embodiment, see Figure 22, which shows a schematic diagram of the composition structure of an encoder provided by an embodiment of the present application. As shown in Figure 22, the encoder 190 may include a grid information determination part 1901 and an encoding part 1902, wherein:

所述网格生成1901部分,配置为确定当前图像对应的基础网格;基于所述基础网格,确定纹理坐标信息;The mesh generation part 1901 is configured to determine a base mesh corresponding to the current image; and determine texture coordinate information based on the base mesh;

所述编码部分1902,配置为对所述基础网格以及所述纹理坐标信息进行编码,将得到的编码比特写入码流。The encoding part 1902 is configured to encode the basic grid and the texture coordinate information, and write the obtained encoding bits into a bit stream.

在一些实施例中,所述纹理坐标信息包括:所述基础网格对应的纹理坐标信息;所述网格信息确定部分1901,还配置为基于所述基础网格进行网格参数化,确定所述纹理坐标信息。In some embodiments, the texture coordinate information includes: texture coordinate information corresponding to the basic mesh; the mesh information determination part 1901 is further configured to perform mesh parameterization based on the basic mesh to determine the texture coordinate information.

在一些实施例中,所述纹理坐标信息包括:重建基础网格对应的纹理坐标信息;所述网格信息确定部分1901基于所述基础网格的编码比特进行重建,确定重建基础网格;对所述重建基础网格进行网格参数化,确定所述纹理坐标信息。In some embodiments, the texture coordinate information includes: texture coordinate information corresponding to the reconstructed basic grid; the grid information determination part 1901 reconstructs based on the coding bits of the basic grid to determine the reconstructed basic grid; and grid parameterizes the reconstructed basic grid to determine the texture coordinate information.

在一些实施例中,所述编码部分1902,还配置为对包含所述纹理坐标信息的基础网格进行编码,将得到的编码比特写入码流。In some embodiments, the encoding part 1902 is further configured to encode the basic grid including the texture coordinate information, and write the obtained encoding bits into a bitstream.

在一些实施例中,所述编码部分1902,还配置为对所述基础网格进行压缩编码,确定所述基础网格对应的编码比特;对所述纹理坐标信息进行编码,确定所述纹理坐标信息对应的编码比特;将所述基础网格对应的编码比特与所述纹理坐标信息对应的编码比特分别写入码流。In some embodiments, the encoding part 1902 is further configured to perform compression encoding on the basic grid to determine the encoding bits corresponding to the basic grid; to encode the texture coordinate information to determine the encoding bits corresponding to the texture coordinate information; and to write the encoding bits corresponding to the basic grid and the encoding bits corresponding to the texture coordinate information into the bit stream respectively.

需要说明的是,以上装置实施例的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果。对于本发明装置实施例中未披露的技术细节,请参照本发明方法实施例的描述而理解。It should be noted that the description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiment of the present invention, please refer to the description of the method embodiment of the present invention for understanding.

可以理解地,在本申请实施例中,“部分”可以是部分电路、部分处理器、部分程序或软件等等,当然也可以是模块,还可以是非模块化的。而且在本实施例中的各组成部分可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。 It is understandable that in the embodiments of the present application, "part" can be a part of a circuit, a part of a processor, a part of a program or software, etc., and of course it can also be a module, or it can be non-modular. Moreover, the components in the present embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional module.

所述集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中,基于这样的理解,本实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网格设备等)或processor(处理器)执行本实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or grid device, etc.) or a processor to perform all or part of the steps of the method described in this embodiment. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.

因此,本申请实施例提供了一种计算机可读存储介质,应用于编码器190,该计算机可读存储介质存储有计算机程序,所述计算机程序被第一处理器执行时实现前述实施例中任一项所述的方法。Therefore, an embodiment of the present application provides a computer-readable storage medium, which is applied to the encoder 190. The computer-readable storage medium stores a computer program, and when the computer program is executed by the first processor, the method described in any one of the aforementioned embodiments is implemented.

基于编码器190的组成以及计算机可读存储介质,参见图23,其示出了本申请实施例提供的编码器190的具体硬件结构示意图。如图23所示,编码器190可以包括:第一通信接口2301、第一存储器2302和第一处理器2303;各个组件通过第一总线系统2304耦合在一起。可理解,第一总线系统2304用于实现这些组件之间的连接通信。第一总线系统2304除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图20中将各种总线都标为第一总线系统2304。其中,Based on the composition of the encoder 190 and the computer-readable storage medium, refer to Figure 23, which shows a specific hardware structure diagram of the encoder 190 provided in an embodiment of the present application. As shown in Figure 23, the encoder 190 may include: a first communication interface 2301, a first memory 2302 and a first processor 2303; each component is coupled together through a first bus system 2304. It can be understood that the first bus system 2304 is used to achieve connection and communication between these components. In addition to the data bus, the first bus system 2304 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, various buses are labeled as the first bus system 2304 in Figure 20. Among them,

第一通信接口2301,用于在与其他外部网元之间进行收发信息过程中,信号的接收和发送;The first communication interface 2301 is used for receiving and sending signals during the process of sending and receiving information with other external network elements;

第一存储器2302,用于存储能够在第一处理器2303上运行的计算机程序;A first memory 2302, used to store a computer program that can be run on the first processor 2303;

第一处理器2303,用于在运行所述计算机程序时,执行本申请实施例中应用于编码器的编码方法。The first processor 2303 is configured to execute the encoding method applied to the encoder in the embodiment of the present application when running the computer program.

可以理解,本申请实施例中的第一存储器2302可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本申请描述的系统和方法的第一存储器2302旨在包括但不限于这些和任意其它适合类型的存储器。It can be understood that the first memory 2302 in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus RAM (DRRAM). The first memory 2302 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

而第一处理器2303可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过第一处理器2303中的硬件的集成逻辑电路或者软件形式的指令完成。上述的第一处理器2303可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于第一存储器2302,第一处理器2303读取第一存储器2302中的信息,结合其硬件完成上述方法的步骤。The first processor 2303 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the first processor 2303. The above-mentioned first processor 2303 can be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the first memory 2302, and the first processor 2303 reads the information in the first memory 2302 and completes the steps of the above method in combination with its hardware.

可以理解的是,本申请描述的这些实施例可以用硬件、软件、固件、中间件、微码或其组合来实现。对于硬件实现,处理单元可以实现在一个或多个专用集成电路(Application Specific Integrated Circuits,ASIC)、数字信号处理器(Digital Signal Processing,DSP)、数字信号处理设备(DSP Device,DSPD)、可编程逻辑设备(Programmable Logic Device,PLD)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、通用处理器、控制器、微控制器、微处理器、用于执行本申请所述功能的其它电子单元或其组合中。对于软件实现,可通过执行本申请所述功能的模块(例如过程、函数等)来实现本申请所述的技术。软件代码可存储在存储器中并通过处理器执行。存储器可以在处理器中或在处理器外部实现。It is understood that the embodiments described in this application can be implemented in hardware, software, firmware, middleware, microcode or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processors (Digital Signal Processing, DSP), digital signal processing devices (DSP Device, DSPD), programmable logic devices (Programmable Logic Device, PLD), field programmable gate arrays (Field-Programmable Gate Array, FPGA), general processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in this application or a combination thereof. For software implementation, the technology described in this application can be implemented by a module (such as a process, function, etc.) that performs the functions described in this application. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.

可选地,作为另一个实施例,第一处理器2303还配置为在运行所述计算机程序时,执行前述实施例中任一项所述的应用于编码器的编码方法。Optionally, as another embodiment, the first processor 2303 is further configured to execute the encoding method applied to the encoder described in any one of the aforementioned embodiments when running the computer program.

基于前述实施例相同的发明构思,参见图24,其示出了本申请实施例提供的一种解码器的组成结构示意图。如图24所示,该解码器240可以包括所述解析部分2401与坐标确定部分2403,其中:Based on the same inventive concept as the above-mentioned embodiment, referring to FIG. 24 , a schematic diagram of the composition structure of a decoder provided in an embodiment of the present application is shown. As shown in FIG. 24 , the decoder 240 may include the parsing part 2401 and the coordinate determination part 2403, wherein:

所述解析部分2401,配置为解析码流,确定第一基础网格以及第一基础网格的纹理坐标信息;The parsing part 2401 is configured to parse the code stream to determine the first basic grid and the texture coordinate information of the first basic grid;

细分变形部分2402,配置为基于所述第一基础网格进行网格细分与变形,确定重建变形网格; The subdivision and deformation part 2402 is configured to perform mesh subdivision and deformation based on the first basic mesh to determine a reconstructed deformed mesh;

坐标确定部分2403,配置为基于所述第一基础网格的纹理坐标信息与所述重建变形网格,确定所述重建变形网格的纹理坐标信息。The coordinate determining part 2403 is configured to determine the texture coordinate information of the reconstructed deformed mesh based on the texture coordinate information of the first base mesh and the reconstructed deformed mesh.

在一些实施例中,所述解析部分2401,还配置为对所述码流解复用,确定第一基础网格码流;In some embodiments, the parsing part 2401 is further configured to demultiplex the code stream to determine a first basic grid code stream;

解析所述第一基础网格码流,确定包含纹理坐标信息的第一基础网格,从而确定所述第一基础网格以及所述第一基础网格的纹理坐标信息。The first basic grid code stream is parsed to determine the first basic grid including the texture coordinate information, thereby determining the first basic grid and the texture coordinate information of the first basic grid.

在一些实施例中,所述解析部分2401,还配置为对所述码流解复用,确定第二基础网格码流与纹理坐标码流;解析所述第二基础网格码流,确定第二基础网格;解析所述纹理坐标码流,确定纹理坐标信息;根据所述纹理坐标信息,对所述第二基础网格进行重建,确定所述第一基础网格以及所述第一基础网格的纹理坐标信息。In some embodiments, the parsing part 2401 is further configured to demultiplex the code stream to determine a second basic grid code stream and a texture coordinate code stream; parse the second basic grid code stream to determine a second basic grid; parse the texture coordinate code stream to determine texture coordinate information; reconstruct the second basic grid based on the texture coordinate information to determine the first basic grid and the texture coordinate information of the first basic grid.

在一些实施例中,所述解码器240还包括重建部分,所述重建部分,配置为根据所述纹理坐标信息,对所述第二基础网格进行重建,确定包含纹理坐标信息的基础网格;对所述包含纹理坐标信息的基础网格进行网格清理,确定所述第一基础网格以及所述第一基础网格的纹理坐标信息。In some embodiments, the decoder 240 also includes a reconstruction part, which is configured to reconstruct the second basic grid according to the texture coordinate information to determine the basic grid containing the texture coordinate information; perform grid cleaning on the basic grid containing the texture coordinate information to determine the first basic grid and the texture coordinate information of the first basic grid.

在一些实施例中,所述细分变形部分2402,还配置为基于所述第一基础网格进行网格细分,确定基础细分网格;基于所述基础细分网格与从所述码流中解析得到的位移信息,确定所述重建变形网格。In some embodiments, the subdivision deformation part 2402 is further configured to perform grid subdivision based on the first basic grid to determine a basic subdivision grid; and determine the reconstructed deformed grid based on the basic subdivision grid and displacement information parsed from the bitstream.

在一些实施例中,所述坐标确定部分2403,还配置为基于所述第一基础网格的纹理坐标信息与所述基础细分网格,确定所述重建变形网格的初始纹理坐标信息;基于所述重建变形网格的初始纹理坐标信息,确定第一失真测度和/或第二失真测度;所述第一失真测度表征所述重建变形网格中的三角面片从三维坐标空间到纹理坐标空间的表面局部距离的平均拉伸;所述第二失真测度表征所述重建变形网格中的三角面片从三维坐标空间到纹理坐标空间的最坏情况下的拉伸;根据所述第一失真测度和/或所述第二失真测度,确定所述重建变形网格的纹理坐标信息。In some embodiments, the coordinate determination part 2403 is also configured to determine the initial texture coordinate information of the reconstructed deformed mesh based on the texture coordinate information of the first basic mesh and the basic subdivision mesh; determine a first distortion measure and/or a second distortion measure based on the initial texture coordinate information of the reconstructed deformed mesh; the first distortion measure represents the average stretching of the surface local distance of the triangular facets in the reconstructed deformed mesh from the three-dimensional coordinate space to the texture coordinate space; the second distortion measure represents the worst-case stretching of the triangular facets in the reconstructed deformed mesh from the three-dimensional coordinate space to the texture coordinate space; determine the texture coordinate information of the reconstructed deformed mesh according to the first distortion measure and/or the second distortion measure.

在一些实施例中,所述坐标确定部分2403,还配置为基于所述重建网格的初始纹理坐标信息,与所述重建网格的三维坐标信息,确定所述重建变形网格中顶点对应的三角面片的纹理坐标与三维坐标;根据所述三角面片的纹理坐标与三维坐标,确定第一长度参数与第二长度参数;所述第一长度参数表征单位长度向量从纹理坐标空间映射到三维坐标空间对应的最小长度;所述第二长度参数表征单位长度向量从纹理坐标空间映射到三维坐标空间对应的最大长度;根据所述第一长度参数与所述第二长度参数;确定所述第一失真测度;以及/或者,根据所述第二长度参数,确定所述第二失真测度。In some embodiments, the coordinate determination part 2403 is also configured to determine the texture coordinates and three-dimensional coordinates of the triangular facets corresponding to the vertices in the reconstructed deformed mesh based on the initial texture coordinate information of the reconstructed mesh and the three-dimensional coordinate information of the reconstructed mesh; determine the first length parameter and the second length parameter according to the texture coordinates and the three-dimensional coordinates of the triangular facets; the first length parameter represents the minimum length corresponding to the mapping of a unit length vector from the texture coordinate space to the three-dimensional coordinate space; the second length parameter represents the maximum length corresponding to the mapping of a unit length vector from the texture coordinate space to the three-dimensional coordinate space; determine the first distortion measure according to the first length parameter and the second length parameter; and/or determine the second distortion measure according to the second length parameter.

在一些实施例中,所述坐标确定部分2403,还配置为根据所述三角面片的纹理坐标与三维坐标之间的仿射映射,确定第一偏导数与第二偏导数;根据所述第一偏导数与所述第二偏导数,确定所述三角面片中的顶点对应的偏导矩阵;根据所述偏导矩阵对应的第一奇异值,确定所述第一长度参数;根据所述偏导矩阵对应的第二奇异值,确定所述第二长度参数;所述第一奇异值大于所述第二奇异值。In some embodiments, the coordinate determination part 2403 is also configured to determine the first partial derivative and the second partial derivative according to the affine mapping between the texture coordinates of the triangular patch and the three-dimensional coordinates; determine the partial derivative matrix corresponding to the vertices in the triangular patch according to the first partial derivative and the second partial derivative; determine the first length parameter according to the first singular value corresponding to the partial derivative matrix; determine the second length parameter according to the second singular value corresponding to the partial derivative matrix; the first singular value is greater than the second singular value.

在一些实施例中,所述坐标确定部分2403,还配置为根据所述第一偏导数对应的第一点积,以及所述第二偏导数对应的第二点积,确定所述第一失真测度。In some embodiments, the coordinate determining part 2403 is further configured to determine the first distortion measure based on a first dot product corresponding to the first partial derivative and a second dot product corresponding to the second partial derivative.

在一些实施例中,所述坐标确定部分2403,还配置为根据所述第一失真测度和/或所述第二失真测度,确定所述重建变形网格中当前顶点对应的纹理坐标误差;通过最小化所述纹理坐标误差,更新所述当前顶点的纹理坐标,从而确定所述重建变形网格的纹理坐标信息。In some embodiments, the coordinate determination part 2403 is also configured to determine the texture coordinate error corresponding to the current vertex in the reconstructed deformed mesh based on the first distortion measure and/or the second distortion measure; and update the texture coordinates of the current vertex by minimizing the texture coordinate error, thereby determining the texture coordinate information of the reconstructed deformed mesh.

在一些实施例中,所述当前顶点对应的三角面片包括:所述当前顶点邻接的至少一个三角面片;所述纹理坐标误差包括:第一纹理坐标误差和/或第二纹理坐标误差;所述坐标确定部分2403,还配置为根据所述至少一个三角面片对应的第一失真测度之和,确定所述第一纹理坐标误差;In some embodiments, the triangular face corresponding to the current vertex includes: at least one triangular face adjacent to the current vertex; the texture coordinate error includes: a first texture coordinate error and/or a second texture coordinate error; the coordinate determination part 2403 is further configured to determine the first texture coordinate error according to the sum of the first distortion measure corresponding to the at least one triangular face;

根据所述至少一个三角面片对应的最大的第二失真测度,确定所述第二纹理坐标误差。The second texture coordinate error is determined according to a maximum second distortion measure corresponding to the at least one triangular patch.

在一些实施例中,所述坐标确定部分2403,还配置为通过最小化第一纹理坐标误差,更新所述当前顶点的纹理坐标;或者,通过最小化第二纹理坐标误差,更新所述当前顶点的纹理坐标;或者,分别通过最小化第一纹理坐标误差与第二纹理坐标误差,更新所述当前顶点的纹理坐标。In some embodiments, the coordinate determination part 2403 is also configured to update the texture coordinates of the current vertex by minimizing the first texture coordinate error; or, to update the texture coordinates of the current vertex by minimizing the second texture coordinate error; or, to update the texture coordinates of the current vertex by minimizing the first texture coordinate error and the second texture coordinate error respectively.

在一些实施例中,所述坐标确定部分2403,还配置为基于所述当前顶点,确定初始中心位置点与搜索范围;基于所述初始中心位置点与所述搜索范围进行至少一次搜索,确定至少一个初始目标位置点;根据至少一个初始目标位置点对应的最小候选纹理坐标误差,确定目标位置点;根据所述目标位置点的纹理坐标,更新所述当前顶点的纹理坐标。In some embodiments, the coordinate determination part 2403 is also configured to determine an initial center position point and a search range based on the current vertex; perform at least one search based on the initial center position point and the search range to determine at least one initial target position point; determine a target position point based on a minimum candidate texture coordinate error corresponding to at least one initial target position point; and update the texture coordinates of the current vertex based on the texture coordinates of the target position point.

在一些实施例中,所述坐标确定部分2403,还配置为确定所述当前顶点对应的至少一个候选位置点;通过确定所述至少一个候选位置点对应的至少一个候选纹理坐标误差,从所述至少一个候选位置点中确定所述初始中心位置点;基于所述初始中心位置点,确定所述搜索范围。In some embodiments, the coordinate determination part 2403 is also configured to determine at least one candidate position point corresponding to the current vertex; determine the initial center position point from the at least one candidate position point by determining at least one candidate texture coordinate error corresponding to the at least one candidate position point; and determine the search range based on the initial center position point.

在一些实施例中,所述至少一个候选位置点包括:所述当前顶点的邻接点的平均位置上的点,和/或所述当前顶点的邻接边的中点。 In some embodiments, the at least one candidate position point includes: a point at an average position of adjacent points of the current vertex, and/or a midpoint of an adjacent edge of the current vertex.

在一些实施例中,所述坐标确定部分2403,还配置为确定所述至少一个候选位置点对应的至少一个候选纹理坐标误差;根据所述至少一个候选纹理坐标误差与所述当前顶点对应的纹理坐标误差中的最小值,确定所述初始中心位置点。In some embodiments, the coordinate determination part 2403 is also configured to determine at least one candidate texture coordinate error corresponding to the at least one candidate position point; and determine the initial center position point based on the minimum value of the at least one candidate texture coordinate error and the texture coordinate error corresponding to the current vertex.

在一些实施例中,所述坐标确定部分2403,还配置为以所述初始中心位置点为中心,以所述初始中心位置点到其至少一个邻接面的第三条边的至少一个距离中的最小值为半径,确定所述搜索范围。在一些实施例中,所述坐标确定部分2403,还配置为确定每次搜索的搜索方向;基于所述初始中心位置点,按照所述每次搜索的搜索方向,在所述搜索范围内进行二分法搜索,确定每次搜索对应的初始目标位置点,直至完成至少一次搜索,确定所述至少一个初始目标位置点。In some embodiments, the coordinate determination part 2403 is further configured to determine the search range with the initial center position point as the center and the minimum value of at least one distance from the initial center position point to the third edge of at least one adjacent face as the radius. In some embodiments, the coordinate determination part 2403 is further configured to determine the search direction of each search; based on the initial center position point, according to the search direction of each search, a binary search is performed within the search range to determine the initial target position point corresponding to each search, until at least one search is completed to determine the at least one initial target position point.

在一些实施例中,所述坐标确定部分2403,还配置为以所述初始中心位置点为所述每次搜索的起始点,按照所述每次搜索的搜索方向,在所述搜索范围内确定所述每次搜索的终止点;在所述起始点对应的候选纹理坐标误差小于所述终止点对应的候选纹理坐标误差的情况下,根据所述起始点与所述终止点之间的中点更新所述终止点;在所述起始点对应的候选纹理坐标误差大于所述终止点的对应候选纹理坐标误差的情况下,根据所述起始点与所述终止点之间的中点更新所述起始点;进行至少一次更新,直至确定更新的所述起始点与更新的所述终止点之间的距离小于预设距离阈值,根据所述起始点和/或所述终止点,确定所述初始目标位置点。In some embodiments, the coordinate determination part 2403 is also configured to use the initial center position point as the starting point of each search, and determine the end point of each search within the search range according to the search direction of each search; when the candidate texture coordinate error corresponding to the starting point is less than the candidate texture coordinate error corresponding to the end point, update the end point according to the midpoint between the starting point and the end point; when the candidate texture coordinate error corresponding to the starting point is greater than the corresponding candidate texture coordinate error of the end point, update the starting point according to the midpoint between the starting point and the end point; perform at least one update until it is determined that the distance between the updated starting point and the updated end point is less than a preset distance threshold, and determine the initial target position point according to the starting point and/or the end point.

在一些实施例中,所述坐标确定部分2403,还配置为将所述起始点确定为所述初始目标位置点;或者,将所述终止点确定为所述初始目标位置点;或者,将所述起始点与所述终止点之间的中点,确定为所述初始目标位置点;或者,将所述起始点与所述终止点中,候选纹理坐标误差小的点确定为所述目标位置点。In some embodiments, the coordinate determination part 2403 is also configured to determine the starting point as the initial target position point; or, determine the ending point as the initial target position point; or, determine the midpoint between the starting point and the ending point as the initial target position point; or, determine the point between the starting point and the ending point with the smallest error in the candidate texture coordinates as the target position point.

在一些实施例中,所述坐标确定部分2403,还配置为确定所述至少一个顶点对应的至少一个纹理坐标误差;根据所述至少一个纹理坐标误差,将所述至少一个顶点组织为待优化序列;将所述待优化序列中预设序列位置对应的顶点,确定为所述当前顶点;所述预设序列位置对应所述至少一个顶点中纹理坐标误差最大的顶点。In some embodiments, the coordinate determination part 2403 is further configured to determine at least one texture coordinate error corresponding to the at least one vertex; organize the at least one vertex into a sequence to be optimized based on the at least one texture coordinate error; determine the vertex corresponding to a preset sequence position in the sequence to be optimized as the current vertex; the preset sequence position corresponds to the vertex with the largest texture coordinate error among the at least one vertex.

在一些实施例中,所述坐标确定部分2403,还配置为根据目标位置点,更新所述至少一个顶点中所述当前顶点对应的纹理坐标误差,进而更新所述待优化序列中顶点的顺序;对更新的所述预设序列位置上的顶点进行纹理坐标更新,直至达到预设迭代目标,完成重建变形网格的纹理坐标信息。In some embodiments, the coordinate determination part 2403 is also configured to update the texture coordinate error corresponding to the current vertex in the at least one vertex according to the target position point, and then update the order of the vertices in the sequence to be optimized; update the texture coordinates of the updated vertices at the preset sequence position until the preset iteration target is reached, thereby completing the reconstruction of the texture coordinate information of the deformed mesh.

在一些实施例中,所述预设迭代目标包括:In some embodiments, the preset iteration target includes:

所述待优化序列的更新次数达到预设更新次数阈值;和/或,所述预设序列位置上的待优化顶点的纹理坐标误差小于预设误差阈值。The update times of the sequence to be optimized reaches a preset update times threshold; and/or the texture coordinate error of the vertex to be optimized at the preset sequence position is less than a preset error threshold.

在一些实施例中,所述重建变形网格包括:所述第一基础网格对应的第i层重建变形网格;i大于1,所述坐标确定部分2403,还配置为在完成对所述第i层重建变形网格的纹理坐标更新的情况下,基于所述第i层重建变形网格中顶点的纹理坐标进行插值,确定第i+1层重建变形网格中顶点的纹理坐标;i+1小于或等于预设层数;通过确定所述第i+1层重建变形网格中的顶点对应的三角面片的第一失真测度和/或第二失真测度,更新所述第i+1层重建变形网格中顶点的纹理坐标。In some embodiments, the reconstructed deformed mesh includes: the i-th layer reconstructed deformed mesh corresponding to the first basic mesh; i is greater than 1, and the coordinate determination part 2403 is further configured to, after completing the update of the texture coordinates of the i-th layer reconstructed deformed mesh, interpolate the texture coordinates of the vertices in the i-th layer reconstructed deformed mesh to determine the texture coordinates of the vertices in the i+1-th layer reconstructed deformed mesh; i+1 is less than or equal to a preset number of layers; by determining the first distortion measure and/or the second distortion measure of the triangle facets corresponding to the vertices in the i+1-th layer reconstructed deformed mesh, update the texture coordinates of the vertices in the i+1-th layer reconstructed deformed mesh.

可以理解地,在本实施例中,“部分”可以是部分电路、部分处理器、部分程序或软件等等,当然也可以是模块,还可以是非模块化的。而且在本实施例中的各组成部分可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。It can be understood that in this embodiment, "part" can be a part of the circuit, a part of the processor, a part of the program or software, etc., and of course it can also be a module, or it can be non-modular. Moreover, the components in this embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional modules.

所述集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本实施例提供了一种计算机可读存储介质,应用于解码器240,该计算机可读存储介质存储有计算机程序,所述计算机程序被第二处理器执行时实现前述实施例中任一项所述的方法。If the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, this embodiment provides a computer-readable storage medium, which is applied to the decoder 240, and the computer-readable storage medium stores a computer program. When the computer program is executed by the second processor, the method described in any one of the above embodiments is implemented.

需要说明的是,以上装置实施例的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果。对于本发明装置实施例中未披露的技术细节,请参照本发明方法实施例的描述而理解。It should be noted that the description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiment of the present invention, please refer to the description of the method embodiment of the present invention for understanding.

基于解码器240的组成以及计算机可读存储介质,参见图25,其示出了本申请实施例提供的解码器240的具体硬件结构示意图。如图25所示,解码器240可以包括:第二通信接口2501、第二存储器2502和第二处理器2503;各个组件通过第二总线系统2504耦合在一起。可理解,第二总线系统2504用于实现这些组件之间的连接通信。第二总线系统2504除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图25中将各种总线都标为第二总线系统2504。其中,Based on the composition of the decoder 240 and the computer-readable storage medium, refer to Figure 25, which shows a specific hardware structure diagram of the decoder 240 provided in an embodiment of the present application. As shown in Figure 25, the decoder 240 may include: a second communication interface 2501, a second memory 2502 and a second processor 2503; each component is coupled together through a second bus system 2504. It can be understood that the second bus system 2504 is used to achieve connection and communication between these components. In addition to the data bus, the second bus system 2504 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, various buses are marked as the second bus system 2504 in Figure 25. Among them,

第二通信接口2501,用于在与其他外部网元之间进行收发信息过程中,信号的接收和发送;The second communication interface 2501 is used for receiving and sending signals during the process of sending and receiving information with other external network elements;

第二存储器2502,用于存储能够在第二处理器2503上运行的计算机程序; The second memory 2502 is used to store a computer program that can be run on the second processor 2503;

第二处理器2503,用于在运行所述计算机程序时,执行本申请实施例提供的应用于解码器的解码方法。The second processor 2503 is used to execute the decoding method applied to the decoder provided in the embodiment of the present application when running the computer program.

可选地,作为另一个实施例,第二处理器2503还配置为在运行所述计算机程序时,执行前述实施例中任一项所述的方法。Optionally, as another embodiment, the second processor 2503 is further configured to execute any one of the methods described in the foregoing embodiments when running the computer program.

可以理解,第二存储器2502与第一存储器2302的硬件功能类似,第二处理器2503与第一处理器2303的硬件功能类似;这里不再详述。It can be understood that the hardware functions of the second memory 2502 and the first memory 2302 are similar, and the hardware functions of the second processor 2503 and the first processor 2303 are similar; they will not be described in detail here.

在本申请的再一实施例中,参见图26,其示出了本申请实施例提供的一种编解码系统的组成结构示意图。如图26所示,编解码系统260可以包括编码器2601和解码器2602。In yet another embodiment of the present application, referring to FIG26 , a schematic diagram of the composition structure of a coding and decoding system provided in an embodiment of the present application is shown. As shown in FIG26 , a coding and decoding system 260 may include an encoder 2601 and a decoder 2602 .

在本申请实施例中,编码器2601可以是前述实施例中任一项所述的编码器,解码器2602可以是前述实施例中任一项所述的解码器。In the embodiment of the present application, the encoder 2601 may be the encoder described in any one of the aforementioned embodiments, and the decoder 2602 may be the decoder described in any one of the aforementioned embodiments.

需要说明的是,在本申请中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that, in this application, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

本申请所提供的几个方法实施例中所揭露的方法,在不冲突的情况下可以任意组合,得到新的方法实施例。The methods disclosed in several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.

本申请所提供的几个产品实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的产品实施例。The features disclosed in several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.

本申请所提供的几个方法或设备实施例中所揭露的特征,在不冲突的情况下可以任意组合,得到新的方法实施例或设备实施例。The features disclosed in several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.

以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

工业实用性Industrial Applicability

本申请实施例提供了一种编解码方法、码流、编码器、解码器以及存储介质,在解码端,解析码流,确定第一基础网格以及第一基础网格的纹理坐标信息;基于第一基础网格进行网格细分与变形,确定重建变形网格;基于第一基础网格的纹理坐标信息与重建变形网格,确定重建变形网格的纹理坐标信息。如此,基于第一基础网格的纹理坐标信息与细分变形得到的与重建变形网格确定重建变形网格的纹理坐标信息,减少了顶点的纹理坐标的失真,提高了纹理坐标的准确性以及与重建变形网格之间的匹配度,从而提高了重建变形网格的质量,提高了解码性能。进一步地,通过三角面片从三维坐标空间到纹理坐标空间的表面局部距离的平均拉伸和/或三角面片从三维坐标空间到纹理坐标空间的最坏情况下的拉伸两个测度,衡量重建变形网格中顶点纹理坐标的失真,并根据其失真对顶点的纹理坐标进行调整,更新顶点的纹理坐标,提高纹理坐标的准确性以及与重建变形网格之间的匹配度,从而提高了重建变形网格的质量,进而提高了解码性能。进一步地,通过编码器通过单独编码纹理坐标信息发送至解码器,降低了纹理坐标信息的失真,进一步提高了编解码准确性,进而提高了编解码性能。 The embodiment of the present application provides a coding and decoding method, a code stream, an encoder, a decoder and a storage medium. At the decoding end, the code stream is parsed to determine the first basic grid and the texture coordinate information of the first basic grid; the grid is subdivided and deformed based on the first basic grid to determine the reconstructed deformed grid; the texture coordinate information of the reconstructed deformed grid is determined based on the texture coordinate information of the first basic grid and the reconstructed deformed grid obtained by subdividing and deforming, thereby reducing the distortion of the texture coordinates of the vertices, improving the accuracy of the texture coordinates and the matching degree between the reconstructed deformed grid, thereby improving the quality of the reconstructed deformed grid and the decoding performance. Furthermore, the distortion of the texture coordinates of the vertices in the reconstructed deformed grid is measured by two measures: the average stretching of the surface local distance of the triangular face from the three-dimensional coordinate space to the texture coordinate space and/or the worst-case stretching of the triangular face from the three-dimensional coordinate space to the texture coordinate space, and the texture coordinates of the vertices are adjusted according to the distortion, the texture coordinates of the vertices are updated, the accuracy of the texture coordinates and the matching degree between the reconstructed deformed grid are improved, thereby improving the quality of the reconstructed deformed grid, and then improving the decoding performance. Furthermore, by separately encoding the texture coordinate information through the encoder and sending it to the decoder, the distortion of the texture coordinate information is reduced, the encoding and decoding accuracy is further improved, and thus the encoding and decoding performance is improved.

Claims (36)

一种解码方法,应用于解码器,所述方法包括:A decoding method, applied to a decoder, comprising: 解析码流,确定第一基础网格以及第一基础网格的纹理坐标信息;Parse the code stream to determine the first basic grid and texture coordinate information of the first basic grid; 基于所述第一基础网格进行网格细分与变形,确定重建变形网格;Performing mesh subdivision and deformation based on the first basic mesh to determine a reconstructed deformed mesh; 基于所述第一基础网格的纹理坐标信息与所述重建变形网格,确定所述重建变形网格的纹理坐标信息。The texture coordinate information of the reconstructed deformed mesh is determined based on the texture coordinate information of the first basic mesh and the reconstructed deformed mesh. 根据权利要求1所述的方法,其中,所述解析码流,确定第一基础网格以及第一基础网格的纹理坐标信息,包括:The method according to claim 1, wherein the parsing the bitstream to determine the first base mesh and the texture coordinate information of the first base mesh comprises: 对所述码流解复用,确定第一基础网格码流;Demultiplexing the code stream to determine a first basic grid code stream; 解析所述第一基础网格码流,确定包含纹理坐标信息的第一基础网格,从而确定所述第一基础网格以及所述第一基础网格的纹理坐标信息。The first basic grid code stream is parsed to determine the first basic grid including the texture coordinate information, thereby determining the first basic grid and the texture coordinate information of the first basic grid. 根据权利要求1所述的方法,其中,所述解析码流,确定第一基础网格以及第一基础网格的纹理坐标信息,包括:The method according to claim 1, wherein the parsing the bitstream to determine the first base mesh and the texture coordinate information of the first base mesh comprises: 对所述码流解复用,确定第二基础网格码流与纹理坐标码流;Demultiplexing the code stream to determine a second basic grid code stream and a texture coordinate code stream; 解析所述第二基础网格码流,确定第二基础网格;Parsing the second basic grid code stream to determine a second basic grid; 解析所述纹理坐标码流,确定纹理坐标信息;Parsing the texture coordinate code stream to determine texture coordinate information; 根据所述纹理坐标信息,对所述第二基础网格进行重建,确定所述第一基础网格以及所述第一基础网格的纹理坐标信息。The second basic mesh is reconstructed according to the texture coordinate information to determine the first basic mesh and the texture coordinate information of the first basic mesh. 根据权利要求3所述的方法,其中,所述根据所述纹理坐标信息,对所述第二基础网格进行重建,确定所述第一基础网格以及所述第一基础网格的纹理坐标信息,包括:The method according to claim 3, wherein the reconstructing the second base mesh according to the texture coordinate information and determining the first base mesh and the texture coordinate information of the first base mesh comprises: 根据所述纹理坐标信息,对所述第二基础网格进行重建,确定包含纹理坐标信息的基础网格;Reconstructing the second basic mesh according to the texture coordinate information to determine a basic mesh including the texture coordinate information; 对所述包含纹理坐标信息的基础网格进行网格清理,确定所述第一基础网格以及所述第一基础网格的纹理坐标信息。Mesh cleaning is performed on the basic mesh including the texture coordinate information to determine the first basic mesh and the texture coordinate information of the first basic mesh. 根据权利要求1所述的方法,其中,所述基于所述第一基础网格进行网格细分与变形,确定重建变形网格,包括:The method according to claim 1, wherein the performing mesh subdivision and deformation based on the first basic mesh to determine the reconstructed deformed mesh comprises: 基于所述第一基础网格进行网格细分,确定基础细分网格;Performing mesh subdivision based on the first basic mesh to determine a basic subdivided mesh; 基于所述基础细分网格与从所述码流中解析得到的位移信息,确定所述重建变形网格。The reconstructed deformed grid is determined based on the basic subdivided grid and the displacement information parsed from the bitstream. 根据权利要求5所述的方法,其中,所述基于所述第一基础网格的纹理坐标信息与所述重建变形网格,确定所述重建变形网格的纹理坐标信息,包括:The method according to claim 5, wherein the determining the texture coordinate information of the reconstructed deformed mesh based on the texture coordinate information of the first base mesh and the reconstructed deformed mesh comprises: 基于所述第一基础网格的纹理坐标信息与所述基础细分网格,确定所述重建变形网格的初始纹理坐标信息;Determining initial texture coordinate information of the reconstructed deformed mesh based on the texture coordinate information of the first basic mesh and the basic subdivided mesh; 基于所述重建变形网格的初始纹理坐标信息,确定第一失真测度和/或第二失真测度;所述第一失真测度表征所述重建变形网格中的三角面片从三维坐标空间到纹理坐标空间的表面局部距离的平均拉伸;所述第二失真测度表征所述重建变形网格中的三角面片从三维坐标空间到纹理坐标空间的最坏情况下的拉伸;Based on the initial texture coordinate information of the reconstructed deformed mesh, a first distortion measure and/or a second distortion measure is determined; the first distortion measure represents an average stretching of a surface local distance of a triangular facet in the reconstructed deformed mesh from a three-dimensional coordinate space to a texture coordinate space; the second distortion measure represents a worst-case stretching of a triangular facet in the reconstructed deformed mesh from a three-dimensional coordinate space to a texture coordinate space; 根据所述第一失真测度和/或所述第二失真测度,确定所述重建变形网格的纹理坐标信息。Texture coordinate information of the reconstructed deformed mesh is determined according to the first distortion measure and/or the second distortion measure. 根据权利要求6所述的方法,其中,所述基于所述重建变形网格的初始纹理坐标信息,确定第一失真测度和/或第二失真测度,包括:The method according to claim 6, wherein determining the first distortion measure and/or the second distortion measure based on the initial texture coordinate information of the reconstructed deformed mesh comprises: 基于所述重建网格的初始纹理坐标信息,与所述重建网格的三维坐标信息,确定所述重建变形网格中顶点对应的三角面片的纹理坐标与三维坐标;Determining texture coordinates and three-dimensional coordinates of triangles corresponding to vertices in the reconstructed deformed mesh based on initial texture coordinate information of the reconstructed mesh and three-dimensional coordinate information of the reconstructed mesh; 根据所述三角面片的纹理坐标与三维坐标,确定第一长度参数与第二长度参数;所述第一长度参数表征单位长度向量从纹理坐标空间映射到三维坐标空间对应的最小长度;所述第二长度参数表征单位长度向量从纹理坐标空间映射到三维坐标空间对应的最大长度;Determine a first length parameter and a second length parameter according to the texture coordinates and the three-dimensional coordinates of the triangular face; the first length parameter represents a minimum length corresponding to the mapping of a unit length vector from the texture coordinate space to the three-dimensional coordinate space; the second length parameter represents a maximum length corresponding to the mapping of a unit length vector from the texture coordinate space to the three-dimensional coordinate space; 根据所述第一长度参数与所述第二长度参数;确定所述第一失真测度;Determining the first distortion measure according to the first length parameter and the second length parameter; 以及/或者,and/or, 根据所述第二长度参数,确定所述第二失真测度。The second distortion measure is determined based on the second length parameter. 根据权利要求7所述的方法,其中,所述根据所述三角面片的纹理坐标与三维坐标,确定第一长度参数与第二长度参数,包括:The method according to claim 7, wherein determining the first length parameter and the second length parameter according to the texture coordinates and the three-dimensional coordinates of the triangular facet comprises: 根据所述三角面片的纹理坐标与三维坐标之间的仿射映射,确定第一偏导数与第二偏导数;Determining a first partial derivative and a second partial derivative according to an affine mapping between the texture coordinates of the triangular patch and the three-dimensional coordinates; 根据所述第一偏导数与所述第二偏导数,确定所述三角面片中的顶点对应的偏导矩阵;Determine a partial derivative matrix corresponding to the vertices in the triangular patch according to the first partial derivative and the second partial derivative; 根据所述偏导矩阵对应的第一奇异值,确定所述第一长度参数; Determining the first length parameter according to a first singular value corresponding to the partial derivative matrix; 根据所述偏导矩阵对应的第二奇异值,确定所述第二长度参数;所述第一奇异值大于所述第二奇异值。The second length parameter is determined according to a second singular value corresponding to the partial derivative matrix; the first singular value is greater than the second singular value. 根据权利要求8所述的方法,其中,所述方法还包括:The method according to claim 8, wherein the method further comprises: 根据所述第一偏导数对应的第一点积,以及所述第二偏导数对应的第二点积,确定所述第一失真测度。The first distortion measure is determined according to a first dot product corresponding to the first partial derivative and a second dot product corresponding to the second partial derivative. 根据权利要求6-9任一项所述的方法,其中,所述根据所述第一失真测度和/或所述第二失真测度,确定所述重建变形网格的纹理坐标信息,包括:The method according to any one of claims 6 to 9, wherein determining the texture coordinate information of the reconstructed deformed mesh according to the first distortion measure and/or the second distortion measure comprises: 根据所述第一失真测度和/或所述第二失真测度,确定所述重建变形网格中当前顶点对应的纹理坐标误差;determining, according to the first distortion measure and/or the second distortion measure, a texture coordinate error corresponding to a current vertex in the reconstructed deformed mesh; 通过最小化所述纹理坐标误差,更新所述当前顶点的纹理坐标,从而确定所述重建变形网格的纹理坐标信息。The texture coordinates of the current vertex are updated by minimizing the texture coordinate error, thereby determining the texture coordinate information of the reconstructed deformed mesh. 根据权利要求10所述的方法,其中,所述当前顶点对应的三角面片包括:所述当前顶点邻接的至少一个三角面片;所述纹理坐标误差包括:第一纹理坐标误差和/或第二纹理坐标误差;所述根据所述第一失真测度和/或所述第二失真测度,确定所述当前顶点对应的纹理坐标误差,包括:The method according to claim 10, wherein the triangular facet corresponding to the current vertex includes: at least one triangular facet adjacent to the current vertex; the texture coordinate error includes: a first texture coordinate error and/or a second texture coordinate error; and determining the texture coordinate error corresponding to the current vertex according to the first distortion measure and/or the second distortion measure comprises: 根据所述至少一个三角面片对应的第一失真测度之和,确定所述第一纹理坐标误差;determining the first texture coordinate error according to a sum of first distortion measures corresponding to the at least one triangular patch; 以及/或者,and/or, 根据所述至少一个三角面片对应的最大的第二失真测度,确定所述第二纹理坐标误差。The second texture coordinate error is determined according to a maximum second distortion measure corresponding to the at least one triangular patch. 根据权利要求11所述的方法,其中,所述通过最小化所述纹理坐标误差,更新所述当前顶点的纹理坐标,包括:The method according to claim 11, wherein updating the texture coordinates of the current vertex by minimizing the texture coordinate error comprises: 通过最小化第一纹理坐标误差,更新所述当前顶点的纹理坐标;Updating the texture coordinates of the current vertex by minimizing the first texture coordinate error; 或者,or, 通过最小化第二纹理坐标误差,更新所述当前顶点的纹理坐标;Updating the texture coordinates of the current vertex by minimizing the second texture coordinate error; 或者,or, 分别通过最小化第一纹理坐标误差与第二纹理坐标误差,更新所述当前顶点的纹理坐标。The texture coordinates of the current vertex are updated by minimizing the first texture coordinate error and the second texture coordinate error respectively. 根据权利要求10所述的方法,其中,所述通过最小化所述纹理坐标误差,更新所述当前顶点的纹理坐标,包括:The method according to claim 10, wherein updating the texture coordinates of the current vertex by minimizing the texture coordinate error comprises: 基于所述当前顶点,确定初始中心位置点与搜索范围;Based on the current vertex, determine an initial center position point and a search range; 基于所述初始中心位置点与所述搜索范围进行至少一次搜索,确定至少一个初始目标位置点;Perform at least one search based on the initial center position point and the search range to determine at least one initial target position point; 根据至少一个初始目标位置点对应的最小候选纹理坐标误差,确定目标位置点;Determining a target position point according to a minimum candidate texture coordinate error corresponding to at least one initial target position point; 根据所述目标位置点的纹理坐标,更新所述当前顶点的纹理坐标。The texture coordinates of the current vertex are updated according to the texture coordinates of the target position point. 根据权利要求10所述的方法,其中,所述基于所述当前顶点,确定初始中心位置点与搜索范围,包括:The method according to claim 10, wherein determining the initial center position point and the search range based on the current vertex comprises: 确定所述当前顶点对应的至少一个候选位置点;Determine at least one candidate position point corresponding to the current vertex; 通过确定所述至少一个候选位置点对应的至少一个候选纹理坐标误差,从所述至少一个候选位置点中确定所述初始中心位置点;Determine the initial center position point from the at least one candidate position point by determining at least one candidate texture coordinate error corresponding to the at least one candidate position point; 基于所述初始中心位置点,确定所述搜索范围。Based on the initial central position point, the search range is determined. 根据权利要求14所述的方法,其中,所述至少一个候选位置点,包括:The method according to claim 14, wherein the at least one candidate location point comprises: 所述当前顶点的邻接点的平均位置上的点,和/或所述当前顶点的邻接边的中点。A point at the average position of the adjacent points of the current vertex, and/or a midpoint of the adjacent edge of the current vertex. 根据权利要求14所述的方法,其中,所述通过确定所述至少一个候选位置点对应的至少一个候选纹理坐标误差,从所述至少一个候选位置点中确定所述初始中心位置点,包括:The method according to claim 14, wherein determining the initial center position point from the at least one candidate position point by determining at least one candidate texture coordinate error corresponding to the at least one candidate position point comprises: 确定所述至少一个候选位置点对应的至少一个候选纹理坐标误差;Determining at least one candidate texture coordinate error corresponding to the at least one candidate position point; 根据所述至少一个候选纹理坐标误差与所述当前顶点对应的纹理坐标误差中的最小值,确定所述初始中心位置点。The initial center position point is determined according to a minimum value between the at least one candidate texture coordinate error and the texture coordinate error corresponding to the current vertex. 根据权利要求14所述的方法,其中,所述基于所述初始中心位置点,确定所述搜索范围,包括:The method according to claim 14, wherein determining the search range based on the initial center position point comprises: 以所述初始中心位置点为中心,以所述初始中心位置点到其至少一个邻接面的第三条边的至少一个距离中的最小值为半径,确定所述搜索范围。The search range is determined by taking the initial central position point as the center and taking the minimum value of at least one distance from the initial central position point to the third edge of at least one adjacent face as the radius. 根据权利要求13所述的方法,其中,所述基于所述初始中心位置点与所述搜索范围进行至少一次搜索,确定至少一个初始目标位置点,包括:The method according to claim 13, wherein the determining at least one initial target location point based on the initial center location point and the search range by performing at least one search comprises: 确定每次搜索的搜索方向;Determine the search direction for each search; 基于所述初始中心位置点,按照所述每次搜索的搜索方向,在所述搜索范围内进行二分法搜索,确定每次搜索对应的初始目标位置点,直至完成至少一次搜索,确定所述至少一个初始目标位置点。 Based on the initial center position point, a binary search is performed within the search range according to the search direction of each search to determine the initial target position point corresponding to each search, until at least one search is completed to determine the at least one initial target position point. 根据权利要求18所述的方法,其中,所述基于所述初始中心位置点,按照所述每次搜索的搜索方向,在所述搜索范围内进行二分法搜索,确定每次搜索对应的初始目标位置点,包括:The method according to claim 18, wherein the step of performing a binary search within the search range based on the initial center position point and in accordance with the search direction of each search to determine the initial target position point corresponding to each search comprises: 以所述初始中心位置点为所述每次搜索的起始点,按照所述每次搜索的搜索方向,在所述搜索范围内确定所述每次搜索的终止点;Taking the initial center position point as the starting point of each search, and determining the end point of each search within the search range according to the search direction of each search; 在所述起始点对应的候选纹理坐标误差小于所述终止点对应的候选纹理坐标误差的情况下,根据所述起始点与所述终止点之间的中点更新所述终止点;When the error of the candidate texture coordinates corresponding to the starting point is smaller than the error of the candidate texture coordinates corresponding to the ending point, updating the ending point according to the midpoint between the starting point and the ending point; 在所述起始点对应的候选纹理坐标误差大于所述终止点的对应候选纹理坐标误差的情况下,根据所述起始点与所述终止点之间的中点更新所述起始点;When the error of the candidate texture coordinates corresponding to the starting point is greater than the error of the candidate texture coordinates corresponding to the ending point, updating the starting point according to the midpoint between the starting point and the ending point; 进行至少一次更新,直至确定更新的所述起始点与更新的所述终止点之间的距离小于预设距离阈值,根据所述起始点和/或所述终止点,确定所述初始目标位置点。Perform at least one update until it is determined that the distance between the updated starting point and the updated ending point is less than a preset distance threshold, and determine the initial target location point according to the starting point and/or the ending point. 根据权利要求19所述的方法,其中,所述根据所述起始点和/或所述终止点,确定所述初始目标位置点,包括:The method according to claim 19, wherein determining the initial target location point according to the starting point and/or the ending point comprises: 将所述起始点确定为所述初始目标位置点;Determine the starting point as the initial target location point; 或者,or, 将所述终止点确定为所述初始目标位置点;Determine the end point as the initial target location point; 或者,将所述起始点与所述终止点之间的中点,确定为所述初始目标位置点;Alternatively, the midpoint between the starting point and the ending point is determined as the initial target position point; 或者,将所述起始点与所述终止点中,候选纹理坐标误差小的点确定为所述目标位置点。Alternatively, a point between the starting point and the ending point with a smaller error in candidate texture coordinates is determined as the target position point. 根据权利要求11-20任一项所述的方法,其中,所述方法还包括:The method according to any one of claims 11 to 20, wherein the method further comprises: 确定所述至少一个顶点对应的至少一个纹理坐标误差;determining at least one texture coordinate error corresponding to the at least one vertex; 根据所述至少一个纹理坐标误差,将所述至少一个顶点组织为待优化序列;organizing the at least one vertex into a sequence to be optimized according to the at least one texture coordinate error; 将所述待优化序列中预设序列位置对应的顶点,确定为所述当前顶点;所述预设序列位置对应所述至少一个顶点中纹理坐标误差最大的顶点。The vertex corresponding to a preset sequence position in the sequence to be optimized is determined as the current vertex; the preset sequence position corresponds to the vertex with the largest texture coordinate error among the at least one vertex. 根据权利要求21所述的方法,其中,所述确定重建变形网格的纹理坐标信息,包括:The method according to claim 21, wherein determining texture coordinate information of the reconstructed deformed mesh comprises: 根据目标位置点,更新所述至少一个顶点中所述当前顶点对应的纹理坐标误差,进而更新所述待优化序列中顶点的顺序;According to the target position point, updating the texture coordinate error corresponding to the current vertex in the at least one vertex, and then updating the order of the vertices in the sequence to be optimized; 对更新的所述预设序列位置上的顶点进行纹理坐标更新,直至达到预设迭代目标,完成重建变形网格的纹理坐标信息。The texture coordinates of the updated vertices at the preset sequence positions are updated until a preset iteration target is reached, thereby completing the reconstruction of the texture coordinate information of the deformed mesh. 根据权利要求21所述的方法,其中,所述预设迭代目标包括:The method according to claim 21, wherein the preset iteration target comprises: 所述待优化序列的更新次数达到预设更新次数阈值;The update times of the sequence to be optimized reaches a preset update times threshold; 和/或,所述预设序列位置上的顶点的纹理坐标误差小于预设误差阈值。And/or, the texture coordinate error of the vertices at the preset sequence positions is less than a preset error threshold. 根据权利要求6或22所述的方法,其中,所述重建变形网格包括:所述第一基础网格对应的第i层重建变形网格;i大于1,所述方法还包括:The method according to claim 6 or 22, wherein the reconstructed deformed mesh comprises: an i-th layer reconstructed deformed mesh corresponding to the first basic mesh; i is greater than 1, and the method further comprises: 在完成对所述第i层重建变形网格的纹理坐标更新的情况下,基于所述第i层重建变形网格中顶点的纹理坐标进行插值,确定第i+1层重建变形网格中顶点的纹理坐标;i+1小于或等于预设层数;When the texture coordinates of the i-th layer of the reconstructed deformed mesh are updated, interpolation is performed based on the texture coordinates of the vertices in the i-th layer of the reconstructed deformed mesh to determine the texture coordinates of the vertices in the i+1-th layer of the reconstructed deformed mesh; i+1 is less than or equal to the preset number of layers; 通过确定所述第i+1层重建变形网格中的顶点对应的三角面片的第一失真测度和/或第二失真测度,更新所述第i+1层重建变形网格中顶点的纹理坐标。The texture coordinates of the vertices in the (i+1)th layer reconstructed deformed mesh are updated by determining the first distortion measure and/or the second distortion measure of the triangles corresponding to the vertices in the (i+1)th layer reconstructed deformed mesh. 根据权利要求24所述的方法,其中,所述方法还包括:The method according to claim 24, wherein the method further comprises: 通过对所述第一基础网格对应的至少一层重建变形网格进行纹理坐标更新,恢复所述当前图像。The current image is restored by updating texture coordinates of at least one layer of reconstructed deformed mesh corresponding to the first basic mesh. 一种编码方法,应用于编码器,所述方法包括:A coding method, applied to an encoder, comprising: 确定当前图像对应的基础网格;Determine the base grid corresponding to the current image; 基于所述基础网格,确定纹理坐标信息;Based on the base mesh, determining texture coordinate information; 对所述基础网格以及所述纹理坐标信息进行编码,将得到的编码比特写入码流。The basic grid and the texture coordinate information are encoded, and the obtained encoding bits are written into a bit stream. 根据权利要求26所述的方法,其中,所述纹理坐标信息包括:所述基础网格对应的纹理坐标信息;所述基于所述基础网格,确定纹理坐标信息,包括:The method according to claim 26, wherein the texture coordinate information comprises: texture coordinate information corresponding to the base mesh; and determining the texture coordinate information based on the base mesh comprises: 基于所述基础网格进行网格参数化,确定所述纹理坐标信息。Mesh parameterization is performed based on the basic mesh to determine the texture coordinate information. 根据权利要求24所述的方法,其中,所述纹理坐标信息包括:重建基础网格对应的纹理坐标信息;所述基于所述基础网格,确定纹理坐标信息,包括:The method according to claim 24, wherein the texture coordinate information comprises: texture coordinate information corresponding to the reconstructed base mesh; and determining the texture coordinate information based on the base mesh comprises: 基于所述基础网格的编码比特进行重建,确定重建基础网格;Reconstructing based on the coded bits of the basic grid to determine a reconstructed basic grid; 对所述重建基础网格进行网格参数化,确定所述纹理坐标信息。Mesh parameterization is performed on the reconstructed basic mesh to determine the texture coordinate information. 根据权利要求27所述的方法,其中,所述对所述基础网格以及所述纹理坐标信息进行编码,将得到的编码比特写入码流,包括:The method according to claim 27, wherein encoding the base mesh and the texture coordinate information and writing the obtained encoded bits into a bitstream comprises: 对包含所述纹理坐标信息的基础网格进行编码,将得到的编码比特写入码流。 The base grid including the texture coordinate information is encoded, and the obtained encoding bits are written into a bitstream. 根据权利要求27或28所述的方法,其中,所述对所述基础网格以及所述纹理坐标信息进行编码,将得到的编码比特写入码流,包括:The method according to claim 27 or 28, wherein encoding the base mesh and the texture coordinate information and writing the obtained encoded bits into a bitstream comprises: 对所述基础网格进行压缩编码,确定所述基础网格对应的编码比特;Performing compression coding on the basic grid to determine coding bits corresponding to the basic grid; 对所述纹理坐标信息进行编码,确定所述纹理坐标信息对应的编码比特;Encoding the texture coordinate information to determine encoding bits corresponding to the texture coordinate information; 将所述基础网格对应的编码比特与所述纹理坐标信息对应的编码比特分别写入码流。The coding bits corresponding to the basic grid and the coding bits corresponding to the texture coordinate information are written into the bitstream respectively. 一种解码器,包括:A decoder, comprising: 解析部分,配置为解析码流,确定第一基础网格以及第一基础网格的纹理坐标信息;A parsing part, configured to parse the code stream to determine the first basic grid and texture coordinate information of the first basic grid; 细分变形部分,配置为基于所述第一基础网格进行网格细分与变形,确定重建变形网格;A subdivision and deformation part is configured to perform mesh subdivision and deformation based on the first basic mesh to determine a reconstructed deformed mesh; 坐标确定部分,配置为基于所述第一基础网格的纹理坐标信息与所述重建变形网格,确定所述重建变形网格的纹理坐标信息。The coordinate determination part is configured to determine the texture coordinate information of the reconstructed deformed mesh based on the texture coordinate information of the first basic mesh and the reconstructed deformed mesh. 一种编码器,包括:An encoder, comprising: 网格信息确定部分,配置为确定当前图像对应的基础网格;基于所述基础网格,确定纹理坐标信息;The grid information determination part is configured to determine a basic grid corresponding to the current image; and determine texture coordinate information based on the basic grid; 编码部分,配置为对所述基础网格以及所述纹理坐标信息进行编码,将得到的编码比特写入码流。The encoding part is configured to encode the basic grid and the texture coordinate information, and write the obtained encoding bits into a bit stream. 一种解码器,包括:A decoder, comprising: 第一存储器和第一处理器;a first memory and a first processor; 所述第一存储器存储有可在第一处理器上运行的计算机程序,所述第一处理器执行所述程序时实现权利要求1-25中任一项所述的方法。The first memory stores a computer program executable on the first processor, and the first processor implements the method according to any one of claims 1 to 25 when executing the program. 一种编码器,包括:An encoder, comprising: 第二存储器和第二处理器;a second memory and a second processor; 所述第二存储器存储有可在第二处理器上运行的计算机程序,所述第二处理器执行所述程序时实现权利要求26-30中任一项所述的方法。The second memory stores a computer program that can be run on the second processor, and the second processor implements the method according to any one of claims 26 to 30 when executing the program. 一种码流,其中,所述码流是根据待编码信息进行比特编码生成的;其中,所述待编码信息至少包括:基础网格与纹理坐标信息。A code stream, wherein the code stream is generated by bit coding according to information to be coded; wherein the information to be coded at least includes: basic grid and texture coordinate information. 一种存储介质,其中,所述计算机可读存储介质存储有计算机程序,所述计算机程序被执行时实现如权利要求1至25中任一项所述的方法、或者实现如权利要求26-30中任一项所述的方法。 A storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed, the method according to any one of claims 1 to 25 is implemented, or the method according to any one of claims 26 to 30 is implemented.
PCT/CN2024/072416 2024-01-15 2024-01-15 Coding method, decoding method, code stream, coder, decoder, and storage medium Pending WO2025152015A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2024/072416 WO2025152015A1 (en) 2024-01-15 2024-01-15 Coding method, decoding method, code stream, coder, decoder, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2024/072416 WO2025152015A1 (en) 2024-01-15 2024-01-15 Coding method, decoding method, code stream, coder, decoder, and storage medium

Publications (1)

Publication Number Publication Date
WO2025152015A1 true WO2025152015A1 (en) 2025-07-24

Family

ID=96470560

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2024/072416 Pending WO2025152015A1 (en) 2024-01-15 2024-01-15 Coding method, decoding method, code stream, coder, decoder, and storage medium

Country Status (1)

Country Link
WO (1) WO2025152015A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110999285A (en) * 2017-06-23 2020-04-10 皇家飞利浦有限公司 Processing of 3D image information based on texture maps and meshes
CN111882666A (en) * 2020-07-20 2020-11-03 浙江商汤科技开发有限公司 Method, device and equipment for reconstructing three-dimensional grid model and storage medium
US20230298218A1 (en) * 2022-03-21 2023-09-21 Nokia Technologies Oy V3C or Other Video-Based Coding Patch Correction Vector Determination, Signaling, and Usage
CN117197263A (en) * 2022-05-31 2023-12-08 维沃移动通信有限公司 Encoding method, decoding method, device and equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110999285A (en) * 2017-06-23 2020-04-10 皇家飞利浦有限公司 Processing of 3D image information based on texture maps and meshes
CN111882666A (en) * 2020-07-20 2020-11-03 浙江商汤科技开发有限公司 Method, device and equipment for reconstructing three-dimensional grid model and storage medium
US20230298218A1 (en) * 2022-03-21 2023-09-21 Nokia Technologies Oy V3C or Other Video-Based Coding Patch Correction Vector Determination, Signaling, and Usage
CN117197263A (en) * 2022-05-31 2023-12-08 维沃移动通信有限公司 Encoding method, decoding method, device and equipment

Similar Documents

Publication Publication Date Title
WO2021062772A1 (en) Prediction method, encoder, decoder, and computer storage medium
JP4350504B2 (en) Method and apparatus for encoding and decoding images with mesh and program corresponding thereto
WO2024212981A1 (en) Three-dimensional mesh sequence encoding method and apparatus, and three-dimensional mesh sequence decoding method and apparatus
CN118830249A (en) Method, device and medium for point cloud encoding and decoding
WO2025152607A1 (en) Three-dimensional mesh encoding method and apparatus, and three-dimensional mesh decoding method and apparatus
WO2025152015A1 (en) Coding method, decoding method, code stream, coder, decoder, and storage medium
WO2025002021A1 (en) Three-dimensional mesh inter-frame prediction encoding method and apparatus, three-dimensional mesh inter-frame prediction decoding method and apparatus, and electronic device
WO2025152014A1 (en) Encoding method, decoding method, bitstream, encoder, decoder and storage medium
WO2025152005A1 (en) Encoding method, decoding method, encoding apparatus, decoding apparatus, encoder, decoder, code stream, device, and storage medium
WO2025151992A1 (en) Coding method, decoding method, code stream, coders, decoders and storage medium
WO2024213067A1 (en) Decoding method, encoding method, bitstream, decoder, encoder and storage medium
WO2025000523A1 (en) Coding method, decoding method, coder, decoder, code stream, and storage medium
WO2025000342A1 (en) Encoding and decoding method, encoder, decoder, and storage medium
WO2025148072A1 (en) Coding method, decoding method, code stream, encoder, decoder, and storage medium
WO2025076749A1 (en) Encoding method, decoding method, code stream, encoder, decoder, and storage medium
WO2025007270A9 (en) Encoding method, decoding method, encoder, decoder, code stream, and storage medium
WO2025000429A1 (en) Coding method, decoding method, code stream, coder, decoder, and storage medium
WO2025067513A1 (en) Encoding and decoding methods, encoder, decoder and storage medium
WO2025076656A1 (en) Encoding method, decoding method, encoder, decoder, and storage medium
WO2025076795A1 (en) Coding and decoding methods, bit stream, encoder, decoder, and storage medium
WO2024148573A1 (en) Encoding and decoding method, encoder, decoder, and storage medium
CN119182908B (en) Grid encoding method, grid decoding method and related equipment
WO2025148027A1 (en) Coding method and apparatus, decoding method and apparatus, and point cloud coder, point cloud decoder, bitstream, device and storage medium
WO2025145325A1 (en) Encoding method, decoding method, encoders, decoders and storage medium
WO2025076790A1 (en) Coding method and apparatus, decoding method and apparatus, coder, decoder, code stream, and storage medium

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

Country of ref document: EP

Kind code of ref document: A1