Partitioning method, encoder, decoder and computer storage medium
Through iterative calculation and right-shifting Morton code, the division of LOD layers is improved, the problem of low prediction accuracy caused by LOD division in the prior art is solved, and the encoding and decoding efficiency is improved.
Patent Information
- Application Number
- CN202210356934.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-09-30
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2039-09-30
AI Technical Summary
The existing LOD division method based on distance leads to low prediction accuracy for neighbor nodes in video encoding and decoding, affecting the encoding and decoding efficiency.
Calculate the Morton code of the point cloud through iterative method, and shift the Morton code right by K bit in each iteration, select a point from the points with equal values of the Morton code after the right shift, and divide the LOD using the details of the point composition layer, thereby improving the partition accuracy of LOD layer.
It improves the prediction accuracy of neighbor nodes, improves the efficiency of encoding and decoding, and reduces the computational complexity.
Smart Images

Figure CN114820831B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to a technology for dividing the level of detail (LOD) in the encoding and decoding of geometry-based point cloud compression (G-PCC), and more particularly to a division method, an encoder, a decoder, and a computer storage medium. Background Art
[0002] In the encoder framework of G-PCC, the geometric information of the point cloud and the attribute information corresponding to each point cloud are encoded separately. The geometric encoding is performed first, and then the geometric information is reconstructed after the geometric encoding is completed. At present, attribute encoding is mainly performed on color information. When performing attribute encoding, the color information is first converted from the RGB color space to the YUV color space, and then the point cloud is recolored using the reconstructed geometric information, so that the unencoded attribute information corresponds to the reconstructed geometric information. In color information encoding, there are two main transformation methods. One is the lifting transformation based on LOD division. Currently, LOD division is mainly divided into LOD division based on distance and LOD division based on fixed sampling rate. The second is to directly perform region adaptive hierarchical transformation (RAHT) on the attributes.
[0003] Since the computational complexity of distance-based LOD division of point cloud is high, in order to reduce the computational complexity, a method of dividing LOD based on distance-based LOD division is used to search within a range of the Morton code corresponding to the current point. However, in video encoding and decoding, after the LOD division is completed, the LOD division structure is required to predict the attributes of neighbor nodes. However, the LOD layer obtained by the existing LOD division method results in low prediction accuracy for neighbor nodes. Summary of the invention
[0004] The embodiments of the present application provide a partitioning method, an encoder, a decoder, and a computer storage medium, which can improve the prediction accuracy of neighbor nodes and increase the encoding and decoding rate.
[0005] The technical solution of the embodiment of the present application can be implemented as follows:
[0006] In a first aspect, an embodiment of the present application provides a partitioning method, the method comprising:
[0007] Obtaining a point cloud to be divided, and calculating a Morton code of the point cloud to be divided;
[0008] Determine the point cloud to be divided as the input point cloud of the first iteration;
[0009] When performing the i-th iteration, determine whether the number of points in the input point cloud of the i-th iteration is equal to 0; wherein i is a positive integer whose initial value is equal to 1;
[0010] When the number of points in the input point cloud of the i-th iteration is not equal to 0, the Morton code of the input point cloud of the i-th iteration is right-shifted by K bits, where K is a positive integer;
[0011] Select a point from the points whose Morton code value is equal after right shift by K bits;
[0012] The selected points are used to form the i-th detail division LOD layer, and the remaining points in the input point cloud of the i-th iteration except the selected points are determined as the input point cloud of the i+1-th iteration, i is updated to i+1, and the execution is returned to determine whether the number of points in the input point cloud of the i-th iteration is equal to 0 when performing the i-th iteration;
[0013] When the number of points in the input point cloud of the i-th iteration is equal to 0, the 1st LOD layer to the i-1th LOD layer are determined as the LOD layers after the point cloud to be divided is divided.
[0014] In a second aspect, an embodiment of the present application provides an encoder, the encoder comprising:
[0015] A first calculation module is configured to obtain a point cloud to be divided and calculate a Morton code of the point cloud to be divided;
[0016] A first determining module is configured to determine the point cloud to be divided as an input point cloud of the first iteration;
[0017] A first judgment module is configured to judge whether the number of points in the input point cloud of the i-th iteration is equal to 0 when performing the i-th iteration; wherein i is a positive integer whose initial value is equal to 1;
[0018] A first right shift module is configured to right shift the Morton code of the input point cloud of the i-th iteration by K bits when the number of points in the input point cloud of the i-th iteration is not equal to 0, wherein K is a positive integer;
[0019] A first selection module is configured to select a point from points having the same value of the Morton code after right shift by K bits;
[0020] The first division module is configured to use the selected points to form an i-th detail division LOD layer, and the remaining points in the input point cloud of the i-th iteration except the selected points are determined as the input point cloud of the i+1-th iteration, i is updated to i+1, and the first judgment module is returned to execute when the i-th iteration is performed, and it is determined whether the number of points in the input point cloud of the i-th iteration is equal to 0;
[0021] The second determination module is configured to determine the 1st LOD layer to the i-1th LOD layer as the LOD layers after the point cloud to be divided when the number of points in the input point cloud of the i-th iteration is equal to 0.
[0022] In a third aspect, an embodiment of the present application provides a decoder, the decoder comprising:
[0023] A second calculation module is configured to obtain a point cloud to be divided and calculate a Morton code of the point cloud to be divided;
[0024] A third determination module is configured to determine the point cloud to be divided as an input point cloud of the first iteration;
[0025] The second judgment module is configured to judge whether the number of points in the input point cloud of the i-th iteration is equal to 0 when performing the i-th iteration; wherein i is a positive integer whose initial value is equal to 1;
[0026] A second right shift module is configured to right shift the Morton code of the input point cloud of the i-th iteration by K bits when the number of points in the input point cloud of the i-th iteration is not equal to 0; wherein K is a positive integer;
[0027] The second selection module is configured to select a point from the points whose values of the Morton codes after being right-shifted by K bits are equal;
[0028] The second division module is configured to use the selected points to form an i-th detail division LOD layer, and the remaining points in the input point cloud of the i-th iteration except the selected points are determined as the input point cloud of the i+1-th iteration, i is updated to i+1, and the second judgment module is returned to execute when the i-th iteration is performed, and it is determined whether the number of points in the input point cloud of the i-th iteration is equal to 0;
[0029] The fourth determination module is configured to determine the 1st LOD layer to the i-1th LOD layer as the LOD layers after the point cloud to be divided when the number of points in the input point cloud of the i-th iteration is equal to 0.
[0030] In a fourth aspect, an embodiment of the present application provides an encoder, the encoder comprising:
[0031] A processor and a storage medium storing instructions executable by the processor, wherein the storage medium relies on the processor to perform operations through a communication bus, and when the instructions are executed by the processor, the partitioning method described in one or more of the above embodiments is executed.
[0032] In a fifth aspect, an embodiment of the present application provides an encoder, the encoder comprising:
[0033] A processor and a storage medium storing instructions executable by the processor, wherein the storage medium relies on the processor to perform operations through a communication bus, and when the instructions are executed by the processor, the partitioning method described in one or more of the above embodiments is executed.
[0034] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores executable instructions. When the executable instructions are executed by one or more processors, the processor executes the partitioning method described in one or more of the above embodiments.
[0035] The embodiment of the present application provides a division method, an encoder, a decoder and a computer storage medium. The method may include: obtaining a point cloud to be divided, calculating a Morton code of the point cloud to be divided, determining the point cloud to be divided as an input point cloud of the first iteration, and when performing the i-th iteration, determining whether the number of points in the input point cloud of the i-th iteration is equal to 0, wherein i is a positive integer whose initial value is equal to 1, and when the number of points in the input point cloud of the i-th iteration is not equal to 0, shifting the Morton code of the input point cloud of the i-th iteration right by K bits, wherein K is a positive integer, selecting a point from points whose Morton code values are equal after the right shift by K bits, and using the selected points to form the i-th detail division LOD layer, determining the remaining points in the input point cloud of the i-th iteration except the selected points as the input point cloud of the i-th iteration, updating i to i+1, returning to execute; when performing the i-th iteration, determining whether the number of points in the input point cloud of the i-th iteration is equal to 0, when the number of points in the input point cloud of the i-th iteration is equal to 0, the 1st LOD layer to the i-1th LOD layer are determined as the LOD layers after the point cloud to be divided; that is, in the embodiment of the present application, through the iterative method, the Morton code of the input point cloud of each iteration is right-shifted by K bits, and then a point is selected from the points with the same value of the Morton code after the right shift by K bits, and the selected points constitute the LOD layer formed in this iteration. Through this division method, since the points adjacent to the Morton code are often in adjacent positions in the geometric space, then by shifting the Morton code to the right and selecting points based on the right-shifted Morton code, in the process of LOD division, the distribution of the point cloud and the spatial distance between the point clouds can be comprehensively considered, so that the division of the obtained LOD layer is based on the distribution of the point cloud and the spatial distance between the point clouds. In this way, the accuracy of neighbor node prediction based on the LOD layer is improved, thereby improving the efficiency of encoding and decoding. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 A flowchart for G-PCC encoding;
[0037] Figure 2 Schematic diagram of the LOD division process based on distance;
[0038] Figure 3 Schematic diagram of the LOD division process based on the Morton order;
[0039] Figure 4 A flowchart of an optional partitioning method provided in an embodiment of the present application;
[0040] Figure 5 A flowchart of an example of an optional partitioning method provided in an embodiment of the present application;
[0041] Figure 6 A schematic diagram of the structure of an optional encoder provided in an embodiment of the present application;
[0042] Figure 7 A schematic diagram of the structure of an optional decoder provided in an embodiment of the present application;
[0043] Figure 8 A schematic diagram of the structure of another optional encoder provided in an embodiment of the present application;
[0044] Fig. 9 A schematic diagram of the structure of another optional decoder provided in an embodiment of the present application. DETAILED DESCRIPTION
[0045] The following will be combined with the accompanying drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. It is understood that the specific embodiments described herein are only used to explain the related applications, rather than to limit the applications. It should also be noted that, for the convenience of description, only the parts related to the related applications are shown in the accompanying drawings.
[0046] In an embodiment of the present application, in the point cloud G-PCC encoder framework, after the point cloud of the input three-dimensional image model is sliced, each slice is independently encoded.
[0047] Figure 1 The flowchart of G-PCC coding is as follows: Figure 1As shown in FIG. 1 , it is applied to the point cloud encoder. For the point cloud data to be encoded, the point cloud data is first divided into multiple slices through slice division. In each slice, the geometric information of the point cloud and the attribute information corresponding to each point cloud are encoded separately. In the process of geometric encoding, the coordinates of the geometric information are transformed so that all the point clouds are contained in a bounding box, and then quantized. This step of quantization mainly plays a role in scaling. Due to the quantization rounding, the geometric information of some point clouds is the same, so it is determined based on the parameters whether to remove duplicate points. The process of quantization and removal of duplicate points is also called voxelization. Then the boundingbox is divided into octrees. In the octree-based geometric information encoding process, the bounding box is divided into 8 sub-cubes in eight equal parts, and the non-empty (containing points in the point cloud) sub-cubes are further divided into eight equal parts until the leaf node obtained by the division is a 1x1x1 unit cube. The division is stopped, and the points in the leaf nodes are arithmetically encoded to generate a binary geometric bit stream, that is, a geometric code stream. In the process of geometric information encoding based on trisoup (triangle soup, triangle patch set), octree division must also be performed first, but different from geometric information encoding based on octree, this trisoup does not need to divide the point cloud into unit cubes with a side length of 1x1x1 step by step, but stops dividing when the block (sub-block) has a side length of W. Based on the surface formed by the distribution of point clouds in each block, at most twelve vertices (intersections) generated by the surface and the twelve edges of the block are obtained, and the vertices are arithmetically encoded (surface fitting based on intersections) to generate a binary geometric bit stream, that is, a geometric code stream. Vertex is also used to implement the process of geometric reconstruction, and the reconstructed set information is used when encoding the attributes of the point cloud.
[0048] In the attribute encoding process, after the geometric encoding is completed and the geometric information is reconstructed, color conversion is performed to convert the color information (i.e., attribute information) from the RGB color space to the YUV color space. Then, the point cloud is recolored using the reconstructed geometric information so that the unencoded attribute information corresponds to the reconstructed geometric information. In the color information encoding process, there are two main transformation methods: one is the distance-based lifting transformation that relies on LOD partitioning, and the other is the RAHT transformation. Both methods convert the color information from the spatial domain to the frequency domain, obtain high-frequency coefficients and low-frequency coefficients through transformation, and finally quantize the coefficients (i.e., quantized coefficients). Finally, the geometric encoding data after octree partitioning and surface fitting and the attribute encoding data processed by quantization coefficients are sliced and synthesized, and the vertex coordinates of each block are encoded in turn (i.e., arithmetic encoding) to generate a binary attribute bit stream, i.e., attribute code stream.
[0049] In the related technical field, it is mentioned that the distance-based method is used to divide the LOD when performing attribute transformation for Category3 sequence point clouds. The distance-based LOD division method is used in the TMC3V0 encoder and the TMC13 attribute transformation lifting. The distance-based LOD division method is also added to the predcting attribute transformation in TMC13, that is, LOD division is applied to both the Predicting and lifting methods of point cloud attribute transformation.
[0050] The specific implementation of LOD division based on distance is as follows:
[0051] LOD division is based on a set of defined distance thresholds d l , where l = 0, ..., L-1, the input point cloud is divided into different refinement levels R l , where l = 0, ..., L-1, that is, dividing the points in the point cloud into different sets R l In the example, the distance threshold d l The following two conditions need to be met:
[0052] d l <d l-1 (1)
[0053] d L-1 =0 (2)
[0054] Specifically, the LOD division process is after the point cloud geometry is reconstructed. At this time, the geometric coordinate information of the point cloud is known. The LOD division process is applied to both the encoding and decoding ends of the point cloud. The specific process is as follows:
[0055] 1) First, place all point clouds in the "unvisited" point set, and initialize the "visited" point set V to an empty set;
[0056] 2) The algorithm process divides the LOD layer through continuous iteration. The refinement level R corresponding to the lth iteration is l The generation process is as follows:
[0057] a. The algorithm iterates through all points;
[0058] b. If the current point has been traversed, ignore it;
[0059] c. Otherwise, calculate the distance from the point to each point in the set V, and record the closest distance as D; in the first iteration, add the first point cloud to the set V;
[0060] d. If the distance D is greater than or equal to the threshold dl, then add the point to the refinement level R l and in set V;
[0061] e. Repeat cd until all points are traversed;
[0062] 3) The first LOD set, namely LOD l It is obtained by merging the points in refinement levels R0, R1, …, R1;
[0063] 4) The process is iterated continuously until all LOD layers are generated or all points are traversed.
[0064] Figure 2 This is a schematic diagram of the LOD process based on distance division, as shown in Figure 2 As shown, the point cloud to be divided this time includes points P0, P1, P2, P3, P4, P5, P6, P7, P8 and P9, among which the order of the original point cloud is: P0, P1, P2, P3, P4, P5, P6, P7, P8 and P9. The LOD0 obtained by using the above-mentioned distance-based LOD division method is P4, P5, P0 and P1, LOD1 is P4, P5, P0, P1, P3, P2 and P6, and LOD2 is P4, P5, P0, P1, P3, P2, P6, P7, P8 and P9.
[0065] The related art also mentions a solution to reduce the computational complexity of LOD generation, which is mainly based on the Morton order to divide the LOD. Among them, the Morton code realizes the conversion between one dimension and two dimensions (or multiple dimensions). It generates a number by cross-storing the bits of two numbers. Compared with the original search for all points to divide the LOD, the computational complexity of this solution is much lower. The main steps are as follows:
[0066] First, assume that the variable P i , where i = 1, ..., N, P i Represents a point in the input point cloud, variable M i , where i = 1, ..., N, M i The specific method of calculating the Morton code is described as follows, where the components x, y, and z of the three-dimensional coordinates of each point are represented by d-bit binary numbers:
[0067]
[0068]
[0069]
[0070] Among them, x l ,y l ,z l ∈{0,1}, and x l ,y l ,zl The Morton code M is the binary value corresponding to the highest bit (l=1) to the lowest bit (l=d) of x, y, and z. l ,y l ,z l To the lowest bit, the calculation formula of M is as follows:
[0071]
[0072] Among them, m l' ∈{0,1} are the values of the highest bit (l'=1) to the lowest bit (l'=3d) of M. 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.
[0073] D0 (indicating the threshold of the initial distance) and ρ (indicating the distance threshold ratio when dividing adjacent LOD layers) are user-defined initial parameters, and ρ>1. Let I represent the index of all points in the point cloud. At the kth iteration, LOD k The points in the will be from LOD0 to LOD k-1 Find the nearest neighbor in the layer, that is, the point with the closest distance. The specific process of the algorithm is as follows:
[0074] 1) First, initialize the partition distance threshold to D=D0;
[0075] 2) At the kth iteration, k = 0, 1…N-1 (N is the total number of LOD layers), L(k) stores the points belonging to the kth LOD layer, and O(k) stores the points smaller than LOD. k The point set at a higher level of refinement, where the calculation process of L(k) and O(k) is as follows:
[0076] a. First, O(k) and L(k) are initialized to empty sets;
[0077] b. Each iteration is traversed in the order of the indexes of the points stored in I. Each traversal will calculate the geometric distance from the current point to all points within a certain range in the set O(k). Based on the Morton code corresponding to the current point in I, search for the first index of the point in the set O(k) that is greater than the Morton code corresponding to the current point, and then search within a search range SR1 of the index (SR1 represents the search range based on the Morton code, generally 8, 16, 64). If the distance from the current point is less than the threshold d l If the current point is a point, add it to the set L(k), otherwise add it to the set O(k);
[0078] 3) In each iteration, the sets L(k) and O(k) are calculated separately, and the points in O(k) are used to predict the points in the set L(k). Let the set R(k) = L(k)\L(k-1), that is, R(k) represents LOD k-1 With LOD k The point set of the difference part of the set. For the point in the set R(k), the nearest h predicted neighbors (currently h is set to 3) will be searched in the set O(k). The specific process of finding the nearest neighbor is as follows:
[0079] a. For a point P in the set R(k) i , the Morton code corresponding to this point is M i ;
[0080] b. Find the first Morton code M in the set O(k) that is greater than the current point Pi i The index j of the point;
[0081] c. Find the current point P in a search range [j-SR2, j+SR2] in the set O(k) based on index j. i The nearest neighbor node (SR2 represents a search range, usually 8 / 16 / 32 / 64).
[0082] 4) Continue to iterate until all points in I are traversed.
[0083] Figure 3 It is a schematic diagram of the LOD division process based on the Morton order, as shown in Figure 3 As shown, the point cloud to be divided this time includes points P0, P1, P2, P3, P4, P5, P6, P7, P8 and P9, among which, the order of the original point cloud is: P0, P1, P2, P3, P4, P5, P6, P7, P8 and P9, and the points arranged in ascending order based on Morton order are: P4, P1, P9, P5, P0, P6, P8, P2, P7 and P3. The LOD0 obtained by the above method of dividing LOD based on Morton order is P4, P5, P0 and P1, LOD1 is P4, P5, P0, P1, P3, P2 and P6, and LOD2 is P4, P5, P0, P1, P3, P2, P6, P7, P8 and P9.
[0084] The method of dividing LOD based on distance uses a method of searching within a range of the Morton code corresponding to the current point, calculating the spatial geometric distance from the points in the range to the current point and comparing it with the threshold, until the distance from all points to the current point is greater than the threshold, the point is added to the current LOD layer, otherwise it will be divided in the next layer. According to the test data obtained by the test, the time used by the method of dividing LOD based on distance accounts for about 70% to 80% of the total encoding time. Obviously, the calculation complexity is relatively high.
[0085] In addition, before the prediction and lifting of the point cloud attribute transformation, the point cloud is divided into LOD based on the distance. Since there is a great correlation between the attributes of adjacent points in space, the LOD-based structure can be used to predict the attributes of neighboring nodes, thereby achieving the purpose of removing attribute redundancy between adjacent points. Nevertheless, since different point clouds have different spatial distributions, the object density of different point clouds is different. Therefore, in the process of dividing LOD based on distance, the neighbor points obtained by searching based on the uniform distribution of the point cloud (equivalent to the equal distance threshold of the division) in the prior art are not accurate enough, resulting in large prediction residuals and low coding efficiency.
[0086] Since the computational complexity of distance-based LOD division of point clouds is high, in order to reduce the computational complexity, a method of searching within a range of the Morton code corresponding to the current point is used to divide the LOD based on the distance. However, in video encoding and decoding, after the LOD division is completed, the LOD division structure needs to be used to predict the attributes of neighbor nodes. Since different point clouds have different spatial distributions, the object densities of different point clouds are different. Therefore, the LOD division structure obtained by the above division method is not accurate enough in predicting neighbor nodes, resulting in large prediction residuals, which affects the efficiency of encoding and decoding. It can be seen that the LOD layer obtained by the existing LOD division method leads to low prediction accuracy for neighbor nodes.
[0087] In order to improve the efficiency of encoding and decoding, it is necessary to improve the prediction accuracy of neighbor nodes. In order to improve the prediction accuracy of neighbor nodes, the embodiment of the present application provides a partitioning method. Figure 4 A flowchart of an optional partitioning method provided in an embodiment of the present application is shown as follows: Figure 4 As shown, the method can be applied to an encoder or a decoder, and the division method may include:
[0088] S401: Obtain a point cloud to be divided, and calculate a Morton code of the point cloud to be divided;
[0089] The division method provided in the embodiment of the present application is to improve the LOD generation process in the above-mentioned lifting and predicting attribute transformations, and is used for encoders and decoders. The method uses the improved technology to divide the LOD structure before performing lifting or predicting transformations, and is applied to Figure 1 The block diagram of generating LOD in .
[0090] Here, after obtaining the point cloud to be divided, the Morton code of the point cloud to be divided is calculated first. In the subsequent iterative calculation, the Morton code can be used to know the spatial position relationship between points, which is conducive to predicting neighbor nodes after the LOD layer is divided.
[0091] S402: Determine the point cloud to be divided as the input point cloud of the first iteration;
[0092] Specifically, in order to divide the point cloud to be divided into LOD layers, an iterative method is used here for division. First, the point cloud to be divided is obtained, wherein the point cloud to be divided includes at least two points, for example, 10 points, and the point cloud to be divided is determined as the input point cloud of the first iteration.
[0093] In the case where there are a large number of points in the point cloud to be divided, in order to better and faster complete the LOD division of the point cloud to be divided, in an optional embodiment, before S402, the method may include:
[0094] The Morton code of the point cloud to be divided is shifted right by N bits, and the points with the same Morton code value after the right shift by N bits are grouped into a group of point clouds, where N is a positive integer;
[0095] Each group of point clouds is determined as the input point cloud of the first iteration.
[0096] That is to say, when there are a large number of points in the point cloud to be divided, the point cloud to be divided is not directly used as the input point cloud for the first iteration. Instead, the Morton code of the point cloud to be divided is calculated first, and the Morton code is shifted right by N bits. In this way, for points with equal values of the Morton code after right shifting N bits, they are adjacent in space. Therefore, each group of points with equal values of the Morton code after right shifting N bits is formed into a group of point clouds, and each group of point clouds is determined as the input point cloud for the first iteration. In this way, the point cloud to be divided is divided into groups, and each group of point clouds is used as the input point cloud for the first iteration for iterative calculation, and finally the LOD layer after each group of point clouds is obtained, thereby obtaining the LOD layer after the point cloud to be divided.
[0097] S403: when performing the i-th iteration, determining whether the number of points in the input point cloud of the i-th iteration is equal to 0;
[0098] In the embodiment of the present application, the number of iterations is represented by i, where i is a positive integer whose initial value is equal to 1;
[0099] In S403, when performing each iteration, it is first determined whether the number of points in the input point cloud of each iteration is equal to 0, that is, whether the point cloud to be divided has been traversed through the iteration. If the traversal is completed, the iteration process ends. If the traversal is not completed, it is necessary to continue the iteration to divide the point cloud to be divided into LOD layers.
[0100] S404: when the number of points in the input point cloud of the i-th iteration is not equal to 0, the Morton code of the input point cloud of the i-th iteration is right-shifted by K bits;
[0101] After the judgment of S403, when the number of points in the input point cloud of the i-th iteration is not equal to 0, it means that the previous iteration has not traversed all the points, so it is necessary to execute this iteration. Specifically, the points can be sorted from small to large according to the Morton code to better obtain the spatial relationship between the points through the Morton code.
[0102] Wherein, K is a positive integer, and the value of K here can be a fixed value obtained through training, or it can be a value obtained by any of the following methods. Here, the embodiment of the present application does not make any specific limitation on this.
[0103] In order to determine the value of K, in an optional embodiment, before S404, the method may further include:
[0104] The value of K is determined according to the distribution of the point cloud to be divided.
[0105] Specifically, the value of K is determined according to the distribution of the point cloud to be divided. In this way, the Morton code is right-shifted by K bits in each iteration, so that the spatial distribution of the point cloud is taken into account when the Morton code is right-shifted, which can achieve better prediction results.
[0106] In order to determine the value of K, in an optional embodiment, when i is greater than or equal to a first preset threshold, before S404, the method may further include:
[0107] The value of K is determined according to the number of points in the input point cloud of the i-th iteration and the distribution of the input point cloud of the i-th iteration.
[0108] Here, since each iteration will divide part of the point cloud into the corresponding LOD layer, as the number of iterations increases, the remaining points become fewer and fewer, so the distribution of the input point cloud of each iteration is also constantly changing. In order to achieve better prediction results, here, the K value of each iteration can be determined according to the number of points in the input point cloud of each iteration and the distribution of the input point cloud of each iteration. In this way, the number of right shifts of the Morton code in each iteration takes into account the number of point clouds and the spatial distribution of point clouds, which can achieve better prediction results.
[0109] S405: Select a point from the points whose Morton code values are equal after right shift by K bits;
[0110] After the Morton code is right-shifted by K bits, in order to divide the LOD layer, first find the points where the values of the Morton code after the right shift by K bits are equal, and at least one group of points where the values of the Morton code after the right shift by K bits are equal can be obtained. Then, a point is selected from the points where the values of the Morton code after the right shift by K bits are equal, wherein any one of the points can be selected, or one of the specified points can be selected. Here, the embodiment of the present application does not make any specific limitation on this.
[0111] In order to obtain the divided LOD layers to improve the prediction accuracy of neighbor nodes, in an optional embodiment, S405 may include:
[0112] Sort the points in the input point cloud of the i-th iteration according to the Morton code of the input point cloud of the i-th iteration from small to large;
[0113] From the points whose Morton code values are equal after being shifted right by K bits, select the point that ranks first.
[0114] Here, the Morton codes are sorted in ascending order, and then the points whose Morton codes have the same value after being right-shifted by K bits are found, and at least one group of points whose Morton codes have the same value after being right-shifted by K bits are obtained. Then, the first point is selected from each group, that is, the point that is at the front of the original point cloud order among the points whose Morton codes have the same value after being right-shifted by K bits.
[0115] In order to obtain the divided LOD layer to improve the prediction accuracy of the neighboring nodes, in an optional embodiment, S405 may include:
[0116] Determine the centroid of the points whose Morton codes have the same value after being right-shifted by K bits;
[0117] The point closest to the centroid among the points with the same value of the Morton code after right shift by K bits is determined as a selected point.
[0118] Specifically, first determine the centroid of the points whose values are equal to the Morton code after being right-shifted by K bits. The centroid is calculated through the three-dimensional coordinates of each point in the input point cloud of this iteration. After obtaining the centroid, calculate the point closest to the centroid among the points whose values are equal to the Morton code after being right-shifted by K bits, and select that point.
[0119] In order to obtain the divided LOD layer to improve the prediction accuracy of the neighboring nodes, in addition to using the above S405 to select points, in an optional embodiment, after S404 and before S406, the method may further include:
[0120] According to the number of points with the same value of the Morton code after right shift by K bits, determine the corresponding number of selections;
[0121] According to the corresponding selection number, select the selection number of points from the points with the same value of the Morton code after right shifting K bits.
[0122] Specifically, more than one point can be selected from the points with equal values of the Morton code after right shifting by K bits. The corresponding number of selections can be determined based on the number of points with equal values of the Morton code after right shifting by K bits. For example, the number of points with equal values of the Morton code after right shifting by K bits is 10, 8, 6, 4, etc. The corresponding number of selections can be determined according to the number of points with equal values of the Morton code. For example, when the number of points with equal values of the Morton code after right shifting by K bits is 10, the corresponding number of selections is 5, when the number of points with equal values of the Morton code after right shifting by K bits is 8, the corresponding number of selections is 4, when the number of points with equal values of the Morton code after right shifting by K bits is 6, the corresponding number of selections is 3, and when the number of points with equal values of the Morton code after right shifting by K bits is 4, the corresponding number of selections is 2. The corresponding number of selections can be determined according to a direct proportional relationship.
[0123] Then, according to the selected number, a selected number of points are selected from the points with equal values of the Morton code after right shifting K bits. The selected number of points can be selected arbitrarily or in a specified manner. Here, the embodiment of the present application does not make specific limitations on this.
[0124] In order to obtain the divided LOD layer to improve the prediction accuracy of the neighboring nodes, in addition to using the above S405 to select points, in an optional embodiment, after S404 and before S406, the method may further include:
[0125] Sort the points in the input point cloud of the i-th iteration according to the Morton code of the input point cloud of the i-th iteration from small to large;
[0126] From the points with the same Morton code value after right shift by K bits, one point is selected every second preset threshold value according to the sorting result.
[0127] Specifically, the Morton codes are first sorted in ascending order to obtain the sorting result of the input point cloud of the i-th iteration, and then the points with equal values of the Morton codes after being right-shifted by K bits can be found. Since each group of points with equal values of the Morton codes after being right-shifted by K bits are also arranged according to the sorting result, a point is selected here according to every second preset threshold to obtain the selected point.
[0128] The second preset threshold is a value set according to the requirements.
[0129] S406: Use the selected points to form the i-th detail division LOD layer, determine the remaining points in the input point cloud of the i-th iteration except the selected points as the input point cloud of the i+1-th iteration, update i to i+1, and return to execute S403;
[0130] After obtaining the selected points, the selected points are used to form the LOD layer of this iteration, that is, the i-th LOD layer, so that after this iteration, some points in the input point cloud of this iteration are divided into the LOD layer, and the remaining points in the input point cloud of this iteration except the selected points are determined as the input point cloud of the i+1th iteration, and i is updated to i+1, and S403 is re-executed.
[0131] It can be seen that in the embodiment of the present application, by calculating the Morton code of the input point cloud of the i-th iteration and shifting it right by an appropriate number of bits, spatially adjacent points can be found. When forming the LOD layer, one or more points are selected from each group of adjacent points. In this way, the spatial distribution between the point clouds considered by the divided LOD layer is conducive to improving the prediction accuracy of neighbor nodes.
[0132] S407: When the number of points in the input point cloud of the i-th iteration is equal to 0, the 1st LOD layer to the i-1th LOD layer are determined as the LOD layers after the point cloud to be divided is divided.
[0133] In addition, when the number of points in the input point cloud of the i-th iteration is equal to 0, it means that the point cloud to be divided has been completely traversed, so the iteration can be ended and the obtained 1st LOD layer to the i-1th LOD layer can be used as the LOD layer after the point cloud to be divided.
[0134] In addition, in order to obtain the LOD layer by division, in an optional embodiment, when i is greater than or equal to the first preset threshold, the selected points are used to form the i-th detail division LOD layer, and the remaining points in the input point cloud of the i-th iteration except the selected points are determined as the input point cloud of the i+1-th iteration. After i is updated to i+1, the method may further include:
[0135] According to the input point cloud of the i-th iteration, the preset distance-based LOD division algorithm is called to divide the LOD layer;
[0136] The LOD layers obtained by division, the 1st LOD layer to the i-1th LOD layer are determined as: the LOD layers after the point cloud to be divided is divided.
[0137] That is to say, when the iterative method of the embodiment of the present application is adopted, when the number of iterations i is greater than or equal to the first preset threshold, the remaining undivided points can be divided into LOD layers based on an algorithm for dividing LOD based on distance or an algorithm for dividing LOD based on a fixed sampling rate; here, the embodiment of the present application does not make any specific limitations on this.
[0138] When the number of iterations i is greater than or equal to the first preset threshold, after completing the division of this iteration, after the number of iterations i+1, according to the input point cloud of the i-th iteration, the preset distance-based LOD division algorithm can be called, or the preset fixed sampling rate-based LOD division algorithm can be called to divide the input point cloud of the i-th iteration to obtain the LOD layer. Finally, the previously obtained 1st LOD layer to the i-1th LOD layer and the LOD layer obtained by division are used as the LOD layer after the point cloud to be divided.
[0139] The following examples are used to illustrate the division method described in one or more of the above embodiments.
[0140] Figure 5 A flowchart of an example of an optional partitioning method provided in an embodiment of the present application is shown as follows: Figure 5 As shown, the division method can be applied to an encoder or a decoder. This example takes the application to an encoder as an example. The division method may include:
[0141] S501: Calculate the Morton code for the acquired point cloud to be encoded;
[0142] Specifically, suppose the point cloud to be encoded contains N points, each point is represented as P[i], the Morton code corresponding to each point P[i] is calculated as M[i], i=0,1…N-1, and the Morton codes of the point cloud to be encoded are arranged in ascending order;
[0143] S502: Shift the Morton code right by K bits;
[0144] Specifically, by shifting the Morton code of each point in the coded point cloud right by K bits, the Morton codes corresponding to the points in adjacent positions in space will be equal, because points in adjacent Morton codes are often in adjacent positions in geometric space. It is precisely by utilizing this feature of the Morton code that the adjacent points in the space are grouped together after the Morton codes corresponding to all points in the coded point cloud in space are shifted right by K bits;
[0145] S503: sampling a point set with equal Morton code values;
[0146] Specifically, the points with the same value of the Morton code after the K-bit right shift obtained in S502 are sampled, and a point is taken from the clustered point set each time for each iteration. The attribute of the predicted point is weighted averaged based on the spatial distance to obtain the reconstructed attribute value of the predicted point. Secondly, the attribute residual of the predicted point is obtained by using the reconstructed attribute value and the original attribute value. The attribute of the neighboring point is predicted by using the reconstructed attribute value and the predicted residual. After each sampling, a prediction is performed, and then a final prediction is obtained by combining each prediction, so as to predict the remaining neighboring point attributes in the point cloud to be encoded.
[0147] S504: taking the sampling point as a point in the current LOD layer;
[0148] Specifically, the sampling point obtained in S503 is used as a point in the current LOD layer, and the remaining points are used as points in a higher layer than the current LOD layer; in practical applications, here, the first point among the points with the same value of the Morton code after right shifting K bits can be used as a sampling point.
[0149] S505: Determine whether all remaining points have been traversed or divided; if yes, end the LOD layer division, otherwise return to S502 to continue the division;
[0150] In the continued division, based on the right shift of K bits in the middle Morton code of the point cloud to be encoded, it is right shifted by K bits again, and the above S502 to S505 are repeated until all LODs are divided or all points are traversed.
[0151] Through the above example, when dividing LOD based on the Morton code right shift method, it is only necessary to right shift the Morton code corresponding to the original point cloud by a certain number of bits each time, and then sample the points with equal Morton codes after the right shift. The time for dividing LOD by this method only accounts for about 20% of the encoding time. Therefore, the time complexity of the method of dividing LOD based on Morton sequence right shift is much lower than that of the original method of dividing LOD based on distance, which is about 1 / 4 to 1 / 3 of the former.
[0152] In the embodiment of the present application, the LOD is divided by using the spatial distribution of the point cloud and the spatial distance of the point cloud. The LOD is divided by right shifting the Morton code. Not only the distance of the geometric space can be considered, but also the distribution of the point cloud can be comprehensively considered. When the Morton sequence right shift method is used for division, the number of sampling points will be reduced in places where the point cloud is denser, and the number of sampling points will be increased in places where it is sparser. In the sparser part, due to the long spatial distance between points, the attribute residuals between adjacent points will generally be large when predicting. If sampling is still based on a fixed distance, this will result in a large prediction residual obtained by predicting the attribute based on neighbors, resulting in a large attribute bit stream after compression, and will reduce the performance of the attribute after reconstruction. In the sparse part of the space, due to the large spatial geometric distance between points, the corresponding Morton code values between adjacent points are very different. Therefore, when the Morton code is right shifted, there will be a few points in this part that are clustered into one category, thereby obtaining more sampling points. In this way, when predicting based on neighbor attributes, there will be a better prediction effect than the original solution that only considers the geometric space distance.
[0153] The embodiment of the present application obtains different numbers of point sets by right shifting the Morton code by a certain number of digits, and then uses the sampling points in each point set to predict the attributes of neighboring points. This solution can comprehensively consider the distribution of point clouds and the spatial distance between point clouds, thereby improving the effect of predicting attributes based on neighbors.
[0154] The embodiment of the present application can improve the reconstruction quality of the attribute part without substantially affecting the performance, and can reduce the encoding and decoding time and calculation complexity of the attribute, as shown in the following Table 1:
[0155] Table 1
[0156]
[0157] It can be seen from Table 1 above that the BD-rate of the reconstructed point cloud has also been significantly improved. The Peak Signal to Noise Ratio (PSNR) is an objective standard for image evaluation. The larger the PSNR, the better the image quality. The BD-rate is a parameter used to measure the performance. When the BD-rate is negative, it means that the performance has improved. On this basis, the larger the absolute value of the BD-rate, the greater the performance gain. The division method provided in the embodiment of the present application reduces the time required for LOD division, thereby reducing the encoding and decoding time.
[0158] The present application provides a division method, which may include: obtaining a point cloud to be divided, calculating a Morton code of the point cloud to be divided, determining the point cloud to be divided as an input point cloud for the first iteration, and when performing the i-th iteration, determining whether the number of points in the input point cloud for the i-th iteration is equal to 0, wherein i is a positive integer whose initial value is equal to 1, and when the number of points in the input point cloud for the i-th iteration is not equal to 0, right-shifting the Morton code of the input point cloud for the i-th iteration by K bits, wherein K is a positive integer, selecting a point from points whose Morton code values are equal after right-shifting by K bits, and using the selected points to form an i-th detail division LOD layer, determining the remaining points in the input point cloud for the i-th iteration except the selected points as the input point cloud for the i+1-th iteration, updating i to i+1, and returning to execute; when performing the i-th iteration, determining whether the number of points in the input point cloud for the i-th iteration is equal to 0, and when the i-th iteration When the number of points in the input point cloud is equal to 0, the 1st LOD layer to the i-1th LOD layer are determined as the LOD layers after the point cloud to be divided; that is, in the embodiment of the present application, through an iterative method, the Morton code of the input point cloud of each iteration is right-shifted by K bits, and then a point is selected from the points with the same value of the Morton code after the right shift by K bits, and the selected points constitute the LOD layer formed by this iteration. Through this division method, since points adjacent to the Morton code are often in adjacent positions in the geometric space, by shifting the Morton code to the right and selecting points based on the right-shifted Morton code, in the process of LOD division, the distribution of the point cloud and the spatial distance between the point clouds can be comprehensively considered, so that the division of the obtained LOD layer is based on the distribution of the point cloud and the spatial distance between the point clouds. In this way, the accuracy of neighbor node prediction based on the LOD layer is improved, thereby improving the efficiency of encoding and decoding.
[0159] Embodiment 2
[0160] Based on the same inventive concept, an embodiment of the present application provides an encoder, Figure 6 A schematic diagram of the structure of an optional encoder provided in an embodiment of the present application, such as Figure 6 As shown, the encoder may include:
[0161] A first calculation module 61 is configured to obtain a point cloud to be divided and calculate a Morton code of the point cloud to be divided;
[0162] A first determination module 62 is configured to determine the point cloud to be divided as the input point cloud of the first iteration;
[0163] The first judgment module 63 is configured to judge whether the number of points in the input point cloud of the i-th iteration is equal to 0 when performing the i-th iteration; wherein i is a positive integer whose initial value is equal to 1;
[0164] The first right shift module 64 is configured to right shift the Morton code of the input point cloud of the i-th iteration by K bits when the number of points in the input point cloud of the i-th iteration is not equal to 0; wherein K is a positive integer;
[0165] A first selection module 65 is configured to select a point from points having the same value of the Morton code after right shift by K bits;
[0166] The first division module 66 is configured to use the selected points to form the i-th detail division LOD layer, determine the remaining points in the input point cloud of the i-th iteration except the selected points as the input point cloud of the i+1-th iteration, update i to i+1, and return to the first judgment module 63 to execute when performing the i-th iteration, and judge whether the number of points in the input point cloud of the i-th iteration is equal to 0;
[0167] The second determination module 67 is configured to determine the 1st LOD layer to the i-1th LOD layer as the LOD layers after the point cloud to be divided when the number of points in the input point cloud of the i-th iteration is equal to 0.
[0168] In an optional embodiment, the first determining module 62 may also be configured as follows:
[0169] When the number of points in the input point cloud of the i-th iteration is not equal to 0, before the Morton code of the input point cloud of the i-th iteration is right-shifted by K bits, the value of K is determined according to the distribution of the point cloud to be divided.
[0170] In an optional embodiment, when i is greater than or equal to the first preset threshold, the first determination module 62 may also be configured as follows:
[0171] When the number of points in the input point cloud of the i-th iteration is not equal to 0, before the Morton code of the input point cloud of the i-th iteration is right-shifted by K bits, the value of K is determined according to the number of points in the input point cloud of the i-th iteration and the distribution of the input point cloud of the i-th iteration.
[0172] In an optional embodiment, when i is greater than or equal to a first preset threshold,
[0173] After the selected points are used to form the i-th detail division LOD layer, the remaining points in the input point cloud of the i-th iteration except the selected points are determined as the input point cloud of the i+1-th iteration, and i is updated to i+1, the encoder can also be configured as follows:
[0174] According to the input point cloud of the i-th iteration, the preset distance-based LOD division algorithm is called to divide the LOD layer;
[0175] The LOD layers obtained by division, the 1st LOD layer to the i-1th LOD layer are determined as: the LOD layers after the point cloud to be divided is divided.
[0176] In an optional embodiment, the first selection module 65 may be specifically configured as follows:
[0177] Sort the points in the input point cloud of the i-th iteration according to the Morton code of the input point cloud of the i-th iteration from small to large;
[0178] From the points whose Morton code values are equal after being shifted right by K bits, select the point that ranks first.
[0179] In an optional embodiment, the first selection module 65 may be specifically configured as follows:
[0180] Determine the centroid of the points whose Morton codes have the same value after being right-shifted by K bits;
[0181] The point closest to the centroid among the points with the same value of the Morton code after right shift by K bits is determined as a selected point.
[0182] In an optional embodiment, the first selection module 65 may be specifically configured as follows:
[0183] According to the number of points with the same value of the Morton code after right shift by K bits, determine the corresponding number of selections;
[0184] According to the corresponding selection number, select the selection number of points from the points with the same value of the Morton code after right shifting K bits.
[0185] In an optional embodiment, the first selection module 65 may be specifically configured as follows:
[0186] Sort the points in the input point cloud of the i-th iteration according to the Morton code of the input point cloud of the i-th iteration from small to large;
[0187] From the points with the same Morton code value after right shift by K bits, one point is selected every second preset threshold value according to the sorting result.
[0188] In an optional embodiment, the first determining module 62 may also be configured as follows:
[0189] The Morton code of the point cloud to be divided is shifted right by N bits, and the points with the same Morton code value after the right shift by N bits are grouped into a group of point clouds; wherein N is a positive integer;
[0190] Each group of point clouds is determined as the input point cloud of the first iteration.
[0191] The embodiment of the present application provides a decoder, Figure 7 A schematic diagram of the structure of an optional decoder provided in an embodiment of the present application is shown in FIG. Figure 7 As shown, the decoder may include:
[0192] The second calculation module 71 is configured to obtain the point cloud to be divided and calculate the Morton code of the point cloud to be divided;
[0193] A third determination module 72 is configured to determine the point cloud to be divided as the input point cloud of the first iteration;
[0194] The second judgment module 73 is configured to judge whether the number of points in the input point cloud of the i-th iteration is equal to 0 when performing the i-th iteration; wherein i is a positive integer whose initial value is equal to 1;
[0195] The second right shift module 74 is configured to right shift the Morton code of the input point cloud of the i-th iteration by K bits when the number of points in the input point cloud of the i-th iteration is not equal to 0; wherein K is a positive integer;
[0196] The second selection module 75 is configured to select a point from the points whose Morton codes have the same value after being right-shifted by K bits;
[0197] The second division module 76 is configured to use the selected points to form the i-th detail division LOD layer, and the remaining points in the input point cloud of the i-th iteration except the selected points are determined as the input point cloud of the i+1-th iteration, i is updated to i+1, and the first judgment module 63 is returned to execute when the i-th iteration is performed, and it is determined whether the number of points in the input point cloud of the i-th iteration is equal to 0;
[0198] The fourth determination module 77 is configured to determine the 1st LOD layer to the (i-1)th LOD layer as the LOD layers after the point cloud to be divided when the number of points in the input point cloud of the i-th iteration is equal to 0.
[0199] In an optional embodiment, the third determining module 72 may also be configured as follows:
[0200] When the number of points in the input point cloud of the i-th iteration is not equal to 0, before the Morton code of the input point cloud of the i-th iteration is right-shifted by K bits, the value of K is determined according to the distribution of the point cloud to be divided.
[0201] In an optional embodiment, when i is greater than or equal to the first preset threshold, the third determination module 72 may also be configured as follows:
[0202] When the number of points in the input point cloud of the i-th iteration is not equal to 0, before the Morton code of the input point cloud of the i-th iteration is right-shifted by K bits, the value of K is determined according to the number of points in the input point cloud of the i-th iteration and the distribution of the input point cloud of the i-th iteration.
[0203] In an optional embodiment, when i is greater than or equal to a first preset threshold,
[0204] After the selected points are used to form the i-th detail division LOD layer, the remaining points in the input point cloud of the i-th iteration except the selected points are determined as the input point cloud of the i+1-th iteration, and i is updated to i+1, the decoder can also be configured as follows:
[0205] According to the input point cloud of the i-th iteration, the preset distance-based LOD division algorithm is called to divide the LOD layer;
[0206] The LOD layers obtained by division, the 1st LOD layer to the i-1th LOD layer are determined as: the LOD layers after the point cloud to be divided is divided.
[0207] In an optional embodiment, the second selection module 75 may be specifically configured as follows:
[0208] Sort the points in the input point cloud of the i-th iteration according to the Morton code of the input point cloud of the i-th iteration from small to large;
[0209] From the points whose Morton code values are equal after being shifted right by K bits, select the point that ranks first.
[0210] In an optional embodiment, the second selection module 75 may be specifically configured as follows:
[0211] Determine the centroid of the points whose Morton codes have the same value after being right-shifted by K bits;
[0212] The point closest to the centroid among the points with the same value of the Morton code after right shift by K bits is determined as a selected point.
[0213] In an optional embodiment, the second selection module 75 may be specifically configured as follows:
[0214] According to the number of points with the same value of the Morton code after right shift by K bits, determine the corresponding number of selections;
[0215] According to the corresponding selection number, select the selection number of points from the points with the same value of the Morton code after right shifting K bits.
[0216] In an optional embodiment, the second selection module 75 may be specifically configured as follows:
[0217] Sort the points in the input point cloud of the i-th iteration according to the Morton code of the input point cloud of the i-th iteration from small to large;
[0218] From the points with the same Morton code value after right shift by K bits, one point is selected every second preset threshold value according to the sorting result.
[0219] In an optional embodiment, the third determining module 72 may also be configured as follows:
[0220] The Morton code of the point cloud to be divided is shifted right by N bits, and the points with the same Morton code value after the right shift by N bits are grouped into a group of point clouds; wherein N is a positive integer;
[0221] Each group of point clouds is determined as the input point cloud of the first iteration.
[0222] Figure 8 A schematic diagram of the structure of another optional encoder proposed in the embodiment of the present application, such as Figure 8 As shown, the encoder 800 proposed in the embodiment of the present application may also include a processor 81 and a storage medium 82 storing executable instructions of the processor 81. The storage medium 82 relies on the processor 81 to perform operations through a communication bus 83. When the instructions are executed by the processor 81, the division method described in one or more of the above embodiments is executed.
[0223] It should be noted that, in actual application, the various components in the encoder 800 are coupled together via the communication bus 83. It is understandable that the communication bus 83 is used to realize the connection and communication between these components. In addition to the data bus, the communication bus 83 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Figure 8 Various buses are labeled as communication buses 83.
[0224] Fig. 9 A schematic diagram of the structure of another optional decoder proposed in the embodiment of the present application is shown in FIG. Fig. 9 As shown, the decoder 900 proposed in the embodiment of the present application may also include a processor 91 and a storage medium 92 storing executable instructions of the processor 91. The storage medium 92 relies on the processor 91 to perform operations through a communication bus 93. When the instructions are executed by the processor 91, the division method described in one or more of the above embodiments is executed.
[0225] It should be noted that, in actual application, the various components in the decoder 900 are coupled together via the communication bus 93. It is understandable that the communication bus 93 is used to realize the connection and communication between these components. In addition to the data bus, the communication bus 93 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, Fig. 9 Various buses are labeled as communication buses 93.
[0226] An embodiment of the present application provides a computer storage medium storing executable instructions. When the executable instructions are executed by one or more processors, the processors execute the partitioning method described in one or more of the above embodiments.
[0227] It can be understood that the memory in the embodiments of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can 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 can be a random access memory (RAM), which is used as an external cache. By way of example and 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 (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus random access memory (DRRAM). The memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0228] The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor 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 gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to perform, or a combination of hardware and software modules in the decoding processor to perform. The software module may be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0229] It is understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in the present application, or a combination thereof.
[0230] For software implementation, the techniques described herein can be implemented by modules (e.g., procedures, functions, etc.) that perform the functions described herein. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.
[0231] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0232] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0233] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0234] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
[0235] Industrial Applicability
[0236] The embodiment of the present application provides a division method, an encoder, a decoder and a computer storage medium, which obtain a point cloud to be divided, calculate the Morton code of the point cloud to be divided, determine the point cloud to be divided as the input point cloud of the first iteration, and when performing the i-th iteration, determine whether the number of points in the input point cloud of the i-th iteration is equal to 0. When the number of points in the input point cloud of the i-th iteration is not equal to 0, shift the Morton code of the input point cloud of the i-th iteration right by K bits, select a point from the points whose Morton code values are equal after the right shift by K bits, and use the selected point to form the i-th iteration. i LOD layers, the remaining points in the input point cloud of the i-th iteration except the selected points are determined as the input point cloud of the i+1-th iteration, i is updated to i+1, and the execution is returned. When the i-th iteration is performed, it is determined whether the number of points in the input point cloud of the i-th iteration is equal to 0. When the number of points in the input point cloud of the i-th iteration is equal to 0, the 1st LOD layer to the i-1th LOD layer are determined as the LOD layers after the point cloud to be divided, which improves the accuracy of neighbor node prediction based on the LOD layer, thereby improving the efficiency of encoding and decoding.
Claims
1. A point cloud segmentation method, applied to a decoder, comprising: Calculating a Morton code of a point cloud, wherein the point cloud is a point cloud to be segmented; Determine the point cloud as an input point cloud for iteration; According to the number of points in the input point cloud of the i-th iteration, the Morton code of the input point cloud of the i-th iteration is shifted right by K bits, including: when the number of points in the input point cloud of the i-th iteration is not equal to 0, the Morton code of the input point cloud of the i-th iteration is shifted right by K bits; wherein K is a positive integer; Select a point from the points whose Morton code value is equal after right shift by K bits; The selected points are used to form an i-th detail division LOD layer, wherein the i-th detail division LOD layer is the i-th LOD layer obtained after point cloud division of the point cloud to be divided.
2. The method according to claim 1, wherein: Before right-shifting the Morton code of the input point cloud of the i-th iteration by K bits according to the number of points in the input point cloud of the i-th iteration, the method further includes: The value of K is determined according to the distribution of the point cloud.
3. The method according to claim 1, wherein: When i is greater than or equal to a first preset threshold, before right-shifting the Morton code of the input point cloud of the i-th iteration by K bits according to the number of points in the input point cloud of the i-th iteration, the method further includes: The value of K is determined according to the number of points in the input point cloud of the i-th iteration and the distribution of the input point cloud of the i-th iteration.
4. The method according to claim 1, wherein: When i is greater than or equal to a first preset threshold, after using the selected points to form an i-th detail division LOD layer, the method further includes: According to the input point cloud of the i-th iteration, calling a preset distance-based LOD division algorithm to divide the LOD layer; The LOD layers obtained by division, the 1st LOD layer to the i-1th LOD layer are determined as: the LOD layers after the point cloud is divided.
5. The method according to claim 1, wherein: The step of selecting a point from the points where the values of the Morton codes after right shift by K bits are equal includes: Sort the points in the input point cloud of the i-th iteration according to the Morton codes of the input point cloud of the i-th iteration from small to large; From the points whose Morton codes have the same value after being right-shifted by K bits, the point ranked first is selected.
6. The method according to claim 1, wherein: The step of selecting a point from the points where the values of the Morton codes after right shift by K bits are equal includes: Determine the centroid of the points whose values of the Morton codes after the right shift by K bits are equal; The point closest to the centroid among the points having the same value of the Morton code after being right-shifted by K bits is determined as the selected point.
7. The method according to claim 1, wherein: After the Morton code of the input point cloud of the i-th iteration is right-shifted by K bits according to the number of points in the input point cloud of the i-th iteration, and before the selected points are used to form the i-th detail division LOD layer, the method further includes: According to the number of points with the same value of the Morton code after right shift by K bits, determine the corresponding number of selections; According to the corresponding selected number, the selected number of points are selected from the points whose values of the Morton code after being right-shifted by K bits are equal.
8. The method according to claim 1, wherein: After the Morton code of the input point cloud of the i-th iteration is right-shifted by K bits according to the number of points in the input point cloud of the i-th iteration, and before the selected points are used to form the i-th detail division LOD layer, the method further includes: Sort the points in the input point cloud of the i-th iteration according to the Morton codes of the input point cloud of the i-th iteration from small to large; From the points with the same Morton code value after right shift by K bits, one point is selected every second preset threshold value according to the sorting result.
9. The method according to claim 1, wherein: After obtaining the Morton code of the point cloud, and before right-shifting the Morton code of the input point cloud of the i-th iteration by K bits according to the number of points in the input point cloud of the i-th iteration, the method further includes: Shifting the Morton code of the point cloud right by N bits, and forming a group of point clouds with points having the same Morton code value after the Morton code is shifted right by N bits; wherein N is a positive integer; Each set of point clouds is respectively determined as input point clouds of the iteration.
10. A point cloud segmentation method, applied to an encoder, comprising: Calculating a Morton code of a point cloud, wherein the point cloud is a point cloud to be segmented; Determine the point cloud as an input point cloud for iteration; According to the number of points in the input point cloud of the i-th iteration, the Morton code of the input point cloud of the i-th iteration is shifted right by K bits, including: when the number of points in the input point cloud of the i-th iteration is not equal to 0, the Morton code of the input point cloud of the i-th iteration is shifted right by K bits; wherein K is a positive integer; Select a point from the points whose Morton code value is equal after right shift by K bits; The selected points are used to form an i-th detail division LOD layer, wherein the i-th detail division LOD layer is the i-th LOD layer obtained after point cloud division of the point cloud to be divided.
11. The method according to claim 10, wherein: Before right-shifting the Morton code of the input point cloud of the i-th iteration by K bits according to the number of points in the input point cloud of the i-th iteration, the method further includes: The value of K is determined according to the distribution of the point cloud.
12. An encoder, wherein: include: A first calculation module is configured to calculate a Morton code of a point cloud, wherein the point cloud is a point cloud to be divided; A first determination module is configured to determine the point cloud as an iterative input point cloud; A first right shift module is configured to right shift the Morton code of the input point cloud of the i-th iteration by K bits according to the number of points in the input point cloud of the i-th iteration, comprising: when the number of points in the input point cloud of the i-th iteration is not equal to 0, right shifting the Morton code of the input point cloud of the i-th iteration by K bits; wherein K is a positive integer; A first selection module is configured to select a point from points having the same value of the Morton code after right shift by K bits; The first division module is configured to use the selected points to form an i-th detail division LOD layer, wherein the i-th detail division LOD layer is the i-th LOD layer obtained after point cloud division of the point cloud to be divided.
13. The encoder according to claim 12, wherein: The first determining module is further used for: The value of K is determined according to the distribution of the point cloud.
14. A decoder, wherein: include: A second calculation module is configured to calculate a Morton code of a point cloud, wherein the point cloud is a point cloud to be divided; A third determination module is configured to determine the point cloud as an iterative input point cloud; A second right shift module is configured to right shift the Morton code of the input point cloud of the i-th iteration by K bits according to the number of points in the input point cloud of the i-th iteration, comprising: when the number of points in the input point cloud of the i-th iteration is not equal to 0, right shifting the Morton code of the input point cloud of the i-th iteration by K bits; wherein K is a positive integer; The second selection module is configured to select a point from the points whose values of the Morton codes after being right-shifted by K bits are equal; The second division module is configured to use the selected points to form an i-th detail division LOD layer, wherein the i-th detail division LOD layer is the i-th LOD layer obtained after point cloud division of the point cloud to be divided.
15. The decoder according to claim 14, wherein: The third determination module is further used for: The value of K is determined according to the distribution of the point cloud.
16. An encoder, wherein: The encoder comprises: A processor and a storage medium storing instructions executable by the processor, wherein the storage medium relies on the processor to perform operations through a communication bus, and when the instructions are executed by the processor, the partitioning method described in any one of claims 10 to 11 is executed.
17. A decoder, wherein: The decoder comprises: A processor and a storage medium storing instructions executable by the processor, wherein the storage medium relies on the processor to perform operations through a communication bus, and when the instructions are executed by the processor, the partitioning method described in any one of claims 1 to 9 is executed.
18. A computer-readable storage medium, wherein: Executable instructions are stored, and when the executable instructions are executed by one or more processors, the processors execute the partitioning method described in any one of claims 1 to 11.
Citation Information
Patent Citations
Point cloud encoding and decoding method, encoding device and decoding device
CN109889840A
Point Cloud Compression
US20190080483A1