Partitioning method, encoder, decoder, and computer storage medium

Through the Morton code division method, the calculation complexity of LOD division and the error of neighbor node prediction in point cloud compression are reduced, and the encoding efficiency and attribute reconstruction quality are improved.

CN115174922BActive Publication Date: 2025-07-18GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210856481.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-01-06
Publication Date
2025-07-18
Estimated Expiration
2040-01-06

AI Technical Summary

Technical Problem

In point cloud compression, the calculation complexity of LOD division based on distance is high and the neighbor node prediction is not accurate enough, resulting in an increase in the number of coded bits and low encoding efficiency.

Method used

The Morton code is used for LOD division. By calculating the Morton code of the point in the point cloud, the right shift number of the LOD layer of the detail level is determined, and the Morton code is used to search neighbor nodes to reduce the calculation complexity and improve the accuracy of neighbor node prediction attributes.

Benefits of technology

Reduces the overhead of encoding bits, improves the encoding and decoding efficiency, and improves the reconstruction quality of the attribute part.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115174922B_ABST
    Figure CN115174922B_ABST
Patent Text Reader

Abstract

An embodiment of the present application discloses a partitioning method, an encoder, a decoder, and a computer storage medium. The method includes: calculating the Morton code of points in the to-be-partitioned point cloud; determining the right shift number N corresponding to the i-th level of detail (LOD) layer in the to-be-partitioned point cloud i ; determining whether i is less than or equal to M - 1; when i is less than or equal to M - 1, for the i-th LOD layer, right shift the Morton code of points in the to-be-partitioned point cloud by N i bits, and store the right-shifted Morton code in a preset storage area; determining the Morton code of the parent node corresponding to the current node in the i-th LOD layer; searching for the neighbor node corresponding to the parent node in the preset storage area according to the determined Morton code of the parent node; partitioning the current node into the i-th LOD layer and partitioning the neighbor node into the i + 1-th LOD layer; updating i according to i + 1, and returning to determine whether i is less than or equal to M - 1; when i is greater than M - 1, determining the 0-th LOD layer to the M - 1-th LOD layer as the LOD layers corresponding to the partitioning of the to-be-partitioned point cloud.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the application with the application date of January 6, 2020, application number 2020800805926, and invention title "Partitioning Method, Encoder, Decoder, and Computer Storage Medium". Technical Field

[0002] The embodiments of the present application relate to the partitioning technology of the level of detail (LOD) in the field of video coding and decoding technology, and in particular, to a partitioning method, an encoder, a decoder, and a computer storage medium. Background Art

[0003] In the geometry-based point cloud compression (G-PCC) encoder framework, the geometric information of the point cloud and the attribute information corresponding to each point cloud are encoded separately. After the geometric encoding is completed, the geometric information will be reconstructed, and the encoding of the attribute information will depend on the reconstructed geometric information. Among them, the attribute information encoding mainly targets the encoding of color information, and in the color information encoding, there are mainly two transformation methods. One is the lifting transformation based on distance for LOD partitioning, and the other is the direct region adaptive hierarchal transform (RAHT). Both of these methods will transform the color information from the spatial domain to the frequency domain, obtain high-frequency coefficients and low-frequency coefficients through the transformation, and finally quantize and encode the coefficients to generate a binary bitstream.

[0004] Currently, when performing LOD partitioning on a point cloud based on distance, on the one hand, the computational complexity is relatively high, and on the other hand, due to incomplete consideration factors, the neighbor nodes obtained by searching are not accurate enough, resulting in a relatively large prediction residual, increasing the number of encoded bits, and thus reducing the encoding efficiency. Summary of the Invention

[0005] The embodiments of the present application provide a partitioning method, an encoder, a decoder, and a computer storage medium, which can improve the accuracy of predicting attributes of neighbor nodes, effectively reduce the encoding bit overhead, and thus improve the encoding and decoding efficiency.

[0006] The technical solution of the embodiments of the present application can be implemented as follows:

[0007] In a first aspect, the embodiments of the present application provide a partitioning method, which is applied to an encoder or a decoder, and the method includes:

[0008] Based on the point cloud to be partitioned, calculate the Morton code of the points in the point cloud to be partitioned;

[0009] Determine the number of bits N to be shifted to the right corresponding to the i-th level of detail LOD layer in the point cloud to be partitioned i ; where i is an integer greater than or equal to 0, and N i is an integer greater than 0;

[0010] Determine whether i is less than or equal to M - 1; where M represents the preset number of levels for LOD partitioning;

[0011] When i is less than or equal to M - 1, for the i-th LOD layer, shift the Morton code of the points in the point cloud to be partitioned to the right by N i bits, and store the shifted Morton code in a preset storage area;

[0012] Determine the Morton code of the parent node corresponding to the current node in the i-th LOD layer;

[0013] According to the determined Morton code of the parent node, search for the neighbor nodes corresponding to the parent node in the preset storage area;

[0014] Partition the current node into the i-th LOD layer, and partition the neighbor nodes into the i + 1-th LOD layer;

[0015] Update i according to i + 1, and return to determine whether i is less than or equal to M - 1;

[0016] When i is greater than M - 1, determine the LOD layers corresponding to the partition of the point cloud to be partitioned from the 0-th LOD layer to the M - 1-th LOD layer.

[0017] In a second aspect, an embodiment of the present application provides an encoder, which includes a first calculation unit, a first determination unit, a first judgment unit, a first right shift unit, a first search unit, and a first partitioning unit, where,

[0018] The first calculation unit is configured to calculate the Morton code of the points in the point cloud to be partitioned based on the point cloud to be partitioned;

[0019] The first determination unit is configured to determine the number of bits N to be shifted to the right corresponding to the i-th level of detail LOD layer in the point cloud to be partitioned i ; where i is an integer greater than or equal to 0, and N i is an integer greater than 0;

[0020] The first judgment unit is configured to determine whether i is less than or equal to M - 1; where M represents the preset number of levels for LOD partitioning;

[0021] The first right shift unit is configured to, when i is less than or equal to M - 1, for the i-th LOD layer, shift the Morton code of the points in the point cloud to be partitioned to the right by N i bits, and store the shifted Morton code in a preset storage area;

[0022] The first determination unit is further configured to determine the Morton code of the parent node corresponding to the current node in the i-th LOD layer;

[0023] The first search unit is configured to search for the neighbor nodes corresponding to the parent node in the preset storage area according to the determined Morton code of the parent node;

[0024] The first division unit is configured to divide the current node into the i-th LOD layer and divide the neighbor nodes into the (i + 1)-th LOD layer;

[0025] The first judgment unit is further configured to update i according to i + 1 and return a judgment on whether i is less than or equal to M - 1;

[0026] The first determination unit is further configured to, when i is greater than M - 1, determine the LOD layers corresponding to the division of the to-be-divided point cloud as the 0-th LOD layer to the (M - 1)-th LOD layer.

[0027] In a third aspect, an embodiment of the present application provides an encoder, which includes a first memory and a first processor, wherein,

[0028] The first memory is used to store a computer program that can run on the first processor;

[0029] The first processor is configured to execute the method described in the first aspect when running the computer program.

[0030] In a fourth aspect, an embodiment of the present application provides a decoder, which includes a second calculation unit, a second determination unit, a second judgment unit, a second right shift unit, a second search unit, and a second division unit, wherein,

[0031] The second calculation unit is configured to calculate the Morton code of the points in the to-be-divided point cloud based on the to-be-divided point cloud;

[0032] The second determination unit is configured to determine the right shift number N corresponding to the i-th level of detail (LOD) layer in the to-be-divided point cloud; i ; where i is an integer greater than or equal to 0, and N i is an integer greater than 0;

[0033] The second judgment unit is configured to judge whether i is less than or equal to M - 1; where M represents the preset number of LOD division layers;

[0034] The second right shift unit is configured to, when i is less than or equal to M - 1, for the i-th LOD layer, right shift the Morton code of the points in the to-be-divided point cloud by N i bits and store the right-shifted Morton code in the preset storage area;

[0035] The second determination unit is further configured to determine the Morton code of the parent node corresponding to the current node in the i-th LOD level;

[0036] The second search unit is configured to search for the neighbor nodes corresponding to the parent node in the preset storage area according to the determined Morton code of the parent node;

[0037] The second division unit is configured to divide the current node into the i-th LOD level and divide the neighbor nodes into the (i + 1)-th LOD level;

[0038] The second judgment unit is further configured to update i according to i + 1 and return a judgment on whether i is less than or equal to M - 1;

[0039] The second determination unit is further configured to, when i is greater than M - 1, determine the LOD levels corresponding to the LOD levels to be divided of the point cloud to be divided from the 0-th LOD level to the (M - 1)-th LOD level.

[0040] In a fifth aspect, an embodiment of the present application provides a decoder, which includes a second memory and a second processor, wherein,

[0041] The second memory is used to store a computer program that can run on the second processor;

[0042] The second processor is used to execute the method described in the first aspect when running the computer program.

[0043] In a sixth aspect, an embodiment of the present application provides a computer storage medium, which stores a computer program, and the computer program, when executed by a first processor, implements the method described in the first aspect, or when executed by a second processor, implements the method described in the first aspect.

[0044] An embodiment of the present application provides a division method, an encoder, a decoder, and a computer storage medium. By calculating the Morton code of the points in the point cloud to be divided based on the point cloud to be divided; determining the right shift number N corresponding to the i-th level of detail (LOD) level in the point cloud to be divided, i , where i is an integer greater than or equal to 0, and N i is an integer greater than 0; judging whether i is less than or equal to M - 1, where M represents the preset number of LOD divisions; when i is less than or equal to M - 1, for the i-th LOD level, right-shift the Morton code of the points in the point cloud to be divided by N iShift the Morton code to the right by a certain number of bits and store the shifted Morton code in a preset storage area; determine the Morton code of the parent node corresponding to the current node in the i-th LOD layer; search for the neighbor nodes corresponding to the parent node in the preset storage area according to the determined Morton code of the parent node; divide the current node into the i-th LOD layer and divide the neighbor nodes into the (i + 1)-th LOD layer; update i according to i + 1 and return to judge whether i is less than or equal to M - 1; when i is greater than M - 1, determine the LOD layers corresponding to the division of the to-be-divided point cloud from the 0-th LOD layer to the (M - 1)-th LOD layer; in this way, the technical solution of the present application no longer calculates the spatial distance between the current node and the neighbor nodes, but each time when dividing the LOD layer, uses the Morton code to search for the neighbor nodes of the parent node corresponding to the current node, and uses the current node as a sampling point to predict the neighbor nodes. Therefore, not only the calculation complexity is reduced, but also due to considering the spatial distribution characteristics of the point cloud, the accuracy of predicting the attributes of the neighbor nodes is improved, the reconstruction quality of the attribute part is improved, the coding bit overhead can be effectively reduced, and thus the encoding and decoding efficiency is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 FIG. is a flowchart of a G-PCC encoding provided by a related technical solution;

[0046] Figure 2 FIG. is a flowchart of a G-PCC decoding provided by a related technical solution;

[0047] Figure 3A FIG. is a schematic structural diagram of a LOD generation process provided by a related technical solution;

[0048] Figure 3B FIG. is another schematic structural diagram of a LOD generation process provided by a related technical solution;

[0049] Figure 4 FIG. is a schematic flowchart of a partitioning method provided by an embodiment of the present application;

[0050] Figure 5 FIG. is a schematic flowchart of a process for determining an initial right shift number provided by an embodiment of the present application;

[0051] Figure 6 FIG. is a schematic diagram of the spatial relationship between a current node and neighbor nodes provided by an embodiment of the present application;

[0052] Figure 7 FIG. is a detailed schematic flowchart of a partitioning method provided by an embodiment of the present application;

[0053] Figure 8 FIG. is a schematic structural diagram of the composition of an encoder provided by an embodiment of the present application;

[0054] Figure 9Schematic diagram of the specific hardware structure of an encoder provided by an embodiment of the present application;

[0055] Figure 10 Schematic diagram of the composition structure of a decoder provided by an embodiment of the present application;

[0056] Figure 11 Schematic diagram of the specific hardware structure of a decoder provided by an embodiment of the present application. Detailed implementation manners

[0057] In order to more comprehensively understand the features and technical content of the embodiments of the present application, the implementation of the embodiments of the present application will be described in detail below with reference to the accompanying drawings. The accompanying drawings are only for reference and illustration purposes and are not used to limit the embodiments of the present application.

[0058] In the point cloud G-PCC encoder framework, after slicing the point cloud of the input three-dimensional image model, each slice is independently encoded.

[0059] See Figure 1 , which shows a flowchart of a G-PCC encoding provided by a related technical solution. As Figure 1In the flow block diagram of G-PCC encoding shown, when applied to a point cloud encoder (Encoder), for the point cloud data to be encoded, first, through slice division, the point cloud data is divided into multiple slices. In each slice, the geometric information of the point cloud and the attribute information corresponding to each point cloud are encoded separately. During the geometric encoding process, first, the geometric information is subjected to coordinate transformation so that the point cloud is all contained within a bounding box, and then quantization is performed. This quantization mainly serves a scaling purpose. Due to quantization rounding, some of the geometric information of the point cloud is the same. Thus, based on parameters, it is determined whether to remove duplicate points. This process of quantization and removing duplicate points is also known as the voxelization process. Then, the bounding box is divided into an octree. In the geometric information encoding process based on the octree, the bounding box is divided into eight equal sub-cubes. The non-empty (containing points in the point cloud) sub-cubes are further divided into eight equal parts until the leaf nodes obtained from the division are unit cubes of 1×1×1, at which point the division stops. The points in the leaf nodes are then arithmetically encoded to generate a binary geometric bitstream, i.e., the geometric code stream. In the geometric information encoding process based on a triangle soup (trisoup), an octree division is also performed first. However, different from the geometric information encoding based on the octree, the trisoup does not need to divide the point cloud step by step to unit cubes with side lengths of 1×1×1. Instead, the division stops when the side length of the block (sub-block) is W. Based on the surface formed by the distribution of the point cloud in each block, up to twelve vertices (intersection points) generated by the intersection of the surface and the twelve edges of the block are obtained. The vertices are then arithmetically encoded (surface fitting based on the intersection points) to generate a binary geometric bitstream, i.e., the geometric code stream. The vertices are also used to implement the geometric reconstruction process, and the reconstructed set information is used when encoding the attributes of the point cloud.

[0060] After geometric coding is completed, the geometric information is reconstructed. Currently, the attribute coding is mainly for color information. During the attribute coding process, first, the color information (i.e., the attribute information) is converted from the RGB color space to the YUV color space. Then, the reconstructed geometric information is used to recolour the point cloud so that the uncoded attribute information corresponds to the reconstructed geometric information. During the color information coding process, there are mainly two transformation methods. One is the distance-based lifting transformation that depends on the Level of Detail (LOD) division. Currently, the LOD division is mainly divided into two ways: dividing the LOD based on distance (mainly for Category1 sequences) and dividing the LOD based on a fixed sampling rate (mainly for Category3 sequences); the other is the direct Region Adaptive Hierarchal Transform (RAHT) transformation. Among them, both of these two methods will convert the color information from the spatial domain to the frequency domain, obtain high-frequency coefficients and low-frequency coefficients through the transformation, and finally quantize the coefficients (i.e., quantize the coefficients). Finally, after the geometric coding data obtained by octree division and surface fitting and the quantized coefficient-processed attribute coding data are slice-synthesized, the vertex coordinates of each block (i.e., arithmetic coding) are encoded in sequence to generate a binary attribute bitstream, that is, the attribute bitstream.

[0061] See Figure 2 , which shows a flowchart of G-PCC decoding provided by the related technical solution. As Figure 2 shown in the flowchart of G-PCC decoding, applied to the point cloud decoder (Decoder), for the obtained binary bitstream, first, the geometric bitstream and the attribute bitstream in the binary bitstream are decoded independently. When decoding the geometric bitstream, through arithmetic decoding - octree synthesis - surface fitting - reconstructed geometry - inverse coordinate transformation, the geometric information of the point cloud is obtained; when decoding the attribute bitstream, through arithmetic decoding - inverse quantization - inverse lifting transformation based on LOD or inverse transformation based on RAHT - inverse color transformation, the attribute information of the point cloud is obtained, and the three-dimensional image model of the point cloud data to be encoded is restored based on the geometric information and the attribute information.

[0062] Figure 1 shown in the flowchart of G-PCC encoding, the LOD division is mainly used for two ways, Predicting and lifting, in the point cloud attribute transformation. The LOD division based on distance will be introduced in detail below.

[0063] Specifically, the LOD division is carried out by a set of distance thresholds (denoted by d l ), l = 0, 1,..., N - 1), which divides the input point cloud into different refinement levels (denoted by Rl It is represented that \(l = 0, 1, \cdots, N - 1\), that is, the points in the point cloud are divided into different sets \(R\). l Among them, the distance threshold can be a custom value. The distance threshold \(d\) l needs to satisfy two conditions: \(d\) l \(< d\) l-1 and \(d\) l-1 \(= 0\).

[0064] The process of LOD division is after the geometric reconstruction of the point cloud. At this time, the geometric coordinate information of the point cloud can be directly obtained. The process of dividing LOD can be applied to both the point cloud encoder and the point cloud decoder at the same time. The specific process is as follows:

[0065] (1) Place all the points in the point cloud into the set of "unvisited" points, and initialize the set of "visited" points (denoted by \(V\)) as an empty set.

[0066] (2) Divide the LOD levels through continuous iteration. The generation process of the refinement level \(R\) corresponding to the \(l\)-th iteration is as follows: l The generation process is as follows:

[0067] a. Iterate through all the points in the point cloud.

[0068] b. If the current point has been traversed, ignore this point.

[0069] c. Otherwise, calculate the distance from this point to each point in the set \(V\) respectively, and record the nearest distance as \(D\).

[0070] d. If the distance \(D\) is greater than or equal to the threshold \(d\) l , then add this point to the refinement level \(R\) l and the set \(V\).

[0071] e. Repeat the process from a to d until all the points in the point cloud have been traversed.

[0072] (3) For the \(l\)-th LOD set, that is, \(LOD_l\) is obtained by merging the points in the refinement levels \(R_0, R_1, \cdots, R\) l .

[0073] (4) Continuously iterate by repeating the process from (1) to (3) until all LOD levels are generated or all points have been traversed.

[0074] See Figure 3A , which shows a structural schematic diagram of a LOD generation process provided by the related technical solution. In Figure 3AAmong them, the point cloud includes 10 points P0, P1, P2, P3, P4, P5, P6, P7, P8, and P9. LOD division is performed based on the distance threshold. In this way, the LOD0 set sequentially includes P0, P5, P4, and P2. The LOD1 set sequentially includes P0, P5, P4, P2, P1, P6, and P3. The LOD2 set sequentially includes P0, P5, P4, P2, P1, P6, P3, P9, P8, and P7.

[0075] In the related technical solutions, a solution for LOD division based on Morton codes is proposed. Compared with the solution of traversing and searching all points for LOD division in the original method, the solution for LOD division based on Morton codes can reduce the computational complexity.

[0076] Specifically, Morton coding is also called z-order code because its coding order follows the spatial z-order. First, use the variable P i to represent the points in the input point cloud, and the variable M i is the Morton code related to P i , where i = 1, 2,..., N. The specific process of calculating the Morton code is described as follows. For a three-dimensional coordinate represented by d-bit binary numbers for each component, the representation of its three coordinate components is achieved through the following:

[0077]

[0078] Among them, x l , y l , z l ∈{0, 1} are the binary values corresponding to the highest bit (l = 1) to the lowest bit (l = d) of x, y, and z respectively. The Morton code M is to arrange x l , y l , z l from the highest bit to the lowest bit in turn, and the calculation formula of M is as follows:

[0079]

[0080] Among them, m l' ∈{0, 1} are the values from the highest bit (l' = 1) to the lowest bit (l' = 3d) of M respectively. After obtaining the Morton code M of each point in the point cloud, the points in the point cloud are arranged in ascending order according to the Morton code.

[0081] Further, D0 (the threshold of the initial distance) and ρ (the distance threshold ratio during adjacent LOD layer division) are respectively user-defined initial parameters, and ρ > 1. Assume that I represents the index of all points. At the k-th iteration, the points in LODk will search for the nearest neighbors from LOD0 to the LODk-1 layer, that is, the points with the closest distance; k = 1, 2,..., N - 1. Here, N is the total number of LOD division layers; and when k = 0, at the 0-th iteration, the points in LOD0 will directly search for the nearest neighbors in LOD0. The specific process is as follows:

[0082] (1) Initialize the division distance threshold as D = D0;

[0083] (2) At the k-th iteration, the set L(k) stores the points belonging to the k-th layer of LOD, and the set O(k) stores the point set with a higher refinement level than the LODk layer. Among them, the calculation processes of L(k) and O(k) are as follows:

[0084] First, both O(k) and L(k) are initialized as empty sets;

[0085] Secondly, each iteration traverses in the order of the indices of the points stored in the set I. Specifically, in each traversal, the geometric distance from the current point to all points within a certain range in the set O(k) will be calculated, and based on the Morton code corresponding to the current point in I, the index of the first point greater than the Morton code corresponding to the current point will be searched in the set O(k), and then searched within a search range SR1 of this index (here, SR1 represents the search range based on the Morton code, generally taking values of 8, 16, 64); if a point with a distance less than the threshold d l is found within this range, the current point will be added to the set L(k), otherwise, the current point will be added to the set O(k);

[0086] (3) During each iteration, the sets L(k) and O(k) are calculated respectively, and the points in O(k) are used to predict the points in L(k). Assume that the set R(k) = L(k)\L(k - 1), that is, R(k) represents the point set of the difference between the LOD(k - 1) and LOD(k) sets. For the points located in the set R(k), the nearest h predicted neighbors (generally, h can be set to 3) will be searched in the set O(k). The specific process of searching for the nearest neighbors is as follows:

[0087] a. For the point P i in the set R(k), the Morton code corresponding to this point is M i ;

[0088] b. Search for the first point in the set O(k) that is greater than the current point P i corresponding to the Morton code Mi The index j of the point;

[0089] c. Search for the current point P within a search range [j - SR2, j + SR2] in the set O(k) based on the index j i for its nearest neighbor (here, SR2 represents a search range, typically taking values of 8, 16, 32, 64);

[0090] (4) Continuously iterate by repeating the process of (1) to (3) until all the points in the set I are traversed.

[0091] See Figure 3B , which shows a schematic structural diagram of another LOD generation process provided by the related technical solution. In Figure 3B , the point cloud includes 10 points P0, P1, P2, P3, P4, P5, P6, P7, P8, P9. Based on the Morton code for LOD division, first arrange them in ascending order of the Morton code. The order of these 10 points is P4, P1, P9, P5, P0, P6, P8, P2, P7, P3; then perform the search for the nearest neighbor. Thus, the LOD0 set still sequentially includes P0, P5, P4, P2, the LOD1 set still sequentially includes P0, P5, P4, P2, P1, P6, P3, and the LOD2 set still sequentially includes P0, P5, P4, P2, P1, P6, P3, P9, P8, P7.

[0092] However, the current solution first performs LOD division based on different distance thresholds before the point cloud attribute transformation Predicting and lifting. Specifically, the existing LOD division calculates the distances between all points each time. When the distance between a point and all points is less than the distance threshold, the point can be added to the current LOD layer; otherwise, the point is placed in the next layer for LOD division, and continuous iteration is performed according to different threshold ranges until all points are traversed or all LOD layers are divided, resulting in a high computational complexity. In addition, due to the different spatial distributions of different point clouds, the object densities of different point clouds are different. When performing LOD division based on the distance threshold, the spatial distribution characteristics of the point cloud are not considered, resulting in inaccurate neighbor nodes obtained by the search, and ultimately leading to a large prediction residual obtained based on the neighbor nodes, so that there is still a large redundancy in the attribute information, increasing the number of encoded bits, and thus unable to ensure the best encoding and decoding efficiency.

[0093] An embodiment of the present application provides a partitioning method, which can be applied to an encoder (also referred to as a point cloud encoder) or a decoder (also referred to as a point cloud decoder). Among them, based on the point cloud to be partitioned, calculate the Morton code of the points in the point cloud to be partitioned; determine the right shift number N corresponding to the i-th level of detail (LOD) layer in the point cloud to be partitioned, where i is an integer greater than or equal to 0, and N is an integer greater than 0; determine whether i is less than or equal to M - 1, where M represents the preset number of layers for LOD partitioning; when i is less than or equal to M - 1, for the i-th LOD layer, right shift the Morton code of the points in the point cloud to be partitioned by N bits, and store the right-shifted Morton code in a preset storage area; determine the Morton code of the parent node corresponding to the current node in the i-th LOD layer; search for the neighbor node corresponding to the parent node in the preset storage area according to the determined Morton code of the parent node; partition the current node into the i-th LOD layer, and partition the neighbor node into the (i + 1)-th LOD layer; update i according to i + 1, and return to determine whether i is less than or equal to M - 1; when i is greater than M - 1, determine the 0-th LOD layer to the (M - 1)-th LOD layer as the LOD layers corresponding to the partition of the point cloud to be partitioned; in this way, the technical solution of the present application no longer calculates the spatial distance between the current node and the neighbor node, but each time when partitioning the LOD layer, uses the Morton code to search for the neighbor node corresponding to the parent node of the current node, and uses the current node as a sampling point to predict the neighbor node, thereby not only reducing the computational complexity, but also improving the accuracy of the predicted attributes of the neighbor node and the reconstruction quality of the attribute part because the spatial distribution characteristics of the point cloud are considered, effectively reducing the coding bit overhead, and thus improving the encoding and decoding efficiency. i , where i is an integer greater than or equal to 0, and N i is an integer greater than 0; determine whether i is less than or equal to M - 1, where M represents the preset number of layers for LOD partitioning; when i is less than or equal to M - 1, for the i-th LOD layer, right shift the Morton code of the points in the point cloud to be partitioned by N i bits, and store the right-shifted Morton code in a preset storage area; determine the Morton code of the parent node corresponding to the current node in the i-th LOD layer; search for the neighbor node corresponding to the parent node in the preset storage area according to the determined Morton code of the parent node; partition the current node into the i-th LOD layer, and partition the neighbor node into the (i + 1)-th LOD layer; update i according to i + 1, and return to determine whether i is less than or equal to M - 1; when i is greater than M - 1, determine the 0-th LOD layer to the (M - 1)-th LOD layer as the LOD layers corresponding to the partition of the point cloud to be partitioned; in this way, the technical solution of the present application no longer calculates the spatial distance between the current node and the neighbor node, but each time when partitioning the LOD layer, uses the Morton code to search for the neighbor node corresponding to the parent node of the current node, and uses the current node as a sampling point to predict the neighbor node, thereby not only reducing the computational complexity, but also improving the accuracy of the predicted attributes of the neighbor node and the reconstruction quality of the attribute part because the spatial distribution characteristics of the point cloud are considered, effectively reducing the coding bit overhead, and thus improving the encoding and decoding efficiency.

[0094] The following will describe each embodiment of the present application in detail with reference to the accompanying drawings.

[0095] See Figure 4 , which shows a schematic flowchart of a partitioning method provided by an embodiment of the present application. As Figure 4 shown, when applied to an encoder or a decoder, the method may include:

[0096] S401: Based on the point cloud to be partitioned, calculate the Morton code of the points in the point cloud to be partitioned;

[0097] It should be noted that in the point cloud, the points can be all the points in the point cloud or some of the points in the point cloud, and these points are relatively concentrated in space.

[0098] It should also be noted that the partitioning method provided by the embodiments of the present application improves the generation process of LOD in the lifting and Predicting attribute transformations; that is, before performing the lifting or Predicting transformation, it is necessary to first use this partitioning method to partition the LOD layer. Specifically, this partitioning method can be applied to Figure 1 generate the LOD part in the flow chart of G-PCC encoding shown in, and can also be applied to Figure 2 generate the LOD part in the flow chart of G-PCC decoding shown in, and can also be applied simultaneously to Figure 1 generate the LOD part in the flow chart of G-PCC encoding shown in and Figure 2 generate the LOD part in the flow chart of G-PCC decoding shown in. The embodiments of the present application do not make specific limitations.

[0099] In this way, after obtaining the point cloud to be partitioned, first calculate the Morton code of the points in the point cloud to be partitioned, which is convenient for subsequent iterative operations. The Morton code can be used to search for the neighbor nodes of the corresponding parent node of the current node, which is beneficial for predicting the neighbor nodes using the current node as a sampling point when performing LOD layer partitioning.

[0100] S402: Determine the right shift number Ni corresponding to the i-th LOD layer in the point cloud to be partitioned;

[0101] It should be noted that i is an integer greater than or equal to 0, and Ni is an integer greater than 0. In order to partition the point cloud to be partitioned into multiple LOD layers, here, an iterative method is used for partitioning. Among them, the number of layers for LOD partitioning of the point cloud to be partitioned can be preset. Generally speaking, the preset number of layers for LOD partitioning can be represented by M, and M is an integer greater than 0.

[0102] In this way, after determining the Morton code of the points in the point cloud to be partitioned, the Morton code of the points in the point cloud to be partitioned can also be sorted to determine the right shift number corresponding to each LOD layer. Therefore, in some embodiments, the method may further include:

[0103] Sort the Morton codes of the points in the point cloud to be partitioned according to a preset sorting strategy, and determine the sorted Morton codes as the Morton codes of the points in the point cloud to be partitioned.

[0104] It should be noted that the preset sorting strategy can be an ascending order strategy from small to large, a descending order strategy from large to small, or other sorting strategies (such as a random sorting strategy, etc.); preferably, the preset sorting strategy is an ascending order strategy. That is, sort the Morton codes of the points in the point cloud to be partitioned in ascending order from small to large, and determine the sorted Morton codes as the Morton codes of the points in the point cloud to be partitioned.

[0105] In this way, after sorting the Morton codes, the initial right shift number of the Morton codes of the points in the point cloud to be partitioned can be determined according to the sorted Morton codes; where the initial right shift number represents the right shift number (which can be denoted as N0) corresponding to the Morton codes of the points in the point cloud to be partitioned at the 0th LOD level. Specifically, in some embodiments, when i is equal to 0, for S402, the determination of the right shift number N corresponding to the ith LOD level in the point cloud to be partitioned i may include:

[0106] Sample the sorted Morton codes to obtain the Morton codes of K sampling points; where K is an integer greater than 0;

[0107] Perform a right shift process on the Morton codes of the K sampling points to obtain K sampling points corresponding to the right-shifted Morton codes;

[0108] Determine whether the K sampling points corresponding to the right-shifted Morton codes have at least one neighbor node corresponding to each sampling point on average;

[0109] If the K sampling points corresponding to the right-shifted Morton codes do not have at least one neighbor node corresponding to each sampling point on average, then continue to execute the step of performing a right shift process on the Morton codes of the K sampling points;

[0110] If the K sampling points corresponding to the right-shifted Morton codes have at least one neighbor node corresponding to each sampling point on average, then obtain the right shift number of the K sampling points, and determine the right shift number as the initial right shift number of the Morton codes of the points in the point cloud to be partitioned; where the initial right shift number represents the right shift number N0 corresponding to the Morton codes of the points in the point cloud to be partitioned at the 0th LOD level.

[0111] That is to say, at the initial partitioning of the LOD level, that is, when partitioning the 0th LOD level, first sample the sorted Morton codes to obtain the Morton codes of K sampling points; then continuously perform a right shift process on the Morton codes of these K sampling points until the K sampling points corresponding to the right-shifted Morton codes have at least one neighbor node corresponding to each sampling point on average, and finally use the obtained right shift number as the initial right shift number N0. Specifically, for the process of obtaining the initial right shift number N0, as Figure 5 shown, may include:

[0112] S501: Sample the sorted Morton codes to obtain the Morton codes of K sampling points;

[0113] S502: n = 0;

[0114] S503: n = n + 3;

[0115] S504: Perform a right shift process on the Morton codes of K sampling points by n bits;

[0116] S505: Determine whether the number of neighbor nodes corresponding to each sampling point on average is greater than 1;

[0117] S506: N0 = n.

[0118] It should be noted that n is a preset variable, the initial value of n is set to 0, and then the value of n is updated by n + 3 each time, so as to subsequently execute step S504, that is, perform a right shift of n bits on the Morton codes of K sampling points.

[0119] In addition, for step S505, if the judgment result is yes, then execute step S506, that is, the initial right shift number N0 can be obtained; if the judgment result is no, then it is necessary to return to execute step S503 until the judgment result of step S505 is yes, so as to finally obtain the initial right shift number N0.

[0120] It should also be noted that K is an integer greater than 0. For example, the value of K can be set to 100, but the embodiments of the present application do not make specific limitations. That is to say, in the process of determining the initial right shift number N0, the value of K is generally set randomly; however, the value-taking method of K can also include: performing characteristic analysis on the point cloud to be divided to determine the value of K.

[0121] Here, the value of K is usually related to the characteristic information of the point cloud to be divided, such as the number of points and spatial density in the point cloud to be divided, etc.; in this way, the point cloud to be divided can be subjected to characteristic analysis to determine the value of K, and then the initial right shift number N0 can be determined. Since the value of K is obtained by combining the characteristics of the entire point cloud to be divided, the encoding and decoding efficiency can be improved.

[0122] It can be understood that after sorting the Morton codes, the initial right shift number N0 can also be determined by continuously performing right shift processing according to the difference between the maximum Morton code and the minimum Morton code. Specifically, in some embodiments, when i is equal to 0, for S402, the determination of the right shift number N corresponding to the i-th LOD layer in the point cloud to be divided i , may include:

[0123] Based on the sorted Morton codes, determine the maximum Morton code and the minimum Morton code;

[0124] Calculate the difference between the maximum Morton code and the minimum Morton code;

[0125] Perform right shift processing on the difference. When the right-shifted difference satisfies a preset range, obtain the right shift number of the difference;

[0126] Determine the right shift number as the initial right shift number of the point cloud to be divided.

[0127] It should be noted that since the Morton codes are sorted in ascending order from smallest to largest, based on the sorted Morton codes, the maximum Morton code and the minimum Morton code can be determined, and then the difference between the maximum Morton code and the minimum Morton code (which can be represented by delta) can be calculated.

[0128] By right-shifting the delta bits, when the delta bits are right-shifted by N bits, the shifted delta is obtained, which can make the shifted delta satisfy a preset range. At this time, N can be determined as the initial right-shift number N0. Among them, right-shifting the delta bits by N bits can be regarded as right-shifting the bits of the maximum Morton code by N bits, right-shifting the bits of the minimum Morton code by N bits, and then calculating the difference between the two. The obtained difference is the result of right-shifting the delta bits by N bits.

[0129] It should also be noted that the preset range indicates whether the number of neighbor nodes corresponding to each sampling point on average is greater than 1. In this way, when the difference after right-shifting by N bits satisfies the preset range, the right-shift number N at this time can be determined as the initial right-shift number N0, thereby improving the encoding and decoding efficiency.

[0130] Furthermore, after determining the initial right-shift number N0, that is, after determining the right-shift number corresponding to the 0th LOD layer in the point cloud to be divided, the right-shift number N corresponding to the ith LOD layer in the point cloud to be divided can also be determined according to the initial right-shift number N0 i where i is not equal to 0. Specifically, in some embodiments, when i is equal to 0, for S402, determining the right-shift number N corresponding to the ith LOD layer in the point cloud to be divided i may include:

[0131] Using a first pre-designed calculation model to determine the right-shift number N corresponding to the ith LOD layer in the point cloud to be divided i .

[0132] Furthermore, in some embodiments, using the first pre-designed calculation model to determine the right-shift number N corresponding to the ith LOD layer in the point cloud to be divided i may include:

[0133] Obtaining the right-shift number N corresponding to the (i - 1)th LOD layer i-1 ;

[0134] Adding the right-shift number N corresponding to the (i - 1)th LOD layer i-1 to a preset value to obtain a superimposed value;

[0135] Determining the superimposed value as the right-shift number N corresponding to the ith LOD layer i .

[0136] That is to say, when subsequently dividing the LOD levels, the number of right shift bits corresponding to the i-th LOD level is determined according to the number of right shift bits corresponding to the previous LOD level (i.e., the (i - 1)-th LOD level). Among them, the first preset calculation model is as follows:

[0137] N i = N i-1 + m (2)

[0138] Here, N i represents the number of right shift bits of the current LOD level, that is, the number of right shift bits corresponding to the i-th LOD level; N i-1 represents the number of right shift bits of the previous LOD level, that is, the number of right shift bits corresponding to the (i - 1)-th LOD level; m is a preset value.

[0139] It should be noted that the preset value can be specifically set according to the actual point cloud space situation; preferably, the preset value can be equal to 3, but the embodiments of the present application do not make limitations.

[0140] Furthermore, in some embodiments, the method may further include:

[0141] Performing characteristic analysis on the point cloud to be divided to determine the preset value.

[0142] Here, the preset value is usually related to the characteristic information of the point cloud to be divided, such as the number of points, spatial density, etc. in the point cloud to be divided; in this way, the point cloud to be divided can be subjected to characteristic analysis to determine the preset value. Among them, the preset value corresponding to each LOD level can be the same, and the preset value corresponding to each LOD level can also be different; for example, the preset value corresponding to different LOD levels when calculating the number of right shift bits can be adaptively adjusted based on the characteristics of the point cloud to be divided, so as to be able to more accurately find the adjacent regions corresponding to different regions, and the prediction performance can be further improved.

[0143] In this way, after determining the number of right shift bits corresponding to each LOD level, right shift processing can be performed according to the number of right shift bits corresponding to each LOD level to perform the division of each LOD level.

[0144] S403: Determine whether i is less than or equal to M - 1;

[0145] It should be noted that M represents the preset number of LOD divisions. Here, M is an integer greater than 0. When i is less than or equal to M - 1, at this time, it is necessary to divide each LOD level, that is, execute steps S404 - S408; when i is greater than M - 1, at this time, the division of each LOD has been completed, that is, execute step S409.

[0146] S404: When i is less than or equal to M - 1, for the i-th LOD level, shift the Morton code of the points in the point cloud to be partitioned to the right by N i bits, and store the shifted Morton code in a preset storage area;

[0147] S405: Determine the Morton code of the parent node corresponding to the current node in the i-th LOD level;

[0148] S406: According to the determined Morton code of the parent node, search for the neighbor nodes corresponding to the parent node in the preset storage area;

[0149] S407: Partition the current node into the i-th LOD level, and partition the neighbor nodes into the (i + 1)-th LOD level;

[0150] It should be noted that the preset storage area can be represented by inputMorton. Mainly before partitioning each LOD level, after shifting the Morton code of the points in the point cloud to be partitioned to the right, store it in inputMorton to facilitate subsequent querying of the corresponding neighbor nodes through the Morton code.

[0151] It should also be noted that before querying the corresponding neighbor nodes through the Morton code, it is also necessary to first determine the Morton code of the parent node corresponding to the current node in the i-th LOD level. Specifically, in some embodiments, for S405, the determination of the Morton code of the parent node corresponding to the current node in the i-th LOD level may include:

[0152] Based on the right shift number N corresponding to the i-th LOD level i , shift the Morton code of the current node in the i-th LOD level to the right;

[0153] Determine the shifted Morton code as the Morton code of the parent node corresponding to the current node in the i-th LOD level.

[0154] Here, the Morton code of the current node is represented by childrenMorton, and the Morton code of the parent node is represented by parentMorton. Then the corresponding relationship between the two is as follows:

[0155] parentMorton = childrenMorton >> N i (3)

[0156] That is to say, based on the right shift number N corresponding to the i-th LOD level i , the Morton code of the current node in the i-th LOD level (represented by childrenMorton) can be shifted to the right by N iBit processing is then performed, and the right-shifted Morton code is determined as the Morton code of the parent node corresponding to the current node in the i-th LOD level (denoted as parentMorton).

[0157] Further, after determining the Morton code of the parent node corresponding to the current node, the neighbor nodes corresponding to the parent node can be searched according to the Morton code of the parent node. Specifically, in some embodiments, for S406, the searching for the neighbor nodes corresponding to the parent node in the preset storage area according to the determined Morton code of the parent node may include:

[0158] Determine the Morton code of the neighbor nodes corresponding to the parent node according to the determined Morton code of the parent node;

[0159] Search for the neighbor nodes corresponding to the Morton code of the neighbor nodes in the preset storage area according to the Morton code of the neighbor nodes.

[0160] Further, the determining the Morton code of the neighbor nodes corresponding to the parent node according to the determined Morton code of the parent node may include:

[0161] Calculate the Morton codes of all neighbor nodes that are coplanar, collinear, and concurrent with the parent node according to the determined Morton code of the parent node, and obtain the Morton codes of the first number of neighbor nodes;

[0162] Compare the Morton codes of the first number of neighbor nodes with the Morton code of the current node respectively;

[0163] When the Morton code of the neighbor node is less than the Morton code of the current node, discard the Morton code of the neighbor node;

[0164] When the Morton code of the neighbor node is greater than or equal to the Morton code of the current node, retain the Morton code of the neighbor node to obtain the Morton codes of the second number of neighbor nodes; wherein, the second number is less than or equal to the first number;

[0165] Determine the Morton codes of the second number of neighbor nodes as the Morton codes of the neighbor nodes corresponding to the parent node.

[0166] It should be noted that after determining the Morton code of the parent node, the Morton codes of the nodes coplanar (a total of 6 neighbor nodes), collinear (a total of 12 neighbor nodes), and concurrent (a total of 8 neighbor nodes) with the parent node can be calculated. Together with the Morton code of the parent node itself, the Morton codes of the first quantity (such as 27) of neighbor nodes can be obtained in total. Since the LOD level division is performed in ascending order of the Morton code, at this time, the 27 neighbor nodes can be reduced to the second quantity (such as 20) of neighbor nodes. Specifically, the Morton codes of the 27 neighbor nodes are respectively compared with the Morton code of the current node. If the Morton code of a neighbor node is less than the Morton code of the current node, then the Morton code of this neighbor node can be discarded. For example, if there are 7 neighbor nodes whose Morton codes are less than the Morton code of the current node, then the Morton codes of these 7 neighbor nodes are removed, and the Morton codes of the remaining 20 neighbor nodes are greater than or equal to the Morton code of the current node, so only the Morton codes of the remaining 20 neighbor nodes are retained. Here, the remaining 20 neighbor nodes can include: the parent node corresponding to the current node, the coplanar neighbor nodes (3 neighbor nodes), the collinear neighbor nodes (9 neighbor nodes), and the concurrent neighbor nodes (7 neighbor nodes).

[0167] Exemplarily, refer to Figure 6 , which shows a schematic diagram of the spatial relationship between a current node and neighbor nodes provided by an embodiment of the present application. In Figure 6 , the bold-marked spatial block is the current node; as can be seen from Figure 6 , there are 6 neighbor nodes coplanar with this spatial block, 12 neighbor nodes collinear with this spatial block, and 8 neighbor nodes concurrent with this spatial block. Thus, according to the determined Morton code of the parent node, the Morton codes of the neighbor nodes corresponding to the parent node can be determined; the corresponding neighbor nodes can be searched in the preset storage area (inputMorton) using the Morton codes of the neighbor nodes.

[0168] In this way, for the i-th LOD level, after searching for neighbor nodes, the current node can be divided into the i-th LOD level, that is, put into the set O(k), and the neighbor nodes can be divided into the (i + 1)-th LOD level, that is, put into the set L(k); here, k is an integer greater than or equal to 0; thus, the division of the i-th LOD level can be realized.

[0169] Furthermore, in order to improve the effect of predicting the attributes of neighbor nodes, the centroid of the adjacent region can also be calculated, and then the point closest to the centroid can be used as the target node to predict neighbor nodes. Therefore, in some embodiments, after obtaining the Morton codes of the first quantity of neighbor nodes, the method may further include:

[0170] Based on the point cloud to be divided, determining the adjacent region corresponding to the current node in the i-th LOD level;

[0171] Calculate the centroid of the adjacent region, and select the node closest to the centroid from the current node and the first number of neighbor nodes as the target node;

[0172] Divide the target node into the i-th LOD level, and divide the remaining nodes into the i + 1-th LOD level.

[0173] It should be noted that the remaining nodes refer to the nodes other than the target node among the current node and the first number of neighbor nodes. In this way, according to the neighbor nodes of the parent node corresponding to the current node, the adjacent region corresponding to the current node in the i-th LOD level can be determined; then calculate the centroid of this adjacent region, and then select the node closest to this centroid from the current node and the first number of neighbor nodes as the target node; thus, divide the target node into the i-th LOD level, and divide the remaining nodes into the i + 1-th LOD level, which can also achieve the division of the i-th LOD level.

[0174] It should also be noted that after determining the adjacent region corresponding to the current node in the i-th LOD level according to the neighbor nodes of the parent node corresponding to the current node, the adjacent region can also be divided into different spatial regions, and then select the corresponding points from different spatial regions as the target nodes; thus, divide the target nodes into the i-th LOD level, and divide the remaining nodes into the i + 1-th LOD level, which can also achieve the division of the i-th LOD level; at the same time, since the adjacent region is further spatially divided, the prediction performance can be further improved.

[0175] S408: Update i according to i + 1, and return to judge whether i is less than or equal to M - 1;

[0176] S409: When i is greater than M - 1, determine the LOD levels corresponding to the division of the point cloud to be divided from the 0-th LOD level to the M - 1-th LOD level.

[0177] It should be noted that after the division of the i-th LOD level, i = i + 1 can be used to update the value of i, and then return to execute step S403, that is, judge whether i is less than or equal to M - 1; until the division of the M - 1-th LOD level is completed, that is, when i is equal to M, it indicates that the division of the LOD levels of the point cloud to be divided has been completed. At this time, the LOD levels corresponding to the division of the point cloud to be divided can be determined from the 0-th LOD level to the M - 1-th LOD level.

[0178] It should also be noted that after shifting the Morton codes of the points in the point cloud to be partitioned to the right, different sets can be obtained, that is, clustering the points in the point cloud to be partitioned, and partitioning the points in adjacent regions (i.e., relatively concentrated in space) in the space into the same set; then performing LOD level partitioning for each set. Specifically, in some embodiments, the method may further include:

[0179] Shifting the Morton codes of the points in the point cloud to be partitioned to the right to obtain multiple sets; wherein each set includes a part of the point cloud to be partitioned in the point cloud to be partitioned;

[0180] For each of the multiple sets, respectively perform the step of performing LOD level partitioning on the part of the point cloud to be partitioned included in each set.

[0181] That is to say, by adjusting the number of bits of right shift of the Morton codes of the points in the point cloud to be partitioned, the point cloud to be partitioned can be divided into multiple sets, and each set includes a part of the point cloud to be partitioned in the point cloud to be partitioned, that is, part of the points; for each set, the partitioning method of the embodiments of the present application is also used to search for the neighbor nodes of the corresponding parent node of the current node based on the Morton code, and this partitioning method can partition the point clouds in adjacent regions in the space into the same set, so as to further improve the prediction performance.

[0182] In the embodiments of the present application, the LOD level partitioning can be performed by using the method of finding neighbor nodes based on the Morton code. Specifically, whether it is by using the Morton code of the current node to search for the neighbor nodes of the corresponding parent node of the current node, that is, predicting the neighbor nodes according to the current node as the sampling point, or by using the Morton code of the current node to partition the adjacent regions in the point cloud space, that is, in order to partition the parts with similar spaces in the point cloud space to obtain different sets (or clustering), the effect of attribute prediction based on neighbor nodes can be improved, so as to improve the coding efficiency.

[0183] That is to say, by searching for the neighbor nodes corresponding to the parent node of the current node based on the Morton code and using the current node as a sampling point to predict the neighbor nodes, the spatial distribution characteristics of the point cloud and the spatial distance between the points in the point cloud can be comprehensively considered, which can improve the effect of attribute prediction based on neighbor nodes. That is to say, on the premise of basically not affecting the performance, the reconstruction quality of the attribute part can be improved, and the encoding and decoding time and computational complexity of the predicted attributes can also be reduced, thereby improving the encoding efficiency. Among them, the Peak Signal to Noise Ratio (PSNR) can be used as an objective standard for image evaluation, and the larger the PSNR, the better the image quality. The BD-rate can also be used as a parameter to measure the performance. When the BD-rate is negative, it means that under the same PSNR condition, the bit rate decreases and the performance improves. On this basis, if the absolute value of the BD-rate is larger, the greater the performance gain. As shown in Table 1, on the premise of basically not affecting the performance, the bit rate of the color channels (represented by U and V) of the attribute part can be reduced, resulting in a significant improvement in the BD-rate of the reconstructed point cloud.

[0184] Table 1

[0185]

[0186] The embodiment of the present application provides a partitioning method. By calculating the Morton code of the points in the point cloud to be partitioned based on the point cloud to be partitioned, and determining the right shift number N corresponding to the i-th level of detail (LOD) layer in the point cloud to be partitioned. i , where i is an integer greater than or equal to 0, and N i is an integer greater than 0. It is judged whether i is less than or equal to M - 1, where M represents the preset number of LOD partitions. When i is less than or equal to M - 1, for the i-th LOD layer, the Morton code of the points in the point cloud to be partitioned is right-shifted by N iShift the Morton code to the right by one bit and store the shifted Morton code in a preset storage area; determine the Morton code of the parent node corresponding to the current node in the $i$-th LOD level; search for the neighbor nodes corresponding to the parent node in the preset storage area according to the determined Morton code of the parent node; divide the current node into the $i$-th LOD level and divide the neighbor nodes into the $(i + 1)$-th LOD level; update $i$ according to $i+1$, and return to judge whether $i$ is less than or equal to $M - 1$; when $i$ is greater than $M - 1$, determine the LOD levels corresponding to the division of the to-be-divided point cloud from the 0-th LOD level to the $(M - 1)$-th LOD level; in this way, the technical solution of the present application no longer calculates the spatial distance between the current node and the neighbor nodes, but instead, when dividing the LOD levels each time, uses the Morton code to search for the neighbor nodes of the parent node corresponding to the current node, and uses the current node as a sampling point to predict the neighbor nodes. Therefore, not only the computational complexity is reduced, but also due to considering the spatial distribution characteristics of the point cloud, the accuracy of predicting the attributes of the neighbor nodes is improved, the reconstruction quality of the attribute part is improved, the coding bit overhead can be effectively reduced, and thus the encoding and decoding efficiency is improved.

[0187] Based on the same inventive concept as the foregoing embodiments, refer to Figure 7 , which shows a detailed flowchart of a partitioning method provided by an embodiment of the present application. As Figure 7 shown, when applied to an encoder or a decoder, the detailed process may include:

[0188] S701: Calculate the Morton codes of the points in the to-be-divided point cloud based on the to-be-divided point cloud;

[0189] S702: Sort the Morton codes of the points in the to-be-divided point cloud in ascending order;

[0190] It should be noted that for the to-be-divided point cloud, assume that the to-be-divided point cloud contains $N$ points, each point is represented as $P$ i , and the Morton code corresponding to each point $P$ i is $M$ i , where $i = 0, 1, 2, \ldots, N - 1$. That is to say, the Morton codes corresponding to the points in the to-be-divided point cloud can be calculated first (which can be represented by packVoxel); then, the Morton codes of the points in the to-be-divided point cloud are sorted in ascending order from small to large, and the sorted Morton codes are determined as the Morton codes of the points in the to-be-divided point cloud.

[0191] S703: Judge whether lodindex < lodcount;

[0192] It should be noted that lodindex represents the number of the current LOD layer being processed, for example, the lodindex-th LOD layer; lodcount represents the total number of layers for partitioning the point cloud set in advance; here, lodcount is an integer greater than 0, and lodindex is an integer greater than or equal to 0 and less than or equal to lodcount - 1.

[0193] It should also be noted that when lodindex < lodcount, that is, the judgment result is yes, step S704 can be executed at this time; when lodindex ≥ lodcount, that is, the judgment result is no, the process can be ended at this time.

[0194] S704: If the judgment result is yes, then judge whether lodindex == 0;

[0195] S705: If the judgment result is yes, then calculate the initial right shift number N of the Morton code of the points in the point cloud set to be partitioned;

[0196] S706: If the judgment result is no, then N curlod = N lastlod + 3, and set N curlod as N;

[0197] It should be noted that N curlod represents the right shift number corresponding to the current LOD layer being processed, and N lastlod represents the right shift number corresponding to the previous LOD layer being processed; for example, the initial right shift number corresponding to the 0th LOD layer is 4, then the right shift number corresponding to the 1st LOD layer is 7, the right shift number corresponding to the 2nd LOD layer is 10, the right shift number corresponding to the 3rd LOD layer is 13, and so on. By analogy, the right shift number corresponding to each LOD layer can be obtained.

[0198] In this way, when lodindex < lodcount, it is also necessary to further judge whether lodindex is equal to 0; if lodindex is equal to 0, that is, the judgment result is yes, step S705 can be executed at this time, that is, calculate the initial right shift number N of the Morton code of the points in the point cloud set to be partitioned; if lodindex is not equal to 0, that is, the judgment result is no, step S706 can be executed at this time, that is, N curlod = N lastlod + 3, and then set N curlod as N for subsequent execution of step S707.

[0199] S707: Right shift the Morton code of the points in the point cloud set to be partitioned by N bits, and store the right-shifted Morton code in inputMorton;

[0200] S708: Determine whether pointindex < inputMorton.size;

[0201] It should be noted that pointindex represents the index number of the current node within inputMorton, and inputMorton.size represents the length of inputMorton. Thus, when pointindex < inputMorton.size, that is, when the judgment result is yes, it indicates that the current node is still in the lodindex-th LOD level. At this time, step S709 needs to be executed; while when pointindex ≥ inputMorton.size, that is, when the judgment result is no, it indicates that the current node is no longer in the lodindex-th LOD level. At this time, step S710 needs to be executed.

[0202] S709: If the judgment result is yes, add the current node to the set O(lodindex), and add the neighbor node corresponding to the current node to the set L(lodindex);

[0203] S710: pointindex = pointindex + 1, and return to execute step S708;

[0204] S711: If the judgment result is no, then lodindex = lodindex + 1, and return to execute step S703.

[0205] It should be noted that when pointindex < inputMorton.size, the current node is added to the set O(lodindex) at this time, that is, the current node is divided into the lodindex-th LOD layer; at the same time, the neighbor nodes corresponding to the current node are added to the set L(lodindex), that is, the neighbor nodes corresponding to the current node are divided into the (lodindex + 1)-th LOD layer; then pointindex = pointindex + 1, and return to execute step S708 until pointindex = inputMorton.size - 1, which realizes the division of the lodindex-th LOD layer. Further, when pointindex ≥ inputMorton.size, it indicates that the division of the lodindex-th LOD layer is completed. At this time, lodindex = lodindex + 1, and return to execute step S703 until lodindex = lodcount - 1 to realize the division of the (lodcount - 1)-th LOD layer; thus, the LOD division of the point cloud to be divided is realized; here, the 0-th LOD layer to the (lodcount - 1)-th LOD layer are determined as the LOD layers corresponding to the division of the point cloud to be divided.

[0206] Specifically, the Morton codes of K sampling points can be obtained by sampling the sorted Morton codes of the point cloud to be divided, and by performing a right shift operation on the Morton codes of these K sampling points, the initial right shift bit number N corresponding to the point cloud to be divided can be obtained, and further the right shift bit number corresponding to each LOD layer can be determined. Then when dividing each LOD layer, the Morton code of the point in the input point cloud to be divided is right shifted by N bits, and the right shifted Morton code is stored in inputMorton. At this time, the Morton code of the parent node corresponding to the current node can be calculated, and the Morton codes of its neighbor nodes can be calculated through the parent node. Finally, the neighbor nodes corresponding to the Morton codes of the neighbor nodes can be found in inputMorton, so that the current node is divided into O(lodindex), and at the same time, the found neighbor nodes are divided into L(lodindex).

[0207] In the embodiment of the present application, it is not necessary to calculate the spatial distance between the current point and the neighbor points. Generally speaking, it can be considered that the neighbor points in the space that belong to the same parent node as the current node and are coplanar, collinear, or concurrent with the current node have a very close spatial distance to the current node and can be regarded as belonging to the same adjacent region. At this time, the neighbor points of the parent node corresponding to the current node can be queried based on the Morton code. Compared with the existing solution of querying neighbor points based on different distance thresholds, the partitioning method of the embodiment of the present application does not require setting different threshold parameters and does not need to calculate the spatial distance between points each time, thus greatly reducing the computational complexity.

[0208] Furthermore, in the embodiment of the present application, each time the LOD layer is partitioned, since it is only necessary to judge the neighbor points of the parent node corresponding to the current node, and add the current node to the set O(k), and add the neighbor points corresponding to the current node to the set L(k), it is no longer just considering the spatial geometric distance between points, but also taking into account the spatial distribution characteristics of the point cloud on the basis of the spatial distribution. That is, by comprehensively considering the spatial geometric distance of points in the space and the spatial distribution characteristics of the point cloud in the space, the prediction performance can be improved, and better encoding and decoding performance can also be obtained. It should be particularly noted that the partitioning method of the embodiment of the present application only samples by searching for the neighbor points of the current node based on the Morton code of the original point cloud. Compared with the original partitioning method of finding the nearest neighbor within a certain range through the index of the Morton code each time, the computational complexity is greatly reduced.

[0209] This embodiment provides a partitioning method, which is applied to an encoder or a decoder. Through the above embodiments, the specific implementation of the foregoing embodiments is elaborated in detail. It can be seen from this that the technical solution of the present application no longer calculates the spatial distance between the current node and the neighbor nodes, but each time the LOD layer is partitioned, the Morton code is used to search for the neighbor points of the parent node corresponding to the current node, and the current node is used as a sampling point to predict the neighbor nodes. Thus, not only the computational complexity is reduced, but also due to considering the spatial distribution characteristics of the point cloud, the accuracy of predicting the attributes of the neighbor nodes is improved, the reconstruction quality of the attribute part is improved, the coding bit overhead can be effectively reduced, and thus the encoding and decoding efficiency is improved.

[0210] Based on the same inventive concept as the foregoing embodiments, refer to Figure 8 which shows a schematic structural diagram of an encoder 80 provided by an embodiment of the present application. As Figure 8 shown, the encoder 80 may include a first calculation unit 801, a first determination unit 802, a first judgment unit 803, a first right shift unit 804, a first search unit 805, and a first partitioning unit 806, where

[0211] The first calculation unit 801 is configured to calculate the Morton code of the points in the point cloud to be partitioned based on the point cloud to be partitioned;

[0212] The first determination unit 802 is configured to determine the number of bits N to be right-shifted corresponding to the i-th level of detail (LOD) layer in the point cloud to be partitioned; i where i is an integer greater than or equal to 0, and N i is an integer greater than 0;

[0213] The first judgment unit 803 is configured to judge whether i is less than or equal to M - 1; where M represents the preset number of layers for LOD partitioning;

[0214] The first right-shift unit 804 is configured to, when i is less than or equal to M - 1, for the i-th LOD layer, right-shift the Morton code of the points in the point cloud to be partitioned by N i bits, and store the right-shifted Morton code in a preset storage area;

[0215] The first determination unit 802 is further configured to determine the Morton code of the parent node corresponding to the current node in the i-th LOD layer;

[0216] The first search unit 805 is configured to search for the neighbor nodes corresponding to the parent node in the preset storage area according to the determined Morton code of the parent node;

[0217] The first partitioning unit 806 is configured to partition the current node into the i-th LOD layer and partition the neighbor nodes into the (i + 1)-th LOD layer;

[0218] The first judgment unit 803 is further configured to update i according to i + 1 and return to judge whether i is less than or equal to M - 1;

[0219] The first determination unit 802 is further configured to, when i is greater than M - 1, determine the 0-th LOD layer to the (M - 1)-th LOD layer as the LOD layers corresponding to the partition of the point cloud to be partitioned.

[0220] In the above solution, referring to Figure 8 , the encoder 80 may further include a first sorting unit 807, configured to sort the Morton codes of the points in the point cloud to be partitioned according to a preset sorting strategy, and determine the sorted Morton codes as the Morton codes of the points in the point cloud to be partitioned.

[0221] In the above solution, referring to Figure 8 , the encoder 80 may further include a first sampling unit 808, configured to sample the sorted Morton codes to obtain the Morton codes of K sampling points; where K is an integer greater than 0;

[0222] The first right shift unit 804 is further configured to perform a right shift process on the Morton codes of the K sampling points to obtain the K sampling points corresponding to the right-shifted Morton codes.

[0223] The first determination unit 803 is further configured to determine whether each of the K sampling points corresponding to the right-shifted Morton codes has at least one neighbor node on average; and if each of the K sampling points corresponding to the right-shifted Morton codes does not have at least one neighbor node on average, continue to perform the step of performing a right shift process on the Morton codes of the K sampling points; and if each of the K sampling points corresponding to the right-shifted Morton codes has at least one neighbor node on average, obtain the number of right shift bits of the K sampling points, and determine the number of right shift bits as the initial number of right shift bits of the Morton code of the point in the point cloud to be divided; wherein, the initial number of right shift bits represents the number of right shift bits N0 corresponding to the Morton code of the point in the point cloud to be divided at the 0th LOD level.

[0224] In the above solution, referring to Figure 8 , the encoder 80 may further include a first analysis unit 809, configured to perform characteristic analysis on the point cloud to be divided to determine the value of K.

[0225] In the above solution, the first determination unit 802 is further configured to determine the maximum Morton code and the minimum Morton code based on the sorted Morton codes;

[0226] The first calculation unit 801 is further configured to calculate the difference between the maximum Morton code and the minimum Morton code;

[0227] The first right shift unit 804 is further configured to perform a right shift process on the difference, and when the right-shifted difference satisfies a preset range, obtain the number of right shift bits of the difference;

[0228] The first determination unit 802 is further configured to determine the number of right shift bits as the initial number of right shift bits of the point cloud to be divided.

[0229] In the above solution, the first determination unit 802 is further configured to, when i is not equal to 0, use a first preset calculation model to determine the number of right shift bits Ni corresponding to the ith LOD level in the point cloud to be divided i .

[0230] In the above solution, the first determination unit 802 is specifically configured to obtain the number of right shift bits Ni−1 corresponding to the (i−1)th LOD level; i-1 and add the number of right shift bits Ni−1 corresponding to the (i−1)th LOD level i-1 to a preset value to obtain a superimposed value; and determine the superimposed value as the number of right shift bits Ni corresponding to the ith LOD level. i .

[0231] In the above solution, the first analysis unit 809 is further configured to perform characteristic analysis on the point cloud to be partitioned to determine the preset value.

[0232] In the above solution, the preset value is equal to 3.

[0233] In the above solution, the first right shift unit 804 is further configured to perform a right shift process on the Morton code of the current node in the i-th LOD layer based on the right shift number N corresponding to the i-th LOD layer i , and perform a right shift process on the Morton code of the current node in the i-th LOD layer;

[0234] The first determination unit 802 is further configured to determine the Morton code of the parent node corresponding to the current node in the i-th LOD layer as the Morton code after the right shift.

[0235] In the above solution, the first determination unit 802 is further configured to determine the Morton code of the neighbor node corresponding to the parent node according to the determined Morton code of the parent node;

[0236] The first search unit 805 is specifically configured to search for the neighbor node corresponding to the Morton code of the neighbor node in the preset storage area according to the Morton code of the neighbor node.

[0237] In the above solution, the first calculation unit 801 is further configured to calculate the Morton codes of all neighbor nodes coplanar, collinear, and concurrent with the determined parent node according to the determined Morton code of the parent node, and obtain the Morton codes of the first number of neighbor nodes;

[0238] The first determination unit 802 is specifically configured to compare the Morton codes of the first number of neighbor nodes with the Morton code of the current node respectively; and when the Morton code of the neighbor node is less than the Morton code of the current node, discard the Morton code of the neighbor node; and when the Morton code of the neighbor node is greater than or equal to the Morton code of the current node, retain the Morton code of the neighbor node to obtain the Morton codes of the second number of neighbor nodes; where the second number is less than or equal to the first number; and determine the Morton codes of the second number of neighbor nodes as the Morton codes of the neighbor nodes corresponding to the parent node.

[0239] In the above solution, the first determination unit 802 is further configured to determine the adjacent region corresponding to the current node in the i-th LOD layer based on the point cloud to be partitioned;

[0240] The first calculation unit 801 is further configured to calculate the centroid of the adjacent region, and select the node closest to the centroid from the current node and the first number of neighbor nodes as the target node;

[0241] The first division unit 806 is further configured to divide the target node into the i-th LOD layer and divide the remaining nodes into the (i + 1)-th LOD layer; where the remaining nodes represent the current node and the nodes other than the target node among the first number of neighbor nodes.

[0242] In the above solution, the first right shift unit 804 is further configured to perform a right shift process on the Morton codes of the points in the point cloud to be divided, to obtain a plurality of sets; where each set includes a part of the point cloud to be divided in the point cloud to be divided.

[0243] The first division unit 806 is further configured to, for each set in the plurality of sets, respectively perform the step of dividing the part of the point cloud to be divided included in each set into LOD layers.

[0244] It can be understood that, in this embodiment, the "unit" may be a part of a circuit, a part of a processor, a part of a program or software, etc. Of course, it may also be a module or non-modular. Moreover, the components in this embodiment may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit. The above integrated unit may be implemented in the form of hardware or in the form of a software functional module.

[0245] If the integrated unit is implemented in the form of a software functional module and is not sold or used as an independent product, it may be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of this embodiment, in essence, or the part that contributes to the prior art, or all or part of this technical solution, may be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the method described in this embodiment. The foregoing storage medium includes: various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc that can store program codes.

[0246] Therefore, this embodiment provides a computer storage medium, which is applied to the encoder 80. The computer storage medium stores a division program, and when the division program is executed by a first processor, it implements the method described in any one of the foregoing embodiments.

[0247] Based on the composition of the above encoder 80 and the computer storage medium, refer to Figure 9, which shows the specific hardware structure of the encoder 80 provided by the embodiments of the present application, may include: a first communication interface 901, a first memory 902, and a first processor 903; each component is coupled together through a first bus system 904. It can be understood that the first bus system 904 is used to realize the connection and communication between these components. In addition to the data bus, the first bus system 904 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clear illustration, in Figure 9 all kinds of buses are labeled as the first bus system 904. Among them,

[0248] The first communication interface 901 is used for receiving and sending signals during the process of receiving and sending information with other external network elements;

[0249] The first memory 902 is used to store a computer program that can run on the first processor 903;

[0250] The first processor 903 is used to execute, when running the computer program:

[0251] Based on the point cloud to be partitioned, calculate the Morton code of the points in the point cloud to be partitioned;

[0252] Determine the right shift number N corresponding to the i-th level of detail (LOD) layer in the point cloud to be partitioned; i ; where i is an integer greater than or equal to 0, and N i is an integer greater than 0;

[0253] Judge whether i is less than or equal to M - 1; where M represents the preset number of layers for LOD partitioning;

[0254] When i is less than or equal to M - 1, for the i-th LOD layer, right shift the Morton code of the points in the point cloud to be partitioned by N i bits, and store the right-shifted Morton code in a preset storage area;

[0255] Determine the Morton code of the parent node corresponding to the current node in the i-th LOD layer;

[0256] According to the determined Morton code of the parent node, search for the neighbor nodes corresponding to the parent node in the preset storage area;

[0257] Partition the current node into the i-th LOD layer, and partition the neighbor nodes into the (i + 1)-th LOD layer;

[0258] Update i according to i + 1, and return to judge whether i is less than or equal to M - 1;

[0259] When i is greater than M - 1, determine the 0-th LOD layer to the (M - 1)-th LOD layer as the LOD layers corresponding to the partition of the point cloud to be partitioned.

[0260] It can be understood that the first memory 902 in the embodiments of the present application may be a volatile memory, a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchlink dynamic random access memory (SLDRAM), and direct rambus random access memory (DRRAM). The first memory 902 of the systems and methods described in the present application is intended to include but not be limited to these and any other suitable types of memories.

[0261] The first processor 903 may be an integrated circuit chip with signal processing capabilities. In the implementation process, the steps of the above method can be completed by the integrated logic circuit of the hardware in the first processor 903 or the instructions in the form of software. The above-mentioned first processor 903 may be a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as being executed and completed by a hardware decoding processor, or executed and completed by a combination of hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, register, etc. This storage medium is located in the first memory 902, and the first processor 903 reads the information in the first memory 902 and combines its hardware to complete the steps of the above method.

[0262] It can be understood that the embodiments described in the present application can be implemented using hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in the present application, or a combination thereof. For software implementation, the techniques described in the present application can be implemented by modules (such as procedures, functions, etc.) that execute the functions described in the present application. The software code can be stored in a memory and executed by a processor. The memory can be implemented inside or outside the processor.

[0263] Optionally, as another embodiment, the first processor 903 is further configured to execute the method described in any one of the foregoing embodiments when running the computer program.

[0264] This embodiment provides an encoder, which may include a first calculation unit, a first determination unit, a first judgment unit, a first right shift unit, a first search unit, and a first division unit; wherein, the first calculation unit is configured to calculate the Morton code of the points in the point cloud to be divided based on the point cloud to be divided; the first determination unit is configured to determine the right shift number N corresponding to the i-th level of detail (LOD) layer in the point cloud to be divided i ; where i is an integer greater than or equal to 0, and N i is an integer greater than 0; the first judgment unit is configured to judge whether i is less than or equal to M - 1; where M represents the preset number of layers for LOD division; the first right shift unit is configured to, when i is less than or equal to M - 1, for the i-th LOD layer, right shift the Morton code of the points in the point cloud to be divided by N i bits, and store the right-shifted Morton code in a preset storage area; the first determination unit is further configured to determine the Morton code of the parent node corresponding to the current node in the i-th LOD layer; the first search unit is configured to search for the neighbor node corresponding to the parent node in the preset storage area according to the determined Morton code of the parent node; the first division unit is configured to divide the current node into the i-th LOD layer and divide the neighbor node into the i + 1-th LOD layer; the first judgment unit is further configured to update i according to i + 1, and return to judge whether i is less than or equal to M - 1; the first determination unit is further configured to, when i is greater than M - 1, determine the 0-th LOD layer to the M - 1-th LOD layer as the LOD layers corresponding to the division of the point cloud to be divided. In this way, the technical solution of the present application no longer calculates the spatial distance between the current node and the neighbor node, but instead, each time the LOD layer is divided, the Morton code is used to search for the neighbor node of the parent node corresponding to the current node, and the current node is used as a sampling point to predict the neighbor node. This not only reduces the computational complexity, but also improves the accuracy of predicting the attributes of the neighbor node and the reconstruction quality of the attribute part because the spatial distribution characteristics of the point cloud are considered, effectively reducing the coding bit overhead, and thus improving the encoding and decoding efficiency.

[0265] Based on the same inventive concept as the foregoing embodiments, refer to Figure 10 , which shows a schematic structural diagram of a decoder 100 provided in an embodiment of the present application. As Figure 10 shown, the decoder 100 may include a second calculation unit 1001, a second determination unit 1002, a second judgment unit 1003, a second right shift unit 1004, a second search unit 1005, and a second division unit 1006, where

[0266] A second calculation unit 1001, configured to calculate the Morton code of points in the point cloud to be partitioned based on the point cloud to be partitioned;

[0267] A second determination unit 1002, configured to determine the number of right shift bits N corresponding to the i-th level of detail (LOD) layer in the point cloud to be partitioned; i ; where i is an integer greater than or equal to 0, and N i is an integer greater than 0;

[0268] A second judgment unit 1003, configured to judge whether i is less than or equal to M - 1; where M represents the preset number of layers for LOD partitioning;

[0269] A second right shift unit 1004, configured to, when i is less than or equal to M - 1, for the i-th LOD layer, right shift the Morton code of points in the point cloud to be partitioned by N i bits, and store the right-shifted Morton code in a preset storage area;

[0270] The second determination unit 1002 is further configured to determine the Morton code of the parent node corresponding to the current node in the i-th LOD layer;

[0271] A second search unit 1005, configured to search for the neighbor node corresponding to the parent node in the preset storage area according to the determined Morton code of the parent node;

[0272] A second partitioning unit 1006, configured to partition the current node into the i-th LOD layer, and partition the neighbor node into the (i + 1)-th LOD layer;

[0273] The second judgment unit 1003 is further configured to update i according to i + 1, and return to judge whether i is less than or equal to M - 1;

[0274] The second determination unit 1002 is further configured to, when i is greater than M - 1, determine the 0-th LOD layer to the (M - 1)-th LOD layer as the LOD layers corresponding to the partition of the point cloud to be partitioned.

[0275] In the above solution, referring to Figure 10 , the decoder 100 may further include a second sorting unit 1007, configured to sort the Morton codes of points in the point cloud to be partitioned according to a preset sorting strategy, and determine the sorted Morton code as the Morton code of points in the point cloud to be partitioned.

[0276] In the above solution, referring to Figure 10 , the decoder 100 may further include a second sampling unit 1008, configured to sample the sorted Morton code to obtain the Morton codes of K sampling points; where K is an integer greater than 0;

[0277] The second right shift unit 1004 is further configured to perform a right shift process on the Morton codes of the K sampling points to obtain the K sampling points corresponding to the right-shifted Morton codes.

[0278] The second determination unit 1003 is further configured to determine whether each of the K sampling points corresponding to the right-shifted Morton codes has at least one neighbor node on average; and if each of the K sampling points corresponding to the right-shifted Morton codes does not have at least one neighbor node on average, continue to perform the step of performing a right shift process on the Morton codes of the K sampling points; and if each of the K sampling points corresponding to the right-shifted Morton codes has at least one neighbor node on average, obtain the number of right shift bits of the K sampling points, and determine the number of right shift bits as the initial right shift bits of the Morton codes of the points in the to-be-partitioned point cloud; wherein, the initial right shift bits represent the right shift bits N0 corresponding to the Morton codes of the points in the to-be-partitioned point cloud at the 0th LOD level.

[0279] In the above solution, referring to Figure 10 , the decoder 100 may further include a second analysis unit 1009, configured to perform characteristic analysis on the to-be-partitioned point cloud to determine the value of K.

[0280] In the above solution, the second determination unit 1002 is further configured to determine the maximum Morton code and the minimum Morton code based on the sorted Morton codes.

[0281] The second calculation unit 1001 is further configured to calculate the difference between the maximum Morton code and the minimum Morton code.

[0282] The second right shift unit 1004 is further configured to perform a right shift process on the difference, and when the right-shifted difference satisfies a preset range, obtain the number of right shift bits of the difference.

[0283] The second determination unit 1002 is further configured to determine the number of right shift bits as the initial right shift bits of the to-be-partitioned point cloud.

[0284] In the above solution, the second determination unit 1002 is further configured to, when i is not equal to 0, use a first preset calculation model to determine the right shift bits N corresponding to the ith LOD level in the to-be-partitioned point cloud i .

[0285] In the above solution, the second determination unit 1002 is specifically configured to obtain the right shift bits N corresponding to the (i - 1)th LOD level i-1 ; and add the right shift bits N corresponding to the (i - 1)th LOD level i-1 to a preset value to obtain a superimposed value; and determine the superimposed value as the right shift bits N corresponding to the ith LOD level i .

[0286] In the above solution, the second analysis unit 1009 is further configured to perform characteristic analysis on the point cloud to be partitioned to determine the preset value.

[0287] In the above solution, the preset value is equal to 3.

[0288] In the above solution, the second right shift unit 1004 is further configured to perform a right shift process on the Morton code of the current node in the i-th LOD layer based on the right shift bit number N i corresponding to the i-th LOD layer.

[0289] The second determination unit 1002 is further configured to determine the Morton code of the parent node corresponding to the current node in the i-th LOD layer as the Morton code after the right shift.

[0290] In the above solution, the second determination unit 1002 is further configured to determine the Morton code of the neighbor node corresponding to the parent node according to the determined Morton code of the parent node.

[0291] The second search unit 1005 is specifically configured to search for the neighbor node corresponding to the Morton code of the neighbor node in the preset storage area according to the Morton code of the neighbor node.

[0292] In the above solution, the second calculation unit 1001 is further configured to calculate the Morton codes of all neighbor nodes coplanar, collinear, and concurrent with the determined parent node according to the determined Morton code of the parent node, and obtain the Morton codes of the first number of neighbor nodes.

[0293] The second determination unit 1002 is specifically configured to compare the Morton codes of the first number of neighbor nodes with the Morton code of the current node respectively; and discard the Morton code of the neighbor node when the Morton code of the neighbor node is less than the Morton code of the current node; and retain the Morton code of the neighbor node when the Morton code of the neighbor node is greater than or equal to the Morton code of the current node to obtain the Morton codes of the second number of neighbor nodes, where the second number is less than or equal to the first number; and determine the Morton codes of the second number of neighbor nodes as the Morton codes of the neighbor nodes corresponding to the parent node.

[0294] In the above solution, the second determination unit 1002 is further configured to determine the adjacent region corresponding to the current node in the i-th LOD layer based on the point cloud to be partitioned.

[0295] The second calculation unit 1001 is further configured to calculate the centroid of the adjacent region, and select the node closest to the centroid from the current node and the first number of neighbor nodes as the target node.

[0296] The second partitioning unit 1006 is further configured to partition the target node into the i-th LOD layer and partition the remaining nodes into the (i + 1)-th LOD layer; where the remaining nodes represent the current node and the nodes other than the target node among the first number of neighbor nodes.

[0297] In the above solution, the second right-shifting unit 1004 is further configured to perform a right-shifting process on the Morton codes of the points in the point cloud to be partitioned, obtaining a plurality of sets; where each set includes a part of the point cloud to be partitioned in the point cloud to be partitioned.

[0298] The second partitioning unit 1006 is further configured to, for each set in the plurality of sets, respectively perform the step of partitioning the part of the point cloud to be partitioned included in each set into LOD layers.

[0299] It can be understood that, in this embodiment, a "unit" may be a part of a circuit, a part of a processor, a part of a program or software, etc. Of course, it may also be a module or non-modular. Moreover, the components in this embodiment may be integrated in one processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit. The above integrated unit may be implemented in the form of hardware or in the form of a software function module.

[0300] When the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it may be stored in a computer-readable storage medium. Based on such an understanding, this embodiment provides a computer storage medium, which is applied to the decoder 100. The computer storage medium stores a partitioning program, and when the partitioning program is executed by the second processor, it implements the method described in any one of the foregoing embodiments.

[0301] Based on the composition of the above decoder 100 and the computer storage medium, refer to Figure 11 , which shows the specific hardware structure of the decoder 100 provided in the embodiment of the present application. It may include: a second communication interface 1101, a second memory 1102, and a second processor 1103; each component is coupled together through a second bus system 1104. It can be understood that the second bus system 1104 is used to realize the connection and communication between these components. The second bus system 1104 includes, in addition to a data bus, a power bus, a control bus, and a status signal bus. However, for the sake of clear description, in Figure 11 all kinds of buses are labeled as the second bus system 1104. Among them,

[0302] The second communication interface 1101 is used for receiving and sending signals during the process of receiving and sending information between it and other external network elements.

[0303] A second memory 1102 for storing a computer program that can run on a second processor 1103;

[0304] A second processor 1103 for, when running the computer program, performing:

[0305] Calculating the Morton code of points in the point cloud to be partitioned based on the point cloud to be partitioned;

[0306] Determining the number of right shift bits N corresponding to the i-th level of detail LOD layer in the point cloud to be partitioned; i ; where i is an integer greater than or equal to 0, and N i is an integer greater than 0;

[0307] Judging whether i is less than or equal to M - 1; where M represents the preset number of levels of LOD partitioning;

[0308] When i is less than or equal to M - 1, for the i-th LOD layer, right shift the Morton code of the points in the point cloud to be partitioned by N i bits, and store the right-shifted Morton code in a preset storage area;

[0309] Determining the Morton code of the parent node corresponding to the current node in the i-th LOD layer;

[0310] Searching for the neighbor node corresponding to the parent node in the preset storage area according to the determined Morton code of the parent node;

[0311] Partitioning the current node into the i-th LOD layer and partitioning the neighbor node into the i + 1-th LOD layer;

[0312] Updating i according to i + 1, and returning to judge whether i is less than or equal to M - 1;

[0313] When i is greater than M - 1, determining the 0-th LOD layer to the M - 1-th LOD layer as the LOD layers corresponding to the partition of the point cloud to be partitioned.

[0314] Optionally, as another embodiment, the second processor 1103 is further configured to, when running the computer program, perform the method described in any one of the foregoing embodiments.

[0315] It can be understood that the hardware functions of the second memory 1102 and the first memory 902 are similar, and the hardware functions of the second processor 1103 and the first processor 903 are similar; details are not described here again.

[0316] This embodiment provides a decoder, which may include a second calculation unit, a second determination unit, a second judgment unit, a second right shift unit, a second search unit, and a second partitioning unit; wherein, the second calculation unit is configured to calculate the Morton code of the points in the point cloud to be partitioned based on the point cloud to be partitioned; the second determination unit is configured to determine the right shift number N corresponding to the i-th level of detail (LOD) layer in the point cloud to be partitioned i ; where i is an integer greater than or equal to 0, and N i is an integer greater than 0; the second judgment unit is configured to judge whether i is less than or equal to M - 1; where M represents the preset number of LOD partitioning layers; the second right shift unit is configured to, when i is less than or equal to M - 1, for the i-th LOD layer, right shift the Morton code of the points in the point cloud to be partitioned by N i bits, and store the right-shifted Morton code in a preset storage area; the second determination unit is further configured to determine the Morton code of the parent node corresponding to the current node in the i-th LOD layer; the second search unit is configured to search for the neighbor node corresponding to the parent node in the preset storage area according to the determined Morton code of the parent node; the second partitioning unit is configured to partition the current node into the i-th LOD layer and partition the neighbor node into the (i + 1)-th LOD layer; the second judgment unit is further configured to update i according to i + 1 and return to judge whether i is less than or equal to M - 1; the second determination unit is further configured to, when i is greater than M - 1, determine the 0-th LOD layer to the (M - 1)-th LOD layer as the LOD layers corresponding to the partition of the point cloud to be partitioned. In this way, the technical solution of this application no longer calculates the spatial distance between the current node and the neighbor node, but instead, each time the LOD layer is partitioned, the Morton code is used to search for the neighbor node of the parent node corresponding to the current node, and the current node is used as a sampling point to predict the neighbor node. Therefore, not only the calculation complexity is reduced, but also due to considering the spatial distribution characteristics of the point cloud, the accuracy of predicting the attributes of the neighbor node is improved, the reconstruction quality of the attribute part is improved, the coding bit overhead can be effectively reduced, and thus the encoding and decoding efficiency is improved

[0317] It should be noted that in this application, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, article or device including the element

[0318] The serial numbers of the embodiments of the present application above are only for description and do not represent the superiority or inferiority of the embodiments

[0319] In the method embodiments provided in this application, the methods disclosed can be arbitrarily combined without conflict to obtain new method embodiments.

[0320] In the product embodiments provided in this application, the features disclosed can be arbitrarily combined without conflict to obtain new product embodiments.

[0321] In the method or device embodiments provided in this application, the features disclosed can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.

[0322] As described above, the above is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed in this application can easily think of changes or substitutions, which should be covered within the protection scope of this application. Therefore, the protection scope of this application shall be subject to the protection scope of the claims.

[0323] Industrial applicability

[0324] In the embodiment of this application, the method is applied to an encoder. By calculating the Morton code of the points in the point cloud to be partitioned based on the point cloud to be partitioned; determining the right shift number N corresponding to the i-th level of detail (LOD) layer in the point cloud to be partitioned i , where i is an integer greater than or equal to 0, and N i is an integer greater than 0; determining whether i is less than or equal to M - 1, where M represents the preset number of LOD partitions; when i is less than or equal to M - 1, for the i-th LOD layer, shifting the Morton code of the points in the point cloud to be partitioned to the right by N i bits, and storing the right-shifted Morton code in a preset storage area; determining the Morton code of the parent node corresponding to the current node in the i-th LOD layer; searching for the neighbor node corresponding to the parent node in the preset storage area according to the determined Morton code of the parent node; partitioning the current node into the i-th LOD layer and partitioning the neighbor node into the (i + 1)-th LOD layer; updating i according to i + 1, and returning to determine whether i is less than or equal to M - 1; when i is greater than M - 1, determining the 0-th LOD layer to the (M - 1)-th LOD layer as the LOD layers corresponding to the partition of the point cloud to be partitioned; in this way, the technical solution of this application no longer calculates the spatial distance between the current node and the neighbor node, but instead, each time an LOD layer is partitioned, the Morton code is used to search for the neighbor node corresponding to the parent node of the current node, and the current node is used as a sampling point to predict the neighbor node. Therefore, not only the computational complexity is reduced, but also due to considering the spatial distribution characteristics of the point cloud, the accuracy of predicting the attributes of the neighbor node is improved, the reconstruction quality of the attribute part is improved, the coding bit overhead can be effectively reduced, and thus the encoding and decoding efficiency is improved.

Claims

1. A partitioning method, applied to an encoder, the method comprising: Based on the point cloud to be partitioned, determining the position information of the points in the point cloud to be partitioned; Determine the number of right shift bits N corresponding to the i-th level of detail LOD layer in the point cloud to be partitioned i ; where i is an integer greater than or equal to 0, and N i is an integer greater than 0, and M represents the maximum preset number of LOD partitions; For the i-th LOD level, shift the position information of the points in the point cloud to be partitioned to the right by N i bits, and store them in a preset storage area based on the shifted position information; Determining the position information of the parent point corresponding to the current point in the i-th LOD level; According to the determined position information of the parent point, searching for the neighbor points corresponding to the parent point in the preset storage area; Partitioning the current point into the (i + 1)-th LOD level, or partitioning the neighbor points into the i-th LOD level.

2. The method according to claim 1, wherein, The method further comprises: Sorting the position information of the points in the point cloud to be partitioned according to a preset sorting strategy, and determining the sorted position information as the position information of the points in the point cloud to be partitioned.

3. The method according to claim 2, wherein, The method further comprises: Based on the sorted position information, determining the maximum position information and the minimum position information; Calculating the difference between the maximum position information and the minimum position information; Performing a right shift operation on the difference, and when the right-shifted difference satisfies a preset range, obtaining the number of right shift bits of the difference; Determining the number of right shift bits as the initial number of right shift bits of the point cloud to be partitioned.

4. The method according to claim 1, wherein, Determining the number of bits N for right shift corresponding to the i-th LOD level in the point cloud to be partitioned i , includes: Determine the right shift number N corresponding to the i-th LOD level in the point cloud to be partitioned by using the first pre-designed calculation model i .

5. The method according to claim 1, wherein, The determining the position information of the parent point corresponding to the current point in the i-th LOD level includes: Based on the right shift number N corresponding to the i-th LOD level i , perform a right shift process on the position information of the current point in the i-th LOD level; Determining the right-shifted position information as the position information of the parent point corresponding to the current point in the i-th LOD level.

6. The method according to claim 1, wherein The searching for the neighbor points corresponding to the parent point in the preset storage area according to the determined position information of the parent point includes: According to the determined position information of the parent point, determining the position information of the neighbor points corresponding to the parent point; According to the position information of the neighbor points, searching for the neighbor points corresponding to the position information of the neighbor points in the preset storage area.

7. The method according to claim 6, wherein The determining the position information of the neighbor points corresponding to the parent point according to the determined position information of the parent point includes: According to the determined position information of the parent point, calculating the position information of all neighbor points coplanar, collinear, and concurrent with the parent point, and obtaining the position information of the first number of neighbor points; Comparing the position information of the first number of neighbor points with the position information of the current point respectively; When the position information of the neighbor point is less than the position information of the current point, discarding the position information of the neighbor point; When the position information of the neighbor point is greater than or equal to the position information of the current point, retaining the position information of the neighbor point to obtain the position information of the second number of neighbor points; wherein, the second number is less than or equal to the first number; Determining the position information of the second number of neighbor points as the position information of the neighbor points corresponding to the parent point.

8. A partitioning method, applied to a decoder, the method comprising: Based on the point cloud to be partitioned, determining the position information of the points in the point cloud to be partitioned; Determine the number of bits N to the right shift corresponding to the i-th level of detail LOD layer in the point cloud to be partitioned i ; where i is an integer greater than or equal to 0, and N i is an integer greater than 0, and M represents the maximum preset number of LOD partitions; For the i-th LOD level, shift the position information of the points in the point cloud to be partitioned to the right by N i bits, and store them in a preset storage area based on the shifted position information; Determining the position information of the parent point corresponding to the current point in the i-th LOD level; According to the determined position information of the parent point, searching for the neighbor points corresponding to the parent point in the preset storage area; Partitioning the current point into the (i + 1)-th LOD level, or partitioning the neighbor points into the i-th LOD level.

9. The method according to claim 8, wherein, The method further comprises: Sorting the position information of the points in the point cloud to be partitioned according to a preset sorting strategy, and determining the sorted position information as the position information of the points in the point cloud to be partitioned.

10. The method according to claim 9, wherein, The method further comprises: Based on the sorted position information, determine the maximum position information and the minimum position information; Calculate the difference between the maximum position information and the minimum position information; Perform a right shift operation on the difference. When the right-shifted difference satisfies a preset range, obtain the number of right shift bits of the difference; Determine the number of right shift bits as the initial number of right shift bits of the point cloud to be divided.

11. The method according to claim 8, wherein, Determining the number of bits N for right shift corresponding to the i-th LOD level in the point cloud to be partitioned i , includes: Determine the right shift number N corresponding to the i-th LOD level in the point cloud to be partitioned by using the first pre-designed calculation model i .

12. The method according to claim 8, wherein The determining the position information of the parent point corresponding to the current point in the i-th LOD level includes: Based on the right shift number N corresponding to the i-th LOD layer i , perform a right shift process on the position information of the current point in the i-th LOD layer; Determine the right-shifted position information as the position information of the parent point corresponding to the current point in the i-th LOD level.

13. The method according to claim 8, wherein The searching for the neighbor points corresponding to the parent point in the preset storage area according to the determined position information of the parent point includes: According to the determined position information of the parent point, determine the position information of the neighbor points corresponding to the parent point; According to the position information of the neighbor points, search for the neighbor points corresponding to the position information of the neighbor points in the preset storage area.

14. The method according to claim 13, wherein, The determining the position information of the neighbor points corresponding to the parent point according to the determined position information of the parent point includes: According to the determined position information of the parent point, calculate the position information of all neighbor points coplanar, collinear, and concurrent with the parent point, and obtain the position information of the first number of neighbor points; Compare the position information of the first number of neighbor points with the position information of the current point respectively; When the position information of the neighbor point is less than the position information of the current point, discard the position information of the neighbor point; When the position information of the neighbor point is greater than or equal to the position information of the current point, retain the position information of the neighbor point to obtain the position information of the second number of neighbor points; where the second number is less than or equal to the first number; Determine the position information of the second number of neighbor points as the position information of the neighbor points corresponding to the parent point.

15. An encoder, the encoder includes a first determination unit, a first right shift unit, a first search unit, and a first division unit, where, The first determination unit is configured to determine the position information of the points in the point cloud to be divided based on the point cloud to be divided; Determine the number of bits N for right shift corresponding to the i-th level of detail LOD layer in the point cloud to be partitioned i ; where i is an integer greater than or equal to 0, and N i is an integer greater than 0, and M represents the maximum preset number of LOD partitions; The first right shift unit is configured to right shift the position information of the points in the point cloud to be divided by N for the i-th LOD layer i bits, and store the right-shifted position information in a preset storage area; The first determination unit is further configured to determine the position information of the parent point corresponding to the current point in the i-th LOD level; The first search unit is configured to search for the neighbor points corresponding to the parent point in the preset storage area according to the determined position information of the parent point; The first division unit is configured to divide the current point into the (i + 1)-th LOD level, or divide the neighbor points into the i-th LOD level.

16. A decoder, the decoder includes a second determination unit, a second right shift unit, a second search unit, and a second division unit, where, The second determination unit is configured to determine the position information of the points in the point cloud to be divided based on the point cloud to be divided; Determine the number of bits N to be shifted to the right corresponding to the i-th level of detail LOD layer in the point cloud to be partitioned i ; where i is an integer greater than or equal to 0, and N i is an integer greater than 0, and M represents the maximum preset number of LOD partitions; The second right shift unit is configured to right shift the position information of the points in the point cloud to be partitioned by N bits for the i-th LOD level, and store the right-shifted position information in a preset storage area; i and store it in a preset storage area based on the right-shifted position information; The second determination unit is further configured to determine the position information of the parent point corresponding to the current point in the i-th LOD level; The second search unit is configured to search for the neighbor points corresponding to the parent point in the preset storage area according to the determined position information of the parent point; The second partitioning unit is configured to partition the current point into the (i + 1)-th LOD level or partition the neighboring point into the i-th LOD level.

Citation Information

Patent Citations

  • Point cloud attribute compression method based on hierarchical division

    CN108632621A

  • A color attribute coding method based on TMC3 point cloud encoder

    CN109257604A