Three-dimensional grid coding and decoding method and device

By encoding the triangle pattern in the three-dimensional grid and entropy encoding of additional information, the problem of low compression efficiency of the three-dimensional grid connection relationship in the prior art is solved, efficient coding and decoding is achieved, and realizing real-time stitching and accurate reconstruction of the three-dimensional grid is ensured.

CN120020888APending Publication Date: 2025-05-20XIAN LIGHT CONE VISION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311541399.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-17
Publication Date
2025-05-20

AI Technical Summary

Technical Problem

The prior art is difficult to efficiently compress the connectivity relationship of three-dimensional grids, resulting in inefficient transmission, storage and processing of three-dimensional grids.

Method used

A three-dimensional grid encoding and decoding method is proposed. By encoding the pattern of triangles in the three-dimensional grid, and determining additional information based on the set threshold of the preset mode, entropy encoding is performed to achieve efficient connection relationship encoding and decoding.

Benefits of technology

The efficiency of three-dimensional grid connection relationship coding is improved, ensuring the immediacy and accuracy of the decoding end when stitching, reducing transmission pressure and improving processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120020888A_ABST
    Figure CN120020888A_ABST
Patent Text Reader

Abstract

The invention discloses a three-dimensional grid coding and decoding method and device, and the coding method comprises the steps: carrying out the connection relation coding and geometric information coding of an input three-dimensional grid, and obtaining an output code stream; wherein the connection relation encoding comprises encoding modes of triangles in a three-dimensional grid; for the preset mode meeting the condition, the connection relation coding further comprises the steps of determining additional information used for indicating the triangular position relation according to a set threshold corresponding to the preset mode and coding the additional information; geometric information coding supports a coding mode parallel to connection relation coding. According to the invention, the entropy coding efficiency can be improved, and the instant stitching of the current triangle is realized in the decoding process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of encoding and decoding, and particularly relates to a three-dimensional mesh encoding and decoding method and apparatus. Background Art

[0002] With the progress of three-dimensional mesh modeling and scanning technologies, people have higher requirements for the accuracy and details of three-dimensional graphics, which also leads to a multiple increase in the data volume of the original three-dimensional mesh. This poses a major challenge to the transmission, storage, and computer processing of three-dimensional meshes. Therefore, it is particularly important to efficiently compress three-dimensional meshes while ensuring quality.

[0003] A three-dimensional mesh is composed of multiple elements at different levels, including vertices, edges, and faces. A vertex is the basic element that makes up a three-dimensional mesh and is described by coordinates in three-dimensional space. An edge is the part that connects two vertices in a three-dimensional mesh. A face is a polygon formed by connecting closed edges, and most of the faces in current three-dimensional meshes are triangles. A three-dimensional mesh mainly contains the following three types of information: 1. Geometric information. Geometric information mainly includes the position coordinates of all vertices in a three-dimensional mesh in three-dimensional space; 2. Connection relationship, also known as topological information. The connection relationship is used to describe the connection information between vertices and patches in a three-dimensional mesh; 3. Other optional attribute information. Attribute information includes other information attached to a three-dimensional mesh, including color information, normal vectors, texture coordinates, etc.

[0004] The connection relationship is used to describe the connection of vertices in a three-dimensional mesh, affects the overall shape and local details of the model, and is an important part of a three-dimensional mesh. Therefore, it is of great significance to propose a new compression algorithm to achieve efficient compression of the connection relationship of three-dimensional meshes. Summary of the Invention

[0005] In order to solve the above problems existing in the prior art, the present invention provides a three-dimensional mesh encoding and decoding method and apparatus. The technical problems to be solved by the present invention are realized through the following technical solutions:

[0006] In a first aspect, an embodiment of the present invention provides a three-dimensional mesh encoding method, and the encoding method includes:

[0007] Performing connection relationship encoding and geometric information encoding on the input three-dimensional mesh to obtain an output bitstream;

[0008] Wherein, the connection relationship encoding includes encoding the patterns of triangles in the three-dimensional mesh; for a preset pattern that meets the conditions, the connection relationship encoding further includes determining additional information indicating the position relationship of triangles according to a set threshold corresponding to the preset pattern and performing encoding; the geometric information encoding supports an encoding method parallel to the connection relationship encoding.

[0009] In a second aspect, an embodiment of the present invention provides a three-dimensional mesh encoding device, and the encoding device includes:

[0010] An encoding module, configured to perform connection relationship encoding and geometric information encoding on the input three-dimensional mesh to obtain an output bitstream;

[0011] Wherein, the connection relationship encoding includes encoding the pattern of triangles in the three-dimensional mesh; for a preset pattern that meets the conditions, the connection relationship encoding further includes determining additional information indicating the positional relationship of triangles according to a set threshold corresponding to the preset pattern and performing encoding; the geometric information encoding supports an encoding method parallel to the connection relationship encoding.

[0012] In a third aspect, an embodiment of the present invention provides a three-dimensional mesh decoding method, and the decoding method includes:

[0013] Performing connection relationship decoding and geometric information decoding on the input bitstream to obtain a connection relationship and geometric information respectively;

[0014] Reconstructing a three-dimensional mesh based on the obtained connection relationship and geometric information;

[0015] Wherein, the connection relationship decoding includes decoding the pattern of triangles in the three-dimensional mesh; for a preset pattern that meets the conditions, the connection relationship decoding further includes decoding additional information indicating the positional relationship of triangles to achieve immediate stitching of the current triangle; the geometric information decoding supports a decoding method parallel to the connection relationship decoding.

[0016] In a fourth aspect, an embodiment of the present invention provides a three-dimensional mesh decoding device, and the decoding device includes:

[0017] A decoding module, configured to perform connection relationship decoding and geometric information decoding on the input bitstream to obtain a connection relationship and geometric information respectively;

[0018] A reconstruction module, configured to reconstruct a three-dimensional mesh based on the obtained connection relationship and geometric information;

[0019] Wherein, the connection relationship decoding includes decoding the pattern of triangles in the three-dimensional mesh; for a preset pattern that meets the conditions, the connection relationship decoding further includes decoding additional information indicating the positional relationship of triangles to achieve immediate stitching of the current triangle; the geometric information decoding supports a decoding method parallel to the connection relationship decoding.

[0020] Advantages of the present invention:

[0021] In a 3D mesh encoding and decoding scheme proposed by an embodiment of the present invention, at the encoding end, connection relationship encoding includes encoding the patterns of triangles in the 3D mesh; for a preset pattern that meets the conditions, the connection relationship encoding further includes determining additional information indicating the positional relationship of triangles according to a set threshold corresponding to the preset pattern and encoding it. The connection relationship encoding is implemented based on entropy encoding of context information. Correspondingly, at the decoding end, connection relationship decoding and geometric information decoding are performed on the input bitstream to obtain the connection relationship and geometric information respectively; a 3D mesh is reconstructed based on the obtained connection relationship and geometric information. Among them, the connection relationship decoding includes decoding the patterns of triangles in the 3D mesh; for a preset pattern that meets the conditions, the connection relationship decoding further includes decoding additional information indicating the positional relationship of triangles to achieve immediate stitching of the current triangle; the geometric information decoding supports a decoding method parallel to the connection relationship decoding. In the embodiment of the present invention, encoding and transmitting additional information indicating the positional relationship of triangles at the encoding end can improve the entropy encoding efficiency and enable the decoding end to use the positional relationship of triangles to ensure the immediacy of stitching during stitching.

[0022] As a specific example, when performing connection relationship encoding in an embodiment of the present invention, for triangles in the S pattern and E, R, or L pattern triangles that meet the conditions and are connected to more than two S pattern triangles, on the basis of encoding the triangle pattern, connection information and stitching angle information are added as immediate stitching information; when decoding the connection relationship, using the decoded immediate stitching information, mesh reconstruction can be performed for each triangle in the decoded pattern, that is, stitching the triangle to the reconstructed mesh; the vertex geometric information of the 3D mesh can be decoded without waiting for the entire mesh reconstruction to be completed, and parallel decoding of the connection relationship decoding and vertex geometric information decoding can be achieved. Brief Description of the Drawings

[0023] Figure 1 It is a schematic diagram of a triangular fan structure in the existing TFAN algorithm;

[0024] Figure 2 It is a schematic diagram of triangular fan classification in the existing TFAN algorithm;

[0025] Figure 3 It is a schematic flowchart of a 3D mesh encoding method provided by an embodiment of the present invention;

[0026] Figure 4 It is a schematic diagram of the principle of applying the 3D mesh encoding method of an embodiment of the present invention to a separate encoding framework;

[0027] Figure 5 It is a schematic diagram of the principle of applying the 3D mesh encoding method of an embodiment of the present invention to a hybrid encoding framework;

[0028] Figure 6 Schematic diagram of the framework of the connection relationship encoding method proposed in the embodiment of the present invention;

[0029] Figure 7 Corresponding relationship between corners, vertices and triangles in the Corner-Table data structure;

[0030] Figure 8 Schematic diagram of the CLERS mode;

[0031] Figure 9 Schematic diagram of the entropy encoding framework in the embodiment of the present invention;

[0032] Figure 10 Schematic diagram of the process of recording the number of vertex rotations in the embodiment of the present invention;

[0033] Figure 11 Schematic diagram of the adjacent relationship between the zip rotated vertex and two S-mode triangles in the embodiment of the present invention;

[0034] Figure 12 Schematic diagram of the handle;

[0035] Figure 13 Schematic diagram of the process of a three-dimensional mesh decoding method provided in the embodiment of the present invention;

[0036] Figure 14 Schematic diagram of the principle of applying the three-dimensional mesh decoding method in the embodiment of the present invention to the single decoding framework;

[0037] Figure 15 Schematic diagram of the principle of applying the three-dimensional mesh decoding method in the embodiment of the present invention to the hybrid decoding framework;

[0038] Figure 16 Schematic diagram of the stitching process of the L mode in the embodiment of the present invention;

[0039] Figure 17 Schematic diagram of the adjacent relationship between the L-mode rotated vertex and two S-mode triangles in the embodiment of the present invention;

[0040] Figure 18 Schematic diagram of the stitching process of the R mode in the embodiment of the present invention. Detailed implementation manners

[0041] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0042] Currently, TFAN is an algorithm with relatively good performance in the connection relationship encoding algorithm. In the TFAN connection relationship encoding algorithm, first, a triangular fan structure is defined. The triangular fan is composed of a series of co-directional triangles with the same vertex, as Figure 1 shown. The definition of the triangular fan is as follows:

[0043] 1) Any two consecutive triangles in the triangular fan need to be adjacent and share a common side.

[0044] 2) All the triangles in the triangular fan have the same direction.

[0045] 3) All the triangles in the triangular fan share a vertex, which is called the center point of the triangular fan. Among them, the shared vertex is like v 0 shown.

[0046] The TFAN connection relationship encoding algorithm encodes by traversing the vertices in the three-dimensional grid. First, a first-in-first-out queue is defined, and all vertices are marked as un-traversed. Then, starting from a random initial vertex, the triangular fan structure centered on the initial point is determined, and then the other vertices in the triangular fan are put into the queue, and the other vertices are marked as traversed, and the triangular fan is encoded. After that, vertices are continuously taken out from the queue, and the above process is repeated until the queue is empty and all vertices in the three-dimensional grid are marked, and the encoding ends.

[0047] The encoding of the triangular fan mainly classifies the triangular fan according to the degree of the center point of the triangular fan (that is, the number of triangles in the adjacent triangular fan of the center point), the triangle direction, and the vertex traversal situation. As Figure 2 shown, different values of C represent different categories of triangular fans. In the figure, the gray triangles represent the traversed triangles, the white ones are the un-traversed triangles, and the red and black vertices represent the traversed and un-traversed vertices respectively. When encoding, the category, vertex degree, and vertex traversal information of the current triangular fan are encoded, where the vertex traversal information is an optional item for encoding.

[0048] Since there are many classifications of the triangular fans in TFAN and the encoding of the connection relationship is relatively inefficient, in order to achieve efficient encoding of the connection relationship and real-time reconstruction at the decoding end, the embodiments of the present invention propose a new three-dimensional grid connection relationship encoding and decoding scheme. On this basis, combined with the encoding and decoding scheme of geometric information, a complete encoding and decoding scheme for three-dimensional grids is proposed. Specifically, the embodiments of the present invention propose a three-dimensional grid encoding method and device, and correspondingly propose a three-dimensional grid decoding method and device.

[0049] It should be noted that for a 3D mesh encoding method / device or a 3D mesh decoding method / device provided in an embodiment of the present invention, the corresponding execution entity can run in a corresponding electronic device. Among them, the electronic device can be a server or a terminal device, and of course, it is not limited thereto.

[0050] In a first aspect, an embodiment of the present invention proposes a 3D mesh encoding method, which can be applied to an encoding end. Please refer to Figure 3 as shown, the encoding method may include:

[0051] Scode1, perform connection relationship encoding and geometric information encoding on the input 3D mesh to obtain an output bitstream;

[0052] Among them, the connection relationship encoding includes encoding the pattern of triangles in the 3D mesh; for a preset pattern that meets the conditions, the connection relationship encoding further includes determining additional information indicating the position relationship of triangles according to a set threshold corresponding to the preset pattern and encoding it; the geometric information encoding supports an encoding method parallel to the connection relationship encoding.

[0053] In an embodiment of the present invention, the connection relationship encoding and geometric information encoding are performed in units of triangles, that is, by traversing triangles. In an embodiment of the present invention, the connection relationship encoding and geometric information encoding may have the same triangle traversal order, but may also have different triangle traversal orders. It can be understood that the latter method requires additional transmission of some relevant information compared to the former method, and specific details are not described in detail here.

[0054] The main idea of the 3D mesh connection relationship encoding method proposed in an embodiment of the present invention is to first select a triangle as an initial triangle on the 3D mesh to be encoded, and then start from this initial triangle and traverse the connection relationship of triangles by successively determining the pattern of triangles according to a certain traversal rule. Moreover, for a preset pattern that meets the conditions, when encoding the pattern of triangles, the connection relationship encoding also determines additional information indicating the position relationship of triangles according to a set threshold corresponding to the preset pattern and encodes the additional information.

[0055] Furthermore, in the 3D mesh encoding method proposed in an embodiment of the present invention, the geometric information encoding supports an encoding method parallel to the connection relationship encoding. Specifically, the 3D mesh encoding method proposed in an embodiment of the present invention can be applied to a 3D mesh encoding framework with separate encoding of connection relationship and geometric information, that is, it is applicable to a separate encoding framework; it can also be applied to a 3D mesh encoding framework with mixed encoding of connection relationship and geometric information, that is, it is also applicable to a mixed encoding framework.

[0056] Specifically, for a separate coding framework, the input 3D mesh is encoded for connection relationships and geometric information to obtain an output bitstream, including:

[0057] (1) Traverse the triangles in the 3D mesh to encode the connection relationships, obtaining the connection relationship encoding result;

[0058] Specifically, it can be to traverse the triangles in the 3D mesh to encode the connection relationships, and obtain the connection relationship bitstream from the connection relationship encoding results of all triangles;

[0059] (2) Traverse the triangles in the 3D mesh to encode the geometric information, obtaining the geometric information encoding result; among them, the connection relationship encoding and the geometric information encoding are carried out in units of triangles;

[0060] This step can traverse the triangles in the 3D mesh to encode the geometric information according to the connection relationship encoding order, and obtain the geometric information bitstream from the geometric information encoding results of all triangles;

[0061] (3) Obtain the output bitstream according to the connection relationship encoding result and the geometric information encoding result;

[0062] Specifically, it can be to mix the connection relationship bitstream and the geometric information bitstream to obtain the output bitstream.

[0063] For the main processing flow of the embodiment of the present invention applied to the 3D mesh coding framework with separate encoding of connection relationships and geometric information, please refer to Figure 4 Understand. In this separate coding framework, the input 3D mesh will be encoded for connection relationships and geometric information respectively. Both of these encodings are realized by traversing triangles. Taking the case where the connection relationship encoding and the geometric information encoding have the same triangle traversal order as an example, this method is reflected in that the geometric information encoding needs to utilize the connection relationship encoding order, and this connection relationship encoding order is the triangle traversal order in the connection relationship encoding process. That is to say, the connection relationship bitstream is obtained after traversing all triangles to complete the connection relationship encoding, and the geometric information bitstream is also obtained by traversing all triangles in the same order to complete the geometric information encoding. The output bitstream is obtained by mixing these two bitstreams.

[0064] Of course, the above only illustrates the case where the connection relationship encoding and the geometric information encoding have the same triangle traversal order. For the case where the connection relationship encoding and the geometric information encoding have different triangle traversal orders, it can be understood by referring to the above. Here, it will not be specifically illustrated in a graphical way. The connection relationship encoding in the above steps is implemented using the idea of the previous text. For the sake of clear layout, it will be specifically described later.

[0065] Specifically, for the hybrid coding framework, the input 3D mesh is encoded for connection relationships and geometric information to obtain an output bitstream, including:

[0066] (1) Traverse each triangle in the 3D mesh. For the traversed triangle, encode the connection relationship to obtain the connection relationship encoding result of the triangle, and encode the geometric information of the triangle to obtain the geometric information encoding result of the triangle. The encoding result of the triangle is composed of the connection relationship encoding result and the geometric information encoding result of the triangle;

[0067] (2) Obtain the output bitstream from the encoding results of all triangles.

[0068] For the main processing flow of the 3D mesh encoding framework applying the embodiment of the present invention to the hybrid encoding of connection relationships and geometric information, please refer to Figure 5 Understanding. In this hybrid coding framework, the input 3D mesh is traversed, and each traversed triangle will be encoded for connection relationships and geometric information, that is, when traversing a triangle, the pattern of the triangle, possible additional information, and the geometric coordinates of the vertices of the triangle that have not been encoded are encoded. Therefore, for the hybrid coding framework, the traversal order of triangles for geometric information encoding and connection relationship encoding is the same. Finally, there will be only one bitstream, which is composed of the connection relationship encoding results and geometric information encoding results of the sequentially traversed triangles and serves as the output bitstream. Similarly, the connection relationship encoding in the above steps is also implemented using the idea described above.

[0069] In summary, the embodiment of the present invention encodes connection relationships and uses the information of the encoded 3D mesh to encode geometric information, that is, uses the geometric information of the triangles traversed by the encoded connection relationships for encoding. The connection information bitstream may include triangle pattern information, handle information, S-connection information, stitching angle information, and set threshold information, etc. (the specific meanings of the above information are introduced in the following text of the embodiment of the present invention); the geometric information bitstream includes starting coordinate information, geometric prediction residuals, etc. The embodiment of the present invention does not limit the information arrangement order of the connection information bitstream. When the S-connection information is encoded independently, the arrangement order may be S-connection information, stitching angle information, handle information, pattern information; when the S-connection information is encoded after each S pattern, the arrangement order may be stitching angle information, handle information, pattern information (the S-connection information of the triangle is encoded after each S pattern).

[0070] The main process of the connection relationship encoding method proposed in the embodiment of the present invention is described below. Please refer to Figure 6 Understanding. It can be understood that for the separate coding framework, Figure 6 the output is the connection relationship bitstream. For the hybrid coding framework, Figure 6The output is the encoding result of the connection relationship of the current triangle.

[0071] Specifically, in Scode1, the process of encoding the connection relationship of the input three-dimensional mesh is as follows: First, an initial triangle is selected, and starting from the initial triangle, the triangles on the three-dimensional mesh are traversed. Based on the traversed triangles, the traversal situation of the vertices of the current triangle and the traversal situations of the triangles on the left and right sides are determined. Different patterns are used to represent the current triangle, and the corresponding direction is selected to traverse to the next triangle. After determining the pattern of the current triangle, the encoding of the triangle pattern can be performed.

[0072] Specifically, this process mainly includes steps A1 to A3:

[0073] Step A1: Select an initial triangle in the three-dimensional mesh to start traversing. For each traversed triangle, determine the traversal result of this triangle based on the traversed triangles.

[0074] Before encoding the connection relationship, the triangles will be traversed for initialization first, and relevant data structures will be established. The purpose is to extract the relevant information of the triangles in the three-dimensional mesh, such as the relationships between vertices, angles, or edges, so as to facilitate subsequent traversal. In implementation, data structures such as Corner-Table and half-edge can be used to store the mesh. Here, the traversal and connection relationship encoding process will be introduced taking Corner-Table as an example.

[0075] The Corner-Table data structure contains four arrays: V, O, M, and U. Among them, the lengths of arrays V, O, and U are three times the number of mesh patches, and the length of array M is equal to the number of patches. The mesh patches refer to triangles. Array V stores the vertices corresponding to each angle in the three-dimensional mesh, and array O stores the opposite angles of each angle. Both arrays M and U store binary symbols, and the elements stored represent whether the vertices and triangles in the three-dimensional mesh have been traversed. During the initialization process, numbers will be assigned to each angle in the counterclockwise order of the interior angles of the triangle. In this way, according to the number of a certain angle, the other two angles of the same triangle can be quickly found. Denote the current angle in the triangle as c, the first angle encountered in the clockwise order of c as c.p, the first angle encountered in the counterclockwise order of c as c.n, the vertex corresponding to c as c.v, the opposite angle of c as c.o, and the triangle to which c belongs as c.t. As Figure 7 shown, for the definition and setting rules of angles and vertices, please refer to the Corner-Table data structure for understanding.

[0076] Step A1 corresponds to Figure 6 the parts of "selecting the initial triangle and traversing the connection relationship" and "determining the pattern of the current triangle and the next traversal direction based on the traversed triangles" in

[0077] In an optional implementation, the triangle pattern can be the CLERS pattern, but there is no limitation here. For ease of understanding, the following description will take the Corner-Table data structure and the CLERS pattern as examples for illustration.

[0078] Step A1 may specifically include: for each traversed triangle, according to the relationship between the angles and opposite angles, and the angles and vertices in the Corner-Table data structure, determine the vertex corresponding to the c-angle of the triangle, and according to the traversal situation of the vertex corresponding to the c-angle of the obtained triangle and the traversal situations of the left and right adjacent triangles, determine the traversal result of the triangle, including the CLERS pattern of the triangle, mark the triangle as a traversed triangle, and mark the three vertices of the triangle as traversed vertices. It can be understood that in this specific example, the current angle is the c-angle.

[0079] Specifically, in the embodiment of the present invention, when traversing the triangles on the three-dimensional grid, the three-dimensional grid is divided into two parts: traversed and non-traversed. An initial triangle can be selected by means of random selection or the like, and the traversal starts from this initial triangle. Continuously insert the traversed triangles into the traversed part, and traverse other triangles according to the relative orientation of the newly added triangles. At the same time, according to the position of the vertex corresponding to the current angle of the triangle and the traversal situations of the left and right adjacent triangles, output different patterns for each triangle and determine the traversal direction of the next triangle.

[0080] Please refer to Figure 8 for understanding. Among them, X is the current triangle. Let v be the vertex corresponding to the current angle of the triangle, that is, the c-angle. During traversal, different patterns are assigned to the triangle according to five different situations of the CLERS pattern, and it jumps to the next triangle in different directions.

[0081] Specifically, according to the traversal situation of the vertex corresponding to the c-angle of the obtained triangle and the traversal situations of the left and right adjacent triangles, determine the traversal result of the triangle, including:

[0082] 1) For the currently traversed triangle, if the vertex corresponding to the c-angle of the triangle has not been traversed, determine that the CLERS pattern to which the triangle belongs is the C pattern, and the traversal direction of the next triangle is the right side of the triangle;

[0083] Please refer to Figure 8 the pattern diagram marked with C. The C pattern indicates that v has not been traversed and should traverse to the right side of the current triangle.

[0084] 2) For the currently traversed triangle, if the vertex corresponding to the c angle of this triangle has been traversed, and the left triangle of this triangle has been traversed while the right triangle has not been traversed, determine that the CLERS mode to which this triangle belongs is the L mode, and the traversal direction of the next triangle is to the right of this triangle;

[0085] Please refer to Figure 8 the pattern diagram marked with L. The L mode indicates that v has been traversed and the traversal should be to the right of the current triangle.

[0086] 3) For the currently traversed triangle, if the vertex corresponding to the c angle of this triangle has been traversed, and the right triangle of this triangle has been traversed while the left triangle has not been traversed, determine that the CLERS mode to which this triangle belongs is the R mode, and the traversal direction of the next triangle is to the left of this triangle;

[0087] Please refer to Figure 8 the pattern diagram marked with R. The R mode indicates that v has been traversed and the traversal should be to the left of the current triangle.

[0088] 4) For the currently traversed triangle, if the vertex corresponding to the c angle of this triangle has been traversed, and neither the left nor the right triangle of this triangle has been traversed, determine that the CLERS mode to which this triangle belongs is the S mode, and the traversal direction of the next triangle is to first traverse the right branch of this triangle, and after traversing to the end, traverse the left branch of this triangle;

[0089] Please refer to Figure 8 the pattern diagram marked with S. The S mode indicates that v has been traversed and the traversal should first be to the right branch, and after traversing to the end, then traverse to the left branch.

[0090] 5) For the currently traversed triangle, if the vertex corresponding to the c angle of this triangle has been traversed, and both the left and right triangles of this triangle have been traversed, determine that the CLERS mode to which this triangle belongs is the E mode, there is no traversal direction for the next triangle, and the traversal ends.

[0091] Please refer to Figure 8 the pattern diagram marked with E. The E mode indicates that v has been traversed and the traversal ends.

[0092] Of course, for the remaining modes other than the CLERS mode, according to the traversal situation of the vertex corresponding to this triangle and the traversal situations of the two side triangles obtained, the implementation method for determining the traversal result of this triangle can be implemented in a similar manner to the above process, and no detailed examples will be given here.

[0093] Step A2, use the relevant information of the traversed triangle as context information to perform entropy coding on the mode of this triangle;

[0094] Among them, the relevant information includes at least one or more of vertex geometric information, encoded triangle patterns, and the number of adjacent encoded triangles of triangle vertices;

[0095] Step A2 corresponds to Figure 6 the part of "entropy encoding the triangle pattern according to relevant context information" in

[0096] In an optional implementation, step A2 may include step A21 and step A22:

[0097] Step A21, for the pattern of each triangle to be encoded, use the context-based adaptive binary arithmetic coding method, and use a preset binarization method to binarize the pattern of the triangle to be encoded to obtain a corresponding binary character sequence;

[0098] There is a strong correlation between the pattern of the current triangle and the previously traversed triangles. The context-based adaptive binary arithmetic coding method (abbreviation: CABAC) can be used to perform entropy encoding on the pattern. Context information can be obtained by using relevant information, such as vertex geometric information, encoded triangle patterns (i.e., traversed triangle patterns), and the number of adjacent encoded triangles of triangle vertices, etc., and the context index is calculated to achieve this. CABAC is mainly divided into three stages: binarization processing, context modeling, and binary arithmetic coding.

[0099] The entropy encoding framework of the embodiments of the present invention can be referred to Figure 9 as shown. This entropy encoding framework first binarizes the pattern of the triangle, then calculates the context index using relevant information to determine the context model, completes the context modeling, and finally uses the context model to achieve the entropy encoding of the pattern of the triangle. Moreover, the context model needs to be updated.

[0100] The possible implementation methods of binarization and context modeling are described separately below.

[0101] For the binarization processing, in the embodiments of the present invention, the pattern of the triangle is binarized to obtain a corresponding binary character sequence. The binarization methods used include but are not limited to truncated unary code, Golomb code, and fixed-length code, etc.

[0102] During the binarization process, the symbol with a higher occurrence probability (i.e., the symbol corresponding to the pattern) has a shorter codeword after binarization. Table 1 takes the truncated unary code as an example to show a possible binarization code table. The codewords in Table 1 represent the corresponding binary character sequences.

[0103] Table 1 CLERS pattern of triangle and binarization code table

[0104] Pattern Codeword C 0 S 100 L 110 R 101 E 111

[0105] Step A22: Obtain the relevant information of the triangle to be encoded, calculate the context index corresponding to each binary character of the triangle to be encoded by using the obtained relevant information, determine the corresponding context model according to the obtained context indexes, and perform binary arithmetic coding on the binary character sequence of the triangle to be encoded by using the obtained context model, and update the context model.

[0106] Among them, for the calculation of the context index, in the embodiment of the present invention, one or more of the relevant information, such as vertex geometric information, encoded triangle pattern, and the number of adjacent encoded triangles of the triangle vertex, etc., are used as context information to calculate the context index. The following gives two ways to calculate the context index.

[0107] The first way: After the binarization of the pattern is completed, calculate the context index according to the pattern of the previous triangle. Let the codeword of the binarized pattern of the current input be value, and the context index ctxIdx is initialized to 0. Use 1, 2, and 3 to represent each bit of the pattern codeword respectively. Different context models can be established for different bits. For example, ctx_bit1 (the context model used for encoding the first bit), ctx_bit2 (the context model used for encoding the second bit), ctx_bit03 (the context model used for encoding the third bit when the first bit is 0), ctx_bit13 (the context model used for encoding the third bit when the first bit is 1). The context index ctxIdx of the current binary symbol can only consider using the pattern of the previous triangle to calculate the context index of the current triangle, which is expressed as:

[0108] ctxIdx = value (1);

[0109] The second way: Use the pattern of the previous triangle and the context index of the entropy coding of the previous triangle to calculate the context index of the current triangle, which is expressed as:

[0110] ctxIdx = value + ((ctxIdx & 1) << 3) + ((ctxIdx & 4) << 2) (2);

[0111] After the calculation of the context index is completed, perform binary arithmetic coding on the binary characters by selecting the corresponding context model according to each binary character position, and update the corresponding context model.

[0112] Step A3: If the pattern of the traversed triangle is a preset pattern that meets the conditions, determine the corresponding additional information according to the set threshold corresponding to the preset pattern, and encode the additional information.

[0113] After determining the pattern of the traversed triangle, if the pattern of the traversed triangle is a preset pattern that meets the conditions, the embodiments of the present invention also need to perform some special processing to obtain additional information indicating the positional relationship of the triangles and perform encoding to be transmitted in the output bitstream, so that the decoding end can use this additional information for corresponding stitching and reconstruction processing. Among them, the encoding of the additional information can be implemented by any encoding method, which is not limited here.

[0114] The following separately describes different optional cases of step A3.

[0115] 1) Case 1

[0116] If the pattern of the traversed triangle is a preset pattern that meets the conditions, determine the corresponding additional information according to the set threshold corresponding to the preset pattern, including:

[0117] Step B1, if the pattern of the traversed triangle is the S mode in the CLERS mode, determine the number of vertex rotations when the preset corner vertex of the triangle rotates to the current corner vertex to characterize the position of the current corner vertex relative to the preset corner vertex;

[0118] For the Corner-Table data structure, the current corner vertex is the c corner vertex, and the preset corner vertex is the c.p corner vertex.

[0119] The recording method of the number of vertex rotations is: start rotating from the c.p corner vertex, continuously change the rotating vertex until the position of the vertex corresponding to the c corner is found, and record the number of times of changing the rotating vertex during this process.

[0120] The embodiments of the present invention can use the number of rotations to characterize the position of the c corner vertex relative to the c.p corner vertex.

[0121] Step B2, if the number of vertex rotations is less than the set threshold T1 of the triangle, use the number of vertex rotations as the S connection information;

[0122] In the embodiments of the present invention, for each triangle, there can be a corresponding set threshold T1. Of course, all triangles can also use the same set threshold T1, which is reasonable.

[0123] Step B3, if the number of vertex rotations is greater than or equal to the set threshold T1 of the triangle, obtain the S connection information based on the index value of the vertex-related information;

[0124] Among them, the index value of the vertex-related information includes the triangle traversal index of the current corner vertex of the triangle; the triangle traversal index of the current corner vertex of the triangle can be the triangle traversal index when the vertex corresponding to the c corner is first traversed, and this triangle traversal index refers to the triangle number when the vertex corresponding to the c corner is first traversed according to the triangle traversal order of the coding connection relationship. The index value of the vertex-related information can be used as the S connection information. It is also possible to use the difference between the index value of the current vertex-related information and the index value of the previous vertex-related information as the S connection information.

[0125] The S connection information represents additional information of the S-mode triangle and is used to indicate the actual position of the current corner vertex of the S-mode triangle in the three-dimensional grid.

[0126] Since directly encoding and transmitting the real information of the position of the current corner vertex in the three-dimensional grid often has a large amount of data, directly encoding and transmitting will increase the transmission pressure. In the embodiments of the present invention, for triangles with the S mode, additional information is additionally encoded to indicate the actual position of the c corner vertex in the three-dimensional grid. Such information is called S connection information, including but not limited to the position of the c corner vertex relative to the c.p corner vertex and the triangle traversal index of the c corner vertex. The embodiments of the present invention can control the magnitude of the number of vertex rotations. When the number of vertex rotations is less than the set threshold T1 corresponding to the triangle, the number of vertex rotations is directly encoded as the S connection information; when the number of vertex rotations is greater than or equal to the set threshold T1 corresponding to the triangle, the index value of the vertex-related information, such as the triangle traversal index of the current corner vertex of the triangle, can be encoded as the S connection information. Encoding the number of vertex rotations only requires encoding and transmitting a numerical value with a small data volume, so it can reduce the transmission pressure and improve the transmission efficiency. However, no matter which S connection information it is, it can ensure that the decoding end can still effectively locate the position of the current corner vertex of the triangle in the three-dimensional grid using this S connection information. Therefore, the accuracy of decoding and reconstruction can be guaranteed. For triangles in the S mode, the S connection information is also called the immediate stitching information of the S mode.

[0127] Among them, for the S connection information that needs to be encoded in the S mode, entropy coding can be specifically used; it can be encoded after each S mode is encoded, or the S connection information can be independently encoded. The embodiments of the present invention do not limit the entropy coding method of the above information, and the coding methods that can be used include but are not limited to differential coding, exponential Golomb coding, and context-based arithmetic coding.

[0128] For case 1, entropy coding of the additional information includes:

[0129] Entropy coding of the S connection information according to the number of vertex rotations.

[0130] If the number of vertex rotations is less than the set threshold T1 of the triangle, use the number of vertex rotations as the S connection information and directly perform entropy coding; if the number of vertex rotations is greater than or equal to the set threshold T1 of the triangle, obtain the S connection information based on the index value of the vertex-related information and perform entropy coding. When encoding the S connection information, it is necessary to also encode the set threshold T1 so that the decoding end can use the decoded set threshold T1 to restore the S connection information for triangle stitching.

[0131] For the S mode, taking the triangle traversal index of the c-angle vertex as an example of the index value of the vertex-related information, the following is the syntax example of the S connection information after each S mode:

[0132]

[0133] Among them, mesh_coded_clers_symbols_size represents the number of triangle patterns; vu(v) represents unsigned integer coding; mesh_clers_symbol[i] represents the pattern of the i-th triangle; ae(v) represents context-based arithmetic coding; S represents the S mode; length_alignment represents byte alignment; mesh_rotation_frequency represents the S connection information. When the value of mesh_rotation_frequency is less than T 1 it represents the number of rotations. When the value of mesh_rotation_frequency is equal to T 1 the S connection information is obtained from mesh_vertexS_traversal_index. T1 is the set threshold T1; mesh_rotation_frequency can adopt entropy coding schemes such as exponential Golomb coding.

[0134] mesh_vertexS_traversal_index, this value can represent the index value of the vertex-related information (triangle traversal index of the c-angle vertex). This value can also represent the difference between the index value of the vertex-related information (triangle traversal index of the c-angle vertex) and the index value of the previous vertex-related information. mesh_vertexS_traversal_index can adopt entropy coding schemes such as exponential Golomb coding.

[0135] For the S mode, the syntax example when the S connection information is independently encoded is:

[0136]

[0137]

[0138] Among them, mesh_rotation_frequency_count represents the number of S connection information. mesh_coded_rotation_frequency_size represents the byte size of the arithmetic coding sequence of the S connection information. mesh_rotation_frequency[i] represents the S connection information. When the value of mesh_rotation_frequency[i] is less than T 1 it represents the number of vertex rotations. When the value of mesh_rotation_frequency[i] is equal to T 1 the S connection information is obtained from mesh_vertexS_traversal_index[i].

[0139] mesh_vertexS_traversal_index[i], this value can represent the index value of the information related to the i-th vertex (the triangle traversal index of the c-corner vertex). This value can also represent the difference between the index value of the information related to the i-th vertex (the triangle traversal index of the c-corner vertex) and the index value of the information related to the (i - 1)-th vertex. When i is equal to 0, mesh_vertexS_traversal_index[0] specifies the index value of the information related to the first vertex.

[0140] The above syntax information can all adopt entropy coding schemes such as exponential Golomb coding.

[0141] See Figure 10 the schematic diagram of recording the number of vertex rotations shown, the process of steps B1 to B3 can include the following steps:

[0142] Step a1, record the vertex corresponding to the c-corner of the triangle as the target vertex v', v' = c.v; let v t = c.p.v, b = c, and the number of rotations l = 0;

[0143] Among them, v', v t , b, and l are parameters set in the embodiments of the present invention; c.v and c can be understood by referring to the Corner-Table data structure, and those skilled in the art can understand from this data structure that c.p.v represents the vertex corresponding to the c.p corner.

[0144] Step a2, let b = b.o.p, if the opposite angle of b has been traversed, continue to rotate around v t and repeat step a2; if the opposite angle of b has not been traversed, let v t = b.n.v, b = b.p, l = l + 1, and execute step a3;

[0145] Similarly, according to the Corner-Table data structure, b.o.p represents the previous corner of the diagonal of b (the previous corner here refers to the first corner in the clockwise direction of b.o), b.n.v represents the vertex corresponding to the next corner of b (the next corner here refers to the first corner in the counterclockwise direction of b), and b.p represents the previous corner of b (the previous corner here refers to the first corner in the clockwise direction of b). l = l + 1 means adding the current l by one as the updated l.

[0146] Step a3: Determine whether the number of rotation times l is greater than or equal to the set threshold T1. If so, end the search process and encode an identifier and information related to v'. The encoded identifier can be the value of the vertex rotation times as T1, and the information related to v' can be the triangle traversal index of the c-corner vertex; if not, go to step 4.

[0147] Step a4: Determine whether v t is equal to v'. If they are equal, determine the current l as the vertex rotation times and end the rotation search process; encode the rotation times l and T1; if not, return to step a2 and continue the rotation search around the vertex v t for rotation search.

[0148] 2) Case 2

[0149] If the pattern of the traversed triangle is a preset pattern that meets the conditions, determine the corresponding additional information according to the set threshold corresponding to the preset pattern, including:

[0150] Step C1: If the pattern of the traversed triangle is the E, R, or L pattern in the CLERS pattern, and when performing the reconstruction operation, the rotation vertex of this triangle is connected to more than two S-pattern triangles, determine the relative traversal sequence number of the triangle corresponding to the sector area to which this triangle needs to be sutured according to the traversal order of the triangles.

[0151] Among them, the sector area is composed of one triangle or two or more adjacent triangles; the pattern of the traversed triangle is the E, R, or L pattern in the CLERS pattern, and when performing the reconstruction operation, the rotation vertex of this triangle is connected to more than two S-pattern triangles, which can be regarded as meeting the conditions of the E, R, or L pattern.

[0152] For triangles that meet the E, R, or L pattern, such as Figure 11As shown in the figure, if the rotation vertex is connected to two or more triangles in S mode, additional information needs to be encoded to indicate which traversed triangle the current triangle needs to be stitched to (hereinafter referred to as the "actual connection triangle", and the additional information to be encoded is the "stitching angle information"), including but not limited to the traversal index of the actual connection triangle (hereinafter referred to as the traversal index of the triangle) and the relative traversal sequence number of the actual connection triangle (hereinafter referred to as the relative traversal sequence number of the triangle). Among them, each triangle is preset with a number to represent the index, and the traversal index of the triangle represents the number of the traversed triangle; the relative traversal sequence number of the triangle represents the traversed fan-shaped area where the triangle is located, and the number corresponding to its traversal sequence.

[0153] As Figure 11 shown, the traversal order is C1 -> C2 -> … -> S1 -> C3 -> … -> S2 -> E, and C1 is Figure 11 the first traversed triangle in the figure, and the relative traversal sequence number of the triangle is 1). In the embodiment of the present invention, the situation of traversing from one branch of S to another branch is called handle. For modes E, R, and L, it is necessary to detect at the encoding end whether it is a handle. Since if it is a handle, handle information will be encoded, there is no need to additionally judge whether the rotation vertex is connected to two or more triangles in S mode.

[0154] As Figure 12 shown in the handle schematic diagram, starting from the gray triangle and traversing along the black arrow direction, during the traversal process, from the right branch of the red S triangle, it traverses to the left branch red E triangle at one time. Therefore, for the red E triangle, the right branch is a handle, so handle information is encoded, such as the traversal index of the red angle in the figure.

[0155] For triangles in E, R, or L mode that meet the conditions, the process of determining the relative traversal sequence number of the triangle corresponding to the fan-shaped area to which the triangle needs to be stitched may include:

[0156] ① When the current triangle mode is L, if the left branch is a handle, record the handle information; otherwise, judge whether the rotation vertex is connected to two or more triangles in mode S. If it is connected to two or more triangles in mode S three-dimensional triangles, determine the relative traversal sequence number of the triangle.

[0157] ② When the current triangle mode is R, if the right branch is a handle, record the handle information; otherwise, judge whether the rotation vertex is connected to two or more triangles in mode S. If it is connected to two or more triangles in mode S, determine the relative traversal sequence number of the triangle.

[0158] ③When the current triangle mode is E, first check whether the right branch is a handle. If it is, record the handle information; otherwise, determine whether the rotation vertex is connected to more than two triangles of mode S. If it is connected to more than two triangles of mode S, determine the relative traversal sequence number of the triangle. Then check whether the left branch is a handle. If it is, record the handle information; otherwise, determine whether the rotation vertex is connected to more than two triangles of mode S. If it is connected to more than two triangles of mode S, determine the relative traversal sequence number of the triangle.

[0159] Step C2, if the relative traversal sequence number of the triangle is less than the set threshold T2 of the triangle, use the relative traversal sequence number of the triangle as the stitching angle information;

[0160] Step C3, if the relative traversal sequence number of the triangle is greater than or equal to the set threshold T2 of the triangle, determine the traversal index of the triangle corresponding to the triangle connected to the triangle according to the traversal order of the triangle, and obtain the stitching angle information based on the traversal index of the triangle;

[0161] In the embodiments of the present invention, for each triangle, there can be a corresponding set threshold T2. Of course, all triangles can also use the same set threshold T2, which is reasonable.

[0162] The embodiments of the present invention can control the size of the relative traversal sequence number of the encoded triangle. When the relative traversal sequence number of the triangle is less than the set threshold T2, use the relative traversal sequence number of the triangle as the stitching angle information for direct encoding; when the relative traversal sequence number of the triangle is greater than or equal to the set threshold T2, the traversal index of the triangle corresponding to the triangle connected to the triangle can be determined according to the traversal order of the triangle, and the traversal index of the triangle is used as the stitching angle information for encoding.

[0163] Among them, the stitching angle information represents additional information for indicating a traversed triangle connected to the triangle in the three-dimensional grid.

[0164] Similarly, the embodiments of the present invention use the set threshold T2 to judge the relative traversal sequence number of the encoded triangle or the traversal index of the triangle, which can reduce the transmission pressure, improve the transmission efficiency, and at the same time ensure that the decoding end can still use the stitching angle information to effectively locate the position of the current angular vertex of the triangle in the three-dimensional grid, ensuring the accuracy of decoding and reconstruction. For the triangles of mode E, R or L that meet the above conditions, the stitching angle information is also called the corresponding immediate stitching information.

[0165] Correspondingly, for case 2, entropy encoding is performed on the additional information, including:

[0166] Perform entropy encoding on the stitching angle information according to the relative traversal sequence number of the triangle.

[0167] If the relative traversal sequence number of the triangle is less than the set threshold T2 of the triangle, directly perform entropy coding on the relative traversal sequence number of the triangle as the stitched corner information; if the relative traversal sequence number of the triangle is greater than or equal to the set threshold T2 of the triangle, determine the traversal index of the triangle corresponding to the triangle that is most closely connected to the triangle according to the traversal sequence of the triangle, obtain the stitched corner information based on the traversal index of the triangle, and perform entropy coding on the obtained stitched corner information. While encoding the stitched corner information, it is also necessary to encode the set threshold T2 so that the decoding end can use the decoded set threshold T2 to restore the stitched corner information for triangle stitching.

[0168] Among them, the stitched corner information that needs to be encoded for the above-mentioned E, R, or L modes that meet the conditions can specifically adopt an entropy coding method; the embodiments of the present invention do not limit the entropy coding method of the above information, and the coding methods that can be used include but are not limited to differential coding, exponential Golomb coding, and context-based arithmetic coding.

[0169] For the above-mentioned E, R, L modes that meet the conditions, the syntax example of encoding the stitched corner information is as follows:

[0170]

[0171] Among them, mesh_orderS_count represents the number of stitched corner information recorded when the rotating vertex is connected to triangles of more than two modes S during the stitching process.

[0172] mesh_orderS_num[i] represents the stitched corner information. This value can represent the numerical value of the i-th stitched corner information. This value can also represent the difference between the i-th stitched corner information and the (i - 1)-th stitched corner information. When i is equal to 0, mesh_orderS_num[0] specifies the numerical value of the first stitched corner information.

[0173] For the above-mentioned E, R, L modes that meet the conditions, when the stitched corner information includes multiple types (such as the traversal index of the triangle, the relative traversal sequence number of the triangle), the syntax example of encoding the stitched corner information is as follows:

[0174]

[0175]

[0176] Among them, mesh_orderS_count represents the number of stitched corner information recorded when the rotating vertex is connected to triangles of more than two modes S during the stitching process.

[0177] mesh_orderS_num[i] represents the stitching angle information. When the value of mesh_orderS_num[i] is less than T 2 it represents the relative traversal sequence number of the triangle. When the value of mesh_orderS_num[i] is equal to T 2 the stitching angle information is obtained from mesh_triangle_traversal_index[i]. T 2 is the set threshold T2.

[0178] mesh_triangle_traversal_index[i]: This value can represent the value of the i-th stitching angle information. This value can also represent the difference between the i-th stitching angle information and the (i - 1)-th stitching angle information. When i is equal to 0, mesh_triangle_traversal_index[0] specifies the value of the first sector number.

[0179] All of the above syntax information can adopt entropy coding schemes such as exponential Golomb coding.

[0180] As mentioned above, the set thresholds T1 and T2 can be fixed values agreed upon for encoding and decoding, or they can be variable values, encoded in the bitstream, specifically encoded in the header information of the 3D mesh bitstream. The syntax examples of thresholds T1 and T2 are as follows:

[0181]

[0182] Among them, u(4) represents unsigned integer coding. The set thresholds T1 and T2 are encoded as set threshold information.

[0183] The above is the main content of the connection relationship coding. After the connection relationship coding, a connection information bitstream is obtained; the connection information bitstream includes the mode information of the encoded triangle, S connection information, stitching angle information, and set threshold information; among them, the set threshold information includes the set threshold T1 and set threshold T2 of the encoded triangle; the connection information bitstream can also include handle information.

[0184] Next, taking the separate coding framework as an example, the process of geometric information coding will be briefly described.

[0185] In an optional implementation manner, according to the connection relationship coding order, the triangles in the 3D mesh are traversed for geometric information coding, and a geometric information bitstream is obtained from the geometric information coding results of all triangles, including:

[0186] (1) According to the connection relationship coding order, for the geometric information of each triangle in the 3D mesh, the geometric coordinate prediction is performed using the parallelogram prediction method to obtain the geometric coordinate residuals;

[0187] Among them, the prediction methods include single parallelogram prediction, multi - parallelogram prediction, and weighted parallelogram prediction.

[0188] (2) Perform entropy coding on the geometric coordinate residuals obtained by prediction to obtain a geometric information bitstream.

[0189] Among them, the method of entropy coding can be selected according to needs, and the specific process can be understood by referring to related technologies.

[0190] Those skilled in the art can understand that for the hybrid coding framework, it is similar to the above - mentioned geometric coordinate prediction process and entropy coding, and will not be elaborated here. Moreover, the geometric information coding process of the embodiments of the present invention is not limited to the above examples.

[0191] It can be understood that the geometric information bitstream includes starting coordinate information and geometric prediction residuals. The output bitstream includes a connection information bitstream and a geometric information bitstream.

[0192] A three - dimensional mesh coding method proposed in the embodiments of the present invention for connection relationship coding includes coding the patterns of triangles in a three - dimensional mesh; for a preset pattern that meets the conditions, the connection relationship coding further includes determining additional information indicating the position relationship of triangles as immediate stitching information according to a set threshold corresponding to the preset pattern, and performing coding; the geometric information coding supports a coding method parallel to the connection relationship coding. The coding end encodes and transmits additional information indicating the position relationship of triangles, which can enable the decoding end to use the triangle position relationship to ensure the accuracy and immediacy of stitching during stitching.

[0193] In the embodiments of the present invention, if the pattern of the traversed triangle is the S pattern in the CLERS pattern, the additional information is determined based on the number of vertex rotations; if the number of vertex rotations is less than the set threshold T1 of the current triangle, the number of vertex rotations is encoded as S connection information; if the number of vertex rotations is greater than or equal to the set threshold T1 of the current triangle, based on the index value of vertex - related information, such as the triangle traversal index of the current corner vertex of the triangle, S connection information is obtained for encoding. The set threshold T1 is used to determine which S connection information to encode and transmit, so as to reduce the transmission pressure, improve the transmission efficiency, and ensure the accuracy of decoding and reconstruction.

[0194] In the embodiments of the present invention, if the pattern of the traversed triangle is an E, R, or L pattern that meets the conditions, that is, it belongs to the E, R, or L pattern and the rotation vertex of the triangle is connected to more than two S-pattern triangles during the reconstruction operation, the additional information is determined based on the relative traversal sequence number of the triangle; if the relative traversal sequence number of the triangle is less than the set threshold T2 of the current triangle, the relative traversal sequence number of the triangle is encoded as the stitching angle information; if the relative traversal sequence number of the triangle is greater than or equal to the set threshold T2 of the current triangle, the traversal index of the triangle corresponding to the triangle that is most closely connected to the current triangle is determined according to the traversal sequence of the triangle, and the stitching angle information is obtained based on the traversal index of the triangle and encoded. The set threshold T2 is used to determine which stitching angle information to encode and transmit, so as to reduce the transmission pressure, improve the transmission efficiency, and ensure the accuracy of decoding and reconstruction.

[0195] In a second aspect, corresponding to the 3D mesh encoding method provided in the first aspect, an embodiment of the present invention further provides a 3D mesh encoding device, which is applied to an encoding end. The device includes:

[0196] An encoding module, configured to perform connection relationship encoding and geometric information encoding on the input 3D mesh to obtain an output bitstream;

[0197] Wherein, the connection relationship encoding includes encoding the pattern of triangles in the 3D mesh; for a preset pattern that meets the conditions, the connection relationship encoding further includes determining additional information for indicating the position relationship of the triangles according to the set threshold corresponding to the preset pattern and encoding it; the geometric information encoding supports an encoding method parallel to the connection relationship encoding.

[0198] Wherein, for the specific processing procedures of the above modules, please refer to the 3D mesh encoding method described in the first aspect, which will not be elaborated here.

[0199] In a third aspect, corresponding to the 3D mesh encoding method provided in the first aspect, an embodiment of the present invention further provides a 3D mesh decoding method, which is applied to a decoding end, as Figure 13 shown. The decoding method includes:

[0200] Sdecode1, performing connection relationship decoding and geometric information decoding on the input bitstream to obtain the connection relationship and geometric information respectively;

[0201] Sdecode2, reconstructing a 3D mesh based on the obtained connection relationship and geometric information;

[0202] Among them, the connection relationship decoding includes decoding the pattern of triangles in the three-dimensional grid; for a preset pattern that meets the conditions, the connection relationship decoding further includes decoding additional information for indicating the positional relationship of triangles to achieve immediate stitching of the current triangle; the geometric information decoding supports a decoding method parallel to the connection relationship decoding.

[0203] Regarding that the three-dimensional grid encoding method provided in the first aspect of the embodiments of the present invention can be applied to both a separate encoding framework and a hybrid encoding framework, the three-dimensional grid decoding method provided in the third aspect of the embodiments of the present invention can also be applied to both a separate decoding framework and a hybrid decoding framework. That is to say, after entropy decoding the input bitstream, there are two possible implementation methods for parsing the connection relationship and geometric information and reconstructing the grid. The first method is to implement the decoding and reconstruction of the connection relationship and geometric information in one traversal process. Decode the pattern of a triangle and reconstruct it onto the decoded triangles to construct the grid, and then decode the geometric information of the triangle to obtain a partially reconstructed grid. The second method is to decode the connection relationship and geometric information in parallel. After decoding a part of the connection relationship, the corresponding geometric information can be decoded in parallel, and a partially reconstructed grid can be obtained.

[0204] Specifically, for the separate decoding framework, perform connection information decoding and geometric information decoding on the input bitstream to obtain the connection relationship and geometric information respectively; reconstruct the three-dimensional grid based on the obtained connection relationship and geometric information, including:

[0205] (1) Demultiplex the input bitstream to obtain a connection information bitstream and a geometric information bitstream; among them, the connection relationship bitstream and the geometric information bitstream are in units of triangles;

[0206] (2) Perform connection relationship decoding on the connection information bitstream to obtain the connection relationship;

[0207] (3) Perform geometric information decoding on the geometric information bitstream to obtain the geometric information;

[0208] Among them, the geometric information decoding can be carried out according to the connection relationship decoding order.

[0209] (4) Reconstruct the three-dimensional grid using the connection relationship and geometric information.

[0210] For the main processing flow of the three-dimensional grid decoding framework of the embodiments of the present invention applied to the separate decoding of connection relationship and geometric information, please refer to Figure 14Understanding. In this separate decoding framework, both the connection relationship decoding and the geometric information decoding are achieved by traversing triangles. However, there is no restriction on whether the triangle traversal orders are the same. Taking the case where the triangle traversal orders are the same as an example, this method is reflected in that the geometric information decoding needs to utilize the connection relationship decoding order, and this connection relationship decoding order is the triangle traversal order in the connection relationship decoding process. That is to say, the connection relationship output after the connection relationship decoding is obtained after traversing all triangles to complete the connection relationship decoding, and the geometric information is also obtained by traversing all triangles in the same order to complete the geometric information decoding. Of course, the case where the triangle traversal orders are the same is only taken as a possible example, and the processing process of the embodiments of the present invention for the case where the triangle traversal orders are different will not be described in detail here. The connection relationship decoding method in the above steps corresponds to the encoding idea described above. For the sake of clear layout, it will be specifically described later.

[0211] Specifically, for the hybrid decoding framework, the connection information decoding and the geometric information decoding are performed on the input bitstream to obtain the connection relationship and the geometric information respectively; based on the obtained connection relationship and geometric information, a three-dimensional mesh is reconstructed, including:

[0212] (1) Traverse the triangles in the input bitstream in sequence according to the triangle traversal order, and perform connection relationship decoding and geometric information decoding on each traversed triangle respectively to obtain the connection relationship and geometric information of the triangle;

[0213] (2) Use the connection relationship and geometric information of the triangle to reconstruct the three-dimensional mesh of the triangle.

[0214] For the main processing flow of the embodiments of the present invention applied to the three-dimensional mesh decoding framework with separate decoding of connection relationship and geometric information, please refer to Figure 15 Understanding. In this hybrid decoding framework, the input bitstream will be traversed by triangles, and for each traversed triangle, connection relationship decoding and geometric information decoding will be performed, and then three-dimensional mesh reconstruction will be carried out, that is, the mode of decoding the triangle and the geometric coordinates of the vertices of the triangle that have not been decoded will be performed for each traversed triangle. Therefore, the triangle traversal orders of the geometric information decoding and the connection relationship decoding are consistent, and finally the three-dimensional mesh that is finally reconstructed is obtained after all triangles are traversed.

[0215] Similarly, the connection relationship decoding method in the above steps also corresponds to the encoding idea described above.

[0216] In the embodiment of the present invention, the connection relationship is decoded, and the geometric information is decoded by using the decoded three-dimensional mesh information, that is, the geometric information of the traversed triangles is decoded by using the decoded connection relationship, so as to realize the parallel decoding of the connection relationship and the geometric information. The connection information bitstream includes mode information, handle information, S connection information, stitching angle information, set threshold information, etc., and the geometric information bitstream includes starting coordinate information, geometric prediction residuals, etc.

[0217] The process of reconstructing the mesh at the decoding end is the process of reconstructing the network data structure at the encoding end (such as Corner-Table, half-edge, etc.). Here, the process of reconstructing the connection relationship is introduced by taking Corner-Table as an example.

[0218] First, the decoding end can decode the pattern triangle according to certain context information, that is, the relevant information of the triangle, such as one or more of vertex geometric information, the encoded triangle pattern and the number of adjacent encoded triangles of the triangle vertices, etc., but it needs to be consistent with the encoding end. According to this context information, the pattern triangle is decoded, and then the current triangle is connected to the reconstructed three-dimensional mesh by using different stitching methods according to its pattern. Then, the position of the next triangle is determined, and the pattern of the next triangle is decoded through the context information. This process is continuously executed until all triangles are decoded and reconstructed to obtain the reconstructed three-dimensional mesh.

[0219] In an optional embodiment, the process of decoding the connection relationship of the input bitstream includes the following steps:

[0220] Step D1, decoding the input bitstream to obtain the pattern of the current triangle;

[0221] Among them, the decoding process at the decoding end corresponds to the encoding process at the encoding end. It can be understood in combination with the foregoing. If entropy coding is used, entropy decoding is used for decoding. The pattern can be the CLERS pattern, which will not be elaborated here.

[0222] Step D2, when the pattern of the current triangle is a preset pattern that meets the conditions, using the set threshold information to decode the input bitstream to obtain additional information indicating the triangle position relationship;

[0223] Corresponding to Case 1 at the encoding end, Step D2 may include:

[0224] When the pattern of the current triangle is the S pattern in the CLERS pattern, using the set threshold T1 to decode the input bitstream to determine that the additional information represented by the S connection information is the number of vertex rotations or the triangle traversal index corresponding to the vertex of the current angle.

[0225] Among them, the decoding method includes: decoding the input bitstream to obtain the value of the set threshold T1 corresponding to the current triangle in the S mode; it can be understood that in the embodiments of the present invention, the input bitstream is first decoded to obtain the set threshold T1 corresponding to the current triangle in the S mode, and then the input bitstream is decoded using the set threshold T1 to determine the specific content of the S connection information.

[0226] Among them, it can be understood by referring to the syntax example of the S connection information encoding at the encoding end before. By comparing the value of the set threshold T1 with the value of the specific parameter in the syntax example, it is determined whether the S connection information is the vertex rotation times or the triangle traversal index corresponding to the vertex of the current angle, as well as the specific value of the S connection information. Specific details are not repeated here.

[0227] Corresponding to Case 2 at the encoding end, step D2 may include:

[0228] When the mode of the current triangle is the E, R, or L mode in the CLERS mode, and the rotation vertex of the triangle is connected to more than two triangles in the S mode, the input bitstream is decoded using the set threshold T2 to determine that the additional information represented by the stitching angle information is the relative traversal sequence number of the triangle or the traversal index of the triangle.

[0229] Among them, the decoding method includes: decoding the input bitstream to obtain the value of the set threshold T2 corresponding to the current triangle in the E, R, or L mode; it can be understood that in the embodiments of the present invention, the input bitstream is first decoded to obtain the set threshold T2 corresponding to the current triangle in the E, R, or L mode, and then the input bitstream is decoded using the set threshold T2 to determine the specific content of the stitching angle information.

[0230] Among them, it can be understood by referring to the syntax example of the stitching angle information encoding at the encoding end before. By comparing the value of the set threshold T2 with the value of the specific parameter in the syntax example, it is determined whether the stitching angle information is the relative traversal sequence number of the triangle or the traversal index of the triangle, as well as the specific value of the stitching angle information. Specific details are not repeated here.

[0231] Step D3, based on the preset mode and the stitching method determined according to the additional information obtained from the preset mode, connect the current triangle to the reconstructed three-dimensional mesh;

[0232] In the embodiments of the present invention, the stitching methods for each preset mode that meet the conditions are pre-designed.

[0233] Since determining the diagonal relationship and the vertex relationship corresponding to each angle can reconstruct the connection relationship of the triangle, reconstructing the connection relationship essentially means reconstructing the O table and the V table in the Corner-Table. During the process of reconstructing the triangle, the diagonal relationship of some angles will be updated according to the current triangle pattern. The connection relationship decoding method proposed in the embodiments of the present invention can update the diagonal relationship of all angles after decoding the triangle pattern, and immediately stitch the corresponding sides of the triangle to the reconstructed mesh.

[0234] The following is the stitching method for different patterns at the decoding end. Taking the CLERS mode of the Corner-Table data structure as an example for illustration.

[0235] (1) Stitching method corresponding to the L mode

[0236] When c.p.v is not connected to a triangle in the S mode or is connected to one triangle in the S mode, as Figure 16 shown, the triangle to be stitched can be directly obtained by rotating around c.p.v; when c.p.v is connected to multiple triangles in the S mode, as Figure 17 shown, obtain the immediate stitching information (such as the relative traversal sequence number of the triangle) from the bitstream for stitching. A possible implementation is as follows:

[0237] Step b1, determine whether the left branch of the c angle of the current triangle is a handle. If it is, update the diagonal information of the c angle to the decoded diagonal information, update c.n.v, and end the stitching; otherwise, jump to step b2;

[0238] Among them, for the method of determining whether the left branch of the c angle of the current triangle is a handle, please refer to the related technology for understanding and will not be described here. If it is a handle, since it is impossible to find the diagonal through the stitching operation for a handle, the coding end needs to transmit the diagonal information. Updating c.n.v means c.n.v = c.o.p.v. At this time, ending the stitching means ending the stitching of this triangle and then operating on the next triangle.

[0239] Step b2, determine whether c.p.v is connected to multiple triangles in the S mode. If it is, jump to step b6; otherwise, jump to step b3;

[0240] Step b3, initialize the b angle, let b = c.n, as Figure 16 shown in the first figure;

[0241] Step b4, determine whether b.o is greater than 0. If it is greater than 0, then let b = b.o.n, as Figure 16 shown in the second figure, and repeat step b4; if b.o is less than or equal to 0, as Figure 16 shown in the third figure, then jump to step b5;

[0242] Step b5, let b.o = c, c.o = b, b.p.v = c.n.v, as shown in Figure 16 the fourth figure in

[0243] Step b6, obtain the immediate stitching information from the bitstream, such as the relative traversal sequence number of the triangle and the traversal index of the triangle, to obtain the t-angle of the fan-shaped area, and let b = t.p, as shown in Figure 17 , and jump to step b5; where the t-angle of the fan-shaped area is the angle connected to its rotation vertex in the fan-shaped area.

[0244] Please refer to Figure 16 the schematic diagram of the stitching process of pattern L shown in Figure 17 the schematic diagram of the rotation vertex of L pattern adjacent to two S pattern triangles shown in

[0245] (II) Stitching method corresponding to E pattern

[0246] It may include the following steps:

[0247] Step c1, determine whether the right branch of the c-angle of the current triangle is a handle. If so, update the diagonal information of the c-angle to the decoded diagonal information and update c.p.v; where updating c.p.v means c.p.v = c.o.n.v;

[0248] Step c2, determine whether the left branch of the c-angle is a handle. If so, update c.n.v and end the stitching; otherwise, jump to step c3;

[0249] Step c3, determine whether c.p.v is connected to multiple S pattern triangles. If so, jump to step c8; otherwise, jump to step c4;

[0250] Step c4, initialize the b-angle, let b = c.n;

[0251] Step c5, determine whether b.o is greater than 0. If it is greater than 0, then let b = b.o.n and repeat step c5; if b.o is less than or equal to 0, then jump to step c6;

[0252] Step c6, let b.o = c, c.o = b, b.p.v = c.n.v;

[0253] Step c7, let c = c.p. If c.o is not equal to -2, then jump to step c4; otherwise, end the stitching;

[0254] Step c8: Obtain the immediate stitching information from the bitstream, such as the relative traversal sequence number of the triangle and the traversal index of the triangle, to obtain the t-angle of the fan-shaped area. Let b = t.p, and jump to step c6; where the t-angle of the fan-shaped area is the angle connected to its rotation vertex in the fan-shaped area.

[0255] Except for handle detection, the stitching methods of the L mode and the E mode are basically the same and can be understood by reference.

[0256] (3) Stitching method corresponding to the R mode

[0257] The stitching method of mode R is similar to that of mode L, but the rotation direction is opposite. As Figure 18 shown. It may include the following steps:

[0258] Step d1: Determine whether the right branch of the c-angle of the current triangle is a handle. If so, update the diagonal information of the c-angle to the decoded diagonal information, update c.p.v, and end the stitching; otherwise, jump to step d2;

[0259] Step d2: Determine whether c.n.v is connected to multiple triangles in the S mode. If so, jump to step d5; otherwise, jump to step d3;

[0260] Step d3: Initialize the b-angle, let b = c.p, as Figure 18 shown in the first figure;

[0261] Step d4: Determine whether b.o is greater than 0. If it is greater than 0, then let b = b.o.p, as Figure 18 shown in the second figure, and repeat step d4; if b.o is less than or equal to 0, as Figure 18 shown in the third figure, then jump to step d5;

[0262] Step d5: Let b.o = c, c.o = b, b.n.v = c.p.v, as Figure 18 shown in the fourth figure, and end the stitching;

[0263] Step d6: Obtain the stitching information from the bitstream, such as the relative traversal sequence number of the triangle and the traversal index of the triangle, to obtain the t-angle of the fan-shaped area. Let b = t.n, and jump to step d5; where the t-angle of the fan-shaped area is the angle connected to its rotation vertex in the fan-shaped area.

[0264] Please refer to Figure 18 the schematic diagram of the stitching process of mode R shown in the figure to understand the stitching process of mode R.

[0265] (4) Stitching method corresponding to the S mode

[0266] For pattern S, at the decoding end, the opposite vertex of the incident edge needs to be connected to the grid. Obtain the S connection information from the bitstream, such as the number of rotations and vertex index information. When the S connection information is the number of rotations, use the same method as at the encoding end to find the vertex and update the V table, as Figure 10 shown; when the S connection information is the index information of the vertex, directly update the V table.

[0267] It can be understood that after step D3 is executed, the decoding of the connection relationship of the current triangle is completed. Then, determine the position of the next triangle and obtain the relevant information required for decoding the next triangle. Use the obtained relevant information to return to step D1 for decoding the next triangle.

[0268] Among them, the relevant information at least includes:

[0269] One or more of vertex geometric information, the encoded triangle pattern, and the number of adjacent encoded triangles of the triangle vertices.

[0270] The above is the process of decoding the connection relationship at the decoding end.

[0271] For geometric information decoding, taking the single decoding framework as an example, according to the connection relationship decoding order, the geometric information bitstream can be decoded for geometric information to obtain geometric information, including:

[0272] 1) Entropy decode the geometric information bitstream to obtain the prediction residual;

[0273] 2) Use the corresponding geometric coordinate prediction method as at the encoding end to obtain the predicted geometric coordinates;

[0274] 3) Obtain the reconstructed geometric coordinates based on the sum of the predicted geometric coordinates and the prediction residual.

[0275] Those skilled in the art can understand that the above decoding process corresponds to the processing process at the encoding end. The geometric coordinate prediction method is the same as that at the encoding end and will not be elaborated here. The geometric information decoding process in the hybrid decoding framework can be similar to the above process and will not be specifically described here.

[0276] A 3D mesh decoding method proposed in an embodiment of the present invention decodes the connection relationship and geometric information of the input bitstream to obtain the connection relationship and geometric information respectively, and reconstructs a 3D mesh based on the obtained connection relationship and geometric information. Among them, the connection relationship decoding includes decoding the pattern of triangles in the 3D mesh. For a preset pattern that meets the conditions, the connection relationship decoding further includes decoding the set threshold information corresponding to the preset pattern and the additional information for indicating the position relationship of the triangles to achieve the immediate stitching of the current triangle. The geometric information decoding supports a decoding method parallel to the connection relationship decoding. The connection relationship decoding uses the relevant information of the triangles and the decoding method corresponding to the encoding end to decode the corresponding part of the input bitstream to obtain the pattern of the triangles. Based on the decoded triangle pattern, possible additional information, etc., the data structure of the mesh is constructed to realize the 3D mesh reconstruction. Therefore, consistent context information with the encoding end can be obtained for accurate decoding and mesh reconstruction.

[0277] In an embodiment of the present invention, when the pattern of the current triangle is the S mode in the CLERS mode, the input bitstream is entropy decoded to obtain the value of the set threshold T1 corresponding to the current triangle in this S mode. Using the value of the set threshold T1, the input bitstream is entropy decoded to determine whether the additional information represented by the S connection information is the number of vertex rotations or the triangle traversal index corresponding to the vertex of the current angle, which can ensure the accuracy of decoding and reconstruction.

[0278] In an embodiment of the present invention, when the pattern of the current triangle is the E, R, or L mode in the CLERS mode and the rotation vertex of this triangle is connected to more than two triangles in the S mode, the input bitstream is entropy decoded to obtain the value of the set threshold T2 corresponding to this triangle. Using the value of the set threshold T2, the input bitstream is entropy decoded to determine whether the additional information represented by the stitching angle information is the relative traversal sequence number of the triangle or the traversal index of the triangle, which can ensure the accuracy of decoding and reconstruction.

[0279] Fourthly, corresponding to the 3D mesh decoding method provided in the third aspect, an embodiment of the present invention further provides a 3D mesh decoding device, which is applied to the decoding end. The device includes:

[0280] A decoding module, configured to decode the connection relationship and geometric information of the input bitstream to obtain the connection relationship and geometric information respectively;

[0281] A reconstruction module, configured to reconstruct a 3D mesh based on the obtained connection relationship and geometric information;

[0282] Among them, the connection relationship decoding includes decoding the patterns of triangles in the three-dimensional grid; for preset patterns that meet the conditions, the connection relationship decoding further includes decoding additional information for indicating the positional relationship of triangles to achieve immediate stitching of the current triangle; the geometric information decoding supports a decoding method parallel to the connection relationship decoding.

[0283] Among them, for the specific processing procedures of the above-mentioned modules, please refer to the three-dimensional grid decoding method described in the third aspect, which will not be elaborated here.

[0284] The above are only the preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention are all included in the protection scope of the present invention.

Claims

1. A three-dimensional grid coding method, characterized in that: include: Encode the connection relationship and geometric information of the input three-dimensional grid to obtain an output code stream; Among them, the connection relationship encoding includes encoding the pattern of triangles in the three-dimensional mesh; for a preset pattern that meets the conditions, the connection relationship encoding also includes determining and encoding additional information used to indicate the position relationship of triangles based on a set threshold corresponding to the preset pattern; the geometric information encoding supports an encoding method parallel to the connection relationship encoding.

2. The three-dimensional grid coding method according to claim 1, characterized in that: The process of encoding the connection relationship of the input 3D mesh includes: Selecting an initial triangle in the three-dimensional mesh to start traversal, and for each traversed triangle, determining a traversal result of the triangle according to the traversed triangles; wherein the traversal result of the triangle includes a mode of the triangle; Using relevant information of the traversed triangle as context information, entropy encoding the pattern of the triangle; wherein the relevant information includes at least one or more of vertex geometry information, the encoded triangle pattern, and the number of adjacent encoded triangles of the triangle vertex; If the traversed triangle pattern is a preset pattern that meets the conditions, corresponding additional information is determined according to a set threshold corresponding to the preset pattern, and the additional information is encoded.

3. The three-dimensional grid coding method according to claim 2, characterized in that: If the traversed triangle pattern is a preset pattern that meets the conditions, corresponding additional information is determined according to a set threshold corresponding to the preset pattern, including: If the mode of the traversed triangle is the S mode in the CLERS mode, determine the number of vertex rotations from the preset corner vertex of the triangle to the current corner vertex to represent the position of the current corner vertex relative to the preset corner vertex; If the number of vertex rotations is less than the set threshold T1 of the triangle, the number of vertex rotations is used as S connection information; If the number of rotations of the vertex is greater than or equal to the set threshold T1 of the triangle, S connection information is obtained based on the index value of the vertex related information; wherein the index value of the vertex related information includes the triangle traversal index of the current corner vertex of the triangle; The S connection information represents additional information of the S-mode triangle, and is used to indicate the actual position of the current corner vertex of the S-mode triangle in the three-dimensional grid.

4. The three-dimensional grid coding method according to claim 3, characterized in that: Encoding the additional information includes: The S-connectivity information is entropy encoded according to the number of vertex rotations.

5. The three-dimensional grid coding method according to claim 3, characterized in that: If the traversed triangle pattern is a preset pattern that meets the conditions, corresponding additional information is determined according to a set threshold corresponding to the preset pattern, including: If the mode of the traversed triangle is the E, R or L mode in the CLERS mode, and the rotation vertex of the triangle is connected to more than two triangles of the S mode during the reconstruction operation, the relative traversal sequence number of the triangle corresponding to the fan-shaped area to which the triangle needs to be stitched is determined according to the traversal order of the triangle; wherein the fan-shaped area is composed of one triangle or more than two adjacent triangles; If the relative traversal sequence number of the triangle is less than the set threshold T2 of the triangle, the relative traversal sequence number of the triangle is used as stitching angle information; If the relative traversal sequence number of the triangle is greater than or equal to the set threshold T2 of the triangle, determine the traversal index of the triangle corresponding to the triangle connected to the triangle according to the traversal sequence of the triangle, and obtain the stitching angle information based on the traversal index of the triangle; The stitching angle information represents additional information, which is used to indicate a traversed triangle to which the triangle is connected in the three-dimensional mesh.

6. The three-dimensional grid coding method according to claim 5, characterized in that: Encoding the additional information includes: The stitching angle information is entropy encoded according to the relative traversal order number of the triangle.

7. The three-dimensional grid coding method according to claim 4 or 6, characterized in that: The output code stream includes a connection information code stream and a geometric information code stream; the connection information code stream includes mode information of the coded triangle, S connection information, stitching angle information and set threshold information; wherein the set threshold information includes set threshold T1 and set threshold T2 of the coded triangle; The geometric information code stream includes starting coordinate information and geometric prediction residuals.

8. A three-dimensional grid encoding device, characterized in that: include: The encoding module is used to encode the connection relationship and geometric information of the input three-dimensional grid to obtain an output code stream; Among them, the connection relationship encoding includes encoding the pattern of triangles in the three-dimensional mesh; for a preset pattern that meets the conditions, the connection relationship encoding also includes determining and encoding additional information used to indicate the position relationship of triangles based on a set threshold corresponding to the preset pattern; the geometric information encoding supports an encoding method parallel to the connection relationship encoding.

9. A three-dimensional grid decoding method, characterized in that: include: Decode the connection relationship and the geometric information of the input code stream to obtain the connection relationship and the geometric information respectively; Reconstructing a three-dimensional mesh based on the obtained connection relationship and geometric information; Among them, the connection relationship decoding includes decoding the pattern of triangles in the three-dimensional mesh; for a preset pattern that meets the conditions, the connection relationship decoding also includes decoding additional information used to indicate the position relationship of the triangles to achieve instant stitching of the current triangle; the geometric information decoding supports a decoding method parallel to the connection relationship decoding.

10. The three-dimensional grid decoding method according to claim 9, characterized in that: The process of decoding the connection relationship of the input code stream includes: Decoding the input code stream to obtain a mode of a current triangle; When the mode of the current triangle is a preset mode that meets the condition, the input code stream is decoded by using the set threshold information to obtain additional information indicating the position relationship of the triangle; Based on the preset mode and a stitching method determined by the additional information obtained according to the preset mode, the current triangle is connected to the reconstructed three-dimensional mesh.

11. The three-dimensional grid decoding method according to claim 10, characterized in that: The relevant information at least includes: One or more of vertex geometry information, encoded triangle mode, and the number of adjacent encoded triangles of a triangle vertex.

12. The three-dimensional grid decoding method according to claim 10, characterized in that: When the current triangle mode is a preset mode that satisfies the condition, the input code stream is decoded by using the set threshold information to obtain additional information indicating the position relationship of the triangle, including: When the mode of the current triangle is the S mode in the CLERS mode, the input code stream is decoded by setting the threshold T1 to determine that the additional information represented by the S connection information is the number of vertex rotations or the triangle traversal index of the vertex corresponding to the current angle.

13. The three-dimensional grid decoding method according to claim 12, characterized in that: When the current triangle mode is a preset mode that satisfies the condition, the input code stream is decoded by using the set threshold information to obtain additional information indicating the position relationship of the triangle, including: When the mode of the current triangle is E, R or L mode in the CLERS mode, and the rotation vertex of the triangle is connected to more than two triangles in the S mode, the input code stream is decoded using the set threshold T2 to determine that the additional information represented by the stitching angle information is the relative traversal sequence number of the triangle or the traversal index of the triangle.

14. The three-dimensional grid decoding method according to claim 12, characterized in that: The input code stream is decoded to obtain the value of the set threshold T1 corresponding to the current triangle of the S mode.

15. The three-dimensional grid decoding method according to claim 13, characterized in that: The input code stream is decoded to obtain the value of the set threshold T2 corresponding to the current triangle of the E, R or L mode.

16. A three-dimensional grid decoding device, characterized in that: include: A decoding module, used for decoding the connection relationship and the geometric information of the input code stream to obtain the connection relationship and the geometric information respectively; A reconstruction module, used for reconstructing a three-dimensional mesh based on the obtained connection relationship and geometric information; Among them, the connection relationship decoding includes decoding the pattern of triangles in the three-dimensional mesh; for a preset pattern that meets the conditions, the connection relationship decoding also includes decoding additional information used to indicate the position relationship of the triangles to achieve instant stitching of the current triangle; the geometric information decoding supports a decoding method parallel to the connection relationship decoding.