Point cloud attribute encoding method and decoding method based on weighted three-dimensional Haar transform
By adopting weighted three-dimensional Haal transform in point cloud attribute encoding, the problem of failing to effectively utilize point cloud attribute correlation in the prior art is solved, and more efficient point cloud attribute compression and coding performance is achieved.
Patent Information
- Application Number
- CN202010859079.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-24
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2040-08-24
AI Technical Summary
The prior art fails to effectively utilize the attribute correlation between child nodes in point cloud attribute encoding and decoding, resulting in poor point cloud attribute compression performance.
The point cloud attribute encoding method based on weighted three-dimensional Haal transform is adopted, and the point cloud is divided by octree, and the weighted three-dimensional Haal transform is used to decompose it into three directions of weighted one-dimensional Haal transform, and the transformation output coefficient is calculated, and the correlation of the attribute values of the child nodes is removed by using high-frequency coefficients to achieve more effective compression.
The point cloud attribute compression performance is improved, and the computing efficiency of encoding and decoding is improved by effectively utilizing the sparse characteristics and attribute correlation of point cloud data.
Smart Images

Figure CN114092631B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of point cloud processing, and particularly relates to a point cloud attribute encoding method and a decoding method based on weighted three-dimensional Haar transform. Background Art
[0002] Three-dimensional point cloud is an important manifestation of the digitization of the real world. With the rapid development of three-dimensional scanning devices (such as lasers, radars, etc.), the accuracy and resolution of point clouds have become higher. High-precision point clouds are widely used in the construction of urban digital maps and play a technical support role in many popular researches such as smart cities, autonomous driving, and cultural relic protection. Point clouds are obtained by sampling the surface of an object by a three-dimensional scanning device. The number of points in a frame of point cloud is generally in the millions, and each point contains geometric information and attribute information such as color and reflectivity, and the data volume is extremely large. The huge data volume of three-dimensional point clouds poses great challenges to data storage, transmission, etc., so it is very important to compress point clouds.
[0003] Point cloud compression is mainly divided into geometric compression and attribute compression. Currently, the point cloud attribute compression framework described in the test platform PCEM provided by the Chinese AVS (Audio Video coding Standard) Point Cloud Compression Working Group mainly uses neighbor point prediction. However, the above-mentioned related technologies do not make good use of the correlation of point cloud attributes, resulting in reduced compression performance.
[0004] Therefore, the existing technology still needs to be improved and developed. Summary of the Invention
[0005] The present invention provides a point cloud attribute encoding method and a decoding method based on weighted three-dimensional Haar transform, aiming to solve the problem that the existing point cloud attribute encoding and decoding methods cannot effectively utilize the attribute correlation between child nodes, resulting in poor point cloud attribute compression performance.
[0006] In order to solve the above technical problems, the technical solutions adopted by the present invention are as follows:
[0007] A point cloud attribute encoding method based on weighted three-dimensional Haar transform, which includes the steps of:
[0008] Dividing the point cloud into an octree to construct an N-layer octree structure;
[0009] For the N-1 layer of the N-layer octree structure, taking the attribute values of the 8 child nodes of the current layer node as the transform input coefficients for weighted three-dimensional Haar transform, decomposing the weighted three-dimensional Haar transform into weighted one-dimensional Haar transforms in three directions, and calculating the corresponding N-1 layer transform output coefficients according to the set calculation rules in the second and third direction transforms, including at least one low-frequency coefficient, and the number of transform output coefficients is the same as the number of non-empty child nodes of the current layer node;
[0010] Starting from the N-2 layer of the N-layer octree structure to the root node, the low-frequency coefficients output by the transformation of the previous layer are used as the input coefficients for the weighted three-dimensional Haar transformation of the child nodes of the current layer nodes, and the transformed output coefficients are obtained.
[0011] The root node transformed output coefficients and the high-frequency coefficients output by the transformation of other layers are used as the point cloud transformed output coefficients.
[0012] The point cloud attribute coding method based on weighted three-dimensional Haar transformation, wherein the step of performing weighted three-dimensional Haar transformation on the attribute values of the child nodes of the current node to obtain the N-1 layer transformed output coefficients includes:
[0013] Perform the first direction transformation: Set the child node weight W0 according to the number of points in the spatial range corresponding to the child node. When there are no points in the spatial range corresponding to the child node, that is, an empty child node, set its weight W0 to 0 and the corresponding attribute value to 0; Calculate the weighted sum of the attribute values of 2 child nodes along the first direction as the first direction output low-frequency coefficient DC1, and its calculation formula is where a 1 , a 2 represents the attribute values of 2 child nodes, w0 1 , w0 2 represents the weights of 2 child nodes. Calculate the weighted difference of the attribute values of 2 child nodes along the first direction as the first direction output high-frequency coefficient AC1, and its calculation formula is Calculate the sum of the weights of 2 child nodes as the weights W1 of DC1 and AC1; Perform transformation on four pairs of groups and output four pairs of different low-frequency coefficients DC1, high-frequency coefficients AC1 and weights W1;
[0014] Perform the second direction transformation: Use the output coefficients DC1 and AC1 obtained from the first direction transformation as the input coefficients for the second direction transformation. When both of the two input coefficients for the transformation are not from empty child nodes, calculate the weighted sum and difference of the two input coefficients along the second direction according to the weight W1 to obtain the output coefficients DC2 and AC2, and calculate the sum of the weights of the two input coefficients as the weights W2 of DC2 and AC2; When one of the two input coefficients for the transformation comes from an empty child node and its weight is not 0, then calculate the corresponding output coefficient DC2, and calculate the sum of the weights of the 2 input coefficients as the weight W2 of DC2; When both of the two input coefficients come from empty child nodes and their weights are not 0, then do not calculate and output any coefficients; Perform transformation on four pairs of groups and output the low-frequency coefficient DC2, high-frequency coefficient AC2 and weight W2;
[0015] Perform the third-direction transformation: Take the output coefficients DC2 and AC2 obtained from the second-direction transformation as the input coefficients for the third-direction transformation. Divide them into four pairs along the third direction and perform the transformation separately. When both of the two input coefficients for the transformation are not from empty child nodes, perform a weighted one-dimensional Haar transformation according to the weight W2 to obtain a low-frequency coefficient and a high-frequency coefficient; when one of the two input coefficients for the transformation is from an empty child node, calculate the output low-frequency coefficient by performing a weighted one-dimensional Haar transformation according to the weight W2; when both of the two coefficients for the transformation are from empty child nodes, do not calculate and output any coefficients; when there is only one input transformation coefficient and it is not from an empty child node, take the input coefficient as the output low-frequency coefficient; when there is no input coefficient, do not calculate and output any coefficients; Perform the transformation on the four pairs of groups, and output the low-frequency coefficient DC3 and the high-frequency coefficient AC3. The number of output coefficients is the same as the number of non-empty child nodes of the current node; Take the output coefficients of the third-direction transformation as the transformation output coefficients of the nodes in the current layer.
[0016] Take the low-pass coefficients output from the N - 1 layer transformation as the transformation input coefficients of the nodes in the N - 2 layer and perform the same weighted three-dimensional Haar transformation as above to obtain the low-frequency and high-frequency coefficients output from the N - 2 layer transformation; Take the low-frequency coefficients output from the N - 2 layer transformation as the transformation input coefficients of the nodes in the N - 3 layer; and so on. Take the low-frequency coefficients output from the previous layer transformation as the transformation input coefficients of the child nodes in the current layer and perform the weighted three-dimensional Haar transformation to obtain the transformation output coefficients until the root node completes the transformation; This process will obtain a low-frequency coefficient of the root node and multiple high-frequency coefficients from different layers.
[0017] The point cloud attribute coding method based on weighted three-dimensional Haar transformation, wherein, after completing the N - 1 inter-layer transformations, it further includes the steps:
[0018] Directly perform entropy coding on the point cloud transformation output coefficients to obtain the transformed coefficient bitstream;
[0019] Or, perform quantization on the point cloud transformation output coefficients to obtain the quantized transformation coefficients; Perform entropy coding on the quantized transformation coefficients to obtain the quantized transformation coefficient bitstream.
[0020] The point cloud attribute coding method based on weighted three-dimensional Haar transformation, wherein, before performing the weighted three-dimensional Haar transformation, it further includes the steps:
[0021] Convert the attribute values in the RGB color space to the attribute values in the YUV space.
[0022] The point cloud attribute coding method based on weighted three-dimensional Haar transformation, wherein, after taking the transformation output coefficients of the root node and the high-frequency coefficients output from the other layer transformations as the point cloud transformation output coefficients, it further includes the steps:
[0023] Calculate the difference between the original point cloud attribute value and the reconstructed point cloud attribute value as the attribute residual value, and perform entropy coding on the attribute residual value to obtain the residual point cloud bitstream;
[0024] Alternatively, calculate the difference between the original point cloud attribute value and the reconstructed point cloud attribute value as the attribute residual value; perform quantization on the attribute residual value to obtain the attribute quantization residual coefficient; and perform coding on the attribute quantization residual coefficient to obtain the residual point cloud bitstream;
[0025] Alternatively, calculate the difference between the original point cloud attribute value and the reconstructed point cloud attribute value as the attribute residual value; perform quantization on the attribute residual value to obtain the attribute quantization residual coefficient; perform coding on the attribute quantization residual coefficient to obtain the residual point cloud bitstream; and perform coding on the attribute quantization residual remainder.
[0026] A point cloud attribute encoding device based on weighted three-dimensional Haar transform, which includes a processor, a memory, an encoding module, and a bus;
[0027] The memory stores a computer-readable program executable by the processor;
[0028] The bus realizes the connection and communication between the processor and the memory;
[0029] The processor is used to call the encoding module to execute the computer-readable program to implement the steps in the method of the present invention.
[0030] A point cloud attribute decoding method based on weighted three-dimensional Haar transform, which includes the steps of:
[0031] Perform octree partitioning on the point cloud to construct an N-layer octree structure;
[0032] Decode the point cloud bitstream to obtain the point cloud transform coefficients;
[0033] For the first layer of the N-layer octree structure, use the transform coefficients decoded from the bitstream as the inverse transform input coefficients for weighted three-dimensional Haar inverse transform. Decompose the weighted three-dimensional Haar transform into weighted one-dimensional Haar inverse transforms in three directions. Calculate the corresponding transform output coefficients according to the set calculation rules in the second and third direction transforms. Use the inverse transform output coefficients corresponding to the non-empty child nodes obtained from the first direction inverse transform as the inverse transform output coefficients of the current layer;
[0034] Starting from the second layer to the N-1 layer of the N-layer octree structure, use the reconstructed output coefficients obtained from the inverse transform of the parent node of the previous layer and the transform coefficients decoded from the bitstream as the child node inverse transform input coefficients of the current layer nodes for weighted three-dimensional Haar inverse transform to obtain the inverse transform output coefficients;
[0035] Use the inverse transform output coefficients of the N-1 layer as the point cloud attribute transform reconstruction values.
[0036] The method for decoding point cloud attributes based on weighted three-dimensional Haar transform, wherein the step of using the transform coefficients corresponding to each non-empty child node as the input coefficients of the inverse transform for weighted three-dimensional Haar inverse transform includes:
[0037] Calculate the weights of the inverse transforms in three directions in sequence: Set the weights of the first-direction inverse transform of 8 child nodes, collectively referred to as W0. Set the weight W0 of the child node according to the number of points in the spatial range corresponding to the child node. When there are no points in the spatial range corresponding to the child node, that is, an empty child node, set its weight W0 to 0, corresponding to 8 different W0 values; Divide the weights W0 of the 8 child nodes into four pairs along the first direction, and calculate the sum of each pair of weights W0 in sequence as the weights of the high-frequency coefficient and the low-frequency coefficient of the corresponding second-direction inverse transform, collectively referred to as W1. The four pairs of weights are calculated as above, and four pairs of different weights W1 are output; Divide the weights W1 of the second-direction inverse transform into four pairs along the second direction, and calculate the weights of the third-direction inverse transform in sequence, collectively referred to as W2. When the 2 weights participating in the calculation are not from empty child nodes, the sum value of the two weights W1 is used as the weights W2 of the high-frequency coefficient and the low-frequency coefficient of the third-direction inverse transform; When one of the 2 weights participating in the calculation comes from an empty child node and its value is not 0, the sum value of the two weights W1 is used as the weight W2 of the high-frequency coefficient of the third-direction inverse transform; When the 2 weights participating in the calculation both come from empty child nodes and their values are not 0, then no weight is calculated and output. The four pairs of weights W1 are processed as above, and at most 8 weights W2 in the third direction are output.
[0038] Perform the third-direction inverse transform: Use the transform coefficients obtained by decoding the point cloud bitstream as the input coefficients of the third-direction transform, and group them along the third direction. When there are two input coefficients in a group of the transform, perform a weighted one-dimensional Haar inverse transform along the third direction according to the weight W2 to obtain the reconstructed output coefficients RDC2 and RAC2; When there is only one input transform coefficient in a group of the transform and there are two weights W2, set the reconstructed output coefficient RAC2 to 0, and perform a weighted one-dimensional Haar inverse transform according to the weight W2 to obtain the reconstructed output coefficient RDC2; When there is only one input transform coefficient in a group of the transform and there is only one weight W2, set the reconstructed output coefficient RDC2 equal to the input transform coefficient. There are at most four inverse transforms processed as above, and at most eight reconstructed output coefficients are output.
[0039] Perform the inverse transform in the second direction: Use the reconstructed output coefficients RDC2 and RAC2 obtained from the inverse transform in the third direction as the input coefficients for the transform in the second direction. Group them along the second direction. When there are two input coefficients in a group of the transform, calculate the weighted difference and sum of the two input coefficients along the second direction according to the weight W1 to obtain the reconstructed output coefficients RDC1 and RAC1. When there is only one input transform coefficient in a group of the transform, set the reconstructed output coefficient RAC1 to 0, and perform a weighted one-dimensional Haar inverse transform according to the weight W1 to obtain the reconstructed output coefficient RDC1. There are at most four inverse transforms processed as above, and eight reconstructed output coefficients are output.
[0040] Perform the inverse transform in the first direction: Use the output reconstructed coefficients RDC1 and RAC1 obtained from the inverse transform in the second direction as the input coefficients for the inverse transform in the first direction. Divide them into four groups along the first direction, with two input coefficients in each group. Perform a weighted one-dimensional Haar inverse transform along the first direction according to the weight W0 respectively to obtain the reconstructed output coefficients corresponding to the two sub-nodes. There are four inverse transforms processed as above, and use the inverse transform output coefficients corresponding to the non-empty sub-nodes obtained from the inverse transform in the first direction as the inverse transform output coefficients of the current layer.
[0041] The point cloud attribute decoding method based on weighted three-dimensional Haar transform, wherein the step of decoding the point cloud bitstream to obtain the point cloud transform coefficients includes:
[0042] Perform entropy decoding on the point cloud bitstream to obtain the point cloud transform coefficients;
[0043] Or, perform entropy decoding on the point cloud bitstream to obtain the quantized transform coefficients; perform inverse quantization on the quantized transform coefficients to obtain the point cloud transform coefficients.
[0044] The point cloud attribute decoding method based on weighted three-dimensional Haar transform, wherein after performing the weighted three-dimensional Haar inverse transform, the following step is further included:
[0045] Convert the reconstructed attribute values in the YUV color space to the reconstructed attribute values in the RGB space.
[0046] The point cloud attribute decoding method based on weighted three-dimensional Haar transform, wherein after using the output transform coefficients of the N-1 layer as the point cloud attribute transform reconstruction values, the following steps are further included:
[0047] Perform entropy decoding on the point cloud bitstream to obtain the attribute residual values; calculate the sum of the attribute residual values and the transform reconstruction point cloud attribute values as the point cloud attribute reconstruction values;
[0048] Alternatively, perform entropy decoding on the point cloud bitstream to obtain the attribute quantization residual coefficients; perform inverse quantization on the attribute quantization residual coefficients to obtain the inverse quantized attribute residual values; calculate the sum of the inverse quantized attribute residual values and the transformed reconstructed point cloud attribute values as the point cloud attribute reconstruction values;
[0049] Alternatively, perform entropy decoding on the point cloud bitstream to obtain the attribute quantization residual coefficients and the attribute quantization residual remainders; perform inverse quantization on the attribute quantization residual coefficients to obtain the inverse quantized attribute residual values; calculate the sum of the attribute quantization residual remainders, the inverse quantized attribute residual values, and the transformed reconstructed point cloud attribute values as the point cloud attribute reconstruction values.
[0050] A point cloud attribute decoding device based on weighted three-dimensional Haar transform, which includes a processor, a memory, an encoding module, and a bus;
[0051] The memory stores a computer-readable program executable by the processor;
[0052] The bus realizes the connection and communication between the processor and the memory;
[0053] The processor is used to call the encoding module to execute the computer-readable program to implement the steps in the method of the present invention.
[0054] Beneficial effects: Compared with the prior art, in view of the sparse characteristics of point cloud data, the present invention provides a point cloud attribute encoding method and a decoding method based on weighted three-dimensional Haar transform. According to the decomposability of the three-dimensional Haar transform, it is transformed into one-dimensional transforms (A1, A2, A3) in three directions. The intermediate results of each transform can be regarded as expressions in the frequency domain. Therefore, the weights of each bit in the frequency domain are set to be equal, that is, the weight of DC is equal to the weight of AC. Except for the initial weight setting, the present invention does not consider the influence of the positions not occupied by data points on the subsequent weights. The weight setting method requires fewer calculations of the transformation matrix, which can improve the calculation efficiency of point cloud attribute compression; the high-frequency coefficients obtained by the weighted three-dimensional Haar transform in the present invention utilize the spatial information of 8 position points, remove the correlation of the corresponding attribute values at 8 positions, and achieve more effective compression. The present invention applies three-dimensional wavelet transform to the attribute compression of point clouds. The point cloud attribute encoding method and decoding method based on weighted three-dimensional Haar transform provided by the present invention solve the problem of the sparse characteristics of point cloud data, can improve the utilization of the attribute correlation between child nodes, and thus effectively improve the point cloud attribute compression performance. Description of the Drawings
[0055] Figure 1 It is a flowchart of a preferred embodiment of a point cloud attribute encoding method based on weighted three-dimensional Haar transform provided by the present invention.
[0056] Figure 2Schematic diagram of constructing an N - layer octree structure for the present invention.
[0057] Figure 3 Specific schematic diagram of a point - cloud attribute encoding method based on weighted three - dimensional Haar transform provided by the present invention.
[0058] Figure 4 Schematic diagram for calculating forward - transform coefficients within a node.
[0059] Figure 5 Specific schematic diagram of the termination rule of the weighted three - dimensional Haar transform provided by the present invention.
[0060] Figure 6 Schematic diagram of the structure principle of a point - cloud attribute encoding device based on weighted three - dimensional Haar transform provided by the present invention.
[0061] Figure 7 Flowchart of a preferred embodiment of a point - cloud attribute decoding method based on weighted three - dimensional Haar transform provided by the present invention.
[0062] Figure 8 Schematic flowchart of a point - cloud attribute decoding method based on weighted three - dimensional Haar transform provided by the present invention.
[0063] Figure 9 Specific schematic diagram of a point - cloud attribute decoding method based on weighted three - dimensional Haar transform provided by the present invention.
[0064] Figure 10 Schematic diagram for calculating inverse - transform coefficients within a node. Detailed implementation manners
[0065] The present invention provides a point - cloud attribute encoding method and a decoding method based on weighted three - dimensional Haar transform. To make the objectives, technical solutions and effects of the present invention clearer and more definite, the following further describes the present invention in detail with reference to the accompanying drawings and by way of examples. It should be understood that the specific examples described herein are only used to explain the present invention and are not used to limit the present invention.
[0066] Those skilled in the art can understand that, unless specifically stated, the singular forms "a", "an", "the" and "said" used herein may also include the plural forms. It should be further understood that the term "comprising" used in the specification of the present invention means the presence of the stated features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or their groups. It should be understood that when we say that an element is "connected" or "coupled" to another element, it can be directly connected or coupled to other elements, or there may also be intermediate elements. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The phrase "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.
[0067] Those skilled in the art can understand that, unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meaning as the general understanding of those of ordinary skill in the art to which the present invention belongs. It should also be understood that terms such as those defined in a general dictionary should be understood to have a meaning consistent with the meaning in the context of the prior art, and will not be interpreted with an idealized or overly formal meaning unless specifically defined as here.
[0068] The following further illustrates the content of the invention by describing the embodiments in conjunction with the accompanying drawings.
[0069] Please refer to Figure 1 , Figure 1 which is a flowchart of a preferred embodiment of a point cloud attribute encoding method based on weighted three-dimensional Haar transform provided by the present invention. As shown in the figure, it includes the steps:
[0070] S10. Divide the point cloud into an octree to construct an N-layer octree structure;
[0071] S20. For the N-1 layer of the N-layer octree structure, use the attribute values of the 8 child nodes of the current layer node as the transform input coefficients for weighted three-dimensional Haar transform. Decompose the weighted three-dimensional Haar transform into weighted one-dimensional Haar transforms in three directions, and calculate the corresponding N-1 layer transform output coefficients according to the set calculation rules in the second and third direction transforms, including at least one low-frequency coefficient. The number of transform output coefficients is the same as the number of non-empty child nodes of the current layer node;
[0072] S30. Starting from the N-2 layer of the N-layer octree structure to the root node, use the low-frequency coefficients output by the previous layer transform as the child node transform input coefficients of the current layer node for weighted three-dimensional Haar transform to obtain the transform output coefficients;
[0073] S40. Use the root node transformation output coefficients and the other layer transformation output high-frequency coefficients as the point cloud transformation output coefficients.
[0074] Specifically, in this embodiment, the steps S10 - S40 are executed at the encoding end to implement the attribute transformation encoding of the point cloud. In this embodiment, the weighted three-dimensional Haar transform is applied to the attribute encoding of the point cloud, removing the correlation between point cloud attributes and improving the attribute compression performance. To better illustrate the embodiments of the present invention, Figure 2 Fig. is a schematic diagram of the octree structure of the point cloud. The geometric positions of the points in the point cloud are represented by three-dimensional Cartesian coordinates (X, Y, Z). The cube enclosing all the points of the point cloud is used as the root node, and each node is divided into 8 sub-nodes, which can be divided layer by layer until the sub-node contains only one point.
[0075] In some embodiments, first, the point cloud is decomposed into an octree, as Figure 2 shown, to obtain an octree structure with N layers. Based on this octree structure, a weighted three-dimensional Haar transform is performed. As Figure 3 shown, starting from the N - 1 layer, a weighted three-dimensional Haar transform is performed on the signals at eight positions within each node. For the weighted three-dimensional Haar transform of the 2*2*2 spatial scale, in this embodiment, the signal within each node is set as F ∈ R 2×2×2 , and the transformed coefficient is C ∈ R 2×2×2 . According to the decomposability of the three-dimensional Haar transform, it can be transformed into three-directional transforms, and the transformation matrices are A 1 ∈ R 2×2 , A 2 ∈ R 2×2 , A 3 ∈ R 2×2 . The formula for the three-dimensional Haar transform can be expressed as: C = F × 1 A 1 × 2 A 2 × 3 A 3 .
[0076] In this embodiment, assume an M-dimensional tensor whose each element is represented as b(i 1 ,…,i m ,…,i M ), and a two-dimensional matrix whose each element is represented as t(j m ,i m ).
[0077] For the unweighted Haar transform matrix, we have Due to the particularity of the point cloud, there will be situations where the nodes are not occupied by data points. Therefore, it is necessary to use the weighted Haar transform, and the transformation matrix is as follows: where, w a , w b The calculation method is as shown in Figure 3 and Figure 4 Let the weight be W ∈ R 2×2×2 . Initially, the value of W(i, j, k) is the number of point cloud data points in the corresponding spatial range at the position (i, j, k) within the node (i, j, k = 0 or 1). As an example, the steps of performing a weighted three-dimensional Haar transform on the attribute values of the child nodes of the current node to obtain the transform output coefficients of the N - 1 layer include:
[0078] Perform the first - direction transform: Set the weight W0 of the child node according to the number of points in the spatial range corresponding to the child node. When there are no points in the spatial range corresponding to the child node, that is, it is an empty child node, set its weight W0 to 0 and the corresponding attribute value to 0. Calculate the weighted sum of the attribute values of 2 child nodes along the first direction as the first - direction output low - frequency coefficient DC1, calculate the weighted difference of the attribute values of 2 child nodes along the first direction as the first - direction output high - frequency coefficient AC1, and calculate the sum of the weights of 2 child nodes as the weight W1 of DC1 and AC1; Perform the transform on four pairs of groups and output four pairs of different low - frequency coefficients DC1, high - frequency coefficients AC1, and weights W1;
[0079] Perform the second - direction transform: Use the output coefficients DC1 and AC1 obtained from the first - direction transform as the input coefficients for the second - direction transform. When neither of the two input coefficients for the transform comes from an empty child node, calculate the weighted sum and difference of the two input coefficients along the second direction according to the weight W1 to obtain the output coefficients DC2 and AC2, and calculate the sum of the weights of the two input coefficients as the weight W2 of DC2 and AC2; When one of the two input coefficients for the transform comes from an empty child node and its weight is not 0, then calculate the corresponding output coefficient DC2 and calculate the sum of the weights of the 2 input coefficients as the weight W2 of DC2; When both input coefficients come from empty child nodes and their weights are not 0, then do not calculate or output any coefficients; Perform the transform on four pairs of groups and output the low - frequency coefficient DC2, high - frequency coefficient AC2, and weight W2;
[0080] Perform a third-direction transformation: Use the output coefficients DC2 and AC2 obtained from the second-direction transformation as the input coefficients for the third-direction transformation. Divide them into four pairs along the third direction and perform the transformation separately. When both of the two input coefficients for the transformation are not from empty child nodes, perform a weighted one-dimensional Haar transform according to the weight W2 to obtain a low-frequency coefficient and a high-frequency coefficient. When one of the two input coefficients for the transformation is from an empty child node, calculate the output low-frequency coefficient by performing a weighted one-dimensional Haar transform according to the weight W2. When both of the two coefficients for the transformation are from empty child nodes, do not calculate or output any coefficients. When there is only one input transformation coefficient and it is not from an empty child node, use the input coefficient as the output low-frequency coefficient. When there are no input coefficients, do not calculate or output any coefficients. Perform the transformation on the four pairs of groups, and output the low-frequency coefficient DC3 and the high-frequency coefficient AC3. The number of output coefficients is the same as the number of non-empty child nodes of the current node. Use the output coefficients of the third-direction transformation as the transformation output coefficients of the current layer node.
[0081] In some embodiments, in view of the sparse characteristics of the point cloud distribution, this embodiment will be processed according to the following two cases: When all eight transformation positions contain data points, use the general weighted three-dimensional Haar transform method introduced above. Finally, after the transformation, a low-frequency coefficient (DC3DC2DC1) and seven high-frequency coefficients (DC3DC2AC1, DC3AC2DC1, DC3AC2AC1, AC3DC2DC1, AC3DC2AC1, AC3AC2DC1, AC3AC2AC1) can be obtained. When the eight transformation positions contain empty data points, assume the number of positions containing data points is N (0 < N < 8). Then, for the positions in the node without point cloud data points, set their initial weight to 0 and the initial transformation input signal value to 0. According to Figure 4 the weight calculation method in, the corresponding weights for the A1, A2, and A3 transformations can be obtained. At the same time, in order to ensure that the number of effective input signal values is equal to the number of output transformation coefficients, that is, N (for example, among the initial eight positions, if there are 5 positions containing data points, then the number of output transformation coefficients is also 5), this embodiment sets the rule for early termination of the transformation as shown in Figure 5 :
[0082] 1) When a frequency domain coefficient of an input signal from an empty data point is involved in a certain transformation and its weight is not 0, stop the further transformation of its high-frequency transformation coefficient.
[0083] 2) When two frequency domain coefficients of input signals from empty data points are involved in a certain transformation and their weights are both not 0, stop this transformation and do not continue the transformation.
[0084] As Figure 5As shown, the examples of the transformation termination rules are as follows: According to the decomposability of 3D transformation, a 3D transformation can be converted into 1D transformations (A1, A2, A3) for three directions. The first table from top to bottom in the figure represents the position representation (the first row), the initial signal value (the second row), and the initial weight value (the third row) of a 3D transformation. After the transformation in the first direction, intermediate transformation coefficients are obtained, as shown in the second table. The first row is the transformation coefficients obtained after the A1 transformation, and the second row is the weight values to be used in the A2 transformation. After the transformation in the second direction, intermediate transformation coefficients are obtained, as shown in the third table. The first row is the transformation coefficients obtained after the A2 transformation, and the second row is the weight values to be used in the A3 transformation. The data crossed out by a horizontal line indicates useless coefficients that will not be further transformed according to the transformation termination rules. After the transformation in the third direction, the final transformation coefficients are obtained, as shown in the fourth table. The first item is the low-frequency coefficient, which will be further transformed in the octree node of the upper layer. The rest are high-frequency coefficients, which will be reserved for encoding.
[0085] In some embodiments, after finishing a three-dimensional transformation of one layer, the low-frequency coefficients (DC3DC2DC1) will be further transformed in the nodes of the upper layer. Thus, layer by layer upwards until the root node stops. After the transformation is completed, a set of transformation coefficients will be obtained, including a low-frequency coefficient from the root node and multiple high-frequency coefficients from different octree levels. Finally, according to the requirements, the entropy coding can be directly performed on the point cloud transformation output coefficients to obtain the transformation coefficient bitstream; or, the point cloud transformation output coefficients are quantized to obtain the quantized transformation coefficients; the entropy coding is performed on the quantized transformation coefficients to obtain the quantized transformation coefficient bitstream.
[0086] In some embodiments, since the existing transformation methods generally cannot achieve lossless attribute coding, an encoding residual processing module is designed in this embodiment to solve this problem. When encoding, the encoding residual processing module adopts the following three methods: calculating the difference between the original point cloud attribute value and the reconstructed point cloud attribute value as the attribute residual value, performing entropy coding on the attribute residual value to obtain the residual point cloud bitstream; or, calculating the difference between the original point cloud attribute value and the reconstructed point cloud attribute value as the attribute residual value; quantizing the attribute residual value to obtain the attribute quantization residual coefficient; encoding the attribute quantization residual coefficient to obtain the residual point cloud bitstream; or, calculating the difference between the original point cloud attribute value and the reconstructed point cloud attribute value as the attribute residual value; quantizing the attribute residual value to obtain the attribute quantization residual coefficient; encoding the attribute quantization residual coefficient to obtain the residual point cloud bitstream; encoding the attribute quantization residual remainder.
[0087] Specifically, in this embodiment, the point cloud is first transformed using a transformation method to obtain transformation coefficients, then quantized to obtain quantized transformation coefficients, followed by inverse quantization to obtain reconstructed transformation coefficients, and finally inverse transformation to obtain reconstructed point cloud attribute values. The reconstructed point cloud and the original point cloud are used as input data and fed into the encoding residual processing module. Inside the module, first, the attribute residual values of the reconstructed point cloud and the original point cloud at each spatial point are obtained. Then, the attribute residual values are quantized according to requirements to obtain attribute quantization residual coefficients. Finally, the attribute quantization residual coefficients are encoded.
[0088] For the limited-lossy condition, for the attribute residual values, quantization encoding needs to be performed according to a given quantization step size, which can achieve control of the Hausdorff error. For the lossless condition, the following two methods can be used: Method 1: For the attribute residual values, no quantization processing is required, that is, the quantization step size is 1, and the attribute residual values are directly encoded; Method 2: For the attribute residual values, the attribute quantization residual remainder and the attribute quantization residual coefficients are encoded.
[0089] In some embodiments, for the encoding of color, the calculation of the attribute residual values needs to be performed in the color space of the original point cloud. If the attribute values of the point cloud reconstruction generated by the inverse transformation and the attribute values of the original point cloud are in different color spaces. For example, the original point cloud has attribute values in the RGB color space, while the inverse transformation generates attribute values in the YUV color space. Then, the attribute values of the point cloud reconstruction generated by the inverse transformation need to be converted to the same color space as the original point cloud.
[0090] Based on the above point cloud attribute decoding method, the present invention also provides a point cloud attribute decoding device based on weighted three-dimensional Haar transform, as Figure 6 shown, which includes at least one processor 20; a display screen 21; and a memory 22. It may also include a communication interface 23 and a bus 24. Among them, the processor 20, the display screen 21, the memory 22, and the communication interface 23 can communicate with each other through the bus 24. The display screen 21 is set to display a user guidance interface preset in the initial setting mode. The communication interface 23 can transmit information. The processor 20 can call the logical instructions in the memory 22 to execute the method in the above embodiment.
[0091] In addition, when the logical instructions in the above memory 22 are implemented in the form of software functional units and sold or used as an independent product, they can be stored in a computer-readable storage medium.
[0092] The memory 22, as a computer-readable storage medium, can be configured to store software programs and computer-executable programs, such as program instructions or modules corresponding to the methods in the embodiments of the present disclosure. The processor 20 executes functional applications and data processing by running the software programs, instructions, or modules stored in the memory 22, that is, implements the methods in the above embodiments.
[0093] The memory 22 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 22 may include high-speed random access memory and may also include non-volatile memory. For example, various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes may also be transient storage media.
[0094] In addition, the specific processes of loading and executing multiple instruction processors in the above storage medium and the point cloud attribute encoding device have been described in detail in the above methods and will not be elaborated here one by one.
[0095] In some embodiments, a point cloud attribute decoding method based on weighted three-dimensional Haar transform is also provided, as Figure 7 shown, which includes the steps:
[0096] S100. Divide the point cloud into an octree to construct an N-layer octree structure;
[0097] S200. Decode the point cloud bitstream to obtain point cloud transform coefficients;
[0098] S300. For the first layer of the N-layer octree structure, use the transform coefficients decoded from the bitstream as the input coefficients of the inverse transform for weighted three-dimensional inverse Haar transform. Decompose the weighted three-dimensional Haar transform into weighted one-dimensional inverse Haar transforms in three directions. Calculate the corresponding transform output coefficients according to the set calculation rules in the second and third direction transforms. Use the inverse transform output coefficients corresponding to the non-empty child nodes obtained by the inverse transform in the first direction as the inverse transform output coefficients of the current layer;
[0099] S400. Starting from the second layer to the N - 1 layer of the N-layer octree structure, use the reconstructed output coefficients obtained by the inverse transform from the parent nodes of the previous layer and the transform coefficients decoded from the bitstream as the input coefficients of the inverse transform for the child nodes of the current layer nodes for weighted three-dimensional inverse Haar transform to obtain inverse transform output coefficients;
[0100] S500. Use the inverse transform output coefficients of the N - 1 layer as the point cloud attribute transform reconstruction values.
[0101] Specifically, first, divide the point cloud model into an octree structure with N layers. Starting from the first layer (root node) of the octree, perform a weighted three - dimensional Haar inverse transform on each non - empty node layer by layer, as Figure 8 shown. For the weighted three - dimensional Haar transform in the 2x2x2 spatial scale, in this embodiment, assume that the signal in each node is F ∈ R 2×2×2 , and the transformed coefficient is C ∈ R 2×2×2 . According to the decomposability of the three - dimensional Haar transform, it can be transformed into three - direction transforms, and the transformation matrices are A 1 ∈R 2×2 , A 2 ∈R 2×2 , A 3 ∈R 2×2 . The mathematical expression of the specific weighted three - dimensional Haar inverse transform is:
[0102] In some embodiments, such as Figure 9 and Figure 10As shown, the step of using the transform coefficients corresponding to each non-empty child node as the input coefficients for the inverse transform and performing a weighted three-dimensional Haar inverse transform includes: calculating the weights for the inverse transforms in three directions in sequence: setting the weights for the first-direction inverse transform of 8 child nodes, uniformly referred to as W0, and setting the weight W0 of the child node according to the number of points within the spatial range corresponding to the child node. When there are no points within the spatial range corresponding to the child node, that is, an empty child node, its weight W0 is set to 0, corresponding to 8 different W0 values; dividing the weights W0 of the 8 child nodes into four pairs along the first direction, and calculating the sum of each pair of weights W0 in sequence as the weights for the high-frequency coefficient and the low-frequency coefficient of the corresponding second-direction inverse transform, uniformly referred to as W1. The four pairs of weights are calculated as above, and four pairs of different weights W1 are output; dividing the weights W1 of the second-direction inverse transform into four pairs along the second direction, and calculating the weights for the third-direction inverse transform in sequence, uniformly referred to as W2. When both of the two weights participating in the calculation are not from empty child nodes, the sum value of the two weights W1 is used as the weights W2 for the high-frequency coefficient and the low-frequency coefficient of the third-direction inverse transform; when one of the two weights participating in the calculation is from an empty child node and its value is not 0, the sum value of the two weights W1 is used as the weight W2 for the high-frequency coefficient of the third-direction inverse transform; when both of the two weights participating in the calculation are from empty child nodes and their values are not 0, then no output weight is calculated. The four pairs of weights W1 are processed as above, and at most 8 weights W2 in the third direction are output; performing the third-direction inverse transform: using the transform coefficients obtained by decoding the point cloud bitstream as the input coefficients for the third-direction transform, and grouping them along the third direction. When there are two input coefficients in a group of the transform, perform a weighted one-dimensional Haar inverse transform along the third direction according to the weight W2 to obtain the reconstructed output coefficients RDC2 and RAC2; when there is only one input transform coefficient in a group of the transform and there are two weights W2, then set the reconstructed output coefficient RAC2 to 0, and perform a weighted one-dimensional Haar inverse transform according to the weight W2 to obtain the reconstructed output coefficient RDC2; when there is only one input transform coefficient in a group of the transform and there is only one weight W2, then set the reconstructed output coefficient RDC2 equal to the input transform coefficient. There are at most four inverse transforms processed as above, and at most eight reconstructed output coefficients are output; performing the second-direction inverse transform: using the reconstructed output coefficients RDC2 and RAC2 obtained from the third-direction inverse transform as the input coefficients for the second-direction transform, and grouping them along the second direction. When there are two input coefficients in a group of the transform, calculate the weighted difference and sum of the two input coefficients along the second direction according to the weight W1 to obtain the reconstructed output coefficients RDC1 and RAC1; when there is only one input transform coefficient in a group of the transform, then set the reconstructed output coefficient RAC1 to 0, and perform a weighted one-dimensional Haar inverse transform according to the weight W1 to obtain the reconstructed output coefficient RDC1;There are at most four inverse transforms as described above, outputting eight reconstructed output coefficients, and performing the inverse transform in the first direction: Using the output reconstruction coefficients RDC1 and RAC1 obtained from the inverse transform in the second direction as the input coefficients for the inverse transform in the first direction, dividing them into four groups along the first direction, with two input coefficients in each group, and respectively performing weighted one-dimensional Haar inverse transforms along the first direction according to the weight W0 to obtain the reconstructed output coefficients corresponding to two child nodes; there are four inverse transforms as described above, and using the inverse transform output coefficients corresponding to the non-empty child nodes obtained from the inverse transform in the first direction as the inverse transform output coefficients of the current layer.;
[0103] In some embodiments, each position within a node corresponds to a weight, and the weight is determined by the number of point cloud data points within the corresponding spatial range at that position. Regarding the sparse characteristics of the point cloud distribution, this embodiment will handle it in the following two cases: Case 1: All eight transform positions contain data points. We can directly use the inverse transform to inverse-transform a low-frequency coefficient (DC3DC2DC1) and seven high-frequency coefficients into the reconstructed input signal; Case 2: Among the eight transform positions, there are empty data points. Assuming the number of positions containing data points is N (0 < N < 8). For the positions within the node without point cloud data points, set their initial weights to 0 and the initial transform input signal values to 0. According to Figure 4 the weight calculation method in, the corresponding weights for the A1, A2, A3 transforms can be obtained. The weights for the inverse transform are exactly the same as those for the forward transform. At the same time, for the transform coefficients with early termination, this embodiment can directly reconstruct the input signal value from its corresponding low-frequency coefficient.
[0104] For the inverse transform within the root node, this embodiment can decode the corresponding low-frequency coefficient and multiple high-frequency coefficients from the bitstream as the input signal values. After the inverse transform, the input signal values will be transformed into the low-frequency transform coefficients of each non-empty node within the second layer and passed downwards.
[0105] For the inverse transform of non-empty nodes within the second layer, its input signal values are the corresponding high-frequency coefficients decoded from the bitstream and the low-frequency coefficients passed from the root node. The output signal values generated by the inverse transform of non-empty nodes within the second layer will be passed to the third layer as the low-frequency transform coefficients of their corresponding non-empty child nodes. Thus, layer by layer downwards, until the transformation of all non-empty nodes within the N - 1 layer ends and stops. After the transformation ends, a set of point cloud attribute values will be obtained, which are the reconstructed point cloud attribute values.
[0106] In some embodiments, the step of decoding the point cloud bitstream to obtain the point cloud transform coefficients includes: performing entropy decoding on the point cloud bitstream to obtain the point cloud transform coefficients; or, performing entropy decoding on the point cloud bitstream to obtain the quantized transform coefficients, and performing inverse quantization on the quantized transform coefficients to obtain the point cloud transform coefficients.
[0107] In some embodiments, for the color attribute, the transformation in this embodiment has better performance in the YUV space. Therefore, if the color attribute of the original point cloud is in the RGB space, the attribute values can be first subjected to color space conversion, and then the transformation can be performed in the YUV color space. Correspondingly, in the decoding process, the inverse transformation will generate the reconstructed color attribute values in the YUV space, and thus an inverse color space conversion is required to obtain the reconstructed color attribute values in the original point cloud color space (RGB color space).
[0108] In some embodiments, since the existing transformation methods generally cannot achieve lossless attribute decoding, this embodiment designs a decoding residual processing module to solve this problem. When decoding, the decoding residual processing module adopts the following three methods: performing entropy decoding on the point cloud bitstream to obtain attribute residual values; calculating the sum of the attribute residual values and the transformed reconstructed point cloud attribute values as the point cloud attribute reconstruction value; or, performing entropy decoding on the point cloud bitstream to obtain attribute quantization residual coefficients; performing inverse quantization on the attribute quantization residual coefficients to obtain inverse quantization attribute residual values; calculating the sum of the inverse quantization attribute residual values and the transformed reconstructed point cloud attribute values as the point cloud attribute reconstruction value; or, performing entropy decoding on the point cloud bitstream to obtain attribute quantization residual coefficients and attribute quantization residual remainders; performing inverse quantization on the attribute quantization residual coefficients to obtain inverse quantization attribute residual values; calculating the sum of the attribute quantization residual remainders, the inverse quantization attribute residual values, and the transformed reconstructed point cloud attribute values as the point cloud attribute reconstruction value.
[0109] Specifically, as Figure 9 shown, this embodiment first uses the inverse transformation method to reconstruct the point cloud to obtain the reconstructed point cloud attribute values, and takes the reconstructed point cloud attribute values and the quantization residual coefficient bitstream as input data and inputs them into the decoding residual processing module. Inside the module, first perform entropy decoding on the quantization residual coefficient bitstream to obtain the attribute quantization residual coefficients. Then perform inverse quantization on the attribute quantization residual coefficients to obtain the reconstructed attribute residual values, and finally add the reconstructed attribute residual values to the reconstructed point cloud attribute values to obtain the final point cloud attribute decoding result.
[0110] For the lossless condition, the following two methods can be used for processing: Method 1: For the existing attribute residual value bitstream, first perform entropy decoding on it to obtain the attribute residual values. Without using inverse quantization processing, directly add the attribute residual values to the reconstructed point cloud attribute values to obtain the final point cloud attribute decoding result; Method 2: For the existing attribute quantization residual remainder bitstream and attribute quantization residual coefficient bitstream, first perform entropy decoding on them respectively to obtain the attribute quantization residual remainder and the attribute quantization residual coefficients. Then perform inverse quantization on them respectively to obtain the reconstructed attribute residual remainder and the reconstructed attribute residual coefficients. Finally, add the reconstructed attribute residual remainder, the reconstructed attribute residual coefficients, and the reconstructed point cloud attribute values to obtain the final point cloud attribute decoding result.
[0111] In some embodiments, for the decoding of color, the decoding residual processing module needs to perform in the color space of the original point cloud. If the point cloud reconstruction attribute values generated by the inverse transformation and the attribute values of the original point cloud are in different color spaces. For example, the original point cloud has attribute values in the RGB color space, while the inverse transformation generates attribute values in the YUV color space. Then, it is necessary to perform color space conversion on the point cloud reconstruction attribute values generated by the inverse transformation to convert them into the same color space as the original point cloud.
[0112] In some embodiments, a point cloud attribute decoding device based on weighted three-dimensional Haar transform is further provided, which includes a processor, a memory, an encoding module, and a bus;
[0113] A computer-readable program executable by the processor is stored on the memory;
[0114] The bus realizes the connection and communication between the processor and the memory;
[0115] The processor is used to call the encoding module to execute the computer-readable program to implement the steps in the method described in the present invention.
[0116] Furthermore, based on the PCEM software version 0.5, the present invention tests the experimental results of comparing the method of this embodiment with the anchor. The results are shown in Tables 1 - 4.
[0117] Table 1 is a comparison table of rate-distortion data of luminance, chrominance, and reflectivity under the conditions of limited lossy geometry and lossy attributes
[0118]
[0119] Table 2 is a comparison table of rate-distortion data of luminance, chrominance, and reflectivity under the conditions of lossless geometry and lossy attributes
[0120]
[0121] Table 3 is a comparison table of rate-distortion data of color attributes of the three color channels of red (R), green (G), and blue (B) and reflectivity under the conditions of lossless geometry and limited lossy attributes
[0122]
[0123]
[0124] Table 4 is a comparison table of bit rate data of color and reflectivity under the conditions of lossless geometry and lossless attributes
[0125]
[0126] The data in Table 1-4 shows that, compared with the benchmark results of the test platform PCEM, under the conditions of limited lossy geometry and lossy attributes, and under the conditions of lossless geometry and lossy attributes, for the reflectivity attribute, the end-to-end attribute rate distortion of the present invention is reduced by 2.2% and 5.8% respectively; for the luminance attribute, the end-to-end attribute rate distortion of the present invention is reduced by 39.9% and 51.9% respectively; for the chrominance Cb attribute, the end-to-end attribute rate distortion of the present invention is reduced by 78.5% and 63.1% respectively; for the chrominance Cr attribute, the end-to-end attribute rate distortion of the present invention is reduced by 79.8% and 68.8% respectively; under the conditions of lossless geometry and limited lossy attributes, for the reflectivity attribute, the end-to-end Hausdorff attribute rate distortion of the present invention is reduced by 3.4%; for the color attributes of the three color channels of red (R), green (G), and blue (B), the end-to-end Hausdorff attribute rate distortion of the present invention is reduced by 29.9% respectively; under the conditions of lossless geometry and lossless attributes, for the reflectivity attribute, the reflectivity bit rate of the present invention is 85.3% of the benchmark result; for the color attribute, the color bit rate of the present invention is 92.5% of the benchmark result.
[0127] In summary, in view of the sparse characteristics of point cloud data, the present invention provides a point cloud attribute encoding method and a decoding method based on weighted three-dimensional Haar transform. According to the decomposability of the three-dimensional Haar transform, it is transformed into one-dimensional transforms (A1, A2, A3) in three directions. The intermediate result of each transform can be regarded as an expression in the frequency domain. Therefore, the weight value of each bit in the frequency domain is set to be equal, that is, the weight value of DC is equal to the weight value of AC. Except for the initial weight value setting, the present invention does not consider the influence of the positions not occupied by data points on the subsequent weight values. The weight value setting method requires fewer calculations of the transform matrix, which can improve the calculation efficiency of point cloud attribute compression; the high-frequency coefficients obtained by the present invention through weighted three-dimensional Haar transform utilize the spatial information of 8 position points, remove the correlation of the corresponding attribute values at 8 positions, and achieve more effective compression. The present invention applies three-dimensional wavelet transform to the attribute compression of point clouds. The point cloud attribute encoding method and decoding method based on weighted three-dimensional Haar transform provided by the present invention solve the problem of the sparse characteristics of point cloud data, can improve the utilization of the attribute correlation between child nodes, and thus effectively improve the point cloud attribute compression performance.
[0128] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A point cloud attribute encoding method based on weighted three-dimensional Haar transform, characterized in that, it includes the steps of: Dividing the point cloud into an octree to construct an N-layer octree structure; For the N-1 layer of the N-layer octree structure, use the attribute values of the 8 child nodes of the current layer node as the input coefficients of the transform for weighted three-dimensional Haar transform. Decompose the weighted three-dimensional Haar transform into weighted one-dimensional Haar transforms in three directions. Calculate the corresponding N-1 layer transform output coefficients according to the set calculation rules in the second and third direction transforms, including at least one low-frequency coefficient. The number of transform output coefficients is the same as the number of non-empty child nodes of the current layer node; Starting from the N-2 layer of the N-layer octree structure to the root node, use the low-frequency coefficients output by the previous layer transform as the input coefficients of the child node transform of the current layer node for weighted three-dimensional Haar transform to obtain the transform output coefficients; Use the root node transform output coefficients and the high-frequency coefficients output by other layer transforms as the point cloud transform output coefficients.
2. The point cloud attribute encoding method based on weighted three-dimensional Haar transform according to claim 1, characterized in that, The step of obtaining the N-1 layer transform output coefficients includes: Perform the first-direction transformation: Set the weight W0 of the child node according to the number of points within the spatial range corresponding to the child node. When there is no point within the spatial range corresponding to the child node, that is, it is an empty child node, set its weight W0 to 0 and the corresponding attribute value to 0; Calculate the weighted sum of the attribute values of 2 child nodes along the first direction as the first-direction output low-frequency coefficient DC1, and its calculation formula is , where a 1 , a 2 represent the attribute values of 2 child nodes, w 0 1 , w 0 2 represent the weights of 2 child nodes. Calculate the weighted difference of the attribute values of 2 child nodes along the first direction as the first-direction output high-frequency coefficient AC1, and its calculation formula is Calculate the sum of the weights of 2 child nodes as the weight W1 of DC1 and AC1; Perform the transformation on four pairs of groups and output four pairs of different low-frequency coefficients DC1, high-frequency coefficients AC1 and weights W1; Performing the second direction transform: Use the output coefficients DC1 and AC1 obtained from the first direction transform as the input coefficients of the second direction transform. When both input coefficients of the transform are not from empty child nodes, calculate the weighted sum value and difference of the two input coefficients along the second direction according to the weight W1 to obtain the output coefficients DC2 and AC2, and calculate the sum value of the weights of the two input coefficients as the weight W2 of DC2 and AC2; When one of the two input coefficients of the transform is from an empty child node and its weight is not 0, calculate the corresponding output coefficient DC2, and calculate the sum of the weights of the 2 input coefficients as the weight W2 of DC2; When both input coefficients are from empty child nodes and their weights are not 0, do not calculate or output any coefficients; Perform the transform on four pairs of groups, and output the low-frequency coefficient DC2, the high-frequency coefficient AC2, and the weight W2; Performing the third direction transform: Use the output coefficients DC2 and AC2 obtained from the second direction transform as the input coefficients of the third direction transform, and divide them into four pairs along the third direction to perform the transform respectively. When both input coefficients of the transform are not from empty child nodes, perform weighted one-dimensional Haar transform according to the weight W2 to obtain a low-frequency coefficient and a high-frequency coefficient; When one of the two input coefficients of the transform is from an empty child node, perform weighted one-dimensional Haar transform according to the weight W2 to calculate the output low-frequency coefficient; When both transform coefficients are from empty child nodes, do not calculate or output any coefficients; When there is only one input transform coefficient and it is not from an empty child node, use the input coefficient as the output low-frequency coefficient; When there is no input coefficient, do not calculate or output any coefficients; Perform the transform on four pairs of groups, and output the low-frequency coefficient DC3 and the high-frequency coefficient AC3. The number of output coefficients is the same as the number of non-empty child nodes of the current node; Use the third direction transform output coefficients as the transform output coefficients of the current layer node.
3. The point cloud attribute encoding method based on weighted three-dimensional Haar transform according to claim 1, characterized in that, After using the transformation output coefficients of the root node and the high-frequency coefficients of the transformation outputs of other layers as the point cloud transformation output coefficients, the method further includes the steps of: Directly performing entropy coding on the point cloud transformation output coefficients to obtain a transformed coefficient bitstream; Alternatively, quantizing the point cloud transformation output coefficients to obtain quantized transformation coefficients; Performing entropy coding on the quantized transformation coefficients to obtain a quantized transformation coefficient bitstream.
4. The method for encoding point cloud attributes based on weighted three-dimensional Haar transform according to claim 1, characterized in that, before performing the weighted three-dimensional Haar transform, the method further includes the steps of: Converting the attribute values in the RGB color space into attribute values in the YUV space.
5. The method for encoding point cloud attributes based on weighted three-dimensional Haar transform according to claim 1, characterized in that, After using the transformation output coefficients of the root node and the high-frequency coefficients of the transformation outputs of other layers as the point cloud transformation output coefficients, the method further includes the steps of: Calculating the difference between the original point cloud attribute values and the reconstructed point cloud attribute values as the attribute residual values, and performing entropy coding on the attribute residual values to obtain a residual point cloud bitstream; Alternatively, calculating the difference between the original point cloud attribute values and the reconstructed point cloud attribute values as the attribute residual values; Quantizing the attribute residual values to obtain attribute quantization residual coefficients; encoding the attribute quantization residual coefficients to obtain a residual point cloud bitstream; Alternatively, calculating the difference between the original point cloud attribute values and the reconstructed point cloud attribute values as the attribute residual values; Quantizing the attribute residual values to obtain attribute quantization residual coefficients; encoding the attribute quantization residual coefficients to obtain a residual point cloud bitstream; Encoding the attribute quantization residual remainders.
6. A device for encoding point cloud attributes based on weighted three-dimensional Haar transform, characterized in that, it includes a processor, a memory, an encoding module and a bus; The memory stores a computer-readable program executable by the processor; The bus realizes the connection and communication between the processor and the memory; The processor is used to call the encoding module to implement the steps in the method according to any one of claims 1-5 when executing the computer-readable program.
7. A method for decoding point cloud attributes based on weighted three-dimensional Haar transform, characterized in that, it includes the steps of: Dividing the point cloud into an octree to construct an N-layer octree structure; Decoding the point cloud bitstream to obtain point cloud transformation coefficients; For the first layer of the N-layer octree structure, using the transformation coefficients decoded from the bitstream as the inverse transformation input coefficients for the weighted three-dimensional Haar inverse transform. Decompose the weighted three-dimensional Haar transform into weighted one-dimensional Haar inverse transforms in three directions. Calculate the corresponding transformation output coefficients according to the set calculation rules in the second and third direction transforms. Use the inverse transformation output coefficients corresponding to the non-empty child nodes obtained from the inverse transformation in the first direction as the inverse transformation output coefficients of the current layer; Starting from the second layer to the N-1 layer of the N-layer octree structure, using the reconstructed output coefficients obtained from the inverse transformation of the parent node in the previous layer and the transformation coefficients decoded from the bitstream as the child node inverse transformation input coefficients of the current layer node for the weighted three-dimensional Haar inverse transform to obtain inverse transformation output coefficients; Use the inverse transform output coefficients of the N - 1 layer as the point cloud attribute transform reconstruction values.
8. The point cloud attribute decoding method based on weighted three - dimensional Haar transform according to claim 7, wherein, the step of using the transform coefficients decoded from the bitstream as the input coefficients of the inverse transform for weighted three - dimensional Haar inverse transform includes: Calculate the weights of the inverse transforms in three directions in sequence: Set the weights of the first - direction inverse transform of 8 child nodes, collectively referred to as W0. Set the weight W0 of the child node according to the number of points within the spatial range corresponding to the child node. When there are no points within the spatial range corresponding to the child node, that is, an empty child node, set its weight W0 to 0, corresponding to 8 different W0 values; Divide the weights W0 of the 8 child nodes into four pairs along the first direction, and calculate the sum of each pair of weights W0 in sequence as the weights of the high - frequency coefficient and the low - frequency coefficient of the corresponding second - direction inverse transform, collectively referred to as W1. Perform corresponding calculations on the four pairs of weights, and output four pairs of different weights W1; Divide the weights W1 of the second - direction inverse transform into four pairs along the second direction, and calculate the weights of the third - direction inverse transform in sequence, collectively referred to as W2. When the 2 weights participating in the calculation are not from empty child nodes, take the sum value of the two weights W1 as the weights of the high - frequency coefficient and the low - frequency coefficient of the third - direction inverse transform W2; When one of the 2 weights participating in the calculation is from an empty child node and its value is not 0, take the sum value of the two weights W1 as the weight of the high - frequency coefficient of the third - direction inverse transform W2; When the 2 weights participating in the calculation are both from empty child nodes and their values are both not 0, then do not calculate and output the weights. Perform corresponding transformation processing on the four pairs of weights W1, and output at most 8 weights W2 in the third direction; Perform the third - direction inverse transform: Use the transform coefficients decoded from the point cloud bitstream as the input coefficients of the third - direction transform, and group them along the third direction. When a group of the transform has two input coefficients, perform weighted one - dimensional Haar inverse transform along the third direction according to the weight W2 to obtain the reconstructed output coefficients RDC2 and RAC2; When a group of the transform has only one input transform coefficient and there are two weights W2, then set the reconstructed output coefficient RAC2 to 0, and perform weighted one - dimensional Haar inverse transform according to the weight W2 to obtain the reconstructed output coefficient RDC2; When a group of the transform has only one input transform coefficient and only one weight W2, then set the reconstructed output coefficient RDC2 equal to the input transform coefficient. There are at most four corresponding inverse transformation processes, and at most eight reconstructed output coefficients are output. Perform the second - direction inverse transform: Use the reconstructed output coefficients RDC2 and RAC2 obtained from the third - direction inverse transform as the input coefficients of the second - direction transform, and group them along the second direction. When a group of the transform has two input coefficients, calculate the weighted difference and sum of the two input coefficients along the second direction according to the weight W1 to obtain the reconstructed output coefficients RDC1 and RAC1; When a group of the transform has only one input transform coefficient, then set the reconstructed output coefficient RAC1 to 0, and perform weighted one - dimensional Haar inverse transform according to the weight W1 to obtain the reconstructed output coefficient RDC1; There are at most four corresponding inverse transformation processes, and eight reconstructed output coefficients are output. Perform the inverse transform in the first direction: Use the output reconstruction coefficients RDC1 and RAC1 obtained from the inverse transform in the second direction as the input coefficients for the inverse transform in the first direction. Divide them into four groups along the first direction, with two input coefficients in each group. Perform weighted one-dimensional Haar inverse transform along the first direction according to the weight W0 respectively to obtain the reconstruction output coefficients corresponding to two child nodes. There are four corresponding inverse transform processes. Use the inverse transform output coefficients corresponding to the non-empty child nodes obtained from the inverse transform in the first direction as the inverse transform output coefficients of the current layer.
9. The method for decoding point cloud attributes based on weighted three-dimensional Haar transform according to claim 7, wherein, the steps of decoding the point cloud bitstream to obtain the point cloud transform coefficients include: performing entropy decoding on the point cloud bitstream to obtain the point cloud transform coefficients; or, performing entropy decoding on the point cloud bitstream to obtain the quantized transform coefficients; performing inverse quantization on the quantized transform coefficients to obtain the point cloud transform coefficients.
10. The method for decoding point cloud attributes based on weighted three-dimensional Haar transform according to claim 7, wherein, after performing the weighted three-dimensional Haar inverse transform, the following step is further included: converting the reconstructed attribute values in the YUV color space into the reconstructed attribute values in the RGB space.
11. The method for decoding point cloud attributes based on weighted three-dimensional Haar transform according to claim 7, wherein, after using the inverse transform output coefficients of the N-1 layer as the point cloud attribute transform reconstruction values, the following steps are further included: performing entropy decoding on the point cloud bitstream to obtain the attribute residual values; calculating the sum of the attribute residual values and the transformed reconstructed point cloud attribute values as the point cloud attribute reconstruction values; or, performing entropy decoding on the point cloud bitstream to obtain the attribute quantized residual coefficients; performing inverse quantization on the attribute quantized residual coefficients to obtain the inverse quantized attribute residual values; calculating the sum of the inverse quantized attribute residual values and the transformed reconstructed point cloud attribute values as the point cloud attribute reconstruction values; or, performing entropy decoding on the point cloud bitstream to obtain the attribute quantized residual coefficients and the attribute quantized residual remainders; performing inverse quantization on the attribute quantized residual coefficients to obtain the inverse quantized attribute residual values; calculating the sum of the attribute quantized residual remainders, the inverse quantized attribute residual values, and the transformed reconstructed point cloud attribute values as the point cloud attribute reconstruction values.
12. A device for decoding point cloud attributes based on weighted three-dimensional Haar transform, wherein, it includes a processor, a memory, a decoding module, and a bus; the memory stores a computer-readable program executable by the processor; the bus realizes the connection and communication between the processor and the memory; when the processor is used to call the decoding module to execute the computer-readable program, the steps in the method according to any one of claims 7-11 are implemented.
Citation Information
Patent Citations
A massive point cloud spatial management method based on octree-like encoding
CN109345619A
Adaptive sub-band based coding of hierarchical transform coefficients of three-dimensional point cloud
US20200013215A1