Coding method, device and electronic equipment

By grouping the spherical harmonic function coefficients by order and using cluster center coding, combined with entropy coding and residual coding technology, the problem of high point cloud data storage space consumption in 3D Gaussian sputtering technology is solved, and efficient data compression is achieved. and rendering performance improvements.

CN118433395BActive Publication Date: 2024-09-03北京数原数字化城市研究中心
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410877079.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-02
Publication Date
2024-09-03
Estimated Expiration
2044-07-02

AI Technical Summary

Technical Problem

3D Gaussian Splashing technology consumes a large amount of storage space for point cloud data, resulting in storage and transmission challenges, and existing compression methods fail to effectively optimize decoding speed, affecting rendering performance.

Method used

By grouping the spherical harmonic function coefficients by order and using cluster centers for encoding, the storage space is reduced while taking into account the rendering speed. Entropy coding and residual coding technology are used to encode within the graphics processor to improve data representation efficiency.

Benefits of technology

It achieves a data compression ratio of up to 30 times, significantly improves the rendering frame rate, reduces memory overhead and energy consumption, and is suitable for storage and transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118433395B
    Figure CN118433395B
Patent Text Reader

Abstract

The present application provides a coding method, device and electronic device, which relate to the field of image communication technology, wherein the method comprises: obtaining coefficients of the spherical harmonic function of the target point cloud, the coefficients are used to represent the color attributes of the target point cloud; according to the order of the coefficients of the spherical harmonic function, the coefficients of the spherical harmonic function are divided into N groups of coefficients, wherein the order of the first group of coefficients is less than the order of the second group of coefficients, and N is an integer greater than 1; clustering the N groups of coefficients respectively to obtain N groups of cluster centers; the number of the second group of cluster centers is less than the number of the first group of cluster centers; using the N groups of cluster centers to encode the N groups of coefficients respectively to obtain a first coded bit stream. In an embodiment of the present application, the coefficients of the spherical harmonic function of the target point cloud are grouped according to the order of the coefficients of the spherical harmonic function, and the number of cluster centers of at least one group of coefficients is reduced, so that the required data storage space will be less, thereby being able to reduce the data storage space of the target point cloud.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image communication technology, and in particular to a coding method, device and electronic equipment. Background Art

[0002] In recent years, 3D rendering technology has made significant progress. Among them, 3D Gaussian Splatting (3DGS) provides faster rendering speed and highly realistic visual effects, and is widely used in various fields. 3DGS converts scene photos from multiple angles into point cloud data with attributes. The renderer can render a very realistic rendering screen by reading the attributes of these point cloud data.

[0003] However, each point in the 3DGS point cloud data requires 59 double-precision floating-point numbers to be stored, which causes the 3DGS technology to consume a large amount of storage space. Summary of the invention

[0004] The embodiments of the present application provide a coding method, device and electronic device to solve the problem of large storage space consumption in 3DGS technology.

[0005] To solve the above technical problems, this application is implemented as follows:

[0006] In a first aspect, an embodiment of the present application provides an encoding method, the method comprising:

[0007] Acquire coefficients of the spherical harmonic function of the target point cloud, where the coefficients are used to represent the color attributes of the target point cloud;

[0008] According to the order of the coefficients of the spherical harmonic function, the coefficients of the spherical harmonic function are divided into N groups of coefficients, wherein the N groups of coefficients include a first group of coefficients and a second group of coefficients, the order of the first group of coefficients is less than the order of the second group of coefficients, and N is an integer greater than 1;

[0009] Performing clustering processing on the N groups of coefficients respectively to obtain N groups of cluster centers; wherein the number of the second group of cluster centers is less than the number of the first group of cluster centers;

[0010] The N groups of coefficients are respectively encoded using the N groups of cluster centers to obtain a first encoded bit stream.

[0011] Optionally, N is 2, and the coefficients of the spherical harmonics are divided into the first group of coefficients and the second group of coefficients;

[0012] The first group of coefficients is a group in which the DC component of the coefficients of the spherical harmonics is located, and the second group of coefficients is a group that does not include the DC component of the coefficients of the spherical harmonics.

[0013] Optionally, the using the N groups of cluster centers to encode the N groups of coefficients respectively to obtain a first encoded bitstream includes:

[0014] Determine N indexes corresponding to the N groups of coefficients, each of the indexes including a mapping relationship between each group of coefficients in the N groups of coefficients and a cluster center corresponding to the each group of coefficients;

[0015] Perform entropy coding on the index and the codebook to obtain the first coded bitstream, wherein the codebook is the N groups of cluster centers.

[0016] Optionally, the using the N groups of cluster centers to encode the N groups of coefficients respectively to obtain a first encoded bitstream includes:

[0017] Obtain codebooks and indexes corresponding to the N groups of cluster centers respectively;

[0018] The codebook and the index are entropy encoded in a graphics processing unit (GPU) to obtain the first encoded bitstream.

[0019] Optionally, the method further comprises:

[0020] Acquire spatial attribute data of the target point cloud;

[0021] Using a space filling curve algorithm to sort the spatial attribute data to obtain a target sequence;

[0022] Residual coding is performed on the target sequence to obtain a second coded bit stream.

[0023] In a second aspect, an embodiment of the present application provides an encoding device, the device comprising:

[0024] A first acquisition module is used to acquire coefficients of a spherical harmonic function of a target point cloud, wherein the coefficients are used to represent a color attribute of the target point cloud;

[0025] A division module, configured to divide the coefficients of the spherical harmonic function into N groups of coefficients according to the orders of the coefficients of the spherical harmonic function, wherein the N groups of coefficients include a first group of coefficients and a second group of coefficients, the order of the first group of coefficients is less than the order of the second group of coefficients, and N is an integer greater than 1;

[0026] A clustering module, used for performing clustering processing on the N groups of coefficients respectively to obtain N groups of cluster centers; wherein the number of the second group of cluster centers is less than the number of the first group of cluster centers;

[0027] The first encoding module is used to encode the N groups of coefficients respectively using the N groups of cluster centers to obtain a first encoding code stream.

[0028] Optionally, N is 2, and the coefficients of the spherical harmonics are divided into the first group of coefficients and the second group of coefficients;

[0029] The first group of coefficients is a group in which the DC component of the coefficients of the spherical harmonics is located, and the second group of coefficients is a group that does not include the DC component of the coefficients of the spherical harmonics.

[0030] Optionally, the first encoding module includes:

[0031] A determination submodule, used to determine N indexes corresponding to the N groups of coefficients, each of the indexes including a mapping relationship between each group of coefficients in the N groups of coefficients and a cluster center corresponding to the each group of coefficients;

[0032] The first encoding submodule is used to perform entropy encoding on the index and the codebook to obtain the first encoding code stream, wherein the codebook is the N groups of cluster centers.

[0033] Optionally, the first encoding module includes:

[0034] An acquisition submodule, used to respectively acquire codebooks and indexes corresponding to the N groups of cluster centers;

[0035] The second encoding submodule is used to perform entropy encoding on the codebook and the index in a graphics processing unit (GPU) to obtain the first encoding bit stream.

[0036] Optionally, the device further comprises:

[0037] A second acquisition module is used to acquire spatial attribute data of the target point cloud;

[0038] A sorting module, used to sort the spatial attribute data using a space filling curve algorithm to obtain a target sequence;

[0039] The second encoding module is used to perform residual encoding on the target sequence to obtain a second encoding code stream.

[0040] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a memory, and a program stored in the memory and executable on the processor, wherein the program implements the steps of the encoding method described in the first aspect when executed by the processor.

[0041] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the encoding method described in the first aspect are implemented.

[0042] In a fifth aspect, a computer program product is provided, comprising computer instructions, which, when executed by a processor, implement the steps of the encoding method as described in the first aspect.

[0043] In an embodiment of the present application, the coefficients of the spherical harmonic functions of the target point cloud are grouped according to the orders of the spherical harmonic function coefficients, and the number of cluster centers of at least one group of coefficients is reduced. Thus, since the number of cluster centers of at least one group of coefficients is reduced, fewer cluster centers are used to encode the coefficients of the corresponding group, and less data storage space is required, thereby reducing the data storage space of the target point cloud. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0045] Figure 1 This is one of the flowcharts of an encoding method provided in an embodiment of the present application;

[0046] Figure 2 It is a rendering schematic diagram of a 3DGS provided in an embodiment of the present application;

[0047] Figure 3 This is the second flowchart of an encoding method provided in an embodiment of the present application;

[0048] Figure 4 This is the third flowchart of an encoding method provided in an embodiment of the present application;

[0049] Figure 5 This is a fourth flowchart of an encoding method provided in an embodiment of the present application;

[0050] Figure 6 is a schematic diagram of the structure of an encoding device provided in an embodiment of the present application;

[0051] Figure 7 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0052] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0053] The embodiments of the present application provide a coding method, device and electronic device to solve the problem of large storage space consumption in 3DGS technology.

[0054] See also Figure 1 , Figure 1 is a flowchart of an encoding method provided in an embodiment of the present application, such as Figure 1 As shown, the method comprises the following steps:

[0055] Step 101: Obtain coefficients of spherical harmonic functions of a target point cloud, where the coefficients are used to represent color attributes of the target point cloud;

[0056] Step 102: Divide the coefficients of the spherical harmonic function into N groups of coefficients according to the orders of the coefficients of the spherical harmonic function, wherein the N groups of coefficients include a first group of coefficients and a second group of coefficients, the order of the first group of coefficients is smaller than the order of the second group of coefficients, and N is an integer greater than 1;

[0057] Step 103: clustering the N groups of coefficients respectively to obtain N groups of cluster centers; wherein the number of the second group of cluster centers is less than the number of the first group of cluster centers;

[0058] Step 104: Encode the N groups of coefficients respectively using the N groups of cluster centers to obtain a first encoded bit stream.

[0059] like Figure 2 As shown in the figure, it is a schematic diagram of 3DGS rendering. The left side is the screen space, that is, the image that can be seen by the display, and the right side is the world space, that is, the space where the 3D Gaussian sphere is located. The rendering process of 3DGS can be understood as the process of projecting a 3D ellipsoid onto a 2D plane.

[0060] 3DGS data is point cloud data with attributes. The color rendered by 3DGS is represented by the coefficients of spherical harmonics, which occupy a large amount of storage space. Combined with other attribute data, each Gaussian requires 59 32-bit floating-point numbers to represent it, resulting in a huge data demand, often exceeding several GB, which poses a great challenge in storage and transmission.

[0061] Related technologies usually ignore the need for real-time rendering when compressing point cloud data. This means that while compressing data, the decoding speed is not optimized, resulting in the inability to meet the rendering speed requirements in practical applications, especially on mobile devices. In order to reduce the amount of data storage while taking into account the rendering speed requirements on mobile devices, the present invention encodes the coefficients of the spherical harmonics corresponding to the target point cloud according to different orders.

[0062] In step 101, the target point cloud is the point cloud to be encoded, and the target point cloud includes multiple points. The color attribute of each point is represented by the coefficient of the spherical harmonic function. Encoding the coefficient of the spherical harmonic function can achieve data compression. According to the spherical harmonic function expression:

[0063] ;

[0064] in, are called spherical harmonics of l and m, i is the imaginary unit, is the companion Legendre polynomial. According to the parameter l in the formula, the coefficients of the spherical harmonic function can be divided into different orders, for example, l=0 is the 0th order, l=1 is the 1st order, and l=2 is the 2nd order.

[0065] In step 102, the coefficients of the spherical harmonics are divided into N groups of coefficients according to the order of the coefficients of the spherical harmonics, where N is an integer greater than 1, that is, the coefficients of the spherical harmonics are divided into at least two groups. For example, the target point cloud includes 1 million points, each point includes 16 coefficients, and the coefficients of the spherical harmonics are divided into two groups of high order and low order according to the order of the coefficients, or the coefficients of the spherical harmonics are divided into three groups according to the division of high order, low order and zero order.

[0066] In step 103, since each group of coefficients has a different effect on visual quality, the coefficients are divided into N groups according to the size of the visual effect, and the N groups of coefficients are clustered to obtain N groups of cluster centers, wherein each group of cluster centers includes multiple cluster centers. Specifically, the coefficients of each group of spherical harmonic functions can be clustered separately using a K-means clustering algorithm or other clustering algorithms. Among them, different clustering parameters are used for coefficients of different groups. Among the N groups of cluster centers, the number of cluster centers in the first group is the largest, that is, more than the number of cluster centers in other groups (the second group, the third group, etc.). This is because the first group of spherical harmonic coefficients contributes the most to the final rendering effect, and more bits need to be allocated, while the contribution of the spherical harmonic coefficients of other groups to the final rendering effect is far less than that of the first group, so fewer bits need to be allocated. Finally, the storage overhead and memory consumption can be significantly reduced without significantly reducing the visual quality, thereby significantly improving the rendering frame rate.

[0067] Among them, in addition to the first group of coefficients and the second group of coefficients, the N groups of coefficients may also include a third group of coefficients and a fourth group of coefficients. For example, in order from small to large, they are the first group, the second group, the third group, and the fourth group. Among the above multiple groups of coefficients, when clustering, the smaller the coefficient order, the more cluster centers the group corresponds to. For ease of understanding, taking the first group of coefficients and the second group of coefficients in the N groups of coefficients as an example, the order of the first group of coefficients is smaller than the order of the second group of coefficients. When clustering, the number of cluster centers in the first group is greater than the number of cluster centers in the second group.

[0068] It should be noted that the first group and the second group are only for the convenience of description and do not limit the specific groups of the coefficients. For example, when the spherical harmonic coefficients are divided into four groups A, B, C, and D in order from small to large orders, the first group and the second group can correspond to group A and group B respectively, the first group and the second group can also correspond to group B and group C respectively, and the first group and the second group can also correspond to group B and group D respectively.

[0069] For ease of understanding, the following example illustrates the grouping of the coefficients of spherical harmonics according to order. The coefficients of spherical harmonics include four orders: 0, 1, 2, and 3. When divided into two groups, the group with order 0 can be divided into the first group, and the groups with orders 1, 2, and 3 can be divided into the second group, or the groups with orders 0 and 1 can be divided into the first group, and the groups with orders 2 and 3 can be divided into the second group. When divided into three groups, the group with order 0 can be the first group, the groups with orders 1 and 2 can be the second group, and the group with order 3 can be the third group; or the groups with orders 0 and 1 can be the first group, the group with order 2 can be the second group, and the group with order 3 can be the third group.

[0070] In step 104, for N groups of cluster centers, each group of cluster centers is encoded separately. For example, the first group of cluster centers is used to encode the first group of coefficients; the second group of cluster centers is used to encode the second group of coefficients, and so on. The codebook sizes of cluster centers of different orders are different. The codebook size of the high-order cluster center is smaller than the codebook size of the low-order cluster center, and the number of cluster centers of the second group of coefficients is small, which can reduce the storage amount of the target point cloud data. For ease of understanding, take the example of dividing the coefficients of the spherical harmonic function into the first group of coefficients and the second group of coefficients.

[0071] The codebook of the first group of cluster centers is smaller than the codebook of the second group of cluster centers, while the number of the first group of cluster centers is greater than the number of the second group of cluster centers, so that the data storage volume of the second group of coefficients is reduced to reduce the storage volume of the target point cloud; while the number of the first group of cluster centers is larger, which can improve the data representation efficiency and improve the visual effect of the point cloud.

[0072] For example, the target point cloud includes 1 million points, and the color attribute of each point is represented by a vector of length 16, where the coefficients corresponding to the first 4 vectors are low-order and the coefficients corresponding to the last 12 vectors are high-order. The spherical harmonic function coefficients of the target point cloud are divided into two groups according to high order and low order, and the two groups of coefficients of high-order and low-order spherical harmonic functions are clustered respectively. Among them, among the clustered coefficients, the coefficients of the low-order spherical harmonic function contain 1000 cluster centers, and the coefficients of the high-order spherical harmonic function contain 100 cluster centers. Since the data volume of the cluster centers of the low-order coefficients is greater than the data volume of the cluster centers of the high-order coefficients, the fidelity of the coefficients of the low-order spherical harmonic function is higher than the fidelity of the coefficients of the high-order spherical harmonic function.

[0073] Thus, when data transmission is encoded, the codebook size of the cluster center of the low-order coefficient is 1000×4, and the codebook size of the cluster center of the high-order coefficient is 100×12. Since the coefficients of the low-order spherical harmonics are more important than the coefficients of the high-order spherical harmonics, the codebook size of the low-order coefficients is larger than the codebook size of the high-order coefficients. Therefore, the high-order spherical harmonics coefficients and the low-order spherical harmonics coefficients are grouped, so that more bit data is allocated to the more important grouping to improve data representation efficiency; and less bit data is allocated to the less important grouping, which can reduce the amount of data storage, thereby reducing the network transmission bandwidth.

[0074] After clustering is completed, for each point, a mapping relationship is established between the coefficient and the corresponding cluster center. In order to reduce data storage, the cluster centers can be numbered. Further, for each point, a corresponding relationship can be established between the coefficient of the point and the number of the corresponding cluster center as the index of the group of coefficients of each point, and the cluster center is used as a codebook, and entropy coding is further performed according to the index and the codebook to obtain the first coded bit stream.

[0075] Since the coefficients of low-order spherical harmonics are more important than those of high-order spherical harmonics, the high-order spherical harmonics and low-order spherical harmonics are encoded separately, so that more bits are allocated to the low-order spherical harmonics, thereby improving the overall compression efficiency. In this way, the color characteristics of the point cloud are maintained while compressing, ensuring that the compressed point cloud can still express the image efficiently.

[0076] In the embodiment of the present application, the coefficients of the spherical harmonics of the target point cloud are grouped according to the order of the coefficients of the spherical harmonics, and the number of cluster centers of at least one group of coefficients is reduced. Thus, since the number of cluster centers of at least one group of coefficients is reduced, the coefficients of the corresponding group are encoded using fewer cluster centers, and the required data storage space will be less, thereby reducing the data storage space of the target point cloud. A compression ratio of up to 30 times was successfully achieved without significantly reducing the visual quality. The rendering frame rate was significantly improved, which was about 30FPS higher than the original 3DGS, which not only reduced the memory overhead, but also reduced the energy consumption of the system chip device.

[0077] Optionally, N is 2, and the coefficients of the spherical harmonics are divided into the first group of coefficients and the second group of coefficients;

[0078] The first group of coefficients is a group in which the DC component of the coefficients of the spherical harmonics is located, and the second group of coefficients is a group that does not include the DC component of the coefficients of the spherical harmonics.

[0079] In this implementation, the spherical harmonic function coefficients of the target point cloud are divided into two groups: the group containing the direct current component of the coefficients of the spherical harmonic function is the first group, and the group not containing the direct current component of the coefficients of the spherical harmonic function is the second group.

[0080] It should be noted that the first group may include only the DC component of the coefficients of the spherical harmonics, or may include both the DC component of the coefficients of the spherical harmonics and other coefficients.

[0081] For example, the coefficients of the spherical harmonics include four orders: 0, 1, 2, and 3. The coefficient order 0 corresponds to the DC component of the coefficients of the spherical harmonics. When divided into two groups, the group with order 0 (the group where the DC component of the coefficients of the spherical harmonics is located) can be divided into the first group, and the groups with orders 1, 2, and 3 can be divided into the second group, or the groups with orders 0 (the group where the DC component of the coefficients of the spherical harmonics is located) and 1 can be divided into the first group, and the groups with orders 2 and 3 can be divided into the second group.

[0082] According to the order of the spherical harmonic coefficients, the spherical harmonic coefficients are divided into two groups, and the two groups are encoded respectively, so that the number of cluster centers can be determined according to actual needs. When the storage space needs to be reduced, fewer cluster centers are allocated to the group of spherical harmonic coefficients that contribute less to the final rendering effect; when the rendering effect needs to be improved, more cluster centers are allocated to the group of spherical harmonic coefficients that contribute more to the final rendering effect; it is also possible to allocate less data to the group of spherical harmonic coefficients that contribute less, and allocate more data to the group of spherical harmonic coefficients that contribute more, which can significantly improve the rendering frame rate without significantly reducing the visual quality, reduce memory overhead, and reduce the above-mentioned energy consumption of the system chip device.

[0083] Optionally, the using the N groups of cluster centers to encode the N groups of coefficients respectively to obtain a first encoded bitstream includes:

[0084] Determine N indexes corresponding to the N groups of coefficients, each of the indexes including a mapping relationship between each group of coefficients in the N groups of coefficients and a cluster center corresponding to the each group of coefficients;

[0085] Perform entropy coding on the index and the codebook to obtain the first coded bitstream, wherein the codebook is the N groups of cluster centers.

[0086] The spherical harmonic function coefficients are divided into N groups, and accordingly, the cluster centers include N groups. For each point cloud in the target point cloud, the N groups of coefficients are used to determine N corresponding indexes, and each index includes a mapping relationship between the group of coefficients and the corresponding cluster center.

[0087] For example, the target point cloud includes 1 million points, each point includes 16 coefficients, and the 16 coefficients are divided into 2 groups according to high order and low order, the first group includes 4 coefficients, and the second group includes 12 coefficients. For each point, the first group of 4 coefficients corresponds to an index, which includes the mapping relationship between the 4 coefficients and the corresponding cluster centers, and the second group of 12 coefficients corresponds to an index, which includes the mapping relationship between the 12 coefficients and the corresponding cluster centers.

[0088] The N groups of cluster centers include cluster centers of high-order coefficients and cluster centers of low-order coefficients. The codebook size of a single low-order coefficient is larger than the codebook size of a single high-order coefficient. For example, when the number of cluster centers of low-order coefficients is 1000 and the number of cluster centers of high-order coefficients is 100, the codebook size of the cluster centers of low-order coefficients is 1000×4, and the codebook size of the cluster centers of high-order coefficients is 100×12. The coefficients of low-order spherical harmonics are more important than those of high-order spherical harmonics. Therefore, more bit data is allocated to more important low-order coefficients to improve data representation efficiency; and less bit data is allocated to less important groups to reduce data storage capacity.

[0089] After obtaining the index and the codebook, the index and the codebook are further entropy encoded as the input symbol set to be encoded to obtain the first encoded code stream. In this way, during decoding, the attribute data of the cluster center can be quickly obtained according to the index and the codebook.

[0090] Optionally, the using the N groups of cluster centers to encode the N groups of coefficients respectively to obtain a first encoded bitstream includes:

[0091] Obtain codebooks and indexes corresponding to the N groups of cluster centers respectively;

[0092] The codebook and the index are entropy encoded in a graphics processing unit (GPU) to obtain the first encoded bitstream.

[0093] After obtaining the codebooks and indexes of N groups of cluster centers, the codebooks and indexes are entropy encoded using an asymmetric numerical system (ANS), and the quantized results are entropy decoded in the GPU.

[0094] Specifically, for the input symbol set to be encoded , Represents the symbol, A function representing the number of occurrences of a statistical symbol, is the sum of the number of occurrences of all symbols, calculated as:

[0095] ,

[0096] use Represents the probability of any symbol appearing, and the calculation formula is ; In the symbol and status As a canonical case for the encoding of all previous symbols in the stream, ANS provides a representation as The entropy coding method is as follows: ;

[0097] and a representation The entropy decoding method is as follows: ,in means round down, mod means modulus operation, , , M represents the lookup table function, expressed as .

[0098] Traditional compression methods are usually completed on the central processing unit (CPU), and a large amount of data transmission between the CPU and GPU is required during decoding. This method leads to bandwidth bottlenecks and limits on rendering speed. Moreover, 3DGS point cloud compression technology usually focuses on how to optimize storage and bandwidth. On system-on-chip (SoC) devices, such as smartphones and virtual reality (VR) headsets, this uncompressed 3DGS point cloud will generate high heat when being transmitted and used, affecting the performance and service life of the device, and causing the frame rate of the rendering result to drop, limiting its practical application on these devices. However, related technologies do not fully consider the energy efficiency and heat issues on system-on-chip (SoC) devices. When memory bandwidth is limited, high video memory usage will lead to a significant drop in rendering frame rate.

[0099] In this embodiment, the codebook and the index are entropy encoded in the graphics processor to obtain the first encoded code stream, which can fully utilize the parallel computing capability of the graphics processor for encoding. After receiving the file, the SoC device can decode the received code stream in the GPU. In this way, the bandwidth requirement between the CPU and the GPU is reduced, thereby increasing the rendering speed and reducing the heat generation.

[0100] Optionally, the method further comprises:

[0101] Acquiring spatial attribute data of the target point cloud;

[0102] Using a space filling curve algorithm to sort the spatial attribute data to obtain a target sequence;

[0103] Residual coding is performed on the target sequence to obtain a second coded bit stream.

[0104] Since the geometric attribute data of the target point cloud also occupies a large amount of storage space, after finding the adjacent point cloud geometric attribute data based on the similar features of the adjacent point cloud geometric attribute data, further encoding and compression can reduce the storage space of the point cloud geometric attribute data.

[0105] First, the spatial attribute data of the target point cloud is obtained. Taking k point cloud geometric attribute data as an example, the k point cloud geometric attribute data are sorted using a space filling curve algorithm. For example, the point cloud geometric attribute data are sorted using a Z-order algorithm or a Hilbert curve method to obtain an ordered point cloud geometric attribute point set. , which is the target sequence. After sorting the point cloud geometric attribute data, the adjacent set attribute data in space can be sorted together. This can be quantified using the following formula: ;

[0106] According to the above formula, the point cloud geometric attribute data is normalized and quantized, converted from float to int, and the quantized point cloud geometric attribute point set is obtained. ,in, Indicates the minimum value of point cloud geometric attribute data, Indicates the maximum value in the point cloud geometric attribute data. It is represented as a round-down operation, q represents the quantization depth, is the quantized point cloud geometric attribute point.

[0107] For the quantized point cloud geometric attribute point set , and then perform residual coding to obtain the residual set , where the residual coding formula is:

[0108] ,

[0109] Among them, Concat represents a connection operation.

[0110] In the process of residual coding, the difference between the geometric attributes of adjacent point clouds is obtained to obtain a residual set, and the residual set is used as an input symbol set to be encoded for entropy coding to obtain a second encoded code stream.

[0111] Since adjacent point cloud geometric attribute data have similar values, the adjacent point cloud geometric attribute data are encoded by residual coding, and the difference between adjacent point cloud geometric attributes is stored to obtain a residual set, which further reduces the amount of data stored in the point cloud geometric attribute data, thereby achieving more efficient compression. While not affecting the rendering quality after compression, it can also minimize the amount of data.

[0112] See also Figure 3 The encoding method of the target point cloud includes a group encoding method for point cloud color attribute data and a point cloud space attribute data encoding method. After the input symbol set to be encoded is obtained by the above encoding method, entropy encoding is further completed in the GPU. Similarly, after decoding by the group decoding method for point cloud color attribute data and the decoding method for point cloud space attribute data, entropy decoding is performed in the GPU. Among them, the group encoding method for point cloud color attribute data can be referred to Figure 4 As shown, the following steps are included:

[0113] The coefficients of the spherical harmonic functions of the target point cloud are grouped to obtain multiple groups of data;

[0114] The K-means algorithm is used to cluster the data obtained after grouping, among which the number of cluster centers of the group where the coefficients of the low-order spherical harmonic function are located is the largest;

[0115] The coefficients of each group of spherical harmonic functions are encoded using the nearest cluster center according to the clustering result to obtain the encoded bitstream.

[0116] The decoding method of cloud space attribute data can be found in Figure 5 As shown, the following steps are included:

[0117] Get the point cloud spatial attribute data and sort it using the Z-order algorithm;

[0118] Quantify the spatial attribute data of the point cloud obtained after sorting;

[0119] The quantized spatial attribute data is residually encoded to obtain an encoded bit stream.

[0120] It should be noted that the above two decoding methods are only a specific implementation method, and other implementation methods may be used in addition to the above example implementation methods.

[0121] See also Figure 6 , Figure 6 is a schematic diagram of the structure of an encoding device provided in an embodiment of the present application, such as Figure 6 As shown, the encoding device 600 includes:

[0122] A first acquisition module 601 is used to acquire coefficients of spherical harmonic functions of a target point cloud, where the coefficients are used to represent color attributes of the target point cloud;

[0123] A division module 602 is used to divide the coefficients of the spherical harmonic function into N groups of coefficients according to the orders of the coefficients of the spherical harmonic function, wherein the N groups of coefficients include a first group of coefficients and a second group of coefficients, the order of the first group of coefficients is smaller than the order of the second group of coefficients, and N is an integer greater than 1;

[0124] A clustering module 603 is used to perform clustering processing on the N groups of coefficients respectively to obtain N groups of cluster centers; wherein the number of the second group of cluster centers is less than the number of the first group of cluster centers;

[0125] The first encoding module 604 is used to encode the N groups of coefficients respectively using the N groups of cluster centers to obtain a first encoding code stream.

[0126] Optionally, N is 2, and the coefficients of the spherical harmonics are divided into the first group of coefficients and the second group of coefficients;

[0127] The first group of coefficients is a group in which the DC component of the coefficients of the spherical harmonics is located, and the second group of coefficients is a group that does not include the DC component of the coefficients of the spherical harmonics.

[0128] Optionally, the first encoding module includes:

[0129] A determination submodule, used to determine N indexes corresponding to the N groups of coefficients, each of the indexes including a mapping relationship between each group of coefficients in the N groups of coefficients and a cluster center corresponding to the each group of coefficients;

[0130] The first encoding submodule is used to perform entropy encoding on the index and the codebook to obtain the first encoding code stream, wherein the codebook is the N groups of cluster centers.

[0131] Optionally, the first encoding module includes:

[0132] An acquisition submodule, used to respectively acquire codebooks and indexes corresponding to the N groups of cluster centers;

[0133] The second encoding submodule is used to perform entropy encoding on the codebook and the index in a graphics processing unit (GPU) to obtain the first encoding bit stream.

[0134] Optionally, the device further comprises:

[0135] A second acquisition module is used to acquire spatial attribute data of the target point cloud;

[0136] A sorting module, used to sort the spatial attribute data using a space filling curve algorithm to obtain a target sequence;

[0137] The second encoding module is used to perform residual encoding on the target sequence to obtain a second encoding code stream.

[0138] The encoding device can achieve Figure 1 The various processes implemented in the method embodiment can achieve the same technical effect, and to avoid repetition, they will not be described again here.

[0139] like Figure 7 As shown, an embodiment of the present application also provides an electronic device 700, including: a processor 701, a memory 702, and a program stored in the memory 702 and executable on the processor 701. When the program is executed by the processor 701, each process of the above-mentioned encoding method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0140] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above-mentioned encoding method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0141] The present application also provides a computer program product, including computer instructions, which, when executed by a processor, implement the above Figure 1 The various processes of the method embodiment shown can achieve the same technical effect, and will not be described again here to avoid repetition.

[0142] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0143] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0144] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A coding method, characterized in that: include: Acquire coefficients of the spherical harmonic function of the target point cloud, where the coefficients are used to represent the color attributes of the target point cloud; According to the order of the coefficients of the spherical harmonic function, the coefficients of the spherical harmonic function are divided into N groups of coefficients, wherein the N groups of coefficients include a first group of coefficients and a second group of coefficients, the order of the first group of coefficients is less than the order of the second group of coefficients, and N is an integer greater than 1; Performing clustering processing on the N groups of coefficients respectively to obtain N groups of cluster centers; wherein the number of the second group of cluster centers in the N groups of cluster centers is less than the number of the first group of cluster centers; Encoding the N groups of coefficients respectively using the N groups of cluster centers to obtain a first encoded bit stream; The N is 2, and the coefficients of the spherical harmonics are divided into the first group of coefficients and the second group of coefficients; The first group of coefficients is a group in which the DC component of the coefficients of the spherical harmonics is located, and the second group of coefficients is a group that does not include the DC component of the coefficients of the spherical harmonics; The method of encoding the N groups of coefficients respectively by using the N groups of cluster centers to obtain a first encoded bit stream includes: Determine N indexes corresponding to the N groups of coefficients, each of the indexes including a mapping relationship between each group of coefficients in the N groups of coefficients and a cluster center corresponding to the each group of coefficients; perform entropy coding on the indexes and a codebook to obtain the first coded bitstream, wherein the codebook is the N groups of cluster centers; or, The method of encoding the N groups of coefficients respectively by using the N groups of cluster centers to obtain a first encoded bit stream includes: The codebooks and indexes corresponding to the N groups of cluster centers are respectively obtained; and the codebooks and the indexes are entropy encoded in a graphics processor (GPU) to obtain the first encoded bitstream.

2. The method according to claim 1, characterized in that The method further comprises: Acquire spatial attribute data of the target point cloud; Using a space filling curve algorithm to sort the spatial attribute data to obtain a target sequence; Residual coding is performed on the target sequence to obtain a second coded bit stream.

3. A coding device, characterized in that: include: A first acquisition module is used to acquire coefficients of a spherical harmonic function of a target point cloud, wherein the coefficients are used to represent a color attribute of the target point cloud; A division module, configured to divide the coefficients of the spherical harmonic function into N groups of coefficients according to the orders of the coefficients of the spherical harmonic function, wherein the N groups of coefficients include a first group of coefficients and a second group of coefficients, the order of the first group of coefficients is less than the order of the second group of coefficients, and N is an integer greater than 1; A clustering module, used for performing clustering processing on the N groups of coefficients respectively to obtain N groups of cluster centers; wherein the number of the second group of cluster centers in the N groups of cluster centers is less than the number of the first group of cluster centers; A first encoding module, used to encode the N groups of coefficients respectively using the N groups of cluster centers to obtain a first encoding code stream; The N is 2, and the coefficients of the spherical harmonics are divided into the first group of coefficients and the second group of coefficients; The first group of coefficients is a group in which the DC component of the coefficients of the spherical harmonics is located, and the second group of coefficients is a group that does not include the DC component of the coefficients of the spherical harmonics; The first encoding module includes: a determination submodule, used to determine N indexes corresponding to the N groups of coefficients, each of the indexes including a mapping relationship between each group of coefficients in the N groups of coefficients and a cluster center corresponding to each group of coefficients; a first encoding submodule, used to perform entropy encoding on the indexes and a codebook to obtain the first encoding bitstream, wherein the codebook is the N groups of cluster centers; or, The first encoding module includes: an acquisition submodule, used to respectively acquire the codebook and index corresponding to the N groups of cluster centers; a second encoding submodule, used to perform entropy encoding on the codebook and the index in a graphics processor GPU to obtain the first encoding bitstream.

4. The device according to claim 3, characterized in that The device also includes: A second acquisition module is used to acquire spatial attribute data of the target point cloud; A sorting module, used to sort the spatial attribute data using a space filling curve algorithm to obtain a target sequence; The second encoding module is used to perform residual encoding on the target sequence to obtain a second encoding code stream.

5. An electronic device, characterized in that: include: A processor, a memory, and a program stored in the memory and executable on the processor, wherein the program implements the steps of the encoding method according to claim 1 or 2 when executed by the processor.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the encoding method according to claim 1 or 2 are implemented.

7. A computer program product, characterized in that The method comprises computer instructions, which, when executed by a processor, implement the steps of the encoding method as claimed in claim 1 or 2.