Transform method, inverse transform method, coder, decoder and storage medium
Provided by the implementations of the present disclosure are a transform method, a coder, a decoder and a computer readable storage medium. The transform method includes: determining normal vectors of encoding points in an encoding point cloud; analyzing the sum total of all coordinates of the normal vectors on the basis of the normal vectors of the encoding points; and determining a transform sequence on the basis of the sum total of all coordinates of the normal vectors.
1. A transform method, applied to an encoder, comprising:
determining three two-dimensional projection planes of an encoding point in an encoding point cloud on three coordinate planes formed in a three-dimensional space;
counting a projection area of each coordinate plane based on the three two-dimensional projection planes; and
determining a transform order based on the projection area.
2. The method of claim 1 , wherein after determining the transform order based on the projection area, the method further comprises:
performing Region Adaptive Hierarchical Transform (RAHT) transform based on the transform order; and
encoding the transform order and signalling the transform order in a bitstream.
3. The method of claim 1 , wherein determining the three two-dimensional projection planes of the encoding point in the encoding point cloud on three coordinate planes formed in the three-dimensional space comprises:
partitioning the encoding point cloud into at least one cube sub-block base on a preset cube side length;
determining three two-dimensional projection planes of an encoding voxel point in each cube sub-block of the at least one cube sub-block on three coordinate planes formed in a three-dimensional space, wherein the encoding voxel point represents the encoding point;
counting the projection area of each coordinate plane based on the three two-dimensional projection planes comprises:
counting a projection area of each coordinate plane corresponding to each cube sub-block based on the three two-dimensional projection planes.
4. The method of claim 3 , wherein the determining the transform order based on the projection area comprises:
sorting the projection area of each coordinate plane corresponding to each cube sub-block from large to small, and determining an order of coordinate axes perpendicular to each coordinate axis plane as a transform order of each cube sub-block.
5. The method of claim 4 , wherein, the method further comprises:
performing RAHT transform on an encoding voxel point of each cube sub-block according to the transform order of each cube sub-block to obtain a sub-voxel point of each cube sub-block;
counting a sum of absolute value of a projection area corresponding to each coordinate plane according to the projection area of each coordinate plane corresponding to each cube sub-block;
sorting the sum of absolute value of the projection area from large to small to obtain the transform order;
performing RAHT transform on the sub-voxel point of each cube sub-block according to the transform order; and
signalling a transform order of each cube sub-block in a bitstream.
6. The method of claim 5 , wherein after performing RAHT transform on the encoding voxel point of each cube sub-block according to the transform order of each cube sub-block to obtain the sub-voxel point of each cube sub-block, and before performing RAHT transform on the sub-voxel point of each cube sub-block according to the transform order, the method further comprises:
obtaining a main projection direction corresponding to each cube sub-block according to the transform order corresponding to the each cube sub-block;
counting a quantity of main projection directions of each coordinate according to the main projection direction corresponding to each cube sub-block; and
sorting the quantity of the main projection directions of each coordinate from large to small to obtain the transform order.
7. The method of claim 6 , wherein counting the quantity of main projection directions of each coordinate according to the main projection direction corresponding to each cube sub-block comprises:
selecting main projection directions corresponding to a preset proportion of sub-cube sub-blocks from the main projection direction corresponding to each cube sub-block; and
counting the quantity of main projection directions of each coordinate according to the main projection directions corresponding to the sub-cube sub-blocks.
8. The method of claim 3 , wherein, the method further comprises:
constructing the at least one cube sub-block with the encoding point in the encoding point cloud being a center.
9. The method of claim 1 , wherein determining the transform order based on the projection area comprises:
determining the transform order as yxz when the projection area is Num(xoy)>Num(yoz)>Num(zox);
determining the transform order as xyz when the projection area is Num(xoy)>Num(zox)>Num(yoz);
determining the transform order as yzx when the projection area is Num(yoz)>Num(xoy)>Num(zox);
determining the transform order as zyx when the projection area is Num(yoz)>Num(zox)>Num(xoy);
determining the transform order as zxy when the projection area is Num(zox)>Num(yoz)>Num(xoy); and
determining the transform order as xzy when the projection area is Num(zox)>Num(xoy)>Num(yoz).
10. An inverse transform method, applied to decoding, comprising:
parsing a bitstream to obtain a transform order; and
performing inverse Region Adaptive Hierarchical Transform (RAHT) transform based on the transform order during decoding.
11. The method of claim 10 , wherein the bitstream comprises attribute information.
12. The method of claim 10 , wherein the transform order is an order of coordinate axes.
13. The method of claim 10 , further comprising:
during decoding, sorting each point in a point cloud in an order of Morton codes, and performing inverse RAHT transform on all points in the point cloud in an order obtained after sorting in the order of Morton codes.
14. The method of claim 13 , wherein a weight of each point is set as 1.
15. The method of claim 14 , wherein inverse RAHT transform is performed on an attribute value according to the weight.
16. A decoder, comprising: a memory configured to store executable instructions; and
a processor configured to implement following acts when executing the executable instructions stored in the second memory:
parsing a bitstream to obtain a transform order; and
performing inverse Region Adaptive Hierarchical Transform (RAHT) transform based on the transform order during decoding.
17. The decoder of claim 16 , wherein the bitstream comprises attribute information.
18. The decoder of claim 16 , wherein the transform order is an order of coordinate axes.
19. The decoder of claim 16 , wherein the processor is further configured to implement:
during decoding, sorting each point in a point cloud in an order of Morton codes, and performing inverse RAHT transform on all points in the point cloud in an order obtained after sorting in the order of Morton codes.
20. The decoder of claim 19 , wherein a weight of each point is set as 1, and the inverse RAHT transform is performed on an attribute value according to the weight.