A point cloud attribute encoding method, a decoding method, an encoding device, and a decoding device
Patent Information
- Application Number
- CN202111482269.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-06
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2041-12-06
AI Technical Summary
[0005]本发明的主要目的在于提供一种点云属性编码方法、解码方法、编码设备及解码设备,旨在解决现有技术中构建邻居点集来利用前序已编码点的信息对当前点进行编码时,邻居点集仅考虑一维排列顺序,无法充分、高效地利用各个点的真实位置信息,不利于提高编码的问题
[0048]由上可见,本发明方案中,基于预测参考点集对当前待编码点进行属性预测,得到上述当前待编码点的属性预测值;基于上述当前待编码点的属性预测值进行编码,得到点云码流;基于预设的规则更新上述预测参考点集,上述预设的规则基于上述预测参考点集中的点的三维位置坐标执行。与现有技术中仅考虑一维排列顺序的邻居点集相比,本发明中的预测参考点集基于点的三维位置坐标进行构建和更新,从而充分、高效地利用点的位置信息进行属性预测。基于上述预测参考点集进行编码,则有利于提高属性编码效率。
Smart Images

Figure CN116233427B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of point cloud data processing technology, and in particular to a point cloud attribute encoding method, decoding method, encoding device, and decoding device. Background Technology
[0002] With the advancement of science and technology, the application scope of 3D point cloud data is becoming increasingly wide. At the same time, the accuracy and resolution of point clouds are also getting higher and higher. Point cloud data contains geometric information and attribute information such as color and reflectivity of each point. Therefore, point clouds need to be compressed, encoded and decoded during transmission or use.
[0003] In existing technologies, point clouds can be arranged into a one-dimensional sequence. Then, for the current point cloud, a neighbor point set is constructed to encode (or decode) the current point using information from previously encoded points. The problem with existing technologies is that the neighbor point set is a set of points that only considers the one-dimensional arrangement order (e.g., including multiple previous points of the current point), which cannot fully and efficiently utilize the real position information of each point, thus hindering the improvement of encoding (or decoding) efficiency.
[0004] Therefore, existing technologies still need improvement and development. Summary of the Invention
[0005] The main objective of this invention is to provide a point cloud attribute encoding method, decoding method, encoding device, and decoding device, aiming to solve the problem in the prior art that when constructing a neighbor point set to encode the current point using the information of the previously encoded points, the neighbor point set only considers the one-dimensional arrangement order, which cannot fully and efficiently utilize the real position information of each point, thus hindering the improvement of encoding.
[0006] The first aspect of this invention provides a point cloud attribute encoding method, wherein the point cloud attribute encoding method includes:
[0007] Based on the prediction reference point set, attribute prediction is performed on the current point to be encoded to obtain the attribute prediction value of the current point to be encoded.
[0008] Encode the point cloud code stream based on the predicted attribute values of the current point to be encoded.
[0009] The predicted reference point set is updated based on preset rules, which are executed based on the three-dimensional position coordinates of the points in the predicted reference point set.
[0010] Optionally, the above-mentioned attribute prediction of the current point to be encoded based on the prediction reference point set to obtain the attribute prediction value of the current point to be encoded includes:
[0011] When the number of points in the above-mentioned prediction reference point set is equal to 0, the attribute prediction value of the current point to be encoded is set to a preset constant.
[0012] When the number of points in the above-mentioned prediction reference point set is greater than 0 and not greater than the preset number of prediction points, all points in the above-mentioned prediction reference point set are used as prediction points, and the attribute prediction value of the current point to be encoded is obtained based on the reconstruction attribute value of all the above-mentioned prediction points.
[0013] When the number of points in the aforementioned prediction reference point set is greater than the aforementioned number of prediction points, the prediction points in the aforementioned prediction reference point set are obtained, and the attribute prediction value of the current point to be encoded is obtained based on the reconstruction attribute values of all the aforementioned prediction points. The aforementioned prediction points are either the number of prediction points in the aforementioned prediction reference point set that are spatially closest to the current point to be encoded, or the aforementioned prediction points are the number of prediction points in the aforementioned prediction reference point set that are spatially closest to the current point to be encoded, plus other points of the same distance at the closest spatial distance.
[0014] Optionally, the above encoding based on the attribute prediction values of the current point to be encoded to obtain the point cloud code stream includes:
[0015] Based on the original attribute values of the current point to be encoded and the predicted attribute values of the current point to be encoded, obtain the attribute residual values of the current point to be encoded.
[0016] Based on the residual values of the above attributes, quantization and entropy encoding are performed to obtain the point cloud code stream.
[0017] Optionally, the above-mentioned prediction reference point set is updated based on preset rules, wherein the preset rules are executed based on the three-dimensional position coordinates of the points in the prediction reference point set, including:
[0018] Based on the three-dimensional position coordinates of the points in the above-mentioned prediction reference point set, the point with the largest spatial distance from the above-mentioned prediction reference point set to the above-mentioned current point to be encoded is obtained as the target deletion point. The above-mentioned target deletion point is deleted from the above-mentioned prediction reference point set, and the above-mentioned current point to be encoded is added to the above-mentioned prediction reference point set as the target addition point, thus obtaining an updated prediction reference point set.
[0019] Optionally, the above-mentioned prediction reference point set is updated based on preset rules, wherein the preset rules are executed based on the three-dimensional position coordinates of the points in the prediction reference point set, including:
[0020] Based on the three-dimensional position coordinates of the points in the aforementioned prediction reference point set, the points in the aforementioned prediction reference point set are divided into priority retention points and non-priority retention points according to a preset priority retention rule. The point with the largest spatial distance from the current point to be encoded among the non-priority retention points is prioritized as the target deletion point, or the point that was added to the aforementioned prediction reference point set earliest among the non-priority retention points is prioritized as the target deletion point. The aforementioned target deletion point is deleted from the aforementioned prediction reference point set, and the current point to be encoded is added to the aforementioned prediction reference point set as the target addition point, thus obtaining an updated prediction reference point set.
[0021] Optionally, the above-mentioned prediction reference point set is updated based on preset rules, wherein the preset rules are executed based on the three-dimensional position coordinates of the points in the prediction reference point set, including:
[0022] Based on the three-dimensional position coordinates of the points in the above-mentioned prediction reference point set, the point in the above-mentioned prediction reference point set that is spatially closest to the current point to be encoded is obtained. When the closest spatial distance is less than a preset distance threshold and the difference between the reconstructed attribute value of the closest point and the current point to be encoded is less than a preset attribute difference threshold, the target addition point is calculated and the target deletion point is obtained based on the three-dimensional position coordinates and reconstructed attribute value of the closest point and the current point to be encoded. The target deletion point is the closest point, the point with the largest spatial distance from the current point to be encoded in the above-mentioned prediction reference point set, or the point that was first added to the above-mentioned prediction point set.
[0023] When the nearest spatial distance is not less than the distance threshold or the difference between the reconstructed attribute value of the nearest point and the current point to be encoded is not less than the attribute difference threshold, the current point to be encoded is taken as the target addition point, and the point with the largest spatial distance from the current point to be encoded in the prediction reference point set is taken as the target deletion point or the point that was first added to the prediction reference point set is taken as the target deletion point.
[0024] The aforementioned target deletion points are removed from the aforementioned prediction reference point set, and the aforementioned target addition points are added to the aforementioned prediction reference point set, resulting in an updated prediction reference point set.
[0025] A second aspect of the present invention provides a point cloud attribute encoding device, wherein the point cloud attribute encoding device includes a processor, a memory and a communication bus; the memory stores a computer-readable program that can be executed by the processor;
[0026] The aforementioned communication bus enables communication between the processor and the memory;
[0027] When the processor executes the computer-readable program, it implements any one of the steps in the point cloud encoding method described above.
[0028] A third aspect of the present invention provides a point cloud attribute decoding method, wherein the point cloud attribute decoding method includes:
[0029] Based on the prediction reference point set, attribute prediction is performed on the current point to be decoded to obtain the attribute prediction value of the current point to be decoded.
[0030] Based on the point cloud code stream and the attribute prediction values of the current point to be decoded, the reconstructed attribute values of the current point to be decoded are obtained.
[0031] The predicted reference point set is updated based on preset rules, which are executed based on the three-dimensional position coordinates of the points in the predicted reference point set.
[0032] Optionally, the above-mentioned attribute prediction of the current point to be decoded based on the prediction reference point set, to obtain the attribute prediction values of the current point cloud data to be decoded, includes:
[0033] When the number of points in the above-mentioned prediction reference point set is equal to 0, the attribute prediction value of the current point to be decoded is set to a preset constant.
[0034] When the number of points in the above-mentioned prediction reference point set is greater than 0 and not greater than the preset number of prediction points, all points in the above-mentioned prediction reference point set are used as prediction points, and the attribute prediction value of the above-mentioned current point to be decoded is obtained based on the reconstructed attribute values of all the above-mentioned prediction reference points.
[0035] When the number of points in the above-mentioned prediction reference point set is greater than the number of prediction test points, the prediction points in the above-mentioned prediction reference point set are obtained, and the attribute prediction value of the current point to be decoded is obtained based on the reconstructed attribute values of all the above-mentioned prediction points. The above-mentioned prediction points are either the number of prediction points in the above-mentioned prediction reference point set that are spatially closest to the current point to be decoded, or the above-mentioned prediction points are the number of prediction points in the above-mentioned prediction reference point set that are spatially closest to the current point to be decoded, plus other points of the same distance at the closest spatial distance.
[0036] Optionally, the reconstructed attribute values of the current point to be decoded, obtained based on the point cloud code stream and the attribute prediction values of the current point to be decoded, include:
[0037] Decode the point cloud stream to obtain the attribute residual values of the current point to be decoded;
[0038] Based on the attribute residual value of the current point to be decoded and the attribute prediction value of the current point to be decoded, the reconstructed attribute value of the current point to be decoded is obtained.
[0039] Optionally, the above-mentioned prediction reference point set is updated based on preset rules, wherein the preset rules are executed based on the three-dimensional position coordinates of the points in the prediction reference point set, including:
[0040] Based on the three-dimensional position coordinates of the points in the above-mentioned prediction reference point set, the point with the largest spatial distance from the above-mentioned prediction reference point set to the above-mentioned current point to be decoded is obtained as the target deletion point. The above-mentioned target deletion point is deleted from the above-mentioned prediction reference point set, and the above-mentioned current point to be decoded is added to the above-mentioned prediction reference point set as the target addition point, thus obtaining an updated prediction reference point set.
[0041] Optionally, the above-mentioned prediction reference point set is updated based on preset rules, wherein the preset rules are executed based on the three-dimensional position coordinates of the points in the prediction reference point set, including:
[0042] Based on the three-dimensional position coordinates of the points in the above-mentioned prediction reference point set, the point in the above-mentioned prediction reference point set that is spatially closest to the current point to be decoded is obtained. When the closest spatial distance is less than a preset distance threshold and the difference between the reconstructed attribute value of the closest point and the current point to be decoded is less than a preset attribute difference threshold, a target addition point is calculated and a target deletion point is obtained based on the three-dimensional position coordinates and reconstructed attribute value of the closest point and the current point cloud data to be decoded. The target deletion point is the closest point, the point in the above-mentioned prediction reference point set that is spatially closest to the current point to be decoded, or the point that was first added to the above-mentioned prediction reference point set.
[0043] When the nearest spatial distance is not less than the distance threshold or the difference between the reconstructed attribute value of the nearest point and the current point to be encoded is not less than the attribute difference threshold, the current point to be decoded is taken as the target addition point, and the point with the largest spatial distance from the current point to be encoded in the prediction reference point set is taken as the target deletion point or the point that was first added to the prediction reference point set is taken as the target deletion point.
[0044] The aforementioned target deletion points are removed from the aforementioned prediction reference point set, and the aforementioned target addition points are added to the aforementioned prediction reference point set, resulting in an updated prediction reference point set.
[0045] A fourth aspect of the present invention provides a point cloud attribute decoding device, wherein the point cloud attribute decoding device includes a processor, a memory and a communication bus; the memory stores a computer-readable program that can be executed by the processor;
[0046] The aforementioned communication bus enables communication between the processor and the memory;
[0047] When the processor executes the computer-readable program, it implements any one of the steps in the point cloud attribute decoding method described above.
[0048] As can be seen from the above, in the present invention, attribute prediction is performed on the current point to be encoded based on the prediction reference point set to obtain the attribute prediction value of the current point to be encoded; encoding is performed based on the attribute prediction value of the current point to be encoded to obtain a point cloud code stream; the prediction reference point set is updated based on preset rules, which are executed based on the three-dimensional position coordinates of the points in the prediction reference point set. Compared with the prior art, which only considers the one-dimensional arrangement of neighbor point sets, the prediction reference point set in the present invention is constructed and updated based on the three-dimensional position coordinates of the points, thereby fully and efficiently utilizing the position information of the points for attribute prediction. Encoding based on the prediction reference point set is beneficial to improving the attribute encoding efficiency. Attached Figure Description
[0049] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0050] Figure 1 This is a flowchart illustrating a point cloud attribute encoding method provided in an embodiment of the present invention;
[0051] Figure 2 This is an embodiment of the present invention. Figure 1 A detailed flowchart of step S100 is shown below;
[0052] Figure 3 This is an embodiment of the present invention. Figure 1 A detailed flowchart of step S200 is shown below;
[0053] Figure 4 This is an embodiment of the present invention. Figure 1 A detailed flowchart of step S300 is shown below;
[0054] Figure 5 This is a flowchart illustrating a point cloud attribute decoding method provided in an embodiment of the present invention;
[0055] Figure 6 This is an embodiment of the present invention. Figure 5 A schematic diagram of the specific process for step A300. Detailed Implementation
[0056] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of the invention. However, those skilled in the art will understand that the invention can be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods are omitted so as not to obscure the description of the invention with unnecessary detail.
[0057] It should be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0058] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0059] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0060] As used in this specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrases "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."
[0061] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0062] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0063] With the advancement of science and technology, the application scope of 3D point cloud data is becoming increasingly wide. At the same time, the accuracy and resolution of point clouds are also getting higher and higher. Point cloud data contains geometric information and attribute information such as color and reflectivity of each point. Therefore, point clouds need to be compressed, encoded and decoded during transmission or use.
[0064] In existing technologies, point clouds can be arranged into a one-dimensional sequence. Then, for the current point cloud, a neighbor point set is constructed to encode (or decode) the current point using information from previously encoded points. The problem with existing technologies is that the neighbor point set is a set of points that only considers the one-dimensional arrangement order (e.g., including multiple previous points of the current point), which cannot fully and efficiently utilize the real position information of each point, thus hindering the improvement of encoding (or decoding) efficiency.
[0065] Specifically, in one application scenario, point cloud encoding is performed as follows: The point cloud is arranged into a one-dimensional sequence according to a specific order, and each point is encoded sequentially. Using information from previously encoded points, the attribute value of a given point is predicted, and the residual between the predicted and actual attribute values is calculated. A reference point set (i.e., a neighboring point set) is obtained based on the order; the neighboring point set can contain points preceding or following the current point. The nearest points are searched within the reference point set to form a subset. Using the attribute values of points within the subset, the predicted attribute value of the current point is calculated; for example, the predicted value is the weighted average of the reconstructed attribute values of points within the subset. The attribute residual value is calculated as: Attribute Residual = Original Value - Predicted Value. The attribute residual value is quantized according to a pre-set quantization precision to obtain quantization residual coefficients. These coefficients are then entropy-encoded to complete the encoding of the point. The quantization residual coefficients are inversely quantized to obtain the reconstructed residual, which is added to the predicted value to obtain the reconstructed attribute value, which is then used for predicting subsequent points.
[0066] In the aforementioned application scenarios, the reference point set used is generated based on a simple one-dimensional sorting selection, which does not fully utilize the spatial geometric location information of the points. It should be noted that the proximity of points in a one-dimensional sort is not simply equivalent to their spatial distance; therefore, using the aforementioned reference point set cannot efficiently utilize the spatial positional relationships of the point cloud. In this invention, the prediction reference point set is updated using the three-dimensional position coordinates of the point cloud geometric points, which is more efficient in utilizing positional information and allows for better attribute prediction. On the other hand, the shortcomings of one-dimensional sorting also include the inability to distinguish transition points (i.e., boundary points) within space during the sorting process. For transition points, even if they are adjacent in the one-dimensional sort, they may be far apart in space. Therefore, in this invention, transition points can be considered when maintaining the prediction reference point set, and these transition points should be retained as much as possible for better attribute prediction.
[0067] To address at least one of the aforementioned problems, this invention provides a point cloud attribute encoding method, a decoding method, an encoding device, and a decoding device. In the point cloud attribute encoding method, attribute prediction is performed on the current point to be encoded based on a prediction reference point set to obtain the predicted attribute value of the current point to be encoded; the predicted attribute value of the current point to be encoded is then encoded to obtain a point cloud bitstream; and the prediction reference point set is updated based on preset rules, which are executed based on the three-dimensional position coordinates of the points in the prediction reference point set. Compared to the prior art, which only considers the one-dimensional arrangement of neighboring point sets, the prediction reference point set in this invention is constructed and updated based on the three-dimensional position coordinates of the points, thereby fully and efficiently utilizing the position information of each point for attribute prediction. Attribute encoding based on the prediction reference point set improves attribute encoding efficiency. Similarly, decoding using a prediction reference point set generated and updated based on rules corresponding to the three-dimensional position coordinates of the points also improves decoding efficiency.
[0068] like Figure 1 As shown in the figure, this embodiment of the invention provides a point cloud attribute encoding method. Specifically, the method includes the following steps:
[0069] Step S100: Based on the prediction reference point set, perform attribute prediction on the current point to be encoded to obtain the attribute prediction value of the current point to be encoded.
[0070] Step S200: Encode the point cloud code stream based on the attribute prediction values of the current point to be encoded.
[0071] Step S300: Update the above-mentioned prediction reference point set based on preset rules, which are executed based on the three-dimensional position coordinates of the points in the above-mentioned prediction reference point set.
[0072] In this embodiment, multiple points to be encoded are sequentially encoded based on the aforementioned point cloud attribute encoding method. After encoding each point is completed, the aforementioned prediction reference point set is updated. Then, attribute prediction and encoding are performed on the next point to be encoded based on the updated prediction reference point set. After encoding each point is completed, a corresponding point cloud code stream is generated. The code streams of all points in the entire point cloud form the attribute encoding result of the entire point cloud. The aforementioned current point to be encoded is the point currently being processed.
[0073] Point cloud encoding includes geometric position encoding and attribute encoding. This embodiment of the invention implements point cloud attribute encoding, such as encoding the color attribute of the point cloud. It should be noted that the points to be encoded include their position coordinates and attribute values. In this embodiment, the points to be encoded are arranged in a one-dimensional order, such as the acquisition order, Morton order, or Hilbert order, to facilitate subsequent encoding processing.
[0074] Specifically, in one embodiment, point cloud data to be encoded is acquired; attribute encoding is performed on each point to be encoded in the point cloud data to be encoded sequentially based on a set of prediction reference points; the set of prediction reference points is updated when the attribute encoding of a current point to be encoded is completed, wherein the set of prediction reference points is updated based on the three-dimensional position coordinates of each point to be encoded.
[0075] The aforementioned predictive reference point set is used for point cloud attribute encoding and is based on the encoded and reconstructed point cloud data. Specifically, when updating, the predictive reference point set is based on the 3D position coordinates of the current point to be encoded, which better reflects the actual spatial relationship between points and improves the efficiency of attribute prediction encoding. It should be noted that the aforementioned preset rules can also simultaneously consider the reconstructed attribute values and 3D position coordinates of each point in the point cloud data to be encoded, better utilizing the actual spatial relationship and the relationship between reconstructed attribute values between points.
[0076] In this embodiment, attribute encoding is performed sequentially on each point to be encoded based on the prediction reference point set. Upon completion of attribute encoding for each current point, the prediction reference point set is updated based on that point, and the next point to be encoded is then encoded based on the updated prediction reference point set. Thus, by utilizing the information from previously encoded points, the attribute value of a point is predicted, achieving attribute encoding. It should be noted that an update rule can be preset, and the prediction reference point set is updated based on this preset rule, which considers (depends on) the three-dimensional position coordinates of each point to be encoded.
[0077] As can be seen from the above, in the point cloud attribute encoding method provided by the embodiments of the present invention, attribute prediction is performed on the current point to be encoded based on the prediction reference point set to obtain the attribute prediction value of the current point to be encoded; encoding is performed based on the attribute prediction value of the current point to be encoded to obtain the point cloud code stream; the prediction reference point set is updated based on preset rules, which are executed based on the three-dimensional position coordinates of the points in the prediction reference point set. Compared with the prior art, which only considers the one-dimensional arrangement of neighbor point sets, the prediction reference point set in the present invention is constructed and updated based on the three-dimensional position coordinates of the points, thereby fully and efficiently utilizing the position information of each point for attribute prediction. Encoding based on the prediction reference point set is beneficial to improving encoding efficiency.
[0078] Specifically, in this embodiment, as Figure 2 As shown, step S100 above includes the following steps:
[0079] Step S101: When the number of points in the above-mentioned prediction reference point set is equal to 0, the attribute prediction value of the above-mentioned current point to be encoded is set to a preset constant.
[0080] Step S102: When the number of points in the above-mentioned prediction reference point set is greater than 0 and not greater than the preset number of prediction points, all points in the above-mentioned prediction reference point set are taken as prediction points, and the attribute prediction value of the current point to be encoded is obtained based on the reconstruction attribute value of all the above-mentioned prediction points.
[0081] Step S103: When the number of points in the above-mentioned prediction reference point set is greater than the number of prediction points, obtain the prediction points in the above-mentioned prediction reference point set, and obtain the attribute prediction value of the current point to be encoded based on the reconstruction attribute values of all the above-mentioned prediction points. The above-mentioned prediction points are either the number of prediction points in the above-mentioned prediction reference point set that are spatially closest to the current point to be encoded, or the above-mentioned prediction points are the number of prediction points in the above-mentioned prediction reference point set that are spatially closest to the current point to be encoded, plus other points of the same distance at the closest spatial distance.
[0082] The aforementioned number of prediction points refers to the number of prediction points that need to be obtained from the prediction reference point set during encoding. Prediction points are the previously encoded points that need to be considered when encoding a given point to be encoded. That is, the number of prediction points in the prediction reference point set can be referenced during encoding. This number of prediction points is greater than 0 and can be set and adjusted according to actual needs. In this embodiment, the number of prediction points can be denoted as K, and K can be set to 3, but this is not a specific limitation. K points are selected from the prediction reference point set, and the attribute prediction value of the current point to be encoded is calculated based on the reconstructed attribute values of these K points. It should be noted that the reconstructed attribute value refers to the reconstructed attribute value after encoding the current point to be encoded. In this embodiment, the reconstructed attribute value is used to ensure the consistency of the encoding and decoding process, because only the reconstructed attribute value is available during decoding. In one application scenario, when decoding is not considered, the attribute values of K points can also be used for prediction. The aforementioned nearest spatial distance is the distance between the point in the prediction reference point set that is spatially closest to the current point to be encoded and the current point to be encoded.
[0083] During encoding, the number of prediction points closest to the current point to be encoded can be referenced in the prediction reference point set. This number of prediction points is greater than 0 and can be set and adjusted according to actual needs. In this embodiment, the number of prediction points can be denoted as K, and K can be set to 3, but this is not a specific limitation. The K points closest to the current point to be encoded are selected from the prediction reference point set, and the attribute prediction value of the current point to be encoded is calculated based on the reconstructed attribute values of these K points.
[0084] During encoding, the system can also refer to the number of prediction points closest to the current point to be encoded in the prediction reference point set, as well as other points at the same distance under the aforementioned nearest spatial distance. The number of prediction points is greater than 0, and can be set and adjusted according to actual needs. In this embodiment, the number of prediction points can be denoted as K, and K can be set to 3, but this is not a specific limitation. The system selects the K closest points to the current point to be encoded in the prediction reference point set, along with other points at the same distance under the aforementioned nearest spatial distance. Based on the reconstructed attribute values of these K points and other points at the same distance under the aforementioned nearest spatial distance, the system calculates the attribute prediction value of the current point to be encoded.
[0085] The preset constants can be preset fixed encoding prediction values, which can be set and adjusted according to actual needs. Specifically, when the number of points in the prediction reference point set is equal to 0, it means that the prediction reference point set has not yet been constructed (i.e., no points have been added to it). In this case, the attribute prediction value of the current point to be encoded is set to the preset fixed encoding prediction value. This preset fixed encoding prediction value can be preset and adjusted according to actual conditions. In one application scenario, when the attribute to be encoded is color, the preset fixed encoding prediction value can be set to R=128, G=128, B=128. When the attribute to be encoded is reflectance, it can be set to 0.
[0086] When the number of points in the aforementioned prediction reference point set is greater than 0 and not greater than the aforementioned number of prediction points (i.e., the actual number of points contained in the prediction reference point set is greater than 0 but not greater than K), all points in the prediction reference point set can be directly used as prediction points, and the attribute prediction value of the current point to be encoded can be obtained based on the reconstructed attribute values of all prediction points. Specifically, in this embodiment, the average (or weighted average) of the reconstructed attribute values of all prediction points is used as the attribute prediction value of the current point to be encoded.
[0087] When the number of points in the aforementioned prediction reference point set exceeds the aforementioned number of prediction points K, a subset (K) of points can be selected from the prediction reference point set as prediction points. The average (or weighted average) of the reconstructed attribute values of all prediction points is then used as the attribute prediction value for the current point to be encoded. It should be noted that when using the weighted average method, the weight corresponding to each prediction point can be determined based on the distance between each prediction point and the current point to be encoded. For example, the weights can be the reciprocals of the distances from each prediction point to the current point to be encoded. It should also be noted that in this case, the aforementioned prediction points are the K points in the aforementioned prediction reference point set whose coordinates are closest to the current point to be encoded. Points that are spatially closer usually have more similar attribute values; selecting these points for prediction achieves better prediction results and improves encoding efficiency.
[0088] When the number of points in the aforementioned prediction reference point set exceeds the aforementioned number of prediction points K, a subset of points can be selected from the prediction reference point set (which may be the K closest points to the current point to be encoded, plus other points at the same distance under the aforementioned nearest spatial distance) as prediction points. The average (or weighted average) of the reconstructed attribute values of all prediction points is then used as the attribute prediction value of the current point to be encoded. It should be noted that when using the weighted average method, the weights corresponding to each prediction point can be determined based on the distance between each prediction point and the current point to be encoded. For example, the weights can be the reciprocals of the distances from each prediction point to the current point to be encoded. It should also be noted that in this case, the aforementioned prediction points are the K closest points to the current point to be encoded from the aforementioned prediction reference point set, plus other points at the same distance under the aforementioned nearest spatial distance. Points that are spatially closer usually have more similar attribute values, and selecting them for prediction can achieve better prediction results and improve coding efficiency.
[0089] Specifically, in this embodiment, as Figure 3 As shown, step S200 above includes the following steps:
[0090] Step S201: Obtain the attribute residual value of the current point to be encoded based on the original attribute value and the attribute prediction value of the current point to be encoded.
[0091] Step S202: Based on the above attribute residual values, quantization and entropy encoding are performed to obtain the point cloud code stream.
[0092] Specifically, in this embodiment, the attribute residual value of the current point to be encoded is obtained based on the original attribute value and the attribute prediction value. Quantization is performed on the attribute residual value to obtain the quantized attribute residual value. Entropy encoding is then performed on the quantized attribute residual value to obtain the point cloud code stream. Inverse quantization is performed on the attribute quantized value to obtain the reconstructed attribute residual value of the current point to be encoded. The reconstructed attribute value of the current point to be encoded is obtained based on the reconstructed attribute residual value and the attribute prediction value of the current point to be encoded.
[0093] Specifically, in this embodiment, the attribute residual value = original attribute value - attribute predicted value. The attribute residual value is quantized based on a preset quantization parameter QP to obtain the quantized attribute residual value. The quantization parameter can be set and adjusted according to actual needs, and is not specifically limited here. Then, entropy encoding is performed on the quantized attribute residual value to obtain the current point cloud code stream. This completes the attribute encoding of the current point to be encoded. Further processing will then obtain the reconstructed attribute value to update the prediction reference point set. It should be noted that the output of the entropy encoding (i.e., the aforementioned point cloud code stream) can be written to an output code stream file to output the encoding result for user use.
[0094] Furthermore, the quantized attribute residuals are inversely quantized (using the same quantization parameter QP) to obtain the reconstructed attribute residuals. The reconstructed attribute value is then calculated as: Reconstructed Attribute Residual Value + Attribute Predicted Value. In this way, the reconstructed attribute value can be calculated to update the corresponding prediction reference point set.
[0095] In one application scenario, step S300 includes: based on the three-dimensional position coordinates of the points in the prediction reference point set, obtaining the point with the largest spatial distance from the current point to be encoded in the prediction reference point set as the target deletion point, deleting the target deletion point from the prediction reference point set, and adding the current point to be encoded as the target addition point to the prediction reference point set to obtain an updated prediction reference point set.
[0096] In another application scenario, step S300 includes: based on the three-dimensional position coordinates of the points in the prediction reference point set, according to a preset priority retention rule, dividing the points in the prediction reference point set into priority retention points and non-priority retention points, prioritizing the point with the largest spatial distance from the current point to be encoded among the non-priority retention points as the target deletion point, or prioritizing the point that was first added to the prediction reference point set among the non-priority retention points as the target deletion point, deleting the target deletion point from the prediction reference point set, and adding the current point to be encoded as the target addition point to the prediction reference point set to obtain an updated prediction reference point set.
[0097] The aforementioned priority retention rule is a pre-set rule used to determine which points to retain when the number of points in the prediction reference point set is too large and deletion operations are required. For example, different types of points can be set with different deletion priorities, and deletion operations are performed according to these priorities. In this embodiment, boundary points are the priority retention points, and non-boundary points are the non-priority retention points. Based on the aforementioned priority retention rule, boundary points are retained first, and non-boundary points are deleted first.
[0098] Specifically, boundary points refer to the points on the surface of each block when the point cloud is divided into multiple blocks of size H by H (the blocks are closely arranged and do not overlap). (In fact, they can be further subdivided into vertices, boundary lines, and surfaces.) Therefore, when L is 1, all points become boundary points.
[0099] Specifically, the following method is used to determine whether a point (e.g., point o) is a boundary point: A parameter L is set. L can be directly set as a natural number, or it can be calculated. In one application scenario, L can be calculated based on the point cloud density of the prediction reference point set; the higher the point cloud density, the smaller L. In this embodiment, L is preset and is a power of 2 minus 1. In another application scenario, the coordinates x, y, and z of point o are calculated and divided by L to obtain x1, y1, and z1. If any one of x1, y1, or z1 is an integer, then point o is a boundary point; otherwise, point o is not a boundary point. In yet another application scenario, the bitwise AND operation of the coordinates x, y, and z of point o with the binary form of L is performed to obtain x2, y2, and z2. If any one of x2, y2, or z2 equals L, then point o is a boundary point; otherwise, point o is not a boundary point.
[0100] In another application scenario, such as Figure 4 As shown, step S300 above includes:
[0101] Step S301: Based on the three-dimensional position coordinates of the points in the above-mentioned prediction reference point set, obtain the point in the above-mentioned prediction reference point set that is spatially closest to the current point to be encoded. When the closest spatial distance is less than a preset distance threshold and the difference between the reconstructed attribute value of the closest point and the current point to be encoded is less than a preset attribute difference threshold, calculate and obtain the target addition point and the target deletion point based on the three-dimensional position coordinates and reconstructed attribute value of the closest point and the current point to be encoded. The target deletion point is the closest point, or the point in the above-mentioned prediction reference point set that is spatially closest to the current point to be encoded, or the point that was first added to the above-mentioned prediction reference point set.
[0102] Step S302: When the nearest spatial distance is not less than the distance threshold or the difference between the reconstructed attribute value of the nearest point and the current point to be encoded is not less than the attribute difference threshold, the current point to be encoded is taken as the target addition point, and the point with the largest spatial distance from the current point to be encoded in the prediction reference point set is taken as the target deletion point or the point that was first added to the prediction reference point set is taken as the target deletion point.
[0103] Step S303: Delete the target deletion point from the prediction reference point set and add the target addition point to the prediction reference point set to obtain an updated prediction reference point set.
[0104] Among them, the distance threshold and the attribute difference threshold are pre-set thresholds used to determine the similarity between two points. When the spatial distance between two points is less than the distance threshold and the difference in the reconstructed attribute values is less than the attribute difference threshold, the two points can be considered similar, and similar points can be merged.
[0105] Specifically, the prediction reference point set can be updated based on the reconstructed attribute values of the current point to be encoded, the 3D position coordinates of the current point to be encoded, the number of prediction points, and the number of points in the prediction reference point set. This includes the following steps:
[0106] Obtain a reference point number threshold, wherein the reference point number threshold is not less than the predicted point number;
[0107] When the number of points in the above-mentioned prediction reference point set is less than the above-mentioned reference point number threshold, the current point to be encoded is added to the above-mentioned prediction reference point set.
[0108] When the number of points in the aforementioned prediction reference point set is not less than the aforementioned reference point number threshold, the prediction reference point set is updated based on preset rules.
[0109] The reference point threshold is a pre-set maximum number of points in the prediction reference point set, used to limit the size of the prediction reference point set and thus reduce storage space. The reference point threshold can be pre-set or input by the user, and can also be adjusted in real time according to actual needs. No specific limitation is made here. In this embodiment, the reference point threshold is denoted as N.
[0110] When the number of points in the prediction reference point set is less than the reference point number threshold N, it means that the prediction reference point set is not yet full. At this time, the current point to be encoded is directly added to the prediction reference point set.
[0111] When the number of points in the prediction reference point set is not less than the reference point number threshold N, it indicates that the prediction reference point set is full, and the number of prediction reference points needs to be controlled during the update. At this time, it is necessary to determine the target addition points and target deletion points.
[0112] In one application scenario, when the number of points in the prediction reference point set is not less than the reference point number threshold N, based on the three-dimensional position coordinates of the points in the prediction reference point set, the point with the largest spatial distance from the current point to be encoded in the prediction reference point set is obtained as the target deletion point. The target deletion point is deleted from the prediction reference point set, and the current point to be encoded is added to the prediction reference point set as the target addition point, thus obtaining an updated prediction reference point set.
[0113] It should be noted that because the size of N is finite, such as 128, in this embodiment, the point with the largest spatial distance from the current point to be encoded in the above-mentioned prediction reference point set is deleted as the target deletion point, and the current point to be encoded is added as the target addition point to the above-mentioned prediction reference point set. By retaining points with closer spatial distances in a finite point set, the subsequent calculation of the attribute prediction value of the point to be encoded will be more accurate, resulting in higher encoding efficiency. Therefore, the scheme in this embodiment can achieve better encoding efficiency.
[0114] In one application scenario, when the number of points in the prediction reference point set is not less than N, among all non-boundary points in the prediction reference point set, the distance dt between the point t farthest from the current point to be encoded, and a, is calculated. If dt is greater than a preset deletion distance threshold, the farthest point t is deleted. Next, if the number of points in the prediction reference point set is still greater than N, among all boundary points in the reference point set, the distance dr between the point r farthest from a and a is calculated. If dr is greater than a preset deletion distance threshold, the farthest point r is deleted. Then, if the number of points in the prediction reference point set is still greater than N, the point with the greatest spatial distance from a within the prediction reference point set is deleted. It should be noted that the corresponding reconstruction attribute values can also be considered in the above process. For example, point t is deleted when the distance dt between t and a is greater than a preset deletion distance threshold and / or the difference ut between the reconstruction attribute values of t and a is greater than a preset deletion attribute difference threshold. The deletion distance threshold and the encoding distance threshold can be the same or different, and are not specifically limited here.
[0115] It should be noted that because the size of N is finite, such as 128, existing technologies can only simply delete the point furthest in the one-dimensional sort to maintain this size. However, this furthest sorted point is unlikely to be the point with the greatest spatial distance. The closer the spatial distance between points, the more accurate the prediction of the attribute values of the points to be encoded will be, and the higher the encoding efficiency will be. Therefore, the scheme in this embodiment can achieve better encoding efficiency.
[0116] In another application scenario, a threshold for traversing deletion points is obtained. This threshold is the number of points that need to be traversed during deletion. It's important to note that during deletion, each point needs to be traversed sequentially to determine if it's a point to be deleted. To avoid excessively long traversal times (e.g., when N is large, traversing all points would result in a very long waiting time), a threshold for traversing deletion points can be set. The points in the aforementioned prediction reference point set are traversed sequentially according to the order in which they were added (this order can also be random, and is not specifically limited here). When the traversal value is less than the threshold for the number of points to be deleted, the first non-boundary point in the traversal process is taken as the target deletion point and the traversal stops. When no target deletion point is found and the traversal value is not less than the threshold for the number of points to be deleted, the point in the aforementioned prediction reference point set that is spatially farthest from the current point to be encoded is taken as the target deletion point and the traversal stops. Here, the traversal value is the number of prediction reference points traversed, and the non-boundary point is a point that is not on the surface of a point cloud block when all the aforementioned prediction reference points are divided into a preset number of point cloud blocks according to their spatial location.
[0117] In another application scenario, the prediction reference point set is updated by traversing the preferred and non-preferred reserved points by recording the preferred reserved address I1 and the non-preferred reserved address I2. The initial value of I1 is the address of the first preferred reserved point, and the initial value of I2 is the address of the first non-preferred reserved point. The threshold for the number of reference points is N, and the threshold for the number of preferred reserved points is M. Then the threshold for the number of non-preferred reserved points is L = NM. If the number of preferred reserved points is greater than the threshold N, the preferred reserved point at address I1 is downgraded to a non-preferred reserved point, and I1 is incremented by 1. If the number of non-preferred reserved points is greater than the threshold L, the non-preferred reserved points are traversed starting from address I2. If the traversed non-preferred reserved point is a non-boundary point, the traversal stops and the point is deleted. If it is a boundary point, the next point is traversed. If the number of traversed non-preferred reserved points equals L, the non-preferred reserved point at address I2 is deleted, and I2 is incremented by 1. The current point to be encoded is added as the target addition point to the prediction reference point set, resulting in the updated prediction reference point set.
[0118] In one application scenario, when the number of points in the prediction reference point set is not less than the reference point number threshold N, the spatial distance d between the current point to be encoded a and the nearest point b in the prediction reference point set is calculated, along with the difference e between the reconstructed attribute values. If d is less than the distance threshold and e is less than the attribute difference threshold, it indicates that a and b are similar. In this case, the target addition point p is calculated based on a and b, and p is added to the prediction reference point set. Point b is then removed from the prediction reference point set. This merges similar points, better utilizing points with significant differences in properties, achieving better encoding results. By using attribute values and spatial distances to filter points and merge similar points, the prediction reference point set for the point to be encoded is updated, avoiding redundancy by including similar information points. This allows for the inclusion of more point information within the same reference point set size, aiding in attribute prediction for the point to be encoded and achieving more efficient point cloud attribute encoding.
[0119] Specifically, the calculation of point p can be performed using the formula Ap = (Aa*Wa + Ab*Wb) / (Wa + Wb), where Ap represents the spatial coordinates (x, y, z) or attribute value of point p, Aa and Ab represent the corresponding coordinates or attribute values of points a and b, and Wa and Wb represent the weights of points a and b, respectively. When a is added to the prediction reference point set, its weight can be set to 1. When p is added to the prediction reference point set, its weight can be set in conjunction with the weights of points a and b (for example, setting its weight to the sum of the weights of a and b, or setting its weight to the weight of b).
[0120] It should be noted that in this embodiment, after attribute prediction is completed, the prediction reference point set is updated. For example, the prediction reference point set is used to predict the attributes of the current point to be encoded, and then the prediction reference point set is updated with the current point to be encoded to obtain a new prediction reference point set. The new prediction reference point set is then used to predict the attributes of the next point. After each attribute prediction for the current point to be encoded is completed, the prediction reference point set must be updated. This adds new points to the prediction reference point set, which may cause the number of points in the prediction reference point set to exceed N. When the number of prediction reference points exceeds N, some points need to be deleted to control the size of the prediction reference point set.
[0121] Corresponding to the above point cloud attribute encoding method, this embodiment of the invention also provides a point cloud attribute encoding device, which includes a processor, a memory, and a communication bus; the memory stores a computer-readable program that can be executed by the processor.
[0122] The aforementioned communication bus enables communication between the processor and the memory;
[0123] When the processor executes the computer-readable program, it implements any one of the steps in the point cloud attribute encoding method described above.
[0124] It should be noted that the specific functions or settings of the point cloud attribute encoding device described above can be referred to the description in the above method embodiments, and will not be repeated here.
[0125] like Figure 5 As shown, corresponding to the above point cloud attribute encoding method, this embodiment of the invention also provides a point cloud attribute decoding method, the method comprising:
[0126] Step A100: Based on the prediction reference point set, perform attribute prediction on the current point to be decoded to obtain the attribute prediction value of the current point to be decoded.
[0127] Step A200: Based on the point cloud code stream and the attribute prediction values of the current point to be decoded, obtain the reconstructed attribute values of the current point to be decoded.
[0128] Step A300: Update the above-mentioned prediction reference point set based on preset rules, which are executed based on the three-dimensional position coordinates of the points in the above-mentioned prediction reference point set.
[0129] In this embodiment, the attributes of multiple points to be decoded are sequentially decoded based on the above-described point cloud attribute decoding method. After decoding each point, the aforementioned prediction reference point set is updated. Then, attribute prediction and decoding are performed on the next point to be decoded based on the updated prediction reference point set. The point cloud bitstream is the bitstream obtained after the aforementioned point cloud attribute encoding and can be used as input during the decoding process. The aforementioned current point to be decoded is the point currently being processed.
[0130] The points to be decoded mentioned above are those that require attribute decoding. Point cloud decoding includes geometric decoding and attribute decoding. In this embodiment of the invention, point cloud attributes are decoded, such as the color attribute or reflectance attribute of the point cloud. It should be noted that the points to be decoded include the point's position coordinates and attribute values.
[0131] Specifically, in one embodiment, the point cloud code stream is attribute-decoded based on a set of prediction reference points. After each attribute decoding of a current point to be decoded is completed, the set of prediction reference points is updated, wherein the set of prediction reference points is updated based on the three-dimensional position coordinates of each point to be decoded.
[0132] The aforementioned predicted reference point set is used for point cloud attribute decoding and is based on points that have already been decoded. Specifically, the predicted reference point set is updated based on the three-dimensional position coordinates of the points, which better reflects the actual spatial relationships between the points. This allows for better attribute prediction based on the positional information of each point during decoding, improving decoding efficiency. It should be noted that the aforementioned preset rules can also simultaneously consider the reconstructed attribute values and three-dimensional position coordinates of the points, making better use of point cloud information.
[0133] As can be seen from the above, in the point cloud attribute decoding method provided by the embodiments of the present invention, the prediction reference point set is constructed and updated based on the three-dimensional position coordinates of the points, thereby making full and efficient use of the position information of each point for attribute prediction, which is beneficial to improving decoding efficiency.
[0134] Specifically, in this embodiment, step A100 includes the following steps:
[0135] When the number of points in the above-mentioned prediction reference point set is equal to 0, the attribute prediction value of the current point to be decoded is set to a preset constant.
[0136] When the number of points in the above-mentioned prediction reference point set is greater than 0 and not greater than the preset number of prediction points, all points in the above-mentioned prediction reference point set are used as prediction points, and the attribute prediction value of the above-mentioned current point to be decoded is obtained based on the reconstruction attribute value of all the above-mentioned prediction points.
[0137] When the number of points in the aforementioned prediction reference point set is greater than the aforementioned number of prediction points, the prediction points in the aforementioned prediction reference point set are obtained, and the attribute prediction value of the current point to be decoded is obtained based on the reconstruction attribute values of all the aforementioned prediction points. The aforementioned prediction points are either the number of prediction points in the aforementioned prediction reference point set that are spatially closest to the current point to be decoded, or the aforementioned prediction points are the number of prediction points in the aforementioned prediction reference point set that are spatially closest to the current point to be decoded, plus other points of the same distance under the nearest spatial distance.
[0138] The aforementioned number of prediction points refers to the number of prediction points that need to be obtained from the prediction reference point set during decoding. A prediction point is a previously decoded point that needs to be considered when decoding a given point. That is, decoding may not refer to all points in the prediction reference point set, but rather a specific number of prediction points. The aforementioned number of prediction points is greater than 0 and can be set and adjusted according to actual needs. In this embodiment, the number of prediction points can be denoted as K', and K' can be set to 3, but this is not a specific limitation. K' points are selected from the prediction reference point set to calculate the attribute prediction value of the current point to be decoded. In this embodiment, K' = K.
[0139] The preset constants can be fixed values that can be set and adjusted according to actual needs. Specifically, when the number of points in the prediction reference point set is 0, it means that the prediction reference point set has not yet been constructed (i.e., no points have been added to it). In this case, the attribute prediction value of the current point to be decoded is set to a preset fixed value. This preset fixed value can be set and adjusted according to the actual situation. In one application scenario, when the attribute to be decoded is color, the preset fixed values can be set to R=128, G=128, B=128. When the attribute to be decoded is reflectance, the preset fixed values can be set to 0.
[0140] When the number of predicted points is greater than 0 but not greater than the number of predicted points mentioned above, that is, the actual number of points contained in the prediction reference point set is greater than 0 but not greater than K', all points in the prediction reference point set can be directly used as predicted points, and the attribute prediction value of the current point to be decoded can be obtained based on all predicted points. Specifically, in this embodiment, the average (or weighted average) of the reconstructed attribute values of all predicted points is used as the attribute prediction value of the current point to be decoded.
[0141] When the number of predicted points exceeds the number of predicted points K', a subset (K' points) can be selected from the set of predicted reference points as predicted reference points, and the average (or weighted average) of the reconstructed attribute values of all predicted points can be used as the attribute prediction value of the current point to be decoded. It should be noted that when using the weighted average method, the weight corresponding to each predicted point can be determined based on the distance between each predicted point and the current point to be decoded. For example, the weights can be the reciprocals of the distances from each predicted point to the current point to be decoded. It should also be noted that, in this case, the predicted points can be the K' points in the set of predicted reference points that are spatially closest to the current point to be decoded, i.e., selecting the K' points in the set of predicted reference points that are spatially closest to the current point to be decoded to predict the attributes of the current point to be decoded; alternatively, the predicted points can be the K' points in the set of predicted reference points that are spatially closest to the current point to be decoded, plus other points of equal distance within the closest spatial distance range, i.e., selecting the K' points in the set of predicted reference points that are spatially closest to the current point to be decoded, plus other points of equal distance within the closest spatial distance range, to predict the attributes of the current point to be decoded. These prediction points are spatially closer to the current point to be decoded, and their attribute values are usually also closer. Selecting them for prediction can achieve better prediction results and improve decoding efficiency and quality.
[0142] Specifically, in this embodiment, step A200 includes the following steps:
[0143] Decode the point cloud stream to obtain the attribute residual values of the current point to be decoded;
[0144] Based on the attribute residual value of the current point to be decoded and the attribute prediction value of the current point to be decoded, the reconstructed attribute value of the current point to be decoded is obtained.
[0145] The decoding process in this embodiment is the inverse of the encoding process. Specifically, entropy decoding is performed on the input point cloud code stream to obtain the quantization residual value of the current point to be decoded. Then, according to the given quantization parameters QP, inverse quantization is performed to obtain the attribute residual value. The reconstructed attribute value is then calculated as: attribute residual value + predicted value. Finally, the prediction reference point set is updated according to the corresponding rules in the encoding process.
[0146] In one application scenario, step A300 includes: based on the three-dimensional position coordinates of the points in the prediction reference point set, obtaining the point with the largest spatial distance from the current point to be decoded in the prediction reference point set as the target deletion point, deleting the target deletion point from the prediction reference point set, and adding the current point to be decoded as the target addition point to the prediction reference point set to obtain an updated prediction reference point set.
[0147] In another application scenario, step A300 includes: based on the three-dimensional position coordinates of the points in the prediction reference point set, according to a preset priority retention rule, dividing the points in the prediction reference point set into priority retention points and non-priority retention points, prioritizing the point with the largest spatial distance from the current point to be decoded among the non-priority retention points as the target deletion point, or prioritizing the point that was added to the prediction reference point set earliest among the non-priority retention points as the target deletion point, deleting the target deletion point from the prediction reference point set, and adding the current point to be decoded as the target addition point to the prediction reference point set to obtain an updated prediction reference point set.
[0148] The aforementioned priority retention rule is a pre-set rule used to determine which points to retain when the number of points in the prediction reference point set is too large and deletion operations are required. For example, different types of points can be set with different deletion priorities, and deletion operations are performed according to these priorities. In this embodiment, boundary points are the priority retention points, and non-boundary points are the non-priority retention points. Based on the aforementioned priority retention rule, boundary points are retained first, and non-boundary points are deleted first.
[0149] Specifically, boundary points refer to the points on the surface of each block when the point cloud is divided into multiple H-by-H blocks (the blocks are closely arranged and do not overlap). (In fact, they can be further subdivided into vertices, boundary lines, and surfaces.) The specific methods for determining boundary points can be found in the detailed description of point cloud attribute encoding methods, which will not be repeated here.
[0150] In another application scenario, such as Figure 6 As shown, step A300 above includes:
[0151] Step A301: Based on the three-dimensional position coordinates of the points in the above-mentioned prediction reference point set, obtain the point in the above-mentioned prediction reference point set that is spatially closest to the current point to be decoded. When the spatial distance of the nearest point is less than a preset distance threshold and the difference between the reconstructed attribute value of the nearest point and the current point to be decoded is less than a preset attribute difference threshold, calculate and obtain the target addition point and the target deletion point based on the three-dimensional position coordinates and reconstructed attribute value of the nearest point and the current point to be decoded. The target deletion point is the nearest point, or the point in the above-mentioned prediction reference point set that is spatially closest to the current point to be decoded, or the point that was first added to the above-mentioned prediction reference point set.
[0152] Step A302: When the nearest spatial distance is not less than the distance threshold or the difference between the reconstructed attribute value of the nearest point and the current point to be decoded is not less than the attribute difference threshold, the current point to be decoded is taken as the target addition point, and the point with the largest spatial distance from the current point cloud data in the prediction reference point set is taken as the target deletion point or the point that was first added to the prediction reference point set is taken as the target deletion point.
[0153] Step A303: Delete the target deletion point from the prediction reference point set and add the target addition point to the prediction reference point set to obtain an updated prediction reference point set.
[0154] Among them, the distance threshold and the attribute difference threshold are pre-set thresholds used to determine the similarity between two points. When the spatial distance between two points is less than the distance threshold and the difference in the reconstructed attribute values is less than the attribute difference threshold, the two points can be considered similar, and similar points can be merged.
[0155] Specifically, in one embodiment, the prediction reference point set can be updated based on the reconstructed attribute value of the current point to be decoded, the three-dimensional position coordinates of the current point to be decoded, the number of prediction points, and the number of points in the prediction reference point set. This includes the following steps:
[0156] Obtain the threshold for the number of prediction points, wherein the threshold for the number of prediction points is not less than the number of prediction points.
[0157] When the number of points in the above-mentioned prediction reference point set is less than the number of prediction points, the above-mentioned current point to be decoded is added to the above-mentioned prediction reference point set.
[0158] When the number of points in the aforementioned prediction reference point set is not less than the number of prediction points, the point in the aforementioned prediction reference point set that is spatially closest to the current point to be decoded is obtained. When the aforementioned closest spatial distance is less than a preset distance threshold and the attribute difference between the aforementioned closest point and the current point to be decoded is less than a preset attribute difference threshold, a target addition point is calculated based on the current point to be decoded and the aforementioned closest point, and the aforementioned target addition point is added to the aforementioned prediction reference point set. When the aforementioned closest spatial distance is not less than the aforementioned distance threshold or the attribute difference between the aforementioned closest point and the current point to be decoded is not less than the aforementioned attribute difference threshold, the current point to be decoded is added to the aforementioned prediction reference point set.
[0159] Specifically, in one embodiment, a threshold for the number of points to be deleted during traversal is obtained; when the number of points in the predicted reference point set is greater than the threshold for the number of predicted points, a target deletion point in the predicted reference point set is obtained and deleted, wherein the target deletion point is obtained through a preset traversal rule, the traversal rule includes: traversing the points in the predicted reference point set sequentially according to the order in which they were added to the predicted reference point set; when the traversal value is less than the threshold for the number of points to be deleted during traversal, the first non-boundary point in the traversal process is taken as the target deletion point and the traversal is stopped; when the traversal value is not less than the threshold for the number of points to be deleted during traversal, the point in the predicted reference point set with the largest spatial distance from the current point to be decoded is taken as the target deletion point and the traversal is stopped, wherein the traversal value is the number of predicted reference points traversed, and the non-boundary point is a point that is not on the surface of a point cloud block when all the predicted reference points are divided into a preset number of point cloud blocks according to their spatial location.
[0160] It should be noted that the prediction reference point set can also be updated by referring to the specific methods for updating the prediction reference point set during the encoding process, which will not be elaborated here.
[0161] Corresponding to the above point cloud attribute decoding method, this embodiment of the invention also provides a point cloud attribute decoding device, which includes a processor, a memory, and a communication bus; the memory stores a computer-readable program that can be executed by the processor.
[0162] The aforementioned communication bus enables communication between the processor and the memory;
[0163] When the processor executes the computer-readable program, it implements any one of the steps in the point cloud attribute decoding method described above.
[0164] It should be noted that the specific functions or settings of the point cloud attribute decoding device described above can be referred to the description in the above method embodiments, and will not be repeated here.
[0165] Furthermore, based on AVS-PCC PCRM software version 5.1, the embodiments of the present invention tested the benchmark results of the method of this embodiment and the PCRM test platform, and the results are shown in Tables 1, 2 and 3 below.
[0166] Table 1
[0167]
[0168] Table 2
[0169]
[0170] Table 3
[0171]
[0172] Table 1 is a comparison table of rate-distortion data for luminance, chromaticity, and reflectance under one embodiment of the present invention; Table 2 is a comparison table of rate-distortion data for luminance, chromaticity, and reflectance under another embodiment of the present invention; and Table 3 is a comparison table of rate-distortion data for luminance, chromaticity, and reflectance under yet another embodiment of the present invention. According to Tables 1, 2, and 3, compared to the baseline results of the PCRM test platform, under lossless geometry and lossy attribute conditions, for luminance, the end-to-end attribute rate-distortion of the present invention is reduced by 4.3%, 1.3%, and 0.3%, respectively; for chromaticity (Cb), the end-to-end attribute rate-distortion of the present invention is reduced by 3.6%, 1.4%, and 0.3%, respectively; for chromaticity (Cr), the end-to-end attribute rate-distortion of the present invention is reduced by 3.5%, 1.2%, and 0.3%, respectively; and for reflectance, the end-to-end attribute rate-distortion of the present invention is reduced by 0.2%, 0.2%, and 0.1%, respectively; thus achieving better encoding and decoding effects.
[0173] Based on the above embodiments, the present invention also provides a smart terminal. The smart terminal includes a processor, a memory, a network interface, and a display screen connected via a system bus. The processor of the smart terminal provides computing and control capabilities. The memory of the smart terminal includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and a point cloud attribute encoding program and / or a point cloud attribute decoding program. The internal memory provides an environment for the operation of the operating system and the point cloud attribute encoding program and / or the point cloud attribute decoding program stored in the non-volatile storage medium. The network interface of the smart terminal is used for communication with external terminals via a network connection. When the point cloud attribute encoding program and / or the point cloud attribute decoding program is executed by the processor, it implements the steps of any of the above-described point cloud attribute encoding and / or decoding methods. The display screen of the smart terminal can be a liquid crystal display screen or an electronic ink display screen.
[0174] This invention also provides a computer-readable storage medium storing a point cloud attribute encoding program and / or a point cloud attribute decoding program. When the point cloud attribute encoding program and / or point cloud attribute decoding program are executed by a processor, they implement the steps of any point cloud attribute encoding and / or decoding method provided in this invention.
[0175] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0176] Those skilled in the art will understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the functions described above can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this invention. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0177] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0178] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0179] In the embodiments provided by this invention, it should be understood that the disclosed apparatus / terminal devices and methods can be implemented in other ways. For example, the apparatus / terminal device embodiments described above are merely illustrative. For instance, the division of the above modules or units is merely a logical functional division, and in actual implementation, it can be divided in other ways. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0180] If the integrated modules / units described above are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction.
[0181] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not mean that the essence of the corresponding technical solutions deviates from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A point cloud attribute encoding method, characterized in that, include: Prediction points are obtained from a set of prediction reference points, wherein the number of points in the set of prediction reference points is greater than the preset number of prediction points; Based on the reconstructed attribute values of all the predicted points, the attribute prediction value of the current point to be encoded is obtained; Encode the point cloud bitstream based on the predicted attribute values of the current point to be encoded. When the attribute encoding of the current point to be encoded is completed, the prediction reference point set is updated based on preset rules. The preset rules include deleting points based on the three-dimensional position coordinates of the points in the prediction reference point set.
2. The point cloud attribute encoding method according to claim 1, characterized in that, The prediction points are either the number of prediction points in the prediction reference point set that are spatially closest to the current point to be encoded, or the prediction points are the number of prediction points in the prediction reference point set that are spatially closest to the current point to be encoded, plus other points of the same distance within the nearest spatial distance.
3. The point cloud attribute encoding method according to claim 1, characterized in that, The process of encoding based on the attribute prediction values of the current point to be encoded to obtain a point cloud code stream includes: The attribute residual value of the current point to be encoded is obtained based on the original attribute value and the predicted attribute value of the current point to be encoded. Based on the attribute residual values, quantization and entropy encoding are performed to obtain the point cloud code stream.
4. The point cloud attribute encoding method according to claim 1, characterized in that, The prediction reference point set is updated based on preset rules, which include deleting points based on the three-dimensional position coordinates of points in the prediction reference point set, including: Based on the three-dimensional position coordinates of the points in the prediction reference point set, the point with the largest spatial distance from the current point to be encoded in the prediction reference point set is obtained as the target deletion point. The target deletion point is deleted from the prediction reference point set, and the current point to be encoded is added to the prediction reference point set as the target addition point, thus obtaining an updated prediction reference point set.
5. The point cloud attribute encoding method according to claim 1, characterized in that, The prediction reference point set is updated based on preset rules, which include deleting points based on the three-dimensional position coordinates of points in the prediction reference point set, including: Based on the three-dimensional position coordinates of the points in the prediction reference point set, the points in the prediction reference point set are divided into priority retention points and non-priority retention points according to a preset priority retention rule. The point with the largest spatial distance from the current point to be encoded among the non-priority retention points is preferentially selected as the target deletion point, or the point that was added to the prediction reference point set earliest among the non-priority retention points is preferentially selected as the target deletion point. The target deletion point is deleted from the prediction reference point set, and the current point to be encoded is added to the prediction reference point set as the target addition point, thus obtaining an updated prediction reference point set. Among these, the priority retention points are boundary points, and the non-priority retention points are non-boundary points.
6. The point cloud attribute encoding method according to claim 1, characterized in that, The prediction reference point set is updated based on preset rules, which include deleting points based on the three-dimensional position coordinates of points in the prediction reference point set, including: Based on the 3D position coordinates of points in the predicted reference point set, the point in the predicted reference point set that is spatially closest to the current point to be encoded is obtained. When the closest spatial distance is less than a preset distance threshold and the difference between the reconstructed attribute value of the closest point and the current point to be encoded is less than a preset attribute difference threshold, a target addition point and a target deletion point are calculated based on the 3D position coordinates and reconstructed attribute value of the closest point and the current point to be encoded, wherein the target deletion point is the closest point; the 3D position coordinates of the target addition point are obtained by weighted averaging the 3D position coordinates of the closest point and the current point to be encoded, and the reconstructed attribute value of the target addition point is obtained by weighted averaging the reconstructed attribute value of the closest point and the current point to be encoded; the closest spatial distance is the spatial distance between the current point to be encoded and the point in the predicted reference point set that is spatially closest to the current point to be encoded. When the nearest spatial distance is not less than the distance threshold or the difference between the reconstructed attribute value of the nearest point and the current point to be encoded is not less than the attribute difference threshold, the current point to be encoded is taken as the target addition point, and the point with the largest spatial distance from the current point to be encoded in the prediction reference point set is taken as the target deletion point or the point that was first added to the prediction reference point set is taken as the target deletion point. The target deletion point is removed from the prediction reference point set, and the target addition point is added to the prediction reference point set to obtain an updated prediction reference point set.
7. A point cloud attribute encoding device, characterized in that, It includes a processor, a memory, and a communication bus; the memory stores a computer-readable program that can be executed by the processor; The communication bus enables communication between the processor and the memory; When the processor executes the computer-readable program, it implements the steps of the method as described in any one of claims 1-6.
8. A point cloud attribute decoding method, characterized in that, include: Prediction points are obtained from a set of prediction reference points, wherein the number of points in the set of prediction reference points is greater than the preset number of prediction points; Based on the reconstructed attribute values of all the predicted points, the attribute prediction value of the current point to be decoded is obtained; Based on the point cloud code stream and the attribute prediction value of the current point to be decoded, the reconstructed attribute value of the current point to be decoded is obtained; When the attribute decoding of the current point to be decoded is completed, the prediction reference point set is updated based on preset rules. The preset rules include deleting points based on the three-dimensional position coordinates of the points in the prediction reference point set.
9. The point cloud attribute decoding method according to claim 8, characterized in that, The prediction points are either the number of prediction points in the prediction reference point set that are spatially closest to the current point to be decoded, or the prediction points are the number of prediction points in the prediction reference point set that are spatially closest to the current point to be decoded, plus other points of the same distance within the nearest spatial distance.
10. The point cloud attribute decoding method according to claim 8, characterized in that, The process of obtaining the reconstructed attribute value of the current point to be decoded based on the point cloud code stream and the attribute prediction value of the current point to be decoded includes: Decode the point cloud stream to obtain the attribute residual value of the current point to be decoded; The reconstructed attribute value of the current point to be decoded is obtained based on the attribute residual value and the attribute prediction value of the current point to be decoded.
11. The point cloud attribute decoding method according to claim 8, characterized in that, The prediction reference point set is updated based on preset rules, which include deleting points based on the three-dimensional position coordinates of points in the prediction reference point set, including: Based on the three-dimensional position coordinates of the points in the prediction reference point set, the point with the largest spatial distance from the current point to be decoded is obtained as the target deletion point. The target deletion point is deleted from the prediction reference point set, and the current point to be decoded is added to the prediction reference point set as the target addition point, thus obtaining an updated prediction reference point set.
12. The point cloud attribute decoding method according to claim 8, characterized in that, The prediction reference point set is updated based on preset rules, which include deleting points based on the three-dimensional position coordinates of points in the prediction reference point set, including: Based on the three-dimensional position coordinates of the points in the prediction reference point set, the points in the prediction reference point set are divided into priority retention points and non-priority retention points according to a preset priority retention rule. The point with the largest spatial distance from the current point to be decoded among the non-priority retention points is preferentially selected as the target deletion point, or the point that was added to the prediction reference point set earliest among the non-priority retention points is preferentially selected as the target deletion point. The target deletion point is deleted from the prediction reference point set, and the current point to be decoded is added to the prediction reference point set as the target addition point, thus obtaining an updated prediction reference point set. Among these, the priority retention points are boundary points, and the non-priority retention points are non-boundary points.
13. The point cloud attribute decoding method according to claim 8, characterized in that, The prediction reference point set is updated based on preset rules, which include deleting points based on the three-dimensional position coordinates of points in the prediction reference point set, including: Based on the 3D position coordinates of points in the predicted reference point set, the point in the predicted reference point set that is spatially closest to the current point to be decoded is obtained. When the closest spatial distance is less than a preset distance threshold and the difference between the reconstructed attribute value of the closest point and the current point to be decoded is less than a preset attribute difference threshold, a target addition point and a target deletion point are calculated based on the 3D position coordinates and reconstructed attribute value of the closest point and the current point to be decoded, wherein the target deletion point is the closest point; the 3D position coordinates of the target addition point are obtained by weighted averaging of the 3D position coordinates of the closest point and the current point to be decoded, and the reconstructed attribute value of the target addition point is obtained by weighted averaging of the reconstructed attribute value of the closest point and the current point to be decoded; the closest spatial distance is the spatial distance between the current point to be decoded and the point in the predicted reference point set that is spatially closest to the current point to be decoded. When the nearest spatial distance is not less than the distance threshold or the difference between the reconstructed attribute value of the nearest point and the current point to be decoded is not less than the attribute difference threshold, the current point to be decoded is taken as the target addition point, and the point with the largest spatial distance from the current point to be decoded in the prediction reference point set is taken as the target deletion point or the point that was first added to the prediction reference point set is taken as the target deletion point. The target deletion point is removed from the prediction reference point set, and the target addition point is added to the prediction reference point set to obtain an updated prediction reference point set.
14. A point cloud attribute decoding device, characterized in that, It includes a processor, a memory, and a communication bus; the memory stores a computer-readable program that can be executed by the processor; The communication bus enables communication between the processor and the memory; When the processor executes the computer-readable program, it implements the steps of the method as described in any one of claims 8-13.
Citation Information
Patent Citations
Point cloud attribute prediction, encoding, and decoding method and device based on neighbor weight optimization
WO2021023206A1