Coding and decoding method and device for point cloud

By using depth-first encoding method to encode point cloud blocks after multi-forktree partitioning in point cloud encoding and decoding, problems such as high encoding complexity and bit waste in the existing technology are solved, and more efficient point clouds are achieved Compress and decode.

CN119420951APending Publication Date: 2025-02-11SZ DJI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411613373.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2020-06-01
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

In the existing point cloud encoding and decoding methods, the octree partition encoding method based on breadth priority has high complexity and strict coding order requirements, which is not conducive to parallelization and bit waste, which affects efficiency and performance.

Method used

The depth-first encoding method is used to encode the leaf node block in the first block of the point cloud after being divided by multi-fork trees, reducing the encoding bits, allowing flexibility in encoding sequence, and supporting parallel processing.

Benefits of technology

Through the depth-first encoding method, the bit bits of point cloud encoding are reduced, the compression efficiency and decoding speed are improved, the encoding and decoding complexity is reduced, and parallel processing is supported.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119420951A_ABST
    Figure CN119420951A_ABST
Patent Text Reader

Abstract

Compared with the prior art, the point cloud coding and decoding method and device can improve the efficiency and performance of point cloud coding and decoding. The coding method of the point cloud comprises the steps that a first block of the point cloud divided through a multi-way tree is determined, the number of leaf node blocks including point cloud points in the first block is not larger than N, and N is a positive integer determined according to the division mode of the first block; and coding the position coordinate of the leaf node block in the first block by adopting a depth-first target coding mode to form a first code stream of the first block. According to the technical scheme, the coding bits of at least part of the to-be-coded blocks in the point cloud can be reduced, the point cloud compression efficiency and the point cloud decoding speed can be improved, the strict requirement of a breadth-first coding mode for the coding sequence can be eliminated, parallelization of point cloud coding is facilitated, and the complexity of point cloud coding and decoding is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Copyright Notice

[0002] The disclosure of this patent document contains material that is subject to copyright protection. The copyright is reserved by the copyright owner. The copyright owner has no objection to the facsimile reproduction by anyone of the patent document or the patent disclosure as it exists in the official records and files of the Patent and Trademark Office. Technical Field

[0003] The present application relates to the field of encoding and decoding, and more specifically, to a point cloud encoding and decoding method and device. Background Art

[0004] Point cloud (or 3D point cloud) is a representation of a 3D object or scene. It is composed of a set of irregularly distributed discrete points in space that express the spatial structure and surface properties of a 3D object or scene. In order to reduce the bandwidth occupied by point cloud data storage and transmission, point cloud data needs to be encoded and compressed. The point cloud encoding process includes the encoding of the position coordinates of the point cloud points in the point cloud and the encoding of the attribute information of the point cloud points.

[0005] At present, most of the existing point cloud position coordinate encoding methods use a breadth-first octree partitioning encoding method. This encoding method has high complexity and strict requirements on the encoding order, which is not conducive to the parallelization of point cloud encoding. In addition, there are many problems such as bit waste in the encoding of relatively concentrated point cloud points in the octree sub-blocks, which affects the efficiency and performance of point cloud encoding and decoding. Summary of the invention

[0006] The present application provides a point cloud encoding and decoding method and device, which can improve the efficiency and performance of point cloud encoding and decoding compared to the prior art.

[0007] In a first aspect, a point cloud encoding method is provided, comprising: determining a first block of the point cloud after multi-branch tree division, wherein the number of leaf node blocks including point cloud points in the first block is not greater than N, and N is a positive integer determined according to the division method of the first block; and encoding the position coordinates of the leaf node block in the first block using a depth-first target encoding method to form a first code stream of the first block.

[0008] In a second aspect, a point cloud decoding method is provided, comprising: receiving a first code stream of a first block, the first block being a spatial block after the point cloud is divided into a multi-branch tree; decoding the first code stream using a depth-first target decoding method to obtain position coordinates of leaf node blocks including point cloud points in the first block; wherein the number of leaf node blocks is not greater than N, and N is a positive integer determined according to the division method of the first block.

[0009] In a third aspect, a point cloud encoding device is provided, comprising a processor, wherein the processor is used to execute the point cloud encoding method in the first aspect.

[0010] In a fourth aspect, a point cloud decoding device is provided, comprising a processor, wherein the processor is used to execute the point cloud decoding method in the second aspect.

[0011] According to a fifth aspect, a computer storage medium is provided, on which a computer program is stored. When the computer program is executed by a computer, the computer executes the method provided in the first aspect or the second aspect.

[0012] Through the technical solution of the present application, the value N is determined according to the division method of the first block, and the number of leaf node blocks including point cloud points in the first block is not greater than N. The first block is encoded using a depth-first encoding method instead of a breadth-first encoding method. This is not limited to the fixed encoding bits caused by the division method, and the encoding bits of the first block are reduced, thereby saving bit streams and improving point cloud compression efficiency and point cloud decoding speed. In addition, the use of a depth-first encoding method can get rid of the strict requirements of the breadth-first encoding method for the encoding order, which is conducive to the parallelization of point cloud encoding and reduces the complexity of point cloud encoding and decoding. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 A schematic diagram of a point cloud data encoding process provided by the present application is shown.

[0014] Figure 2 It is a schematic diagram of the initialization space of point cloud encoding.

[0015] Figure 3 It is a schematic diagram of a point cloud data decoding process according to an embodiment of the present application.

[0016] Figures 4 to 5 It is a schematic flowchart of two point cloud encoding methods according to the embodiments of the present application.

[0017] Figure 6 It is a schematic structural diagram of the first subtree after the first block is divided according to an embodiment of the present application.

[0018] Figures 7 and 8 It is a schematic flowchart of two other point cloud encoding methods according to the embodiments of the present application.

[0019] Figures 9 and 10 These are two other schematic structural diagrams of the first subtree after the first block is divided according to an embodiment of the present application.

[0020] Figures 11 to 13It is a schematic flowchart of several other point cloud encoding methods according to the embodiments of the present application.

[0021] Figures 14 to 21 It is a schematic flowchart of several point cloud decoding methods according to the embodiments of the present application.

[0022] Fig. 22 It is a schematic block diagram of a point cloud encoding device according to an embodiment of the present application.

[0023] Fig.23 It is a schematic block diagram of a point cloud decoding device according to an embodiment of the present application. DETAILED DESCRIPTION

[0024] In order to facilitate understanding of the technical solutions provided by the embodiments of the present application, some concepts involved in the embodiments of the present application are first described below.

[0025] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0026] The embodiments of the present application may be applicable to standard or non-standard point cloud codecs, for example, encoders conforming to the audio video coding standard (AVS).

[0027] It should be understood that in the various embodiments of the present application, the size of the serial 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 constitute any limitation on the implementation process of the embodiments of the present application.

[0028] Unless otherwise stated, all technical and scientific terms used in the embodiments of the present application have the same meaning as those generally understood by those skilled in the art of the present application. The terms used in this application are only for the purpose of describing specific embodiments and are not intended to limit the scope of this application. The term "and / or" used in this application includes any and all combinations of one or more related listed items.

[0029] In order to facilitate understanding of the technical solutions provided by the embodiments of the present invention, some concepts involved in the embodiments of the present invention are first described below.

[0030] Point cloud is a collection of discrete points that express the spatial distribution and surface characteristics of the target 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 is called point cloud. In order to accurately reflect the information in three-dimensional space, a large number of discrete points are usually required to characterize the objects in three-dimensional space. The discrete points in the point cloud are referred to as point cloud points below.

[0031] Figure 1A schematic diagram of a point cloud data encoding process provided by the present application is shown.

[0032] Point cloud data usually includes the location information and attribute information of multiple point cloud points in the point cloud. The location coordinates of the point cloud points can be used to describe the location of the point cloud points in three-dimensional space. The attribute information of the point cloud points can include, for example, the color information of the point cloud points, and other information such as the reflectivity of the point cloud points. In order to reduce the bandwidth occupied by the point cloud during storage and transmission, the point cloud data can be encoded to compress the data volume of the point cloud. In the encoding process of point cloud data, the encoding of the location information and the encoding of the attribute information of the point cloud points are usually performed separately.

[0033] like Figure 1 As shown, in the encoding method of point cloud data, the encoding method of the position information of the point cloud point includes:

[0034] Coordinate translation and quantization: The position coordinates of multiple point cloud points in the point cloud are translated and quantized. In an example, the position coordinates of the point cloud points are processed using a geometric quantization method. The geometric quantization process can convert the position coordinates of multiple point cloud points into integer coordinates greater than or equal to zero. After the position coordinates are translated and quantized, duplicate coordinates can be removed. Alternatively, the quantized point cloud point position coordinates can be directly octree-encoded without deduplication.

[0035] After the initialization space is determined, 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 the current block is divided into eight sub-blocks of equal volume through the center point. Figure 2 The partition results after the initialization space is partitioned for the first time are shown. Figure 2 It can be seen that the initialization space is evenly divided into 8 sub-blocks of equal volume. In the octree, the initialization space is the root node block, and these sub-blocks are the child node blocks of the root node, called the first-level child node blocks.

[0036] After obtaining the first layer of sub-node blocks, it can be determined whether there are point cloud points in each sub-node block of the first layer, and the sub-node blocks with point cloud points are further divided until the side length of the sub-node block is less than the threshold, and the octree division is stopped. The sub-node block at this time is called the leaf node block of the current octree. The threshold can be 1, for example.

[0037] When performing octree encoding on the position coordinates of multiple point cloud points in a point cloud, the encoding can be performed layer by layer according to the breadth first search (BFS) order of the octree. When encoding layer by layer, the division results of each octree can be encoded layer by layer, that is, it is determined whether the eight sub-blocks obtained after the octree division of the current sub-block contain point cloud points. If a sub-block of the block contains point cloud points, the sub-block is further divided, otherwise the division is stopped. When the last layer of the octree is divided (the last layer can be a layer with a sub-block side length of 1), the bottom layer of the octree is reached, that is, the leaf node block of the octree is reached, and no further division is required.

[0038] In other implementations, the location information of the point cloud points may be encoded by using a quadtree partitioning method, a binary tree partitioning method, or a multi-tree partitioning method that is a mixture of several partitioning methods.

[0039] For example, similar to the octree encoding process mentioned above, the multiple sub-blocks after the multi-tree division can be encoded layer by layer in the breadth-first encoding order. Among them, if the sub-block adopts the quadtree division method, it only needs to encode 4 bits (bits) to encode it, which saves 4 bits compared with the octree division; if the binary tree division method is used for encoding, it only needs to encode 2 bits, which saves 6 bits compared with the octree division. The skipped bits can be inferred to be 0 at the decoding end.

[0040] Entropy coding: Entropy coding is performed on the bit stream after octree encoding to obtain the geometric bit stream of the point cloud, that is, the bit stream of the position information of multiple point cloud points in the point cloud.

[0041] After the position coordinates are encoded by the multitree, the synchronization will compress and encode the corresponding attribute values ​​according to the order of the position coordinates after the multitree reconstruction.

[0042] Continue to see Figure 1 ,In the coding method of point cloud data, the attribute information encoding method of ,point cloud points includes processes such as spatial transformation, attribute ,interpolation, attribute prediction, residual quantization, and entropy coding.

[0043] The decoding process of point cloud data is roughly the same as the reverse process of encoding. Figure 3 A schematic diagram of a decoding process provided by the present application is shown.

[0044] Entropy decoding: After obtaining the input geometry code stream and attribute code stream, the decoder uses an entropy decoding method corresponding to the entropy encoding method of the encoder to decode the code stream bit by bit.

[0045] Multi-branch tree reconstruction: Specifically, for the geometric bitstream, the information after entropy decoding can first determine the initialization space of the point cloud (the size of the initialization space can be written into the bitstream by the encoder, and the decoder can obtain it from the bitstream), and then divide the initialization space into multi-branch trees. The decoder divides the initialization space in the same space division method as the encoder. The position coordinate data of the point cloud points to be inversely quantized is obtained through multiple child node blocks in the divided multi-branch tree and their corresponding binary bit streams.

[0046] Inverse quantization: Inverse quantization is the inverse process of quantization at the encoder. The position coordinate data to be inversely quantized after multi-tree reconstruction is inversely quantized to obtain the quantized coordinates at the encoder. The attribute code stream is entropy decoded and inversely quantized to obtain the attribute prediction residual value.

[0047] Attribute reconstruction: Specifically, if the attribute prediction residual obtained after inverse quantization is , the current point attribute reconstruction value is , the attribute reconstruction value of the previous point is , then the attribute reconstruction value of the current point .

[0048] After traversing all the point cloud points in the point cloud, the reconstructed point cloud output by the encoder is obtained.

[0049] Inverse spatial transformation: corresponds to the spatial transformation at the encoding end. This step is also an optional step. If the attribute value after attribute reconstruction is the attribute value of the YUV space, an inverse spatial transformation is performed on it to obtain the attribute value of the RGB space.

[0050] Finally, the point cloud data can be obtained by merging the position information obtained by the above decoding and its corresponding attribute information.

[0051] Combination of the above Figures 1 to 3 , the encoding process of the related technology is introduced. From the above description, it can be seen that when multi-tree encoding is performed on the position coordinates of multiple point cloud points in the point cloud, the breadth-first method is used to traverse each block after division, and each block is coded to identify whether there is a point cloud point. Therefore, this encoding method has high complexity and strict requirements on the encoding order, which is not conducive to the parallelization of point cloud encoding. In addition, there are many problems such as bit waste for the encoding of relatively concentrated point cloud points in the multi-tree sub-block, which affects the efficiency and performance of point cloud encoding and decoding.

[0052] Based on the above problems, this application proposes a point cloud encoding and decoding method, which can reduce the bit number of point cloud point position encoding, avoid bit waste, and is not restricted to a strict encoding order, which is conducive to reducing encoding complexity and parallel processing of point cloud encoding.

[0053] Combine the following Figures 4 to 21, the point cloud encoding and decoding method provided in the embodiment of the present application is described in detail. Figures 4 to 21 The method may be performed by an encoding device or a decoding device.

[0054] Moreover, more specifically, the embodiments of the present application mainly relate to the encoding and decoding process of the position coordinates of multiple point cloud points in a point cloud. Therefore, the following mainly describes the encoding and decoding process of the position coordinates of multiple point cloud points in a point cloud. The encoding and decoding process of the attribute information of the point cloud can refer to the above-mentioned related description or related technology, and the embodiments of the present application are not limited to this.

[0055] Figure 4 A schematic flowchart of a point cloud encoding method 100 is shown.

[0056] like Figure 4 As shown, the point cloud encoding method 100 may include the following steps.

[0057] S110: Determine a first block after the point cloud is divided into a multi-branch tree, wherein the number of leaf node blocks including point cloud points in the first block is not greater than N, and N is a positive integer determined according to the division method of the first block.

[0058] S120: Encode the position coordinates of the leaf node block in the first block by adopting a depth-first target encoding method to form a first code stream of the first block.

[0059] When encoding the position information of multiple point cloud points in the point cloud, the initialization space where the point cloud is located is divided into a multi-branch tree to obtain a tree structure after the point cloud is divided into the multi-branch tree, and the position space of the multiple point cloud points is represented by the tree structure.

[0060] Optionally, in the embodiment of the present application, the multi-tree partitioning includes but is not limited to a simple partitioning method, such as a simple octree partitioning method, and can also be a binary tree partitioning, a quadtree partitioning, an octree partitioning, or a multi-tree partitioning method mixed with other partitioning methods. The embodiment of the present application does not limit the specific multi-tree partitioning method. And for the convenience of description, in this application, octree partitioning, quadtree partitioning, binary tree partitioning, and a multi-tree partitioning method mixed with multiple partitioning methods are all referred to as multi-tree partitioning.

[0061] In an embodiment of the present application, instead of adopting the traditional encoding method to encode the tree structure of the point cloud in a breadth-first encoding manner, a new encoding mode is introduced. When encoding to the first block in the tree structure, it is determined that the first block meets the preset conditions. Then, instead of adopting the breadth-first encoding method to continue traversing the second block after the first block, the target encoding method is switched to the depth-first method, the first block is encoded, and then the second block after the first block is returned to.

[0062] Optionally, the first block may be an initialization space block of the point cloud, or any block after the initialization space block of the point cloud is divided. The embodiment of the present application does not limit the specific position of the first block in the initialization space.

[0063] The method of the embodiment of the present application can get rid of the strict requirements of the breadth-first encoding method on the encoding order, which is conducive to the parallelization of point cloud encoding and reduces the complexity of point cloud encoding.

[0064] Specifically, the preset condition of the first block in the present application may be: the number of leaf node blocks in the first block is not greater than N, wherein the leaf node block is a leaf node block including point cloud points, and N is a positive integer determined according to the multi-branch tree partitioning method.

[0065] When the original breadth-first encoding method is used, the corresponding bits will be encoded according to the division method of each layer of the first block. When the number of point cloud points in the first block is small, the use of this encoding method will cause a large waste of bit streams. However, when the scheme of the embodiment of the present application is used, the value N is determined according to the division method of the first block, and when the number of leaf node blocks including point cloud points in the first block does not exceed N, the position coordinates of the leaf node block in the first block are encoded, which can reduce the encoding bits of the first block, thereby saving bit streams and improving the point cloud compression efficiency.

[0066] Below, the technical solution of the present application will be described in detail with respect to specific embodiments, and the corresponding technical effects will be described with respect to the specific technical solution.

[0067] In some embodiments, the block division method of the first block includes one or more of octree division, quadtree division, and binary tree division, and the preset condition of the first block may be: the number of leaf node blocks including point cloud points in the first block is not greater than 2.

[0068] First, the case where the number of leaf node blocks including point cloud points in the first block is 1 is explained. In the following, the 1 leaf node block including point cloud points is also written as the first leaf node block.

[0069] Figure 5 A schematic flowchart of another point cloud encoding method 100 is shown.

[0070] like Figure 5 As shown, the above step S110 may include the following steps.

[0071] S111: Determine a first block after the point cloud is divided into a multi-branch tree, wherein the first block includes a first leaf node block.

[0072] The above step S120 may include the following steps.

[0073] S121: Encode the position coordinate values ​​of the first leaf node block in three directions in the coordinate system of the first block respectively to form a first code stream of the first block.

[0074] Optionally, a Cartesian coordinate system, also called an XYZ coordinate system, is constructed in the first block. In the XYZ directions, if the first block is 2 a ×2 b ×2 c The leaf node block in the first block is 2 a’ ×2 b’ ×2 c’ A spatial block of , where a≥a', b≥b', c≥c', and a', b', c' are integers.

[0075] Then in the X direction, a-a' bits can be used to identify the position of the first leaf node block in the first block; in the Y direction, b-b' bits can be used to identify the position of the first leaf node block in the first block; in the Z direction, c-c' bits can be used to identify the position of the first leaf node block in the first block.

[0076] In other words, in this embodiment of the present application, (a-a') bits may be used to encode the position coordinate value of the first leaf node block in the X direction; (b-b') bits may be used to encode the position coordinate value of the first leaf node block in the Y direction; and (c-c') bits may be used to encode the position coordinate value of the first leaf node block in the Z direction.

[0077] In some embodiments, if a'=b'=c'=0, that is, the leaf node block in the first block is a 1×1×1 spatial block, a bits may be used to encode the position coordinates of the first leaf node block in the X direction; b bits may be used to encode the position coordinates of the first leaf node block in the Y direction; and c bits may be used to encode the position coordinates of the first leaf node block in the Z direction.

[0078] As an example, if a=b=c=3, a'=b'=c'=0, in the X direction, there are 8 leaf node blocks arranged in the first block, and 3 bits can be used to identify any number from 0 to 7 to encode the position coordinate value of the first leaf node block in the X direction; similarly, in the Y direction and the Z direction, 3 bits can also be used to identify any number from 0 to 7 to encode the position coordinate value of the first leaf node block in the Y direction and the Z direction.

[0079] Optionally, when encoding the position coordinate value of the first leaf node block, after the position coordinate value of the first leaf node block in one direction is encoded, the position coordinate value of the first leaf node block in another direction is encoded. Specifically, the position coordinate values ​​of the first leaf node block in the three directions of X, Y, and Z can be encoded in sequence, for example, the position coordinate value of the first leaf node block is encoded in the order of XYZ, that is, after the position coordinate value in the X direction is encoded, the position coordinate value in the Y direction is encoded, and then the position coordinate value in the Z direction is encoded. Of course, the position coordinate value of the first leaf node block can also be encoded in the order of YXZ, YZX, etc., which is not limited in this embodiment of the present application.

[0080] For example, the first block is an 8×8×8 spatial block, the leaf node block is a 1×1×1 spatial block, and the position coordinates of the first leaf node block are (1, 2, 3). Then, the position coordinates are encoded as 001 010 011 in the order of XYZ.

[0081] Optionally, when encoding the position coordinate value of the first leaf node block, the position coordinate value of the first leaf node block in one direction is encoded by one bit, and then the position coordinate value of the first leaf node block in another direction is encoded by one bit. Optionally, the position coordinate value of the first leaf node block in the X direction may be encoded by one bit first, and then the position coordinate value of the first leaf node block in the Y direction may be encoded by one bit, and then the position coordinate value of the first leaf node block in the Z direction may be encoded by one bit; it is understandable that other direction sequences may also be used for encoding, and the embodiment of the present application does not specifically limit the encoding sequence of the three directions of XYZ.

[0082] In one implementation, after encoding the lowest bit of the position coordinate value of the first leaf node block in one direction, the lowest bit of the position coordinate value of the first leaf node block in another direction is encoded.

[0083] For example, the first block is an 8×8×8 spatial block, the leaf node block is a 1×1×1 spatial block, and the position coordinates of the first leaf node block are (1, 2, 3). First, encode the lowest bit (bit 0) of the position coordinate values ​​of the first leaf node block in three directions, that is, encode the lowest bit 1 of the position coordinate value of the first leaf node block in the X direction, encode the lowest bit 0 of the position coordinate value of the first leaf node block in the Y direction, and encode the lowest bit 1 of the position coordinate value of the first leaf node block in the Z direction. Then encode the middle bit (bit 1) of the position coordinate values ​​of the first leaf node block in three directions. Finally, encode the highest bit (bit 2) of the position coordinate values ​​of the first leaf node block in three directions. In this way, the position coordinates (1, 2, 3) of the first leaf node block are encoded as 101 011 000.

[0084] In another embodiment, after encoding the highest bit of the position coordinate value of the first leaf node block in one direction, the highest bit of the position coordinate value of the first leaf node block in another direction is encoded.

[0085] For example, the first block is an 8×8×8 spatial block, the leaf node block is a 1×1×1 spatial block, and the position coordinates of the first leaf node block are (1, 2, 3). First, encode the highest bit (bit 2) of the position coordinate values ​​of the first leaf node block in three directions, that is, encode the highest bit 0 of the position coordinate value of the first leaf node block in the X direction, encode the highest bit 0 of the position coordinate value of the first leaf node block in the Y direction, and encode the highest bit 0 of the position coordinate value of the first leaf node block in the Z direction. Then encode the middle bit (bit 1) of the position coordinate values ​​of the first leaf node block in three directions. Finally, encode the lowest bit (bit 0) of the position coordinate values ​​of the first leaf node block in three directions. In this way, the position coordinates (1, 2, 3) of the first leaf node block are encoded as 000 011 101.

[0086] It is understandable that, after encoding any one bit of the position coordinate value of the first leaf node block in one direction, any one bit of the position coordinate value of the first leaf node block in another direction can be encoded. The embodiment of the present application does not specifically limit the direction order, nor does it specifically limit the encoding order of the bits in each direction. The direction order and the bit encoding order can be agreed upon by the encoding end and the decoding end. The encoding end encodes in a specific order, and the decoding end decodes in the same specific order.

[0087] From the above description, we can see that if the size of the first block is 2 a ×2 b ×2 c, the size of the leaf node block of the first block is 2 a’ ×2 b’ ×2 c’ , and in the first block, the number of leaf node blocks including point cloud points is 1, the technical solution of the embodiment of the present application is adopted, and the number of bits of the encoding of the first block is (a-a') + (b-b') + (c-c'). If the size of the leaf node block of the first block is 1×1×1, the technical solution of the embodiment of the present application is adopted, and the number of bits of the encoding of the first block is a+b+c.

[0088] If the breadth-first encoding method is used to encode the first block, it is necessary to divide the first block into a multi-branch tree, and encode the first block according to the division method of each layer of the first block.

[0089] Figure 6 FIG. 4 shows a schematic structural diagram of the first subtree after the first block is divided in this case.

[0090] like Figure 6 As shown in the figure, after the first block is divided into a multi-branch tree, a first subtree of m layers is formed, where m is a positive integer. In the first subtree, the number of sub-blocks including point cloud points in each layer is 1, as shown by the shaded blocks in the figure, and the other sub-blocks in each layer are sub-blocks that do not include point cloud points, as shown by the blank blocks in the figure.

[0091] Specifically, the number of layers m of the first subtree is related to the size of the first block and the leaf node block.

[0092] If the first block is 2 a ×2 b ×2 c The space block of leaf node is 2 a’ ×2 b’ ×2 c’ If the leaf node block is a 1×1×1 spatial block, then the number of layers m = max(a, b, c) - max(a', b', c'). If the leaf node block is a 1×1×1 spatial block, then the number of layers of the first subtree is m = max(a, b, c).

[0093] In some implementations, if a=b=c, the first block is a cubic block, and the leaf node block is a 1×1×1 spatial block, then if breadth-first encoding is used, a total of 8a bits need to be encoded for the first block. However, if the solution of the embodiment of the present application is used, it can be seen from the above description that a total of 3a bits need to be encoded for the first block, which is less than the bits obtained by encoding the first block using breadth-first encoding.

[0094] Similarly, if the first block is not a cubic block and the leaf node block is a 1×1×1 spatial block, then if breadth-first encoding is used, the first block needs to encode 2×(ab)+4×(bc)+8×c=2a+2b+4c bits in total. However, if the solution of the embodiment of the present application is used, it can be seen from the above description that the first block needs to encode a+b+c bits in total, which is less than the bits obtained by encoding the first block using breadth-first encoding.

[0095] Similarly, when the leaf node block is not a 1×1×1 spatial block, the method for calculating the number of bits obtained by encoding the first block using the breadth-first encoding method can be found in the above description and will not be repeated here. And when the leaf node block is not a 1×1×1 spatial block, the number of bits of the first block encoded using the scheme of the embodiment of the present application is also less than the number of bits obtained by encoding the first block using the breadth-first encoding method.

[0096] Therefore, when the number of leaf node blocks including point cloud points in the first block is 1, the technical solution of the embodiment of the present application can reduce the encoding bits of the first block compared to the breadth-first encoding method, thereby saving bit streams and improving point cloud compression efficiency.

[0097] Further, Figure 7 A schematic flowchart of another point cloud encoding method 100 is shown.

[0098] like Figure 7 As shown, the above step S121 may include the following steps.

[0099] S1211: Skip encoding the position coordinate value of the first leaf node block in at least one direction; wherein the position coordinate value of the first leaf node block in the at least one direction is the same as the position coordinate values ​​in other directions.

[0100] In some embodiments, encoding of the position coordinate value of the first leaf node block in one direction is skipped, and encoding of the position coordinate value of the first leaf node block in the other two directions is skipped, wherein the position coordinate value of the first leaf node block in the one direction is the same as the position coordinate value of the first leaf node block in one of the other two directions.

[0101] For example, the position coordinates of the first leaf node block are (x1, y1, z1). If x1=y1, only one value of x1 and y1 is encoded, and the encoding process of the other value is skipped.

[0102] In other embodiments, the encoding of the position coordinate values ​​of the first leaf node block in two directions is skipped, and the encoding of the position coordinate values ​​of the first leaf node block in another direction is performed, wherein the position coordinate values ​​of the first leaf node block in three directions are the same.

[0103] For example, the position coordinates of the first leaf node block are (x1, y1, z1). If x1=y1=z1, only one value among x1, y1, z1 is encoded, and the encoding process of the other two values ​​is skipped.

[0104] Alternatively, if Figure 7 As shown, in the embodiment of the present application, the encoding method 100 may further include the following steps.

[0105] S131: Encode a first identifier, where the first identifier is used to indicate that a position coordinate value of a first leaf node block in at least one direction is the same as a position coordinate value in other directions.

[0106] In some embodiments, if the position coordinate values ​​of the first leaf node block in the first direction and the second direction are the same, the encoded first identifier is the first value; if the position coordinate values ​​of the first leaf node block in the first direction and the third direction are the same, the encoded first identifier is the second value; if the position coordinate values ​​of the first leaf node block in the second direction and the third direction are the same, the encoded first identifier is the third value; if the position coordinate values ​​of the first leaf node block in the three directions are the same, the encoded first identifier is the fourth value.

[0107] For example, if the position coordinate values ​​of the first leaf node block in the X direction and the Y direction are the same, the encoded first identifier is 1; if the position coordinate values ​​of the first leaf node block in the X direction and the Z direction are the same, the encoded first identifier is 2; if the position coordinate values ​​of the first leaf node block in the Y and Z directions are the same, the encoded first identifier is 3; if the position coordinate values ​​of the first leaf node block in the three directions of XYZ are the same, the encoded first identifier is 0.

[0108] It can be understood that if the above scheme is used to encode the first identifier, the first identifier can be encoded as 2 bits to distinguish four different values ​​0-3.

[0109] It can also be understood that the above example only illustrates the value of the first identifier in one case. If the position coordinate values ​​of the first leaf node block in the X direction and the Y direction are the same, the first identifier can also be encoded as 0 or 2 or 3, or any other value. The embodiment of the present application does not make any specific limitation on the value of the first identifier, nor does it make any specific limitation on the number of bits of the first identifier.

[0110] In some other implementations, the first identifier includes three identification bits corresponding to the position coordinate values ​​of the first leaf node block in three directions;

[0111] If the position coordinate values ​​of the first leaf node block in two directions are the same, two identification bits in the first identifier corresponding to the position coordinate values ​​in the two directions are encoded as the same value;

[0112] If the position coordinate values ​​of the first leaf node block in two directions are different, the two identification bits in the first identifier corresponding to the position coordinate values ​​in the two directions are encoded as different values.

[0113] For example, if the position coordinate values ​​of the first leaf node block in the X direction and the Y direction are the same, the encoded first identifier is 110. In the first identifier, the identification bits corresponding to the X direction and the Y direction are the same value 1, while the identification bits corresponding to the Z direction are different values ​​0.

[0114] Similarly, if the position coordinate values ​​of the first leaf node block in the X direction and the Z direction are the same, the encoded first identifier is 101; if the position coordinate values ​​of the first leaf node block in the Y direction and the Z direction are the same, the encoded first identifier is 011; if the position coordinate values ​​of the first leaf node block in the three directions of XYZ are the same, the encoded first identifier is 111.

[0115] Optionally, if the position coordinate values ​​of the first leaf node block in three directions are different from each other, the encoding of the first identifier can be omitted, and the position coordinate values ​​of the first leaf node block in three directions can be directly encoded. The first identifier can also be encoded as a specific value to distinguish the situation where the position coordinate values ​​of the first leaf node have the same value.

[0116] Optionally, the code stream after the first identifier is encoded may be located before the code stream of the position coordinates of the first leaf node block. For example, the code stream after the first identifier is encoded may be connected to the code stream before the position coordinates of the first leaf node block.

[0117] The method of the embodiment of the present application can further reduce the number of coding bits and improve the encoding and decoding efficiency.

[0118] Combination of the above Figures 5 to 7 The number of leaf node blocks including point cloud points in the first block is 1. Figures 8 to 11 This illustrates a case where the number of leaf node blocks including point cloud points in the first block is 2. The two leaf node blocks including point cloud points are also written as a first leaf node block and a second leaf node block.

[0119] Figure 8 A schematic flowchart of another point cloud encoding method 100 is shown.

[0120] like Figure 8 As shown, the above step S110 may include the following steps.

[0121] S112: Determine a first block after the point cloud is divided into a multi-branch tree, wherein the first block includes a first leaf node block and a second leaf node block.

[0122] The above step S120 may include the following steps.

[0123] S122: Encode the position coordinate values ​​of the first leaf node block and the second leaf node block in three directions in the coordinate system of the first block respectively to form a first code stream of the first block.

[0124] Specifically, the process of encoding the position coordinate values ​​of the second leaf node block in three directions in the coordinate system of the first block can be referred to the process of encoding the position coordinate values ​​of the first leaf node block in three directions in the coordinate system of the first block above, and will not be repeated here.

[0125] In the first block, if the number of leaf node blocks including point cloud points is 2, if the size of the first block is 2 a ×2 b ×2 c , the size of the leaf node block of the first block is 2 a’ ×2 b’ ×2 c’ , using the technical solution of the embodiment of the present application, the number of bits of the first block is 2×(a-a')+2×(b-b')+2×(c-c'). If the size of the leaf node block of the first block is 1×1×1, using the technical solution of the embodiment of the present application, the number of bits of the first block is 2a+2b+2c.

[0126] If the breadth-first encoding method is used to encode the first block, it is necessary to divide the first block into a multi-branch tree, and encode the first block according to the division method of each layer of the first block.

[0127] Fig. 9 and Fig.10 Two schematic structural diagrams of the first subtree after the first block is divided in this case are shown. In the first subtree, the subblocks including point cloud points are shown as shaded blocks in the figure, and the subblocks not including point cloud points are shown as blank blocks in the figure.

[0128] exist Fig. 9 In the example, except for the leaf node layer, the number of sub-blocks including point cloud points in each layer of the first subtree is 1. In the leaf node layer, the number of sub-blocks including point cloud points is 2, which are the first leaf node block and the second leaf node block. Fig.10In the above example, from the 0th layer (i.e., the first block) to the i-th layer, the number of sub-blocks of point cloud points in each layer is 1, and from the i+1th layer to the m-th layer, the number of sub-blocks of point cloud points in each layer is 2, where 1≤i<m, and i is a positive integer.

[0129] Therefore, in Fig.10 In the above example, from the i-th layer to the m-1-th layer, each layer needs to encode the division of 2 sub-blocks, and Fig. 9 In the first subtree shown, only the m-1th layer needs to encode the division of the two sub-blocks. If the breadth-first encoding method is adopted, Fig. 9 The first subtree has the least coding bits, or the first block has the least coding bits.

[0130] for Fig. 9 The first subtree in, if the first block is 2 a ×2 a ×2 a The leaf node block is a 1×1×1 space block. If the breadth-first encoding method is adopted, the first block needs to encode 8a+8 bits in total. If the scheme of the embodiment of the present application is adopted, the first block needs to encode 6a bits in total, which is less than the bits obtained by encoding the first block using the breadth-first encoding method.

[0131] Similarly, if the first block is 2 a ×2 b ×2 c The leaf node block of a non-cube space block is a 1×1×1 space block. If the breadth-first encoding method is adopted, the first block needs to encode 2×(ab)+4×(bc)+8×(c-1)+16=2a+2b+4c+8 bits in total. If the scheme of the embodiment of the present application is adopted, the first block needs to encode 2a+2b+2c bits in total, which is less than the bits obtained by encoding the first block using the breadth-first encoding method.

[0132] Similarly, when the leaf node block of the first block is not a 1×1×1 spatial block, the bits of the first block encoded using the scheme of the embodiment of the present application are also less than the bits of the first block encoded using the breadth-first encoding method.

[0133] Therefore, when the number of leaf node blocks including point cloud points in the first block is 2, the technical solution of the embodiment of the present application can also reduce the encoding bits of the first block compared with the breadth-first encoding method, thereby saving bit streams and improving the point cloud compression efficiency.

[0134] Further, Fig.11 A schematic flowchart of another point cloud encoding method 100 is shown.

[0135] like Fig.11 As shown, the above step S122 may include the following steps.

[0136] S1221: Skip encoding the position coordinate value of the second leaf node block in at least one direction; wherein the position coordinate value of the second leaf node block in the at least one direction is the same as the position coordinate value of the first leaf node block in the at least one direction.

[0137] In some embodiments, the encoding of the position coordinate value of the second leaf node block in one direction is skipped, and the encoding of the position coordinate value of the second leaf node block in the other two directions is skipped, wherein the position coordinate value of the second leaf node block in the one direction is the same as the position coordinate value of the first leaf node block in the one direction.

[0138] For example, the position coordinates of the first leaf node block are (x1, y1, z1), and the position coordinates of the second leaf node block are (x2, y2, z2). After the position coordinates of the first leaf node block are encoded, when encoding the position coordinates of the second leaf node block, if x2=x1, the encoding process of x2 is skipped and y2 and z2 are directly encoded.

[0139] In other embodiments, the encoding of the position coordinate values ​​of the second leaf node block in two directions is skipped, and the encoding of the position coordinate values ​​of the second leaf node block in another direction is performed, wherein the position coordinate values ​​of the second leaf node block in the two directions are respectively the same as the position coordinate values ​​of the first leaf node block in the two directions.

[0140] For example, the position coordinates of the first leaf node block are (x1, y1, z1), and the position coordinates of the second leaf node block are (x2, y2, z2). After the position coordinates of the first leaf node block are encoded, when encoding the position coordinates of the second leaf node block, if x2=x1 and y2=y1, the encoding process of x2 and y2 is skipped and z2 is directly encoded.

[0141] In other embodiments, the encoding of the position coordinate values ​​of the second leaf node block in three directions is directly skipped, wherein the position coordinate values ​​of the second leaf node block in three directions are respectively the same as the position coordinate values ​​of the first leaf node block in three directions. For example, the position coordinates of the first leaf node block are (x1, y1, z1), and the position coordinates of the second leaf node block are (x2, y2, z2). After the position coordinates of the first leaf node block are encoded, when the position coordinates of the second leaf node block are encoded, if x2=x1, y2=y1 and z2=z1, the encoding of the position coordinate values ​​of the second leaf node block in three directions is skipped.

[0142] Alternatively, if Fig.11 As shown, in the embodiment of the present application, the encoding method 100 may further include the following steps.

[0143] S132: Encode a second identifier, where the second identifier is used to indicate that a position coordinate value of the second leaf node block in at least one direction is the same as a position coordinate value of the first leaf node block in the at least one direction.

[0144] In some implementations, the second identifier includes three identification bits corresponding to position coordinate values ​​of the second leaf node block in three directions;

[0145] If the position coordinate value of the second leaf node block in one direction is the same as the position coordinate value of the first leaf node block in one direction, encoding the identification bit corresponding to the position coordinate value of the second leaf node block in the one direction as the first value;

[0146] If the position coordinate value of the second leaf node block in one direction is different from the position coordinate value of the first leaf node block in the same direction, the identification bit corresponding to the position coordinate value of the second leaf node block in the one direction is encoded as a second value.

[0147] For example, if the position coordinate value of the second leaf node block in the X direction is the same as the position coordinate value of the second leaf node block in the X direction, the identification bit corresponding to the position coordinate value in the X direction in the encoded second identifier is 1, that is, the first value is 1, and if the position coordinate value of the second leaf node block in the Y direction is different from the position coordinate value of the second leaf node block in the Y direction, and the position coordinate value of the second leaf node block in the Z direction is different from the position coordinate value of the second leaf node block in the Z direction, then the identification bit corresponding to the position coordinate value in the Y direction and the Z direction in the encoded second identifier is 0, that is, the second value is 0, and at this time, the second identifier is encoded as 100.

[0148] In addition, the first value may also be 0, and the corresponding second value may be 1. The embodiment of the present application does not specifically limit the first value and the second value.

[0149] Optionally, if the position coordinate values ​​of the second leaf node block in three directions are different from the position coordinate values ​​of the first leaf node block in three directions, the encoding of the second identifier can be omitted, and the position coordinate values ​​of the second leaf node block in three directions can be directly encoded. The second identifier can also be encoded as a specific value to distinguish the situation where the position coordinate value of the second leaf node is the same as the position coordinate value of the first leaf node.

[0150] Optionally, the encoded code stream of the second identifier may be located before the code stream of the position coordinates of the second leaf node block. For example, the code stream of the second identifier may be connected before the code stream of the position coordinates of the second leaf node block; or, the code stream of the second identifier may also be connected before or after the code stream of the first identifier, followed by the code stream of the position coordinates of the first leaf node block and the code stream of the position coordinates of the second leaf node block. The embodiment of the present application does not specifically limit the position of the code stream of the second identifier.

[0151] Furthermore, if the position coordinate values ​​of the second leaf node block in three directions are different from the position coordinate values ​​of the first leaf node block in three directions, but the position coordinate value of the second leaf node block in at least one direction is the same as the position coordinate values ​​in other directions, then the encoding of the position coordinate value of the second leaf node block in at least one direction can also be skipped.

[0152] Specifically, in this case, the encoding of the position coordinates of the second leaf node block can refer to the encoding process of the position coordinates of the first leaf node block above, for example, refer to the relevant descriptions of steps S1211 and S131 above, which will not be repeated here.

[0153] The method of the embodiment of the present application can further reduce the number of coding bits and improve the encoding and decoding efficiency.

[0154] Fig.12 A schematic flowchart of another point cloud encoding method 100 is shown.

[0155] like Fig.12 As shown, the above step S120 may further include the following steps.

[0156] S123: Encode the position coordinates of the leaf node block in the first block and the number of point cloud points in the leaf node block using a depth-first target encoding method to form a first code stream of the first block.

[0157] Specifically, if the number of leaf node blocks including point cloud points in the first block is 1, that is, only the first leaf node block is included, after encoding the position coordinates of the first leaf node block, the number of point cloud points in the first leaf node block is encoded.

[0158] Similarly, if the number of leaf node blocks including point cloud points in the first block is 2, that is, including the first leaf node block and the second leaf node block, after encoding the position coordinates of the first leaf node block and the second leaf node block, the number of point cloud points in the first leaf node block and the second leaf node block are encoded respectively.

[0159] In some embodiments, if the number of point cloud points in the first leaf node block is equal to the number of point cloud points in the second leaf node block, the encoding process of the number of point cloud points in the second leaf node block can be skipped, or in other words, the number of point cloud points in the first leaf node block and the number of point cloud points in the second leaf node block are encoded as the same value.

[0160] As a possible implementation, if the number of point cloud points in the leaf node block is n, n-1 is encoded, where n is a positive integer.

[0161] It is understandable that any binarization method in the prior art can be used to binarize the number of the above-mentioned point cloud points, and then perform a subsequent entropy coding process to obtain a number code stream of the point cloud points.

[0162] Among them, 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 encoding method includes but is not limited to a truncated Rice code, a K-order exponential Columbus, a unary code, and the like. The fixed-length code encoding method and the variable-length code encoding method can be referred to the relevant description in the prior art, and will not be repeated here.

[0163] like Fig.12 As shown, the point cloud encoding method 100 may further include the following steps.

[0164] S140: Encode a second block in the point cloud to form a second code stream, and in a breadth-first encoding order, the second block is located after the first block.

[0165] After encoding the first block in the point cloud, the sub-blocks except the first block in the point cloud are encoded in a breadth-first encoding order.

[0166] Specifically, after encoding the first block in the point cloud, the second block in the point cloud is encoded to form a second code stream, and in the breadth-first encoding order, the second block is located after the first block.

[0167] Then, still according to the breadth-first encoding method, each layer of sub-blocks in the tree structure after the point cloud is divided by the multi-branch tree is encoded in turn. When encoding to the sub-block in the first block, the encoding of the sub-block in the first block is skipped.

[0168] Optionally, when encoding sub-blocks other than the first block in the point cloud, it is also possible to determine whether the other sub-blocks meet the preset conditions before encoding them. If the preset conditions are met, the above method can also be used for encoding. In other words, the tree structure of the point cloud can include multiple first blocks. When traversing the tree structure of the point cloud in breadth-first traversal order, it is possible to switch to depth-first traversal order at each first block to encode the position coordinates of the leaf node blocks in the first block.

[0169] The above mainly describes the relevant encoding process of the first block. Since the encoding method of the first block is different from the encoding methods of other sub-blocks in the point cloud, before encoding the first block, the encoding method of the first block needs to be identified to facilitate the decoding end to decode and obtain relevant information.

[0170] Fig.13 A schematic flowchart of another point cloud encoding method 100 is shown.

[0171] like Fig.13 As shown, the point cloud encoding method 100 may further include the following steps.

[0172] S150: Encode a third identifier, where the third identifier is used to identify a depth-first target encoding mode.

[0173] like Fig.13 As shown, step 150 may be performed after step S110, that is, after determining the first block, the identifier identifying the target encoding method, that is, the third identifier, is encoded.

[0174] Optionally, the third identifier may be an identifier in any form, for example, a number, a letter or a character, which is not specifically limited in the embodiment of the present application.

[0175] In some embodiments, the third identifier can be used to identify that the target encoding method is one of multiple depth-first encoding methods, wherein the depth-first encoding method includes but is not limited to the target encoding method and the isolated point direct encoding method in the present application.

[0176] Therefore, the third identifier in the embodiment of the present application can be used to distinguish the target encoding method from other depth-first encoding methods.

[0177] For example, the identifier used to identify the isolated point direct encoding method is 0, and the first identifier used to identify the target encoding method in this application is 1.

[0178] Of course, the third identifier can be used not only to identify which one of multiple depth-first encoding modes the target encoding mode is, but also to identify which one of all encoding modes the target encoding mode is.

[0179] Optionally, any binarization method in the prior art may be used to binarize the third identifier, and then perform a subsequent entropy coding process to obtain a third identifier code stream.

[0180] In some implementations, the code stream of the third identifier is located before the first code stream of the first block.

[0181] In some other implementations, the first identification code stream may also be located in the geometry header code stream of the point cloud.

[0182] In this case, if the geometric header information of the point cloud does not include identifiers for identifying other encoding methods, then the third identifier can not only identify the encoding method of the first block as the target encoding method, but also be used to identify the encoding methods of other blocks in the point cloud that meet the preset conditions as the target encoding method.

[0183] In a third implementation manner, the code stream of the third identifier may also be located before the first code stream and in the geometry header code stream at the same time.

[0184] In this case, the code stream of the third identifier located in the geometry header code stream is used to identify that the point cloud can be encoded using the target encoding method, and the code stream of the third identifier located before the first code stream is used to identify that the encoding method of the first block is the target encoding method.

[0185] Alternatively, if Fig.13 As shown, the point cloud encoding method 100 may further include the following steps.

[0186] S160: Encode a fourth identifier, where the fourth identifier is used to identify that the encoding mode is switched from breadth-first to depth-first.

[0187] Specifically, on the basis of adopting the third identifier, a fourth identifier may be added before the third identifier to indicate that the encoding mode is switched from breadth-first to depth-first.

[0188] Optionally, the fourth identifier can be encoded in a partitioning manner. If the first block is obtained by octree partitioning, the fourth identifier can be encoded as 8bit 0; if the first block is obtained by quadtree partitioning, the fourth identifier can be encoded as 4bit 0; if the first block is obtained by binary tree partitioning, the fourth identifier can be encoded as 2bit 0.

[0189] Optionally, the encoded code stream of the fourth identifier is located before the first code stream of the first block.

[0190] Further, if the code stream of the third identifier is also located before the first code stream, the code stream of the fourth identifier is located before the code stream of the third identifier.

[0191] Combination of the above Figures 4 to 13 The point cloud encoding method in this application is described below. Figures 14 to 21 , explaining the decoding method of the point cloud in the present application, it can be understood that the decoding method of the point cloud in the embodiment of the present application is the inverse process of the above encoding method, and the related technical solutions can refer to the relevant description of the encoding method above.

[0192] Fig.14 A schematic flowchart of a point cloud decoding method 200 is shown.

[0193] like Fig.14 As shown, the point cloud decoding method 200 may include the following steps.

[0194] S210: Receive a first code stream of a first block, where the first block is a spatial block after the point cloud is divided by a multi-branch tree.

[0195] S220: Decode the first bitstream using a depth-first target decoding method to obtain the position coordinates of the leaf node blocks including the point cloud points in the first block; wherein the number of leaf node blocks is not greater than N, and N is a positive integer determined according to the division method of the first block.

[0196] Specifically, the first code stream may be the first code stream of the first block obtained by encoding using the point cloud encoding method 100 described above. Corresponding to the encoding method 100 described above, in the embodiment of the present application, after receiving the first code stream, the first code stream is decoded using a depth-first target decoding method, and the position coordinates of the leaf node blocks including the point cloud points in the first block after the point cloud is divided into a multi-branch tree can be reconstructed.

[0197] In some embodiments, the division method of the first block includes: one or more of octree division, quadtree division, and binary tree division, and N≤2.

[0198] Specifically, in some cases, the number of leaf node blocks including point cloud points in the first block is 1, and the 1 leaf node block including point cloud points is the first leaf node block. In other cases, the number of leaf node blocks including point cloud points in the first block is 2, and the 2 leaf node blocks including point cloud points are the first leaf node block and the second leaf node block.

[0199] 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 conducive to the parallelization of the point cloud decoding process and improves the decoding efficiency.

[0200] In addition, since the encoding method for the first block at the encoding end 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 decode the first code stream relatively quickly, thereby further improving the decoding efficiency.

[0201] Fig.15 A schematic flowchart of another point cloud decoding method 200 is shown.

[0202] like Fig.15 As shown, the above step S210 may include the following steps.

[0203] S211: Receive a first code stream of a first block, wherein the first code stream includes a position coordinate code stream of a first leaf node block.

[0204] The above step S220 may include the following steps.

[0205] S221: Decode the position coordinate code stream of the first leaf node block to obtain the position coordinate values ​​of the first leaf node block in three directions in the coordinate system of the first block.

[0206] Corresponding to steps S111 and S121 in the above encoding method, in an embodiment of the present application, the position coordinate code stream of the first leaf node block is decoded to obtain the position coordinates of the first leaf node block in the three directions of X, Y, and Z in the first block.

[0207] Optionally, in the position coordinate code stream of the first leaf node block, after the position coordinate value code stream of the first leaf node block in one direction, there is arranged a position coordinate value code stream of the first leaf node block in another direction. When decoding the code stream of the position coordinate value of the first leaf node block, the position coordinate value of the first leaf node block in one direction is first decoded, and then the position coordinate value of the first leaf node block in another direction is decoded.

[0208] For example, in the position coordinate code stream of the first leaf node block, the code stream of the position coordinate values ​​of the first leaf node block in three directions of XYZ is arranged in sequence, and the code stream of the position coordinate values ​​of the first leaf node block is decoded, first decoding to obtain the position coordinate value of the first leaf node block in the X direction, then decoding to obtain the position coordinate value of the first leaf node block in the Y direction, and finally decoding to obtain the position coordinate value of the first leaf node block in the Z direction.

[0209] Of course, in the position coordinate code stream of the first leaf node block, the code streams of the position coordinate values ​​of the first leaf node block in three directions, such as YXZ, ZYX, etc., can also be arranged in sequence. The embodiment of the present application does not specifically limit the direction order.

[0210] Optionally, in the position coordinate code stream of the first leaf node block, after 1 bit of the position coordinate value of the first leaf node block in one direction, 1 bit of the position coordinate value of the first leaf node block in another direction is arranged.

[0211] In one implementation, in the position coordinate code stream of the first leaf node block, the low bit of the position coordinate value of the first leaf node block in one direction is located before the high bit.

[0212] In another embodiment, in the position coordinate code stream of the first leaf node block, a high bit of the position coordinate value of the first leaf node block in one direction is located before a low bit.

[0213] It is understandable that in the position coordinate code stream of the first leaf node block, after any bit of the position coordinate value of the first leaf node block in one direction, there is arranged any bit of the position coordinate value of the first leaf node block in another direction. The embodiment of the present application does not specifically limit the direction order, nor does it specifically limit the arrangement order of the bits in each direction. The direction order and the bit arrangement order can be agreed upon by the encoding end and the decoding end. The encoding end encodes in a specific order, and the decoding end decodes in the same specific order.

[0214] Furthermore, in some embodiments, Fig.16 A schematic flowchart of another point cloud decoding method 200 is shown.

[0215] like Fig.16 As shown, the above step S221 may include the following steps.

[0216] S2211: Decode the position coordinate code stream of the first leaf node block to obtain the position coordinate value of the first leaf node block in one direction.

[0217] S2212: Using the position coordinate value of the first leaf node block in the one direction as the position coordinate value of the first leaf node block in the other two directions.

[0218] Corresponding to step S1211 in the above encoding method, in this embodiment, the position coordinate values ​​of the first leaf node block in three directions are the same.

[0219] For example, the position coordinate code stream of the first leaf node block is decoded to obtain a position coordinate value of the first leaf node block in one direction as a, and the position coordinate of the first leaf node block in the first block is (a, a, a).

[0220] Furthermore, in some other embodiments, Fig.17 A schematic flowchart of another point cloud decoding method 200 is shown.

[0221] like Fig.17 As shown, the above step S221 may include the following steps.

[0222] S2213: Decode the position coordinate code stream of the first leaf node block to obtain the position coordinate values ​​of the first leaf node block in two directions.

[0223] S2214: Use one of the position coordinate values ​​of the first leaf node block in the two directions as the position coordinate value of the first leaf node block in the other direction.

[0224] Corresponding to step S1211 in the above encoding method, in this embodiment, one of the position coordinate values ​​in the two directions is the same as the position coordinate value of the first leaf node block in the other direction.

[0225] For example, the position coordinate code stream of the first leaf node block is decoded to obtain a position coordinate value of the first leaf node block in the X direction as x1, a position coordinate value in the Y direction as y1, and the position coordinate value of the first leaf node block in the X direction is the same as the position coordinate value in the Z direction, then the position coordinate of the first leaf node block is (x1, y1, x1).

[0226] Alternatively, if Fig.16 and Fig.17 As shown, in the embodiment of the present application, the above step S211 may include the following steps.

[0227] S2111: Receive a first code stream of a first block, wherein the first code stream includes a position coordinate code stream of a first leaf node block and a first identifier code stream.

[0228] In addition, the encoding method 100 may further include the following steps.

[0229] S231: Decode the first identifier code stream to obtain a first identifier, where the first identifier is used to indicate that the position coordinate value of the first leaf node block in at least one direction is the same as the position coordinate values ​​in other directions.

[0230] Corresponding to step S131 in the above encoding method, the relevant technical solution of the first identifier can refer to the relevant description in the above encoding method, which will not be repeated here.

[0231] Combination of the above Figures 15 to 17 The first code stream includes the position coordinate code stream of the first leaf node block. Figure 18 to Figure 19 The case where the first code stream includes the position coordinate code streams of the first leaf node block and the second leaf node block is described.

[0232] Fig.18 A schematic flowchart of another point cloud decoding method 200 is shown.

[0233] In an embodiment of the present application, the first code stream includes a position coordinate code stream of a first leaf node block and a second leaf node block.

[0234] like Fig.18As shown, the above step S210 may include the following steps.

[0235] S212: Receive a first code stream of a first block, wherein the first code stream includes a position coordinate code stream of a first leaf node block and a second leaf node block.

[0236] The above step S220 may include the following steps.

[0237] S222: Decode the position coordinate code streams of the first leaf node block and the second leaf node block to obtain position coordinate values ​​of the first leaf node block and the second leaf node block in three directions in the coordinate system of the first block.

[0238] Corresponding to steps S112 and S122 in the above encoding method, in an embodiment of the present application, the position coordinate code stream of the second leaf node block is decoded to obtain the position coordinates of the second leaf node block in the three directions of X, Y, and Z in the first block.

[0239] Specifically, the process of decoding the position coordinate code stream of the second leaf node block to obtain the position coordinate values ​​of the second leaf node in three directions in the coordinate system of the first block can be referred to the process of decoding the position coordinate code stream of the first leaf node block to obtain the position coordinate values ​​of the first leaf node in three directions in the coordinate system of the first block, which will not be repeated here.

[0240] Further, Fig.19 A schematic flowchart of another point cloud decoding method 200 is shown.

[0241] like Fig.19 As shown, the above step S212 may include the following steps.

[0242] S2121: Receive a first code stream of a first block, wherein the first code stream includes a position coordinate code stream of a first leaf node block, a position coordinate code stream of a second leaf node block, and a second identifier code stream.

[0243] In addition, the above step S222 may include the following steps.

[0244] S2221: Decode the position coordinate code stream of the first leaf node block to obtain the position coordinate values ​​of the first leaf node block in three directions in the coordinate system of the first block.

[0245] S2221: Use the position coordinate value of the first leaf node block in at least one direction as the position coordinate value of the second leaf node block in at least one direction.

[0246] Corresponding to step S1221 in the above encoding method, in the embodiment of the present application, the position coordinate code stream of the second leaf node block does not include the position coordinate value of the second leaf node block in at least one direction. The position coordinate value of the first leaf node block in the at least one direction is the same as the position coordinate value of the second leaf node block in the at least one direction.

[0247] In some embodiments, the position coordinate code stream of the second leaf node block does not include the position coordinate value of the second leaf node block in one direction, but includes the position coordinate value of the second leaf node block in the other two directions, wherein the position coordinate value of the second leaf node block in the one direction is the same as the position coordinate value of the first leaf node block in the one direction, and the position coordinate value of the first leaf node block in the one direction is used as the position coordinate value of the second leaf node block in the one direction.

[0248] In other embodiments, the position coordinate code stream of the second leaf node block does not include the position coordinate values ​​of the second leaf node block in two directions, but includes the position coordinate values ​​of the second leaf node block in another direction, wherein the position coordinate values ​​of the second leaf node block in the two directions are respectively the same as the position coordinate values ​​of the first leaf node block in the two directions, and the position coordinate values ​​of the first leaf node block in the two directions are respectively used as the position coordinate values ​​of the second leaf node block in the two directions.

[0249] In other embodiments, if the first code stream does not include the position coordinate code stream of the second leaf node block, the position coordinate values ​​of the second leaf node block in three directions are respectively the same as the position coordinate values ​​of the first leaf node block in three directions, and the position coordinate values ​​of the first leaf node block in three directions are respectively used as the position coordinate values ​​of the second leaf node block in three directions.

[0250] Alternatively, if Fig.19 As shown, in the embodiment of the present application, the decoding method 200 may further include the following steps.

[0251] S232: Decode the second identifier code stream to obtain a second identifier, where the second identifier is used to indicate that the position coordinate value of the second leaf node block in at least one direction is the same as the position coordinate value of the first leaf node block in the at least one direction.

[0252] Corresponding to step S132 in the above encoding method, the relevant technical solution of the second identifier can refer to the relevant description in the above encoding method, which will not be repeated here.

[0253] Fig. 20 A schematic flowchart of another point cloud decoding method 200 is shown.

[0254] like Fig. 20 As shown, the above step S210 may include the following steps.

[0255] S213: Receive a first code stream of a first block, where the first block is a spatial block after the point cloud is divided by a multi-branch tree, and the first code stream includes a position coordinate code stream of a leaf node block and a point cloud point quantity code stream.

[0256] The above step S220 may include the following steps.

[0257] S223: Use depth-first target decoding to decode the position coordinate code stream of the leaf node block to obtain the position coordinates of the leaf node block including the point cloud points in the first block, and decode the point cloud point quantity code stream to obtain the number of point cloud points in the leaf node block, wherein the number of leaf node blocks is not greater than N, and N is a positive integer determined according to the division method of the first block.

[0258] Corresponding to step S123 in the above encoding method. Specifically, if the number of leaf node blocks including point cloud points in the first block is 1, the first code stream only includes the position coordinate code stream of the first leaf node block and the number code stream of point cloud points in the first leaf node block.

[0259] Similarly, if the number of leaf node blocks including point cloud points in the first block is 2, the first code stream includes the position coordinate code stream of the first leaf node block and the second leaf node block, the number code stream of point cloud points in the first leaf node block, and the number code stream of point cloud points in the second leaf node block.

[0260] In some embodiments, if the number of point cloud points in the first leaf node block is equal to the number of point cloud points in the second leaf node block, the first code stream may not include the code stream of the number of point cloud points in the second leaf node block, and the number of point cloud points in the first leaf node block obtained by decoding the code stream of the number of point cloud points in the first leaf node block is used as the number of point cloud points in the second leaf node block.

[0261] As a possible implementation, the value obtained by decoding the code stream of the number of point cloud points is n-1, and the number of point cloud points in the leaf node block is n, where n is a positive integer.

[0262] like Fig. 20 As shown, the point cloud decoding method 200 may further include the following steps.

[0263] S240: Receive a second code stream of a second block, and decode the second code stream to obtain point cloud point positions in the second block, wherein in a breadth-first decoding order, the second block is located after the first block.

[0264] This corresponds to step S140 in the above encoding method. In the embodiment of the present application, the relevant scheme for decoding the second bitstream can be referred to the above description, which will not be described here.

[0265] 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, before decoding the first code stream, it is necessary to decode the relevant identification code stream to obtain relevant information of the decoding method of the first code stream.

[0266] Fig.21 A schematic flowchart of another point cloud decoding method 200 is shown.

[0267] like Fig.21 As shown, the point cloud decoding method 200 may further include the following steps.

[0268] S250: Receive a third identifier code stream, and decode the third identifier code stream to obtain a third identifier, where the third identifier is used to identify a depth-first target decoding mode, and the target decoding mode is a decoding mode corresponding to the depth-first target encoding mode.

[0269] like Fig.21 As shown, step 250 may be performed before step S210, that is, before receiving the first code stream, the third identifier code stream is received, and the third identifier code stream is decoded to obtain a subsequent decoding method for the first code stream.

[0270] This corresponds to step S150 in the above encoding method. In the embodiment of the present application, the relevant scheme of the third identifier can be found in the above description, which will not be repeated here.

[0271] S260: Receive a fourth identifier code stream, and decode the fourth identifier code stream to obtain a fourth identifier, where the fourth identifier is used to indicate that the decoding mode is switched from breadth-first to depth-first.

[0272] Optionally, before receiving the third identifier code stream, a fourth identifier code stream may be received, and the fourth identifier code stream may be decoded to obtain a fourth identifier, where the fourth identifier is used to identify that the decoding mode is switched from breadth-first to depth-first.

[0273] This corresponds to step S160 in the above encoding method. In the embodiment of the present application, the relevant scheme of the fourth identifier can be found in the above description, which will not be repeated here.

[0274] Combination of the above Figures 4 to 21 , describes in detail the method embodiment of the present application, and the following is combined with Fig. 22 and Fig.23, an embodiment of the point cloud encoding and decoding device of the present application is described in detail. It should be understood that the device embodiment and the method embodiment correspond to each other, and similar descriptions can refer to the method embodiment.

[0275] Fig. 22 It is a schematic block diagram of a point cloud encoding device 10 according to an embodiment of the present application, and the point cloud encoding device 10 corresponds to a point cloud encoding method 100.

[0276] like Fig. 22 As shown, the point cloud encoding device 10 includes: a processor 11 and a memory 12;

[0277] 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:

[0278] Determine a first block of the point cloud after multi-branch tree division, wherein the number of leaf node blocks including point cloud points in the first block is not greater than N, and N is a positive integer determined according to the division method of the first block; and encode the position coordinates of the leaf node blocks in the first block using a depth-first target encoding method to form a first code stream of the first block.

[0279] Optionally, the division method of the first block includes: one or more of octree division, quadtree division, and binary tree division, and N≤2.

[0280] In one case, the first block includes a first leaf node block, which is a leaf node block including point cloud points; the processor 11 is specifically used to: respectively encode the position coordinate values ​​of the first leaf node block in three directions in the coordinate system of the first block to form a first code stream of the first block.

[0281] Optionally, the processor 11 is specifically configured to: if the position coordinate value of the first leaf node block in at least one direction is the same as the position coordinate values ​​in other directions, skip encoding the position coordinate value of the first leaf node block in at least one direction.

[0282] Furthermore, the processor 11 is also used to: encode a first identifier, where the first identifier is used to indicate that a position coordinate value of the first leaf node block in at least one direction is the same as a position coordinate value in other directions.

[0283] For example, processor 11 is used to: if the position coordinate values ​​of the first leaf node block in the first direction and the second direction are the same, encode the first identifier as the first value; if the position coordinate values ​​of the first leaf node block in the first direction and the third direction are the same, encode the first identifier as the second value; if the position coordinate values ​​of the first leaf node block in the second direction and the third direction are the same, encode the first identifier as the third value; if the position coordinate values ​​of the first leaf node block in the three directions are the same, encode the first identifier as the fourth value.

[0284] For another example, the first identifier includes three identification bits, corresponding to the position coordinate values ​​of the first leaf node block in three directions; the processor 11 is used to: if the position coordinate values ​​of the first leaf node block in two directions are the same, encode the two identification bits in the first identifier corresponding to the position coordinate values ​​in the two directions as the same value; if the position coordinate values ​​of the first leaf node block in two directions are different, encode the two identification bits in the first identifier corresponding to the position coordinate values ​​in the two directions as different values.

[0285] Optionally, the code stream of the first identifier is located before the code stream of the position coordinates of the first leaf node block.

[0286] In another case, the first block also includes a second leaf node block, which is a leaf node block including point cloud points; the processor 11 is used to: respectively encode the position coordinate values ​​of the first leaf node block and the second leaf node block in three directions in the coordinate system of the first block to form a first code stream of the first block.

[0287] Optionally, if the position coordinate value of the second leaf node block in at least one direction is the same as the position coordinate value of the first leaf node block in at least one direction, the processor 11 is used to: skip encoding the position coordinate value of the second leaf node block in at least one direction.

[0288] Optionally, the processor 11 is further used to: encode a second identifier, where the second identifier is used to indicate that a position coordinate value of the second leaf node block in at least one direction is the same as a position coordinate value of the first leaf node block in at least one direction.

[0289] For example, the second identifier includes three identification bits, corresponding to the position coordinate values ​​of the second leaf node block in three directions; the processor 11 is used to: if the position coordinate value of the second leaf node block in one direction is the same as the position coordinate value of the first leaf node block in one direction, encode the identification bit corresponding to the position coordinate value of the second leaf node block in one direction as a first value; if the position coordinate value of the second leaf node block in one direction is different from the position coordinate value of the first leaf node block in one direction, encode the identification bit corresponding to the position coordinate value of the second leaf node block in one direction as a second value.

[0290] Optionally, the code stream of the second identifier is located before the code streams of the position coordinates of the first leaf node block and the second leaf node block.

[0291] In some embodiments, the first block is 2 in the three directions of XYZ. a ×2 b ×2 c The space block of leaf node is 2 a’×2 b’ ×2 c’ A spatial block, wherein a≥a', b≥b', c≥c', and a, b, c and a', b', c' are integers; the processor 11 is used to: use (a-a') bits to encode the position coordinate value of the leaf node block in the X direction; use (b-b') bits to encode the position coordinate value of the leaf node block in the Y direction; use (c-c') bits to encode the position coordinate value of the leaf node block in the Z direction.

[0292] Specifically, if a'=b'=c'=0, the leaf node block is a 1×1×1 spatial block; then the processor 11 is used to: use a bits to encode the position coordinates of the leaf node block in the X direction; use b bits to encode the position coordinates of the leaf node block in the Y direction; and use c bits to encode the position coordinates of the leaf node block in the Z direction.

[0293] Optionally, the processor 11 is used to: after encoding the position coordinate value of the leaf node block in one direction, encode the position coordinate value of the leaf node block in another direction.

[0294] Optionally, the processor 11 is used to: after encoding the position coordinate value of the leaf node block in one direction by one bit, encode the position coordinate value of the leaf node block in another direction by one bit.

[0295] For example, processor 11 is used to: after encoding the lowest bit of the position coordinate value of the leaf node block in one direction, encode the lowest bit of the position coordinate value of the leaf node block in another direction; or, after encoding the highest bit of the position coordinate value of the leaf node block in one direction, encode the highest bit of the position coordinate value of the leaf node block in another direction.

[0296] Optionally, the processor 11 is further configured to: encode the number of point cloud points in the leaf node block.

[0297] Optionally, the processor 11 is further used to: encode a third identifier, where the third identifier is used to identify a depth-first target encoding mode.

[0298] Specifically, the code stream of the third identifier may be located before the first code stream of the first block; and / or, the code stream of the third identifier is located in the geometry header code stream of the point cloud.

[0299] Optionally, the processor 11 is further configured to: encode a fourth identifier, where the fourth identifier is used to identify that the encoding mode is switched from breadth-first to depth-first.

[0300] For example, processor 11 is used to: if the first block is obtained by using octree partitioning, encode the fourth identifier as eight bits of 0; or, if the first block is obtained by using quadtree partitioning, encode the fourth identifier as four bits of 0; or, if the first block is obtained by using binary tree partitioning, encode the fourth identifier as two bits of 0.

[0301] Optionally, the fourth identification code symbol is located before the third identifier.

[0302] Optionally, the processor 11 is further configured to: encode a second block in the point cloud to form a second code stream, wherein the second block is located after the first block in a breadth-first encoding order.

[0303] Fig.23 It is a schematic block diagram of a point cloud decoding device 20 according to an embodiment of the present application, and the point cloud decoding device 20 corresponds to a point cloud decoding method 200.

[0304] like Fig.23 As shown, the point cloud decoding device 20 includes: a processor 21 and a memory 22;

[0305] The memory 22 may be used to store programs, and the processor 21 may be used to execute the programs stored in the memory to perform the following operations:

[0306] A first code stream of a first block is received, where the first block is a spatial block after the point cloud is divided by a multi-branch tree; the first code stream is decoded using a depth-first target decoding method to obtain position coordinates of leaf node blocks including point cloud points in the first block; wherein the number of leaf node blocks is not greater than N, and N is a positive integer determined according to the division method of the first block.

[0307] In some implementations, the division method of the first block includes: one or more of octree division, quadtree division, and binary tree division, and N≤2.

[0308] In one case, the first code stream includes: a position coordinate code stream of a first leaf node block, where the first leaf node block is a leaf node block including point cloud points; the processor 21 is used to: decode the position coordinate code stream of the first leaf node block to obtain the position coordinate values ​​of the first leaf node block in three directions in the coordinate system of the first block.

[0309] Optionally, the processor 21 is used to: decode the position coordinate code stream of the first leaf node block to obtain the position coordinate value of the first leaf node block in one direction or two directions; use the position coordinate value of the first leaf node block in one direction as the position coordinate value of the first leaf node block in the other two directions; or use one of the position coordinate values ​​of the first leaf node block in the two directions as the position coordinate value of the first leaf node block in the other direction.

[0310] Optionally, the first code stream also includes a first identifier code stream, and the processor 21 is further used to: decode the first identifier code stream to obtain a first identifier, where the first identifier is used to indicate that the position coordinate value of the first leaf node block in at least one direction is the same as the position coordinate value in other directions.

[0311] In some embodiments, if the first identifier is a first value, the first identifier is used to indicate that the position coordinate values ​​of the first leaf node block in the first direction and the second direction are the same; if the first identifier is a second value, the first identifier is used to indicate that the position coordinate values ​​of the first leaf node block in the first direction and the third direction are the same; if the first identifier is a third value, the first identifier is used to indicate that the position coordinate values ​​of the first leaf node block in the second direction and the third direction are the same; if the first identifier is a fourth value, the first identifier is used to indicate that the position coordinate values ​​of the first leaf node block in three directions are the same.

[0312] In some other embodiments, the first identifier includes three identification bits corresponding to the position coordinate values ​​of the first leaf node block in three directions; if two identification bits in the first identifier are encoded as the same value, the position coordinate values ​​of the first leaf node block in the two directions corresponding to the two identification bits are the same;

[0313] If the two identification bits in the first identifier are encoded as different values, the position coordinate values ​​of the first leaf node block in the two directions corresponding to the two identification bits are different.

[0314] Optionally, in the first code stream, the first identifier code stream is located before the position coordinate code stream of the first leaf node block.

[0315] In another case, in addition to the position coordinate code stream of the first leaf node block, the first code stream also includes: the position coordinate code stream of the second leaf node block including the point cloud points in the first block; the processor 21 is used to: decode the position coordinate code stream of the first leaf node block and the position coordinate code stream of the second leaf node block to obtain the position coordinate values ​​of the first leaf node block and the second leaf node block in three directions in the coordinate system of the first block.

[0316] Optionally, if the position coordinate code stream of the second leaf node block does not include the position coordinate value of the second leaf node block in at least one direction; the processor 21 is used to: decode the position coordinate code stream of the first leaf node block to obtain the position coordinate values ​​of the first leaf node block in three directions in the coordinate system of the first block; and use the position coordinate value of the first leaf node block in at least one direction as the position coordinate value of the second leaf node block in at least one direction.

[0317] Furthermore, the first code stream also includes a second identifier code stream, and the processor 21 is also used to: decode the second identifier code stream to obtain a second identifier, and the second identifier is used to indicate that the position coordinate value of the second leaf node block in at least one direction is the same as the position coordinate value of the first leaf node block in at least one direction.

[0318] For example, the second identifier includes three identification bits, corresponding to the position coordinate values ​​of the second leaf node block in three directions; if an identification bit in the second identifier is a first value, the position coordinate value of the second leaf node block in a direction corresponding to one identification bit is the same as the position coordinate value of the first leaf node block in one direction; if an identification bit in the second identifier is a second value, the position coordinate value of the second leaf node block in a direction corresponding to one identification bit is different from the position coordinate value of the first leaf node block in one direction.

[0319] Optionally, in the first code stream, the second identifier code stream is located before the position coordinate code stream of the first leaf node block and the position coordinate code stream of the second leaf node block.

[0320] In some embodiments, the first block is 2 in the three directions of XYZ. a ×2 b ×2 c The space block of leaf node is 2 a’ ×2 b’ ×2 c’ The spatial block of a leaf node block is a 1-bit leaf node block, wherein a≥a', b≥b', c≥c', and a, b, c and a', b', c' are positive integers; in the first code stream, the position coordinate value of the leaf node block in the X direction includes (a-a') bits; the position coordinate value of the leaf node block in the Y direction includes (b-b') bits; the position coordinate value of the leaf node block in the Z direction includes (c-c') bits.

[0321] Specifically, if a'=b'=c'=0, the leaf node block is a 1×1×1 spatial block; in the first bit stream, the position coordinate value of the leaf node block in the X direction includes a bits; the position coordinate value of the leaf node block in the Y direction includes b bits; and the position coordinate value of the leaf node block in the Z direction includes c bits.

[0322] Optionally, in the first code stream, after the code stream of position coordinate values ​​of leaf node blocks in one direction, a code stream of position coordinate values ​​of leaf node blocks in another direction is arranged.

[0323] Optionally, in the first code stream, after one bit of the position coordinate value of the leaf node block in one direction, one bit of the position coordinate value of the leaf node block in another direction is arranged.

[0324] For example, in the first code stream, the low bits of the position coordinate value of the leaf node block in one direction are located before the high bits; or, the high bits of the position coordinate value of the leaf node block in one direction are located before the low bits.

[0325] Optionally, the first code stream further includes: a point cloud point quantity code stream, and the processor 21 is further used to: decode the point cloud point quantity code stream to obtain the number of point cloud points in the leaf node block.

[0326] Optionally, the processor 21 is further configured to: receive a third identifier code stream; and decode the third identifier code stream to obtain a third identifier, where the third identifier is used to identify a depth-first target decoding mode.

[0327] Specifically, the third identifier code stream may be located before the first code stream of the first block; and / or, the third identifier code stream may also be located in the geometry header code stream of the point cloud.

[0328] Optionally, the processor 21 is further configured to: receive a fourth identifier code stream; and decode the fourth identifier code stream to obtain a fourth identifier, where the fourth identifier is used to indicate that the decoding mode is switched from breadth-first to depth-first.

[0329] For example, if the first block is obtained by using an octree partition, the fourth identifier is eight bits of 0; or, if the first block is obtained by using a quadtree partition, the fourth identifier is four bits of 0; or, if the first block is obtained by using a binary tree partition, the fourth identifier is two bits of 0.

[0330] Optionally, the fourth identifier code stream is located before the third identifier code stream.

[0331] Optionally, the processor 21 is further configured to: receive a second code stream of a second block, where the second block is located after the first block in a breadth-first decoding order; and decode the second code stream to obtain point cloud point positions in the second block.

[0332] The present application also provides an electronic device or system, which may include a point cloud encoding device and / or decoding device of the various embodiments of the present application described above.

[0333] The present application also provides a computer storage medium on which a computer program is stored. When the computer program is executed by a computer, the computer executes the method of the above method embodiment.

[0334] The present application also provides a computer program product comprising instructions, which, when executed by a computer, enables the computer to perform the method of the above method embodiment.

[0335] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a digital video disc (DVD)), or a semiconductor medium (eg, a solid state disk (SSD)).

[0336] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0337] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A point cloud decoding method, characterized in that: include: receiving a third identifier, wherein the third identifier is used to identify a depth-first target decoding mode; According to the third identifier, the first code stream of the first block is decoded using the depth-first target decoding method to obtain the position coordinates of the leaf node block including the point cloud points in the first block, and the first block is a spatial block after the point cloud is divided by a multi-branch tree.

2. The decoding method according to claim 1, characterized in that: The code stream corresponding to the third identifier is located before the first code stream of the first block; and / or, The code stream corresponding to the third identifier is located in the geometry header code stream of the point cloud.

3. The decoding method according to claim 1, characterized in that: The first code stream includes: a position coordinate code stream of a first leaf node block, wherein the first leaf node block is a leaf node block including a point cloud point; The step of decoding the first bitstream in a depth-first target decoding manner to obtain the position coordinates of the leaf node blocks including the point cloud points in the first block includes: The position coordinate code stream of the first leaf node block is decoded to obtain the position coordinate values ​​of the first leaf node block in three directions in the coordinate system of the first block.

4. The decoding method according to claim 3, characterized in that: The first code stream also includes a first identifier code stream, and the decoding method further includes: The first identifier code stream is decoded to obtain a first identifier, where the first identifier is used to indicate that a position coordinate value of the first leaf node block in at least one direction is the same as a position coordinate value in other directions.

5. The decoding method according to any one of claims 1 to 4, characterized in that: The first code stream also includes: a position coordinate code stream of a second leaf node block including point cloud points in the first block; The step of decoding the first bitstream in a depth-first target decoding manner to obtain the position coordinates of the leaf node blocks including the point cloud points in the first block includes: The position coordinate code stream of the first leaf node block and the position coordinate code stream of the second leaf node block are decoded to obtain the position coordinate values ​​of the first leaf node block and the second leaf node block in three directions in the coordinate system of the first block.

6. The decoding method according to claim 5, characterized in that: In a case where the position coordinate code stream of the second leaf node block does not include the position coordinate value of the second leaf node block in at least one direction; Decoding the position coordinate code stream of the first leaf node block to obtain position coordinate values ​​of the first leaf node block in three directions in the coordinate system of the first block; The position coordinate value of the first leaf node block in at least one direction is used as the position coordinate value of the second leaf node block in the at least one direction.

7. The decoding method according to claim 6, characterized in that: The first code stream also includes a second identifier code stream, and the decoding method further includes: The second identifier code stream is decoded to obtain a second identifier, where the second identifier is used to indicate that the position coordinate value of the second leaf node block in at least one direction is the same as the position coordinate value of the first leaf node block in the at least one direction.

8. The decoding method according to claim 1, characterized in that: Before receiving the third identifier, the first code stream of the first block is decoded in a breadth-first decoding manner to obtain the position coordinates of the leaf node blocks including the point cloud points in the first block.

9. The decoding method according to claim 8, characterized in that: The method further comprises: A fourth identifier is encoded, where the fourth identifier is used to identify that the encoding mode is switched from breadth-first to depth-first.

10. The decoding method according to claim 1, characterized in that: The division method of the first block includes: one or more of octree division, quadtree division, and binary tree division.

11. The decoding method according to claim 1, characterized in that: The third identifier is transmitted when the number of leaf node blocks including point cloud points in the first block is not greater than N, and N≤2.

12. A point cloud encoding method, characterized in that: include: Encoding a third identifier, where the third identifier is used to identify a depth-first target encoding mode; The position coordinates of the leaf node block in the first block are encoded using the depth-first target encoding method to form a first code stream of the first block, where the first block includes the leaf node block, and the first block is a spatial block after the point cloud is divided by a multi-branch tree.

13. A point cloud decoding device, characterized in that: comprising a processor configured to: receiving a third identifier, wherein the third identifier is used to identify a depth-first target decoding mode; According to the third identifier, the first code stream of the first block is decoded using the depth-first target decoding method to obtain the position coordinates of the leaf node block including the point cloud points in the first block, and the first block is a spatial block after the point cloud is divided by a multi-branch tree.

14. A point cloud encoding device, characterized in that: comprising a processor configured to: Encoding a third identifier, where the third identifier is used to identify a depth-first target encoding mode; The position coordinates of the leaf node block in the first block are encoded using the depth-first target encoding method to form a first code stream of the first block, where the first block includes the leaf node block, and the first block is a spatial block after the point cloud is divided by a multi-branch tree.