Point cloud geometry encoding, decoding method and device based on prediction tree

By selecting feasible residual directions in the prediction tree coding method and constructing a context model to optimize the residual absolute value coding, the problem of low efficiency in point cloud data residual encoding and decoding is solved, thereby improving encoding and decoding performance and user experience.

CN116260984BActive Publication Date: 2026-03-31PEKING UNIV SHENZHEN GRADUATE SCHOOL +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-13
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

In existing technologies, the residual encoding and decoding efficiency of point cloud data is not high, which affects the encoding and decoding performance of point cloud data and leads to a poor user experience.

Method used

By employing bitwise XOR operations to filter feasible residual directions in the prediction tree coding method and constructing an enhanced context model to optimize the encoding of the absolute value of the residuals, redundant information is reduced and encoding/decoding efficiency is improved.

Benefits of technology

The residual coding process was optimized, which improved the encoding and decoding efficiency of point cloud data and enhanced the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116260984B_ABST
    Figure CN116260984B_ABST
Patent Text Reader

Abstract

The application discloses a point cloud geometry coding and decoding method and device based on a prediction tree, comprising the following steps: pre-traversing the prediction tree, obtaining the maximum value of the minimum coding bit number of the residual error from the to-be-coded vertex to the previous vertex of the to-be-coded vertex and coding; then traversing again to obtain the first residual error from the to-be-coded vertex to the previous vertex of the to-be-coded vertex; using the maximum value of the minimum coding bit number and a new enhanced linkage context model to code the absolute value of the first residual error; obtaining the second residual error from the previous vertex to the parent vertex of the previous vertex; performing bitwise XOR on each possible residual error direction and the direction of the second residual error respectively to reorder to obtain a plurality of relative residual error directions; and performing arithmetic coding on the residual error direction of the first residual error according to the feasibility of the relative residual error direction as prior information. Compared with the prior art, the coding method is optimized for residual error coding, and the coding and decoding efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of point cloud encoding and decoding technology, and in particular to a point cloud geometric encoding and decoding method and device based on prediction trees. Background Technology

[0002] Point clouds are a representation of three-dimensional objects or scenes, consisting of a set of discrete points randomly distributed in space, expressing the spatial structure and surface properties of the three-dimensional object or scene. Each frame of point cloud data can contain millions of points, posing significant challenges to data storage, processing, transmission, and display. Therefore, encoding and compression of point cloud data is essential.

[0003] Point clouds contain a large number of unordered vertices. Current encoding standards employ a scheme called prediction tree to encode the geometric positions of point cloud vertices. This scheme connects the vertices of the point cloud into a tree by adding directed edges, establishing an order between the vertices. The position of the current vertex is predicted using the geometric positions of its predecessor vertices, and the residual between the predicted position and the predecessor position is calculated and encoded to encode the geometric information of the point cloud.

[0004] Most current research focuses on encoding point cloud structures, with less research on residual encoding. Furthermore, existing technologies for encoding and decoding residuals are inefficient, affecting the encoding and decoding performance of point cloud data and negatively impacting the user experience.

[0005] Therefore, existing technologies need to be improved and enhanced. Summary of the Invention

[0006] The main objective of this invention is to provide a point cloud geometric encoding method, decoding method, encoding device, decoding device, smart terminal, and storage medium based on prediction trees, aiming to solve the problem of low encoding and decoding efficiency for residuals.

[0007] To achieve the above objectives, a first aspect of the present invention provides a point cloud geometric coding method based on a prediction tree, the method comprising:

[0008] Obtain the first residual from the vertex to be encoded to its predecessor vertex;

[0009] Encode the absolute value of the first residual;

[0010] Obtain the second residual from the previous vertex to the parent vertex of the previous vertex;

[0011] Each possible residual direction is XORed with the direction of the second residual to obtain several relative residual directions;

[0012] Based on the relative residual direction, feasible residual directions are selected from all possible residual directions;

[0013] Renumber all vertices corresponding to the feasible residual directions to obtain the maximum number value;

[0014] The residual direction of the first residual is encoded based on the maximum number value.

[0015] Corresponding to this encoding method, a second aspect of the present invention provides a point cloud geometric decoding method based on a prediction tree, the method comprising:

[0016] Decode the point cloud bitstream to obtain the absolute value of the first residual from the vertex to be decoded to the preceding vertex of the vertex to be decoded;

[0017] Obtain the second residual from the previous vertex to the parent vertex of the previous vertex;

[0018] Each possible residual direction is XORed with the direction of the second residual to obtain several relative residual directions;

[0019] Based on the relative residual direction, feasible residual directions are selected from all possible residual directions;

[0020] Renumber all vertices corresponding to feasible residual directions to obtain the maximum number value;

[0021] Based on the maximum number value, the residual direction of the first residual is obtained by decoding;

[0022] The first residual is obtained by combining the absolute value of the first residual with the residual direction of the first residual;

[0023] The coordinates of the vertex to be decoded are obtained based on the coordinates of the preceding vertex and the first residual.

[0024] As described above, by performing a bitwise XOR operation between each possible residual direction and the direction of the second residual, several relative residual directions are obtained. Then, feasible residual directions are selected based on these relative residual directions. This allows for the encoding of the residual direction between the vertex to be encoded and its predecessor vertex, replacing the existing method of directly encoding the residual direction with encoding the relative residual direction, thereby further removing redundant information and optimizing residual encoding.

[0025] A third aspect of the present invention provides a point cloud geometric coding method based on a prediction tree, the method comprising:

[0026] Obtain the first residual from the vertex to be encoded to its predecessor vertex;

[0027] Based on the absolute value of the first residual, the minimum number of encoded bits is obtained;

[0028] The minimum number of coded bits is encoded bit-by-bit by constructing a context model that enhances the linkage performance between encoded and uncoded bits;

[0029] The absolute value of the first residual is encoded according to the minimum number of encoded bits;

[0030] Select feasible residual directions from all possible residual directions;

[0031] Renumber all vertices corresponding to the feasible residual directions to obtain the maximum number value;

[0032] The residual direction of the first residual is encoded based on the maximum number value.

[0033] Corresponding to this encoding method, a fourth aspect of the present invention provides a point cloud geometric decoding method based on a prediction tree, the method comprising:

[0034] Decode the point cloud bitstream to obtain the minimum number of encoded bits for the vertex to be decoded;

[0035] Based on the minimum number of encoded bits, the absolute value of the first residual from the vertex to be decoded to the preceding vertex of the vertex to be decoded is obtained by decoding;

[0036] Select feasible residual directions from all possible residual directions;

[0037] Renumber all vertices corresponding to feasible residual directions to obtain the maximum number value;

[0038] Based on the maximum number value, the residual direction of the first residual is obtained by decoding;

[0039] The first residual is obtained by combining the absolute value of the first residual with the residual direction of the first residual;

[0040] The coordinates of the vertex to be decoded are obtained based on the coordinates of the preceding vertex and the first residual.

[0041] As described above, by modifying the code originally used for encoding ResRemainder... i The context of [] was removed, and instead, the context of encoding b0 was added (which is based on BRemainder). i []), which enables further optimization of the context scheme when encoding the absolute value of the residual, thereby improving the computational efficiency of residual encoding.

[0042] A fifth aspect of the present invention provides a point cloud geometric coding method based on a prediction tree, the method comprising:

[0043] Traverse the prediction tree and obtain the maximum value of the minimum number of encoded bits for each dimension based on the absolute value of the residual between each pair of adjacent vertices in the prediction tree.

[0044] The minimum number of encoded bits is obtained based on the minimum number of bits of the maximum value;

[0045] The maximum value of all dimensions is encoded bitwise using a context model;

[0046] Obtain the first residual from the vertex to be encoded to its predecessor vertex;

[0047] Based on the absolute value of the first residual, the minimum number of encoded bits is obtained;

[0048] The minimum number of encoded bits is encoded using the maximum value and the minimum number of encoded bits as upper limits;

[0049] The absolute value of the first residual is encoded with reference to the minimum number of encoded bits, the maximum number of encoded bits, and the minimum number of encoded bits.

[0050] Select feasible residual directions from all possible residual directions;

[0051] Renumber all vertices corresponding to the feasible residual directions to obtain the maximum number value;

[0052] The residual direction of the first residual is encoded based on the maximum number value.

[0053] Corresponding to this encoding method, a sixth aspect of the present invention provides a point cloud geometric decoding method based on a prediction tree, the method comprising:

[0054] Decode the point cloud bitstream to obtain the maximum value of the minimum number of encoded bits in each dimension of the prediction tree;

[0055] The minimum number of encoded bits is obtained based on the minimum number of bits of the maximum value;

[0056] The minimum number of encoded bits is obtained based on the minimum number of encoded bits and the maximum number of encoded bits;

[0057] Based on the minimum number of encoded bits, the minimum number of encoded bits, and the maximum value, the absolute value of the first residual from the vertex to be decoded to the preceding vertex of the vertex to be decoded is obtained by decoding;

[0058] Select feasible residual directions from all possible residual directions;

[0059] Renumber all vertices corresponding to feasible residual directions to obtain the maximum number value;

[0060] Based on the maximum number value, the residual direction of the first residual is obtained by decoding;

[0061] The first residual is obtained by combining the absolute value of the first residual with the residual direction of the first residual;

[0062] The coordinates of the vertex to be decoded are obtained based on the coordinates of the preceding vertex and the first residual.

[0063] As described above, by pre-calculating the maximum value of the minimum number of bits required for encoding in each dimension, and using this maximum value as the upper limit to constrain the encoding of the absolute value of the residual in each dimension, the amount of encoded data corresponding to the absolute value of the residual can be reduced, thereby improving encoding efficiency.

[0064] A seventh aspect of the present invention provides a point cloud geometric coding device based on a prediction tree, the device comprising:

[0065] The data acquisition module is used to acquire the first residual from the vertex to be encoded to the preceding vertex of the vertex to be encoded;

[0066] An absolute value encoding module is used to encode the absolute value of the first residual; or, based on the absolute value of the first residual, obtain the minimum number of encoding bits; encode the minimum number of encoding bits bit-by-bit by constructing a context model to enhance the linkage performance between encoded and unencoded bits; encode the absolute value of the first residual according to the minimum number of encoding bits; or, traverse the prediction tree, obtain the maximum value of the minimum number of encoding bits in each dimension based on the absolute value of the residuals of every two adjacent vertices in the prediction tree; obtain the minimum number of encoding bits according to the minimum number of bits of the maximum value; encode the maximum value bit-by-bit in all dimensions using the context model; obtain the minimum number of encoding bits based on the absolute value of the first residual; encode the minimum number of encoding bits with the maximum value and the minimum number of encoding bits as upper limits; encode the absolute value of the first residual with the minimum number of encoding bits, the maximum value, and the minimum number of encoding bits as references.

[0067] The residual direction encoding module is used to obtain the second residual from the previous vertex to the parent vertex of the previous vertex; perform a bitwise XOR operation on each possible residual direction with the direction of the second residual to obtain several relative residual directions; based on the relative residual directions, filter out feasible residual directions from all possible residual directions; renumber all vertices corresponding to the feasible residual directions to obtain a maximum number value; encode the residual direction of the first residual based on the maximum number value; or, filter out feasible residual directions from all possible residual directions; renumber all vertices corresponding to the feasible residual directions to obtain a maximum number value; and encode the residual direction of the first residual based on the maximum number value.

[0068] An eighth aspect of the present invention provides a point cloud geometric decoding device based on a prediction tree, the device comprising:

[0069] The residual absolute value decoding module is used to decode the point cloud code stream to obtain the absolute value of the first residual from the vertex to be decoded to its predecessor vertex; or, to decode the point cloud code stream to obtain the minimum number of encoded bits for the vertex to be decoded; based on the minimum number of encoded bits, to decode and obtain the absolute value of the first residual from the vertex to be decoded to its predecessor vertex; or, to decode the point cloud code stream to obtain the maximum number of minimum encoded bits for each dimension of the prediction tree; to obtain the minimum number of encoded bits based on the minimum number of bits of the maximum value; to obtain the minimum number of encoded bits based on the minimum number of encoded bits and the maximum value; and to decode and obtain the absolute value of the first residual from the vertex to be decoded to its predecessor vertex based on the minimum number of encoded bits, the minimum number of encoded bits, and the maximum value.

[0070] A residual direction decoding module is used to obtain a second residual from the preceding vertex to the parent vertex of the preceding vertex; perform a bitwise XOR operation on each possible residual direction with the direction of the second residual to obtain several relative residual directions; based on the relative residual directions, filter out feasible residual directions from all possible residual directions; renumber all vertices corresponding to feasible residual directions to obtain a maximum number value; and decode to obtain the residual direction of the first residual based on the maximum number value; or, it is used to filter out feasible residual directions from all possible residual directions; renumber all vertices corresponding to feasible residual directions to obtain a maximum number value; and decode to obtain the residual direction of the first residual based on the maximum number value.

[0071] The vertex coordinate module is used to combine the absolute value of the first residual with the residual direction of the first residual to obtain the first residual; and to obtain the coordinates of the vertex to be decoded based on the coordinates of the preceding vertex and the first residual.

[0072] A ninth aspect of the present invention provides a smart terminal, the smart terminal including a memory, a processor, and a point cloud geometric decoding program or a point cloud geometric encoding program based on a prediction tree stored in the memory and executable on the processor. When the point cloud geometric encoding program based on a prediction tree is executed by the processor, it implements the steps of any one of the point cloud geometric encoding methods based on a prediction tree; when the point cloud geometric decoding program based on a prediction tree is executed by the processor, it implements the steps of any one of the point cloud geometric decoding methods based on a prediction tree.

[0073] The tenth aspect of the present invention provides a computer-readable storage medium storing a point cloud geometric decoding program or a point cloud geometric encoding program based on a prediction tree, wherein the point cloud geometric encoding program based on a prediction tree, when executed by the processor, implements the steps of any one of the point cloud geometric encoding methods based on a prediction tree; and the point cloud geometric decoding program based on a prediction tree, when executed by the processor, implements the steps of any one of the point cloud geometric decoding methods based on a prediction tree.

[0074] As can be seen from the above, by optimizing the context during residual encoding, the amount of encoded data for the absolute value of the residual during encoding, and the direction of residual encoding, the encoding and decoding efficiency of residuals can be improved. Attached Figure Description

[0075] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0076] Figure 1 This is a schematic flowchart of an embodiment of the point cloud geometric coding method based on prediction trees provided by the present invention;

[0077] Figure 2 This is a schematic diagram illustrating the feasibility assessment of the residual direction;

[0078] Figure 3 This is a schematic diagram of the second embodiment of the point cloud geometric coding method based on prediction tree provided by the present invention;

[0079] Figure 4 This is a schematic diagram of the third embodiment of the point cloud geometric coding method based on prediction tree provided by the present invention;

[0080] Figure 5 This is a block diagram illustrating the internal structure of a smart terminal provided in an embodiment of the present invention. Detailed Implementation

[0081] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0082] Point cloud encoding mainly includes the following steps: Calculate the distance from the current vertex to its parent vertex; find the vertex closest to the current vertex among the unencoded vertices and use it as the vertex to be encoded, then calculate the residual from the vertex to be encoded to the current vertex; first, encode the absolute value of the residual; then, encode the direction of the residual based on the distance between the residual and the current vertex to its parent vertex. This completes the encoding of the residual. After the current vertex is encoded, obtain the next vertex to be encoded, until all unencoded vertices are encoded.

[0083] To address the problem of low efficiency in encoding and decoding residuals in existing technologies, this invention proposes three point cloud geometric encoding and decoding methods based on prediction trees.

[0084] Encoding Method Example 1

[0085] Currently, when encoding residual directions, although the characteristic that the distance from the parent vertex to the previous vertex is always less than the distance from the parent vertex to the vertex to be encoded is used to reduce the total number of possible residual directions, encoding the order of residual directions among all possibilities requires three contexts. The correlation between these three contexts and the residual directions has been destroyed when "feasibility" is excluded. The three contexts are only used to store the order of residual directions, failing to make full use of residual direction information to improve the efficiency of residual encoding.

[0086] This embodiment optimizes the encoding of residual directions by obtaining the relative direction of the residual direction from the previous vertex to the parent vertex of the previous vertex and encoding the residual direction of the vertex to be encoded, thereby improving the efficiency of residual encoding.

[0087] Specifically, such as Figure 1 As shown, it includes the following steps:

[0088] Step A100: Obtain the first residual from the vertex to be encoded to its predecessor vertex;

[0089] Specifically, for a prediction tree, the coordinates of each vertex are defined as P according to its traversal order. i[k], k = 0, 1, 2 represent the geometric coordinates of the vertex in the X, Y, and Z dimensions, respectively; i = 0, 1, 2, ..., N-1, where N is the total number of vertices in the prediction tree. The vertex to be encoded is obtained by finding the vertex closest to the current vertex among the unencoded vertices in the prediction tree. The current vertex is also called the predecessor vertex of the vertex to be encoded. The residual of the vertex to be encoded is obtained by subtracting the coordinates of the predecessor vertex from the coordinates of the vertex to be encoded in each dimension. The residual is represented by the absolute value of the residual (e.g., |Δx|). i |、|Δy i |、|Δz i The expression is composed of | and the residual sign bit (-, +), for example: (-|Δx) i |,-|Δy i |,-|Δz i |), (-|Δx i |,+|Δy i |,-|Δz i |).

[0090] Vertex to be encoded to its previous order (P) i-1 With P i The formula for calculating the first residual in dimension k between the two is:

[0091]

[0092] Residual Res i The absolute value of [k] is represented as absRes i [k].

[0093] Step A200: Encode the absolute value of the first residual;

[0094] Specifically, we first assume that dimension k = 0, that is, in dimension x, we determine the absolute value of the residual absRes in dimension k. i If [k] is zero, a flag is used to indicate it; otherwise, the following encoding operation on dimension k is performed:

[0095] First, obtain ResHalf based on the absolute value of the residual. i [k]、ResRemainder i The value of [k] is specifically expressed as: ResHalf i [k] = absRes i [k]>>1, ResRemainder i [k] = absRes i [k]%2;

[0096] Comparison of ResHalf i [0]、ResHalf i[1] ResHalf i The value of [2] is used to calculate the code ResHalf based on the maximum value among the three. i Minimum number of bits required for encoding (B) i [k];

[0097] Based on the minimum number of encoded bits B i [k] Calculate BHalf i [k]、BRemainder i [k], specifically expressed as: BHalf i [k]=B i [k]>>1, BRemainder i [k]=B i [k]%2;

[0098] Create a partially related context model ctxNumBits[ctxIdx], and use the context model ctxNumBits[ctxIdx] with bit-level encoding to apply it to BHalf. i [k](b3b2b1b0), BRemainder i [k] and ResRemainder i [k] is used for encoding. The context model allows for optimization (i.e., linkage) of the encoding of unencoded bits using already encoded bits. The linkage between encoded and unencoded bits indicates a strong correlation between the encoded and unencoded information. Constructing a context can remove redundant information. The specific steps are as follows:

[0099] When ctxIdx = 0, the encoding is BHalf. i b0 in [k];

[0100] When ctxIdx = 1 + b0, the encoding is BHalf. i b1 in [k];

[0101] When ctxIdx = 3 + b0 + 2 * b1, the encoding is BHalf. i b2 in [k];

[0102] When ctxIdx = 7, the encoding is BHalf. i b3 in [k];

[0103] When ctxIdx = 8, the encoding is BRemainder. i [k];

[0104] When ctxIdx = 9, the encoding is ResRemainder. i [k].

[0105] Then use the minimum encoding bit length B i [k] Bitwise encoding ResHalf i [k].

[0106] Update dimension k to another dimension, perform encoding operations on the updated dimension, until the absolute values ​​of the residuals of the three dimensions are encoded, and then complete the encoding of the absolute value of the first residual.

[0107] Step A300: Obtain the second residual from the previous vertex to the parent vertex of the previous vertex;

[0108] Specifically, the vertex to be encoded is denoted as P. i =(x i y i , z i The preceding vertex of the vertex to be encoded is denoted as P. i-1 =(x i-1 y i-1 , z i-1 Vertex P i-1 The parent vertex is denoted as P. i-2 =(x i-2 y i-2 , z i-2 If the previous vertex is a vertex, then the second residual from the previous vertex to its parent vertex is: Res i-1 =P i-1 -P i-2 =(Δx) i-1 Δy i-1 Δz i-1 ).

[0109] Step A400: Perform a bitwise XOR operation between each possible residual direction and the direction of the second residual to obtain several relative residual directions;

[0110] Specifically, the first residual Res i The absolute value of the residual is absRes i ,absRes i =(|Δx) i |,|Δy i |,|Δz i Each dimension also contains a positive or negative sign bit. The positive and negative sign bits of the three dimensions form the residual direction, denoted as signRes. i =(sign(Δx) i ), sign(Δy i ), sign(Δz) i ), where the function is:

[0111]

[0112] Calculate the preceding vertex Pi-1 to parent vertex P i-2 The distance between them (e.g., Euclidean distance, Huffman distance) is denoted as C(P). i-2 P i-1 ).

[0113] Based on the arrangement of the positive and negative signs of the residuals, there are at most eight possible directions for the residuals: S0 = (0, 0, 0), S1 = (0, 0, 1), S2 = (0, 1, 0), S3 = (0, 1, 1), S4 = (1, 0, 0), S5 = (1, 0, 1), S6 = (1, 1, 0), and S7 = (1, 1, 1). (It should be noted that when the absolute value of the residual in a certain dimension is 0, the total number of possibilities may decrease to 4, 2, or 1). Without loss of generality, when all eight possibilities exist, the eight possible residuals are denoted as T0 = (-|Δx) / ( ... i |,-|Δy i |,-|Δz i |), T1=(-|Δx i |,-|Δy i |,+|Δz i |), T2=(-|Δx i |,+|Δy i |,-|Δz i |), T3=(-|Δx i |,+|Δy i |,+|Δz i |), T4=(+|Δx i |,-|Δy i |,-|Δz i |), T5=(+|Δx i |,-|Δy i |,+|Δz i |), T6=(+|Δx i |,+|Δy i |,-|Δz i |) and T7=(+|Δx i |,+|Δy i |,+|Δz i |).

[0114] Based on the second residual Res i-1 The direction (i.e., the residual direction from the previous vertex to its parent vertex) is used to reorder all eight possible residual directions (S0, S1, S2, S3, S4, S5, S6, S7) using a bitwise XOR operation to obtain the relative residual directions (S′0, S′1, S′2, S′3, S′4, S′5, S′6, S′7). Specifically, assuming possible residual directions S...i The binary representation of i = 0, ..., 7 is i = (i2, i1, i0), and the second residual direction is preS. k The binary representation of k for k = 0, ..., 7 is k = (k2, k1, k0), and the relative residual direction is S′. j The binary representation of j for j = 0, ..., 7 is j = (j2, j1, j0). Based on the known S... i Perform a bitwise XOR operation with preSk:

[0115]

[0116] Obtain the relative residual direction S′ j .

[0117] Table 1 shows the results of bitwise XORing all possible residual directions with the directions of each preceding residual:

[0118] Table 1: Bitwise XOR results of possible residual directions and the previous residual direction

[0119]

[0120] After obtaining the relative residual direction, S i Mapped to the relative residual direction S′ j (i and j may not be equal) then, based on j, the newly obtained S′ j Perform ascending reordering, the corresponding relative residual T′ j It will also be reordered. The relative residuals (T′0,T′1,T′2,T′3,T′4,T′5,T′6,T′7) are the combination of the direction of the relative residuals and the absolute value of the first residual.

[0121] Step A500: Based on the relative residual direction, select feasible residual directions from all possible residual directions;

[0122] Specifically, it is known that the distance from the parent vertex to its predecessor vertex is always less than the distance from the parent vertex to the vertex to be encoded (e.g., Euclidean distance, Huffman distance). Calculate the parent vertex P. i-2 To P i-1 +T′ i The distance, denoted as C. i If C i <C(P i-2 ,P i-1 In this case, choose the parent vertex P. i-2 When choosing the closest vertex, P should be selected first. i Instead of P i-1 Therefore, the relative residual T′ in this case... iThis is not feasible, and the residual direction corresponding to the relative residual is also not feasible. These infeasible residual directions are filtered out to obtain feasible residual directions.

[0123] Step A600: Renumber all vertices corresponding to feasible residual directions to obtain the maximum number value;

[0124] Step A700: Encode the residual direction corresponding to the first residual based on the maximum number value.

[0125] Specifically, using the feasibility of the residual direction as prior information, the signRes of the residual value of the vertex to be encoded is determined. i Perform arithmetic encoding. (See reference) Figure 2 As shown, without loss of generality, suppose there are 3 red dots (T0, T1, T4) and 5 blue dots (T2, T3, T5, T6, T7) among the eight possibilities. The case with 3 red dots is impossible and can be directly eliminated. The symbols corresponding to the 5 blue dots are feasible. From... Figure 2 From this, we can know the current residual (i.e., the first residual) Res i The sign bit is signRes i = (1,1,1), the previous residual (i.e., the second residual) Res i-1 The sign bit is signRes i-1 = (1,1,1). According to Table 1, the current residual Res is (1,1,1). i The relative residual direction is signRes′ i = (0,0,0), that is, T′7 = T7. The directions of the residuals that are excluded from being possible are (0,0,0), (0,0,1), and (1,0,0). The result of renumbering is shown in Table 2. The total number of all possible cases is 5, denoted as Possible = 5; the state number to be encoded after renumbering is 4, denoted as ord = 4.

[0126] Table 2: Relative Residuals T′ i A diagram illustrating the results of renumbering, where X represents a symbol that cannot exist.

[0127] 000 001 010 011 100 101 110 111 X X 0 1 X 2 3 4

[0128] Let the binary representation of ord be ord = (o2o1o0)2. Encode the binary bits of the vertex number corresponding to the residual value from high to low. When encoding the i-th bit, set the i-th bit to 1, and set the remaining unencoded bits to 0. Record the value of the current decimal number as D. If D ≥ Possible = 5, then the value of this bit cannot be 1, and no encoding is needed. Otherwise, perform context-based arithmetic encoding on the i-th bit, and update the i-th bit of D (to keep it consistent with the i-th bit of ord). Taking the case in Table 2 as an example: the number to be encoded is 4, and Possible = 5 is known. The encoding process is as follows: Convert the number to be encoded into a binary representation: ord = 4 = 100, that is, o2 = 1, o1 = 0, o0 = 0. First, set D to zero. Next, when encoding the second bit o2, if this bit is 1, then D = 100 = 4, which is less than Possible. Context encoding is performed on o2, and o2 is assigned to the second bit of D, updating D = 100 = 4. Then, when encoding the first bit o1, if this bit is 1, then D = 110 = 6, which is greater than Possible. Therefore, the first bit must be 0, requiring no encoding and no update to D. Finally, when encoding the 0th bit o0, if this bit is 1, then D = 101 = 5, which is equal to Possible. Therefore, the 0th bit must be 0, requiring no encoding and no update to D.

[0129] In summary, this embodiment, when encoding the residual direction between the vertex to be encoded and the preceding vertex, further removes redundant information by encoding the relative residual direction instead of directly encoding the residual direction in the prior art, thereby optimizing the residual encoding.

[0130] Decoding Method Example 1

[0131] Regarding the encoding method embodiment one, this embodiment provides a decoding method embodiment, which specifically includes the following steps:

[0132] Step D100: Decode the point cloud bitstream to obtain the absolute value of the first residual from the vertex to be decoded to the preceding vertex of the vertex to be decoded;

[0133] Specifically, the point cloud bitstream is received, the last decoded vertex is taken as the vertex to be decoded, and the coordinates of the predecessor vertex and the parent vertex of the vertex to be decoded are obtained based on the decoded vertex.

[0134] Given dimension k = 0, determine the absolute value of the residual absRes in the current dimension k. i Is [k] zero? If absRes i If [k] is nonzero, then the following operation is performed to decode the absolute value of the first residual in dimension k:

[0135] Based on the partially relevant context model ctxNumBits[ctxIdx] in the bitstream, BHalf is obtained using bit-length parsing. i [k](b3b2b1b0), BRemainder i [k] and ResRemainder i [k]. The specific steps are as follows:

[0136] Given ctxIdx = 0, decode from ctxNumBits to obtain BHalf. i b0 in [k];

[0137] Given ctxIdx = 1 + b0, decode from ctxNumBits to obtain BHalf. i b1 in [k];

[0138] Given ctxIdx = 3 + b0 + 2 * b1, decode from ctxNumBits to obtain BHalf. i [k] in b2;

[0139] Given ctxIdx = 7, decode from ctxNumBits to obtain BHalf. i [k] in b3;

[0140] Given ctxIdx = 8, decode from ctxNumBits to obtain BRemainder. i [k];

[0141] Given ctxIdx = 9, decode from ctxNumBits to obtain ResRemainder i [k];

[0142] Then according to BHalf i [k] and BRemainder i [k] Calculate the minimum residual bit length B i [k], B i [k]=(BHalf i [k] << 1) + BRemainder i [k];

[0143] Based on the minimum residual bit length B i [k], decode bit by bit to obtain ResHalf i [k];

[0144] According to ResHalf i [k] and ResRemainder i [k] Calculates the absolute value of the first residual in dimension k, absRes.i [k], absRes i [k] = (ResHalf) i [k] << 1) + ResRemainder i [k].

[0145] Update dimension k to another dimension until the absolute values ​​of the residuals of the three dimensions are decoded, and then complete the decoding of the absolute value of the first residual.

[0146] Step D200: Obtain the second residual from the previous vertex to the parent vertex of the previous vertex;

[0147] Specifically, the second residual is obtained based on the coordinates of the decoded preceding vertex and the coordinates of the preceding vertex's parent vertex; the preceding vertex is denoted as P. i-1 =(x i-1 y i-1 , z i-1 Vertex P i-1 The parent vertex is denoted as P. i-2 =(x i-2 y i-2 , z i-2 If the previous vertex is a vertex, then the second residual from the previous vertex to its parent vertex is: Res i-1 =P i-1 -P i-2 =(Δx) i-1 Δy i-1 Δz i-1 ). Calculate the preceding vertex P. i-1 to parent vertex P i-2 The distance between them (e.g., Euclidean distance, Huffman distance) is denoted as C(P). i-2 P i-1 ).

[0148] Step D300: Perform a bitwise XOR operation between each possible residual direction and the direction of the second residual to obtain several relative residual directions;

[0149] For details, please refer to the description in step A400, which will not be repeated here.

[0150] Step D400: Based on the relative residual direction, select feasible residual directions from all possible residual directions;

[0151] Specifically, calculate P i-2 To P i-1 +T′ i The distance, denoted as C. i If C i <C(P) i-2 P i-1 In this case, the corresponding relative residual T′ is...i This is not feasible. The residual direction corresponding to the relative residual is also not feasible. Filtering out these infeasible residual directions yields feasible residual directions.

[0152] Step D500: Renumber all vertices corresponding to feasible residual directions to obtain the maximum number value;

[0153] Step D600: Based on the maximum number value, decode to obtain the residual direction of the first residual;

[0154] Specifically, based on the relative residual direction S′ of the residual value j The feasibility is used as prior information, and the signRes of the residual values ​​of the vertices to be decoded is used. i Perform arithmetic decoding to obtain the residual direction of the first residual. For example, if the encoded number is 100, the corresponding encoded vertex number is 4. Then, look up the relative sign bit signRes′ according to Table 2. i = (0, 0, 0), and then look up the sign bit of the first residual in one dimension in Table 1 based on the relative sign bit. Repeat the same operation until the sign bits of all three dimensions are obtained, and combine them to form the residual direction of the first residual. For the arithmetic decoding method, please refer to the description in step A700.

[0155] Step D700: Combine the absolute value of the first residual with the direction of the first residual to obtain the first residual;

[0156] Step D800: Obtain the coordinates of the vertex to be decoded based on the coordinates of the preceding vertex and the first residual.

[0157] Specifically, the sign bit signRes i =(sign(Δx) i ), sign(Δy i ), sign(Δz) i The absolute value of the first residual, absRes i =(|Δx) i |,|Δy i |,|Δz i |) Combining, we obtain the first residual Res. i The coordinates of the point to be decoded are P. i =P i-1 +Res i It is worth noting that the special case is P0 = (0, 0, 0) + Res i .

[0158] Encoding Method Example 2

[0159] In existing technologies, residual coding uses shift and remainder operations for both the absolute value of the residual and the number of bits occupied, which has the following problems: 1. The least significant bit of the absolute value of the residual, ResRemainder... i [k] and its ResHalf i The remaining bits B in [k] i There is no substantial difference, ResRemainder i [k] Designing a separate context is obviously wasteful of space and affects efficiency, so bit-by-bit encoding is sufficient. II. The number of bits occupied is split into BHalf. i [k](b3b2b1b0) and BRemainder i [k], considering BHalf i There is correlation between adjacent bits in [k](b3b2b1b0), so a partially correlated context model ctxNumBits[ctxIdx] is designed to encode the number of bits, but BRemainder is ignored. i The correlation between [k] and b3, b2, b1, b0.

[0160] In this embodiment, the context scheme is further optimized when encoding the absolute value of the residuals generated by the geometric prediction tree, thereby improving the computational efficiency of residual encoding. For example... Figure 3 As shown, the specific steps include the following:

[0161] Step B100: Obtain the first residual from the vertex to be encoded to its predecessor vertex;

[0162] For details, please refer to the description in step A100, which will not be repeated here.

[0163] Step B200: Based on the absolute value of the first residual, obtain the minimum number of encoded bits;

[0164] Step B300: Encode the minimum number of bits bitwise by constructing a context model that enhances the linkage performance between encoded and uncoded bits;

[0165] Step B400: Encode the absolute value of the first residual according to the minimum number of coding bits;

[0166] Specifically, we first assume that dimension k = 0, that is, in dimension x, we determine the absolute value of the residual absRes in dimension k. i If [k] is zero, a flag is used to indicate it; otherwise, the following encoding operation on dimension k is performed:

[0167] First, obtain ResHalf. i [k]、ResRemainderi The value of [k], ResHalf i [k] = absRes i [k]>>1, ResRemainder i [k] = absRes i [k]%2;

[0168] Then compare ResHalf i [0]、ResHalf i [1] ResHalf i [2] value, calculate ResHalf i Minimum number of bits required for encoding (B) i [k];

[0169] Create a partially related context model ctxNumBits[ctxIdx], and use the context model ctxNumBits[ctxIdx] to encode B using a bit-level encoding method. i Encode [k](b4b3b2b1b0). The specific steps are as follows:

[0170] When ctxIdx = 0, the code is B. i b0 in [k];

[0171] When ctxIdx = 1 + b0, the code is B. i b1 in [k];

[0172] When ctxIdx = 3 + b1, the code is B. i b2 in [k];

[0173] When ctxIdx = 5 + b2 + b1 * 2, the code is B. i b3 in [k];

[0174] When ctxIdx = 9, the code is B. i b4 in [k].

[0175] Then use the minimum encoding bit length B i [k] Bitwise encoding ResRemainder i [k] and ResHalf i [k].

[0176] Update dimension k to another dimension until the absolute values ​​of the residuals in the three dimensions are encoded, and then encode the absolute value of the first residual.

[0177] After the above processing steps, the code originally used for encoding ResRemainder will be... iThe context of [k] was removed, and instead the context of encoding b0 was added (which is based on BRemainder). i [k]), that is, adding a context to link the original BRemainder i [k] (now bit b0) and the original bit b0 (now bit b1) utilize more encoded information to assist in encoding unencoded information without changing the amount of context, thus improving encoding performance.

[0178] Step B500: Select feasible residual directions from all possible residual directions;

[0179] Specifically, the vertex to be encoded is denoted as P. i =(x i y i , z i The preceding vertex of the vertex to be encoded is denoted as P. i -1=(x i-1 y i-1 , z i-1 Vertex P i-1 The parent vertex is denoted as P. i-2 =(x i-2 y i-2 , z i-2 ).

[0180] First residual Res i The absolute value of the residual is absRes i ,absRes i =(|Δx) i |,|Δy i |,|Δz i Each dimension also contains a positive or negative sign bit. The positive and negative sign bits of the three dimensions form the residual direction, denoted as signRes. i =(sign(Δx) i ), sign(Δy i ), sign(Δz) i ), where the function is:

[0181]

[0182] Calculate the preceding vertex P i-1 to parent vertex P i-2 The distance between them (e.g., Euclidean distance, Huffman distance) is denoted as C(P). i-2 P i-1 ).

[0183] Based on the permutation of the positive and negative signs of the residuals, there are at most eight possible directions for the residuals: S0 = (0, 0, 0), S1 = (0, 0, 1), S2 = (0, 1, 0), S3 = (0, 1, 1), S4 = (1, 0, 0), S5 = (1, 0, 1), S6 = (1, 1, 0), and S7 = (1, 1, 1). (It is worth noting that when the absolute value of the residual in the corresponding dimension is 0, the total number of possibilities may decrease to 4, 2, or 1). Without loss of generality, when all eight possibilities exist, the eight possible residuals relative to the preceding vertex are denoted as T0 = (-|Δx) / ( ... i |,-|Δy i |,-|Δz i |), T1=(-|Δx i |,-|Δy i |,+|Δz i |), T2=(-|Δx i |,+|Δy i |,-|Δz i |), T3=(-|Δx i |,+|Δy i |,+|Δz i |), t4=(+|Δx i |,-|Δy i |,-|Δz i |), T5=(+|Δx i |,-|Δy i |,+|Δz i |), T6=(+|Δx i |,+|Δy i |,-|Δz i |) and T7=(+|Δx i |,+|Δy i |,+|Δz i |).

[0184] Given that the distance from the parent vertex to its predecessor vertex is always less than the distance from the parent vertex to the vertex to be encoded (e.g., Euclidean distance, Huffman distance), calculate the distance from the parent vertex P. i-2 To P i-1 +T i The distance, denoted as C. i If C i <C(P) i-2 P i-1 In this case, choose the parent vertex P. i-2 When choosing the closest vertex, P should be selected first. i Instead of P i-1Therefore, the corresponding residual direction is not feasible in this case. These infeasible residual directions are filtered out to obtain feasible residual directions.

[0185] Using the feasibility of the residual direction as prior information, the signRes of the residual value of the vertex to be encoded is determined. i Perform arithmetic encoding. (See reference) Figure 2 As shown, without loss of generality, assume that among the eight possibilities there are 3 red dots (T0, T1, T4) and 5 blue dots (T2, T3, T5, T6, T7). The case with 3 red dots is impossible and can be directly eliminated, while the symbols corresponding to the 5 blue dots are feasible.

[0186] Step B600: Renumber all vertices corresponding to feasible residual directions to obtain the maximum number value;

[0187] Step B700: Encode the residual direction corresponding to the first residual based on the maximum number value.

[0188] For details, please refer to the descriptions in steps A600 and A700, which will not be repeated here.

[0189] In summary, this embodiment takes into account that when encoding the absolute value of the residual, the original method used for encoding ResRemainder will be changed. i The context of [k] was removed, and instead the context of encoding b0 was added (which is based on BRemainder). i [k]) to further improve coding performance.

[0190] Decoding Method Example 2

[0191] Regarding the second embodiment of the encoding method, this embodiment provides an embodiment of the decoding method, which specifically includes the following steps:

[0192] Step E100: Decode the point cloud bitstream to obtain the minimum number of encoded bits for the vertex to be decoded;

[0193] Step E200: Based on the minimum number of encoded bits, decode to obtain the absolute value of the first residual from the vertex to be decoded to the preceding vertex;

[0194] Specifically, the point cloud bitstream is received, the last decoded vertex is taken as the vertex to be decoded, and the coordinates of the predecessor vertex of the vertex to be decoded and the coordinates of the parent vertex of the predecessor vertex are obtained based on the decoded vertices.

[0195] First, determine the absolute value of the residual absRes in the current dimension k. i Is [k] zero? If absRes i If [k] is nonzero, then the following operation is performed to decode the absolute value of the first residual in dimension k:

[0196] Based on the partially relevant context model ctxNumBits[ctxIdx] in the bitstream, the minimum encoded bit length B is obtained through bit-length parsing. i [k](b4b3b2b1b0). The specific steps are as follows:

[0197] Given ctxIdx = 0, decode from ctxNumBits to obtain B. i b0 in [k];

[0198] Given ctxIdx = 1 + b0, decode from ctxNumBits to obtain B. i b1 in [k];

[0199] Given ctxIdx = 3 + b1, decode from ctxNumBits to obtain B. i b2 in [k];

[0200] Given ctxIdx = 5 + b2 + b1 * 2, decode from ctxNumBits to obtain B. i b3 in [k];

[0201] Given ctxIdx = 9, decode from ctxNumBits to obtain B. i b4 in [k];

[0202] Then based on the minimum coding bit length B i [k], decode bit by bit to obtain ResRemainder i [k] and ResHalf i [k];

[0203] According to ResRemainder i [k] and ResHalf i [k], calculate the absolute value of the first residual in dimension k: absRes i [k], absRes i [k] = (ResHalf) i [k] << 1) + ResRemainder i [k].

[0204] Update dimension k to another dimension until the absolute values ​​of the residuals of the three dimensions are decoded, and then complete the decoding of the absolute value of the first residual.

[0205] Step E300: Select feasible residual directions from all possible residual directions;

[0206] Step E400: Renumber all vertices corresponding to feasible residual directions to obtain the maximum number value;

[0207] Step E500: Based on the maximum number value, decode to obtain the residual direction of the first residual;

[0208] Specifically, based on the arrangement of the positive and negative signs of the residuals, there are at most eight possibilities for the residual direction: S0 = (0, 0, 0), S1 = (0, 0, 1), S2 = (0, 1, 0), S3 = (0, 1, 1), S4 = (1, 0, 0), S5 = (1, 0, 1), S6 = (1, 1, 0), and S7 = (1, 1, 1). (It is worth noting that when the absolute value of the residual in the corresponding dimension is 0, the total number of possibilities may decrease to 4, 2, or 1). Without loss of generality, when all eight possibilities exist, the eight possible residuals relative to the preceding vertex are denoted as T0 = (-|Δx) / ( ... i |,-|Δy i |,-|Δz i |), T1=(-|Δx i |,-|Δy i |,+|Δz i |), T2=(-|Δx i |,+|Δy i |,-|Δz i |), T3=(-|Δx i |,+|Δy i |,+|Δz i |), t4=(+|Δx i |,-|Δy i |,-|Δz i |), T5=(+|Δx i |,-|Δy i |,+|Δz i |), T6=(+|Δx i |,+|Δy i |,-|Δz i |) and T7=(+|Δx i |,+|Δy i |,+|Δz i |).

[0209] Calculate P i-2 To P i-1 +T i The distance, denoted as C. i If C i <C(P) i-2 P i-1 In this case, the direction of the corresponding residual value is T. iIt is not feasible, based on the direction T of the residual value. i The feasibility is used as prior information, and the sign of the residual value of that vertex is signRes. i Perform arithmetic decoding to obtain the residual direction of the first residual. For details on renumbering the vertices corresponding to feasible residual directions and obtaining the residual directions through arithmetic decoding, please refer to the descriptions in steps D500 and D600. The only difference is that step D500 uses relative residual directions, while this embodiment uses feasible residual directions.

[0210] Step E600: Combine the absolute value of the first residual with the direction of the first residual to obtain the first residual;

[0211] Step E700: Obtain the coordinates of the vertex to be decoded based on the coordinates of the preceding vertex and the first residual.

[0212] Specifically, the details of steps E600 and E700 can be found in the descriptions of steps D700 and D800, and will not be repeated here.

[0213] Encoding Method Example 3

[0214] Currently, when encoding the absolute value of the residuals generated by the geometric prediction tree, it is generally assumed that the absolute value of the residuals needs to be encoded with 5 bits (i.e., 0-31). However, experiments have shown that the number of bits corresponding to the maximum absolute value of the residuals in each dimension of each prediction tree often does not reach 31, and most residuals do not even need to be encoded with 5 bits.

[0215] This embodiment further optimizes the bit-count encoding of the absolute residual value generated by the geometric prediction tree, saving memory and improving encoding efficiency. For example... Figure 4 As shown, the specific steps include the following:

[0216] Step C100: Traverse the prediction tree and obtain the maximum value of the minimum number of encoded bits for each dimension based on the absolute value of the residual between each pair of adjacent vertices in the prediction tree.

[0217] Step C200: Obtain the minimum number of encoded bits based on the minimum number of bits of the maximum value;

[0218] Step C300: Encode the maximum value of all dimensions bitwise using a context model;

[0219] Specifically, iterate through the residuals of each pair of adjacent vertices in the prediction tree once, and calculate the absolute value of all residuals, absRes. i [k] Minimum number of encoded bits in each dimension (B) i[k] represents the maximum value of the minimum number of encoded bits for each dimension. That is, maxNumBits[k] = max{B0[k], ..., B...} N-1 [k]}∈[0, 31], where B i [k] represents the minimum number of encoded bits for vertex i in dimension k. Then, the minimum number of encoded bits in dimension k is calculated based on the maximum value of the minimum number of encoded bits, maxNumBits[k], i.e., maxNumofNumBits[k]∈[0,5].

[0220] The specific steps for encoding the maximum value maxNumBits[k] of the minimum number of encoded bits in dimension k are as follows:

[0221] Based on the maximum value of the minimum number of bits in the encoding, maxNumBits[k], calculate maxBHalf[k] = maxNumBits[k] >> 1 and maxBRemainder[k] = maxNumBits[k] % 2.

[0222] Create a partially related context model ctxNumBits[ctxIdx], and use the context model ctxNumBits[ctxIdx] to encode maxBHalf(b3b2b1b0) and maxBRemainder[k] using bit-level encoding. The specific steps are as follows:

[0223] When ctxIdx = 0, encode b0 in maxBHalf;

[0224] When ctxIdx = 1 + b0, encode b1 in maxBHalf;

[0225] When ctxIdx = 3 + b1 + b0 * 2, encode b2 in maxBHalf;

[0226] When ctxIdx = 7, encode b3 in maxBHalf;

[0227] When ctxIdx = 8, the encoding is maxBRemainder[k].

[0228] Update dimension k to the next dimension, and encode the maximum value of the minimum number of encoded bits under the updated dimension k, maxNumBits[k], until the maximum value of the minimum number of encoded bits under each dimension has been encoded.

[0229] Step C400: Obtain the first residual from the vertex to be encoded to its predecessor vertex;

[0230] Step C500: Based on the absolute value of the first residual, obtain the minimum number of encoded bits;

[0231] Step C600: Encode the minimum number of bits, using the maximum and minimum number of encoded bits as upper limits;

[0232] Step C700: Encode the absolute value of the first residual with reference to the minimum number of coding bits, the maximum number of coding bits, and the minimum number of coding bits;

[0233] Specifically, we first assume that dimension k = 0, that is, in dimension x, we determine the absolute value of the residual absRes in dimension k. i If [k] is zero, a flag is used to indicate it; otherwise, the following encoding operation on dimension k is performed:

[0234] First, obtain ResHalf. i [k]、ResRemainder i The value of [k], ResHalf i [k] = absRes i [k]>>1, ResRemainder i [k] = absRes i [k]%2;

[0235] Then compare ResHalf i [0]、ResHalf i [1] ResHalf i [2] value, calculate ResHalf i Minimum number of bits required for encoding (B) i [k];

[0236] Based on the minimum number of encoded bits B i [k] Calculate BHalf i [k]、BRemainder i [k], specifically expressed as: BHalf i [k]=B i [k]>>1, BRemainder i [k]=B i [k]%2;

[0237] Create a partially related context model ctxNumBits[ctxIdx], using the maximum value maxNumBits[k] and the minimum number of encoded bits maxNumofNumBits[k] as the upper limit of the maximum value, and use the context model ctxNumBits[ctxIdx] to encode BHalf using a bit-level encoding method. i[k](b3b2b1b0), BRemainder i [k], ResRemainder i [k] is used for encoding. The specific steps are as follows:

[0238] Set sumofStatus1 to zero.

[0239] When maxNumofNumBits[k]≥1 and (sumofStatus1|1)≤maxNumBits[k], set ctxIdx=8 and encode BRemainder. i [k], and update sumofStatus1, i.e., sumofStatus1|=BRemainder i [k];

[0240] When maxNumofNumBits[k]≥2 and (sumofStatus1|2)≤maxNumBits[k], set ctxIdx=0, encode b0, and update sumofStatus1, i.e., sumofStatus1|=b0<<1;

[0241] When maxNumofNumBits[k]≥3 and (sumofStatus1|4)≤maxNumBits[k], set ctxIdx=1+b0, encode b1, and update sumofStatus1, i.e., sumofStatus1|=b1<<2;

[0242] When maxNumofNumBits[k]≥4 and (sumofStatus1|8)≤maxNumBits[k], set ctxIdx=3+b1+b0*2, encode b2, and update sumofStatus1, that is, sumofStatus1|=b2<<3;

[0243] When maxNumofNumBits[k]≥5 and (sumofStatus1|16)≤maxNumBits[k], set ctxIdx=7, encode b3, and update sumofStatus1, i.e., sumofStatus1|=b3<<4;

[0244] Set ctxIdx = 9, and encode ResRemainder i [k].

[0245] Then use the minimum encoding bit length B i [k] Bitwise encoding ResHalf i [k].

[0246] Update dimension k to another dimension, perform encoding operations on the updated dimension, until the absolute values ​​of the residuals of the three dimensions are encoded, and then complete the encoding of the absolute value of the first residual.

[0247] Step C800: Select feasible residual directions from all possible residual directions;

[0248] Step C900: Renumber all vertices corresponding to feasible residual directions to obtain the maximum number value;

[0249] Step C1000: Encode the residual direction of the first residual based on the maximum number value.

[0250] Specifically, the contents of steps C800 to C1000 are described in steps B600 to B800, and will not be repeated here.

[0251] In summary, this embodiment reduces the amount of data required to encode the number of bits corresponding to the absolute values ​​between pairs of nodes in the corresponding prediction tree by encoding the number of bits corresponding to the maximum absolute value residuals in each dimension of each prediction tree.

[0252] Decoding Method Example 3

[0253] Regarding the third embodiment of the encoding method, the decoding method embodiment provided in this embodiment specifically includes the following steps:

[0254] Step F100: Decode the point cloud bitstream to obtain the maximum value of the minimum number of encoded bits in each dimension of the prediction tree;

[0255] Step F200: Obtain the minimum number of encoded bits based on the minimum number of bits of the maximum value;

[0256] Step F300: Obtain the minimum number of encoded bits based on the maximum value of the minimum number of encoded bits and the minimum number of encoded bits.

[0257] Step F400: Based on the minimum number of bits, the minimum number of bits, and the maximum value of the minimum number of bits, decode to obtain the absolute value of the first residual from the vertex to be decoded to the preceding vertex;

[0258] Specifically, the point cloud bitstream is received, the last decoded vertex is taken as the vertex to be decoded, the context model ctxNumBits[ctxIdx] is decoded from the point cloud bitstream, and the coordinates of the predecessor vertex of the vertex to be decoded, as well as the coordinates of the parent vertex of the predecessor vertex, are obtained.

[0259] Parse the bit depth of ctxNumBits[ctxIdx] to obtain maxBHalf(b3b2b1b0) and maxBRemainder[k]. The specific steps are as follows:

[0260] When ctxIdx = 0, the decoder obtains b0 in maxBHalf;

[0261] When ctxIdx = 1 + b0, the decoder obtains b1 from maxBHalf;

[0262] When ctxIdx = 3 + b1 + b0 * 2, the decoder obtains b2 from maxBHalf.

[0263] When ctxIdx = 7, the decoder obtains b3 in maxBHalf;

[0264] When ctxIdx = 8, the decoder obtains maxBRemainder[k].

[0265] Based on maxBHalf[k] and maxBRemainder[k], calculate the maximum value of the minimum number of encoded bits in each dimension, maxNumBits[k] = (maxBHalf[k] << 1) + maxBRemainder[k].

[0266] The minimum number of encoded bits, maxNumofNumBits[k]∈[0,5], is calculated based on the minimum number of bits of the maximum value of the minimum encoded bit length, maxNumBits[k].

[0267] Determine the absolute value of the residuals in the current dimension k, absRes i Is [k] zero? If absRes i If [k] is nonzero, then the following operation is performed to decode the absolute value of the first residual in dimension k:

[0268] Based on the context model ctxNumBits[ctxIdx] in the bitstream, using the maximum value of the minimum number of encoded bits maxNumBits[k] and the minimum number of encoded bits maxNumofNumBits[k] as the upper limit of the maximum value, BHalf is decoded. i [k](b3b2b1b0), BRemainder i [k] and ResRemainder i [k]. The specific steps are as follows:

[0269] Set sumofStatus1 to zero.

[0270] When maxNumofNumBits[k]≥1 and (sumofStatus1|1)≤maxNumBits[k], set ctxIdx=8, and decode to obtain BRemainder. i [k], and update sumofStatus1, i.e., sumofStatus1|=BRemainder i [k];

[0271] When maxNumofNumBits[k]≥2 and (sumofStatus1|2)≤maxNumBits[k], set ctxIdx=0, and decode to obtain BHalf. i In [k], b0 is updated, and sumofStatus1 is updated, i.e., sumofStatus1|=b0<<1;

[0272] When maxNumofNumBits[k]≥3 and (sumofStatus1|4)≤maxNumBits[k], set ctxIdx=1+b0, and decode to obtain BHalf. i In [k], b1 is updated, and sumofStatus1 is updated, i.e., sumofStatus1|=b1<<2;

[0273] When maxNumofNumBits[k]≥4 and (sumofStatus1|8)≤maxNumBits[k], set ctxIdx=3+b1+b0*2, and decode to obtain BHalf. i In [k], b2 is used to update sumofStatus1, i.e., sumofStatus1|=b2<<3;

[0274] When maxNumofNumBits[k]≥5 and (sumofStatus1|16)≤maxNumBits[k], set ctxIdx=7, and decode to obtain BHalf. i In [k], b3 is added, and sumofStatus1 is updated, i.e., sumofStatus1|=b3<<4;

[0275] Set ctxIdx = 9, and decode to obtain ResRemainder i [k].

[0276] The minimum number of encoded bits B in dimension k is obtained from sumofStatus1. i [k] = sumofStatus1;

[0277] Based on the minimum number of encoded bits Bi [k], obtained by bitwise encoding of ResRemainder i [k] and ResHalf i [k];

[0278] According to ResRemainder i [k] and ResHalf i [k], calculate the absolute value of the first residual in dimension k: absRes i [k] = (ResHalf) i [k] << 1) + ResRemainder i [k].

[0279] Update dimension k to another dimension until the absolute values ​​of the residuals of the three dimensions are decoded, and then complete the decoding of the absolute value of the first residual.

[0280] Step F500: Select feasible residual directions from all possible residual directions;

[0281] Step F600: Renumber all vertices corresponding to feasible residual directions to obtain the maximum number value;

[0282] Step F700: Based on the maximum number value, decode to obtain the residual direction of the first residual;

[0283] Step F800: Combine the absolute value of the first residual with the direction of the first residual to obtain the first residual;

[0284] Step F900: Obtain the coordinates of the vertex to be decoded based on the coordinates of the preceding vertex and the first residual.

[0285] Specifically, the details of steps F500 to F900 can be found in steps E300 to E700, and will not be repeated here.

[0286] In summary, this embodiment takes into account that when encoding the absolute value of the residual, the number of bits corresponding to the maximum absolute value of the residual in each dimension of each prediction tree often does not reach 31, and most absolute values ​​of the residual do not even need to be encoded with 5 bits. By pre-encoding the maximum absolute value of the residual in each dimension of each prediction tree, the amount of data during residual encoding is reduced, thereby improving encoding efficiency.

[0287] It should be noted that the above three encoding and decoding embodiments can be combined to form various combined encoding and decoding methods.

[0288] Exemplary device

[0289] Corresponding to the above-described point cloud geometric coding method based on prediction trees, this embodiment of the invention also provides a point cloud geometric coding device based on prediction trees, the device comprising:

[0290] The data acquisition module is used to acquire the first residual from the vertex to be encoded to the preceding vertex of the vertex to be encoded;

[0291] An absolute value encoding module is used to encode the absolute value of the first residual; or, based on the absolute value of the first residual, obtain the minimum number of encoding bits; encode the minimum number of encoding bits bit-by-bit by constructing a context model to enhance the linkage performance between encoded and unencoded bits; encode the absolute value of the first residual according to the minimum number of encoding bits; or, traverse the prediction tree, obtain the maximum value of the minimum number of encoding bits in each dimension based on the absolute value of the residuals of every two adjacent vertices in the prediction tree; obtain the minimum number of encoding bits according to the minimum number of bits of the maximum value; encode the maximum value bit-by-bit in all dimensions using the context model; obtain the minimum number of encoding bits based on the absolute value of the first residual; encode the minimum number of encoding bits with the maximum value and the minimum number of encoding bits as upper limits; encode the absolute value of the first residual with the minimum number of encoding bits, the maximum value, and the minimum number of encoding bits as references.

[0292] The residual direction encoding module is used to obtain the second residual from the previous vertex to the parent vertex of the previous vertex; perform a bitwise XOR operation on each possible residual direction with the direction of the second residual to obtain several relative residual directions; based on the relative residual directions, filter out feasible residual directions from all possible residual directions; renumber all vertices corresponding to feasible residual directions to obtain a maximum number value; encode the residual direction of the first residual based on the maximum number value; or, filter out feasible residual directions from all possible residual directions; renumber all vertices corresponding to feasible residual directions to obtain a maximum number value; and encode the residual direction of the first residual based on the maximum number value.

[0293] Corresponding to the above-described point cloud geometric decoding method based on prediction trees, this embodiment of the invention also provides a point cloud geometric decoding device based on prediction trees, the device comprising:

[0294] The residual absolute value decoding module is used to decode the point cloud code stream to obtain the absolute value of the first residual from the vertex to be decoded to its predecessor vertex; or, to decode the point cloud code stream to obtain the minimum number of encoded bits for the vertex to be decoded; based on the minimum number of encoded bits, to decode and obtain the absolute value of the first residual from the vertex to be decoded to its predecessor vertex; or, to decode the point cloud code stream to obtain the maximum number of minimum encoded bits for each dimension of the prediction tree; to obtain the minimum number of encoded bits based on the minimum number of bits of the maximum value; to obtain the minimum number of encoded bits based on the minimum number of encoded bits and the maximum value; and to decode and obtain the absolute value of the first residual from the vertex to be decoded to its predecessor vertex based on the minimum number of encoded bits, the minimum number of encoded bits, and the maximum value.

[0295] A residual direction decoding module is used to obtain a second residual from the preceding vertex to the parent vertex of the preceding vertex; perform a bitwise XOR operation on each possible residual direction with the direction of the second residual to obtain several relative residual directions; based on the relative residual directions, filter out feasible residual directions from all possible residual directions; renumber all vertices corresponding to feasible residual directions to obtain a maximum number value; and decode to obtain the residual direction of the first residual based on the maximum number value; or, it is used to filter out feasible residual directions from all possible residual directions; renumber all vertices corresponding to feasible residual directions to obtain a maximum number value; and decode to obtain the residual direction of the first residual based on the maximum number value.

[0296] The vertex coordinate module is used to combine the absolute value of the first residual with the residual direction of the first residual to obtain the first residual; and to obtain the coordinates of the vertex to be decoded based on the coordinates of the preceding vertex and the first residual.

[0297] Specifically, in this embodiment, the specific functions of each module of the above-mentioned point cloud geometric encoding device and point cloud geometric decoding device based on prediction trees can be referred to the corresponding descriptions in the above-mentioned point cloud geometric encoding method and point cloud geometric decoding method based on prediction trees, and will not be repeated here.

[0298] Based on the above embodiments, the present invention also provides a smart terminal. For example... Figure 5As shown, the aforementioned intelligent terminal includes a processor, memory, network interface, and display screen connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and a prediction tree-based point cloud geometry decoding program or a prediction tree-based point cloud geometry encoding program. The network interface is used to communicate with external terminals via a network connection. The internal memory provides an environment for the operation of the operating system and the prediction tree-based point cloud geometry decoding or encoding program stored in the non-volatile storage medium. When the prediction tree-based point cloud geometry encoding program is executed by the processor, it implements the steps of the prediction tree-based point cloud geometry encoding method; when the prediction tree-based point cloud geometry decoding program is executed by the processor, it implements the steps of the prediction tree-based point cloud geometry decoding method.

[0299] This invention also provides a computer-readable storage medium storing a point cloud geometric decoding program or a point cloud geometric encoding program based on a prediction tree. When the point cloud geometric encoding program based on a prediction tree is executed by a processor, it implements the steps of any one of the point cloud geometric encoding methods based on a prediction tree provided in this invention. When the point cloud geometric decoding program based on a prediction tree is executed by a processor, it implements the steps of any one of the point cloud geometric decoding methods based on a prediction tree provided in this invention.

[0300] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

Claims

1. A method for point cloud geometry coding based on prediction tree, characterized in that, The method comprises: obtaining a first residual of a to-be-encoded vertex to a previous vertex of the to-be-encoded vertex; encoding an absolute value of the first residual; obtaining a second residual of the previous vertex to a parent vertex of the previous vertex; performing bitwise XOR operation on each possible residual direction and a direction of the second residual respectively to obtain a plurality of relative residual directions; screening feasible residual directions from all possible residual directions based on the relative residual directions; re-numbering all vertices corresponding to the feasible residual directions to obtain a maximum number value; encoding a residual direction of the first residual based on the maximum number value.

2. The method of point cloud geometry coding based on prediction tree, characterized in that, Comprise: obtaining a first residual of a to-be-encoded vertex to a previous vertex of the to-be-encoded vertex; obtaining a minimum coding bit number based on an absolute value of the first residual; performing bitwise coding on the minimum coding bit number by constructing a context model enhancing linkage performance between coded bits and uncoded bits; encoding the absolute value of the first residual according to the minimum coding bit number; screening feasible residual directions from all possible residual directions; re-numbering all vertices corresponding to the feasible residual directions to obtain a maximum number value; encoding a residual direction of the first residual based on the maximum number value.

3. A method for point cloud geometry coding based on prediction tree, characterized in that, Comprise: traversing a prediction tree to obtain a maximum value of a minimum coding bit number in each dimension according to absolute values of residuals of each adjacent two vertices in the prediction tree; obtaining a minimum coding bit number according to the minimum bit number of the maximum value; performing bitwise coding on the maximum value of all dimensions by using a context model; obtaining a first residual of a to-be-encoded vertex to a previous vertex of the to-be-encoded vertex; obtaining a minimum coding bit number based on an absolute value of the first residual; encoding the minimum coding bit number with the maximum value and the minimum coding bit number as upper limits; encoding the absolute value of the first residual with the minimum coding bit number, the maximum value and the minimum coding bit number as references; screening feasible residual directions from all possible residual directions; re-numbering all vertices corresponding to the feasible residual directions to obtain a maximum number value; encoding a residual direction of the first residual based on the maximum number value.

4. A method for point cloud geometry decoding based on a prediction tree, characterized in that, Comprise: decoding a point cloud code stream to obtain an absolute value of a first residual of a to-be-decoded vertex to a previous vertex of the to-be-decoded vertex; obtaining a second residual of the previous vertex to a parent vertex of the previous vertex; performing bitwise XOR operation on each possible residual direction and a direction of the second residual respectively to obtain a plurality of relative residual directions; screening feasible residual directions from all possible residual directions based on the relative residual directions; re-numbering all vertices corresponding to the feasible residual directions to obtain a maximum number value; and decoding and obtaining a residual direction of the first residual based on the maximum number value; combining the absolute value of the first residual and the residual direction of the first residual to obtain the first residual; obtaining coordinates of the to-be-decoded vertex according to coordinates of the previous vertex and the first residual.

5. A method for point cloud geometry decoding based on a prediction tree, characterized in that, Comprise: Decoding a point cloud code stream to obtain a minimum encoding bit number of a to-be-decoded vertex; Based on the minimum encoding bit number, decoding to obtain an absolute value of a first residual of the to-be-decoded vertex to a previous vertex of the to-be-decoded vertex; Screening feasible residual directions from all possible residual directions; Re-numbering all vertices corresponding to the feasible residual directions to obtain a maximum number value; Based on the maximum number value, decoding to obtain a residual direction of the first residual; Combining the absolute value of the first residual and the residual direction of the first residual to obtain a first residual; Obtaining coordinates of the to-be-decoded vertex according to coordinates of the previous vertex and the first residual.

6. A method for point cloud geometry decoding based on a prediction tree, characterized in that, Comprising: Decoding a point cloud code stream to obtain a maximum value of minimum encoding bit numbers in each dimension of a prediction tree; Obtaining a minimum encoding bit number according to the minimum bit number of the maximum value; Decoding to obtain a minimum encoding bit number according to the minimum encoding bit number and the maximum value; Based on the minimum encoding bit number, the minimum encoding bit number and the maximum value, decoding to obtain an absolute value of a first residual of a to-be-decoded vertex to a previous vertex of the to-be-decoded vertex; Screening feasible residual directions from all possible residual directions; Re-numbering all vertices corresponding to the feasible residual directions to obtain a maximum number value; Based on the maximum number value, decoding to obtain a residual direction of the first residual; Combining the absolute value of the first residual and the residual direction of the first residual to obtain a first residual; Obtaining coordinates of the to-be-decoded vertex according to coordinates of the previous vertex and the first residual.

7. A device for point cloud geometry coding based on a prediction tree, characterized in that, Comprising: A data acquisition module for acquiring a first residual of a to-be-encoded vertex to a previous vertex of the to-be-encoded vertex; An absolute value encoding module for encoding an absolute value of the first residual; Or, obtaining a minimum encoding bit number based on the absolute value of the first residual; Bit-by-bit encoding the minimum encoding bit number by constructing a context model for linking the performance between the encoded bits and the non-encoded bits; encoding the absolute value of the first residual according to the minimum encoding bit number; or, traversing the prediction tree to obtain a maximum value of minimum encoding bit numbers in each dimension according to the absolute values of the residuals of each adjacent two vertices in the prediction tree; obtaining a minimum encoding bit number according to the minimum bit number of the maximum value; bit-by-bit encoding the maximum value in all dimensions using a context model; obtaining a minimum encoding bit number based on the absolute value of the first residual; encoding the minimum encoding bit number with the maximum value and the minimum encoding bit number as the upper limit; encoding the absolute value of the first residual with the minimum encoding bit number, the maximum value and the minimum encoding bit number as the reference; The residual direction coding module is configured to obtain a second residual of the precursor vertex to a parent vertex of the precursor vertex; perform bitwise XOR operation on each possible residual direction and a direction of the second residual respectively to obtain a plurality of relative residual directions; filter feasible residual directions from all possible residual directions based on the relative residual directions; renumber all vertices corresponding to the feasible residual directions to obtain a maximum number value; and encode a residual direction of the first residual based on the maximum number value. Or, the residual direction coding module is configured to filter feasible residual directions from all possible residual directions; renumber all vertices corresponding to the feasible residual directions to obtain a maximum number value; and encode a residual direction of the first residual based on the maximum number value.

8. A device for decoding point cloud geometry based on a prediction tree, characterized by The residual absolute value decoding module is configured to decode a point cloud bitstream to obtain an absolute value of a first residual of a to-be-decoded vertex to a precursor vertex of the to-be-decoded vertex; or decode a point cloud bitstream to obtain a minimum number of coding bits of the to-be-decoded vertex; based on the minimum number of coding bits, decode to obtain the absolute value of the first residual of the to-be-decoded vertex to the precursor vertex of the to-be-decoded vertex; or decode a point cloud bitstream to obtain a maximum value of a minimum number of coding bits in each dimension of the prediction tree; obtain a minimum number of coding bits according to a minimum number of bits of the maximum value; obtain a minimum number of coding bits according to the minimum number of coding bits and the maximum value; and based on the minimum number of coding bits, the minimum number of coding bits and the maximum value, decode to obtain the absolute value of the first residual of the to-be-decoded vertex to the precursor vertex of the to-be-decoded vertex. The residual direction decoding module is configured to obtain a second residual of the precursor vertex to a parent vertex of the precursor vertex; perform bitwise XOR operation on each possible residual direction and a direction of the second residual respectively to obtain a plurality of relative residual directions; filter feasible residual directions from all possible residual directions based on the relative residual directions; renumber all vertices corresponding to the feasible residual directions to obtain a maximum number value; and decode to obtain a residual direction of the first residual based on the maximum number value; or, the residual direction decoding module is configured to filter feasible residual directions from all possible residual directions; renumber all vertices corresponding to the feasible residual directions to obtain a maximum number value; and decode to obtain a residual direction of the first residual based on the maximum number value. The vertex coordinate module is configured to combine the absolute value of the first residual and the residual direction of the first residual to obtain a first residual; and obtain a coordinate of the to-be-decoded vertex according to a coordinate of the precursor vertex and the first residual.

9. An intelligent terminal, characterized by The intelligent terminal comprises a memory, a processor, and a prediction tree-based point cloud geometry decoding program or a prediction tree-based point cloud geometry encoding program stored on the memory and executable on the processor, the prediction tree-based point cloud geometry encoding program, when executed by the processor, implements the steps of the prediction tree-based point cloud geometry encoding method according to any one of claims 1-3, and the prediction tree-based point cloud geometry decoding program, when executed by the processor, implements the steps of the prediction tree-based point cloud geometry decoding method according to any one of claims 4-6.

10. A computer readable storage medium, characterized in that, The computer readable storage medium stores a prediction tree-based point cloud geometry decoding program or a prediction tree-based point cloud geometry encoding program, the prediction tree-based point cloud geometry encoding program, when executed by the processor, implements the steps of the prediction tree-based point cloud geometry encoding method according to any one of claims 1-3, and the prediction tree-based point cloud geometry decoding program, when executed by the processor, implements the steps of the prediction tree-based point cloud geometry decoding method according to any one of claims 4-6.

Citation Information

Patent Citations

  • Point cloud coding method and device, electronic equipment, medium and program product

    CN113902844A

  • Predictive tree coding for point cloud coding

    US20210248785A1