Disclosure of Invention
In order to solve the problems in the prior art, the invention provides a point cloud geometric information interframe coding and decoding method. The technical problem to be solved by the invention is realized by the following technical scheme:
in a first aspect, the invention provides a point cloud geometric information interframe coding method, which includes:
acquiring a frame point cloud before a current frame point cloud as a reference frame point cloud of the current frame point cloud;
performing voxelization processing on the current frame point cloud to obtain the voxelized current frame point cloud;
respectively carrying out octree division on the current frame point cloud and the reference frame point cloud, and continuing octree division on sub-nodes obtained by division until leaf nodes are divided to obtain a first octree structure of the current frame point cloud and a second octree structure of the reference frame point cloud;
wherein the first octree structure comprises a plurality of nodes, each node corresponding to a reference node in the second octree structure;
aiming at each node to be coded in the first octree structure, acquiring the occupation situation of a corresponding reference node in the second octree structure;
for each node to be coded of the first octree structure, when the occupation situation of a reference node corresponding to the node to be coded is occupied, acquiring the occupation situation of a first neighbor node adjacent to the reference node;
determining a context model of the bit occupying code of the node to be coded based on the bit occupying situation of the first neighbor node;
and entropy coding the placeholder code of the node to be coded after the context model is determined to obtain a binary code stream.
Optionally, for each node to be encoded of the first octree structure, when the occupancy of the reference node corresponding to the node to be encoded is occupied, the step of obtaining the occupancy of the first neighbor node adjacent to the reference node includes:
for each node to be coded of the first octree structure, when the occupancy condition of a reference node corresponding to the node to be coded is occupied, the occupancy condition of a first neighbor node coplanar with the reference node is obtained.
Optionally, before the step of acquiring, for each node to be encoded of the first octree structure, a first neighbor node adjacent to a reference node when an occupancy of the reference node corresponding to the node to be encoded is occupied, the point cloud geometric information interframe coding method further includes:
judging whether a reference node corresponding to a node to be coded is occupied or not aiming at each node to be coded of the first octree structure, if not, acquiring the occupation condition of a second neighbor node which is any one or combination of coplanarity, collinearity and coplanarity with the node to be coded and coplanarity with a father node of the node to be coded;
and determining a context model of the bit occupying code of the node to be coded based on the bit occupying situation of the second neighbor node.
Optionally, before the step of determining the context model of the node-to-be-encoded bit-occupying code based on the bit-occupying situation of the first neighboring node, the point cloud geometric information interframe coding method further includes:
acquiring the occupation situation of a second neighbor node which is coplanar, collinear or concurrent with the node to be coded and is coplanar or combined with a father node of the node to be coded;
the step of determining the context model of the node occupation code to be coded based on the occupation situation of the first neighbor node comprises:
and determining a context model of the occupation code of the node to be coded based on the occupation situations of the first neighbor node and the second neighbor node.
Optionally, before the step of determining the context model of the node-to-be-encoded bit-occupying code based on the bit-occupying situation of the first neighboring node, the point cloud geometric information interframe coding method further includes:
acquiring the occupation situation of a third neighbor node which is coplanar, collinear and concurrent with the reference node corresponding to the node to be coded;
forming a set of the occupation conditions of the third neighbor nodes;
optionally selecting a first preset number of elements in the set as target elements;
the step of determining the context model of the occupation code of the node to be coded based on the occupation situation of the first neighbor node comprises the following steps:
and determining a context model of the node occupation code to be coded based on the target element.
Optionally, after the step of optionally selecting a preset number of elements in the set as target elements, the point cloud geometric information interframe coding method further includes:
optionally selecting a second preset number of elements from the target elements, and taking the second preset number of elements as elements for determining the same context model;
wherein the first preset number is greater than the second preset number;
the step of determining the context model of the node occupation code to be coded based on the target element comprises the following steps:
determining a context model of the node-to-be-encoded bit-occupying code based on a second number of target elements.
Optionally, after the step of obtaining the occupancy of the first neighboring node coplanar with the reference node, the point cloud geometric information interframe coding method further includes:
acquiring the position information of the first neighbor node;
the step of determining the context model of the node occupation code to be coded based on the occupation situation of the first neighbor node comprises the following steps:
and determining a context model of the occupation code of the node to be coded based on the position information and the occupation situation of the first neighbor node.
In a second aspect, the invention provides a point cloud geometric information interframe decoding method, which includes:
receiving a binary code stream;
the binary code stream comprises a node occupation code to be decoded;
for each node to be decoded, when the occupancy of the reference node corresponding to the node to be decoded is occupied, acquiring the occupancy of a first neighbor node adjacent to the reference node;
determining a context model of the occupation code of the node to be decoded based on the occupation situation of the first neighbor node;
and entropy decoding the placeholder of the node to be decoded after the context model is determined.
Optionally, for each node to be decoded of the first octree structure, when the occupancy of the reference node corresponding to the node to be decoded is occupied, the step of obtaining the occupancy of the first neighbor node adjacent to the reference node includes:
for each node to be decoded of the first octree structure, when the occupancy of the reference node corresponding to the node to be decoded is occupied, the occupancy of a first neighbor node coplanar with the reference node is acquired.
Optionally, before the step of acquiring, for each node to be decoded of the first octree structure, a first neighbor node adjacent to a reference node when an occupancy of the reference node corresponding to the node to be decoded is occupied, the point cloud geometric information interframe decoding method further includes:
judging whether a reference node corresponding to a node to be decoded is occupied, if not, acquiring the occupation condition of a second neighbor node which is any one or combination of coplanarity, collinearity and coplanarity with the node to be decoded and coplanarity with a father node of the node to be decoded;
and determining a context model of the occupation code of the node to be decoded based on the occupation situation of the second neighbor node.
The embodiment of the invention provides a point cloud geometric information interframe coding method, which comprises the steps of obtaining a frame point cloud before a current frame point cloud as a reference frame point cloud; respectively carrying out octree division on the current frame point cloud and the reference frame point cloud, then dividing the divided nodes, and finishing iterative division until leaf nodes are reached to obtain a first octree structure of the current frame point cloud and a second octree structure of the reference frame point cloud; acquiring the occupation situation of each reference node; when the occupation situation of the reference node corresponding to the coding node is occupied, acquiring the occupation situation of a first neighbor node of the reference node; and determining a context model of the occupation code of the node to be coded based on the occupation situation, and carrying out entropy coding according to the context model to obtain a binary code stream. The invention uses the context model of the interframe to carry out entropy coding when the interframe prediction occupies, otherwise uses the context model of the intraframe to carry out entropy coding, and does not need motion compensation, thereby reducing the complexity of interframe coding and decoding and improving the performance of geometric entropy coding.
The present invention will be described in further detail with reference to the accompanying drawings and examples.
Detailed Description
The present invention will be described in further detail with reference to specific examples, but the embodiments of the present invention are not limited thereto.
Example one
Referring to fig. 3, in the interframe technique in the AVS encoding process, with the point cloud geometric information interframe encoding method provided by the embodiment of the present invention, the current frame point cloud can be interframe predicted before entropy encoding, and then entropy encoding is performed.
As shown in fig. 4, a point cloud geometric information interframe coding method provided in the embodiment of the present invention includes:
s1a, acquiring a frame point cloud before a current frame point cloud as a reference frame point cloud of the current frame point cloud;
the frame point cloud before the current frame point cloud may be a previous frame point cloud of the current frame point cloud, or one frame of previous N frame point clouds, which is not limited herein.
S2a, performing voxelization processing on the current frame point cloud to obtain the voxelized current frame point cloud;
s3a, respectively carrying out octree division on the current frame point cloud and the reference frame point cloud, and continuing octree division on the sub-nodes obtained by division until leaf nodes are divided to obtain a first octree structure of the current frame point cloud and a second octree structure of the reference frame point cloud;
wherein the first octree structure comprises a plurality of nodes, each node corresponding to a reference node in the second octree structure;
s4a, aiming at each node to be coded of the first octree structure, acquiring the occupation situation of the corresponding reference node in the second octree structure;
s5a, aiming at each node to be coded of the first octree structure, when the occupation situation of the reference node corresponding to the node to be coded is occupied, acquiring the occupation situation of a first neighbor node adjacent to the reference node;
referring to fig. 5, the left side of fig. 5 is a reference frame, the right side of fig. 5 is a current frame, a node to be encoded in the current frame is a gray block, a reference node corresponding to the node to be encoded in the reference frame is also a gray block, and a blank block is a first neighbor node.
S6a, determining a context model of the occupation code of the node to be coded based on the occupation situation of the first neighbor node;
and S7a, entropy coding the placeholder code of the node to be coded after the context model is determined, and obtaining a binary code stream.
As an optional implementation manner of the present invention, after obtaining the binary code stream, the probability distribution corresponding to the context model assigned to the placeholder pair of the node to be coded may be updated.
It can be understood that after the context is allocated each time, the probability distribution corresponding to the context may change, so that updating the probability distribution of the context can improve the accuracy of allocating the context to the node bit occupying code to be encoded, thereby improving the performance of encoding.
Referring to fig. 6, the execution process may be:
(1) firstly, a part of memory can be opened up to store reconstructed point cloud obtained from the previous frame as a reference frame of the current frame point cloud and is marked as pointcloudPred;
(2) quantizing the current frame point cloud to obtain a current frame quantized point cloud which is marked as pointcloudQua;
(3) the current frame quantization point cloud pointcloudQua and the reference frame point cloud pointcloudPred are respectively subjected to octree division to obtain occupation codes of the octree which are respectively recorded as occupancy and occupancy Pred, each bit of the 8-bit occupation code is respectively recorded as Oi and OPi, and the 8-bit occupation codes of the current point cloud and the reference point cloud are respectively stored in a hash table, so that neighbor information can be conveniently found for nodes later.
(4) Judging whether the current node meets the isolated point coding scheme, if so, directly making the occupancy be 0, entering the coding (5), then coding the relative coordinates of the isolated point, and if not, directly entering the coding (5).
(5) If OPi is equal to 1, namely the ith sub-node of the current block of the reference frame is occupied, searching occupation information of the reference frame node (shown in figure 4) corresponding to the coplanar neighbor node coded by the current sub-node Oi, calculating 4 conditions of 0-3 of the occupied neighbor node, assuming that 4 corresponding contexts are ctx _ interPresect [4], each context corresponds to a probability distribution, selecting the probability distribution corresponding to the context by using the occupation condition of the neighbor node, entropy coding the ith sub-node occupation code Oi of the current block of the current frame based on the selected probability distribution, and updating the probability distribution corresponding to the selected context based on the Oi; if OPi is equal to 0, namely the ith sub-node of the current block of the reference frame is not occupied, entropy coding the ith sub-node occupied bit code Oi of the current block of the current frame by using 191 contexts in the original frame, wherein one context corresponds to one probability distribution, and updating the probability distribution corresponding to the selected context based on Oi.
The embodiment of the invention provides a point cloud geometric information interframe coding method, which comprises the steps of obtaining a frame point cloud before a current frame point cloud as a reference frame point cloud; respectively carrying out octree division on the current frame point cloud and the reference frame point cloud, then dividing the divided nodes, and finishing iterative division until leaf nodes are reached to obtain a first octree structure of the current frame point cloud and a second octree structure of the reference frame point cloud; acquiring the occupation situation of each reference node; when the occupation situation of the reference node corresponding to the coding node is occupied, acquiring the occupation situation of a first neighbor node of the reference node; and determining a context model of the occupation code of the node to be coded based on the occupation situation, and carrying out entropy coding according to the context model to obtain a binary code stream. The invention uses the context model of the interframe to carry out entropy coding when the interframe prediction occupies, otherwise uses the context model of the intraframe to carry out entropy coding, and does not need motion compensation, thereby reducing the complexity of interframe coding and decoding and improving the performance of geometric entropy coding.
Example two
As an optional embodiment of the present invention, for each node to be encoded in the first octree structure, when the occupancy of the reference node corresponding to the node to be encoded is occupied, the step of acquiring the occupancy of the first neighbor node adjacent to the reference node includes:
for each node to be coded of the first octree structure, when the occupancy condition of a reference node corresponding to the node to be coded is occupied, the occupancy condition of a first neighbor node coplanar with the reference node is obtained.
EXAMPLE III
As an optional embodiment of the present invention, before the step of acquiring, for each node to be encoded of the first octree structure, a first neighbor node adjacent to a reference node when an occupancy of the reference node corresponding to the node to be encoded is occupied, the point cloud geometric information interframe coding method further includes:
step a: judging whether a reference node corresponding to a node to be coded is occupied or not aiming at each node to be coded of the first octree structure, if not, acquiring the occupation condition of a second neighbor node which is any one or combination of coplanarity, collinearity and coplanarity with the node to be coded and coplanarity with a father node of the node to be coded;
step b: and determining a context model of the bit occupying code of the node to be coded based on the bit occupying situation of the second neighbor node.
Example four
As an optional embodiment of the present invention, before the step of determining the context model of the node-to-be-encoded placeholder code based on the placeholder condition of the first neighboring node, the point cloud geometric information interframe coding method further includes:
acquiring the occupation situation of a second neighbor node which is coplanar, collinear or concurrent with the node to be coded and is coplanar or combined with a father node of the node to be coded;
the step of determining the context model of the node occupation code to be coded based on the occupation situation of the first neighbor node comprises:
and determining a context model of the occupation code of the node to be coded based on the occupation situations of the first neighbor node and the second neighbor node.
It is understood that, in this embodiment, intra-frame and inter-frame are not separately used, but context between intra-frame and inter-frame is used in combination, and may be combined into context or context, considering both intra-frame information and inter-frame information. In the above interframe scheme, there are 4 contexts between frames, and 191 contexts in a frame, and then there are 4 × 191-764 contexts.
EXAMPLE five
As an optional embodiment of the present invention, before the step of determining the context model of the node-to-be-encoded placeholder code based on the placeholder condition of the first neighboring node, the point cloud geometric information interframe coding method further includes:
step a: acquiring the occupation situation of a third neighbor node which is coplanar, collinear and concurrent with the reference node corresponding to the node to be coded;
step b: forming a set of the occupation conditions of the third neighbor nodes;
step c: optionally selecting a preset number of elements in the set as target elements;
step d: the step of determining the context model of the occupation code of the node to be coded based on the occupation situation of the first neighbor node comprises the following steps:
step e: and determining a context model of the node occupation code to be coded based on the target element.
As shown in fig. 7 to 9, the embodiment of the present embodiment that the reference node has 6 coplanar neighbors, 12 collinear neighbors and 8 concurrent neighbors changes the way of finding the neighbors, and not only finds the reference frame node corresponding to the coplanar node encoded by the current child node Oi. Since all the information between frames can be obtained at the encoding and decoding ends, all the coplanarity, collinearity and collinearity points of the OPi corresponding to the Oi node can be searched for, and the total 26 neighbor nodes or the subset of the 26 neighbor nodes can be searched for.
EXAMPLE six
As an optional embodiment of the present invention, after the step of optionally selecting a preset number of elements in the set as target elements, the point cloud geometric information interframe coding method further includes:
optionally selecting a second preset number of elements from the target elements, and taking the second preset number of elements as elements for determining the same context model;
wherein the first preset number is greater than the second preset number;
the step of determining the context model of the node occupation code to be coded based on the target element comprises the following steps:
determining a context model of the node-to-be-encoded bit-occupying code based on a second number of target elements.
It can be understood that, the step (5) in the embodiment is modified to map the occupied numbers and the corresponding contexts of the nodes, instead of mapping each occupied number and corresponding to one context, several occupied numbers and corresponding to one context may be mapped, for example, if the occupied neighbors in the main scheme are 1 and 2, the same context is used for encoding, and then one context may be reduced, and only 3 contexts are used.
EXAMPLE seven
As an optional embodiment of the present invention, after the step of obtaining the occupancy of the first neighboring node coplanar with the reference node, the point cloud geometric information interframe coding method further includes:
acquiring the position information of the first neighbor node;
the step of determining the context model of the node occupation code to be coded based on the occupation situation of the first neighbor node comprises the following steps:
and determining a context model of the occupation code of the node to be coded based on the position information and the occupation situation of the first neighbor node.
It is understood that the occupancy is occupied or unoccupied, the position information includes the position of the first neighboring node relative to the reference node, the occupancy is arranged and combined with the position information, and the number of the context models is expanded to a geometric multiple.
The advantages of the coding method provided by the present invention are verified by experimental data below. The size of the encoded code stream can be reduced without changing the geometric PSNR (PSNR is an objective standard for image evaluation, and the larger the PSNR is, the better the quality of the image) as shown in the following table, a BD-rate (BD-rate is a parameter for measuring the performance and the better the performance when the BD-rate is negative) of the reconstructed point cloud under the condition of C1 (geometric damage and attribute damage), on the basis of which the performance becomes better, the larger the absolute value of BD-rate is, the higher the gain of the performance) and the bpp under the condition of C4 (geometric damage and attribute damage) is (bpp is used for measuring the size of the code stream under the condition of damage, and the smaller the absolute value is, the better the performance is, on the basis of which the smaller the gain is). The results of testing the geometric information of a part of multi-frame point cloud sequences on an AVS platform under the conditions of C1 (geometric loss and attribute loss) and C4 (geometric loss and attribute loss) are shown in tables 1 and 2:
TABLE 1 comparison of the Performance of the encoding method of the present invention with that of the existing AVS Point cloud encoding technique under the condition of C1
| Sequence name | BD-rate(D1) | BD-rate(D1_H) |
| ford_01 | -5.1% | -5.1% |
| ford_02 | -3.1% | -3.1% |
| ford_03 | -1.5% | -1.5% |
TABLE 1 comparison of the Performance of the encoding method of the present invention with that of the existing AVS Point cloud encoding technique under the condition of C4
| Sequence name | bpp |
| ford_01 | 97.1% |
| ford_02 | 98.0% |
| ford_03 | 98.7% |
Example eight
Referring to fig. 10, an interframe technique is performed in the AVS decoding process, thereby obtaining an interframe decoding method for point cloud geometric information according to an embodiment of the present invention.
As shown in fig. 11, a point cloud geometric information interframe decoding method provided in the embodiment of the present invention includes:
s1b, receiving a binary code stream;
the binary code stream comprises a node occupation code to be decoded;
s2b, aiming at each node to be decoded, when the occupation situation of the reference node corresponding to the node to be decoded is occupied, acquiring the occupation situation of a first neighbor node adjacent to the reference node;
s3b, determining a context model of the node occupation code to be decoded based on the occupation situation of the first neighbor node;
and S4b, entropy decoding the placeholder of the node to be decoded after the context model is determined.
Example nine
As an optional embodiment of the present invention, for each node to be decoded of the first octree structure, when the occupancy of the reference node corresponding to the node to be decoded is occupied, the step of acquiring the occupancy of the first neighbor node adjacent to the reference node includes:
for each node to be decoded of the first octree structure, when the occupancy of the reference node corresponding to the node to be decoded is occupied, the occupancy of a first neighbor node coplanar with the reference node is acquired.
Example ten
As an optional embodiment of the present invention, before the step of acquiring, for each node to be decoded of the first octree structure, a neighboring node adjacent to a reference node when an occupancy of the reference node corresponding to the node to be decoded is occupied, the point cloud geometric information interframe decoding method further includes:
step a: judging whether a reference node corresponding to a node to be decoded is occupied, if not, acquiring the occupation condition of a second neighbor node which is any one or combination of coplanarity, collinearity and coplanarity with the node to be decoded and coplanarity with a father node of the node to be decoded;
step b: and determining a context model of the occupation code of the node to be decoded based on the occupation situation of the second neighbor node.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.
The foregoing is a more detailed description of the invention in connection with specific preferred embodiments and it is not intended that the invention be limited to these specific details. For those skilled in the art to which the invention pertains, several simple deductions or substitutions can be made without departing from the spirit of the invention, and all shall be considered as belonging to the protection scope of the invention.