Decoding method, encoding method, decoder, and encoder based on point cloud attribute prediction
View Patent ↗In the field of computer vision, a decoding method, an encoding method, a decoder, and an encoder based on point cloud attribute prediction are provided. The decoding method includes: parsing a code stream of a point cloud to obtain reconstructed information of position information of a target point; selecting candidate points of the target point from decoded points in the point cloud; selecting neighbor points from the candidate points based on the reconstructed information of the position information of the target point; determining a predicted value of attribute information of the target point by using attribute values of the neighbor points; and obtaining a decoded point cloud based on the predicted value of the attribute information of the target point. Neighbor points with attributes similar to that of a target point are selected where possible to predict attribute information of the target point, thereby reducing the prediction complexity.
1 . A decoding method based on point cloud attribute prediction, performed by a codec device, the method comprising:
acquiring a code stream of a point cloud, and parsing the code stream of the point cloud to obtain reconstructed information of position information of a target point in the point cloud;
selecting N decoded points from M decoded points in the point cloud as N candidate points of the target point, wherein N is a subset of M such that M>N≥1, wherein the selecting of the N decoded points from the M decoded points in the point cloud as the N candidate points of the target point comprises:
selecting the N decoded points from the M decoded points based on a first order of the M decoded points, the first order being selected from one of:
an order obtained by performing Hilbert sorting on the M decoded points and the target point, and
a decoding order of the M decoded points and the target point; and
determining the N decoded points as the N candidate points; and
determining, in the first order, N consecutive points previous to the target point as the N decoded points, the N consecutive points being adjacent to the target point or spaced apart from the target point by at least one decoded point,
selecting k neighbor points from the N candidate points based on the reconstructed information of the position information of the target point, wherein N≥k≥1, wherein the selecting the k neighbor points from the N candidate points based on a second order, the second order being one of:
an order obtained by performing Hilbert sorting on the N candidate points and the target point, and
an order obtained after sorting in descending order or ascending order of distances between all of the N candidate points and the target point, the distances between all of the N candidate points and the target point being Euclidean distances or Manhattan distances;
determining a predicted value of attribute information of the target point based on attribute values of the k neighbor points, the attribute values of the k neighbor points being reconstructed values of attribute information of the k neighbor points;
parsing the code stream to obtain a residual value of the attribute information of the target point;
obtaining a final reconstructed value of the attribute information of the target point according to the predicted value of the attribute information of the target point and the residual value of the attribute information of the target point; and
obtaining a decoded point cloud according to the final reconstructed value of the attribute information of the target point.
2 . The method according to claim 1 , wherein the selecting of the k neighbor points from the N candidate points based on the reconstructed information of the position information of the target point comprises:
determining a geometric structure relationship between the N candidate points and the target point based on the reconstructed information of the position information of the target point and reconstructed information of position information of the N candidate points; and
selecting the k neighbor points from the N candidate points based on the geometric structure relationship.
3 . The method according to claim 2 , wherein the geometric structure relationship is represented by an octree structure, and the selecting of the k neighbor points from the N candidate points based on the geometric structure relationship comprises:
determining k nearest neighbor points of the target point based on the octree structure; and
determining the k nearest neighbor points as the k neighbor points.
4 . The method according to claim 2 , wherein the selecting of the k neighbor points from the N candidate points based on the geometric structure relationship comprises:
selecting, based on the geometric structure relationship, p candidate points collinear and/or coplanar with the target point from the N candidate points; and
determining the p candidate points as the k neighbor points when the quantity p of candidate points is greater than or equal to the quantity k of neighbor points; or
selecting k candidate points from the p candidate points as the k neighbor points when the quantity p of candidate points is greater than or equal to the quantity k of neighbor points.
5 . The method according to claim 2 , wherein the selecting of the k neighbor points from the N candidate points based on the geometric structure relationship comprises:
selecting, based on the geometric structure relationship, p candidate points collinear and/or coplanar with the target point from the N candidate points;
determining distances between all of the N candidate points and the target point based on the reconstructed information of the position information of the target point and the reconstructed information of the position information of the N candidate points when the quantity p of candidate points is less than the quantity k of neighbor points or the quantity p of candidate points is equal to 0; and
selecting the k neighbor points from the N candidate points based on the distances between all of the N candidate points and the target point.
6 . The method according to claim 2 , wherein the selecting of the k neighbor points from the N candidate points based on the geometric structure relationship comprises:
selecting, based on the geometric structure relationship, p candidate points collinear and/or coplanar with the target point from the N candidate points;
determining a second order by using the reconstructed information of the position information of the target point and the reconstructed information of the position information of the N candidate points when the quantity p of candidate points is less than the quantity k of neighbor points or the quantity p of candidate points is equal to 0.
7 . The method according to claim 1 , wherein the selecting of the k neighbor points from the N candidate points based on the reconstructed information of the position information of the target point comprises:
determining distances between all of the N candidate points and the target point based on the reconstructed information of the position information of the target point and reconstructed information of position information of the N candidate points; and
selecting the k neighbor points from the N candidate points based on the distances between all of the N candidate points and the target point.
8 . The method according to claim 5 , wherein the selecting of the k neighbor points from the N candidate points based on the distances between all of the N candidate points and the target point comprises one of:
determining first target candidate points in the N candidate points as the k neighbor points, each first target candidate point being a point in the N candidate points with a distance to the target point less than a first threshold; and
determining second target candidate points in the N candidate points as the k neighbor points, each second target candidate point being a point in the N candidate points with a distance to the target point less than a second threshold.
9 . The method according to claim 1 , wherein the selecting of the k neighbor points from the N candidate points based on the reconstructed information of the position information of the target point comprises:
determining the second order by using the reconstructed information of the position information of the target point and reconstructed information of position information of the N candidate points.
10 . The method according to claim 1 , wherein the determining of the predicted value of attribute information of the target point based on the attribute values of the k neighbor points comprises one of:
using a reciprocal of a distance between each of the k neighbor points and the target point as a weight of the each neighbor point, performing weighted averaging calculation based on the attribute value and the weight of each of the k neighbor points to obtain a weighted average value of the attribute values of the k neighbor points, and determining the weighted average value of the attribute values of the k neighbor points as the predicted value of the attribute information of the target point;
setting initial weights for different neighbor points in the k neighbor points, performing weighted averaging calculation based on the attribute value and the initial weight of each of the k neighbor points to obtain a weighted average value of the attribute values of the k neighbor points, and determining the weighted average value of the attribute values of the k neighbor points as the predicted value of the attribute information of the target point, the initial weight of each of the k neighbor points decreasing as the distance between the neighbor point and the target point increases, and the code stream comprising the initial weight of each of the k neighbor points; and
determining the attribute value of a neighbor point in the k neighbor points that is closest to the target point as the predicted value of the attribute information of the target point.
11 . The method according to claim 1 , wherein the determining of the predicted value of attribute information of the target point based on the attribute values of the k neighbor points comprises:
discarding first neighbor points and second neighbor points in the k neighbor points to obtain remaining neighbor points in the k neighbor points, each first neighbor point being a neighbor point in the k neighbor points with a distance to a reference point greater than a first threshold, and each second neighbor point being a neighbor point in the k neighbor points with a distance to the reference point greater than or equal to a second threshold, the k neighbor points comprising the reference point; and
determining the predicted value of the attribute information of the target point by using the attribute values of the remaining neighbor points in the k neighbor points.
12 . An encoding method based on point cloud attribute prediction, performed by a codec device, the method comprising:
acquiring reconstructed information of position information of a target point in a point cloud;
selecting N encoded points from M encoded points in the point cloud as N candidate points of the target point, wherein Nis a subset of M such that M>N≥1, wherein the selecting of the N encoded points from the M encoded points in the point cloud as the N candidate points of the target point comprises:
selecting the N encoded points from the M encoded points based on a first order of the M encoded points, the first order being selected from one of:
an order obtained by performing Hilbert sorting on the M encoded points and the target point, and
an encoding order of the M encoded points and the target point; and
determining, in the first order, N consecutive points previous to the target point as the N encoded points, the N consecutive points being adjacent to the target point or spaced apart from the target point by at least one encoded point, and
determining the N encoded points as the N candidate points;
selecting k neighbor points from the N candidate points based on the reconstructed information of the position information of the target point, wherein N≥k≥1, wherein the selecting the k neighbor points from the N candidate points is based on a second order, the second order being one of:
an order obtained by performing Hilbert sorting on the N candidate points and the target point, and
an order obtained after sorting in descending order or ascending order of distances between all of the N candidate points and the target point, the distances between all of the N candidate points and the target point being Euclidean distances or Manhattan distances;
determining a predicted value of attribute information of the target point based on attribute values of the k neighbor points, the attribute values of the k neighbor points being reconstructed values of attribute information of the k neighbor points or original values of the attribute information of the k neighbor points;
obtaining a residual value of the attribute information of the target point according to the predicted value of the attribute information of the target point and an original value of the attribute information of the target point; and
encoding the residual value of the attribute information of the target point to obtain a code stream of the point cloud.
13 . A decoder based on point cloud attribute prediction, comprising:
at least one memory configured to store program code; and
at least one processor configured to read the program code and operate as instructed by the program code, the program code including:
first parsing code configured to cause the at least one processor to acquire a code stream of a point cloud, and parse the code stream of the point cloud to obtain reconstructed information of position information of a target point in the point cloud;
prediction code configured to cause the at least one processor to: select N decoded points from M decoded points in the point cloud as N candidate points of the target point, wherein Nis a subset of M such that M>N≥1, wherein the selection of the N decoded points from the M decoded points in the point cloud as the N candidate points of the target point comprises:
selection of the N decoded points from the M decoded points based on a first order of the M decoded points, the first order being selected from one of:
an order obtained by performing Hilbert sorting on the M decoded points and the target point, and
an encoding order of the M decoded points and the target point; and
a determination, in the first order, of N consecutive points previous to the target point as the N encoded points, the N consecutive points being adjacent to the target point or spaced apart from the target point by at least one encoded point, and
determining the N decoded points as the N candidate points;
selecting code configured to cause the at least one processor to select k neighbor points from the N candidate points based on the reconstructed information of the position information of the target point, N≥k≥1, wherein the selection of the k neighbor points from the N candidate points is based on a second order, the second order being one of:
an order obtained by performing Hilbert sorting on the N candidate points and the target point, and
an order obtained after sorting in descending order or ascending order of distances between all of the N candidate points and the target point, the distances between all of the N candidate points and the target point being Euclidean distances or Manhattan distances; and
determining code configured to cause the at least one processor to determine a predicted value of attribute information of the target point by using attribute values of the k neighbor points, the attribute values of the k neighbor points being reconstructed values of attribute information of the k neighbor points;
second parsing coded configured to cause the at least one processor to parse the code stream to obtain a residual value of the attribute information of the target point;
residual code configured to cause the at least one processor to obtain a final reconstructed value of the attribute information of the target point according to the predicted value of the attribute information of the target point and the residual value of the attribute information of the target point; and
decoding code configured to cause the at least one processor to obtain a decoded point cloud according to the final reconstructed value of the attribute information of the target point.
14 . An encoder based on point cloud attribute prediction, comprising:
at least one memory configured to store program code; and
at least one processor configured to read the program code and operate as instructed by the program code, the program code including:
acquisition code configured to cause the at least one processor to acquire reconstructed information of position information of a target point in a point cloud;
prediction code configured to cause the at least one processor to:
select N encoded points from M encoded points in the point cloud as N candidate points of the target point, wherein N is a subset of M such that M>N≥1, wherein the selection of the N decoded points from the M decoded points in the point cloud as the N candidate points of the target point comprises:
selection of the N encoded points from the M encoded points based on a first order of the M encoded points, the first order being selected from one of:
an order obtained by performing Hilbert sorting on the M encoded points and the target point, and
an encoding order of the M encoded points and the target point; and
a determination, in the first order, of N consecutive points previous to the target point as the N encoded points, the N consecutive points being adjacent to the target point or spaced apart from the target point by at least one encoded point and
determining the N encoded points as the N candidate points;
select k neighbor points from the N candidate points based on the reconstructed information of the position information of the target point, N≥k≥1, wherein the selection of the k neighbor points from the N candidate points is based on a second order, the second order being one of:
an order obtained by performing Hilbert sorting on the N candidate points and the target point, and
an order obtained after sorting in descending order or ascending order of distances between all of the N candidate points and the target point, the distances between all of the N candidate points and the target point being Euclidean distances or Manhattan distances; and
determine a predicted value of attribute information of the target point by using attribute values of the k neighbor points, the attribute values of the k neighbor points being reconstructed values of attribute information of the k neighbor points or original values of the attribute information of the k neighbor points;
residual code configured to cause the at least one processor to obtain a residual value of the attribute information of the target point according to the predicted value of the attribute information of the target point and an original value of the attribute information of the target point; and
encoding code configured to cause the at least one processor to encode the residual value of the attribute information of the target point to obtain a code stream of the point cloud.
15 . A non-transitory computer-readable storage medium, configured to store computer-readable instructions, the computer-readable instructions causing a processor to perform a decoding method based on point cloud attribute prediction, the method comprising:
acquiring a code stream of a point cloud, and parsing the code stream of the point cloud to obtain reconstructed information of position information of a target point in the point cloud;
selecting N decoded points from M decoded points in the point cloud as N candidate points of the target point, wherein N is a subset of M such that M>N≥1, wherein the selecting of the N decoded points from the M decoded points in the point cloud as the N candidate points of the target point comprises:
selecting the N decoded points from the M decoded points based on a first order of the M decoded points, the first order being selected from one of:
an order obtained by performing Hilbert sorting on the M decoded points and the target point, and
a decoding order of the M decoded points and the target point; and
determining the N decoded points as the N candidate points; and
determining, in the first order, N consecutive points previous to the target point as the N encoded points, the N consecutive points being adjacent to the target point or spaced apart from the target point by at least one encoded point;
selecting k neighbor points from the N candidate points based on the reconstructed information of the position information of the target point, wherein N≥k≥1, wherein the selecting the k neighbor points from the N candidate points based on a second order, the second order being one of:
an order obtained by performing Hilbert sorting on the N candidate points and the target point, and
an order obtained after sorting in descending order or ascending order of distances between all of the N candidate points and the target point, the distances between all of the N candidate points and the target point being Euclidean distances or Manhattan distances;
determining a predicted value of attribute information of the target point based on attribute values of the k neighbor points, the attribute values of the k neighbor points being reconstructed values of attribute information of the k neighbor points;
parsing the code stream to obtain a residual value of the attribute information of the target point;
obtaining a final reconstructed value of the attribute information of the target point according to the predicted value of the attribute information of the target point and the residual value of the attribute information of the target point; and
obtaining a decoded point cloud according to the final reconstructed value of the attribute information of the target point.
16 . A non-transitory computer-readable storage medium, configured to store computer-readable instructions, the computer-readable instructions causing a processor to perform an encoding method based on point cloud attribute prediction, the method comprising:
acquiring reconstructed information of position information of a target point in a point cloud;
selecting N encoded points from M encoded points in the point cloud as N candidate points of the target point, wherein N is a subset of M such that M>N≥1, wherein the selecting of the N decoded points from the M decoded points in the point cloud as the N candidate points of the target point comprises:
selecting the N encoded points from the M encoded points based on a first order of the M encoded points, the first order being selected from one of:
an order obtained by performing Hilbert sorting on the M encoded points and the target point, and
an encoding order of the M encoded points and the target point; and
determining, in the first order, N consecutive points previous to the target point as the N encoded points, the N consecutive points being adjacent to the target point or spaced apart from the target point by at least one encoded point, and
determining the N encoded points as the N candidate points;
selecting k neighbor points from the N candidate points based on the reconstructed information of the position information of the target point, wherein N≥k≥1, wherein the selecting the k neighbor points from the N candidate points based on a second order, the second order being one of:
an order obtained by performing Hilbert sorting on the N candidate points and the target point, and
an order obtained after sorting in descending order or ascending order of distances between all of the N candidate points and the target point, the distances between all of the N candidate points and the target point being Euclidean distances or Manhattan distances;
determining a predicted value of attribute information of the target point based on attribute values of the k neighbor points, the attribute values of the k neighbor points being reconstructed values of attribute information of the k neighbor points or original values of the attribute information of the k neighbor points;
obtaining a residual value of the attribute information of the target point according to the predicted value of the attribute information of the target point and an original value of the attribute information of the target point; and
encoding the residual value of the attribute information of the target point to obtain a code stream of the point cloud.