WO2021196038A1 - 点云的编解码方法和装置 - Google Patents

点云的编解码方法和装置 Download PDF

Info

Publication number
WO2021196038A1
WO2021196038A1 PCT/CN2020/082608 CN2020082608W WO2021196038A1 WO 2021196038 A1 WO2021196038 A1 WO 2021196038A1 CN 2020082608 W CN2020082608 W CN 2020082608W WO 2021196038 A1 WO2021196038 A1 WO 2021196038A1
Authority
WO
WIPO (PCT)
Prior art keywords
sub
layer
block
code stream
blocks
Prior art date
Application number
PCT/CN2020/082608
Other languages
English (en)
French (fr)
Inventor
李璞
郑萧桢
Original Assignee
深圳市大疆创新科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市大疆创新科技有限公司 filed Critical 深圳市大疆创新科技有限公司
Priority to PCT/CN2020/082608 priority Critical patent/WO2021196038A1/zh
Priority to CN202080004105.8A priority patent/CN112514397A/zh
Publication of WO2021196038A1 publication Critical patent/WO2021196038A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/597Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding specially adapted for multi-view video sequence encoding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/96Tree coding, e.g. quad-tree coding

Definitions

  • This application relates to the coding and decoding field, and more specifically, to a point cloud coding and decoding method and device.
  • a point cloud (or three-dimensional point cloud) is a form of expression of a three-dimensional object or scene. It is composed of a set of discrete points that are randomly distributed in space and express the spatial structure and surface properties of the three-dimensional object or three-dimensional scene. In order to reduce the bandwidth occupied by point cloud data storage and transmission, it is necessary to encode and compress the point cloud data.
  • the coding process of the point cloud includes the coding of the position coordinates of the point cloud points in the point cloud and the coding of the attribute information of the point cloud points.
  • the present application provides a point cloud coding and decoding method and device, which can improve the efficiency and performance of point cloud coding and decoding compared with the prior art.
  • a method for encoding a point cloud including: determining a first subtree of the point cloud after being divided by a multi-tree, wherein the next layer of at most two sub-blocks of the first sub-tree is The number of blocks is greater than N, the number of sub-blocks of the next layer of other sub-blocks is less than or equal to N, each sub-block of the first sub-tree includes point cloud points, and N is a positive integer determined according to the multi-tree division method;
  • the first subtree is encoded in a depth-first target encoding manner to form a first code stream of the first subtree.
  • a method for decoding a point cloud including: receiving a first code stream; and decoding the first code stream using a depth-first target decoding mode to obtain a first subtree of the point cloud after being divided by a multi-tree ; Wherein, the number of sub-blocks in the next layer of at most two sub-blocks in the first sub-tree is greater than N, the number of sub-blocks in the next layer of other sub-blocks is less than or equal to N, each of the first sub-tree Each sub-block includes point cloud points.
  • a point cloud encoding device including a processor configured to determine a first subtree after the point cloud is divided by a multitree, wherein at most two sub-blocks of the first subtree are The number of sub-blocks of the next sub-block is greater than N, and the number of sub-blocks of the other sub-blocks is less than or equal to N.
  • Each sub-block of the first sub-tree includes point cloud points, and N is based on the multi-tree A positive integer determined by the division mode; the first subtree is coded using the depth-first target coding mode to form the first code stream of the first subtree.
  • a point cloud decoding device including a processor, the processor is configured to: receive a first code stream; use a depth-first target decoding mode to decode the first code stream to obtain a point cloud through a multi-tree The first sub-tree after division; wherein the number of sub-blocks in the next layer of at most two sub-blocks in the sub-blocks of the first sub-tree is greater than N, and the number of sub-blocks in the next layer of other sub-blocks is less than or equal to N, Each sub-block of the first sub-tree includes point cloud points.
  • a computer storage medium is provided with a computer program stored thereon, and when the computer program is executed by a computer, the computer executes the method provided in the first aspect or the second aspect.
  • a computer program product containing instructions that, when executed by a computer, cause the computer to execute the method provided in the first aspect or the second aspect.
  • the value N is determined according to the coding division mode, and the number of sub-blocks in the next layer of most sub-blocks in the first sub-tree does not exceed N, and the depth-first coding mode is adopted for this first sub-tree.
  • Encoding instead of using the breadth-first encoding method to encode it, can not be limited to the fixed encoding bits caused by the division method, and reduce the encoding bits of the sub-blocks in the first subtree, thereby saving the bit stream and improving the point cloud compression Efficiency and point cloud decoding speed.
  • adopting the depth-first encoding method can get rid of the strict requirements of the breadth-first encoding method for the encoding order, which is beneficial to the parallelization of point cloud encoding and reduces the complexity of point cloud encoding and decoding.
  • Fig. 1 is a schematic diagram of a point cloud data encoding process according to an embodiment of the present application.
  • Figure 2 is a schematic diagram of an initialization space for point cloud coding.
  • Fig. 3 is a schematic diagram of an octree encoding according to an embodiment of the present application.
  • Fig. 4 is a schematic diagram of the initialization space of another point cloud coding.
  • Fig. 5 is a schematic diagram of several quadtree division modes according to embodiments of the present application.
  • Fig. 6 is a schematic diagram of several binary tree division methods according to embodiments of the present application.
  • Fig. 7 is a schematic diagram of a multi-tree encoding according to an embodiment of the present application.
  • Fig. 8 is a schematic diagram of a point cloud data decoding process according to an embodiment of the present application.
  • Fig. 9 is a schematic flow chart of a point cloud coding method according to an embodiment of the present application.
  • 10 to 14 are schematic structural diagrams of first subtrees with several symmetrical structures according to embodiments of the present application.
  • FIG. 15 is a schematic flowchart of another point cloud encoding method according to an embodiment of the present application.
  • Fig. 16 is a schematic diagram of a position index of a sub-block after octree division according to an embodiment of the present application.
  • FIG. 17 and FIG. 18 are schematic diagrams of the structure of the first subtree with two symmetric structures according to an embodiment of the present application.
  • Fig. 19 is a schematic flow chart of another point cloud coding method according to an embodiment of the present application.
  • Fig. 20 is a schematic flow chart of another point cloud coding method according to an embodiment of the present application.
  • Fig. 21 is a schematic flow chart of another point cloud coding method according to an embodiment of the present application.
  • FIG. 22 is a schematic flowchart of another point cloud encoding method according to an embodiment of the present application.
  • FIG. 23 is a schematic flowchart of a point cloud decoding method according to an embodiment of the present application.
  • FIG. 24 is a schematic flowchart block diagram of another point cloud decoding method according to an embodiment of the present application.
  • FIG. 25 is a schematic flowchart of another point cloud decoding method according to an embodiment of the present application.
  • FIG. 26 is a schematic flowchart of another point cloud decoding method according to an embodiment of the present application.
  • FIG. 27 is a schematic flowchart block diagram of another point cloud decoding method according to an embodiment of the present application.
  • FIG. 28 is a schematic flowchart diagram of another point cloud decoding method according to an embodiment of the present application.
  • Fig. 29 is a schematic block diagram of a point cloud encoding device according to an embodiment of the present application.
  • Fig. 30 is a schematic block diagram of a point cloud decoding device according to an embodiment of the present application.
  • the embodiments of the present application can be applied to standard or non-standard point cloud codecs.
  • standard or non-standard point cloud codecs For example, the digital audio and video coding standard (AVS) standard encoder.
  • AVS digital audio and video coding standard
  • the size of the sequence number of each process does not mean the order of execution.
  • the execution order of each process should be determined by its function and internal logic, and should not correspond to the embodiments of the present application.
  • the implementation process constitutes any limitation.
  • the point cloud is a collection of discrete points that express the spatial distribution of the target and the characteristics of the target surface in the same spatial reference coordinate system, that is, after obtaining the spatial coordinates of each sampling point on the surface of the object, the collection of sampling points obtained is called a point Cloud (Point Cloud).
  • Point Cloud point Cloud
  • a large number of discrete points are usually required to characterize the objects in the three-dimensional space.
  • the discrete points in the point cloud are referred to as point cloud points.
  • Fig. 1 shows a schematic diagram of a point cloud data encoding process provided by the present application.
  • Point cloud data usually includes location information and attribute information of multiple point cloud points in the point cloud.
  • the position coordinates of the point cloud point can be used to describe the position of the point cloud point in the three-dimensional space.
  • the attribute information of the point cloud point may include, for example, the color information of the point cloud point, and may also include other information such as the reflectivity of the point cloud point.
  • the point cloud data can be encoded to compress the amount of point cloud data.
  • the position information coding and attribute information coding of the point cloud points are usually carried out separately.
  • the position information coding method of the point cloud point includes:
  • Coordinate translation and quantification translate and quantify the position coordinates of multiple point cloud points in the point cloud.
  • a geometric quantization method is used to process the position coordinates of the point cloud points.
  • the process of geometric quantification can be carried out in the following manner, for example: First, according to the position coordinates of multiple point cloud points in the Cartesian coordinate system, the position coordinates of multiple point cloud points in the three directions of x, y, and z can be obtained. The difference between the maximum value and the minimum value of, and the predetermined quantization precision, quantize the position coordinates of the multiple point cloud points to convert the position coordinates of the multiple point cloud points into integer coordinates greater than or equal to zero.
  • duplicate coordinates may be removed.
  • this step is an optional step, that is, this step can be performed to remove the position coordinates of the point cloud points that are repeated after quantization, or this step may not be performed, and the position coordinates of the quantized point cloud points can be directly performed. Octree encoding. And, it should be noted that if you choose to perform this step, while removing the repeated coordinates, the attributes corresponding to the point cloud points of the repeated coordinates need to be converted.
  • Multi-tree division In this step, the multi-tree division can be understood as any one or more of division methods among octree division, quadtree division, and binary tree division.
  • an octree division method is adopted to encode the position information of the point cloud points, and this process may also be referred to as octree encoding.
  • the complete octree division process includes multi-level octree division, where each level of octree division uses the coordinates of the center point of the current block for sub-block division, and the current block is divided into eight small blocks through the center point Sub-blocks of the same volume.
  • the position coordinates of a point cloud point can be the position coordinates of the point cloud point after geometric quantification and/or removal of duplicate coordinates
  • three direction dimensions x, y, z
  • the initialization space to be divided can be determined according to the selected quantization values.
  • the initialization space is usually a cube box as shown in Fig. 2.
  • the value of the side length of the cube box usually needs to meet the following conditions: the value of the side length is an integer power of 2, the value of the side length is greater than or equal to, and the closest multiple point cloud points in three directions
  • the maximum value among the maximum values of the position coordinates in the dimension is X max , Y max , and Z max , and X max is the maximum value among X max , Y max , and Z max, then The value of the side length is greater than or equal to and closest to X max .
  • the initialization space is then divided into multiple layers of octrees.
  • Each layer of octree division can use the position coordinates of the center point of the current block to divide the space, and divide the current block into eight sub-blocks of equal volume through the center point.
  • Fig. 2 shows the division result obtained after the initial division of the initialization space. It can be seen from Fig. 2 that the initialization space is evenly divided into 8 sub-blocks of equal volume.
  • the initialization space is the root node block, and these sub-blocks are the child node blocks of the root node, which are called the first-level child node blocks.
  • the child node block at this time is called the leaf node block of the current octree.
  • the threshold may be 1, for example.
  • the encoding can be performed layer by layer according to the breadth first search (BFS) of the octree.
  • BFS breadth first search
  • the division result of each octree can be coded layer by layer, that is, it is judged whether the eight sub-blocks obtained after the current sub-block is divided into the octree contain point cloud points. If a certain sub-block of the block contains point cloud points, the sub-block is further divided, otherwise the division is stopped.
  • Each box in the first layer, second layer, and third layer in Figure 3 can be represented as a sub-node block or sub-block, and the black square indicates that the sub-block contains points. Cloud point, the white square indicates that there is no cloud point in the sub-block.
  • the initial space (root node block) is divided into the first-level octree, and the division result as shown in Fig. 3 is obtained.
  • the third sub-node block in the first-level sub-node block in Figure 3 is a black square, and the remaining sub-node blocks are white squares, indicating that the third sub-block obtained by the initial space division contains point cloud points, and the remaining seven sub-blocks are not. Contains point cloud points.
  • the result of such division can be represented by 8 bits, such as 00100000.
  • the third sub-block obtained by the initial space division can be divided into the second-level octree division.
  • the third and eighth sub-node blocks in the second-level sub-nodes in Fig. 3 are black squares, indicating that the third and eighth sub-blocks of the eight sub-blocks obtained by the second-level octree division Contains point cloud points, therefore, the division result of the second-level octree division can be represented by 00100001.
  • the division results of the third-level octree division are 10010000 and 01000001.
  • the binary code stream corresponding to the division result in Figure 3 can be 0010 0000 0010 0001 1001 0000 0100 0001....
  • the subsequent octree partitioning method is similar to the octree partitioning method of the previous layers, and will not be described in detail here.
  • the last layer can be a layer with a sub-block side length of 1
  • it reaches the bottom of the octree, that is, reaches the leaf node block of the octree, no further Divide.
  • the number of point cloud points contained in the leaf node block of the octree can be coded. For example, when a leaf node block contains a point cloud point, you can directly encode a 0; when a leaf node block contains n point cloud points, you can first encode a 1 and then encode the value (n-1 ).
  • the octree coding is to quantize the point cloud points in the point cloud to a certain sub-block in the three-dimensional space through the above process, thereby achieving the compression of the point cloud data volume.
  • a quad-tree division method, a binary tree division method, or a multi-tree division method in which several division methods are mixed is also used to encode the position information of the point cloud point.
  • the initialization space determined according to the shape of the point cloud is the rectangular parallelepiped box shown in Figure 4.
  • the size of the rectangular parallelepiped box is (2 dx , 2 dy , 2 dz ), where dx ⁇ dy ⁇ dz, then quadtree division, binary tree division, or multi-tree division can be used for encoding.
  • the order of division in the initialization space can be determined according to the size of the initialization space and the two parameters K and M, where K(0 ⁇ K ⁇ max(d x ,d y ,d z )-min(d x ,d y ,d z )), M(0 ⁇ M ⁇ min(d x ,d y ,d z )).
  • K indicates that in the first K-level division, quadtree division or binary tree division is used, and M represents the minimum size of quadtree division and binary tree division, that is, the final M-level division must be octree division.
  • Figure 5 (a) to (c) shows the division result of a block space after quadtree division, as shown in Figure 5 (a), the block space is divided along the xy axis There are four sub-blocks, as shown in Figure 5 (b), the block space is divided into four sub-blocks along the xz axis, as shown in Figure 5 (c), the block space is divided along the yz axis For four sub-blocks.
  • Figures (a) to (c) in Figure 6 show the result of dividing a block space after binary tree division.
  • the block space is divided into two sub-spaces along the x-axis.
  • the block as shown in (b) in FIG. 5, divides the block space into two sub-blocks along the y-axis, and as shown in (c) in FIG. 5, divides the block space into two sub-blocks along the z-axis.
  • a mixed multi-tree division method can be used to divide the initialization space. As shown in Figure 7, based on the size of the initialization space, the initialization space of the 0th layer is divided into a binary tree. After the division, two sub-blocks of the first layer are obtained. Based on the size of the two sub-blocks of the first layer, it is judged that the quad tree is divided The method performs quadtree division on a sub-block including point cloud points in the first layer, and the four sub-blocks of the second layer are obtained after division.
  • the division method is judged to be an octet
  • two of the sub-blocks including point cloud points are divided by an octree to obtain eight sub-blocks in the next layer (layer 3).
  • the last layer can be a layer with a sub-block side length of 1
  • the bottom of the multi-tree that is, the multi-tree
  • the leaf node blocks of the fork tree do not need to be further divided.
  • the multiple sub-blocks divided by the multitree may be encoded layer by layer according to the breadth-first encoding order.
  • the sub-block adopts the quadtree division method it only needs to encode 4 bits for its encoding, which saves 4 bits compared to the octree division; if the binary tree division method is used for encoding, only 2 bits need to be encoded, which is more than 8 bits.
  • the fork tree division saves 6 bits.
  • the skipped bits can be guessed as 0 at the decoding end. For example, for the situation in Figure 7, the encoding result can be 10 0101 01010100 10010000....
  • the point cloud points in the point cloud are also quantized to a certain sub-block in the three-dimensional space, so as to achieve the compression of the point cloud data volume, and compared with the octree coding, the coding can be reduced. Bits to further improve the data compression effect.
  • Entropy coding Entropy coding the code stream after octree coding to obtain the geometric code stream of the point cloud, that is, the code stream of the position information of multiple point clouds in the point cloud.
  • the entropy coding method includes, but is not limited to, an adaptive binary arithmetic coding (context adaptive binary arithmetic coding, CABAC) entropy coding method, and any other entropy coding method in the prior art can also be used, which is implemented in this application The example does not limit this.
  • CABAC context adaptive binary arithmetic coding
  • the synchronization will compress and encode the corresponding attribute values according to the order of the position coordinates after the reconstruction of the multitree.
  • the attribute information encoding method of the point cloud point includes:
  • This step is an optional step, that is, the process of converting the color attributes of the point cloud points from RGB space to the YUV space. Specifically, the color attributes of the point cloud points can be spatially transformed through a conversion formula.
  • Attribute interpolation When the geometric information of the point cloud point (the number of points in the point cloud or the relative position of the point to the point) has changed, for example, the operation of removing duplicate points in the position information encoding is required to perform attribute interpolation. The process of recoloring.
  • recoloring is to calculate a new attribute value for each point in the reconstructed point cloud, so that the reconstructed point cloud and the original point cloud The attribute error is the smallest.
  • the realization process is as follows:
  • Step 2 For each point in the reconstructed point cloud Find the closest point P i * in the original point cloud, and set the attribute value of P i * to A i * .
  • Step 4 Reconstruct each point in the point cloud Calculate the reconstructed attribute value. If U(i) is empty, then directly assign A i * as the reconstructed attribute value to If U(i) is not empty, then reconstruct the attribute value of the point and the average value of all the points in U(i).
  • the calculation formula is as follows:
  • Morton code reordering method can be used to predict the point cloud point attributes. Firstly, the point cloud is reordered based on Morton code, and the point cloud sequence that can be used for point cloud attribute prediction is generated. In the attribute coding of the AVS standard, the Morton code is mainly calculated based on the Morton lookup table. The process is as follows:
  • Step 1 Traverse the geometry to reconstruct the point cloud to obtain the geometric coordinates x, y, and z corresponding to the current point.
  • Step 2 Find the Morton table according to the geometric coordinates to calculate the Morton code corresponding to the current point.
  • Step 3 Reorder the point cloud based on Morton code.
  • the sorted attribute values are predicted by using the preceding term difference, and the attribute residuals are obtained according to the predicted value and the original value. Then quantify the attribute residuals. Entropy coding the quantized coefficient value can get the attribute code stream.
  • differential prediction may also be used to perform prediction processing on the point cloud point attributes, which is not specifically limited in the embodiment of the present application.
  • FIG. 8 shows a schematic diagram of a decoding process provided by this application.
  • Entropy decoding After obtaining the input geometric code stream and attribute code stream, the decoding end uses the entropy decoding method corresponding to the entropy coding method of the encoding end to decode the code stream bit by bit.
  • the initialization space of the point cloud can be determined by the information after entropy decoding (the size of the initialization space can be written into the code stream by the encoder, and the decoder can obtain it from the code stream. ), and then divide the initialization space into a multi-tree.
  • the decoding end uses the same space division method as the encoding end to divide the initialization space.
  • the codec can perform multi-tree division on the initialization space.
  • the position coordinate data of the point cloud point to be inversely quantized is obtained through multiple sub-node blocks in the divided multi-tree and their corresponding binary bit streams.
  • Inverse quantization is the inverse process of quantization at the encoding end.
  • the position coordinate data to be inversely quantized after the reconstruction of the multi-branch tree is inversely quantized to obtain the quantized coordinates in the encoding end.
  • the attribute code stream undergoes entropy decoding and inverse quantization to obtain the attribute prediction residual value.
  • Attribute reconstruction Specifically, if the attribute prediction residual is obtained after inverse quantization, The current point attribute reconstruction value is The attribute reconstruction value of the previous point is The attribute reconstruction value of the current point After traversing all the point cloud points in the point cloud, the reconstructed point cloud output by the encoding end is obtained.
  • Inverse space transformation Corresponding to the space transformation at the encoding end, this step is also optional. If the attribute value after attribute reconstruction is the attribute value in the YUV space, the inverse space transformation is performed on it to obtain the attribute value in the RGB space.
  • the point cloud data can be obtained by combining the position information obtained by the above decoding and the corresponding attribute information.
  • this application proposes a point cloud coding and decoding method, which can reduce the bit position of the point cloud point position coding, avoid bit waste, and is not limited to a strict coding sequence, which is beneficial to reducing coding complexity and point cloud.
  • Parallel processing of encoding is not limited to a strict coding sequence, which is beneficial to reducing coding complexity and point cloud.
  • FIG. 9 to FIG. 28 may be executed by an encoding device or a decoding device.
  • the embodiments of the present application mainly relate to the encoding and decoding process of the position coordinates of multiple point cloud points in the point cloud. Therefore, the following description mainly focuses on the encoding and decoding process of the position coordinates of multiple point cloud points in the point cloud.
  • the encoding and decoding process of the attribute information of the point cloud please refer to the above-mentioned related description or related technology, which is not limited in the embodiment of the present application. .
  • Fig. 9 shows a schematic flow chart of a point cloud coding method 100.
  • the point cloud coding method 100 may include the following steps.
  • S110 Determine the first subtree after the point cloud is divided by the multitree, where the number of sub-blocks in the next layer of at most two sub-blocks in the first sub-tree is greater than N, and the number of sub-blocks in the next layer of the other sub-blocks is greater than N.
  • the number of blocks is less than or equal to N
  • each sub-block of the first sub-tree includes point cloud points
  • N is a positive integer determined according to the multi-tree division mode.
  • S120 Use a depth-first target encoding manner to encode the first subtree to form a first code stream of the first subtree.
  • multi-tree division is performed on the initialization space where the point cloud is located, and the tree structure of the point cloud after the multi-tree division is obtained, and multiple points are represented by the tree structure The location space of the cloud point.
  • the multitree division includes but is not limited to a simple division method, such as an octree division method, a binary tree division method, or a quadtree division method, or a binary tree division method. , Quadtree partition, octree partition, and even multi-tree partition with a mixture of other partitioning methods.
  • the embodiment of the present application does not limit the specific multi-tree division method.
  • octree division, quadtree division, binary tree division, and multi-tree division methods in which multiple division methods are mixed are all referred to as multi-tree division.
  • the tree structure obtained by dividing the initial space of the point cloud point by using the multi-tree division is generally composed of sub-blocks including point cloud points and sub-blocks not including point cloud points, but in the process of dividing each layer, we are only based on The sub-blocks including the point cloud points are further divided. Therefore, unless otherwise specified, the sub-blocks in the tree structure all refer to the sub-blocks including the point cloud points, and do not involve the sub-blocks that do not include the point cloud points.
  • the breadth-first coding method is generally used to encode the tree structure.
  • the root node initialization space
  • a new encoding mode is introduced, when encoding to the first sub-block in the tree structure , It is determined that the first sub-tree under the first sub-block meets the preset condition, then instead of using the breadth-first coding method to continue traversing the second sub-block after the first sub-block, it switches to the depth-first target Encoding mode, after encoding the root node block in the first subtree, that is, the first subblock, encode the next layer of the first subblock until the completion of the last layer of subblock in the first subtree Encoding, and then go back to the second sub-block after the first sub-block.
  • the first sub-block in the first sub-tree may be the initialization space block of the point cloud, or any sub-block after the initialization space block of the point cloud is divided.
  • the specific positions in the initialization space of the block and the first subtree are not limited.
  • Using the method of the embodiment of the present application can get rid of the strict requirements of the breadth-first coding method for the coding order, which is beneficial to the parallelization of point cloud coding and reduces the complexity of point cloud coding.
  • the preset condition of the first subtree in this application may be: the number of sub-blocks in the next layer of at most two sub-blocks in the sub-blocks of the first sub-tree is greater than N, and the number of sub-blocks in the next layer of other sub-blocks The number is less than or equal to N, where the next sub-block of the sub-block is the sub-block including point cloud points obtained after the current sub-block is divided.
  • each sub-block includes point cloud points, N It is a positive integer determined according to the multi-tree division method.
  • the corresponding bits will be encoded according to the division method, which will cause a large bit stream waste.
  • Bit position determine the value N, and make the number of sub-blocks of the next layer of most sub-blocks in the first sub-tree not exceed N, and the depth-first coding method is adopted in this application, according to the sub-blocks of the current sub-block Encode the current sub-block by the number, for example, encode the position index of the next-level sub-block.
  • the current sub-block can be reduced.
  • the encoding bits are saved, thereby saving the bit stream and improving the efficiency of point cloud compression.
  • N may be a positive integer less than or equal to 2.
  • the preset condition of the first sub-tree can be: the number of sub-blocks of the next layer of at most two sub-blocks in the sub-blocks of the first sub-tree is greater than 2, and the number of sub-blocks in the next layer of other sub-blocks The number of sub-blocks is less than or equal to 2.
  • the preset condition of the first subtree may be: the number of sub-blocks of the next layer of at most two sub-blocks in the sub-blocks of the first sub-tree is greater than 1, and the number of sub-blocks of the next layer of other sub-blocks The number is equal to 1.
  • the sub-block of the next layer of the sub-block is the sub-block including the point cloud point obtained after the current sub-block is divided, and each sub-block in the first sub-tree includes the point cloud point.
  • the coding method of the first subtree with a symmetric structure is explained.
  • one layer of the first subtree with a symmetric structure in one case, only one sub-block is included, and in another case, the next layer of multiple sub-blocks The number of sub-blocks is equal.
  • 10 to 14 show schematic diagrams of the structure of the first subtree with various symmetric structures.
  • the first subtree includes m layers of sub-blocks, and m is a positive integer greater than 1.
  • the first sub-block of the first sub-tree is located at the 0th level in the first sub-tree.
  • the number of sub-blocks at the next level of each sub-block in the m+1-th sub-block is 3, which does not meet the preset conditions of the first sub-tree in this application.
  • This m+1-th sub-block does not belong to the implementation of this application.
  • the next-level sub-blocks are more than 2, then the m+1-th layer sub-block does not belong to the embodiment of the present application.
  • the first subtree if there are more than two sub-blocks in the m+1-th layer sub-block, the next-level sub-blocks are more than 2, then the m+1-th layer sub-block does not belong to the embodiment of the present application.
  • the first subtree if there are more than two sub-blocks in the m+1-th layer sub-block, the next-level sub-blocks are more than 2, then the m+1-th layer sub-block does not belong to the embodiment of the present application.
  • the number of the first-level sub-blocks of each sub-block in the m-level sub-blocks of the first sub-tree is less than or equal to two.
  • the number of sub-blocks of the next layer of each sub-block in the first sub-block is two.
  • the number of sub-blocks in the next layer of some of the sub-blocks in the first sub-block is 2, and the number of sub-blocks of the next layer in the other partial sub-blocks is 1.
  • the number of sub-blocks of the next layer of each sub-block in the first sub-block is 1.
  • the number of sub-blocks at the next level of at most two sub-blocks in the first sub-tree is greater than 2, and the sub-blocks at the next level of at most two sub-blocks also belong to the sub-blocks of the first sub-tree.
  • the number of sub-blocks in the next level of the two sub-blocks in the first sub-tree is 3, and the sub-blocks of the next level are also sub-blocks in the first sub-tree.
  • the number of sub-blocks in the next level is 3.
  • the sub-block is not the last sub-block of the first sub-tree.
  • the number of sub-blocks in the next layer of only one sub-block is greater than 2, and the number of sub-blocks in the next layer of other sub-blocks is equal to one.
  • FIG. 15 shows a schematic flowchart of another encoding method 100.
  • step S110 may include the following steps.
  • S111 Determine the first subtree after the point cloud is divided by the multi-branch tree, where the number of sub-blocks in the next layer of at most two sub-blocks in the first sub-tree is greater than 2, and the number of sub-blocks in the next layer of the other sub-blocks is greater than 2.
  • the number of blocks is less than or equal to 2, and the first subtree has a symmetric structure.
  • the above step S120 may include the following steps.
  • S121 Encode the layer number information of the first subtree to form a layer code stream of the first subtree.
  • the layer number information is used to characterize whether the number of sub-blocks in the current layer has changed compared with the previous layer. Through the layer number information, the number of sub-blocks of each layer in the first sub-tree and the connection relationship between the sub-blocks of each layer and the sub-blocks of the previous layer are obtained.
  • the current layer is determined to be a special layer.
  • the current layer is determined to be a non-special layer if the number of sub-blocks in the current layer is inconsistent with the previous layer.
  • the second layer in Figure 14 the number of sub-blocks is inconsistent with the previous layer, then the second layer is a special layer, and the third layer in Figure 14 has the same number of sub-blocks as the previous layer. Then the third layer is a non-special layer.
  • the structure of the first sub-tree is shown in FIG. 12, and the number of sub-blocks in each layer is 1.
  • the layer number information of the first subtree is encoded to form the layer code stream of the first subtree.
  • the layer number m is encoded to form the first subtree.
  • the number of layers from the zeroth layer to the special layer of the first subtree, and the number of layers from the special layer to the last one in the first subtree are determined.
  • the number of layers between the layers is coded to form the layer code stream of the first subtree.
  • the layer number 1 between the 2 layers and the layer number m-3 between the 2nd layer and the m-th layer are encoded to form the layer bit stream of the first subtree.
  • the number of layers between the zeroth layer and the first layer of the first subtree, the number of layers between two adjacent special layers, and the last layer is coded to form the layer code stream of the first subtree.
  • the first and second layers there are two special layers, namely the first and second layers.
  • the other layers except the first and second layers are all non-special layers, in this case , Encode the number 0 between the 0th layer and the 1st layer, and the number 0 between the 1st layer and the 2nd layer, and the number m-3 between the 2nd layer and the mth layer. Encode to form the layer stream of the first subtree.
  • the layer value when encoding the number of layers, can be directly encoded, that is, the layer value can be directly binarized, and then the entropy encoding subsequent encoding process, for example, using the context model for encoding or using side-by-side encoding. Road coding.
  • the layer value in addition to directly encoding the layer value, can also be subtracted from the preset layer number to obtain the layer number difference, and the layer number difference can be coded.
  • the preset layer number It can be any positive integer preset.
  • the encoding end and the decoding end may agree on the preset number of layers.
  • the encoding end may also encode the preset number of layers and write it into the code stream, and the decoding end may decode the preset layer digital stream to obtain preset layer number information.
  • the preset number of layers It is assumed that the layer code stream is located in the geometric header code stream of the point cloud, or it can also be located in other positions of the point cloud code stream.
  • any binarization method in the prior art can be used to binarize the above-mentioned number of layers and the preset number of layers, and then perform the entropy encoding subsequent process to obtain the layered digital stream and the preset layered digital stream.
  • the binarization method includes, but is not limited to, a fixed-length code encoding method or a variable-length code encoding method.
  • the variable-length code coding method includes but is not limited to coding methods such as truncated Rice code, K-order exponential Golomb, unary code, and so on.
  • coding methods such as truncated Rice code, K-order exponential Golomb, unary code, and so on.
  • S122 Encode the position information of the sub-blocks in the first sub-tree to form an index code stream of the first sub-tree.
  • the layer code stream of the first subtree and the index code stream together form the first code stream of the first subtree, and the first code stream can characterize the structure of the first subtree, thereby characterizing the midpoint of the first subtree.
  • the spatial location information of cloud points are included in the layer code stream of the first subtree and the index code stream.
  • the position information of the sub-block in the first sub-tree may be characterized by a position index, that is, the relative position of the sub-block of the next layer in the current sub-block is indicated by the index number. Therefore, the position index of the next sub-block in each sub-block of each sub-block in the first sub-tree can be coded to form the index code stream of the first sub-tree.
  • the current sub-block is divided by octree division, then in the next layer of the current sub-block, there are a total of 8 sub-blocks including point cloud points and excluding point cloud points, which need to be indicated by the index number. The position of the next sub-block of the point cloud point in the current sub-block.
  • the position index of the current sub-block after the octree is divided as shown in the figure, and any position index from 0 to 7 can be represented by a 3bit code stream, thereby indicating the next layer including point cloud points
  • the position of the sub-block in the current sub-block does not need to be coded and identified for each sub-block including and excluding point cloud points after division.
  • a position index of the next-level sub-block in the current sub-block is encoded as 3 bits
  • a position index of the next-level sub-block in the current sub-block is coded as 2bit;
  • a position index of the next-level sub-block in the current sub-block is coded as 1 bit.
  • the index bit stream of the current sub-block is 6 bits.
  • encoding the current sub-block using a conventional method requires 8 bits. Therefore, the method of the embodiment of the present application can reduce the number of bits and improve the coding and decoding efficiency.
  • the current sub-block after the current sub-block is divided into a quad-tree, it can represent any position index from 0 to 3 through a 2bit code stream.
  • the current sub-block After the current sub-block is divided into a binary tree, it can represent any position index from 0 to 1 through a 1-bit code stream. . If the number of sub-blocks in the next layer of the current sub-block (including the sub-blocks of point cloud points) is 1, under the quadtree division and the binary tree division, the method of the embodiment of this application can also reduce the number of bits and improve Codec efficiency.
  • the number of sub-blocks in the next layer exceeds 2, but if the number of other sub-blocks in the first sub-tree is A layer of sub-blocks does not exceed 2, or even 1, even if there are sporadic sub-blocks with more coding bits, but the coding bits of other sub-blocks are greatly reduced, the overall coding bits of the first sub-tree can also be reduced. Digits to improve coding and decoding efficiency.
  • the current sub-block when performing position index coding on a sub-block of the next layer of the current sub-block, the current sub-block may be divided into blocks based on the following first rule:
  • next sub-block is divided by using the octree division method, and a position index of the next sub-block in the current sub-block is coded as 3bit;
  • next-level sub-block is divided by the quad-tree division method, and a position index of the next-level sub-block in the current sub-block is coded as 2bit;
  • a binary tree division method is used to divide the next sub-block, and a position index of the next sub-block in the current sub-block is coded as 1 bit.
  • the foregoing preset value may be the side length of the leaf node block, for example, it may be 1.
  • the current sub-block in addition to dividing the current sub-block based on the above-mentioned first rule, the current sub-block may also be divided based on other prior art rules, or according to other encoding and decoding ends.
  • An agreed rule, or a fixed division method may also be used to divide the current sub-block, which is not specifically limited in the embodiment of the present application.
  • the above-mentioned first rule is used to divide the sub-blocks in the first sub-tree; and if the first sub-tree is If the last layer of sub-blocks is not a leaf node block, the second rule can be used to divide the sub-blocks in the first sub-tree.
  • the second rule can be other sub-blocks in the point cloud except the first sub-tree The way of dividing.
  • the second rule may be the division method rule determined according to the conditions of Table 1 and Table 2 above, or the second rule may also be any other division method rule in the prior art.
  • the index code stream obtained by the above encoding is located after the layer code stream.
  • the layer number information is first encoded, that is, the layer number 1 between the 0th layer and the 2nd layer, and the layer number 1 between the 2nd layer and the mth layer are first encoded.
  • the number of layers m-3 is coded, and then the position index of the next sub-block of each sub-block in each sub-block is coded, that is, starting from the 0th layer, the first sub-block of the 0th layer is sequentially coded, and the first sub-block is 1 sub-block of the layer, 4 sub-blocks of the second layer, and 4 sub-blocks of each lower layer are subjected to position index coding to form the first code stream of the first sub-tree.
  • the position index of the sub-blocks of the next layer of the four sub-blocks in the same layer is the same in the four sub-blocks.
  • the 4 sub-blocks of layer 3 are in the 4 sub-blocks of layer 2 with the same position index
  • the 4 sub-blocks of layer 4 are in the 4 sub-blocks of layer 3 with the same position index, and so on, the i-th layer
  • the position indexes of the 4 sub-blocks in the 4 sub-blocks of the i-1th layer are the same, where 3 ⁇ i ⁇ m, and i is a positive integer.
  • each layer when performing position index coding on the sub-blocks of the second layer to the m-th layer, the same position index of the multiple sub-blocks of each layer is coded, specifically, in the position of the multiple sub-blocks of the second layer When the index is coded, multiple position indexes are no longer coded, but only one position index is coded. Similarly, from the 3rd layer to the mth layer, each layer only encodes one position index.
  • the position index of the sub-blocks of the next layer of the 6 sub-blocks in the same layer is the same in the 6 sub-blocks.
  • the position index of the i-th layer The position indexes of the 6 sub-blocks in the 6 sub-blocks of the i-1th layer are the same, where 3 ⁇ i ⁇ m-1, and i is a positive integer.
  • the same position index of the multiple sub-blocks of each layer may be coded when the position index coding of the sub-blocks from the second layer to the m-1th layer is performed.
  • Figs. 13 and 14 only exemplarily show part of the situation.
  • the number of sub-blocks in the two sub-blocks in the first layer in the second layer in Fig. 13 can also be 2, 3, or even 8.
  • Sub-blocks, or any other number of sub-blocks, similarly, the second layer in FIG. 14 may also include 2 sub-blocks, 3 sub-blocks, or even 8 sub-blocks, or any other number of sub-blocks.
  • the embodiment of the present application There is no restriction on this.
  • the position index of the sub-blocks of one layer in the multiple sub-blocks of each layer is the same position index, and the same position index of the multiple sub-blocks of each layer is encoded.
  • the number of coding bits can be further reduced, and the coding and decoding efficiency can be improved.
  • the encoding method of the first subtree with a symmetric structure is described above with reference to FIGS. 10 to 16, and the encoding method of the first subtree with the asymmetric structure is described below with reference to FIGS. 17 to 18.
  • the first sub-tree includes at least one asymmetric layer, and the number of sub-blocks in the next layer of different sub-blocks in the asymmetric layer is not equal.
  • Figures 17 to 18 show schematic structural diagrams of the first subtree with two symmetrical structures.
  • the first sub-tree includes m-level sub-blocks, and m is a positive integer greater than 1.
  • the first sub-block of the first sub-tree is located at the 0th level in the first sub-tree.
  • the number of sub-blocks at the next level of each sub-block in the m+1-th sub-block is 3, which does not meet the preset conditions of the first sub-tree in this application.
  • This m+1-th sub-block does not belong to the implementation of this application.
  • the number of the first-level sub-blocks of each sub-block in the m-level sub-blocks of the first sub-tree is less than or equal to two.
  • the number of sub-blocks in the next layer of some sub-blocks in the first sub-block is 2, and the number of sub-blocks in the next layer of the other partial sub-blocks is 1.
  • the first layer and the second layer are asymmetric layers, that is, the number of sub-blocks in the next layer of the two sub-blocks in the first layer is not consistent, and the number of sub-blocks in the next layer of the three sub-blocks in the second layer is not the same.
  • the other layers in the first subtree are all symmetrical layers, that is, in the symmetrical layer, the number of sub-blocks in the next layer of each sub-block is equal.
  • the number of sub-blocks at the next level of at most two sub-blocks in the first sub-tree is greater than 2, and the sub-blocks at the next level of at most two sub-blocks also belong to the sub-blocks of the first sub-tree.
  • the number of sub-blocks in the next layer of the two sub-blocks in the first sub-tree is 3, and the sub-blocks of the next layer are also sub-blocks in the first sub-tree.
  • the number of sub-blocks in the next layer The sub-block is not the last sub-block of the first sub-tree.
  • the first layer and the second layer are asymmetric layers, and the other layers except the first and second layers in the first subtree are all symmetrical layers.
  • the schematic diagrams of the structure of the first subtree are shown in two cases. It can be understood that the asymmetric structure of the first subtree in the embodiment of the present application includes but is not limited to the above Two structural schematic diagrams are shown, and the first subtree with an asymmetric structure and meeting preset conditions is within the protection scope of the present application.
  • FIG. 19 shows a schematic flowchart of another encoding method 100.
  • step S110 may include the following steps.
  • S112 Determine the first subtree after the point cloud is divided by the multitree, where the number of sub-blocks in the next layer of at most two sub-blocks in the first sub-tree is greater than 2, and the number of sub-blocks in the next layer of the other sub-blocks is greater than 2.
  • the number of blocks is less than or equal to 2, and the first subtree has an asymmetric structure.
  • the above step S120 may include the following steps.
  • S121 Encode the layer number information of the first subtree to form a layer code stream of the first subtree.
  • S123 Encode the grouping information of the asymmetric layer in the first subtree to form a grouping code stream of the first subtree.
  • S122 Encode the position information of the sub-blocks in the first sub-tree to form an index code stream of the first sub-tree.
  • step S121 and step S122 can be referred to the related description in FIG. 15, which will not be repeated here.
  • step S123 since in the embodiment of the present application, the first subtree has an asymmetric structure, it is necessary to encode the level information and position information of the first subtree, and also to encode the first subtree.
  • the grouping information of the asymmetric layer in the middle is encoded so that the decoding end can decode and obtain an accurate point cloud position structure.
  • step S123 before encoding the position index of the next sub-block of each sub-block in the asymmetric layer, the number of sub-blocks in the next sub-block of each sub-block in the asymmetric layer is performed.
  • Encoding reflects the grouping information of the asymmetric layer to form the grouping code stream of the first subtree.
  • the code is 1, if the number of sub-blocks of the next layer is 1, then the code is 0, and if the number of sub-blocks of the next layer is other values, then it can be Corresponding codes are other values, and the embodiment of the present application does not limit the specific coding manner.
  • the layer code stream of the first subtree, the index code stream of the first subtree, and the packet code stream together form the first code stream of the first subtree
  • the first code stream can be Characterize the structure of the first subtree, thereby characterizing the spatial position information of the point cloud points in the first subtree.
  • the layer code stream of the first subtree is located before the packet code stream of the first subtree, and the packet code stream of the first subtree is located before the index code stream.
  • the grouping information of the asymmetric layer is encoded first, and then the position information of the sub-blocks in the asymmetric layer is encoded.
  • the next layer number information is encoded, and the sequence is performed in this manner until the encoding of the first subtree is completed.
  • the coding sequence is as follows:
  • the layer number 0 between the 0th layer and the 1st layer is coded, and the position index of the first layer sub-block in the first sub-block is coded.
  • encode the number of layers 0 between the first layer and the second layer encode the number of sub-blocks of the two sub-blocks in the first layer, and encode the number of sub-blocks of the two sub-blocks in the first layer.
  • the position index of the block in the two sub-blocks is coded.
  • encode the number of layers 0 between the second layer and the third layer encode the number of sub-blocks in the next three sub-blocks in the second layer, and encode the number of sub-blocks in the next three sub-blocks in the second layer.
  • the position index of the block in the three sub-blocks is coded.
  • the position index of the sub-blocks of the next layer of the 5 sub-blocks located in the same layer in the 5 sub-blocks is the same.
  • the 5 sub-blocks of the 4th layer are in the 5 sub-blocks of the 3rd layer, with the same position index, and the 5 sub-blocks of the 5th layer are in the 5 sub-blocks of the 4th layer, and the position index is also the same, and so on, the i-th layer
  • the position indexes of the 5 sub-blocks in the 5 sub-blocks of the i-1th layer are the same, where 4 ⁇ i ⁇ m, and i is a positive integer.
  • the same position index of the multiple sub-blocks of each layer is coded, specifically, in the position of the multiple sub-blocks of the third layer
  • the index is coded, multiple position indexes are no longer coded, but only one position index is coded.
  • only one position index is coded for each layer.
  • the position index of the sub-blocks of one layer in the multiple sub-blocks of each layer is the same position index, and the same position index of the multiple sub-blocks of each layer is encoded.
  • the number of coding bits can be further reduced, and the coding and decoding efficiency can be improved.
  • FIG. 20 shows a schematic flowchart of another point cloud encoding method 100.
  • the point cloud coding method 100 may further include the following steps.
  • S130 Code other sub-blocks in the point cloud except the first sub-tree according to the breadth-first coding order.
  • the other sub-blocks in the point cloud except the first subtree are coded according to the breadth-first coding order.
  • the second subblock in the point cloud is coded.
  • the second subblock is located after the root node block of the first subtree.
  • each layer of sub-blocks in the tree structure after the point cloud is divided by the multi-tree division is sequentially coded.
  • the first sub-tree is skipped. Coding of sub-blocks in a sub-tree.
  • the tree structure of the point cloud may include multiple above-mentioned first subtrees.
  • the root node block of each first subtree may be switched to depth-first. In the traversal order, the sub-blocks in the first sub-tree are encoded first.
  • the above mainly describes the related coding process of the first subtree. Since the coding mode of the first subtree is different from the coding mode of other sub-blocks in the point cloud, it is necessary to encode the first subtree before coding the first subtree.
  • a subtree encoding method is used for identification, which is convenient for the decoding end to decode and obtain relevant information.
  • FIG. 21 shows a schematic flowchart of another point cloud encoding method 100.
  • the point cloud encoding method 100 may further include the following steps.
  • S140 Encode the first identifier to form a first identifier code stream, where the first identifier is used to identify the target encoding mode.
  • this step 140 may be performed before step S120, that is, after the first subtree is determined, the identifier that identifies the target encoding mode, that is, the first identifier is encoded.
  • the first identifier may be an identifier in any form, for example, it may be a number, a letter, or a character, which is not specifically limited in the embodiment of the present application.
  • the first identifier may be used to identify that the target encoding method is one of multiple depth-first encoding methods.
  • the depth-first encoding method includes, but is not limited to, the target encoding method in this application and the isolated encoding method. Point direct coding method.
  • the isolated point direct coding mode takes effect: 1.
  • the isolated point direct coding mode identifier in the geometric header information is 1; 2.
  • the current sub-block contains only one point cloud data Point; 3.
  • the sum of the number of Morton code bits to be coded for the points in the current sub-block is greater than twice the number in the direction of the minimum side length that has not reached the minimum side length; since the current sub-block contains only one point cloud point, the point is directly coded
  • the geometric coordinates of the cloud point correspond to the uncoded bits of the Morton code, which are specifically coded one by one in the order of x, y, and z, and the direction that has reached the minimum side length does not need to be coded.
  • the first identifier in the embodiment of the present application can be used to distinguish the target encoding method from other depth-first encoding methods.
  • the identifier used to identify the direct encoding method of isolated points is 0, and the first identifier used to identify the target encoding method in this application is 1.
  • the first identifier can not only be used to identify which of the multiple depth-first encoding methods the target encoding method is, but also can be used to identify which of all the encoding methods the target encoding method is.
  • any binarization method in the prior art may be used to perform binarization processing on the first identifier, and then perform the entropy encoding subsequent process to obtain the first identifier code stream.
  • the binarization method includes, but is not limited to, a fixed-length code encoding method or a variable-length code encoding method.
  • the variable-length code coding method includes but is not limited to coding methods such as truncated Rice code, K-order exponential Golomb, unary code, and so on.
  • coding methods such as truncated Rice code, K-order exponential Golomb, unary code, and so on.
  • the first identification code stream is located before the first code stream of the first subtree.
  • the first identification code stream may also be located in the geometric header code stream of the point cloud.
  • the first identifier can be used to identify in addition to the encoding method of the first subtree as the target encoding method.
  • the coding mode of other subtrees in the point cloud that meets the preset conditions is the target coding mode.
  • the first identification code stream may also be located before the first code stream and in the geometric header code stream at the same time.
  • the first identification code stream located in the geometric header code stream is used to identify the point cloud that can be coded by the target encoding method, and the first identification code stream located before the first code stream is used to identify the first sub-block
  • the encoding method is the target encoding method.
  • FIG. 22 shows a schematic flowchart of another point cloud encoding method 100.
  • the point cloud encoding method 100 may further include the following steps.
  • S150 Encode the second identifier to form a second identifier code stream, where the first identifier is used to identify that the encoding mode is switched from breadth first to depth first.
  • a second identifier may be added before the first identifier to identify that the coding mode is switched from breadth first to depth first.
  • the second identifier can be coded according to the division method. If it is an octree division, the second identifier can be coded as 8bit 0, if it is a quadtree division, the second identifier can be coded as 4bit 0, if When dividing the binary tree, the second identifier can be coded as 2bit 0.
  • the encoded second code stream is located before the first code stream.
  • the encoded second identification code stream is located before the above-mentioned first identification code stream.
  • FIG. 23 shows a schematic flowchart of a method 200 for decoding a point cloud.
  • the point cloud decoding method 200 may include the following steps.
  • S220 Use the depth-first target decoding mode to decode the first code stream to obtain the first subtree after the point cloud is divided by the multi-tree, and the sub-blocks of at most two sub-blocks in the sub-blocks of the first sub-tree The number of sub-blocks is greater than N, the number of sub-blocks of the next layer of other sub-blocks is less than or equal to N, and each sub-block of the first sub-tree includes point cloud points.
  • the first code stream may be the first code stream of the first subtree obtained by encoding using the point cloud encoding method 100 described above.
  • the first code stream after receiving the first code stream, the first code stream is decoded using the depth-first target decoding method, and the point cloud can be reconstructed after being divided by the multi-tree One of the first subtree structure.
  • N the number of sub-blocks of the next layer of at most two sub-blocks in the first sub-tree is greater than 2, while the number of sub-blocks of the next layer of other sub-blocks is less than or equal to 2, and In other cases, the number of sub-blocks in the next layer of at most two sub-blocks in the first sub-tree is greater than 1, and the number of sub-blocks in the next layer of other sub-blocks is equal to 1, where the number of sub-blocks The sub-block of the next layer is the sub-block including the point cloud point obtained after the current sub-block is divided. In the first sub-tree, each sub-block includes the point cloud point.
  • Using the method of the embodiment of the present application can get rid of the strict requirements of the breadth-first decoding method on the encoding order, which is beneficial to the parallelization of the point cloud decoding process and improves the decoding efficiency.
  • the encoding method of the encoding end for the first subtree can reduce the encoding bits of the first subtree, that is, reduce the length of the first code stream, the corresponding decoding method can also be used to quickly perform the encoding of the first code stream. Perform decoding to further improve decoding efficiency.
  • FIG. 24 shows a schematic flowchart of another point cloud decoding method 200.
  • the first code stream includes two parts of the layer code stream and the index code stream.
  • the first subtree obtained by decoding the first code stream has a symmetric structure.
  • step S220 may include the following steps.
  • S221 Decode the layer code stream in the first code stream to obtain the layer number information of the first subtree.
  • the layer number information in the first subtree can be obtained by decoding the layer code stream in the first code stream.
  • the layer number information obtained by decoding the layer code stream may directly be the layer value.
  • the layer number information obtained by decoding the layer code stream is the layer number difference value, and the difference value needs to be Add to the preset number of layers to restore the number of layers.
  • the preset number of layers is a value agreed upon by the encoding end and the decoding end.
  • the code stream of the point cloud includes the preset layer code stream.
  • the preset layer code stream may be located in the geometric header code stream of the point cloud, and the decoding end may decode from the geometric header code stream of the point cloud Obtain the information of the preset number of layers, or the preset layer digital stream can also be located in other positions of the point cloud code stream, and the decoding end can also decode the information of the preset number of layers from other positions of the point cloud code stream.
  • the number of sub-blocks in each layer in the first sub-tree is the same as that of the previous layer.
  • the layer code stream is decoded to obtain a layer value or layer number difference, and the layer value or layer number The difference can be used to get the number of levels of the first subtree.
  • the layer structure of the first subtree obtained by decoding can refer to FIG. 12 and the related description above.
  • the layer number information obtained by decoding is the layer value or the layer number difference between the zeroth layer of the first subtree and the special layer, and the special layer to the first subtree.
  • the layer structure of the first subtree obtained by decoding can refer to FIG. 14 and the related description above.
  • the layer number information obtained by decoding is the layer value or the layer number difference between the zeroth layer and the first layer special layer of the first subtree, and the two adjacent special layers The layer value or the layer number difference between and the layer value or the layer number difference between the last special layer and the last layer in the first subtree.
  • the layer structure of the first subtree obtained by decoding can refer to FIG. 13 and the related description above.
  • any binarization method in the prior art may be used to binarize the above-mentioned number of layers and the preset number of layers, and then perform the entropy decoding subsequent process to obtain a layered digital stream.
  • the binarization method includes, but is not limited to, a fixed-length code decoding method or a variable-length code decoding method.
  • the variable-length code decoding method includes, but is not limited to, truncated Rice code, K-order exponential Golomb, unary code and other decoding methods.
  • the fixed-length code decoding method and the variable-length code decoding method may correspond to the encoding method at the encoding end, and are agreed upon by the encoding section and the decoding end.
  • the fixed-length code decoding method and the variable-length code decoding method can be referred to in the prior art Related descriptions will not be repeated here.
  • S222 Decode the index code stream in the first code stream to obtain the position information of the sub-block in the first subtree.
  • the position information of the sub-block in the first subtree can be obtained by decoding the index code stream in the first code stream.
  • the index code stream is decoded to obtain the position index of the sub-block in the first sub-tree.
  • the sub-block of the next layer of each sub-block in the first sub-tree can be decoded to obtain the position index of each sub-block in each sub-block. Location index.
  • a position index of a sub-block of the next layer of the current sub-block is a 3bit stream
  • a position index of a lower-level sub-block of the current sub-block is a 2-bit stream. If the block division mode of the current sub-block is binary tree division, the position index of a lower-level sub-block of the current sub-block is a 1-bit stream.
  • the following first rule may be used to determine the division of sub-blocks in the first sub-tree:
  • a sub-block in the first sub-tree does not reach a preset value in three directions, perform octree division on the sub-block, and decode 3 bits to obtain a position index of a sub-block of the next layer in the sub-block;
  • a sub-block in the first sub-tree does not reach a preset value in two directions, perform quad-tree division on the sub-block, and decode 2 bits to obtain a position index of a sub-block of the next layer in the sub-block;
  • the sub-block is divided into a binary tree, and 1 bit is decoded to obtain a position index of a sub-block of the next layer in the sub-block.
  • the foregoing preset value may be the side length of the leaf node block, for example, it may be 1.
  • the division method of the current sub-block may also adopt the division method in the prior art, or according to other agreed division methods, or according to the fixed division method of the current sub-block.
  • the embodiment of the present application does not specifically limit this.
  • the above-mentioned first rule is used to divide the sub-blocks in the first sub-tree; and if the first sub-tree If the last sub-block of the tree is not a leaf node block, the second rule can be used to divide the sub-blocks in the first sub-tree.
  • the second rule is other sub-blocks in the point cloud except the first sub-tree. The way of dividing.
  • the second rule may be the division method rule determined according to the conditions of Table 1 and Table 2 above, or the second rule may also be any other division method rule in the prior art.
  • the index code stream in the first code stream is located after the layer code stream.
  • the layer code stream is decoded to obtain one or more layer values, and then the index code stream is decoded to obtain the sub-block of each sub-block in each layer.
  • the position index in the current sub-block thereby restoring the tree structure of the first sub-tree, that is, restoring the relevant information of the point cloud point position in the first sub-tree in the point cloud.
  • the layer number information is decoded to obtain two values of layer number 1 and layer number m-3, it means that the first subtree includes a special layer, and the special layer is located at the second layer, and the first subtree The tree includes a total of m layers. Except for the second layer, the other layers are non-special layers, that is, the number of sub-blocks in each layer in other layers is equal to the number of sub-blocks in the previous layer. Then, according to the layer number information, the subsequent index code stream is decoded to obtain the position index of the sub-block of the next layer of the sub-block in each layer in the current sub-block, so as to determine the position of the sub-block in each layer. In this case, the first subtree structure obtained by decoding the first bitstream can be seen in FIG. 14.
  • the same layer has multiple sub-blocks, but only one position index is obtained by decoding the index code stream of the sub-block of the same layer. At this time, the position indexes in the multiple sub-blocks of the same layer are the same position index.
  • the subsequent index code stream is decoded according to the layer number information, where the indexes from the 3rd layer to the mth layer
  • each layer has only one position index code stream
  • the position indexes of the multiple sub-blocks of the i-th layer in the multiple sub-blocks of the i-1th layer are the same, where , 3 ⁇ i ⁇ m, i is a positive integer.
  • the position index code stream the position of the sub-block in each layer is determined.
  • the first subtree structure obtained by decoding the first bitstream can be seen in FIG. 14, and in FIG. 14, in the third layer to the mth layer, the next layer of sub-blocks of 4 sub-blocks in each layer
  • the position index in the 4 sub-blocks in each layer is the same position index.
  • the next sub-block of the multiple sub-blocks of each layer is in each layer.
  • the position indexes in the multiple sub-blocks of the layer are the same position index, and the same position index of the multiple sub-blocks of each layer is decoded.
  • the first subtree obtained by decoding has a symmetric structure.
  • the preset condition of the first subtree is added to limit the first subtree to be a symmetric structure.
  • the first subtree structure obtained by decoding using the decoding method 200 in the embodiment of the present application includes, but is not limited to, the first subtree structure shown in FIG. 10 to FIG. 14, and may also have other symmetric structures and meet preset conditions.
  • the first subtree structure includes, but is not limited to, the first subtree structure shown in FIG. 10 to FIG. 14, and may also have other symmetric structures and meet preset conditions.
  • FIG. 25 shows a schematic flowchart of another method 200 for decoding a point cloud.
  • the first code stream includes three parts: the layer code stream, the index code stream, and the packet code stream of the asymmetric layer in the first subtree.
  • the first code stream obtained by decoding the first code stream The subtree is an asymmetric structure.
  • step S220 may include the following steps.
  • S221 Decode the layer code stream in the first code stream to obtain the layer number information of the first subtree.
  • S223 Decode the packet code stream in the first code stream to obtain the group information of the asymmetric layer in the first subtree.
  • S222 Decode the index code stream in the first code stream to obtain the position information of the sub-block in the first subtree.
  • step S221 and step S222 can be referred to the related description in FIG. 25, which will not be repeated here.
  • step S223 the packet code stream is decoded to obtain the grouping information of the asymmetric layer in the first subtree, that is, the number of sub-blocks in the next layer of each sub-block in the asymmetric layer is obtained by decoding.
  • the layer code stream of the first subtree is located before the packet code stream of the first subtree, and the packet code stream of the first subtree is located before the index code stream.
  • the first code stream after a part of the layer code stream, it is an index code stream, or after a part of the layer code stream, it is a packet code stream, and after the packet code stream is an index code stream.
  • the bits in the layer code stream, the block code stream, and the index code stream are scattered in the first code stream, rather than concentrated in a certain segment of the first code stream.
  • the decoding order is as follows:
  • Decode the layer code stream in the first code stream and get the number of layers between the 0th layer and the 1st layer to be 0, and decode the subsequent index code stream to obtain the sub-blocks of the first layer in the 0th layer.
  • the position index in the block is the position index in the block.
  • the layer code stream in the first code stream to obtain the layer number 0 between the first layer and the second layer
  • decode the subsequent packet code stream to obtain the next two sub-blocks in the first layer
  • the number of layer sub-blocks, and then the subsequent index code stream is decoded to obtain the position index of the next layer sub-block of the two sub-blocks in the first layer in the two sub-blocks.
  • the layer code stream in the first code stream to obtain the layer number 0 between the second layer and the third layer
  • decode the subsequent packet code stream to obtain the next three sub-blocks in the second layer
  • the number of layer sub-blocks, and then the subsequent index code stream is decoded to obtain the position index of the next layer sub-block of the three sub-blocks in the second layer in the three sub-blocks.
  • the same layer has multiple sub-blocks, but only one position index is obtained by decoding the index code stream of the sub-block of the same layer. At this time, the position indexes in the multiple sub-blocks of the same layer are the same position index.
  • each layer has only one position index code stream, it is determined to be in From the 3rd layer to the mth layer, the position indexes of the multiple sub-blocks of the i-th layer in the multiple sub-blocks of the i-1th layer are the same, where 3 ⁇ i ⁇ m, and i is a positive integer.
  • the position index code stream the position of the sub-block in each layer is determined.
  • the next layer of sub-blocks of 4 sub-blocks in each layer has 4 sub-blocks in each layer.
  • the position index in the block is the same position index.
  • the next sub-block of the multiple sub-blocks of each layer is in each layer.
  • the position indexes in the multiple sub-blocks of the layer are the same position index, and the same position index of the multiple sub-blocks of each layer is decoded.
  • the first subtree obtained by decoding has an asymmetric structure.
  • the preset conditions of the first subtree are added to limit the first subtree to have an asymmetric structure.
  • the encoding method in Figure 19 above and the decoding method in Figure 25 are used.
  • the first subtree structure obtained by decoding using the decoding method 200 in the embodiment of the present application includes, but is not limited to, the first subtree structure shown in FIG. 17 to FIG. 18, and may also have other asymmetric structures and meet preset conditions.
  • the first subtree structure includes, but is not limited to, the first subtree structure shown in FIG. 17 to FIG. 18, and may also have other asymmetric structures and meet preset conditions.
  • FIG. 26 shows a schematic flowchart of another method 200 for decoding a point cloud.
  • the point cloud decoding method 200 may further include the following steps.
  • S230 Receive the second code stream, and decode the second code stream in a breadth-first decoding manner to obtain other sub-blocks in the point cloud except the first sub-tree.
  • the second code stream is first decoded to obtain the second sub-block in the point cloud.
  • the second sub-block is located after the root node block of the first sub-tree.
  • the above mainly describes the relevant decoding process of the first code stream. Since the decoding method of the first code stream is different from the decoding method of the code stream in the point cloud, the relevant identification code needs to be decoded before the first code stream is decoded. The stream is decoded to obtain relevant information about the decoding mode of the first code stream.
  • FIG. 27 shows a schematic flowchart of another method 200 for decoding a point cloud.
  • the point cloud decoding method 200 may further include the following steps.
  • S240 Receive a first identification code stream, and decode the first identification code stream to obtain a first identifier, where the first identifier is used to identify a target encoding method, and the target encoding method is an encoding method corresponding to the target decoding method.
  • this step 240 can be performed before step S210, that is, before receiving the first code stream, the first identification code stream is received, and the first identification code stream is decoded to obtain a subsequent pair of the first code stream.
  • the decoding method can be performed before step S210, that is, before receiving the first code stream, the first identification code stream is received, and the first identification code stream is decoded to obtain a subsequent pair of the first code stream.
  • the first identifier obtained by decoding may be an identifier in any form, for example, it may be a number, a letter, or a character, which is not specifically limited in the embodiment of the present application.
  • the first identifier may be used to identify that the target encoding method is one of multiple depth-first encoding methods.
  • the depth-first encoding method includes, but is not limited to, the target encoding method in this application and the isolated encoding method. Point direct coding method.
  • the first identifier in the embodiment of the present application can be used to distinguish the target encoding method from other depth-first encoding methods.
  • the identifier used to identify the direct encoding method of isolated points is 0, and the first identifier used to identify the target encoding method in this application is 1.
  • the first identifier can not only be used to identify which of the multiple depth-first encoding methods the target encoding method is, but also can be used to identify which of all the encoding methods the target encoding method is.
  • any binarization decoding method in the prior art may be used to perform binarization decoding processing on the first identification code stream, and then perform the entropy decoding subsequent process to obtain the first identification.
  • the binarization decoding method includes, but is not limited to, a fixed-length code decoding method or a variable-length code decoding method.
  • the variable-length code decoding method includes, but is not limited to, truncated Rice code, K-order exponential Golomb, unary code and other decoding methods.
  • the fixed-length code decoding method and the variable-length code decoding method may correspond to the encoding method at the encoding end, and are agreed upon by the encoding section and the decoding end.
  • the fixed-length code decoding method and the variable-length code decoding method can be referred to in the prior art Related descriptions will not be repeated here.
  • the first identification code stream is located before the first code stream of the first subtree.
  • the first identification code stream may also be located in the geometric header code stream of the point cloud.
  • the first identifier can be used to identify in addition to the encoding method of the first subtree as the target encoding method.
  • the coding mode of other subtrees in the point cloud that meets the preset conditions is the target coding mode.
  • the first identification code stream may also be located before the first code stream and in the geometric header code stream at the same time.
  • the first identification code stream located in the geometric header code stream is used to identify the point cloud that can be coded by the target encoding method, and the first identification code stream located before the first code stream is used to identify the first sub-block
  • the encoding method is the target encoding method.
  • FIG. 28 shows a schematic flowchart of another point cloud decoding method 200.
  • the point cloud decoding method 200 may further include the following steps.
  • S250 Receive a second identification code stream, and decode the second identification code stream to obtain a second identifier, where the second identifier is used to identify that the encoding mode is switched from breadth first to depth first.
  • a second identification code stream may be received, and the second identification code stream can be decoded to obtain a second identifier, which is used to identify that the encoding mode is switched from breadth first to depth priority.
  • the second identification code stream can be decoded according to the division method.
  • the second identification code stream In the case of octree division, the second identification code stream is 8bit 0, and in the case of quadtree division, the second identification code stream is 4bit 0 If it is a binary tree division, the second identification code stream is 2bit 0.
  • the second identification code stream is located before the above-mentioned first code stream.
  • the second identification code stream is located before the above-mentioned first identification code stream.
  • FIG. 29 is a schematic block diagram of a point cloud encoding device 10 according to an embodiment of the present application.
  • the point cloud encoding device 10 corresponds to the point cloud encoding method 100.
  • the point cloud encoding device 10 includes: a processor 11 and a memory 12;
  • the memory 12 may be used to store programs, and the processor 11 may be used to execute the programs stored in the memory to perform the following operations: determine the first sub-tree after the point cloud is divided by the multi-tree, where the sub-blocks of the first sub-tree The number of sub-blocks in the next layer of at most two sub-blocks is greater than N, and the number of sub-blocks in the next layer of other sub-blocks is less than or equal to N.
  • Each sub-block of the first sub-tree includes point cloud points, and N is based on the A positive integer determined by the multi-tree division mode; the first subtree is coded using the depth-first target coding mode to form the first code stream of the first subtree.
  • the processor 11 may be a processor or a controller of an electronic device where the encoding apparatus 10 of the point cloud is located.
  • the multitree division includes one or more of octree division, quadtree division, and binary tree division, and N ⁇ 2.
  • the first subtree has a symmetric structure, and one level of the first subtree includes only one subblock, or the number of subblocks of the next level of multiple subblocks in a level is the same.
  • the processor 11 is configured to: encode the layer number information of the first subtree and the position information of the subblocks in the first subtree to form the first subtree of the first subtree. Code stream.
  • the processor 11 is configured to: if the first subtree does not include a special layer, encode the number of layers of the first subtree to form the layer number in the first code stream. Flow; or,
  • the first subtree includes a special layer, the number of layers between the zeroth layer and the first layer of the first subtree, the number of layers between two adjacent special layers, and the last special layer
  • the number of layers between the last layer in the first subtree is encoded to form the layer code stream in the first code stream; wherein, the number of sub-blocks in the special layer and the number of sub-blocks in the previous layer are Inconsistent.
  • the processor 11 is configured to: subtract the preset number of layers from the number of layers to obtain a layer number difference, and encode the layer number difference to form a layer in the first code stream. Digital stream.
  • the processor 11 is configured to: use a fixed-length code encoding manner or a variable-length code encoding manner to encode the layer number difference to form the layered bitstream in the first bitstream.
  • the processor 11 is further configured to encode the preset number of layers to form a preset layer digital stream, and the preset layer digital stream is located in the geometric header code stream of the point cloud.
  • the processor 11 is configured to: encode the position index in each sub-block of the next sub-block of each sub-block in the first sub-tree to form the first code stream.
  • the index code stream is configured to: encode the position index in each sub-block of the next sub-block of each sub-block in the first sub-tree to form the first code stream.
  • the processor 11 is configured to: if an octree division method is adopted to divide a sub-block in the first sub-tree to obtain a next-level sub-block, the next-level sub-block is in the next sub-block.
  • a position index in the sub-block is coded as 3 bits;
  • a quadtree division method is adopted to divide a sub-block in the first sub-tree to obtain a sub-block of the next layer, a position index of a sub-block of the next layer in the sub-block is encoded as 2 bits;
  • a position index of a sub-block of the next layer in the sub-block is coded as 1 bit.
  • the processor 11 is configured to: if the last sub-block in the first sub-tree is a leaf node block, divide each sub-block in the first sub-tree based on a first rule, Get the next sub-block of each sub-block;
  • the last sub-block in the first sub-tree is not a leaf node block, divide each sub-block in the first sub-tree based on the second rule to obtain the next sub-block of each sub-block;
  • the first rule and the second rule are used to determine the division mode of each sub-block in the first sub-tree.
  • the processor 11 is configured to: if a sub-block in the first sub-tree does not reach a preset value in three directions, use an octree division method to divide the sub-block to obtain The next sub-block;
  • the one sub-block in the first sub-tree does not reach a preset value in two directions, the one sub-block is divided by a quad-tree division method to obtain the next-level sub-block;
  • a binary tree division method is adopted to divide the sub-block to obtain a sub-block of the next layer.
  • the first sub-tree includes a special layer
  • the next layer of the multiple sub-blocks in each layer is The position indexes in the multiple sub-blocks of each layer are the same position index
  • the processor 11 is configured to: encode the same position index of the sub-blocks of the multiple sub-blocks of each layer at the same position in the multiple sub-blocks of each layer from the special layer to the last layer of the first sub-tree.
  • the index code stream in the first code stream is formed.
  • the position index of the sub-block of the next layer of the multiple sub-blocks of each layer in the multiple sub-blocks of each layer is the same position index
  • the processor 11 is used to: between two special layers in the first subtree, or between the last special layer and the last layer of the first subtree, the next layer of multiple sub-blocks in each layer
  • the sub-block is coded at the same position index in the multiple sub-blocks of each layer.
  • the layer code stream is located before the index code stream.
  • the number of sub-blocks in the next layer of each sub-block in the first sub-tree is less than or equal to two.
  • the number of sub-blocks of the next layer of only one sub-block in the first sub-tree is equal to 2
  • the number of sub-blocks of the next layer of other sub-blocks is equal to 1.
  • the number of sub-blocks in the next layer of each sub-block in the first sub-tree is equal to one.
  • the number of sub-blocks at the next level of at most two sub-blocks in the first sub-tree is greater than 2, and the sub-blocks at the next level of the at most two sub-blocks are sub-blocks of the first sub-tree .
  • the number of sub-blocks of the next layer of only one sub-block in the first sub-tree is greater than 2, and the number of sub-blocks of the next layer of other sub-blocks is equal to one.
  • the first subtree has an asymmetric structure
  • the first subtree includes at least one asymmetric layer
  • the numbers of the next layer of subblocks of different subblocks in the asymmetric layer are not equal .
  • the processor 11 is configured to: information about the number of layers of the first subtree, position information of subblocks in the first subtree, and information about the asymmetric layer in the first subtree
  • the grouping information is encoded to form the first code stream of the first subtree.
  • the processor 11 is configured to: the number of layers from the zeroth layer to the first special layer of the first subtree, the number of layers between two adjacent special layers, and The number of layers from the last special layer to the last layer in the first subtree is coded to form the layer digital stream in the first code stream; wherein, the number of sub-blocks in the special layer is greater than that of the upper layer The number of neutron blocks is inconsistent.
  • the processor 11 is configured to: encode the position index in each sub-block of the next sub-block of each sub-block in the first sub-tree to form the first code stream.
  • the index code stream is configured to: encode the position index in each sub-block of the next sub-block of each sub-block in the first sub-tree to form the first code stream.
  • the processor 11 is configured to: before encoding the position index of the next sub-block in each sub-block of each sub-block in the asymmetric layer, each sub-block in the asymmetric layer The number of sub-blocks in the next layer of the sub-blocks is coded to form a packet code stream in the first code stream.
  • the block code stream is located before the index code stream, and the layer code stream is located before the block code stream.
  • the number of sub-blocks in the next layer of each sub-block in the first sub-tree is less than or equal to two.
  • the number of sub-blocks at the next level of at most two sub-blocks in the first sub-tree is greater than 2, and the sub-blocks at the next level of the at most two sub-blocks are sub-blocks of the first sub-tree .
  • the processor 11 is further configured to: encode a first identifier to form a first identifier code stream, and the first identifier is used to identify the target encoding method.
  • the first identification code stream is a code stream obtained by encoding using a fixed-length code or a variable-length code encoding method.
  • the first identification code stream is located before the first code stream of the first subtree; and/or, the first identification code stream is located in the geometric header code stream of the point cloud.
  • the processor 11 is further configured to: encode a second identifier to form a second identifier code stream, where the second identifier is used to identify that the encoding mode is switched from breadth first to depth first.
  • the second identification code stream is located before the first identification code stream.
  • the processor 11 is further configured to: encode other sub-blocks in the point cloud except the first sub-tree in a breadth-first encoding order to form a second code stream.
  • the processor 11 is configured to: encode a second sub-block in the point cloud, and in a breadth-first coding order, the second sub-block is located at the root node of the first sub-tree After the block.
  • FIG. 30 is a schematic block diagram of a point cloud decoding device 20 according to an embodiment of the present application.
  • the point cloud decoding device 20 corresponds to a point cloud decoding method 200.
  • the point cloud decoding device 20 includes: a processor 21 and a memory 22;
  • the memory 22 can be used to store programs, and the processor 21 can be used to execute the programs stored in the memory to perform the following operations: receive the first code stream; use the depth-first target decoding method to decode the first code stream to obtain the point cloud
  • the first subtree after the fork tree is divided; wherein the number of sub-blocks of the next layer of at most two sub-blocks in the sub-blocks of the first sub-tree is greater than N, and the number of sub-blocks of the next layer of other sub-blocks is less than or equal to N, each sub-block of the first sub-tree includes point cloud points.
  • the processor 21 may be a processor or a controller of an electronic device where the decoding device 20 of the point cloud is located.
  • the multitree division includes one or more of octree division, quadtree division, and binary tree division, and N ⁇ 2.
  • the first code stream includes a layer code stream and an index code stream
  • the processor 21 is configured to: decode the layer code stream in the first code stream to obtain the subtree of the first subtree. Layer number information, decode the index code stream in the first code stream to obtain the position information of the sub-block in the first subtree, and obtain the first subtree according to the layer number information and the position information.
  • the processor 21 is configured to: decode the layer code stream in the first code stream to obtain the number of layers of the first subtree; or, obtain the number of layers in the first code stream.
  • the digital stream is decoded to obtain the number of layers from the zeroth layer to the first special layer of the first subtree, the number of layers between two adjacent special layers, and the last special layer to the first subtree The number of layers between the last layer; where the number of sub-blocks in this special layer is inconsistent with the number of sub-blocks in the previous layer.
  • the processor 21 is configured to: decode the layer code stream in the first code stream to obtain a layer number difference value, and add the layer number difference value to the preset layer number to obtain the layer number difference.
  • the level of the first subtree or,
  • the processor 21 is configured to: use a fixed-length code decoding mode or a variable-length code decoding mode to decode the layer code stream in the first code stream to obtain the number of layers of the first subtree information.
  • the processor 21 is further configured to: receive a preset layer of digital stream; decode the preset layer of digital stream to obtain the preset number of layers, and the preset layer of digital stream is located in the point cloud The geometry header stream.
  • the processor 21 is configured to: decode the index code stream in the first code stream to obtain that the sub-block of the next layer of each sub-block in the first sub-tree is in each sub-block. Index of the position in.
  • the processor 21 is configured to: if an octree division method is adopted to divide a sub-block in the first sub-tree to obtain a sub-block of the next layer, the 3 bits in the index code stream are Decode the code stream to obtain a position index of the sub-block of the next layer in the sub-block;
  • the quad-tree division method is used to divide a sub-block in the first sub-tree to obtain the next sub-block, the 2-bit code stream in the index code stream is decoded to obtain a sub-block in the next sub-block.
  • the binary tree division method is used to divide a sub-block in the first sub-tree to obtain a sub-block of the next layer
  • the 1-bit code stream in the index code stream is decoded to obtain a sub-block of the next layer in the sub-block.
  • the processor 21 is further configured to: if the last sub-block in the first sub-tree is a leaf node block, divide each sub-block in the first sub-tree based on the first rule , Get the next sub-block of each sub-block;
  • the last sub-block in the first sub-tree is not a leaf node block, divide each sub-block in the first sub-tree based on the second rule to obtain the next sub-block of each sub-block;
  • the first rule and the second rule are used to determine the division mode of each sub-block in the first sub-tree.
  • the processor 21 is configured to: if a sub-block in the first sub-tree does not reach a preset value in three directions, use an octree division method to divide the sub-block to obtain The next sub-block;
  • the one sub-block in the first sub-tree does not reach a preset value in two directions, the one sub-block is divided by a quad-tree division method to obtain the next-level sub-block;
  • a binary tree division method is adopted to divide the sub-block to obtain a sub-block of the next layer.
  • the first subtree includes a special layer
  • the processor 21 is configured to decode the index code stream in the first code stream to obtain in the first subtree, the special layer From the level to the last level of the first subtree, the sub-blocks of the next level of the multiple sub-blocks of each level are indexed at the same position in the multiple sub-blocks of each level.
  • the first subtree includes multiple special layers
  • the processor 21 is configured to: decode the index code stream in the first code stream to obtain in the first subtree, the multiple Between two special layers of a special layer, or between the last special layer and the last layer of the first subtree, the sub-blocks of the next layer of multiple sub-blocks in each layer are among the multiple sub-blocks of each layer Index at the same location.
  • the layer code stream is located before the index code stream.
  • the first subtree has a symmetric structure, and one level of the first subtree includes only one subblock, or the number of subblocks of the next level of multiple subblocks in a level is the same.
  • the number of sub-blocks in the next layer of each sub-block in the first sub-tree is less than or equal to two.
  • the number of sub-blocks of the next layer of only one sub-block in the first sub-tree is equal to 2
  • the number of sub-blocks of the next layer of other sub-blocks is equal to 1.
  • the number of sub-blocks in the next layer of each sub-block in the first sub-tree is equal to one.
  • the number of sub-blocks at the next level of at most two sub-blocks in the first sub-tree is greater than 2, and the sub-blocks at the next level of the at most two sub-blocks are sub-blocks of the first sub-tree .
  • the number of sub-blocks of the next layer of only one sub-block in the first sub-tree is greater than 2, and the number of sub-blocks of the next layer of other sub-blocks is equal to one.
  • the first code stream includes a layer code stream, an index code stream, and a packet code stream
  • the processor 21 is configured to:
  • the first subtree is obtained according to the layer number information, the location information, and the grouping information.
  • the processor 21 is configured to: decode the layer code stream in the first code stream to obtain the number of layers between the zeroth layer and the first layer of the first subtree. , The number of layers between two adjacent special layers and the number of layers from the last special layer to the last layer in the first subtree; among them, the number of sub-blocks in this special layer is compared with the number of sub-blocks in the previous layer The number of sub-blocks is inconsistent.
  • the processor 21 is configured to: decode the index code stream in the first code stream to obtain that the sub-block of the next layer of each sub-block in the first sub-tree is in each sub-block. Index of the position in.
  • the processor 21 is configured to decode the packet code stream in the first code stream to obtain the number of sub-blocks in the next layer of each sub-block in the asymmetric layer.
  • the block code stream is located before the index code stream, and the layer code stream is located before the block code stream.
  • the first subtree has an asymmetric structure, and the first subtree includes at least one asymmetric layer.
  • the number of sub-blocks in the next layer of each sub-block in the first sub-tree is less than or equal to two.
  • the number of sub-blocks at the next level of at most two sub-blocks in the first sub-tree is greater than 2, and the sub-blocks at the next level of the at most two sub-blocks are sub-blocks of the first sub-tree .
  • the processor 21 is further configured to: receive a first identification code stream; decode the first identification code stream to obtain a first identifier, and the first identifier is used to identify the target decoding mode.
  • the processor 21 is configured to decode the first identification code stream in a fixed-length code decoding manner or a variable-length code decoding manner to obtain the first identification.
  • the first identification code stream is located before the first code stream; and/or, the first identification code stream is located in the geometric header code stream of the point cloud.
  • the processor 21 is further configured to: receive a second identification code stream; decode the second identification code stream to obtain a second identifier, and the second identifier is used to identify that the decoding mode is breadth-first. Switch to depth priority.
  • the second identification code stream is located before the first identification code stream.
  • the processor 21 is further configured to: receive a second code stream, and decode the second code stream in a breadth-first decoding order to obtain data in the point cloud other than the first subtree Other sub-blocks.
  • the processor 21 is configured to: decode the second code stream to obtain the second sub-block in the point cloud, and in a breadth-first decoding order, the second sub-block is located in the first sub-block. After the root node block of a subtree.
  • An embodiment of the present application also provides an electronic device, which may include the point cloud encoding and decoding apparatus of the various embodiments of the present application described above.
  • processors of the embodiment of the present application may be an integrated circuit chip with signal processing capability.
  • steps of the foregoing method embodiments can be completed by an integrated logic circuit of hardware in the processor or instructions in the form of software.
  • the above-mentioned processors include but are not limited to the following: general-purpose processors, central processing units (CPUs), digital signal processors (digital signal processors, DSP), application specific integrated circuits (ASICs), ready-made programmable gate arrays Field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
  • CPUs central processing units
  • DSP digital signal processors
  • ASICs application specific integrated circuits
  • FPGA Field programmable gate array
  • the methods, steps, and logical block diagrams disclosed in the embodiments of the present application can be implemented or executed.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
  • the steps of the method disclosed in the embodiments of the present application may be directly embodied as being executed and completed by a hardware decoding processor, or executed and completed by a combination of hardware and software modules in the decoding processor.
  • the software module can be located in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers.
  • the storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
  • the memory of the embodiment of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory.
  • the non-volatile memory can be read-only memory (ROM), programmable read-only memory (programmable ROM, PROM), erasable programmable read-only memory (erasable PROM, EPROM), and electrically available Erase programmable read-only memory (electrically EPROM, EEPROM) or flash memory.
  • the volatile memory may be random access memory (RAM), which is used as an external cache.
  • RAM random access memory
  • static random access memory static random access memory
  • dynamic RAM dynamic RAM
  • DRAM dynamic random access memory
  • synchronous dynamic random access memory synchronous DRAM, SDRAM
  • double data rate synchronous dynamic random access memory double data rate SDRAM, DDR SDRAM
  • enhanced synchronous dynamic random access memory enhanced SDRAM, ESDRAM
  • synchronous connection dynamic random access memory serial DRAM, SLDRAM
  • direct rambus RAM direct rambus RAM
  • the embodiment of the present application also proposes a computer-readable storage medium that stores one or more programs, and the one or more programs include instructions.
  • the instructions are included in a portable electronic device that includes multiple application programs When executed, the portable electronic device can be made to execute the method of the above embodiment.
  • the embodiment of the present application also proposes a computer program, the computer program includes instructions, when the computer program is executed by a computer, the computer can execute the method of the above embodiment.
  • An embodiment of the present application also provides a chip that includes an input and output interface, at least one processor, at least one memory, and a bus.
  • the at least one memory is used to store instructions
  • the at least one processor is used to call the at least one memory. , To execute the method of the embodiment shown above.
  • the disclosed system, device, and method can be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or It can be integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solution of the present application essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium.
  • a computer device which may be a personal computer, a server, or a network device, etc.
  • the aforementioned storage media include: U disk, mobile hard disk, read only memory (read only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disk and other media that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)

Abstract

提供一种点云的编解码方法与装置,相对于现有技术,可以提高点云编解码的效率和性能。该点云的编码方法包括:确定点云经过多叉树划分后的第一子树,其中,该第一子树的子块中至多两个子块的下一层子块的数量大于N,其它子块的下一层子块的数量均小于等于N,该第一子树的每个子块均包括点云点;采用深度优先的目标编码方式对该第一子树进行编码以形成该第一子树的第一码流。通过本申请的技术方案,能够降低当前子块的编码比特位,提高点云压缩效率和点云解码速度。还能够摆脱广度优先的编码方式对于编码顺序的严格要求,有利于点云编码的并行化,降低点云编解码的复杂度。

Description

点云的编解码方法和装置
版权申明
本专利文件披露的内容包含受版权保护的材料。该版权为版权所有人所有。版权所有人不反对任何人复制专利与商标局的官方记录和档案中所存在的该专利文件或者该专利披露。
技术领域
本申请涉及编解码领域,并且更为具体地,涉及一种点云的编解码方法和装置。
背景技术
点云(或称三维点云)是三维物体或场景的一种表现形式,是由空间中一组无规则分布的、表达三维物体或三维场景的空间结构和表面属性的离散点所构成。为了减少点云数据存储和传输时所占用的带宽,需要对点云数据进行编码压缩。点云的编码过程包括点云中点云点的位置坐标的编码和点云点的属性信息的编码。
目前,现有的点云中位置坐标的编码方式大多采用基于广度优先的八叉树划分编码方式,这种编码方式存在较高的复杂度,对编码顺序有严格的要求,不利于点云编码的并行化,且对于八叉树子块中相对集中的点云点编码存在比特位浪费等诸多问题,从而影响点云编解码的效率和性能。
发明内容
本申请提供一种点云的编解码方法与装置,相对于现有技术,可以提高点云编解码的效率和性能。
第一方面,提供一种点云的编码方法,包括:确定点云经过多叉树划分后的第一子树,其中,该第一子树的子块中至多两个子块的下一层子块的数量大于N,其它子块的下一层子块的数量均小于等于N,该第一子树的每个子块均包括点云点,N为根据多叉树划分方式确定的正整数;采用深度优先的目标编码方式对该第一子树进行编码以形成该第一子树的第一码流。
第二方面,提供一种点云的解码方法,包括:接收第一码流;采用深度优先的目标解码方式对该第一码流进行解码得到点云经过多叉树划分后的 第一子树;其中,该第一子树的子块中至多两个子块的下一层子块的数量大于N,其它子块的下一层子块的数量均小于等于N,该第一子树的每个子块均包括点云点。
第三方面,提供一种点云的编码装置,包括处理器,该处理器用于:确定点云经过多叉树划分后的第一子树,其中,该第一子树的子块中至多两个子块的下一层子块的数量大于N,其它子块的下一层子块的数量均小于等于N,该第一子树的每个子块均包括点云点,N为根据多叉树划分方式确定的正整数;采用深度优先的目标编码方式对该第一子树进行编码以形成该第一子树的第一码流。
第四方面,提供一种点云的解码装置,包括处理器,该处理器用于:接收第一码流;采用深度优先的目标解码方式对该第一码流进行解码得到点云经过多叉树划分后的第一子树;其中,该第一子树的子块中至多两个子块的下一层子块的数量大于N,其它子块的下一层子块的数量均小于等于N,该第一子树的每个子块均包括点云点。
第五方面,提供一种计算机存储介质,其上存储有计算机程序,所述计算机程序被计算机执行时使得,所述计算机执行第一方面或者第二方面提供的方法。
第六方面,提供一种包含指令的计算机程序产品,所述指令被计算机执行时使得计算机执行第一方面或者第二方面提供的方法。
通过本申请的技术方案,根据编码划分方式确定数值N,且使得第一子树中大部分子块的下一层子块数量不超过N,采用深度优先的编码方式对该第一子树进行编码,而不采用广度优先的编码方式对其进行编码,能够不局限于划分方式造成的固定编码比特位,降低第一子树中子块的编码比特位,从而节约比特流,提高点云压缩效率和点云解码速度。另外,采用深度优先的编码方式能够摆脱广度优先的编码方式对于编码顺序的严格要求,有利于点云编码的并行化,降低点云编解码的复杂度。
附图说明
图1是根据本申请实施例的一种点云数据编码流程的示意图。
图2是一种点云编码的初始化空间的示意图。
图3是根据本申请实施例的一种八叉树编码的示意图。
图4是另一种点云编码的初始化空间的示意图。
图5是根据本申请实施例的几种四叉树划分方式示意图。
图6是根据本申请实施例的几种二叉树划分方式示意图。
图7是根据本申请实施例的一种多叉树编码的示意图。
图8是根据本申请实施例的一种点云数据解码流程的示意图。
图9是根据本申请实施例的一种点云的编码方法的示意性流程框图。
图10至图14是根据本申请实施例的几种对称结构的第一子树的结构示意图。
图15是根据本申请实施例的另一点云的编码方法的示意性流程框图。
图16是根据本申请实施例的子块经过八叉树划分后的位置索引示意图。
图17和图18是根据本申请实施例的两种对称结构的第一子树的结构示意图。
图19是根据本申请实施例的另一点云的编码方法的示意性流程框图。
图20是根据本申请实施例的另一点云的编码方法的示意性流程框图。
图21是根据本申请实施例的另一点云的编码方法的示意性流程框图。
图22是根据本申请实施例的另一点云的编码方法的示意性流程框图。
图23是根据本申请实施例的一种点云的解码方法的示意性流程框图。
图24是根据本申请实施例的另一点云的解码方法的示意性流程框图。
图25是根据本申请实施例的另一点云的解码方法的示意性流程框图。
图26是根据本申请实施例的另一点云的解码方法的示意性流程框图。
图27是根据本申请实施例的另一点云的解码方法的示意性流程框图。
图28是根据本申请实施例的另一点云的解码方法的示意性流程框图。
图29是根据本申请实施例的点云的编码装置的示意性框图。
图30是根据本申请实施例的点云的解码装置的示意性框图。
具体实施方式
下面将结合附图,对本申请实施例中的技术方案进行描述。
本申请实施例可适用于标准或非标准的点云编解码器。例如,数字音视频编解码技术标准(audio video coding standard,AVS)标准的编码器。
应理解,本文中的具体的例子只是为了帮助本领域技术人员更好地理解本申请实施例,而非限制本申请实施例的范围。
还应理解,在本申请的各种实施例中,各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
还应理解,本说明书中描述的各种实施方式,既可以单独实施,也可以组合实施,本申请实施例对此并不限定。
除非另有说明,本申请实施例所使用的所有技术和科学术语与本申请的技术领域的技术人员通常理解的含义相同。本申请中所使用的术语只是为了描述具体的实施例的目的,不是旨在限制本申请的范围。本申请所使用的术语“和/或”包括一个或多个相关的所列项的任意的和所有的组合。
为了便于理解本发明实施例提供的技术方案,下文首先描述一些本发明实施例涉及的概念。
点云是在同一空间参考坐标系下表达目标空间分布和目标表面特性的离散点集合,也即,在获取物体表面每个采样点的空间坐标后,得到的采样点的集合,称之为点云(Point Cloud)。为了准确反映三维空间中的信息,通常需要海量的离散点对三维空间中的物体进行表征。下文将点云中的离散点称为点云点。
图1示出了本申请提供的一种点云数据编码流程的示意图。
点云数据通常包括点云中多个点云点的位置信息以及属性信息。点云点的位置坐标可用于描述点云点在三维空间中的位置,点云点的属性信息例如可以包括点云点的颜色信息,还可以包括点云点的反射率等其他信息。为了减少点云在存储和传输时所占用的带宽,可以对点云数据进行编码,以压缩点云的数据量。在点云数据的编码过程中,点云点的位置信息编码与属性信息编码通常是分开进行的。
如图1所示,在点云数据的编码方法中,点云点的位置信息编码方法包括:
坐标平移、量化:对点云中多个点云点的位置坐标进行平移和量化。在一种可能的实现方式中,采用几何量化方法对点云点的位置坐标进行处理。几何量化的过程例如可以采用下述方式进行:首先,可以根据多个点云点在笛卡尔坐标系中的位置坐标,得到多个点云点在x,y,z三个方向维度上位置坐标的最大值和最小值之间的差值,以及预先确定的量化精度,对多个点云点的位置坐标进行量化,以将多个点云点的位置坐标转换为大于或等于零 的整数坐标。
可选地,在位置坐标平移量化之后,可以去除重复坐标。在本申请实施例中,该步骤为可选步骤,即可以进行该步骤,去除量化后重复的点云点的位置坐标,也可以不进行该步骤,直接对量化后的点云点位置坐标进行八叉树编码。并且,应注意的是,若选择进行该步骤,则在去除重复坐标的同时,重复坐标的点云点对应的属性需要进行转换。
多叉树划分:在本步骤中,该多叉树划分可以理解为按照八叉树划分、四叉树划分、二叉树划分中任一种或多种划分方式。
在一些实施方式中,采用八叉树划分方式对点云点的位置信息进行编码,该过程也可以称之为八叉树编码。完整的八叉树划分过程包括多层的八叉树划分,其中每层八叉树的划分均利用当前块的中心点的坐标进行子块划分,通过中心点将当前块划分为八个小的体积相同的子块。
例如,首先可以根据多个点云点的位置坐标(点云点的位置坐标可以是该点云点的经过几何量化和/或去除重复坐标之后的位置坐标),选择三个方向维度(x,y,z)方向上的位置坐标的最大值和最小值。然后,可以根据选定的这些量化值确定待划分的初始化空间。
以图2为例,该初始化空间通常为如图2所示的立方体盒子。该立方体盒子的边长的取值通常需要满足如下条件:该边长的取值为2的整数次幂,该边长的取值大于或等于,并最接近多个点云点在三个方向维度上的位置坐标的最大值中的最大值。也即,假设多个点云点在三个方向维度上的位置坐标的最大值为X max、Y max、Z max,且X max为X max、Y max、Z max中的最大值,则该边长的取值大于或等于,并最接近X max
在确定初始化空间之后,接着对该初始化空间进行多层的八叉树划分。每层八叉树划分均可利用当前块的中心点的位置坐标进行空间划分,通过中心点将当前块划分为八个体积相等的子块。图2示出了初始化空间进行首次划分后得到的划分结果,从图2可以看出,初始化空间被均匀划分成8个体积相等的子块。在八叉树中,初始化空间为根节点块,这些子块为该根节点的子节点块,称为第一层子节点块。
在得到第一层子节点块之后,可以判断第一层的每个子节点块内是否存在点云点,对存在点云点的子节点块再进一步划分,直至该子节点块的边长小于阈值时停止八叉树划分,此时的子节点块称为当前八叉树的叶子节点 块。该阈值例如可以是1。
在对点云中多个点云点的位置坐标进行八叉树编码时,可以按照八叉树的广度优先遍历顺序(breadth first search,BFS),逐层进行编码。在逐层编码时,可以逐层逐个编码每个八叉树的划分结果,即判断当前子块进行八叉树划分后得到的八个子块是否含有点云点。如果该块的某个子块含有点云点,则对该子块进行进一步划分,否则停止划分。
下面以图3为例进行说明,图3中第一层、第二层以及第三层中的每个方框均可以表示为一个子节点块或者子块,黑色方块表示该子块内含有点云点,白色方块表示该子块内不含有点云点。对初始空间(根节点块)进行第一层八叉树划分,得到如图3所示的划分结果。图3中的第一层的子节点块中的第三个子节点块为黑色方块,其余子节点块为白色方块,说明初始空间划分得到的第三个子块含有点云点,剩余七个子块不含有点云点。这样的划分结果可以用8比特(bit)来表示,如00100000。接着,可以对初始空间划分得到的第三个子块进行第二层八叉树划分。图3中的第二层的子节点中的第三个和第八个子节点块为黑色方块,表示第二层八叉树划分得到的八个子块中的第三个子块和第八个子块内含有点云点,因此,第二层八叉树划分的划分结果可以用00100001来表示。同理,第三层八叉树划分的划分结果为10010000和01000001。图3中的划分结果对应的二进制码流可以为0010 0000 0010 0001 1001 0000 0100 0001……。
后续的八叉树划分方式与前几层的八叉树划分方式相似,此处不再详述。当划分到最后八叉树的一层(最后一层可以是子块边长为1的层)时,达到了八叉树的底层,即达到了八叉树的叶子节点块,不需要再进一步划分。
然后,可以对八叉树的叶子节点块内含有的点云点的数目进行编码。例如,当某个叶子节点块内含有一个点云点时,可以直接编码一个0;当某个叶子节点块内含有n个点云点时,可以先编码一个1,接着编码数值(n-1)。
八叉树编码即是通过上述过程,将点云中的点云点量化至三维空间中的某个子块,从而实现了点云数据量的压缩。
在另一些实施方式中,还采用四叉树划分方式、二叉树划分方式、或者几种划分方式混合的多叉树划分方式对点云点的位置信息进行编码。
例如,如图4所示,根据点云的形状确定的初始化空间为如图4所示的长方体盒子,该长方体盒子的大小为(2 dx,2 dy,2 dz),其中,dx≠dy≠dz, 则可以采用四叉树划分、二叉树划分方式、或者多叉树划分方式进行编码。
作为示例,若采用多叉树划分方式,在确定初始化空间之后,可以根据初始化空间的大小以及两个参数K和M来确定初始化空间中的划分顺序,其中,K(0≤K≤max(d x,d y,d z)-min(d x,d y,d z)),M(0≤M≤min(d x,d y,d z))。K表示在前K层划分中,采用四叉树划分或者二叉树划分,M表示四叉树划分和二叉树划分的最小尺寸,即最后M层划分必须为八叉树划分。当dx≠dy≠dz时,二叉树划分优先于四叉树划分。具体地,在前K层划分中,采用下面表1决策划分类型,之后采用表2决策划分类型。当表格中的条件均不满足时,执行八叉树划分。表1和表2中,QT表示四叉树划分,BT表示二叉树划分。
表1隐式几何划分决策方法(前K层)
  沿着x-y轴QT 沿着x-z轴QT 沿着y-z轴QT
条件 d z<d x=d y d y<d x=d z d x<d y=d z
  沿着x轴BT 沿着y轴BT 沿着z轴BT
条件 d y<d xand d z<d x d x<d yand d z<d y d x<d zand d y<d z
表2隐式几何划分决策方法(K层之后)
Figure PCTCN2020082608-appb-000001
图5中的(a)图至(c)图示出了一个块空间经过四叉树划分后得到的划分结果,如图5中的(a)图所示,沿x-y轴将块空间进行划分为四个子块,如图5中的(b)图所示,沿x-z轴将块空间进行划分为四个子块,如图5中的(c)图所示,沿y-z轴将块空间进行划分为四个子块。
图6中的(a)图至(c)图示出了一个块空间经过二叉树划分后得到的划分结果,如图6中的(a)图所示,沿x轴将块空间划分为二个子块,如图5中的(b)图所示,沿y轴将块空间划分为二个子块,如图5中的(c)图所示,沿z轴将块空间划分为二个子块。
作为示例,按照表1和表2中的判断标准,可以采用混合的多叉树划分方式对初始化空间进行划分。如图7所示,基于初始化空间的大小,对第0 层的初始化空间进行二叉树划分,经过划分得到第1层的两个子块,基于第1层两个子块的大小,判断采用四叉树划分方式对该第1层中一个包括点云点的子块进行四叉树划分,经过划分得到第2层的四个子块,然后,再基于第2层子块的大小,判断划分方式为八叉树划分,对其中两个包括点云点的子块再经过八叉树划分得到其各自在下一层(第3层)的八个子块。
按照上述方式,继续对树结构进行划分,直到划分到多叉树的最后一层(最后一层可以是子块边长为1的层)时,达到了多叉树的底层,即达到了多叉树的叶子节点块,不需要再进一步划分。
在一些实施方式中,与上文中八叉树编码过程类似,可以按照广度优先编码顺序,对多叉树划分后的多个子块逐层进行编码。其中,若子块采用四叉树划分方式,则对其编码只需要编码4个比特,比八叉树划分节省4个比特;若采用二叉树划分方式进行编码,则只需要编码2个比特,比八叉树划分节省6个比特。跳过的比特可以在解码端推测出为0。例如,对于图7中的情况,编码结果可以为10 0101 01010100 10010000……。
采用多叉树编码,同样是通过将点云中的点云点量化至三维空间中的某个子块,从而实现了点云数据量的压缩,且与八叉树编码相比,能够减小编码比特,进一步提高数据压缩效果。
熵编码:对八叉树编码后的码流进行熵编码得到点云的几何码流,即点云中多个点云点位置信息的码流。
在本步骤中,熵编码的方法包括但不限于是自适应二进制算术编码(context adaptive binary arithmetic coding,CABAC)熵编码方法,还可以采用现有技术中其它任意一种熵编码方法,本申请实施例对此不做限定。
在对位置坐标进行多叉树编码后,同步会按照多叉树重建后的位置坐标顺序对对应的属性值进行压缩编码。
继续参见图1,在点云数据的编码方法中,点云点的属性信息编码方法包括:
空间变换:该步骤为可选步骤,即将点云点的颜色属性从RGB空间转换到YUV空间的过程,具体地,可以通过转换公式将点云点的颜色属性进行空间变换。
属性插值:在点云点的几何信息(点云点的点数或者点与点的相对位置)改变了的情况下,例如在位置信息编码中进行了去除重复点的操作,才需进 行属性插值,即重上色的过程。
给定原始点云的几何和属性信息,以及重构点云的几何信息,重上色就是为重构点云中的每个点计算新的属性值,使得重构点云和原始点云的属性误差最小。实现过程如下:
Step 1:设原始点云和重构点云的几何信息分别为(P i) i=0..,N-1
Figure PCTCN2020082608-appb-000002
其中N和N rec分别为原始点云和重构点云中的点数,易知如果去除了重复点,则N rec<N,否则N rec=N。
Step 2:对于重构点云中的每个点
Figure PCTCN2020082608-appb-000003
在原始点云中找到与之距离最近的点P i *,设P i *的属性值为A i *
Step 3:对原始点云中的每个点,在重构点云中找与之距离最近的点。对于重构点云中的点
Figure PCTCN2020082608-appb-000004
令U(i)=(X k(i) k∈{1,...,D(i)})为原始点云中,均以
Figure PCTCN2020082608-appb-000005
为最近点的点集,其中D(i)为U(i)中包含点的个数,注意U(i)可以为空,也可以包含一个或多个点。
Step 4:为重构点云中的每个点
Figure PCTCN2020082608-appb-000006
计算重构属性值,若U(i)为空,那么直接将A i *作为重构属性值赋给
Figure PCTCN2020082608-appb-000007
若U(i)不为空,则重构点的属性值U(i)中所有点的属性均值,计算公式如下:
Figure PCTCN2020082608-appb-000008
属性预测:在一种实现方式中,可以采用莫顿码重排序的方法对点云点属性进行预测处理。首先基于莫顿码对点云进行重排序,生成可用于点云属性预测的点云顺序。在AVS标准的属性编码中,莫顿码主要基于莫顿查询表进行计算得到,过程如下:
Step 1:遍历几何重建点云,得到当前点对应的几何坐标x、y和z。
Step 2:根据几何坐标查找莫顿表计算当前点所对应的莫顿码。
Step 3:基于莫顿码对点云进行重排序。
接着对排序后的属性值利用前项差分预测,根据预测值与原始值,得到属性残差。接着对属性残差进行量化。对量化之后的系数值进行熵编码即可得到属性码流。
此外,还可以采用差分预测等其它预测方式对点云点属性进行预测处理,本申请实施例对此不做具体限定。
点云数据的解码流程与编码流程的逆过程大致相同。图8示出了本申请 提供的一种解码流程的示意图。
熵解码:解码端对获取输入的几何码流和属性码流后,采用与编码端的熵编码方法对应的熵解码方法对码流逐比特进行解码。
多叉树重建:具体地,对于几何码流,通过熵解码后的信息可以先确定点云的初始化空间(初始化空间的尺寸可以由编码端写入码流,解码端从码流中获取即可),然后对初始化空间进行多叉树划分。解码端采用与编码端一致的空间划分方式对初始化空间进行划分。例如,编解码端均可对初始化空间进行多叉树划分。通过划分的多叉树中多个子节点块及其对应的二进制比特流得到点云点待逆量化的位置坐标数据。
逆量化:逆量化为编码端量化的逆过程,多叉树重建后的待逆量化的位置坐标数据经过逆量化后得到编码端中量化后的坐标。属性码流经过熵解码和逆量化后得到属性预测残差值。
在本申请中,量化以及逆量化的相关实施方式具体可以参见相关技术中的方法,此处不再赘述。
属性重建:具体地,若逆量化后得到属性预测残差为
Figure PCTCN2020082608-appb-000009
当前点属性重建值为
Figure PCTCN2020082608-appb-000010
前一点的属性重建值为
Figure PCTCN2020082608-appb-000011
则当前点的属性重建值
Figure PCTCN2020082608-appb-000012
遍历完点云中的所有点云点,得到编码端输出的重构点云。
逆空间变换:对应于编码端的空间变换,该步骤也为可选步骤,若属性重建后的属性值为YUV空间的属性值,则对其进行逆空间变换得到RGB空间的属性值。
最后,将上述解码得到的位置信息及其对应的属性信息合并后即可得到点云数据。
上文结合图1至图8,对相关技术的编码过程进行了介绍。从上文描述可以看出,在对点云中多个点云点的位置坐标进行多叉树编码时,采用广度优先方式遍历划分后的每个块,并对每个块是否存在点云点均进行编码标识,因此采用这种编码方式存在较高的复杂度,对编码顺序有严格的要求,不利于点云编码的并行化,且对于多叉树子块中相对集中的点云点编码存在比特位浪费等诸多问题,从而影响点云编解码的效率和性能。
基于上述问题,本申请提出一种点云的编解码方法,能够减小点云点位置编码的比特位,避免比特浪费,且不拘泥于严格的编码顺序,有利于减低编码复杂度和点云编码的并行化处理。
下面结合图9至图28,对本申请实施例提供的点云的编解码方法进行详细描述。图9至图28中的方法可以由编码装置或者解码装置执行。
并且,更为具体地,本申请实施例主要涉及点云中多个点云点的位置坐标的编解码过程。因此,下文主要针对点云中多个点云点的位置坐标的编解码过程进行描述,点云的属性信息的编解码过程可以参见上述相关描述或者相关技术,本申请实施例对此并不限定。
图9示出了一种点云的编码方法100的示意性流程框图。
如图9所示,该点云的编码方法100可以包括以下步骤。
S110:确定点云经过多叉树划分后的第一子树,其中,第一子树的子块中至多两个子块的下一层子块的数量大于N,其它子块的下一层子块的数量均小于等于N,第一子树的每个子块均包括点云点,N为根据多叉树划分方式确定的正整数。
S120:采用深度优先的目标编码方式对第一子树进行编码以形成第一子树的第一码流。
在对点云中多个点云点的位置信息进行编码时,对点云所在的初始化空间进行多叉树划分,得到点云经过多叉树划分后的树结构,通过树结构表征多个点云点的位置空间。
可选地,在本申请实施例中,多叉树划分包括但不限于是单纯的某种划分方式,例如八叉树划分方式,二叉树划分方式,或者四叉树划分方式,还可以是二叉树划分、四叉树划分、八叉树划分,乃至其它划分方式相混合的多叉树划分方式。本申请实施例对具体的多叉树划分方式不做限定。且为了方便描述,本申请中将八叉树划分、四叉树划分、二叉树划分、以及多种划分方式混合的多叉树划分方式均称之为多叉树划分。
采用多叉树划分对点云点的初始化空间进行划分后得到的树结构一般由包括点云点的子块以及不包括点云点的子块构成,但每一层划分过程中,我们只基于包括点云点的子块进行进一步划分,因此,在下文中,除特殊说明外,树结构中的子块均表示包括点云点的子块,而不涉及不包括点云点的子块。
在采用多叉树划分建立点云的树结构的基础上,一般采用广度优先编码方式对树结构进行编码,参考上文中的相关描述,从树结构的根节点(初始化空间)开始,沿着树的宽度遍历树的所有子块,对每个子块进行编码。若 采用八叉树对该子块进行划分,则需要采用8bit对该子块进行编码,若采用四叉树对该子块进行划分,则需要采用4bit对该子块进行编码,若采用二叉树对该子块进行划分,则需要采用2bit对该子块进行编码。
在本申请实施例中,不是采用传统的编码方法,按照广度优先编码方式对点云的树结构进行编码,而是引入一种新的编码模式,当编码至树结构中的第一子块时,确定该第一子块下的第一子树符合预设条件,则此时不是采用广度优先编码方式再继续遍历该第一子块之后的第二子块,而是切换至深度优先的目标编码方式,对该第一子树中根节点块,即第一子块进行编码后,对该第一子块的下一层子块进行编码,直到完成第一子树中最后一层子块的编码,再回到该第一子块之后的第二子块。
可选地,该第一子树中的第一子块可以为点云的初始化空间块,也可以为点云的初始化空间块经过划分后的任意一个子块,本申请实施例对第一子块以及第一子树的初始化空间中的具体位置不做限定。
采用本申请实施例的方法,能够摆脱广度优先的编码方式对于编码顺序的严格要求,有利于点云编码的并行化,降低点云编码的复杂度。
具体地,本申请中第一子树的预设条件可以为:第一子树的子块中至多两个子块的下一层子块的数量大于N,其它子块的下一层子块的数量均小于等于N,其中,子块的下一层子块即当前子块经过划分后得到的包括点云点的子块,该第一子树中,每个子块均包括点云点,N为根据多叉树划分方式确定的正整数。
在采用原始的广度优先的编码方式下,不论下一层子块数量为多少,均会根据划分方式编码对应比特位,会造成较大的比特流浪费,根据该原始的广度优先的编码方式的比特位,确定数值N,且使得第一子树中大部分子块的下一层子块数量不超过N,且本申请中采用深度优先的编码方式,根据当前子块的下一层子块数量对当前子块进行编码,例如,对下一层子块的位置索引进行编码,若当前子块的下一层子块数量较少时,对比于广度优先的编码方式,能够降低当前子块的编码比特位,从而节约比特流,提高点云压缩效率。
在一些实施方式中,若多叉树划分方式中最大的划分方式为八叉树划分,则N可以为小于等于2的正整数。则此时,一种情况下,第一子树的预设条件可以为:第一子树的子块中至多两个子块的下一层子块的数量大于2, 其它子块的下一层子块的数量均小于等于2。另一种情况下,第一子树的预设条件可以为:第一子树的子块中至多两个子块的下一层子块的数量大于1,其它子块的下一层子块的数量均等于1。其中,子块的下一层子块即当前子块经过划分后得到的包括点云点的子块,该第一子树中,每个子块均包括点云点。
具体地,在当前的预设条件下,针对不同的点云,会确定得到多种不同结构的第一子树,下面,针对不同结构的第一子树,详细说明本申请实施例具体的编码方法。
首先说明对称结构的第一子树的编码方法,在对称结构的第一子树的一层中,一种情况下,仅包括一个子块,另一种情况下,多个子块的下一层子块的数量相等。
图10至图14示出了多种对称结构的第一子树的结构示意图。
如图10至图14所示,第一子树均包括m层子块,m为大于1的正整数。其中,第一子树的第一子块位于第一子树中的第0层。
第m+1层子块中每个子块的下一层子块的数量为3,因而不符合本申请中第一子树的预设条件,该第m+1层子块不属于本申请实施例中第一子树的范围。
可以理解的是,若在第m+1层子块中存在2个以上的子块的下一层子块超过2个,则该第m+1层子块也不属于本申请实施例中的第一子树。
在一些实施例中,第一子树的m层子块中每个子块的第一层子块的数量均小于等于2。
例如,如图10所示,第一子块中每个子块的下一层子块的数量均为2。
又例如,如图11所示,第一子块中部分子块的下一层子块的数量为2,另一部分子块的下一层子块的数量为1。
又例如,如图12所示,第一子块中每个子块的下一层子块的数量均为1。
在另一些实施例中,第一子树中至多两个子块的下一层子块的数量大于2,且至多两个子块的下一层子块同样属于第一子树的子块。
例如,如图13所示,第一子树中两个子块的下一层子块数量为3,且该下一层子块同样为第一子树中的子块,换言之,该下一层子块不是第一子树的最后一层子块。
又例如,如图14所示,第一子树的子块中仅一个子块的下一层子块的 数量大于2,其它子块的下一层子块数量等于1。
在上述图10至图14中,示出了多种情况下,第一子树的结构示意图,可以理解的是,本申请实施例中的对称结构的第一子树包括但不限于是以上示出了几种结构示意图,对称结构且满足预设条件的第一子树均在本申请的保护范围之内。
对于对称结构,且满足预设条件的第一子树,图15示出了另一种编码方法100的示意性流程框图。
如图15所示,上述步骤S110可以包括以下步骤。
S111:确定点云经过多叉树划分后的第一子树,其中,第一子树的子块中至多两个子块的下一层子块的数量大于2,其它子块的下一层子块的数量均小于等于2,且第一子树为对称结构。
上述步骤S120可以包括以下步骤。
S121:对第一子树的层数信息进行编码以形成第一子树的层数码流。
在本申请实施例中,在第一子树为对称结构的前提下,该层数信息用于表征当前层与上一层相比,子块数量是否发生变化,即在解码端解码时,可以通过该层数信息,得到第一子树中每一层子块的数量,以及每一层子块与上一层子块的连接关系。
具体地,若当前层中子块数量与上一层不一致,则将当前层确定为特殊层,对应的,若当前层中子块数量与上一层一致,则将当前层确定为非特殊层。
举例来说,如图14中的第2层,其子块数量与上一层不一致,则该第2层为特殊层,图14中的第3层,其子块数量与上一层一致,则该第3层为非特殊层。
对于第一子树中没有特殊层的情况,即每一层子块数量均与上一层一致,则第一子树的结构如图12所示,每一层子块数量均为1。
在此情况下,对第一子树的层数信息进行编码以形成第一子树的层数码流,例如,对于图12中的第一子树,对层数m进行编码,以形成第一子树的层数码流。
而对于第一子树中存在特殊层的情况,则需要对具体的特殊层信息进行编码。
具体地,若第一子树中仅存在一层特殊层,对第一子树的第零层至该特 殊层之间的层数、以及该特殊层至所述第一子树中的最后一层之间的层数进行编码以形成第一子树的层数码流。
例如,如图14中所示的第一子树,仅存在一层特殊层即第2层,除第2层以外的其它层均为非特殊层,在此情况下,对第0层至第2层之间的层数1,以及第2层至第m层之间的层数m-3进行编码,以形成第一子树的层数码流。
若第一子树中存在多层特殊层,则需要对第一子树的第零层至第一层特殊层之间的层数、相邻两层特殊层之间的层数以及最后一层特殊层至第一子树中的最后一层之间的层数进行编码以形成第一子树的层数码流。
例如,如图13所示的第一子树,存在两层特殊层,即第1层和第2层,除第1层和第2层以外的其它层均为非特殊层,在此情况下,对第0层至第1层之间的层数0,以及第1层至第2层之间的层数0进行编码,以及第2层至第m层之间的层数m-3进行编码以形成第一子树的层数码流。
在一些实施方式中,对层数进行编码时,可以直接对层数值进行编码,即直接对层数值进行二值化处理,再进行熵编码的后续编码过程,例如采用上下文模型进行编码或者采用旁路编码。
在另一些实施方式中,除了可以直接对层数值进行编码,还可以将层数值减去预设层数得到层数差值,对该层数差值进行编码,具体地,该预设层数可以为预设的任意正整数。
在一些实施例中,编码端和解码端可以对该预设层数进行约定。在另一些实施例中,编码端也可以对该预设层数进行编码并写入码流中,解码端对该预设层数码流进行解码得到预设层数信息,可选地,该预设层数码流位于点云的几何头码流中,或者也可以位于点云码流的其它位置。
可选地,可以采用现有技术中任意一种二值化方法对上述层数以及预设层数进行二值化处理,然后再进行熵编码后续过程,得到层数码流和预设层数码流。
其中,该二值化方法包括但不限于定长码编码方法或者变长码编码方法。该变长码编码方法包括但不限于截断莱斯码、K阶指数哥伦布、一元码等等编码方法。该定长码编码方法和变长码编码方法可以参见现有技术中的相关描述,此处不再赘述。
S122:对第一子树中子块的位置信息进行编码以形成第一子树的索引码 流。
具体地,该第一子树的层数码流与索引码流共同形成第一子树的第一码流,该第一码流能够表征第一子树的结构,从而表征第一子树中点云点的空间位置信息。
在一些实施方式中,第一子树中子块的位置信息可以通过位置索引进行表征,即通过索引号表示下一层子块在当前子块中相对位置。因而,可以对第一子树中每个子块的下一层子块在每个子块中的位置索引进行编码以形成第一子树的索引码流。
具体地,若采用八叉树划分对当前子块进行划分,则当前子块的下一层中,包括点云点和不包括点云点的子块共有8个,需要通过索引号表示其中包括点云点的下一层子块在当前子块中的位置。
例如,如图16所示,当前子块经过八叉树划分后的位置索引如图所示,可以通过3bit码流表示0至7中任一个位置索引,从而表示包括点云点的下一层子块在当前子块中的位置,而不需要对划分后每个包括点云点和不包括点云点的子块均进行编码标识。
总结来讲,在本申请实施例中,若采用八叉树划分方式对当前子块进行划分得到下一层子块,下一层子块在当前子块中的一个位置索引编码为3bit;
若采用四叉树划分方式对当前子块进行划分得到下一层子块,下一层子块在当前子块中的一个位置索引编码为2bit;
若采用二叉树划分方式对当前子块进行划分得到下一层子块,下一层子块在当前子块中的一个位置索引编码为1bit。
在本申请实施例中,若当前子块的下一层子块(包括点云点的子块)数量不超过2,则在八叉树划分下,当前子块的索引比特流为6位,而采用常规方法对当前子块进行编码则需要8位,因此,采用本申请实施例的方法能够减小比特位数,提高编解码效率。
类似地,当前子块经过四叉树划分后,可以通过2bit码流表示0至3中任一个位置索引,当前子块经过二叉树划分后,可以通过1bit码流表示0至1中任一个位置索引。若当前子块的下一层子块(包括点云点的子块)数量为1,则在四叉树划分和二叉树划分下,采用本申请实施例的方法同样能够减小比特位数,提高编解码效率。
此外,在一些特殊情况下,例如,第一子树中存在两个子块的下一层子 块(包括点云点的子块)数量超过2,但若第一子树中其它子块的下一层子块不超过2,甚至为1,即使存在零星子块的编码比特位数较多,但其它子块的编码比特位数大大减少,则同样可以减小第一子树整体的编码比特位数,提高编解码效率。
在一种实施方式中,在对当前子块的下一层子块进行位置索引编码时,可以基于以下第一规则对当前子块进行块划分方式:
若当前子块在三个方向上未达到预设值,采用八叉树划分方式划分得到下一层子块,下一层子块在当前子块中的一个位置索引编码为3bit;
若当前子块在二个方向上未达到预设值,采用四叉树划分方式划分得到下一层子块,下一层子块在当前子块中的一个位置索引编码为2bit;
若当前子块在一个方向上未达到预设值,采用二叉树划分方式划分得到下一层子块,下一层子块在当前子块中的一个位置索引编码为1bit。
上述预设值可以为叶子节点块的边长,例如可以为1。
可选地,在本申请实施例中,除了基于上述第一规则对当前子块进行块划分外,还可以基于其它现有技术的规则对当前子块进行划分,或者根据其它编码端和解码端约定的规则,或者还可以采用固定的划分方式对当前子块进行划分,本申请实施例对此不做具体限定。
进一步地,在一些实施方式中,若第一子树的最后一层子块为叶子节点块时,采用上述第一规则对第一子树中的子块进行块划分;而若第一子树的最后一层子块不为叶子节点块,则可以采用第二规则对第一子树中的子块进行块划分,该第二规则可以为点云中除第一子树外的其它子块的划分方式。作为示例,第二规则可以为上文中根据表1和表2的条件确定的划分方式规则,或者第二规则也可以为现有技术中其它任意的划分方式规则。
在本申请实施例中,上述编码得到的索引码流位于层数码流之后。举例来说,对于图14中的第一子树,首先对层数信息进行编码,即首先对第0层至第2层之间的层数1,以及第2层至第m层之间的层数m-3进行编码,然后对每个子块的下一层子块在每个子块中的位置索引进行编码,即从第0层开始,依次对第0层的第一子块,第1层的1个子块,第2层的4个子块,以及往下每一层的4个子块进行位置索引编码,形成第一子树的第一码流。
在一种情况中,如图14所示,从第2层至第m层,位于同一层的4个子块的下一层子块在该4个子块中的位置索引相同,具体来说,第3层的4 个子块在第2层的4个子块中,位置索引相同,且第4层的4个子块在第3层的4个子块中,位置索引也相同,依次类推,第i层的4个子块在第i-1层的4个子块中的位置索引相同,其中,3≤i≤m,i为正整数。
则此时,在对第2层至第m层的子块进行位置索引编码时,对每层多个子块的同一位置索引进行编码,具体来说,在对第2层的多个子块的位置索引进行编码时,不再对多个位置索引进行编码,而只对一个位置索引进行编码,同理,第3层至第m层,每一层均只对一个位置索引进行编码。
或者如图13所示,从第2层至第m-1层,位于同一层的6个子块的下一层子块在该6个子块中的位置索引相同,具体来说,第i层的6个子块在第i-1层的6个子块中的位置索引相同,其中,3≤i≤m-1,i为正整数。
则此时,若第一子树不包括第m层,可以在对第2层至第m-1层的子块进行位置索引编码时,对每层多个子块的同一位置索引进行编码。
可以理解的是,图13和图14仅示例性的示出了部分情况,图13中第1层中两个子块在第2层中的子块数量还可以为2个,3个,乃至8个子块,或者是其它任意数量的子块,同样的,图14中的第2层还可以包括2个子块,3个子块,乃至8个子块,或者其它任意数量的子块,本申请实施例对此不做限定。
因此,综合上述几种情况可以得到,若在第一子树中,两层特殊层之间,或者最后一层特殊层至第一子树的最后一层之间,每层多个子块的下一层子块在每层多个子块中的位置索引为同一位置索引,则对每层多个子块的同一位置索引进行编码。
采用本申请实施例的方法,能够进一步减小编码比特位数,提高编解码效率。
上文结合图10至图16说明了对称结构的第一子树的编码方法,下文结合图17至图18说明非对称结构下,第一子树的编码方法。
具体地,若第一子树为非对称结构,该第一子树包括至少一层非对称层,该非对称层中不同子块的下一层子块的数量不相等。
图17至图18示出了两种对称结构的第一子树的结构示意图。
如图17至图18所示,第一子树均包括m层子块,m为大于1的正整数。其中,第一子树的第一子块位于第一子树中的第0层。
第m+1层子块中每个子块的下一层子块的数量为3,因而不符合本申请 中第一子树的预设条件,该第m+1层子块不属于本申请实施例中第一子树的范围。
在一些实施例中,第一子树的m层子块中每个子块的第一层子块的数量均小于等于2。
例如,如图17所示,第一子块中部分子块的下一层子块的数量为2,另一部分子块的下一层子块的数量为1。
在图17中,第1层和第2层为非对称层,即第1层中两个子块的下一层子块数量不一致,且第2层中三个子块在下一层子块数量不一致。除第1层和第2层外,第一子树中的其它层均为对称层,即对称层中,每个子块的下一层子块数量相等。
在另一些实施例中,第一子树中至多两个子块的下一层子块的数量大于2,且至多两个子块的下一层子块同样属于第一子树的子块。
例如,如图18所示,第一子树中两个子块的下一层子块数量为3,且该下一层子块同样为第一子树中的子块,换言之,该下一层子块不是第一子树的最后一层子块。
在图18中,第1层和第2层为非对称层,第一子树中除第1层和第2层以外的其它层均为对称层。
在上述图17和图18中,示出了两种情况下,第一子树的结构示意图,可以理解的是,本申请实施例中的非对称结构的第一子树包括但不限于是以上示出了两种结构示意图,非对称结构且满足预设条件的第一子树均在本申请的保护范围之内。
对于非对称结构,且满足预设条件的第一子树,图19示出了另一种编码方法100的示意性流程框图。
如图19所示,上述步骤S110可以包括以下步骤。
S112:确定点云经过多叉树划分后的第一子树,其中,第一子树的子块中至多两个子块的下一层子块的数量大于2,其它子块的下一层子块的数量均小于等于2,且第一子树为非对称结构。
上述步骤S120可以包括以下步骤。
S121:对第一子树的层数信息进行编码以形成第一子树的层数码流。
S123:对第一子树中非对称层的分组信息进行编码以形成第一子树的分组码流。
S122:对第一子树中子块的位置信息进行编码以形成第一子树的索引码流。
具体地,本申请实施例中,步骤S121和步骤S122可以参见图15中的相关描述,此处不再赘述。
对于步骤S123,由于在本申请实施例中,第一子树为非对称结构,因此,需要在对第一子树的层数信息以及位置信息编码的基础之上,还需要对第一子树中非对称层的分组信息进行编码,以便于解码端能够解码得到准确的点云位置结构。
具体地,在步骤S123中,对非对称层中每个子块的下一层子块在每个子块中的位置索引进行编码之前,对非对称层中每个子块的下一层子块数量进行编码,体现非对称层的分组信息,以形成第一子树的分组码流。
可选地,若下一层子块数量为2,则编码为1,若下一层子块子块数量为1,则编码为0,若下一层子块数量为其他数值,则还可以对应编码为其它值,本申请实施例对具体的编码方式不做限定。
具体地,在本申请实施例中,第一子树的层数码流、第一子树的索引码流,以及分组码流共同形成第一子树的第一码流,该第一码流能够表征第一子树的结构,从而表征第一子树中点云点的空间位置信息。
可选地,在本申请实施例中,第一子树的层数码流位于第一子树的分组码流之前,且第一子树的分组码流位于索引码流之前。
具体地,在对一个层数信息编码之后,若该层数范围内包括非对称层,则先对非对称层的分组信息进行编码,再对非对称层中子块的位置信息进行编码。对该层数范围内的全部层编码完成后,在对下一个层数信息进行编码,按照该方式依次进行,直到完成对第一子树的编码。采用该编码方式,编码得到的第一码流中,层数码流、分组码流以及索引码流中的比特分散在第一码流中,而不是集中于第一码流中的某一段。
举例来说,对于图17中的第一子树,编码顺序如下:
对第0层至第1层之间的层数0进行编码,对第1层子块在第一子块中的位置索引进行编码。
然后对第1层至第2层之间的层数0进行编码,对第1层中两个子块的下一层子块的数量进行编码,对第1层中两个子块的下一层子块在该两个子块中的位置索引进行编码。
然后对第2层至第3层之间的层数0进行编码,对第2层中三个子块的下一层子块的数量进行编码,对第2层中三个子块的下一层子块在该三个子块中的位置索引进行编码。
然后对第3层至第m层之间的层数m-4进行编码,依次对第3层以及第3层往下每一层的5个子块进行位置索引编码,形成第一子树的第一码流。
在一种情况中,如图17所示,从第3层至第m层,位于同一层的5个子块的下一层子块在该5个子块中的位置索引相同,具体来说,第4层的5个子块在第3层的5个子块中,位置索引相同,且第5层的5个子块在第4层的5个子块中,位置索引也相同,依次类推,第i层的5个子块在第i-1层的5个子块中的位置索引相同,其中,4≤i≤m,i为正整数。
则此时,在对第3层至第m层的子块进行位置索引编码时,对每层多个子块的同一位置索引进行编码,具体来说,在对第3层的多个子块的位置索引进行编码时,不再对多个位置索引进行编码,而只对一个位置索引进行编码,同理,第4层至第m层,每一层均只对一个位置索引进行编码。
同样的,在本申请实施例中,若在第一子树中,两层特殊层之间,或者最后一层特殊层至第一子树的最后一层之间,每层多个子块的下一层子块在每层多个子块中的位置索引为同一位置索引,则对每层多个子块的同一位置索引进行编码。
采用本申请实施例的方法,能够进一步减小编码比特位数,提高编解码效率。
对于上述申请实施例,可以在预设条件的基础上,进一步增加对第一子树的其它限制,从而采用不同的编码方法,优化编码过程,减小点云编码的比特位,提高编解码效率。
图20示出了另一种点云的编码方法100的示意性流程框图。
如图20所示,该点云的编码方法100还可以包括以下步骤。
S130:按照广度优先的编码顺序对点云中除第一子树以外的其它子块进行编码。
对点云中的第一子树编码后,按照广度优先的编码顺序对点云中除第一子树外其它的子块进行编码。
具体地,对点云中的第一子树编码后,对点云中第二子块进行编码,在广度优先的编码顺序上,第二子块位于第一子树的根节点块之后。
然后,仍旧按照广度优先编码方式,依次对点云经过多叉树划分后的树结构中的每一层子块进行编码,当编码至第一子树中的子块时,则跳过对第一子树中子块的编码。
可选地,在对点云中除第一子树外其它子块进行编码时,也可以在对其它子块编码之前,判断其子树结构是否满足预设条件,若满足预设条件,则也可以采用上述方法进行编码。换言之,点云的树结构中可以包括多个上述第一子树,在采用广度优先遍历顺序遍历点云的树结构时,可以在每个第一子树的根节点块处,切换至深度优先遍历顺序,优先对第一子树中的子块进行编码。
上文主要描述了第一子树的相关编码过程,由于第一子树的编码方式不同于点云中其它子块的编码方式,因此,在对第一子树进行编码之前,需要对该第一子树的编码方式进行标识,方便解码端解码得到相关信息。
图21示出了另一种点云的编码方法100的示意性流程框图。
如图21所示,该点云的编码方法100还可以包括以下步骤。
S140:对第一标识进行编码形成第一标识码流,该第一标识用于标识目标编码方式。
如图21所示,该步骤140可以在步骤S120之前执行,即确定第一子树后,对标识目标编码方式的标识符,即第一标识进行编码。
可选地,该第一标识可以为任意形式的标识符,例如,可以为数字、字母或者字符,本申请实施例对此不做具体限定。
在一些实施方式中,第一标识可以用于标识该目标编码方式为多种深度优先的编码方式的一种,例如,深度优先的编码方式包括但不限于是本申请中的目标编码方式以及孤立点直接编码方式。
具体地,当当前子块同时满足下列三个条件时生效该孤立点直接编码方式,1.几何头信息中孤立点直接编码模式标识符为1;2.当前子块内仅含有一个点云数据点;3.当前子块内的点的待编码莫顿码位数之和大于未到达最小边长方向的数目的二倍;由于当前子块内仅含有一个点云点,则直接编码该点云点几何坐标对应莫顿码的未编码的比特,具体的按照x,y,z顺序依次逐编码,其中已经到达最小边长的方向不需编码。
因此,本申请实施例中的第一标识可以用于区分目标编码方式与其他深度优先的编码方式。
例如,用于标识孤立点直接编码方式的标识符为0,本申请中用于标识目标编码方式的第一标识为1。
当然,第一标识不仅仅可以用于标识目标编码方式为多种深度优先的编码方式的哪一种,还可以用于标识目标编码方式为全部编码方式中的哪一种。
可选地,可以采用现有技术中任意一种二值化方法对上述第一标识进行二值化处理,然后再进行熵编码后续过程,得到第一标识码流。
其中,该二值化方法包括但不限于定长码编码方法或者变长码编码方法。该变长码编码方法包括但不限于截断莱斯码、K阶指数哥伦布、一元码等等编码方法。该定长码编码方法和变长码编码方法可以参见现有技术中的相关描述,此处不再赘述。
在一些实施方式中,第一标识码流位于第一子树的第一码流之前。
在另一些实施方式中,第一标识码流也可以位于点云的几何头码流中。
在此情况下,若点云的几何头信息中不包括用于标识其它编码方式的标识符,则该第一标识除了标识第一子树的编码方式为目标编码方式以外,还可以用于标识点云中其它符合预设条件的子树的编码方式为目标编码方式。
在第三种实施方式中,第一标识码流还可以同时位于的第一码流之前以及几何头码流中。
在此情况下,位于几何头码流中的第一标识码流用于标识点云中可以采用目标编码方式进行编码,而位于第一码流之前的第一标识码流用于标识第一子块的编码方式为目标编码方式。
图22示出了另一种点云的编码方法100的示意性流程框图。
如图22所示,该点云的编码方法100还可以包括以下步骤。
S150:对第二标识进行编码形成第二标识码流,该第一标识用于标识编码方式由广度优先切换至深度优先。
具体地,在采用第一标识的基础上,还可以在该第一标识之前增加第二标识符,用于标识编码方式由广度优先切换至深度优先。
可选地,可以根据划分方式对第二标识进行编码,若为八叉树划分时,第二标识可以编码为8bit 0,若为四叉树划分时,第二标识可以编码为4bit 0,若为二叉树划分时,第二标识可以编码为2bit 0。
可选地,编码后的第二标识码流位于上述第一码流之前。
进一步地,若第一标识码流也位于上述第一码流之前,该编码后的第二标识码流位于上述第一标识码流之前。
上文结合图9至图22说明了本申请中点云的编码方法,下面结合图23至图28,说明本申请中点云的解码方法,可以理解的是,点云的解码过程为编码的逆过程,解码过程中相关的技术方案可以参考上文中编码方法的相关描述。
图23示出了一种点云的解码方法200的示意性流程框图。
如图23所示,该点云的解码方法200可以包括以下步骤。
S210:接收第一码流。
S220:采用深度优先的目标解码方式对第一码流进行解码得到点云经过多叉树划分后的第一子树,该第一子树的子块中至多两个子块的下一层子块的数量大于N,其它子块的下一层子块的数量均小于等于N,且第一子树的每个子块均包括点云点。
具体地,该第一码流可以为上文中采用点云的编码方法100编码得到的第一子树的第一码流。对应于上文中的编码方法100,在本申请实施例中,接收第一码流之后,采用深度优先的目标解码方式对该第一码流进行解码,可以重建得到点云经过多叉树划分后其中的第一子树结构。
在一些实施例中,N≤2。具体地,在一些情况下,该第一子树的子块中至多两个子块的下一层子块的数量大于2,而其它子块的下一层子块的数量均小于等于2,在另一些情况下,该第一子树的子块中至多两个子块的下一层子块的数量大于1,而其它子块的下一层子块的数量均等于1,其中,子块的下一层子块即当前子块经过划分后得到的包括点云点的子块,该第一子树中,每个子块均包括点云点。
采用本申请实施例的方法,能够摆脱广度优先的解码方式对于编码顺序的严格要求,有利于点云解码过程的并行化,提高解码效率。
另外,由于编码端对于第一子树的编码方法能够降低第一子树的编码比特位,即降低第一码流的长度,因此,采用对应的解码方法也能够较为快速的对第一码流进行解码,从而进一步提高解码效率。
图24示出了另一种点云的解码方法200的示意性流程框图。
在本申请实施例中,第一码流包括层数码流以及索引码流两部分,在此情况下,对第一码流解码得到的第一子树为对称结构。
如图24所示,上述步骤S220可以包括以下步骤。
S221:对第一码流中的层数码流进行解码得到第一子树的层数信息。
对应于上文编码方法中的步骤S121,在本申请实施例中,对第一码流中的层数码流进行解码可以得到第一子树中的层数信息。
在一些实施方式中,对层数码流解码得到的层数信息直接可以为层数值,在另一些实施方式中,对层数码流解码得到的层数信息为层数差值,需要将该差值与预设层数相加,还原得到层数值。
可选地,该预设层数为编码端和解码端约定的数值。
可选地,点云的码流中包括该预设层数码流,例如,该预设层数码流可以位于点云的几何头码流中,解码端可以从点云的几何头码流中解码得到该预设层数的信息,或者该预设层数码流也可以位于点云码流的其他位置上,解码端也可以从点云码流的其它位置解码得到该预设层数的信息。
若第一子树中没有特殊层,则第一子树中每一层子块数量均与上一层一直,对层数码流解码得到一个层数值或者层数差值,该层数值或者层数差值可以用于得到第一子树的层数。作为示例,在该情况下,解码得到的第一子树的层数结构可以参见图12以及上文中的相关说明。
若第一子树中存在一层特殊层,解码得到的层数信息为第一子树的第零层至该特殊层之间的层数值或者层数差值、以及该特殊层至所述第一子树中的最后一层之间的层数值或者层数差值。作为示例,在该情况下,解码得到的第一子树的层数结构可以参见图14以及上文中的相关说明。
若第一子树中存在多层特殊层,解码得到的层数信息为第一子树的第零层至第一层特殊层之间的层数值或者层数差值、相邻两层特殊层之间的层数值或者层数差值以及最后一层特殊层至第一子树中的最后一层之间的层数值或者层数差值。作为示例,在该情况下,解码得到的第一子树的层数结构可以参见图13以及上文中的相关说明。
可选地,可以采用现有技术中任意一种二值化方法对上述层数和预设层数进行二值化处理,然后再进行熵解码后续过程,得到层数码流。
其中,该二值化方法包括但不限于定长码解码方法或者变长码解码方法。该变长码解码方法包括但不限于截断莱斯码、K阶指数哥伦布、一元码等等解码方法。该定长码解码方法和变长码解码方法可以对应于编码端的编码方法,由编码段和解码端进行约定,此外,该定长码解码方法和变长码解 码方法可以参见现有技术中的相关描述,此处不再赘述。
S222:对第一码流中的索引码流进行解码得到第一子树中子块的位置信息。
对应于上文编码方法中的步骤S122,在本申请实施例中,对第一码流中的索引码流进行解码可以得到第一子树中子块的位置信息。
在一些实施方式中,对该索引码流解码得到第一子树中子块的位置索引,具体的,可以解码得到第一子树中每个子块的下一层子块在每个子块中的位置索引。
具体地,若当前子块的块划分方式为八叉树划分,则当前子块的一个下一层子块的一个位置索引为3bit流,若当前子块的块划分方式为四叉树划分,则当前子块的一个下一层子块的一个位置索引为2bit流,若当前子块的块划分方式为二叉树划分,则当前子块的一个下一层子块的位置索引为1bit流。
在一些实施方式中,可以采用如下第一规则对第一子树中的子块进行划分判断:
若第一子树中一个子块在三个方向上未达到预设值,对该子块进行八叉树划分,解码3bit得到一个下一层子块在该一个子块中的一个位置索引;
若第一子树中一个子块在二个方向上未达到预设值,对该子块进行四叉树划分,解码2bit得到一个下一层子块在该一个子块中的一个位置索引;
若该第一子树中一个子块在一个方向上未达到预设值,对该子块进行二叉树划分,解码1bit得到一个下一层子块在该一个子块中的一个位置索引。
上述预设值可以为叶子节点块的边长,例如可以为1。
在另一种实施方式中,除了上述第一规则外,当前子块的划分方式也可以采用现有技术中的划分方式,或者根据其它约定的划分方式,或者根据固定的划分方式对当前子块进行划分,本申请实施例对此不做具体限定。
可选地,在一些实施例中,若第一子树的最后一层子块为叶子节点块时,采用上述第一规则对第一子树中的子块进行块划分;而若第一子树的最后一层子块不为叶子节点块,则可以采用第二规则对第一子树中的子块进行块划分,该第二规则为点云中除第一子树外的其它子块的划分方式。作为示例,第二规则可以为上文中根据表1和表2的条件确定的划分方式规则,或者第二规则也可以为现有技术中其它任意的划分方式规则。
在本申请实施例中,第一码流中的索引码流位于层数码流之后。举例来说,接收第一码流之后,先对层数码流进行解码,得到一个或者多个层数值,然后对索引码流进行解码,得到每一层中每个子块的下一层子块在当前子块中的位置索引,从而还原第一子树的树结构,即还原点云中第一子树中点云点位置的相关信息。
例如,若对层数信息进行解码得到层数1,以及层数m-3两个值,说明第一子树中包括一层特殊层,且该特殊层位于第2层,且该第一子树一共包括m层,除了第2层以外,其它层均为非特殊层,即其它层中每一层子块的数量均与上一层子块数量相等。然后,根据该层数信息,对后续的索引码流解码得到每一层中子块的下一层子块在当前子块中的位置索引,从而确定每一层中子块的位置。在该情况下,对第一码流解码得到的第一子树结构可以参见图14所示。
在一些情况下,同一层具有多个子块,但对该层子块的索引码流只解码得到一个位置索引,则此时同一层的多个子块中的位置索引为同一位置索引。
例如,若对层数信息进行解码得到层数1,以及层数m-3两个值后,根据该层数信息,对后续的索引码流解码,其中,第3层至第m层的索引码流中,每一层仅有一个位置索引码流,则确定在第3层至第m中,第i层的多个子块在第i-1层的多个子块中的位置索引相同,其中,3≤i≤m,i为正整数。根据该位置索引码流,确定每一层中子块的位置。在该情况下,对第一码流解码得到的第一子树结构可以参见图14所示,且图14中,第3层至第m层中,每层4个子块的下一层子块在每层4个子块中的位置索引为同一位置索引。
总结来说,在本申请实施例中,若两层特殊层之间,或者最后一层特殊层至第一子树的最后一层之间,每层多个子块的下一层子块在每层多个子块中的位置索引为同一位置索引,则对每层多个子块的同一位置索引进行解码。
采用上文图24中的解码方法200,解码得到的第一子树为对称结构,换言之,在编码端中,第一子树的预设条件中增加限定第一子树为对称结构,则采用上文图15中的编码方法,以及图24中的解码方法。
采用本申请实施例中解码方法200解码得到的第一子树结构包括但不限 于是图10至图14中所示的第一子树结构,还可以为其它对称结构,且满足预设条件的第一子树结构。
图25示出了另一种点云的解码方法200的示意性流程框图。
在本申请实施例中,第一码流包括层数码流、索引码流以及第一子树中非对称层的分组码流三部分,在此情况下,对第一码流解码得到的第一子树为非对称结构。
如图25所示,上述步骤S220可以包括以下步骤。
S221:对第一码流中的层数码流进行解码得到第一子树的层数信息。
S223:对第一码流中的分组码流进行解码得到第一子树中非对称层的分组信息。
S222:对第一码流中的索引码流进行解码得到第一子树中子块的位置信息。
具体地,本申请实施例中,步骤S221和步骤S222可以参见图25中的相关描述,此处不再赘述。
具体地,在步骤S223中,对分组码流进行解码可以得到第一子树中非对称层的分组信息,即解码得到非对称层中每个子块的下一层子块数量。
可选地,在本申请实施例中,第一子树的层数码流位于第一子树的分组码流之前,且第一子树的分组码流位于索引码流之前。
具体地,在第一码流中,部分层数码流之后,为索引码流,或者部分层数码流之后,为分组码流,在分组码流之后为索引码流。换言之,在本申请实施例的第一码流中,层数码流、分组码流以及索引码流中的比特分散在第一码流中,而不是集中于第一码流中的某一段。
举例来说,对于图17中的第一子树的第一码流,解码顺序如下:
对第一码流中的层数码流进行解码,得到对第0层至第1层之间的层数为0,对其后的索引码流进行解码得到第1层子块在第0层子块中的位置索引。
然后继续对第一码流中的层数码流进行解码,得到第1层至第2层之间的层数0,对其后的分组码流进行解码得到第1层中两个子块的下一层子块的数量,然后对其后的索引码流进行解码得到第1层中两个子块的下一层子块在该两个子块中的位置索引。
然后继续对第一码流中的层数码流进行解码,得到第2层至第3层之间 的层数0,对其后的分组码流进行解码得到第2层中三个子块的下一层子块的数量,然后对其后的索引码流进行解码得到第2层中三个子块的下一层子块在该三个子块中的位置索引。
然后继续对第一码流中的层数码流进行解码,得到第3层至第m层之间的层数m-4,对其后的索引码流进行解码得到第3层以及第3层往下每一层的5个子块的位置索引。
在一些情况下,同一层具有多个子块,但对该层子块的索引码流只解码得到一个位置索引,则此时同一层的多个子块中的位置索引为同一位置索引。
例如,在上述对图17的第一子树的第一码流进行解码的过程中,第3层至第m层的索引码流中,每一层仅有一个位置索引码流,则确定在第3层至第m中,第i层的多个子块在第i-1层的多个子块中的位置索引相同,其中,3≤i≤m,i为正整数。根据该位置索引码流,确定每一层中子块的位置。在该情况下,对第一码流解码得到的图17中的第一子树结构中,其第3层至第m层中,每层4个子块的下一层子块在每层4个子块中的位置索引为同一位置索引。
总结来说,在本申请实施例中,若两层特殊层之间,或者最后一层特殊层至第一子树的最后一层之间,每层多个子块的下一层子块在每层多个子块中的位置索引为同一位置索引,则对每层多个子块的同一位置索引进行解码。
采用上文图25中的解码方法200,解码得到的第一子树为非对称结构,换言之,在编码端中,第一子树的预设条件中增加限定第一子树为非对称结构,则采用上文图19中的编码方法,以及图25中的解码方法。
采用本申请实施例中解码方法200解码得到的第一子树结构包括但不限于是图17至图18中所示的第一子树结构,还可以为其它非对称结构,且满足预设条件的第一子树结构。
图26示出了另一种点云的解码方法200的示意性流程框图。
如图26所示,该点云的解码方法200还可以包括以下步骤。
S230:接收第二码流,按照广度优先的解码方式对第二码流进行解码,得到点云中除第一子树以外的其它子块。
对第一码流解码得到点云中的第一子树后,对接收的第二码流,按照广 度优先的解码方式对第二码流进行解码,得到点云中除第一子树外其它的子块。
具体地,对第一码流解码后,对第二码流首先解码得到点云中第二子块,在广度优先顺序上,第二子块位于第一子树的根节点块之后。
然后,对第二码流继续进行解码,得到点云经过多叉树划分后的树结构中的每一层子块,当解码至第一子树中的子块时,则跳过该第一子树中子块,直至解码到树结构的叶子节点子块,实现空间位置坐标的重建。
上文主要描述了第一码流的相关解码过程,由于第一码流的解码方式不同于点云中码流的解码方式,因此,在对第一码流进行解码之前,需要对相关标识码流进行解码,得到该第一码流的解码方式的相关信息。
图27示出了另一种点云的解码方法200的示意性流程框图。
如图27所示,该点云的解码方法200还可以包括以下步骤。
S240:接收第一标识码流,对该第一标识码流进行解码得到第一标识,该第一标识用于标识目标编码方式,该目标编码方式为对应于目标解码方式的编码方式。
如图27所示,该步骤240可以在步骤S210之前执行,即在接收第一码流之前,接收到第一标识码流,并对该第一标识码流解码可以得到后续对第一码流的解码方式。
可选地,解码得到的该第一标识可以为任意形式的标识符,例如,可以为数字、字母或者字符,本申请实施例对此不做具体限定。
在一些实施方式中,第一标识可以用于标识该目标编码方式为多种深度优先的编码方式的一种,例如,深度优先的编码方式包括但不限于是本申请中的目标编码方式以及孤立点直接编码方式。
因此,本申请实施例中的第一标识可以用于区分目标编码方式与其他深度优先的编码方式。
例如,用于标识孤立点直接编码方式的标识符为0,本申请中用于标识目标编码方式的第一标识为1。
当然,第一标识不仅仅可以用于标识目标编码方式为多种深度优先的编码方式的哪一种,还可以用于标识目标编码方式为全部编码方式中的哪一种。
可选地,可以采用现有技术中任意一种二值化解码方法对上述第一标识 码流进行二值化解码处理,然后再进行熵解码后续过程,得到第一标识。
其中,该二值化解码方法包括但不限于定长码解码方法或者变长码解码方法。该变长码解码方法包括但不限于截断莱斯码、K阶指数哥伦布、一元码等等解码方法。该定长码解码方法和变长码解码方法可以对应于编码端的编码方法,由编码段和解码端进行约定,此外,该定长码解码方法和变长码解码方法可以参见现有技术中的相关描述,此处不再赘述。
在一些实施方式中,第一标识码流位于第一子树的第一码流之前。
在另一些实施方式中,第一标识码流也可以位于点云的几何头码流中。
在此情况下,若点云的几何头信息中不包括用于标识其它编码方式的标识符,则该第一标识除了标识第一子树的编码方式为目标编码方式以外,还可以用于标识点云中其它符合预设条件的子树的编码方式为目标编码方式。
在第三种实施方式中,第一标识码流还可以同时位于的第一码流之前以及几何头码流中。
在此情况下,位于几何头码流中的第一标识码流用于标识点云中可以采用目标编码方式进行编码,而位于第一码流之前的第一标识码流用于标识第一子块的编码方式为目标编码方式。
图28示出了另一种点云的解码方法200的示意性流程框图。
如图28所示,该点云的解码方法200还可以包括以下步骤。
S250:接收第二标识码流,对第二标识码流进行解码得到第二标识,该第二标识用于标识编码方式由广度优先切换至深度优先。
可选地,在接收第一标识码流之前,还可以接收第二标识码流,对该第二标识码流解码得到第二标识,该第二标识用于标识编码方式由广度优先切换至深度优先。
可选地,可以根据划分方式对第二标识码流进行解码,若为八叉树划分时,第二标识码流为8bit 0,若为四叉树划分时,第二标识码流为4bit 0,若为二叉树划分时,第二标识码流为2bit 0。
可选地,第二标识码流位于上述第一码流之前。
进一步地,若第一标识码流也位于上述第一码流之前,该第二标识码流位于上述第一标识码流之前。
上文结合图9至图22,详细描述了本申请的点云的编码方法实施例,下文结合图29,详细描述本申请的点云的编码装置实施例,应理解,装置实施 例与方法实施例相互对应,类似的描述可以参照方法实施例。
图29是根据本申请实施例的点云的编码装置10的示意性框图,该点云的编码装置10对应于点云的编码方法100。
如图29所述,所述点云的编码装置10包括:处理器11和存储器12;
存储器12可用于存储程序,处理器11可用于执行存储器中存储的程序,以执行如下操作:确定点云经过多叉树划分后的第一子树,其中,该第一子树的子块中至多两个子块的下一层子块的数量大于N,其它子块的下一层子块的数量均小于等于N,该第一子树的每个子块均包括点云点,N为根据该多叉树划分方式确定的正整数;采用深度优先的目标编码方式对该第一子树进行编码以形成该第一子树的第一码流。
可选地,在本申请的一个实施例中,该处理器11可以为点云的编码装置10所在的电子设备的处理器或控制器。
在一种可能的实施方式中,该多叉树划分包括:八叉树划分、四叉树划分、二叉树划分中的一种或多种,N≤2。
在一种可能的实施方式中,该第一子树为对称结构,该第一子树的一层中仅包括一个子块,或者一层中多个子块的下一层子块的数量相等。
在一种可能的实施方式中,该处理器11用于:对该第一子树的层数信息以及该第一子树中子块的位置信息进行编码以形成该第一子树的第一码流。
在一种可能的实施方式中,该处理器11用于:若该第一子树中不包括特殊层,对该第一子树的层数进行编码以形成该第一码流中的层数码流;或者,
若该第一子树中包括特殊层,对该第一子树的第零层至第一层特殊层之间的层数、相邻两层特殊层之间的层数以及最后一层特殊层至该第一子树中的最后一层之间的层数进行编码以形成该第一码流中的层数码流;其中,该特殊层中子块的数量与其上一层中子块的数量不一致。
在一种可能的实施方式中,该处理器11用于:将该层数减去预设层数得到层数差值,对该层数差值进行编码以形成该第一码流中的层数码流。
在一种可能的实施方式中,该处理器11用于:采用定长码编码方式或者变长码编码方式对该层数差值进行编码以形成该第一码流中的层数码流。
在一种可能的实施方式中,该处理器11还用于:对该预设层数进行编 码以形成预设层数码流,该预设层数码流位于该点云的几何头码流中。
在一种可能的实施方式中,该处理器11用于:对该第一子树中每个子块的下一层子块在每个子块中的位置索引进行编码以形成该第一码流中的索引码流。
在一种可能的实施方式中,该处理器11用于:若采用八叉树划分方式对该第一子树中一个子块划分得到下一层子块,一个下一层子块在该一个子块中的一个位置索引编码为3比特;
若采用四叉树划分方式对该第一子树中一个子块划分得到下一层子块,一个下一层子块在该一个子块中的一个位置索引编码为2比特;
若采用二叉树划分方式对该第一子树中一个子块划分得到下一层子块,一个下一层子块在该一个子块中的一个位置索引编码为1比特。
在一种可能的实施方式中,该处理器11用于:若该第一子树中最后一层子块为叶子节点块,基于第一规则对该第一子树中每个子块进行划分,得到每个子块的下一层子块;
若该第一子树中最后一层子块不为叶子节点块,基于第二规则对该第一子树中每个子块进行划分,得到每个子块的下一层子块;
其中,该第一规则和该第二规则用于判定该第一子树中每个子块的划分方式。
在一种可能的实施方式中,该处理器11用于:若该第一子树中一个子块在三个方向上未达到预设值,采用八叉树划分方式对该一个子块划分得到下一层子块;
若该第一子树中一个子块在二个方向上未达到预设值,采用四叉树划分方式对该一个子块划分得到下一层子块;
若该第一子树中一个子块在一个方向上未达到预设值,采用二叉树划分方式对该一个子块划分得到下一层子块。
在一种可能的实施方式中,若该第一子树包括一层特殊层,且该特殊层至该第一子树的最后一层之间,每层多个子块的下一层子块在该每层多个子块中的位置索引为同一位置索引;
该处理器11用于:对该特殊层至该第一子树的最后一层之间,每层多个子块的下一层子块在该每层多个子块中的同一位置索引进行编码以形成该第一码流中的索引码流。
在一种可能的实施方式中,若该第一子树包括多层特殊层,且该多层特殊层的两层特殊层之间,或者最后一层特殊层至该第一子树的最后一层之间,每层多个子块的下一层子块在该每层多个子块中的位置索引为同一位置索引;
该处理器11用于:对该第一子树中的两层特殊层之间,或者最后一层特殊层至该第一子树的最后一层之间,每层多个子块的下一层子块在该每层多个子块中的同一位置索引进行编码。
在一种可能的实施方式中,在该第一码流中,该层数码流位于该索引码流之前。
在一种可能的实施方式中,该第一子树中每个子块的下一层子块数量均小于等于2。
在一种可能的实施方式中,该第一子树中仅一个子块的下一层子块的数量等于2,其它子块的下一层子块的数量等于1。
在一种可能的实施方式中,该第一子树中每个子块的下一层子块的数量等于1。
在一种可能的实施方式中,该第一子树中至多两个子块的下一层子块的数量大于2,该至多两个子块的下一层子块为该第一子树的子块。
在一种可能的实施方式中,该第一子树的子块中仅一个子块的下一层子块的数量大于2,其它子块的下一层子块数量等于1。
在一种可能的实施方式中,该第一子树为非对称结构,该第一子树包括至少一层非对称层,该非对称层中不同子块的下一层子块的数量不相等。
在一种可能的实施方式中,该处理器11用于:对该第一子树的层数信息、该第一子树中子块的位置信息、以及该第一子树中非对称层的分组信息进行编码以形成该第一子树的第一码流。
在一种可能的实施方式中,该处理器11用于:对该第一子树的第零层至第一层特殊层之间的层数、相邻两层特殊层之间的层数以及最后一层特殊层至该第一子树中的最后一层之间的层数进行编码以形成该第一码流中的层数码流;其中,该特殊层中子块的数量与其上一层中子块的数量不一致。
在一种可能的实施方式中,该处理器11用于:对该第一子树中每个子块的下一层子块在每个子块中的位置索引进行编码以形成该第一码流中的索引码流。
在一种可能的实施方式中,该处理器11用于:对该非对称层中每个子块的下一层子块在每个子块中的位置索引进行编码之前,对该非对称层中每个子块的下一层子块数量进行编码,以形成该第一码流中的分组码流。
在一种可能的实施方式中,在该第一码流中,该分组码流位于该索引码流之前,该层数码流位于该分组码流之前。
在一种可能的实施方式中,该第一子树中每个子块的下一层子块数量均小于等于2。
在一种可能的实施方式中,该第一子树中至多两个子块的下一层子块的数量大于2,该至多两个子块的下一层子块为该第一子树的子块。
在一种可能的实施方式中,该处理器11还用于:对第一标识进行编码形成第一标识码流,该第一标识用于标识该目标编码方式。
在一种可能的实施方式中,该第一标识码流为采用定长码或者变长码编码方式编码得到的码流。
在一种可能的实施方式中,该第一标识码流位于该第一子树的第一码流之前;和/或,该第一标识码流位于该点云的几何头码流中。
在一种可能的实施方式中,该处理器11还用于:对第二标识进行编码形成第二标识码流,该第二标识用于标识编码方式由广度优先切换至深度优先。
在一种可能的实施方式中,该第二标识码流位于该第一标识码流之前。
在一种可能的实施方式中,该处理器11还用于:按照广度优先的编码顺序对该点云中除该第一子树以外的其它子块进行编码以形成第二码流。
在一种可能的实施方式中,该处理器11用于:对该点云中第二子块进行编码,在广度优先的编码顺序上,该第二子块位于该第一子树的根节点块之后。
上文结合图23至图28,详细描述了本申请的点云的解码方法实施例,下文结合图30,详细描述本申请的点云的解码装置实施例,应理解,装置实施例与方法实施例相互对应,类似的描述可以参照方法实施例。
图30是根据本申请实施例的点云的解码装置20的示意性框图,该点云的解码装置20对应于点云的解码方法200。
如图30所述,所述点云的解码装置20包括:处理器21和存储器22;
存储器22可用于存储程序,处理器21可用于执行存储器中存储的程序, 以执行如下操作:接收第一码流;采用深度优先的目标解码方式对该第一码流进行解码得到点云经过多叉树划分后的第一子树;其中,该第一子树的子块中至多两个子块的下一层子块的数量大于N,其它子块的下一层子块的数量均小于等于N,该第一子树的每个子块均包括点云点。
可选地,在本申请的一个实施例中,该处理器21可以为点云的解码装置20所在的电子设备的处理器或控制器。
在一种可能的实施方式中,该多叉树划分包括:八叉树划分、四叉树划分、二叉树划分中的一种或多种,N≤2。
在一种可能的实施方式中,该第一码流包括层数码流以及索引码流,该处理器21用于:对该第一码流中的层数码流进行解码得到该第一子树的层数信息,对该第一码流中的索引码流进行解码得到该第一子树中子块的位置信息,根据该层数信息以及该位置信息得到该第一子树。
在一种可能的实施方式中,该处理器21用于:对该第一码流中的层数码流进行解码得到该第一子树的层数;或者,对该第一码流中的层数码流进行解码得到该第一子树的第零层至第一层特殊层之间的层数、相邻两层特殊层之间的层数以及最后一层特殊层至该第一子树中的最后一层之间的层数;其中,该特殊层中子块的数量与其上一层中子块的数量不一致。
在一种可能的实施方式中,该处理器21用于:对该第一码流中的层数码流进行解码得到一个层数差值,将该一个层数差值加预设层数得到该第一子树的层数,或者,
对该第一码流中的层数码流进行解码得到多个层数差值,将该多个层数差值加预设层数得到该第一子树的第零层至第一层特殊层之间的层数、相邻两层特殊层之间的层数以及最后一层特殊层至该第一子树中的最后一层之间的层数。
在一种可能的实施方式中,该处理器21用于:采用定长码解码方式或者变长码解码方式对该第一码流中的层数码流进行解码得到该第一子树的层数信息。
在一种可能的实施方式中,该处理器21还用于:接收预设层数码流;对该预设层数码流进行解码得到该预设层数,该预设层数码流位于该点云的几何头码流中。
在一种可能的实施方式中,该处理器21用于:对该第一码流中的索引 码流进行解码得到该第一子树中每个子块的下一层子块在该每个子块中的位置索引。
在一种可能的实施方式中,该处理器21用于:若采用八叉树划分方式对该第一子树中一个子块划分得到下一层子块,对该索引码流中3比特码流进行解码得到一个该下一层子块在该一个子块中的一个位置索引;
若采用四叉树划分方式对该第一子树中一个子块划分得到下一层子块,对该索引码流中2比特码流进行解码得到一个该下一层子块在该一个子块中的一个位置索引;
若采用二叉树划分方式对该第一子树中一个子块划分得到下一层子块,对该索引码流中1比特码流进行解码得到一个该下一层子块在该一个子块中的一个位置索引。
在一种可能的实施方式中,该处理器21还用于:若该第一子树中最后一层子块为叶子节点块,基于第一规则对该第一子树中每个子块进行划分,得到每个子块的下一层子块;
若该第一子树中最后一层子块不为叶子节点块,基于第二规则对该第一子树中每个子块进行划分,得到每个子块的下一层子块;
其中,该第一规则和该第二规则用于判定该第一子树中每个子块的划分方式。
在一种可能的实施方式中,该处理器21用于:若该第一子树中一个子块在三个方向上未达到预设值,采用八叉树划分方式对该一个子块划分得到下一层子块;
若该第一子树中一个子块在二个方向上未达到预设值,采用四叉树划分方式对该一个子块划分得到下一层子块;
若该第一子树中一个子块在一个方向上未达到预设值,采用二叉树划分方式对该一个子块划分得到下一层子块。
在一种可能的实施方式中,该第一子树包括一层特殊层,该处理器21用于:对该第一码流中的索引码流进行解码得到该第一子树中,该特殊层至该第一子树的最后一层之间,每层多个子块的下一层子块在该每层多个子块中的同一位置索引。
在一种可能的实施方式中,该第一子树包括多层特殊层,该处理器21用于:对该第一码流中的索引码流进行解码得到该第一子树中,该多层特殊 层的两层特殊层之间,或者最后一层特殊层至该第一子树的最后一层之间,每层多个子块的下一层子块在该每层多个子块中的同一位置索引。
在一种可能的实施方式中,在该第一码流中,该层数码流位于该索引码流之前。
在一种可能的实施方式中,该第一子树为对称结构,该第一子树的一层中仅包括一个子块,或者一层中多个子块的下一层子块的数量相等。
在一种可能的实施方式中,该第一子树中每个子块的下一层子块数量均小于等于2。
在一种可能的实施方式中,该第一子树中仅一个子块的下一层子块的数量等于2,其它子块的下一层子块的数量等于1。
在一种可能的实施方式中,该第一子树中每个子块的下一层子块的数量等于1。
在一种可能的实施方式中,该第一子树中至多两个子块的下一层子块的数量大于2,该至多两个子块的下一层子块为该第一子树的子块。
在一种可能的实施方式中,该第一子树的子块中仅一个子块的下一层子块的数量大于2,其它子块的下一层子块数量等于1。
在一种可能的实施方式中,该第一码流包括层数码流、索引码流以及分组码流,该处理器21用于:
对该第一码流中的层数码流进行解码得到该第一子树的层数信息,
对该第一码流中的索引码流进行解码得到该第一子树中子块的位置信息,
对该第一码流中的分组码流进行解码得到该第一子树中非对称层的分组信息,其中,该非对称层中不同子块的下一层子块的数量不相等,
根据该层数信息、该位置信息以及该分组信息得到该第一子树。
在一种可能的实施方式中,该处理器21用于:对该第一码流中的层数码流进行解码得到该第一子树的第零层至第一层特殊层之间的层数、相邻两层特殊层之间的层数以及最后一层特殊层至该第一子树中的最后一层之间的层数;其中,该特殊层中子块的数量与其上一层中子块的数量不一致。
在一种可能的实施方式中,该处理器21用于:对该第一码流中的索引码流进行解码得到该第一子树中每个子块的下一层子块在该每个子块中的位置索引。
在一种可能的实施方式中,该处理器21用于:对该第一码流中的分组码流进行解码得到该非对称层中每个子块的下一层子块数量。
在一种可能的实施方式中,在该第一码流中,该分组码流位于该索引码流之前,该层数码流位于该分组码流之前。
在一种可能的实施方式中,该第一子树为非对称结构,该第一子树包括至少一层非对称层。
在一种可能的实施方式中,该第一子树中每个子块的下一层子块数量均小于等于2。
在一种可能的实施方式中,该第一子树中至多两个子块的下一层子块的数量大于2,该至多两个子块的下一层子块为该第一子树的子块。
在一种可能的实施方式中,该处理器21还用于:接收第一标识码流;对该第一标识码流进行解码得到第一标识,该第一标识用于标识该目标解码方式。
在一种可能的实施方式中,该处理器21用于:采用定长码解码方式或者变长码解码方式对该第一标识码流进行解码得到该第一标识。
在一种可能的实施方式中,该第一标识码流位于该第一码流之前;和/或,该第一标识码流位于该点云的几何头码流中。
在一种可能的实施方式中,该处理器21还用于:接收第二标识码流;对该第二标识码流进行解码得到第二标识,该第二标识用于标识解码方式由广度优先切换至深度优先。
在一种可能的实施方式中,该第二标识码流位于该第一标识码流之前。
在一种可能的实施方式中,该处理器21还用于:接收第二码流,按照广度优先的解码顺序对该第二码流进行解码得到该点云中除该第一子树以外的其它子块。
在一种可能的实施方式中,该处理器21用于:对该第二码流解码得到该点云中的第二子块,在广度优先的解码顺序上,该第二子块位于该第一子树的根节点块之后。
本申请实施例还提供了一种电子设备,该电子设备可以包括上述本申请各种实施例的点云的编解码装置。
应理解,本申请实施例的处理器可以是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法实施例的各步骤可以通过处理器中的硬 件的集成逻辑电路或者软件形式的指令完成。上述的处理器包括但不限于以下各种:通用处理器,中央处理器CPU、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现成可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。
可以理解,本申请实施例的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random access memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic RAM,DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,DR RAM)。应注意,本文描述的系统和方法的存储器旨在包括但不限于这些和任意其它适合类型的存储器。
本申请实施例还提出了一种计算机可读存储介质,该计算机可读存储介质存储一个或多个程序,该一个或多个程序包括指令,该指令当被包括多个应用程序的便携式电子设备执行时,能够使该便携式电子设备执行上文实施例的方法。
本申请实施例还提出了一种计算机程序,该计算机程序包括指令,当该计算机程序被计算机执行时,使得计算机可以执行上文实施例的方法。
本申请实施例还提供了一种芯片,该芯片包括输入输出接口、至少一个处理器、至少一个存储器和总线,该至少一个存储器用于存储指令,该至少一个处理器用于调用该至少一个存储器中的指令,以执行上文所示实施例的方法。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应所述理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者所述技术方案的 部分可以以软件产品的形式体现出来,所述计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应所述以权利要求的保护范围为准。

Claims (142)

  1. 一种点云的编码方法,其特征在于,包括:
    确定点云经过多叉树划分后的第一子树,其中,所述第一子树的子块中至多两个子块的下一层子块的数量大于N,其它子块的下一层子块的数量均小于等于N,所述第一子树的每个子块均包括点云点,N为根据所述多叉树划分方式确定的正整数;
    采用深度优先的目标编码方式对所述第一子树进行编码以形成所述第一子树的第一码流。
  2. 根据权利要求1所述的编码方法,其特征在于,所述多叉树划分包括:八叉树划分、四叉树划分、二叉树划分中的一种或多种,N≤2。
  3. 根据权利要求1或2所述的编码方法,其特征在于,所述第一子树为对称结构,所述第一子树的一层中仅包括一个子块,或者一层中多个子块的下一层子块的数量相等。
  4. 根据权利要求3所述的编码方法,其特征在于,所述采用深度优先的目标编码方式对所述第一子树进行编码以形成所述第一子树的第一码流,包括:
    对所述第一子树的层数信息以及所述第一子树中子块的位置信息进行编码以形成所述第一子树的第一码流。
  5. 根据权利要求4所述的编码方法,其特征在于,所述对所述第一子树的层数信息进行编码,包括:
    若所述第一子树中不包括特殊层,对所述第一子树的层数进行编码以形成所述第一码流中的层数码流;或者,
    若所述第一子树中包括特殊层,对所述第一子树的第零层至第一层特殊层之间的层数、相邻两层特殊层之间的层数以及最后一层特殊层至所述第一子树中的最后一层之间的层数进行编码以形成所述第一码流中的层数码流;
    其中,所述特殊层中子块的数量与其上一层中子块的数量不一致。
  6. 根据权利要求5所述的编码方法,其特征在于,所述对层数进行编码以形成所述第一码流中的层数码流,包括:
    将所述层数减去预设层数得到层数差值,对所述层数差值进行编码以形成所述第一码流中的层数码流。
  7. 根据权利要求6所述的编码方法,其特征在于,所述对所述层数差 值进行编码,包括:
    采用定长码编码方式或者变长码编码方式对所述层数差值进行编码以形成所述第一码流中的层数码流。
  8. 根据权利要求6或7所述的编码方法,其特征在于,所述编码方法还包括:
    对所述预设层数进行编码以形成预设层数码流,所述预设层数码流位于所述点云的几何头码流中。
  9. 根据权利要求5至8中任一项所述的编码方法,其特征在于,所述对所述第一子树中子块的位置信息进行编码,包括:
    对所述第一子树中每个子块的下一层子块在每个子块中的位置索引进行编码以形成所述第一码流中的索引码流。
  10. 根据权利要求9所述的编码方法,其特征在于,所述对所述第一子树中每个子块的下一层子块在每个子块中的位置索引进行编码,包括:
    若采用八叉树划分方式对所述第一子树中一个子块划分得到下一层子块,一个下一层子块在所述一个子块中的一个位置索引编码为3比特;
    若采用四叉树划分方式对所述第一子树中一个子块划分得到下一层子块,一个下一层子块在所述一个子块中的一个位置索引编码为2比特;
    若采用二叉树划分方式对所述第一子树中一个子块划分得到下一层子块,一个下一层子块在所述一个子块中的一个位置索引编码为1比特。
  11. 根据权利要求10所述的编码方法,其特征在于,所述对所述第一子树中每个子块的下一层子块在每个子块中的位置索引进行编码,还包括:
    若所述第一子树中最后一层子块为叶子节点块,基于第一规则对所述第一子树中每个子块进行划分,得到每个子块的下一层子块;
    若所述第一子树中最后一层子块不为叶子节点块,基于第二规则对所述第一子树中每个子块进行划分,得到每个子块的下一层子块;
    其中,所述第一规则和所述第二规则用于判定所述第一子树中每个子块的划分方式。
  12. 根据权利要求11所述的编码方法,其特征在于,所述采用第一规则对所述第一子树中每个子块进行划分,包括:
    若所述第一子树中一个子块在三个方向上未达到预设值,采用八叉树划分方式对所述一个子块划分得到下一层子块;
    若所述第一子树中一个子块在二个方向上未达到预设值,采用四叉树划分方式对所述一个子块划分得到下一层子块;
    若所述第一子树中一个子块在一个方向上未达到预设值,采用二叉树划分方式对所述一个子块划分得到下一层子块。
  13. 根据权利要求9至12中任一项所述的编码方法,其特征在于,若所述第一子树包括一层特殊层,且所述特殊层至所述第一子树的最后一层之间,每层多个子块的下一层子块在所述每层多个子块中的位置索引为同一位置索引;
    所述对所述第一子树中每个子块的下一层子块在每个子块中的位置索引进行编码以形成所述第一码流中的索引码流,包括:
    对所述特殊层至所述第一子树的最后一层之间,每层多个子块的下一层子块在所述每层多个子块中的同一位置索引进行编码以形成所述第一码流中的索引码流。
  14. 根据权利要求9至12中任一项所述的编码方法,其特征在于,若所述第一子树包括多层特殊层,且所述多层特殊层的两层特殊层之间,或者最后一层特殊层至所述第一子树的最后一层之间,每层多个子块的下一层子块在所述每层多个子块中的位置索引为同一位置索引;
    所述对所述第一子树中每个子块的下一层子块在每个子块中的位置索引进行编码,包括:
    对所述第一子树中的两层特殊层之间,或者最后一层特殊层至所述第一子树的最后一层之间,每层多个子块的下一层子块在所述每层多个子块中的同一位置索引进行编码。
  15. 根据权利要求9至14中任一项所述的编码方法,其特征在于,在所述第一码流中,所述层数码流位于所述索引码流之前。
  16. 根据权利要求3至15中任一项所述的编码方法,其特征在于,所述第一子树中每个子块的下一层子块数量均小于等于2。
  17. 根据权利要求16所述的编码方法,其特征在于,所述第一子树中仅一个子块的下一层子块的数量等于2,其它子块的下一层子块的数量等于1。
  18. 根据权利要求16所述的编码方法,其特征在于,所述第一子树中每个子块的下一层子块的数量等于1。
  19. 根据权利要求3至15中任一项所述的编码方法,其特征在于,所述第一子树中至多两个子块的下一层子块的数量大于2,所述至多两个子块的下一层子块为所述第一子树的子块。
  20. 根据权利要求3至15中任一项所述的编码方法,其特征在于,所述第一子树的子块中仅一个子块的下一层子块的数量大于2,其它子块的下一层子块数量等于1。
  21. 根据权利要求1或2所述的编码方法,其特征在于,所述第一子树为非对称结构,所述第一子树包括至少一层非对称层,所述非对称层中不同子块的下一层子块的数量不相等。
  22. 根据权利要求21所述的编码方法,其特征在于,所述采用深度优先的目标编码方式对所述第一子树进行编码以形成所述第一子树的第一码流,包括:
    对所述第一子树的层数信息、所述第一子树中子块的位置信息、以及所述第一子树中非对称层的分组信息进行编码以形成所述第一子树的第一码流。
  23. 根据权利要求22所述的编码方法,其特征在于,所述对所述第一子树的层数信息进行编码,包括:
    对所述第一子树的第零层至第一层特殊层之间的层数、相邻两层特殊层之间的层数以及最后一层特殊层至所述第一子树中的最后一层之间的层数进行编码以形成所述第一码流中的层数码流;
    其中,所述特殊层中子块的数量与其上一层中子块的数量不一致。
  24. 根据权利要求23所述的编码方法,其特征在于,所述对所述第一子树中子块的位置信息进行编码,包括:
    对所述第一子树中每个子块的下一层子块在每个子块中的位置索引进行编码以形成所述第一码流中的索引码流。
  25. 根据权利要求24所述的编码方法,其特征在于,所述对所述第一子树的非对称层的分组信息进行编码,包括:
    对所述非对称层中每个子块的下一层子块在每个子块中的位置索引进行编码之前,对所述非对称层中每个子块的下一层子块数量进行编码,以形成所述第一码流中的分组码流。
  26. 根据权利要求25所述的编码方法,其特征在于,在所述第一码流 中,所述分组码流位于所述索引码流之前,所述层数码流位于所述分组码流之前。
  27. 根据权利要求21至26中任一项所述的编码方法,其特征在于,所述第一子树中每个子块的下一层子块数量均小于等于2。
  28. 根据权利要求21至26中任一项所述的编码方法,其特征在于,所述第一子树中至多两个子块的下一层子块的数量大于2,所述至多两个子块的下一层子块为所述第一子树的子块。
  29. 根据权利要求1至28中任一项所述的编码方法,其特征在于,所述编码方法还包括:
    对第一标识进行编码形成第一标识码流,所述第一标识用于标识所述目标编码方式。
  30. 根据权利要求29所述的编码方法,其特征在于,所述第一标识码流为采用定长码或者变长码编码方式编码得到的码流。
  31. 根据权利要求29或30所述的编码方法,其特征在于,所述第一标识码流位于所述第一子树的第一码流之前;和/或,
    所述第一标识码流位于所述点云的几何头码流中。
  32. 根据权利要求29或30所述的编码方法,其特征在于,所述编码方法还包括:
    对第二标识进行编码形成第二标识码流,所述第二标识用于标识编码方式由广度优先切换至深度优先。
  33. 根据权利要求32所述的编码方法,其特征在于,所述第二标识码流位于所述第一标识码流之前。
  34. 根据权利要求1至33中任一项所述的编码方法,其特征在于,所述编码方法还包括:
    按照广度优先的编码顺序对所述点云中除所述第一子树以外的其它子块进行编码以形成第二码流。
  35. 根据权利要求34所述的编码方法,其特征在于,所述按照广度优先的编码顺序对所述点云中除所述第一子树以外的其它子块进行编码以形成第二码流,包括:
    对所述点云中第二子块进行编码,在广度优先的编码顺序上,所述第二子块位于所述第一子树的根节点块之后。
  36. 一种点云的解码方法,其特征在于,包括:
    接收第一码流;
    采用深度优先的目标解码方式对所述第一码流进行解码得到点云经过多叉树划分后的第一子树;
    其中,所述第一子树的子块中至多两个子块的下一层子块的数量大于N,其它子块的下一层子块的数量均小于等于N,所述第一子树的每个子块均包括点云点。
  37. 根据权利要求36所述的解码方法,其特征在于,所述多叉树划分包括:八叉树划分、四叉树划分、二叉树划分中的一种或多种,N≤2。
  38. 根据权利要求36或37所述的解码方法,其特征在于,所述第一码流包括层数码流以及索引码流,所述采用深度优先的目标解码方式对所述第一码流进行解码得到点云经过多叉树划分后的第一子树,包括:
    对所述第一码流中的层数码流进行解码得到所述第一子树的层数信息,
    对所述第一码流中的索引码流进行解码得到所述第一子树中子块的位置信息,
    根据所述层数信息以及所述位置信息得到所述第一子树。
  39. 根据权利要求38所述的解码方法,其特征在于,所述对所述第一码流中的层数码流进行解码得到所述第一子树的层数信息,包括:
    对所述第一码流中的层数码流进行解码得到所述第一子树的层数;或者,
    对所述第一码流中的层数码流进行解码得到所述第一子树的第零层至第一层特殊层之间的层数、相邻两层特殊层之间的层数以及最后一层特殊层至所述第一子树中的最后一层之间的层数;
    其中,所述特殊层中子块的数量与其上一层中子块的数量不一致。
  40. 根据权利要求38所述的解码方法,其特征在于,所述对所述第一码流中的层数码流解码得到所述第一子树的层数信息,包括:
    对所述第一码流中的层数码流进行解码得到一个层数差值,将所述一个层数差值加预设层数得到所述第一子树的层数,或者,
    对所述第一码流中的层数码流进行解码得到多个层数差值,将所述多个层数差值加预设层数得到所述第一子树的第零层至第一层特殊层之间的层数、相邻两层特殊层之间的层数以及最后一层特殊层至所述第一子树中的最 后一层之间的层数。
  41. 根据权利要求39或40所述的解码方法,其特征在于,所述对所述第一码流中的层数码流进行解码得到所述第一子树的层数信息,包括:
    采用定长码解码方式或者变长码解码方式对所述第一码流中的层数码流进行解码得到所述第一子树的层数信息。
  42. 根据权利要求40所述的解码方法,其特征在于,所述解码方法还包括:
    接收预设层数码流;
    对所述预设层数码流进行解码得到所述预设层数,所述预设层数码流位于所述点云的几何头码流中。
  43. 根据权利要求39至42中任一项所述的解码方法,其特征在于,所述对所述第一码流中的索引码流进行解码得到所述第一子树中子块的位置信息,包括:
    对所述第一码流中的索引码流进行解码得到所述第一子树中每个子块的下一层子块在所述每个子块中的位置索引。
  44. 根据权利要求43所述的解码方法,其特征在于,所述对所述第一码流中的索引码流进行解码得到所述第一子树中每个子块的下一层子块在所述每个子块中的位置索引,包括:
    若采用八叉树划分方式对所述第一子树中一个子块划分得到下一层子块,对所述索引码流中3比特码流进行解码得到一个所述下一层子块在所述一个子块中的一个位置索引;
    若采用四叉树划分方式对所述第一子树中一个子块划分得到下一层子块,对所述索引码流中2比特码流进行解码得到一个所述下一层子块在所述一个子块中的一个位置索引;
    若采用二叉树划分方式对所述第一子树中一个子块划分得到下一层子块,对所述索引码流中1比特码流进行解码得到一个所述下一层子块在所述一个子块中的一个位置索引。
  45. 根据权利要求44所述的解码方法,其特征在于,所述对所述第一码流中的索引码流进行解码得到所述第一子树中每个子块的下一层子块在所述每个子块中的位置索引,还包括:
    若所述第一子树中最后一层子块为叶子节点块,基于第一规则对所述第 一子树中每个子块进行划分,得到每个子块的下一层子块;
    若所述第一子树中最后一层子块不为叶子节点块,基于第二规则对所述第一子树中每个子块进行划分,得到每个子块的下一层子块;
    其中,所述第一规则和所述第二规则用于判定所述第一子树中每个子块的划分方式。
  46. 根据权利要求45所述的解码方法,其特征在于,所述采用第一规则对所述第一子树中每个子块进行划分,包括:
    若所述第一子树中一个子块在三个方向上未达到预设值,采用八叉树划分方式对所述一个子块划分得到下一层子块;
    若所述第一子树中一个子块在二个方向上未达到预设值,采用四叉树划分方式对所述一个子块划分得到下一层子块;
    若所述第一子树中一个子块在一个方向上未达到预设值,采用二叉树划分方式对所述一个子块划分得到下一层子块。
  47. 根据权利要求43至46中任一项所述的解码方法,其特征在于,所述第一子树包括一层特殊层,所述对所述第一码流中的索引码流进行解码得到所述第一子树中每个子块的下一层子块在所述每个子块中的位置索引,包括:
    对所述第一码流中的索引码流进行解码得到所述第一子树中,所述特殊层至所述第一子树的最后一层之间,每层多个子块的下一层子块在所述每层多个子块中的同一位置索引。
  48. 根据权利要求43至46中任一项所述的解码方法,其特征在于,所述第一子树包括多层特殊层,所述对所述第一码流中的索引码流进行解码得到所述第一子树中每个子块的下一层子块在所述每个子块中的位置索引,包括:
    对所述第一码流中的索引码流进行解码得到所述第一子树中,所述多层特殊层的两层特殊层之间,或者最后一层特殊层至所述第一子树的最后一层之间,每层多个子块的下一层子块在所述每层多个子块中的同一位置索引。
  49. 根据权利要求43至48中任一项所述的解码方法,其特征在于,在所述第一码流中,所述层数码流位于所述索引码流之前。
  50. 根据权利要求38至49中任一项所述的解码方法,其特征在于,所述第一子树为对称结构,所述第一子树的一层中仅包括一个子块,或者一层 中多个子块的下一层子块的数量相等。
  51. 根据权利要求50所述的解码方法,其特征在于,所述第一子树中每个子块的下一层子块数量均小于等于2。
  52. 根据权利要求51所述的解码方法,其特征在于,所述第一子树中仅一个子块的下一层子块的数量等于2,其它子块的下一层子块的数量等于1。
  53. 根据权利要求51所述的解码方法,其特征在于,所述第一子树中每个子块的下一层子块的数量等于1。
  54. 根据权利要求50所述的解码方法,其特征在于,所述第一子树中至多两个子块的下一层子块的数量大于2,所述至多两个子块的下一层子块为所述第一子树的子块。
  55. 根据权利要求50所述的解码方法,其特征在于,所述第一子树的子块中仅一个子块的下一层子块的数量大于2,其它子块的下一层子块数量等于1。
  56. 根据权利要求36或37所述的解码方法,其特征在于,所述第一码流包括层数码流、索引码流以及分组码流,所述采用深度优先的目标解码方式对所述第一码流进行解码得到点云经过多叉树划分后的第一子树,包括:
    对所述第一码流中的层数码流进行解码得到所述第一子树的层数信息,
    对所述第一码流中的索引码流进行解码得到所述第一子树中子块的位置信息,
    对所述第一码流中的分组码流进行解码得到所述第一子树中非对称层的分组信息,其中,所述非对称层中不同子块的下一层子块的数量不相等,根据所述层数信息、所述位置信息以及所述分组信息得到所述第一子树。
  57. 根据权利要求56所述的解码方法,其特征在于,所述对所述第一码流中的层数码流进行解码得到所述第一子树的层数信息,包括:
    对所述第一码流中的层数码流进行解码得到所述第一子树的第零层至第一层特殊层之间的层数、相邻两层特殊层之间的层数以及最后一层特殊层至所述第一子树中的最后一层之间的层数;
    其中,所述特殊层中子块的数量与其上一层中子块的数量不一致。
  58. 根据权利要求57所述的解码方法,其特征在于,所述对所述第一 码流中的索引码流进行解码得到所述第一子树中子块的位置信息,包括:
    对所述第一码流中的索引码流进行解码得到所述第一子树中每个子块的下一层子块在所述每个子块中的位置索引。
  59. 根据权利要求58所述的解码方法,其特征在于,所述对所述第一码流中的分组码流进行解码得到所述第一子树中非对称层的分组信息,包括:
    对所述第一码流中的分组码流进行解码得到所述非对称层中每个子块的下一层子块数量。
  60. 根据权利要求59所述的解码方法,其特征在于,在所述第一码流中,所述分组码流位于所述索引码流之前,所述层数码流位于所述分组码流之前。
  61. 根据权利要求56至60中任一项所述的解码方法,其特征在于,所述第一子树为非对称结构,所述第一子树包括至少一层非对称层。
  62. 根据权利要求61所述的解码方法,其特征在于,所述第一子树中每个子块的下一层子块数量均小于等于2。
  63. 根据权利要求61所述的解码方法,其特征在于,所述第一子树中至多两个子块的下一层子块的数量大于2,所述至多两个子块的下一层子块为所述第一子树的子块。
  64. 根据权利要求36至63中任一项所述的解码方法,其特征在于,所述解码方法还包括:
    接收第一标识码流;
    对所述第一标识码流进行解码得到第一标识,所述第一标识用于标识所述目标解码方式。
  65. 根据权利要求64所述的解码方法,其特征在于,对所述第一标识码流进行解码得到第一标识,包括:
    采用定长码解码方式或者变长码解码方式对所述第一标识码流进行解码得到所述第一标识。
  66. 根据权利要求64或65所述的解码方法,其特征在于,所述第一标识码流位于所述第一码流之前;和/或,
    所述第一标识码流位于所述点云的几何头码流中。
  67. 根据权利要求64或65所述的解码方法,其特征在于,所述解码方 法还包括:
    接收第二标识码流;
    对所述第二标识码流进行解码得到第二标识,所述第二标识用于标识解码方式由广度优先切换至深度优先。
  68. 根据权利要求67所述的解码方法,其特征在于,所述第二标识码流位于所述第一标识码流之前。
  69. 根据权利要求36至68中任一项所述的解码方法,其特征在于,所述解码方法还包括:
    接收第二码流,按照广度优先的解码顺序对所述第二码流进行解码得到所述点云中除所述第一子树以外的其它子块。
  70. 根据权利要求69所述的解码方法,其特征在于,所述按照广度优先的解码顺序对所述第二码流进行解码得到所述点云中除所述第一子树以外的其它子块,包括:
    对所述第二码流解码得到所述点云中的第二子块,在广度优先的解码顺序上,所述第二子块位于所述第一子树的根节点块之后。
  71. 一种点云的编码装置,其特征在于,包括:处理器,
    所述处理器用于:确定点云经过多叉树划分后的第一子树,其中,所述第一子树的子块中至多两个子块的下一层子块的数量大于N,其它子块的下一层子块的数量均小于等于N,所述第一子树的每个子块均包括点云点,N为根据所述多叉树划分方式确定的正整数;
    采用深度优先的目标编码方式对所述第一子树进行编码以形成所述第一子树的第一码流。
  72. 根据权利要求71所述的编码装置,其特征在于,所述多叉树划分包括:八叉树划分、四叉树划分、二叉树划分中的一种或多种,N≤2。
  73. 根据权利要求71或72所述的编码装置,其特征在于,所述第一子树为对称结构,所述第一子树的一层中仅包括一个子块,或者一层中多个子块的下一层子块的数量相等。
  74. 根据权利要求73所述的编码装置,其特征在于,所述处理器用于:
    对所述第一子树的层数信息以及所述第一子树中子块的位置信息进行编码以形成所述第一子树的第一码流。
  75. 根据权利要求74所述的编码装置,其特征在于,所述处理器用于:
    若所述第一子树中不包括特殊层,对所述第一子树的层数进行编码以形成所述第一码流中的层数码流;或者,
    若所述第一子树中包括特殊层,对所述第一子树的第零层至第一层特殊层之间的层数、相邻两层特殊层之间的层数以及最后一层特殊层至所述第一子树中的最后一层之间的层数进行编码以形成所述第一码流中的层数码流;
    其中,所述特殊层中子块的数量与其上一层中子块的数量不一致。
  76. 根据权利要求75所述的编码装置,其特征在于,所述处理器用于:
    将所述层数减去预设层数得到层数差值,对所述层数差值进行编码以形成所述第一码流中的层数码流。
  77. 根据权利要求76所述的编码装置,其特征在于,所述处理器用于:
    采用定长码编码方式或者变长码编码方式对所述层数差值进行编码以形成所述第一码流中的层数码流。
  78. 根据权利要求76或77所述的编码装置,其特征在于,所述处理器还用于:
    对所述预设层数进行编码以形成预设层数码流,所述预设层数码流位于所述点云的几何头码流中。
  79. 根据权利要求75至78中任一项所述的编码装置,其特征在于,所述处理器用于:
    对所述第一子树中每个子块的下一层子块在每个子块中的位置索引进行编码以形成所述第一码流中的索引码流。
  80. 根据权利要求79所述的编码装置,其特征在于,所述处理器用于:
    若采用八叉树划分方式对所述第一子树中一个子块划分得到下一层子块,一个下一层子块在所述一个子块中的一个位置索引编码为3比特;
    若采用四叉树划分方式对所述第一子树中一个子块划分得到下一层子块,一个下一层子块在所述一个子块中的一个位置索引编码为2比特;
    若采用二叉树划分方式对所述第一子树中一个子块划分得到下一层子块,一个下一层子块在所述一个子块中的一个位置索引编码为1比特。
  81. 根据权利要求80所述的编码装置,其特征在于,所述处理器用于:
    若所述第一子树中最后一层子块为叶子节点块,基于第一规则对所述第一子树中每个子块进行划分,得到每个子块的下一层子块;
    若所述第一子树中最后一层子块不为叶子节点块,基于第二规则对所述 第一子树中每个子块进行划分,得到每个子块的下一层子块;
    其中,所述第一规则和所述第二规则用于判定所述第一子树中每个子块的划分方式。
  82. 根据权利要求81所述的编码装置,其特征在于,所述处理器用于:
    若所述第一子树中一个子块在三个方向上未达到预设值,采用八叉树划分方式对所述一个子块划分得到下一层子块;
    若所述第一子树中一个子块在二个方向上未达到预设值,采用四叉树划分方式对所述一个子块划分得到下一层子块;
    若所述第一子树中一个子块在一个方向上未达到预设值,采用二叉树划分方式对所述一个子块划分得到下一层子块。
  83. 根据权利要求79至82中任一项所述的编码装置,其特征在于,若所述第一子树包括一层特殊层,且所述特殊层至所述第一子树的最后一层之间,每层多个子块的下一层子块在所述每层多个子块中的位置索引为同一位置索引;
    所述处理器用于:对所述特殊层至所述第一子树的最后一层之间,每层多个子块的下一层子块在所述每层多个子块中的同一位置索引进行编码以形成所述第一码流中的索引码流。
  84. 根据权利要求79至82中任一项所述的编码装置,其特征在于,若所述第一子树包括多层特殊层,且所述多层特殊层的两层特殊层之间,或者最后一层特殊层至所述第一子树的最后一层之间,每层多个子块的下一层子块在所述每层多个子块中的位置索引为同一位置索引;
    所述处理器用于:对所述第一子树中的两层特殊层之间,或者最后一层特殊层至所述第一子树的最后一层之间,每层多个子块的下一层子块在所述每层多个子块中的同一位置索引进行编码。
  85. 根据权利要求79至84中任一项所述的编码装置,其特征在于,在所述第一码流中,所述层数码流位于所述索引码流之前。
  86. 根据权利要求73至85中任一项所述的编码装置,其特征在于,所述第一子树中每个子块的下一层子块数量均小于等于2。
  87. 根据权利要求86所述的编码装置,其特征在于,所述第一子树中仅一个子块的下一层子块的数量等于2,其它子块的下一层子块的数量等于1。
  88. 根据权利要求86所述的编码装置,其特征在于,所述第一子树中每个子块的下一层子块的数量等于1。
  89. 根据权利要求73至85中任一项所述的编码装置,其特征在于,所述第一子树中至多两个子块的下一层子块的数量大于2,所述至多两个子块的下一层子块为所述第一子树的子块。
  90. 根据权利要求73至85中任一项所述的编码装置,其特征在于,所述第一子树的子块中仅一个子块的下一层子块的数量大于2,其它子块的下一层子块数量等于1。
  91. 根据权利要求71或72所述的编码装置,其特征在于,所述第一子树为非对称结构,所述第一子树包括至少一层非对称层,所述非对称层中不同子块的下一层子块的数量不相等。
  92. 根据权利要求91所述的编码装置,其特征在于,所述处理器用于:
    对所述第一子树的层数信息、所述第一子树中子块的位置信息、以及所述第一子树中非对称层的分组信息进行编码以形成所述第一子树的第一码流。
  93. 根据权利要求92所述的编码装置,其特征在于,所述处理器用于:
    对所述第一子树的第零层至第一层特殊层之间的层数、相邻两层特殊层之间的层数以及最后一层特殊层至所述第一子树中的最后一层之间的层数进行编码以形成所述第一码流中的层数码流;
    其中,所述特殊层中子块的数量与其上一层中子块的数量不一致。
  94. 根据权利要求93所述的编码装置,其特征在于,所述处理器用于:
    对所述第一子树中每个子块的下一层子块在每个子块中的位置索引进行编码以形成所述第一码流中的索引码流。
  95. 根据权利要求94所述的编码装置,其特征在于,所述处理器用于:
    对所述非对称层中每个子块的下一层子块在每个子块中的位置索引进行编码之前,对所述非对称层中每个子块的下一层子块数量进行编码,以形成所述第一码流中的分组码流。
  96. 根据权利要求95所述的编码装置,其特征在于,在所述第一码流中,所述分组码流位于所述索引码流之前,所述层数码流位于所述分组码流之前。
  97. 根据权利要求91至96中任一项所述的编码装置,其特征在于,所 述第一子树中每个子块的下一层子块数量均小于等于2。
  98. 根据权利要求91至96中任一项所述的编码装置,其特征在于,所述第一子树中至多两个子块的下一层子块的数量大于2,所述至多两个子块的下一层子块为所述第一子树的子块。
  99. 根据权利要求71至98中任一项所述的编码装置,其特征在于,所述处理器还用于:
    对第一标识进行编码形成第一标识码流,所述第一标识用于标识所述目标编码方式。
  100. 根据权利要求99所述的编码装置,其特征在于,所述第一标识码流为采用定长码或者变长码编码方式编码得到的码流。
  101. 根据权利要求99或100所述的编码装置,其特征在于,所述第一标识码流位于所述第一子树的第一码流之前;和/或,
    所述第一标识码流位于所述点云的几何头码流中。
  102. 根据权利要求99或100所述的编码装置,其特征在于,所述处理器还用于:
    对第二标识进行编码形成第二标识码流,所述第二标识用于标识编码方式由广度优先切换至深度优先。
  103. 根据权利要求102所述的编码装置,其特征在于,所述第二标识码流位于所述第一标识码流之前。
  104. 根据权利要求71至103中任一项所述的编码装置,其特征在于,所述处理器还用于:
    按照广度优先的编码顺序对所述点云中除所述第一子树以外的其它子块进行编码以形成第二码流。
  105. 根据权利要求104所述的编码装置,其特征在于,所述处理器用于:
    对所述点云中第二子块进行编码,在广度优先的编码顺序上,所述第二子块位于所述第一子树的根节点块之后。
  106. 一种点云的解码装置,其特征在于,包括:处理器,
    所述处理器用于:接收第一码流;
    采用深度优先的目标解码方式对所述第一码流进行解码得到点云经过多叉树划分后的第一子树;
    其中,所述第一子树的子块中至多两个子块的下一层子块的数量大于N,其它子块的下一层子块的数量均小于等于N,所述第一子树的每个子块均包括点云点。
  107. 根据权利要求106所述的解码装置,其特征在于,所述多叉树划分包括:八叉树划分、四叉树划分、二叉树划分中的一种或多种,N≤2。
  108. 根据权利要求106或107所述的解码装置,其特征在于,所述第一码流包括层数码流以及索引码流,所述处理器用于:
    对所述第一码流中的层数码流进行解码得到所述第一子树的层数信息,
    对所述第一码流中的索引码流进行解码得到所述第一子树中子块的位置信息,
    根据所述层数信息以及所述位置信息得到所述第一子树。
  109. 根据权利要求108所述的解码装置,其特征在于,所述处理器用于:
    对所述第一码流中的层数码流进行解码得到所述第一子树的层数;或者,
    对所述第一码流中的层数码流进行解码得到所述第一子树的第零层至第一层特殊层之间的层数、相邻两层特殊层之间的层数以及最后一层特殊层至所述第一子树中的最后一层之间的层数;
    其中,所述特殊层中子块的数量与其上一层中子块的数量不一致。
  110. 根据权利要求108所述的解码装置,其特征在于,所述处理器用于:
    对所述第一码流中的层数码流进行解码得到一个层数差值,将所述一个层数差值加预设层数得到所述第一子树的层数,或者,
    对所述第一码流中的层数码流进行解码得到多个层数差值,将所述多个层数差值加预设层数得到所述第一子树的第零层至第一层特殊层之间的层数、相邻两层特殊层之间的层数以及最后一层特殊层至所述第一子树中的最后一层之间的层数。
  111. 根据权利要求109或110所述的解码装置,其特征在于,所述处理器用于:
    采用定长码解码方式或者变长码解码方式对所述第一码流中的层数码流进行解码得到所述第一子树的层数信息。
  112. 根据权利要求110所述的解码装置,其特征在于,所述处理器还用于:
    接收预设层数码流;
    对所述预设层数码流进行解码得到所述预设层数,所述预设层数码流位于所述点云的几何头码流中。
  113. 根据权利要求109至112中任一项所述的解码装置,其特征在于,所述处理器用于:
    对所述第一码流中的索引码流进行解码得到所述第一子树中每个子块的下一层子块在所述每个子块中的位置索引。
  114. 根据权利要求113所述的解码装置,其特征在于,所述处理器用于:
    若采用八叉树划分方式对所述第一子树中一个子块划分得到下一层子块,对所述索引码流中3比特码流进行解码得到一个所述下一层子块在所述一个子块中的一个位置索引;
    若采用四叉树划分方式对所述第一子树中一个子块划分得到下一层子块,对所述索引码流中2比特码流进行解码得到一个所述下一层子块在所述一个子块中的一个位置索引;
    若采用二叉树划分方式对所述第一子树中一个子块划分得到下一层子块,对所述索引码流中1比特码流进行解码得到一个所述下一层子块在所述一个子块中的一个位置索引。
  115. 根据权利要求114所述的解码装置,其特征在于,所述处理器还用于:
    若所述第一子树中最后一层子块为叶子节点块,基于第一规则对所述第一子树中每个子块进行划分,得到每个子块的下一层子块;
    若所述第一子树中最后一层子块不为叶子节点块,基于第二规则对所述第一子树中每个子块进行划分,得到每个子块的下一层子块;
    其中,所述第一规则和所述第二规则用于判定所述第一子树中每个子块的划分方式。
  116. 根据权利要求115所述的解码装置,其特征在于,所述处理器用于:
    若所述第一子树中一个子块在三个方向上未达到预设值,采用八叉树划 分方式对所述一个子块划分得到下一层子块;
    若所述第一子树中一个子块在二个方向上未达到预设值,采用四叉树划分方式对所述一个子块划分得到下一层子块;
    若所述第一子树中一个子块在一个方向上未达到预设值,采用二叉树划分方式对所述一个子块划分得到下一层子块。
  117. 根据权利要求113至116中任一项所述的解码装置,其特征在于,所述第一子树包括一层特殊层,所述处理器用于:
    对所述第一码流中的索引码流进行解码得到所述第一子树中,所述特殊层至所述第一子树的最后一层之间,每层多个子块的下一层子块在所述每层多个子块中的同一位置索引。
  118. 根据权利要求113至116中任一项所述的解码装置,其特征在于,所述第一子树包括多层特殊层,所述处理器用于:
    对所述第一码流中的索引码流进行解码得到所述第一子树中,所述多层特殊层的两层特殊层之间,或者最后一层特殊层至所述第一子树的最后一层之间,每层多个子块的下一层子块在所述每层多个子块中的同一位置索引。
  119. 根据权利要求113至118中任一项所述的解码装置,其特征在于,在所述第一码流中,所述层数码流位于所述索引码流之前。
  120. 根据权利要求108至119中任一项所述的解码装置,其特征在于,所述第一子树为对称结构,所述第一子树的一层中仅包括一个子块,或者一层中多个子块的下一层子块的数量相等。
  121. 根据权利要求120所述的解码装置,其特征在于,所述第一子树中每个子块的下一层子块数量均小于等于2。
  122. 根据权利要求121所述的解码装置,其特征在于,所述第一子树中仅一个子块的下一层子块的数量等于2,其它子块的下一层子块的数量等于1。
  123. 根据权利要求121所述的解码装置,其特征在于,所述第一子树中每个子块的下一层子块的数量等于1。
  124. 根据权利要求120所述的解码装置,其特征在于,所述第一子树中至多两个子块的下一层子块的数量大于2,所述至多两个子块的下一层子块为所述第一子树的子块。
  125. 根据权利要求120所述的解码装置,其特征在于,所述第一子树 的子块中仅一个子块的下一层子块的数量大于2,其它子块的下一层子块数量等于1。
  126. 根据权利要求106或107所述的解码装置,其特征在于,所述第一码流包括层数码流、索引码流以及分组码流,所述处理器用于:
    对所述第一码流中的层数码流进行解码得到所述第一子树的层数信息,
    对所述第一码流中的索引码流进行解码得到所述第一子树中子块的位置信息,
    对所述第一码流中的分组码流进行解码得到所述第一子树中非对称层的分组信息,其中,所述非对称层中不同子块的下一层子块的数量不相等,
    根据所述层数信息、所述位置信息以及所述分组信息得到所述第一子树。
  127. 根据权利要求126所述的解码装置,其特征在于,所述处理器用于:
    对所述第一码流中的层数码流进行解码得到所述第一子树的第零层至第一层特殊层之间的层数、相邻两层特殊层之间的层数以及最后一层特殊层至所述第一子树中的最后一层之间的层数;
    其中,所述特殊层中子块的数量与其上一层中子块的数量不一致。
  128. 根据权利要求127所述的解码装置,其特征在于,所述处理器用于:
    对所述第一码流中的索引码流进行解码得到所述第一子树中每个子块的下一层子块在所述每个子块中的位置索引。
  129. 根据权利要求128所述的解码装置,其特征在于,所述处理器用于:
    对所述第一码流中的分组码流进行解码得到所述非对称层中每个子块的下一层子块数量。
  130. 根据权利要求129所述的解码装置,其特征在于,在所述第一码流中,所述分组码流位于所述索引码流之前,所述层数码流位于所述分组码流之前。
  131. 根据权利要求126至130中任一项所述的解码装置,其特征在于,所述第一子树为非对称结构,所述第一子树包括至少一层非对称层。
  132. 根据权利要求131所述的解码装置,其特征在于,所述第一子树 中每个子块的下一层子块数量均小于等于2。
  133. 根据权利要求131所述的解码装置,其特征在于,所述第一子树中至多两个子块的下一层子块的数量大于2,所述至多两个子块的下一层子块为所述第一子树的子块。
  134. 根据权利要求106至133中任一项所述的解码装置,其特征在于,所述处理器还用于:
    接收第一标识码流;
    对所述第一标识码流进行解码得到第一标识,所述第一标识用于标识所述目标解码方式。
  135. 根据权利要求134所述的解码装置,其特征在于,所述处理器用于:
    采用定长码解码方式或者变长码解码方式对所述第一标识码流进行解码得到所述第一标识。
  136. 根据权利要求134或135所述的解码装置,其特征在于,所述第一标识码流位于所述第一码流之前;和/或,
    所述第一标识码流位于所述点云的几何头码流中。
  137. 根据权利要求134或135所述的解码装置,其特征在于,所述处理器还用于:
    接收第二标识码流;
    对所述第二标识码流进行解码得到第二标识,所述第二标识用于标识解码方式由广度优先切换至深度优先。
  138. 根据权利要求137所述的解码装置,其特征在于,所述第二标识码流位于所述第一标识码流之前。
  139. 根据权利要求106至138中任一项所述的解码装置,其特征在于,所述处理器还用于:
    接收第二码流,按照广度优先的解码顺序对所述第二码流进行解码得到所述点云中除所述第一子树以外的其它子块。
  140. 根据权利要求139所述的解码装置,其特征在于,所述处理器用于:
    对所述第二码流解码得到所述点云中的第二子块,在广度优先的解码顺序上,所述第二子块位于所述第一子树的根节点块之后。
  141. 一种计算机可读存储介质,其特征在于,用于存储程序指令,所述程序指令被计算机运行时,所述计算机执行如权利要求1至35中任一项所述的编码方法。
  142. 一种计算机可读存储介质,其特征在于,用于存储程序指令,所述程序指令被计算机运行时,所述计算机执行如权利要求36至70中任一项所述的解码方法。
PCT/CN2020/082608 2020-03-31 2020-03-31 点云的编解码方法和装置 WO2021196038A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2020/082608 WO2021196038A1 (zh) 2020-03-31 2020-03-31 点云的编解码方法和装置
CN202080004105.8A CN112514397A (zh) 2020-03-31 2020-03-31 点云的编解码方法和装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/082608 WO2021196038A1 (zh) 2020-03-31 2020-03-31 点云的编解码方法和装置

Publications (1)

Publication Number Publication Date
WO2021196038A1 true WO2021196038A1 (zh) 2021-10-07

Family

ID=74952812

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/082608 WO2021196038A1 (zh) 2020-03-31 2020-03-31 点云的编解码方法和装置

Country Status (2)

Country Link
CN (1) CN112514397A (zh)
WO (1) WO2021196038A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112991549A (zh) * 2021-03-31 2021-06-18 上海商汤临港智能科技有限公司 一种点云数据处理方法、装置、计算机设备和存储介质
CN115474064A (zh) * 2021-06-11 2022-12-13 维沃移动通信有限公司 编码、解码控制方法及装置
CN115474049A (zh) * 2021-06-11 2022-12-13 维沃移动通信有限公司 点云编码处理方法、解码处理方法及装置

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104040592A (zh) * 2011-11-07 2014-09-10 汤姆逊许可公司 预测位置编码
CN106327577A (zh) * 2016-08-17 2017-01-11 中国地质大学(武汉) 基于局部曲率熵和四叉树结构的三维地形曲面优化方法
US20190018680A1 (en) * 2017-07-12 2019-01-17 Topcon Positioning Systems, Inc. Point cloud data method and apparatus
WO2019078292A1 (ja) * 2017-10-19 2019-04-25 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ 三次元データ符号化方法、三次元データ復号方法、三次元データ符号化装置、及び三次元データ復号装置
WO2019103009A1 (ja) * 2017-11-22 2019-05-31 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ 三次元データ符号化方法、三次元データ復号方法、三次元データ符号化装置、及び三次元データ復号装置
EP3514969A1 (en) * 2018-01-18 2019-07-24 BlackBerry Limited Methods and devices using direct coding in point cloud compression
US20190325614A1 (en) * 2018-04-23 2019-10-24 Qualcomm Incorporated Compression of point clouds via a novel hybrid coder
WO2020051367A1 (en) * 2018-09-05 2020-03-12 Vicarious Fpc, Inc. Method and system for machine concept understanding

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104040592A (zh) * 2011-11-07 2014-09-10 汤姆逊许可公司 预测位置编码
CN106327577A (zh) * 2016-08-17 2017-01-11 中国地质大学(武汉) 基于局部曲率熵和四叉树结构的三维地形曲面优化方法
US20190018680A1 (en) * 2017-07-12 2019-01-17 Topcon Positioning Systems, Inc. Point cloud data method and apparatus
WO2019078292A1 (ja) * 2017-10-19 2019-04-25 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ 三次元データ符号化方法、三次元データ復号方法、三次元データ符号化装置、及び三次元データ復号装置
WO2019103009A1 (ja) * 2017-11-22 2019-05-31 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ 三次元データ符号化方法、三次元データ復号方法、三次元データ符号化装置、及び三次元データ復号装置
EP3514969A1 (en) * 2018-01-18 2019-07-24 BlackBerry Limited Methods and devices using direct coding in point cloud compression
US20190325614A1 (en) * 2018-04-23 2019-10-24 Qualcomm Incorporated Compression of point clouds via a novel hybrid coder
WO2020051367A1 (en) * 2018-09-05 2020-03-12 Vicarious Fpc, Inc. Method and system for machine concept understanding

Also Published As

Publication number Publication date
CN112514397A (zh) 2021-03-16

Similar Documents

Publication Publication Date Title
WO2021196038A1 (zh) 点云的编解码方法和装置
US9532056B2 (en) Method for adaptive entropy coding of tree structures
WO2021196029A1 (zh) 一种用于点云编码、解码的方法和设备
TWI556632B (zh) 視訊之算術編碼方法及其裝置、以及視訊之算術解碼方法及其裝置
TWI597975B (zh) 視訊解碼裝置
WO2020123469A1 (en) Hierarchical tree attribute coding by median points in point cloud coding
WO2021000333A1 (zh) 点云的处理方法和装置
CN115606188A (zh) 一种点云编解码方法、编码器、解码器及存储介质
TWI534760B (zh) 空間樹結構對輸入空間點編碼之方法及編碼器,以及空間樹結構位元流之解碼方法及解碼器
WO2021062743A1 (zh) 占位信息的预测方法、编码器、解码器、及存储介质
WO2024037091A1 (zh) 一种点云处理方法、装置及计算机设备、存储介质
WO2021109153A1 (zh) 一种用于点云处理、解码的方法、设备及存储介质
WO2020248177A1 (zh) 点云的编解码方法及装置
WO2021243519A1 (zh) 点云的编解码方法和装置
WO2022141461A1 (zh) 点云编解码方法、编码器、解码器以及计算机存储介质
WO2020248562A1 (zh) 一种用于点云处理、解码的方法、设备及存储介质
Peng et al. Progressive geometry encoder using octree-based space partitioning
WO2023103564A1 (zh) 点云解码方法、点云编码方法、装置、计算机设备、计算机可读存储介质及计算机程序产品
Farhadi An enhanced fractal image compression based on Quadtree partition
WO2023155045A1 (zh) 预测的方法和装置、编码器、解码器和编解码系统
WO2024011739A1 (zh) 点云编解码方法、编解码器及计算机存储介质
WO2023169019A1 (zh) 点云编解码方法、装置、计算机、存储介质
WO2024082153A1 (zh) 编解码方法、码流、编码器、解码器以及存储介质
WO2024125558A1 (zh) 基于预测树的点云几何编码、解码方法及设备
WO2022258009A1 (zh) 熵编码、解码方法及装置

Legal Events

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

Ref document number: 20928155

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20928155

Country of ref document: EP

Kind code of ref document: A1