Point cloud attribute prediction method, device, terminal and storage medium
By calculating the first and second spatial distances in the point cloud, filtering neighboring points and determining optimization weights, the problem of inaccurate point cloud attribute prediction caused by the reciprocating of Manhattan distances is solved, and the accuracy and encoding and decoding performance of point cloud attribute prediction are improved.
Patent Information
- Application Number
- CN202110657405.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-11
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2041-06-11
AI Technical Summary
In the prior art, the inverse of Manhattan distance is used as neighbor weight, resulting in low accuracy in point cloud attribute prediction.
By calculating the first and second spatial distances between the points in the point cloud and the target data points, filtering out the target neighborhood points, and determining the optimization weight based on the second spatial distances of these neighborhood points, the attribute value of the target data points is predicted.
It improves the accuracy of point cloud attribute prediction and improves the encoding and decoding performance of point cloud.
Smart Images

Figure CN115470259B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of point cloud processing technology, and in particular to a point cloud attribute prediction method, device, terminal and storage medium. Background Art
[0002] Three-dimensional point clouds are an important form of digital representation of the real world. With the rapid development of three-dimensional scanning equipment (such as lasers, radars, etc.), the accuracy and resolution of point clouds have become higher. High-precision point clouds are widely used in the construction of digital city maps, and play a technical support role in many popular research areas such as smart cities, unmanned driving, and cultural relics protection. Point clouds are obtained by sampling the surface of objects using three-dimensional scanning equipment. The number of points in a frame of point cloud is generally in the millions, and each point contains geometric information and attribute information such as color and reflectivity. The amount of data is very large. The huge amount of data in three-dimensional point clouds poses huge challenges to data storage and transmission, so it is very important to compress point clouds.
[0003] Point cloud compression is mainly divided into geometric compression and attribute compression. The point cloud attribute compression method currently described in the PCRM test platform provided by the Chinese AVS (Audio Video Coding Standard) Point Cloud Compression Working Group mainly uses a point cloud prediction method based on three-dimensional spatial order. Specifically, the current point cloud is spatially sorted according to its position information. The three points with the smallest Manhattan distance to the current point are selected as the current point's neighbors based on this spatial order. The reciprocal of each neighbor's Manhattan distance to the current point is used as the neighbor's weight, and the weighted average of the attribute reconstruction values of the three neighbors is used as the attribute prediction value for the current point. Finally, the attribute residual value obtained by subtracting the attribute prediction value from the actual attribute value of the current point is encoded into the bitstream. However, using the reciprocal of the Manhattan distance as the neighbor's weight does not accurately predict the current point's attribute value, resulting in low accuracy in point cloud attribute prediction.
[0004] Therefore, the existing technology still needs to be improved and developed. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to provide a point cloud attribute prediction method, device, terminal and storage medium in response to the above-mentioned defects of the prior art, aiming to solve the problem in the prior art that the inverse of the Manhattan distance is used as the weight of the neighbor is inaccurate, resulting in low accuracy of point cloud attribute prediction.
[0006] The technical solutions adopted by the present invention to solve the problem are as follows:
[0007] In a first aspect, an embodiment of the present invention provides a point cloud attribute prediction method, wherein the method includes:
[0008] Screening the points in the point cloud according to first spatial distances between the points in the point cloud and the target data points to obtain a plurality of target neighborhood points;
[0009] Determining optimization weights of the plurality of target neighborhood points according to second spatial distances between the plurality of target neighborhood points and the target data point;
[0010] The attribute prediction value corresponding to the target data point is determined according to the plurality of target neighborhood points and the optimization weights respectively corresponding to the plurality of target neighborhood points.
[0011] In one embodiment, the first spatial distance includes:
[0012] Calculate the weighted sum of the P-th power of the difference between the two points in N coordinate components as the first spatial distance;
[0013] Alternatively, the maximum value of the weighted values of the differences between the two points on N coordinate components is calculated as the first spatial distance.
[0014] In one embodiment, the second spatial distance includes:
[0015] Calculate the weighted sum of the P-th power of the difference between the two points in N coordinate components as the second spatial distance;
[0016] Alternatively, the maximum value of the weighted values of the differences between the two points on N coordinate components is calculated as the second spatial distance.
[0017] In one embodiment, the points in the point cloud are screened according to the first spatial distances between the points in the point cloud and the target data points to obtain a plurality of target neighborhood points, including:
[0018] Selecting a preset number of points from the points in the point cloud in ascending order of the first spatial distances to obtain the target neighborhood points;
[0019] Alternatively, a preset distance threshold is obtained, and points whose first spatial distance is less than or equal to the preset distance threshold are taken as the target neighborhood points;
[0020] Alternatively, a preset number of points and points whose first spatial distance is the same as the distance between the preset number of points are selected from the points in the point cloud in an ascending order of the first spatial distance to obtain the target neighborhood points.
[0021] In one embodiment, determining the optimization weights of the target neighborhood points based on the second spatial distances between the target neighborhood points and the target data point includes:
[0022] Determining an optimization weight of the target neighborhood point according to the second spatial distance and the number of target neighborhood points having the same second spatial distance;
[0023] and / or, determining an optimization weight of the target neighborhood point according to the second spatial distance and the attribute quantization step size;
[0024] and / or, determining an optimization weight of the target neighborhood point according to an exponential power of the second spatial distance;
[0025] And / or, determining the optimization weight of the target neighborhood point according to the second spatial distance and the direction vector of the target neighborhood point.
[0026] In one embodiment, determining the optimization weight of the target neighborhood point according to the second spatial distance and the number of target neighborhood points having the same second spatial distance includes:
[0027] The product of the second spatial distance and the number of target neighborhood points having the same second spatial distance is used as the optimized distance of the target neighborhood point; the reciprocal of the optimized distance of the target neighborhood point is used as the optimized weight of the target neighborhood point;
[0028] Alternatively, when the number of target neighborhood points with the same second spatial distance is greater than 1, the quotient obtained by dividing the product of the second spatial distance and the number of target neighborhood points with the same second spatial distance by the attribute quantization step size is used as the optimized distance of the target neighborhood point, and the reciprocal of the optimized distance of the target neighborhood point is used as the optimization weight of the target neighborhood point;
[0029] Alternatively, the number of target neighborhood points with the same second spatial distance and the minimum value of the attribute quantization step are used as optimization coefficients, the quotient obtained by dividing the product of the second spatial distance and the number of target neighborhood points with the same second spatial distance by the optimization coefficient is used as the optimization distance of the target neighborhood point, and the reciprocal of the optimization distance of the target neighborhood point is used as the optimization weight of the target neighborhood point.
[0030] In one embodiment, determining the optimization weight of the target neighborhood point according to the second spatial distance and the attribute quantization step size includes:
[0031] The sum of the second spatial distance and the attribute quantization step is used as the optimized distance of the target neighborhood point, and the reciprocal of the optimized distance of the target neighborhood point is used as the optimized weight of the target neighborhood point;
[0032] Alternatively, the sum of the second spatial distance and the attribute quantization step is multiplied by the second spatial distance as the optimized distance of the target neighborhood point, and the reciprocal of the optimized distance of the target neighborhood point is used as the optimized weight of the target neighborhood point.
[0033] In one embodiment, determining the optimization weight of the target neighborhood point according to the exponential power of the second spatial distance includes:
[0034] Using the exponential power of the second spatial distance as the optimized distance of the target neighborhood point, and using the reciprocal of the optimized distance of the target neighborhood point as the optimized weight of the target neighborhood point;
[0035] Alternatively, the value of the exponential power polynomial of the second spatial distance is used as the optimized distance of the target neighborhood point, and the reciprocal of the optimized distance of the target neighborhood point is used as the optimized weight of the target neighborhood point.
[0036] In one embodiment, determining the optimization weight of the target neighborhood point according to the second spatial distance and the direction vector of the target neighborhood point includes:
[0037] Obtaining direction vectors corresponding to the target neighborhood points respectively;
[0038] According to the direction vectors corresponding to the plurality of target neighboring points, it is determined whether there are a plurality of parallel neighboring points; wherein the direction vectors corresponding to the plurality of parallel neighboring points are parallel;
[0039] When there are several parallel neighboring points, the optimization weights of the parallel neighboring points with the larger second spatial distance are set to 0;
[0040] The optimization weights of the neighborhood points other than the parallel neighborhood points in the target neighborhood points and the parallel neighborhood point with the smallest second spatial distance are set to the reciprocal of the second spatial distance.
[0041] In one embodiment, determining the optimization weight of the target neighborhood point according to the second spatial distance and the direction vector of the target neighborhood point includes:
[0042] Obtaining direction vectors corresponding to the target neighborhood points respectively;
[0043] Determining, based on the direction vectors corresponding to the plurality of target neighborhoods, the axial normalized direction vectors corresponding to the plurality of target neighborhood points respectively;
[0044] According to the axial normalized direction vectors respectively corresponding to the plurality of target neighboring points, it is determined whether there are a plurality of neighboring points in the same direction; wherein the axial normalized direction vectors respectively corresponding to the plurality of neighboring points in the same direction are the same;
[0045] When there are several neighboring points in the same direction, the optimization weights of the neighboring points in the same direction with the larger distance in the second space are set to 0;
[0046] The optimization weights of the neighboring points in the target neighborhood points other than the neighboring points in the same direction and the neighboring point in the same direction with the smallest second spatial distance are set to the reciprocal of the second spatial distance.
[0047] In one embodiment, determining the attribute prediction value corresponding to the target data point based on the plurality of target neighborhood points and the optimization weights respectively corresponding to the plurality of target neighborhood points includes:
[0048] Obtaining the reconstructed attribute values corresponding to the target neighborhood points respectively;
[0049] A weighted average value is obtained according to the optimization weights respectively corresponding to the several target neighborhood points and the reconstructed attribute values respectively corresponding to the several target neighborhood points, and the weighted average value is used as the attribute prediction value corresponding to the target data point.
[0050] In one embodiment, the method further comprises:
[0051] Obtaining the attribute value of the target data point, and taking the difference between the attribute value and the attribute prediction value as the attribute residual value corresponding to the target data point;
[0052] The attribute residual value is encoded to obtain a point cloud code stream.
[0053] In one embodiment, the method further comprises:
[0054] Decode the point cloud code stream to obtain the attribute residual value;
[0055] The attribute reconstruction value corresponding to the target data point is determined according to the sum of the attribute prediction value and the attribute residual value.
[0056] In a second aspect, an embodiment of the present invention further provides a point cloud attribute prediction device, wherein the device includes:
[0057] a neighborhood point screening module, configured to obtain first spatial distances between each point in the point cloud and the target data point, and to screen the points in the point cloud according to the first spatial distances to obtain a plurality of target neighborhood points;
[0058] A weight determination module, configured to determine the optimization weights corresponding to the plurality of target neighborhood points respectively according to the second spatial distances between the plurality of target neighborhood points and the target data point;
[0059] The attribute prediction module is used to determine the attribute prediction value corresponding to the target data point according to the target neighborhood points and the optimization weights respectively corresponding to the target neighborhood points.
[0060] In a third aspect, an embodiment of the present invention further provides a terminal, wherein the terminal includes a memory and one or more processors; the memory stores one or more programs; the program includes instructions for executing any of the above-mentioned point cloud attribute prediction methods; and the processor is used to execute the program.
[0061] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium on which a plurality of instructions are stored, wherein the instructions are loaded and executed by a processor to implement the steps of any of the above-mentioned point cloud attribute prediction methods.
[0062] Beneficial effects of the present invention: The embodiments of the present invention screen out target neighborhood points corresponding to target data points using a first spatial distance, determine optimization weights corresponding to each target neighborhood point based on a second spatial distance, and finally determine attribute prediction values corresponding to the target data points based on each target neighborhood point and the optimization weights corresponding to each target neighborhood point. The present invention optimizes the optimization weights corresponding to each target neighborhood point based on spatial distance, which can improve the correlation between the geometric information and attribute information of the point cloud, provide more accurate prediction values when predicting point cloud attributes, and thus improve the encoding and decoding performance of point cloud attributes. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0064] Figure 1 4 is a flow chart of a point cloud attribute prediction method provided by an embodiment of the present invention.
[0065] Figure 2 a is a schematic diagram of spatial distance when P=1 in a two-dimensional space provided by an embodiment of the present invention.
[0066] Figure 2 b is a schematic diagram of spatial distance when P=2 in a two-dimensional space provided by an embodiment of the present invention.
[0067] Figure 2 c is a schematic diagram of another spatial distance when P=1 in a two-dimensional space provided by an embodiment of the present invention.
[0068] Figure 3 2 is another flow chart of the point cloud attribute prediction method provided by an embodiment of the present invention.
[0069] Figure 4This is another flowchart of the point cloud attribute prediction method provided by an embodiment of the present invention.
[0070] Figure 5 This is another flowchart of the point cloud attribute prediction method provided by an embodiment of the present invention.
[0071] Figure 6 This is another flowchart of the point cloud attribute prediction method provided by an embodiment of the present invention.
[0072] Figure 7 This is another flowchart of the point cloud attribute prediction method provided by an embodiment of the present invention.
[0073] Figure 8 This is another flowchart of the point cloud attribute prediction method provided by an embodiment of the present invention.
[0074] Figure 9 This is another flowchart of the point cloud attribute prediction method provided by an embodiment of the present invention.
[0075] Figure 10 This is another flowchart of the point cloud attribute prediction method provided by an embodiment of the present invention.
[0076] Figure 11 This is another flowchart of the point cloud attribute prediction method provided by an embodiment of the present invention.
[0077] Figure 12 This is a diagram showing the internal modules of the point cloud attribute prediction device provided by an embodiment of the present invention.
[0078] Figure 13 This is a principle block diagram of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0079] In order to make the purpose, technical solutions and advantages of the present invention more clear and distinct, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0080] It should be noted that if the embodiments of the present invention involve directional indications (such as up, down, left, right, front, back, etc.), the directional indications are only used to explain the relative position relationship, movement status, etc. between the various components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indications will also change accordingly.
[0081] Three-dimensional point clouds are an important form of digital representation of the real world. With the rapid development of three-dimensional scanning equipment (such as lasers, radars, etc.), the accuracy and resolution of point clouds have become higher. High-precision point clouds are widely used in the construction of digital city maps, and play a technical support role in many popular research areas such as smart cities, unmanned driving, and cultural relics protection. Point clouds are obtained by sampling the surface of objects using three-dimensional scanning equipment. The number of points in a frame of point cloud is generally in the millions, and each point contains geometric information and attribute information such as color and reflectivity. The amount of data is very large. The huge amount of data in three-dimensional point clouds poses huge challenges to data storage and transmission, so it is very important to compress point clouds.
[0082] Point cloud compression is mainly divided into geometric compression and attribute compression. The point cloud attribute compression method currently described in the PCRM test platform provided by the Chinese AVS (Audio Video Coding Standard) Point Cloud Compression Working Group mainly adopts a point cloud prediction method based on three-dimensional spatial order. That is, a fixed number of neighboring points with the closest Manhattan distance to the target data point are selected as the target neighboring points. The reciprocal of the Manhattan distance between each target neighboring point and the target data point is used as the weight of the target neighboring point, and the weighted average of the attribute reconstruction values of the target neighboring points is used as the attribute prediction value of the target data point. Finally, the attribute residual value is subtracted from the actual attribute value of the current point and encoded into the bitstream. However, using the reciprocal of the Manhattan distance as the weight of the target neighboring point cannot accurately reflect the correlation between the geometric information and attribute information of the point cloud, which leads to low accuracy of point cloud attribute prediction.
[0083] In response to the above-mentioned deficiencies in the prior art, the present invention provides a point cloud attribute prediction method, which screens points in the point cloud based on the first spatial distances between each point in the point cloud and the target data point to obtain a number of target neighborhood points; determines the optimization weights corresponding to each of the target neighborhood points based on the second spatial distances between each of the target neighborhood points and the target data point; and determines the attribute prediction value corresponding to the target data point based on the optimization weights corresponding to each of the target neighborhood points and the target neighborhood points. Because the present invention optimizes the weights corresponding to each target neighborhood point based on spatial distance, it can improve the correlation between the geometric information and attribute information of the point cloud, provide more accurate prediction values when predicting point cloud attributes, and thus improve the encoding and decoding performance of point cloud attributes.
[0084] like Figure 1 As shown, the method includes the following steps:
[0085] Step S100 : Screening the points in the point cloud according to first spatial distances between the points in the point cloud and the target data points to obtain a plurality of target neighborhood points.
[0086] Specifically, since the points in the point cloud include all data points adjacent to the target data point, there may be data points that are far away from the target data point, and the correlation between these data points that are far away from the target data point and the attribute values of the target data point is usually small. Therefore, this embodiment needs to screen the points in the point cloud based on the first spatial distance between the two points, and select points that are close to the target data point as target neighborhood points for calculating the attribute prediction value of the target data point.
[0087] In one implementation, the first spatial distance and the second spatial distance can be determined using method 1 or method 2:
[0088] Method 1: Calculate the weighted sum of the P-th power of the difference between the two points in N coordinate components as the first spatial distance or the second spatial distance;
[0089] Method 2: Calculate the maximum value of the weighted value of the difference between two points on N coordinate components as the first spatial distance or the second spatial distance.
[0090] Specifically, the first method provided in this embodiment is based on the exponential power weighted sum of the difference between two points on several coordinate components. For example, the coordinates of two points in three-dimensional space are (x1, y1, z1) and (x2, y2, z2), respectively. It is necessary to calculate the difference between the two points on the three coordinate components of the X-axis, Y-axis, and Z-axis, respectively, to obtain three differences, and take the P-th power weighted sum of the sizes of these three differences as the first spatial distance / second spatial distance between the two points. As shown below, the first spatial distance / second spatial distance d of the two points can be expressed as:
[0091] d=cx|x2-x1| P +cy|y2-y1| P +cz|z2-z1| P
[0092] Where cx, cy, and cz are the weights of the X-axis, Y-axis, and Z-axis, respectively. cx, cy, cz, and P are all positive numbers. When cx, cy, and cz are all 1, the first spatial distance / second spatial distance d between two points can be expressed as:
[0093] d=|x2-x1| P +|y2-y1| P +|z2-z1| P
[0094] Where P is a positive number. Figure 2 a is a schematic diagram of the first spatial distance / second spatial distance when P=1 in two-dimensional space. Figure 2b is a schematic diagram of the first spatial distance / second spatial distance when P=2 in two-dimensional space.
[0095] The second method requires calculating the difference between two points in several coordinate components, and calculating the exponential power of the size of each difference, and using the maximum value of the calculated several weighted values to determine the first spatial distance / second spatial distance between the two points. For example, the coordinates of two points in three-dimensional space are (x1, y1, z1) and (x2, y2, z2), respectively. It is necessary to calculate the difference between the two points in the three coordinate components of the X-axis, Y-axis, and Z-axis, respectively, to obtain three differences, calculate the P power of the sizes of these three differences and multiply them by their respective weight values, and use the maximum value of the three weighted values as the first spatial distance / second spatial distance between the two points. As shown below, the first spatial distance / second spatial distance d of two points can be expressed as:
[0096] d=max(cx|x2-x1| P ,cy|y2-y1| P ,cz|z2-z1| P
[0097] Where cx, cy, and cz are the weight values of the X-axis, Y-axis, and Z-axis, respectively. cx, cy, cz, and P are all positive numbers. Figure 2 c shows a schematic diagram of the first spatial distance / second spatial distance when cx, cy, cz, and P are all 1 in the two-dimensional space.
[0098] In one implementation, the points in the point cloud are screened according to the first spatial distance to obtain a number of target neighborhood points. Specifically, a preset number of points are selected from the points in the point cloud in order from small to large according to the first spatial distance to obtain the several target neighborhood points.
[0099] Specifically, in this embodiment, points that are far from the target data point need to be screened out according to the magnitude of the first spatial distance, and points that are close to the target data point are retained. For example, assume there are five points a, b, c, d, and e around the target data point A. The first spatial distance between a and A is d1, the first spatial distance between b and A is d2, the first spatial distance between c and A is d3, the first spatial distance between d and A is d4, and the first spatial distance between e and A is d5, and d1 < d2 < d3 < d4 < d5. Based on sorting and screening according to a preset quantity, if the preset quantity is 3, the screening process can be as follows: Among the distances d1, d2, d3, and d4 of the four points a, b, c, and d, select 3 minimum distances and arrange them in ascending order of distance as d1, d2, d3. Then, among d1, d2, d3 and the first spatial distance d5 between e and A, select 3 minimum distances and arrange them in ascending order of distance as d1, d2, d3, then a, b, and c are selected. If the preset quantity is 2, the screening process can be as follows: Among the distances d1, d2, and d3 of the three points a, b, and c, select 2 minimum distances and arrange them in ascending order of distance as d1, d2. Then, among d1, d2, and d4, select 2 minimum distances and arrange them in ascending order of distance as d1, d2. Then, among d1, d2, and d5, select 2 minimum distances and arrange them in ascending order of distance as d1, d2, then a and b are selected. Or based on sorting all of them, the screening process can be as follows: Sort all in ascending order of the first spatial distance, which is a, b, c, d, e. If 2 target neighborhood points need to be selected, then a and b are selected; if 3 target neighborhood points need to be selected, then a, b, and c are selected.
[0100] In another implementation manner, screening the points in the point cloud according to the first spatial distance to obtain a number of target neighborhood points specifically includes: obtaining a preset distance threshold, and using the points with the first spatial distance less than or equal to the preset distance threshold as the target neighborhood points.
[0101] Specifically, since points that are close to the target data point may all have a relatively large correlation with the attribute value of the target data point, in order to select all points that are close to the target data point, this embodiment presets a distance threshold, and determines the points with the first spatial distance less than or equal to the preset distance threshold as the points that are close to the target data point and uses them as target neighborhood points.
[0102] For example, assuming that there are five points a, b, c, d, and e around the target data point A, the first spatial distance between a and A is 1, the first spatial distance between b and A is 1, the first spatial distance between c and A is 2, the first spatial distance between d and A is 4, and the first spatial distance between e and A is 5. The preset distance threshold is 3, then the points whose first spatial distance is less than or equal to 3 are a, b, and c, so a, b, and c are target neighborhood points.
[0103] In another implementation, the points in the point cloud are screened according to the first spatial distance to obtain a number of target neighborhood points. Specifically, a preset number of points and points whose first spatial distance is the same as the distance between the preset number of points are selected from the points in the point cloud in order from small to large according to the first spatial distance to obtain the several target neighborhood points.
[0104] For example, assuming that there are five points a, b, c, d, and e around the target data point A, the first spatial distance between a and A is 1, the first spatial distance between b and A is 1, the first spatial distance between c and A is 2, the first spatial distance between d and A is 5, and the first spatial distance between e and A is 2. The preset number is 3, then the distances between the three points with the smallest first spatial distances are 1, 1, and 2, and the corresponding points are a, b, c, and e. Therefore, a, b, c, and e are the target neighborhood points.
[0105] like Figure 1 As shown, the method further includes the following steps:
[0106] Step S200: Determine the optimization weights of the target neighborhood points based on the second spatial distances between the target neighborhood points and the target data point.
[0107] In order to accurately predict the attribute value of the target data point, this embodiment determines the optimization weight of each target neighborhood point around the target data point based on the second spatial distance. The numerical value of the optimization weight can reflect the importance of the target neighborhood point in the subsequent calculation of the attribute prediction value of the target data point.
[0108] Specifically, this embodiment can use method 1 or method 2 to determine the second spatial distance between the target neighborhood point and the target data point. It is understood that if the same method is used to calculate the first spatial distance and the second spatial distance, the two are equal; if different methods are used to calculate the first spatial distance and the second spatial distance, the two are unequal. That is, the first spatial distance and the second spatial distance used in this embodiment can be equal or unequal.
[0109] like Figure 3As shown, in one implementation, the optimization weights of the target neighborhood points are determined based on the second spatial distances between the target neighborhood points and the target data point, specifically: S210, determining the optimization weights of the target neighborhood points based on the second spatial distance and the number of target neighborhood points with the same second spatial distance.
[0110] like Figure 4 As shown, in one implementation, the optimization weight of the target neighborhood point is determined based on the second spatial distance and the number of target neighborhood points with the same second spatial distance, specifically: S211, the product of the second spatial distance and the number of target neighborhood points with the same second spatial distance is used as the optimization distance of the target neighborhood point; the inverse of the optimization distance of the target neighborhood point is used as the optimization weight of the target neighborhood point.
[0111] For example, assuming that target data point A is surrounded by five target neighborhood points a, b, c, d, and e, and the corresponding second spatial distances are 1, 2, 3, 3, and 3, respectively, the number of target neighborhood points with a second spatial distance of 1 is 1, the number of target neighborhood points with a second spatial distance of 2 is 1, and the number of target neighborhood points with a second spatial distance of 3 is 3. The optimized distances of the five target neighborhood points are 1, 2, 3x3, 3x3, and 3x3, respectively, and the corresponding optimization weights are 1, 1 / 2, 1 / 9, 1 / 9, and 1 / 9, respectively. By taking into account the imbalance in the number of points at different distances, the accuracy of point cloud prediction is improved.
[0112] like Figure 4 As shown, in one implementation, the optimization weight of the target neighborhood point is determined based on the second spatial distance and the number of target neighborhood points with the same second spatial distance, specifically: S212, when the number of target neighborhood points with the same second spatial distance is greater than 1, the quotient obtained by dividing the product of the second spatial distance and the number of target neighborhood points with the same second spatial distance by the attribute quantization step size is used as the optimization distance of the target neighborhood point, and the inverse of the optimization distance of the target neighborhood point is used as the optimization weight of the target neighborhood point.
[0113] For example, assuming that target data point A is surrounded by five target neighborhood points a, b, c, d, and e, with corresponding second spatial distances of 1, 2, 3, 3, and 3, respectively, and an attribute quantization step of 2, then the number of target neighborhood points with a second spatial distance of 1 is 1, the number of target neighborhood points with a second spatial distance of 2 is 1, and the number of target neighborhood points with a second spatial distance of 3 is 3. The optimized distances of the five target neighborhood points are 1, 2, 3x3 / 2, 3x3 / 2, and 3x3 / 2, respectively, and the corresponding optimization weights are 1, 1 / 2, 2 / 9, 2 / 9, and 2 / 9, respectively. By taking into account the quantization error factors of the reconstructed attribute values of the target neighborhood points caused by different quantization step sizes, the accuracy of point cloud prediction is improved.
[0114] like Figure 4 As shown, in one implementation, the optimization weight of the target neighborhood point is determined based on the second spatial distance and the number of target neighborhood points with the same second spatial distance, specifically: S213, the number of target neighborhood points with the same second spatial distance and the minimum value of the attribute quantization step are used as optimization coefficients, the product of the second spatial distance and the number of target neighborhood points with the same second spatial distance divided by the optimization coefficient is used as the optimization distance of the target neighborhood point, and the inverse of the optimization distance of the target neighborhood point is used as the optimization weight of the target neighborhood point.
[0115] For example, assuming that target data point A is surrounded by five target neighborhood points (a, b, c, d, and e), with corresponding second spatial distances of 1, 2, 3, 3, and 3, respectively. Then, the number of target neighborhood points with a second spatial distance of 1 is 1, the number of target neighborhood points with a second spatial distance of 2 is 1, and the number of target neighborhood points with a second spatial distance of 3 is 3. If the attribute quantization step size is 1, the optimization coefficients of the five target neighborhood points are 1, 1, 1, 1, and 1, respectively. The optimization distances of the five target neighborhood points are 1, 2, 3x3, 3x3, and 3x3, respectively. The corresponding optimization weights are 1, 1 / 2, 1 / 9, 1 / 9, and 1 / 9, respectively. If the attribute quantization step size is 2, the optimization coefficients of the five target neighborhood points are 1, 1, 2, 2, and 2, respectively. The optimization distances of the five target neighborhood points are 1, 2, 3x3 / 2, 3x3 / 2, and 3x3 / 2, respectively. The corresponding optimization weights are 1, 1 / 2, 2 / 9, 2 / 9, and 2 / 9, respectively. If the attribute quantization step size is 4, the optimization coefficients of the five target neighborhood points are 1, 1, 3, 3, and 3, respectively. The optimization distances of the five target neighborhood points are 1, 2, 3x3 / 3, 3x3 / 3, and 3x3 / 3, respectively. The corresponding optimization weights are 1, 1 / 2, 1 / 3, 1 / 3, and 1 / 3, respectively. This improves point cloud prediction accuracy by considering both the balance of points at different distances and the quantization error caused by different quantization step sizes.
[0116] like Figure 3As shown, in one embodiment, the optimization weights of the target neighborhood points are determined based on the second spatial distances between the target neighborhood points and the target data points, specifically: S220, determining the optimization weights of the target neighborhood points based on the second spatial distance and the attribute quantization step.
[0117] like Figure 5 As shown, in one embodiment, the optimization weight of the target neighborhood point is determined based on the second spatial distance and the attribute quantization step, specifically: S221, the sum of the second spatial distance and the attribute quantization step is used as the optimization distance of the target neighborhood point, and the inverse of the optimization distance of the target neighborhood point is used as the optimization weight of the target neighborhood point.
[0118] For example, assuming that target data point A is surrounded by five target neighborhood points a, b, c, d, and e, with corresponding second-space distances of 1, 2, 3, 3, and 3, respectively, and an attribute quantization step size of 2, then the optimized distances of the five target neighborhood points are 1+2, 2+2, 3+2, 3+2, and 3+2, respectively, and the corresponding optimized weights are 1 / 3, 1 / 4, 1 / 5, 1 / 5, and 1 / 5, respectively. By taking into account the quantization error factors of the reconstructed attribute values of the target neighborhood points caused by different quantization step sizes, the accuracy of point cloud prediction is improved.
[0119] like Figure 5 As shown, in one embodiment, the optimization weight of the target neighborhood point is determined based on the second spatial distance and the attribute quantization step, specifically: S222, the product obtained by multiplying the sum of the second spatial distance and the attribute quantization step by the second spatial distance is used as the optimization distance of the target neighborhood point, and the inverse of the optimization distance of the target neighborhood point is used as the optimization weight of the target neighborhood point.
[0120] For example, assuming that target data point A is surrounded by five target neighborhood points a, b, c, d, and e, with corresponding second spatial distances of 1, 2, 3, 3, and 3, respectively, and an attribute quantization step size of 2, then the optimized distances of the five target neighborhood points are (1+2)x1, (2+2)x2, (3+2)x3, (3+2)x3, and (3+2)x3, respectively, and the corresponding optimization weights are 1 / 3, 1 / 8, 1 / 15, 1 / 15, and 1 / 15, respectively. By simultaneously considering spatial distance and the quantization error factors caused by different quantization step sizes, the accuracy of point cloud prediction is improved.
[0121] like Figure 3As shown, in one embodiment, the optimization weights of the target neighborhood points are determined based on the second spatial distances between the target neighborhood points and the target data points, specifically: S230, determining the optimization weights of the target neighborhood points based on the exponential power of the second spatial distance.
[0122] like Figure 6 As shown, in one embodiment, the optimization weight of the target neighborhood point is determined according to the exponential power of the second spatial distance, specifically: S231, the exponential power of the second spatial distance is used as the optimization distance of the target neighborhood point, and the inverse of the optimization distance of the target neighborhood point is used as the optimization weight corresponding to the target neighborhood point. For example, assuming that the second spatial distance of the target neighborhood point a is d2, the optimization distance of the target neighborhood point a is (d2) Q , the optimization weight w can be expressed as w = 1 / (d2) Q .
[0123] like Figure 6 As shown, in another embodiment, the optimization weight of the target neighborhood point is determined according to the exponential power of the second spatial distance, specifically: S232, the value of the exponential power polynomial of the second spatial distance is used as the optimization distance of the target neighborhood point, and the reciprocal of the optimization distance of the target neighborhood point is used as the optimization weight of the target neighborhood point. For example, assuming that the second spatial distance of the target area point a is d2, if the exponential power polynomial is a quadratic polynomial, the optimization distance of the target neighborhood point a is (d2) 2 +a(d2)+b, the optimized weight w can be expressed as w=1 / ((d2) 2 +a(d2)+b).
[0124] like Figure 3 As shown, in one embodiment, the optimization weights of the target neighborhood points are determined based on the second spatial distances between the target neighborhood points and the target data points, specifically: S240, determining the optimization weights of the target neighborhood points based on the second spatial distance and the direction vector of the target neighborhood points.
[0125] like Figure 7As shown, in one embodiment, the optimization weight of the target neighborhood point is determined according to the second spatial distance and the direction vector of the target neighborhood point, specifically: S241, obtaining the direction vectors corresponding to the several target neighborhood points respectively; S242, judging whether there are several parallel neighborhood points based on the direction vectors corresponding to the several target neighborhood points respectively; wherein the direction vectors corresponding to the several parallel neighborhood points are parallel; S243, when there are several parallel neighborhood points, setting the optimization weight of the parallel neighborhood point with a larger second spatial distance to 0; S244, setting the optimization weights of the neighborhood points among the several target neighborhood points except the several parallel neighborhood points and the parallel neighborhood point with the smallest second spatial distance to the inverse of the second spatial distance.
[0126] For example, in three-dimensional space, the coordinates of target data point A are v0 = (1, 2, 2), and there are four target neighborhood points, namely a, b, c, and d, with second spatial distances of 1, 1, 2, and 2, respectively. The coordinates are v1 = (0, 2, 2), v2 = (1, 1, 2), v3 = (1, 1, 1), and v4 = (1, 0, 2), and the direction vectors are v0-v1 = (1, 0, 0), v0-v2 = (0, 1, 0), v0-v3 = (0, 1, 1), and v0-v4 = (0, 2, 0). Since the direction vector (0, 2, 0) of target neighborhood point d is parallel to the direction vector (0, 1, 0) of target neighborhood point b, and the second spatial distance of target neighborhood point d is greater than that of target neighborhood point b, the optimization weight of target neighborhood point d is set to 0, that is, it does not participate in the calculation of the weighted mean. The optimization weights of target neighborhood points a, b, and c are 1, 1, and 1 / 2, respectively.
[0127] like Figure 8 As shown, in another implementation method, the optimization weight of the target neighborhood point is determined according to the second spatial distance and the direction vector of the target neighborhood point, specifically: S245, obtaining the direction vectors corresponding to the several target neighborhood points respectively; S246, determining the axial normalized direction vectors corresponding to the several target neighborhood points respectively according to the direction vectors corresponding to the several target neighborhood points; S247, judging whether there are several same-direction neighborhood points according to the axial normalized direction vectors corresponding to the several target neighborhood points respectively; wherein the axial normalized direction vectors corresponding to the several same-direction neighborhood points are the same; S248, when there are several same-direction neighborhood points, setting the optimization weight of the same-direction neighborhood point with a larger second spatial distance to 0; S249, setting the optimization weights of the neighborhood points among the several target neighborhood points except the several same-direction neighborhood points and the same-direction neighborhood point with the smallest second spatial distance to the inverse of the second spatial distance.
[0128] Specifically, the axial normalized direction vector can better reflect the balance of the direction distribution of the target neighborhood points, such as Figure 2 In c, the axially normalized direction vectors of the target neighborhood point in two-dimensional space are represented by eight points at a distance of 1. Even if the points at distances 2 and 3 are not parallel to the direction vectors of the point at distance 1, but have the same axially normalized direction vectors, the optimization weights of the points at distances 2 and 3 are set to 0, meaning they are not included in the weighted mean calculation. Therefore, this embodiment uses axially normalized direction vectors to optimize the weights of the target neighborhood points, allowing for more accurate attribute prediction of the target data points.
[0129] For example, in three-dimensional space, the coordinates of target data point A are v0 = (1, 2, 2), and there are four target neighboring points, namely a, b, c, and d. The second spatial distances are 1, 1, 2, and 2, respectively. The coordinates are v1 = (0, 2, 2), v2 = (1, 1, 1), v3 = (0, 1, 1), and v4 = (1, 1, 0). The direction vectors are v0-v1 = (1, 0, 0), v0-v2 = (0, 1, 1), v0-v3 = (1, 1, 1), and v0-v4 = (0, 1, 2). The axially normalized direction vector maps the values of each coordinate component to the range of -1 to 1, setting values greater than 1 to 1 and values less than -1 to -1, while keeping -1, 0, and 1 unchanged. Therefore, the direction vectors of target neighboring points a, b, and c are already axially normalized direction vectors, and the axially normalized direction vector of target neighboring point d is (0, 1, 1). Since the axial normalized direction vector of the target neighborhood point d is the same as that of the target neighborhood point b, and the second spatial distance 2 of the target neighborhood point d is greater than the second spatial distance 1 of the target neighborhood point b, the optimization weight of the target neighborhood point d is set to 0, that is, it does not participate in the calculation of the weighted mean. The optimization weights of the target neighborhood points a, b, and c are 1, 1, and 1 / 2.
[0130] like Figure 1 As shown, the method further includes the following steps:
[0131] Step S300: Determine the attribute prediction value corresponding to the target data point according to the target neighborhood points and the optimization weights corresponding to the target neighborhood points.
[0132] Specifically, this embodiment determines the predicted attribute value of the target data point based on the target neighborhood points and their corresponding optimization weights. The optimization weight corresponding to each target neighborhood point can reflect the importance of the target neighborhood point in calculating the predicted attribute value of the target data point. Target neighborhood points with lower weights have lower contributions to the calculation of the predicted attribute value of the target data point, while target neighborhood points with higher weights have higher contributions to the calculation of the predicted attribute value of the target data point.
[0133] In one implementation, step S300 specifically includes the following steps: Figure 9 As shown:
[0134] Step S310: Obtain the reconstructed attribute values corresponding to the target neighborhood points respectively;
[0135] Step S320: Obtain a weighted average value based on the optimization weights corresponding to the target neighborhood points and the reconstructed attribute values corresponding to the target neighborhood points, and use the weighted average value as the attribute prediction value corresponding to the target data point.
[0136] Specifically, in order to calculate the predicted attribute value of the target data point, this embodiment needs to obtain the reconstructed attribute value of each target neighborhood point, and then multiply the reconstructed attribute value of each target neighborhood point by the corresponding optimization weight one by one to obtain the weighted attribute value corresponding to each target neighborhood point, and then divide the sum of the weighted attribute values of all target neighborhood points by the sum of the optimization weights of all target neighborhood points to obtain a weighted average value, which is used as the attribute prediction value corresponding to the target data point.
[0137] like Figure 10 As shown, in one implementation, the method further includes S400 attribute encoding method, and the specific steps are as follows:
[0138] Step S410: Acquire the attribute value of the target data point, and use the difference between the attribute value and the attribute prediction value as the attribute residual value corresponding to the target data point;
[0139] Step S420: Encode the attribute residual value to obtain a point cloud code stream.
[0140] Specifically, this embodiment can determine the attribute residual value of the target data point based on the difference between the attribute value of the target data point and the attribute prediction value. The attribute residual value can reflect the error between the actual attribute value and the predicted attribute value. The attribute residual value is then encoded (such as transformation, quantization, entropy coding, etc.) to obtain a point cloud code stream.
[0141] like Figure 11 As shown, in one implementation, the method further includes S500 an attribute decoding method, specifically the following steps:
[0142] Step S510: Decode the point cloud code stream to obtain attribute residual reconstruction values;
[0143] Step S520: Determine the attribute reconstruction value corresponding to the target data point according to the sum of the attribute prediction value and the attribute residual reconstruction value.
[0144] Specifically, this embodiment decodes the point cloud code stream (such as entropy decoding, inverse quantization, inverse transformation and other steps) to obtain the attribute residual reconstruction value corresponding to the target data point, and then adds the attribute prediction value of the target data point to the attribute residual reconstruction value to obtain the attribute reconstruction value of the target data point.
[0145] In order to illustrate the technical effects of the present invention, the inventors compared the results obtained by using the method of the present invention to perform point cloud compression with the results of the test platform PCRM3.0, see Tables 1 to 3.
[0146] Table 1 Performance results under limited lossy geometry and lossy attribute conditions
[0147]
[0148] Table 2 Performance results under lossless geometry and lossy attribute conditions
[0149]
[0150] Table 3 Performance results under lossless geometry and limited lossy attributes
[0151]
[0152] From the data in Tables 1 to 3, it can be seen that compared with the results of the test platform PCRM3.0, the method provided by the patent of the present invention has performance improvements for color attributes, brightness, chromaticity Cb, and chromaticity Cr under all conditions. The brightness has a performance improvement of 5.3%, 10.0%, and 5.1% respectively, the chromaticity Cb has a performance improvement of 5.1%, 6.7%, and 5.1% respectively, and the chromaticity Cr has a performance improvement of 3.2%, 6.7%, and 5.1% respectively.
[0153] Based on the above embodiments, the present invention also provides a point cloud attribute prediction device, such as Figure 12 As shown, the device includes:
[0154] A neighborhood point screening module 01 is configured to screen points in the point cloud according to first spatial distances between each point in the point cloud and a target data point, to obtain a plurality of target neighborhood points;
[0155] A weight determination module 02 is configured to determine the optimization weights of the target neighborhood points based on the second spatial distances between the target neighborhood points and the target data point;
[0156] The attribute prediction module 03 is used to determine the attribute prediction value corresponding to the target data point according to the target neighborhood points and the optimization weights respectively corresponding to the target neighborhood points.
[0157] Based on the above embodiment, the present invention further provides a terminal, whose principle block diagram can be shown as follows: Figure 13 As shown. The terminal includes a processor, a memory, a network interface, and a display screen connected via a system bus. The processor of the terminal is used to provide computing and control capabilities. The memory of the terminal includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the terminal is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a point cloud attribute prediction method is implemented. The display screen of the terminal can be a liquid crystal display or an electronic ink display.
[0158] Those skilled in the art will understand that Figure 13 The principle block diagram shown in the figure is only a block diagram of a partial structure related to the solution of the present invention, and does not constitute a limitation on the terminal to which the solution of the present invention is applied. The specific terminal may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0159] In one implementation, one or more programs are stored in a memory of the terminal, and the terminal is configured to be executed by one or more processors. The one or more programs include instructions for performing a point cloud attribute prediction method.
[0160] Those skilled in the art will appreciate that all or part of the processes in the above-described embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the above-described embodiments. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct RAM bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM).
[0161] In summary, the present invention discloses a point cloud attribute prediction method, device, terminal and storage medium, which obtains a target data point to be processed in the point cloud data, determines the data points adjacent to the target data point, and obtains a number of initial neighborhood points; obtains a first spatial distance between the initial neighborhood points and the target data point, and screens the initial neighborhood points according to the first spatial distance to obtain a number of target neighborhood points; obtains a second spatial distance between the target neighborhood points and the target data point, and determines the optimization weights corresponding to the target neighborhood points according to the second spatial distance; and determines the attribute prediction value corresponding to the target data point according to the optimization weights corresponding to the target neighborhood points and the target neighborhood points. Since spatial distance can truly reflect the distance between two points in various dimensions, the target neighborhood points screened out based on spatial distance in the present invention are more accurate, which can solve the problem in the prior art that the neighborhood points selected based on Manhattan distance are inaccurate, resulting in low accuracy of point cloud attribute prediction.
[0162] It should be understood that the application of the present invention is not limited to the above examples. For those skilled in the art, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.
Claims
1. A point cloud attribute prediction method, characterized in that: The method comprises: Screening the points in the point cloud according to first spatial distances between the points in the point cloud and the target data points to obtain a number of target neighborhood points, including: selecting a preset number of points from the points in the point cloud in ascending order of the first spatial distances to obtain the target neighborhood points; or obtaining a preset distance threshold and using points whose first spatial distance is less than or equal to the preset distance threshold as the target neighborhood points; or selecting a preset number of points and points whose first spatial distance is the same as the preset number of points from the points in the point cloud in ascending order of the first spatial distances to obtain the target neighborhood points; Determining the optimization weights of the target neighborhood points based on the second spatial distances between the target neighborhood points and the target data point, including: determining the optimization weights of the target neighborhood points based on the second spatial distance and the number of target neighborhood points with the same second spatial distance; and / or determining the optimization weights of the target neighborhood points based on the second spatial distance and an attribute quantization step size; and / or determining the optimization weights of the target neighborhood points based on an exponential power of the second spatial distance; and / or determining the optimization weights of the target neighborhood points based on the second spatial distance and a direction vector of the target neighborhood point; According to the several target neighborhood points and the optimization weights corresponding to the several target neighborhood points, the attribute prediction value corresponding to the target data point is determined, including: obtaining the reconstructed attribute values corresponding to the several target neighborhood points; obtaining a weighted average value according to the optimization weights corresponding to the several target neighborhood points and the reconstructed attribute values corresponding to the several target neighborhood points, and using the weighted average value as the attribute prediction value corresponding to the target data point.
2. The point cloud attribute prediction method according to claim 1, characterized in that: The first spatial distance includes: Calculate the weighted sum of the P-th power of the difference between the two points in N coordinate components as the first spatial distance; Alternatively, the maximum value of the weighted values of the differences between the two points on N coordinate components is calculated as the first spatial distance.
3. The point cloud attribute prediction method according to claim 1, characterized in that: The second spatial distance includes: Calculate the weighted sum of the P-th power of the difference between the two points in N coordinate components as the second spatial distance; Alternatively, the maximum value of the weighted values of the differences between the two points on N coordinate components is calculated as the second spatial distance.
4. The point cloud attribute prediction method according to claim 1, characterized in that: The determining the optimization weight of the target neighborhood point according to the second spatial distance and the number of target neighborhood points having the same second spatial distance includes: The product of the second spatial distance and the number of target neighborhood points having the same second spatial distance is used as the optimized distance of the target neighborhood point; the reciprocal of the optimized distance of the target neighborhood point is used as the optimized weight of the target neighborhood point; Alternatively, when the number of target neighborhood points with the same second spatial distance is greater than 1, the quotient obtained by dividing the product of the second spatial distance and the number of target neighborhood points with the same second spatial distance by the attribute quantization step size is used as the optimized distance of the target neighborhood point, and the reciprocal of the optimized distance of the target neighborhood point is used as the optimization weight of the target neighborhood point; Alternatively, the number of target neighborhood points with the same second spatial distance and the minimum value of the attribute quantization step are used as optimization coefficients, the quotient obtained by dividing the product of the second spatial distance and the number of target neighborhood points with the same second spatial distance by the optimization coefficient is used as the optimization distance of the target neighborhood point, and the reciprocal of the optimization distance of the target neighborhood point is used as the optimization weight of the target neighborhood point.
5. The point cloud attribute prediction method according to claim 1, characterized in that: The determining the optimization weight of the target neighborhood point according to the second spatial distance and the attribute quantization step size includes: The sum of the second spatial distance and the attribute quantization step is used as the optimized distance of the target neighborhood point, and the reciprocal of the optimized distance of the target neighborhood point is used as the optimized weight of the target neighborhood point; Alternatively, the sum of the second spatial distance and the attribute quantization step is multiplied by the second spatial distance as the optimized distance of the target neighborhood point, and the reciprocal of the optimized distance of the target neighborhood point is used as the optimized weight of the target neighborhood point.
6. The point cloud attribute prediction method according to claim 1, characterized in that: The determining the optimization weight of the target neighborhood point according to the exponential power of the second spatial distance includes: Using the exponential power of the second spatial distance as the optimized distance of the target neighborhood point, and using the reciprocal of the optimized distance of the target neighborhood point as the optimized weight of the target neighborhood point; Alternatively, the value of the exponential power polynomial of the second spatial distance is used as the optimized distance of the target neighborhood point, and the reciprocal of the optimized distance of the target neighborhood point is used as the optimized weight of the target neighborhood point.
7. The point cloud attribute prediction method according to claim 1, characterized in that: The determining the optimization weight of the target neighborhood point according to the second spatial distance and the direction vector of the target neighborhood point includes: Obtaining direction vectors corresponding to the target neighborhood points respectively; According to the direction vectors corresponding to the plurality of target neighboring points, it is determined whether there are a plurality of parallel neighboring points; wherein the direction vectors corresponding to the plurality of parallel neighboring points are parallel; When there are several parallel neighboring points, the optimization weights of the parallel neighboring points with the larger second spatial distance are set to 0; The optimization weights of the neighborhood points other than the parallel neighborhood points in the target neighborhood points and the parallel neighborhood point with the smallest second spatial distance are set to the reciprocal of the second spatial distance.
8. The point cloud attribute prediction method according to claim 1, characterized in that: The determining the optimization weight of the target neighborhood point according to the second spatial distance and the direction vector of the target neighborhood point includes: Obtaining direction vectors corresponding to the target neighborhood points respectively; Determining, based on the direction vectors corresponding to the plurality of target neighborhoods, the axial normalized direction vectors corresponding to the plurality of target neighborhood points respectively; According to the axial normalized direction vectors respectively corresponding to the plurality of target neighboring points, it is determined whether there are a plurality of neighboring points in the same direction; wherein the axial normalized direction vectors respectively corresponding to the plurality of neighboring points in the same direction are the same; When there are several neighboring points in the same direction, the optimization weights of the neighboring points in the same direction with the larger distance in the second space are set to 0; The optimization weights of the neighboring points in the target neighborhood points other than the neighboring points in the same direction and the neighboring point in the same direction with the smallest second spatial distance are set to the reciprocal of the second spatial distance.
9. The point cloud attribute prediction method according to claim 1, characterized in that: The method further includes an attribute residual encoding method, and the attribute residual encoding method includes: Obtaining the attribute value of the target data point, and taking the difference between the attribute value and the attribute prediction value as the attribute residual value corresponding to the target data point; The attribute residual value is encoded to obtain a point cloud code stream.
10. The point cloud attribute prediction method according to claim 1, characterized in that: The method further includes an attribute residual decoding method, and the attribute residual decoding method includes: Decode the point cloud code stream to obtain the attribute residual reconstruction value of the target data point; The attribute reconstruction value corresponding to the target data point is determined according to the sum of the attribute prediction value and the attribute residual reconstruction value.
11. A point cloud attribute prediction device, characterized in that: The device comprises: A neighborhood point screening module is configured to screen points in the point cloud according to first spatial distances between each point in the point cloud and a target data point to obtain a plurality of target neighborhood points, including: selecting a preset number of points from the points in the point cloud in ascending order of the first spatial distances to obtain the plurality of target neighborhood points; or obtaining a preset distance threshold and selecting points whose first spatial distance is less than or equal to the preset distance threshold as the plurality of target neighborhood points; or selecting a preset number of points and points whose first spatial distance is the same as the preset number of points from the points in the point cloud in ascending order of the first spatial distances to obtain the plurality of target neighborhood points. A weight determination module is used to determine the optimization weights of the target neighborhood points based on the second spatial distances between the target neighborhood points and the target data point, including: determining the optimization weights of the target neighborhood points based on the second spatial distance and the number of target neighborhood points with the same second spatial distance; and / or determining the optimization weights of the target neighborhood points based on the second spatial distance and the attribute quantization step size; and / or determining the optimization weights of the target neighborhood points based on the exponential power of the second spatial distance; and / or determining the optimization weights of the target neighborhood points based on the second spatial distance and the direction vector of the target neighborhood point; The attribute prediction module is used to determine the attribute prediction value corresponding to the target data point based on the several target neighborhood points and the optimization weights corresponding to the several target neighborhood points, including: obtaining the reconstructed attribute values corresponding to the several target neighborhood points; obtaining a weighted average value based on the optimization weights corresponding to the several target neighborhood points and the reconstructed attribute values corresponding to the several target neighborhood points, and using the weighted average value as the attribute prediction value corresponding to the target data point.
12. A terminal, characterized in that: The terminal includes a memory and one or more processors; the memory stores one or more programs; the program includes instructions for executing the point cloud attribute prediction method as described in any one of claims 1-10; and the processor is used to execute the program.
13. A computer-readable storage medium having a plurality of instructions stored thereon, characterized in that: The processor loads and executes the instructions to implement the steps of the point cloud attribute prediction method described in any one of claims 1 to 10.
Citation Information
Patent Citations
Point cloud compression
CN111095929A
Method for constructing semantic map on line by utilizing fusion of laser radar and visual sensor
CN111928862A