CN112740707A - Point cloud encoding and decoding method and device - Google Patents

Point cloud encoding and decoding method and device Download PDF

Info

Publication number
CN112740707A
CN112740707A CN202080005108.3A CN202080005108A CN112740707A CN 112740707 A CN112740707 A CN 112740707A CN 202080005108 A CN202080005108 A CN 202080005108A CN 112740707 A CN112740707 A CN 112740707A
Authority
CN
China
Prior art keywords
leaf node
block
position coordinate
node block
identifier
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202080005108.3A
Other languages
Chinese (zh)
Inventor
李璞
郑萧桢
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SZ DJI Technology Co Ltd
Original Assignee
SZ DJI Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SZ DJI Technology Co Ltd filed Critical SZ DJI Technology Co Ltd
Publication of CN112740707A publication Critical patent/CN112740707A/en
Pending legal-status Critical Current

Links

Images

Classifications

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

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 point cloud encoding method comprises the following steps: determining a first block of the point cloud after being divided by the multi-branch tree, wherein the number of leaf node blocks including point cloud points in the first block is not more than N, and N is a positive integer determined according to the dividing mode of the first block; and coding the position coordinates 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 encoding bit positions of at least part of blocks to be encoded in the point cloud can be reduced, the point cloud compression efficiency and the point cloud decoding speed are improved, the strict requirements of an encoding mode with a preferred breadth on an encoding sequence can be eliminated, the point cloud encoding parallelization is facilitated, and the point cloud encoding and decoding complexity is reduced.

Description

Point cloud encoding and decoding method and device
Copyright declaration
The disclosure of this patent document contains material which is subject to copyright protection. The copyright is owned 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 appears in the patent and trademark office official records and records.
Technical Field
The present application relates to the field of encoding and decoding, and more particularly, to a method and an apparatus for encoding and decoding point cloud.
Background
A point cloud (or called three-dimensional point cloud) is an expression form of a three-dimensional object or scene, and is composed of a set of randomly distributed discrete points in space, which express the spatial structure and surface attributes of the three-dimensional object or three-dimensional scene. In order to reduce the bandwidth occupied by the point cloud data during storage and transmission, the point cloud data needs to be encoded and compressed. The encoding process of the point cloud comprises 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.
At present, the encoding mode of position coordinates in the existing point cloud mostly adopts an octree division encoding mode based on breadth priority, the encoding mode has higher complexity, has strict requirements on the encoding sequence, is not beneficial to the parallelization of point cloud encoding, and has a plurality of problems of bit waste and the like for point cloud point encoding relatively concentrated in octree sub-blocks, thereby influencing the efficiency and performance of point cloud encoding and decoding.
Disclosure of Invention
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.
In a first aspect, a method for encoding a point cloud is provided, including: determining a first block of the point cloud after being divided by the multi-branch tree, wherein the number of leaf node blocks including point cloud points in the first block is not more than N, and N is a positive integer determined according to the dividing mode of the first block; and coding the position coordinates 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.
In a second aspect, a method for decoding a point cloud is provided, including: receiving a first code stream of a first block, wherein the first block is a space block obtained by dividing a point cloud through a multi-way tree; decoding the first code stream by adopting a depth-first target decoding mode to obtain the position coordinates of leaf node blocks including point cloud points in the first block; the number of the leaf node blocks is not more than N, wherein N is a positive integer determined according to the dividing mode of the first block.
In a third aspect, an apparatus for encoding a point cloud is provided, which includes a processor configured to execute the method for encoding a point cloud in the first aspect.
In a fourth aspect, a device for decoding point clouds is provided, which comprises a processor for executing the method for decoding point clouds in the second aspect.
In a fifth aspect, a computer storage medium is provided, on which a computer program is stored, which, when executed by a computer, causes the computer to perform the method provided in the first or second aspect.
Through the technical scheme of this application, numerical value N is confirmed according to the partition mode of first piece, and makes the quantity of the leaf node piece including some cloud point in the first piece be not more than N, adopts the preferential coding mode of degree of depth to encode this first piece, and does not adopt the preferential coding mode of breadth to encode it, can not confine the fixed coding bit that the partition mode caused to, reduces the coding bit of first piece, thereby practice thrift the bit stream, improve point cloud compression efficiency and point cloud decoding speed. In addition, the adoption of a depth-first coding mode can get rid of the strict requirement of a breadth-first coding mode on a coding sequence, thereby being beneficial to the parallelization of point cloud coding and reducing the complexity of point cloud coding and decoding.
Drawings
Fig. 1 shows a schematic diagram of a point cloud data encoding process provided in the present application.
Fig. 2 is a schematic diagram of an initialization space for point cloud encoding.
Fig. 3 is a schematic diagram of a point cloud data decoding process according to an embodiment of the present application.
Fig. 4 to 5 are schematic flow chart diagrams of two methods for encoding point clouds according to an embodiment of the present application.
Fig. 6 is a schematic structural diagram of a first subtree after a first block is divided according to an embodiment of the present application.
Fig. 7 to 8 are schematic flow chart diagrams of two other methods for encoding point clouds according to the embodiment of the present application.
Fig. 9 to 10 are two other schematic structural diagrams of the first subtree after the first block is divided according to the embodiment of the present application.
Fig. 11 to 13 are schematic flow chart diagrams of another method for encoding point clouds according to the embodiment of the present application.
Fig. 14 to 21 are schematic flow chart diagrams of several methods for decoding point clouds according to embodiments of the present application.
Fig. 22 is a schematic block diagram of an apparatus for encoding a point cloud according to an embodiment of the present application.
Fig. 23 is a schematic block diagram of a point cloud decoding apparatus according to an embodiment of the present application.
Detailed Description
In order to facilitate understanding of the technical solutions provided in the embodiments of the present application, the following first describes some concepts related to the embodiments of the present application.
The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings.
The method and the device can be suitable for standard or non-standard point cloud codecs. For example, an encoder of the digital video coding standard (AVS) standard.
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 execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Unless otherwise defined, all technical and scientific terms used in the examples of this application have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the present application is for the purpose of describing particular embodiments only and is not intended to limit the scope of the present application. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
In order to facilitate understanding of the technical solutions provided by the embodiments of the present invention, some concepts related to the embodiments of the present invention are described below first.
The Point Cloud is a set of discrete points that represent the spatial distribution of the target and the characteristics of the target surface in the same spatial reference coordinate system, that is, a set of sampling points obtained after obtaining the spatial coordinates of each sampling Point on the surface of the object, and is called Point Cloud (Point Cloud). In order to accurately reflect information in three-dimensional space, a large number of discrete points are typically required to characterize an object in three-dimensional space. Discrete points in the point cloud are hereinafter referred to as point cloud points.
Fig. 1 shows a schematic diagram of a point cloud data encoding process provided in the present application.
The point cloud data typically includes location information and attribute information for a plurality of point cloud points in the point cloud. The position coordinates of the point cloud points can be used to describe the positions of the point cloud points in the three-dimensional space, and the attribute information of the point cloud points may include, for example, color information of the point cloud points, and may also include other information such as 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 process of encoding point cloud data, the position information encoding and the attribute information encoding of point cloud points are generally performed separately.
As shown in fig. 1, in the method for encoding point cloud data, the method for encoding location information of a point cloud point includes:
coordinate translation and quantification: and translating and quantizing the position coordinates of a plurality of cloud points in the point cloud. In one example, the position coordinates of the point cloud are processed by a geometric quantization method. The process of geometric quantization may convert the location coordinates of the plurality of cloud points to integer coordinates greater than or equal to zero. Duplicate coordinates may be removed after position coordinate translation quantization. And directly carrying out octree coding on the position coordinates of the point cloud points after quantization without duplicate removal.
After the initialization space is determined, the initialization space is then subjected to a multi-level octree partitioning. And each layer of octree division can perform space division by using the position coordinates of the central point of the current block, and the current block is divided into eight sub-blocks with equal volumes through the central point. Fig. 2 shows the division result obtained after the initialization space is divided for the first time, and it can be seen from fig. 2 that the initialization space is uniformly divided into sub-blocks with 8 equal volumes. In an octree, the initialization space is a root node block, and the sub-blocks are child node blocks of the root node, called first-level child node blocks.
After the first layer of child node blocks are obtained, whether a point cloud point exists in each child node block of the first layer can be judged, the child node blocks which exist the point cloud points are further divided until the side length of each child node block is smaller than a threshold value, the octree division is stopped, and the child node blocks at the moment are called leaf node blocks of the current octree. The threshold may be 1, for example.
When the octree is encoded on the position coordinates of a plurality of point cloud points in the point cloud, encoding can be performed layer by layer according to the breadth-first traversal order (BFS) of the octree. When encoding layer by layer, the division result of each octree can be encoded layer by layer, that is, whether eight subblocks obtained after current subblocks are subjected to octree division contain point cloud points or not is judged. If a sub-block of the block contains point cloud points, the sub-block is further divided, otherwise, the division is stopped. When the division is performed to one layer of the last octree (the last layer can be a layer with the side length of the sub-block being 1), the bottom layer of the octree is reached, namely, the leaf node block of the octree is reached, and no further division is needed.
In other embodiments, the position information of the point cloud point may also be encoded in a quadtree partitioning manner, a binary tree partitioning manner, or a multi-branch tree partitioning manner in which several partitioning manners are mixed.
For example, similar to the octree encoding process above, the subblocks divided by the multi-way tree may be encoded layer by layer in the breadth-first encoding order. If the subblocks adopt a quadtree division mode, only 4 bits (bits) need to be coded for coding, and 4 bits are saved compared with the octree division; if the coding is carried out by adopting a binary tree division mode, only 2 bits need to be coded, and 6 bits are saved compared with the octree division. The skipped bits can be assumed to be 0 at the decoding end.
Entropy coding: and entropy coding the code stream coded by the octree to obtain a geometric code stream of the point cloud, namely the code stream of the position information of a plurality of point cloud points in the point cloud.
After the position coordinates are subjected to multi-branch tree coding, the corresponding attribute values are synchronously subjected to compression coding according to the position coordinate sequence after the multi-branch tree is reconstructed.
With continued reference to fig. 1, in the method for encoding point cloud data, the method for encoding attribute information of a point cloud point includes: spatial transformation, attribute interpolation, attribute prediction, residual quantization, entropy coding and the like.
The decoding process of the point cloud data is substantially the same as the reverse process of the encoding process. Fig. 3 shows a schematic diagram of a decoding flow provided in the present application.
Entropy decoding: and after the decoding end acquires the input geometric code stream and the attribute code stream, the decoding end decodes the code stream bit by adopting an entropy decoding method corresponding to the entropy coding method of the encoding end.
Multi-branch tree reconstruction: specifically, for a geometric code stream, an initialization space of a point cloud can be determined through entropy-decoded information (the size of the initialization space can be written into the code stream by an encoding end, and a decoding end can obtain the code stream), and then the initialization space is divided into a plurality of branches. And the decoding end divides the initialization space by adopting a space division mode consistent with the encoding end. And obtaining position coordinate data of the point cloud point to be inversely quantized through a plurality of sub-node blocks in the divided multi-branch tree and the binary bit streams corresponding to the sub-node blocks.
Inverse quantization: the inverse quantization is an inverse process of the quantization of the coding end, and the position coordinate data to be inversely quantized after the multi-branch tree reconstruction is inversely quantized to obtain the coordinates quantized in the coding end. And the attribute code stream is subjected to entropy decoding and inverse quantization to obtain an attribute prediction residual value.
PropertiesReconstruction: specifically, if the attribute prediction residual obtained after the inverse quantization is as
Figure BDA0002973596030000051
The current point attribute reconstructed value is
Figure BDA0002973596030000052
The attribute reconstruction value of the previous point is
Figure BDA0002973596030000053
The attribute of the current point reconstructs the value
Figure BDA0002973596030000054
And traversing all point cloud points in the point cloud to obtain a reconstructed point cloud output by the encoding end.
Inverse spatial transformation: corresponding to the space transformation of the encoding end, the step is also an optional step, and if the attribute value after attribute reconstruction is the attribute value of the YUV space, the attribute value of the RGB space is obtained by performing inverse space transformation on the attribute value.
And finally, combining the position information obtained by decoding and the corresponding attribute information to obtain point cloud data.
The related art encoding process is described above with reference to fig. 1 to 3. It can be seen from the above description that, when the position coordinates of a plurality of point cloud points in the point cloud are subjected to the multi-branch tree coding, each divided block is traversed by adopting a breadth-first mode, and whether each block has the point cloud point is coded and identified, so that the coding mode has higher complexity, strict requirements on the coding sequence, is not beneficial to parallelization of the point cloud coding, and has a plurality of problems of bit waste and the like for point cloud point coding relatively concentrated in the multi-branch tree sub-block, thereby affecting the efficiency and performance of the point cloud coding and decoding.
Based on the above problems, the present application provides a point cloud encoding and decoding method, which can reduce bit positions of point cloud point position codes, avoid bit waste, and is not limited by a strict encoding sequence, thereby facilitating reduction of encoding complexity and parallelization of point cloud codes.
The point cloud encoding and decoding method provided by the embodiment of the present application is described in detail below with reference to fig. 4 to 21. The methods in fig. 4 to 21 may be performed by an encoding apparatus or a decoding apparatus.
More specifically, the embodiments of the present application mainly relate to a process of encoding and decoding position coordinates of a plurality of cloud points in a point cloud. Therefore, the following description mainly refers to an encoding and decoding process of position coordinates of a plurality of cloud points in a point cloud, and the encoding and decoding process of attribute information of the point cloud may refer to the above related description or related technologies, which is not limited in the embodiment of the present application.
Fig. 4 shows a schematic flow diagram of a method 100 for encoding a point cloud.
As shown in fig. 4, the method 100 for encoding the point cloud may include the following steps.
S110: determining a first block of the point cloud after the point cloud is divided by the multi-branch tree, wherein the number of leaf node blocks including point cloud points in the first block is not more than N, and N is a positive integer determined according to the dividing mode of the first block.
S120: and coding the position coordinates of the leaf node blocks in the first block by adopting a depth-first target coding mode to form a first code stream of the first block.
When the position information of a plurality of point cloud points in the point cloud is coded, performing multi-branch tree division on an initialization space where the point cloud is located to obtain a tree structure of the point cloud after the point cloud is subjected to multi-branch tree division, and representing the position space of the plurality of point cloud points through the tree structure.
Optionally, in this embodiment of the present application, the multi-branch tree partition includes, but is not limited to, a simple certain partition, such as a simple octree partition, and may also be a multi-branch tree partition in which a binary tree partition, a quadtree partition, an octree partition, or even other partitions are mixed. The embodiment of the application does not limit the specific multi-way tree division mode. For convenience of description, the multi-tree partition method of octree partition, quadtree partition, binary tree partition, and a mixture of multiple partition methods is referred to as multi-tree partition in the present application.
In the embodiment of the application, instead of using a conventional encoding method to encode the tree structure of the point cloud in a breadth-first encoding manner, a new encoding mode is introduced, and when encoding is performed on a first block in the tree structure, it is determined that the first block meets a preset condition, at this time, the breadth-first encoding manner is not used to traverse a second block after the first block, but a target encoding manner with a depth-first is switched to encode the first block, and the first block is returned to the second block after the first block.
Optionally, the first block may be an initialization space block of the point cloud, or may be any one of the blocks obtained by dividing the initialization space block of the point cloud.
By adopting the method of the embodiment of the application, the strict requirement of the breadth-first coding mode on the coding sequence can be eliminated, the parallelization of point cloud coding is facilitated, and the complexity of point cloud coding is reduced.
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 more than N, wherein the leaf node blocks comprise point cloud points, and N is a positive integer determined according to a multi-way tree partition mode.
Under the condition of adopting an original breadth-first coding mode, corresponding bits can be coded according to the partitioning mode of each layer of the first block, and under the condition that the number of point cloud points in the first block is small, the coding mode can cause large bit stream waste. By adopting the scheme of the embodiment of the application, the numerical value N is determined according to the dividing mode of the first block, and when the number of leaf node blocks including point cloud points in the first block is not more than N, the position coordinates of the leaf node blocks in the first block are coded, so that the coding bit of the first block can be reduced, the bit stream is saved, and the point cloud compression efficiency is improved.
Hereinafter, the technical solutions 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 specific technical solutions.
In some embodiments, the block division manner of the first block includes one or more of an octree division, a quadtree division, and a binary tree division, and the preset condition of the first block may be: the number of leaf node blocks in the first block, including the point cloud point, is not greater than 2.
First, a case where the number of leaf node blocks including point cloud points in the first block is 1 is explained, and hereinafter, the 1 leaf node blocks including point cloud points are also written as the first leaf node block.
Fig. 5 shows a schematic flow diagram of another method 100 for encoding a point cloud.
As shown in fig. 5, the above step S110 may include the following steps.
S111: determining a first block of the point cloud after the point cloud is divided by the multi-way tree, wherein the first block comprises a first leaf node block.
The above step S120 may include the following steps.
S121: and respectively coding position coordinate values of the first leaf node block in three directions in a coordinate system of the first block to form a first code stream of the first block.
Alternatively, a cartesian coordinate system, also called XYZ coordinate system, is constructed in the first block, in XYZ three directions, if the first block is 2a×2b×2cThe leaf node block in the first block is 2a’×2b’×2c’The space block of (1), wherein a.gtoreq.a ', b.gtoreq.b', c.gtoreq.c ', and a', b ', c' are integers.
Then in the X direction, a-a' bits may be used to identify the position of the first leaf node block in the first block; in the Y direction, b-b' bits may be used to identify the position of the first leaf node block in the first block; in the Z direction, the position of the first leaf node block in the first block may be identified with c-c' bits.
In other words, in the 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; adopting (b-b') bits to encode the position coordinate value of the first leaf node block in the Y direction; and (c-c') bits are adopted to encode the position coordinate value of the first leaf node block in the Z direction.
In some embodiments, if a ' ═ b ' ═ c ' ═ 0, that is, if a leaf node block in the first block is a spatial block of 1 × 1 × 1, then the position coordinates of the first leaf node block in the X direction may be encoded using a bits; b bits are adopted to encode the position coordinate of the first leaf node block in the Y direction; and c bits are adopted to encode the position coordinate of the first leaf node block in the Z direction.
As an example, if a ═ b ═ c ═ 3 and a' ═ b ═ c ═ 0, 8 leaf node blocks are arranged in the first block in the X direction, and any one of 0 to 7 may be identified by 3 bits, thereby encoding the position coordinate value of the first leaf node block in the X direction; similarly, in the Y direction and the Z direction, any one of the numbers 0 to 7 may also be identified by 3 bits, so as to encode the position coordinate values of the first leaf node block in the Y direction and the Z direction.
Optionally, when the position coordinate value of the first leaf node block is encoded, 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 may be encoded sequentially, for example, the position coordinate value of the first leaf node block is encoded in the order of XYZ, that is, after the encoding of the position coordinate value in the X direction is completed, 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 may also be encoded according to the sequence of YXZ, YZX, and the like, which is not limited in this embodiment of the present application.
For example, if the first block is an 8 × 8 × 8 spatial block, the leaf node block is a 1 × 1 × 1 spatial block, and the position coordinate of the first leaf node block is (1,2,3), the position coordinate is encoded in XYZ order to 001010011.
Optionally, when the position coordinate value of the first leaf node block is encoded, after a bit is further encoded in the position coordinate value of the first leaf node block in one direction, a bit is encoded in the position coordinate value of the first leaf node block in another direction. Optionally, a bit may be encoded in the position coordinate value of the first leaf node block in the X direction, then a bit may be encoded in the position coordinate value of the first leaf node block in the Y direction, and then a bit may be encoded in the position coordinate value of the first leaf node block in the Z direction; it is understood that other direction orders may also be adopted for encoding, and the encoding order in the three XYZ directions is not specifically limited in the embodiment of the present application.
In one embodiment, 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 the other direction is encoded.
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 coordinate of the first leaf node block is (1,2, 3). The method includes the steps of firstly encoding the lowest bit (bit 0) of a position coordinate value of a first leaf node block in three directions, namely encoding the lowest bit 1 of the position coordinate value of the first leaf node block in the X direction, encoding the lowest bit 0 of the position coordinate value of the first leaf node block in the Y direction, and encoding the lowest bit 1 of the position coordinate value of the first leaf node block in the Z direction. Then, the position coordinate value of the first leaf node block in three directions is encoded with an intermediate bit (bit 1). And finally, encoding the highest bit (2 nd bit) of the position coordinate values of the first leaf node block in three directions. The position coordinates (1,2,3) of the first leaf node block are encoded in this manner as 101011000.
In another embodiment, after the highest bit is encoded in the position coordinate value of the first leaf node block in one direction, the highest bit is encoded in the position coordinate value of the first leaf node block in another direction.
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 coordinate of the first leaf node block is (1,2, 3). The method includes the steps of firstly encoding the highest bit (2 nd bit) of a position coordinate value of a first leaf node block in three directions, namely encoding the highest bit 0 of the position coordinate value of the first leaf node block in the X direction, encoding the highest bit 0 of the position coordinate value of the first leaf node block in the Y direction, and encoding the highest bit 0 of the position coordinate value of the first leaf node block in the Z direction. Then, the position coordinate value of the first leaf node block in three directions is encoded with an intermediate bit (bit 1). And finally, encoding the lowest bit (0 th bit) of the position coordinate values of the first leaf node block in three directions. The position coordinates (1,2,3) of the first leaf node block are encoded in this manner as 000011101.
It is to be understood that, after any bit is encoded in the position coordinate value of the first leaf node block in one direction, any bit may be encoded in the position coordinate value of the first leaf node block in another direction. The direction sequence is not specifically limited in the embodiment of the present application, and the coding sequence of the bits in each direction is not specifically limited. The direction sequence and the bit encoding sequence can be regularly agreed by an encoding end and a decoding end, the encoding end performs encoding according to a specific sequence, and the decoding end performs decoding according to the specific sequence.
As is clear from the above description, if the size of the first block is 2a×2b×2cThe size of the leaf node block of the first block is 2a’×2b’×2c’And in the first block, under the condition that the number of leaf node blocks including point cloud points is 1, by adopting the technical scheme of the embodiment of the present application, the number of coded bits 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 coded bits of the first block is a + b + c.
If the breadth-first coding method is adopted to code the first block, the first block needs to be divided into multiple branches, and the first block is coded according to the division mode of each layer of the first block.
Fig. 6 shows a schematic structure diagram of the first subtree in this case after the first block is divided.
As shown in fig. 6, after the first block is divided by the multi-way tree, a first subtree with m layers is formed, where m is a positive integer. In the first subtree, the number of sub-blocks in each layer including point cloud points is 1, as indicated by the hatched blocks in the figure, and the other sub-blocks in each layer are sub-blocks not including point cloud points, as indicated by the blank blocks in the figure.
In particular, the number of levels m of the first subtree is related to the size of the first block and the leaf node blocks.
If the first block is 2a×2b×2cThe space block of (2) leaf node blocka’×2b’×2c’The number of layers m is max (a, b, c) -max (a ', b ', c '). If the leaf node block is a 1 × 1 × 1 space block, the number of layers m of the first subtree is max (a, b, c).
In some embodiments, if a ═ b ═ c, the first block is a cube block, and the leaf node block is a 1 × 1 × 1 spatial block, then the first block needs to encode a total of 8a bits if a breadth-first coding scheme is used. However, if the scheme of the embodiment of the present application is adopted, it can be known from the above description that the first block needs to encode 3a bits in total, which is less than the bits obtained by encoding the first block by using the breadth-first encoding method.
Similarly, if the first block is not a cube block and the leaf node block is a 1 × 1 × 1 space block, then if breadth-first coding is used, the first block needs to be coded 2 × (a-b) +4 × (b-c)
+8 xc is 2a +2b +4c bits. However, if the scheme of the embodiment of the present application is adopted, it can be known 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 in the breadth-first encoding manner.
Similarly, when the leaf node block is not a 1 × 1 × 1 spatial block, the method for calculating the bit number obtained by encoding the first block in the breadth-first encoding manner may be referred to the above description, and details are not described here. And when the leaf node block is not the 1 × 1 × 1 space block, the bits of the first block obtained by encoding according to the scheme of the embodiment of the present application are also less than the bits obtained by encoding the first block by using the breadth-first encoding method.
Therefore, under the condition that the number of leaf node blocks including point cloud points in the first block is 1, by adopting the technical scheme of the embodiment of the application, compared with a coding mode with a preferred breadth, the coding bit of the first block can be reduced, so that bit stream is saved, and point cloud compression efficiency is improved.
Further, fig. 7 shows a schematic flow diagram of another method 100 for encoding a point cloud.
As shown in fig. 7, the above step S121 may include the following steps.
S1211: skipping encoding of the position coordinate values of the first leaf node block in at least one direction; and 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.
In some embodiments, the encoding of the position coordinate value of the first leaf node block in one direction is skipped and the 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.
For example, the first leaf node block has a position coordinate of (x)1,y1,z1) If x1=y1Then only for x1And y1One value is encoded and the encoding process of the other value is skipped.
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 skipped, wherein the position coordinate values of the first leaf node block in three directions are the same.
For example, the first leaf node block has a position coordinate of (x)1,y1,z1) If x1=y1=z1Then only for x1,y1,z1Is coded by any value ofAnd code, skipping the coding process of the other two values.
Optionally, as shown in fig. 7, in the embodiment of the present application, the encoding method 100 may further include the following steps.
S131: a first identifier is encoded indicating 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.
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 first identifier is encoded as a 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 first identifier is coded to be a 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 first identifier is coded to be a third value; and if the position coordinate values of the first leaf node block in the three directions are the same, the first identifier is coded to be a fourth value.
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 first identifier is encoded to be 1; if the position coordinate values of the first leaf node block in the X direction and the Z direction are the same, the first identifier is coded to be 2; if the position coordinate values of the first leaf node block in the Y direction and the Z direction are the same, the first coded identifier is 3; if the coordinate values of the positions of the first leaf node blocks in the three directions of XYZ are the same, the first identifier is encoded to be 0.
It will be appreciated that if the first identifier is encoded using the above described scheme, the first identifier may be encoded as 2 bits to distinguish between four different values of 0-3.
It can also be understood that the above example only illustrates a value of the first identifier in one case, and 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 may also be encoded to be 0, 2,3, or any other value.
In other embodiments, the first identifier includes three identification bits corresponding to position coordinate values of the first leaf node block in three directions;
if the position coordinate values of the first leaf node block in the two directions are the same, encoding two identification bits in the first identifier corresponding to the position coordinate values in the two directions into the same value;
if the position coordinate values of the first leaf node block in the two directions are different, the two identification bits in the first identifier corresponding to the position coordinate values in the two directions are encoded into different values.
For example, if the coordinate values of the positions of the first leaf node block in the X direction and the Y direction are the same, the first identifier is encoded to be 110, the identification bits corresponding to the X direction and the Y direction in the first identifier are the same value 1, and the identification bits corresponding to the Z direction are different values 0.
Similarly, if the position coordinate values of the first leaf node block in the X direction and the Z direction are the same, the first identifier is coded to be 101; if the position coordinate values of the first leaf node block in the Y direction and the Z direction are the same, the first coded identifier is 011; if the coordinate values of the positions of the first leaf node blocks in the three directions of XYZ are the same, the first identifier is encoded to be 111.
Alternatively, if the position coordinate values of the first leaf node block in the three directions are different from each other, the encoding of the first identifier may be omitted, and the position coordinate values of the first leaf node block in the three directions may be directly encoded. The first identifier may be encoded as a specific value to distinguish the case where the position coordinate values of the first leaf node have the same value.
Optionally, the code stream encoded by the first identifier may be located before the code stream of the position coordinate of the first leaf node block. For example, the first identifier-encoded codestream may be concatenated before the codestream at the position coordinates of the first leaf node block.
By adopting the method of the embodiment of the application, the number of the coded bits can be further reduced, and the coding and decoding efficiency is improved.
The case where the number of leaf node blocks including point cloud points in the first block is 1 is described above with reference to fig. 5 to 7, and the case where the number of leaf node blocks including point cloud points in the first block is 2 is described below with reference to fig. 8 to 11, and the 2 leaf node blocks including point cloud points are also written as the first leaf node block and the second leaf node block.
Fig. 8 shows a schematic flow diagram of another method 100 for encoding a point cloud.
As shown in fig. 8, the above step S110 may include the following steps.
S112: determining a first block of the point cloud after the point cloud is divided by the multi-way tree, wherein the first block comprises a first leaf node block and a second leaf node block.
The above step S120 may include the following steps.
S122: and respectively coding position coordinate values of the first leaf node block and the second leaf node block in three directions in a coordinate system of the first block to form a first code stream of the first block.
Specifically, for the process of encoding the position coordinate values of the second leaf node block in the three directions in the coordinate system of the first block, reference may be made to the above process of encoding the position coordinate values of the first leaf node block in the three directions in the coordinate system of the first block, and details are not described here again.
In the first block, if the size of the first block is 2, in the case that the number of leaf node blocks including point cloud points is 2a×2b×2cThe size of the leaf node block of the first block is 2a’×2b’×2c’By adopting the technical solution of the embodiment of the present application, the number of coded 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, by using the technical scheme of the embodiment of the present application, the number of coded bits of the first block is 2a +2b +2 c.
If the breadth-first coding method is adopted to code the first block, the first block needs to be divided into multiple branches, and the first block is coded according to the division mode of each layer of the first block.
Fig. 9 and 10 show two schematic structural diagrams of the first subtree in this case after the first block has been divided. In the first sub-tree, the sub-blocks including the cloud points are shown as shaded blocks in the figure, and the sub-blocks not including the cloud points are shown as blank blocks in the figure.
In fig. 9, except for the leaf node layer, the number of the sub-blocks including the point cloud point in each layer of the first sub-tree is 1, and the number of the sub-blocks including the point cloud point in the leaf node layer is 2, which are the first leaf node block and the second leaf node block. In fig. 10, the number of sub-blocks including point cloud points in each layer from the 0 th layer (i.e., the first block) to the i th layer is 1, and the number of sub-blocks including point cloud points in each layer from the i +1 th layer to the m th layer is 2, where i is greater than or equal to 1 and less than m, and i is a positive integer.
Therefore, in fig. 10, each layer needs to encode the division of 2 sub-blocks from the i-th layer to the m-1 th layer, while in the first sub-tree shown in fig. 9, only the m-1 th layer needs to encode the division of 2 sub-blocks, and if the breadth-first encoding scheme is adopted, the encoding bits of the first sub-tree in fig. 9 are the least, or the encoding bits of the first block are the least.
For the first subtree in FIG. 9, if the first block is 2a×2a×2aThe leaf node block of the cubic space block of (1 × 1 × 1), if a breadth-first coding scheme is adopted, the first block needs to code 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 by using the breadth-first encoding method.
Similarly, if the first block is 2a×2b×2cThe non-cubic space block of (1 × 1 × 1), where the leaf node block is a space block, and if a breadth-first coding scheme is adopted, the first block needs to code 2 × (a-b) +4 × (b-c) +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 by using the breadth-first encoding method.
Similarly, when the leaf node block of the first block is not a 1 × 1 × 1 spatial block, the bits of the first block obtained by encoding using the scheme of the embodiment of the present application are also less than the bits obtained by encoding the first block using the breadth-first encoding method.
Therefore, under the condition that the number of leaf node blocks including point cloud points in the first block is 2, by adopting the technical scheme of the embodiment of the application, compared with a breadth-first coding mode, the coding bit of the first block can be reduced, so that bit stream is saved, and point cloud compression efficiency is improved.
Further, fig. 11 shows a schematic flow diagram of another method 100 for encoding a point cloud.
As shown in fig. 11, the above step S122 may include the following steps.
S1221: skipping encoding of position coordinate values of the second leaf node block in at least one direction; and 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.
In some embodiments, encoding of the position coordinate value of the second leaf node block in one direction is skipped, and 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.
For example, the first leaf node block has a position coordinate of (x)1,y1,z1) The position coordinate of the second leaf node block is (x)2,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 x is x2=x1Then skip pair x2Encoding process of (1), directly on y2And z2And (6) coding is carried out.
In other embodiments, the encoding of the position coordinate values of the second leaf node block in the two directions, which are respectively the same as the position coordinate values of the first leaf node block in the two directions, is skipped, and the encoding of the position coordinate values of the second leaf node block in the other direction is skipped.
For example, the first leaf node block has a position coordinate of (x)1,y1,z1) The position coordinate of the second leaf node block is (x)2,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 x is x2=x1And y is2=y1Then skip pair x2And y2Encoding process of, directly on z2And (6) coding is carried out.
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 first leaf node block has a position coordinate of (x)1,y1,z1) The position coordinate of the second leaf node block is (x)2,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 x is x2=x1,y2=y1And z is2=z1Then, the encoding of the position coordinate values of the second leaf node block in the three directions is skipped.
Optionally, as shown in fig. 11, in the embodiment of the present application, the encoding method 100 may further include the following steps.
S132: a second identifier is encoded indicating that 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.
In some embodiments, the second identifier includes three identification bits corresponding to position coordinate values of the second leaf node block in three directions;
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 an identification bit corresponding to the position coordinate value of the second leaf node block in the one direction into a first value;
and 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 one direction, encoding the identification bit corresponding to the position coordinate value of the second leaf node block in the one direction into a second value.
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 flag bit corresponding to the position coordinate value in the X direction in the coded 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, the flag bit corresponding to the position coordinate values in the Y direction and the Z direction in the coded second identifier is 0, that is, the second value is 0, and at this time, the second identifier is coded as 100.
In addition, the first value may be 0, and the second value may correspond to 1, and the first value and the second value are not particularly limited in this embodiment of the application.
Alternatively, if the position coordinate values of the second leaf node block in the three directions are all different from the position coordinate values of the first leaf node block in the three directions, the encoding of the second identifier may be omitted, and the position coordinate values of the second leaf node block in the three directions may be directly encoded. The second identifier may be encoded as a specific value to distinguish a case where the position coordinate value of the second leaf node and the position coordinate value of the first leaf node have the same value.
Alternatively, the code stream encoded by the second identifier may be located before the code stream of the position coordinates of the second leaf node block. For example, the codestream of the second identifier may be connected before the codestream of the position coordinates of the second leaf node block; alternatively, the code stream of the second identifier may be connected before or after the code stream of the first identifier, and then the code stream of the position coordinate of the first leaf node block and the code stream of the position coordinate 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.
Further, if the position coordinate values of the second leaf node block in the three directions are all different from the position coordinate values of the first leaf node block in the three directions, but the position coordinate values of the second leaf node block in at least one direction are the same as the position coordinate values in other directions, the encoding of the position coordinate values of the second leaf node block in at least one direction may also be skipped.
Specifically, in this case, the encoding of the position coordinate of the second leaf node block may refer to the above encoding process of the position coordinate of the first leaf node block, for example, refer to the above description of steps S1211 and S131, and details are not repeated here.
By adopting the method of the embodiment of the application, the number of the coded bits can be further reduced, and the coding and decoding efficiency is improved.
Fig. 12 shows a schematic flow diagram of another method 100 for encoding a point cloud.
As shown in fig. 12, the step S120 may further include the following steps.
S123: and coding the position coordinates of the leaf node blocks in the first block and the number of point cloud points in the leaf node blocks by adopting a depth-first target coding mode to form a first code stream of the first block.
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 the position coordinates of the first leaf node block are encoded, the number of point cloud points in the first leaf node block is encoded.
Similarly, if the number of leaf node blocks including point cloud points in the first block is 2, that is, the first leaf node block and the second leaf node block are included, after the position coordinates of the first leaf node block and the second leaf node block are encoded, the number of point cloud points in the first leaf node block and the second leaf node block are encoded respectively.
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 may be skipped, or 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 may be encoded to be the same value.
As a possible implementation, if the number of point cloud points in the leaf node block is n, then n-1 is encoded, where n is a positive integer.
It can be understood that any binarization method in the prior art can be adopted to perform binarization processing on the number of point cloud points, and then the subsequent process of entropy coding is performed to obtain the number code stream of the point cloud points.
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, truncated rice code, K-order exponential golomb, unary code, and the like. The fixed length code encoding method and the variable length code encoding method may refer to related descriptions in the prior art, and are not described herein again.
As shown in fig. 12, the method 100 for encoding point cloud may further include the following steps.
S140: and coding a second block in the point cloud to form a second code stream, wherein the second block is positioned behind the first block in the coding sequence with the breadth first.
And after the first block in the point cloud is coded, coding the other sub-blocks except the first block in the point cloud according to the coding sequence with the breadth first.
Specifically, after a first block in the point cloud is encoded, a second block in the point cloud is encoded to form a second code stream, and the second block is located behind the first block in the encoding sequence with the breadth first.
And then, coding each layer of subblocks in the tree structure after the point cloud is divided by the multi-way tree in sequence still according to the breadth-first coding mode, and skipping coding of the subblocks in the first block when the subblocks in the first block are coded.
Optionally, when encoding other subblocks in the point cloud except the first subblock, before encoding other subblocks, whether the other subblocks satisfy the preset condition may be determined, and if the other subblocks satisfy the preset condition, the encoding may also be performed by using the method. In other words, the tree structure of the point cloud may include a plurality of first blocks, and when the tree structure of the point cloud is traversed in the breadth-first traversal order, the position coordinates of leaf node blocks in the first blocks may be encoded by switching to the depth-first traversal order at each first block.
The above mainly describes the related encoding process of the first block, and because the encoding mode of the first block is different from the encoding modes of other sub-blocks in the point cloud, the encoding mode of the first block needs to be identified before the first block is encoded, which is convenient for the decoding end to decode to obtain related information.
Fig. 13 shows a schematic flow diagram of another method 100 for encoding a point cloud.
As shown in fig. 13, the method 100 for encoding point cloud may further include the following steps.
S150: and encoding a third identifier, wherein the third identifier is used for identifying a target coding mode with depth priority.
As shown in fig. 13, this step 150 may be performed after step S110, that is, after the first block is determined, the identifier for identifying the target encoding mode, that is, the third identifier is encoded.
Alternatively, 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 this embodiment of the present application.
In some embodiments, the third identifier may be used to identify that the target coding mode is one of a plurality of depth-first coding modes, where the depth-first coding mode includes, but is not limited to, the target coding mode and the isolated point direct coding mode in this application.
Therefore, the third identifier in the embodiment of the present application may be used to distinguish the target coding scheme from other depth-first coding schemes.
For example, the identifier for identifying the isolated point direct coding scheme is 0, and the first identifier for identifying the target coding scheme in the present application is 1.
Of course, the third identifier may be used to identify not only which of the multiple depth-first coding schemes the target coding scheme is, but also which of all the coding schemes the target coding scheme is.
Optionally, any binarization method in the prior art may be adopted to perform binarization processing on the third identifier, and then a subsequent process of entropy coding is performed to obtain a third identifier code stream.
In some implementations, the codestream of the third identifier precedes the first codestream of the first block.
In other embodiments, the first identification code stream may also be located in a geometric head stream of the point cloud.
In this case, if the geometric header information of the point cloud does not include an identifier for identifying another encoding method, the third identifier may be used to identify that the encoding method of the other block meeting the preset condition in the point cloud is the target encoding method, in addition to the encoding method of the first block as the target encoding method.
In the third embodiment, the code stream of the third identifier may also be located before the first code stream and in the geometric header code stream at the same time.
In this case, the code stream of the third identifier in the geometric header code stream is used to identify that the point cloud can be encoded in a target encoding manner, and the code stream of the third identifier before the first code stream is used to identify that the encoding manner of the first block is the target encoding manner.
Optionally, as shown in fig. 13, the method 100 for encoding point cloud may further include the following steps.
S160: and coding a fourth identifier, wherein the fourth identifier is used for identifying that the coding mode is switched from breadth-first to depth-first.
Specifically, on the basis of the third identifier, a fourth identifier may be added before the third identifier, and is used to identify that the encoding method is switched from breadth-first to depth-first.
Optionally, the fourth identifier may be encoded in a partitioning manner, and if the first block is obtained by using octree partitioning, the fourth identifier may be encoded to 8bit 0, if the first block is obtained by using quadtree partitioning, the fourth identifier may be encoded to 4bit 0, and if the first block is obtained by using binary tree partitioning, the fourth identifier may be encoded to 2bit 0.
Optionally, the encoded code stream of the fourth identifier is located before the first code stream of the first block.
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.
The above-mentioned encoding method of the point cloud in the present application is described with reference to fig. 4 to fig. 13, and the following-mentioned decoding method of the point cloud in the present application is described with reference to fig. 14 to fig. 21, it can be understood that the decoding method of the point cloud in the embodiment of the present application is an inverse process of the above-mentioned encoding method, and the related technical solutions may refer to the above-mentioned related description of the encoding method.
Fig. 14 shows a schematic flow diagram of a method 200 of decoding a point cloud.
As shown in fig. 14, the method 200 for decoding the point cloud may include the following steps.
S210: and receiving a first code stream of a first block, wherein the first block is a space block of the point cloud after the point cloud is divided by the multi-way tree.
S220: decoding the first code stream by adopting a depth-first target decoding mode to obtain the position coordinates of leaf node blocks including point cloud points in the first block; the number of the leaf node blocks is not more than N, and N is a positive integer determined according to the dividing mode of the first block.
Specifically, the first code stream may be the first code stream of the first block encoded by the point cloud encoding method 100. Corresponding to the encoding method 100 in the foregoing, in the embodiment of the present application, after receiving the first code stream, decoding the first code stream by using a depth-first target decoding manner, so as to reconstruct a position coordinate of a leaf node block including a point cloud point in a first block of the point cloud after the point cloud is divided by the multi-way tree.
In some embodiments, the dividing of the first block includes: and N is less than or equal to 2 when one or more of octree division, quadtree division and binary tree division are adopted.
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.
By adopting the method of the embodiment of the application, the strict requirement of a breadth-first decoding mode on the coding sequence can be eliminated, the parallelization of the point cloud decoding process is facilitated, and the decoding efficiency is improved.
In addition, the encoding method of the encoding end for the first block can reduce the encoding bit of the first sub-tree, that is, reduce the length of the first code stream, so that the corresponding decoding method can be used for decoding the first code stream more quickly, thereby further improving the decoding efficiency.
Fig. 15 shows a schematic flow diagram of another method 200 of decoding a point cloud.
As shown in fig. 15, the above step S210 may include the following steps.
S211: and receiving a first code stream of the first block, wherein the first code stream comprises a position coordinate code stream of the first leaf node block.
The above step S220 may include the following steps.
S221: and 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 a coordinate system of the first block.
Corresponding to steps S111 and S121 in the above encoding method, in the embodiment of the present application, the position coordinate code stream of the first leaf node block is decoded, so as to obtain the position coordinates of the first leaf node block in the first block in the three directions of X, Y, and Z.
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, the position coordinate value code stream of the first leaf node block in another direction is arranged. When decoding the code stream of the position coordinate value of the first leaf node block, firstly decoding to obtain the position coordinate value of the first leaf node block in one direction, and then decoding to obtain the position coordinate value of the first leaf node block in the other direction.
For example, in the position coordinate code stream of the first leaf node block, code streams of position coordinate values of the first leaf node block in the three directions XYZ are sequentially arranged, and then the code stream of the position coordinate value of the first leaf node block is decoded, first, a position coordinate value of the first leaf node block in the X direction is obtained by decoding, then, a position coordinate value of the first leaf node block in the Y direction is obtained by decoding, and finally, a position coordinate value of the first leaf node block in the Z direction is obtained by decoding.
Of course, in the position coordinate code stream of the first leaf node block, code streams of position coordinate values of the first leaf node block in the three directions of YXZ, ZYX, and the like may also be arranged in sequence.
Optionally, in the position coordinate code stream of the first leaf node block, 1 bit of the position coordinate value of the first leaf node block in another direction is arranged after 1 bit of the position coordinate value of the first leaf node block in one direction.
In one embodiment, in the position coordinate code stream of the first leaf node block, a low bit of the position coordinate value of the first leaf node block in one direction precedes a high bit.
In another embodiment, in the position coordinate code stream of the first leaf node block, the high bit of the position coordinate value of the first leaf node block in one direction is located before the low bit.
It can be understood 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, any bit of the position coordinate value of the first leaf node block in another direction is arranged. The direction sequence is not specifically limited in the embodiment of the present application, and the arrangement sequence of bits in each direction is not specifically limited. The direction sequence and the bit arrangement sequence can be regularly agreed by an encoding end and a decoding end, the encoding end performs encoding according to a specific sequence, and the decoding end performs decoding according to the specific sequence.
Further, in some embodiments, fig. 16 shows a schematic flow diagram of another method 200 of decoding a point cloud.
As shown in fig. 16, the above step S221 may include the following steps.
S2211: and decoding the position coordinate code stream of the first leaf node block to obtain a position coordinate value of the first leaf node block in one direction.
S2212: and taking the position coordinate value of the first leaf node block in the one direction as the position coordinate values of the first leaf node block in the other two directions.
Corresponding to step S1211 in the above encoding method, in the present embodiment, the position coordinate values of the first leaf node block in the three directions are the same.
For example, the position coordinate code stream of the first leaf node block is decoded, and a position coordinate value of the first leaf node block in one direction is obtained as a, and then a position coordinate of the first leaf node block in the first block is (a, a, a).
Further, in other embodiments, fig. 17 shows a schematic flow diagram of another method 200 for decoding a point cloud.
As shown in fig. 17, the above step S221 may include the following steps.
S2213: and decoding the position coordinate code stream of the first leaf node block to obtain position coordinate values of the first leaf node block in two directions.
S2214: one of the position coordinate values of the first leaf node block in the two directions is taken as the position coordinate value of the first leaf node block in the other direction.
Corresponding to step S1211 in the above encoding method, in the present 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.
For example, the position coordinate code stream of the first leaf node block is decoded to obtain that the position coordinate value of the first leaf node block in the X direction is X1The position coordinate value in the Y direction is Y1And 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, the position coordinate of the first leaf node block is (X)1,y1,x1)。
Alternatively, as shown in fig. 16 and 17, in the embodiment of the present application, the step S211 may include the following steps.
S2111: and receiving a first code stream of the first block, wherein the first code stream comprises a position coordinate code stream and a first identifier code stream of the first leaf node block.
Furthermore, the encoding method 100 may further include the following steps.
S231: and decoding the first identifier code stream to obtain a first identifier, wherein the first identifier is used for indicating 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.
Corresponding to step S131 in the above encoding method, the related technical solution of the first identifier may refer to the related description in the above encoding method, and is not described herein again.
The case where the first codestream includes the position coordinate codestream of the first leaf node block is described above with reference to fig. 15 to 17, and the case where the first codestream includes the position coordinate codestreams of the first leaf node block and the second leaf node block is described below with reference to fig. 18 to 19.
Fig. 18 shows a schematic flow diagram of another method 200 of decoding a point cloud.
In this embodiment of the present application, the first code stream includes a position coordinate code stream of the first leaf node block and the second leaf node block.
As shown in fig. 18, the above step S210 may include the following steps.
S212: and receiving a first code stream of the first block, wherein the first code stream comprises position coordinate code streams of a first leaf node block and a second leaf node block.
The above step S220 may include the following steps.
S222: and decoding 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 a coordinate system of the first block.
Corresponding to steps S112 and S122 in the above encoding method, in the embodiment of the present application, the position coordinate code stream of the second leaf node block is decoded, so as to obtain the position coordinates of the second leaf node block in the first block in the three directions of X, Y, and Z, respectively.
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 the three directions in the coordinate system of the first block may refer to the above 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 the three directions in the coordinate system of the first block, and is not described here again.
Further, fig. 19 shows a schematic flow diagram of another method 200 for decoding a point cloud.
As shown in fig. 19, the above step S212 may include the following steps.
S2121: and receiving a first code stream of the first block, wherein the first code stream comprises a position coordinate code stream of the first leaf node block, a position coordinate code stream of the second leaf node block and a second identifier code stream.
Further, the above step S222 may include the following steps.
S2221: and 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 a coordinate system of the first block.
S2221: and taking 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.
Corresponding to step S1221 in the above encoding method, in the embodiment of the present application, the position coordinate value of the second leaf node block in at least one direction is not included in the position coordinate code stream of the second leaf node block. 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.
In some embodiments, the code stream of the position coordinates of the second leaf node block does not include the position coordinate value of the second leaf node block in one direction, and includes the position coordinate values 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 taken as the position coordinate value of the second leaf node block in the one direction.
In some embodiments, the code stream of the position coordinates of the second leaf node block does not include position coordinate values of the second leaf node block in two directions, and includes position coordinate values of the second leaf node block in another direction, where 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 taken as the position coordinate values of the second leaf node block in the two directions.
In other embodiments, the first code stream does not include the position coordinate code stream of the second leaf node block, and the position coordinate values of the second leaf node block in the three directions are respectively the same as the position coordinate values of the first leaf node block in the three directions, and the position coordinate values of the first leaf node block in the three directions are respectively taken as the position coordinate values of the second leaf node block in the three directions.
Optionally, as shown in fig. 19, in the embodiment of the present application, the decoding method 200 may further include the following steps.
S232: and decoding the second identifier code stream to obtain a second identifier, wherein the second identifier is used for indicating 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.
Corresponding to step S132 in the above encoding method, the related technical solution of the second identifier may refer to the related description in the above encoding method, and is not described herein again.
Fig. 20 shows a schematic flow diagram of another method 200 of decoding a point cloud.
As shown in fig. 20, the above step S210 may include the following steps.
S213: receiving a first code stream of a first block, wherein the first block is a space block of a point cloud after being divided by a multi-way tree, and the first code stream comprises a position coordinate code stream of a leaf node block and a point cloud point number code stream.
The above step S220 may include the following steps.
S223: decoding the position coordinate code stream of the leaf node block by adopting a depth-first target decoding mode to obtain the position coordinates of the leaf node block including the point cloud points in the first block, and decoding the point cloud point quantity code stream to obtain the quantity of the point cloud points in the leaf node block, wherein the quantity of the leaf node block is not more than N, and N is a positive integer determined according to the dividing mode of the first block.
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 a position coordinate code stream of the first leaf node block and a number code stream of point cloud points in the first leaf node block.
Similarly, if the number of leaf node blocks including point cloud points in the first block is 2, the first code stream includes a position coordinate code stream of the first leaf node block and the second leaf node block, a number code stream of point cloud points in the first leaf node block, and a number code stream of point cloud points in the second leaf node block.
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 number code stream of point cloud points in the second leaf node block, and the number code stream of point cloud points in the first leaf node block is decoded to obtain the number of point cloud points in the first leaf node block as the number of point cloud points in the second leaf node block.
As a possible implementation manner, if the number obtained by decoding the number code stream of the point cloud points is n-1, the number of the point cloud points in the leaf node block is n, where n is a positive integer.
As shown in fig. 20, the method 200 for decoding the point cloud may further include the following steps.
S240: and receiving a second code stream of a second block, and decoding the second code stream to obtain the point cloud point position in the second block, wherein the second block is positioned behind the first block in the decoding sequence with the breadth first.
Corresponding to step S140 in the above encoding method. In the embodiment of the present application, the related scheme for decoding the second code stream may refer to the above description, and is not described herein again.
The above mainly describes the relevant decoding process of the first code stream, and since the decoding mode of the first code stream is different from that of the code stream in the point cloud, before the first code stream is decoded, the relevant identification code stream needs to be decoded to obtain the relevant information of the decoding mode of the first code stream.
Fig. 21 shows a schematic flow diagram of another method 200 of decoding a point cloud.
As shown in fig. 21, the method 200 for decoding point cloud may further include the following steps.
S250: and receiving a third identifier code stream, and decoding the third identifier code stream to obtain a third identifier, wherein the third identifier is used for identifying a target decoding mode with a priority depth, and the target decoding mode is a decoding mode corresponding to a target coding mode with a priority depth.
As shown in fig. 21, the step 250 may be executed before the step S210, that is, before the first code stream is received, the third identifier code stream is received, and the third identifier code stream is decoded to obtain a subsequent decoding manner for the first code stream.
Corresponding to step S150 in the above encoding method. In the embodiment of the present application, the scheme related to the third identifier may refer to the above description, and is not described herein again.
S260: and receiving a fourth identifier code stream, decoding the fourth identifier code stream to obtain a fourth identifier, wherein the fourth identifier is used for identifying that the decoding mode is switched from breadth-first to depth-first.
Optionally, before receiving the third identifier code stream, a fourth identifier code stream may also be received, and the fourth identifier code stream is decoded to obtain a fourth identifier, where the fourth identifier is used to identify that the decoding manner is switched from breadth-first to depth-first.
Corresponding to step S160 in the above encoding method. In the embodiment of the present application, the scheme related to the fourth identifier may refer to the above description, and is not described herein again.
The above describes the embodiments of the method of the present application in detail with reference to fig. 4 to 21, and the following describes the embodiments of the apparatus for encoding and decoding point clouds of the present application in detail with reference to fig. 22 and 23.
Fig. 22 is a schematic block diagram of an encoding apparatus 10 of a point cloud according to an embodiment of the present application, the encoding apparatus 10 of the point cloud corresponding to the encoding method 100 of the point cloud.
As shown in fig. 22, the point cloud encoding device 10 includes: a processor 11 and a memory 12;
the memory 12 may be used to store programs and the processor 11 may be used to execute the programs stored in the memory to perform the following operations:
determining a first block of the point cloud after the point cloud is divided by the multi-branch tree, wherein the number of leaf node blocks including point cloud points in the first block is not more than N, and N is a positive integer determined according to the dividing mode of the first block; and coding the position coordinates of the leaf node blocks in the first block by adopting a depth-first target coding mode to form a first code stream of the first block.
Optionally, the dividing manner of the first block includes: one or more of octree division, quadtree division and binary tree division, wherein N is less than or equal to 2.
In one case, the first block includes a first leaf node block, and the first leaf node block is a leaf node block including a point cloud point; the processor 11 is specifically configured to: and respectively coding position coordinate values of the first leaf node block in three directions in a coordinate system of the first block to form a first code stream of the first block.
Optionally, the processor 11 is specifically configured to: and 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, skipping coding of the position coordinate value of the first leaf node block in at least one direction.
Further, the processor 11 is further configured to: a first identifier is encoded indicating 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 the other direction.
For example, the processor 11 is configured to: if the position coordinate values of the first leaf node block in the first direction and the second direction are the same, the first identifier is coded to be a 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 first identifier is coded to be a 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 first identifier is coded to be a third value; and if the position coordinate values of the first leaf node block in the three directions are the same, the first identifier is coded to be a fourth value.
For another example, the first identifier includes three identification bits corresponding to position coordinate values of the first leaf node block in three directions; the processor 11 is configured to: if the position coordinate values of the first leaf node block in the two directions are the same, encoding two identification bits in the first identifier corresponding to the position coordinate values in the two directions into the same value; if the position coordinate values of the first leaf node block in the two directions are different, the two identification bits in the first identifier corresponding to the position coordinate values in the two directions are encoded into different values.
Optionally, the code stream of the first identifier is located before the code stream of the position coordinate of the first leaf node block.
In another case, the first block further includes a second leaf node block, and the second leaf node block is a leaf node block including a point cloud point; the processor 11 is configured to: and respectively coding position coordinate values of the first leaf node block and the second leaf node block in three directions in a coordinate system of the first block to form a first code stream of the first block.
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 configured to: the encoding of the position coordinate values of the second leaf node block in at least one direction is skipped.
Optionally, the processor 11 is further configured to: a second identifier is encoded indicating that 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.
For example, the second identifier includes three identification bits corresponding to position coordinate values of the second leaf node block in three directions; the processor 11 is configured 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, encoding an identification bit corresponding to the position coordinate value of the second leaf node block in one direction into a first value; and 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, encoding the identification bit corresponding to the position coordinate value of the second leaf node block in one direction into a second value.
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.
In some embodiments, the first block is 2 in three XYZ directionsa×2b×2cThe space block of (2) leaf node blocka’×2b’×2c’Wherein a is more than or equal to a ', b is more than or equal to b', c is more than or equal to c ', and a, b, c and a', b ', c' are integers; the processor 11 is operable to: adopting (a-a') bits to encode the position coordinate value of the leaf node block in the X direction; adopting (b-b') bits to encode the position coordinate value of the leaf node block in the Y direction; and (c-c') bits are adopted to encode the position coordinate value of the leaf node block in the Z direction.
Specifically, if a ' ═ b ' ═ c ' ═ 0, the leaf node block is a spatial block of 1 × 1 × 1; the processor 11 is operable to: coding the position coordinates of the leaf node blocks in the X direction by adopting a bits; b bits are adopted to encode the position coordinates of the leaf node blocks in the Y direction; and c bits are adopted to encode the position coordinates of the leaf node block in the Z direction.
Optionally, the processor 11 is configured to: and after the position coordinate values of the leaf node blocks in one direction are coded, the position coordinate values of the leaf node blocks in the other direction are coded.
Optionally, the processor 11 is configured to: after a bit is encoded in the position coordinate value of the leaf node block in one direction, a bit is encoded in the position coordinate value of the leaf node block in the other direction.
For example, the processor 11 is configured to: after encoding the lowest bit of the position coordinate value of the leaf node block in one direction, encoding the lowest bit of the position coordinate value of the leaf node block in the other direction; or after the highest bit is coded on the position coordinate value of the leaf node block in one direction, the highest bit is coded on the position coordinate value of the leaf node block in the other direction.
Optionally, the processor 11 is further configured to: the number of point cloud points in the leaf node block is encoded.
Optionally, the processor 11 is further configured to: and coding a third identifier, wherein the third identifier is used for identifying a target coding mode with depth priority.
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 positioned in the geometric head code stream of the point cloud.
Optionally, the processor 11 is further configured to: and coding a fourth identifier, wherein the fourth identifier is used for identifying that the coding mode is switched from breadth-first to depth-first.
For example, the processor 11 is configured to: if the first block is obtained by adopting octree division, encoding the fourth identifier into eight bits of 0; or if the first block is obtained by adopting quad-tree division, the fourth identifier is coded into four bits of 0; or, if the first block is obtained by binary tree division, the fourth identifier is coded into two bits of 0.
Optionally, the fourth identifier is located before the third identifier.
Optionally, the processor 11 is further configured to: and coding a second block in the point cloud to form a second code stream, wherein the second block is positioned behind the first block in the coding sequence with the breadth first.
Fig. 23 is a schematic block diagram of a point cloud decoding apparatus 20 according to an embodiment of the present application, the point cloud decoding apparatus 20 corresponding to the point cloud decoding method 200.
As shown in fig. 23, the point cloud decoding device 20 includes: a processor 21 and a memory 22;
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:
receiving a first code stream of a first block, wherein the first block is a space block obtained by dividing a point cloud through a multi-way tree; decoding the first code stream by adopting a depth-first target decoding mode to obtain the position coordinates of leaf node blocks including point cloud points in the first block; the number of the leaf node blocks is not more than N, and N is a positive integer determined according to the dividing mode of the first block.
In some embodiments, the dividing of the first block comprises: one or more of octree division, quadtree division and binary tree division, wherein N is less than or equal to 2.
In one case, the first code stream includes: the position coordinate code stream of a first leaf node block, wherein the first leaf node block is a leaf node block comprising point cloud points; the processor 21 is configured to: and 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 a coordinate system of the first block.
Optionally, the processor 21 is configured to: decoding the position coordinate code stream of the first leaf node block to obtain a position coordinate value of the first leaf node block in one direction or two directions; taking 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, one of the position coordinate values of the first leaf node block in the two directions is taken as the position coordinate value of the first leaf node block in the other direction.
Optionally, the first code stream further includes a first identifier code stream, and the processor 21 is further configured to: and decoding the first identifier code stream to obtain a first identifier, wherein the first identifier is used for indicating 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.
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 for indicating 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 for indicating that the position coordinate values of the first leaf node block in the second direction are the same as those of the first leaf node block in the third direction; if the first identifier is the fourth value, the first identifier is used for indicating that the position coordinate values of the first leaf node block in the three directions are the same.
In other embodiments, the first identifier includes three identification bits corresponding to position coordinate values of the first leaf node block in three directions; if the two identification bits in the first identifier are coded to be the same value, the position coordinate values of the first leaf node block in two directions corresponding to the two identification bits are the same;
if the two identification bits in the first identifier are encoded to different values, the position coordinate values of the first leaf node block in the two directions corresponding to the two identification bits are different.
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.
In another case, the first code stream includes, in addition to the position coordinate code stream of the first leaf node block: the position coordinate code stream of a second leaf node block comprising point cloud points in the first block; the processor 21 is configured to: and decoding 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 position coordinate values of the first leaf node block and the second leaf node block in three directions in a coordinate system of the first block.
Optionally, if the position coordinate code stream of the second leaf node block does not include a position coordinate value of the second leaf node block in at least one direction; the processor 21 is configured to: 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 a coordinate system of the first block; and taking 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.
Further, the first code stream further includes a second identifier code stream, and the processor 21 is further configured to: and decoding the second identifier code stream to obtain a second identifier, wherein the second identifier is used for indicating 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.
For example, the second identifier includes three identification bits corresponding to position coordinate values of the second leaf node block in three directions; if one identification bit in the second identifier is a first value, the position coordinate value of the second leaf node block in one direction corresponding to the identification bit is the same as the position coordinate value of the first leaf node block in the other direction; if one identification bit in the second identifier is a second value, the position coordinate value of the second leaf node block in one direction corresponding to the one identification bit is different from the position coordinate value of the first leaf node block in the one direction.
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.
In some embodiments, the first block is 2 in three XYZ directionsa×2b×2cThe space block of (2) leaf node blocka’×2b’×2c’Wherein a is more than or equal to a ', b is more than or equal to b', c is more than or equal to 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 comprises (a-a') bits; the position coordinate value of the leaf node block in the Y direction comprises (b-b') bits; the position coordinate value of the leaf node block in the Z direction includes (c-c') bits.
Specifically, if a ' ═ b ' ═ c ' ═ 0, the leaf node block is a spatial block of 1 × 1 × 1; in the first code stream, the position coordinate value of the leaf node block in the X direction comprises a bits; the position coordinate value of the leaf node block in the Y direction comprises b bits; the position coordinate value of the leaf node block in the Z direction includes c bits.
Optionally, in the first code stream, after the code stream of the position coordinate value of the leaf node block in one direction, the code stream of the position coordinate value of the leaf node block in another direction is arranged.
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.
For example, in the first code stream, the low bit of the position coordinate value of the leaf node block in one direction is located before the high bit; or, the high bit of the position coordinate value of the leaf node block in one direction is positioned before the low bit.
Optionally, the first code stream further includes: the point cloud point quantitative code stream, the processor 21 is further configured to: and decoding the point cloud point number code stream to obtain the number of the point cloud points in the leaf node block.
Optionally, the processor 21 is further configured to: receiving a third identifier code stream; and decoding the third identifier code stream to obtain a third identifier, wherein the third identifier is used for identifying a target decoding mode with depth priority.
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 can be positioned in the geometric head code stream of the point cloud.
Optionally, the processor 21 is further configured to: receiving a fourth identifier code stream; and decoding the fourth identifier code stream to obtain a fourth identifier, wherein the fourth identifier is used for identifying that the decoding mode is switched from breadth-first to depth-first.
For example, if the first block is obtained by octree partition, the fourth identifier is octet 0; or, if the first block is obtained by adopting quad-tree division, the fourth identifier is four bits 0; or, if the first block is obtained by binary tree division, the fourth identifier is two bits of 0.
Optionally, the fourth stream of identifier codes precedes the third stream of identifier codes.
Optionally, the processor 21 is further configured to: receiving a second code stream of a second block, wherein the second block is positioned behind the first block in the decoding sequence with the breadth first; and decoding the second code stream to obtain the point cloud point position in the second block.
The application also provides an electronic device or system, which can comprise the point cloud encoding device and/or decoding device of the various embodiments of the application.
The present application also provides a computer storage medium having stored thereon a computer program which, when executed by a computer, causes the computer to perform the method of the above-described method embodiments.
The present application also provides a computer program product comprising instructions which, when executed by a computer, cause the computer to perform the method of the above-described method embodiments.
In the above embodiments, all or part of the implementation may be realized by software, hardware, firmware or any other combination. When implemented in software, may 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 loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, 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, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, digital subscriber line) or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a Digital Video Disk (DVD)), or a semiconductor medium (e.g., a Solid State Disk (SSD)), among others.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (102)

1. A method for encoding a point cloud, comprising:
determining a first block of a point cloud after being divided by a multi-way tree, wherein the number of leaf node blocks including point cloud points in the first block is not more than N, and N is a positive integer determined according to the dividing mode of the first block;
and coding the position coordinates of the leaf node blocks in the first block by adopting a depth-first target coding mode to form a first code stream of the first block.
2. The encoding method according to claim 1, wherein the dividing of the first block comprises: one or more of octree division, quadtree division and binary tree division, wherein N is less than or equal to 2.
3. The encoding method according to claim 2, wherein the first block comprises a first leaf node block, and the first leaf node block is a leaf node block comprising a point cloud point;
the encoding the position coordinates of the leaf node blocks in the first block by adopting a depth-first target encoding mode to form a first code stream of the first block comprises the following steps:
and respectively coding 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.
4. The encoding method according to claim 3, wherein encoding of position coordinate values of the first leaf node block in at least one direction is skipped;
wherein the position coordinate value of the first leaf node block in the at least one direction is the same as the position coordinate value in the other directions.
5. The encoding method of claim 4, further comprising:
encoding a first identifier indicating that the first leaf node block has the same position coordinate value in the at least one direction as the position coordinate value in the other direction.
6. The encoding method according to claim 5,
if the position coordinate values of the first leaf node block in the first direction and the second direction are the same, encoding the first identifier as a first value;
if the position coordinate values of the first leaf node block in the first direction and the third direction are the same, encoding the first identifier as a second value;
if the position coordinate values of the first leaf node block in the second direction and the third direction are the same, encoding the first identifier as a third value;
and if the position coordinate values of the first leaf node block in the three directions are the same, encoding the first identifier as a fourth value.
7. The encoding method of claim 5, wherein the first identifier comprises three identification bits corresponding to position coordinate values of the first leaf node block in three directions;
if the position coordinate values of the first leaf node block in the two directions are the same, encoding two identification bits in the first identifier corresponding to the position coordinate values in the two directions into the same value;
if the position coordinate values of the first leaf node block in the two directions are different, encoding two identification bits in the first identifier corresponding to the position coordinate values in the two directions into different values.
8. The encoding method according to any one of claims 5 to 7, wherein the codestream of the first identifier precedes the codestream of the position coordinates of the first leaf node block.
9. The encoding method according to any one of claims 3 to 8, wherein the first block further comprises a second leaf node block, wherein the second leaf node block is a leaf node block comprising point cloud points;
the encoding the position coordinates of the leaf node blocks in the first block by adopting a depth-first target encoding mode to form a first code stream of the first block comprises the following steps:
and respectively coding position coordinate values of the first leaf node block and the second leaf node block in three directions in a coordinate system of the first block to form a first code stream of the first block.
10. The encoding method according to claim 9, wherein encoding of position coordinate values of the second leaf node block in at least one direction is skipped;
wherein a position coordinate value of the second leaf node block in the at least one direction is the same as a position coordinate value of the first leaf node block in the at least one direction.
11. The encoding method of claim 10, wherein the encoding method further comprises:
encoding a second identifier indicating 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.
12. The encoding method according to claim 11, wherein the second identifier includes three identification bits corresponding to position coordinate values of the second leaf node block in three directions;
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 an identification bit corresponding to the position coordinate value of the second leaf node block in the one direction as a first value;
and 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, encoding an identification bit corresponding to the position coordinate value of the second leaf node block in the one direction into a second value.
13. The encoding method according to claim 11 or 12, wherein the codestream of the second identifier precedes the codestream of the position coordinates of the first leaf node block and the second leaf node block.
14. The encoding method according to any one of claims 1 to 13, wherein the first block is 2 in three XYZ directionsa×2b×2cThe leaf node block is 2a’×2b’×2c’Wherein a is more than or equal to a ', b is more than or equal to b', c is more than or equal to c ', and a, b, c and a', b ', c' are integers;
the encoding the position coordinates of the leaf node block in the first block comprises:
adopting (a-a') bits to encode the position coordinate value of the leaf node block in the X direction;
adopting (b-b') bits to encode the position coordinate value of the leaf node block in the Y direction;
and (c-c') bits are adopted to encode the position coordinate value of the leaf node block in the Z direction.
15. The encoding method according to claim 14, wherein if a ' ═ b ' ═ c ' ═ 0, the leaf node block is a spatial block of 1 × 1 × 1;
the encoding the position coordinates of the leaf node block in the first block comprises:
adopting a bits to encode the position coordinates of the leaf node block in the X direction;
b bits are adopted to encode the position coordinates of the leaf node block in the Y direction;
and c bits are adopted to encode the position coordinates of the leaf node block in the Z direction.
16. The encoding method according to any one of claims 1 to 15, wherein said encoding the position coordinates of the leaf node block in the first block comprises:
and after the position coordinate value of the leaf node block in one direction is coded, coding the position coordinate value of the leaf node block in the other direction.
17. The encoding method according to any one of claims 1 to 15, wherein said encoding the position coordinates of the leaf node block in the first block comprises:
and after encoding a bit for the position coordinate value of the leaf node block in one direction, encoding a bit for the position coordinate value of the leaf node block in the other direction.
18. The encoding method of claim 17, wherein encoding a bit of the position coordinate value of the leaf node block in one direction followed by encoding a bit of the position coordinate value of the leaf node block in another direction comprises:
encoding the lowest bit of the position coordinate value of the leaf node block in one direction, and then encoding the lowest bit of the position coordinate value of the leaf node block in the other direction; alternatively, the first and second electrodes may be,
and after the highest bit is coded on the position coordinate value of the leaf node block in one direction, the highest bit is coded on the position coordinate value of the leaf node block in the other direction.
19. The encoding method according to any one of claims 1 to 18, wherein the encoding the position coordinates of the leaf node block in the first block by using a depth-first target encoding manner to form a first code stream of the first block includes:
and coding the position coordinates of the leaf node blocks in the first block and the number of point cloud points in the leaf node blocks by adopting a depth-first target coding mode to form a first code stream of the first block.
20. The encoding method according to any one of claims 1 to 19, characterized in that the encoding method further comprises:
and encoding a third identifier, wherein the third identifier is used for identifying the target coding mode with the depth priority.
21. The encoding method according to claim 20, wherein the codestream of the third identifier precedes the first codestream of the first block; and/or the presence of a gas in the gas,
and the code stream of the third identifier is positioned in the geometric head code stream of the point cloud.
22. The encoding method according to claim 20 or 21, wherein the encoding method further comprises:
and coding a fourth identifier, wherein the fourth identifier is used for identifying that the coding mode is switched from breadth-first to depth-first.
23. The encoding method according to claim 22, wherein if the first block is obtained by octree partition, the fourth identifier is encoded as octet 0; alternatively, the first and second electrodes may be,
if the first block is obtained by adopting quad-tree division, encoding the fourth identifier into four bits of 0; alternatively, the first and second electrodes may be,
and if the first block is obtained by adopting binary tree division, encoding the fourth identifier into two bits of 0.
24. The encoding method according to claim 22 or 23, wherein the fourth identifier is located before the third identifier.
25. The encoding method according to any one of claims 1 to 24, characterized in that the encoding method further comprises:
and coding a second block in the point cloud to form a second code stream, wherein the second block is positioned behind the first block in the coding sequence with the breadth first.
26. A method of decoding a point cloud, comprising:
receiving a first code stream of a first block, wherein the first block is a space block obtained by dividing a point cloud through a multi-way tree;
decoding the first code stream by adopting a depth-first target decoding mode to obtain the position coordinates of leaf node blocks including point cloud points in the first block;
and the number of the leaf node blocks is not more than N, wherein N is a positive integer determined according to the dividing mode of the first block.
27. The decoding method as claimed in claim 26, wherein the dividing of the first block comprises: one or more of octree division, quadtree division and binary tree division, wherein N is less than or equal to 2.
28. The decoding method according to claim 27, wherein the first code stream comprises: the method comprises the steps that position coordinate code streams of a first leaf node block are obtained, and the first leaf node block is a leaf node block comprising point cloud points;
the decoding the first code stream by adopting a depth-first target decoding mode to obtain the position coordinates of the leaf node blocks including point cloud points in the first block comprises the following steps:
and 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.
29. The decoding method according to claim 28, wherein said decoding the code stream of the position coordinate 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 includes:
decoding the position coordinate code stream of the first leaf node block to obtain a position coordinate value of the first leaf node block in one direction or two directions;
taking the position coordinate value of the first leaf node block in the one direction as the position coordinate values of the first leaf node block in the other two directions; alternatively, the first and second electrodes may be,
and taking 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.
30. The decoding method of claim 29, wherein the first code stream further comprises a first identifier code stream, and wherein the decoding method further comprises:
and decoding the first identifier code stream to obtain a first identifier, wherein the first identifier is used for indicating 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.
31. The decoding method according to claim 30,
if the first identifier is a first value, the first identifier is used for indicating 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 for indicating 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 for indicating that the coordinate values of the positions of the first leaf node block in the second direction and the third direction are the same;
and if the first identifier is a fourth value, the first identifier is used for indicating that the position coordinate values of the first leaf node block in the three directions are the same.
32. The decoding method according to claim 30, wherein the first identifier comprises three identification bits corresponding to position coordinate values of the first leaf node block in three directions;
if two identification bits in the first identifier are encoded to be the same value, the position coordinate values of the first leaf node block in two directions corresponding to the two identification bits are the same;
if two identification bits in the first identifier are encoded to different values, the position coordinate values of the first leaf node block in two directions corresponding to the two identification bits are different.
33. The decoding method according to any one of claims 30 to 32, wherein the first identifier code stream is located before the position coordinate code stream of the first leaf node block in the first code stream.
34. The decoding method according to any one of claims 28 to 33, wherein the first code stream further comprises: the first block comprises a position coordinate code stream of a second leaf node block of point cloud points;
the decoding the first code stream by adopting a depth-first target decoding mode to obtain the position coordinates of the leaf node blocks including point cloud points in the first block comprises the following steps:
and decoding 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 position coordinate values of the first leaf node block and the second leaf node block in three directions in a coordinate system of the first block.
35. The decoding method according to claim 34, wherein if the code stream of the position coordinates 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 a coordinate system of the first block;
and taking 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 the at least one direction.
36. The decoding method of claim 35, wherein the first code stream further comprises a second identifier code stream, the decoding method further comprising:
and decoding the second identifier code stream to obtain a second identifier, wherein the second identifier is used for indicating 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.
37. The decoding method according to claim 36, wherein the second identifier includes three identification bits corresponding to position coordinate values of the second leaf node block in three directions;
if one identification bit in the second identifier is a first value, the position coordinate value of the second leaf node block in one direction corresponding to the one identification bit is the same as the position coordinate value of the first leaf node block in the one direction;
if one identification bit in the second identifier is a second value, the position coordinate value of the second leaf node block in one direction corresponding to the one identification bit is different from the position coordinate value of the first leaf node block in the one direction.
38. The decoding method according to claim 36 or 37, wherein 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 in the first code stream.
39. The decoding method according to any one of claims 26 to 38, wherein the first block is 2 in three XYZ directionsa×2b×2cThe leaf node block is 2a’×2b’×2c’Wherein a is more than or equal to a ', b is more than or equal to b', c is more than or equal to c ', and a, b, c and a', b ', c' are positive integers; in the first code stream, the first code stream is selected,
the position coordinate value of the leaf node block in the X direction comprises (a-a') bits;
the position coordinate value of the leaf node block in the Y direction comprises (b-b') bits;
the position coordinate value of the leaf node block in the Z direction includes (c-c') bits.
40. The decoding method according to claim 39, wherein if a ' b ' c ' is 0, the leaf node block is a 1 × 1 × 1 spatial block; in the first code stream, the first code stream is selected,
the position coordinate value of the leaf node block in the X direction comprises a bits;
the position coordinate value of the leaf node block in the Y direction comprises b bits;
the position coordinate value of the leaf node block in the Z direction comprises c bits.
41. The decoding method according to any one of claims 26 to 40, wherein, in the first code stream, a code stream of position coordinate values of the leaf node blocks in one direction is arranged after a code stream of position coordinate values of the leaf node blocks in another direction.
42. The decoding method according to any one of claims 26 to 40, wherein in the first code stream, one bit of the position coordinate value of the leaf node block in one direction is arranged after one bit of the position coordinate value of the leaf node block in the other direction.
43. The decoding method according to claim 42, wherein in the first code stream, a low bit of the position coordinate value of the leaf node block in one direction precedes a high bit; or, the high bit of the position coordinate value of the leaf node block in one direction is located before the low bit.
44. The decoding method according to any one of claims 26 to 43, wherein the first code stream further comprises: the decoding method also comprises the following steps:
and decoding the point cloud point number code stream to obtain the number of the point cloud points in the leaf node block.
45. The decoding method according to any one of claims 26 to 44, wherein the decoding method further comprises:
receiving a third identifier code stream;
and decoding the third identifier code stream to obtain a third identifier, wherein the third identifier is used for identifying the depth-first target decoding mode.
46. The decoding method according to claim 45, wherein the third code stream of identifiers precedes the first code stream of the first block; and/or the presence of a gas in the gas,
the third identifier code stream is located in a geometric head code stream of the point cloud.
47. The decoding method according to claim 45 or 46, wherein the decoding method further comprises:
receiving a fourth identifier code stream;
and decoding the fourth identifier code stream to obtain a fourth identifier, wherein the fourth identifier is used for identifying that the decoding mode is switched from breadth-first to depth-first.
48. The decoding method according to claim 47, wherein if the first block is obtained by octree partition, the fourth identifier is octet 0; alternatively, the first and second electrodes may be,
if the first block is obtained by adopting quad-tree division, the fourth identifier is four bits of 0; alternatively, the first and second electrodes may be,
if the first block is obtained by adopting binary tree division, the fourth identifier is two bits of 0.
49. The decoding method according to claim 47 or 48, wherein said fourth stream of identifier codes precedes said third stream of identifier codes.
50. The decoding method according to any one of claims 26 to 49, wherein the decoding method further comprises:
receiving a second code stream of a second block, wherein the second block is positioned behind the first block in a decoding sequence with a priority in breadth;
and decoding the second code stream to obtain the point cloud point position in the second block.
51. An apparatus for encoding a point cloud, comprising: a processor to:
determining a first block of a point cloud after being divided by a multi-way tree, wherein the number of leaf node blocks including point cloud points in the first block is not more than N, and N is a positive integer determined according to the dividing mode of the first block;
and coding the position coordinates of the leaf node blocks in the first block by adopting a depth-first target coding mode to form a first code stream of the first block.
52. The encoding device as claimed in claim 51, wherein the division of the first block comprises: one or more of octree division, quadtree division and binary tree division, wherein N is less than or equal to 2.
53. The encoding apparatus of claim 52, wherein the first block comprises a first leaf node block, and wherein the first leaf node block is a leaf node block comprising a point cloud point;
the processor is configured to: and respectively coding 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.
54. The encoding device of claim 53, wherein the processor is configured to:
skipping encoding of position coordinate values 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 value in the other directions.
55. The encoding device of claim 54, wherein the processor is further configured to:
encoding a first identifier indicating that the first leaf node block has the same position coordinate value in the at least one direction as the position coordinate value in the other direction.
56. The encoding device of claim 55, wherein the processor is configured to:
if the position coordinate values of the first leaf node block in the first direction and the second direction are the same, encoding the first identifier as a first value;
if the position coordinate values of the first leaf node block in the first direction and the third direction are the same, encoding the first identifier as a second value;
if the position coordinate values of the first leaf node block in the second direction and the third direction are the same, encoding the first identifier as a third value;
and if the position coordinate values of the first leaf node block in the three directions are the same, encoding the first identifier as a fourth value.
57. The encoding apparatus of claim 55, wherein the first identifier comprises three identification bits corresponding to position coordinate values of the first leaf node block in three directions;
the processor is configured to:
if the position coordinate values of the first leaf node block in the two directions are the same, encoding two identification bits in the first identifier corresponding to the position coordinate values in the two directions into the same value;
if the position coordinate values of the first leaf node block in the two directions are different, encoding two identification bits in the first identifier corresponding to the position coordinate values in the two directions into different values.
58. The encoding apparatus of any of claims 55 to 57, wherein the codestream of the first identifier precedes the codestream of the location coordinates of the first leaf node block.
59. The encoding device according to any one of claims 53 to 58, wherein the first block further comprises a second leaf node block, the second leaf node block being a leaf node block comprising point cloud points;
the processor is configured to: and respectively coding position coordinate values of the first leaf node block and the second leaf node block in three directions in a coordinate system of the first block to form a first code stream of the first block.
60. The encoding device of claim 59, wherein the processor is configured to:
skipping encoding of position coordinate values of the second leaf node block in at least one direction;
wherein a position coordinate value of the second leaf node block in the at least one direction is the same as a position coordinate value of the first leaf node block in the at least one direction.
61. The encoding device of claim 60, wherein the processor is further configured to:
encoding a second identifier indicating 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.
62. The encoding device of claim 61, wherein the second identifier comprises three identification bits corresponding to position coordinate values of the second leaf node block in three directions;
the processor is configured 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, encoding an identification bit corresponding to the position coordinate value of the second leaf node block in the one direction as a first value;
and 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, encoding an identification bit corresponding to the position coordinate value of the second leaf node block in the one direction into a second value.
63. The encoding device according to claim 61 or 62, wherein the code stream of the second identifier is located before the code stream of the position coordinates of the first leaf node block and the second leaf node block.
64. The encoding device according to any one of claims 51 to 63, wherein the first block is 2 in three XYZ directionsa×2b×2cThe leaf node block is 2a’×2b’×2c’Wherein a is more than or equal to a ', b is more than or equal to b', c is more than or equal to c ', and a, b, c and a', b ', c' are integers;
the processor is configured to:
adopting (a-a') bits to encode the position coordinate value of the leaf node block in the X direction;
adopting (b-b') bits to encode the position coordinate value of the leaf node block in the Y direction;
and (c-c') bits are adopted to encode the position coordinate value of the leaf node block in the Z direction.
65. The encoding apparatus of claim 64, wherein if a ' b ' c ' is 0, the leaf node block is a 1 × 1 × 1 spatial block;
the processor is configured to:
adopting a bits to encode the position coordinates of the leaf node block in the X direction;
b bits are adopted to encode the position coordinates of the leaf node block in the Y direction;
and c bits are adopted to encode the position coordinates of the leaf node block in the Z direction.
66. The encoding apparatus of any one of claims 51-65, wherein the processor is configured to:
and after the position coordinate value of the leaf node block in one direction is coded, coding the position coordinate value of the leaf node block in the other direction.
67. The encoding apparatus of any one of claims 51-65, wherein the processor is configured to:
and after encoding a bit for the position coordinate value of the leaf node block in one direction, encoding a bit for the position coordinate value of the leaf node block in the other direction.
68. The encoding device of claim 67, wherein the processor is configured to:
encoding the lowest bit of the position coordinate value of the leaf node block in one direction, and then encoding the lowest bit of the position coordinate value of the leaf node block in the other direction; alternatively, the first and second electrodes may be,
and after the highest bit is coded on the position coordinate value of the leaf node block in one direction, the highest bit is coded on the position coordinate value of the leaf node block in the other direction.
69. The encoding apparatus of any one of claims 51-68, wherein the processor is configured to:
and coding the position coordinates of the leaf node blocks in the first block and the number of point cloud points in the leaf node blocks by adopting a depth-first target coding mode to form a first code stream of the first block.
70. The encoding device of any one of claims 51-69, wherein the processor is further configured to:
and encoding a third identifier, wherein the third identifier is used for identifying the target coding mode with the depth priority.
71. The encoding apparatus according to claim 70, wherein the code stream of the third identifier precedes the first code stream of the first block; and/or the presence of a gas in the gas,
and the code stream of the third identifier is positioned in the geometric head code stream of the point cloud.
72. The encoding apparatus of claim 70 or 71, wherein the processor is further configured to:
and coding a fourth identifier, wherein the fourth identifier is used for identifying that the coding mode is switched from breadth-first to depth-first.
73. The encoding apparatus of claim 72, wherein the processor is configured to:
if the first block is obtained by adopting octree division, encoding the fourth identifier into eight bits of 0; alternatively, the first and second electrodes may be,
if the first block is obtained by adopting quad-tree division, encoding the fourth identifier into four bits of 0; alternatively, the first and second electrodes may be,
and if the first block is obtained by adopting binary tree division, encoding the fourth identifier into two bits of 0.
74. The encoding apparatus of claim 72 or 73, wherein the fourth identifier precedes the third identifier.
75. The encoding apparatus of any one of claims 51-74, wherein the processor is further configured to:
and coding a second block in the point cloud to form a second code stream, wherein the second block is positioned behind the first block in the coding sequence with the breadth first.
76. An apparatus for decoding a point cloud, comprising: a processor to:
receiving a first code stream of a first block, wherein the first block is a space block obtained by dividing a point cloud through a multi-way tree;
decoding the first code stream by adopting a depth-first target decoding mode to obtain the position coordinates of leaf node blocks including point cloud points in the first block;
and the number of the leaf node blocks is not more than N, wherein N is a positive integer determined according to the dividing mode of the first block.
77. The decoding device as claimed in claim 76, wherein the partition of the first block comprises: one or more of octree division, quadtree division and binary tree division, wherein N is less than or equal to 2.
78. The decoding device according to claim 77, wherein the first code stream comprises: the method comprises the steps that position coordinate code streams of a first leaf node block are obtained, and the first leaf node block is a leaf node block comprising point cloud points;
the processor is configured to: and 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.
79. The decoding device according to claim 78, wherein the processor is configured to:
decoding the position coordinate code stream of the first leaf node block to obtain a position coordinate value of the first leaf node block in one direction or two directions;
taking the position coordinate value of the first leaf node block in the one direction as the position coordinate values of the first leaf node block in the other two directions; alternatively, the first and second electrodes may be,
and taking 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.
80. The decoding device according to claim 79, wherein the first code stream further comprises a first identifier code stream, and wherein the processor is further configured to:
and decoding the first identifier code stream to obtain a first identifier, wherein the first identifier is used for indicating 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.
81. The decoding apparatus of claim 80,
if the first identifier is a first value, the first identifier is used for indicating 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 for indicating 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 for indicating that the coordinate values of the positions of the first leaf node block in the second direction and the third direction are the same;
and if the first identifier is a fourth value, the first identifier is used for indicating that the position coordinate values of the first leaf node block in the three directions are the same.
82. The decoding apparatus according to claim 80, wherein the first identifier comprises three identification bits corresponding to position coordinate values of the first leaf node block in three directions;
if two identification bits in the first identifier are encoded to be the same value, the position coordinate values of the first leaf node block in two directions corresponding to the two identification bits are the same;
if two identification bits in the first identifier are encoded to different values, the position coordinate values of the first leaf node block in two directions corresponding to the two identification bits are different.
83. The decoding device according to any one of claims 80 to 82, wherein in the first code stream, the first identifier code stream is located before a position coordinate code stream of the first leaf node block.
84. The decoding device according to any of claims 78-83, wherein the first code stream further comprises: the first block comprises a position coordinate code stream of a second leaf node block of point cloud points;
the processor is configured to: and decoding 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 position coordinate values of the first leaf node block and the second leaf node block in three directions in a coordinate system of the first block.
85. The decoding device according to claim 84, wherein if the code stream of the position coordinates 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 is configured to: 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 a coordinate system of the first block;
and taking 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 the at least one direction.
86. The decoding device of claim 85, wherein the first code stream further comprises a second identifier code stream, and wherein the processor is further configured to:
and decoding the second identifier code stream to obtain a second identifier, wherein the second identifier is used for indicating 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.
87. The decoding device according to claim 86, wherein the second identifier includes three identification bits corresponding to position coordinate values of the second leaf node block in three directions;
if one identification bit in the second identifier is a first value, the position coordinate value of the second leaf node block in one direction corresponding to the one identification bit is the same as the position coordinate value of the first leaf node block in the one direction;
if one identification bit in the second identifier is a second value, the position coordinate value of the second leaf node block in one direction corresponding to the one identification bit is different from the position coordinate value of the first leaf node block in the one direction.
88. The decoding device according to claim 86 or 87, wherein 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 in the first code stream.
89. The decoding device according to any one of claims 76 to 88, wherein the first block is 2 in three XYZ directionsa×2b×2cThe leaf node block is 2a’×2b’×2c’Wherein a is more than or equal to a ', b is more than or equal to b', c is more than or equal to c ', and a, b, c and a', b ', c' are positive integers; in the first code stream, the first code stream is selected,
the position coordinate value of the leaf node block in the X direction comprises (a-a') bits;
the position coordinate value of the leaf node block in the Y direction comprises (b-b') bits;
the position coordinate value of the leaf node block in the Z direction includes (c-c') bits.
90. The decoding device according to claim 89, wherein if a ' ═ b ' ═ c ' ═ 0, the leaf node block is a 1 × 1 × 1 spatial block; in the first code stream, the first code stream is selected,
the position coordinate value of the leaf node block in the X direction comprises a bits;
the position coordinate value of the leaf node block in the Y direction comprises b bits;
the position coordinate value of the leaf node block in the Z direction comprises c bits.
91. The decoding device according to any one of claims 76 to 90, wherein in the first code stream, a code stream of position coordinate values of the leaf node block in one direction is arranged after a code stream of position coordinate values of the leaf node block in another direction.
92. The decoding device according to any one of claims 76 to 90, wherein in the first code stream, one bit of the position coordinate value of the leaf node block in one direction is arranged after one bit of the position coordinate value of the leaf node block in the other direction.
93. The decoding device according to claim 92, wherein in the first code stream, a low bit of the position coordinate value of the leaf node block in one direction precedes a high bit; or, the high bit of the position coordinate value of the leaf node block in one direction is located before the low bit.
94. The decoding device according to any one of claims 76 to 93, wherein the first code stream further comprises: the processor is further configured to:
and decoding the point cloud point number code stream to obtain the number of the point cloud points in the leaf node block.
95. The decoding device according to any one of claims 76 to 94, wherein the processor is further configured to:
receiving a third identifier code stream;
and decoding the third identifier code stream to obtain a third identifier, wherein the third identifier is used for identifying the depth-first target decoding mode.
96. The decoding apparatus according to claim 95, wherein the third stream of identifier codes precedes the first stream of first blocks; and/or the presence of a gas in the gas,
the third identifier code stream is located in a geometric head code stream of the point cloud.
97. The decoding device according to claim 95 or 96, wherein the processor is further configured to:
receiving a fourth identifier code stream;
and decoding the fourth identifier code stream to obtain a fourth identifier, wherein the fourth identifier is used for identifying that the decoding mode is switched from breadth-first to depth-first.
98. The decoding apparatus as claimed in claim 97, wherein if the first block is obtained by octree partition, the fourth identifier is octet 0; alternatively, the first and second electrodes may be,
if the first block is obtained by adopting quad-tree division, the fourth identifier is four bits of 0; alternatively, the first and second electrodes may be,
if the first block is obtained by adopting binary tree division, the fourth identifier is two bits of 0.
99. The decoding apparatus according to claim 97 or 98, wherein the fourth stream of identifier codes precedes the third stream of identifier codes.
100. The decoding device according to any one of claims 76 to 99, wherein the processor is further configured to:
receiving a second code stream of a second block, wherein the second block is positioned behind the first block in a decoding sequence with a priority in breadth;
and decoding the second code stream to obtain the point cloud point position in the second block.
101. A computer-readable storage medium for storing program instructions which, when executed by a computer, cause the computer to perform the encoding method of any one of claims 1 to 25.
102. A computer-readable storage medium storing program instructions which, when executed by a computer, cause the computer to perform the decoding method of any one of claims 26 to 50.
CN202080005108.3A 2020-06-01 2020-06-01 Point cloud encoding and decoding method and device Pending CN112740707A (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/093754 WO2021243519A1 (en) 2020-06-01 2020-06-01 Point cloud encoding and decoding method and apparatus

Publications (1)

Publication Number Publication Date
CN112740707A true CN112740707A (en) 2021-04-30

Family

ID=75609430

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202080005108.3A Pending CN112740707A (en) 2020-06-01 2020-06-01 Point cloud encoding and decoding method and device

Country Status (2)

Country Link
CN (1) CN112740707A (en)
WO (1) WO2021243519A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023179706A1 (en) * 2022-03-25 2023-09-28 维沃移动通信有限公司 Encoding method, decoding method, and terminal

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024065269A1 (en) * 2022-09-28 2024-04-04 Oppo广东移动通信有限公司 Point cloud encoding and decoding method and apparatus, device, and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1566769A2 (en) * 2004-02-17 2005-08-24 Samsung Electronics Co., Ltd. Method and apparatus for encoding and decoding 3D data
CN104115496A (en) * 2012-02-09 2014-10-22 汤姆逊许可公司 Efficient compression of 3D models based on octree decomposition
US20190087978A1 (en) * 2017-09-18 2019-03-21 Apple Inc. Point cloud compression using non-cubic projections and masks
WO2019103009A1 (en) * 2017-11-22 2019-05-31 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ Three-dimensional data encoding method, three-dimensional data decoding method, three-dimensional data encoding device and three-dimensional data decoding device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11910026B2 (en) * 2018-09-28 2024-02-20 Sony Corporation Image processing apparatus and method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1566769A2 (en) * 2004-02-17 2005-08-24 Samsung Electronics Co., Ltd. Method and apparatus for encoding and decoding 3D data
CN104115496A (en) * 2012-02-09 2014-10-22 汤姆逊许可公司 Efficient compression of 3D models based on octree decomposition
US20190087978A1 (en) * 2017-09-18 2019-03-21 Apple Inc. Point cloud compression using non-cubic projections and masks
WO2019103009A1 (en) * 2017-11-22 2019-05-31 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ Three-dimensional data encoding method, three-dimensional data decoding method, three-dimensional data encoding device and three-dimensional data decoding device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023179706A1 (en) * 2022-03-25 2023-09-28 维沃移动通信有限公司 Encoding method, decoding method, and terminal

Also Published As

Publication number Publication date
WO2021243519A1 (en) 2021-12-09

Similar Documents

Publication Publication Date Title
US9532056B2 (en) Method for adaptive entropy coding of tree structures
JP3978478B2 (en) Apparatus and method for performing fixed-speed block-unit image compression with estimated pixel values
US5959560A (en) Data compression via alphabet partitioning and group partitioning
CN107835421B (en) Method and apparatus for encoding video and method and apparatus for decoding video
JP5905099B2 (en) Hierarchical entropy encoding and decoding
US9319697B2 (en) Coding and decoding images with sign data hiding
WO2021196029A1 (en) Method and device for encoding and decoding point cloud
JP6178798B2 (en) Terminating spatial tree position encoding and decoding
EP2723071A1 (en) Encoder, decoder and method
US9245353B2 (en) Encoder, decoder and method
CN112218077B (en) Method and device for encoding point cloud attributes between channels and readable storage medium
CN112514397A (en) Point cloud encoding and decoding method and device
CA3153825A1 (en) Methods and devices for tree switching in point cloud compression
CN112188197A (en) Method and device for decoding point cloud attributes between channels and readable storage medium
CN112740707A (en) Point cloud encoding and decoding method and device
CN112384950A (en) Point cloud encoding and decoding method and device
WO2021109153A1 (en) Method and device for point cloud processing and decoding, and storage medium
CN113906681A (en) Point cloud data encoding and decoding method, system and storage medium
CN113453002B (en) Quantization and entropy coding method and apparatus
WO2020248562A1 (en) Method for point cloud processing and decoding, device for point cloud processing and decoding, and storage medium
CN115379190B (en) Point cloud processing method and device, computer equipment and storage medium
WO2024037091A1 (en) Point cloud processing method and apparatus, computer device, and storage medium
WO2023249999A1 (en) System and method for geometry point cloud coding
CN116347105A (en) Point cloud coding method and device, communication node and storage medium
CN117354496A (en) Point cloud encoding and decoding method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination