Point cloud encoding method, point cloud decoding method, device and storage medium
By using Hilbert order to sort and encode point cloud points in the point cloud encoding method, the problem of insufficient compression performance of point cloud attribute data in the prior art is solved, and a more efficient compression effect is achieved.
Patent Information
- Application Number
- CN202080081334.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-24
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2040-11-24
AI Technical Summary
In the prior art, in the encoding and decoding method of point cloud attribute data, compression performance still needs to be improved.
The point cloud encoding method based on the Hilbert order is used to calculate the Hilbert code by obtaining the geometric coordinates of the point cloud points, and the Hilbert order is obtained, and the point cloud points are attributed to be encoded and decoded in this order. When encoding, the previous point cloud points are used as reference points for prediction encoding.
Because the Hilbert order has good spatial neighbor characteristics, it can ensure that the reference point of the current point is closer in the spatial distance, thereby improving the prediction accuracy and compression performance of the attribute value.
Smart Images

Figure CN114793484B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of point cloud data processing, and in particular to a point cloud encoding method, device and computer-readable storage medium, and also to a point cloud encoding method, device and computer-readable storage medium. Background Art
[0002] Point cloud is a collection of multiple point cloud points in three-dimensional space. The scale of point cloud data is very large. In order to facilitate the storage and transmission of point cloud data, it is necessary to encode and compress point cloud data. Point cloud data can include geometric data and attribute data, where geometric data and attribute data are encoded separately. Since the encoding of attribute data requires the use of geometric data, the encoding of geometric data is usually completed before the encoding of attribute data. At present, the compression performance of the encoding and decoding method for point cloud attribute data still needs to be improved. Summary of the invention
[0003] In view of this, the present application provides a point cloud encoding method, device and computer-readable storage medium, and also provides a point cloud encoding method, device and computer-readable storage medium, one of the purposes of which is to improve the compression performance of point cloud attribute encoding.
[0004] A first aspect of an embodiment of the present application provides a point cloud encoding method, including:
[0005] Acquire corresponding Hilbert codes of the plurality of point cloud points according to the geometric coordinates of the plurality of point cloud points;
[0006] Sort the plurality of point cloud points according to the Hilbert code to obtain a Hilbert order;
[0007] The point cloud points are attribute-encoded in sequence according to the Hilbert order, wherein, when the current point is attribute-encoded, a reference point corresponding to the current point is determined according to the point cloud points before the current point on the Hilbert order, and the attribute value of the current point is predictively encoded according to the attribute value of the reference point.
[0008] A second aspect of an embodiment of the present application provides a point cloud decoding method, comprising:
[0009] Acquire corresponding Hilbert codes of the plurality of point cloud points according to the geometric coordinates of the plurality of point cloud points;
[0010] Sort the plurality of point cloud points according to the Hilbert code to obtain a Hilbert order;
[0011] The point cloud points are sequentially attribute-decoded according to the Hilbert order, wherein, when the current point is attribute-decoded, a reference point corresponding to the current point is determined according to the point cloud points before the current point on the Hilbert order, and the attribute value of the current point is predicted and decoded according to the attribute value of the reference point.
[0012] A third aspect of an embodiment of the present application provides a point cloud encoding device, including: a processor and a memory storing a computer program, wherein the processor implements the following steps when executing the computer program:
[0013] Acquire corresponding Hilbert codes of the plurality of point cloud points according to the geometric coordinates of the plurality of point cloud points;
[0014] Sort the plurality of point cloud points according to the Hilbert code to obtain a Hilbert order;
[0015] The point cloud points are attribute-encoded in sequence according to the Hilbert order, wherein, when the current point is attribute-encoded, a reference point corresponding to the current point is determined according to the point cloud points before the current point on the Hilbert order, and the attribute value of the current point is predictively encoded according to the attribute value of the reference point.
[0016] A fourth aspect of an embodiment of the present application provides a point cloud decoding device, including: a processor and a memory storing a computer program, wherein the processor implements the following steps when executing the computer program:
[0017] Acquire corresponding Hilbert codes of the plurality of point cloud points according to the geometric coordinates of the plurality of point cloud points;
[0018] Sort the plurality of point cloud points according to the Hilbert code to obtain a Hilbert order;
[0019] The point cloud points are sequentially attribute-decoded according to the Hilbert order, wherein, when the current point is attribute-decoded, a reference point corresponding to the current point is determined according to the point cloud points before the current point on the Hilbert order, and the attribute value of the current point is predicted and decoded according to the attribute value of the reference point.
[0020] A fifth aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the point cloud encoding method provided in an embodiment of the present application.
[0021] A sixth aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the point cloud decoding method provided in an embodiment of the present application.
[0022] In the point cloud encoding method provided in the embodiment of the present application, the point cloud points are sequentially attribute-encoded according to the Hilbert order. Since the Hilbert order has a good spatial neighbor characteristic, among the point cloud points that have completed encoding and decoding before the current point, the points that are adjacent or close to the current point in sequence are also points that are close to the current point in three-dimensional space distance. Therefore, the reference point corresponding to the current point determined based on these points can also be closer to the current point in spatial distance, making the prediction of the attribute value of the current point based on the attribute value of the reference point more accurate, thereby improving the compression performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0024] Figure 1 These are two-dimensional and three-dimensional model diagrams corresponding to the Morton sequence provided in the embodiments of the present application.
[0025] Figure 2 It is a flowchart of the point cloud encoding method provided in an embodiment of the present application.
[0026] Figure 3 These are two-dimensional and three-dimensional model diagrams corresponding to the Hilbert order provided in the embodiments of the present application.
[0027] Figure 4 It is a flowchart of the point cloud decoding method provided in an embodiment of the present application.
[0028] Figure 5 It is a structural schematic diagram of the point cloud encoding device provided in an embodiment of the present application.
[0029] Figure 6 It is a structural diagram of the point cloud decoding device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0030] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0031] A point cloud is a collection of multiple point cloud points in a three-dimensional space. The point cloud data of each point cloud point can include a geometric part and an attribute part. Here, the data of the geometric part can be referred to as geometric data, and the data of the attribute part can be referred to as attribute data. The geometric data can be used to characterize the position of the point cloud point in the three-dimensional space, for example, it can be the geometric coordinates of the point cloud point in the three-dimensional space, and the attribute data can include the attributes of the point cloud point in multiple aspects, for example, it can include the color of the point cloud point (can be RGB or YUV), reflectivity, corresponding timestamp, transparency, normal corresponding to the section, and other attributes. All aspects of the attributes of the point cloud can be numerically represented by attribute values, and the attribute values described in this application can refer to the attribute values of any of the above attributes.
[0032] The scale of point cloud data is very large. In order to facilitate the storage and transmission of point cloud data, it is necessary to encode and compress the point cloud data. The geometric data and attribute data of the point cloud are encoded separately. Among them, since the encoding of attribute data requires the use of geometric data, the encoding of geometric data is usually completed before the encoding of attribute data.
[0033] There are many implementation methods for attribute encoding of point clouds. In one implementation method, predictive encoding can be used. Predictive encoding means that the attribute value of the point cloud point that has been encoded and decoded can be used to predict the attribute value of the point cloud point that is currently being encoded and decoded, so as to obtain the predicted attribute value of the current point. Therefore, only the residual between the predicted attribute value and the true attribute value of the current point needs to be transmitted between the encoding end and the decoding end, thereby reducing the amount of data required to be transmitted.
[0034] It is understandable that if the predicted attribute value of the current point is more accurate, that is, closer to the actual attribute value of the current point, the smaller the residual error that needs to be transmitted, the better the compression performance. The predicted attribute value of the current point is determined based on the attribute value of the reference point corresponding to the current point, and the reference point corresponding to the current point is determined from the point cloud points that have completed encoding and decoding. Therefore, how to design the encoding and decoding order of the point cloud points so that the point cloud points with a three-dimensional space distance close to the current point can complete encoding and decoding before the current point (from a statistical point of view, the closer the attribute value of the point cloud points with a three-dimensional space distance close to the current point is to the attribute value of the current point) is an important factor in improving compression performance.
[0035] In one embodiment, the point cloud points can be encoded and decoded based on the Morton order. Specifically, after completing the encoding and decoding of the geometric data of multiple point cloud points, the corresponding Morton code can be calculated for each point cloud point according to its geometric data, and the multiple point cloud points can be sorted according to the size of the Morton code to obtain the Morton order, so that each point cloud point can be encoded and decoded in turn according to the Morton order. Among them, when encoding and decoding the current point, the reference point corresponding to the current point is determined from the point cloud points that are ranked before the current point in the Morton order, while the point cloud points that are ranked before the current point in the Morton order do not necessarily contain point cloud points that are close to the current point in three-dimensional space.
[0036] You can refer to Figure 1 , Figure 1 It is a two-dimensional and three-dimensional model diagram corresponding to the Morton order provided in the embodiment of the present application. It can be seen that the adjacent or close point cloud points on the Morton order are not necessarily adjacent or close in the three-dimensional space distance. For example, the point cloud point A in the figure, the previous point of the point cloud point A on the Morton order is the point cloud point B. Although the point cloud point A and the point cloud point B are two adjacent points on the Morton order, the point cloud point A and the point cloud point B are far apart in the three-dimensional space distance. Similar situations also exist between the point cloud points C and D, and between the point cloud points E and F... It can be found that every time a certain number of points are separated on the Morton order, the three-dimensional space distance between the points will jump with different amplitudes. If the point cloud points are encoded and decoded based on the Morton order, then for the current point being encoded and decoded, the point cloud points that have been encoded and decoded before it may not contain or only contain a small number of points with a three-dimensional space distance close to the current point, which affects the quality of the reference point corresponding to the current point determined, and ultimately leads to inaccurate predicted attribute values of the current point and reduced compression performance.
[0037] To solve the above problems, the present application provides a point cloud encoding method. Figure 2 , Figure 2 : is a flow chart of a point cloud encoding method provided in an embodiment of the present application. The method may include the following steps:
[0038] S202: Obtain corresponding Hilbert codes of the plurality of point cloud points according to the geometric coordinates of the plurality of point cloud points.
[0039] S204 , sorting the plurality of point cloud points according to the Hilbert code to obtain a Hilbert order.
[0040] S206. Attribute encoding is performed on the point cloud points in sequence according to the Hilbert order, wherein when the attribute encoding is performed on the current point, a reference point corresponding to the current point is determined according to the point cloud points before the current point in the Hilbert order, and the attribute value of the current point is predictively encoded according to the attribute value of the reference point.
[0041] The point cloud encoding method provided in the embodiment of the present application is to encode the attributes of the point cloud points in sequence according to the order of the point cloud points on the Hilbert order. For the Hilbert order, please refer to Figure 3 , Figure 3 These are two-dimensional and three-dimensional model diagrams corresponding to the Hilbert order provided in the embodiments of the present application.
[0042] The Hilbert curve is a continuous fractal space-filling curve, also known as the Hilbert space-filling curve, which can map high-dimensional space to one dimension. The Hilbert curve has a good spatial neighbor property, which means that data points that are close in one-dimensional space are also close in high-dimensional space. Therefore, the Hilbert order does not have the disadvantage of periodic jumps in the spatial distances between adjacent points of the Morton order. As long as the points are adjacent or close on the Hilbert order, the distances between these points in three-dimensional space are also adjacent or close.
[0043] Since the Hilbert order has good spatial neighbor characteristics and the point cloud points are encoded sequentially according to the Hilbert order, the points in the point cloud points that have completed encoding and decoding before the current point are adjacent or close to the current point in sequence and are also close to the current point in three-dimensional space distance. Therefore, the reference point corresponding to the current point determined based on these points can also be closer to the current point in spatial distance, and the predicted attribute value of the current point determined based on the attribute value of the reference point can be more accurate, thereby improving the compression performance.
[0044] As mentioned above, the reference point corresponding to the current point can be determined based on the point cloud points before the current point on the Hilbert order. However, considering that there may be a large number of point cloud points before the current point on the Hilbert order, and the point cloud points with a larger sequence interval from the current point can provide a more limited reference value, therefore, in one embodiment, a preset number of candidate points with different attribute values can be determined from the point cloud points before the current point on the Hilbert order, starting from the current point in the sequence forward direction, and the reference point corresponding to the current point can be determined from the multiple candidate points. Here, the sequence interval between a point cloud point and the current point can be the number of points between the point cloud point and the current point on the Hilbert order. For example, the sequence interval between the Nth point and the N-1th point is the smallest, for example, it can be recorded as 0, and the sequence interval between the Nth point and the N-2th point is slightly larger, for example, it can be recorded as 1. Here, the multiple candidate points determined are candidate points with different attribute values. If the attribute value of a point cloud point that has completed encoding and decoding is the same as the attribute value of a determined candidate point, the point cloud point can be skipped and candidate points can continue to be selected in the forward direction until the number of candidate points reaches the preset number.
[0045] After multiple candidate points are determined, the reference point corresponding to the current point can be determined from the multiple candidate points. When determining the reference point corresponding to the current point, in one embodiment, the candidate point whose attribute value is closest to the attribute value of the current point among the multiple candidate points can be determined as the reference point corresponding to the current point. Here, for the encoding end, the attribute value of the current point is known, so the encoding end can compare the attribute value of each candidate point with the attribute value of the current point, so as to determine the candidate point whose attribute value is closest to the attribute value of the current point as the reference point corresponding to the current point. Correspondingly, since there is only one reference point corresponding to the current point, in one embodiment, the attribute value of the reference point can be directly determined as the predicted attribute value of the current point. When determining the reference point corresponding to the current point from multiple candidate points, other embodiments can also be adopted, such as selecting multiple reference points and obtaining the predicted attribute value of the current point by fusing the attribute values of multiple reference points.
[0046] After determining the reference point corresponding to the current point, the attribute value of the current point can be predictively encoded according to the attribute value of the reference point. Specifically, the predicted attribute value of the current point can be determined according to the attribute value of the reference point, and then the attribute value of the current point can be encoded according to the predicted attribute value of the current point.
[0047] It should be noted that the attribute value of the point cloud point that has been coded and decoded before the current point described in this application can be a reconstructed attribute value. Correspondingly, the attribute value of the candidate point can also be a reconstructed attribute value, and the attribute value stored in the prediction table and hash table described later can also be a reconstructed attribute value. In the process of predictive coding, after determining the predicted attribute value of the current point, the encoder can calculate the residual between the predicted attribute value and the true attribute value of the current point, and transmit it to the decoder after entropy coding the residual. The decoder can obtain the residual after entropy decoding, and can reconstruct the attribute value of the current point based on the residual and the predicted attribute value of the current point. However, the predicted attribute value of the current point at the decoding end is determined based on the attribute value obtained by its previous reconstruction. Although the encoder can directly obtain the true attribute value of the point cloud point, in order to correspond to the reconstruction process of the decoding end and reduce the reconstruction error of the decoding end, the encoder can reconstruct the attribute value of the encoded point cloud point after encoding the attribute value of the point cloud point to obtain the reconstructed attribute value, and can determine the predicted attribute value of the current point based on the reconstructed attribute value, which is consistent with the predicted attribute value of the current point determined by the decoding end.
[0048] In one embodiment, a prediction table can also be established using the attribute values of the determined multiple candidate points. The prediction table may include the attribute values of the multiple candidate points, and a corresponding index value may be assigned to each attribute value. Since the attribute value of the current point is unknown to the decoding end, the decoding end cannot determine the reference point corresponding to the current point by comparing the attribute values of each candidate point with the current point like the encoding end. To this end, the encoding end can determine the index value corresponding to the attribute value of the reference point in the prediction table after determining the reference point corresponding to the current point, and transmit the index value to the decoding end. The decoding end can then determine the attribute value of the reference point corresponding to the current point based on the same prediction table established by it after decoding to obtain the index value.
[0049] In one implementation, the index value may be fixed-length encoded, that is, the index value may be represented by a fixed number of bits. In one implementation, the index value may also be variable-length encoded.
[0050] Since the Hilbert order has a good spatial neighbor characteristic, that is, the point cloud points that are adjacent or close to the current point in sequence are also adjacent or close to the current point in three-dimensional space distance. If the reference point corresponding to the current point is determined based on the closeness of the attribute value to the attribute value of the current point, the point cloud point with a smaller sequence interval with the current point is more likely to be determined as the reference point corresponding to the current point. Therefore, in one embodiment, in order to further save the bit rate, when establishing the prediction table, the index value corresponding to the attribute value of the candidate point can be positively correlated with the sequence distance between the candidate point and the current point, that is, the smaller the sequence distance between the candidate point and the current point, the smaller the index value corresponding to the attribute value of the candidate point, so that the index value transmitted to the decoding end can be more likely to be a smaller index value.
[0051] Further, the index value can be variable-length encoded before being transmitted to the decoding end. Based on the prediction table establishment method in the foregoing text, the index value transmitted to the decoding end is more likely to be an index value with a smaller value. Therefore, the index value can be variable-length encoded, thereby effectively reducing the number of bits occupied by the index value. There are many implementation methods for variable-length encoding of the index value. In one implementation, a preset threshold can be set, and the index value can be compared with the preset threshold. According to the comparison result, the target number of bits occupied by the index value after encoding can be determined, so that the index value can be encoded according to the target number of bits. Specifically, if the index value is greater than the preset threshold, the target number of bits can be determined to be the first number of bits, and if the index value is less than or equal to the preset threshold, the target number of bits can be determined to be the second number of bits. For example, the preset threshold can be 7, and if the index value is greater than 7, the target number of bits can be determined to be 5, and if the index value is less than or equal to 7, the target number of bits can be determined to be 3.
[0052] In one implementation, an identifier for indicating that the target number of bits is the first number of bits or the second number of bits may also be generated, and the identifier may be transmitted to the decoding end. Accordingly, the decoding end may decode the identifier from the bit stream, determine the target number of bits occupied by the index value through the identifier, and thus obtain the index value by decoding according to the target number of bits.
[0053] When the index value is variable-length coded, in one embodiment, the index value can also be variable-length binary coded, and then the index value after the binary coding is arithmetically coded. When the index value is variable-length binary coded, there are a variety of variable-length binary coding methods available for use, and these variable-length binary coding methods include but are not limited to: truncated Rice code, K-order exponential Columbus, unary code, etc. Among them, for the truncated Rice code method, its Rice parameters and threshold values can be pre-agreed as fixed values by the encoding end and the decoding end, or can be written into the header information of the code stream as a grammatical element, so that these parameters can be flexibly linked and adjusted between the encoding end and the decoding end. For the K-order exponential Columbus method, its Columbus parameters can also be pre-agreed as fixed values by the encoding end and the decoding end, or can be written into the header information of the code stream as a grammatical element, so that the Columbus parameters can be flexibly linked and adjusted between the encoding end and the decoding end.
[0054] There may also be multiple ways to perform arithmetic coding on the index value after binary coding. In one embodiment, the index value after binary coding may be arithmetically coded bit by bit according to an equal probability model or an adaptive context probability model. In one embodiment, the target number of bits of the index value after binary coding may be arithmetically coded using independent context models, and the remaining other bits may be arithmetically coded using the same context model. Here, in one example, the target number may be 0, so that all bits of the index value after binary coding may be arithmetically coded using the same context model. In one example, the target number may also be N, where N is the total number of bits of the index value after binary coding, that is, each bit of the index value after binary coding may be arithmetically coded using an independent context model. In one example, the target number may also be any integer between 0 and N, such as P (0 < P < N), then the first P bits of the index value after binary coding may be arithmetically coded using independent context models, and the remaining other bits may be arithmetically coded using the same context model.
[0055] In one embodiment, when establishing a prediction table using the attribute values of multiple candidate points, an attribute value obtained by fusing the attribute values of multiple candidate points may also be added to the prediction table. Here, for convenience of reference, the attribute value obtained by fusing the attribute values of multiple candidate points may be referred to as the first attribute value. There may be multiple ways to fuse the attribute values of multiple candidate points. In one example, the first attribute value may be obtained by weighted average of the attribute values of the multiple candidate points. It should be noted that if the first attribute value obtained by fusion is the same as the attribute value of any candidate point, the candidate point may be removed from the prediction table, and an attribute value different from the existing attribute value in the prediction table may be determined nearby in the previous direction and added to the prediction table.
[0056] Considering that the first attribute value is more likely to be the attribute value closest to the attribute value of the current point, that is, the probability that the first attribute value is determined as the predicted attribute value of the current point is higher, therefore, in one embodiment, the minimum index value in the prediction table can be corresponded to the first attribute value, for example, the first attribute value can be corresponded to the minimum index value 0, thereby further saving bit rate.
[0057] As mentioned above, from a statistical sense, the closer the attribute value of the point cloud point is to the current point, the closer the attribute value of the current point is. Therefore, in one embodiment, when determining the reference point corresponding to the current point, the point cloud point whose spatial distance to the current point is a preset value can be determined as the reference point corresponding to the current point from the point cloud points before the current point on the Hilbert order. Here, there can be multiple point cloud points whose spatial distance to the current point is a preset value, and thus there can be multiple reference points corresponding to the current point. For example, in one example, the preset value can be 1 or For the Hilbert order, there can be 6 point cloud points with a spatial distance of 1 from the current point, and the spatial distance from the current point is The point cloud can have 12 points.
[0058] In one implementation, a hash table can be established using the attribute values and geometric coordinates of the point cloud points that have completed encoding and decoding (i.e., the point cloud points before the current point on the Hilbert order). Specifically, after each point cloud point is encoded and decoded, a hash function can be used to map the geometric coordinates of the point cloud points that have completed encoding and decoding into a key value of the hash table, and the attribute values corresponding to the point cloud points can be stored under the key value (the attribute values here can be reconstructed attribute values, which have been explained in the previous text and will not be repeated here). Then, when determining the reference point corresponding to the current point, the attribute value of the point cloud point whose spatial distance from the current point is a preset value can be directly searched in the hash table. If the attribute value of the point cloud point is stored in the hash table, it means that the point cloud point has completed encoding and decoding, and the point cloud point can be determined as the reference point corresponding to the current point.
[0059] It can be understood that the point cloud point whose spatial distance from the current point is a preset value can be directly determined by the encoder and decoder. For example, if the geometric coordinates of the current point are recorded as (X1, X2, X3), the preset value is 1 or Then the spatial distance to the current point is 1 or The point cloud points may include: (X1-1, X2, X3), (X1+1, X2, X3), (X1, X2-1, X3), (X1, X2+1, X3), (X1, X2, X3-1), (X1, X2, X3+1) these 6 point cloud points with a distance of 1, as well as (X1-1, X2-1, X3), (X1+1, X2+1, X3), (X1-1, X2+1, X3 ), (X1-1, X2+1, X3), (X1-1, X2, X3-1), (X1-1, X2, X3+1), (X1+1, X2, X3-1), (X1+1, X2, X3+1), (X1, X2-1, X3-1), (X1, X2+1, X3+1), (X1, X2+1, X3-1), (X1, X2-1, X3+1), (X1, X2+1, X3-1), (X1, X2-1, X3+1) These 12 distances are Point cloud points.
[0060] Since there may be multiple point cloud points that have been encoded and decoded and whose spatial distance from the current point is a preset value, that is, there may be multiple reference points corresponding to the current point, when determining the predicted attribute value corresponding to the current point based on the attribute value of the reference point, in one embodiment, the attribute values of multiple reference points may be fused to obtain the predicted attribute value of the current point. For example, in one example, the attribute values of the reference points may be weighted averaged to calculate the predicted attribute value of the current point. Specifically, different weights may be set for point cloud points with different spatial distances from the current point. For example, a larger weight may be set for point cloud points with a spatial distance of 1 from the current point, and a smaller weight may be set for point cloud points with a spatial distance of 0 from the current point. The attribute values of the point cloud points are set with lower weights, so that the attribute values of these reference points can be used for weighted averaging to calculate the predicted attribute value of the current point.
[0061] Considering that after each point cloud point is encoded and decoded, the hash table needs to be updated. Specifically, the Hilbert code corresponding to the reconstructed geometric coordinates of the point cloud point is used to generate the corresponding key value, and the corresponding key value is filled in with the reconstructed attribute value corresponding to the point cloud point to complete the update of the hash table. As the point cloud points accumulate, the storage space occupied by the hash table will become larger and larger. Therefore, in one embodiment, the hash table can be limited by setting the upper limit of the number of items in the hash table and / or the upper limit of the capacity of the hash table. Here, in one embodiment, the upper limit of the number of items in the hash table and / or the upper limit of the capacity can be a fixed value pre-agreed by the encoding end and the decoding end. In one embodiment, the encoding end can also write the upper limit of the number of items in the hash table and / or the upper limit of the capacity as a syntax element (first information) into the header information of the code stream, so that the decoding end can decode the first information obtained from the header information of the code stream transmitted by the encoding end, and can determine the upper limit of the number of items in the hash table and / or the upper limit of the capacity according to the first information, so as to realize the scale control of the hash table on the local end, and realize the flexible linkage adjustment of the upper limit of the number of items and / or the upper limit of the capacity between the encoding end and the decoding end.
[0062] As mentioned above, there can be multiple reference points corresponding to the current point, but the more reference points corresponding to the current point, it does not mean that the predicted attribute value corresponding to the current point is more accurate. In some scenarios, if the number of reference points corresponding to the current point is too large, the predicted attribute value of the current point will deviate from the true attribute value of the current point. In addition, the point cloud density of different scenes is different, so the number of reference points that can be provided by different scenes is also different. For example, a scene with a high point cloud density can provide multiple reference points corresponding to the current point with a required spatial distance, while a scene with a low point cloud density can provide a relatively limited number of reference points corresponding to the current point. Therefore, in one embodiment, the encoder can write the upper limit of the number of reference points as a syntax element (second information) into the header information of the bitstream, and accordingly, the decoder can decode the second information obtained from the header information of the bitstream transmitted by the encoder, and can determine the upper limit of the number of reference points based on the second information, so that the upper limit of the number of reference points of the local end can be adjusted. In this way, the encoder and the decoder can flexibly adjust the upper limit of the number of reference points according to the point cloud density of different scenes and the demand for prediction accuracy, so as to better adapt to different scenes and work requirements.
[0063] It should also be noted that in the point cloud encoding and decoding based on the Morton order, the spatial distance to the current point is 1 or There are only 6 points in the point cloud at most, and these 6 points must have been encoded and decoded before the current point. Therefore, the number of reference points for point cloud encoding and decoding based on the Morton order is fixed to 6, that is, there is no need to adjust the upper limit of the number of reference points for point cloud encoding and decoding based on the Morton order. The maximum number of average point cloud points is 18 (6 points with a distance of 1 and 6 points with a distance of 12), and these spatial distances are 1 or Not all points in the point cloud are necessarily encoded and decoded before the current point, that is, some points may be located after the current point in the Hilbert order. Therefore, the number of reference points corresponding to the current point determined by the point cloud encoding and decoding based on the Hilbert order may vary and has a larger range of variation, so it is necessary to control the upper limit of the number of reference points.
[0064] The Hilbert code of a point cloud point can be determined based on the geometric coordinates of the point cloud point. The Hilbert code of a point cloud point can also be determined in a variety of ways. In one embodiment, the Hilbert code of a point cloud point can be calculated in the following way:
[0065] For the sake of convenience, we can define it as follows: If each dimension of a D-dimensional hypercube is 2 n If the hypercube is divided equally, it is called a D-dimensional n-order hypercube. Indicates that using (X1, X2...X d ...X D ) represents the coordinates of the smallest subcube in a D-dimensional n-order hypercube, where 0≤X d <2 n , 1≤d≤D. A The curve of the smallest subcube in is called the D-dimensional n-order Hilbert curve, Indicates that the D-dimensional n-order hypercube Each smallest subcube in The scan order index on is called the Hilbert code of the smallest subcube, and is expressed as Start from 0.
[0066] D-dimensional 1st-order Hilbert curve in D-dimensional 1st-order hypercube The order of scanning the smallest cube is the order of the gray code. For example, for three dimensions, the gray codes of the sub-cubes with the scanning order of 0, 1, 2, 3, 4, 5, 6, and 7 are 000, 001, 011, 010, 110, 111, 101, and 100, which are exactly the coordinates of the sub-cubes. Therefore, the Hilbert code of the D-dimensional first-order curve can be generated based on the gray code.
[0067] Using the notation (x1x2...x K ) b Represents a K-bit b-ary number, where 0≤x k <b, 1≤k≤K.
[0068] Gray code encoding function is:
[0069] G((x1x2...x K )2)=(g1g2...g K )2.
[0070] Among them, (g1g2...g K )2 is (x1x2...x K )2's gray code is calculated as follows:
[0071] (g1g2...g K )2=(x1x2...x K )2∧((x1x2...x K )2>>1).
[0072] Among them, ∧ is the bitwise exclusive OR operator, and >> is the right shift operator.
[0073] Gray code decoding function is:
[0074] DG((g1g2...g K )2)=(x1x2...x K )2.
[0075] where x k =DG k ((g1g2...g K )2).
[0076] The calculation formula is as follows:
[0077] x1=DG1((g1g2...g K )2)=g1,
[0078]
[0079] The Hilbert curve is self-similar. The generation of the curve is a recursive process. The n+1 order Hilbert curve requires the n order Hilbert curve. Specifically: convert the 2 of the D-dimensional 1st order hypercube D The positions corresponding to the sub-cubes are regarded as 2 Dquadrants, then for the n+1 order Hilbert curve, it is necessary to directly copy the n-order Hilbert curve or flip it and put it in a quadrant of the n+1 order Hilbert curve, and then connect the starting and ending points of the n-order Hilbert curve or the flipped n-order Hilbert curve in the adjacent quadrant, thus forming the n+1 order curve. There are two main types of flips used: mirror flip 1 and mirror flip 2. Both flips are mirror flips along a certain hyperplane, where
[0080] Mirror flip 1 is along the hyperplane X i -X j = 0 flip, the coordinate expression needs to exchange X i and X j The coordinates of Indicates the exchange of coordinates.
[0081] Mirror flip 2 is along the hyperplane Flip, the coordinate expression needs to be X i The coordinates become 2 n -1-X i .
[0082] Both types of flipping are order-preserving, that is, the relative positions of the points on the curve remain unchanged before and after the flipping.
[0083] The Hilbert subcurve has a direction, and the direction can be uniquely determined by the starting point coordinates and the ending point coordinates, and the starting point and the ending point coordinates differ by only one bit. For example, the starting point coordinates of the 3D 1st order Hilbert curve are DG(0)=000, and the ending point coordinates are DG(7)=100. Use B q and E q represents the coordinates of the starting and ending points of the D-dimensional 1-order subcurve in quadrant q (as mentioned above, the coordinates of quadrant q can be obtained by the gray code G(q)). Then for three dimensions, we have B 0 =000, E 0 =010, B 1 =000, E 1 =100, B 2 =000, E 2 =100, B 3 =110,E 3 =111, B 4 =110,E 4 =111, B 5 =101,E 5 =001, B 6 =101,E 6 =001, B 7 =001, E 7=011.
[0084] Each sub-curve can be transformed into a line mirror-flipped similar to a 1st-order curve by determining the coordinates of the starting point and the end point.
[0085] In the following, we can only consider three-dimensional space, that is, D=3. Given the three-dimensional coordinates of a point (X1, X2, X3), the binary expansion is:
[0086]
[0087]
[0088]
[0089] Mirror image of quadrant q 1:
[0090]
[0091] You can get 3 digits Represents the flipping rule of mirror flip 1. The specific flipping rule is as follows. Since the coordinates of the entry point and the exit point differ by only one bit, G(0)∧DG(7) and B q ∧E q There is only one digit that is 1, so Each binary bit of is either only two 1s or all 0s. If the i-th and j-th bits of are 1, then the coordinates X are swapped. i and X j , 1≤i, j≤3.
[0092] Mirror image of quadrant q 2:
[0093]
[0094] You can get 3 digits Represents the flipping rule of mirror flip 2. The specific flipping rules are as follows: The i-th bit is 1, let X i =2 n -1-X i , where n is the order of the curve to be flipped.
[0095] Hilbert coding is to calculate the Hilber code HCode based on the given coordinates (X1, X2, X3) N =(C1C2...C n ...C N-1 C N ) process, where C nis the 3-bit binary subcode of each layer, and n is taken from 1 to N in turn to perform the following calculations to obtain C n :
[0096] 1.
[0097] 2. Order
[0098] 3. Mirror flip 2: If The i-th bit is 1, let X i =2 N-n+1 -1-X i , 1≤i≤3;
[0099] Mirror flip 1: If The i-th and j-th bits of are 1, 1≤i,j≤3.
[0100] In the above manner, the geometric coordinates of the point cloud point can be used to calculate the Hilbert code of the point cloud point. When determining the Hilbert code of the point cloud point, in one implementation, the geometric coordinates of the point cloud point can be converted to the Hilbert code of the point cloud point by looking up a table, as follows:
[0101] Input: 3D Cartesian coordinates (X, Y, Z), where X, Y, and Z can be represented as n-bit binary numbers as follows:
[0102] X=xn-1xn-2...x1x0;
[0103] Y=yn-1yn-2...y1y0;
[0104] Z=zn-1zn-2...z1z0;
[0105] Output: The corresponding three-dimensional Hilbert code H.
[0106] The three-dimensional Hilbert H is obtained by the following method:
[0107] H = 0;
[0108] state = 4;
[0109] for(i=n-1;i>=0;i-=1){
[0110] H<<=3;
[0111] bx=xi;
[0112] by=yi;
[0113] bz=zi;
[0114] pos=(bx<<2)|(by<<1)|bz;
[0115] H+=HilbertTable[state][pos][1];
[0116] state=HilbertTable[state][pos][0];
[0117] }
[0118] The three-dimensional HilbertTable query table is as follows:
[0119] HilbertTable
[12] [8][2]={{{5,0},{1,7},{4,1},{2,6},{3,3},{3,4},{4,2},{2,5}},{{6,4} ,{2,7},{6,3},{8,0},{0,5},{0,6},{7,2},{7,1}},{{1,6},{0,7},{1,5},{9,4},{10,1},{11, 0}, {10, 2}, {9, 3}}, {{9, 2}, {8, 5}, {0, 3}, {0, 4}, {9, 1}, {8, 6}, {6, 0}, {10, 7}}, {{0, 0}, {5, 1}, {8, 3}, {5, 2}, {11, 7}, {6, 6}, {8, 4}, {6, 5}}, {{4, 0}, {10, 3}, {9, 7}, {10, 4}, {0, 1}, {0, 2}, {7 ,6},{7,5}},{{11,6},{11,5},{3,1},{3,2},{4,7},{1,4},{9,0},{1,3}},{{9,6},{8,1},{5,7},{1,0},{9,5},{8,2},{11,4},{11,3}},{{1,2},{4,3},{1,1},{7,0},{10,5},{4,4},{10,6}, {3, 7}}, {{2, 4}, {5, 5}, {7, 7}, {5, 6}, {2, 3}, {6, 2}, {3, 0}, {6, 1}}, {{11, 2}, {11, 1}, {3, 5}, {3, 6}, {5, 3}, {2, 0}, {5, 4}, {8, 7}}, {{7, 4}, {7, 3}, {4, 5}, {2, 2}, {6, 7}, {10, 0}, {4, 6}, {2, 1}}}
[0120] After determining the corresponding Hilbert code of each point cloud point according to its geometric coordinates, the Hilbert codes of the point cloud points can be sorted to obtain the Hilbert order. Here, the sorting according to the Hilbert code can be from large to small or from small to large.
[0121] In the point cloud encoding method provided in the embodiment of the present application, the point cloud points are sequentially attribute-encoded according to the Hilbert order. Since the Hilbert order has a good spatial neighbor characteristic, among the point cloud points that have completed encoding and decoding before the current point, the points that are adjacent or close to the current point in sequence are also points that are close to the current point in three-dimensional space distance. Therefore, the reference point corresponding to the current point determined based on these points can also be closer to the current point in spatial distance, making the prediction of the attribute value of the current point based on the attribute value of the reference point more accurate, thereby improving the compression performance.
[0122] You can refer to the following Figure 4 , Figure 4 : is a flow chart of a point cloud decoding method provided in an embodiment of the present application. The method may include the following steps:
[0123] S402: Obtain corresponding Hilbert codes of the plurality of point cloud points according to geometric coordinates of the plurality of point cloud points.
[0124] S404 , sorting the plurality of point cloud points according to the Hilbert code to obtain a Hilbert order.
[0125] S406. Decode the attributes of the point cloud points in sequence according to the Hilbert order, wherein when decoding the attributes of the current point, determine the reference point corresponding to the current point according to the point cloud points before the current point in the Hilbert order, and predict and decode the attribute value of the current point according to the attribute value of the reference point.
[0126] In one implementation, predicting and decoding the attribute value of the current point according to the attribute value of the reference point includes:
[0127] Determining a predicted attribute value of the current point according to the attribute value of the reference point;
[0128] The attribute value of the current point is decoded according to the predicted attribute value.
[0129] In one implementation, determining a reference point corresponding to the current point according to a point cloud point preceding the current point on the Hilbert order includes:
[0130] Establishing a prediction table using the attribute values of the point cloud points before the current point on the Hilbert order;
[0131] According to the index value decoded from the code stream transmitted from the encoding end, the attribute value of the reference point corresponding to the current point is determined from the prediction table.
[0132] Combined with the relevant descriptions in the previous text, it can be known that the encoding end can indicate the attribute value of the reference point corresponding to the current point in the prediction table through the index value. Here, the reference point corresponding to the current point is the point whose attribute value is closest to the attribute value of the current point among multiple candidate points. The decoding end can decode the index value from the code stream transmitted by the encoding segment, and by querying the prediction table, the attribute value corresponding to the index value can be determined. The point cloud point corresponding to the attribute value is the reference point corresponding to the current point. In this implementation, the attribute value is also the predicted attribute value corresponding to the current point.
[0133] In one implementation, the step of establishing a prediction table using the attribute values of the point cloud points before the current point on the Hilbert order includes:
[0134] From the point cloud points before the current point on the Hilbert order, a preset number of candidate points with different attribute values are determined nearby according to the order distance from the current point, and a prediction table is established using the attribute values of the multiple candidate points.
[0135] In one implementation, in the prediction table, the ordinal distance between the candidate point and the current point is positively correlated with the index value corresponding to the attribute value of the candidate point.
[0136] In one implementation, the prediction table further includes an attribute value obtained by fusing the attribute values of the multiple candidate points.
[0137] In one implementation, the minimum index value of the prediction table corresponds to the attribute value obtained by fusing the attribute values of the multiple candidate points.
[0138] In one implementation, the attribute value corresponding to the minimum index value is obtained by weighted averaging the attribute values of the multiple candidate points.
[0139] In one implementation, decoding a bit stream transmitted from an encoding end to obtain an index value includes:
[0140] Decoding the bitstream transmitted from the encoding end to obtain the identifier;
[0141] Determine the target number of bits occupied by the index value according to the identifier;
[0142] The index value is obtained by decoding according to the target bit number.
[0143] As can be seen from the foregoing, when the encoding end performs variable-length encoding on the index value, the index value can be compared with a preset threshold value, and the target number of bits occupied by the index value after encoding can be determined based on the comparison result, whether the target number of bits occupied by the index value is the first number of bits or the second number of bits, and an identifier can be generated and transmitted to the decoding end to indicate the target number of bits corresponding to the index value. Correspondingly, the decoding end can decode the identifier from the bit stream transmitted by the encoding end, thereby determining the target number of bits occupied by the index value, and decoding to obtain the index value.
[0144] In one implementation, the identifier is used to indicate that the target number of bits is the first number of bits or the second number of bits.
[0145] In one implementation, decoding a bit stream transmitted from an encoding end to obtain an index value includes:
[0146] Decoding the code stream transmitted by the encoding end to obtain a code word corresponding to the index value;
[0147] Performing arithmetic decoding on the codeword to obtain a binary-encoded index value;
[0148] The index value after the binary encoding is subjected to variable-length binary decoding to obtain the index value.
[0149] In one implementation, performing arithmetic decoding on the codeword includes:
[0150] The codeword is arithmetically decoded bit by bit according to an equal probability model.
[0151] In one implementation, performing arithmetic decoding on the codeword includes:
[0152] A target number of bits of the codeword are arithmetically decoded using independent context models, and the remaining bits are arithmetically decoded using the same context model, wherein the target number can be any integer in [0, N], and N is the total number of bits of the binarized index value.
[0153] The above process of decoding the codeword corresponding to the index value at the decoding end is the inverse process of encoding the index value at the encoding end. The relevant parts can also refer to the corresponding description in the previous text and will not be repeated here.
[0154] In one implementation, determining the predicted attribute value of the current point according to the attribute value of the reference point includes:
[0155] The attribute value of the reference point is determined as the predicted attribute value of the current point.
[0156] In one implementation, determining a reference point corresponding to the current point according to a point cloud point before the current point on the Hilbert order includes:
[0157] From the point cloud points before the current point on the Hilbert order, a point cloud point whose spatial distance from the current point is a preset value is determined as the reference point.
[0158] In one implementation, the attribute value of the reference point is obtained from a hash table, and the hash table is established using the attribute values and geometric coordinates of the point cloud points before the current point on the Hilbert order.
[0159] In one implementation, the upper limit of the number of entries and / or the upper limit of the capacity of the hash table is pre-agreed upon by the encoding end and the decoding end.
[0160] In one embodiment, the method further comprises:
[0161] Decoding the header information of the code stream transmitted by the encoding end to obtain the first information;
[0162] An upper limit on the number of entries and / or an upper limit on the capacity of the hash table is determined according to the first information.
[0163] In one embodiment, the method further comprises:
[0164] Decoding the header information of the code stream transmitted by the encoding end to obtain the second information;
[0165] An upper limit on the number of the reference points is determined according to the second information.
[0166] In one implementation, determining the predicted attribute value of the current point according to the attribute value of the reference point includes:
[0167] The attribute values of the multiple reference points are fused to obtain the predicted attribute value of the current point.
[0168] In one implementation, fusing the attribute values of the plurality of reference points includes:
[0169] A weighted average is performed on the attribute values of the multiple reference points.
[0170] The implementation methods of the various point cloud decoding methods provided above, the relevant parts can refer to the description of the point cloud encoding method in the previous text, and will not be repeated here.
[0171] In the point cloud decoding method provided in the embodiment of the present application, the point cloud points are sequentially attribute-decoded according to the Hilbert order. Since the Hilbert order has good spatial neighbor characteristics, among the point cloud points that have completed encoding and decoding before the current point, the points that are adjacent or close to the current point in order are also points that are close to the current point in three-dimensional space distance. Therefore, the reference point corresponding to the current point determined based on these points can also be closer to the current point in spatial distance, making the prediction of the attribute value of the current point based on the attribute value of the reference point more accurate, thereby improving the compression performance.
[0172] You can refer to the following Figure 5 , Figure 5 is a schematic diagram of the structure of a point cloud encoding device provided in an embodiment of the present application. The device may include: a processor 510 and a memory 520 storing a computer program, and the processor implements the following steps when executing the computer program:
[0173] Acquire corresponding Hilbert codes of the plurality of point cloud points according to the geometric coordinates of the plurality of point cloud points;
[0174] Sort the plurality of point cloud points according to the Hilbert code to obtain a Hilbert order;
[0175] The point cloud points are attribute-encoded in sequence according to the Hilbert order, wherein, when the current point is attribute-encoded, a reference point corresponding to the current point is determined according to the point cloud points before the current point on the Hilbert order, and the attribute value of the current point is predictively encoded according to the attribute value of the reference point.
[0176] Optionally, when predicting and encoding the attribute value of the current point according to the attribute value of the reference point, the processor is configured to: determine the predicted attribute value of the current point according to the attribute value of the reference point; and encode the attribute value of the current point according to the predicted attribute value.
[0177] Optionally, when determining the reference point corresponding to the current point based on the point cloud points before the current point on the Hilbert order, the processor is used to, from the point cloud points before the current point on the Hilbert order, determine a preset number of candidate points with different attribute values nearby based on the order distance from the current point; and determine the reference point corresponding to the current point from the multiple candidate points.
[0178] Optionally, when determining the reference point corresponding to the current point from the multiple candidate points, the processor is configured to determine a candidate point whose attribute value is closest to the attribute value of the current point among the multiple candidate points as the reference point corresponding to the current point.
[0179] Optionally, when determining the predicted attribute value of the current point according to the attribute value of the reference point, the processor is configured to determine the attribute value of the reference point as the predicted attribute value of the current point.
[0180] Optionally, the processor is further used to determine an index value corresponding to the attribute value of the reference point in a prediction table, and transmit the index value to a decoding end, wherein the prediction table is established using the attribute values of the multiple candidate points.
[0181] Optionally, in the prediction table, the ordinal distance between the candidate point and the current point is positively correlated with the index value corresponding to the attribute value of the candidate point.
[0182] Optionally, the prediction table also includes an attribute value obtained by fusing the attribute values of the multiple candidate points.
[0183] Optionally, the minimum index value of the prediction table corresponds to the attribute value obtained by fusing the attribute values of the multiple candidate points.
[0184] Optionally, the attribute value corresponding to the minimum index value is obtained by weighted averaging the attribute values of the multiple candidate points.
[0185] Optionally, the processor is further used to perform variable-length encoding on the index value.
[0186] Optionally, when performing variable-length encoding on the index value, the processor is used to compare the index value with a preset threshold; determine a target number of bits occupied by the index value after encoding based on the comparison result; and encode the index value based on the target number of bits.
[0187] Optionally, when determining the target number of bit bits occupied by the index value after encoding based on the comparison result, the processor is used to determine that the target number of bit bits is a first number of bit bits if the index value is greater than the preset threshold, and to determine that the target number of bit bits is a second number of bit bits if the index value is less than or equal to the preset threshold.
[0188] Optionally, the processor is further used to generate an identifier for indicating that the target bit number is the first bit number or the second bit number, and transmit the identifier to the decoding end.
[0189] Optionally, when performing variable-length encoding on the index value, the processor is used to perform variable-length binary encoding on the index value; and perform arithmetic encoding on the binary-encoded index value.
[0190] Optionally, when performing arithmetic coding on the binarized index value, the processor is used to perform arithmetic coding on the binarized index value bit by bit according to an equal probability model.
[0191] Optionally, when performing arithmetic coding on the binarized index value, the processor is used to perform arithmetic coding on a target number of bits of the binarized index value using independent context models respectively, and to perform arithmetic coding on the remaining bits using the same context model, wherein the target number can be any integer in [0, N], and N is the total number of bits of the binarized index value.
[0192] Optionally, when determining a reference point corresponding to the current point based on the point cloud points before the current point on the Hilbert order, the processor is used to determine, from the point cloud points before the current point on the Hilbert order, a point cloud point whose spatial distance from the current point is a preset value as the reference point.
[0193] Optionally, the attribute value of the reference point is obtained from a hash table, and the hash table is established using the attribute values and geometric coordinates of the point cloud points before the current point on the Hilbert order.
[0194] Optionally, an upper limit on the number of entries and / or an upper limit on the capacity of the hash table is pre-agreed upon by the encoding end and the decoding end.
[0195] Optionally, the processor is further configured to write first information into header information of a code stream transmitted to a decoding end, wherein the first information includes an upper limit on the number of entries and / or an upper limit on the capacity of the hash table.
[0196] Optionally, the processor is further configured to write second information into header information of a code stream transmitted to a decoding end, wherein the second information includes an upper limit on the number of reference points.
[0197] Optionally, when determining the predicted attribute value of the current point according to the attribute value of the reference point, the processor is configured to fuse the attribute values of a plurality of the reference points to obtain the predicted attribute value of the current point.
[0198] Optionally, the processor is configured to perform weighted averaging of the attribute values of the multiple reference points when fusing the attribute values of the multiple reference points.
[0199] The specific implementations of the various point cloud encoding devices provided above can be referred to the relevant descriptions in the previous text and will not be repeated here.
[0200] In the point cloud encoding device provided in the embodiment of the present application, the point cloud points are sequentially attribute-encoded according to the Hilbert order. Since the Hilbert order has a good spatial neighbor characteristic, among the point cloud points that have completed encoding and decoding before the current point, the points that are adjacent or close to the current point in sequence are also points that are close to the current point in three-dimensional space distance. Therefore, the reference point corresponding to the current point determined based on these points can also be closer to the current point in spatial distance, making the prediction of the attribute value of the current point based on the attribute value of the reference point more accurate, thereby improving the compression performance.
[0201] You can refer to the following Figure 6 , Figure 6 6 is a schematic diagram of the structure of a point cloud decoding device provided in an embodiment of the present application. The device may include: a processor 610 and a memory 620 storing a computer program, and the processor implements the following steps when executing the computer program:
[0202] Acquire corresponding Hilbert codes of the plurality of point cloud points according to the geometric coordinates of the plurality of point cloud points;
[0203] Sort the plurality of point cloud points according to the Hilbert code to obtain a Hilbert order;
[0204] The point cloud points are sequentially attribute-decoded according to the Hilbert order, wherein, when the current point is attribute-decoded, a reference point corresponding to the current point is determined according to the point cloud points before the current point on the Hilbert order, and the attribute value of the current point is predicted and decoded according to the attribute value of the reference point.
[0205] Optionally, when predicting and decoding the attribute value of the current point according to the attribute value of the reference point, the processor is used to: determine the predicted attribute value of the current point according to the attribute value of the reference point; and decode the attribute value of the current point according to the predicted attribute value.
[0206] Optionally, when the processor determines the reference point corresponding to the current point based on the point cloud points before the current point on the Hilbert order, it is used to establish a prediction table using the attribute values of the point cloud points before the current point on the Hilbert order; and determine the attribute value of the reference point corresponding to the current point from the prediction table based on the index value decoded from the code stream transmitted from the encoding end.
[0207] Optionally, when the processor establishes a prediction table using the attribute values of the point cloud points before the current point on the Hilbert order, it is used to determine a preset number of candidate points with different attribute values from the point cloud points before the current point on the Hilbert order based on the order distance from the current point, and establish a prediction table using the attribute values of the multiple candidate points.
[0208] Optionally, in the prediction table, the ordinal distance between the candidate point and the current point is positively correlated with the index value corresponding to the attribute value of the candidate point.
[0209] Optionally, the prediction table also includes an attribute value obtained by fusing the attribute values of the multiple candidate points.
[0210] Optionally, the minimum index value of the prediction table corresponds to the attribute value obtained by fusing the attribute values of the multiple candidate points.
[0211] Optionally, the attribute value corresponding to the minimum index value is obtained by weighted averaging the attribute values of the multiple candidate points.
[0212] Optionally, when the processor decodes the code stream transmitted from the encoding end to obtain the index value, it is used to decode the code stream transmitted from the encoding end to obtain an identifier; determine the target number of bits occupied by the index value according to the identifier; and decode the index value according to the target number of bits.
[0213] Optionally, the identifier is used to indicate that the target number of bits is the first number of bits or the second number of bits.
[0214] Optionally, when the processor decodes the code stream transmitted from the encoding end to obtain the index value, it is used to decode the code stream transmitted from the encoding end to obtain the code word corresponding to the index value; perform arithmetically decoding on the code word to obtain the index value after binary encoding; and perform variable-length binary decoding on the index value after binary encoding to obtain the index value.
[0215] Optionally, when performing arithmetic decoding on the codeword, the processor is configured to perform arithmetic decoding on the codeword bit by bit according to an equal probability model.
[0216] Optionally, when performing arithmetical decoding on the codeword, the processor is used to perform arithmetical decoding on a target number of bits of the codeword using independent context models respectively, and to perform arithmetical decoding on the remaining bits using the same context model, wherein the target number can be any integer in [0, N], and N is the total number of bits of the binarized index value.
[0217] Optionally, when determining the predicted attribute value of the current point according to the attribute value of the reference point, the processor is configured to determine the attribute value of the reference point as the predicted attribute value of the current point.
[0218] Optionally, when determining a reference point corresponding to the current point based on the point cloud points before the current point on the Hilbert order, the processor is used to determine, from the point cloud points before the current point on the Hilbert order, a point cloud point whose spatial distance from the current point is a preset value as the reference point.
[0219] Optionally, the attribute value of the reference point is obtained from a hash table, and the hash table is established using the attribute values and geometric coordinates of the point cloud points before the current point on the Hilbert order.
[0220] Optionally, an upper limit on the number of entries and / or an upper limit on the capacity of the hash table is pre-agreed upon by the encoding end and the decoding end.
[0221] Optionally, the processor is further used to decode the header information of the code stream transmitted by the encoding end to obtain the first information; and determine the upper limit of the number of entries and / or the upper limit of the capacity of the hash table according to the first information.
[0222] Optionally, the processor is further used to decode the header information of the code stream transmitted by the encoding end to obtain second information; and determine the upper limit of the number of reference points according to the second information.
[0223] Optionally, when determining the predicted attribute value of the current point according to the attribute value of the reference point, the processor is configured to fuse the attribute values of a plurality of the reference points to obtain the predicted attribute value of the current point.
[0224] Optionally, the processor is configured to perform weighted averaging of the attribute values of the multiple reference points when fusing the attribute values of the multiple reference points.
[0225] The specific implementations of the various point cloud decoding devices provided above can be referred to the relevant descriptions in the previous text and will not be repeated here.
[0226] In the point cloud decoding device provided in the embodiment of the present application, the point cloud points are sequentially attribute-decoded according to the Hilbert order. Since the Hilbert order has a good spatial neighbor characteristic, among the point cloud points that have completed encoding and decoding before the current point, the points that are adjacent or close to the current point in order are also points that are close to the current point in three-dimensional space distance. Therefore, the reference point corresponding to the current point determined based on these points can also be closer to the current point in spatial distance, making the prediction of the attribute value of the current point based on the attribute value of the reference point more accurate, thereby improving the compression performance.
[0227] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. The computer program is executed by a processor to implement the point cloud encoding method provided in the embodiment of the present application.
[0228] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. The computer program is executed by a processor to implement the point cloud decoding method provided in the embodiment of the present application.
[0229] A variety of implementation methods are provided for each protected subject above. On the basis that there is no conflict or contradiction, those skilled in the art can freely combine various implementation methods according to actual conditions to form various different technical solutions. Due to the limited length of this application document, all the technical solutions obtained by combination are not described in detail, but it can be understood that these technical solutions that have not been developed also belong to the scope disclosed in the embodiments of this application.
[0230] The embodiments of the present application may take the form of a computer program product implemented on one or more storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing program code. Computer-usable storage media include permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include but are not limited to: phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0231] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprises a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0232] The method and device provided in the embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A point cloud encoding method, characterized in that: include: Acquire corresponding Hilbert codes of the plurality of point cloud points according to the geometric coordinates of the plurality of point cloud points; Sort the plurality of point cloud points according to the Hilbert code to obtain a Hilbert order; The point cloud points are attribute-encoded in sequence according to the Hilbert order, wherein, when the current point is attribute-encoded, a reference point corresponding to the current point is determined according to the point cloud points before the current point on the Hilbert order, and the attribute value of the current point is predictively encoded according to the attribute value of the reference point.
2. The method according to claim 1, characterized in that: The predictive coding of the attribute value of the current point according to the attribute value of the reference point includes: Determining a predicted attribute value of the current point according to the attribute value of the reference point; The attribute value of the current point is encoded according to the predicted attribute value.
3. The method according to claim 2, characterized in that The determining a reference point corresponding to the current point according to the point cloud point before the current point on the Hilbert order includes: From the point cloud points before the current point on the Hilbert order, according to the order distances with the current point, determine a preset number of candidate points with different attribute values nearby; A reference point corresponding to the current point is determined from the multiple candidate points.
4. The method according to claim 3, characterized in that The determining a reference point corresponding to the current point from the multiple candidate points includes: A candidate point whose attribute value is closest to the attribute value of the current point among the multiple candidate points is determined as a reference point corresponding to the current point.
5. The method according to claim 4, characterized in that The determining the predicted attribute value of the current point according to the attribute value of the reference point includes: The attribute value of the reference point is determined as the predicted attribute value of the current point.
6. The method according to claim 3, characterized in that The method further comprises: Determine an index value corresponding to the attribute value of the reference point in a prediction table, and transmit the index value to a decoding end, wherein the prediction table is established using the attribute values of the plurality of candidate points.
7. The method according to claim 6, characterized in that In the prediction table, the ordinal distance between the candidate point and the current point is positively correlated with the index value corresponding to the attribute value of the candidate point.
8. The method according to claim 7, characterized in that The prediction table also includes attribute values obtained by fusing the attribute values of the multiple candidate points.
9. The method according to claim 8, characterized in that The minimum index value of the prediction table corresponds to the attribute value obtained by fusing the attribute values of the multiple candidate points.
10. The method according to claim 9, characterized in that The attribute value corresponding to the minimum index value is obtained by weighted average of the attribute values of the multiple candidate points.
11. The method according to claim 6, characterized in that The method further comprises: The index value is variable-length encoded.
12. The method according to claim 11, characterized in that The variable-length encoding of the index value comprises: Comparing the index value with a preset threshold; Determine the target number of bits occupied by the index value after encoding according to the comparison result; The index value is encoded according to the target number of bits.
13. The method according to claim 12, characterized in that The determining, according to the comparison result, a target number of bits occupied by the index value after encoding includes: If the index value is greater than the preset threshold, the target number of bits is determined to be the first number of bits; if the index value is less than or equal to the preset threshold, the target number of bits is determined to be the second number of bits.
14. The method according to claim 13, characterized in that The method further comprises: Generate an identifier for indicating that the target number of bits is the first number of bits or the second number of bits, and transmit the identifier to the decoding end.
15. The method according to claim 11, characterized in that The variable-length encoding of the index value comprises: Performing variable-length binary encoding on the index value; Perform arithmetic coding on the binary-coded index value.
16. The method according to claim 15, characterized in that The performing arithmetic coding on the binarized index value includes: The binarized index value is arithmetically coded bit by bit according to an equal probability model.
17. The method according to claim 15, characterized in that The performing arithmetic coding on the binarized index value includes: A target number of bits of the binarized index value are arithmetically encoded using independent context models, and the remaining bits are arithmetically encoded using the same context model, where the target number can be any integer in [0, N], and N is the total number of bits of the binarized index value.
18. The method according to claim 2, characterized in that The determining a reference point corresponding to the current point according to the point cloud point before the current point on the Hilbert order includes: From the point cloud points before the current point on the Hilbert order, a point cloud point whose spatial distance from the current point is a preset value is determined as the reference point.
19. The method according to claim 18, characterized in that The attribute value of the reference point is obtained from a hash table, and the hash table is established using the attribute values and geometric coordinates of the point cloud points before the current point on the Hilbert order.
20. The method according to claim 19, characterized in that The upper limit of the number of entries and / or the upper limit of the capacity of the hash table is pre-agreed upon by the encoding end and the decoding end.
21. The method according to claim 19, characterized in that The method further comprises: The first information is written into the header information of the code stream transmitted to the decoding end, wherein the first information includes an upper limit on the number of entries and / or a capacity upper limit of the hash table.
22. The method according to claim 18, characterized in that The method further comprises: The second information is written into the header information of the code stream transmitted to the decoding end, wherein the second information includes the upper limit of the number of the reference points.
23. The method according to claim 18, characterized in that The determining the predicted attribute value of the current point according to the attribute value of the reference point includes: The attribute values of the multiple reference points are fused to obtain the predicted attribute value of the current point.
24. The method according to claim 23, characterized in that The fusing the attribute values of the plurality of reference points comprises: A weighted average is performed on the attribute values of the multiple reference points.
25. A point cloud decoding method, characterized in that: include: Acquire corresponding Hilbert codes of the plurality of point cloud points according to the geometric coordinates of the plurality of point cloud points; Sort the plurality of point cloud points according to the Hilbert code to obtain a Hilbert order; The point cloud points are sequentially attribute-decoded according to the Hilbert order, wherein, when the current point is attribute-decoded, a reference point corresponding to the current point is determined according to the point cloud points before the current point on the Hilbert order, and the attribute value of the current point is predicted and decoded according to the attribute value of the reference point.
26. The method according to claim 25, characterized in that The predicting and decoding the attribute value of the current point according to the attribute value of the reference point includes: Determining a predicted attribute value of the current point according to the attribute value of the reference point; The attribute value of the current point is decoded according to the predicted attribute value.
27. The method according to claim 26, characterized in that The determining a reference point corresponding to the current point according to the point cloud point before the current point on the Hilbert order includes: Establishing a prediction table using the attribute values of the point cloud points before the current point on the Hilbert order; According to the index value decoded from the code stream transmitted from the encoding end, the attribute value of the reference point corresponding to the current point is determined from the prediction table.
28. The method according to claim 27, characterized in that The method of establishing a prediction table by using the attribute values of the point cloud points before the current point on the Hilbert order includes: From the point cloud points before the current point on the Hilbert order, a preset number of candidate points with different attribute values are determined nearby according to the order distance from the current point, and a prediction table is established using the attribute values of the multiple candidate points.
29. The method according to claim 28, characterized in that In the prediction table, the ordinal distance between the candidate point and the current point is positively correlated with the index value corresponding to the attribute value of the candidate point.
30. The method according to claim 29, characterized in that The prediction table also includes attribute values obtained by fusing the attribute values of the multiple candidate points.
31. The method according to claim 30, characterized in that The minimum index value of the prediction table corresponds to the attribute value obtained by fusing the attribute values of the multiple candidate points.
32. The method according to claim 31, characterized in that The attribute value corresponding to the minimum index value is obtained by weighted average of the attribute values of the multiple candidate points.
33. The method according to claim 27, characterized in that The index value is obtained by decoding the code stream transmitted by the encoder, including: Decoding the bitstream transmitted from the encoding end to obtain the identifier; Determine the target number of bits occupied by the index value according to the identifier; The index value is obtained by decoding according to the target bit number.
34. The method according to claim 33, characterized in that The identifier is used to indicate that the target number of bits is the first number of bits or the second number of bits.
35. The method according to claim 27, characterized in that The index value is obtained by decoding the code stream transmitted by the encoder, including: Decoding the code stream transmitted by the encoding end to obtain a code word corresponding to the index value; Performing arithmetic decoding on the codeword to obtain a binary-encoded index value; The index value after the binary encoding is subjected to variable-length binary decoding to obtain the index value.
36. The method according to claim 35, characterized in that The performing arithmetic decoding on the codeword comprises: The codeword is arithmetically decoded bit by bit according to an equal probability model.
37. The method according to claim 35, characterized in that The performing arithmetic decoding on the codeword comprises: A target number of bits of the codeword are arithmetically decoded using independent context models, and the remaining bits are arithmetically decoded using the same context model, wherein the target number can be any integer in [0, N], and N is the total number of bits of the binarized index value.
38. The method according to claim 27, characterized in that The determining the predicted attribute value of the current point according to the attribute value of the reference point includes: The attribute value of the reference point is determined as the predicted attribute value of the current point.
39. The method according to claim 26, characterized in that The determining a reference point corresponding to the current point according to the point cloud point before the current point on the Hilbert order includes: From the point cloud points before the current point on the Hilbert order, a point cloud point whose spatial distance from the current point is a preset value is determined as the reference point.
40. The method according to claim 39, characterized in that The attribute value of the reference point is obtained from a hash table, and the hash table is established using the attribute values and geometric coordinates of the point cloud points before the current point on the Hilbert order.
41. The method according to claim 40, characterized in that The upper limit of the number of entries and / or the upper limit of the capacity of the hash table is pre-agreed upon by the encoding end and the decoding end.
42. The method according to claim 40, characterized in that The method further comprises: Decoding the header information of the code stream transmitted by the encoding end to obtain the first information; An upper limit on the number of entries and / or an upper limit on the capacity of the hash table is determined according to the first information.
43. The method according to claim 39, characterized in that The method further comprises: Decoding the header information of the code stream transmitted by the encoding end to obtain the second information; An upper limit on the number of the reference points is determined according to the second information.
44. The method according to claim 39, characterized in that The determining the predicted attribute value of the current point according to the attribute value of the reference point includes: The attribute values of the multiple reference points are fused to obtain the predicted attribute value of the current point.
45. The method according to claim 44, characterized in that The fusing the attribute values of the plurality of reference points comprises: A weighted average is performed on the attribute values of the multiple reference points.
46. A point cloud encoding device, characterized in that: include: A processor and a memory storing a computer program, wherein the processor implements the following steps when executing the computer program: Acquire corresponding Hilbert codes of the plurality of point cloud points according to the geometric coordinates of the plurality of point cloud points; Sort the plurality of point cloud points according to the Hilbert code to obtain a Hilbert order; The point cloud points are attribute-encoded in sequence according to the Hilbert order, wherein, when the current point is attribute-encoded, a reference point corresponding to the current point is determined according to the point cloud points before the current point on the Hilbert order, and the attribute value of the current point is predictively encoded according to the attribute value of the reference point.
47. The device according to claim 46, characterized in that When predicting and encoding the attribute value of the current point according to the attribute value of the reference point, the processor is used to determine the predicted attribute value of the current point according to the attribute value of the reference point; and encode the attribute value of the current point according to the predicted attribute value.
48. The device according to claim 47, characterized in that When determining the reference point corresponding to the current point according to the point cloud points before the current point on the Hilbert order, the processor is used to determine, from the point cloud points before the current point on the Hilbert order, a preset number of candidate points with different attribute values nearby according to the order distance from the current point; A reference point corresponding to the current point is determined from the multiple candidate points.
49. The device according to claim 48, characterized in that When determining the reference point corresponding to the current point from the multiple candidate points, the processor is configured to determine the candidate point whose attribute value is closest to the attribute value of the current point among the multiple candidate points as the reference point corresponding to the current point.
50. The device according to claim 49, characterized in that When determining the predicted attribute value of the current point according to the attribute value of the reference point, the processor is configured to determine the attribute value of the reference point as the predicted attribute value of the current point.
51. The device according to claim 48, characterized in that The processor is further configured to determine an index value corresponding to the attribute value of the reference point in a prediction table, and transmit the index value to a decoding end, wherein the prediction table is established using the attribute values of the plurality of candidate points.
52. The device according to claim 51, characterized in that In the prediction table, the ordinal distance between the candidate point and the current point is positively correlated with the index value corresponding to the attribute value of the candidate point.
53. The device according to claim 52, characterized in that The prediction table also includes attribute values obtained by fusing the attribute values of the multiple candidate points.
54. The device according to claim 53, characterized in that The minimum index value of the prediction table corresponds to the attribute value obtained by fusing the attribute values of the multiple candidate points.
55. The device according to claim 54, characterized in that The attribute value corresponding to the minimum index value is obtained by weighted average of the attribute values of the multiple candidate points.
56. The device according to claim 51, characterized in that The processor is further configured to perform variable-length encoding on the index value.
57. The device according to claim 56, characterized in that When performing variable-length encoding on the index value, the processor is used to compare the index value with a preset threshold; determine a target number of bits occupied by the index value after encoding based on the comparison result; and encode the index value based on the target number of bits.
58. The device according to claim 57, characterized in that When determining the target number of bits occupied by the index value after encoding based on the comparison result, the processor is used to determine that the target number of bits is the first number of bits if the index value is greater than the preset threshold, and to determine that the target number of bits is the second number of bits if the index value is less than or equal to the preset threshold.
59. The device according to claim 58, characterized in that The processor is further configured to generate an identifier for indicating that the target number of bits is the first number of bits or the second number of bits, and transmit the identifier to the decoding end.
60. The device according to claim 56, characterized in that When performing variable-length coding on the index value, the processor is used to perform variable-length binary coding on the index value; and perform arithmetic coding on the binary-coded index value.
61. The device according to claim 60, characterized in that When performing arithmetic coding on the binarized index value, the processor is used to perform arithmetic coding on the binarized index value bit by bit according to an equal probability model.
62. The device according to claim 60, characterized in that When the processor performs arithmetic coding on the binarized index value, it is used to perform arithmetic coding on a target number of bits of the binarized index value using independent context models respectively, and to perform arithmetic coding on the remaining bits using the same context model, wherein the target number can be any integer in [0, N], and N is the total number of bits of the binarized index value.
63. The device according to claim 47, characterized in that When determining the reference point corresponding to the current point based on the point cloud points before the current point on the Hilbert order, the processor is used to determine, from the point cloud points before the current point on the Hilbert order, a point cloud point whose spatial distance from the current point is a preset value as the reference point.
64. The device according to claim 63, characterized in that The attribute value of the reference point is obtained from a hash table, and the hash table is established using the attribute values and geometric coordinates of the point cloud points before the current point on the Hilbert order.
65. The device according to claim 64, characterized in that The upper limit of the number of entries and / or the upper limit of the capacity of the hash table is pre-agreed upon by the encoding end and the decoding end.
66. The device according to claim 64, characterized in that The processor is further configured to write first information into header information of a code stream transmitted to a decoding end, wherein the first information includes an upper limit on the number of entries and / or an upper limit on the capacity of the hash table.
67. The device according to claim 63, characterized in that The processor is further configured to write second information into header information of a code stream transmitted to a decoding end, wherein the second information includes an upper limit on the number of reference points.
68. The device according to claim 63, characterized in that When determining the predicted attribute value of the current point according to the attribute value of the reference point, the processor is configured to fuse the attribute values of a plurality of the reference points to obtain the predicted attribute value of the current point.
69. The device according to claim 68, characterized in that When fusing the attribute values of the multiple reference points, the processor is used to perform weighted averaging on the attribute values of the multiple reference points.
70. A point cloud decoding device, characterized in that: include: A processor and a memory storing a computer program, wherein the processor implements the following steps when executing the computer program: Acquire corresponding Hilbert codes of the plurality of point cloud points according to the geometric coordinates of the plurality of point cloud points; Sort the plurality of point cloud points according to the Hilbert code to obtain a Hilbert order; The point cloud points are sequentially attribute-decoded according to the Hilbert order, wherein, when the current point is attribute-decoded, a reference point corresponding to the current point is determined according to the point cloud points before the current point on the Hilbert order, and the attribute value of the current point is predicted and decoded according to the attribute value of the reference point.
71. The device according to claim 70, characterized in that When predicting and decoding the attribute value of the current point according to the attribute value of the reference point, the processor is used to determine the predicted attribute value of the current point according to the attribute value of the reference point; and decode the attribute value of the current point according to the predicted attribute value.
72. The device according to claim 71, characterized in that When determining the reference point corresponding to the current point based on the point cloud points before the current point on the Hilbert order, the processor is used to establish a prediction table using the attribute values of the point cloud points before the current point on the Hilbert order; and determine the attribute value of the reference point corresponding to the current point from the prediction table based on the index value decoded from the bit stream transmitted from the encoding end.
73. The device according to claim 72, characterized in that When the processor uses the attribute values of the point cloud points before the current point on the Hilbert order to establish a prediction table, it is used to determine a preset number of candidate points with different attribute values from the point cloud points before the current point on the Hilbert order based on the order distance from the current point, and establish a prediction table using the attribute values of the multiple candidate points.
74. The device according to claim 73, characterized in that In the prediction table, the ordinal distance between the candidate point and the current point is positively correlated with the index value corresponding to the attribute value of the candidate point.
75. The device according to claim 74, characterized in that The prediction table also includes attribute values obtained by fusing the attribute values of the multiple candidate points.
76. The device according to claim 75, characterized in that The minimum index value of the prediction table corresponds to the attribute value obtained by fusing the attribute values of the multiple candidate points.
77. The device according to claim 76, characterized in that The attribute value corresponding to the minimum index value is obtained by weighted average of the attribute values of the multiple candidate points.
78. The device according to claim 72, characterized in that The processor is used to decode the code stream transmitted from the encoding end to obtain an identifier when the index value is obtained by decoding the code stream transmitted from the encoding end; determine the target number of bits occupied by the index value according to the identifier; The index value is obtained by decoding according to the target bit number.
79. The device according to claim 78, characterized in that The identifier is used to indicate that the target number of bits is the first number of bits or the second number of bits.
80. The device according to claim 72, characterized in that The processor is used to decode the code stream transmitted from the encoding end to obtain the index value when decoding the code stream transmitted from the encoding end to obtain the code word corresponding to the index value; The codeword is arithmetically decoded to obtain a binary-encoded index value; and the binary-encoded index value is variable-length binary-decoded to obtain the index value.
81. The device according to claim 80, characterized in that When performing arithmetic decoding on the codeword, the processor is used to perform arithmetic decoding on the codeword bit by bit according to an equal probability model.
82. The device according to claim 80, characterized in that When performing arithmetical decoding on the codeword, the processor is used to perform arithmetical decoding on a target number of bits of the codeword using independent context models respectively, and to perform arithmetical decoding on the remaining bits using the same context model, wherein the target number can be any integer in [0, N], and N is the total number of bits of the binarized index value.
83. The device according to claim 72, characterized in that When determining the predicted attribute value of the current point according to the attribute value of the reference point, the processor is configured to determine the attribute value of the reference point as the predicted attribute value of the current point.
84. The device according to claim 71, characterized in that When determining the reference point corresponding to the current point based on the point cloud points before the current point on the Hilbert order, the processor is used to determine, from the point cloud points before the current point on the Hilbert order, a point cloud point whose spatial distance from the current point is a preset value as the reference point.
85. The device according to claim 84, characterized in that The attribute value of the reference point is obtained from a hash table, and the hash table is established using the attribute values and geometric coordinates of the point cloud points before the current point on the Hilbert order.
86. The device according to claim 85, characterized in that The upper limit of the number of entries and / or the upper limit of the capacity of the hash table is pre-agreed upon by the encoding end and the decoding end.
87. The device according to claim 85, characterized in that The processor is further configured to decode the header information of the code stream transmitted by the encoding end to obtain the first information; and determine the upper limit of the number of entries and / or the upper limit of the capacity of the hash table according to the first information.
88. The device according to claim 84, characterized in that The processor is further configured to obtain second information by decoding header information of a code stream transmitted by an encoding end; and determine an upper limit on the number of reference points according to the second information.
89. The device according to claim 84, characterized in that When determining the predicted attribute value of the current point according to the attribute value of the reference point, the processor is configured to fuse the attribute values of a plurality of the reference points to obtain the predicted attribute value of the current point.
90. The device according to claim 89, characterized in that When fusing the attribute values of the multiple reference points, the processor is used to perform weighted averaging on the attribute values of the multiple reference points.
91. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the point cloud encoding method according to any one of claims 1 to 24.
92. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the point cloud decoding method according to any one of claims 25-45.
Citation Information
Patent Citations
A near-earth space three-dimensional point cloud unified coding visualization method
CN109299184A
Coding method and decoding method of point cloud attribute information, storage medium and terminal equipment
CN111405281A
Point cloud data compression using a space-filling curve
WO2018094141A1