Three-dimensional point cloud geometric information coding compression method based on automatic encoder
The three-dimensional point cloud geometric information encoding and compression method based on autoencoder solves the problems of complex structure and long training time in the existing technology, achieves efficient point cloud encoding and reconstruction quality improvement, and is suitable for various types of point clouds. data.
Patent Information
- Application Number
- CN202410921240.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-10
- Publication Date
- 2024-10-22
AI Technical Summary
Existing 3D point cloud encoding and compression methods usually have complex structures, long training times, and are difficult to handle multiple types of point clouds. Moreover, traditional methods suffer from insufficient reconstruction quality under high compression efficiency.
A three-dimensional point cloud geometric information encoding and compression method based on autoencoders is used. By dividing the bounding box of the point cloud, subcubes are obtained and encoded and quantized. Multi-layer autoencoders are used for dimensionality reduction compression, and at the decoding end Stepwise reconstruction of point clouds.
It achieves high reconstruction quality under high compression efficiency, simplifies the structure, shortens the training time, and improves the coding accuracy and compression effect.
Smart Images

Figure CN118828016A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of three-dimensional vision and relates to a three-dimensional point cloud geometric information encoding and compression method based on an automatic encoder. Background Art
[0002] With the gradual development of science and technology, people are no longer satisfied with perceiving the three-dimensional world through two-dimensional pictures or videos. As a result, point clouds that can directly depict three-dimensional scenes have become increasingly popular, and have been widely used in many fields such as AR / VR, autonomous driving, cultural relics scanning and protection, and immersive communications. However, due to the improvement of the accuracy of point cloud acquisition equipment, high-precision point clouds often have a very large amount of data. Its huge amount of data usually exceeds the storage capacity and transmission bandwidth of current equipment. Therefore, before processing the point cloud, it is necessary to encode and compress it to reduce the computing pressure of the equipment. Moreover, due to the sparsity and disorder of point clouds in space, traditional two-dimensional image / video encoding methods are difficult to be directly applied to three-dimensional point clouds. Therefore, new encoding and compression methods specifically for point clouds have broad application prospects.
[0003] In recent years, there have been a lot of research foundations on point cloud geometric coding at home and abroad. In traditional compression methods, such as the PCL compression framework proposed by the Point Cloud Library (PCL) and the G-PCC compression framework proposed by the Moving Picture Expert Group (MPEG), they first use a specific structure, such as the octree, to divide the original point cloud for representation, and then complete the encoding of the point cloud according to the node relationship after division. In addition, many geometric coding methods based on deep learning have been proposed. They often use special network structures to further process the divided point cloud, or use structures similar to multi-layer perceptrons to directly process the original point cloud. These point cloud compression methods have achieved certain results.
[0004] However, traditional compression methods are often only targeted at specific point cloud forms, and deep learning-based algorithms are often complex in structure and require a lot of training time to achieve relatively good results. Therefore, it is very necessary to study a geometric coding method with a relatively simple structure that can handle multiple types of point clouds and maintain high reconstruction quality under high compression efficiency. Summary of the invention
[0005] The purpose of the present invention is to propose a three-dimensional point cloud geometric information encoding and compression method based on an autoencoder for the geometric information of a static three-dimensional point cloud. The autoencoder relied on has a relatively simple structure and can maintain good reconstruction quality under high compression efficiency. The method comprises: 1) dividing the boundary box of the three-dimensional point cloud to obtain a plurality of sub-cubes and encode them; at the same time, quantizing the relative coordinates of each point in the sub-cube to record the position details of each point; 3) inputting the preliminary encoded code stream into a multi-layer autoencoder encoding structure for dimensionality reduction to complete compression; 4) at the decoding end, each sub-cube will be restored first, and then each point will be reconstructed in the cube one by one according to the relative position of each point obtained by decoding.
[0006] In order to achieve the above purpose, the following technical solutions are adopted:
[0007] A three-dimensional point cloud geometric information encoding and compression method based on an automatic encoder comprises the following steps:
[0008] Step 1: Calculate the bounding box of the input point cloud and then divide the bounding box into sub-cubes;
[0009] Step 2: Detect the sub-cubes one by one. If there is a point inside the sub-cube, encode the sub-cube and the number of points inside the sub-cube to obtain a cube encoding stream.
[0010] Step 3: For the sub-cube containing points inside, the relative coordinates of the points inside the corresponding sub-cube are quantized and encoded to obtain the quantized encoding bit stream of the internal points;
[0011] Step 4: Set the input dimension of the autoencoder, concatenate the cube encoding code stream and the internal point quantization encoding code stream together to obtain a long integer sequence; then split the long integer sequence into several short sequences of equal length;
[0012] Step 5: Input several short sequences of equal length into a multi-layer coding structure for dimensionality reduction compression to obtain a compressed array;
[0013] Step 6: Convert the compressed array into byte form, compress it again and save the compressed result as a binary file;
[0014] Step 7: Read the binary file and convert it into byte form, and restore it into multiple short sequences of equal length through a multi-layer encoding structure;
[0015] Step 8: Splice the short sequence back to the long sequence, split the long sequence, and obtain the code stream encoding the cube and the code stream encoding the relative position of the points;
[0016] Step 9: Starting from the minimum coordinate point of the bounding box, reconstruct all sub-cubes containing points one by one according to the code stream encoded by the cube; then, inside each sub-cube, restore each point one by one according to the code stream encoded by the number of points contained in the sub-cube and the relative position of the points, and finally complete the reconstruction of the entire point cloud.
[0017] The number of sub-cubes in step 1 is N*N*N, where N represents the segmentation scale; and the minimum value and the maximum value of the vertex coordinates of the bounding box are encoded and recorded.
[0018] The encoding described in step 2 is specifically:
[0019] Define the subcube closest to the smallest vertex of the bounding box as the origin (0,0,0);
[0020] For a sub-cube containing a point inside, the number of sub-cubes separated from the origin in the x, y, and z directions is n. x , n y , n z , and further encode the target cube as (n x ,n y ,n z ) and encode the number of points inside the sub-cube.
[0021] The quantization coding described in step 3 is specifically as follows: select the vertex of the minimum coordinate of the sub-cube as the origin, and calculate the vector from the origin to the point to be processed; then, first calculate the projection length of the vector in the x, y, and z directions, and then calculate the ratio of the projection length in each direction to the length of the length, width, and height of the sub-cube; finally, expand the obtained ratio by M times, quantize and round it to complete the coding.
[0022] The M is greater than or equal to 100.
[0023] The several segments mentioned in step 4 are recorded as K segments; K is equal to the length of the long integer sequence divided by the set input dimension of the autoencoder and rounded up. When the length of the long integer sequence cannot divide the input dimension of the autoencoder, random integers are added to the long integer sequence until the length of the long integer sequence can be divided by the input dimension of the autoencoder. The length of multiple short sequences is equal to the input dimension of the autoencoder.
[0024] The multi-layer encoding structure described in step 5 is composed of S automatic encoders connected in series; the S is greater than or equal to 2.
[0025] When step 5 is implemented, each autoencoder, including three fully connected layers, performs dimensionality reduction on the input sequence step by step;
[0026] The step 6 is compressed again, and when it is implemented, blosc is used;
[0027] When step 7 is specifically implemented, the saved binary file is read through the decoding end;
[0028] The bitstream of point relative position coding in step 8 corresponds to the internal point quantization coding bitstream generated in step 3;
[0029] The reconstructed point cloud in step 9 is the input point cloud in step 1.
[0030] The present invention belongs to the field of three-dimensional vision technology, and relates to a three-dimensional point cloud geometric information coding and compression method based on an autoencoder. The method comprises: dividing and encoding the input three-dimensional point cloud; quantizing and encoding the point information in the segmented sub-cubes; summarizing the code stream, using a multi-layer coding structure composed of an autoencoder to reduce the dimension for compression; converting the reduced-dimensional code stream into a byte form, using blosc for the final compression, and storing it in binary form; at the decoding end, first reading the storage file, and then decoding and restoring the cube encoding and point information encoding code stream; finally, first reconstructing the segmented cubes, and then adding each point in each cube to complete the decoding and reconstruction of the point cloud. The method has a relatively simple structure and a short training time. And it can still maintain a relatively high reconstruction quality at a high compression rate.
[0031] Beneficial Effects
[0032] Compared with the prior art, the three-dimensional point cloud geometric information encoding and compression method based on the automatic encoder has the following beneficial effects:
[0033] 1. The three-dimensional point cloud geometric information encoding and compression method based on the autoencoder first encodes the divided cube, and then encodes the relative positions of the points therein, thereby preserving the geometric information of the point cloud to the greatest extent; compared with the traditional compression method, the point cloud geometry quality obtained by decoding and reconstruction is higher;
[0034] 2. The autoencoder used in the three-dimensional point cloud geometric information coding and compression method based on the autoencoder only processes multiple short integer sequences; therefore, the training time of the autoencoder is short and a higher accuracy rate can be achieved;
[0035] 3. The algorithm of the three-dimensional point cloud geometric information coding compression method based on the autoencoder uses a multi-layer coding structure composed of two autoencoders to compress the long sequence. This structure can further eliminate the redundant information in the sequence, making the output result more compressed. And because the two autoencoders can achieve a high accuracy rate respectively, the sequence finally restored can also achieve a high accuracy rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 It is an overall flow chart of encoding and decoding of a three-dimensional point cloud geometric information encoding and compression method based on an automatic encoder of the present invention;
[0037] Figure 2 It is a schematic diagram of a multi-layer coding structure in a three-dimensional point cloud geometric information coding and compression method based on an automatic encoder of the present invention and a structural diagram of the automatic encoder used therein;
[0038] Figure 3 This is a visual comparison of the output results of this method and the traditional octree encoding method for the same input point cloud. DETAILED DESCRIPTION
[0039] The static three-dimensional point cloud geometric information encoding and compression method based on the automatic encoder of the present invention is further illustrated and described in detail below in conjunction with the accompanying drawings and embodiments.
[0040] In the experimental example, the compression efficiency of the algorithm is measured by the bit per point (BPP) after compression. Generally speaking, the smaller the BPP, the higher the compression degree of the point cloud. The reconstruction quality of the decoded point cloud is evaluated by calculating its C2C-PSNR relative to the original point cloud. This method needs to first calculate the point-to-point distance (C2C, Cloud to Cloud Distance) of the reconstructed point cloud, that is, the Euclidean distance between the points in the reconstructed point cloud and the corresponding points in the original point cloud. Then, calculate the root mean square error of the distance. Finally, the corresponding peak signal-to-noise ratio (PSNR, Peak Signal Noise Ratio) is calculated based on the root mean square error and the intrinsic resolution of the point cloud. Generally speaking, the larger the C2C-PSNR, the higher the geometric quality of the reconstructed point cloud.
[0041] Example 1
[0042] This embodiment describes the whole process of compressing the input point cloud into binary format for storage and reading the compressed file for decompression and reconstruction using the method of the present invention. The present invention belongs to the field of three-dimensional vision technology and relates to a three-dimensional point cloud geometric information encoding and compression method based on an autoencoder. The method comprises: calculating the bounding box of the input point cloud and dividing the bounding box into sub-cubes; encoding the cube coordinates and the number of internal points and the relative coordinates of the internal points of the cube respectively and then splicing them to obtain a long integer sequence and splitting them into several segments of shorter sequences and inputting them into a multi-layer coding structure for dimensionality reduction to obtain a compressed array; and then converting the array into bytes for storage. When decompressing, the storage file is read, restored to multiple segments of shorter sequences, spliced back to a long sequence, and then split and decoded to obtain the cube coordinates and the number of internal points and the relative coordinates of the internal points of the cube; finally, all cubes containing points and the number of points and the relative positions of the points in each cube are reconstructed one by one, that is, each point is restored one by one, and finally the input point cloud is reconstructed. The point cloud geometry quality obtained by decoding and reconstruction by the method is higher; the time required for training the autoencoder is shorter and a higher accuracy rate can be achieved.
[0043] like Figure 1 As shown, the three-dimensional point cloud geometric information encoding and compression method based on the automatic encoder of this embodiment specifically includes the following steps:
[0044] S10, draw the bounding box of the input point cloud, and then divide the bounding box into N*N*N sub-cubes according to the input scale N. At the same time, record the minimum and maximum coordinates of the 8 vertices of the bounding box. min and bound max .
[0045] S20, check the sub-cubes obtained by division one by one. If there are points in them, the cube will be encoded and the number of points n contained in it will be recorded. When encoding, the cube with the smallest coordinates will be regarded as the origin (0,0,0). Then, according to the number of cubes nx, ny, nz between the cube to be encoded and the origin in the three directions of x, y, and z, it will be encoded as (nx, ny, nz). Finally, the encoded stream S is obtained. block .
[0046] S30: further quantize and encode the points inside the encoded cube. The specific encoding method is as follows:
[0047]
[0048] In the above formula, is the result of quantization coding, [x, y, z] is the coordinate of the point to be coded, is the minimum coordinate of the vertex of the cube, x block ,y block ,z blockare the length, width and height of the cube, and round(·) is a rounding operation, which will output an integer closest to the input number. Finally, the encoded stream S is obtained point .
[0049] S40, S block and S point The two code streams are spliced together to generate a long sequence S 1 , whose dimension is 1*N 1 . 1 Perform dimension conversion and convert S 1 Split into m*N AE A short sequence set S 1 ′, where N AE The required input dimension of the autoencoder used. In general, 1*N 1 Cannot be converted exactly into m 1 *N AE , so we need to first 1 The tail splicing dimension is 1*len 1 A random integer sequence is then converted.
[0050] S50, the S obtained by conversion 1 'enter Figure 2 The multi-layer encoding structure shown in the figure performs dimensionality reduction for compression. The structure consists of two identical autoencoders: a pre-encoder and a post-encoder. The output of the pre-encoder is further compressed by the post-encoder.
[0051] The autoencoder used in this step is also Figure 2 As shown in . Its encoding end and decoding end each consist of three linear layers, namely: input layer, hidden layer and output layer. The input sequence will pass through the three layers one by one, and the dimension will be reduced step by step. In order to achieve a higher accuracy, the automatic encoder used in the present invention mainly reduces the sequence dimension from 600 to 100, and then increases from 100 to 600.
[0052] This step can be divided into the following two steps:
[0053] S51, take out S one by one 1 The dimension of ' is 1*N AE The short sequence is input to the encoding end of the front encoder for dimensionality reduction compression, and the output result is finally spliced into a dimension of 1*N 2 The long sequence S 2 . S 2 After that, it will undergo a dimensional transformation similar to S40 and be converted into a dimension of m 2 *N AE The short sequence set S 2′. In general, during this conversion process, a dimension of 1*len needs to be added 2 A sequence of random integers.
[0054] S52, take out S one by one 2 The dimension of ' is 1*N AE The short sequence is input to the encoder end of the encoder for dimensionality reduction compression, and finally the output result is spliced into a dimension of 1*N 3 The long sequence S 3 Since the post-encoder performs dimensionality reduction on floating-point sequences, while the pre-encoder performs dimensionality reduction on integer sequences, the two encoders have different training parameters although their dimension parameters are the same.
[0055] S60, S 3 Convert it into byte form, and then use the lossless compression method in the blosc library for final compression. Finally, store the compressed result in binary file form.
[0056] S70, when decompressing, first read the saved binary file, use blosc to decode, then convert it into byte form, and then input the multi-layer coding structure for decoding.
[0057] The decoding process in the multi-layer coding structure is similar to the encoding process in S50, but the order is exactly the opposite:
[0058] S71, decode blosc to get S 3 After input, the decoder of the encoder obtains S 2 ′. 2 'After converting to one dimension, subtract the dimension at the end to get 1*len 2 The sequence of S 2 Then, S 2 Convert to a dimensional form that can be processed by the decoder.
[0059] S72: Input the sequence obtained by S71 into the decoding end of the front encoder, and upgrade the dimension to obtain S 1 '. According to the dimension 1*len of the added sequence 1 , S 1 ' is converted to S 1 . At this point, the decoding of this stage is completed.
[0060] S80, Split S 1 , get S block and S point These two different encoding streams.
[0061] S90, with bound min and bound max For reference, according to S blockThen, according to the number of points in each cube, we can reconstruct each cube one by one. point The corresponding number of codes are taken out to reconstruct the points in the cube.
[0062] The method of the present invention and the traditional octree point cloud compression method are used to compress the same input point cloud, and the BPP and PSNR of the comparison results are shown in Table 1:
[0063] Table 1 Comparison of point cloud compression efficiency and reconstruction quality
[0064]
[0065]
[0066] Some input and output point clouds are as follows Figure 3 In this comparison, the input point clouds used are all sampled from the CAD models provided by the ModelNet dataset, and each point cloud contains 4096 points.
[0067] From Table 1, Figure 3 It can be seen from the comparison that compared with the traditional point cloud compression method, for the same input, the method of the present invention uses point detail information encoding and a multi-layer coding structure, and can achieve better reconstruction quality (PSNR) when the compression efficiency (BPP) is similar.
[0068] The above is only a preferred embodiment of the present invention, and the present invention should not be limited to the contents disclosed in the embodiment and the drawings. Any equivalent or modification completed without departing from the spirit disclosed in the present invention shall fall within the scope of protection of the present invention.
Claims
1. A 3D point cloud geometric information encoding and compression method based on autoencoder, It is characterized in that The steps include: Step 1: Calculate the bounding box of the input point cloud and then divide the bounding box into sub-cubes; Step 2: Detect the sub-cubes one by one. If there is a point inside the sub-cube, encode the sub-cube and the number of points inside the sub-cube to obtain a cube encoding stream. Step 3: For the sub-cube containing points inside, the relative coordinates of the points inside the corresponding sub-cube are quantized and encoded to obtain the quantized encoding bit stream of the internal points; Step 4: Set the input dimension of the autoencoder, concatenate the cube encoding code stream and the internal point quantization encoding code stream together to obtain a long integer sequence; then split the long integer sequence into several short sequences of equal length; Step 5: Input several short sequences of equal length into a multi-layer coding structure for dimensionality reduction compression to obtain a compressed array; Step 6: Convert the compressed array into byte form, compress it again and save the compressed result as a binary file; Step 7: Read the binary file and convert it into byte form, and restore it into multiple short sequences of equal length through a multi-layer encoding structure; Step 8: Splice the short sequence back to the long sequence, split the long sequence, and obtain the code stream encoding the cube and the code stream encoding the relative position of the points; Step 9: Starting from the minimum coordinate point of the bounding box, reconstruct all sub-cubes containing points one by one according to the code stream encoded by the cube; then, inside each sub-cube, restore each point one by one according to the code stream encoded by the number of points contained in the sub-cube and the relative position of the points, and finally complete the reconstruction of the entire point cloud.
2. The method for encoding and compressing three-dimensional point cloud geometric information based on an automatic encoder according to claim 1, It is characterized in that The number of sub-cubes in step 1 is N*N*N, where N represents the segmentation scale; and the minimum value and the maximum value of the vertex coordinates of the bounding box are encoded and recorded.
3. The method for encoding and compressing three-dimensional point cloud geometric information based on an automatic encoder according to claim 2, It is characterized in that The encoding described in step 2 is specifically: Define the subcube closest to the smallest vertex of the bounding box as the origin (0,0,0); For a sub-cube containing a point inside, the number of sub-cubes separated from the origin in the x, y, and z directions is n. x , n y , n z , and further encode the target cube as (n x ,n y ,n z ) and encode the number of points inside the sub-cube.
4. The method for encoding and compressing three-dimensional point cloud geometric information based on an automatic encoder according to claim 3, It is characterized in that The quantization coding described in step 3 is specifically as follows: select the vertex of the minimum coordinate of the sub-cube as the origin, and calculate the vector from the origin to the point to be processed; then, first calculate the projection length of the vector in the x, y, and z directions, and then calculate the ratio of the projection length in each direction to the length of the length, width, and height of the sub-cube; finally, expand the obtained ratio by M times, quantize and round it to complete the coding.
5. The method for encoding and compressing three-dimensional point cloud geometric information based on an automatic encoder according to claim 4, It is characterized in that The M is greater than or equal to 100.
6. The method for encoding and compressing three-dimensional point cloud geometric information based on an automatic encoder according to claim 1, It is characterized in that The several segments described in step 4 are denoted as K segments; K is equal to the length of the long integer sequence divided by the set input dimension of the automatic encoder and rounded up.
7. The method for encoding and compressing three-dimensional point cloud geometric information based on an automatic encoder according to claim 6, It is characterized in that When the length of the long integer sequence cannot divide the input dimension of the autoencoder, random integers are added to the long integer sequence until the length of the long integer sequence can be divided by the input dimension of the autoencoder.
8. The method for encoding and compressing three-dimensional point cloud geometric information based on an automatic encoder according to claim 1, It is characterized in that The length of the multiple short sequences is equal to the input dimension of the autoencoder.
9. The method for encoding and compressing three-dimensional point cloud geometric information based on an automatic encoder according to claim 1, It is characterized in that The multi-layer encoding structure described in step 5 is composed of S automatic encoders connected in series; the S is greater than or equal to 2.
10. The method for encoding and compressing three-dimensional point cloud geometric information based on an automatic encoder according to claim 1, It is characterized in that The reconstructed point cloud in step 9 is the input point cloud in step 1.
